@gkd-kit/inspect 0.0.1717144446578 → 0.0.1717159501171

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 (45) hide show
  1. package/dist/assets/ActionCard.vue_vue_type_script_setup_true_lang-DraE-3ap.js +10 -0
  2. package/dist/assets/{ActionCard.vue_vue_type_script_setup_true_lang-C93_MZRO.js.map → ActionCard.vue_vue_type_script_setup_true_lang-DraE-3ap.js.map} +1 -1
  3. package/dist/assets/{DevicePage-BiDLaVdf.js → DevicePage-erHRPl3A.js} +3 -3
  4. package/dist/assets/{DevicePage-BiDLaVdf.js.map → DevicePage-erHRPl3A.js.map} +1 -1
  5. package/dist/assets/{HomePage-DZNMXZxh.js → HomePage-Duc_3HHo.js} +5 -5
  6. package/dist/assets/{HomePage-DZNMXZxh.js.map → HomePage-Duc_3HHo.js.map} +1 -1
  7. package/dist/assets/ImportPage-rJGihi5b.js +2 -0
  8. package/dist/assets/ImportPage-rJGihi5b.js.map +1 -0
  9. package/dist/assets/{PreviewSharePage-D4n48DEp.js → PreviewSharePage-mjmRS0Qz.js} +2 -2
  10. package/dist/assets/{PreviewSharePage-D4n48DEp.js.map → PreviewSharePage-mjmRS0Qz.js.map} +1 -1
  11. package/dist/assets/SnapshotPage-6Csrw5uE.js +272 -0
  12. package/dist/assets/SnapshotPage-6Csrw5uE.js.map +1 -0
  13. package/dist/assets/{TrackGraph-BXeJyqXu.js → TrackGraph-BiV46PRm.js} +2 -2
  14. package/dist/assets/{TrackGraph-BXeJyqXu.js.map → TrackGraph-BiV46PRm.js.map} +1 -1
  15. package/dist/assets/{_404Page-Bg6kYI9T.js → _404Page-Do1ul5YH.js} +2 -2
  16. package/dist/assets/{_404Page-Bg6kYI9T.js.map → _404Page-Do1ul5YH.js.map} +1 -1
  17. package/dist/assets/{fetch-D-io-zYm.js → fetch-BHXtD9U5.js} +21 -21
  18. package/dist/assets/fetch-BHXtD9U5.js.map +1 -0
  19. package/dist/assets/import-DwHfF2dR.js +2 -0
  20. package/dist/assets/import-DwHfF2dR.js.map +1 -0
  21. package/dist/assets/{index-Cn1sD9E1.js → index-BIjjNW4D.js} +2 -2
  22. package/dist/assets/{index-Cn1sD9E1.js.map → index-BIjjNW4D.js.map} +1 -1
  23. package/dist/assets/{index-7Qv9BJ7h.js → index-Bpihfthp.js} +41 -41
  24. package/dist/assets/index-Bpihfthp.js.map +1 -0
  25. package/dist/assets/{index-BV3N9of-.js → index-Dljev20H.js} +2 -2
  26. package/dist/assets/{index-BV3N9of-.js.map → index-Dljev20H.js.map} +1 -1
  27. package/dist/assets/{jszip.min-CFVT6u4h.js → jszip.min-DGKPpRLR.js} +4 -4
  28. package/dist/assets/{jszip.min-CFVT6u4h.js.map → jszip.min-DGKPpRLR.js.map} +1 -1
  29. package/dist/assets/{node-RaIPs-rl.js → node-J8wd2vlL.js} +6 -6
  30. package/dist/assets/{node-RaIPs-rl.js.map → node-J8wd2vlL.js.map} +1 -1
  31. package/dist/assets/{selector-Ppy4-9PD.js → selector-CZIQQsUk.js} +3 -3
  32. package/dist/assets/{selector-Ppy4-9PD.js.map → selector-CZIQQsUk.js.map} +1 -1
  33. package/dist/assets/{table-BkOdJIyN.js → table-Cgu94Daj.js} +2 -2
  34. package/dist/assets/{table-BkOdJIyN.js.map → table-Cgu94Daj.js.map} +1 -1
  35. package/dist/index.html +3 -3
  36. package/package.json +1 -1
  37. package/dist/assets/ActionCard.vue_vue_type_script_setup_true_lang-C93_MZRO.js +0 -10
  38. package/dist/assets/ImportPage-mT3DldLy.js +0 -2
  39. package/dist/assets/ImportPage-mT3DldLy.js.map +0 -1
  40. package/dist/assets/SnapshotPage-BsRaiktw.js +0 -272
  41. package/dist/assets/SnapshotPage-BsRaiktw.js.map +0 -1
  42. package/dist/assets/fetch-D-io-zYm.js.map +0 -1
  43. package/dist/assets/import-DrT3vy2r.js +0 -2
  44. package/dist/assets/import-DrT3vy2r.js.map +0 -1
  45. package/dist/assets/index-7Qv9BJ7h.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-7Qv9BJ7h.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-Bg6kYI9T.js.map
1
+ import{h as p,C as e,F as r,O as c,K as l,aC as d,aB as _,I as t}from"./index-Bpihfthp.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-Do1ul5YH.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"_404Page-Bg6kYI9T.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-Do1ul5YH.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,10 +1,10 @@
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-7Qv9BJ7h.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,ce as De,cf as Ue,h as O,r as k,v as h,cg as Ve,b7 as Ce,ch as Ge,J as we,a2 as L,ci as ke,cj as ce,ck as de,cl as Xe,cm as Qe,G as W,aa as G,S as X,ac as E,ad as q,ai as Je,c as fe,ak as Ye,a5 as R,b as m,cn as Ze,f as b,u as F,m as _,j as T,q as ue,a7 as eo,a8 as oo,b0 as Se,at as N,b8 as no,ay as he,d as I,i as to,a4 as Oe,n as z,N as io,an as B,b4 as $e,x as ro,af as Le,co as Pe,cp as je,cq as Ie,cr as Ae,Q as ve,a9 as so,cs as ao,B as lo,b2 as co,b6 as fo,aq as uo,ct as ho,ao as vo,F as pe,cu as go,bh as po,cv as me,au as mo,cw as bo,aK as be}from"./index-Bpihfthp.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:yo,cubicBezierEaseIn:xo}=De;function Co({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};
5
5
  transition:
6
6
  max-height ${e} ${A} ${n},
7
- opacity ${e} ${bo} ${n},
7
+ opacity ${e} ${yo} ${n},
8
8
  margin-top ${e} ${A} ${n},
9
9
  margin-bottom ${e} ${A} ${n},
10
10
  padding-top ${e} ${A} ${n},
@@ -14,13 +14,13 @@ 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,
14
14
  overflow: ${o};
15
15
  transition:
16
16
  max-height ${e} ${A},
17
- opacity ${e} ${yo},
17
+ opacity ${e} ${xo},
18
18
  margin-top ${e} ${A},
19
19
  margin-bottom ${e} ${A},
20
20
  padding-top ${e} ${A},
21
21
  padding-bottom ${e} ${A}
22
22
  ${t?","+t:""}
