xframelib 0.4.1 → 0.4.6
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.
- package/README.md +5 -0
- package/dist/api/Token.d.ts +20 -0
- package/dist/api/User.d.ts +45 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/controls/collapsepanel/VCollapsiblePanel.vue.d.ts +26 -0
- package/dist/controls/collapsepanel/VCollapsiblePanelGroup.vue.d.ts +30 -0
- package/dist/controls/collapsepanel/color.util.d.ts +1 -0
- package/dist/controls/collapsepanel/composables/store.d.ts +7 -0
- package/dist/controls/collapsepanel/constant.d.ts +1 -0
- package/dist/controls/collapsepanel/index.d.ts +3 -0
- package/dist/controls/layoutcontainer/LayoutManager.d.ts +107 -0
- package/dist/controls/layoutcontainer/index.d.ts +3 -0
- package/dist/controls/layoutcontainer/layout.vue.d.ts +37 -0
- package/dist/controls/splitpanes/index.d.ts +3 -0
- package/dist/controls/vuewindow/SinglePointerEvent.d.ts +23 -0
- package/dist/controls/vuewindow/dom.d.ts +16 -0
- package/dist/controls/vuewindow/draggable_helper.d.ts +20 -0
- package/dist/controls/vuewindow/index.d.ts +6 -0
- package/dist/controls/vuewindow/resizable_helper.d.ts +16 -0
- package/dist/controls/vuewindow/style.d.ts +110 -0
- package/dist/controls/vuewindow/window/Button.vue.d.ts +26 -0
- package/dist/controls/vuewindow/window/index.vue.d.ts +160 -0
- package/dist/controls/vuewindow/window/utils.d.ts +17 -0
- package/dist/controls/vuewindow/z_element.d.ts +11 -0
- package/dist/core/Global.d.ts +26 -0
- package/dist/core/IModel.d.ts +34 -0
- package/dist/core/MsgHelper.d.ts +12 -0
- package/dist/core/SysEvents.d.ts +23 -0
- package/dist/core/index.d.ts +3 -0
- package/dist/hprose/HproseClient.d.ts +20 -0
- package/dist/hprose/ProxyClient.d.ts +22 -0
- package/dist/hprose/index.d.ts +11 -0
- package/dist/index.cjs +3 -8
- package/dist/index.css +69 -0
- package/dist/index.d.ts +10 -1116
- package/dist/index.js +3 -8
- package/dist/mitt/index.d.ts +25 -0
- package/dist/model/Config.d.ts +94 -0
- package/dist/model/Constants.d.ts +15 -0
- package/dist/model/Layout.d.ts +75 -0
- package/dist/model/Token.d.ts +66 -0
- package/dist/model/index.d.ts +4 -0
- package/dist/public/mitm.html +166 -0
- package/dist/public/sw.js +128 -0
- package/dist/utils/AxiosHelper.d.ts +58 -0
- package/dist/utils/BigFileDownload.d.ts +117 -0
- package/dist/utils/Color.d.ts +74 -0
- package/dist/utils/FileDownload.d.ts +36 -0
- package/dist/utils/FileUpload.d.ts +90 -0
- package/dist/utils/H5Tool.d.ts +98 -0
- package/dist/utils/IsTool.d.ts +101 -0
- package/dist/utils/JQuery.d.ts +35 -0
- package/dist/utils/LockHelper.d.ts +17 -0
- package/dist/utils/Storage.d.ts +57 -0
- package/dist/utils/StringUtils.d.ts +15 -0
- package/dist/utils/Time.d.ts +1 -0
- package/dist/utils/TokenHelper.d.ts +18 -0
- package/dist/utils/URLTool.d.ts +18 -0
- package/dist/utils/index.d.ts +16 -0
- package/dist/utils/uuid.d.ts +3 -0
- package/package.json +15 -15
package/dist/index.cjs
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),t=require("@hprose/rpc-core"),n=require("@hprose/io"),i=require("@hprose/rpc-html5"),r={name:"splitpanes",props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},provide(){return{requestUpdate:this.requestUpdate,onPaneAdd:this.onPaneAdd,onPaneRemove:this.onPaneRemove,onPaneClick:this.onPaneClick}},data:()=>({container:null,ready:!1,panes:[],touch:{mouseDown:!1,dragging:!1,activeSplitter:null},splitterTaps:{splitter:null,timeoutId:null}}),computed:{panesCount(){return this.panes.length},indexedPanes(){return this.panes.reduce((_t,It)=>(_t[It.id]=It)&&_t,{})}},methods:{updatePaneComponents(){this.panes.forEach(_t=>{_t.update&&_t.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[_t.id].size}%`})})},bindEvents(){document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),document.addEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.addEventListener("touchmove",this.onMouseMove,{passive:!1}),document.addEventListener("touchend",this.onMouseUp))},unbindEvents(){document.removeEventListener("mousemove",this.onMouseMove,{passive:!1}),document.removeEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.removeEventListener("touchmove",this.onMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onMouseUp))},onMouseDown(_t,It){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=It},onMouseMove(_t){this.touch.mouseDown&&(_t.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(_t)),this.$emit("resize",this.panes.map(It=>({min:It.min,max:It.max,size:It.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(_t=>({min:_t.min,max:_t.max,size:_t.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(_t,It){"ontouchstart"in window&&(_t.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===It?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(_t,It),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=It,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[It])},onSplitterDblClick(_t,It){let Mt=0;this.panes=this.panes.map((Pt,Lt)=>(Pt.size=Lt===It?Pt.max:Pt.min,Lt!==It&&(Mt+=Pt.min),Pt)),this.panes[It].size-=Mt,this.$emit("pane-maximize",this.panes[It])},onPaneClick(_t,It){this.$emit("pane-click",this.indexedPanes[It])},getCurrentMouseDrag(_t){const It=this.container.getBoundingClientRect(),{clientX:Mt,clientY:Pt}="ontouchstart"in window&&_t.touches?_t.touches[0]:_t;return{x:Mt-It.left,y:Pt-It.top}},getCurrentDragPercentage(_t){_t=_t[this.horizontal?"y":"x"];const It=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(_t=It-_t),100*_t/It},calculatePanesSize(_t){const It=this.touch.activeSplitter;let Mt={prevPanesSize:this.sumPrevPanesSize(It),nextPanesSize:this.sumNextPanesSize(It),prevReachedMinPanes:0,nextReachedMinPanes:0};const Pt=0+(this.pushOtherPanes?0:Mt.prevPanesSize),Lt=100-(this.pushOtherPanes?0:Mt.nextPanesSize),Tt=Math.max(Math.min(this.getCurrentDragPercentage(_t),Lt),Pt);let qt=[It,It+1],Xt=this.panes[qt[0]]||null,Vt=this.panes[qt[1]]||null;const Yt=Xt.max<100&&Tt>=Xt.max+Mt.prevPanesSize,Qt=Vt.max<100&&Tt<=100-(Vt.max+this.sumNextPanesSize(It+1));if(Yt||Qt)Yt?(Xt.size=Xt.max,Vt.size=Math.max(100-Xt.max-Mt.prevPanesSize-Mt.nextPanesSize,0)):(Xt.size=Math.max(100-Vt.max-Mt.prevPanesSize-this.sumNextPanesSize(It+1),0),Vt.size=Vt.max);else{if(this.pushOtherPanes){const nn=this.doPushOtherPanes(Mt,Tt);if(!nn)return;({sums:Mt,panesToResize:qt}=nn),Xt=this.panes[qt[0]]||null,Vt=this.panes[qt[1]]||null}Xt!==null&&(Xt.size=Math.min(Math.max(Tt-Mt.prevPanesSize-Mt.prevReachedMinPanes,Xt.min),Xt.max)),Vt!==null&&(Vt.size=Math.min(Math.max(100-Tt-Mt.nextPanesSize-Mt.nextReachedMinPanes,Vt.min),Vt.max))}},doPushOtherPanes(_t,It){const Mt=this.touch.activeSplitter,Pt=[Mt,Mt+1];return It<_t.prevPanesSize+this.panes[Pt[0]].min&&(Pt[0]=this.findPrevExpandedPane(Mt).index,_t.prevReachedMinPanes=0,Pt[0]<Mt&&this.panes.forEach((Lt,Tt)=>{Tt>Pt[0]&&Tt<=Mt&&(Lt.size=Lt.min,_t.prevReachedMinPanes+=Lt.min)}),_t.prevPanesSize=this.sumPrevPanesSize(Pt[0]),Pt[0]===void 0)?(_t.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((Lt,Tt)=>{Tt>0&&Tt<=Mt&&(Lt.size=Lt.min,_t.prevReachedMinPanes+=Lt.min)}),this.panes[Pt[1]].size=100-_t.prevReachedMinPanes-this.panes[0].min-_t.prevPanesSize-_t.nextPanesSize,null):It>100-_t.nextPanesSize-this.panes[Pt[1]].min&&(Pt[1]=this.findNextExpandedPane(Mt).index,_t.nextReachedMinPanes=0,Pt[1]>Mt+1&&this.panes.forEach((Lt,Tt)=>{Tt>Mt&&Tt<Pt[1]&&(Lt.size=Lt.min,_t.nextReachedMinPanes+=Lt.min)}),_t.nextPanesSize=this.sumNextPanesSize(Pt[1]-1),Pt[1]===void 0)?(_t.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((Lt,Tt)=>{Tt<this.panesCount-1&&Tt>=Mt+1&&(Lt.size=Lt.min,_t.nextReachedMinPanes+=Lt.min)}),this.panes[Pt[0]].size=100-_t.prevPanesSize-_t.nextReachedMinPanes-this.panes[this.panesCount-1].min-_t.nextPanesSize,null):{sums:_t,panesToResize:Pt}},sumPrevPanesSize(_t){return this.panes.reduce((It,Mt,Pt)=>It+(Pt<_t?Mt.size:0),0)},sumNextPanesSize(_t){return this.panes.reduce((It,Mt,Pt)=>It+(Pt>_t+1?Mt.size:0),0)},findPrevExpandedPane(_t){return[...this.panes].reverse().find(It=>It.index<_t&&It.size>It.min)||{}},findNextExpandedPane(_t){return this.panes.find(It=>It.index>_t+1&&It.size>It.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(_t=>{const It=_t.classList.contains("splitpanes__pane"),Mt=_t.classList.contains("splitpanes__splitter");if(!It&&!Mt)return _t.parentNode.removeChild(_t),void console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed.")})},addSplitter(_t,It,Mt=!1){const Pt=_t-1,Lt=document.createElement("div");Lt.classList.add("splitpanes__splitter"),Mt||(Lt.onmousedown=Tt=>this.onMouseDown(Tt,Pt),typeof window!="undefined"&&"ontouchstart"in window&&(Lt.ontouchstart=Tt=>this.onMouseDown(Tt,Pt)),Lt.onclick=Tt=>this.onSplitterClick(Tt,Pt+1)),this.dblClickSplitter&&(Lt.ondblclick=Tt=>this.onSplitterDblClick(Tt,Pt+1)),It.parentNode.insertBefore(Lt,It)},removeSplitter(_t){_t.onmousedown=void 0,_t.onclick=void 0,_t.ondblclick=void 0,_t.parentNode.removeChild(_t)},redoSplitters(){const _t=Array.from(this.container.children);_t.forEach(Mt=>{Mt.className.includes("splitpanes__splitter")&&this.removeSplitter(Mt)});let It=0;_t.forEach(Mt=>{Mt.className.includes("splitpanes__pane")&&(!It&&this.firstSplitter?this.addSplitter(It,Mt,!0):It&&this.addSplitter(It,Mt),It++)})},requestUpdate({target:_t,...It}){const Mt=this.indexedPanes[_t._.uid];Object.entries(It).forEach(([Pt,Lt])=>Mt[Pt]=Lt)},onPaneAdd(_t){let It=-1;Array.from(_t.$el.parentNode.children).some(Lt=>(Lt.className.includes("splitpanes__pane")&&It++,Lt===_t.$el));const Mt=parseFloat(_t.minSize),Pt=parseFloat(_t.maxSize);this.panes.splice(It,0,{id:_t._.uid,index:It,min:isNaN(Mt)?0:Mt,max:isNaN(Pt)?100:Pt,size:_t.size===null?null:parseFloat(_t.size),givenSize:_t.size,update:_t.update}),this.panes.forEach((Lt,Tt)=>Lt.index=Tt),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[It]}),this.$emit("pane-add",{index:It,panes:this.panes.map(Lt=>({min:Lt.min,max:Lt.max,size:Lt.size}))})})},onPaneRemove(_t){const It=this.panes.findIndex(Pt=>Pt.id===_t._.uid),Mt=this.panes.splice(It,1)[0];this.panes.forEach((Pt,Lt)=>Pt.index=Lt),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...Mt,index:It}}),this.$emit("pane-remove",{removed:Mt,panes:this.panes.map(Pt=>({min:Pt.min,max:Pt.max,size:Pt.size}))})})},resetPaneSizes(_t={}){_t.addedPane||_t.removedPane?this.panes.some(It=>It.givenSize!==null||It.min||It.max<100)?this.equalizeAfterAddOrRemove(_t):this.equalize():this.initialPanesSizing(),this.ready&&this.$emit("resized",this.panes.map(It=>({min:It.min,max:It.max,size:It.size})))},equalize(){const _t=100/this.panesCount;let It=0;const Mt=[],Pt=[];this.panes.forEach(Lt=>{Lt.size=Math.max(Math.min(_t,Lt.max),Lt.min),It-=Lt.size,Lt.size>=Lt.max&&Mt.push(Lt.id),Lt.size<=Lt.min&&Pt.push(Lt.id)}),It>.1&&this.readjustSizes(It,Mt,Pt)},initialPanesSizing(){let _t=100;const It=[],Mt=[];let Pt=0;this.panes.forEach(Tt=>{_t-=Tt.size,Tt.size!==null&&Pt++,Tt.size>=Tt.max&&It.push(Tt.id),Tt.size<=Tt.min&&Mt.push(Tt.id)});let Lt=100;_t>.1&&(this.panes.forEach(Tt=>{Tt.size===null&&(Tt.size=Math.max(Math.min(_t/(this.panesCount-Pt),Tt.max),Tt.min)),Lt-=Tt.size}),Lt>.1&&this.readjustSizes(_t,It,Mt))},equalizeAfterAddOrRemove({addedPane:_t}={}){let It=100/this.panesCount,Mt=0;const Pt=[],Lt=[];_t&&_t.givenSize!==null&&(It=(100-_t.givenSize)/(this.panesCount-1)),this.panes.forEach(Tt=>{Mt-=Tt.size,Tt.size>=Tt.max&&Pt.push(Tt.id),Tt.size<=Tt.min&&Lt.push(Tt.id)}),Math.abs(Mt)<.1||(this.panes.forEach(Tt=>{_t&&_t.givenSize!==null&&_t.id===Tt.id||(Tt.size=Math.max(Math.min(It,Tt.max),Tt.min)),Mt-=Tt.size,Tt.size>=Tt.max&&Pt.push(Tt.id),Tt.size<=Tt.min&&Lt.push(Tt.id)}),Mt>.1&&this.readjustSizes(Mt,Pt,Lt))},readjustSizes(_t,It,Mt){let Pt;Pt=_t>0?_t/(this.panesCount-It.length):_t/(this.panesCount-Mt.length),this.panes.forEach(Lt=>{if(_t>0&&!It.includes(Lt.id)){const Tt=Math.max(Math.min(Lt.size+Pt,Lt.max),Lt.min);_t-=Tt-Lt.size,Lt.size=Tt}else if(!Mt.includes(Lt.id)){const Tt=Math.max(Math.min(Lt.size+Pt,Lt.max),Lt.min);_t-=Tt-Lt.size,Lt.size=Tt}Lt.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[Lt.id].size}%`})}),Math.abs(_t)>.1&&this.$nextTick(()=>{this.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})}},watch:{panes:{deep:!0,immediate:!1,handler(){this.updatePaneComponents()}},horizontal(){this.updatePaneComponents()},firstSplitter(){this.redoSplitters()},dblClickSplitter(_t){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((It,Mt)=>{It.ondblclick=_t?Pt=>this.onSplitterDblClick(Pt,Mt):void 0})}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.updatePaneComponents(),this.$emit("ready"),this.ready=!0},render(){return e.h("div",{ref:"container",class:["splitpanes","splitpanes--"+(this.horizontal?"horizontal":"vertical"),{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())},__file:"src/controls/splitpanes/splitpanes.vue"},o={name:"pane",inject:["requestUpdate","onPaneAdd","onPaneRemove","onPaneClick"],props:{size:{type:[Number,String],default:10},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},data:()=>({style:{}}),mounted(){this.onPaneAdd(this)},beforeUnmount(){this.onPaneRemove(this)},methods:{update(_t){this.style=_t}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(_t){this.requestUpdate({target:this,size:_t})},minSizeNumber(_t){this.requestUpdate({target:this,min:_t})},maxSizeNumber(_t){this.requestUpdate({target:this,max:_t})}}};o.render=function(_t,It,Mt,Pt,Lt,Tt){return e.openBlock(),e.createElementBlock("div",{class:"splitpanes__pane",onClick:It[0]||(It[0]=qt=>Tt.onPaneClick(qt,_t._.uid)),style:e.normalizeStyle(_t.style)},[e.renderSlot(_t.$slots,"default")],4)},o.__file="src/controls/splitpanes/pane.vue";var s=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function a(_t){throw new Error('Could not dynamically require "'+_t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var c={exports:{}},u=c.exports=function(_t){var It=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function Mt(Wt,Nt){var Ot=Wt[0],jt=Wt[1],Dt=Wt[2],Ht=Wt[3];jt=((jt+=((Dt=((Dt+=((Ht=((Ht+=((Ot=((Ot+=(jt&Dt|~jt&Ht)+Nt[0]-680876936|0)<<7|Ot>>>25)+jt|0)&jt|~Ot&Dt)+Nt[1]-389564586|0)<<12|Ht>>>20)+Ot|0)&Ot|~Ht&jt)+Nt[2]+606105819|0)<<17|Dt>>>15)+Ht|0)&Ht|~Dt&Ot)+Nt[3]-1044525330|0)<<22|jt>>>10)+Dt|0,jt=((jt+=((Dt=((Dt+=((Ht=((Ht+=((Ot=((Ot+=(jt&Dt|~jt&Ht)+Nt[4]-176418897|0)<<7|Ot>>>25)+jt|0)&jt|~Ot&Dt)+Nt[5]+1200080426|0)<<12|Ht>>>20)+Ot|0)&Ot|~Ht&jt)+Nt[6]-1473231341|0)<<17|Dt>>>15)+Ht|0)&Ht|~Dt&Ot)+Nt[7]-45705983|0)<<22|jt>>>10)+Dt|0,jt=((jt+=((Dt=((Dt+=((Ht=((Ht+=((Ot=((Ot+=(jt&Dt|~jt&Ht)+Nt[8]+1770035416|0)<<7|Ot>>>25)+jt|0)&jt|~Ot&Dt)+Nt[9]-1958414417|0)<<12|Ht>>>20)+Ot|0)&Ot|~Ht&jt)+Nt[10]-42063|0)<<17|Dt>>>15)+Ht|0)&Ht|~Dt&Ot)+Nt[11]-1990404162|0)<<22|jt>>>10)+Dt|0,jt=((jt+=((Dt=((Dt+=((Ht=((Ht+=((Ot=((Ot+=(jt&Dt|~jt&Ht)+Nt[12]+1804603682|0)<<7|Ot>>>25)+jt|0)&jt|~Ot&Dt)+Nt[13]-40341101|0)<<12|Ht>>>20)+Ot|0)&Ot|~Ht&jt)+Nt[14]-1502002290|0)<<17|Dt>>>15)+Ht|0)&Ht|~Dt&Ot)+Nt[15]+1236535329|0)<<22|jt>>>10)+Dt|0,jt=((jt+=((Dt=((Dt+=((Ht=((Ht+=((Ot=((Ot+=(jt&Ht|Dt&~Ht)+Nt[1]-165796510|0)<<5|Ot>>>27)+jt|0)&Dt|jt&~Dt)+Nt[6]-1069501632|0)<<9|Ht>>>23)+Ot|0)&jt|Ot&~jt)+Nt[11]+643717713|0)<<14|Dt>>>18)+Ht|0)&Ot|Ht&~Ot)+Nt[0]-373897302|0)<<20|jt>>>12)+Dt|0,jt=((jt+=((Dt=((Dt+=((Ht=((Ht+=((Ot=((Ot+=(jt&Ht|Dt&~Ht)+Nt[5]-701558691|0)<<5|Ot>>>27)+jt|0)&Dt|jt&~Dt)+Nt[10]+38016083|0)<<9|Ht>>>23)+Ot|0)&jt|Ot&~jt)+Nt[15]-660478335|0)<<14|Dt>>>18)+Ht|0)&Ot|Ht&~Ot)+Nt[4]-405537848|0)<<20|jt>>>12)+Dt|0,jt=((jt+=((Dt=((Dt+=((Ht=((Ht+=((Ot=((Ot+=(jt&Ht|Dt&~Ht)+Nt[9]+568446438|0)<<5|Ot>>>27)+jt|0)&Dt|jt&~Dt)+Nt[14]-1019803690|0)<<9|Ht>>>23)+Ot|0)&jt|Ot&~jt)+Nt[3]-187363961|0)<<14|Dt>>>18)+Ht|0)&Ot|Ht&~Ot)+Nt[8]+1163531501|0)<<20|jt>>>12)+Dt|0,jt=((jt+=((Dt=((Dt+=((Ht=((Ht+=((Ot=((Ot+=(jt&Ht|Dt&~Ht)+Nt[13]-1444681467|0)<<5|Ot>>>27)+jt|0)&Dt|jt&~Dt)+Nt[2]-51403784|0)<<9|Ht>>>23)+Ot|0)&jt|Ot&~jt)+Nt[7]+1735328473|0)<<14|Dt>>>18)+Ht|0)&Ot|Ht&~Ot)+Nt[12]-1926607734|0)<<20|jt>>>12)+Dt|0,jt=((jt+=((Dt=((Dt+=((Ht=((Ht+=((Ot=((Ot+=(jt^Dt^Ht)+Nt[5]-378558|0)<<4|Ot>>>28)+jt|0)^jt^Dt)+Nt[8]-2022574463|0)<<11|Ht>>>21)+Ot|0)^Ot^jt)+Nt[11]+1839030562|0)<<16|Dt>>>16)+Ht|0)^Ht^Ot)+Nt[14]-35309556|0)<<23|jt>>>9)+Dt|0,jt=((jt+=((Dt=((Dt+=((Ht=((Ht+=((Ot=((Ot+=(jt^Dt^Ht)+Nt[1]-1530992060|0)<<4|Ot>>>28)+jt|0)^jt^Dt)+Nt[4]+1272893353|0)<<11|Ht>>>21)+Ot|0)^Ot^jt)+Nt[7]-155497632|0)<<16|Dt>>>16)+Ht|0)^Ht^Ot)+Nt[10]-1094730640|0)<<23|jt>>>9)+Dt|0,jt=((jt+=((Dt=((Dt+=((Ht=((Ht+=((Ot=((Ot+=(jt^Dt^Ht)+Nt[13]+681279174|0)<<4|Ot>>>28)+jt|0)^jt^Dt)+Nt[0]-358537222|0)<<11|Ht>>>21)+Ot|0)^Ot^jt)+Nt[3]-722521979|0)<<16|Dt>>>16)+Ht|0)^Ht^Ot)+Nt[6]+76029189|0)<<23|jt>>>9)+Dt|0,jt=((jt+=((Dt=((Dt+=((Ht=((Ht+=((Ot=((Ot+=(jt^Dt^Ht)+Nt[9]-640364487|0)<<4|Ot>>>28)+jt|0)^jt^Dt)+Nt[12]-421815835|0)<<11|Ht>>>21)+Ot|0)^Ot^jt)+Nt[15]+530742520|0)<<16|Dt>>>16)+Ht|0)^Ht^Ot)+Nt[2]-995338651|0)<<23|jt>>>9)+Dt|0,jt=((jt+=((Ht=((Ht+=(jt^((Ot=((Ot+=(Dt^(jt|~Ht))+Nt[0]-198630844|0)<<6|Ot>>>26)+jt|0)|~Dt))+Nt[7]+1126891415|0)<<10|Ht>>>22)+Ot|0)^((Dt=((Dt+=(Ot^(Ht|~jt))+Nt[14]-1416354905|0)<<15|Dt>>>17)+Ht|0)|~Ot))+Nt[5]-57434055|0)<<21|jt>>>11)+Dt|0,jt=((jt+=((Ht=((Ht+=(jt^((Ot=((Ot+=(Dt^(jt|~Ht))+Nt[12]+1700485571|0)<<6|Ot>>>26)+jt|0)|~Dt))+Nt[3]-1894986606|0)<<10|Ht>>>22)+Ot|0)^((Dt=((Dt+=(Ot^(Ht|~jt))+Nt[10]-1051523|0)<<15|Dt>>>17)+Ht|0)|~Ot))+Nt[1]-2054922799|0)<<21|jt>>>11)+Dt|0,jt=((jt+=((Ht=((Ht+=(jt^((Ot=((Ot+=(Dt^(jt|~Ht))+Nt[8]+1873313359|0)<<6|Ot>>>26)+jt|0)|~Dt))+Nt[15]-30611744|0)<<10|Ht>>>22)+Ot|0)^((Dt=((Dt+=(Ot^(Ht|~jt))+Nt[6]-1560198380|0)<<15|Dt>>>17)+Ht|0)|~Ot))+Nt[13]+1309151649|0)<<21|jt>>>11)+Dt|0,jt=((jt+=((Ht=((Ht+=(jt^((Ot=((Ot+=(Dt^(jt|~Ht))+Nt[4]-145523070|0)<<6|Ot>>>26)+jt|0)|~Dt))+Nt[11]-1120210379|0)<<10|Ht>>>22)+Ot|0)^((Dt=((Dt+=(Ot^(Ht|~jt))+Nt[2]+718787259|0)<<15|Dt>>>17)+Ht|0)|~Ot))+Nt[9]-343485551|0)<<21|jt>>>11)+Dt|0,Wt[0]=Ot+Wt[0]|0,Wt[1]=jt+Wt[1]|0,Wt[2]=Dt+Wt[2]|0,Wt[3]=Ht+Wt[3]|0}function Pt(Wt){var Nt,Ot=[];for(Nt=0;Nt<64;Nt+=4)Ot[Nt>>2]=Wt.charCodeAt(Nt)+(Wt.charCodeAt(Nt+1)<<8)+(Wt.charCodeAt(Nt+2)<<16)+(Wt.charCodeAt(Nt+3)<<24);return Ot}function Lt(Wt){var Nt,Ot=[];for(Nt=0;Nt<64;Nt+=4)Ot[Nt>>2]=Wt[Nt]+(Wt[Nt+1]<<8)+(Wt[Nt+2]<<16)+(Wt[Nt+3]<<24);return Ot}function Tt(Wt){var Nt,Ot,jt,Dt,Ht,on,tn=Wt.length,rn=[1732584193,-271733879,-1732584194,271733878];for(Nt=64;Nt<=tn;Nt+=64)Mt(rn,Pt(Wt.substring(Nt-64,Nt)));for(Ot=(Wt=Wt.substring(Nt-64)).length,jt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Nt=0;Nt<Ot;Nt+=1)jt[Nt>>2]|=Wt.charCodeAt(Nt)<<(Nt%4<<3);if(jt[Nt>>2]|=128<<(Nt%4<<3),Nt>55)for(Mt(rn,jt),Nt=0;Nt<16;Nt+=1)jt[Nt]=0;return Dt=(Dt=8*tn).toString(16).match(/(.*?)(.{0,8})$/),Ht=parseInt(Dt[2],16),on=parseInt(Dt[1],16)||0,jt[14]=Ht,jt[15]=on,Mt(rn,jt),rn}function qt(Wt){var Nt,Ot,jt,Dt,Ht,on,tn=Wt.length,rn=[1732584193,-271733879,-1732584194,271733878];for(Nt=64;Nt<=tn;Nt+=64)Mt(rn,Lt(Wt.subarray(Nt-64,Nt)));for(Ot=(Wt=Nt-64<tn?Wt.subarray(Nt-64):new Uint8Array(0)).length,jt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Nt=0;Nt<Ot;Nt+=1)jt[Nt>>2]|=Wt[Nt]<<(Nt%4<<3);if(jt[Nt>>2]|=128<<(Nt%4<<3),Nt>55)for(Mt(rn,jt),Nt=0;Nt<16;Nt+=1)jt[Nt]=0;return Dt=(Dt=8*tn).toString(16).match(/(.*?)(.{0,8})$/),Ht=parseInt(Dt[2],16),on=parseInt(Dt[1],16)||0,jt[14]=Ht,jt[15]=on,Mt(rn,jt),rn}function Xt(Wt){var Nt,Ot="";for(Nt=0;Nt<4;Nt+=1)Ot+=It[Wt>>8*Nt+4&15]+It[Wt>>8*Nt&15];return Ot}function Vt(Wt){var Nt;for(Nt=0;Nt<Wt.length;Nt+=1)Wt[Nt]=Xt(Wt[Nt]);return Wt.join("")}function Yt(Wt){return/[\u0080-\uFFFF]/.test(Wt)&&(Wt=unescape(encodeURIComponent(Wt))),Wt}function Qt(Wt,Nt){var Ot,jt=Wt.length,Dt=new ArrayBuffer(jt),Ht=new Uint8Array(Dt);for(Ot=0;Ot<jt;Ot+=1)Ht[Ot]=Wt.charCodeAt(Ot);return Nt?Ht:Dt}function nn(Wt){return String.fromCharCode.apply(null,new Uint8Array(Wt))}function cn(Wt,Nt,Ot){var jt=new Uint8Array(Wt.byteLength+Nt.byteLength);return jt.set(new Uint8Array(Wt)),jt.set(new Uint8Array(Nt),Wt.byteLength),Ot?jt:jt.buffer}function ln(Wt){var Nt,Ot=[],jt=Wt.length;for(Nt=0;Nt<jt-1;Nt+=2)Ot.push(parseInt(Wt.substr(Nt,2),16));return String.fromCharCode.apply(String,Ot)}function sn(){this.reset()}return Vt(Tt("hello")),typeof ArrayBuffer=="undefined"||ArrayBuffer.prototype.slice||function(){function Wt(Nt,Ot){return(Nt=0|Nt||0)<0?Math.max(Nt+Ot,0):Math.min(Nt,Ot)}ArrayBuffer.prototype.slice=function(Nt,Ot){var jt,Dt,Ht,on,tn=this.byteLength,rn=Wt(Nt,tn),hn=tn;return Ot!==_t&&(hn=Wt(Ot,tn)),rn>hn?new ArrayBuffer(0):(jt=hn-rn,Dt=new ArrayBuffer(jt),Ht=new Uint8Array(Dt),on=new Uint8Array(this,rn,jt),Ht.set(on),Dt)}}(),sn.prototype.append=function(Wt){return this.appendBinary(Yt(Wt)),this},sn.prototype.appendBinary=function(Wt){this._buff+=Wt,this._length+=Wt.length;var Nt,Ot=this._buff.length;for(Nt=64;Nt<=Ot;Nt+=64)Mt(this._hash,Pt(this._buff.substring(Nt-64,Nt)));return this._buff=this._buff.substring(Nt-64),this},sn.prototype.end=function(Wt){var Nt,Ot,jt=this._buff,Dt=jt.length,Ht=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(Nt=0;Nt<Dt;Nt+=1)Ht[Nt>>2]|=jt.charCodeAt(Nt)<<(Nt%4<<3);return this._finish(Ht,Dt),Ot=Vt(this._hash),Wt&&(Ot=ln(Ot)),this.reset(),Ot},sn.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},sn.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},sn.prototype.setState=function(Wt){return this._buff=Wt.buff,this._length=Wt.length,this._hash=Wt.hash,this},sn.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},sn.prototype._finish=function(Wt,Nt){var Ot,jt,Dt,Ht=Nt;if(Wt[Ht>>2]|=128<<(Ht%4<<3),Ht>55)for(Mt(this._hash,Wt),Ht=0;Ht<16;Ht+=1)Wt[Ht]=0;Ot=(Ot=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),jt=parseInt(Ot[2],16),Dt=parseInt(Ot[1],16)||0,Wt[14]=jt,Wt[15]=Dt,Mt(this._hash,Wt)},sn.hash=function(Wt,Nt){return sn.hashBinary(Yt(Wt),Nt)},sn.hashBinary=function(Wt,Nt){var Ot=Vt(Tt(Wt));return Nt?ln(Ot):Ot},sn.ArrayBuffer=function(){this.reset()},sn.ArrayBuffer.prototype.append=function(Wt){var Nt,Ot=cn(this._buff.buffer,Wt,!0),jt=Ot.length;for(this._length+=Wt.byteLength,Nt=64;Nt<=jt;Nt+=64)Mt(this._hash,Lt(Ot.subarray(Nt-64,Nt)));return this._buff=Nt-64<jt?new Uint8Array(Ot.buffer.slice(Nt-64)):new Uint8Array(0),this},sn.ArrayBuffer.prototype.end=function(Wt){var Nt,Ot,jt=this._buff,Dt=jt.length,Ht=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(Nt=0;Nt<Dt;Nt+=1)Ht[Nt>>2]|=jt[Nt]<<(Nt%4<<3);return this._finish(Ht,Dt),Ot=Vt(this._hash),Wt&&(Ot=ln(Ot)),this.reset(),Ot},sn.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},sn.ArrayBuffer.prototype.getState=function(){var Wt=sn.prototype.getState.call(this);return Wt.buff=nn(Wt.buff),Wt},sn.ArrayBuffer.prototype.setState=function(Wt){return Wt.buff=Qt(Wt.buff,!0),sn.prototype.setState.call(this,Wt)},sn.ArrayBuffer.prototype.destroy=sn.prototype.destroy,sn.ArrayBuffer.prototype._finish=sn.prototype._finish,sn.ArrayBuffer.hash=function(Wt,Nt){var Ot=Vt(qt(new Uint8Array(Wt)));return Nt?ln(Ot):Ot},sn}();const l=[],h=class{static addHandler(_t,It,Mt){_t.addEventListener?_t.addEventListener(It,Mt,!1):_t.attachEvent?_t.attachEvent("on"+It,Mt):_t["on"+It]=Mt}static windowResizeHandler(_t){h.addHandler(window,"resize",_t)}static fullscreenEnabled(){const _t=window.document;return document.fullscreenEnabled||window.fullScreen||_t.mozFullscreenEnabled||_t.webkitIsFullScreen}static fullScreen(_t,It){if(It){const Mt=window.document;let Pt=window.document.exitFullscreen||Mt.msExitFullscreen||Mt.mozCancelFullScreen||Mt.webkitCancelFullScreen;if(Pt!==void 0&&Pt)Pt.call(window.document);else if(window.ActiveXObject!==void 0){let Lt=new window.ActiveXObject("WScript.Shell");Lt!=null&&Lt.SendKeys("{F11}")}}else{let Mt=_t.requestFullScreen||_t.webkitRequestFullScreen||_t.mozRequestFullScreen||_t.msRequestFullScreen;if(Mt!==void 0&&Mt)Mt.call(_t);else if(window.ActiveXObject!==void 0){let Pt=new window.ActiveXObject("WScript.Shell");Pt!=null&&Pt.SendKeys("{F11}")}}}static requestFullScreen(_t){var It=_t.requestFullScreen||_t.webkitRequestFullScreen||_t.mozRequestFullScreen||_t.msRequestFullScreen;if(It)It.call(_t);else if(window.ActiveXObject!==void 0){var Mt=new window.ActiveXObject("WScript.Shell");Mt!==null&&Mt.SendKeys("{F11}")}}static exitFullScreen(){const _t=window.document;var It=document.exitFullscreen||_t.mozCancelFullScreen||_t.webkitExitFullscreen||_t.webkitExitFullscreen;if(It)It.call(document);else if(window.ActiveXObject!==void 0){var Mt=new window.ActiveXObject("WScript.Shell");Mt!==null&&Mt.SendKeys("{F11}")}}static fullScreenElement(){return window.document.fullscreenElement||window.document.webkitFullscreenElement||window.document.mozFullscreenElement||window.document.msFullscreenElement}static isFullScreen(){return!!h.fullScreenElement()}static onFullScreenChanged(_t){let It;"onfullscreenchange"in window.document?It="fullscreenchange":"onwebkitfullscreenchange"in window.document?It="webkitfullscreenchange":"onmozfullscreenchange"in window.document&&(It="mozfullscreenchange"),It?document.addEventListener(It,function(){const Mt=h.isFullScreen();_t(Mt)}):document.addEventListener("MSFullscreenChange",function(){const Mt=h.isFullScreen();_t(Mt)})}static stringifyCircularHandler(_t,It){if(typeof It=="object"&&It!==null){if(l.indexOf(It)!==-1)return;l.push(It)}return It}static jsonStringify(_t){if(!_t)return"";const It=JSON.stringify(_t,h.stringifyCircularHandler);return l.length=0,It}static jsonParse(_t){const It=h.jsonStringify(_t);if(It.length>1)return JSON.parse(It)}static getObjectURL(_t){let It;const Mt=window;return Mt.createObjcectURL!=null?It=Mt.createOjcectURL(_t):window.URL!=null?It=window.URL.createObjectURL(_t):window.webkitURL!=null&&(It=window.webkitURL.createObjectURL(_t)),It}static getFileShortMD5(_t,It){const Mt=File.prototype,Pt=Mt.slice||Mt.mozSlice||Mt.webkitSlice,Lt=_t,Tt=new u.ArrayBuffer,qt=new FileReader;qt.onload=function(Xt){Tt.append(Xt.target?.result);const Vt=Tt.end();It({isOK:!0,data:Vt})},qt.onerror=function(){const Xt="\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01";console.warn(Xt),It({isOK:!1,data:Xt})},function(){const Xt=2097152>=Lt.size?Lt.size:2097152;qt.readAsArrayBuffer(Pt.call(Lt,0,Xt))}()}static MD5(_t,It=!1){return u.hash(_t,It)}};let d=h;d.copyText=_t=>new Promise((It,Mt)=>{const Pt=document.createElement("input");Pt.value=_t,document.body.appendChild(Pt),Pt.select(),document.execCommand("copy"),Pt.remove(),It(!0)});class p{static toHump(It){return It.replace(/[\-\/\_](\w)/g,(Mt,Pt)=>Pt.toUpperCase()).replace("views","")}}p.isNullOrEmpty=_t=>_t===null||_t===""||_t===void 0||_t.length===0,p.isNotEmpty=_t=>_t!==null&&_t!==""&&_t!==void 0&&_t.length!==0;class f{constructor(It="",Mt=localStorage){this.prefixKey=It,this.storage=Mt}getKey(It){return`${this.prefixKey}${It}`.toUpperCase()}set(It,Mt,Pt=604800){const Lt=JSON.stringify({value:Mt,expire:Pt!==null?new Date().getTime()+1e3*Pt:null});this.storage.setItem(this.getKey(It),Lt)}get(It,Mt=null){const Pt=this.storage.getItem(this.getKey(It));if(Pt)try{const Lt=JSON.parse(Pt),{value:Tt,expire:qt}=Lt;if(qt===null||qt>=Date.now())return Tt;this.remove(this.getKey(It))}catch{return Mt}return Mt}remove(It){this.storage.removeItem(this.getKey(It))}clear(){this.storage.clear()}setCookie(It,Mt,Pt=604800){document.cookie=`${this.getKey(It)}=${Mt}; Max-Age=${Pt}`}getCookie(It){const Mt=document.cookie.split("; ");for(let Pt=0,Lt=Mt.length;Pt<Lt;Pt++){const Tt=Mt[Pt].split("=");if(Tt[0]===this.getKey(It))return Tt[1]}return""}removeCookie(It){this.setCookie(It,1,-1)}clearCookie(){const It=document.cookie.match(/[^ =;]+(?==)/g);if(It)for(let Mt=It.length;Mt--;)document.cookie=It[Mt]+"=0;expire="+new Date(0).toUTCString()}}const m=new f("",localStorage);function v(){let _t=[];const It="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(var Mt=0;Mt<36;Mt++)_t[Mt]=It.substr(Math.floor(16*Math.random()),1);return _t[14]="4",_t[19]=It.substr(3&Number(_t[19])|8,1),_t[8]=_t[13]=_t[18]=_t[23]="-",_t.join("")}var g;function y(_t,It,Mt){return Mt<0&&(Mt+=1),Mt>1&&(Mt-=1),Mt<1/6?_t+6*(It-_t)*Mt:Mt<.5?It:Mt<2/3?_t+(It-_t)*(2/3-Mt)*6:_t}function w(_t){return/^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/.test(_t)}function b(_t){let It=_t.toLowerCase();if(w(_t)){if(It.length===4){let Pt="#";for(let Lt=1;Lt<4;Lt+=1)Pt+=It.slice(Lt,Lt+1).concat(It.slice(Lt,Lt+1));It=Pt}const Mt=[];for(let Pt=1;Pt<7;Pt+=2)Mt.push(parseInt("0x"+It.slice(Pt,Pt+2)));return"RGB("+Mt.join(",")+")"}return It}function x(_t,It){const Mt=parseInt(_t,16)+It,Pt=Mt>255?255:Mt;return Pt.toString(16).length>1?Pt.toString(16):`0${Pt.toString(16)}`}function S(_t,It,Mt){const Pt=[_t,It,Mt].map(Lt=>(Lt/=255)<=.03928?Lt/12.92:Math.pow((Lt+.055)/1.055,2.4));return .2126*Pt[0]+.7152*Pt[1]+.0722*Pt[2]}function C(_t,It){const Mt=parseInt(_t,16)-It,Pt=Mt<0?0:Mt;return Pt.toString(16).length>1?Pt.toString(16):`0${Pt.toString(16)}`}function E(_t){return{all:_t=_t||new Map,on(It,Mt){const Pt=_t?.get(It);Pt&&Pt.push(Mt)||_t?.set(It,[Mt])},off(It,Mt){const Pt=_t?.get(It);Pt&&Pt.splice(Pt.indexOf(Mt)>>>0,1)},emit(It,Mt){(_t?.get(It)||[]).slice().map(Pt=>{Pt(Mt)}),(_t?.get("*")||[]).slice().map(Pt=>{Pt(It,Mt)})}}}exports.EnumColor=void 0,(g=exports.EnumColor||(exports.EnumColor={}))[g.RGBA=0]="RGBA",g[g.Hex=1]="Hex",g[g.Hsla=2]="Hsla";const k=E(),z={HproseServiceErrorEvent:"HproseServiceError",WebAPIErrorEvent:"WebAPIError",AlertInfoEvent:"AlertInfoEvent",CommonWarnEvent:"CommonWarnEvent"},_=(_t,It)=>{const Mt=document.createElement("a");Mt.download=It,Mt.style.display="none";const Pt=new Blob([_t],{type:"application/octet-stream"});Mt.href=URL.createObjectURL(Pt),document.body.appendChild(Mt),Mt.click(),document.body.removeChild(Mt)};function I(_t){const It=_t.lastIndexOf("/")+1;let Mt=_t.substring(It);return Mt=decodeURI(Mt.split("?")[0]),Mt}class P{constructor(It){if(It&&!p.isNullOrEmpty(It)){if(P.httpTransport||(P.httpTransport=new i.HttpTransport),this.client=new t.Client(It),!this.client)throw Error("Hprose Client\u521D\u59CB\u5316\u9519\u8BEF");this.hproseURL=It,this.init()}}init(){this.client&&this.client.useServiceAsync().then(It=>{this.hproseProxy=It}).catch(It=>{String(It).indexOf("find this method ~")>0?(this.hproseProxy=this.client?.useService(),console.warn("\u65E7\u7248\u672C\u4E0D\u652F\u6301useServiceAsync")):k.emit(z.HproseServiceErrorEvent,"\u521D\u59CB\u5316\u9ED8\u8BA4Hprose!"),console.warn(It)})}async getProxy(){if(!this.hproseProxy)try{this.client&&(this.hproseProxy=await this.client.useServiceAsync())}catch(It){console.warn(It),this.hproseProxy=this.client?.useService()}return this.hproseProxy}async invoke(It,Mt,Pt){if(this.client)return await this.client.invoke(It,Mt,Pt)}encode(It,Mt,Pt){return this.client?this.client.codec.encode(It,Mt,Pt):void 0}decode(It,Mt){return this.client?this.client.codec.decode(It,Mt):void 0}}class M{constructor(It){this.hproseClient=new P(It),this.hpProxyObj=null,this.defaultContext=new t.ClientContext}getClientContext(){return null}async getHproseProxy(){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");if(!this.hpProxyObj){const It=await this.hproseClient.getProxy();this.hpProxyObj=It}return this.hpProxyObj||k.emit(z.HproseServiceErrorEvent,"HproseProxy\u5BF9\u8C61\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5\uFF01"),this.hpProxyObj}async hproseInvoke(It,Mt){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");let Pt;return Pt=new t.ClientContext,await this.hproseClient.invoke(It,Mt,Pt)}async hproseInvokeContext(It,Mt,...Pt){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");return await this.hproseClient.invoke(It,Pt,Mt)}async hproseInvokeEncode(It){const Mt=new n.ByteStream(It).toBytes(),Pt=await this.hproseClient.client?.request(Mt,this.defaultContext);return Pt&&this.hproseClient.client?.codec.decode(Pt,this.defaultContext)}encodeRequest(It,...Mt){const Pt=this.hproseClient.client?.codec?.encode(It,Mt,this.defaultContext);return n.ByteStream.toString(Pt)}}class R{constructor(It,Mt){It&&(this.message=It),Mt&&(this.eventBus=Mt)}msg(It,Mt=3,Pt="success"){if(this.message)if(typeof this.message=="function")this.message({type:Pt,message:It,duration:Mt});else switch(Pt){case"info":this.message.info(It,Mt);break;case"success":this.message.success(It,Mt);break;case"warning":this.message.warn(It,Mt);break;case"error":this.message.error(It,Mt)}else{switch(Pt){case"info":case"success":console.log(It);break;case"warning":console.warn(It);break;case"error":Pt="dark",console.error(It)}this.eventBus&&this.eventBus.emit(z.AlertInfoEvent,{type:Pt,info:It})}}info(It,Mt=3){this.msg(It,Mt,"info")}warn(It,Mt=3){this.msg(It,Mt,"warning")}err(It,Mt=3){this.msg(It,Mt,"error")}}const A=new Map,B={Config:SysConfig,EventBus:k,DefaultProxyClient:null,Axios:void 0},L=function(_t,It,Mt){Mt?B.Config.DefaultHproseAPI=Mt:!B.Config.DefaultHproseAPI&&B.Config.ServiceURL&&(B.Config.DefaultHproseAPI=B.Config.ServiceURL.DefaultHproseAPI),It&&(B.Axios=It),B.Config.DefaultHproseAPI&&p.isNotEmpty(B.Config.DefaultHproseAPI)&&(B.DefaultProxyClient=new M(B.Config.DefaultHproseAPI));const Pt=new R(_t,B.EventBus);B.Message=Pt,B.EventBus.on(z.HproseServiceErrorEvent,Lt=>{const Tt=`\u5F53\u524D\u540E\u53F0\u4E1A\u52A1\u670D\u52A1\u4E0D\u53EF\u7528!${Lt}`;Pt.warn(Tt)}),B.EventBus.on(z.WebAPIErrorEvent,Lt=>{const Tt=`WebAPI\u540E\u53F0\u670D\u52A1\u4E0D\u53EF\u7528!${Lt}`;Pt.warn(Tt)}),B.EventBus.on(z.CommonWarnEvent,Lt=>{Pt.warn(Lt)})};function N(_t){if(_t&&p.isNotEmpty(_t)){if(A.has(_t))return A.get(_t);{const It=new M(_t);return A.set(_t,It),It}}}const D=new f("user",localStorage);function T(){return D.get("access_token")}function O(){D.remove("access_token"),B.User&&delete B.User}function j(){return T()?.refresh}function U(_t,It,Mt,Pt="json",Lt){const Tt={baseURL:B.Config.ServiceURL.DefaultWebAPI,timeout:6e4,params:_t,headers:{"Content-Type":"application/json",Authorization:"bearer "+T()?.token},responseType:Pt,cancelToken:Lt};if(Mt)for(let qt in Mt)Tt.headers[qt]=Mt[qt];return It&&(Tt.baseURL=It),Tt}function F(_t,It,Mt,Pt,Lt="json",Tt){const qt=U(Mt,It,Pt,Lt,Tt);return B.Axios?.get(_t,qt).catch(function(Xt){console.log(Xt),B.Message?.err("\u670D\u52A1Get\u8BF7\u6C42\u9519\u8BEF\uFF1A"+_t)})}function $(_t,It,Mt,Pt,Lt,Tt="json"){const qt=U(Pt,It,Lt,Tt),Xt=function(Vt){let Yt=new FormData;return Vt&&Object.keys(Vt).forEach(Qt=>{if(!Vt)return;let nn=Vt[Qt];var cn;nn!=null&&Yt.append(Qt,(cn=nn)instanceof Blob?cn:cn.toString())}),Yt}(Mt);return B.Axios?.post(_t,Xt,qt).catch(function(Vt){console.log(Vt),B.Message?.err("\u670D\u52A1Post\u8BF7\u6C42\u9519\u8BEF\uFF1A"+_t)})}var H={exports:{}},q=typeof window!="undefined"?window:s!==void 0?s:typeof self!="undefined"?self:{},W=function(_t){if(!_t)return!1;var It=X.call(_t);return It==="[object Function]"||typeof _t=="function"&&It!=="[object RegExp]"||typeof window!="undefined"&&(_t===window.setTimeout||_t===window.alert||_t===window.confirm||_t===window.prompt)},X=Object.prototype.toString,G=function(_t){return _t.replace(/^\s+|\s+$/g,"")},V=function(){for(var _t={},It=0;It<arguments.length;It++){var Mt=arguments[It];for(var Pt in Mt)K.call(Mt,Pt)&&(_t[Pt]=Mt[Pt])}return _t},K=Object.prototype.hasOwnProperty,Y=q,J=W,Z=function(_t){if(!_t)return{};for(var It,Mt={},Pt=G(_t).split(`
|
|
2
|
-
`),Lt=0;Lt<Pt.length;Lt++){var Tt=Pt[Lt],qt=Tt.indexOf(":"),Xt=G(Tt.slice(0,qt)).toLowerCase(),Vt=G(Tt.slice(qt+1));Mt[Xt]===void 0?Mt[Xt]=Vt:(It=Mt[Xt],Object.prototype.toString.call(It)==="[object Array]"?Mt[Xt].push(Vt):Mt[Xt]=[Mt[Xt],Vt])}return Mt},Q=V;function ee(_t,It,Mt){var Pt=_t;return J(It)?(Mt=It,typeof _t=="string"&&(Pt={uri:_t})):Pt=Q(It,{uri:_t}),Pt.callback=Mt,Pt}function te(_t,It,Mt){return ne(It=ee(_t,It,Mt))}function ne(_t){if(_t.callback===void 0)throw new Error("callback argument missing");var It=!1,Mt=function(Ot,jt,Dt){It||(It=!0,_t.callback(Ot,jt,Dt))};function Pt(){var Ot=void 0;if(Ot=Vt.response?Vt.response:Vt.responseText||function(jt){try{if(jt.responseType==="document")return jt.responseXML;var Dt=jt.responseXML&&jt.responseXML.documentElement.nodeName==="parsererror";if(jt.responseType===""&&!Dt)return jt.responseXML}catch{}return null}(Vt),Wt)try{Ot=JSON.parse(Ot)}catch{}return Ot}function Lt(Ot){return clearTimeout(Yt),Ot instanceof Error||(Ot=new Error(""+(Ot||"Unknown XMLHttpRequest Error"))),Ot.statusCode=0,Mt(Ot,Nt)}function Tt(){if(!Xt){var Ot;clearTimeout(Yt),Ot=_t.useXDR&&Vt.status===void 0?200:Vt.status===1223?204:Vt.status;var jt=Nt,Dt=null;return Ot!==0?(jt={body:Pt(),statusCode:Ot,method:nn,headers:{},url:Qt,rawRequest:Vt},Vt.getAllResponseHeaders&&(jt.headers=Z(Vt.getAllResponseHeaders()))):Dt=new Error("Internal XMLHttpRequest Error"),Mt(Dt,jt,jt.body)}}var qt,Xt,Vt=_t.xhr||null;Vt||(Vt=_t.cors||_t.useXDR?new te.XDomainRequest:new te.XMLHttpRequest);var Yt,Qt=Vt.url=_t.uri||_t.url,nn=Vt.method=_t.method||"GET",cn=_t.body||_t.data,ln=Vt.headers=_t.headers||{},sn=!!_t.sync,Wt=!1,Nt={body:void 0,headers:{},statusCode:0,method:nn,url:Qt,rawRequest:Vt};if("json"in _t&&_t.json!==!1&&(Wt=!0,ln.accept||ln.Accept||(ln.Accept="application/json"),nn!=="GET"&&nn!=="HEAD"&&(ln["content-type"]||ln["Content-Type"]||(ln["Content-Type"]="application/json"),cn=JSON.stringify(_t.json===!0?cn:_t.json))),Vt.onreadystatechange=function(){Vt.readyState===4&&setTimeout(Tt,0)},Vt.onload=Tt,Vt.onerror=Lt,Vt.onprogress=function(){},Vt.onabort=function(){Xt=!0},Vt.ontimeout=Lt,Vt.open(nn,Qt,!sn,_t.username,_t.password),sn||(Vt.withCredentials=!!_t.withCredentials),!sn&&_t.timeout>0&&(Yt=setTimeout(function(){if(!Xt){Xt=!0,Vt.abort("timeout");var Ot=new Error("XMLHttpRequest timeout");Ot.code="ETIMEDOUT",Lt(Ot)}},_t.timeout)),Vt.setRequestHeader)for(qt in ln)ln.hasOwnProperty(qt)&&Vt.setRequestHeader(qt,ln[qt]);else if(_t.headers&&!function(Ot){for(var jt in Ot)if(Ot.hasOwnProperty(jt))return!1;return!0}(_t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in _t&&(Vt.responseType=_t.responseType),"beforeSend"in _t&&typeof _t.beforeSend=="function"&&_t.beforeSend(Vt),Vt.send(cn||null),Vt}H.exports=te,H.exports.default=te,te.XMLHttpRequest=Y.XMLHttpRequest||function(){},te.XDomainRequest="withCredentials"in new te.XMLHttpRequest?te.XMLHttpRequest:Y.XDomainRequest,function(_t,It){for(var Mt=0;Mt<_t.length;Mt++)It(_t[Mt])}(["get","put","post","patch","head","delete"],function(_t){te[_t==="delete"?"del":_t]=function(It,Mt,Pt){return(Mt=ee(It,Mt,Pt)).method=_t.toUpperCase(),ne(Mt)}});var ie=H.exports;const re=[200,201,202,204,308],oe=[408,502,503,504];class se{constructor(It){this.endpoint=It.endpoint,this.file=It.file,this.fileName=encodeURI(this.file.name),this.headers=It.headers||{},this.method=It.method||"PUT",this.chunkSize=It.chunkSize||5120,this.attempts=It.attempts||5,this.delayBeforeAttempt=It.delayBeforeAttempt||1,this.md5=It.md5||"",this.maxFileBytes=1024*(It.maxFileSize||0),this.chunkCount=0,this.chunkByteSize=1024*this.chunkSize,this.totalChunks=Math.ceil(this.file.size/this.chunkByteSize),this.attemptCount=0,this.offline=!1,this.paused=!1,this.success=!1,this.reader=new FileReader,this.eventTarget=E(),this.validateOptions(),this.getEndpoint().then(()=>this.sendChunks()),typeof window!="undefined"&&(window.addEventListener("online",()=>{this.offline&&(this.offline=!1,this.dispatch("online"),this.sendChunks())}),window.addEventListener("offline",()=>{this.offline=!0,this.dispatch("offline")}))}on(It,Mt){this.eventTarget.on(It,Mt)}abort(){this.pause(),this.currentXhr?.abort()}pause(){this.paused=!0}resume(){this.paused&&(this.paused=!1,this.sendChunks())}dispatch(It,Mt){this.eventTarget.emit(It,Mt)}validateOptions(){if(!this.endpoint||typeof this.endpoint!="function"&&typeof this.endpoint!="string")throw new TypeError("endpoint\u5FC5\u987B\u4E3A\uFF1A\u6587\u4EF6\u4E0A\u4F20URL\u5B57\u7B26\u4E32\uFF0C\u6216\u8FD4\u56DE\u5730\u5740\u7684\u51FD\u6570\uFF01");if(!(this.file instanceof File))throw new TypeError("file\u5FC5\u987B\u4E3A\u6587\u4EF6\u5BF9\u8C61");if(this.headers&&typeof this.headers!="object")throw new TypeError("\u6587\u4EF6\u5934\u5FC5\u987B\u4E3A\u5BF9\u8C61\u6216\u7A7A\uFF01");if(this.chunkSize&&(typeof this.chunkSize!="number"||this.chunkSize<=0||this.chunkSize%256!=0))throw new TypeError("chunkSize\u5FC5\u987B\u5927\u4E8E0,\u5E76\u662F256\u7684\u6574\u6570\u500D");if(this.maxFileBytes>0&&this.maxFileBytes<this.file.size)throw new Error(`\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u6700\u5927\u5141\u8BB8\u503C\uFF1A(${this.file.size} > ${this.maxFileBytes})`);if(this.attempts&&(typeof this.attempts!="number"||this.attempts<=0))throw new TypeError("\u91CD\u8BD5\u6B21\u6570\u5FC5\u987B\u4E3A\u6B63\u6570\uFF01");if(this.delayBeforeAttempt&&(typeof this.delayBeforeAttempt!="number"||this.delayBeforeAttempt<0))throw new TypeError("\u5EF6\u65F6\u91CD\u8BD5\u65F6\u95F4\u5FC5\u987B\u4E3A\u6B63\u6570\uFF01\u9ED8\u8BA4\u4E3A1")}getEndpoint(){return typeof this.endpoint=="string"?(this.endpointValue=this.endpoint,Promise.resolve(this.endpoint)):this.endpoint(this.file).then(It=>(this.endpointValue=It,this.endpointValue))}getChunk(){return new Promise(It=>{const Mt=this.totalChunks===1?this.file.size:this.chunkByteSize,Pt=Mt*this.chunkCount;this.reader.onload=()=>{this.reader.result!==null&&(this.chunk=new Blob([this.reader.result],{type:"application/octet-stream"})),It(()=>{})},this.reader.readAsArrayBuffer(this.file.slice(Pt,Pt+Mt))})}xhrPromise(It){const Mt=Pt=>{Pt.upload.onprogress=Lt=>{const Tt=100/this.totalChunks,qt=Tt*this.file.size,Xt=Tt*this.chunkCount,Vt=Lt.loaded/(Lt.total??qt)*Tt;this.dispatch("progress",Math.min(Xt+Vt,100))}};return new Promise((Pt,Lt)=>{this.currentXhr=ie({...It,beforeSend:Mt},(Tt,qt)=>(this.currentXhr=void 0,Tt?Lt(Tt):Pt(qt)))})}sendChunk(){if(!this.chunk)return;const It=this.chunkCount*this.chunkByteSize,Mt=It+this.chunk.size-1,Pt={...this.headers,FileName:this.fileName,FileMD5:this.md5,"Content-Type":this.file.type,"Content-Range":`bytes ${It}-${Mt}/${this.file.size}`};if(this.dispatch("attempt",{chunkNumber:this.chunkCount,chunkSize:this.chunk.size}),this.endpointValue)return this.xhrPromise({headers:Pt,url:this.endpointValue,method:this.method,body:this.chunk});console.warn("\u6587\u4EF6\u4E0A\u4F20endpointValue\u4E0D\u80FD\u4E3A\u7A7A\uFF01"),this.dispatch("error",{message:"\u6587\u4EF6\u4E0A\u4F20endpointValue\u4E0D\u80FD\u4E3A\u7A7A\uFF01\u53D6\u6D88\u4E0A\u4F20\uFF01",chunk:this.chunkCount,attempts:this.attemptCount})}manageRetries(){if(this.attemptCount<this.attempts)return setTimeout(()=>this.sendChunks(),1e3*this.delayBeforeAttempt),void this.dispatch("attemptFailure",{message:`\u4E0A\u4F20\u5206\u7247\uFF1A${this.chunkCount}\u5931\u8D25\u3002\u8FD8\u4F1A\u518D\u5C1D\u8BD5 ${this.attempts-this.attemptCount}\u6B21\uFF01`,chunkNumber:this.chunkCount,attemptsLeft:this.attempts-this.attemptCount});this.dispatch("error",{message:`\u4E0A\u4F20\u5206\u7247\u9519\u8BEF\uFF1A ${this.chunkCount}\u3002\u505C\u6B62\u5C1D\u8BD5\uFF0C\u53D6\u6D88\u4E0A\u4F20\uFF01`,chunk:this.chunkCount,attempts:this.attemptCount})}sendChunks(){this.paused||this.offline||this.success||this.getChunk().then(()=>this.sendChunk()).then(It=>{if(this.attemptCount=this.attemptCount+1,It!=null&&re.includes(It.statusCode)){this.dispatch("chunkSuccess",{chunk:this.chunkCount,attempts:this.attemptCount,response:It}),this.attemptCount=0,this.chunkCount=this.chunkCount+1,this.chunkCount<this.totalChunks?this.sendChunks():(this.success=!0,this.dispatch("success"));const Mt=100*(this.chunkCount/this.totalChunks*this.file.size)/this.file.size;this.dispatch("progress",Mt)}else if(It!=null&&oe.includes(It.statusCode)){if(this.paused||this.offline)return;this.manageRetries()}else{if(this.paused||this.offline)return;this.dispatch("error",{message:`\u670D\u52A1\u5668\u9519\u8BEF:${It?.statusCode}\uFF0C\u505C\u6B62\u4E0A\u4F20\u3002`,chunkNumber:this.chunkCount,attempts:this.attemptCount})}}).catch(It=>{this.paused||this.offline||this.manageRetries()})}}const ae=new class{hasClass(_t,It){return _t.className.match(new RegExp("(\\s|^)"+It+"(\\s|$)"))}addClass(_t,It){this.hasClass(_t,It)||(_t.className+=" "+It)}removeClass(_t,It){if(this.hasClass(_t,It)){const Mt=new RegExp("(\\s|^)"+It+"(\\s|$)");_t.className=_t.className.replace(Mt," ")}}toggleClass(_t,It){this.hasClass(_t,It)?this.removeClass(_t,It):this.addClass(_t,It)}},ce=D.get("is_LockScreen",!1),ue={isLock:ce,lockTime:ce=="true"?he():0};function le(_t){ue.isLock=_t,D.set("is_LockScreen",_t,10),_t&&(O(),console.log("\u9501\u5C4F\u4E86\u2026\u2026"))}function he(){let _t=3600;return B.Config.UI?.LockTime&&B.Config.UI?.LockTime>=10&&(_t=B.Config.UI.LockTime),_t}let de;function pe(){clearInterval(de),window.location.href.indexOf("/login")>0||ue.isLock||(le(!1),ue.lockTime=he(),de=setInterval(()=>{if(ue.lockTime--,ue.lockTime<=0)return le(!0),clearInterval(de)},1e3))}var fe={exports:{}},me=fe.exports=function _t(It,Mt,Pt){function Lt(Xt,Vt){if(!Mt[Xt]){if(!It[Xt]){if(!Vt&&a)return a(Xt);if(Tt)return Tt(Xt,!0);var Yt=new Error("Cannot find module '"+Xt+"'");throw Yt.code="MODULE_NOT_FOUND",Yt}var Qt=Mt[Xt]={exports:{}};It[Xt][0].call(Qt.exports,function(nn){var cn=It[Xt][1][nn];return Lt(cn||nn)},Qt,Qt.exports,_t,It,Mt,Pt)}return Mt[Xt].exports}for(var Tt=a,qt=0;qt<Pt.length;qt++)Lt(Pt[qt]);return Lt}({1:[function(_t,It,Mt){(function(Pt){var Lt,Tt,qt=Pt.MutationObserver||Pt.WebKitMutationObserver;if(qt){var Xt=0,Vt=new qt(cn),Yt=Pt.document.createTextNode("");Vt.observe(Yt,{characterData:!0}),Lt=function(){Yt.data=Xt=++Xt%2}}else if(Pt.setImmediate||Pt.MessageChannel===void 0)Lt="document"in Pt&&"onreadystatechange"in Pt.document.createElement("script")?function(){var sn=Pt.document.createElement("script");sn.onreadystatechange=function(){cn(),sn.onreadystatechange=null,sn.parentNode.removeChild(sn),sn=null},Pt.document.documentElement.appendChild(sn)}:function(){setTimeout(cn,0)};else{var Qt=new Pt.MessageChannel;Qt.port1.onmessage=cn,Lt=function(){Qt.port2.postMessage(0)}}var nn=[];function cn(){var sn,Wt;Tt=!0;for(var Nt=nn.length;Nt;){for(Wt=nn,nn=[],sn=-1;++sn<Nt;)Wt[sn]();Nt=nn.length}Tt=!1}function ln(sn){nn.push(sn)!==1||Tt||Lt()}It.exports=ln}).call(this,s!==void 0?s:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],2:[function(_t,It,Mt){var Pt=_t(1);function Lt(){}var Tt={},qt=["REJECTED"],Xt=["FULFILLED"],Vt=["PENDING"];function Yt(Dt){if(typeof Dt!="function")throw new TypeError("resolver must be a function");this.state=Vt,this.queue=[],this.outcome=void 0,Dt!==Lt&&ln(this,Dt)}function Qt(Dt,Ht,on){this.promise=Dt,typeof Ht=="function"&&(this.onFulfilled=Ht,this.callFulfilled=this.otherCallFulfilled),typeof on=="function"&&(this.onRejected=on,this.callRejected=this.otherCallRejected)}function nn(Dt,Ht,on){Pt(function(){var tn;try{tn=Ht(on)}catch(rn){return Tt.reject(Dt,rn)}tn===Dt?Tt.reject(Dt,new TypeError("Cannot resolve promise with itself")):Tt.resolve(Dt,tn)})}function cn(Dt){var Ht=Dt&&Dt.then;if(Dt&&(typeof Dt=="object"||typeof Dt=="function")&&typeof Ht=="function")return function(){Ht.apply(Dt,arguments)}}function ln(Dt,Ht){var on=!1;function tn(pn){on||(on=!0,Tt.reject(Dt,pn))}function rn(pn){on||(on=!0,Tt.resolve(Dt,pn))}function hn(){Ht(rn,tn)}var dn=sn(hn);dn.status==="error"&&tn(dn.value)}function sn(Dt,Ht){var on={};try{on.value=Dt(Ht),on.status="success"}catch(tn){on.status="error",on.value=tn}return on}function Wt(Dt){return Dt instanceof this?Dt:Tt.resolve(new this(Lt),Dt)}function Nt(Dt){var Ht=new this(Lt);return Tt.reject(Ht,Dt)}function Ot(Dt){var Ht=this;if(Object.prototype.toString.call(Dt)!=="[object Array]")return this.reject(new TypeError("must be an array"));var on=Dt.length,tn=!1;if(!on)return this.resolve([]);for(var rn=new Array(on),hn=0,dn=-1,pn=new this(Lt);++dn<on;)vn(Dt[dn],dn);return pn;function vn(gn,yn){function bn(wn){rn[yn]=wn,++hn!==on||tn||(tn=!0,Tt.resolve(pn,rn))}Ht.resolve(gn).then(bn,function(wn){tn||(tn=!0,Tt.reject(pn,wn))})}}function jt(Dt){var Ht=this;if(Object.prototype.toString.call(Dt)!=="[object Array]")return this.reject(new TypeError("must be an array"));var on=Dt.length,tn=!1;if(!on)return this.resolve([]);for(var rn=-1,hn=new this(Lt);++rn<on;)dn(Dt[rn]);return hn;function dn(pn){Ht.resolve(pn).then(function(vn){tn||(tn=!0,Tt.resolve(hn,vn))},function(vn){tn||(tn=!0,Tt.reject(hn,vn))})}}It.exports=Yt,Yt.prototype.catch=function(Dt){return this.then(null,Dt)},Yt.prototype.then=function(Dt,Ht){if(typeof Dt!="function"&&this.state===Xt||typeof Ht!="function"&&this.state===qt)return this;var on=new this.constructor(Lt);return this.state!==Vt?nn(on,this.state===Xt?Dt:Ht,this.outcome):this.queue.push(new Qt(on,Dt,Ht)),on},Qt.prototype.callFulfilled=function(Dt){Tt.resolve(this.promise,Dt)},Qt.prototype.otherCallFulfilled=function(Dt){nn(this.promise,this.onFulfilled,Dt)},Qt.prototype.callRejected=function(Dt){Tt.reject(this.promise,Dt)},Qt.prototype.otherCallRejected=function(Dt){nn(this.promise,this.onRejected,Dt)},Tt.resolve=function(Dt,Ht){var on=sn(cn,Ht);if(on.status==="error")return Tt.reject(Dt,on.value);var tn=on.value;if(tn)ln(Dt,tn);else{Dt.state=Xt,Dt.outcome=Ht;for(var rn=-1,hn=Dt.queue.length;++rn<hn;)Dt.queue[rn].callFulfilled(Ht)}return Dt},Tt.reject=function(Dt,Ht){Dt.state=qt,Dt.outcome=Ht;for(var on=-1,tn=Dt.queue.length;++on<tn;)Dt.queue[on].callRejected(Ht);return Dt},Yt.resolve=Wt,Yt.reject=Nt,Yt.all=Ot,Yt.race=jt},{1:1}],3:[function(_t,It,Mt){(function(Pt){typeof Pt.Promise!="function"&&(Pt.Promise=_t(2))}).call(this,s!==void 0?s:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{2:2}],4:[function(_t,It,Mt){var Pt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Rt){return typeof Rt}:function(Rt){return Rt&&typeof Symbol=="function"&&Rt.constructor===Symbol&&Rt!==Symbol.prototype?"symbol":typeof Rt};function Lt(Rt,At){if(!(Rt instanceof At))throw new TypeError("Cannot call a class as a function")}function Tt(){try{if(typeof indexedDB!="undefined")return indexedDB;if(typeof webkitIndexedDB!="undefined")return webkitIndexedDB;if(typeof mozIndexedDB!="undefined")return mozIndexedDB;if(typeof OIndexedDB!="undefined")return OIndexedDB;if(typeof msIndexedDB!="undefined")return msIndexedDB}catch{return}}var qt=Tt();function Xt(){try{if(!qt||!qt.open)return!1;var Rt=typeof openDatabase!="undefined"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),At=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!Rt||At)&&typeof indexedDB!="undefined"&&typeof IDBKeyRange!="undefined"}catch{return!1}}function Vt(Rt,At){Rt=Rt||[],At=At||{};try{return new Blob(Rt,At)}catch(Ut){if(Ut.name!=="TypeError")throw Ut;for(var Bt=new(typeof BlobBuilder!="undefined"?BlobBuilder:typeof MSBlobBuilder!="undefined"?MSBlobBuilder:typeof MozBlobBuilder!="undefined"?MozBlobBuilder:WebKitBlobBuilder),$t=0;$t<Rt.length;$t+=1)Bt.append(Rt[$t]);return Bt.getBlob(At.type)}}typeof Promise=="undefined"&&_t(3);var Yt=Promise;function Qt(Rt,At){At&&Rt.then(function(Bt){At(null,Bt)},function(Bt){At(Bt)})}function nn(Rt,At,Bt){typeof At=="function"&&Rt.then(At),typeof Bt=="function"&&Rt.catch(Bt)}function cn(Rt){return typeof Rt!="string"&&(console.warn(Rt+" used as a key, but it is not a string."),Rt=String(Rt)),Rt}function ln(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var sn="local-forage-detect-blob-support",Wt=void 0,Nt={},Ot=Object.prototype.toString,jt="readonly",Dt="readwrite";function Ht(Rt){for(var At=Rt.length,Bt=new ArrayBuffer(At),$t=new Uint8Array(Bt),Ut=0;Ut<At;Ut++)$t[Ut]=Rt.charCodeAt(Ut);return Bt}function on(Rt){return new Yt(function(At){var Bt=Rt.transaction(sn,Dt),$t=Vt([""]);Bt.objectStore(sn).put($t,"key"),Bt.onabort=function(Ut){Ut.preventDefault(),Ut.stopPropagation(),At(!1)},Bt.oncomplete=function(){var Ut=navigator.userAgent.match(/Chrome\/(\d+)/),Ft=navigator.userAgent.match(/Edge\//);At(Ft||!Ut||parseInt(Ut[1],10)>=43)}}).catch(function(){return!1})}function tn(Rt){return typeof Wt=="boolean"?Yt.resolve(Wt):on(Rt).then(function(At){return Wt=At})}function rn(Rt){var At=Nt[Rt.name],Bt={};Bt.promise=new Yt(function($t,Ut){Bt.resolve=$t,Bt.reject=Ut}),At.deferredOperations.push(Bt),At.dbReady?At.dbReady=At.dbReady.then(function(){return Bt.promise}):At.dbReady=Bt.promise}function hn(Rt){var At=Nt[Rt.name].deferredOperations.pop();if(At)return At.resolve(),At.promise}function dn(Rt,At){var Bt=Nt[Rt.name].deferredOperations.pop();if(Bt)return Bt.reject(At),Bt.promise}function pn(Rt,At){return new Yt(function(Bt,$t){if(Nt[Rt.name]=Nt[Rt.name]||Un(),Rt.db){if(!At)return Bt(Rt.db);rn(Rt),Rt.db.close()}var Ut=[Rt.name];At&&Ut.push(Rt.version);var Ft=qt.open.apply(qt,Ut);At&&(Ft.onupgradeneeded=function(Gt){var Kt=Ft.result;try{Kt.createObjectStore(Rt.storeName),Gt.oldVersion<=1&&Kt.createObjectStore(sn)}catch(Jt){if(Jt.name!=="ConstraintError")throw Jt;console.warn('The database "'+Rt.name+'" has been upgraded from version '+Gt.oldVersion+" to version "+Gt.newVersion+', but the storage "'+Rt.storeName+'" already exists.')}}),Ft.onerror=function(Gt){Gt.preventDefault(),$t(Ft.error)},Ft.onsuccess=function(){var Gt=Ft.result;Gt.onversionchange=function(Kt){Kt.target.close()},Bt(Gt),hn(Rt)}})}function vn(Rt){return pn(Rt,!1)}function gn(Rt){return pn(Rt,!0)}function yn(Rt,At){if(!Rt.db)return!0;var Bt=!Rt.db.objectStoreNames.contains(Rt.storeName),$t=Rt.version<Rt.db.version,Ut=Rt.version>Rt.db.version;if($t&&(Rt.version!==At&&console.warn('The database "'+Rt.name+`" can't be downgraded from version `+Rt.db.version+" to version "+Rt.version+"."),Rt.version=Rt.db.version),Ut||Bt){if(Bt){var Ft=Rt.db.version+1;Ft>Rt.version&&(Rt.version=Ft)}return!0}return!1}function bn(Rt){return new Yt(function(At,Bt){var $t=new FileReader;$t.onerror=Bt,$t.onloadend=function(Ut){var Ft=btoa(Ut.target.result||"");At({__local_forage_encoded_blob:!0,data:Ft,type:Rt.type})},$t.readAsBinaryString(Rt)})}function wn(Rt){return Vt([Ht(atob(Rt.data))],{type:Rt.type})}function Sn(Rt){return Rt&&Rt.__local_forage_encoded_blob}function Rn(Rt){var At=this,Bt=At._initReady().then(function(){var $t=Nt[At._dbInfo.name];if($t&&$t.dbReady)return $t.dbReady});return nn(Bt,Rt,Rt),Bt}function An(Rt){rn(Rt);for(var At=Nt[Rt.name],Bt=At.forages,$t=0;$t<Bt.length;$t++){var Ut=Bt[$t];Ut._dbInfo.db&&(Ut._dbInfo.db.close(),Ut._dbInfo.db=null)}return Rt.db=null,vn(Rt).then(function(Ft){return Rt.db=Ft,yn(Rt)?gn(Rt):Ft}).then(function(Ft){Rt.db=At.db=Ft;for(var Gt=0;Gt<Bt.length;Gt++)Bt[Gt]._dbInfo.db=Ft}).catch(function(Ft){throw dn(Rt,Ft),Ft})}function Cn(Rt,At,Bt,$t){$t===void 0&&($t=1);try{var Ut=Rt.db.transaction(Rt.storeName,At);Bt(null,Ut)}catch(Ft){if($t>0&&(!Rt.db||Ft.name==="InvalidStateError"||Ft.name==="NotFoundError"))return Yt.resolve().then(function(){if(!Rt.db||Ft.name==="NotFoundError"&&!Rt.db.objectStoreNames.contains(Rt.storeName)&&Rt.version<=Rt.db.version)return Rt.db&&(Rt.version=Rt.db.version+1),gn(Rt)}).then(function(){return An(Rt).then(function(){Cn(Rt,At,Bt,$t-1)})}).catch(Bt);Bt(Ft)}}function Un(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function ai(Rt){var At=this,Bt={db:null};if(Rt)for(var $t in Rt)Bt[$t]=Rt[$t];var Ut=Nt[Bt.name];Ut||(Ut=Un(),Nt[Bt.name]=Ut),Ut.forages.push(At),At._initReady||(At._initReady=At.ready,At.ready=Rn);var Ft=[];function Gt(){return Yt.resolve()}for(var Kt=0;Kt<Ut.forages.length;Kt++){var Jt=Ut.forages[Kt];Jt!==At&&Ft.push(Jt._initReady().catch(Gt))}var Zt=Ut.forages.slice(0);return Yt.all(Ft).then(function(){return Bt.db=Ut.db,vn(Bt)}).then(function(en){return Bt.db=en,yn(Bt,At._defaultConfig.version)?gn(Bt):en}).then(function(en){Bt.db=Ut.db=en,At._dbInfo=Bt;for(var an=0;an<Zt.length;an++){var un=Zt[an];un!==At&&(un._dbInfo.db=Bt.db,un._dbInfo.version=Bt.version)}})}function ci(Rt,At){var Bt=this;Rt=cn(Rt);var $t=new Yt(function(Ut,Ft){Bt.ready().then(function(){Cn(Bt._dbInfo,jt,function(Gt,Kt){if(Gt)return Ft(Gt);try{var Jt=Kt.objectStore(Bt._dbInfo.storeName).get(Rt);Jt.onsuccess=function(){var Zt=Jt.result;Zt===void 0&&(Zt=null),Sn(Zt)&&(Zt=wn(Zt)),Ut(Zt)},Jt.onerror=function(){Ft(Jt.error)}}catch(Zt){Ft(Zt)}})}).catch(Ft)});return Qt($t,At),$t}function ui(Rt,At){var Bt=this,$t=new Yt(function(Ut,Ft){Bt.ready().then(function(){Cn(Bt._dbInfo,jt,function(Gt,Kt){if(Gt)return Ft(Gt);try{var Jt=Kt.objectStore(Bt._dbInfo.storeName).openCursor(),Zt=1;Jt.onsuccess=function(){var en=Jt.result;if(en){var an=en.value;Sn(an)&&(an=wn(an));var un=Rt(an,en.key,Zt++);un!==void 0?Ut(un):en.continue()}else Ut()},Jt.onerror=function(){Ft(Jt.error)}}catch(en){Ft(en)}})}).catch(Ft)});return Qt($t,At),$t}function li(Rt,At,Bt){var $t=this;Rt=cn(Rt);var Ut=new Yt(function(Ft,Gt){var Kt;$t.ready().then(function(){return Kt=$t._dbInfo,Ot.call(At)==="[object Blob]"?tn(Kt.db).then(function(Jt){return Jt?At:bn(At)}):At}).then(function(Jt){Cn($t._dbInfo,Dt,function(Zt,en){if(Zt)return Gt(Zt);try{var an=en.objectStore($t._dbInfo.storeName);Jt===null&&(Jt=void 0);var un=an.put(Jt,Rt);en.oncomplete=function(){Jt===void 0&&(Jt=null),Ft(Jt)},en.onabort=en.onerror=function(){var fn=un.error?un.error:un.transaction.error;Gt(fn)}}catch(fn){Gt(fn)}})}).catch(Gt)});return Qt(Ut,Bt),Ut}function hi(Rt,At){var Bt=this;Rt=cn(Rt);var $t=new Yt(function(Ut,Ft){Bt.ready().then(function(){Cn(Bt._dbInfo,Dt,function(Gt,Kt){if(Gt)return Ft(Gt);try{var Jt=Kt.objectStore(Bt._dbInfo.storeName).delete(Rt);Kt.oncomplete=function(){Ut()},Kt.onerror=function(){Ft(Jt.error)},Kt.onabort=function(){var Zt=Jt.error?Jt.error:Jt.transaction.error;Ft(Zt)}}catch(Zt){Ft(Zt)}})}).catch(Ft)});return Qt($t,At),$t}function di(Rt){var At=this,Bt=new Yt(function($t,Ut){At.ready().then(function(){Cn(At._dbInfo,Dt,function(Ft,Gt){if(Ft)return Ut(Ft);try{var Kt=Gt.objectStore(At._dbInfo.storeName).clear();Gt.oncomplete=function(){$t()},Gt.onabort=Gt.onerror=function(){var Jt=Kt.error?Kt.error:Kt.transaction.error;Ut(Jt)}}catch(Jt){Ut(Jt)}})}).catch(Ut)});return Qt(Bt,Rt),Bt}function pi(Rt){var At=this,Bt=new Yt(function($t,Ut){At.ready().then(function(){Cn(At._dbInfo,jt,function(Ft,Gt){if(Ft)return Ut(Ft);try{var Kt=Gt.objectStore(At._dbInfo.storeName).count();Kt.onsuccess=function(){$t(Kt.result)},Kt.onerror=function(){Ut(Kt.error)}}catch(Jt){Ut(Jt)}})}).catch(Ut)});return Qt(Bt,Rt),Bt}function fi(Rt,At){var Bt=this,$t=new Yt(function(Ut,Ft){Rt<0?Ut(null):Bt.ready().then(function(){Cn(Bt._dbInfo,jt,function(Gt,Kt){if(Gt)return Ft(Gt);try{var Jt=Kt.objectStore(Bt._dbInfo.storeName),Zt=!1,en=Jt.openKeyCursor();en.onsuccess=function(){var an=en.result;an?Rt===0||Zt?Ut(an.key):(Zt=!0,an.advance(Rt)):Ut(null)},en.onerror=function(){Ft(en.error)}}catch(an){Ft(an)}})}).catch(Ft)});return Qt($t,At),$t}function mi(Rt){var At=this,Bt=new Yt(function($t,Ut){At.ready().then(function(){Cn(At._dbInfo,jt,function(Ft,Gt){if(Ft)return Ut(Ft);try{var Kt=Gt.objectStore(At._dbInfo.storeName).openKeyCursor(),Jt=[];Kt.onsuccess=function(){var Zt=Kt.result;Zt?(Jt.push(Zt.key),Zt.continue()):$t(Jt)},Kt.onerror=function(){Ut(Kt.error)}}catch(Zt){Ut(Zt)}})}).catch(Ut)});return Qt(Bt,Rt),Bt}function vi(Rt,At){At=ln.apply(this,arguments);var Bt=this.config();(Rt=typeof Rt!="function"&&Rt||{}).name||(Rt.name=Rt.name||Bt.name,Rt.storeName=Rt.storeName||Bt.storeName);var $t,Ut=this;if(Rt.name){var Ft=Rt.name===Bt.name&&Ut._dbInfo.db?Yt.resolve(Ut._dbInfo.db):vn(Rt).then(function(Gt){var Kt=Nt[Rt.name],Jt=Kt.forages;Kt.db=Gt;for(var Zt=0;Zt<Jt.length;Zt++)Jt[Zt]._dbInfo.db=Gt;return Gt});$t=Rt.storeName?Ft.then(function(Gt){if(Gt.objectStoreNames.contains(Rt.storeName)){var Kt=Gt.version+1;rn(Rt);var Jt=Nt[Rt.name],Zt=Jt.forages;Gt.close();for(var en=0;en<Zt.length;en++){var an=Zt[en];an._dbInfo.db=null,an._dbInfo.version=Kt}return new Yt(function(un,fn){var mn=qt.open(Rt.name,Kt);mn.onerror=function(xn){mn.result.close(),fn(xn)},mn.onupgradeneeded=function(){mn.result.deleteObjectStore(Rt.storeName)},mn.onsuccess=function(){var xn=mn.result;xn.close(),un(xn)}}).then(function(un){Jt.db=un;for(var fn=0;fn<Zt.length;fn++){var mn=Zt[fn];mn._dbInfo.db=un,hn(mn._dbInfo)}}).catch(function(un){throw(dn(Rt,un)||Yt.resolve()).catch(function(){}),un})}}):Ft.then(function(Gt){rn(Rt);var Kt=Nt[Rt.name],Jt=Kt.forages;Gt.close();for(var Zt=0;Zt<Jt.length;Zt++)Jt[Zt]._dbInfo.db=null;return new Yt(function(en,an){var un=qt.deleteDatabase(Rt.name);un.onerror=function(){var fn=un.result;fn&&fn.close(),an(un.error)},un.onblocked=function(){console.warn('dropInstance blocked for database "'+Rt.name+'" until all open connections are closed')},un.onsuccess=function(){var fn=un.result;fn&&fn.close(),en(fn)}}).then(function(en){Kt.db=en;for(var an=0;an<Jt.length;an++)hn(Jt[an]._dbInfo)}).catch(function(en){throw(dn(Rt,en)||Yt.resolve()).catch(function(){}),en})})}else $t=Yt.reject("Invalid arguments");return Qt($t,At),$t}var gi={_driver:"asyncStorage",_initStorage:ai,_support:Xt(),iterate:ui,getItem:ci,setItem:li,removeItem:hi,clear:di,length:pi,key:fi,keys:mi,dropInstance:vi};function yi(){return typeof openDatabase=="function"}var En="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wi="~~local_forage_type~",Hn=/^~~local_forage_type~([^~]+)~/,Mn="__lfsc__:",Bn=Mn.length,Ln="arbf",Nn="blob",$n="si08",Fn="ui08",qn="uic8",Wn="si16",Xn="si32",Gn="ur16",Vn="ui32",Kn="fl32",Yn="fl64",Jn=Bn+Ln.length,Zn=Object.prototype.toString;function Qn(Rt){var At,Bt,$t,Ut,Ft,Gt=.75*Rt.length,Kt=Rt.length,Jt=0;Rt[Rt.length-1]==="="&&(Gt--,Rt[Rt.length-2]==="="&&Gt--);var Zt=new ArrayBuffer(Gt),en=new Uint8Array(Zt);for(At=0;At<Kt;At+=4)Bt=En.indexOf(Rt[At]),$t=En.indexOf(Rt[At+1]),Ut=En.indexOf(Rt[At+2]),Ft=En.indexOf(Rt[At+3]),en[Jt++]=Bt<<2|$t>>4,en[Jt++]=(15&$t)<<4|Ut>>2,en[Jt++]=(3&Ut)<<6|63&Ft;return Zt}function Dn(Rt){var At,Bt=new Uint8Array(Rt),$t="";for(At=0;At<Bt.length;At+=3)$t+=En[Bt[At]>>2],$t+=En[(3&Bt[At])<<4|Bt[At+1]>>4],$t+=En[(15&Bt[At+1])<<2|Bt[At+2]>>6],$t+=En[63&Bt[At+2]];return Bt.length%3==2?$t=$t.substring(0,$t.length-1)+"=":Bt.length%3==1&&($t=$t.substring(0,$t.length-2)+"=="),$t}function bi(Rt,At){var Bt="";if(Rt&&(Bt=Zn.call(Rt)),Rt&&(Bt==="[object ArrayBuffer]"||Rt.buffer&&Zn.call(Rt.buffer)==="[object ArrayBuffer]")){var $t,Ut=Mn;Rt instanceof ArrayBuffer?($t=Rt,Ut+=Ln):($t=Rt.buffer,Bt==="[object Int8Array]"?Ut+=$n:Bt==="[object Uint8Array]"?Ut+=Fn:Bt==="[object Uint8ClampedArray]"?Ut+=qn:Bt==="[object Int16Array]"?Ut+=Wn:Bt==="[object Uint16Array]"?Ut+=Gn:Bt==="[object Int32Array]"?Ut+=Xn:Bt==="[object Uint32Array]"?Ut+=Vn:Bt==="[object Float32Array]"?Ut+=Kn:Bt==="[object Float64Array]"?Ut+=Yn:At(new Error("Failed to get type for BinaryArray"))),At(Ut+Dn($t))}else if(Bt==="[object Blob]"){var Ft=new FileReader;Ft.onload=function(){var Gt=wi+Rt.type+"~"+Dn(this.result);At(Mn+Nn+Gt)},Ft.readAsArrayBuffer(Rt)}else try{At(JSON.stringify(Rt))}catch(Gt){console.error("Couldn't convert value into a JSON string: ",Rt),At(null,Gt)}}function xi(Rt){if(Rt.substring(0,Bn)!==Mn)return JSON.parse(Rt);var At,Bt=Rt.substring(Jn),$t=Rt.substring(Bn,Jn);if($t===Nn&&Hn.test(Bt)){var Ut=Bt.match(Hn);At=Ut[1],Bt=Bt.substring(Ut[0].length)}var Ft=Qn(Bt);switch($t){case Ln:return Ft;case Nn:return Vt([Ft],{type:At});case $n:return new Int8Array(Ft);case Fn:return new Uint8Array(Ft);case qn:return new Uint8ClampedArray(Ft);case Wn:return new Int16Array(Ft);case Gn:return new Uint16Array(Ft);case Xn:return new Int32Array(Ft);case Vn:return new Uint32Array(Ft);case Kn:return new Float32Array(Ft);case Yn:return new Float64Array(Ft);default:throw new Error("Unkown type: "+$t)}}var Tn={serialize:bi,deserialize:xi,stringToBuffer:Qn,bufferToString:Dn};function ei(Rt,At,Bt,$t){Rt.executeSql("CREATE TABLE IF NOT EXISTS "+At.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],Bt,$t)}function Si(Rt){var At=this,Bt={db:null};if(Rt)for(var $t in Rt)Bt[$t]=typeof Rt[$t]!="string"?Rt[$t].toString():Rt[$t];var Ut=new Yt(function(Ft,Gt){try{Bt.db=openDatabase(Bt.name,String(Bt.version),Bt.description,Bt.size)}catch(Kt){return Gt(Kt)}Bt.db.transaction(function(Kt){ei(Kt,Bt,function(){At._dbInfo=Bt,Ft()},function(Jt,Zt){Gt(Zt)})},Gt)});return Bt.serializer=Tn,Ut}function kn(Rt,At,Bt,$t,Ut,Ft){Rt.executeSql(Bt,$t,Ut,function(Gt,Kt){Kt.code===Kt.SYNTAX_ERR?Gt.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[At.storeName],function(Jt,Zt){Zt.rows.length?Ft(Jt,Kt):ei(Jt,At,function(){Jt.executeSql(Bt,$t,Ut,Ft)},Ft)},Ft):Ft(Gt,Kt)},Ft)}function Ci(Rt,At){var Bt=this;Rt=cn(Rt);var $t=new Yt(function(Ut,Ft){Bt.ready().then(function(){var Gt=Bt._dbInfo;Gt.db.transaction(function(Kt){kn(Kt,Gt,"SELECT * FROM "+Gt.storeName+" WHERE key = ? LIMIT 1",[Rt],function(Jt,Zt){var en=Zt.rows.length?Zt.rows.item(0).value:null;en&&(en=Gt.serializer.deserialize(en)),Ut(en)},function(Jt,Zt){Ft(Zt)})})}).catch(Ft)});return Qt($t,At),$t}function Ei(Rt,At){var Bt=this,$t=new Yt(function(Ut,Ft){Bt.ready().then(function(){var Gt=Bt._dbInfo;Gt.db.transaction(function(Kt){kn(Kt,Gt,"SELECT * FROM "+Gt.storeName,[],function(Jt,Zt){for(var en=Zt.rows,an=en.length,un=0;un<an;un++){var fn=en.item(un),mn=fn.value;if(mn&&(mn=Gt.serializer.deserialize(mn)),(mn=Rt(mn,fn.key,un+1))!==void 0)return void Ut(mn)}Ut()},function(Jt,Zt){Ft(Zt)})})}).catch(Ft)});return Qt($t,At),$t}function ti(Rt,At,Bt,$t){var Ut=this;Rt=cn(Rt);var Ft=new Yt(function(Gt,Kt){Ut.ready().then(function(){At===void 0&&(At=null);var Jt=At,Zt=Ut._dbInfo;Zt.serializer.serialize(At,function(en,an){an?Kt(an):Zt.db.transaction(function(un){kn(un,Zt,"INSERT OR REPLACE INTO "+Zt.storeName+" (key, value) VALUES (?, ?)",[Rt,en],function(){Gt(Jt)},function(fn,mn){Kt(mn)})},function(un){if(un.code===un.QUOTA_ERR){if($t>0)return void Gt(ti.apply(Ut,[Rt,Jt,Bt,$t-1]));Kt(un)}})})}).catch(Kt)});return Qt(Ft,Bt),Ft}function ki(Rt,At,Bt){return ti.apply(this,[Rt,At,Bt,1])}function zi(Rt,At){var Bt=this;Rt=cn(Rt);var $t=new Yt(function(Ut,Ft){Bt.ready().then(function(){var Gt=Bt._dbInfo;Gt.db.transaction(function(Kt){kn(Kt,Gt,"DELETE FROM "+Gt.storeName+" WHERE key = ?",[Rt],function(){Ut()},function(Jt,Zt){Ft(Zt)})})}).catch(Ft)});return Qt($t,At),$t}function _i(Rt){var At=this,Bt=new Yt(function($t,Ut){At.ready().then(function(){var Ft=At._dbInfo;Ft.db.transaction(function(Gt){kn(Gt,Ft,"DELETE FROM "+Ft.storeName,[],function(){$t()},function(Kt,Jt){Ut(Jt)})})}).catch(Ut)});return Qt(Bt,Rt),Bt}function Ii(Rt){var At=this,Bt=new Yt(function($t,Ut){At.ready().then(function(){var Ft=At._dbInfo;Ft.db.transaction(function(Gt){kn(Gt,Ft,"SELECT COUNT(key) as c FROM "+Ft.storeName,[],function(Kt,Jt){var Zt=Jt.rows.item(0).c;$t(Zt)},function(Kt,Jt){Ut(Jt)})})}).catch(Ut)});return Qt(Bt,Rt),Bt}function Mi(Rt,At){var Bt=this,$t=new Yt(function(Ut,Ft){Bt.ready().then(function(){var Gt=Bt._dbInfo;Gt.db.transaction(function(Kt){kn(Kt,Gt,"SELECT key FROM "+Gt.storeName+" WHERE id = ? LIMIT 1",[Rt+1],function(Jt,Zt){var en=Zt.rows.length?Zt.rows.item(0).key:null;Ut(en)},function(Jt,Zt){Ft(Zt)})})}).catch(Ft)});return Qt($t,At),$t}function Pi(Rt){var At=this,Bt=new Yt(function($t,Ut){At.ready().then(function(){var Ft=At._dbInfo;Ft.db.transaction(function(Gt){kn(Gt,Ft,"SELECT key FROM "+Ft.storeName,[],function(Kt,Jt){for(var Zt=[],en=0;en<Jt.rows.length;en++)Zt.push(Jt.rows.item(en).key);$t(Zt)},function(Kt,Jt){Ut(Jt)})})}).catch(Ut)});return Qt(Bt,Rt),Bt}function Ri(Rt){return new Yt(function(At,Bt){Rt.transaction(function($t){$t.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(Ut,Ft){for(var Gt=[],Kt=0;Kt<Ft.rows.length;Kt++)Gt.push(Ft.rows.item(Kt).name);At({db:Rt,storeNames:Gt})},function(Ut,Ft){Bt(Ft)})},function($t){Bt($t)})})}function Ai(Rt,At){At=ln.apply(this,arguments);var Bt=this.config();(Rt=typeof Rt!="function"&&Rt||{}).name||(Rt.name=Rt.name||Bt.name,Rt.storeName=Rt.storeName||Bt.storeName);var $t,Ut=this;return Qt($t=Rt.name?new Yt(function(Ft){var Gt;Gt=Rt.name===Bt.name?Ut._dbInfo.db:openDatabase(Rt.name,"","",0),Rt.storeName?Ft({db:Gt,storeNames:[Rt.storeName]}):Ft(Ri(Gt))}).then(function(Ft){return new Yt(function(Gt,Kt){Ft.db.transaction(function(Jt){function Zt(fn){return new Yt(function(mn,xn){Jt.executeSql("DROP TABLE IF EXISTS "+fn,[],function(){mn()},function(oi,In){xn(In)})})}for(var en=[],an=0,un=Ft.storeNames.length;an<un;an++)en.push(Zt(Ft.storeNames[an]));Yt.all(en).then(function(){Gt()}).catch(function(fn){Kt(fn)})},function(Jt){Kt(Jt)})})}):Yt.reject("Invalid arguments"),At),$t}var Bi={_driver:"webSQLStorage",_initStorage:Si,_support:yi(),iterate:Ei,getItem:Ci,setItem:ki,removeItem:zi,clear:_i,length:Ii,key:Mi,keys:Pi,dropInstance:Ai};function Li(){try{return typeof localStorage!="undefined"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function ni(Rt,At){var Bt=Rt.name+"/";return Rt.storeName!==At.storeName&&(Bt+=Rt.storeName+"/"),Bt}function Ni(){var Rt="_localforage_support_test";try{return localStorage.setItem(Rt,!0),localStorage.removeItem(Rt),!1}catch{return!0}}function Di(){return!Ni()||localStorage.length>0}function Ti(Rt){var At=this,Bt={};if(Rt)for(var $t in Rt)Bt[$t]=Rt[$t];return Bt.keyPrefix=ni(Rt,At._defaultConfig),Di()?(At._dbInfo=Bt,Bt.serializer=Tn,Yt.resolve()):Yt.reject()}function Oi(Rt){var At=this,Bt=At.ready().then(function(){for(var $t=At._dbInfo.keyPrefix,Ut=localStorage.length-1;Ut>=0;Ut--){var Ft=localStorage.key(Ut);Ft.indexOf($t)===0&&localStorage.removeItem(Ft)}});return Qt(Bt,Rt),Bt}function ji(Rt,At){var Bt=this;Rt=cn(Rt);var $t=Bt.ready().then(function(){var Ut=Bt._dbInfo,Ft=localStorage.getItem(Ut.keyPrefix+Rt);return Ft&&(Ft=Ut.serializer.deserialize(Ft)),Ft});return Qt($t,At),$t}function Ui(Rt,At){var Bt=this,$t=Bt.ready().then(function(){for(var Ut=Bt._dbInfo,Ft=Ut.keyPrefix,Gt=Ft.length,Kt=localStorage.length,Jt=1,Zt=0;Zt<Kt;Zt++){var en=localStorage.key(Zt);if(en.indexOf(Ft)===0){var an=localStorage.getItem(en);if(an&&(an=Ut.serializer.deserialize(an)),(an=Rt(an,en.substring(Gt),Jt++))!==void 0)return an}}});return Qt($t,At),$t}function Hi(Rt,At){var Bt=this,$t=Bt.ready().then(function(){var Ut,Ft=Bt._dbInfo;try{Ut=localStorage.key(Rt)}catch{Ut=null}return Ut&&(Ut=Ut.substring(Ft.keyPrefix.length)),Ut});return Qt($t,At),$t}function $i(Rt){var At=this,Bt=At.ready().then(function(){for(var $t=At._dbInfo,Ut=localStorage.length,Ft=[],Gt=0;Gt<Ut;Gt++){var Kt=localStorage.key(Gt);Kt.indexOf($t.keyPrefix)===0&&Ft.push(Kt.substring($t.keyPrefix.length))}return Ft});return Qt(Bt,Rt),Bt}function Fi(Rt){var At=this.keys().then(function(Bt){return Bt.length});return Qt(At,Rt),At}function qi(Rt,At){var Bt=this;Rt=cn(Rt);var $t=Bt.ready().then(function(){var Ut=Bt._dbInfo;localStorage.removeItem(Ut.keyPrefix+Rt)});return Qt($t,At),$t}function Wi(Rt,At,Bt){var $t=this;Rt=cn(Rt);var Ut=$t.ready().then(function(){At===void 0&&(At=null);var Ft=At;return new Yt(function(Gt,Kt){var Jt=$t._dbInfo;Jt.serializer.serialize(At,function(Zt,en){if(en)Kt(en);else try{localStorage.setItem(Jt.keyPrefix+Rt,Zt),Gt(Ft)}catch(an){an.name!=="QuotaExceededError"&&an.name!=="NS_ERROR_DOM_QUOTA_REACHED"||Kt(an),Kt(an)}})})});return Qt(Ut,Bt),Ut}function Xi(Rt,At){if(At=ln.apply(this,arguments),!(Rt=typeof Rt!="function"&&Rt||{}).name){var Bt=this.config();Rt.name=Rt.name||Bt.name,Rt.storeName=Rt.storeName||Bt.storeName}var $t,Ut=this;return Qt($t=Rt.name?new Yt(function(Ft){Rt.storeName?Ft(ni(Rt,Ut._defaultConfig)):Ft(Rt.name+"/")}).then(function(Ft){for(var Gt=localStorage.length-1;Gt>=0;Gt--){var Kt=localStorage.key(Gt);Kt.indexOf(Ft)===0&&localStorage.removeItem(Kt)}}):Yt.reject("Invalid arguments"),At),$t}var Gi={_driver:"localStorageWrapper",_initStorage:Ti,_support:Li(),iterate:Ui,getItem:ji,setItem:Wi,removeItem:qi,clear:Oi,length:Fi,key:Hi,keys:$i,dropInstance:Xi},Vi=function(Rt,At){return Rt===At||typeof Rt=="number"&&typeof At=="number"&&isNaN(Rt)&&isNaN(At)},Ki=function(Rt,At){for(var Bt=Rt.length,$t=0;$t<Bt;){if(Vi(Rt[$t],At))return!0;$t++}return!1},ii=Array.isArray||function(Rt){return Object.prototype.toString.call(Rt)==="[object Array]"},_n={},ri={},zn={INDEXEDDB:gi,WEBSQL:Bi,LOCALSTORAGE:Gi},Yi=[zn.INDEXEDDB._driver,zn.WEBSQL._driver,zn.LOCALSTORAGE._driver],Pn=["dropInstance"],On=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Pn),Ji={description:"",driver:Yi.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Zi(Rt,At){Rt[At]=function(){var Bt=arguments;return Rt.ready().then(function(){return Rt[At].apply(Rt,Bt)})}}function jn(){for(var Rt=1;Rt<arguments.length;Rt++){var At=arguments[Rt];if(At)for(var Bt in At)At.hasOwnProperty(Bt)&&(ii(At[Bt])?arguments[0][Bt]=At[Bt].slice():arguments[0][Bt]=At[Bt])}return arguments[0]}var Qi=new(function(){function Rt(At){for(var Bt in Lt(this,Rt),zn)if(zn.hasOwnProperty(Bt)){var $t=zn[Bt],Ut=$t._driver;this[Bt]=Ut,_n[Ut]||this.defineDriver($t)}this._defaultConfig=jn({},Ji),this._config=jn({},this._defaultConfig,At),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return Rt.prototype.config=function(At){if((At===void 0?"undefined":Pt(At))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var Bt in At){if(Bt==="storeName"&&(At[Bt]=At[Bt].replace(/\W/g,"_")),Bt==="version"&&typeof At[Bt]!="number")return new Error("Database version must be a number.");this._config[Bt]=At[Bt]}return!("driver"in At)||!At.driver||this.setDriver(this._config.driver)}return typeof At=="string"?this._config[At]:this._config},Rt.prototype.defineDriver=function(At,Bt,$t){var Ut=new Yt(function(Ft,Gt){try{var Kt=At._driver,Jt=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!At._driver)return void Gt(Jt);for(var Zt=On.concat("_initStorage"),en=0,an=Zt.length;en<an;en++){var un=Zt[en];if((!Ki(Pn,un)||At[un])&&typeof At[un]!="function")return void Gt(Jt)}(function(){for(var mn=function(er){return function(){var tr=new Error("Method "+er+" is not implemented by the current driver"),si=Yt.reject(tr);return Qt(si,arguments[arguments.length-1]),si}},xn=0,oi=Pn.length;xn<oi;xn++){var In=Pn[xn];At[In]||(At[In]=mn(In))}})();var fn=function(mn){_n[Kt]&&console.info("Redefining LocalForage driver: "+Kt),_n[Kt]=At,ri[Kt]=mn,Ft()};"_support"in At?At._support&&typeof At._support=="function"?At._support().then(fn,Gt):fn(!!At._support):fn(!0)}catch(mn){Gt(mn)}});return nn(Ut,Bt,$t),Ut},Rt.prototype.driver=function(){return this._driver||null},Rt.prototype.getDriver=function(At,Bt,$t){var Ut=_n[At]?Yt.resolve(_n[At]):Yt.reject(new Error("Driver not found."));return nn(Ut,Bt,$t),Ut},Rt.prototype.getSerializer=function(At){var Bt=Yt.resolve(Tn);return nn(Bt,At),Bt},Rt.prototype.ready=function(At){var Bt=this,$t=Bt._driverSet.then(function(){return Bt._ready===null&&(Bt._ready=Bt._initDriver()),Bt._ready});return nn($t,At,At),$t},Rt.prototype.setDriver=function(At,Bt,$t){var Ut=this;ii(At)||(At=[At]);var Ft=this._getSupportedDrivers(At);function Gt(){Ut._config.driver=Ut.driver()}function Kt(en){return Ut._extend(en),Gt(),Ut._ready=Ut._initStorage(Ut._config),Ut._ready}function Jt(en){return function(){var an=0;function un(){for(;an<en.length;){var fn=en[an];return an++,Ut._dbInfo=null,Ut._ready=null,Ut.getDriver(fn).then(Kt).catch(un)}Gt();var mn=new Error("No available storage method found.");return Ut._driverSet=Yt.reject(mn),Ut._driverSet}return un()}}var Zt=this._driverSet!==null?this._driverSet.catch(function(){return Yt.resolve()}):Yt.resolve();return this._driverSet=Zt.then(function(){var en=Ft[0];return Ut._dbInfo=null,Ut._ready=null,Ut.getDriver(en).then(function(an){Ut._driver=an._driver,Gt(),Ut._wrapLibraryMethodsWithReady(),Ut._initDriver=Jt(Ft)})}).catch(function(){Gt();var en=new Error("No available storage method found.");return Ut._driverSet=Yt.reject(en),Ut._driverSet}),nn(this._driverSet,Bt,$t),this._driverSet},Rt.prototype.supports=function(At){return!!ri[At]},Rt.prototype._extend=function(At){jn(this,At)},Rt.prototype._getSupportedDrivers=function(At){for(var Bt=[],$t=0,Ut=At.length;$t<Ut;$t++){var Ft=At[$t];this.supports(Ft)&&Bt.push(Ft)}return Bt},Rt.prototype._wrapLibraryMethodsWithReady=function(){for(var At=0,Bt=On.length;At<Bt;At++)Zi(this,On[At])},Rt.prototype.createInstance=function(At){return new Rt(At)},Rt}());It.exports=Qi},{3:3}]},{},[4])(4),ve={exports:{}};/*!
|
|
3
|
-
localForage -- Offline Storage, Improved
|
|
4
|
-
Version 1.10.0
|
|
5
|
-
https://localforage.github.io/localForage
|
|
6
|
-
(c) 2013-2017 Mozilla, Apache License 2.0
|
|
7
|
-
*/(function(_t){ve.exports=(()=>{const It=typeof window=="object"?window:this;It.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");let Mt=null,Pt=!1;const Lt=It.WebStreamsPolyfill||{},Tt=It.isSecureContext;let qt=/constructor/i.test(It.HTMLElement)||!!It.safari||!!It.WebKitPoint;const Xt=Tt||"MozAppearance"in document.documentElement.style?"iframe":"navigate",Vt={createWriteStream:function(Qt,nn,cn){let ln={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},sn=0,Wt=null,Nt=null,Ot=null;if(Number.isFinite(nn)?([cn,nn]=[nn,cn],console.warn("[StreamSaver] Depricated pass an object as 2nd argument when creating a write stream"),ln.size=cn,ln.writableStrategy=nn):nn&&nn.highWaterMark?(console.warn("[StreamSaver] Depricated pass an object as 2nd argument when creating a write stream"),ln.size=cn,ln.writableStrategy=nn):ln=nn||{},!qt){Mt||(Mt=Tt?Yt(Vt.mitm):function(on){const tn="width=200,height=100",rn=document.createDocumentFragment(),hn={frame:It.open(on,"popup",tn),loaded:!1,isIframe:!1,isPopup:!0,remove(){hn.frame.close()},addEventListener(...pn){rn.addEventListener(...pn)},dispatchEvent(...pn){rn.dispatchEvent(...pn)},removeEventListener(...pn){rn.removeEventListener(...pn)},postMessage(...pn){hn.frame.postMessage(...pn)}},dn=pn=>{pn.source===hn.frame&&(hn.loaded=!0,It.removeEventListener("message",dn),hn.dispatchEvent(new Event("load")))};return It.addEventListener("message",dn),hn}(Vt.mitm)),Nt=new MessageChannel,Qt=encodeURIComponent(Qt.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const Dt={transferringReadable:Pt,pathname:ln.pathname||Math.random().toString().slice(-6)+"/"+Qt,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+Qt}};ln.size&&(Dt.headers["Content-Length"]=ln.size);const Ht=[Dt,"*",[Nt.port2]];if(Pt){const on=Xt==="iframe"?void 0:{transform(rn,hn){if(!(rn instanceof Uint8Array))throw new TypeError("Can only wirte Uint8Arrays");sn+=rn.length,hn.enqueue(rn),Wt&&(location.href=Wt,Wt=null)},flush(){Wt&&(location.href=Wt)}};Ot=new Vt.TransformStream(on,ln.writableStrategy,ln.readableStrategy);const tn=Ot.readable;Nt.port1.postMessage({readableStream:tn},[tn])}Nt.port1.onmessage=on=>{on.data.download&&(Xt==="navigate"?(Mt.remove(),Mt=null,sn?location.href=on.data.download:Wt=on.data.download):(Mt.isPopup&&(Mt.remove(),Mt=null,Xt==="iframe"&&Yt(Vt.mitm)),Yt(on.data.download)))},Mt.loaded?Mt.postMessage(...Ht):Mt.addEventListener("load",()=>{Mt.postMessage(...Ht)},{once:!0})}let jt=[];return!qt&&Ot&&Ot.writable||new Vt.WritableStream({write(Dt){if(!(Dt instanceof Uint8Array))throw new TypeError("Can only wirte Uint8Arrays");qt?jt.push(Dt):(Nt.port1.postMessage(Dt),sn+=Dt.length,Wt&&(location.href=Wt,Wt=null))},close(){if(qt){const Dt=new Blob(jt,{type:"application/octet-stream; charset=utf-8"}),Ht=document.createElement("a");Ht.href=URL.createObjectURL(Dt),Ht.download=Qt,Ht.click()}else Nt.port1.postMessage("end")},abort(){jt=[],Nt.port1.postMessage("abort"),Nt.port1.onmessage=null,Nt.port1.close(),Nt.port2.close(),Nt=null}},ln.writableStrategy)},WritableStream:It.WritableStream||Lt.WritableStream,supported:!0,version:{full:"2.0.5",major:2,minor:0,dot:5},mitm:"https://jimmywarting.github.io/StreamSaver.js/mitm.html?version=2.0.0"};function Yt(Qt){if(!Qt)throw new Error("meh");const nn=document.createElement("iframe");return nn.hidden=!0,nn.src=Qt,nn.loaded=!1,nn.name="iframe",nn.isIframe=!0,nn.postMessage=(...cn)=>nn.contentWindow.postMessage(...cn),nn.addEventListener("load",()=>{nn.loaded=!0},{once:!0}),document.body.appendChild(nn),nn}try{new Response(new ReadableStream),Tt&&!("serviceWorker"in navigator)&&(qt=!0)}catch{qt=!0}return(Qt=>{try{Qt()}catch{}})(()=>{const{readable:Qt}=new TransformStream,nn=new MessageChannel;nn.port1.postMessage(Qt,[Qt]),nn.port1.close(),nn.port2.close(),Pt=!0,Object.defineProperty(Vt,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})}),Vt})()})();var ge=ve.exports;const ye=Object.prototype.toString;function we(_t,It){return ye.call(_t)===`[object ${It}]`}function be(_t){return we(_t,"Function")}const xe=_t=>_t!==void 0,Se=_t=>!xe(_t);function Ce(_t){return _t===null}const Ee=_t=>_t!==null&&we(_t,"Object");function ke(_t){return we(_t,"String")}function ze(_t){return _t&&Array.isArray(_t)}const _e=typeof window=="undefined",Ie=e.reactive({panelGroups:{}}),Pe=()=>({useGroupAccordion:_t=>e.computed(()=>Ie.panelGroups[_t].accordion),setGroupAccordionStatus:(_t,It)=>{Ie.panelGroups[_t]={...Ie.panelGroups[_t],accordion:It}},panelExpanded:(_t,It)=>e.computed(()=>Ie.panelGroups[_t]?.panelExpandStatus?.[It]||!1),setPanelExpandedStatus:(_t,It,Mt)=>{Ie.panelGroups[_t]={...Ie.panelGroups[_t],panelExpandStatus:{...Ie.panelGroups[_t]?.panelExpandStatus||{},[It]:Mt}}},togglePanelExpandedStatus:(_t,It)=>{Ie.panelGroups[_t].accordion&&(Ie.panelGroups[_t].panelExpandStatus[It]||Object.keys(Ie.panelGroups[_t].panelExpandStatus).forEach(Mt=>{Ie.panelGroups[_t].panelExpandStatus[Mt]=!1})),Ie.panelGroups[_t].panelExpandStatus[It]=!Ie.panelGroups[_t].panelExpandStatus[It]}}),Me=_t=>_t>255?255:_t<0?0:_t,Re=(_t,It)=>{const Mt=_t.replace("#",""),Pt=parseInt(Mt,16),Lt=Me((Pt>>16)+It),Tt=Me((Pt>>8&255)+It);return"#"+(Me((255&Pt)+It)|Tt<<8|Lt<<16).toString(16)};var Ae=e.defineComponent({name:"VueCollapsiblePanelGroup",props:{accordion:{type:Boolean,default:!1},baseColor:{type:String,default:"#333333"}},setup(_t){const It=e.ref(`group-${v()}`),{setGroupAccordionStatus:Mt}=Pe(),Pt={"--base-color":_t.baseColor,"--border-color":Re(_t.baseColor,180),"--bg-color-header":Re(_t.baseColor,140),"--bg-color-header-hover":Re(_t.baseColor,190),"--bg-color-header-active":Re(_t.baseColor,200),"--bg-color-body":"#fff"};return Mt(It.value,_t.accordion),{idGroup:It,cssColorVars:Pt}}});const Be=["data-id-group"];Ae.render=function(_t,It,Mt,Pt,Lt,Tt){return e.openBlock(),e.createElementBlock("div",{"data-id-group":_t.idGroup,style:e.normalizeStyle(_t.cssColorVars),class:"vcpg"},[e.renderSlot(_t.$slots,"default")],12,Be)},Ae.__scopeId="data-v-23ab5317",Ae.__file="src/controls/collapsepanel/VCollapsiblePanelGroup.vue";var Le=e.defineComponent({name:"VueCollapsiblePanel",props:{expanded:{type:Boolean,default:!0}},setup(_t,It){const Mt=`panel-${v()}`,Pt=e.ref(),Lt=e.ref(),Tt=e.ref(),{panelExpanded:qt,togglePanelExpandedStatus:Xt,setPanelExpandedStatus:Vt}=Pe(),Yt=e.computed(()=>({hasContent:It.slots.content&&It.slots.content()[0].children.length>0,dataKey:v()})),Qt=e.computed(()=>Pt.value?.parentElement?.getAttribute("data-id-group")||""),nn=e.computed(()=>qt(Qt.value,Mt).value&&Yt.value.hasContent);return e.onMounted(()=>{Vt(Qt.value,Mt,_t.expanded)}),e.onUpdated(()=>{(async()=>{await e.nextTick(),Lt.value&&Tt.value&&(Lt.value.style.height=`${Math.min(Tt.value.scrollHeight,Lt.value.scrollHeight)}px`)})()}),{body:Yt,panelRef:Pt,bodyRef:Lt,bodyContentRef:Tt,isExpanded:nn,collapse:cn=>{cn.style.height="0"},expand:cn=>{cn.style.height=`${cn.scrollHeight}px`},toggle:()=>{Yt.value.hasContent&&Xt(Qt.value,Mt)},toggleIcon:`
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var g=require("vue"),Qe=require("@hprose/rpc-core"),Jt=require("@hprose/io"),yi=require("@hprose/rpc-html5"),wi={name:"splitpanes",props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},provide(){return{requestUpdate:this.requestUpdate,onPaneAdd:this.onPaneAdd,onPaneRemove:this.onPaneRemove,onPaneClick:this.onPaneClick}},data:()=>({container:null,ready:!1,panes:[],touch:{mouseDown:!1,dragging:!1,activeSplitter:null},splitterTaps:{splitter:null,timeoutId:null}}),computed:{panesCount(){return this.panes.length},indexedPanes(){return this.panes.reduce((e,t)=>(e[t.id]=t)&&e,{})}},methods:{updatePaneComponents(){this.panes.forEach(e=>{e.update&&e.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[e.id].size}%`})})},bindEvents(){document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),document.addEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.addEventListener("touchmove",this.onMouseMove,{passive:!1}),document.addEventListener("touchend",this.onMouseUp))},unbindEvents(){document.removeEventListener("mousemove",this.onMouseMove,{passive:!1}),document.removeEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.removeEventListener("touchmove",this.onMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onMouseUp))},onMouseDown(e,t){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=t},onMouseMove(e){this.touch.mouseDown&&(e.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(e)),this.$emit("resize",this.panes.map(t=>({min:t.min,max:t.max,size:t.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(e=>({min:e.min,max:e.max,size:e.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(e,t){"ontouchstart"in window&&(e.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===t?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(e,t),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=t,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[t])},onSplitterDblClick(e,t){let n=0;this.panes=this.panes.map((i,r)=>(i.size=r===t?i.max:i.min,r!==t&&(n+=i.min),i)),this.panes[t].size-=n,this.$emit("pane-maximize",this.panes[t])},onPaneClick(e,t){this.$emit("pane-click",this.indexedPanes[t])},getCurrentMouseDrag(e){const t=this.container.getBoundingClientRect(),{clientX:n,clientY:i}="ontouchstart"in window&&e.touches?e.touches[0]:e;return{x:n-t.left,y:i-t.top}},getCurrentDragPercentage(e){e=e[this.horizontal?"y":"x"];const t=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(e=t-e),100*e/t},calculatePanesSize(e){const t=this.touch.activeSplitter;let n={prevPanesSize:this.sumPrevPanesSize(t),nextPanesSize:this.sumNextPanesSize(t),prevReachedMinPanes:0,nextReachedMinPanes:0};const i=0+(this.pushOtherPanes?0:n.prevPanesSize),r=100-(this.pushOtherPanes?0:n.nextPanesSize),l=Math.max(Math.min(this.getCurrentDragPercentage(e),r),i);let w=[t,t+1],y=this.panes[w[0]]||null,C=this.panes[w[1]]||null;const x=y.max<100&&l>=y.max+n.prevPanesSize,_=C.max<100&&l<=100-(C.max+this.sumNextPanesSize(t+1));if(x||_)x?(y.size=y.max,C.size=Math.max(100-y.max-n.prevPanesSize-n.nextPanesSize,0)):(y.size=Math.max(100-C.max-n.prevPanesSize-this.sumNextPanesSize(t+1),0),C.size=C.max);else{if(this.pushOtherPanes){const M=this.doPushOtherPanes(n,l);if(!M)return;({sums:n,panesToResize:w}=M),y=this.panes[w[0]]||null,C=this.panes[w[1]]||null}y!==null&&(y.size=Math.min(Math.max(l-n.prevPanesSize-n.prevReachedMinPanes,y.min),y.max)),C!==null&&(C.size=Math.min(Math.max(100-l-n.nextPanesSize-n.nextReachedMinPanes,C.min),C.max))}},doPushOtherPanes(e,t){const n=this.touch.activeSplitter,i=[n,n+1];return t<e.prevPanesSize+this.panes[i[0]].min&&(i[0]=this.findPrevExpandedPane(n).index,e.prevReachedMinPanes=0,i[0]<n&&this.panes.forEach((r,l)=>{l>i[0]&&l<=n&&(r.size=r.min,e.prevReachedMinPanes+=r.min)}),e.prevPanesSize=this.sumPrevPanesSize(i[0]),i[0]===void 0)?(e.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((r,l)=>{l>0&&l<=n&&(r.size=r.min,e.prevReachedMinPanes+=r.min)}),this.panes[i[1]].size=100-e.prevReachedMinPanes-this.panes[0].min-e.prevPanesSize-e.nextPanesSize,null):t>100-e.nextPanesSize-this.panes[i[1]].min&&(i[1]=this.findNextExpandedPane(n).index,e.nextReachedMinPanes=0,i[1]>n+1&&this.panes.forEach((r,l)=>{l>n&&l<i[1]&&(r.size=r.min,e.nextReachedMinPanes+=r.min)}),e.nextPanesSize=this.sumNextPanesSize(i[1]-1),i[1]===void 0)?(e.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((r,l)=>{l<this.panesCount-1&&l>=n+1&&(r.size=r.min,e.nextReachedMinPanes+=r.min)}),this.panes[i[0]].size=100-e.prevPanesSize-e.nextReachedMinPanes-this.panes[this.panesCount-1].min-e.nextPanesSize,null):{sums:e,panesToResize:i}},sumPrevPanesSize(e){return this.panes.reduce((t,n,i)=>t+(i<e?n.size:0),0)},sumNextPanesSize(e){return this.panes.reduce((t,n,i)=>t+(i>e+1?n.size:0),0)},findPrevExpandedPane(e){return[...this.panes].reverse().find(t=>t.index<e&&t.size>t.min)||{}},findNextExpandedPane(e){return this.panes.find(t=>t.index>e+1&&t.size>t.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(e=>{const t=e.classList.contains("splitpanes__pane"),n=e.classList.contains("splitpanes__splitter");if(!t&&!n)return e.parentNode.removeChild(e),void console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed.")})},addSplitter(e,t,n=!1){const i=e-1,r=document.createElement("div");r.classList.add("splitpanes__splitter"),n||(r.onmousedown=l=>this.onMouseDown(l,i),typeof window!="undefined"&&"ontouchstart"in window&&(r.ontouchstart=l=>this.onMouseDown(l,i)),r.onclick=l=>this.onSplitterClick(l,i+1)),this.dblClickSplitter&&(r.ondblclick=l=>this.onSplitterDblClick(l,i+1)),t.parentNode.insertBefore(r,t)},removeSplitter(e){e.onmousedown=void 0,e.onclick=void 0,e.ondblclick=void 0,e.parentNode.removeChild(e)},redoSplitters(){const e=Array.from(this.container.children);e.forEach(n=>{n.className.includes("splitpanes__splitter")&&this.removeSplitter(n)});let t=0;e.forEach(n=>{n.className.includes("splitpanes__pane")&&(!t&&this.firstSplitter?this.addSplitter(t,n,!0):t&&this.addSplitter(t,n),t++)})},requestUpdate({target:e,...t}){const n=this.indexedPanes[e._.uid];Object.entries(t).forEach(([i,r])=>n[i]=r)},onPaneAdd(e){let t=-1;Array.from(e.$el.parentNode.children).some(r=>(r.className.includes("splitpanes__pane")&&t++,r===e.$el));const n=parseFloat(e.minSize),i=parseFloat(e.maxSize);this.panes.splice(t,0,{id:e._.uid,index:t,min:isNaN(n)?0:n,max:isNaN(i)?100:i,size:e.size===null?null:parseFloat(e.size),givenSize:e.size,update:e.update}),this.panes.forEach((r,l)=>r.index=l),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[t]}),this.$emit("pane-add",{index:t,panes:this.panes.map(r=>({min:r.min,max:r.max,size:r.size}))})})},onPaneRemove(e){const t=this.panes.findIndex(i=>i.id===e._.uid),n=this.panes.splice(t,1)[0];this.panes.forEach((i,r)=>i.index=r),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...n,index:t}}),this.$emit("pane-remove",{removed:n,panes:this.panes.map(i=>({min:i.min,max:i.max,size:i.size}))})})},resetPaneSizes(e={}){e.addedPane||e.removedPane?this.panes.some(t=>t.givenSize!==null||t.min||t.max<100)?this.equalizeAfterAddOrRemove(e):this.equalize():this.initialPanesSizing(),this.ready&&this.$emit("resized",this.panes.map(t=>({min:t.min,max:t.max,size:t.size})))},equalize(){const e=100/this.panesCount;let t=0;const n=[],i=[];this.panes.forEach(r=>{r.size=Math.max(Math.min(e,r.max),r.min),t-=r.size,r.size>=r.max&&n.push(r.id),r.size<=r.min&&i.push(r.id)}),t>.1&&this.readjustSizes(t,n,i)},initialPanesSizing(){let e=100;const t=[],n=[];let i=0;this.panes.forEach(l=>{e-=l.size,l.size!==null&&i++,l.size>=l.max&&t.push(l.id),l.size<=l.min&&n.push(l.id)});let r=100;e>.1&&(this.panes.forEach(l=>{l.size===null&&(l.size=Math.max(Math.min(e/(this.panesCount-i),l.max),l.min)),r-=l.size}),r>.1&&this.readjustSizes(e,t,n))},equalizeAfterAddOrRemove({addedPane:e}={}){let t=100/this.panesCount,n=0;const i=[],r=[];e&&e.givenSize!==null&&(t=(100-e.givenSize)/(this.panesCount-1)),this.panes.forEach(l=>{n-=l.size,l.size>=l.max&&i.push(l.id),l.size<=l.min&&r.push(l.id)}),Math.abs(n)<.1||(this.panes.forEach(l=>{e&&e.givenSize!==null&&e.id===l.id||(l.size=Math.max(Math.min(t,l.max),l.min)),n-=l.size,l.size>=l.max&&i.push(l.id),l.size<=l.min&&r.push(l.id)}),n>.1&&this.readjustSizes(n,i,r))},readjustSizes(e,t,n){let i;i=e>0?e/(this.panesCount-t.length):e/(this.panesCount-n.length),this.panes.forEach(r=>{if(e>0&&!t.includes(r.id)){const l=Math.max(Math.min(r.size+i,r.max),r.min);e-=l-r.size,r.size=l}else if(!n.includes(r.id)){const l=Math.max(Math.min(r.size+i,r.max),r.min);e-=l-r.size,r.size=l}r.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[r.id].size}%`})}),Math.abs(e)>.1&&this.$nextTick(()=>{this.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})}},watch:{panes:{deep:!0,immediate:!1,handler(){this.updatePaneComponents()}},horizontal(){this.updatePaneComponents()},firstSplitter(){this.redoSplitters()},dblClickSplitter(e){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((t,n)=>{t.ondblclick=e?i=>this.onSplitterDblClick(i,n):void 0})}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.updatePaneComponents(),this.$emit("ready"),this.ready=!0},render(){return g.h("div",{ref:"container",class:["splitpanes","splitpanes--"+(this.horizontal?"horizontal":"vertical"),{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())},__file:"src/controls/splitpanes/splitpanes.vue"},et={name:"pane",inject:["requestUpdate","onPaneAdd","onPaneRemove","onPaneClick"],props:{size:{type:[Number,String],default:10},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},data:()=>({style:{}}),mounted(){this.onPaneAdd(this)},beforeUnmount(){this.onPaneRemove(this)},methods:{update(e){this.style=e}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(e){this.requestUpdate({target:this,size:e})},minSizeNumber(e){this.requestUpdate({target:this,min:e})},maxSizeNumber(e){this.requestUpdate({target:this,max:e})}}};et.render=function(e,t,n,i,r,l){return g.openBlock(),g.createElementBlock("div",{class:"splitpanes__pane",onClick:t[0]||(t[0]=w=>l.onPaneClick(w,e._.uid)),style:g.normalizeStyle(e.style)},[g.renderSlot(e.$slots,"default")],4)},et.__file="src/controls/splitpanes/pane.vue";var pe=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function tt(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var bi={exports:{}},Zt=bi.exports=function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(b,c){var h=b[0],d=b[1],u=b[2],p=b[3];d=((d+=((u=((u+=((p=((p+=((h=((h+=(d&u|~d&p)+c[0]-680876936|0)<<7|h>>>25)+d|0)&d|~h&u)+c[1]-389564586|0)<<12|p>>>20)+h|0)&h|~p&d)+c[2]+606105819|0)<<17|u>>>15)+p|0)&p|~u&h)+c[3]-1044525330|0)<<22|d>>>10)+u|0,d=((d+=((u=((u+=((p=((p+=((h=((h+=(d&u|~d&p)+c[4]-176418897|0)<<7|h>>>25)+d|0)&d|~h&u)+c[5]+1200080426|0)<<12|p>>>20)+h|0)&h|~p&d)+c[6]-1473231341|0)<<17|u>>>15)+p|0)&p|~u&h)+c[7]-45705983|0)<<22|d>>>10)+u|0,d=((d+=((u=((u+=((p=((p+=((h=((h+=(d&u|~d&p)+c[8]+1770035416|0)<<7|h>>>25)+d|0)&d|~h&u)+c[9]-1958414417|0)<<12|p>>>20)+h|0)&h|~p&d)+c[10]-42063|0)<<17|u>>>15)+p|0)&p|~u&h)+c[11]-1990404162|0)<<22|d>>>10)+u|0,d=((d+=((u=((u+=((p=((p+=((h=((h+=(d&u|~d&p)+c[12]+1804603682|0)<<7|h>>>25)+d|0)&d|~h&u)+c[13]-40341101|0)<<12|p>>>20)+h|0)&h|~p&d)+c[14]-1502002290|0)<<17|u>>>15)+p|0)&p|~u&h)+c[15]+1236535329|0)<<22|d>>>10)+u|0,d=((d+=((u=((u+=((p=((p+=((h=((h+=(d&p|u&~p)+c[1]-165796510|0)<<5|h>>>27)+d|0)&u|d&~u)+c[6]-1069501632|0)<<9|p>>>23)+h|0)&d|h&~d)+c[11]+643717713|0)<<14|u>>>18)+p|0)&h|p&~h)+c[0]-373897302|0)<<20|d>>>12)+u|0,d=((d+=((u=((u+=((p=((p+=((h=((h+=(d&p|u&~p)+c[5]-701558691|0)<<5|h>>>27)+d|0)&u|d&~u)+c[10]+38016083|0)<<9|p>>>23)+h|0)&d|h&~d)+c[15]-660478335|0)<<14|u>>>18)+p|0)&h|p&~h)+c[4]-405537848|0)<<20|d>>>12)+u|0,d=((d+=((u=((u+=((p=((p+=((h=((h+=(d&p|u&~p)+c[9]+568446438|0)<<5|h>>>27)+d|0)&u|d&~u)+c[14]-1019803690|0)<<9|p>>>23)+h|0)&d|h&~d)+c[3]-187363961|0)<<14|u>>>18)+p|0)&h|p&~h)+c[8]+1163531501|0)<<20|d>>>12)+u|0,d=((d+=((u=((u+=((p=((p+=((h=((h+=(d&p|u&~p)+c[13]-1444681467|0)<<5|h>>>27)+d|0)&u|d&~u)+c[2]-51403784|0)<<9|p>>>23)+h|0)&d|h&~d)+c[7]+1735328473|0)<<14|u>>>18)+p|0)&h|p&~h)+c[12]-1926607734|0)<<20|d>>>12)+u|0,d=((d+=((u=((u+=((p=((p+=((h=((h+=(d^u^p)+c[5]-378558|0)<<4|h>>>28)+d|0)^d^u)+c[8]-2022574463|0)<<11|p>>>21)+h|0)^h^d)+c[11]+1839030562|0)<<16|u>>>16)+p|0)^p^h)+c[14]-35309556|0)<<23|d>>>9)+u|0,d=((d+=((u=((u+=((p=((p+=((h=((h+=(d^u^p)+c[1]-1530992060|0)<<4|h>>>28)+d|0)^d^u)+c[4]+1272893353|0)<<11|p>>>21)+h|0)^h^d)+c[7]-155497632|0)<<16|u>>>16)+p|0)^p^h)+c[10]-1094730640|0)<<23|d>>>9)+u|0,d=((d+=((u=((u+=((p=((p+=((h=((h+=(d^u^p)+c[13]+681279174|0)<<4|h>>>28)+d|0)^d^u)+c[0]-358537222|0)<<11|p>>>21)+h|0)^h^d)+c[3]-722521979|0)<<16|u>>>16)+p|0)^p^h)+c[6]+76029189|0)<<23|d>>>9)+u|0,d=((d+=((u=((u+=((p=((p+=((h=((h+=(d^u^p)+c[9]-640364487|0)<<4|h>>>28)+d|0)^d^u)+c[12]-421815835|0)<<11|p>>>21)+h|0)^h^d)+c[15]+530742520|0)<<16|u>>>16)+p|0)^p^h)+c[2]-995338651|0)<<23|d>>>9)+u|0,d=((d+=((p=((p+=(d^((h=((h+=(u^(d|~p))+c[0]-198630844|0)<<6|h>>>26)+d|0)|~u))+c[7]+1126891415|0)<<10|p>>>22)+h|0)^((u=((u+=(h^(p|~d))+c[14]-1416354905|0)<<15|u>>>17)+p|0)|~h))+c[5]-57434055|0)<<21|d>>>11)+u|0,d=((d+=((p=((p+=(d^((h=((h+=(u^(d|~p))+c[12]+1700485571|0)<<6|h>>>26)+d|0)|~u))+c[3]-1894986606|0)<<10|p>>>22)+h|0)^((u=((u+=(h^(p|~d))+c[10]-1051523|0)<<15|u>>>17)+p|0)|~h))+c[1]-2054922799|0)<<21|d>>>11)+u|0,d=((d+=((p=((p+=(d^((h=((h+=(u^(d|~p))+c[8]+1873313359|0)<<6|h>>>26)+d|0)|~u))+c[15]-30611744|0)<<10|p>>>22)+h|0)^((u=((u+=(h^(p|~d))+c[6]-1560198380|0)<<15|u>>>17)+p|0)|~h))+c[13]+1309151649|0)<<21|d>>>11)+u|0,d=((d+=((p=((p+=(d^((h=((h+=(u^(d|~p))+c[4]-145523070|0)<<6|h>>>26)+d|0)|~u))+c[11]-1120210379|0)<<10|p>>>22)+h|0)^((u=((u+=(h^(p|~d))+c[2]+718787259|0)<<15|u>>>17)+p|0)|~h))+c[9]-343485551|0)<<21|d>>>11)+u|0,b[0]=h+b[0]|0,b[1]=d+b[1]|0,b[2]=u+b[2]|0,b[3]=p+b[3]|0}function i(b){var c,h=[];for(c=0;c<64;c+=4)h[c>>2]=b.charCodeAt(c)+(b.charCodeAt(c+1)<<8)+(b.charCodeAt(c+2)<<16)+(b.charCodeAt(c+3)<<24);return h}function r(b){var c,h=[];for(c=0;c<64;c+=4)h[c>>2]=b[c]+(b[c+1]<<8)+(b[c+2]<<16)+(b[c+3]<<24);return h}function l(b){var c,h,d,u,p,P,B=b.length,R=[1732584193,-271733879,-1732584194,271733878];for(c=64;c<=B;c+=64)n(R,i(b.substring(c-64,c)));for(h=(b=b.substring(c-64)).length,d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],c=0;c<h;c+=1)d[c>>2]|=b.charCodeAt(c)<<(c%4<<3);if(d[c>>2]|=128<<(c%4<<3),c>55)for(n(R,d),c=0;c<16;c+=1)d[c]=0;return u=(u=8*B).toString(16).match(/(.*?)(.{0,8})$/),p=parseInt(u[2],16),P=parseInt(u[1],16)||0,d[14]=p,d[15]=P,n(R,d),R}function w(b){var c,h,d,u,p,P,B=b.length,R=[1732584193,-271733879,-1732584194,271733878];for(c=64;c<=B;c+=64)n(R,r(b.subarray(c-64,c)));for(h=(b=c-64<B?b.subarray(c-64):new Uint8Array(0)).length,d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],c=0;c<h;c+=1)d[c>>2]|=b[c]<<(c%4<<3);if(d[c>>2]|=128<<(c%4<<3),c>55)for(n(R,d),c=0;c<16;c+=1)d[c]=0;return u=(u=8*B).toString(16).match(/(.*?)(.{0,8})$/),p=parseInt(u[2],16),P=parseInt(u[1],16)||0,d[14]=p,d[15]=P,n(R,d),R}function y(b){var c,h="";for(c=0;c<4;c+=1)h+=t[b>>8*c+4&15]+t[b>>8*c&15];return h}function C(b){var c;for(c=0;c<b.length;c+=1)b[c]=y(b[c]);return b.join("")}function x(b){return/[\u0080-\uFFFF]/.test(b)&&(b=unescape(encodeURIComponent(b))),b}function _(b,c){var h,d=b.length,u=new ArrayBuffer(d),p=new Uint8Array(u);for(h=0;h<d;h+=1)p[h]=b.charCodeAt(h);return c?p:u}function M(b){return String.fromCharCode.apply(null,new Uint8Array(b))}function T(b,c,h){var d=new Uint8Array(b.byteLength+c.byteLength);return d.set(new Uint8Array(b)),d.set(new Uint8Array(c),b.byteLength),h?d:d.buffer}function N(b){var c,h=[],d=b.length;for(c=0;c<d-1;c+=2)h.push(parseInt(b.substr(c,2),16));return String.fromCharCode.apply(String,h)}function I(){this.reset()}return C(l("hello")),typeof ArrayBuffer=="undefined"||ArrayBuffer.prototype.slice||function(){function b(c,h){return(c=0|c||0)<0?Math.max(c+h,0):Math.min(c,h)}ArrayBuffer.prototype.slice=function(c,h){var d,u,p,P,B=this.byteLength,R=b(c,B),U=B;return h!==e&&(U=b(h,B)),R>U?new ArrayBuffer(0):(d=U-R,u=new ArrayBuffer(d),p=new Uint8Array(u),P=new Uint8Array(this,R,d),p.set(P),u)}}(),I.prototype.append=function(b){return this.appendBinary(x(b)),this},I.prototype.appendBinary=function(b){this._buff+=b,this._length+=b.length;var c,h=this._buff.length;for(c=64;c<=h;c+=64)n(this._hash,i(this._buff.substring(c-64,c)));return this._buff=this._buff.substring(c-64),this},I.prototype.end=function(b){var c,h,d=this._buff,u=d.length,p=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(c=0;c<u;c+=1)p[c>>2]|=d.charCodeAt(c)<<(c%4<<3);return this._finish(p,u),h=C(this._hash),b&&(h=N(h)),this.reset(),h},I.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},I.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},I.prototype.setState=function(b){return this._buff=b.buff,this._length=b.length,this._hash=b.hash,this},I.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},I.prototype._finish=function(b,c){var h,d,u,p=c;if(b[p>>2]|=128<<(p%4<<3),p>55)for(n(this._hash,b),p=0;p<16;p+=1)b[p]=0;h=(h=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),d=parseInt(h[2],16),u=parseInt(h[1],16)||0,b[14]=d,b[15]=u,n(this._hash,b)},I.hash=function(b,c){return I.hashBinary(x(b),c)},I.hashBinary=function(b,c){var h=C(l(b));return c?N(h):h},I.ArrayBuffer=function(){this.reset()},I.ArrayBuffer.prototype.append=function(b){var c,h=T(this._buff.buffer,b,!0),d=h.length;for(this._length+=b.byteLength,c=64;c<=d;c+=64)n(this._hash,r(h.subarray(c-64,c)));return this._buff=c-64<d?new Uint8Array(h.buffer.slice(c-64)):new Uint8Array(0),this},I.ArrayBuffer.prototype.end=function(b){var c,h,d=this._buff,u=d.length,p=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(c=0;c<u;c+=1)p[c>>2]|=d[c]<<(c%4<<3);return this._finish(p,u),h=C(this._hash),b&&(h=N(h)),this.reset(),h},I.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},I.ArrayBuffer.prototype.getState=function(){var b=I.prototype.getState.call(this);return b.buff=M(b.buff),b},I.ArrayBuffer.prototype.setState=function(b){return b.buff=_(b.buff,!0),I.prototype.setState.call(this,b)},I.ArrayBuffer.prototype.destroy=I.prototype.destroy,I.ArrayBuffer.prototype._finish=I.prototype._finish,I.ArrayBuffer.hash=function(b,c){var h=C(w(new Uint8Array(b)));return c?N(h):h},I}();const nt=[];class ae{static addHandler(t,n,i){t.addEventListener?t.addEventListener(n,i,!1):t.attachEvent?t.attachEvent("on"+n,i):t["on"+n]=i}static windowResizeHandler(t){ae.addHandler(window,"resize",t)}static fullscreenEnabled(){const t=window.document;return document.fullscreenEnabled||window.fullScreen||t.mozFullscreenEnabled||t.webkitIsFullScreen}static fullScreen(t,n){if(n){const i=window.document;let r=window.document.exitFullscreen||i.msExitFullscreen||i.mozCancelFullScreen||i.webkitCancelFullScreen;if(r!==void 0&&r)r.call(window.document);else if(window.ActiveXObject!==void 0){let l=new window.ActiveXObject("WScript.Shell");l!=null&&l.SendKeys("{F11}")}}else{let i=t;i||(i=window.document.documentElement);let r=i.requestFullScreen||i.webkitRequestFullScreen||i.mozRequestFullScreen||i.msRequestFullScreen;if(r!==void 0&&r)r.call(i);else if(window.ActiveXObject!==void 0){let l=new window.ActiveXObject("WScript.Shell");l!=null&&l.SendKeys("{F11}")}}}static requestFullScreen(t){let n=t;n||(n=window.document.documentElement);var i=n.requestFullScreen||n.webkitRequestFullScreen||n.mozRequestFullScreen||n.msRequestFullScreen;if(i)i.call(n);else if(window.ActiveXObject!==void 0){var r=new window.ActiveXObject("WScript.Shell");r!==null&&r.SendKeys("{F11}")}}static exitFullScreen(){const t=window.document;var n=document.exitFullscreen||t.mozCancelFullScreen||t.webkitExitFullscreen||t.webkitExitFullscreen;if(n)n.call(document);else if(window.ActiveXObject!==void 0){var i=new window.ActiveXObject("WScript.Shell");i!==null&&i.SendKeys("{F11}")}}static fullScreenElement(){return window.document.fullscreenElement||window.document.webkitFullscreenElement||window.document.mozFullscreenElement||window.document.msFullscreenElement}static isFullScreen(){return!!ae.fullScreenElement()}static onFullScreenChanged(t){let n;"onfullscreenchange"in window.document?n="fullscreenchange":"onwebkitfullscreenchange"in window.document?n="webkitfullscreenchange":"onmozfullscreenchange"in window.document&&(n="mozfullscreenchange"),n?document.addEventListener(n,function(){const i=ae.isFullScreen();t(i)}):document.addEventListener("MSFullscreenChange",function(){const i=ae.isFullScreen();t(i)})}static stringifyCircularHandler(t,n){if(typeof n=="object"&&n!==null){if(nt.indexOf(n)!==-1)return;nt.push(n)}return n}static jsonStringify(t){if(!t)return"";const n=JSON.stringify(t,ae.stringifyCircularHandler);return nt.length=0,n}static jsonParse(t){const n=ae.jsonStringify(t);if(n.length>1)return JSON.parse(n)}static getObjectURL(t){let n;const i=window;return i.createObjcectURL!=null?n=i.createOjcectURL(t):window.URL!=null?n=window.URL.createObjectURL(t):window.webkitURL!=null&&(n=window.webkitURL.createObjectURL(t)),n}static getFileShortMD5(t,n){const i=File.prototype,r=i.slice||i.mozSlice||i.webkitSlice,l=t,w=new Zt.ArrayBuffer,y=new FileReader;y.onload=function(C){w.append(C.target?.result);const x=w.end();n({isOK:!0,data:x})},y.onerror=function(){const C="\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01";console.warn(C),n({isOK:!1,data:C})},function(){const C=2097152>=l.size?l.size:2097152;y.readAsArrayBuffer(r.call(l,0,C))}()}static MD5(t,n=!1){return Zt.hash(t,n)}static copyText=t=>new Promise((n,i)=>{const r=document.createElement("input");r.value=t,document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove(),n(!0)})}class ke{static isNullOrEmpty=t=>t===null||t===""||t===void 0||t.length===0;static isNotEmpty=t=>t!==null&&t!==""&&t!==void 0&&t.length!==0;static toHump(t){return t.replace(/[\-\/\_](\w)/g,(n,i)=>i.toUpperCase()).replace("views","")}}class it{prefixKey;storage;constructor(t="",n=localStorage){this.prefixKey=t,this.storage=n}getKey(t){return`${this.prefixKey}${t}`.toUpperCase()}set(t,n,i=604800){const r=JSON.stringify({value:n,expire:i!==null?new Date().getTime()+1e3*i:null});this.storage.setItem(this.getKey(t),r)}get(t,n=null){const i=this.storage.getItem(this.getKey(t));if(i)try{const r=JSON.parse(i),{value:l,expire:w}=r;if(w===null||w>=Date.now())return l;this.remove(this.getKey(t))}catch{return n}return n}remove(t){this.storage.removeItem(this.getKey(t))}clear(){this.storage.clear()}setCookie(t,n,i=604800){document.cookie=`${this.getKey(t)}=${n}; Max-Age=${i}`}getCookie(t){const n=document.cookie.split("; ");for(let i=0,r=n.length;i<r;i++){const l=n[i].split("=");if(l[0]===this.getKey(t))return l[1]}return""}removeCookie(t){this.setCookie(t,1,-1)}clearCookie(){const t=document.cookie.match(/[^ =;]+(?==)/g);if(t)for(let n=t.length;n--;)document.cookie=t[n]+"=0;expire="+new Date(0).toUTCString()}}const Si=new it("",localStorage);function ze(){let e=[];const t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(var n=0;n<36;n++)e[n]=t.substr(Math.floor(16*Math.random()),1);return e[14]="4",e[19]=t.substr(3&Number(e[19])|8,1),e[8]=e[13]=e[18]=e[23]="-",e.join("")}var me;function ot(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function _e(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/.test(e)}function rt(e){let t=e.toLowerCase();if(_e(e)){if(t.length===4){let i="#";for(let r=1;r<4;r+=1)i+=t.slice(r,r+1).concat(t.slice(r,r+1));t=i}const n=[];for(let i=1;i<7;i+=2)n.push(parseInt("0x"+t.slice(i,i+2)));return"RGB("+n.join(",")+")"}return t}function st(e,t){const n=parseInt(e,16)+t,i=n>255?255:n;return i.toString(16).length>1?i.toString(16):`0${i.toString(16)}`}function Qt(e,t,n){const i=[e,t,n].map(r=>(r/=255)<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4));return .2126*i[0]+.7152*i[1]+.0722*i[2]}function at(e,t){const n=parseInt(e,16)-t,i=n<0?0:n;return i.toString(16).length>1?i.toString(16):`0${i.toString(16)}`}function ct(e){return{all:e=e||new Map,on(t,n){const i=e?.get(t);i&&i.push(n)||e?.set(t,[n])},off(t,n){const i=e?.get(t);i&&i.splice(i.indexOf(n)>>>0,1)},emit(t,n){(e?.get(t)||[]).slice().map(i=>{i(n)}),(e?.get("*")||[]).slice().map(i=>{i(t,n)})}}}exports.EnumColor=void 0,(me=exports.EnumColor||(exports.EnumColor={}))[me.RGBA=0]="RGBA",me[me.Hex=1]="Hex",me[me.Hsla=2]="Hsla";const ge=ct(),V={HproseServiceErrorEvent:"HproseServiceError",WebAPIErrorEvent:"WebAPIError",AlertInfoEvent:"AlertInfoEvent",CommonWarnEvent:"CommonWarnEvent",WidgetLoadedEvent:"WidgetLoaded",WidgetUnLoadedEvent:"WidgetUnLoaded",WidgetVisibleChanged:"WidgetVisibleChanged",AxiosRequestErrorEvent:"AxiosRequestErrorEvent"},ut=(e,t)=>{const n=document.createElement("a");n.download=t,n.style.display="none";const i=new Blob([e],{type:"application/octet-stream"});n.href=URL.createObjectURL(i),document.body.appendChild(n),n.click(),document.body.removeChild(n)};function en(e){const t=e.lastIndexOf("/")+1;let n=e.substring(t);return n=decodeURI(n.split("?")[0]),n}class we{hproseURL;client;hproseProxy;static httpTransport;constructor(t){if(t&&!ke.isNullOrEmpty(t)){if(we.httpTransport||(we.httpTransport=new yi.HttpTransport),this.client=new Qe.Client(t),!this.client)throw Error("Hprose Client\u521D\u59CB\u5316\u9519\u8BEF");this.hproseURL=t,this.init()}}init(){this.client&&this.client.useServiceAsync().then(t=>{this.hproseProxy=t}).catch(t=>{String(t).indexOf("find this method ~")>0?(this.hproseProxy=this.client?.useService(),console.warn("\u65E7\u7248\u672C\u4E0D\u652F\u6301useServiceAsync")):ge.emit(V.HproseServiceErrorEvent,"\u521D\u59CB\u5316\u9ED8\u8BA4Hprose!"),console.warn(t)})}async getProxy(){if(!this.hproseProxy)try{this.client&&(this.hproseProxy=await this.client.useServiceAsync())}catch(t){console.warn(t),this.hproseProxy=this.client?.useService()}return this.hproseProxy}async invoke(t,n,i){if(this.client)return await this.client.invoke(t,n,i)}encode(t,n,i){return this.client?this.client.codec.encode(t,n,i):void 0}decode(t,n){return this.client?this.client.codec.decode(t,n):void 0}}class be{hproseClient;hpProxyObj;defaultContext;constructor(t){this.hproseClient=new we(t),this.hpProxyObj=null,this.defaultContext=new Qe.ClientContext}getClientContext(){return null}async getHproseProxy(){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");if(!this.hpProxyObj){const t=await this.hproseClient.getProxy();this.hpProxyObj=t}return this.hpProxyObj||ge.emit(V.HproseServiceErrorEvent,"HproseProxy\u5BF9\u8C61\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5\uFF01"),this.hpProxyObj}async hproseInvoke(t,n){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");let i;return i=new Qe.ClientContext,await this.hproseClient.invoke(t,n,i)}async hproseInvokeContext(t,n,...i){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");return await this.hproseClient.invoke(t,i,n)}async hproseInvokeEncode(t){const n=new Jt.ByteStream(t).toBytes(),i=await this.hproseClient.client?.request(n,this.defaultContext);return i&&this.hproseClient.client?.codec.decode(i,this.defaultContext)}encodeRequest(t,...n){const i=this.hproseClient.client?.codec?.encode(t,n,this.defaultContext);return Jt.ByteStream.toString(i)}}class Ci{message;eventBus;constructor(t,n){t&&(this.message=t),n&&(this.eventBus=n)}msg(t,n=3,i="success"){if(this.message)if(typeof this.message=="function")this.message({type:i,message:t,duration:n});else switch(i){case"info":this.message.info(t,n);break;case"success":this.message.success(t,n);break;case"warning":this.message.warn(t,n);break;case"error":this.message.error(t,n)}else{switch(i){case"info":case"success":console.log(t);break;case"warning":console.warn(t);break;case"error":i="dark",console.error(t)}this.eventBus&&this.eventBus.emit(V.AlertInfoEvent,{type:i,info:t})}}info(t,n=3){this.msg(t,n,"info")}warn(t,n=3){this.msg(t,n,"warning")}err(t,n=3){this.msg(t,n,"error")}}const lt=new Map,D={Config:SysConfig,EventBus:ge,DefaultProxyClient:null,Axios:void 0},tn=function(e,t,n){n?D.Config.DefaultHproseAPI=n:!D.Config.DefaultHproseAPI&&D.Config.ServiceURL&&(D.Config.DefaultHproseAPI=D.Config.ServiceURL.DefaultHproseAPI),t&&(D.Axios=t),D.Config.DefaultHproseAPI&&ke.isNotEmpty(D.Config.DefaultHproseAPI)&&(D.DefaultProxyClient=new be(D.Config.DefaultHproseAPI));const i=new Ci(e,D.EventBus);D.Message=i,D.EventBus.on(V.HproseServiceErrorEvent,r=>{const l=`\u5F53\u524D\u540E\u53F0\u4E1A\u52A1\u670D\u52A1\u4E0D\u53EF\u7528!${r}`;i.warn(l)}),D.EventBus.on(V.WebAPIErrorEvent,r=>{const l=`WebAPI\u540E\u53F0\u670D\u52A1\u4E0D\u53EF\u7528!${r}`;i.warn(l)}),D.EventBus.on(V.CommonWarnEvent,r=>{i.warn(r)})};function nn(e){if(e&&ke.isNotEmpty(e)){if(lt.has(e))return lt.get(e);{const t=new be(e);return lt.set(e,t),t}}}const ce=new it("user",localStorage);function Me(){return ce.get("access_token")}function ht(){ce.remove("access_token"),D.User&&delete D.User}function on(){return Me()?.refresh}function dt(e,t,n,i="json",r){const l={baseURL:D.Config.ServiceURL.DefaultWebAPI,timeout:6e4,params:e,headers:{"Content-Type":"application/json",Authorization:"bearer "+Me()?.token},responseType:i,cancelToken:r};if(n)for(let w in n)l.headers[w]=n[w];return t&&(l.baseURL=t),l}function ie(e,t,n,i,r="json",l,w){const y=dt(n,t,i,r,l);return w&&w>=2e4&&(y.timeout=w),D.Axios?.get(e,y).catch(function(C){console.error(C);const x=`http\u8BF7\u6C42\u9519\u8BEF\uFF1A${t}${e}`;D.EventBus.emit(V.AxiosRequestErrorEvent,x)})}function ft(e,t,n,i,r,l="json",w){const y=dt(i,t,r,l);w&&w>=2e4&&(y.timeout=w);const C=function(x){let _=new FormData;return x&&Object.keys(x).forEach(M=>{if(!x)return;let T=x[M];var N;T!=null&&_.append(M,(N=T)instanceof Blob?N:N.toString())}),_}(n);return D.Axios?.post(e,C,y).catch(function(x){console.error(x);const _=`post\u8BF7\u6C42\u9519\u8BEF\uFF1A${t}${e}`;D.EventBus.emit(V.AxiosRequestErrorEvent,_)})}var pt={exports:{}},xi=typeof window!="undefined"?window:pe!==void 0?pe:typeof self!="undefined"?self:{},Ei=function(e){if(!e)return!1;var t=ki.call(e);return t==="[object Function]"||typeof e=="function"&&t!=="[object RegExp]"||typeof window!="undefined"&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},ki=Object.prototype.toString,mt=function(e){return e.replace(/^\s+|\s+$/g,"")},zi=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var i in n)_i.call(n,i)&&(e[i]=n[i])}return e},_i=Object.prototype.hasOwnProperty,rn=xi,Mi=Ei,Li=function(e){if(!e)return{};for(var t,n={},i=mt(e).split(`
|
|
2
|
+
`),r=0;r<i.length;r++){var l=i[r],w=l.indexOf(":"),y=mt(l.slice(0,w)).toLowerCase(),C=mt(l.slice(w+1));n[y]===void 0?n[y]=C:(t=n[y],Object.prototype.toString.call(t)==="[object Array]"?n[y].push(C):n[y]=[n[y],C])}return n},Bi=zi;function sn(e,t,n){var i=e;return Mi(t)?(n=t,typeof e=="string"&&(i={uri:e})):i=Bi(t,{uri:e}),i.callback=n,i}function oe(e,t,n){return an(t=sn(e,t,n))}function an(e){if(e.callback===void 0)throw new Error("callback argument missing");var t=!1,n=function(h,d,u){t||(t=!0,e.callback(h,d,u))};function i(){var h=void 0;if(h=C.response?C.response:C.responseText||function(d){try{if(d.responseType==="document")return d.responseXML;var u=d.responseXML&&d.responseXML.documentElement.nodeName==="parsererror";if(d.responseType===""&&!u)return d.responseXML}catch{}return null}(C),b)try{h=JSON.parse(h)}catch{}return h}function r(h){return clearTimeout(x),h instanceof Error||(h=new Error(""+(h||"Unknown XMLHttpRequest Error"))),h.statusCode=0,n(h,c)}function l(){if(!y){var h;clearTimeout(x),h=e.useXDR&&C.status===void 0?200:C.status===1223?204:C.status;var d=c,u=null;return h!==0?(d={body:i(),statusCode:h,method:M,headers:{},url:_,rawRequest:C},C.getAllResponseHeaders&&(d.headers=Li(C.getAllResponseHeaders()))):u=new Error("Internal XMLHttpRequest Error"),n(u,d,d.body)}}var w,y,C=e.xhr||null;C||(C=e.cors||e.useXDR?new oe.XDomainRequest:new oe.XMLHttpRequest);var x,_=C.url=e.uri||e.url,M=C.method=e.method||"GET",T=e.body||e.data,N=C.headers=e.headers||{},I=!!e.sync,b=!1,c={body:void 0,headers:{},statusCode:0,method:M,url:_,rawRequest:C};if("json"in e&&e.json!==!1&&(b=!0,N.accept||N.Accept||(N.Accept="application/json"),M!=="GET"&&M!=="HEAD"&&(N["content-type"]||N["Content-Type"]||(N["Content-Type"]="application/json"),T=JSON.stringify(e.json===!0?T:e.json))),C.onreadystatechange=function(){C.readyState===4&&setTimeout(l,0)},C.onload=l,C.onerror=r,C.onprogress=function(){},C.onabort=function(){y=!0},C.ontimeout=r,C.open(M,_,!I,e.username,e.password),I||(C.withCredentials=!!e.withCredentials),!I&&e.timeout>0&&(x=setTimeout(function(){if(!y){y=!0,C.abort("timeout");var h=new Error("XMLHttpRequest timeout");h.code="ETIMEDOUT",r(h)}},e.timeout)),C.setRequestHeader)for(w in N)N.hasOwnProperty(w)&&C.setRequestHeader(w,N[w]);else if(e.headers&&!function(h){for(var d in h)if(h.hasOwnProperty(d))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(C.responseType=e.responseType),"beforeSend"in e&&typeof e.beforeSend=="function"&&e.beforeSend(C),C.send(T||null),C}pt.exports=oe,pt.exports.default=oe,oe.XMLHttpRequest=rn.XMLHttpRequest||function(){},oe.XDomainRequest="withCredentials"in new oe.XMLHttpRequest?oe.XMLHttpRequest:rn.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],function(e){oe[e==="delete"?"del":e]=function(t,n,i){return(n=sn(t,n,i)).method=e.toUpperCase(),an(n)}});var Ii=pt.exports;const Ri=[200,201,202,204,308],Pi=[408,502,503,504];class Ai{endpoint;file;headers;method;chunkSize;attempts;delayBeforeAttempt;md5;chunk;chunkCount;chunkByteSize;maxFileBytes;endpointValue;totalChunks;attemptCount;offline;paused;success;currentXhr;reader;eventTarget;fileName;constructor(t){this.endpoint=t.endpoint,this.file=t.file,this.fileName=encodeURI(this.file.name),this.headers=t.headers||{},this.method=t.method||"PUT",this.chunkSize=t.chunkSize||5120,this.attempts=t.attempts||5,this.delayBeforeAttempt=t.delayBeforeAttempt||1,this.md5=t.md5||"",this.maxFileBytes=1024*(t.maxFileSize||0),this.chunkCount=0,this.chunkByteSize=1024*this.chunkSize,this.totalChunks=Math.ceil(this.file.size/this.chunkByteSize),this.attemptCount=0,this.offline=!1,this.paused=!1,this.success=!1,this.reader=new FileReader,this.eventTarget=ct(),this.validateOptions(),this.getEndpoint().then(()=>this.sendChunks()),typeof window!="undefined"&&(window.addEventListener("online",()=>{this.offline&&(this.offline=!1,this.dispatch("online"),this.sendChunks())}),window.addEventListener("offline",()=>{this.offline=!0,this.dispatch("offline")}))}on(t,n){this.eventTarget.on(t,n)}abort(){this.pause(),this.currentXhr?.abort()}pause(){this.paused=!0}resume(){this.paused&&(this.paused=!1,this.sendChunks())}dispatch(t,n){this.eventTarget.emit(t,n)}validateOptions(){if(!this.endpoint||typeof this.endpoint!="function"&&typeof this.endpoint!="string")throw new TypeError("endpoint\u5FC5\u987B\u4E3A\uFF1A\u6587\u4EF6\u4E0A\u4F20URL\u5B57\u7B26\u4E32\uFF0C\u6216\u8FD4\u56DE\u5730\u5740\u7684\u51FD\u6570\uFF01");if(!(this.file instanceof File))throw new TypeError("file\u5FC5\u987B\u4E3A\u6587\u4EF6\u5BF9\u8C61");if(this.headers&&typeof this.headers!="object")throw new TypeError("\u6587\u4EF6\u5934\u5FC5\u987B\u4E3A\u5BF9\u8C61\u6216\u7A7A\uFF01");if(this.chunkSize&&(typeof this.chunkSize!="number"||this.chunkSize<=0||this.chunkSize%256!=0))throw new TypeError("chunkSize\u5FC5\u987B\u5927\u4E8E0,\u5E76\u662F256\u7684\u6574\u6570\u500D");if(this.maxFileBytes>0&&this.maxFileBytes<this.file.size)throw new Error(`\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u6700\u5927\u5141\u8BB8\u503C\uFF1A(${this.file.size} > ${this.maxFileBytes})`);if(this.attempts&&(typeof this.attempts!="number"||this.attempts<=0))throw new TypeError("\u91CD\u8BD5\u6B21\u6570\u5FC5\u987B\u4E3A\u6B63\u6570\uFF01");if(this.delayBeforeAttempt&&(typeof this.delayBeforeAttempt!="number"||this.delayBeforeAttempt<0))throw new TypeError("\u5EF6\u65F6\u91CD\u8BD5\u65F6\u95F4\u5FC5\u987B\u4E3A\u6B63\u6570\uFF01\u9ED8\u8BA4\u4E3A1")}getEndpoint(){return typeof this.endpoint=="string"?(this.endpointValue=this.endpoint,Promise.resolve(this.endpoint)):this.endpoint(this.file).then(t=>(this.endpointValue=t,this.endpointValue))}getChunk(){return new Promise(t=>{const n=this.totalChunks===1?this.file.size:this.chunkByteSize,i=n*this.chunkCount;this.reader.onload=()=>{this.reader.result!==null&&(this.chunk=new Blob([this.reader.result],{type:"application/octet-stream"})),t(()=>{})},this.reader.readAsArrayBuffer(this.file.slice(i,i+n))})}xhrPromise(t){const n=i=>{i.upload.onprogress=r=>{const l=100/this.totalChunks,w=l*this.file.size,y=l*this.chunkCount,C=r.loaded/(r.total??w)*l;this.dispatch("progress",Math.min(y+C,100))}};return new Promise((i,r)=>{this.currentXhr=Ii({...t,beforeSend:n},(l,w)=>(this.currentXhr=void 0,l?r(l):i(w)))})}sendChunk(){if(!this.chunk)return;const t=this.chunkCount*this.chunkByteSize,n=t+this.chunk.size-1,i={...this.headers,FileName:this.fileName,FileMD5:this.md5,"Content-Type":this.file.type,"Content-Range":`bytes ${t}-${n}/${this.file.size}`};if(this.dispatch("attempt",{chunkNumber:this.chunkCount,chunkSize:this.chunk.size}),this.endpointValue)return this.xhrPromise({headers:i,url:this.endpointValue,method:this.method,body:this.chunk});console.warn("\u6587\u4EF6\u4E0A\u4F20endpointValue\u4E0D\u80FD\u4E3A\u7A7A\uFF01"),this.dispatch("error",{message:"\u6587\u4EF6\u4E0A\u4F20endpointValue\u4E0D\u80FD\u4E3A\u7A7A\uFF01\u53D6\u6D88\u4E0A\u4F20\uFF01",chunk:this.chunkCount,attempts:this.attemptCount})}manageRetries(){if(this.attemptCount<this.attempts)return setTimeout(()=>this.sendChunks(),1e3*this.delayBeforeAttempt),void this.dispatch("attemptFailure",{message:`\u4E0A\u4F20\u5206\u7247\uFF1A${this.chunkCount}\u5931\u8D25\u3002\u8FD8\u4F1A\u518D\u5C1D\u8BD5 ${this.attempts-this.attemptCount}\u6B21\uFF01`,chunkNumber:this.chunkCount,attemptsLeft:this.attempts-this.attemptCount});this.dispatch("error",{message:`\u4E0A\u4F20\u5206\u7247\u9519\u8BEF\uFF1A ${this.chunkCount}\u3002\u505C\u6B62\u5C1D\u8BD5\uFF0C\u53D6\u6D88\u4E0A\u4F20\uFF01`,chunk:this.chunkCount,attempts:this.attemptCount})}sendChunks(){this.paused||this.offline||this.success||this.getChunk().then(()=>this.sendChunk()).then(t=>{if(this.attemptCount=this.attemptCount+1,t!=null&&Ri.includes(t.statusCode)){this.dispatch("chunkSuccess",{chunk:this.chunkCount,attempts:this.attemptCount,response:t}),this.attemptCount=0,this.chunkCount=this.chunkCount+1,this.chunkCount<this.totalChunks?this.sendChunks():(this.success=!0,this.dispatch("success"));const n=100*(this.chunkCount/this.totalChunks*this.file.size)/this.file.size;this.dispatch("progress",n)}else if(t!=null&&Pi.includes(t.statusCode)){if(this.paused||this.offline)return;this.manageRetries()}else{if(this.paused||this.offline)return;this.dispatch("error",{message:`\u670D\u52A1\u5668\u9519\u8BEF:${t?.statusCode}\uFF0C\u505C\u6B62\u4E0A\u4F20\u3002`,chunkNumber:this.chunkCount,attempts:this.attemptCount})}}).catch(t=>{this.paused||this.offline||this.manageRetries()})}}const Di=new class{hasClass(e,t){return e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}addClass(e,t){this.hasClass(e,t)||(e.className+=" "+t)}removeClass(e,t){if(this.hasClass(e,t)){const n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")}}toggleClass(e,t){this.hasClass(e,t)?this.removeClass(e,t):this.addClass(e,t)}},cn=ce.get("is_LockScreen",!1),Se={isLock:cn,lockTime:cn=="true"?ln():0};function un(e){Se.isLock=e,ce.set("is_LockScreen",e,10),e&&(ht(),console.log("\u9501\u5C4F\u4E86\u2026\u2026"))}function ln(){let e=3600;return D.Config.UI?.LockTime&&D.Config.UI?.LockTime>=10&&(e=D.Config.UI.LockTime),e}let gt;function vt(){clearInterval(gt),window.location.href.indexOf("/login")>0||Se.isLock||(un(!1),Se.lockTime=ln(),gt=setInterval(()=>{if(Se.lockTime--,Se.lockTime<=0)return un(!0),clearInterval(gt)},1e3))}var Ni={exports:{}},Le=Ni.exports=function e(t,n,i){function r(y,C){if(!n[y]){if(!t[y]){if(!C&&tt)return tt(y);if(l)return l(y,!0);var x=new Error("Cannot find module '"+y+"'");throw x.code="MODULE_NOT_FOUND",x}var _=n[y]={exports:{}};t[y][0].call(_.exports,function(M){var T=t[y][1][M];return r(T||M)},_,_.exports,e,t,n,i)}return n[y].exports}for(var l=tt,w=0;w<i.length;w++)r(i[w]);return r}({1:[function(e,t,n){(function(i){var r,l,w=i.MutationObserver||i.WebKitMutationObserver;if(w){var y=0,C=new w(T),x=i.document.createTextNode("");C.observe(x,{characterData:!0}),r=function(){x.data=y=++y%2}}else if(i.setImmediate||i.MessageChannel===void 0)r="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var I=i.document.createElement("script");I.onreadystatechange=function(){T(),I.onreadystatechange=null,I.parentNode.removeChild(I),I=null},i.document.documentElement.appendChild(I)}:function(){setTimeout(T,0)};else{var _=new i.MessageChannel;_.port1.onmessage=T,r=function(){_.port2.postMessage(0)}}var M=[];function T(){var I,b;l=!0;for(var c=M.length;c;){for(b=M,M=[],I=-1;++I<c;)b[I]();c=M.length}l=!1}function N(I){M.push(I)!==1||l||r()}t.exports=N}).call(this,pe!==void 0?pe:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],2:[function(e,t,n){var i=e(1);function r(){}var l={},w=["REJECTED"],y=["FULFILLED"],C=["PENDING"];function x(u){if(typeof u!="function")throw new TypeError("resolver must be a function");this.state=C,this.queue=[],this.outcome=void 0,u!==r&&N(this,u)}function _(u,p,P){this.promise=u,typeof p=="function"&&(this.onFulfilled=p,this.callFulfilled=this.otherCallFulfilled),typeof P=="function"&&(this.onRejected=P,this.callRejected=this.otherCallRejected)}function M(u,p,P){i(function(){var B;try{B=p(P)}catch(R){return l.reject(u,R)}B===u?l.reject(u,new TypeError("Cannot resolve promise with itself")):l.resolve(u,B)})}function T(u){var p=u&&u.then;if(u&&(typeof u=="object"||typeof u=="function")&&typeof p=="function")return function(){p.apply(u,arguments)}}function N(u,p){var P=!1;function B(j){P||(P=!0,l.reject(u,j))}function R(j){P||(P=!0,l.resolve(u,j))}function U(){p(R,B)}var W=I(U);W.status==="error"&&B(W.value)}function I(u,p){var P={};try{P.value=u(p),P.status="success"}catch(B){P.status="error",P.value=B}return P}function b(u){return u instanceof this?u:l.resolve(new this(r),u)}function c(u){var p=new this(r);return l.reject(p,u)}function h(u){var p=this;if(Object.prototype.toString.call(u)!=="[object Array]")return this.reject(new TypeError("must be an array"));var P=u.length,B=!1;if(!P)return this.resolve([]);for(var R=new Array(P),U=0,W=-1,j=new this(r);++W<P;)H(u[W],W);return j;function H(q,X){function Q(J){R[X]=J,++U!==P||B||(B=!0,l.resolve(j,R))}p.resolve(q).then(Q,function(J){B||(B=!0,l.reject(j,J))})}}function d(u){var p=this;if(Object.prototype.toString.call(u)!=="[object Array]")return this.reject(new TypeError("must be an array"));var P=u.length,B=!1;if(!P)return this.resolve([]);for(var R=-1,U=new this(r);++R<P;)W(u[R]);return U;function W(j){p.resolve(j).then(function(H){B||(B=!0,l.resolve(U,H))},function(H){B||(B=!0,l.reject(U,H))})}}t.exports=x,x.prototype.catch=function(u){return this.then(null,u)},x.prototype.then=function(u,p){if(typeof u!="function"&&this.state===y||typeof p!="function"&&this.state===w)return this;var P=new this.constructor(r);return this.state!==C?M(P,this.state===y?u:p,this.outcome):this.queue.push(new _(P,u,p)),P},_.prototype.callFulfilled=function(u){l.resolve(this.promise,u)},_.prototype.otherCallFulfilled=function(u){M(this.promise,this.onFulfilled,u)},_.prototype.callRejected=function(u){l.reject(this.promise,u)},_.prototype.otherCallRejected=function(u){M(this.promise,this.onRejected,u)},l.resolve=function(u,p){var P=I(T,p);if(P.status==="error")return l.reject(u,P.value);var B=P.value;if(B)N(u,B);else{u.state=y,u.outcome=p;for(var R=-1,U=u.queue.length;++R<U;)u.queue[R].callFulfilled(p)}return u},l.reject=function(u,p){u.state=w,u.outcome=p;for(var P=-1,B=u.queue.length;++P<B;)u.queue[P].callRejected(p);return u},x.resolve=b,x.reject=c,x.all=h,x.race=d},{1:1}],3:[function(e,t,n){(function(i){typeof i.Promise!="function"&&(i.Promise=e(2))}).call(this,pe!==void 0?pe:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{2:2}],4:[function(e,t,n){var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};function r(o,s){if(!(o instanceof s))throw new TypeError("Cannot call a class as a function")}function l(){try{if(typeof indexedDB!="undefined")return indexedDB;if(typeof webkitIndexedDB!="undefined")return webkitIndexedDB;if(typeof mozIndexedDB!="undefined")return mozIndexedDB;if(typeof OIndexedDB!="undefined")return OIndexedDB;if(typeof msIndexedDB!="undefined")return msIndexedDB}catch{return}}var w=l();function y(){try{if(!w||!w.open)return!1;var o=typeof openDatabase!="undefined"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),s=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!o||s)&&typeof indexedDB!="undefined"&&typeof IDBKeyRange!="undefined"}catch{return!1}}function C(o,s){o=o||[],s=s||{};try{return new Blob(o,s)}catch(f){if(f.name!=="TypeError")throw f;for(var a=new(typeof BlobBuilder!="undefined"?BlobBuilder:typeof MSBlobBuilder!="undefined"?MSBlobBuilder:typeof MozBlobBuilder!="undefined"?MozBlobBuilder:WebKitBlobBuilder),m=0;m<o.length;m+=1)a.append(o[m]);return a.getBlob(s.type)}}typeof Promise=="undefined"&&e(3);var x=Promise;function _(o,s){s&&o.then(function(a){s(null,a)},function(a){s(a)})}function M(o,s,a){typeof s=="function"&&o.then(s),typeof a=="function"&&o.catch(a)}function T(o){return typeof o!="string"&&(console.warn(o+" used as a key, but it is not a string."),o=String(o)),o}function N(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var I="local-forage-detect-blob-support",b=void 0,c={},h=Object.prototype.toString,d="readonly",u="readwrite";function p(o){for(var s=o.length,a=new ArrayBuffer(s),m=new Uint8Array(a),f=0;f<s;f++)m[f]=o.charCodeAt(f);return a}function P(o){return new x(function(s){var a=o.transaction(I,u),m=C([""]);a.objectStore(I).put(m,"key"),a.onabort=function(f){f.preventDefault(),f.stopPropagation(),s(!1)},a.oncomplete=function(){var f=navigator.userAgent.match(/Chrome\/(\d+)/),v=navigator.userAgent.match(/Edge\//);s(v||!f||parseInt(f[1],10)>=43)}}).catch(function(){return!1})}function B(o){return typeof b=="boolean"?x.resolve(b):P(o).then(function(s){return b=s})}function R(o){var s=c[o.name],a={};a.promise=new x(function(m,f){a.resolve=m,a.reject=f}),s.deferredOperations.push(a),s.dbReady?s.dbReady=s.dbReady.then(function(){return a.promise}):s.dbReady=a.promise}function U(o){var s=c[o.name].deferredOperations.pop();if(s)return s.resolve(),s.promise}function W(o,s){var a=c[o.name].deferredOperations.pop();if(a)return a.reject(s),a.promise}function j(o,s){return new x(function(a,m){if(c[o.name]=c[o.name]||Bt(),o.db){if(!s)return a(o.db);R(o),o.db.close()}var f=[o.name];s&&f.push(o.version);var v=w.open.apply(w,f);s&&(v.onupgradeneeded=function(S){var E=v.result;try{E.createObjectStore(o.storeName),S.oldVersion<=1&&E.createObjectStore(I)}catch(k){if(k.name!=="ConstraintError")throw k;console.warn('The database "'+o.name+'" has been upgraded from version '+S.oldVersion+" to version "+S.newVersion+', but the storage "'+o.storeName+'" already exists.')}}),v.onerror=function(S){S.preventDefault(),m(v.error)},v.onsuccess=function(){var S=v.result;S.onversionchange=function(E){E.target.close()},a(S),U(o)}})}function H(o){return j(o,!1)}function q(o){return j(o,!0)}function X(o,s){if(!o.db)return!0;var a=!o.db.objectStoreNames.contains(o.storeName),m=o.version<o.db.version,f=o.version>o.db.version;if(m&&(o.version!==s&&console.warn('The database "'+o.name+`" can't be downgraded from version `+o.db.version+" to version "+o.version+"."),o.version=o.db.version),f||a){if(a){var v=o.db.version+1;v>o.version&&(o.version=v)}return!0}return!1}function Q(o){return new x(function(s,a){var m=new FileReader;m.onerror=a,m.onloadend=function(f){var v=btoa(f.target.result||"");s({__local_forage_encoded_blob:!0,data:v,type:o.type})},m.readAsBinaryString(o)})}function J(o){return C([p(atob(o.data))],{type:o.type})}function te(o){return o&&o.__local_forage_encoded_blob}function He(o){var s=this,a=s._initReady().then(function(){var m=c[s._dbInfo.name];if(m&&m.dbReady)return m.dbReady});return M(a,o,o),a}function qe(o){R(o);for(var s=c[o.name],a=s.forages,m=0;m<a.length;m++){var f=a[m];f._dbInfo.db&&(f._dbInfo.db.close(),f._dbInfo.db=null)}return o.db=null,H(o).then(function(v){return o.db=v,X(o)?q(o):v}).then(function(v){o.db=s.db=v;for(var S=0;S<a.length;S++)a[S]._dbInfo.db=v}).catch(function(v){throw W(o,v),v})}function ne(o,s,a,m){m===void 0&&(m=1);try{var f=o.db.transaction(o.storeName,s);a(null,f)}catch(v){if(m>0&&(!o.db||v.name==="InvalidStateError"||v.name==="NotFoundError"))return x.resolve().then(function(){if(!o.db||v.name==="NotFoundError"&&!o.db.objectStoreNames.contains(o.storeName)&&o.version<=o.db.version)return o.db&&(o.version=o.db.version+1),q(o)}).then(function(){return qe(o).then(function(){ne(o,s,a,m-1)})}).catch(a);a(v)}}function Bt(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function xn(o){var s=this,a={db:null};if(o)for(var m in o)a[m]=o[m];var f=c[a.name];f||(f=Bt(),c[a.name]=f),f.forages.push(s),s._initReady||(s._initReady=s.ready,s.ready=He);var v=[];function S(){return x.resolve()}for(var E=0;E<f.forages.length;E++){var k=f.forages[E];k!==s&&v.push(k._initReady().catch(S))}var z=f.forages.slice(0);return x.all(v).then(function(){return a.db=f.db,H(a)}).then(function(L){return a.db=L,X(a,s._defaultConfig.version)?q(a):L}).then(function(L){a.db=f.db=L,s._dbInfo=a;for(var A=0;A<z.length;A++){var O=z[A];O!==s&&(O._dbInfo.db=a.db,O._dbInfo.version=a.version)}})}function En(o,s){var a=this;o=T(o);var m=new x(function(f,v){a.ready().then(function(){ne(a._dbInfo,d,function(S,E){if(S)return v(S);try{var k=E.objectStore(a._dbInfo.storeName).get(o);k.onsuccess=function(){var z=k.result;z===void 0&&(z=null),te(z)&&(z=J(z)),f(z)},k.onerror=function(){v(k.error)}}catch(z){v(z)}})}).catch(v)});return _(m,s),m}function kn(o,s){var a=this,m=new x(function(f,v){a.ready().then(function(){ne(a._dbInfo,d,function(S,E){if(S)return v(S);try{var k=E.objectStore(a._dbInfo.storeName).openCursor(),z=1;k.onsuccess=function(){var L=k.result;if(L){var A=L.value;te(A)&&(A=J(A));var O=o(A,L.key,z++);O!==void 0?f(O):L.continue()}else f()},k.onerror=function(){v(k.error)}}catch(L){v(L)}})}).catch(v)});return _(m,s),m}function zn(o,s,a){var m=this;o=T(o);var f=new x(function(v,S){var E;m.ready().then(function(){return E=m._dbInfo,h.call(s)==="[object Blob]"?B(E.db).then(function(k){return k?s:Q(s)}):s}).then(function(k){ne(m._dbInfo,u,function(z,L){if(z)return S(z);try{var A=L.objectStore(m._dbInfo.storeName);k===null&&(k=void 0);var O=A.put(k,o);L.oncomplete=function(){k===void 0&&(k=null),v(k)},L.onabort=L.onerror=function(){var F=O.error?O.error:O.transaction.error;S(F)}}catch(F){S(F)}})}).catch(S)});return _(f,a),f}function _n(o,s){var a=this;o=T(o);var m=new x(function(f,v){a.ready().then(function(){ne(a._dbInfo,u,function(S,E){if(S)return v(S);try{var k=E.objectStore(a._dbInfo.storeName).delete(o);E.oncomplete=function(){f()},E.onerror=function(){v(k.error)},E.onabort=function(){var z=k.error?k.error:k.transaction.error;v(z)}}catch(z){v(z)}})}).catch(v)});return _(m,s),m}function Mn(o){var s=this,a=new x(function(m,f){s.ready().then(function(){ne(s._dbInfo,u,function(v,S){if(v)return f(v);try{var E=S.objectStore(s._dbInfo.storeName).clear();S.oncomplete=function(){m()},S.onabort=S.onerror=function(){var k=E.error?E.error:E.transaction.error;f(k)}}catch(k){f(k)}})}).catch(f)});return _(a,o),a}function Ln(o){var s=this,a=new x(function(m,f){s.ready().then(function(){ne(s._dbInfo,d,function(v,S){if(v)return f(v);try{var E=S.objectStore(s._dbInfo.storeName).count();E.onsuccess=function(){m(E.result)},E.onerror=function(){f(E.error)}}catch(k){f(k)}})}).catch(f)});return _(a,o),a}function Bn(o,s){var a=this,m=new x(function(f,v){o<0?f(null):a.ready().then(function(){ne(a._dbInfo,d,function(S,E){if(S)return v(S);try{var k=E.objectStore(a._dbInfo.storeName),z=!1,L=k.openKeyCursor();L.onsuccess=function(){var A=L.result;A?o===0||z?f(A.key):(z=!0,A.advance(o)):f(null)},L.onerror=function(){v(L.error)}}catch(A){v(A)}})}).catch(v)});return _(m,s),m}function In(o){var s=this,a=new x(function(m,f){s.ready().then(function(){ne(s._dbInfo,d,function(v,S){if(v)return f(v);try{var E=S.objectStore(s._dbInfo.storeName).openKeyCursor(),k=[];E.onsuccess=function(){var z=E.result;z?(k.push(z.key),z.continue()):m(k)},E.onerror=function(){f(E.error)}}catch(z){f(z)}})}).catch(f)});return _(a,o),a}function Rn(o,s){s=N.apply(this,arguments);var a=this.config();(o=typeof o!="function"&&o||{}).name||(o.name=o.name||a.name,o.storeName=o.storeName||a.storeName);var m,f=this;if(o.name){var v=o.name===a.name&&f._dbInfo.db?x.resolve(f._dbInfo.db):H(o).then(function(S){var E=c[o.name],k=E.forages;E.db=S;for(var z=0;z<k.length;z++)k[z]._dbInfo.db=S;return S});m=o.storeName?v.then(function(S){if(S.objectStoreNames.contains(o.storeName)){var E=S.version+1;R(o);var k=c[o.name],z=k.forages;S.close();for(var L=0;L<z.length;L++){var A=z[L];A._dbInfo.db=null,A._dbInfo.version=E}return new x(function(O,F){var $=w.open(o.name,E);$.onerror=function(ee){$.result.close(),F(ee)},$.onupgradeneeded=function(){$.result.deleteObjectStore(o.storeName)},$.onsuccess=function(){var ee=$.result;ee.close(),O(ee)}}).then(function(O){k.db=O;for(var F=0;F<z.length;F++){var $=z[F];$._dbInfo.db=O,U($._dbInfo)}}).catch(function(O){throw(W(o,O)||x.resolve()).catch(function(){}),O})}}):v.then(function(S){R(o);var E=c[o.name],k=E.forages;S.close();for(var z=0;z<k.length;z++)k[z]._dbInfo.db=null;return new x(function(L,A){var O=w.deleteDatabase(o.name);O.onerror=function(){var F=O.result;F&&F.close(),A(O.error)},O.onblocked=function(){console.warn('dropInstance blocked for database "'+o.name+'" until all open connections are closed')},O.onsuccess=function(){var F=O.result;F&&F.close(),L(F)}}).then(function(L){E.db=L;for(var A=0;A<k.length;A++)U(k[A]._dbInfo)}).catch(function(L){throw(W(o,L)||x.resolve()).catch(function(){}),L})})}else m=x.reject("Invalid arguments");return _(m,s),m}var Pn={_driver:"asyncStorage",_initStorage:xn,_support:y(),iterate:kn,getItem:En,setItem:zn,removeItem:_n,clear:Mn,length:Ln,key:Bn,keys:In,dropInstance:Rn};function An(){return typeof openDatabase=="function"}var re="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Dn="~~local_forage_type~",It=/^~~local_forage_type~([^~]+)~/,xe="__lfsc__:",Ve=xe.length,Xe="arbf",Ge="blob",Rt="si08",Pt="ui08",At="uic8",Dt="si16",Nt="si32",Tt="ur16",Ot="ui32",Ut="fl32",Wt="fl64",jt=Ve+Xe.length,Ft=Object.prototype.toString;function $t(o){var s,a,m,f,v,S=.75*o.length,E=o.length,k=0;o[o.length-1]==="="&&(S--,o[o.length-2]==="="&&S--);var z=new ArrayBuffer(S),L=new Uint8Array(z);for(s=0;s<E;s+=4)a=re.indexOf(o[s]),m=re.indexOf(o[s+1]),f=re.indexOf(o[s+2]),v=re.indexOf(o[s+3]),L[k++]=a<<2|m>>4,L[k++]=(15&m)<<4|f>>2,L[k++]=(3&f)<<6|63&v;return z}function Ke(o){var s,a=new Uint8Array(o),m="";for(s=0;s<a.length;s+=3)m+=re[a[s]>>2],m+=re[(3&a[s])<<4|a[s+1]>>4],m+=re[(15&a[s+1])<<2|a[s+2]>>6],m+=re[63&a[s+2]];return a.length%3==2?m=m.substring(0,m.length-1)+"=":a.length%3==1&&(m=m.substring(0,m.length-2)+"=="),m}function Nn(o,s){var a="";if(o&&(a=Ft.call(o)),o&&(a==="[object ArrayBuffer]"||o.buffer&&Ft.call(o.buffer)==="[object ArrayBuffer]")){var m,f=xe;o instanceof ArrayBuffer?(m=o,f+=Xe):(m=o.buffer,a==="[object Int8Array]"?f+=Rt:a==="[object Uint8Array]"?f+=Pt:a==="[object Uint8ClampedArray]"?f+=At:a==="[object Int16Array]"?f+=Dt:a==="[object Uint16Array]"?f+=Tt:a==="[object Int32Array]"?f+=Nt:a==="[object Uint32Array]"?f+=Ot:a==="[object Float32Array]"?f+=Ut:a==="[object Float64Array]"?f+=Wt:s(new Error("Failed to get type for BinaryArray"))),s(f+Ke(m))}else if(a==="[object Blob]"){var v=new FileReader;v.onload=function(){var S=Dn+o.type+"~"+Ke(this.result);s(xe+Ge+S)},v.readAsArrayBuffer(o)}else try{s(JSON.stringify(o))}catch(S){console.error("Couldn't convert value into a JSON string: ",o),s(null,S)}}function Tn(o){if(o.substring(0,Ve)!==xe)return JSON.parse(o);var s,a=o.substring(jt),m=o.substring(Ve,jt);if(m===Ge&&It.test(a)){var f=a.match(It);s=f[1],a=a.substring(f[0].length)}var v=$t(a);switch(m){case Xe:return v;case Ge:return C([v],{type:s});case Rt:return new Int8Array(v);case Pt:return new Uint8Array(v);case At:return new Uint8ClampedArray(v);case Dt:return new Int16Array(v);case Tt:return new Uint16Array(v);case Nt:return new Int32Array(v);case Ot:return new Uint32Array(v);case Ut:return new Float32Array(v);case Wt:return new Float64Array(v);default:throw new Error("Unkown type: "+m)}}var Ye={serialize:Nn,deserialize:Tn,stringToBuffer:$t,bufferToString:Ke};function Ht(o,s,a,m){o.executeSql("CREATE TABLE IF NOT EXISTS "+s.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],a,m)}function On(o){var s=this,a={db:null};if(o)for(var m in o)a[m]=typeof o[m]!="string"?o[m].toString():o[m];var f=new x(function(v,S){try{a.db=openDatabase(a.name,String(a.version),a.description,a.size)}catch(E){return S(E)}a.db.transaction(function(E){Ht(E,a,function(){s._dbInfo=a,v()},function(k,z){S(z)})},S)});return a.serializer=Ye,f}function se(o,s,a,m,f,v){o.executeSql(a,m,f,function(S,E){E.code===E.SYNTAX_ERR?S.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[s.storeName],function(k,z){z.rows.length?v(k,E):Ht(k,s,function(){k.executeSql(a,m,f,v)},v)},v):v(S,E)},v)}function Un(o,s){var a=this;o=T(o);var m=new x(function(f,v){a.ready().then(function(){var S=a._dbInfo;S.db.transaction(function(E){se(E,S,"SELECT * FROM "+S.storeName+" WHERE key = ? LIMIT 1",[o],function(k,z){var L=z.rows.length?z.rows.item(0).value:null;L&&(L=S.serializer.deserialize(L)),f(L)},function(k,z){v(z)})})}).catch(v)});return _(m,s),m}function Wn(o,s){var a=this,m=new x(function(f,v){a.ready().then(function(){var S=a._dbInfo;S.db.transaction(function(E){se(E,S,"SELECT * FROM "+S.storeName,[],function(k,z){for(var L=z.rows,A=L.length,O=0;O<A;O++){var F=L.item(O),$=F.value;if($&&($=S.serializer.deserialize($)),($=o($,F.key,O+1))!==void 0)return void f($)}f()},function(k,z){v(z)})})}).catch(v)});return _(m,s),m}function qt(o,s,a,m){var f=this;o=T(o);var v=new x(function(S,E){f.ready().then(function(){s===void 0&&(s=null);var k=s,z=f._dbInfo;z.serializer.serialize(s,function(L,A){A?E(A):z.db.transaction(function(O){se(O,z,"INSERT OR REPLACE INTO "+z.storeName+" (key, value) VALUES (?, ?)",[o,L],function(){S(k)},function(F,$){E($)})},function(O){if(O.code===O.QUOTA_ERR){if(m>0)return void S(qt.apply(f,[o,k,a,m-1]));E(O)}})})}).catch(E)});return _(v,a),v}function jn(o,s,a){return qt.apply(this,[o,s,a,1])}function Fn(o,s){var a=this;o=T(o);var m=new x(function(f,v){a.ready().then(function(){var S=a._dbInfo;S.db.transaction(function(E){se(E,S,"DELETE FROM "+S.storeName+" WHERE key = ?",[o],function(){f()},function(k,z){v(z)})})}).catch(v)});return _(m,s),m}function $n(o){var s=this,a=new x(function(m,f){s.ready().then(function(){var v=s._dbInfo;v.db.transaction(function(S){se(S,v,"DELETE FROM "+v.storeName,[],function(){m()},function(E,k){f(k)})})}).catch(f)});return _(a,o),a}function Hn(o){var s=this,a=new x(function(m,f){s.ready().then(function(){var v=s._dbInfo;v.db.transaction(function(S){se(S,v,"SELECT COUNT(key) as c FROM "+v.storeName,[],function(E,k){var z=k.rows.item(0).c;m(z)},function(E,k){f(k)})})}).catch(f)});return _(a,o),a}function qn(o,s){var a=this,m=new x(function(f,v){a.ready().then(function(){var S=a._dbInfo;S.db.transaction(function(E){se(E,S,"SELECT key FROM "+S.storeName+" WHERE id = ? LIMIT 1",[o+1],function(k,z){var L=z.rows.length?z.rows.item(0).key:null;f(L)},function(k,z){v(z)})})}).catch(v)});return _(m,s),m}function Vn(o){var s=this,a=new x(function(m,f){s.ready().then(function(){var v=s._dbInfo;v.db.transaction(function(S){se(S,v,"SELECT key FROM "+v.storeName,[],function(E,k){for(var z=[],L=0;L<k.rows.length;L++)z.push(k.rows.item(L).key);m(z)},function(E,k){f(k)})})}).catch(f)});return _(a,o),a}function Xn(o){return new x(function(s,a){o.transaction(function(m){m.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(f,v){for(var S=[],E=0;E<v.rows.length;E++)S.push(v.rows.item(E).name);s({db:o,storeNames:S})},function(f,v){a(v)})},function(m){a(m)})})}function Gn(o,s){s=N.apply(this,arguments);var a=this.config();(o=typeof o!="function"&&o||{}).name||(o.name=o.name||a.name,o.storeName=o.storeName||a.storeName);var m,f=this;return _(m=o.name?new x(function(v){var S;S=o.name===a.name?f._dbInfo.db:openDatabase(o.name,"","",0),o.storeName?v({db:S,storeNames:[o.storeName]}):v(Xn(S))}).then(function(v){return new x(function(S,E){v.db.transaction(function(k){function z(F){return new x(function($,ee){k.executeSql("DROP TABLE IF EXISTS "+F,[],function(){$()},function(Kt,ye){ee(ye)})})}for(var L=[],A=0,O=v.storeNames.length;A<O;A++)L.push(z(v.storeNames[A]));x.all(L).then(function(){S()}).catch(function(F){E(F)})},function(k){E(k)})})}):x.reject("Invalid arguments"),s),m}var Kn={_driver:"webSQLStorage",_initStorage:On,_support:An(),iterate:Wn,getItem:Un,setItem:jn,removeItem:Fn,clear:$n,length:Hn,key:qn,keys:Vn,dropInstance:Gn};function Yn(){try{return typeof localStorage!="undefined"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function Vt(o,s){var a=o.name+"/";return o.storeName!==s.storeName&&(a+=o.storeName+"/"),a}function Jn(){var o="_localforage_support_test";try{return localStorage.setItem(o,!0),localStorage.removeItem(o),!1}catch{return!0}}function Zn(){return!Jn()||localStorage.length>0}function Qn(o){var s=this,a={};if(o)for(var m in o)a[m]=o[m];return a.keyPrefix=Vt(o,s._defaultConfig),Zn()?(s._dbInfo=a,a.serializer=Ye,x.resolve()):x.reject()}function ei(o){var s=this,a=s.ready().then(function(){for(var m=s._dbInfo.keyPrefix,f=localStorage.length-1;f>=0;f--){var v=localStorage.key(f);v.indexOf(m)===0&&localStorage.removeItem(v)}});return _(a,o),a}function ti(o,s){var a=this;o=T(o);var m=a.ready().then(function(){var f=a._dbInfo,v=localStorage.getItem(f.keyPrefix+o);return v&&(v=f.serializer.deserialize(v)),v});return _(m,s),m}function ni(o,s){var a=this,m=a.ready().then(function(){for(var f=a._dbInfo,v=f.keyPrefix,S=v.length,E=localStorage.length,k=1,z=0;z<E;z++){var L=localStorage.key(z);if(L.indexOf(v)===0){var A=localStorage.getItem(L);if(A&&(A=f.serializer.deserialize(A)),(A=o(A,L.substring(S),k++))!==void 0)return A}}});return _(m,s),m}function ii(o,s){var a=this,m=a.ready().then(function(){var f,v=a._dbInfo;try{f=localStorage.key(o)}catch{f=null}return f&&(f=f.substring(v.keyPrefix.length)),f});return _(m,s),m}function oi(o){var s=this,a=s.ready().then(function(){for(var m=s._dbInfo,f=localStorage.length,v=[],S=0;S<f;S++){var E=localStorage.key(S);E.indexOf(m.keyPrefix)===0&&v.push(E.substring(m.keyPrefix.length))}return v});return _(a,o),a}function ri(o){var s=this.keys().then(function(a){return a.length});return _(s,o),s}function si(o,s){var a=this;o=T(o);var m=a.ready().then(function(){var f=a._dbInfo;localStorage.removeItem(f.keyPrefix+o)});return _(m,s),m}function ai(o,s,a){var m=this;o=T(o);var f=m.ready().then(function(){s===void 0&&(s=null);var v=s;return new x(function(S,E){var k=m._dbInfo;k.serializer.serialize(s,function(z,L){if(L)E(L);else try{localStorage.setItem(k.keyPrefix+o,z),S(v)}catch(A){A.name!=="QuotaExceededError"&&A.name!=="NS_ERROR_DOM_QUOTA_REACHED"||E(A),E(A)}})})});return _(f,a),f}function ci(o,s){if(s=N.apply(this,arguments),!(o=typeof o!="function"&&o||{}).name){var a=this.config();o.name=o.name||a.name,o.storeName=o.storeName||a.storeName}var m,f=this;return _(m=o.name?new x(function(v){o.storeName?v(Vt(o,f._defaultConfig)):v(o.name+"/")}).then(function(v){for(var S=localStorage.length-1;S>=0;S--){var E=localStorage.key(S);E.indexOf(v)===0&&localStorage.removeItem(E)}}):x.reject("Invalid arguments"),s),m}var ui={_driver:"localStorageWrapper",_initStorage:Qn,_support:Yn(),iterate:ni,getItem:ti,setItem:ai,removeItem:si,clear:ei,length:ri,key:ii,keys:oi,dropInstance:ci},li=function(o,s){return o===s||typeof o=="number"&&typeof s=="number"&&isNaN(o)&&isNaN(s)},hi=function(o,s){for(var a=o.length,m=0;m<a;){if(li(o[m],s))return!0;m++}return!1},Xt=Array.isArray||function(o){return Object.prototype.toString.call(o)==="[object Array]"},ve={},Gt={},fe={INDEXEDDB:Pn,WEBSQL:Kn,LOCALSTORAGE:ui},di=[fe.INDEXEDDB._driver,fe.WEBSQL._driver,fe.LOCALSTORAGE._driver],Ee=["dropInstance"],Je=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Ee),fi={description:"",driver:di.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function pi(o,s){o[s]=function(){var a=arguments;return o.ready().then(function(){return o[s].apply(o,a)})}}function Ze(){for(var o=1;o<arguments.length;o++){var s=arguments[o];if(s)for(var a in s)s.hasOwnProperty(a)&&(Xt(s[a])?arguments[0][a]=s[a].slice():arguments[0][a]=s[a])}return arguments[0]}var mi=new(function(){function o(s){for(var a in r(this,o),fe)if(fe.hasOwnProperty(a)){var m=fe[a],f=m._driver;this[a]=f,ve[f]||this.defineDriver(m)}this._defaultConfig=Ze({},fi),this._config=Ze({},this._defaultConfig,s),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return o.prototype.config=function(s){if((s===void 0?"undefined":i(s))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var a in s){if(a==="storeName"&&(s[a]=s[a].replace(/\W/g,"_")),a==="version"&&typeof s[a]!="number")return new Error("Database version must be a number.");this._config[a]=s[a]}return!("driver"in s)||!s.driver||this.setDriver(this._config.driver)}return typeof s=="string"?this._config[s]:this._config},o.prototype.defineDriver=function(s,a,m){var f=new x(function(v,S){try{var E=s._driver,k=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!s._driver)return void S(k);for(var z=Je.concat("_initStorage"),L=0,A=z.length;L<A;L++){var O=z[L];if((!hi(Ee,O)||s[O])&&typeof s[O]!="function")return void S(k)}(function(){for(var $=function(gi){return function(){var vi=new Error("Method "+gi+" is not implemented by the current driver"),Yt=x.reject(vi);return _(Yt,arguments[arguments.length-1]),Yt}},ee=0,Kt=Ee.length;ee<Kt;ee++){var ye=Ee[ee];s[ye]||(s[ye]=$(ye))}})();var F=function($){ve[E]&&console.info("Redefining LocalForage driver: "+E),ve[E]=s,Gt[E]=$,v()};"_support"in s?s._support&&typeof s._support=="function"?s._support().then(F,S):F(!!s._support):F(!0)}catch($){S($)}});return M(f,a,m),f},o.prototype.driver=function(){return this._driver||null},o.prototype.getDriver=function(s,a,m){var f=ve[s]?x.resolve(ve[s]):x.reject(new Error("Driver not found."));return M(f,a,m),f},o.prototype.getSerializer=function(s){var a=x.resolve(Ye);return M(a,s),a},o.prototype.ready=function(s){var a=this,m=a._driverSet.then(function(){return a._ready===null&&(a._ready=a._initDriver()),a._ready});return M(m,s,s),m},o.prototype.setDriver=function(s,a,m){var f=this;Xt(s)||(s=[s]);var v=this._getSupportedDrivers(s);function S(){f._config.driver=f.driver()}function E(L){return f._extend(L),S(),f._ready=f._initStorage(f._config),f._ready}function k(L){return function(){var A=0;function O(){for(;A<L.length;){var F=L[A];return A++,f._dbInfo=null,f._ready=null,f.getDriver(F).then(E).catch(O)}S();var $=new Error("No available storage method found.");return f._driverSet=x.reject($),f._driverSet}return O()}}var z=this._driverSet!==null?this._driverSet.catch(function(){return x.resolve()}):x.resolve();return this._driverSet=z.then(function(){var L=v[0];return f._dbInfo=null,f._ready=null,f.getDriver(L).then(function(A){f._driver=A._driver,S(),f._wrapLibraryMethodsWithReady(),f._initDriver=k(v)})}).catch(function(){S();var L=new Error("No available storage method found.");return f._driverSet=x.reject(L),f._driverSet}),M(this._driverSet,a,m),this._driverSet},o.prototype.supports=function(s){return!!Gt[s]},o.prototype._extend=function(s){Ze(this,s)},o.prototype._getSupportedDrivers=function(s){for(var a=[],m=0,f=s.length;m<f;m++){var v=s[m];this.supports(v)&&a.push(v)}return a},o.prototype._wrapLibraryMethodsWithReady=function(){for(var s=0,a=Je.length;s<a;s++)pi(this,Je[s])},o.prototype.createInstance=function(s){return new o(s)},o}());t.exports=mi},{3:3}]},{},[4])(4),hn={exports:{}};(function(e){hn.exports=(()=>{const t=typeof window=="object"?window:this;t.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");let n=null,i=!1;const r=t.WebStreamsPolyfill||{},l=t.isSecureContext;let w=/constructor/i.test(t.HTMLElement)||!!t.safari||!!t.WebKitPoint;const y=l||"MozAppearance"in document.documentElement.style?"iframe":"navigate",C={createWriteStream:function(_,M,T){let N={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},I=0,b=null,c=null,h=null;if(Number.isFinite(M)?([T,M]=[M,T],console.warn("[StreamSaver] Depricated pass an object as 2nd argument when creating a write stream"),N.size=T,N.writableStrategy=M):M&&M.highWaterMark?(console.warn("[StreamSaver] Depricated pass an object as 2nd argument when creating a write stream"),N.size=T,N.writableStrategy=M):N=M||{},!w){n||(n=l?x(C.mitm):function(P){const B="width=200,height=100",R=document.createDocumentFragment(),U={frame:t.open(P,"popup",B),loaded:!1,isIframe:!1,isPopup:!0,remove(){U.frame.close()},addEventListener(...j){R.addEventListener(...j)},dispatchEvent(...j){R.dispatchEvent(...j)},removeEventListener(...j){R.removeEventListener(...j)},postMessage(...j){U.frame.postMessage(...j)}},W=j=>{j.source===U.frame&&(U.loaded=!0,t.removeEventListener("message",W),U.dispatchEvent(new Event("load")))};return t.addEventListener("message",W),U}(C.mitm)),c=new MessageChannel,_=encodeURIComponent(_.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const u={transferringReadable:i,pathname:N.pathname||Math.random().toString().slice(-6)+"/"+_,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+_}};N.size&&(u.headers["Content-Length"]=N.size);const p=[u,"*",[c.port2]];if(i){const P=y==="iframe"?void 0:{transform(R,U){if(!(R instanceof Uint8Array))throw new TypeError("Can only wirte Uint8Arrays");I+=R.length,U.enqueue(R),b&&(location.href=b,b=null)},flush(){b&&(location.href=b)}};h=new C.TransformStream(P,N.writableStrategy,N.readableStrategy);const B=h.readable;c.port1.postMessage({readableStream:B},[B])}c.port1.onmessage=P=>{P.data.download&&(y==="navigate"?(n.remove(),n=null,I?location.href=P.data.download:b=P.data.download):(n.isPopup&&(n.remove(),n=null,y==="iframe"&&x(C.mitm)),x(P.data.download)))},n.loaded?n.postMessage(...p):n.addEventListener("load",()=>{n.postMessage(...p)},{once:!0})}let d=[];return!w&&h&&h.writable||new C.WritableStream({write(u){if(!(u instanceof Uint8Array))throw new TypeError("Can only wirte Uint8Arrays");w?d.push(u):(c.port1.postMessage(u),I+=u.length,b&&(location.href=b,b=null))},close(){if(w){const u=new Blob(d,{type:"application/octet-stream; charset=utf-8"}),p=document.createElement("a");p.href=URL.createObjectURL(u),p.download=_,p.click()}else c.port1.postMessage("end")},abort(){d=[],c.port1.postMessage("abort"),c.port1.onmessage=null,c.port1.close(),c.port2.close(),c=null}},N.writableStrategy)},WritableStream:t.WritableStream||r.WritableStream,supported:!0,version:{full:"2.0.5",major:2,minor:0,dot:5},mitm:"/mitm.html"};function x(_){if(!_)throw new Error("meh");const M=document.createElement("iframe");return M.hidden=!0,M.src=_,M.loaded=!1,M.name="iframe",M.isIframe=!0,M.postMessage=(...T)=>M.contentWindow.postMessage(...T),M.addEventListener("load",()=>{M.loaded=!0},{once:!0}),document.body.appendChild(M),M}try{new Response(new ReadableStream),l&&!("serviceWorker"in navigator)&&(w=!0)}catch{w=!0}return(_=>{try{_()}catch{}})(()=>{const{readable:_}=new TransformStream,M=new MessageChannel;M.port1.postMessage(_,[_]),M.port1.close(),M.port2.close(),i=!0,Object.defineProperty(C,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})}),C})()})();var Ti=hn.exports;const Oi=Object.prototype.toString;function G(e,t){return Oi.call(e)===`[object ${t}]`}function yt(e){return G(e,"Function")}const dn=e=>e!==void 0,wt=e=>!dn(e);function bt(e){return e===null}const he=e=>e!==null&&G(e,"Object");function Be(e){return G(e,"String")}function fn(e){return e&&Array.isArray(e)}const Ui=typeof window=="undefined",K=g.reactive({panelGroups:{}}),pn=()=>({useGroupAccordion:e=>g.computed(()=>K.panelGroups[e].accordion),setGroupAccordionStatus:(e,t)=>{K.panelGroups[e]={...K.panelGroups[e],accordion:t}},panelExpanded:(e,t)=>g.computed(()=>K.panelGroups[e]?.panelExpandStatus?.[t]||!1),setPanelExpandedStatus:(e,t,n)=>{K.panelGroups[e]={...K.panelGroups[e],panelExpandStatus:{...K.panelGroups[e]?.panelExpandStatus||{},[t]:n}}},togglePanelExpandedStatus:(e,t)=>{K.panelGroups[e].accordion&&(K.panelGroups[e].panelExpandStatus[t]||Object.keys(K.panelGroups[e].panelExpandStatus).forEach(n=>{K.panelGroups[e].panelExpandStatus[n]=!1})),K.panelGroups[e].panelExpandStatus[t]=!K.panelGroups[e].panelExpandStatus[t]}}),St=e=>e>255?255:e<0?0:e,Ie=(e,t)=>{const n=e.replace("#",""),i=parseInt(n,16),r=St((i>>16)+t),l=St((i>>8&255)+t);return"#"+(St((255&i)+t)|l<<8|r<<16).toString(16)};var Re=g.defineComponent({name:"VueCollapsiblePanelGroup",props:{accordion:{type:Boolean,default:!1},baseColor:{type:String,default:"#333333"}},setup(e){const t=g.ref(`group-${ze()}`),{setGroupAccordionStatus:n}=pn(),i={"--base-color":e.baseColor,"--border-color":Ie(e.baseColor,180),"--bg-color-header":Ie(e.baseColor,140),"--bg-color-header-hover":Ie(e.baseColor,190),"--bg-color-header-active":Ie(e.baseColor,200),"--bg-color-body":"#fff"};return n(t.value,e.accordion),{idGroup:t,cssColorVars:i}}});const Wi=["data-id-group"];Re.render=function(e,t,n,i,r,l){return g.openBlock(),g.createElementBlock("div",{"data-id-group":e.idGroup,style:g.normalizeStyle(e.cssColorVars),class:"vcpg"},[g.renderSlot(e.$slots,"default")],12,Wi)},Re.__scopeId="data-v-23ab5317",Re.__file="src/controls/collapsepanel/VCollapsiblePanelGroup.vue";var Pe=g.defineComponent({name:"VueCollapsiblePanel",props:{expanded:{type:Boolean,default:!0}},setup(e,t){const n=`panel-${ze()}`,i=g.ref(),r=g.ref(),l=g.ref(),{panelExpanded:w,togglePanelExpandedStatus:y,setPanelExpandedStatus:C}=pn(),x=g.computed(()=>({hasContent:t.slots.content&&t.slots.content()[0].children.length>0,dataKey:ze()})),_=g.computed(()=>i.value?.parentElement?.getAttribute("data-id-group")||""),M=g.computed(()=>w(_.value,n).value&&x.value.hasContent);return g.onMounted(()=>{C(_.value,n,e.expanded)}),g.onUpdated(()=>{(async()=>(await g.nextTick(),r.value&&l.value&&(r.value.style.height=`${Math.min(l.value.scrollHeight,r.value.scrollHeight)}px`)))()}),{body:x,panelRef:i,bodyRef:r,bodyContentRef:l,isExpanded:M,collapse:T=>{T.style.height="0"},expand:T=>{T.style.height=`${T.scrollHeight}px`},toggle:()=>{x.value.hasContent&&y(_.value,n)},toggleIcon:`
|
|
8
3
|
<svg
|
|
9
4
|
width="24px"
|
|
10
5
|
height="24px"
|
|
@@ -14,4 +9,4 @@
|
|
|
14
9
|
>
|
|
15
10
|
<path d="M6.34292 7.75734L4.92871 9.17155L11.9998 16.2426L19.0708 9.17158L17.6566 7.75737L11.9998 13.4142L6.34292 7.75734Z"/>
|
|
16
11
|
</svg>
|
|
17
|
-
`}}});const Ne={class:"vcp__header-title"},De={key:0,class:"vcp__header-icon"},Te=["innerHTML"],Oe={key:0,ref:"bodyRef",class:"vcp__body"},je={ref:"bodyContentRef",class:"vcp__body-content"};function Ue(_t){return window.TouchEvent&&_t instanceof TouchEvent}Le.render=function(_t,It,Mt,Pt,Lt,Tt){return e.openBlock(),e.createElementBlock("section",{ref:"panelRef",class:e.normalizeClass(["vcp",{"vcp--expanded":_t.isExpanded,"vcp--expandable":_t.body.hasContent}])},[e.createElementVNode("header",{class:"vcp__header",onClick:It[0]||(It[0]=(...qt)=>_t.toggle&&_t.toggle(...qt))},[e.createElementVNode("div",Ne,[e.renderSlot(_t.$slots,"title")]),_t.body.hasContent?(e.openBlock(),e.createElementBlock("div",De,[e.renderSlot(_t.$slots,"icon",{},()=>[e.createElementVNode("span",{innerHTML:_t.toggleIcon},null,8,Te)])])):e.createCommentVNode("v-if",!0)]),e.createVNode(e.Transition,{"data-key":_t.body.dataKey,name:"slide",onBeforeEnter:_t.collapse,onEnter:_t.expand,onBeforeLeave:_t.expand,onLeave:_t.collapse},{default:e.withCtx(()=>[_t.isExpanded?(e.openBlock(),e.createElementBlock("div",Oe,[e.createElementVNode("div",je,[e.renderSlot(_t.$slots,"content")],512)],512)):e.createCommentVNode("v-if",!0)]),_:3},8,["data-key","onBeforeEnter","onEnter","onBeforeLeave","onLeave"])],2)},Le.__scopeId="data-v-08c94cf8",Le.__file="src/controls/collapsepanel/VCollapsiblePanel.vue";class Fe{constructor(It){this.e=It}stopPropagation(){this.e.stopPropagation()}preventDefault(){this.e.preventDefault()}get clientX(){return Ue(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientX:this.e.clientX}get clientY(){return Ue(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientY:this.e.clientY}get clientCoord(){return new $e(this.clientX,this.clientY)}static bindDown(It,Mt,Pt,Lt=!1){const Tt=Xt=>{Mt(new Fe(Xt))},qt=Xt=>{Xt.touches.length===1&&Mt(new Fe(Xt)),Xt.touches.length>1&&Pt&&Pt(new Fe(Xt))};return It.addEventListener("mousedown",Tt,Lt),It.addEventListener("touchstart",qt,Lt),()=>{It.removeEventListener("mousedown",Tt,Lt),It.removeEventListener("touchstart",qt,Lt)}}static bindMove(It,Mt,Pt=!1){const Lt=qt=>{Mt(new Fe(qt))},Tt=qt=>{qt.touches.length===1&&Mt(new Fe(qt))};return It.addEventListener("mousemove",Lt,Pt),It.addEventListener("touchmove",Tt,Pt),()=>{It.removeEventListener("mousemove",Lt,Pt),It.removeEventListener("touchmove",Tt,Pt)}}static bindUp(It,Mt,Pt=!1){const Lt=qt=>{Mt(new Fe(qt))},Tt=qt=>{qt.touches.length===0&&Mt(new Fe(qt))};return It.addEventListener("mouseup",Lt,Pt),It.addEventListener("touchend",Tt,Pt),()=>{It.removeEventListener("mouseup",Lt,Pt),It.removeEventListener("touchend",Tt,Pt)}}originalEvent({mouse:It,touch:Mt}){Ue(this.e)?Mt&&Mt(this.e):It&&It(this.e)}}class $e{constructor(It,Mt){this.x=It,this.y=Mt}clone(){return new $e(this.x,this.y)}}class He{constructor(It,Mt,Pt={}){this.mousedown=Lt=>{if(Lt.preventDefault(),this.handle){const{left:Tt,top:qt}=this.handle.getBoundingClientRect();this.offsetX=Lt.clientX-Tt,this.offsetY=Lt.clientY-qt}this.options.onMoveStart&&this.options.onMoveStart(),this.unbindMove=Fe.bindMove(document,this.mousemove),this.unbindUp=Fe.bindUp(document,this.mouseup)},this.mousemove=Lt=>{this.container&&(this.container.style.left=Lt.clientX-this.offsetX+"px",this.container.style.top=Lt.clientY-this.offsetY+"px"),this.options.onMove&&this.options.onMove()},this.mouseup=Lt=>{this.options.onMoveEnd&&this.options.onMoveEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0},this.handle=It,this.container=Mt,this.options=Pt,It&&(this.unbindDown=Fe.bindDown(It,this.mousedown),It.classList.add("draggable-handle"))}teardown(){this.handle?.classList.remove("draggable-handle"),this.unbindDown&&this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove()}}class qe{constructor(It,Mt){this._group=It,this.onChange=Mt,this.a(Pt=>Pt.push(this))}set group(It){this._group=It;const Mt=Xe(this._group),Pt=Xe(It);Mt.splice(Mt.indexOf(this),1),Pt.push(this),Ve()}get group(){return this._group}unregister(){this.a(It=>It.splice(It.indexOf(this),1))}raise(){this.a(It=>{It.splice(It.indexOf(this),1),It.push(this)})}a(It){It(Xe(this._group)),Ve()}}const We=new Map;function Xe(_t){return We.has(_t)||We.set(_t,[]),We.get(_t)}function Ge(_t,It){return _t>It?-Ge(It,_t):_t<0&&It>=0?1:_t-It}function Ve(){let _t=0;for(const It of function(Mt){const Pt=[];return Mt.forEach((Lt,Tt)=>Pt.push(Tt)),Pt}(We).sort(Ge))for(const Mt of Xe(It))_t!=Mt.zIndex&&(Mt.zIndex=_t,Mt.onChange(_t)),_t++}function Ke(_t){if(_t){const{width:It,height:Mt}=_t.style;_t.style.width="auto",_t.style.height="auto";const Pt=Ye(_t);return _t.style.width=It,_t.style.height=Mt,Pt}return{width:0,height:0,top:0,left:0,bottom:0,right:0}}function Ye(_t){const It=_t.getBoundingClientRect(),Mt=It.width,Pt=It.height,Lt=It.top,Tt=It.left;return{width:Mt,height:Pt,top:Lt,left:Tt,bottom:Lt+Pt,right:Tt+Mt}}class Je{constructor(It,Mt){if(this.container=It,this.options=Mt,It&&Mt){this.handles=Ze.map(Vt=>new Vt(It,this));const{width:Pt,height:Lt}=Ke(It),Tt=Mt.maxWidth||window.innerWidth,qt=Mt.maxHeight||window.innerHeight;let Xt=!1;(Pt<Mt.minWidth||Pt>Tt)&&(It.style.width=`${et(Pt,Mt.minWidth,Tt)}px`,Xt=!0),(Lt<Mt.minHeight||Lt>qt)&&(It.style.height=`${et(Lt,Mt.minHeight,qt)}px`,Xt=!0),Xt&&Mt.onResize&&Mt.onResize()}}teardown(){this.handles?.forEach(It=>It.teardown())}}const Ze=[];class Qe{constructor(It,Mt){this.handleSize=8,this.mousedown=Pt=>{Pt.preventDefault(),Pt.stopPropagation();const{left:Lt,top:Tt,width:qt,height:Xt}=Ye(this.container);this.x0=Pt.clientX,this.y0=Pt.clientY,this.left0=Lt,this.top0=Tt,this.width0=qt,this.height0=Xt,this.calcSafeBoundaries(),this.helper.options&&this.helper.options.onResizeStart&&this.helper.options.onResizeStart(),this.unbindMove=Fe.bindMove(document,this.mousemove),this.unbindUp=Fe.bindUp(document,this.mouseup)},this.mousemove=Pt=>{Pt.preventDefault(),Pt.stopPropagation(),this.setPosition(Pt),this.fixPosition(),this.helper.options&&this.helper.options.onResize&&this.helper.options.onResize()},this.mouseup=Pt=>{Pt.preventDefault(),Pt.stopPropagation(),this.helper.options&&this.helper.options.onResizeEnd&&this.helper.options.onResizeEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0},this.container=It,this.helper=Mt,this.handle=this.createHandleElement(),this.unbindDown=Fe.bindDown(this.handle,this.mousedown)}teardown(){this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove(),this.handle.parentElement.removeChild(this.handle)}calcSafeBoundaries(){if(!this.helper.options)return;const{left:It,top:Mt,right:Pt,bottom:Lt}=Ye(this.container),Tt=this.helper.options,qt=Tt.maxWidth||window.innerWidth,Xt=Tt.maxHeight||window.innerHeight;this.minLeft=Math.max(Pt-qt,0),this.maxLeft=Pt-Tt.minWidth,this.minRight=It+Tt.minWidth,this.maxRight=Math.min(It+qt,window.innerWidth),this.minTop=Math.max(Lt-Xt,0),this.maxTop=Lt-Tt.minHeight,this.minBottom=Mt+Tt.minHeight,this.maxBottom=Math.min(Mt+Xt,window.innerHeight)}fixPosition(){const{width:It,height:Mt,left:Pt,top:Lt,right:Tt,bottom:qt}=Ye(this.container),Xt=this.helper.options;Xt&&(Pt<this.minLeft?(this.container.style.width=It+Pt-this.minLeft+"px",this.container.style.left=`${this.minLeft}px`):Pt>this.maxLeft?(this.container.style.width=`${Xt.minWidth}px`,this.container.style.left=`${this.maxLeft}px`):Tt<this.minRight?this.container.style.width=`${Xt.minWidth}px`:Tt>this.maxRight&&(this.container.style.width=this.maxRight-Pt+"px"),Lt<this.minTop?(this.container.style.height=Mt+Lt-this.minTop+"px",this.container.style.top=`${this.minTop}px`):Lt>this.maxTop?(this.container.style.height=`${Xt.minHeight}px`,this.container.style.top=`${this.maxTop}px`):qt<this.minBottom?this.container.style.height=`${Xt.minHeight}px`:qt>this.maxBottom&&(this.container.style.height=this.maxBottom-Lt+"px"))}createHandleElement(){const It=document.createElement("div"),Mt=It.style;return Mt.position="absolute",this.applyStyle(Mt),this.container.appendChild(It),It}}function et(_t,It,Mt){return _t<It?It:_t>Mt?Mt:_t}Ze.push(class extends Qe{setPosition(_t){this.container.style.width=this.width0+_t.clientX-this.x0+"px",this.container.style.height=this.height0+_t.clientY-this.y0+"px"}applyStyle(_t){_t.width=2*this.handleSize+"px",_t.height=2*this.handleSize+"px",_t.right=-this.handleSize+"px",_t.bottom=-this.handleSize+"px",_t.cursor="nwse-resize"}},class extends Qe{setPosition(_t){this.container.style.height=this.height0+_t.clientY-this.y0+"px"}applyStyle(_t){_t.right=`${this.handleSize}px`,_t.left=`${this.handleSize}px`,_t.height=2*this.handleSize+"px",_t.bottom=-this.handleSize+"px",_t.cursor="ns-resize"}},class extends Qe{setPosition(_t){this.container.style.left=this.left0+_t.clientX-this.x0+"px",this.container.style.width=this.width0-(_t.clientX-this.x0)+"px",this.container.style.height=this.height0+_t.clientY-this.y0+"px"}applyStyle(_t){_t.left=-this.handleSize+"px",_t.bottom=-this.handleSize+"px",_t.width=2*this.handleSize+"px",_t.height=2*this.handleSize+"px",_t.cursor="nesw-resize"}},class extends Qe{setPosition(_t){this.container.style.left=this.left0+_t.clientX-this.x0+"px",this.container.style.width=this.width0-(_t.clientX-this.x0)+"px"}applyStyle(_t){_t.left=-this.handleSize+"px",_t.bottom=`${this.handleSize}px`,_t.width=2*this.handleSize+"px",_t.top=`${this.handleSize}px`,_t.cursor="ew-resize"}},class extends Qe{setPosition(_t){this.container.style.left=this.left0+_t.clientX-this.x0+"px",this.container.style.width=this.width0-(_t.clientX-this.x0)+"px",this.container.style.top=this.top0+_t.clientY-this.y0+"px",this.container.style.height=this.height0-(_t.clientY-this.y0)+"px"}applyStyle(_t){_t.left=-this.handleSize+"px",_t.top=-this.handleSize+"px",_t.width=2*this.handleSize+"px",_t.height=2*this.handleSize+"px",_t.cursor="nwse-resize"}},class extends Qe{setPosition(_t){this.container.style.top=this.top0+_t.clientY-this.y0+"px",this.container.style.height=this.height0-(_t.clientY-this.y0)+"px"}applyStyle(_t){_t.left=`${this.handleSize}px`,_t.right=`${this.handleSize}px`,_t.height=2*this.handleSize+"px",_t.top=-this.handleSize+"px",_t.cursor="ns-resize"}},class extends Qe{setPosition(_t){this.container.style.top=this.top0+_t.clientY-this.y0+"px",this.container.style.height=this.height0-(_t.clientY-this.y0)+"px",this.container.style.width=this.width0+_t.clientX-this.x0+"px"}applyStyle(_t){_t.right=-this.handleSize+"px",_t.top=-this.handleSize+"px",_t.height=2*this.handleSize+"px",_t.width=2*this.handleSize+"px",_t.cursor="nesw-resize"}},class extends Qe{setPosition(_t){this.container.style.width=this.width0+_t.clientX-this.x0+"px"}applyStyle(_t){_t.right=-this.handleSize+"px",_t.top=`${this.handleSize}px`,_t.bottom=`${this.handleSize}px`,_t.width=2*this.handleSize+"px",_t.cursor="ew-resize"}});var tt=e.defineComponent({name:"",props:{disabled:{type:Boolean,default:!1},windowStyle:{type:Object,required:!0}},components:{},setup(_t){const It=e.ref(!1),Mt=e.ref(!1);return{hover:It,active:Mt,style:function(){let Pt=_t.windowStyle.button;return It.value&&(Pt={...Pt,...this.windowStyle.buttonHover}),Mt.value&&(Pt={...Pt,...this.windowStyle.buttonActive}),Pt},mouseup:function(Pt){this.active&&this.$emit("click")},mousedown:function(Pt){Pt.preventDefault(),Mt.value=!0;const Lt=Fe.bindUp(document,()=>{Mt.value=!1,Lt()})}}}});const nt=["disabled"];tt.render=function(_t,It,Mt,Pt,Lt,Tt){return e.openBlock(),e.createElementBlock("div",{class:"btn",style:e.normalizeStyle(_t.style()),onMouseenter:It[0]||(It[0]=qt=>_t.hover=!0),onMouseleave:It[1]||(It[1]=qt=>_t.hover=!1),onMousedown:It[2]||(It[2]=e.withModifiers((...qt)=>_t.mousedown&&_t.mousedown(...qt),["stop"])),onTouchstart:It[3]||(It[3]=e.withModifiers((...qt)=>_t.mousedown&&_t.mousedown(...qt),["stop"])),onMouseup:It[4]||(It[4]=(...qt)=>_t.mouseup&&_t.mouseup(...qt)),onTouchend:It[5]||(It[5]=(...qt)=>_t.mouseup&&_t.mouseup(...qt)),disabled:_t.disabled},[e.renderSlot(_t.$slots,"default")],44,nt)},tt.__scopeId="data-v-71662210",tt.__file="src/controls/vuewindow/window/Button.vue";const it=new Set;function rt(_t){return _t!==null?parseFloat(_t):0}function ot(_t){const It=window.getComputedStyle(_t);return{width:Math.ceil([It.paddingLeft,It.width,It.paddingRight].map(rt).reduce((Mt,Pt)=>Mt+Pt)),height:Math.ceil([It.paddingTop,It.height,It.paddingBottom].map(rt).reduce((Mt,Pt)=>Mt+Pt))}}class st{constructor(It,Mt){this.width=It,this.height=Mt}}function at(_t){const It=_t.windowEl;if(It){const Mt=parseFloat(It.style.left||"NaN"),Pt=parseFloat(It.style.top||"NaN");if(!isNaN(Mt)&&!isNaN(Pt))return{left:Mt,top:Pt}}return null}function ct(_t,It,Mt,Pt){const Lt=_t-Mt,Tt=It-Pt;return Lt*Lt+Tt*Tt}window.addEventListener("resize",_t=>{it.forEach(It=>{It?.fixPosition()})});const ut=[];var lt=e.defineComponent({name:"Window",props:{windowStyle:{type:Object,required:!0},isOpen:{type:Boolean,required:!1,default:!0},title:{type:String,required:!0,default:""},closeButton:{type:Boolean,required:!1,default:!0},resizable:{type:Boolean,required:!1,default:!1},isScrollable:{type:Boolean,required:!1,default:!1},padding:{type:Number,required:!1,default:8},activateWhenOpen:{type:Boolean,required:!1,default:!0},positionHint:{type:String,required:!1,default:""},zGroup:{type:Number,required:!1,default:1},overflow:{type:String,required:!1,default:"visible"},minWidth:{type:Number,required:!1,default:1},minHeight:{type:Number,required:!1,default:0},maxWidth:{type:Number,required:!1,default:0},maxHeight:{type:Number,required:!1,default:0},height:{type:Number,required:!1},width:{type:Number,required:!1},top:{type:Number,required:!1},left:{type:Number,required:!1}},components:{myButton:tt},setup(_t,{emit:It}){const Mt=e.getCurrentInstance();if(!Mt)return;const{proxy:Pt}=Mt;let Lt=0,Tt,qt,Xt;const Vt=e.ref(_t.isOpen),Yt=()=>{ut.push(Pt),Xt=new qe(_t.zGroup,Qt),_t.isOpen&&(e.nextTick(()=>{Lt++==0&&(jt(Pt),function(){const tn=nn.value,{width:rn,height:hn}=Ke(tn);let dn,pn;if(_t.left!==void 0!=(_t.top!==void 0))throw new Error("Either of left or top is specified. Both must be set or not set.");if(typeof _t.left=="number")dn=_t.left,pn=_t.top;else{const vn=_t.positionHint||"auto";switch(vn){case"auto":{let gn=20,yn=50,bn=0;do{if(ut.every(wn=>{if(!wn.isOpen||Pt==wn)return!0;const Sn=at(wn);if(Sn==null)return!0;const{left:Rn,top:An}=Sn;return ct(Rn,An,gn,yn)>16}))break;gn=(gn+40)%(window.innerWidth-200),yn=(yn+40)%(window.innerHeight-200)}while(++bn<100);dn=gn,pn=yn}break;case"center":dn=(window.innerWidth-rn)/2,pn=(window.innerHeight-hn)/2,console.log(dn,pn,window.innerWidth,window.innerHeight,"111111");break;default:try{const gn=vn.split("/").map(Number);if(gn.length!=2)throw null;const[yn,bn]=gn;if(!isFinite(yn)||!isFinite(bn))throw null;dn=yn>=0?yn:window.innerWidth-rn+yn,pn=bn>=0?bn:window.innerHeight-hn+bn}catch{throw new Error(`invalid position string: ${vn}`)}}}tn&&(tn.style.left=`${dn}px`,tn.style.top=`${pn}px`)}()),_t.resizable&&Dt(),on(),Tt=new He(cn.value,nn.value,{onMove:()=>on(),onMoveStart:()=>It("move-start"),onMoveEnd:()=>It("move-end")}),_t.resizable&&function(){const{height:tn}=Ke(cn.value);qt=new Je(nn.value,{onResize:()=>Dt(),onResizeStart:()=>It("resize-start"),onResizeEnd:()=>It("resize-end"),minWidth:_t.minWidth,minHeight:_t.minHeight+tn,maxWidth:_t.maxWidth,maxHeight:_t.maxHeight?_t.maxHeight+tn:void 0})}()}),_t.activateWhenOpen&&sn()),it.add(Pt)};function Qt(tn){Wt.value.zIndex=`${tn}`}const nn=e.ref(null),cn=e.ref(null),ln=e.ref(null);function sn(){Xt.raise(),It("activate")}const Wt=e.ref({..._t.windowStyle.window,zIndex:"auto",overflow:_t.overflow}),Nt=e.computed(()=>_t.windowStyle.titlebar),Ot=e.computed(()=>{const tn={..._t.windowStyle.content};return _t.resizable?tn.padding="0":_t.padding!=null&&(tn.padding=`${_t.padding}px`),_t.isScrollable&&(tn.overflow="auto"),tn});function jt(tn){const{width:rn,height:hn,top:dn,left:pn}=tn,vn=nn;if(vn&&rn!=null&&(vn.value.style.width=`${rn}px`),hn!=null){const gn=cn.value;if(gn){const yn=ot(gn).height;vn.value.style.height=`${hn+yn}px`}}vn&&pn!=null&&(vn.value.style.left=`${pn}px`),vn&&dn!=null&&(vn.value.style.top=`${dn}px`)}function Dt(tn=!0){const rn=nn.value,hn=cn.value,dn=ln.value;if(dn&&rn&&hn){const{width:pn,height:vn}=ot(dn),{width:gn,height:yn}=ot(rn),bn=ot(hn).height,wn=gn-(dn.offsetWidth-pn),Sn=yn-bn-(dn.offsetHeight-vn);dn.style.width=`${wn}px`,dn.style.height=`${Sn}px`,Ht(),It("resize",new st(wn,Sn)),tn&&(It("update:width",wn),It("update:height",Sn))}}function Ht(){const tn=nn.value;if(tn){const rn=tn.getBoundingClientRect();rn.left<0&&(Wt.value.left="0px"),rn.top<0&&(Wt.value.top="0px"),rn.right>window.innerWidth&&(Wt.value.left=window.innerWidth-rn.width+"px"),rn.bottom>window.innerHeight&&(Wt.value.top=window.innerHeight-rn.height+"px")}}function on(tn=!0){Ht();const rn=nn.value;if(rn){const{left:hn,top:dn}=rn.getBoundingClientRect();tn&&(It("update:left",hn),It("update:top",dn))}}return e.watch(()=>_t.isOpen,tn=>{Vt.value=tn}),e.watch(()=>_t.zGroup,tn=>{Xt.group=tn}),e.watch(()=>_t.width,tn=>{jt({width:tn}),Dt(!1)}),e.watch(()=>_t.height,tn=>{jt({height:tn}),Dt(!1)}),e.onMounted(()=>{Yt()}),e.onBeforeUnmount(()=>{it.delete(this),Xt.unregister(),qt&&qt.teardown(),Tt&&Tt.teardown(),ut.splice(ut.indexOf(Pt),1)}),{isOpen:Vt,windowEl:nn,titlebar:cn,content:ln,activate:sn,styleWindow:Wt,styleTitlebar:Nt,styleContent:Ot,closeButtonClick:function(){Vt.value=!1,It("closebuttonclick")}}}});const ht={class:"title"},dt=e.createTextVNode("\xD7");var pt,ft;lt.render=function(_t,It,Mt,Pt,Lt,Tt){const qt=e.resolveComponent("myButton");return e.openBlock(),e.createBlock(e.Transition,{name:"fade",onAfterLeave:It[2]||(It[2]=Xt=>_t.$emit("close")),onAfterEnter:It[3]||(It[3]=Xt=>_t.$emit("open"))},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:"window",style:e.normalizeStyle(_t.styleWindow),ref:"windowEl",onMousedown:It[0]||(It[0]=(...Xt)=>_t.activate&&_t.activate(...Xt)),onTouchstart:It[1]||(It[1]=(...Xt)=>_t.activate&&_t.activate(...Xt))},[e.createElementVNode("div",{class:"titlebar",style:e.normalizeStyle(_t.styleTitlebar),ref:"titlebar"},[e.createElementVNode("div",ht,[_t.$slots.title?e.renderSlot(_t.$slots,"title",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(_t.title),1)],2112))]),_t.closeButton?(e.openBlock(),e.createBlock(qt,{key:0,windowStyle:_t.windowStyle,onClick:_t.closeButtonClick},{default:e.withCtx(()=>[dt]),_:1},8,["windowStyle","onClick"])):e.createCommentVNode("v-if",!0)],4),e.createElementVNode("div",{class:"content",style:e.normalizeStyle(_t.styleContent),ref:"content"},[e.renderSlot(_t.$slots,"default")],4)],36),[[e.vShow,_t.isOpen]])]),_:3})},lt.__file="src/controls/vuewindow/window/index.vue",(ft=pt||(pt={}))[ft.StyleBlack=0]="StyleBlack",ft[ft.StyleWhite=1]="StyleWhite",ft[ft.StyleMetal=2]="StyleMetal";const mt=lt,vt=new Map,gt=new Map;let yt;const wt={getDefaultClient(){if(yt||(yt=new M(SysConfig.DefaultHproseAPI)),!yt)throw Error("HproseProxy\u5BF9\u8C61\u4E3A\u7A7A");return yt},registerHprose(_t,It){const Mt=gt.get(_t);if(!Mt){const Pt=new M(It);vt.set(_t,Pt)}return Mt},getHprose:_t=>gt?.get(_t),getProxyHprose:_t=>vt.get(_t),unregisterHprose(_t){vt.get(_t)&&(gt.delete(_t),vt.delete(_t))}},bt={Login:"/api/Login/Login",CheckLogin:"\u200B/api\u200B/Check\u200B/Login",Logout:"/api/Check/ExitLogin",ChangePWD:"/api/UserManager/UpdateUserPWD",RefreshToken:"/api/Check/RefreshToken",CheckToken:"/api/Check/CheckToken"},xt=B.Config.ServiceURL.LoginAuthURL;function St(){const _t=j();_t&&F(bt.RefreshToken,xt,{refreshToken:_t}).then(It=>{Et(It.data)})}function Ct(_t){B.User||(B.User={id:_t.id,name:_t.name});const It=new Date().getTime(),Mt=new Date(_t.expire).getTime()-It;Mt>0&&(Mt<=4e3?St():setTimeout(St,Mt-4e3))}function Et(_t){B.User&&(B.User.doubleToken=_t);const It=new Date().getTime(),Mt=new Date(_t.accessToken.expires).getTime()-It;if(Mt>0&&B.User){const Pt={id:B.User.id,name:B.User.name,token:_t.accessToken.tokenContent,expire:_t.accessToken.expires,refresh:_t.refreshToken.tokenContent};D.set("access_token",Pt,Mt/1e3),Ct(Pt)}else D.remove("access_token")}function kt(_t){B.User=_t}const zt=B.Config.ServiceURL.LoginAuthURL;exports.BigFileDownload=class{constructor(_t,It,Mt=5){this.ChunkUnitM=1048576,this.totalChunks=1,this.fileMetaData=null,this.finishNum=0,this.isStarting=!1,this.fileID=_t,this.downloadURL=It,this.chunkByteSize=Mt*this.ChunkUnitM,this.eventTarget=E(),this.initIndexDB()}on(_t,It){this.eventTarget.on(_t,It)}dispatch(_t,It){this.eventTarget.emit(_t,It)}dispatchError(_t){this.eventTarget.emit("error",_t)}dispatchInfo(_t){this.eventTarget.emit("info",_t)}async queryDownloadFileMeta(_t,It="",Mt){this.dispatchInfo("\u5F00\u59CB\u83B7\u53D6\u6587\u4EF6\u4FE1\u606F");const Pt=await F(It,_t);let Lt=null;return Pt&&Pt.status===200&&(Lt=Pt.data),Lt}async getIFileMeta(){if(this.fileMetaData===null){const _t=await this.currentDB?.getItem("fileinfo");this.fileMetaData=_t||null}return this.fileMetaData}initIndexDB(){this.currentDB=me.createInstance({name:this.fileID,driver:me.INDEXEDDB})}async init(_t){if(this.finishNum=0,_t){const It="fileinfo";this.fileMetaData={id:_t.id,name:_t.name,length:_t.length,downloadID:_t.downloadID,chunkSize:this.chunkByteSize},this.fileName=_t.name,this.currentDB?.setItem(It,this.fileMetaData)}if(this.fileMetaData!=null){const It=this.fileMetaData.chunkSize;It!=null&&It>0&&(this.chunkByteSize=It)}this.fileMetaData&&(this.totalChunks=Math.ceil(this.fileMetaData.length/this.chunkByteSize)),this.dispatchInfo("\u5B8C\u6210\u521D\u59CB\u5316\u6587\u4EF6\u4FE1\u606F\uFF0C\u603B\u5206\u7247\uFF1A"+this.totalChunks),this.currentDB&&(this.keys=await this.currentDB.keys())}getTotalChunks(){return this.totalChunks}pause(){this.cancelSource&&this.isStarting&&(this.cancelSource.cancel(),this.isStarting=!1),this.dispatchInfo("\u5DF2\u6682\u505C\u4E0B\u8F7D\u4EFB\u52A1")}restart(){this.dispatchInfo("\u6B63\u5728\u91CD\u542F\u4E0B\u8F7D\u4EFB\u52A1"),this.download()}delete(){this.cancelSource&&this.cancelSource.cancel(),me.dropInstance({name:this.fileID}),this.currentDB=void 0,this.keys&&(this.keys.length=0,this.keys=void 0),this.finishNum=0,this.downloadProgress(),this.outputProgress(0),this.dispatchInfo("\u5DF2\u5220\u9664\u4E0B\u8F7D\u4EFB\u52A1")}download(_t){_t&&(this.downloadURL=_t);const It=this.downloadURL;if(!It)throw Error("\u4E0B\u8F7DURL\u4E0D\u80FD\u4E3A\u7A7A!");this.currentDB||this.initIndexDB();const Mt=B.Axios.CancelToken;this.cancelSource=Mt.source(),this.isStarting=!0;const Pt={key:this.fileMetaData?.downloadID};let Lt=0;for(let Tt=0;Tt<this.totalChunks;Tt++){if(this.keys&&this.keys?.indexOf(Tt.toString())>=0){Lt++,Lt>this.finishNum&&(this.finishNum=Lt,this.downloadProgress());continue}const qt=Tt*this.chunkByteSize;let Xt=qt+this.chunkByteSize-1;this.fileMetaData&&Xt>this.fileMetaData.length&&(Xt=this.fileMetaData.length-1);const Vt={range:`bytes=${qt}-${Xt}`},Yt=Tt.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${Tt+1}/${this.totalChunks}`),F("",It,Pt,Vt,"arraybuffer",this.cancelSource?.token).then(Qt=>{const nn=Qt.data;this.currentDB?.setItem(Yt,nn),Lt++,Lt>this.finishNum&&(this.finishNum=Lt,this.downloadProgress());const cn=parseInt(Yt)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${cn}/${this.totalChunks}`),this.savefile()})}this.finishNum===this.totalChunks&&this.savefile()}downloadProgress(){const _t=100*this.finishNum/this.totalChunks;this.dispatch("downloadProgress",_t)}outputProgress(_t){const It=100*_t/this.totalChunks;this.dispatch("saveProgress",It)}async savefile(){if(this.finishNum===this.totalChunks){if(!this.fileName)return void this.dispatchError("\u4E0B\u8F7D\u9519\u8BEF\uFF1A\u6587\u4EF6\u540D\u4E3A\u7A7A!");this.dispatchInfo("\u5F00\u59CB\u4FDD\u5B58\u4E0B\u8F7D\u6587\u4EF6");const _t=ge.createWriteStream(this.fileName).getWriter();let It=0;for(let Mt=0;Mt<this.totalChunks;Mt++){const Pt=Mt.toString(),Lt=await this.currentDB?.getItem(Pt);let Tt=new Response(Lt).body;if(Tt===null)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${Mt+1}\uFF09\u4E2A\u9519\u8BEF\uFF0C\u9000\u51FA\uFF01`);const qt=Tt.getReader();for(;;){const{done:Xt,value:Vt}=await qt.read();if(Xt)break;_t.write(Vt)}It++,this.outputProgress(It),this.dispatchInfo(`\u5B8C\u6210\u7B2C${Mt+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}_t.close(),me.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("\u5B8C\u6210\u6587\u4EF6\u4E0B\u8F7D")}}},exports.Download=_,exports.DownloadByUrl=function({url:_t,target:It="_blank",fileName:Mt}){const Pt=new URL(_t).host==location.host;return new Promise((Lt,Tt)=>{if(Pt){const qt=document.createElement("a");if(qt.href=_t,qt.target=It,qt.download!==void 0&&(qt.download=Mt||I(_t)),document.createEvent){const Xt=document.createEvent("MouseEvents");return Xt.initEvent("click",!0,!0),qt.dispatchEvent(Xt),Lt(!0)}return _t.indexOf("?")===-1&&(_t+="?download"),window.open(_t,It),Lt(!0)}{const qt=document.createElement("canvas"),Xt=document.createElement("img");Xt.setAttribute("crossOrigin","Anonymous"),Xt.src=_t,Xt.onload=Vt=>{qt.width=Xt.width,qt.height=Xt.height,qt.getContext("2d").drawImage(Xt,0,0,Xt.width,Xt.height),qt.toBlob(Yt=>{const Qt=document.createElement("a");Qt.href=window.URL.createObjectURL(Yt),Qt.download=I(_t),Qt.click(),URL.revokeObjectURL(Qt.href),Lt(!0)},"image/jpeg")},Xt.onerror=Vt=>Tt(Vt)}})},exports.Global=B,exports.GlobalHprose=wt,exports.GlobalMitt=k,exports.H5Tool=d,exports.HproseClient=P,exports.HttpDownload=(_t,It,Mt)=>{_t.get(It).then(function(Pt){_(Pt.data,Mt)}).catch(Pt=>{console.warn(Pt),k.emit(z.CommonWarnEvent,"\u4E0B\u8F7D\u6587\u4EF6\u62A5\u9519\uFF01")})},exports.JsonDownload=(_t,It)=>{const Mt=JSON.stringify(_t,null,2);It?_(Mt,It+".json"):k.emit(z.CommonWarnEvent,"\u53C2\u6570JsonID\u4E0D\u80FD\u4E3A\u7A7A\uFF01")},exports.ObjToUrlParams=function(_t,It){let Mt="",Pt="";for(const Lt in It)Mt+=Lt+"="+encodeURIComponent(It[Lt])+"&";return Mt=Mt.replace(/&$/,""),Pt=/\?$/.test(_t)?_t+Mt:_t.replace(/\/?$/,"?")+Mt,Pt},exports.Pane=o,exports.ProxyClient=M,exports.SaveAs=function(_t,It){const Mt=window.URL||window.webkitURL||window,Pt=new Blob([_t]),Lt=document.createElement("a");Lt.href=Mt.createObjectURL(Pt),Lt.download=It,Lt.click(),Mt.revokeObjectURL(Lt.href)},exports.Splitpanes=r,exports.Storage=f,exports.StringUtils=p,exports.StyleBlack={window:{color:"#fff",boxShadow:"0 0 6pt rgba(255, 255, 255, 0.75)",backgroundColor:"rgba(31, 31, 31, 0.9)"},titlebar:{backgroundColor:"rgba(63, 63, 63, 0.9)"},content:{},button:{color:"white"},buttonHover:{backgroundColor:"rgba(255, 255, 255, 0.25)"},buttonActive:{color:"black",backgroundColor:"rgba(255, 255, 255, 0.5)"}},exports.StyleMetal={window:{color:"#000",boxShadow:"0 4pt 8pt rgba(0, 0, 0, 0.5)",background:"linear-gradient(to bottom, rgb(215, 215, 215), rgb(191, 191, 191))"},titlebar:{background:"linear-gradient(to bottom, rgb(215, 215, 215), rgb(191, 191, 191))"},content:{},button:{color:"#000"},buttonHover:{backgroundColor:"rgba(0, 0, 0, 0.25)"},buttonActive:{color:"#fff",backgroundColor:"rgba(0, 0, 0, 0.5)"}},exports.StyleWhite={window:{color:"#000",boxShadow:"0 2pt 4pt rgba(0, 0, 0, 0.5)",backgroundColor:"rgba(239, 239, 239, 0.95)"},titlebar:{backgroundColor:"rgba(191, 191, 191, 0.9)"},content:{},button:{color:"#000"},buttonHover:{backgroundColor:"rgba(0, 0, 0, 0.25)"},buttonActive:{color:"#fff",backgroundColor:"rgba(0, 0, 0, 0.5)"}},exports.SysEvents=z,exports.TOKEN_REFRESH_TIME=4e3,exports.USER_TOKEN_API=bt,exports.VCollapsiblePanel=Le,exports.VCollapsiblePanelGroup=Ae,exports.VWindow=lt,exports.WindowResizeEvent=st,exports.WindowType=mt,exports.calculateBestTextColor=function(_t){const It=b(_t.substring(1));var Mt,Pt;return Mt=It.split(","),Pt=[0,0,0],(S(~~Mt[0],~~Mt[1],~~Mt[2])+.05)/(S(Pt[0],Pt[1],Pt[2])+.05)>=12?"#000000":"#FFFFFF"},exports.changePWD=function(_t){return F(bt.ChangePWD,zt,_t)},exports.checkDoRefreshToken=Ct,exports.checkLogin=async function(_t){const It=(await F(bt.CheckLogin,zt,_t))?.data;return It&&It.isSuccess&&(kt(It.resultValue),Et(It.resultValue.doubleToken)),It},exports.checkToken=function(_t){return F(bt.CheckToken,zt,{token:_t})},exports.clearLocalToken=O,exports.colorIsDark=function(_t){if(!w(_t))return;const[It,Mt,Pt]=b(_t).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(Lt=>Number(Lt));return .299*It+.578*Mt+.114*Pt<192},exports.createFileUpload=_t=>new se(_t),exports.darken=function(_t,It){return _t=_t.indexOf("#")>=0?_t.substring(1,_t.length):_t,It=Math.trunc(255*It/100),`#${C(_t.substring(0,2),It)}${C(_t.substring(2,4),It)}${C(_t.substring(4,6),It)}`},exports.deepMerge=function _t(It={},Mt={}){let Pt;for(Pt in Mt)It[Pt]=Ee(It[Pt])?_t(It[Pt],Mt[Pt]):It[Pt]=Mt[Pt];return It},exports.doRefreshToken=St,exports.get=function(_t,It){return F(_t,void 0,It)},exports.getData=function(_t,It){return B.Axios?.get(_t,{params:It}).catch(function(Mt){console.log(Mt),B.Message?.err("\u5916\u90E8Get\u670D\u52A1\u8BF7\u6C42\u9519\u8BEF\uFF1A"+_t)})},exports.getHexColor=function(_t){const It=_t.toLowerCase().replace(/rgb?a?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),Mt=parseFloat(It[3]||"1"),Pt=Math.floor(Mt*parseInt(It[0])+255*(1-Mt)),Lt=Math.floor(Mt*parseInt(It[1])+255*(1-Mt)),Tt=Math.floor(Mt*parseInt(It[2])+255*(1-Mt));return"#"+("0"+Pt.toString(16)).slice(-2)+("0"+Lt.toString(16)).slice(-2)+("0"+Tt.toString(16)).slice(-2)},exports.getLocalToken=T,exports.getLockState=function(){return D.get("is_LockScreen",!1)},exports.getLongHexColor=function(_t){const It=_t;if(It.length===4){let Pt="#";for(var Mt=1;Mt<4;Mt+=1){const Lt=It.slice(Mt,Mt+1);Pt+=Lt.concat(Lt)}return Pt}return It},exports.getProxyClient=N,exports.getRGBColor=function(_t){var It=_t.toLowerCase();if(w(_t)){if(It.length===4){for(var Mt="#",Pt=1;Pt<4;Pt+=1){const Tt=It.slice(Pt,Pt+1);Mt+=Tt.concat(Tt)}It=Mt}var Lt=[];for(Pt=1;Pt<7;Pt+=2)Lt.push(parseInt("0x"+It.slice(Pt,Pt+2)));return"rgb("+Lt.join(",")+")"}return It},exports.getRGBColorFromHSLA=function(_t){if(!!_t){var It=_t.toLowerCase().match(/^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/i);if(!!It){var Mt,Pt,Lt,Tt=(parseFloat(It[1])%360+360)%360/360,qt=parseFloat(It[2])/(/%$/.test(It[2])?100:1),Xt=parseFloat(It[3])/(/%$/.test(It[3])?100:1);if(qt===0)Mt=Pt=Lt=Xt;else{var Vt=Xt<=.5?Xt*(qt+1):Xt+qt-Xt*qt,Yt=2*Xt-Vt;Mt=y(Yt,Vt,Tt+1/3),Pt=y(Yt,Vt,Tt),Lt=y(Yt,Vt,Tt-1/3)}return`rgba(${Mt=Math.round(255*Mt)},${Pt=Math.round(255*Pt)},${Lt=Math.round(255*Lt)},${It[4]?parseFloat(It[4]):1})`}}},exports.getRefreshToken=j,exports.hexToRGB=b,exports.init=L,exports.initDefaultProxyClient=function(_t){const It=N(_t);return It&&(B.DefaultProxyClient=It),It},exports.initXFrame=function(_t){L(_t.message,_t.axios,_t.defaultHproseURL),_t.config&&(B.Config=_t.config)},exports.is=we,exports.isArray=ze,exports.isAsyncFunction=function(_t){return we(_t,"AsyncFunction")},exports.isBoolean=function(_t){return _t===!0||_t===!1||we(_t,"Boolean")},exports.isClient=()=>typeof window!="undefined",exports.isDate=function(_t){return we(_t,"Date")},exports.isDef=xe,exports.isElement=_t=>Ee(_t)&&!!_t.tagName,exports.isEmpty=function(_t){return _t==null||(ke(_t)||ze(_t)?_t.length===0:!!Ee(_t)&&JSON.stringify(_t)==="{}")},exports.isEnumColor=function(_t){if(typeof _t=="object"||!_t)return;const It=_t.toLowerCase().substr(0,1);return It==="#"?exports.EnumColor.Hex:It==="r"||It==="("?exports.EnumColor.RGBA:It==="h"?exports.EnumColor.Hsla:exports.EnumColor.RGBA},exports.isError=function(_t){return we(_t,"Error")},exports.isFunction=be,exports.isHexColor=w,exports.isImageDom=function(_t){return _t&&["IMAGE","IMG"].includes(_t.tagName)},exports.isMap=function(_t){return we(_t,"Map")},exports.isNull=Ce,exports.isNullAndUnDef=function(_t){return Se(_t)&&Ce(_t)},exports.isNullOrUnDef=function(_t){return Se(_t)||Ce(_t)},exports.isNumber=function(_t){return we(_t,"Number")},exports.isObject=Ee,exports.isPromise=function(_t){return we(_t,"Promise")&&Ee(_t)&&be(_t.then)&&be(_t.catch)},exports.isServer=_e,exports.isString=ke,exports.isSymbol=function(_t){return we(_t,"Symbol")},exports.isUnDef=Se,exports.isValidURL=_t=>/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/.test(_t),exports.isWeakMap=function(_t){return we(_t,"WeakMap")},exports.isWeakSet=function(_t){return we(_t,"WeakSet")},exports.isWindow=_t=>typeof window!="undefined"&&we(_t,"Window"),exports.jquery=ae,exports.lighten=function(_t,It){return _t=_t.indexOf("#")>=0?_t.substring(1,_t.length):_t,It=Math.trunc(255*It/100),`#${x(_t.substring(0,2),It)}${x(_t.substring(2,4),It)}${x(_t.substring(4,6),It)}`},exports.login=async function(_t){const It=(await F(bt.Login,zt,_t))?.data;return It&&It.isSuccess&&(kt(It.resultValue),Et(It.resultValue.doubleToken)),It},exports.logout=function(){const _t=T();_t&&($(bt.Logout,zt,{token:_t.token,reftoken:_t.refresh}),O())},exports.newGuid=function(){var _t=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(It){var Mt=(_t+16*Math.random())%16|0;return _t=Math.floor(_t/16),(It==="x"?Mt:3&Mt|8).toString(16)})},exports.onLockListener=function(){pe(),document.addEventListener("mousedown",pe)},exports.post=function(_t,It){return $(_t,void 0,It)},exports.requestGet=F,exports.requestPost=$,exports.requestPostBody=function(_t,It,Mt,Pt,Lt,Tt="json"){const qt=U(Pt,It,Lt,Tt);return B.Axios?.post(_t,Mt,qt).catch(function(Xt){console.log(Xt),B.Message?.err("\u670D\u52A1Post\u8BF7\u6C42\u9519\u8BEF\uFF1A"+_t)})},exports.rgbToHex=function(_t,It,Mt){const Pt=(_t<<16|It<<8|Mt).toString(16);return"#"+new Array(Math.abs(Pt.length-7)).join("0")+Pt},exports.setLocalToken=Et,exports.setUser=kt,exports.sleep=function(_t){for(var It=new Date().getTime();new Date().getTime()-It<_t;);console.log(`\u5F3A\u5236\u7B49\u5F85${_t}\u6BEB\u79D2`)},exports.storage=m,exports.storageHelper=D,exports.unLockListener=function(){document.removeEventListener("mousedown",pe)},exports.uuid=v;
|
|
12
|
+
`}}});const ji={class:"vcp__header-title"},Fi={key:0,class:"vcp__header-icon"},$i=["innerHTML"],Hi={key:0,ref:"bodyRef",class:"vcp__body"},qi={ref:"bodyContentRef",class:"vcp__body-content"};function Ct(e){return window.TouchEvent&&e instanceof TouchEvent}Pe.render=function(e,t,n,i,r,l){return g.openBlock(),g.createElementBlock("section",{ref:"panelRef",class:g.normalizeClass(["vcp",{"vcp--expanded":e.isExpanded,"vcp--expandable":e.body.hasContent}])},[g.createElementVNode("header",{class:"vcp__header",onClick:t[0]||(t[0]=(...w)=>e.toggle&&e.toggle(...w))},[g.createElementVNode("div",ji,[g.renderSlot(e.$slots,"title")]),e.body.hasContent?(g.openBlock(),g.createElementBlock("div",Fi,[g.renderSlot(e.$slots,"icon",{},()=>[g.createElementVNode("span",{innerHTML:e.toggleIcon},null,8,$i)])])):g.createCommentVNode("v-if",!0)]),g.createVNode(g.Transition,{"data-key":e.body.dataKey,name:"slide",onBeforeEnter:e.collapse,onEnter:e.expand,onBeforeLeave:e.expand,onLeave:e.collapse},{default:g.withCtx(()=>[e.isExpanded?(g.openBlock(),g.createElementBlock("div",Hi,[g.createElementVNode("div",qi,[g.renderSlot(e.$slots,"content")],512)],512)):g.createCommentVNode("v-if",!0)]),_:3},8,["data-key","onBeforeEnter","onEnter","onBeforeLeave","onLeave"])],2)},Pe.__scopeId="data-v-08c94cf8",Pe.__file="src/controls/collapsepanel/VCollapsiblePanel.vue";class Y{e;constructor(t){this.e=t}stopPropagation(){this.e.stopPropagation()}preventDefault(){this.e.preventDefault()}get clientX(){return Ct(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientX:this.e.clientX}get clientY(){return Ct(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientY:this.e.clientY}get clientCoord(){return new xt(this.clientX,this.clientY)}static bindDown(t,n,i,r=!1){const l=y=>{n(new Y(y))},w=y=>{y.touches.length===1&&n(new Y(y)),y.touches.length>1&&i&&i(new Y(y))};return t.addEventListener("mousedown",l,r),t.addEventListener("touchstart",w,r),()=>{t.removeEventListener("mousedown",l,r),t.removeEventListener("touchstart",w,r)}}static bindMove(t,n,i=!1){const r=w=>{n(new Y(w))},l=w=>{w.touches.length===1&&n(new Y(w))};return t.addEventListener("mousemove",r,i),t.addEventListener("touchmove",l,i),()=>{t.removeEventListener("mousemove",r,i),t.removeEventListener("touchmove",l,i)}}static bindUp(t,n,i=!1){const r=w=>{n(new Y(w))},l=w=>{w.touches.length===0&&n(new Y(w))};return t.addEventListener("mouseup",r,i),t.addEventListener("touchend",l,i),()=>{t.removeEventListener("mouseup",r,i),t.removeEventListener("touchend",l,i)}}originalEvent({mouse:t,touch:n}){Ct(this.e)?n&&n(this.e):t&&t(this.e)}}class xt{x;y;constructor(t,n){this.x=t,this.y=n}clone(){return new xt(this.x,this.y)}}class Vi{handle;container;options;unbindDown;unbindMove;unbindUp;constructor(t,n,i={}){this.handle=t,this.container=n,this.options=i,t&&(this.unbindDown=Y.bindDown(t,this.mousedown),t.classList.add("draggable-handle"))}teardown(){this.handle?.classList.remove("draggable-handle"),this.unbindDown&&this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove()}offsetX;offsetY;mousedown=t=>{if(t.preventDefault(),this.handle){const{left:n,top:i}=this.handle.getBoundingClientRect();this.offsetX=t.clientX-n,this.offsetY=t.clientY-i}this.options.onMoveStart&&this.options.onMoveStart(),this.unbindMove=Y.bindMove(document,this.mousemove),this.unbindUp=Y.bindUp(document,this.mouseup)};mousemove=t=>{this.container&&(this.container.style.left=t.clientX-this.offsetX+"px",this.container.style.top=t.clientY-this.offsetY+"px"),this.options.onMove&&this.options.onMove()};mouseup=t=>{this.options.onMoveEnd&&this.options.onMoveEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0}}class Xi{_group;onChange;zIndex;constructor(t,n){this._group=t,this.onChange=n,this.a(i=>i.push(this))}set group(t){this._group=t;const n=De(this._group),i=De(t);n.splice(n.indexOf(this),1),i.push(this),gn()}get group(){return this._group}unregister(){this.a(t=>t.splice(t.indexOf(this),1))}raise(){this.a(t=>{t.splice(t.indexOf(this),1),t.push(this)})}a(t){t(De(this._group)),gn()}}const Ae=new Map;function De(e){return Ae.has(e)||Ae.set(e,[]),Ae.get(e)}function mn(e,t){return e>t?-mn(t,e):e<0&&t>=0?1:e-t}function gn(){let e=0;for(const t of function(n){const i=[];return n.forEach((r,l)=>i.push(l)),i}(Ae).sort(mn))for(const n of De(t))e!=n.zIndex&&(n.zIndex=e,n.onChange(e)),e++}function Et(e){if(e){const{width:t,height:n}=e.style;e.style.width="auto",e.style.height="auto";const i=Ne(e);return e.style.width=t,e.style.height=n,i}return{width:0,height:0,top:0,left:0,bottom:0,right:0}}function Ne(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height,r=t.top,l=t.left;return{width:n,height:i,top:r,left:l,bottom:r+i,right:l+n}}class Gi{container;options;handles;constructor(t,n){if(this.container=t,this.options=n,t&&n){this.handles=vn.map(C=>new C(t,this));const{width:i,height:r}=Et(t),l=n.maxWidth||window.innerWidth,w=n.maxHeight||window.innerHeight;let y=!1;(i<n.minWidth||i>l)&&(t.style.width=`${yn(i,n.minWidth,l)}px`,y=!0),(r<n.minHeight||r>w)&&(t.style.height=`${yn(r,n.minHeight,w)}px`,y=!0),y&&n.onResize&&n.onResize()}}teardown(){this.handles?.forEach(t=>t.teardown())}}const vn=[];class ue{container;helper;handle;handleSize=8;unbindDown;unbindMove;unbindUp;constructor(t,n){this.container=t,this.helper=n,this.handle=this.createHandleElement(),this.unbindDown=Y.bindDown(this.handle,this.mousedown)}teardown(){this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove(),this.handle.parentElement.removeChild(this.handle)}x0;y0;left0;top0;width0;height0;mousedown=t=>{t.preventDefault(),t.stopPropagation();const{left:n,top:i,width:r,height:l}=Ne(this.container);this.x0=t.clientX,this.y0=t.clientY,this.left0=n,this.top0=i,this.width0=r,this.height0=l,this.calcSafeBoundaries(),this.helper.options&&this.helper.options.onResizeStart&&this.helper.options.onResizeStart(),this.unbindMove=Y.bindMove(document,this.mousemove),this.unbindUp=Y.bindUp(document,this.mouseup)};minLeft;maxLeft;minRight;maxRight;minTop;maxTop;minBottom;maxBottom;calcSafeBoundaries(){if(!this.helper.options)return;const{left:t,top:n,right:i,bottom:r}=Ne(this.container),l=this.helper.options,w=l.maxWidth||window.innerWidth,y=l.maxHeight||window.innerHeight;this.minLeft=Math.max(i-w,0),this.maxLeft=i-l.minWidth,this.minRight=t+l.minWidth,this.maxRight=Math.min(t+w,window.innerWidth),this.minTop=Math.max(r-y,0),this.maxTop=r-l.minHeight,this.minBottom=n+l.minHeight,this.maxBottom=Math.min(n+y,window.innerHeight)}mousemove=t=>{t.preventDefault(),t.stopPropagation(),this.setPosition(t),this.fixPosition(),this.helper.options&&this.helper.options.onResize&&this.helper.options.onResize()};fixPosition(){const{width:t,height:n,left:i,top:r,right:l,bottom:w}=Ne(this.container),y=this.helper.options;y&&(i<this.minLeft?(this.container.style.width=t+i-this.minLeft+"px",this.container.style.left=`${this.minLeft}px`):i>this.maxLeft?(this.container.style.width=`${y.minWidth}px`,this.container.style.left=`${this.maxLeft}px`):l<this.minRight?this.container.style.width=`${y.minWidth}px`:l>this.maxRight&&(this.container.style.width=this.maxRight-i+"px"),r<this.minTop?(this.container.style.height=n+r-this.minTop+"px",this.container.style.top=`${this.minTop}px`):r>this.maxTop?(this.container.style.height=`${y.minHeight}px`,this.container.style.top=`${this.maxTop}px`):w<this.minBottom?this.container.style.height=`${y.minHeight}px`:w>this.maxBottom&&(this.container.style.height=this.maxBottom-r+"px"))}mouseup=t=>{t.preventDefault(),t.stopPropagation(),this.helper.options&&this.helper.options.onResizeEnd&&this.helper.options.onResizeEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0};createHandleElement(){const t=document.createElement("div"),n=t.style;return n.position="absolute",this.applyStyle(n),this.container.appendChild(t),t}}function yn(e,t,n){return e<t?t:e>n?n:e}vn.push(class extends ue{setPosition(e){this.container.style.width=this.width0+e.clientX-this.x0+"px",this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.right=-this.handleSize+"px",e.bottom=-this.handleSize+"px",e.cursor="nwse-resize"}},class extends ue{setPosition(e){this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.right=`${this.handleSize}px`,e.left=`${this.handleSize}px`,e.height=2*this.handleSize+"px",e.bottom=-this.handleSize+"px",e.cursor="ns-resize"}},class extends ue{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px",this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.bottom=-this.handleSize+"px",e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.cursor="nesw-resize"}},class extends ue{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.bottom=`${this.handleSize}px`,e.width=2*this.handleSize+"px",e.top=`${this.handleSize}px`,e.cursor="ew-resize"}},class extends ue{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px",this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.top=-this.handleSize+"px",e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.cursor="nwse-resize"}},class extends ue{setPosition(e){this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px"}applyStyle(e){e.left=`${this.handleSize}px`,e.right=`${this.handleSize}px`,e.height=2*this.handleSize+"px",e.top=-this.handleSize+"px",e.cursor="ns-resize"}},class extends ue{setPosition(e){this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px",this.container.style.width=this.width0+e.clientX-this.x0+"px"}applyStyle(e){e.right=-this.handleSize+"px",e.top=-this.handleSize+"px",e.height=2*this.handleSize+"px",e.width=2*this.handleSize+"px",e.cursor="nesw-resize"}},class extends ue{setPosition(e){this.container.style.width=this.width0+e.clientX-this.x0+"px"}applyStyle(e){e.right=-this.handleSize+"px",e.top=`${this.handleSize}px`,e.bottom=`${this.handleSize}px`,e.width=2*this.handleSize+"px",e.cursor="ew-resize"}});var Te=g.defineComponent({name:"",props:{disabled:{type:Boolean,default:!1},windowStyle:{type:Object,required:!0}},components:{},setup(e){const t=g.ref(!1),n=g.ref(!1);return{hover:t,active:n,style:function(){let i=e.windowStyle.button;return t.value&&(i={...i,...this.windowStyle.buttonHover}),n.value&&(i={...i,...this.windowStyle.buttonActive}),i},mouseup:function(i){this.active&&this.$emit("click")},mousedown:function(i){i.preventDefault(),n.value=!0;const r=Y.bindUp(document,()=>{n.value=!1,r()})}}}});const Ki=["disabled"];Te.render=function(e,t,n,i,r,l){return g.openBlock(),g.createElementBlock("div",{class:"btn",style:g.normalizeStyle(e.style()),onMouseenter:t[0]||(t[0]=w=>e.hover=!0),onMouseleave:t[1]||(t[1]=w=>e.hover=!1),onMousedown:t[2]||(t[2]=g.withModifiers((...w)=>e.mousedown&&e.mousedown(...w),["stop"])),onTouchstart:t[3]||(t[3]=g.withModifiers((...w)=>e.mousedown&&e.mousedown(...w),["stop"])),onMouseup:t[4]||(t[4]=(...w)=>e.mouseup&&e.mouseup(...w)),onTouchend:t[5]||(t[5]=(...w)=>e.mouseup&&e.mouseup(...w)),disabled:e.disabled},[g.renderSlot(e.$slots,"default")],44,Ki)},Te.__scopeId="data-v-71662210",Te.__file="src/controls/vuewindow/window/Button.vue";const kt=new Set;function wn(e){return e!==null?parseFloat(e):0}function Oe(e){const t=window.getComputedStyle(e);return{width:Math.ceil([t.paddingLeft,t.width,t.paddingRight].map(wn).reduce((n,i)=>n+i)),height:Math.ceil([t.paddingTop,t.height,t.paddingBottom].map(wn).reduce((n,i)=>n+i))}}class bn{width;height;constructor(t,n){this.width=t,this.height=n}}function Yi(e){const t=e.windowEl;if(t){const n=parseFloat(t.style.left||"NaN"),i=parseFloat(t.style.top||"NaN");if(!isNaN(n)&&!isNaN(i))return{left:n,top:i}}return null}function Ji(e,t,n,i){const r=e-n,l=t-i;return r*r+l*l}window.addEventListener("resize",e=>{kt.forEach(t=>{t?.fixPosition()})});const Ue=[];var We=g.defineComponent({name:"Window",props:{windowStyle:{type:Object,required:!0},isOpen:{type:Boolean,required:!1,default:!0},title:{type:String,required:!0,default:""},closeButton:{type:Boolean,required:!1,default:!0},resizable:{type:Boolean,required:!1,default:!1},isScrollable:{type:Boolean,required:!1,default:!1},padding:{type:Number,required:!1,default:8},activateWhenOpen:{type:Boolean,required:!1,default:!0},positionHint:{type:String,required:!1,default:""},zGroup:{type:Number,required:!1,default:1},overflow:{type:String,required:!1,default:"visible"},minWidth:{type:Number,required:!1,default:1},minHeight:{type:Number,required:!1,default:0},maxWidth:{type:Number,required:!1,default:0},maxHeight:{type:Number,required:!1,default:0},height:{type:Number,required:!1},width:{type:Number,required:!1},top:{type:Number,required:!1},left:{type:Number,required:!1}},components:{myButton:Te},setup(e,{emit:t}){const n=g.getCurrentInstance();if(!n)return;const{proxy:i}=n;let r=0,l,w,y;const C=g.ref(e.isOpen),x=()=>{Ue.push(i),y=new Xi(e.zGroup,_),e.isOpen&&(g.nextTick(()=>{r++==0&&(d(i),function(){const B=M.value,{width:R,height:U}=Et(B);let W,j;if(e.left!==void 0!=(e.top!==void 0))throw new Error("Either of left or top is specified. Both must be set or not set.");if(typeof e.left=="number")W=e.left,j=e.top;else{const H=e.positionHint||"auto";switch(H){case"auto":{let q=20,X=50,Q=0;do{if(Ue.every(J=>{if(!J.isOpen||i==J)return!0;const te=Yi(J);if(te==null)return!0;const{left:He,top:qe}=te;return Ji(He,qe,q,X)>16}))break;q=(q+40)%(window.innerWidth-200),X=(X+40)%(window.innerHeight-200)}while(++Q<100);W=q,j=X}break;case"center":W=(window.innerWidth-R)/2,j=(window.innerHeight-U)/2,console.log(W,j,window.innerWidth,window.innerHeight,"111111");break;default:try{const q=H.split("/").map(Number);if(q.length!=2)throw null;const[X,Q]=q;if(!isFinite(X)||!isFinite(Q))throw null;W=X>=0?X:window.innerWidth-R+X,j=Q>=0?Q:window.innerHeight-U+Q}catch{throw new Error(`invalid position string: ${H}`)}}}B&&(B.style.left=`${W}px`,B.style.top=`${j}px`)}()),e.resizable&&u(),P(),l=new Vi(T.value,M.value,{onMove:()=>P(),onMoveStart:()=>t("move-start"),onMoveEnd:()=>t("move-end")}),e.resizable&&function(){const{height:B}=Et(T.value);w=new Gi(M.value,{onResize:()=>u(),onResizeStart:()=>t("resize-start"),onResizeEnd:()=>t("resize-end"),minWidth:e.minWidth,minHeight:e.minHeight+B,maxWidth:e.maxWidth,maxHeight:e.maxHeight?e.maxHeight+B:void 0})}()}),e.activateWhenOpen&&I()),kt.add(i)};function _(B){b.value.zIndex=`${B}`}const M=g.ref(null),T=g.ref(null),N=g.ref(null);function I(){y.raise(),t("activate")}const b=g.ref({...e.windowStyle.window,zIndex:"auto",overflow:e.overflow}),c=g.computed(()=>e.windowStyle.titlebar),h=g.computed(()=>{const B={...e.windowStyle.content};return e.resizable?B.padding="0":e.padding!=null&&(B.padding=`${e.padding}px`),e.isScrollable&&(B.overflow="auto"),B});function d(B){const{width:R,height:U,top:W,left:j}=B,H=M;if(H&&R!=null&&(H.value.style.width=`${R}px`),U!=null){const q=T.value;if(q){const X=Oe(q).height;H.value.style.height=`${U+X}px`}}H&&j!=null&&(H.value.style.left=`${j}px`),H&&W!=null&&(H.value.style.top=`${W}px`)}function u(B=!0){const R=M.value,U=T.value,W=N.value;if(W&&R&&U){const{width:j,height:H}=Oe(W),{width:q,height:X}=Oe(R),Q=Oe(U).height,J=q-(W.offsetWidth-j),te=X-Q-(W.offsetHeight-H);W.style.width=`${J}px`,W.style.height=`${te}px`,p(),t("resize",new bn(J,te)),B&&(t("update:width",J),t("update:height",te))}}function p(){const B=M.value;if(B){const R=B.getBoundingClientRect();R.left<0&&(b.value.left="0px"),R.top<0&&(b.value.top="0px"),R.right>window.innerWidth&&(b.value.left=window.innerWidth-R.width+"px"),R.bottom>window.innerHeight&&(b.value.top=window.innerHeight-R.height+"px")}}function P(B=!0){p();const R=M.value;if(R){const{left:U,top:W}=R.getBoundingClientRect();B&&(t("update:left",U),t("update:top",W))}}return g.watch(()=>e.isOpen,B=>{C.value=B}),g.watch(()=>e.zGroup,B=>{y.group=B}),g.watch(()=>e.width,B=>{d({width:B}),u(!1)}),g.watch(()=>e.height,B=>{d({height:B}),u(!1)}),g.onMounted(()=>{x()}),g.onBeforeUnmount(()=>{kt.delete(this),y.unregister(),w&&w.teardown(),l&&l.teardown(),Ue.splice(Ue.indexOf(i),1)}),{isOpen:C,windowEl:M,titlebar:T,content:N,activate:I,styleWindow:b,styleTitlebar:c,styleContent:h,closeButtonClick:function(){C.value=!1,t("closebuttonclick")}}}});const Zi={class:"title"},Qi=g.createTextVNode("\xD7");var Sn,le;We.render=function(e,t,n,i,r,l){const w=g.resolveComponent("myButton");return g.openBlock(),g.createBlock(g.Transition,{name:"fade",onAfterLeave:t[2]||(t[2]=y=>e.$emit("close")),onAfterEnter:t[3]||(t[3]=y=>e.$emit("open"))},{default:g.withCtx(()=>[g.withDirectives(g.createElementVNode("div",{class:"window",style:g.normalizeStyle(e.styleWindow),ref:"windowEl",onMousedown:t[0]||(t[0]=(...y)=>e.activate&&e.activate(...y)),onTouchstart:t[1]||(t[1]=(...y)=>e.activate&&e.activate(...y))},[g.createElementVNode("div",{class:"titlebar",style:g.normalizeStyle(e.styleTitlebar),ref:"titlebar"},[g.createElementVNode("div",Zi,[e.$slots.title?g.renderSlot(e.$slots,"title",{key:0}):(g.openBlock(),g.createElementBlock(g.Fragment,{key:1},[g.createTextVNode(g.toDisplayString(e.title),1)],2112))]),e.closeButton?(g.openBlock(),g.createBlock(w,{key:0,windowStyle:e.windowStyle,onClick:e.closeButtonClick},{default:g.withCtx(()=>[Qi]),_:1},8,["windowStyle","onClick"])):g.createCommentVNode("v-if",!0)],4),g.createElementVNode("div",{class:"content",style:g.normalizeStyle(e.styleContent),ref:"content"},[g.renderSlot(e.$slots,"default")],4)],36),[[g.vShow,e.isOpen]])]),_:3})},We.__file="src/controls/vuewindow/window/index.vue",(le=Sn||(Sn={}))[le.StyleBlack=0]="StyleBlack",le[le.StyleWhite=1]="StyleWhite",le[le.StyleMetal=2]="StyleMetal",le[le.StyleGrayblue=3]="StyleGrayblue";const eo=We;var Z;exports.LayoutContainerEnum=void 0,(Z=exports.LayoutContainerEnum||(exports.LayoutContainerEnum={}))[Z.top=0]="top",Z[Z.bottom=1]="bottom",Z[Z.centerBack=2]="centerBack",Z[Z.centerMain=3]="centerMain",Z[Z.centerFront=4]="centerFront",Z[Z.left=5]="left",Z[Z.right=6]="right";class to{layoutState;widgetCofig;layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;constructor(t,n){this.layoutState=t,this.widgetCofig=n,this.widgetCofig.forEach(i=>{if(i.afterid)if(this.preConditionMap.has(i.afterid))this.preConditionMap.get(i.afterid)?.add(i);else{const r=new Set;r.add(i),this.preConditionMap.set(i.afterid,r)}})}getWidgetConfig(){return this.widgetCofig}preloadWidgets(){this.widgetCofig.filter(t=>t.preload&&!t.afterid).forEach(t=>{this._loadWidget(t,this.loadOtherDependenceWidgets.bind(this))})}loadWidget(t){if(!t)return;let n;he(t)?n=t:Be(t)&&(n=this.widgetCofig.find(i=>i.id===t)),n&&this._loadWidget(n,this.loadOtherDependenceWidgets.bind(this))}loadOtherDependenceWidgets(t){this.preConditionMap.has(t)&&this.preConditionMap.get(t)?.forEach(n=>{n.preload&&this._loadWidget(n)})}_loadWidget(t,n){if(!this.widgetsLoadedSet.has(t.id))return t.component().then(i=>{if(i.default){const r=g.markRaw(i.default);this.getContainerComponents(t.container).value.set(t.id,r),this.widgetsLoadedSet.add(t.id),D.EventBus.emit(V.WidgetLoadedEvent,t.id),n&&n(t.id)}})}hasDependentWidgets(t){let n=!1;if(this.preConditionMap.has(t)){const i=this.preConditionMap.get(t);if(i){for(const r of i)if(this.isWidgetLoaded(r.id)){n=!0;break}}}return n}unloadWidget(t){if(!t||!this.isWidgetLoaded(t))return;const n=this.widgetCofig.find(i=>i.id===t);if(n){if(this.preConditionMap.has(t)){const i=this.preConditionMap.get(t);if(i)for(const r of i)this.unloadWidget(r.id)}this.getContainerComponents(n.container).value.delete(t),this.widgetsLoadedSet.delete(t),D.EventBus.emit(V.WidgetUnLoadedEvent,t)}}isWidgetLoaded(t){return this.widgetsLoadedSet.has(t)}splitTwoContainer(t=!1){const n=this.layoutState.centerMainContainer,i=this.layoutState.centerBackContainer;t?(n&&(n.style.left="0",n.style.width="100%"),i&&(i.style.width="100%")):(n&&(n.style.left="50%",n.style.width="50%"),i&&(i.style.width="50%"))}getLayoutContainer(t){switch(t){case exports.LayoutContainerEnum.top:return this.layoutState.topContainer;case exports.LayoutContainerEnum.bottom:return this.layoutState.bottomContainer;case exports.LayoutContainerEnum.left:return this.layoutState.leftContainer;case exports.LayoutContainerEnum.right:return this.layoutState.rightContainer;case exports.LayoutContainerEnum.centerBack:return this.layoutState.centerBackContainer;case exports.LayoutContainerEnum.centerMain:return this.layoutState.centerMainContainer;case exports.LayoutContainerEnum.centerFront:return this.layoutState.centerFrontContainer}}changeContainerVisible(t,n=!1){const i=this.getLayoutContainer(t);i&&(i.style.visibility=n?"visible":"hidden")}changeWidgetVisible(t,n=!1){const i=this.getWidgetComponent(t);i&&D.EventBus.emit(V.WidgetVisibleChanged,{id:t,name:i.name,visible:n})}getWidgetComponent(t){if(this.widgetsLoadedSet.has(t)){const n=this.widgetCofig.find(i=>i.id===t);if(n)return this.getContainerComponents(n.container).value.get(t)}}getWigetItem(t){return this.widgetCofig.find(n=>n.id===t)}getGroupWigetItems(t){return this.widgetCofig.filter(n=>n.group===t)}getContainerComponents(t){if(this.layoutMap.has(t))return this.layoutMap.get(t);{const n=g.ref(new Map);return this.layoutMap.set(t,n),n}}addContainerComponent(t,n){}}var zt=g.defineComponent({name:"MainContainer",props:{widgetConfig:{type:Array,required:!0,default:()=>[]},layoutStyle:{type:Object}},components:{},setup(e,{attrs:t,slots:n,emit:i}){const r=g.reactive({topContainer:void 0,centerBackContainer:void 0,centerMainContainer:void 0,centerFrontContainer:void 0,bottomContainer:void 0,leftContainer:void 0,rightContainer:void 0});if(!D.LayoutManager){const N=new to(r,e.widgetConfig);D.LayoutManager=N,N.preloadWidgets()}const l=M(exports.LayoutContainerEnum.top),w=M(exports.LayoutContainerEnum.centerBack),y=M(exports.LayoutContainerEnum.centerFront),C=M(exports.LayoutContainerEnum.left),x=M(exports.LayoutContainerEnum.right),_=M(exports.LayoutContainerEnum.bottom);function M(N){return D.LayoutManager?.getContainerComponents(N)}const T=g.computed(()=>e.layoutStyle);return{...g.toRefs(r),topContainerComponents:l,centerbackComponents:w,centerfrontComponents:y,leftContainerComponents:C,rightContainerComponents:x,bottomContainerComponents:_,containerStyle:T}}});const no={ref:"topContainer",class:"topContainer"},io={ref:"centerBackContainer",class:"centerdiv backContainer"},oo={ref:"centerMainContainer",class:"centerdiv mainContainer"},ro={ref:"centerFrontContainer",class:"centerdiv centerContainer"},so={ref:"leftContainer",class:"leftContainer"},ao={ref:"rightContainer",class:"rightContainer"},co={ref:"bottomContainer",class:"bottomContainer"};zt.render=function(e,t,n,i,r,l){const w=g.resolveComponent("router-view");return g.openBlock(),g.createElementBlock("div",{class:"layoutContainer",style:g.normalizeStyle(e.containerStyle)},[g.createElementVNode("div",no,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.topContainerComponents,([y,C])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(C),{key:y}))),128))],512),g.createElementVNode("div",null,[g.createCommentVNode(" \u5E95\u5C42-\u4E3B\u5BB9\u5668 "),g.createElementVNode("div",io,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.centerbackComponents,([y,C])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(C),{key:y}))),128))],512),g.createCommentVNode(" \u4E3B\u8981\u5BB9\u5668 "),g.createElementVNode("div",oo,[g.createVNode(w,null,{default:g.withCtx(({Component:y})=>[(g.openBlock(),g.createBlock(g.resolveDynamicComponent(y)))]),_:1})],512),g.createCommentVNode(" \u6D6E\u52A8-\u4E3B\u5BB9\u5668 "),g.createElementVNode("div",ro,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.centerfrontComponents,([y,C])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(C),{key:y}))),128))],512),g.createElementVNode("div",so,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.leftContainerComponents,([y,C])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(C),{key:y}))),128))],512),g.createElementVNode("div",ao,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.rightContainerComponents,([y,C])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(C),{key:y}))),128))],512)]),g.createElementVNode("div",co,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.bottomContainerComponents,([y,C])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(C),{key:y}))),128))],512)],4)},zt.__file="src/controls/layoutcontainer/layout.vue";const je=new Map,_t=new Map;let Fe;const uo={getDefaultClient(){if(Fe||(Fe=new be(SysConfig.DefaultHproseAPI)),!Fe)throw Error("HproseProxy\u5BF9\u8C61\u4E3A\u7A7A");return Fe},registerHprose(e,t){const n=_t.get(e);if(!n){const i=new be(t);je.set(e,i)}return n},getHprose:e=>_t?.get(e),getProxyHprose:e=>je.get(e),unregisterHprose(e){je.get(e)&&(_t.delete(e),je.delete(e))}},de={Login:"/api/Login/Login",CheckLogin:"\u200B/api\u200B/Check\u200B/Login",Logout:"/api/Check/ExitLogin",ChangePWD:"/api/UserManager/UpdateUserPWD",RefreshToken:"/api/Check/RefreshToken",CheckToken:"/api/Check/CheckToken"},lo=D.Config.ServiceURL.LoginAuthURL;function Mt(){const e=on();e&&ie(de.RefreshToken,lo,{refreshToken:e}).then(t=>{$e(t.data)})}function Cn(e){D.User||(D.User={id:e.id,name:e.name});const t=new Date().getTime(),n=new Date(e.expire).getTime()-t;n>0&&(n<=4e3?Mt():setTimeout(Mt,n-4e3))}function $e(e){D.User&&(D.User.doubleToken=e);const t=new Date().getTime(),n=new Date(e.accessToken.expires).getTime()-t;if(n>0&&D.User){const i={id:D.User.id,name:D.User.name,token:e.accessToken.tokenContent,expire:e.accessToken.expires,refresh:e.refreshToken.tokenContent};ce.set("access_token",i,n/1e3),Cn(i)}else ce.remove("access_token")}function Lt(e){D.User=e}const Ce=D.Config.ServiceURL.LoginAuthURL;exports.BigFileDownload=class{fileID;downloadURL;ChunkUnitM=1048576;chunkByteSize;totalChunks=1;currentDB;keys;fileMetaData=null;finishNum=0;eventTarget;cancelSource;isStarting=!1;fileName;cacheSize=6;requestTimeout=6e4;constructor(e,t,n=3,i=6,r=6e4){this.fileID=e,this.downloadURL=t,this.chunkByteSize=n*this.ChunkUnitM,this.eventTarget=ct(),this.initIndexDB(),i>=3&&(this.cacheSize=i),r>this.requestTimeout&&(this.requestTimeout=r)}on(e,t){this.eventTarget.on(e,t)}dispatch(e,t){this.eventTarget.emit(e,t)}dispatchError(e){this.eventTarget.emit("error",e)}dispatchInfo(e){this.eventTarget.emit("info",e)}async queryDownloadFileMeta(e,t="",n){this.dispatchInfo("\u5F00\u59CB\u83B7\u53D6\u6587\u4EF6\u4FE1\u606F");const i=await ie(t,e,n);let r=null;return i&&i.status===200&&(r=i.data),r}async getIFileMeta(){if(this.fileMetaData===null){const e=await this.currentDB?.getItem("fileinfo");this.fileMetaData=e||null}return this.fileMetaData}initIndexDB(){this.currentDB=Le.createInstance({name:this.fileID,driver:Le.INDEXEDDB})}async init(e){if(this.finishNum=0,e){const t="fileinfo";this.fileMetaData={id:e.id,name:e.name,length:e.length,downloadID:e.downloadID,chunkSize:this.chunkByteSize},this.fileName=e.name,this.currentDB?.setItem(t,this.fileMetaData)}if(this.fileMetaData!=null){const t=this.fileMetaData.chunkSize;t!=null&&t>0&&(this.chunkByteSize=t)}this.fileMetaData&&(this.totalChunks=Math.ceil(this.fileMetaData.length/this.chunkByteSize)),this.dispatchInfo("\u5B8C\u6210\u521D\u59CB\u5316\u6587\u4EF6\u4FE1\u606F\uFF0C\u603B\u5206\u7247\uFF1A"+this.totalChunks),this.currentDB&&(this.keys=await this.currentDB.keys())}getTotalChunks(){return this.totalChunks}pause(){this.cancelSource&&this.isStarting&&(this.cancelSource.cancel(),this.isStarting=!1),this.dispatchInfo("\u5DF2\u6682\u505C\u4E0B\u8F7D\u4EFB\u52A1")}restart(){this.dispatchInfo("\u6B63\u5728\u91CD\u542F\u4E0B\u8F7D\u4EFB\u52A1"),this.download()}delete(){this.cancelSource&&this.cancelSource.cancel(),Le.dropInstance({name:this.fileID}),this.currentDB=void 0,this.keys&&(this.keys.length=0,this.keys=void 0),this.finishNum=0,this.downloadProgress(),this.outputProgress(0),this.dispatchInfo("\u5DF2\u5220\u9664\u4E0B\u8F7D\u4EFB\u52A1")}sleep(e){return new Promise(t=>setTimeout(t,e))}async download(e){e&&(this.downloadURL=e);const t=this.downloadURL;if(!t)throw Error("\u4E0B\u8F7DURL\u4E0D\u80FD\u4E3A\u7A7A!");this.currentDB||this.initIndexDB();const n=D.Axios.CancelToken;this.cancelSource=n.source(),this.isStarting=!0;const i={key:this.fileMetaData?.downloadID};let r=0;const l=this.cacheSize;let w=0;for(let y=0;y<this.totalChunks;y++){if(this.keys&&this.keys?.indexOf(y.toString())>=0){r++,r>this.finishNum&&(this.finishNum=r,this.downloadProgress());continue}const C=y*this.chunkByteSize;let x=C+this.chunkByteSize-1;this.fileMetaData&&x>this.fileMetaData.length&&(x=this.fileMetaData.length-1);const _={range:`bytes=${C}-${x}`};for(;w>=l;)await this.sleep(200);const M=y.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${y+1}/${this.totalChunks}`),w++,ie("",t,i,_,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then(async T=>{const N=T.data;w--,await this.currentDB?.setItem(M,N),r++,r>this.finishNum&&(this.finishNum=r,this.downloadProgress());const I=parseInt(M)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${I}/${this.totalChunks}`),this.savefile()}).catch(T=>{w--;const N=parseInt(M)+1;this.dispatchError(`\u4E0B\u8F7D\u7B2C${N}\uFF09\u4E2A\u5206\u7247\u5185\u5BB9\u5931\u8D25\uFF01`)})}this.finishNum===this.totalChunks&&this.savefile()}downloadProgress(){const e=100*this.finishNum/this.totalChunks;this.dispatch("downloadProgress",e)}outputProgress(e){const t=100*e/this.totalChunks;this.dispatch("saveProgress",t)}async savefile(){if(this.finishNum===this.totalChunks){if(!this.fileName)return void this.dispatchError("\u4E0B\u8F7D\u9519\u8BEF\uFF1A\u6587\u4EF6\u540D\u4E3A\u7A7A!");this.dispatchInfo("\u5F00\u59CB\u4FDD\u5B58\u4E0B\u8F7D\u6587\u4EF6:"+this.fileName);const e=Ti.createWriteStream(this.fileName).getWriter();let t=0;for(let n=0;n<this.totalChunks;n++){const i=n.toString();let r=await this.currentDB?.getItem(i);if(r||(r=await this.currentDB?.getItem(i)),!r)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${n+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);let l=new Response(r).body;if(l===null)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${n+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);const w=l.getReader();for(;;){const{done:y,value:C}=await w.read();if(y)break;await e.write(C)}t++,this.outputProgress(t),this.dispatchInfo(`\u5B8C\u6210\u7B2C${n+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}e.close(),Le.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("\u5B8C\u6210\u6587\u4EF6\u4E0B\u8F7D")}}},exports.Download=ut,exports.DownloadByUrl=function({url:e,target:t="_blank",fileName:n}){const i=new URL(e).host==location.host;return new Promise((r,l)=>{if(i){const w=document.createElement("a");if(w.href=e,w.target=t,w.download!==void 0&&(w.download=n||en(e)),document.createEvent){const y=document.createEvent("MouseEvents");return y.initEvent("click",!0,!0),w.dispatchEvent(y),r(!0)}return e.indexOf("?")===-1&&(e+="?download"),window.open(e,t),r(!0)}{const w=document.createElement("canvas"),y=document.createElement("img");y.setAttribute("crossOrigin","Anonymous"),y.src=e,y.onload=C=>{w.width=y.width,w.height=y.height,w.getContext("2d").drawImage(y,0,0,y.width,y.height),w.toBlob(x=>{if(x){const _=document.createElement("a");_.href=window.URL.createObjectURL(x),_.download=en(e),_.click(),URL.revokeObjectURL(_.href),r(!0)}},"image/jpeg")},y.onerror=C=>l(C)}})},exports.Global=D,exports.GlobalHprose=uo,exports.GlobalMitt=ge,exports.H5Tool=ae,exports.HproseClient=we,exports.HttpDownload=(e,t,n)=>{e.get(t).then(function(i){ut(i.data,n)}).catch(i=>{console.warn(i),ge.emit(V.CommonWarnEvent,"\u4E0B\u8F7D\u6587\u4EF6\u62A5\u9519\uFF01")})},exports.JsonDownload=(e,t)=>{const n=JSON.stringify(e,null,2);t?ut(n,t+".json"):ge.emit(V.CommonWarnEvent,"\u53C2\u6570JsonID\u4E0D\u80FD\u4E3A\u7A7A\uFF01")},exports.LayoutContainer=zt,exports.LayoutManager=class{layoutState;widgetCofig;layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;constructor(e,t){this.layoutState=e,this.widgetCofig=t,this.widgetCofig.forEach(n=>{if(n.afterid)if(this.preConditionMap.has(n.afterid))this.preConditionMap.get(n.afterid)?.add(n);else{const i=new Set;i.add(n),this.preConditionMap.set(n.afterid,i)}})}getWidgetConfig(){return this.widgetCofig}preloadWidgets(){this.widgetCofig.filter(e=>e.preload&&!e.afterid).forEach(e=>{this._loadWidget(e,this.loadOtherDependenceWidgets.bind(this))})}loadWidget(e){if(!e)return;let t;he(e)?t=e:Be(e)&&(t=this.widgetCofig.find(n=>n.id===e)),t&&this._loadWidget(t,this.loadOtherDependenceWidgets.bind(this))}loadOtherDependenceWidgets(e){this.preConditionMap.has(e)&&this.preConditionMap.get(e)?.forEach(t=>{t.preload&&this._loadWidget(t)})}_loadWidget(e,t){if(!this.widgetsLoadedSet.has(e.id))return e.component().then(n=>{if(n.default){const i=g.markRaw(n.default);this.getContainerComponents(e.container).value.set(e.id,i),this.widgetsLoadedSet.add(e.id),D.EventBus.emit(V.WidgetLoadedEvent,e.id),t&&t(e.id)}})}hasDependentWidgets(e){let t=!1;if(this.preConditionMap.has(e)){const n=this.preConditionMap.get(e);if(n){for(const i of n)if(this.isWidgetLoaded(i.id)){t=!0;break}}}return t}unloadWidget(e){if(!e||!this.isWidgetLoaded(e))return;const t=this.widgetCofig.find(n=>n.id===e);if(t){if(this.preConditionMap.has(e)){const n=this.preConditionMap.get(e);if(n)for(const i of n)this.unloadWidget(i.id)}this.getContainerComponents(t.container).value.delete(e),this.widgetsLoadedSet.delete(e),D.EventBus.emit(V.WidgetUnLoadedEvent,e)}}isWidgetLoaded(e){return this.widgetsLoadedSet.has(e)}splitTwoContainer(e=!1){const t=this.layoutState.centerMainContainer,n=this.layoutState.centerBackContainer;e?(t&&(t.style.left="0",t.style.width="100%"),n&&(n.style.width="100%")):(t&&(t.style.left="50%",t.style.width="50%"),n&&(n.style.width="50%"))}getLayoutContainer(e){switch(e){case exports.LayoutContainerEnum.top:return this.layoutState.topContainer;case exports.LayoutContainerEnum.bottom:return this.layoutState.bottomContainer;case exports.LayoutContainerEnum.left:return this.layoutState.leftContainer;case exports.LayoutContainerEnum.right:return this.layoutState.rightContainer;case exports.LayoutContainerEnum.centerBack:return this.layoutState.centerBackContainer;case exports.LayoutContainerEnum.centerMain:return this.layoutState.centerMainContainer;case exports.LayoutContainerEnum.centerFront:return this.layoutState.centerFrontContainer}}changeContainerVisible(e,t=!1){const n=this.getLayoutContainer(e);n&&(n.style.visibility=t?"visible":"hidden")}changeWidgetVisible(e,t=!1){const n=this.getWidgetComponent(e);n&&D.EventBus.emit(V.WidgetVisibleChanged,{id:e,name:n.name,visible:t})}getWidgetComponent(e){if(this.widgetsLoadedSet.has(e)){const t=this.widgetCofig.find(n=>n.id===e);if(t)return this.getContainerComponents(t.container).value.get(e)}}getWigetItem(e){return this.widgetCofig.find(t=>t.id===e)}getGroupWigetItems(e){return this.widgetCofig.filter(t=>t.group===e)}getContainerComponents(e){if(this.layoutMap.has(e))return this.layoutMap.get(e);{const t=g.ref(new Map);return this.layoutMap.set(e,t),t}}addContainerComponent(e,t){}},exports.ObjToUrlParams=function(e,t){let n="",i="";for(const r in t)n+=r+"="+encodeURIComponent(t[r])+"&";return n=n.replace(/&$/,""),i=/\?$/.test(e)?e+n:e.replace(/\/?$/,"?")+n,i},exports.Pane=et,exports.ProxyClient=be,exports.SaveAs=function(e,t){const n=window.URL||window.webkitURL||window,i=new Blob([e]),r=document.createElement("a");r.href=n.createObjectURL(i),r.download=t,r.click(),n.revokeObjectURL(r.href)},exports.Splitpanes=wi,exports.Storage=it,exports.StringUtils=ke,exports.StyleBlack={window:{color:"#fff",boxShadow:"0 0 6pt rgba(255, 255, 255, 0.75)",backgroundColor:"rgba(31, 31, 31, 0.9)"},titlebar:{backgroundColor:"rgba(63, 63, 63, 0.9)"},content:{},button:{color:"white"},buttonHover:{backgroundColor:"rgba(255, 255, 255, 0.25)"},buttonActive:{color:"black",backgroundColor:"rgba(255, 255, 255, 0.5)"}},exports.StyleGrayblue={window:{color:"#fff",fontSize:"14px",boxShadow:"0 0 3pt rgba(255, 255, 255, 0.75)",backgroundColor:"rgba(4,51,81,0.6)",borderRadius:"5px"},titlebar:{backgroundColor:"rgba(4,51,81,0.8)",border:"1px solid rgba(153, 153, 153, 0.5)",borderRadius:"5px",fontSize:"16px",fontWeight:400,color:"#fff"},content:{},button:{color:"white",fontSize:"18px"},buttonHover:{backgroundColor:"rgba(255, 255, 255, 0.25)"},buttonActive:{color:"black",backgroundColor:"rgba(255, 255, 255, 0.5)"}},exports.StyleMetal={window:{color:"#000",boxShadow:"0 4pt 8pt rgba(0, 0, 0, 0.5)",background:"linear-gradient(to bottom, rgb(215, 215, 215), rgb(191, 191, 191))"},titlebar:{background:"linear-gradient(to bottom, rgb(215, 215, 215), rgb(191, 191, 191))"},content:{},button:{color:"#000"},buttonHover:{backgroundColor:"rgba(0, 0, 0, 0.25)"},buttonActive:{color:"#fff",backgroundColor:"rgba(0, 0, 0, 0.5)"}},exports.StyleWhite={window:{color:"#000",boxShadow:"0 2pt 4pt rgba(0, 0, 0, 0.5)",backgroundColor:"rgba(239, 239, 239, 0.95)"},titlebar:{backgroundColor:"rgba(191, 191, 191, 0.9)"},content:{},button:{color:"#000"},buttonHover:{backgroundColor:"rgba(0, 0, 0, 0.25)"},buttonActive:{color:"#fff",backgroundColor:"rgba(0, 0, 0, 0.5)"}},exports.SysEvents=V,exports.TOKEN_REFRESH_TIME=4e3,exports.USER_TOKEN_API=de,exports.VCollapsiblePanel=Pe,exports.VCollapsiblePanelGroup=Re,exports.VWindow=We,exports.WindowResizeEvent=bn,exports.WindowType=eo,exports.calculateBestTextColor=function(e){const t=rt(e.substring(1));var n,i;return n=t.split(","),i=[0,0,0],(Qt(~~n[0],~~n[1],~~n[2])+.05)/(Qt(i[0],i[1],i[2])+.05)>=12?"#000000":"#FFFFFF"},exports.changePWD=function(e){return ie(de.ChangePWD,Ce,e)},exports.checkDoRefreshToken=Cn,exports.checkLogin=async function(e){const t=(await ie(de.CheckLogin,Ce,e))?.data;return t&&t.isSuccess&&(Lt(t.resultValue),$e(t.resultValue.doubleToken)),t},exports.checkToken=function(e){return ie(de.CheckToken,Ce,{token:e})},exports.clearLocalToken=ht,exports.colorIsDark=function(e){if(!_e(e))return;const[t,n,i]=rt(e).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(r=>Number(r));return .299*t+.578*n+.114*i<192},exports.createFileUpload=e=>new Ai(e),exports.darken=function(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${at(e.substring(0,2),t)}${at(e.substring(2,4),t)}${at(e.substring(4,6),t)}`},exports.deepMerge=function e(t={},n={}){let i;for(i in n)t[i]=he(t[i])?e(t[i],n[i]):t[i]=n[i];return t},exports.doRefreshToken=Mt,exports.get=function(e,t){return ie(e,void 0,t)},exports.getData=function(e,t){return D.Axios?.get(e,{params:t}).catch(function(n){console.error(n);const i=`\u5916\u90E8Get\u670D\u52A1\u8BF7\u6C42\u9519\u8BEF\uFF1A${e}`;D.EventBus.emit(V.AxiosRequestErrorEvent,i)})},exports.getHexColor=function(e){const t=e.toLowerCase().replace(/rgb?a?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),n=parseFloat(t[3]||"1"),i=Math.floor(n*parseInt(t[0])+255*(1-n)),r=Math.floor(n*parseInt(t[1])+255*(1-n)),l=Math.floor(n*parseInt(t[2])+255*(1-n));return"#"+("0"+i.toString(16)).slice(-2)+("0"+r.toString(16)).slice(-2)+("0"+l.toString(16)).slice(-2)},exports.getLocalToken=Me,exports.getLockState=function(){return ce.get("is_LockScreen",!1)},exports.getLongHexColor=function(e){const t=e;if(t.length===4){let i="#";for(var n=1;n<4;n+=1){const r=t.slice(n,n+1);i+=r.concat(r)}return i}return t},exports.getProxyClient=nn,exports.getRGBColor=function(e){var t=e.toLowerCase();if(_e(e)){if(t.length===4){for(var n="#",i=1;i<4;i+=1){const l=t.slice(i,i+1);n+=l.concat(l)}t=n}var r=[];for(i=1;i<7;i+=2)r.push(parseInt("0x"+t.slice(i,i+2)));return"rgb("+r.join(",")+")"}return t},exports.getRGBColorFromHSLA=function(e){if(!!e){var t=e.toLowerCase().match(/^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/i);if(!!t){var n,i,r,l=(parseFloat(t[1])%360+360)%360/360,w=parseFloat(t[2])/(/%$/.test(t[2])?100:1),y=parseFloat(t[3])/(/%$/.test(t[3])?100:1);if(w===0)n=i=r=y;else{var C=y<=.5?y*(w+1):y+w-y*w,x=2*y-C;n=ot(x,C,l+1/3),i=ot(x,C,l),r=ot(x,C,l-1/3)}return`rgba(${n=Math.round(255*n)},${i=Math.round(255*i)},${r=Math.round(255*r)},${t[4]?parseFloat(t[4]):1})`}}},exports.getRefreshToken=on,exports.hexToRGB=rt,exports.init=tn,exports.initDefaultProxyClient=function(e){const t=nn(e);return t&&(D.DefaultProxyClient=t),t},exports.initXFrame=function(e){tn(e.message,e.axios,e.defaultHproseURL),e.config&&(D.Config=e.config)},exports.is=G,exports.isArray=fn,exports.isAsyncFunction=function(e){return G(e,"AsyncFunction")},exports.isBoolean=function(e){return e===!0||e===!1||G(e,"Boolean")},exports.isClient=()=>typeof window!="undefined",exports.isDate=function(e){return G(e,"Date")},exports.isDef=dn,exports.isElement=e=>he(e)&&!!e.tagName,exports.isEmpty=function(e){return e==null||(Be(e)||fn(e)?e.length===0:!!he(e)&&JSON.stringify(e)==="{}")},exports.isEnumColor=function(e){if(typeof e=="object"||!e)return;const t=e.toLowerCase().substr(0,1);return t==="#"?exports.EnumColor.Hex:t==="r"||t==="("?exports.EnumColor.RGBA:t==="h"?exports.EnumColor.Hsla:exports.EnumColor.RGBA},exports.isError=function(e){return G(e,"Error")},exports.isFunction=yt,exports.isHexColor=_e,exports.isImageDom=function(e){return e&&["IMAGE","IMG"].includes(e.tagName)},exports.isMap=function(e){return G(e,"Map")},exports.isNull=bt,exports.isNullAndUnDef=function(e){return wt(e)&&bt(e)},exports.isNullOrUnDef=function(e){return wt(e)||bt(e)},exports.isNumber=function(e){return G(e,"Number")},exports.isObject=he,exports.isPromise=function(e){return G(e,"Promise")&&he(e)&&yt(e.then)&&yt(e.catch)},exports.isServer=Ui,exports.isString=Be,exports.isSymbol=function(e){return G(e,"Symbol")},exports.isUnDef=wt,exports.isValidURL=e=>/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/.test(e),exports.isWeakMap=function(e){return G(e,"WeakMap")},exports.isWeakSet=function(e){return G(e,"WeakSet")},exports.isWindow=e=>typeof window!="undefined"&&G(e,"Window"),exports.jquery=Di,exports.lighten=function(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${st(e.substring(0,2),t)}${st(e.substring(2,4),t)}${st(e.substring(4,6),t)}`},exports.login=async function(e){const t=(await ie(de.Login,Ce,e))?.data;return t&&t.isSuccess&&(Lt(t.resultValue),$e(t.resultValue.doubleToken)),t},exports.logout=function(){const e=Me();e&&(ft(de.Logout,Ce,{token:e.token,reftoken:e.refresh}),ht())},exports.newGuid=function(){var e=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),(t==="x"?n:3&n|8).toString(16)})},exports.onLockListener=function(){vt(),document.addEventListener("mousedown",vt)},exports.post=function(e,t){return ft(e,void 0,t)},exports.requestGet=ie,exports.requestPost=ft,exports.requestPostBody=function(e,t,n,i,r,l="json",w){const y=dt(i,t,r,l);return w&&w>=2e4&&(y.timeout=w),D.Axios?.post(e,n,y).catch(function(C){console.error(C);const x=`post\u8BF7\u6C42\u9519\u8BEF\uFF1A${t}${e}`;D.EventBus.emit(V.AxiosRequestErrorEvent,x)})},exports.rgbToHex=function(e,t,n){const i=(e<<16|t<<8|n).toString(16);return"#"+new Array(Math.abs(i.length-7)).join("0")+i},exports.setLocalToken=$e,exports.setUser=Lt,exports.sleep=function(e){for(var t=new Date().getTime();new Date().getTime()-t<e;);console.log(`\u5F3A\u5236\u7B49\u5F85${e}\u6BEB\u79D2`)},exports.storage=Si,exports.storageHelper=ce,exports.unLockListener=function(){document.removeEventListener("mousedown",vt)},exports.uuid=ze;
|