@gkd-kit/inspect 0.0.1716635075062 → 0.0.1716891031723

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/assets/{ActionCard.vue_vue_type_script_setup_true_lang-L607Y5RM.js → ActionCard.vue_vue_type_script_setup_true_lang-B6RLBB2h.js} +2 -2
  2. package/dist/assets/{ActionCard.vue_vue_type_script_setup_true_lang-L607Y5RM.js.map → ActionCard.vue_vue_type_script_setup_true_lang-B6RLBB2h.js.map} +1 -1
  3. package/dist/assets/{DevicePage-CBkq1QKp.js → DevicePage-BrEufM35.js} +2 -2
  4. package/dist/assets/{DevicePage-CBkq1QKp.js.map → DevicePage-BrEufM35.js.map} +1 -1
  5. package/dist/assets/{HomePage-BKjXsb0A.js → HomePage-BErol2Xb.js} +2 -2
  6. package/dist/assets/{HomePage-BKjXsb0A.js.map → HomePage-BErol2Xb.js.map} +1 -1
  7. package/dist/assets/{ImportPage-Ch-sQ_3i.js → ImportPage-Bu--wF7d.js} +2 -2
  8. package/dist/assets/{ImportPage-Ch-sQ_3i.js.map → ImportPage-Bu--wF7d.js.map} +1 -1
  9. package/dist/assets/{PreviewSharePage-58pQyp3R.js → PreviewSharePage-D7GRatfn.js} +2 -2
  10. package/dist/assets/{PreviewSharePage-58pQyp3R.js.map → PreviewSharePage-D7GRatfn.js.map} +1 -1
  11. package/dist/assets/{SnapshotPage-B1XktxYv.js → SnapshotPage-CwmoilRP.js} +4 -4
  12. package/dist/assets/SnapshotPage-CwmoilRP.js.map +1 -0
  13. package/dist/assets/{TrackGraph-DWRQFRjk.js → TrackGraph-DJcp-BEC.js} +2 -2
  14. package/dist/assets/{TrackGraph-DWRQFRjk.js.map → TrackGraph-DJcp-BEC.js.map} +1 -1
  15. package/dist/assets/{_404Page-Cm27rPQ4.js → _404Page-WpcH2wTh.js} +2 -2
  16. package/dist/assets/{_404Page-Cm27rPQ4.js.map → _404Page-WpcH2wTh.js.map} +1 -1
  17. package/dist/assets/{fetch-D6xjIf9t.js → fetch-ZXTkCeAZ.js} +3 -3
  18. package/dist/assets/{fetch-D6xjIf9t.js.map → fetch-ZXTkCeAZ.js.map} +1 -1
  19. package/dist/assets/{import-ZP2BVqnm.js → import-DaXdXvyi.js} +2 -2
  20. package/dist/assets/{import-ZP2BVqnm.js.map → import-DaXdXvyi.js.map} +1 -1
  21. package/dist/assets/{index-Bti7DlTg.js → index-BP0jWZRH.js} +4 -4
  22. package/dist/assets/{index-Bti7DlTg.js.map → index-BP0jWZRH.js.map} +1 -1
  23. package/dist/assets/{index-C7s9qHju.js → index-Da461Px_.js} +2 -2
  24. package/dist/assets/{index-C7s9qHju.js.map → index-Da461Px_.js.map} +1 -1
  25. package/dist/assets/{index-0DeFdsRd.js → index-DsyQtnUJ.js} +2 -2
  26. package/dist/assets/{index-0DeFdsRd.js.map → index-DsyQtnUJ.js.map} +1 -1
  27. package/dist/assets/{jszip.min-UZKAtzBb.js → jszip.min-EgWa9lCw.js} +2 -2
  28. package/dist/assets/{jszip.min-UZKAtzBb.js.map → jszip.min-EgWa9lCw.js.map} +1 -1
  29. package/dist/assets/{node-dv-HI6u1.js → node-BhK-TtbM.js} +2 -2
  30. package/dist/assets/{node-dv-HI6u1.js.map → node-BhK-TtbM.js.map} +1 -1
  31. package/dist/assets/{selector-DedzL2Bp.js → selector-CKkrrvhR.js} +3 -3
  32. package/dist/assets/{selector-DedzL2Bp.js.map → selector-CKkrrvhR.js.map} +1 -1
  33. package/dist/assets/{table-hcTun4dd.js → table-Bve-UJH6.js} +2 -2
  34. package/dist/assets/{table-hcTun4dd.js.map → table-Bve-UJH6.js.map} +1 -1
  35. package/dist/index.html +3 -3
  36. package/package.json +1 -1
  37. package/dist/assets/SnapshotPage-B1XktxYv.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{h as p,C as e,F as r,O as c,K as l,aB as d,aA as _,I as t}from"./index-Bti7DlTg.js";const f={flex:"","flex-col":"","flex-items-center":"","w-100vw":"","pt-50px":"","gap-20px":""},u={key:0},m={key:1},k=p({__name:"_404Page",setup(h){var s;const n=_(),{fullPath:o}=(s=n.redirectedFrom)!=null?s:{};return(i,a)=>(t(),e("div",f,[r(o)?(t(),e("div",u,c("访问的地址 "+r(o)+" 不存在"),1)):(t(),e("div",m,"欢迎来到404页面")),l("a",{href:"/",onClick:a[0]||(a[0]=d(v=>i.$router.replace({path:"/"}),["prevent"]))}," 回到首页 ")]))}});export{k as default};