23
- `)]}const Co=Object.assign(Object.assign({},Ue),{onAfterEnter:Function,onAfterLeave:Function,transformOrigin:String,blockScroll:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},onEsc:Function,autoFocus:{type:Boolean,default:!0},internalStyle:[String,Object],maskClosable:{type:Boolean,default:!0},onPositiveClick:Function,onNegativeClick:Function,onClose:Function,onMaskClick:Function}),wo=O({name:"DialogEnvironment",props:Object.assign(Object.assign({},Co),{internalKey:{type:String,required:!0},to:[String,Object],onInternalAfterLeave:{type:Function,required:!0}}),setup(o){const e=k(!0);function t(){const{onInternalAfterLeave:s,internalKey:u,onAfterLeave:g}=o;s&&s(u),g&&g()}function n(s){const{onPositiveClick:u}=o;u?Promise.resolve(u(s)).then(g=>{g!==!1&&r()}):r()}function i(s){const{onNegativeClick:u}=o;u?Promise.resolve(u(s)).then(g=>{g!==!1&&r()}):r()}function l(){const{onClose:s}=o;s?Promise.resolve(s()).then(u=>{u!==!1&&r()}):r()}function c(s){const{onMaskClick:u,maskClosable:g}=o;u&&(u(s),g&&r())}function d(){const{onEsc:s}=o;s&&s()}function r(){e.value=!1}function a(s){e.value=s}return{show:e,hide:r,handleUpdateShow:a,handleAfterLeave:t,handleCloseClick:l,handleNegativeClick:i,handlePositiveClick:n,handleMaskClick:c,handleEsc:d}},render(){const{handlePositiveClick:o,handleUpdateShow:e,handleNegativeClick:t,handleCloseClick:n,handleAfterLeave:i,handleMaskClick:l,handleEsc:c,to:d,maskClosable:r,show:a}=this;return h(we,{show:a,onUpdateShow:e,onMaskClick:l,onEsc:c,to:d,maskClosable:r,onAfterEnter:this.onAfterEnter,onAfterLeave:i,closeOnEsc:this.closeOnEsc,blockScroll:this.blockScroll,autoFocus:this.autoFocus,transformOrigin:this.transformOrigin,internalAppear:!0,internalDialog:!0},{default:()=>h(Ve,Object.assign({},Ce(this.$props,Ge),{style:this.internalStyle,onClose:n,onNegativeClick:t,onPositiveClick:o}))})}}),ko={injectionKey:String,to:[String,Object]},So=O({name:"DialogProvider",props:ko,setup(){const o=k([]),e={};function t(d={}){const r=G(),a=X(Object.assign(Object.assign({},d),{key:r,destroy:()=>{e[`n-dialog-${r}`].hide()}}));return o.value.push(a),a}const n=["info","success","warning","error"].map(d=>r=>t(Object.assign(Object.assign({},r),{type:d})));function i(d){const{value:r}=o;r.splice(r.findIndex(a=>a.key===d),1)}function l(){Object.values(e).forEach(d=>{d.hide()})}const c={create:t,destroyAll:l,info:n[0],success:n[1],warning:n[2],error:n[3]};return I(ke,c),I(Xe,{clickedRef:ce(64),clickedPositionRef:de()}),I(Qe,o),Object.assign(Object.assign({},c),{dialogList:o,dialogInstRefs:e,handleAfterLeave:i})},render(){var o,e;return h(W,null,[this.dialogList.map(t=>h(wo,Q(t,["destroy","style"],{internalStyle:t.style,to:this.to,ref:n=>{n===null?delete this.dialogInstRefs[`n-dialog-${t.key}`]:this.dialogInstRefs[`n-dialog-${t.key}`]=n},internalKey:t.key,onInternalAfterLeave:this.handleAfterLeave}))),(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o)])}});function Oo(){const o=z(ke,null);return o===null&&q("use-dialog","No outer <n-dialog-provider /> founded."),o}const $o={closeMargin:"16px 12px",closeSize:"20px",closeIconSize:"16px",width:"365px",padding:"16px",titleFontSize:"16px",metaFontSize:"12px",descriptionFontSize:"12px"},Io=o=>{const{textColor2:e,successColor:t,infoColor:n,warningColor:i,errorColor:l,popoverColor:c,closeIconColor:d,closeIconColorHover:r,closeIconColorPressed:a,closeColorHover:s,closeColorPressed:u,textColor1:g,textColor3:v,borderRadius:f,fontWeightStrong:p,boxShadow2:y,lineHeight:w,fontSize:$}=o;return Object.assign(Object.assign({},$o),{borderRadius:f,lineHeight:w,fontSize:$,headerFontWeight:p,iconColor:e,iconColorSuccess:t,iconColorInfo:n,iconColorWarning:i,iconColorError:l,color:c,textColor:e,closeIconColor:d,closeIconColorHover:r,closeIconColorPressed:a,closeBorderRadius:f,closeColorHover:s,closeColorPressed:u,headerTextColor:g,descriptionTextColor:v,actionTextColor:e,boxShadow:y})},jo=Je({name:"Notification",common:fe,peers:{Scrollbar:Ye},self:Io}),Lo=jo,Po={margin:"0 0 8px 0",padding:"10px 20px",maxWidth:"720px",minWidth:"420px",iconMargin:"0 10px 0 0",closeMargin:"0 0 0 10px",closeSize:"20px",closeIconSize:"16px",iconSize:"20px",fontSize:"14px"},Ao=o=>{const{textColor2:e,closeIconColor:t,closeIconColorHover:n,closeIconColorPressed:i,infoColor:l,successColor:c,errorColor:d,warningColor:r,popoverColor:a,boxShadow2:s,primaryColor:u,lineHeight:g,borderRadius:v,closeColorHover:f,closeColorPressed:p}=o;return Object.assign(Object.assign({},Po),{closeBorderRadius:v,textColor:e,textColorInfo:e,textColorSuccess:e,textColorError:e,textColorWarning:e,textColorLoading:e,color:a,colorInfo:a,colorSuccess:a,colorError:a,colorWarning:a,colorLoading:a,boxShadow:s,boxShadowInfo:s,boxShadowSuccess:s,boxShadowError:s,boxShadowWarning:s,boxShadowLoading:s,iconColor:e,iconColorInfo:l,iconColorSuccess:c,iconColorWarning:r,iconColorError:d,iconColorLoading:u,closeColorHover:f,closeColorPressed:p,closeIconColor:t,closeIconColorHover:n,closeIconColorPressed:i,closeColorHoverInfo:f,closeColorPressedInfo:p,closeIconColorInfo:t,closeIconColorHoverInfo:n,closeIconColorPressedInfo:i,closeColorHoverSuccess:f,closeColorPressedSuccess:p,closeIconColorSuccess:t,closeIconColorHoverSuccess:n,closeIconColorPressedSuccess:i,closeColorHoverError:f,closeColorPressedError:p,closeIconColorError:t,closeIconColorHoverError:n,closeIconColorPressedError:i,closeColorHoverWarning:f,closeColorPressedWarning:p,closeIconColorWarning:t,closeIconColorHoverWarning:n,closeIconColorPressedWarning:i,closeColorHoverLoading:f,closeColorPressedLoading:p,closeIconColorLoading:t,closeIconColorHoverLoading:n,closeIconColorPressedLoading:i,loadingColor:u,lineHeight:g,borderRadius:v})},zo={name:"Message",common:fe,self:Ao},Eo=zo,Ro=o=>{const{primaryColor:e,errorColor:t}=o;return{colorError:t,colorLoading:e,height:"2px"}},Mo={name:"LoadingBar",common:fe,self:Ro},Ho=Mo,ze=R("n-loading-bar"),Ee=R("n-loading-bar-api"),Bo=m("loading-bar-container",`
23
+ `)]}const wo=Object.assign(Object.assign({},Ue),{onAfterEnter:Function,onAfterLeave:Function,transformOrigin:String,blockScroll:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},onEsc:Function,autoFocus:{type:Boolean,default:!0},internalStyle:[String,Object],maskClosable:{type:Boolean,default:!0},onPositiveClick:Function,onNegativeClick:Function,onClose:Function,onMaskClick:Function}),ko=O({name:"DialogEnvironment",props:Object.assign(Object.assign({},wo),{internalKey:{type:String,required:!0},to:[String,Object],onInternalAfterLeave:{type:Function,required:!0}}),setup(o){const e=k(!0);function t(){const{onInternalAfterLeave:s,internalKey:u,onAfterLeave:v}=o;s&&s(u),v&&v()}function n(s){const{onPositiveClick:u}=o;u?Promise.resolve(u(s)).then(v=>{v!==!1&&r()}):r()}function i(s){const{onNegativeClick:u}=o;u?Promise.resolve(u(s)).then(v=>{v!==!1&&r()}):r()}function l(){const{onClose:s}=o;s?Promise.resolve(s()).then(u=>{u!==!1&&r()}):r()}function c(s){const{onMaskClick:u,maskClosable:v}=o;u&&(u(s),v&&r())}function d(){const{onEsc:s}=o;s&&s()}function r(){e.value=!1}function a(s){e.value=s}return{show:e,hide:r,handleUpdateShow:a,handleAfterLeave:t,handleCloseClick:l,handleNegativeClick:i,handlePositiveClick:n,handleMaskClick:c,handleEsc:d}},render(){const{handlePositiveClick:o,handleUpdateShow:e,handleNegativeClick:t,handleCloseClick:n,handleAfterLeave:i,handleMaskClick:l,handleEsc:c,to:d,maskClosable:r,show:a}=this;return h(we,{show:a,onUpdateShow:e,onMaskClick:l,onEsc:c,to:d,maskClosable:r,onAfterEnter:this.onAfterEnter,onAfterLeave:i,closeOnEsc:this.closeOnEsc,blockScroll:this.blockScroll,autoFocus:this.autoFocus,transformOrigin:this.transformOrigin,internalAppear:!0,internalDialog:!0},{default:()=>h(Ve,Object.assign({},Ce(this.$props,Ge),{style:this.internalStyle,onClose:n,onNegativeClick:t,onPositiveClick:o}))})}}),So={injectionKey:String,to:[String,Object]},Oo=O({name:"DialogProvider",props:So,setup(){const o=k([]),e={};function t(d={}){const r=G(),a=X(Object.assign(Object.assign({},d),{key:r,destroy:()=>{e[`n-dialog-${r}`].hide()}}));return o.value.push(a),a}const n=["info","success","warning","error"].map(d=>r=>t(Object.assign(Object.assign({},r),{type:d})));function i(d){const{value:r}=o;r.splice(r.findIndex(a=>a.key===d),1)}function l(){Object.values(e).forEach(d=>{d.hide()})}const c={create:t,destroyAll:l,info:n[0],success:n[1],warning:n[2],error:n[3]};return L(ke,c),L(Xe,{clickedRef:ce(64),clickedPositionRef:de()}),L(Qe,o),Object.assign(Object.assign({},c),{dialogList:o,dialogInstRefs:e,handleAfterLeave:i})},render(){var o,e;return h(W,null,[this.dialogList.map(t=>h(ko,Q(t,["destroy","style"],{internalStyle:t.style,to:this.to,ref:n=>{n===null?delete this.dialogInstRefs[`n-dialog-${t.key}`]:this.dialogInstRefs[`n-dialog-${t.key}`]=n},internalKey:t.key,onInternalAfterLeave:this.handleAfterLeave}))),(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o)])}});function $o(){const o=E(ke,null);return o===null&&q("use-dialog","No outer <n-dialog-provider /> founded."),o}const Lo={closeMargin:"16px 12px",closeSize:"20px",closeIconSize:"16px",width:"365px",padding:"16px",titleFontSize:"16px",metaFontSize:"12px",descriptionFontSize:"12px"},Po=o=>{const{textColor2:e,successColor:t,infoColor:n,warningColor:i,errorColor:l,popoverColor:c,closeIconColor:d,closeIconColorHover:r,closeIconColorPressed:a,closeColorHover:s,closeColorPressed:u,textColor1:v,textColor3:g,borderRadius:f,fontWeightStrong:p,boxShadow2:y,lineHeight:w,fontSize:$}=o;return Object.assign(Object.assign({},Lo),{borderRadius:f,lineHeight:w,fontSize:$,headerFontWeight:p,iconColor:e,iconColorSuccess:t,iconColorInfo:n,iconColorWarning:i,iconColorError:l,color:c,textColor:e,closeIconColor:d,closeIconColorHover:r,closeIconColorPressed:a,closeBorderRadius:f,closeColorHover:s,closeColorPressed:u,headerTextColor:v,descriptionTextColor:g,actionTextColor:e,boxShadow:y})},jo=Je({name:"Notification",common:fe,peers:{Scrollbar:Ye},self:Po}),Io=jo,Ao={margin:"0 0 8px 0",padding:"10px 20px",maxWidth:"720px",minWidth:"420px",iconMargin:"0 10px 0 0",closeMargin:"0 0 0 10px",closeSize:"20px",closeIconSize:"16px",iconSize:"20px",fontSize:"14px"},Eo=o=>{const{textColor2:e,closeIconColor:t,closeIconColorHover:n,closeIconColorPressed:i,infoColor:l,successColor:c,errorColor:d,warningColor:r,popoverColor:a,boxShadow2:s,primaryColor:u,lineHeight:v,borderRadius:g,closeColorHover:f,closeColorPressed:p}=o;return Object.assign(Object.assign({},Ao),{closeBorderRadius:g,textColor:e,textColorInfo:e,textColorSuccess:e,textColorError:e,textColorWarning:e,textColorLoading:e,color:a,colorInfo:a,colorSuccess:a,colorError:a,colorWarning:a,colorLoading:a,boxShadow:s,boxShadowInfo:s,boxShadowSuccess:s,boxShadowError:s,boxShadowWarning:s,boxShadowLoading:s,iconColor:e,iconColorInfo:l,iconColorSuccess:c,iconColorWarning:r,iconColorError:d,iconColorLoading:u,closeColorHover:f,closeColorPressed:p,closeIconColor:t,closeIconColorHover:n,closeIconColorPressed:i,closeColorHoverInfo:f,closeColorPressedInfo:p,closeIconColorInfo:t,closeIconColorHoverInfo:n,closeIconColorPressedInfo:i,closeColorHoverSuccess:f,closeColorPressedSuccess:p,closeIconColorSuccess:t,closeIconColorHoverSuccess:n,closeIconColorPressedSuccess:i,closeColorHoverError:f,closeColorPressedError:p,closeIconColorError:t,closeIconColorHoverError:n,closeIconColorPressedError:i,closeColorHoverWarning:f,closeColorPressedWarning:p,closeIconColorWarning:t,closeIconColorHoverWarning:n,closeIconColorPressedWarning:i,closeColorHoverLoading:f,closeColorPressedLoading:p,closeIconColorLoading:t,closeIconColorHoverLoading:n,closeIconColorPressedLoading:i,loadingColor:u,lineHeight:v,borderRadius:g})},zo={name:"Message",common:fe,self:Eo},Ro=zo,Mo=o=>{const{primaryColor:e,errorColor:t}=o;return{colorError:t,colorLoading:e,height:"2px"}},Ho={name:"LoadingBar",common:fe,self:Mo},Bo=Ho,Ee=R("n-loading-bar"),ze=R("n-loading-bar-api"),_o=m("loading-bar-container",`
24
24
  z-index: 5999;
