upptime/client/legacy/createOctokit.39dd768a.js

9 lines
79 KiB
JavaScript
Raw Normal View History

import{S as e,i as r,s,e as o,M as t,b as n,d as i,N as a,f as c,g as p,r as l,h as u,p as d,q as g}from"./client.6f96cb6b.js";function m(e){let r,s,m,E,T,h,w;return{c(){r=o("div"),s=t("svg"),m=t("g"),E=t("g"),T=t("circle"),h=t("path"),w=t("animateTransform"),this.h()},l(e){r=n(e,"DIV",{class:!0});var o=i(r);s=a(o,"svg",{width:!0,height:!0,xmlns:!0,stroke:!0,title:!0,class:!0});var t=i(s);m=a(t,"g",{fill:!0,"fill-rule":!0});var p=i(m);E=a(p,"g",{transform:!0,"stroke-width":!0});var l=i(E);T=a(l,"circle",{"stroke-opacity":!0,cx:!0,cy:!0,r:!0}),i(T).forEach(c),h=a(l,"path",{d:!0});var u=i(h);w=a(u,"animateTransform",{attributeName:!0,type:!0,from:!0,to:!0,dur:!0,repeatCount:!0}),i(w).forEach(c),u.forEach(c),l.forEach(c),p.forEach(c),t.forEach(c),o.forEach(c),this.h()},h(){p(T,"stroke-opacity",".5"),p(T,"cx","18"),p(T,"cy","18"),p(T,"r","18"),p(w,"attributeName","transform"),p(w,"type","rotate"),p(w,"from","0 18 18"),p(w,"to","360 18 18"),p(w,"dur","1s"),p(w,"repeatCount","indefinite"),p(h,"d","M36 18c0-9.94-8.06-18-18-18"),p(E,"transform","translate(1 1)"),p(E,"stroke-width","2"),p(m,"fill","none"),p(m,"fill-rule","evenodd"),p(s,"width","38"),p(s,"height","38"),p(s,"xmlns","http://www.w3.org/2000/svg"),p(s,"stroke","#aaa"),p(s,"title",l.loading),p(s,"class","svelte-68jxue"),p(r,"class","loading svelte-68jxue")},m(e,o){u(e,r,o),d(r,s),d(s,m),d(m,E),d(E,T),d(E,h),d(h,w)},p:g,i:g,o:g,d(e){e&&c(r)}}}class E extends e{constructor(e){super(),r(this,e,null,m,s,{})}}function T(){return"object"==typeof navigator&&"userAgent"in navigator?navigator.userAgent:"object"==typeof process&&void 0!==process.version?"Node.js/".concat(process.version.substr(1)," (").concat(process.platform,"; ").concat(process.arch,")"):"<environment undetectable>"}var h=function e(r,s,o,t){if("function"!=typeof o)throw new Error("method for before hook must be a function");t||(t={});if(Array.isArray(s))return s.reverse().reduce((function(s,o){return e.bind(null,r,o,s,t)}),o)();return Promise.resolve().then((function(){return r.registry[s]?r.registry[s].reduce((function(e,r){return r.hook.bind(null,e,t)}),o)():o(t)}))};var w=function(e,r,s,o){var t=o;e.registry[s]||(e.registry[s]=[]);"before"===r&&(o=function(e,r){return Promise.resolve().then(t.bind(null,r)).then(e.bind(null,r))});"after"===r&&(o=function(e,r){var s;return Promise.resolve().then(e.bind(null,r)).then((function(e){return t(s=e,r)})).then((function(){return s}))});"error"===r&&(o=function(e,r){return Promise.resolve().then(e.bind(null,r)).catch((function(e){return t(e,r)}))});e.registry[s].push({hook:o,orig:t})};var b=function(e,r,s){if(!e.registry[r])return;var o=e.registry[r].map((function(e){return e.orig})).indexOf(s);if(-1===o)return;e.registry[r].splice(o,1)};var _=Function.bind,f=_.bind(_);function k(e,r,s){var o=f(b,null).apply(null,s?[r,s]:[r]);e.api={remove:o},e.remove=o,["before","error","after","wrap"].forEach((function(o){var t=s?[r,o,s]:[r,o];e[o]=e.api[o]=f(w,null).apply(null,t)}))}function G(){var e={registry:{}},r=h.bind(null,e);return k(r,e),r}var P=!1;function y(){return P||(console.warn('[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4'),P=!0),G()}y.Singular=function(){var e={registry:{}},r=h.bind(null,e,"h");return k(r,e,"h"),r}.bind(),y.Collection=G.bind();var v=y,A=y,F=y.Singular,O=y.Collection;
2024-01-22 15:19:29 -06:00
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
function S(e){return"[object Object]"===Object.prototype.toString.call(e)}function U(e){var r,s;return!1!==S(e)&&(void 0===(r=e.constructor)||!1!==S(s=r.prototype)&&!1!==s.hasOwnProperty("isPrototypeOf"))}function R(e,r){const s=Object.assign({},e);return Object.keys(r).forEach((o=>{U(r[o])?o in e?s[o]=R(e[o],r[o]):Object.assign(s,{[o]:r[o]}):Object.assign(s,{[o]:r[o]})})),s}function C(e){for(const r in e)void 0===e[r]&&delete e[r];return e}function D(e,r,s){if("string"==typeof r){let[e,o]=r.split(" ");s=Object.assign(o?{method:e,url:o}:{url:e},s)}else s=Object.assign({},r);var o;s.headers=(o=s.headers)?Object.keys(o).reduce(((e,r)=>(e[r.toLowerCase()]=o[r],e)),{}):{},C(s),C(s.headers);const t=R(e||{},s);return e&&e.mediaType.previews.length&&(t.mediaType.previews=e.mediaType.previews.filter((e=>!t.mediaType.previews.includes(e))).concat(t.mediaType.previews)),t.mediaType.previews=t.mediaType.previews.map((e=>e.replace(/-preview/,""))),t}v.Hook=A,v.Singular=F,v.Collection=O;const L=/\{[^}]+\}/g;function j(e){return e.replace(/^\W+|\W+$/g,"").split(/,/)}function I(e,r){return Object.keys(e).filter((e=>!r.includes(e))).reduce(((r,s)=>(r[s]=e[s],r)),{})}function q(e){return e.split(/(%[0-9A-Fa-f]{2})/g).map((function(e){return/%[0-9A-Fa-f]/.test(e)||(e=encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]")),e})).join("")}function H(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function W(e,r,s){return r="+"===e||"#"===e?q(r):H(r),s?H(s)+"="+r:r}function B(e){return null!=e}function x(e){return";"===e||"&"===e||"?"===e}function z(e,r){var s=["+","#",".","/",";","?","&"];return e.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,(function(e,o,t){if(o){let e="";const t=[];if(-1!==s.indexOf(o.charAt(0))&&(e=o.charAt(0),o=o.substr(1)),o.split(/,/g).forEach((function(s){var o=/([^:\*]*)(?::(\d+)|(\*))?/.exec(s);t.push(function(e,r,s,o){var t=e[s],n=[];if(B(t)&&""!==t)if("string"==typeof t||"number"==typeof t||"boolean"==typeof t)t=t.toString(),o&&"*"!==o&&(t=t.substring(0,parseInt(o,10))),n.push(W(r,t,x(r)?s:""));else if("*"===o)Array.isArray(t)?t.filter(B).forEach((function(e){n.push(W(r,e,x(r)?s:""))})):Object.keys(t).forEach((function(e){B(t[e])&&n.push(W(r,t[e],e))}));else{const e=[];Array.isArray(t)?t.filter(B).forEach((function(s){e.push(W(r,s))})):Object.keys(t).forEach((function(s){B(t[s])&&(e.push(H(s)),e.push(W(r,t[s].toString())))})),x(r)?n.push(H(s)+"="+e.join(",")):0!==e.length&&n.push(e.join(","))}else";"===r?B(t)&&n.push(H(s)):""!==t||"&"!==r&&"?"!==r?""===t&&n.push(""):n.push(H(s)+"=");return n}(r,e,o[1],o[2]||o[3]))})),e&&"+"!==e){var n=",";return"?"===e?n="&":"#"!==e&&(n=e),(0!==t.length?e:"")+t.join(n)}return t.join(",")}return q(t)}))}function K(e){let r,s=e.method.toUpperCase(),o=(e.url||"/").replace(/:([a-z]\w+)/g,"{$1}"),t=Object.assign({},e.headers),n=I(e,["method","baseUrl","url","headers","request","mediaType"]);const i=function(e){const r=e.match(L);return r?r.map(j).reduce(((e,r)=>e.concat(r)),[]):[]}(o);var a;o=(a=o,{expand:z.bind(null,a)}).expand(n),/^http/.test(o)||(o=e.baseUrl+o);const c=I(n,Object.keys(e).filter((e=>i.includes(e))).concat("baseUrl"));if(!/application\/octet-stream/i.test(t.accept)&&(e.mediaType.format&&(t.accept=t.accept.split(/,/).map((r=>r.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,"application/vnd$1$2.".concat(e.mediaType.format)))).join(",")),e.mediaType.previews.length)){const r=t.accept.match(/[\w-]+(?=-preview)/g)||[];t.accept=r.concat(e.mediaType.previews).map((r=>{const s=e.mediaType.format?".".concat(e.mediaType.format):"+json";return"application/vnd.github.".concat(r,"-preview").concat(s)})).join(",")}return["GET","HEAD"].includes(s)?o=function(e,r){const s=/\?/.test(e)?"&":"?",o=Object.keys(r);return 0===o.length?e:e+s+o.map((e=>"q"===e?"q="+r.q.split("+").map(encodeURIComponent).join("+"):"".concat(e,"=").concat(encodeURIComponent(r[e])))).join("&")}(o,c):"data"in c?r=c.data:Object.keys(c).length?r=c:t["content-length"]=0,t["content-type"]||void 0===r||(t["content-type"]="application/json; cha