2
- //# sourceMappingURL=_404Page-Cm27rPQ4.js.map
1
+ import{h as p,C as e,F as r,O as c,K as l,aB as d,aA as _,I as t}from"./index-BP0jWZRH.js";const f={flex:"","flex-col":"","flex-items-center":"","w-100vw":"","pt-50px":"","gap-20px":""},u={key:0},m={key:1},k=p({__name:"_404Page",setup(h){var s;const n=_(),{fullPath:o}=(s=n.redirectedFrom)!=null?s:{};return(i,a)=>(t(),e("div",f,[r(o)?(t(),e("div",u,c("访问的地址 "+r(o)+" 不存在"),1)):(t(),e("div",m,"欢迎来到404页面")),l("a",{href:"/",onClick:a[0]||(a[0]=d(v=>i.$router.replace({path:"/"}),["prevent"]))}," 回到首页 ")]))}});export{k as default};
2
+ //# sourceMappingURL=_404Page-WpcH2wTh.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"_404Page-Cm27rPQ4.js","sources":["../../src/views/_404Page.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useRoute } from 'vue-router';\n\nconst route = useRoute();\n\nconst { fullPath } = route.redirectedFrom ?? {};\n</script>\n<template>\n <div flex flex-col flex-items-center w-100vw pt-50px gap-20px>\n <div v-if=\"fullPath\">{{ `访问的地址 ` + fullPath + ` 不存在` }}</div>\n <div v-else>欢迎来到404页面</div>\n <a href=\"/\" @click.prevent=\"$router.replace({ path: `/` })\"> 回到首页 </a>\n </div>\n</template>\n"],"names":["route","useRoute","fullPath","_a"],"mappings":"oPAGA,MAAMA,EAAQC,IAER,CAAE,SAAAC,CAAa,GAAAC,EAAAH,EAAM,iBAAN,KAAAG,EAAwB,CAAA"}
1
+ {"version":3,"file":"_404Page-WpcH2wTh.js","sources":["../../src/views/_404Page.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useRoute } from 'vue-router';\n\nconst route = useRoute();\n\nconst { fullPath } = route.redirectedFrom ?? {};\n</script>\n<template>\n <div flex flex-col flex-items-center w-100vw pt-50px gap-20px>\n <div v-if=\"fullPath\">{{ `访问的地址 ` + fullPath + ` 不存在` }}</div>\n <div v-else>欢迎来到404页面</div>\n <a href=\"/\" @click.prevent=\"$router.replace({ path: `/` })\"> 回到首页 </a>\n </div>\n</template>\n"],"names":["route","useRoute","fullPath","_a"],"mappings":"oPAGA,MAAMA,EAAQC,IAER,CAAE,SAAAC,CAAa,GAAAC,EAAAH,EAAM,iBAAN,KAAAG,EAAwB,CAAA"}
@@ -1,4 +1,4 @@
1
- import{e as x,ca as De,cb as Ue,h as O,r as k,v as h,cc as Ve,b3 as Ce,cd as Ge,J as we,a1 as I,ce as ke,cf as ce,cg as de,ch as Xe,ci as Qe,G as W,a9 as G,S as X,ab as z,ac as q,ah as Je,c as fe,aj as Ye,a4 as R,b as m,cj as Ze,f as b,u as F,m as _,j as T,q as ue,a6 as eo,a7 as oo,aY as Se,as as N,b4 as no,ax as he,d as P,i as to,a3 as Oe,n as E,N as io,am as B,b0 as $e,x as ro,ae as Ie,ck as je,cl as Le,cm as Pe,cn as Ae,Q as ge,a8 as so,co as ao,B as lo,a_ as co,b2 as fo,ap as uo,cp as ho,an as go,F as pe,cq as vo,bd as po,cr as me,at as mo,aI as be}from"./index-Bti7DlTg.js";function Q(o,e=[],t){const n={};return Object.getOwnPropertyNames(o).forEach(l=>{e.includes(l)||(n[l]=o[l])}),Object.assign(n,t)}const{cubicBezierEaseInOut:A,cubicBezierEaseOut:bo,cubicBezierEaseIn:yo}=De;function xo({overflow:o="hidden",duration:e=".3s",originalTransition:t="",leavingDelay:n="0s",foldPadding:i=!1,enterToProps:l=void 0,leaveToProps:c=void 0,reverse:d=!1}={}){const r=d?"leave":"enter",a=d?"enter":"leave";return[x(`&.fade-in-height-expand-transition-${a}-from,
1
+ import{e as x,ca as De,cb as Ue,h as O,r as k,v as h,cc as Ve,b3 as Ce,cd as Ge,J as we,a1 as I,ce as ke,cf as ce,cg as de,ch as Xe,ci as Qe,G as W,a9 as G,S as X,ab as z,ac as q,ah as Je,c as fe,aj as Ye,a4 as R,b as m,cj as Ze,f as b,u as F,m as _,j as T,q as ue,a6 as eo,a7 as oo,aY as Se,as as N,b4 as no,ax as he,d as P,i as to,a3 as Oe,n as E,N as io,am as B,b0 as $e,x as ro,ae as Ie,ck as je,cl as Le,cm as Pe,cn as Ae,Q as ge,a8 as so,co as ao,B as lo,a_ as co,b2 as fo,ap as uo,cp as ho,an as go,F as pe,cq as vo,bd as po,cr as me,at as mo,aI as be}from"./index-BP0jWZRH.js";function Q(o,e=[],t){const n={};return Object.getOwnPropertyNames(o).forEach(l=>{e.includes(l)||(n[l]=o[l])}),Object.assign(n,t)}const{cubicBezierEaseInOut:A,cubicBezierEaseOut:bo,cubicBezierEaseIn:yo}=De;function xo({overflow:o="hidden",duration:e=".3s",originalTransition:t="",leavingDelay:n="0s",foldPadding:i=!1,enterToProps:l=void 0,leaveToProps:c=void 0,reverse:d=!1}={}){const r=d?"leave":"enter",a=d?"enter":"leave";return[x(`&.fade-in-height-expand-transition-${a}-from,
2
2
  &.fade-in-height-expand-transition-${r}-to`,Object.assign(Object.assign({},l),{opacity:1})),x(`&.fade-in-height-expand-transition-${a}-to,
3
3
  &.fade-in-height-expand-transition-${r}-from`,Object.assign(Object.assign({},c),{opacity:0,marginTop:"0 !important",marginBottom:"0 !important",paddingTop:i?"0 !important":void 0,paddingBottom:i?"0 !important":void 0})),x(`&.fade-in-height-expand-transition-${a}-active`,`
4
4
  overflow: ${o};
@@ -328,5 +328,5 @@ import{e as x,ca as De,cb as Ue,h as O,r as k,v as h,cc as Ve,b3 as Ce,cd as Ge,
328
328
  `),x("&.notification-transition-leave-from, &.notification-transition-enter-to",`
329
329
  transform: translate(0, 0);
330
330
  `)])}const _e=R("n-notification-api"),cn=Object.assign(Object.assign({},T.props),{containerClass:String,containerStyle:[String,Object],to:[String,Object],scrollable:{type:Boolean,default:!0},max:Number,placement:{type:String,default:"top-right"},keepAliveOnHover:Boolean}),dn=O({name:"NotificationProvider",props:cn,setup(o){const{mergedClsPrefixRef:e}=F(o),t=k([]),n={},i=new Set;function l(v){const f=G(),p=()=>{i.add(f),n[f]&&n[f].hide()},y=X(Object.assign(Object.assign({},v),{key:f,destroy:p,hide:p,deactivate:p})),{max:w}=o;if(w&&t.value.length-i.size>=w){let $=!1,j=0;for(const S of t.value){if(!i.has(S.key)){n[S.key]&&(S.destroy(),$=!0);break}j++}$||t.value.splice(j,1)}return t.value.push(y),y}const c=["info","success","warning","error"].map(v=>f=>l(Object.assign(Object.assign({},f),{type:v})));function d(v){i.delete(v),t.value.splice(t.value.findIndex(f=>f.key===v),1)}const r=T("Notification","-notification",ln,Lo,o,e),a={create:l,info:c[0],success:c[1],warning:c[2],error:c[3],open:u,destroyAll:g},s=k(0);I(_e,a),I(J,{props:o,mergedClsPrefixRef:e,mergedThemeRef:r,wipTransitionCountRef:s});function u(v){return l(v)}function g(){Object.values(t.value).forEach(v=>{v.hide()})}return Object.assign({mergedClsPrefix:e,notificationList:t,notificationRefs:n,handleAfterLeave:d},a)},render(){var o,e,t;const{placement:n}=this;return h(W,null,(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o),this.notificationList.length?h(he,{to:(t=this.to)!==null&&t!==void 0?t:"body"},h(on,{class:this.containerClass,style:this.containerStyle,scrollable:this.scrollable&&n!=="top"&&n!=="bottom",placement:n},{default:()=>this.notificationList.map(i=>h(an,Object.assign({ref:l=>{const c=i.key;l===null?delete this.notificationRefs[c]:this.notificationRefs[c]=l}},Q(i,["destroy","hide","deactivate"]),{internalKey:i.key,onInternalAfterLeave:this.handleAfterLeave,keepAliveOnHover:i.keepAliveOnHover===void 0?this.keepAliveOnHover:i.keepAliveOnHover})))})):null)}});function fn(){const o=z(_e,null);return o===null&&q("use-notification","No outer `n-notification-provider` found."),o}const un=O({name:"InjectionExtractor",props:{onSetup:Function},setup(o,{slots:e}){var t;return(t=o.onSetup)===null||t===void 0||t.call(o),()=>{var n;return(n=e.default)===null||n===void 0?void 0:n.call(e)}}}),hn={message:Xo,notification:fn,loadingBar:To,dialog:Oo,modal:en};function gn({providersAndProps:o,configProviderProps:e}){let n=ho(()=>h(vo,pe(e),{default:()=>o.map(({type:d,Provider:r,props:a})=>h(r,pe(a),{default:()=>h(un,{onSetup:()=>i[d]=hn[d]()})}))}));const i={app:n};let l;return go&&(l=document.createElement("div"),document.body.appendChild(l),n.mount(l)),Object.assign({unmount:()=>{var d;if(n===null||l===null){po("discrete","unmount call no need because discrete app has been unmounted");return}n.unmount(),(d=l.parentNode)===null||d===void 0||d.removeChild(l),l=null,n=null}},i)}function vn(o,{configProviderProps:e,messageProviderProps:t,dialogProviderProps:n,notificationProviderProps:i,loadingBarProviderProps:l,modalProviderProps:c}={}){const d=[];return o.forEach(a=>{switch(a){case"message":d.push({type:a,Provider:Go,props:t});break;case"notification":d.push({type:a,Provider:dn,props:i});break;case"dialog":d.push({type:a,Provider:So,props:n});break;case"loadingBar":d.push({type:a,Provider:Fo,props:l});break;case"modal":d.push({type:a,Provider:Zo,props:c})}}),gn({providersAndProps:d,configProviderProps:e})}const{message:xe,dialog:Ln,loadingBar:Pn}=vn(["message","dialog","loadingBar"]),An=(...o)=>{const e=new FormData;return o.forEach(t=>{for(const n in t){const i=t[n];i!==void 0&&(i instanceof File?e.append(n,i,i.name):i instanceof Blob?e.append(n,i):e.append(n,String(i)))}}),e},pn=o=>{const e={};return o.forEach((t,n)=>{e[n]=t}),e},K=async(o=0)=>new Promise(e=>{setTimeout(e,o)}),zn=(()=>{let o;return async e=>{if(o!==e){o=e,K(1e4).then(()=>{o=void 0});try{await navigator.clipboard.writeText(e),xe.success("复制成功")}catch{xe.error("复制失败")}}}})(),En=()=>{const o=window.innerHeight>window.innerWidth;ge(()=>{o&&me.classList.add("mobile")}),mo(()=>{me.classList.remove("mobile")})},Rn=o=>{const e=Math.floor((Date.now()-o)/1e3),t=Math.floor(e/31536e3);if(t>=1)return`${t} 年前`;const n=Math.floor(e/2592e3);if(n>=1)return`${n} 月前`;const i=Math.floor(e/86400);if(i>=1)return`${i} 天前`;const l=Math.floor(e/3600);if(l>=1)return`${l} 小时前`;const c=Math.floor(e/60);return c>=1?`${c} 分钟前`:"刚刚"},mn=()=>{},Mn=()=>mn,Hn=(o,e)=>{const t={};return e.forEach(n=>{const i=o[n];i!==void 0&&(t[n]=i)}),t},bn=o=>(...e)=>o()(...e),yn=bn(()=>{var o;return(o=window.__NetworkExtension__)==null?void 0:o.GM_xmlhttpRequest}),xn=()=>{var o;return!!((o=window.__NetworkExtension__)!=null&&o.GM_xmlhttpRequest)},Cn=(o="")=>{const e=new Headers;return o.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(n){return n.startsWith(`
331
- `)?n.substring(1):n}).forEach(function(n){var c;let i=n.split(":"),l=(c=i.shift())==null?void 0:c.trim();if(l){let d=i.join(":").trim();try{e.append(l,d)}catch{}}}),e},wn=(o="")=>{try{return o===""&&location.href?location.href:o}catch{return o}},kn=async(o,e={},t={})=>{var a;const n=new Request(o,e).clone();if((a=n.signal)!=null&&a.aborted)throw new DOMException("Aborted","AbortError");const i=n.method.toUpperCase(),l=wn(n.url),c=new Headers(n.headers);new Headers(e.headers).forEach((s,u)=>{c.set(u,s)});let d=!1,r;return i!="GET"&&e.body&&(typeof e.body=="string"||e.body instanceof URLSearchParams?r=e.body:e.body instanceof FormData?(r=e.body,c.delete("content-type")):(d=!0,r=await n.blob())),new Promise((s,u)=>{var p;let g={method:i,url:l,headers:pn(c),data:r,binary:d,responseType:"blob",async onload(y){var j;let w;y.response instanceof Blob&&y.response.size==0||(w=(j=y.response)!=null?j:y.responseText),await K();const $=new Response(w,{status:y.status,statusText:y.statusText,headers:Cn(y.responseHeaders)});Object.defineProperty($,"url",{value:y.finalUrl}),s($)},async onerror(){await K(),u(new TypeError("Network request onerror failed"))},async ontimeout(){await K(),u(new TypeError("Network request ontimeout failed"))},async onabort(){await K(),u(new DOMException("Aborted","AbortError"))},async onreadystatechange(y){var w;y.readyState===4&&((w=n.signal)==null||w.removeEventListener("abort",f))}};typeof t=="function"?g=t(g):g={...g,...t};const v=yn(g);function f(){v.abort()}(p=n.signal)==null||p.addEventListener("abort",f)})},Sn=new Set([location.origin,"https://cdn.jsdelivr.net","https://fastly.jsdelivr.net","https://raw.githubusercontent.com","https://gist.githubusercontent.com","https://raw.githubusercontents.com","https://raw.gitmirror.com","https://registry.npmmirror.com"]),On=o=>(o=new URL(o),o.hostname=="127.0.0.1"||o.hostname=="localhost"||location.protocol=="http:"&&o.protocol=="http:"&&o.hostname.split(".").every(e=>Number.isSafeInteger(parseInt(e)))?!0:Sn.has(o.origin)),$n=/^https:\/\/github\.com\/gkd-kit\/inspect\/files\/([0-9]+)\/file\.zip$/,In=/^https:\/\/github\.com\/gkd-kit\/inspect\/assets\/([0-9]+)\/([0-9a-z-]+)$/,Bn=(o,e)=>{e=e.toString();const{1:t}=e.match($n)||[],{1:n,2:i}=e.match(In)||[];if(t)return location.origin+o.resolve({path:`/i/${t}`}).href;if(n&&i)return`https://m.gkd.li/${n}/${i}`;throw new Error(`github url ${e} should come from gkd-kit/inspect files/assets`)},_n=async(o,e,t)=>{const n=new Request(o),i=new URL(n.url);if(On(i))return fetch(o,{...e,mode:"cors"});if(xn())return kn(o,e);if(t!=null&&t.proxy){if(!i.href.startsWith("https://github.com/"))throw be.networkErrorDlgVisible=!0,new Error("proxy is not supported");const l=new URL("https://proxy.gkd.li");l.searchParams.set("proxyUrl",i.href);const c=new Request(o,e);return fetch(l,{method:c.method,headers:c.headers,body:c.body})}else throw be.networkErrorDlgVisible=!0,new Error("gm is not supported")};export{K as a,Mn as b,zn as c,Ln as d,xn as e,xo as f,Bn as g,_n as h,$n as i,In as j,Hn as k,Pn as l,xe as m,Q as n,An as o,Rn as t,En as u};
332
- //# sourceMappingURL=fetch-D6xjIf9t.js.map
331
+ `)?n.substring(1):n}).forEach(function(n){var c;let i=n.split(":"),l=(c=i.shift())==null?void 0:c.trim();if(l){let d=i.join(":").trim();try{e.append(l,d)}catch{}}}),e},wn=(o="")=>{try{return o===""&&location.href?location.href:o}catch{return o}},kn=async(o,e={},t={})=>{var a;const n=new Request(o,e).clone();if((a=n.signal)!=null&&a.aborted)throw new DOMException("Aborted","AbortError");const i=n.method.toUpperCase(),l=wn(n.url),c=new Headers(n.headers);new Headers(e.headers).forEach((s,u)=>{c.set(u,s)});let d=!1,r;return i!="GET"&&e.body&&(typeof e.body=="string"||e.body instanceof URLSearchParams?r=e.body:e.body instanceof FormData?(r=e.body,c.delete("content-type")):(d=!0,r=await n.blob())),new Promise((s,u)=>{var p;let g={method:i,url:l,headers:pn(c),data:r,binary:d,responseType:"blob",async onload(y){var j;let w;y.response instanceof Blob&&y.response.size==0||(w=(j=y.response)!=null?j:y.responseText),await K();const $=new Response(w,{status:y.status,statusText:y.statusText,headers:Cn(y.responseHeaders)});Object.defineProperty($,"url",{value:y.finalUrl}),s($)},async onerror(){await K(),u(new TypeError("Network request onerror failed"))},async ontimeout(){await K(),u(new TypeError("Network request ontimeout failed"))},async onabort(){await K(),u(new DOMException("Aborted","AbortError"))},async onreadystatechange(y){var w;y.readyState===4&&((w=n.signal)==null||w.removeEventListener("abort",f))}};typeof t=="function"?g=t(g):g={...g,...t};const v=yn(g);function f(){v.abort()}(p=n.signal)==null||p.addEventListener("abort",f)})},Sn=new Set([location.origin,"https://cdn.jsdelivr.net","https://fastly.jsdelivr.net","https://raw.githubusercontent.com","https://gist.githubusercontent.com","https://raw.githubusercontents.com","https://raw.gitmirror.com","https://registry.npmmirror.com","https://detect.gkd.li"]),On=o=>(o=new URL(o),o.hostname=="127.0.0.1"||o.hostname=="localhost"||location.protocol=="http:"&&o.protocol=="http:"&&o.hostname.split(".").every(e=>Number.isSafeInteger(parseInt(e)))?!0:Sn.has(o.origin)),$n=/^https:\/\/github\.com\/gkd-kit\/inspect\/files\/([0-9]+)\/file\.zip$/,In=/^https:\/\/github\.com\/gkd-kit\/inspect\/assets\/([0-9]+)\/([0-9a-z-]+)$/,Bn=(o,e)=>{e=e.toString();const{1:t}=e.match($n)||[],{1:n,2:i}=e.match(In)||[];if(t)return location.origin+o.resolve({path:`/i/${t}`}).href;if(n&&i)return`https://m.gkd.li/${n}/${i}`;throw new Error(`github url ${e} should come from gkd-kit/inspect files/assets`)},_n=async(o,e,t)=>{const n=new Request(o),i=new URL(n.url);if(On(i))return fetch(o,{...e,mode:"cors"});if(xn())return kn(o,e);if(t!=null&&t.proxy){if(!i.href.startsWith("https://github.com/"))throw be.networkErrorDlgVisible=!0,new Error("proxy is not supported");const l=new URL("https://proxy.gkd.li");l.searchParams.set("proxyUrl",i.href);const c=new Request(o,e);return fetch(l,{method:c.method,headers:c.headers,body:c.body})}else throw be.networkErrorDlgVisible=!0,new Error("gm is not supported")};export{K as a,Mn as b,zn as c,Ln as d,xn as e,xo as f,Bn as g,_n as h,$n as i,In as j,Hn as k,Pn as l,xe as m,Q as n,An as o,Rn as t,En as u};
332
+ //# sourceMappingURL=fetch-ZXTkCeAZ.js.map