25
25
  position: fixed;
26
26
  top: 0;
@@ -45,12 +45,12 @@ 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,
45
45
  transition:
46
46
  max-width .2s linear,
47
47
  background .2s linear;
48
- `)])]);var D=function(o,e,t,n){function i(l){return l instanceof t?l:new t(function(c){c(l)})}return new(t||(t=Promise))(function(l,c){function d(s){try{a(n.next(s))}catch(u){c(u)}}function r(s){try{a(n.throw(s))}catch(u){c(u)}}function a(s){s.done?l(s.value):i(s.value).then(d,r)}a((n=n.apply(o,e||[])).next())})};function U(o,e){return`${e}-loading-bar ${e}-loading-bar--${o}`}const _o=O({name:"LoadingBar",props:{containerClass:String,containerStyle:[String,Object]},setup(){const{inlineThemeDisabled:o}=F(),{props:e,mergedClsPrefixRef:t}=z(ze),n=k(null),i=k(!1),l=k(!1),c=k(!1),d=k(!1);let r=!1;const a=k(!1),s=_(()=>{const{loadingBarStyle:C}=e;return C?C[a.value?"error":"loading"]:""});function u(){return D(this,void 0,void 0,function*(){i.value=!1,c.value=!1,r=!1,a.value=!1,d.value=!0,yield N(),d.value=!1})}function g(C=0,M=80,H="starting"){return D(this,void 0,void 0,function*(){if(l.value=!0,yield u(),r)return;c.value=!0,yield N();const L=n.value;L&&(L.style.maxWidth=`${C}%`,L.style.transition="none",L.offsetWidth,L.className=U(H,t.value),L.style.transition="",L.style.maxWidth=`${M}%`)})}function v(){return D(this,void 0,void 0,function*(){if(r||a.value)return;l.value&&(yield N()),r=!0;const C=n.value;C&&(C.className=U("finishing",t.value),C.style.maxWidth="100%",C.offsetWidth,c.value=!1)})}function f(){if(!(r||a.value))if(!c.value)g(100,100,"error").then(()=>{a.value=!0;const C=n.value;C&&(C.className=U("error",t.value),C.offsetWidth,c.value=!1)});else{a.value=!0;const C=n.value;if(!C)return;C.className=U("error",t.value),C.style.maxWidth="100%",C.offsetWidth,c.value=!1}}function p(){i.value=!0}function y(){i.value=!1}function w(){return D(this,void 0,void 0,function*(){yield u()})}const $=T("LoadingBar","-loading-bar",Bo,Ho,e,t),j=_(()=>{const{self:{height:C,colorError:M,colorLoading:H}}=$.value;return{"--n-height":C,"--n-color-loading":H,"--n-color-error":M}}),S=o?ue("loading-bar",void 0,j,e):void 0;return{mergedClsPrefix:t,loadingBarRef:n,started:l,loading:c,entering:i,transitionDisabled:d,start:g,error:f,finish:v,handleEnter:p,handleAfterEnter:y,handleAfterLeave:w,mergedLoadingBarStyle:s,cssVars:o?void 0:j,themeClass:S==null?void 0:S.themeClass,onRender:S==null?void 0:S.onRender}},render(){if(!this.started)return null;const{mergedClsPrefix:o}=this;return h(Se,{name:"fade-in-transition",appear:!0,onEnter:this.handleEnter,onAfterEnter:this.handleAfterEnter,onAfterLeave:this.handleAfterLeave,css:!this.transitionDisabled},{default:()=>{var e;return(e=this.onRender)===null||e===void 0||e.call(this),eo(h("div",{class:[`${o}-loading-bar-container`,this.themeClass,this.containerClass],style:this.containerStyle},h("div",{ref:"loadingBarRef",class:[`${o}-loading-bar`],style:[this.cssVars,this.mergedLoadingBarStyle]})),[[oo,this.loading||!this.loading&&this.entering]])}})}}),No=Object.assign(Object.assign({},T.props),{to:{type:[String,Object,Boolean],default:void 0},containerClass:String,containerStyle:[String,Object],loadingBarStyle:{type:Object}}),Fo=O({name:"LoadingBarProvider",props:No,setup(o){const e=no(),t=k(null),n={start(){var l;e.value?(l=t.value)===null||l===void 0||l.start():N(()=>{var c;(c=t.value)===null||c===void 0||c.start()})},error(){var l;e.value?(l=t.value)===null||l===void 0||l.error():N(()=>{var c;(c=t.value)===null||c===void 0||c.error()})},finish(){var l;e.value?(l=t.value)===null||l===void 0||l.finish():N(()=>{var c;(c=t.value)===null||c===void 0||c.finish()})}},{mergedClsPrefixRef:i}=F(o);return I(Ee,n),I(ze,{props:o,mergedClsPrefixRef:i}),Object.assign(n,{loadingBarRef:t})},render(){var o,e;return h(W,null,h(he,{disabled:this.to===!1,to:this.to||"body"},h(_o,{ref:"loadingBarRef",containerStyle:this.containerStyle,containerClass:this.containerClass})),(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o))}});function To(){const o=z(Ee,null);return o===null&&q("use-loading-bar","No outer <n-loading-bar-provider /> founded."),o}const Re={icon:Function,type:{type:String,default:"info"},content:[String,Number,Function],showIcon:{type:Boolean,default:!0},closable:Boolean,keepAliveOnHover:Boolean,onClose:Function,onMouseenter:Function,onMouseleave:Function},Me=R("n-message-api"),He=R("n-message-provider"),Ko=x([m("message-wrapper",`
48
+ `)])]);var D=function(o,e,t,n){function i(l){return l instanceof t?l:new t(function(c){c(l)})}return new(t||(t=Promise))(function(l,c){function d(s){try{a(n.next(s))}catch(u){c(u)}}function r(s){try{a(n.throw(s))}catch(u){c(u)}}function a(s){s.done?l(s.value):i(s.value).then(d,r)}a((n=n.apply(o,e||[])).next())})};function U(o,e){return`${e}-loading-bar ${e}-loading-bar--${o}`}const No=O({name:"LoadingBar",props:{containerClass:String,containerStyle:[String,Object]},setup(){const{inlineThemeDisabled:o}=F(),{props:e,mergedClsPrefixRef:t}=E(Ee),n=k(null),i=k(!1),l=k(!1),c=k(!1),d=k(!1);let r=!1;const a=k(!1),s=_(()=>{const{loadingBarStyle:C}=e;return C?C[a.value?"error":"loading"]:""});function u(){return D(this,void 0,void 0,function*(){i.value=!1,c.value=!1,r=!1,a.value=!1,d.value=!0,yield N(),d.value=!1})}function v(C=0,M=80,H="starting"){return D(this,void 0,void 0,function*(){if(l.value=!0,yield u(),r)return;c.value=!0,yield N();const j=n.value;j&&(j.style.maxWidth=`${C}%`,j.style.transition="none",j.offsetWidth,j.className=U(H,t.value),j.style.transition="",j.style.maxWidth=`${M}%`)})}function g(){return D(this,void 0,void 0,function*(){if(r||a.value)return;l.value&&(yield N()),r=!0;const C=n.value;C&&(C.className=U("finishing",t.value),C.style.maxWidth="100%",C.offsetWidth,c.value=!1)})}function f(){if(!(r||a.value))if(!c.value)v(100,100,"error").then(()=>{a.value=!0;const C=n.value;C&&(C.className=U("error",t.value),C.offsetWidth,c.value=!1)});else{a.value=!0;const C=n.value;if(!C)return;C.className=U("error",t.value),C.style.maxWidth="100%",C.offsetWidth,c.value=!1}}function p(){i.value=!0}function y(){i.value=!1}function w(){return D(this,void 0,void 0,function*(){yield u()})}const $=T("LoadingBar","-loading-bar",_o,Bo,e,t),P=_(()=>{const{self:{height:C,colorError:M,colorLoading:H}}=$.value;return{"--n-height":C,"--n-color-loading":H,"--n-color-error":M}}),S=o?ue("loading-bar",void 0,P,e):void 0;return{mergedClsPrefix:t,loadingBarRef:n,started:l,loading:c,entering:i,transitionDisabled:d,start:v,error:f,finish:g,handleEnter:p,handleAfterEnter:y,handleAfterLeave:w,mergedLoadingBarStyle:s,cssVars:o?void 0:P,themeClass:S==null?void 0:S.themeClass,onRender:S==null?void 0:S.onRender}},render(){if(!this.started)return null;const{mergedClsPrefix:o}=this;return h(Se,{name:"fade-in-transition",appear:!0,onEnter:this.handleEnter,onAfterEnter:this.handleAfterEnter,onAfterLeave:this.handleAfterLeave,css:!this.transitionDisabled},{default:()=>{var e;return(e=this.onRender)===null||e===void 0||e.call(this),eo(h("div",{class:[`${o}-loading-bar-container`,this.themeClass,this.containerClass],style:this.containerStyle},h("div",{ref:"loadingBarRef",class:[`${o}-loading-bar`],style:[this.cssVars,this.mergedLoadingBarStyle]})),[[oo,this.loading||!this.loading&&this.entering]])}})}}),Fo=Object.assign(Object.assign({},T.props),{to:{type:[String,Object,Boolean],default:void 0},containerClass:String,containerStyle:[String,Object],loadingBarStyle:{type:Object}}),To=O({name:"LoadingBarProvider",props:Fo,setup(o){const e=no(),t=k(null),n={start(){var l;e.value?(l=t.value)===null||l===void 0||l.start():N(()=>{var c;(c=t.value)===null||c===void 0||c.start()})},error(){var l;e.value?(l=t.value)===null||l===void 0||l.error():N(()=>{var c;(c=t.value)===null||c===void 0||c.error()})},finish(){var l;e.value?(l=t.value)===null||l===void 0||l.finish():N(()=>{var c;(c=t.value)===null||c===void 0||c.finish()})}},{mergedClsPrefixRef:i}=F(o);return L(ze,n),L(Ee,{props:o,mergedClsPrefixRef:i}),Object.assign(n,{loadingBarRef:t})},render(){var o,e;return h(W,null,h(he,{disabled:this.to===!1,to:this.to||"body"},h(No,{ref:"loadingBarRef",containerStyle:this.containerStyle,containerClass:this.containerClass})),(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o))}});function Ko(){const o=E(ze,null);return o===null&&q("use-loading-bar","No outer <n-loading-bar-provider /> founded."),o}const Re={icon:Function,type:{type:String,default:"info"},content:[String,Number,Function],showIcon:{type:Boolean,default:!0},closable:Boolean,keepAliveOnHover:Boolean,onClose:Function,onMouseenter:Function,onMouseleave:Function},Me=R("n-message-api"),He=R("n-message-provider"),Wo=x([m("message-wrapper",`
49
49
  margin: var(--n-margin);
50
50
  z-index: 0;
51
51
  transform-origin: top center;
52
52
  display: flex;
53
- `,[xo({overflow:"visible",originalTransition:"transform .3s var(--n-bezier)",enterToProps:{transform:"scale(1)"},leaveToProps:{transform:"scale(0.85)"}})]),m("message",`
53
+ `,[Co({overflow:"visible",originalTransition:"transform .3s var(--n-bezier)",enterToProps:{transform:"scale(1)"},leaveToProps:{transform:"scale(0.85)"}})]),m("message",`
54
54
  box-sizing: border-box;
55
55
  display: flex;
56
56
  align-items: center;
@@ -69,11 +69,11 @@ 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,
69
69
  color: var(--n-text-color);
70
70
  background-color: var(--n-color);
71
71
  box-shadow: var(--n-box-shadow);
72
- `,[P("content",`
72
+ `,[I("content",`
73
73
  display: inline-block;
74
74
  line-height: var(--n-line-height);
75
75
  font-size: var(--n-font-size);
76
- `),P("icon",`
76
+ `),I("icon",`
77
77
  position: relative;
78
78
  margin: var(--n-icon-margin);
79
79
  height: var(--n-icon-size);
@@ -89,7 +89,7 @@ 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,
89
89
  top: 0;
90
90
  right: 0;
91
91
  bottom: 0;
92
- `,[to()])]),P("close",`
92
+ `,[to()])]),I("close",`
93
93
  margin: var(--n-close-margin);
94
94
  transition:
95
95
  background-color .3s var(--n-bezier),
@@ -138,7 +138,7 @@ 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,
138
138
  right: 12px;
139
139
  justify-content: flex-end;
140
140
  align-items: flex-end;
141
- `)])]),Wo={info:()=>h(je,null),success:()=>h(Le,null),warning:()=>h(Pe,null),error:()=>h(Ae,null),default:()=>null},qo=O({name:"Message",props:Object.assign(Object.assign({},Re),{render:Function}),setup(o){const{inlineThemeDisabled:e,mergedRtlRef:t}=F(o),{props:n,mergedClsPrefixRef:i}=z(He),l=Oe("Message",t,i),c=T("Message","-message",Ko,Eo,n,i),d=_(()=>{const{type:a}=o,{common:{cubicBezierEaseInOut:s},self:{padding:u,margin:g,maxWidth:v,iconMargin:f,closeMargin:p,closeSize:y,iconSize:w,fontSize:$,lineHeight:j,borderRadius:S,iconColorInfo:C,iconColorSuccess:M,iconColorWarning:H,iconColorError:L,iconColorLoading:Y,closeIconSize:Z,closeBorderRadius:ee,[E("textColor",a)]:oe,[E("boxShadow",a)]:ne,[E("color",a)]:te,[E("closeColorHover",a)]:ie,[E("closeColorPressed",a)]:re,[E("closeIconColor",a)]:se,[E("closeIconColorPressed",a)]:ae,[E("closeIconColorHover",a)]:le}}=c.value;return{"--n-bezier":s,"--n-margin":g,"--n-padding":u,"--n-max-width":v,"--n-font-size":$,"--n-icon-margin":f,"--n-icon-size":w,"--n-close-icon-size":Z,"--n-close-border-radius":ee,"--n-close-size":y,"--n-close-margin":p,"--n-text-color":oe,"--n-color":te,"--n-box-shadow":ne,"--n-icon-color-info":C,"--n-icon-color-success":M,"--n-icon-color-warning":H,"--n-icon-color-error":L,"--n-icon-color-loading":Y,"--n-close-color-hover":ie,"--n-close-color-pressed":re,"--n-close-icon-color":se,"--n-close-icon-color-pressed":ae,"--n-close-icon-color-hover":le,"--n-line-height":j,"--n-border-radius":S}}),r=e?ue("message",_(()=>o.type[0]),d,{}):void 0;return{mergedClsPrefix:i,rtlEnabled:l,messageProviderProps:n,handleClose(){var a;(a=o.onClose)===null||a===void 0||a.call(o)},cssVars:e?void 0:d,themeClass:r==null?void 0:r.themeClass,onRender:r==null?void 0:r.onRender,placement:n.placement}},render(){const{render:o,type:e,closable:t,content:n,mergedClsPrefix:i,cssVars:l,themeClass:c,onRender:d,icon:r,handleClose:a,showIcon:s}=this;d==null||d();let u;return h("div",{class:[`${i}-message-wrapper`,c],onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave,style:[{alignItems:this.placement.startsWith("top")?"flex-start":"flex-end"},l]},o?o(this.$props):h("div",{class:[`${i}-message ${i}-message--${e}-type`,this.rtlEnabled&&`${i}-message--rtl`]},(u=Do(r,e,i))&&s?h("div",{class:`${i}-message__icon ${i}-message__icon--${e}-type`},h(io,null,{default:()=>u})):null,h("div",{class:`${i}-message__content`},B(n)),t?h($e,{clsPrefix:i,class:`${i}-message__close`,onClick:a,absolute:!0}):null))}});function Do(o,e,t){if(typeof o=="function")return o();{const n=e==="loading"?h(ro,{clsPrefix:t,strokeWidth:24,scale:.85}):Wo[e]();return n?h(Ie,{clsPrefix:t,key:e},{default:()=>n}):null}}const Uo=O({name:"MessageEnvironment",props:Object.assign(Object.assign({},Re),{duration:{type:Number,default:3e3},onAfterLeave:Function,onLeave:Function,internalKey:{type:String,required:!0},onInternalAfterLeave:Function,onHide:Function,onAfterHide:Function}),setup(o){let e=null;const t=k(!0);ge(()=>{n()});function n(){const{duration:s}=o;s&&(e=window.setTimeout(c,s))}function i(s){s.currentTarget===s.target&&e!==null&&(window.clearTimeout(e),e=null)}function l(s){s.currentTarget===s.target&&n()}function c(){const{onHide:s}=o;t.value=!1,e&&(window.clearTimeout(e),e=null),s&&s()}function d(){const{onClose:s}=o;s&&s(),c()}function r(){const{onAfterLeave:s,onInternalAfterLeave:u,onAfterHide:g,internalKey:v}=o;s&&s(),u&&u(v),g&&g()}function a(){c()}return{show:t,hide:c,handleClose:d,handleAfterLeave:r,handleMouseleave:l,handleMouseenter:i,deactivate:a}},render(){return h(so,{appear:!0,onAfterLeave:this.handleAfterLeave,onLeave:this.onLeave},{default:()=>[this.show?h(qo,{content:this.content,type:this.type,icon:this.icon,showIcon:this.showIcon,closable:this.closable,onClose:this.handleClose,onMouseenter:this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.keepAliveOnHover?this.handleMouseleave:void 0}):null]})}}),Vo=Object.assign(Object.assign({},T.props),{to:[String,Object],duration:{type:Number,default:3e3},keepAliveOnHover:Boolean,max:Number,placement:{type:String,default:"top"},closable:Boolean,containerClass:String,containerStyle:[String,Object]}),Go=O({name:"MessageProvider",props:Vo,setup(o){const{mergedClsPrefixRef:e}=F(o),t=k([]),n=k({}),i={create(r,a){return l(r,Object.assign({type:"default"},a))},info(r,a){return l(r,Object.assign(Object.assign({},a),{type:"info"}))},success(r,a){return l(r,Object.assign(Object.assign({},a),{type:"success"}))},warning(r,a){return l(r,Object.assign(Object.assign({},a),{type:"warning"}))},error(r,a){return l(r,Object.assign(Object.assign({},a),{type:"error"}))},loading(r,a){return l(r,Object.assign(Object.assign({},a),{type:"loading"}))},destroyAll:d};I(He,{props:o,mergedClsPrefixRef:e}),I(Me,i);function l(r,a){const s=G(),u=X(Object.assign(Object.assign({},a),{content:r,key:s,destroy:()=>{var v;(v=n.value[s])===null||v===void 0||v.hide()}})),{max:g}=o;return g&&t.value.length>=g&&t.value.shift(),t.value.push(u),u}function c(r){t.value.splice(t.value.findIndex(a=>a.key===r),1),delete n.value[r]}function d(){Object.values(n.value).forEach(r=>{r.hide()})}return Object.assign({mergedClsPrefix:e,messageRefs:n,messageList:t,handleAfterLeave:c},i)},render(){var o,e,t;return h(W,null,(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o),this.messageList.length?h(he,{to:(t=this.to)!==null&&t!==void 0?t:"body"},h("div",{class:[`${this.mergedClsPrefix}-message-container`,`${this.mergedClsPrefix}-message-container--${this.placement}`,this.containerClass],key:"message-container",style:this.containerStyle},this.messageList.map(n=>h(Uo,Object.assign({ref:i=>{i&&(this.messageRefs[n.key]=i)},internalKey:n.key,onInternalAfterLeave:this.handleAfterLeave},Q(n,["destroy"],void 0),{duration:n.duration===void 0?this.duration:n.duration,keepAliveOnHover:n.keepAliveOnHover===void 0?this.keepAliveOnHover:n.keepAliveOnHover,closable:n.closable===void 0?this.closable:n.closable}))))):null)}});function Xo(){const o=z(Me,null);return o===null&&q("use-message","No outer <n-message-provider /> founded. See prerequisite in https://www.naiveui.com/en-US/os-theme/components/message for more details. If you want to use `useMessage` outside setup, please check https://www.naiveui.com/zh-CN/os-theme/components/message#Q-&-A."),o}const Qo=O({name:"ModalEnvironment",props:Object.assign(Object.assign({},ao),{internalKey:{type:String,required:!0},onInternalAfterLeave:{type:Function,required:!0}}),setup(o){const e=k(!0);function t(){const{onInternalAfterLeave:s,internalKey:u,onAfterLeave:g}=o;s&&s(u),g&&g()}function n(){const{onPositiveClick:s}=o;s?Promise.resolve(s()).then(u=>{u!==!1&&r()}):r()}function i(){const{onNegativeClick:s}=o;s?Promise.resolve(s()).then(u=>{u!==!1&&r()}):r()}function l(){const{onClose:s}=o;s?Promise.resolve(s()).then(u=>{u!==!1&&r()}):r()}function c(s){const{onMaskClick:u,maskClosable:g}=o;u&&(u(s),g&&r())}function d(){const{onEsc:s}=o;s&&s()}function r(){e.value=!1}function a(s){e.value=s}return{show:e,hide:r,handleUpdateShow:a,handleAfterLeave:t,handleCloseClick:l,handleNegativeClick:i,handlePositiveClick:n,handleMaskClick:c,handleEsc:d}},render(){const{handleUpdateShow:o,handleAfterLeave:e,handleMaskClick:t,handleEsc:n,show:i}=this;return h(we,Object.assign({},this.$props,{show:i,onUpdateShow:o,onMaskClick:t,onEsc:n,onAfterLeave:e,internalAppear:!0,internalModal:!0}))}}),ye=R("n-modal-provider"),Be=R("n-modal-api"),Jo=R("n-modal-reactive-list"),Yo={to:[String,Object]},Zo=O({name:"ModalProvider",props:Yo,setup(){const o=ce(64),e=de(),t=k([]),n={};function i(r={}){const a=G(),s=X(Object.assign(Object.assign({},r),{key:a,destroy:()=>{n[`n-modal-${a}`].hide()}}));return t.value.push(s),s}function l(r){const{value:a}=t;a.splice(a.findIndex(s=>s.key===r),1)}function c(){Object.values(n).forEach(r=>{r.hide()})}const d={create:i,destroyAll:c};return I(Be,d),I(ye,{clickedRef:ce(64),clickedPositionRef:de()}),I(Jo,t),I(ye,{clickedRef:o,clickedPositionRef:e}),Object.assign(Object.assign({},d),{modalList:t,modalInstRefs:n,handleAfterLeave:l})},render(){var o,e;return h(W,null,[this.modalList.map(t=>{var n;return h(Qo,Q(t,["destroy","style"],{internalStyle:t.style,to:(n=t.to)!==null&&n!==void 0?n:this.to,ref:i=>{i===null?delete this.modalInstRefs[`n-modal-${t.key}`]:this.modalInstRefs[`n-modal-${t.key}`]=i},internalKey:t.key,onInternalAfterLeave:this.handleAfterLeave}))}),(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o)])}});function en(){const o=z(Be,null);return o===null&&q("use-modal","No outer <n-modal-provider /> founded."),o}const J=R("n-notification-provider"),on=O({name:"NotificationContainer",props:{scrollable:{type:Boolean,required:!0},placement:{type:String,required:!0}},setup(){const{mergedThemeRef:o,mergedClsPrefixRef:e,wipTransitionCountRef:t}=z(J),n=k(null);return lo(()=>{var i,l;t.value>0?(i=n==null?void 0:n.value)===null||i===void 0||i.classList.add("transitioning"):(l=n==null?void 0:n.value)===null||l===void 0||l.classList.remove("transitioning")}),{selfRef:n,mergedTheme:o,mergedClsPrefix:e,transitioning:t}},render(){const{$slots:o,scrollable:e,mergedClsPrefix:t,mergedTheme:n,placement:i}=this;return h("div",{ref:"selfRef",class:[`${t}-notification-container`,e&&`${t}-notification-container--scrollable`,`${t}-notification-container--${i}`]},e?h(co,{theme:n.peers.Scrollbar,themeOverrides:n.peerOverrides.Scrollbar,contentStyle:{overflow:"hidden"}},o):o)}}),nn={info:()=>h(je,null),success:()=>h(Le,null),warning:()=>h(Pe,null),error:()=>h(Ae,null),default:()=>null},ve={closable:{type:Boolean,default:!0},type:{type:String,default:"default"},avatar:Function,title:[String,Function],description:[String,Function],content:[String,Function],meta:[String,Function],action:[String,Function],onClose:{type:Function,required:!0},keepAliveOnHover:Boolean,onMouseenter:Function,onMouseleave:Function},tn=fo(ve),rn=O({name:"Notification",props:ve,setup(o){const{mergedClsPrefixRef:e,mergedThemeRef:t,props:n}=z(J),{inlineThemeDisabled:i,mergedRtlRef:l}=F(),c=Oe("Notification",l,e),d=_(()=>{const{type:a}=o,{self:{color:s,textColor:u,closeIconColor:g,closeIconColorHover:v,closeIconColorPressed:f,headerTextColor:p,descriptionTextColor:y,actionTextColor:w,borderRadius:$,headerFontWeight:j,boxShadow:S,lineHeight:C,fontSize:M,closeMargin:H,closeSize:L,width:Y,padding:Z,closeIconSize:ee,closeBorderRadius:oe,closeColorHover:ne,closeColorPressed:te,titleFontSize:ie,metaFontSize:re,descriptionFontSize:se,[E("iconColor",a)]:ae},common:{cubicBezierEaseOut:le,cubicBezierEaseIn:Ne,cubicBezierEaseInOut:Fe}}=t.value,{left:Te,right:Ke,top:We,bottom:qe}=uo(Z);return{"--n-color":s,"--n-font-size":M,"--n-text-color":u,"--n-description-text-color":y,"--n-action-text-color":w,"--n-title-text-color":p,"--n-title-font-weight":j,"--n-bezier":Fe,"--n-bezier-ease-out":le,"--n-bezier-ease-in":Ne,"--n-border-radius":$,"--n-box-shadow":S,"--n-close-border-radius":oe,"--n-close-color-hover":ne,"--n-close-color-pressed":te,"--n-close-icon-color":g,"--n-close-icon-color-hover":v,"--n-close-icon-color-pressed":f,"--n-line-height":C,"--n-icon-color":ae,"--n-close-margin":H,"--n-close-size":L,"--n-close-icon-size":ee,"--n-width":Y,"--n-padding-left":Te,"--n-padding-right":Ke,"--n-padding-top":We,"--n-padding-bottom":qe,"--n-title-font-size":ie,"--n-meta-font-size":re,"--n-description-font-size":se}}),r=i?ue("notification",_(()=>o.type[0]),d,n):void 0;return{mergedClsPrefix:e,showAvatar:_(()=>o.avatar||o.type!=="default"),handleCloseClick(){o.onClose()},rtlEnabled:c,cssVars:i?void 0:d,themeClass:r==null?void 0:r.themeClass,onRender:r==null?void 0:r.onRender}},render(){var o;const{mergedClsPrefix:e}=this;return(o=this.onRender)===null||o===void 0||o.call(this),h("div",{class:[`${e}-notification-wrapper`,this.themeClass],onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave,style:this.cssVars},h("div",{class:[`${e}-notification`,this.rtlEnabled&&`${e}-notification--rtl`,this.themeClass,{[`${e}-notification--closable`]:this.closable,[`${e}-notification--show-avatar`]:this.showAvatar}],style:this.cssVars},this.showAvatar?h("div",{class:`${e}-notification__avatar`},this.avatar?B(this.avatar):this.type!=="default"?h(Ie,{clsPrefix:e},{default:()=>nn[this.type]()}):null):null,this.closable?h($e,{clsPrefix:e,class:`${e}-notification__close`,onClick:this.handleCloseClick}):null,h("div",{ref:"bodyRef",class:`${e}-notification-main`},this.title?h("div",{class:`${e}-notification-main__header`},B(this.title)):null,this.description?h("div",{class:`${e}-notification-main__description`},B(this.description)):null,this.content?h("pre",{class:`${e}-notification-main__content`},B(this.content)):null,this.meta||this.action?h("div",{class:`${e}-notification-main-footer`},this.meta?h("div",{class:`${e}-notification-main-footer__meta`},B(this.meta)):null,this.action?h("div",{class:`${e}-notification-main-footer__action`},B(this.action)):null):null)))}}),sn=Object.assign(Object.assign({},ve),{duration:Number,onClose:Function,onLeave:Function,onAfterEnter:Function,onAfterLeave:Function,onHide:Function,onAfterShow:Function,onAfterHide:Function}),an=O({name:"NotificationEnvironment",props:Object.assign(Object.assign({},sn),{internalKey:{type:String,required:!0},onInternalAfterLeave:{type:Function,required:!0}}),setup(o){const{wipTransitionCountRef:e}=z(J),t=k(!0);let n=null;function i(){t.value=!1,n&&window.clearTimeout(n)}function l(f){e.value++,N(()=>{f.style.height=`${f.offsetHeight}px`,f.style.maxHeight="0",f.style.transition="none",f.offsetHeight,f.style.transition="",f.style.maxHeight=f.style.height})}function c(f){e.value--,f.style.height="",f.style.maxHeight="";const{onAfterEnter:p,onAfterShow:y}=o;p&&p(),y&&y()}function d(f){e.value++,f.style.maxHeight=`${f.offsetHeight}px`,f.style.height=`${f.offsetHeight}px`,f.offsetHeight}function r(f){const{onHide:p}=o;p&&p(),f.style.maxHeight="0",f.offsetHeight}function a(){e.value--;const{onAfterLeave:f,onInternalAfterLeave:p,onAfterHide:y,internalKey:w}=o;f&&f(),p(w),y&&y()}function s(){const{duration:f}=o;f&&(n=window.setTimeout(i,f))}function u(f){f.currentTarget===f.target&&n!==null&&(window.clearTimeout(n),n=null)}function g(f){f.currentTarget===f.target&&s()}function v(){const{onClose:f}=o;f?Promise.resolve(f()).then(p=>{p!==!1&&i()}):i()}return ge(()=>{o.duration&&(n=window.setTimeout(i,o.duration))}),{show:t,hide:i,handleClose:v,handleAfterLeave:a,handleLeave:r,handleBeforeLeave:d,handleAfterEnter:c,handleBeforeEnter:l,handleMouseenter:u,handleMouseleave:g}},render(){return h(Se,{name:"notification-transition",appear:!0,onBeforeEnter:this.handleBeforeEnter,onAfterEnter:this.handleAfterEnter,onBeforeLeave:this.handleBeforeLeave,onLeave:this.handleLeave,onAfterLeave:this.handleAfterLeave},{default:()=>this.show?h(rn,Object.assign({},Ce(this.$props,tn),{onClose:this.handleClose,onMouseenter:this.duration&&this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.duration&&this.keepAliveOnHover?this.handleMouseleave:void 0})):null})}}),ln=x([m("notification-container",`
141
+ `)])]),qo={info:()=>h(Pe,null),success:()=>h(je,null),warning:()=>h(Ie,null),error:()=>h(Ae,null),default:()=>null},Do=O({name:"Message",props:Object.assign(Object.assign({},Re),{render:Function}),setup(o){const{inlineThemeDisabled:e,mergedRtlRef:t}=F(o),{props:n,mergedClsPrefixRef:i}=E(He),l=Oe("Message",t,i),c=T("Message","-message",Wo,Ro,n,i),d=_(()=>{const{type:a}=o,{common:{cubicBezierEaseInOut:s},self:{padding:u,margin:v,maxWidth:g,iconMargin:f,closeMargin:p,closeSize:y,iconSize:w,fontSize:$,lineHeight:P,borderRadius:S,iconColorInfo:C,iconColorSuccess:M,iconColorWarning:H,iconColorError:j,iconColorLoading:Y,closeIconSize:Z,closeBorderRadius:ee,[z("textColor",a)]:oe,[z("boxShadow",a)]:ne,[z("color",a)]:te,[z("closeColorHover",a)]:ie,[z("closeColorPressed",a)]:re,[z("closeIconColor",a)]:se,[z("closeIconColorPressed",a)]:ae,[z("closeIconColorHover",a)]:le}}=c.value;return{"--n-bezier":s,"--n-margin":v,"--n-padding":u,"--n-max-width":g,"--n-font-size":$,"--n-icon-margin":f,"--n-icon-size":w,"--n-close-icon-size":Z,"--n-close-border-radius":ee,"--n-close-size":y,"--n-close-margin":p,"--n-text-color":oe,"--n-color":te,"--n-box-shadow":ne,"--n-icon-color-info":C,"--n-icon-color-success":M,"--n-icon-color-warning":H,"--n-icon-color-error":j,"--n-icon-color-loading":Y,"--n-close-color-hover":ie,"--n-close-color-pressed":re,"--n-close-icon-color":se,"--n-close-icon-color-pressed":ae,"--n-close-icon-color-hover":le,"--n-line-height":P,"--n-border-radius":S}}),r=e?ue("message",_(()=>o.type[0]),d,{}):void 0;return{mergedClsPrefix:i,rtlEnabled:l,messageProviderProps:n,handleClose(){var a;(a=o.onClose)===null||a===void 0||a.call(o)},cssVars:e?void 0:d,themeClass:r==null?void 0:r.themeClass,onRender:r==null?void 0:r.onRender,placement:n.placement}},render(){const{render:o,type:e,closable:t,content:n,mergedClsPrefix:i,cssVars:l,themeClass:c,onRender:d,icon:r,handleClose:a,showIcon:s}=this;d==null||d();let u;return h("div",{class:[`${i}-message-wrapper`,c],onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave,style:[{alignItems:this.placement.startsWith("top")?"flex-start":"flex-end"},l]},o?o(this.$props):h("div",{class:[`${i}-message ${i}-message--${e}-type`,this.rtlEnabled&&`${i}-message--rtl`]},(u=Uo(r,e,i))&&s?h("div",{class:`${i}-message__icon ${i}-message__icon--${e}-type`},h(io,null,{default:()=>u})):null,h("div",{class:`${i}-message__content`},B(n)),t?h($e,{clsPrefix:i,class:`${i}-message__close`,onClick:a,absolute:!0}):null))}});function Uo(o,e,t){if(typeof o=="function")return o();{const n=e==="loading"?h(ro,{clsPrefix:t,strokeWidth:24,scale:.85}):qo[e]();return n?h(Le,{clsPrefix:t,key:e},{default:()=>n}):null}}const Vo=O({name:"MessageEnvironment",props:Object.assign(Object.assign({},Re),{duration:{type:Number,default:3e3},onAfterLeave:Function,onLeave:Function,internalKey:{type:String,required:!0},onInternalAfterLeave:Function,onHide:Function,onAfterHide:Function}),setup(o){let e=null;const t=k(!0);ve(()=>{n()});function n(){const{duration:s}=o;s&&(e=window.setTimeout(c,s))}function i(s){s.currentTarget===s.target&&e!==null&&(window.clearTimeout(e),e=null)}function l(s){s.currentTarget===s.target&&n()}function c(){const{onHide:s}=o;t.value=!1,e&&(window.clearTimeout(e),e=null),s&&s()}function d(){const{onClose:s}=o;s&&s(),c()}function r(){const{onAfterLeave:s,onInternalAfterLeave:u,onAfterHide:v,internalKey:g}=o;s&&s(),u&&u(g),v&&v()}function a(){c()}return{show:t,hide:c,handleClose:d,handleAfterLeave:r,handleMouseleave:l,handleMouseenter:i,deactivate:a}},render(){return h(so,{appear:!0,onAfterLeave:this.handleAfterLeave,onLeave:this.onLeave},{default:()=>[this.show?h(Do,{content:this.content,type:this.type,icon:this.icon,showIcon:this.showIcon,closable:this.closable,onClose:this.handleClose,onMouseenter:this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.keepAliveOnHover?this.handleMouseleave:void 0}):null]})}}),Go=Object.assign(Object.assign({},T.props),{to:[String,Object],duration:{type:Number,default:3e3},keepAliveOnHover:Boolean,max:Number,placement:{type:String,default:"top"},closable:Boolean,containerClass:String,containerStyle:[String,Object]}),Xo=O({name:"MessageProvider",props:Go,setup(o){const{mergedClsPrefixRef:e}=F(o),t=k([]),n=k({}),i={create(r,a){return l(r,Object.assign({type:"default"},a))},info(r,a){return l(r,Object.assign(Object.assign({},a),{type:"info"}))},success(r,a){return l(r,Object.assign(Object.assign({},a),{type:"success"}))},warning(r,a){return l(r,Object.assign(Object.assign({},a),{type:"warning"}))},error(r,a){return l(r,Object.assign(Object.assign({},a),{type:"error"}))},loading(r,a){return l(r,Object.assign(Object.assign({},a),{type:"loading"}))},destroyAll:d};L(He,{props:o,mergedClsPrefixRef:e}),L(Me,i);function l(r,a){const s=G(),u=X(Object.assign(Object.assign({},a),{content:r,key:s,destroy:()=>{var g;(g=n.value[s])===null||g===void 0||g.hide()}})),{max:v}=o;return v&&t.value.length>=v&&t.value.shift(),t.value.push(u),u}function c(r){t.value.splice(t.value.findIndex(a=>a.key===r),1),delete n.value[r]}function d(){Object.values(n.value).forEach(r=>{r.hide()})}return Object.assign({mergedClsPrefix:e,messageRefs:n,messageList:t,handleAfterLeave:c},i)},render(){var o,e,t;return h(W,null,(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o),this.messageList.length?h(he,{to:(t=this.to)!==null&&t!==void 0?t:"body"},h("div",{class:[`${this.mergedClsPrefix}-message-container`,`${this.mergedClsPrefix}-message-container--${this.placement}`,this.containerClass],key:"message-container",style:this.containerStyle},this.messageList.map(n=>h(Vo,Object.assign({ref:i=>{i&&(this.messageRefs[n.key]=i)},internalKey:n.key,onInternalAfterLeave:this.handleAfterLeave},Q(n,["destroy"],void 0),{duration:n.duration===void 0?this.duration:n.duration,keepAliveOnHover:n.keepAliveOnHover===void 0?this.keepAliveOnHover:n.keepAliveOnHover,closable:n.closable===void 0?this.closable:n.closable}))))):null)}});function Qo(){const o=E(Me,null);return o===null&&q("use-message","No outer <n-message-provider /> founded. See prerequisite in https://www.naiveui.com/en-US/os-theme/components/message for more details. If you want to use `useMessage` outside setup, please check https://www.naiveui.com/zh-CN/os-theme/components/message#Q-&-A."),o}const Jo=O({name:"ModalEnvironment",props:Object.assign(Object.assign({},ao),{internalKey:{type:String,required:!0},onInternalAfterLeave:{type:Function,required:!0}}),setup(o){const e=k(!0);function t(){const{onInternalAfterLeave:s,internalKey:u,onAfterLeave:v}=o;s&&s(u),v&&v()}function n(){const{onPositiveClick:s}=o;s?Promise.resolve(s()).then(u=>{u!==!1&&r()}):r()}function i(){const{onNegativeClick:s}=o;s?Promise.resolve(s()).then(u=>{u!==!1&&r()}):r()}function l(){const{onClose:s}=o;s?Promise.resolve(s()).then(u=>{u!==!1&&r()}):r()}function c(s){const{onMaskClick:u,maskClosable:v}=o;u&&(u(s),v&&r())}function d(){const{onEsc:s}=o;s&&s()}function r(){e.value=!1}function a(s){e.value=s}return{show:e,hide:r,handleUpdateShow:a,handleAfterLeave:t,handleCloseClick:l,handleNegativeClick:i,handlePositiveClick:n,handleMaskClick:c,handleEsc:d}},render(){const{handleUpdateShow:o,handleAfterLeave:e,handleMaskClick:t,handleEsc:n,show:i}=this;return h(we,Object.assign({},this.$props,{show:i,onUpdateShow:o,onMaskClick:t,onEsc:n,onAfterLeave:e,internalAppear:!0,internalModal:!0}))}}),ye=R("n-modal-provider"),Be=R("n-modal-api"),Yo=R("n-modal-reactive-list"),Zo={to:[String,Object]},en=O({name:"ModalProvider",props:Zo,setup(){const o=ce(64),e=de(),t=k([]),n={};function i(r={}){const a=G(),s=X(Object.assign(Object.assign({},r),{key:a,destroy:()=>{n[`n-modal-${a}`].hide()}}));return t.value.push(s),s}function l(r){const{value:a}=t;a.splice(a.findIndex(s=>s.key===r),1)}function c(){Object.values(n).forEach(r=>{r.hide()})}const d={create:i,destroyAll:c};return L(Be,d),L(ye,{clickedRef:ce(64),clickedPositionRef:de()}),L(Yo,t),L(ye,{clickedRef:o,clickedPositionRef:e}),Object.assign(Object.assign({},d),{modalList:t,modalInstRefs:n,handleAfterLeave:l})},render(){var o,e;return h(W,null,[this.modalList.map(t=>{var n;return h(Jo,Q(t,["destroy","style"],{internalStyle:t.style,to:(n=t.to)!==null&&n!==void 0?n:this.to,ref:i=>{i===null?delete this.modalInstRefs[`n-modal-${t.key}`]:this.modalInstRefs[`n-modal-${t.key}`]=i},internalKey:t.key,onInternalAfterLeave:this.handleAfterLeave}))}),(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o)])}});function on(){const o=E(Be,null);return o===null&&q("use-modal","No outer <n-modal-provider /> founded."),o}const J=R("n-notification-provider"),nn=O({name:"NotificationContainer",props:{scrollable:{type:Boolean,required:!0},placement:{type:String,required:!0}},setup(){const{mergedThemeRef:o,mergedClsPrefixRef:e,wipTransitionCountRef:t}=E(J),n=k(null);return lo(()=>{var i,l;t.value>0?(i=n==null?void 0:n.value)===null||i===void 0||i.classList.add("transitioning"):(l=n==null?void 0:n.value)===null||l===void 0||l.classList.remove("transitioning")}),{selfRef:n,mergedTheme:o,mergedClsPrefix:e,transitioning:t}},render(){const{$slots:o,scrollable:e,mergedClsPrefix:t,mergedTheme:n,placement:i}=this;return h("div",{ref:"selfRef",class:[`${t}-notification-container`,e&&`${t}-notification-container--scrollable`,`${t}-notification-container--${i}`]},e?h(co,{theme:n.peers.Scrollbar,themeOverrides:n.peerOverrides.Scrollbar,contentStyle:{overflow:"hidden"}},o):o)}}),tn={info:()=>h(Pe,null),success:()=>h(je,null),warning:()=>h(Ie,null),error:()=>h(Ae,null),default:()=>null},ge={closable:{type:Boolean,default:!0},type:{type:String,default:"default"},avatar:Function,title:[String,Function],description:[String,Function],content:[String,Function],meta:[String,Function],action:[String,Function],onClose:{type:Function,required:!0},keepAliveOnHover:Boolean,onMouseenter:Function,onMouseleave:Function},rn=fo(ge),sn=O({name:"Notification",props:ge,setup(o){const{mergedClsPrefixRef:e,mergedThemeRef:t,props:n}=E(J),{inlineThemeDisabled:i,mergedRtlRef:l}=F(),c=Oe("Notification",l,e),d=_(()=>{const{type:a}=o,{self:{color:s,textColor:u,closeIconColor:v,closeIconColorHover:g,closeIconColorPressed:f,headerTextColor:p,descriptionTextColor:y,actionTextColor:w,borderRadius:$,headerFontWeight:P,boxShadow:S,lineHeight:C,fontSize:M,closeMargin:H,closeSize:j,width:Y,padding:Z,closeIconSize:ee,closeBorderRadius:oe,closeColorHover:ne,closeColorPressed:te,titleFontSize:ie,metaFontSize:re,descriptionFontSize:se,[z("iconColor",a)]:ae},common:{cubicBezierEaseOut:le,cubicBezierEaseIn:Ne,cubicBezierEaseInOut:Fe}}=t.value,{left:Te,right:Ke,top:We,bottom:qe}=uo(Z);return{"--n-color":s,"--n-font-size":M,"--n-text-color":u,"--n-description-text-color":y,"--n-action-text-color":w,"--n-title-text-color":p,"--n-title-font-weight":P,"--n-bezier":Fe,"--n-bezier-ease-out":le,"--n-bezier-ease-in":Ne,"--n-border-radius":$,"--n-box-shadow":S,"--n-close-border-radius":oe,"--n-close-color-hover":ne,"--n-close-color-pressed":te,"--n-close-icon-color":v,"--n-close-icon-color-hover":g,"--n-close-icon-color-pressed":f,"--n-line-height":C,"--n-icon-color":ae,"--n-close-margin":H,"--n-close-size":j,"--n-close-icon-size":ee,"--n-width":Y,"--n-padding-left":Te,"--n-padding-right":Ke,"--n-padding-top":We,"--n-padding-bottom":qe,"--n-title-font-size":ie,"--n-meta-font-size":re,"--n-description-font-size":se}}),r=i?ue("notification",_(()=>o.type[0]),d,n):void 0;return{mergedClsPrefix:e,showAvatar:_(()=>o.avatar||o.type!=="default"),handleCloseClick(){o.onClose()},rtlEnabled:c,cssVars:i?void 0:d,themeClass:r==null?void 0:r.themeClass,onRender:r==null?void 0:r.onRender}},render(){var o;const{mergedClsPrefix:e}=this;return(o=this.onRender)===null||o===void 0||o.call(this),h("div",{class:[`${e}-notification-wrapper`,this.themeClass],onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave,style:this.cssVars},h("div",{class:[`${e}-notification`,this.rtlEnabled&&`${e}-notification--rtl`,this.themeClass,{[`${e}-notification--closable`]:this.closable,[`${e}-notification--show-avatar`]:this.showAvatar}],style:this.cssVars},this.showAvatar?h("div",{class:`${e}-notification__avatar`},this.avatar?B(this.avatar):this.type!=="default"?h(Le,{clsPrefix:e},{default:()=>tn[this.type]()}):null):null,this.closable?h($e,{clsPrefix:e,class:`${e}-notification__close`,onClick:this.handleCloseClick}):null,h("div",{ref:"bodyRef",class:`${e}-notification-main`},this.title?h("div",{class:`${e}-notification-main__header`},B(this.title)):null,this.description?h("div",{class:`${e}-notification-main__description`},B(this.description)):null,this.content?h("pre",{class:`${e}-notification-main__content`},B(this.content)):null,this.meta||this.action?h("div",{class:`${e}-notification-main-footer`},this.meta?h("div",{class:`${e}-notification-main-footer__meta`},B(this.meta)):null,this.action?h("div",{class:`${e}-notification-main-footer__action`},B(this.action)):null):null)))}}),an=Object.assign(Object.assign({},ge),{duration:Number,onClose:Function,onLeave:Function,onAfterEnter:Function,onAfterLeave:Function,onHide:Function,onAfterShow:Function,onAfterHide:Function}),ln=O({name:"NotificationEnvironment",props:Object.assign(Object.assign({},an),{internalKey:{type:String,required:!0},onInternalAfterLeave:{type:Function,required:!0}}),setup(o){const{wipTransitionCountRef:e}=E(J),t=k(!0);let n=null;function i(){t.value=!1,n&&window.clearTimeout(n)}function l(f){e.value++,N(()=>{f.style.height=`${f.offsetHeight}px`,f.style.maxHeight="0",f.style.transition="none",f.offsetHeight,f.style.transition="",f.style.maxHeight=f.style.height})}function c(f){e.value--,f.style.height="",f.style.maxHeight="";const{onAfterEnter:p,onAfterShow:y}=o;p&&p(),y&&y()}function d(f){e.value++,f.style.maxHeight=`${f.offsetHeight}px`,f.style.height=`${f.offsetHeight}px`,f.offsetHeight}function r(f){const{onHide:p}=o;p&&p(),f.style.maxHeight="0",f.offsetHeight}function a(){e.value--;const{onAfterLeave:f,onInternalAfterLeave:p,onAfterHide:y,internalKey:w}=o;f&&f(),p(w),y&&y()}function s(){const{duration:f}=o;f&&(n=window.setTimeout(i,f))}function u(f){f.currentTarget===f.target&&n!==null&&(window.clearTimeout(n),n=null)}function v(f){f.currentTarget===f.target&&s()}function g(){const{onClose:f}=o;f?Promise.resolve(f()).then(p=>{p!==!1&&i()}):i()}return ve(()=>{o.duration&&(n=window.setTimeout(i,o.duration))}),{show:t,hide:i,handleClose:g,handleAfterLeave:a,handleLeave:r,handleBeforeLeave:d,handleAfterEnter:c,handleBeforeEnter:l,handleMouseenter:u,handleMouseleave:v}},render(){return h(Se,{name:"notification-transition",appear:!0,onBeforeEnter:this.handleBeforeEnter,onAfterEnter:this.handleAfterEnter,onBeforeLeave:this.handleBeforeLeave,onLeave:this.handleLeave,onAfterLeave:this.handleAfterLeave},{default:()=>this.show?h(sn,Object.assign({},Ce(this.$props,rn),{onClose:this.handleClose,onMouseenter:this.duration&&this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.duration&&this.keepAliveOnHover?this.handleMouseleave:void 0})):null})}}),cn=x([m("notification-container",`
142
142
  z-index: 4000;
143
143
  position: fixed;
144
144
  overflow: visible;
@@ -255,7 +255,7 @@ 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,
255
255
  box-shadow: var(--n-box-shadow);
256
256
  box-sizing: border-box;
257
257
  opacity: 1;
258
- `,[P("avatar",[m("icon",`
258
+ `,[I("avatar",[m("icon",`
259
259
  color: var(--n-icon-color);
260
260
  `),m("base-icon",`
261
261
  color: var(--n-icon-color);
@@ -264,7 +264,7 @@ 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,
264
264
  width: calc(100% - 40px);
265
265
  `)]),b("closable",[m("notification-main",[x("> *:first-child",`
266
266
  padding-right: 20px;
267
- `)]),P("close",`
267
+ `)]),I("close",`
268
268
  position: absolute;
269
269
  top: 0;
270
270
  right: 0;
@@ -272,7 +272,7 @@ 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,
272
272
  transition:
273
273
  background-color .3s var(--n-bezier),
274
274
  color .3s var(--n-bezier);
275
- `)]),P("avatar",`
275
+ `)]),I("avatar",`
276
276
  position: absolute;
277
277
  top: var(--n-padding-top);
278
278
  left: var(--n-padding-left);
@@ -295,27 +295,27 @@ 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,
295
295
  align-items: center;
296
296
  justify-content: space-between;
297
297
  margin-top: 12px;
298
- `,[P("meta",`
298
+ `,[I("meta",`
299
299
  font-size: var(--n-meta-font-size);
300
300
  transition: color .3s var(--n-bezier-ease-out);
301
301
  color: var(--n-description-text-color);
302
- `),P("action",`
302
+ `),I("action",`
303
303
  cursor: pointer;
304
304
  transition: color .3s var(--n-bezier-ease-out);
305
305
  color: var(--n-action-text-color);
306
- `)]),P("header",`
306
+ `)]),I("header",`
307
307
  font-weight: var(--n-title-font-weight);
308
308
  font-size: var(--n-title-font-size);
309
309
  transition: color .3s var(--n-bezier-ease-out);
310
310
  color: var(--n-title-text-color);
311
- `),P("description",`
311
+ `),I("description",`
312
312
  margin-top: 8px;
313
313
  font-size: var(--n-description-font-size);
314
314
  white-space: pre-wrap;
315
315
  word-wrap: break-word;
316
316
  transition: color .3s var(--n-bezier-ease-out);
317
317
  color: var(--n-description-text-color);
318
- `),P("content",`
318
+ `),I("content",`
319
319
  line-height: var(--n-line-height);
320
320
  margin: 12px 0 0 0;
321
321
  font-family: inherit;
@@ -327,6 +327,6 @@ 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,
327
327
  transform: translate(${t}, 0);
328
328
  `),x("&.notification-transition-leave-from, &.notification-transition-enter-to",`
329
329
  transform: translate(0, 0);
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","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-D-io-zYm.js.map
330
+ `)])}const _e=R("n-notification-api"),dn=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}),fn=O({name:"NotificationProvider",props:dn,setup(o){const{mergedClsPrefixRef:e}=F(o),t=k([]),n={},i=new Set;function l(g){const f=G(),p=()=>{i.add(f),n[f]&&n[f].hide()},y=X(Object.assign(Object.assign({},g),{key:f,destroy:p,hide:p,deactivate:p})),{max:w}=o;if(w&&t.value.length-i.size>=w){let $=!1,P=0;for(const S of t.value){if(!i.has(S.key)){n[S.key]&&(S.destroy(),$=!0);break}P++}$||t.value.splice(P,1)}return t.value.push(y),y}const c=["info","success","warning","error"].map(g=>f=>l(Object.assign(Object.assign({},f),{type:g})));function d(g){i.delete(g),t.value.splice(t.value.findIndex(f=>f.key===g),1)}const r=T("Notification","-notification",cn,Io,o,e),a={create:l,info:c[0],success:c[1],warning:c[2],error:c[3],open:u,destroyAll:v},s=k(0);L(_e,a),L(J,{props:o,mergedClsPrefixRef:e,mergedThemeRef:r,wipTransitionCountRef:s});function u(g){return l(g)}function v(){Object.values(t.value).forEach(g=>{g.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(nn,{class:this.containerClass,style:this.containerStyle,scrollable:this.scrollable&&n!=="top"&&n!=="bottom",placement:n},{default:()=>this.notificationList.map(i=>h(ln,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 un(){const o=E(_e,null);return o===null&&q("use-notification","No outer `n-notification-provider` found."),o}const hn=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)}}}),vn={message:Qo,notification:un,loadingBar:Ko,dialog:$o,modal:on};function gn({providersAndProps:o,configProviderProps:e}){let n=ho(()=>h(go,pe(e),{default:()=>o.map(({type:d,Provider:r,props:a})=>h(r,pe(a),{default:()=>h(hn,{onSetup:()=>i[d]=vn[d]()})}))}));const i={app:n};let l;return vo&&(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 pn(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:Xo,props:t});break;case"notification":d.push({type:a,Provider:fn,props:i});break;case"dialog":d.push({type:a,Provider:Oo,props:n});break;case"loadingBar":d.push({type:a,Provider:To,props:l});break;case"modal":d.push({type:a,Provider:en,props:c})}}),gn({providersAndProps:d,configProviderProps:e})}const{message:xe,dialog:$n,loadingBar:Ln}=pn(["message","dialog","loadingBar"]),Pn=(...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},mn=o=>{const e={};return o.forEach((t,n)=>{e[n]=t}),e},K=async(o=0)=>new Promise(e=>{setTimeout(e,o)}),jn=(()=>{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("复制失败")}}}})(),In=()=>{const o=window.innerHeight>window.innerWidth;ve(()=>{o&&me.classList.add("mobile")}),mo(()=>{me.classList.remove("mobile")})},An=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} 分钟前`:"刚刚"},bn=()=>{},En=()=>bn,zn=(o,e)=>{const t={};return e.forEach(n=>{const i=o[n];i!==void 0&&(t[n]=i)}),t},yn=o=>(...e)=>o()(...e),xn=yn(()=>{var o;return(o=window.__NetworkExtension__)==null?void 0:o.GM_xmlhttpRequest}),Cn=()=>{var o;return!!((o=window.__NetworkExtension__)!=null&&o.GM_xmlhttpRequest)},wn=(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},kn=(o="")=>{try{return o===""&&location.href?location.href:o}catch{return o}},Sn=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=kn(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 v={method:i,url:l,headers:mn(c),data:r,binary:d,responseType:"blob",async onload(y){var P;let w;y.response instanceof Blob&&y.response.size==0||(w=(P=y.response)!=null?P:y.responseText),await K();const $=new Response(w,{status:y.status,statusText:y.statusText,headers:wn(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"?v=t(v):v={...v,...t};const g=xn(v);function f(){g.abort()}(p=n.signal)==null||p.addEventListener("abort",f)})},Rn=async(o,e,t)=>{const n=new Request(o),i=new URL(n.url);if(bo(i))return fetch(o,{...e,mode:"cors"});if(Cn())return Sn(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,En as b,jn as c,$n as d,Rn as e,Co as f,Cn as g,zn as h,Q as i,Ln as l,xe as m,Pn as o,An as t,In as u};
332
+ //# sourceMappingURL=fetch-BHXtD9U5.js.map