xframelib 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/README.md +1 -0
  2. package/dist/api/Token.d.ts +20 -0
  3. package/dist/api/User.d.ts +45 -0
  4. package/dist/api/index.d.ts +2 -0
  5. package/dist/controls/collapsepanel/VCollapsiblePanel.vue.d.ts +26 -0
  6. package/dist/controls/collapsepanel/VCollapsiblePanelGroup.vue.d.ts +30 -0
  7. package/dist/controls/collapsepanel/color.util.d.ts +1 -0
  8. package/dist/controls/collapsepanel/composables/store.d.ts +7 -0
  9. package/dist/controls/collapsepanel/constant.d.ts +1 -0
  10. package/dist/controls/collapsepanel/index.d.ts +3 -0
  11. package/dist/controls/layoutcontainer/LayoutManager.d.ts +107 -0
  12. package/dist/controls/layoutcontainer/index.d.ts +3 -0
  13. package/dist/controls/layoutcontainer/layout.vue.d.ts +37 -0
  14. package/dist/controls/splitpanes/index.d.ts +3 -0
  15. package/dist/controls/vuewindow/SinglePointerEvent.d.ts +23 -0
  16. package/dist/controls/vuewindow/dom.d.ts +16 -0
  17. package/dist/controls/vuewindow/draggable_helper.d.ts +20 -0
  18. package/dist/controls/vuewindow/index.d.ts +6 -0
  19. package/dist/controls/vuewindow/resizable_helper.d.ts +16 -0
  20. package/dist/controls/vuewindow/style.d.ts +77 -0
  21. package/dist/controls/vuewindow/window/Button.vue.d.ts +26 -0
  22. package/dist/controls/vuewindow/window/index.vue.d.ts +160 -0
  23. package/dist/controls/vuewindow/window/utils.d.ts +17 -0
  24. package/dist/controls/vuewindow/z_element.d.ts +11 -0
  25. package/dist/core/Global.d.ts +26 -0
  26. package/dist/core/IModel.d.ts +34 -0
  27. package/dist/core/MsgHelper.d.ts +12 -0
  28. package/dist/core/SysEvents.d.ts +16 -0
  29. package/dist/core/index.d.ts +3 -0
  30. package/dist/hprose/HproseClient.d.ts +20 -0
  31. package/dist/hprose/ProxyClient.d.ts +22 -0
  32. package/dist/hprose/index.d.ts +11 -0
  33. package/dist/index.cjs +4 -4
  34. package/dist/index.css +146 -76
  35. package/dist/index.d.ts +10 -1116
  36. package/dist/index.js +4 -4
  37. package/dist/mitt/index.d.ts +25 -0
  38. package/dist/model/Config.d.ts +94 -0
  39. package/dist/model/Constants.d.ts +15 -0
  40. package/dist/model/Layout.d.ts +36 -0
  41. package/dist/model/Token.d.ts +66 -0
  42. package/dist/model/index.d.ts +4 -0
  43. package/dist/utils/AxiosHelper.d.ts +51 -0
  44. package/dist/utils/BigFileDownload.d.ts +106 -0
  45. package/dist/utils/Color.d.ts +74 -0
  46. package/dist/utils/FileDownload.d.ts +36 -0
  47. package/dist/utils/FileUpload.d.ts +90 -0
  48. package/dist/utils/H5Tool.d.ts +98 -0
  49. package/dist/utils/IsTool.d.ts +101 -0
  50. package/dist/utils/JQuery.d.ts +35 -0
  51. package/dist/utils/LockHelper.d.ts +17 -0
  52. package/dist/utils/Storage.d.ts +57 -0
  53. package/dist/utils/StringUtils.d.ts +15 -0
  54. package/dist/utils/Time.d.ts +1 -0
  55. package/dist/utils/TokenHelper.d.ts +18 -0
  56. package/dist/utils/URLTool.d.ts +18 -0
  57. package/dist/utils/index.d.ts +16 -0
  58. package/dist/utils/uuid.d.ts +3 -0
  59. package/package.json +3 -3
package/dist/index.cjs CHANGED
@@ -1,10 +1,10 @@
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:{}};/*!
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"),o={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((Tt,Ot)=>(Tt[Ot.id]=Ot)&&Tt,{})}},methods:{updatePaneComponents(){this.panes.forEach(Tt=>{Tt.update&&Tt.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[Tt.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(Tt,Ot){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=Ot},onMouseMove(Tt){this.touch.mouseDown&&(Tt.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(Tt)),this.$emit("resize",this.panes.map(Ot=>({min:Ot.min,max:Ot.max,size:Ot.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(Tt=>({min:Tt.min,max:Tt.max,size:Tt.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(Tt,Ot){"ontouchstart"in window&&(Tt.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===Ot?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(Tt,Ot),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=Ot,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[Ot])},onSplitterDblClick(Tt,Ot){let jt=0;this.panes=this.panes.map((Ut,Wt)=>(Ut.size=Wt===Ot?Ut.max:Ut.min,Wt!==Ot&&(jt+=Ut.min),Ut)),this.panes[Ot].size-=jt,this.$emit("pane-maximize",this.panes[Ot])},onPaneClick(Tt,Ot){this.$emit("pane-click",this.indexedPanes[Ot])},getCurrentMouseDrag(Tt){const Ot=this.container.getBoundingClientRect(),{clientX:jt,clientY:Ut}="ontouchstart"in window&&Tt.touches?Tt.touches[0]:Tt;return{x:jt-Ot.left,y:Ut-Ot.top}},getCurrentDragPercentage(Tt){Tt=Tt[this.horizontal?"y":"x"];const Ot=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(Tt=Ot-Tt),100*Tt/Ot},calculatePanesSize(Tt){const Ot=this.touch.activeSplitter;let jt={prevPanesSize:this.sumPrevPanesSize(Ot),nextPanesSize:this.sumNextPanesSize(Ot),prevReachedMinPanes:0,nextReachedMinPanes:0};const Ut=0+(this.pushOtherPanes?0:jt.prevPanesSize),Wt=100-(this.pushOtherPanes?0:jt.nextPanesSize),Xt=Math.max(Math.min(this.getCurrentDragPercentage(Tt),Wt),Ut);let tn=[Ot,Ot+1],en=this.panes[tn[0]]||null,rn=this.panes[tn[1]]||null;const an=en.max<100&&Xt>=en.max+jt.prevPanesSize,ln=rn.max<100&&Xt<=100-(rn.max+this.sumNextPanesSize(Ot+1));if(an||ln)an?(en.size=en.max,rn.size=Math.max(100-en.max-jt.prevPanesSize-jt.nextPanesSize,0)):(en.size=Math.max(100-rn.max-jt.prevPanesSize-this.sumNextPanesSize(Ot+1),0),rn.size=rn.max);else{if(this.pushOtherPanes){const hn=this.doPushOtherPanes(jt,Xt);if(!hn)return;({sums:jt,panesToResize:tn}=hn),en=this.panes[tn[0]]||null,rn=this.panes[tn[1]]||null}en!==null&&(en.size=Math.min(Math.max(Xt-jt.prevPanesSize-jt.prevReachedMinPanes,en.min),en.max)),rn!==null&&(rn.size=Math.min(Math.max(100-Xt-jt.nextPanesSize-jt.nextReachedMinPanes,rn.min),rn.max))}},doPushOtherPanes(Tt,Ot){const jt=this.touch.activeSplitter,Ut=[jt,jt+1];return Ot<Tt.prevPanesSize+this.panes[Ut[0]].min&&(Ut[0]=this.findPrevExpandedPane(jt).index,Tt.prevReachedMinPanes=0,Ut[0]<jt&&this.panes.forEach((Wt,Xt)=>{Xt>Ut[0]&&Xt<=jt&&(Wt.size=Wt.min,Tt.prevReachedMinPanes+=Wt.min)}),Tt.prevPanesSize=this.sumPrevPanesSize(Ut[0]),Ut[0]===void 0)?(Tt.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((Wt,Xt)=>{Xt>0&&Xt<=jt&&(Wt.size=Wt.min,Tt.prevReachedMinPanes+=Wt.min)}),this.panes[Ut[1]].size=100-Tt.prevReachedMinPanes-this.panes[0].min-Tt.prevPanesSize-Tt.nextPanesSize,null):Ot>100-Tt.nextPanesSize-this.panes[Ut[1]].min&&(Ut[1]=this.findNextExpandedPane(jt).index,Tt.nextReachedMinPanes=0,Ut[1]>jt+1&&this.panes.forEach((Wt,Xt)=>{Xt>jt&&Xt<Ut[1]&&(Wt.size=Wt.min,Tt.nextReachedMinPanes+=Wt.min)}),Tt.nextPanesSize=this.sumNextPanesSize(Ut[1]-1),Ut[1]===void 0)?(Tt.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((Wt,Xt)=>{Xt<this.panesCount-1&&Xt>=jt+1&&(Wt.size=Wt.min,Tt.nextReachedMinPanes+=Wt.min)}),this.panes[Ut[0]].size=100-Tt.prevPanesSize-Tt.nextReachedMinPanes-this.panes[this.panesCount-1].min-Tt.nextPanesSize,null):{sums:Tt,panesToResize:Ut}},sumPrevPanesSize(Tt){return this.panes.reduce((Ot,jt,Ut)=>Ot+(Ut<Tt?jt.size:0),0)},sumNextPanesSize(Tt){return this.panes.reduce((Ot,jt,Ut)=>Ot+(Ut>Tt+1?jt.size:0),0)},findPrevExpandedPane(Tt){return[...this.panes].reverse().find(Ot=>Ot.index<Tt&&Ot.size>Ot.min)||{}},findNextExpandedPane(Tt){return this.panes.find(Ot=>Ot.index>Tt+1&&Ot.size>Ot.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(Tt=>{const Ot=Tt.classList.contains("splitpanes__pane"),jt=Tt.classList.contains("splitpanes__splitter");if(!Ot&&!jt)return Tt.parentNode.removeChild(Tt),void console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed.")})},addSplitter(Tt,Ot,jt=!1){const Ut=Tt-1,Wt=document.createElement("div");Wt.classList.add("splitpanes__splitter"),jt||(Wt.onmousedown=Xt=>this.onMouseDown(Xt,Ut),typeof window!="undefined"&&"ontouchstart"in window&&(Wt.ontouchstart=Xt=>this.onMouseDown(Xt,Ut)),Wt.onclick=Xt=>this.onSplitterClick(Xt,Ut+1)),this.dblClickSplitter&&(Wt.ondblclick=Xt=>this.onSplitterDblClick(Xt,Ut+1)),Ot.parentNode.insertBefore(Wt,Ot)},removeSplitter(Tt){Tt.onmousedown=void 0,Tt.onclick=void 0,Tt.ondblclick=void 0,Tt.parentNode.removeChild(Tt)},redoSplitters(){const Tt=Array.from(this.container.children);Tt.forEach(jt=>{jt.className.includes("splitpanes__splitter")&&this.removeSplitter(jt)});let Ot=0;Tt.forEach(jt=>{jt.className.includes("splitpanes__pane")&&(!Ot&&this.firstSplitter?this.addSplitter(Ot,jt,!0):Ot&&this.addSplitter(Ot,jt),Ot++)})},requestUpdate({target:Tt,...Ot}){const jt=this.indexedPanes[Tt._.uid];Object.entries(Ot).forEach(([Ut,Wt])=>jt[Ut]=Wt)},onPaneAdd(Tt){let Ot=-1;Array.from(Tt.$el.parentNode.children).some(Wt=>(Wt.className.includes("splitpanes__pane")&&Ot++,Wt===Tt.$el));const jt=parseFloat(Tt.minSize),Ut=parseFloat(Tt.maxSize);this.panes.splice(Ot,0,{id:Tt._.uid,index:Ot,min:isNaN(jt)?0:jt,max:isNaN(Ut)?100:Ut,size:Tt.size===null?null:parseFloat(Tt.size),givenSize:Tt.size,update:Tt.update}),this.panes.forEach((Wt,Xt)=>Wt.index=Xt),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[Ot]}),this.$emit("pane-add",{index:Ot,panes:this.panes.map(Wt=>({min:Wt.min,max:Wt.max,size:Wt.size}))})})},onPaneRemove(Tt){const Ot=this.panes.findIndex(Ut=>Ut.id===Tt._.uid),jt=this.panes.splice(Ot,1)[0];this.panes.forEach((Ut,Wt)=>Ut.index=Wt),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...jt,index:Ot}}),this.$emit("pane-remove",{removed:jt,panes:this.panes.map(Ut=>({min:Ut.min,max:Ut.max,size:Ut.size}))})})},resetPaneSizes(Tt={}){Tt.addedPane||Tt.removedPane?this.panes.some(Ot=>Ot.givenSize!==null||Ot.min||Ot.max<100)?this.equalizeAfterAddOrRemove(Tt):this.equalize():this.initialPanesSizing(),this.ready&&this.$emit("resized",this.panes.map(Ot=>({min:Ot.min,max:Ot.max,size:Ot.size})))},equalize(){const Tt=100/this.panesCount;let Ot=0;const jt=[],Ut=[];this.panes.forEach(Wt=>{Wt.size=Math.max(Math.min(Tt,Wt.max),Wt.min),Ot-=Wt.size,Wt.size>=Wt.max&&jt.push(Wt.id),Wt.size<=Wt.min&&Ut.push(Wt.id)}),Ot>.1&&this.readjustSizes(Ot,jt,Ut)},initialPanesSizing(){let Tt=100;const Ot=[],jt=[];let Ut=0;this.panes.forEach(Xt=>{Tt-=Xt.size,Xt.size!==null&&Ut++,Xt.size>=Xt.max&&Ot.push(Xt.id),Xt.size<=Xt.min&&jt.push(Xt.id)});let Wt=100;Tt>.1&&(this.panes.forEach(Xt=>{Xt.size===null&&(Xt.size=Math.max(Math.min(Tt/(this.panesCount-Ut),Xt.max),Xt.min)),Wt-=Xt.size}),Wt>.1&&this.readjustSizes(Tt,Ot,jt))},equalizeAfterAddOrRemove({addedPane:Tt}={}){let Ot=100/this.panesCount,jt=0;const Ut=[],Wt=[];Tt&&Tt.givenSize!==null&&(Ot=(100-Tt.givenSize)/(this.panesCount-1)),this.panes.forEach(Xt=>{jt-=Xt.size,Xt.size>=Xt.max&&Ut.push(Xt.id),Xt.size<=Xt.min&&Wt.push(Xt.id)}),Math.abs(jt)<.1||(this.panes.forEach(Xt=>{Tt&&Tt.givenSize!==null&&Tt.id===Xt.id||(Xt.size=Math.max(Math.min(Ot,Xt.max),Xt.min)),jt-=Xt.size,Xt.size>=Xt.max&&Ut.push(Xt.id),Xt.size<=Xt.min&&Wt.push(Xt.id)}),jt>.1&&this.readjustSizes(jt,Ut,Wt))},readjustSizes(Tt,Ot,jt){let Ut;Ut=Tt>0?Tt/(this.panesCount-Ot.length):Tt/(this.panesCount-jt.length),this.panes.forEach(Wt=>{if(Tt>0&&!Ot.includes(Wt.id)){const Xt=Math.max(Math.min(Wt.size+Ut,Wt.max),Wt.min);Tt-=Xt-Wt.size,Wt.size=Xt}else if(!jt.includes(Wt.id)){const Xt=Math.max(Math.min(Wt.size+Ut,Wt.max),Wt.min);Tt-=Xt-Wt.size,Wt.size=Xt}Wt.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[Wt.id].size}%`})}),Math.abs(Tt)>.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(Tt){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((Ot,jt)=>{Ot.ondblclick=Tt?Ut=>this.onSplitterDblClick(Ut,jt):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"},r={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(Tt){this.style=Tt}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(Tt){this.requestUpdate({target:this,size:Tt})},minSizeNumber(Tt){this.requestUpdate({target:this,min:Tt})},maxSizeNumber(Tt){this.requestUpdate({target:this,max:Tt})}}};r.render=function(Tt,Ot,jt,Ut,Wt,Xt){return e.openBlock(),e.createElementBlock("div",{class:"splitpanes__pane",onClick:Ot[0]||(Ot[0]=tn=>Xt.onPaneClick(tn,Tt._.uid)),style:e.normalizeStyle(Tt.style)},[e.renderSlot(Tt.$slots,"default")],4)},r.__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(Tt){throw new Error('Could not dynamically require "'+Tt+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var c={exports:{}},l=c.exports=function(Tt){var Ot=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function jt(nn,qt){var Gt=nn[0],Kt=nn[1],Vt=nn[2],Jt=nn[3];Kt=((Kt+=((Vt=((Vt+=((Jt=((Jt+=((Gt=((Gt+=(Kt&Vt|~Kt&Jt)+qt[0]-680876936|0)<<7|Gt>>>25)+Kt|0)&Kt|~Gt&Vt)+qt[1]-389564586|0)<<12|Jt>>>20)+Gt|0)&Gt|~Jt&Kt)+qt[2]+606105819|0)<<17|Vt>>>15)+Jt|0)&Jt|~Vt&Gt)+qt[3]-1044525330|0)<<22|Kt>>>10)+Vt|0,Kt=((Kt+=((Vt=((Vt+=((Jt=((Jt+=((Gt=((Gt+=(Kt&Vt|~Kt&Jt)+qt[4]-176418897|0)<<7|Gt>>>25)+Kt|0)&Kt|~Gt&Vt)+qt[5]+1200080426|0)<<12|Jt>>>20)+Gt|0)&Gt|~Jt&Kt)+qt[6]-1473231341|0)<<17|Vt>>>15)+Jt|0)&Jt|~Vt&Gt)+qt[7]-45705983|0)<<22|Kt>>>10)+Vt|0,Kt=((Kt+=((Vt=((Vt+=((Jt=((Jt+=((Gt=((Gt+=(Kt&Vt|~Kt&Jt)+qt[8]+1770035416|0)<<7|Gt>>>25)+Kt|0)&Kt|~Gt&Vt)+qt[9]-1958414417|0)<<12|Jt>>>20)+Gt|0)&Gt|~Jt&Kt)+qt[10]-42063|0)<<17|Vt>>>15)+Jt|0)&Jt|~Vt&Gt)+qt[11]-1990404162|0)<<22|Kt>>>10)+Vt|0,Kt=((Kt+=((Vt=((Vt+=((Jt=((Jt+=((Gt=((Gt+=(Kt&Vt|~Kt&Jt)+qt[12]+1804603682|0)<<7|Gt>>>25)+Kt|0)&Kt|~Gt&Vt)+qt[13]-40341101|0)<<12|Jt>>>20)+Gt|0)&Gt|~Jt&Kt)+qt[14]-1502002290|0)<<17|Vt>>>15)+Jt|0)&Jt|~Vt&Gt)+qt[15]+1236535329|0)<<22|Kt>>>10)+Vt|0,Kt=((Kt+=((Vt=((Vt+=((Jt=((Jt+=((Gt=((Gt+=(Kt&Jt|Vt&~Jt)+qt[1]-165796510|0)<<5|Gt>>>27)+Kt|0)&Vt|Kt&~Vt)+qt[6]-1069501632|0)<<9|Jt>>>23)+Gt|0)&Kt|Gt&~Kt)+qt[11]+643717713|0)<<14|Vt>>>18)+Jt|0)&Gt|Jt&~Gt)+qt[0]-373897302|0)<<20|Kt>>>12)+Vt|0,Kt=((Kt+=((Vt=((Vt+=((Jt=((Jt+=((Gt=((Gt+=(Kt&Jt|Vt&~Jt)+qt[5]-701558691|0)<<5|Gt>>>27)+Kt|0)&Vt|Kt&~Vt)+qt[10]+38016083|0)<<9|Jt>>>23)+Gt|0)&Kt|Gt&~Kt)+qt[15]-660478335|0)<<14|Vt>>>18)+Jt|0)&Gt|Jt&~Gt)+qt[4]-405537848|0)<<20|Kt>>>12)+Vt|0,Kt=((Kt+=((Vt=((Vt+=((Jt=((Jt+=((Gt=((Gt+=(Kt&Jt|Vt&~Jt)+qt[9]+568446438|0)<<5|Gt>>>27)+Kt|0)&Vt|Kt&~Vt)+qt[14]-1019803690|0)<<9|Jt>>>23)+Gt|0)&Kt|Gt&~Kt)+qt[3]-187363961|0)<<14|Vt>>>18)+Jt|0)&Gt|Jt&~Gt)+qt[8]+1163531501|0)<<20|Kt>>>12)+Vt|0,Kt=((Kt+=((Vt=((Vt+=((Jt=((Jt+=((Gt=((Gt+=(Kt&Jt|Vt&~Jt)+qt[13]-1444681467|0)<<5|Gt>>>27)+Kt|0)&Vt|Kt&~Vt)+qt[2]-51403784|0)<<9|Jt>>>23)+Gt|0)&Kt|Gt&~Kt)+qt[7]+1735328473|0)<<14|Vt>>>18)+Jt|0)&Gt|Jt&~Gt)+qt[12]-1926607734|0)<<20|Kt>>>12)+Vt|0,Kt=((Kt+=((Vt=((Vt+=((Jt=((Jt+=((Gt=((Gt+=(Kt^Vt^Jt)+qt[5]-378558|0)<<4|Gt>>>28)+Kt|0)^Kt^Vt)+qt[8]-2022574463|0)<<11|Jt>>>21)+Gt|0)^Gt^Kt)+qt[11]+1839030562|0)<<16|Vt>>>16)+Jt|0)^Jt^Gt)+qt[14]-35309556|0)<<23|Kt>>>9)+Vt|0,Kt=((Kt+=((Vt=((Vt+=((Jt=((Jt+=((Gt=((Gt+=(Kt^Vt^Jt)+qt[1]-1530992060|0)<<4|Gt>>>28)+Kt|0)^Kt^Vt)+qt[4]+1272893353|0)<<11|Jt>>>21)+Gt|0)^Gt^Kt)+qt[7]-155497632|0)<<16|Vt>>>16)+Jt|0)^Jt^Gt)+qt[10]-1094730640|0)<<23|Kt>>>9)+Vt|0,Kt=((Kt+=((Vt=((Vt+=((Jt=((Jt+=((Gt=((Gt+=(Kt^Vt^Jt)+qt[13]+681279174|0)<<4|Gt>>>28)+Kt|0)^Kt^Vt)+qt[0]-358537222|0)<<11|Jt>>>21)+Gt|0)^Gt^Kt)+qt[3]-722521979|0)<<16|Vt>>>16)+Jt|0)^Jt^Gt)+qt[6]+76029189|0)<<23|Kt>>>9)+Vt|0,Kt=((Kt+=((Vt=((Vt+=((Jt=((Jt+=((Gt=((Gt+=(Kt^Vt^Jt)+qt[9]-640364487|0)<<4|Gt>>>28)+Kt|0)^Kt^Vt)+qt[12]-421815835|0)<<11|Jt>>>21)+Gt|0)^Gt^Kt)+qt[15]+530742520|0)<<16|Vt>>>16)+Jt|0)^Jt^Gt)+qt[2]-995338651|0)<<23|Kt>>>9)+Vt|0,Kt=((Kt+=((Jt=((Jt+=(Kt^((Gt=((Gt+=(Vt^(Kt|~Jt))+qt[0]-198630844|0)<<6|Gt>>>26)+Kt|0)|~Vt))+qt[7]+1126891415|0)<<10|Jt>>>22)+Gt|0)^((Vt=((Vt+=(Gt^(Jt|~Kt))+qt[14]-1416354905|0)<<15|Vt>>>17)+Jt|0)|~Gt))+qt[5]-57434055|0)<<21|Kt>>>11)+Vt|0,Kt=((Kt+=((Jt=((Jt+=(Kt^((Gt=((Gt+=(Vt^(Kt|~Jt))+qt[12]+1700485571|0)<<6|Gt>>>26)+Kt|0)|~Vt))+qt[3]-1894986606|0)<<10|Jt>>>22)+Gt|0)^((Vt=((Vt+=(Gt^(Jt|~Kt))+qt[10]-1051523|0)<<15|Vt>>>17)+Jt|0)|~Gt))+qt[1]-2054922799|0)<<21|Kt>>>11)+Vt|0,Kt=((Kt+=((Jt=((Jt+=(Kt^((Gt=((Gt+=(Vt^(Kt|~Jt))+qt[8]+1873313359|0)<<6|Gt>>>26)+Kt|0)|~Vt))+qt[15]-30611744|0)<<10|Jt>>>22)+Gt|0)^((Vt=((Vt+=(Gt^(Jt|~Kt))+qt[6]-1560198380|0)<<15|Vt>>>17)+Jt|0)|~Gt))+qt[13]+1309151649|0)<<21|Kt>>>11)+Vt|0,Kt=((Kt+=((Jt=((Jt+=(Kt^((Gt=((Gt+=(Vt^(Kt|~Jt))+qt[4]-145523070|0)<<6|Gt>>>26)+Kt|0)|~Vt))+qt[11]-1120210379|0)<<10|Jt>>>22)+Gt|0)^((Vt=((Vt+=(Gt^(Jt|~Kt))+qt[2]+718787259|0)<<15|Vt>>>17)+Jt|0)|~Gt))+qt[9]-343485551|0)<<21|Kt>>>11)+Vt|0,nn[0]=Gt+nn[0]|0,nn[1]=Kt+nn[1]|0,nn[2]=Vt+nn[2]|0,nn[3]=Jt+nn[3]|0}function Ut(nn){var qt,Gt=[];for(qt=0;qt<64;qt+=4)Gt[qt>>2]=nn.charCodeAt(qt)+(nn.charCodeAt(qt+1)<<8)+(nn.charCodeAt(qt+2)<<16)+(nn.charCodeAt(qt+3)<<24);return Gt}function Wt(nn){var qt,Gt=[];for(qt=0;qt<64;qt+=4)Gt[qt>>2]=nn[qt]+(nn[qt+1]<<8)+(nn[qt+2]<<16)+(nn[qt+3]<<24);return Gt}function Xt(nn){var qt,Gt,Kt,Vt,Jt,mn,pn=nn.length,fn=[1732584193,-271733879,-1732584194,271733878];for(qt=64;qt<=pn;qt+=64)jt(fn,Ut(nn.substring(qt-64,qt)));for(Gt=(nn=nn.substring(qt-64)).length,Kt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],qt=0;qt<Gt;qt+=1)Kt[qt>>2]|=nn.charCodeAt(qt)<<(qt%4<<3);if(Kt[qt>>2]|=128<<(qt%4<<3),qt>55)for(jt(fn,Kt),qt=0;qt<16;qt+=1)Kt[qt]=0;return Vt=(Vt=8*pn).toString(16).match(/(.*?)(.{0,8})$/),Jt=parseInt(Vt[2],16),mn=parseInt(Vt[1],16)||0,Kt[14]=Jt,Kt[15]=mn,jt(fn,Kt),fn}function tn(nn){var qt,Gt,Kt,Vt,Jt,mn,pn=nn.length,fn=[1732584193,-271733879,-1732584194,271733878];for(qt=64;qt<=pn;qt+=64)jt(fn,Wt(nn.subarray(qt-64,qt)));for(Gt=(nn=qt-64<pn?nn.subarray(qt-64):new Uint8Array(0)).length,Kt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],qt=0;qt<Gt;qt+=1)Kt[qt>>2]|=nn[qt]<<(qt%4<<3);if(Kt[qt>>2]|=128<<(qt%4<<3),qt>55)for(jt(fn,Kt),qt=0;qt<16;qt+=1)Kt[qt]=0;return Vt=(Vt=8*pn).toString(16).match(/(.*?)(.{0,8})$/),Jt=parseInt(Vt[2],16),mn=parseInt(Vt[1],16)||0,Kt[14]=Jt,Kt[15]=mn,jt(fn,Kt),fn}function en(nn){var qt,Gt="";for(qt=0;qt<4;qt+=1)Gt+=Ot[nn>>8*qt+4&15]+Ot[nn>>8*qt&15];return Gt}function rn(nn){var qt;for(qt=0;qt<nn.length;qt+=1)nn[qt]=en(nn[qt]);return nn.join("")}function an(nn){return/[\u0080-\uFFFF]/.test(nn)&&(nn=unescape(encodeURIComponent(nn))),nn}function ln(nn,qt){var Gt,Kt=nn.length,Vt=new ArrayBuffer(Kt),Jt=new Uint8Array(Vt);for(Gt=0;Gt<Kt;Gt+=1)Jt[Gt]=nn.charCodeAt(Gt);return qt?Jt:Vt}function hn(nn){return String.fromCharCode.apply(null,new Uint8Array(nn))}function yn(nn,qt,Gt){var Kt=new Uint8Array(nn.byteLength+qt.byteLength);return Kt.set(new Uint8Array(nn)),Kt.set(new Uint8Array(qt),nn.byteLength),Gt?Kt:Kt.buffer}function bn(nn){var qt,Gt=[],Kt=nn.length;for(qt=0;qt<Kt-1;qt+=2)Gt.push(parseInt(nn.substr(qt,2),16));return String.fromCharCode.apply(String,Gt)}function gn(){this.reset()}return rn(Xt("hello")),typeof ArrayBuffer=="undefined"||ArrayBuffer.prototype.slice||function(){function nn(qt,Gt){return(qt=0|qt||0)<0?Math.max(qt+Gt,0):Math.min(qt,Gt)}ArrayBuffer.prototype.slice=function(qt,Gt){var Kt,Vt,Jt,mn,pn=this.byteLength,fn=nn(qt,pn),xn=pn;return Gt!==Tt&&(xn=nn(Gt,pn)),fn>xn?new ArrayBuffer(0):(Kt=xn-fn,Vt=new ArrayBuffer(Kt),Jt=new Uint8Array(Vt),mn=new Uint8Array(this,fn,Kt),Jt.set(mn),Vt)}}(),gn.prototype.append=function(nn){return this.appendBinary(an(nn)),this},gn.prototype.appendBinary=function(nn){this._buff+=nn,this._length+=nn.length;var qt,Gt=this._buff.length;for(qt=64;qt<=Gt;qt+=64)jt(this._hash,Ut(this._buff.substring(qt-64,qt)));return this._buff=this._buff.substring(qt-64),this},gn.prototype.end=function(nn){var qt,Gt,Kt=this._buff,Vt=Kt.length,Jt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(qt=0;qt<Vt;qt+=1)Jt[qt>>2]|=Kt.charCodeAt(qt)<<(qt%4<<3);return this._finish(Jt,Vt),Gt=rn(this._hash),nn&&(Gt=bn(Gt)),this.reset(),Gt},gn.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},gn.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},gn.prototype.setState=function(nn){return this._buff=nn.buff,this._length=nn.length,this._hash=nn.hash,this},gn.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},gn.prototype._finish=function(nn,qt){var Gt,Kt,Vt,Jt=qt;if(nn[Jt>>2]|=128<<(Jt%4<<3),Jt>55)for(jt(this._hash,nn),Jt=0;Jt<16;Jt+=1)nn[Jt]=0;Gt=(Gt=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),Kt=parseInt(Gt[2],16),Vt=parseInt(Gt[1],16)||0,nn[14]=Kt,nn[15]=Vt,jt(this._hash,nn)},gn.hash=function(nn,qt){return gn.hashBinary(an(nn),qt)},gn.hashBinary=function(nn,qt){var Gt=rn(Xt(nn));return qt?bn(Gt):Gt},gn.ArrayBuffer=function(){this.reset()},gn.ArrayBuffer.prototype.append=function(nn){var qt,Gt=yn(this._buff.buffer,nn,!0),Kt=Gt.length;for(this._length+=nn.byteLength,qt=64;qt<=Kt;qt+=64)jt(this._hash,Wt(Gt.subarray(qt-64,qt)));return this._buff=qt-64<Kt?new Uint8Array(Gt.buffer.slice(qt-64)):new Uint8Array(0),this},gn.ArrayBuffer.prototype.end=function(nn){var qt,Gt,Kt=this._buff,Vt=Kt.length,Jt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(qt=0;qt<Vt;qt+=1)Jt[qt>>2]|=Kt[qt]<<(qt%4<<3);return this._finish(Jt,Vt),Gt=rn(this._hash),nn&&(Gt=bn(Gt)),this.reset(),Gt},gn.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},gn.ArrayBuffer.prototype.getState=function(){var nn=gn.prototype.getState.call(this);return nn.buff=hn(nn.buff),nn},gn.ArrayBuffer.prototype.setState=function(nn){return nn.buff=ln(nn.buff,!0),gn.prototype.setState.call(this,nn)},gn.ArrayBuffer.prototype.destroy=gn.prototype.destroy,gn.ArrayBuffer.prototype._finish=gn.prototype._finish,gn.ArrayBuffer.hash=function(nn,qt){var Gt=rn(tn(new Uint8Array(nn)));return qt?bn(Gt):Gt},gn}();const u=[],h=class{static addHandler(Tt,Ot,jt){Tt.addEventListener?Tt.addEventListener(Ot,jt,!1):Tt.attachEvent?Tt.attachEvent("on"+Ot,jt):Tt["on"+Ot]=jt}static windowResizeHandler(Tt){h.addHandler(window,"resize",Tt)}static fullscreenEnabled(){const Tt=window.document;return document.fullscreenEnabled||window.fullScreen||Tt.mozFullscreenEnabled||Tt.webkitIsFullScreen}static fullScreen(Tt,Ot){if(Ot){const jt=window.document;let Ut=window.document.exitFullscreen||jt.msExitFullscreen||jt.mozCancelFullScreen||jt.webkitCancelFullScreen;if(Ut!==void 0&&Ut)Ut.call(window.document);else if(window.ActiveXObject!==void 0){let Wt=new window.ActiveXObject("WScript.Shell");Wt!=null&&Wt.SendKeys("{F11}")}}else{let jt=Tt;jt||(jt=window.document.documentElement);let Ut=jt.requestFullScreen||jt.webkitRequestFullScreen||jt.mozRequestFullScreen||jt.msRequestFullScreen;if(Ut!==void 0&&Ut)Ut.call(jt);else if(window.ActiveXObject!==void 0){let Wt=new window.ActiveXObject("WScript.Shell");Wt!=null&&Wt.SendKeys("{F11}")}}}static requestFullScreen(Tt){let Ot=Tt;Ot||(Ot=window.document.documentElement);var jt=Ot.requestFullScreen||Ot.webkitRequestFullScreen||Ot.mozRequestFullScreen||Ot.msRequestFullScreen;if(jt)jt.call(Ot);else if(window.ActiveXObject!==void 0){var Ut=new window.ActiveXObject("WScript.Shell");Ut!==null&&Ut.SendKeys("{F11}")}}static exitFullScreen(){const Tt=window.document;var Ot=document.exitFullscreen||Tt.mozCancelFullScreen||Tt.webkitExitFullscreen||Tt.webkitExitFullscreen;if(Ot)Ot.call(document);else if(window.ActiveXObject!==void 0){var jt=new window.ActiveXObject("WScript.Shell");jt!==null&&jt.SendKeys("{F11}")}}static fullScreenElement(){return window.document.fullscreenElement||window.document.webkitFullscreenElement||window.document.mozFullscreenElement||window.document.msFullscreenElement}static isFullScreen(){return!!h.fullScreenElement()}static onFullScreenChanged(Tt){let Ot;"onfullscreenchange"in window.document?Ot="fullscreenchange":"onwebkitfullscreenchange"in window.document?Ot="webkitfullscreenchange":"onmozfullscreenchange"in window.document&&(Ot="mozfullscreenchange"),Ot?document.addEventListener(Ot,function(){const jt=h.isFullScreen();Tt(jt)}):document.addEventListener("MSFullscreenChange",function(){const jt=h.isFullScreen();Tt(jt)})}static stringifyCircularHandler(Tt,Ot){if(typeof Ot=="object"&&Ot!==null){if(u.indexOf(Ot)!==-1)return;u.push(Ot)}return Ot}static jsonStringify(Tt){if(!Tt)return"";const Ot=JSON.stringify(Tt,h.stringifyCircularHandler);return u.length=0,Ot}static jsonParse(Tt){const Ot=h.jsonStringify(Tt);if(Ot.length>1)return JSON.parse(Ot)}static getObjectURL(Tt){let Ot;const jt=window;return jt.createObjcectURL!=null?Ot=jt.createOjcectURL(Tt):window.URL!=null?Ot=window.URL.createObjectURL(Tt):window.webkitURL!=null&&(Ot=window.webkitURL.createObjectURL(Tt)),Ot}static getFileShortMD5(Tt,Ot){const jt=File.prototype,Ut=jt.slice||jt.mozSlice||jt.webkitSlice,Wt=Tt,Xt=new l.ArrayBuffer,tn=new FileReader;tn.onload=function(en){Xt.append(en.target?.result);const rn=Xt.end();Ot({isOK:!0,data:rn})},tn.onerror=function(){const en="\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01";console.warn(en),Ot({isOK:!1,data:en})},function(){const en=2097152>=Wt.size?Wt.size:2097152;tn.readAsArrayBuffer(Ut.call(Wt,0,en))}()}static MD5(Tt,Ot=!1){return l.hash(Tt,Ot)}};let d=h;d.copyText=Tt=>new Promise((Ot,jt)=>{const Ut=document.createElement("input");Ut.value=Tt,document.body.appendChild(Ut),Ut.select(),document.execCommand("copy"),Ut.remove(),Ot(!0)});class p{static toHump(Ot){return Ot.replace(/[\-\/\_](\w)/g,(jt,Ut)=>Ut.toUpperCase()).replace("views","")}}p.isNullOrEmpty=Tt=>Tt===null||Tt===""||Tt===void 0||Tt.length===0,p.isNotEmpty=Tt=>Tt!==null&&Tt!==""&&Tt!==void 0&&Tt.length!==0;class f{constructor(Ot="",jt=localStorage){this.prefixKey=Ot,this.storage=jt}getKey(Ot){return`${this.prefixKey}${Ot}`.toUpperCase()}set(Ot,jt,Ut=604800){const Wt=JSON.stringify({value:jt,expire:Ut!==null?new Date().getTime()+1e3*Ut:null});this.storage.setItem(this.getKey(Ot),Wt)}get(Ot,jt=null){const Ut=this.storage.getItem(this.getKey(Ot));if(Ut)try{const Wt=JSON.parse(Ut),{value:Xt,expire:tn}=Wt;if(tn===null||tn>=Date.now())return Xt;this.remove(this.getKey(Ot))}catch{return jt}return jt}remove(Ot){this.storage.removeItem(this.getKey(Ot))}clear(){this.storage.clear()}setCookie(Ot,jt,Ut=604800){document.cookie=`${this.getKey(Ot)}=${jt}; Max-Age=${Ut}`}getCookie(Ot){const jt=document.cookie.split("; ");for(let Ut=0,Wt=jt.length;Ut<Wt;Ut++){const Xt=jt[Ut].split("=");if(Xt[0]===this.getKey(Ot))return Xt[1]}return""}removeCookie(Ot){this.setCookie(Ot,1,-1)}clearCookie(){const Ot=document.cookie.match(/[^ =;]+(?==)/g);if(Ot)for(let jt=Ot.length;jt--;)document.cookie=Ot[jt]+"=0;expire="+new Date(0).toUTCString()}}const m=new f("",localStorage);function g(){let Tt=[];const Ot="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(var jt=0;jt<36;jt++)Tt[jt]=Ot.substr(Math.floor(16*Math.random()),1);return Tt[14]="4",Tt[19]=Ot.substr(3&Number(Tt[19])|8,1),Tt[8]=Tt[13]=Tt[18]=Tt[23]="-",Tt.join("")}var v;function y(Tt,Ot,jt){return jt<0&&(jt+=1),jt>1&&(jt-=1),jt<1/6?Tt+6*(Ot-Tt)*jt:jt<.5?Ot:jt<2/3?Tt+(Ot-Tt)*(2/3-jt)*6:Tt}function w(Tt){return/^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/.test(Tt)}function b(Tt){let Ot=Tt.toLowerCase();if(w(Tt)){if(Ot.length===4){let Ut="#";for(let Wt=1;Wt<4;Wt+=1)Ut+=Ot.slice(Wt,Wt+1).concat(Ot.slice(Wt,Wt+1));Ot=Ut}const jt=[];for(let Ut=1;Ut<7;Ut+=2)jt.push(parseInt("0x"+Ot.slice(Ut,Ut+2)));return"RGB("+jt.join(",")+")"}return Ot}function x(Tt,Ot){const jt=parseInt(Tt,16)+Ot,Ut=jt>255?255:jt;return Ut.toString(16).length>1?Ut.toString(16):`0${Ut.toString(16)}`}function S(Tt,Ot,jt){const Ut=[Tt,Ot,jt].map(Wt=>(Wt/=255)<=.03928?Wt/12.92:Math.pow((Wt+.055)/1.055,2.4));return .2126*Ut[0]+.7152*Ut[1]+.0722*Ut[2]}function C(Tt,Ot){const jt=parseInt(Tt,16)-Ot,Ut=jt<0?0:jt;return Ut.toString(16).length>1?Ut.toString(16):`0${Ut.toString(16)}`}function E(Tt){return{all:Tt=Tt||new Map,on(Ot,jt){const Ut=Tt?.get(Ot);Ut&&Ut.push(jt)||Tt?.set(Ot,[jt])},off(Ot,jt){const Ut=Tt?.get(Ot);Ut&&Ut.splice(Ut.indexOf(jt)>>>0,1)},emit(Ot,jt){(Tt?.get(Ot)||[]).slice().map(Ut=>{Ut(jt)}),(Tt?.get("*")||[]).slice().map(Ut=>{Ut(Ot,jt)})}}}exports.EnumColor=void 0,(v=exports.EnumColor||(exports.EnumColor={}))[v.RGBA=0]="RGBA",v[v.Hex=1]="Hex",v[v.Hsla=2]="Hsla";const k=E(),z={HproseServiceErrorEvent:"HproseServiceError",WebAPIErrorEvent:"WebAPIError",AlertInfoEvent:"AlertInfoEvent",CommonWarnEvent:"CommonWarnEvent",WidgetLoadedEvent:"WidgetLoaded",WidgetUnLoadedEvent:"WidgetLoaded",WidgetVisibleChanged:"WidgetVisibleChanged"},_=(Tt,Ot)=>{const jt=document.createElement("a");jt.download=Ot,jt.style.display="none";const Ut=new Blob([Tt],{type:"application/octet-stream"});jt.href=URL.createObjectURL(Ut),document.body.appendChild(jt),jt.click(),document.body.removeChild(jt)};function M(Tt){const Ot=Tt.lastIndexOf("/")+1;let jt=Tt.substring(Ot);return jt=decodeURI(jt.split("?")[0]),jt}class L{constructor(Ot){if(Ot&&!p.isNullOrEmpty(Ot)){if(L.httpTransport||(L.httpTransport=new i.HttpTransport),this.client=new t.Client(Ot),!this.client)throw Error("Hprose Client\u521D\u59CB\u5316\u9519\u8BEF");this.hproseURL=Ot,this.init()}}init(){this.client&&this.client.useServiceAsync().then(Ot=>{this.hproseProxy=Ot}).catch(Ot=>{String(Ot).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(Ot)})}async getProxy(){if(!this.hproseProxy)try{this.client&&(this.hproseProxy=await this.client.useServiceAsync())}catch(Ot){console.warn(Ot),this.hproseProxy=this.client?.useService()}return this.hproseProxy}async invoke(Ot,jt,Ut){if(this.client)return await this.client.invoke(Ot,jt,Ut)}encode(Ot,jt,Ut){return this.client?this.client.codec.encode(Ot,jt,Ut):void 0}decode(Ot,jt){return this.client?this.client.codec.decode(Ot,jt):void 0}}class B{constructor(Ot){this.hproseClient=new L(Ot),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 Ot=await this.hproseClient.getProxy();this.hpProxyObj=Ot}return this.hpProxyObj||k.emit(z.HproseServiceErrorEvent,"HproseProxy\u5BF9\u8C61\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5\uFF01"),this.hpProxyObj}async hproseInvoke(Ot,jt){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");let Ut;return Ut=new t.ClientContext,await this.hproseClient.invoke(Ot,jt,Ut)}async hproseInvokeContext(Ot,jt,...Ut){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");return await this.hproseClient.invoke(Ot,Ut,jt)}async hproseInvokeEncode(Ot){const jt=new n.ByteStream(Ot).toBytes(),Ut=await this.hproseClient.client?.request(jt,this.defaultContext);return Ut&&this.hproseClient.client?.codec.decode(Ut,this.defaultContext)}encodeRequest(Ot,...jt){const Ut=this.hproseClient.client?.codec?.encode(Ot,jt,this.defaultContext);return n.ByteStream.toString(Ut)}}class I{constructor(Ot,jt){Ot&&(this.message=Ot),jt&&(this.eventBus=jt)}msg(Ot,jt=3,Ut="success"){if(this.message)if(typeof this.message=="function")this.message({type:Ut,message:Ot,duration:jt});else switch(Ut){case"info":this.message.info(Ot,jt);break;case"success":this.message.success(Ot,jt);break;case"warning":this.message.warn(Ot,jt);break;case"error":this.message.error(Ot,jt)}else{switch(Ut){case"info":case"success":console.log(Ot);break;case"warning":console.warn(Ot);break;case"error":Ut="dark",console.error(Ot)}this.eventBus&&this.eventBus.emit(z.AlertInfoEvent,{type:Ut,info:Ot})}}info(Ot,jt=3){this.msg(Ot,jt,"info")}warn(Ot,jt=3){this.msg(Ot,jt,"warning")}err(Ot,jt=3){this.msg(Ot,jt,"error")}}const P=new Map,R={Config:SysConfig,EventBus:k,DefaultProxyClient:null,Axios:void 0},N=function(Tt,Ot,jt){jt?R.Config.DefaultHproseAPI=jt:!R.Config.DefaultHproseAPI&&R.Config.ServiceURL&&(R.Config.DefaultHproseAPI=R.Config.ServiceURL.DefaultHproseAPI),Ot&&(R.Axios=Ot),R.Config.DefaultHproseAPI&&p.isNotEmpty(R.Config.DefaultHproseAPI)&&(R.DefaultProxyClient=new B(R.Config.DefaultHproseAPI));const Ut=new I(Tt,R.EventBus);R.Message=Ut,R.EventBus.on(z.HproseServiceErrorEvent,Wt=>{const Xt=`\u5F53\u524D\u540E\u53F0\u4E1A\u52A1\u670D\u52A1\u4E0D\u53EF\u7528!${Wt}`;Ut.warn(Xt)}),R.EventBus.on(z.WebAPIErrorEvent,Wt=>{const Xt=`WebAPI\u540E\u53F0\u670D\u52A1\u4E0D\u53EF\u7528!${Wt}`;Ut.warn(Xt)}),R.EventBus.on(z.CommonWarnEvent,Wt=>{Ut.warn(Wt)})};function D(Tt){if(Tt&&p.isNotEmpty(Tt)){if(P.has(Tt))return P.get(Tt);{const Ot=new B(Tt);return P.set(Tt,Ot),Ot}}}const A=new f("user",localStorage);function T(){return A.get("access_token")}function O(){A.remove("access_token"),R.User&&delete R.User}function j(){return T()?.refresh}function U(Tt,Ot,jt,Ut="json",Wt){const Xt={baseURL:R.Config.ServiceURL.DefaultWebAPI,timeout:6e4,params:Tt,headers:{"Content-Type":"application/json",Authorization:"bearer "+T()?.token},responseType:Ut,cancelToken:Wt};if(jt)for(let tn in jt)Xt.headers[tn]=jt[tn];return Ot&&(Xt.baseURL=Ot),Xt}function W(Tt,Ot,jt,Ut,Wt="json",Xt){const tn=U(jt,Ot,Ut,Wt,Xt);return R.Axios?.get(Tt,tn).catch(function(en){console.log(en),R.Message?.err("\u670D\u52A1Get\u8BF7\u6C42\u9519\u8BEF\uFF1A"+Tt)})}function F(Tt,Ot,jt,Ut,Wt,Xt="json"){const tn=U(Ut,Ot,Wt,Xt),en=function(rn){let an=new FormData;return rn&&Object.keys(rn).forEach(ln=>{if(!rn)return;let hn=rn[ln];var yn;hn!=null&&an.append(ln,(yn=hn)instanceof Blob?yn:yn.toString())}),an}(jt);return R.Axios?.post(Tt,en,tn).catch(function(rn){console.log(rn),R.Message?.err("\u670D\u52A1Post\u8BF7\u6C42\u9519\u8BEF\uFF1A"+Tt)})}var $={exports:{}},H=typeof window!="undefined"?window:s!==void 0?s:typeof self!="undefined"?self:{},q=function(Tt){if(!Tt)return!1;var Ot=V.call(Tt);return Ot==="[object Function]"||typeof Tt=="function"&&Ot!=="[object RegExp]"||typeof window!="undefined"&&(Tt===window.setTimeout||Tt===window.alert||Tt===window.confirm||Tt===window.prompt)},V=Object.prototype.toString,X=function(Tt){return Tt.replace(/^\s+|\s+$/g,"")},G=function(){for(var Tt={},Ot=0;Ot<arguments.length;Ot++){var jt=arguments[Ot];for(var Ut in jt)K.call(jt,Ut)&&(Tt[Ut]=jt[Ut])}return Tt},K=Object.prototype.hasOwnProperty,Y=H,J=q,Z=function(Tt){if(!Tt)return{};for(var Ot,jt={},Ut=X(Tt).split(`
2
+ `),Wt=0;Wt<Ut.length;Wt++){var Xt=Ut[Wt],tn=Xt.indexOf(":"),en=X(Xt.slice(0,tn)).toLowerCase(),rn=X(Xt.slice(tn+1));jt[en]===void 0?jt[en]=rn:(Ot=jt[en],Object.prototype.toString.call(Ot)==="[object Array]"?jt[en].push(rn):jt[en]=[jt[en],rn])}return jt},Q=G;function ee(Tt,Ot,jt){var Ut=Tt;return J(Ot)?(jt=Ot,typeof Tt=="string"&&(Ut={uri:Tt})):Ut=Q(Ot,{uri:Tt}),Ut.callback=jt,Ut}function te(Tt,Ot,jt){return ne(Ot=ee(Tt,Ot,jt))}function ne(Tt){if(Tt.callback===void 0)throw new Error("callback argument missing");var Ot=!1,jt=function(Gt,Kt,Vt){Ot||(Ot=!0,Tt.callback(Gt,Kt,Vt))};function Ut(){var Gt=void 0;if(Gt=rn.response?rn.response:rn.responseText||function(Kt){try{if(Kt.responseType==="document")return Kt.responseXML;var Vt=Kt.responseXML&&Kt.responseXML.documentElement.nodeName==="parsererror";if(Kt.responseType===""&&!Vt)return Kt.responseXML}catch{}return null}(rn),nn)try{Gt=JSON.parse(Gt)}catch{}return Gt}function Wt(Gt){return clearTimeout(an),Gt instanceof Error||(Gt=new Error(""+(Gt||"Unknown XMLHttpRequest Error"))),Gt.statusCode=0,jt(Gt,qt)}function Xt(){if(!en){var Gt;clearTimeout(an),Gt=Tt.useXDR&&rn.status===void 0?200:rn.status===1223?204:rn.status;var Kt=qt,Vt=null;return Gt!==0?(Kt={body:Ut(),statusCode:Gt,method:hn,headers:{},url:ln,rawRequest:rn},rn.getAllResponseHeaders&&(Kt.headers=Z(rn.getAllResponseHeaders()))):Vt=new Error("Internal XMLHttpRequest Error"),jt(Vt,Kt,Kt.body)}}var tn,en,rn=Tt.xhr||null;rn||(rn=Tt.cors||Tt.useXDR?new te.XDomainRequest:new te.XMLHttpRequest);var an,ln=rn.url=Tt.uri||Tt.url,hn=rn.method=Tt.method||"GET",yn=Tt.body||Tt.data,bn=rn.headers=Tt.headers||{},gn=!!Tt.sync,nn=!1,qt={body:void 0,headers:{},statusCode:0,method:hn,url:ln,rawRequest:rn};if("json"in Tt&&Tt.json!==!1&&(nn=!0,bn.accept||bn.Accept||(bn.Accept="application/json"),hn!=="GET"&&hn!=="HEAD"&&(bn["content-type"]||bn["Content-Type"]||(bn["Content-Type"]="application/json"),yn=JSON.stringify(Tt.json===!0?yn:Tt.json))),rn.onreadystatechange=function(){rn.readyState===4&&setTimeout(Xt,0)},rn.onload=Xt,rn.onerror=Wt,rn.onprogress=function(){},rn.onabort=function(){en=!0},rn.ontimeout=Wt,rn.open(hn,ln,!gn,Tt.username,Tt.password),gn||(rn.withCredentials=!!Tt.withCredentials),!gn&&Tt.timeout>0&&(an=setTimeout(function(){if(!en){en=!0,rn.abort("timeout");var Gt=new Error("XMLHttpRequest timeout");Gt.code="ETIMEDOUT",Wt(Gt)}},Tt.timeout)),rn.setRequestHeader)for(tn in bn)bn.hasOwnProperty(tn)&&rn.setRequestHeader(tn,bn[tn]);else if(Tt.headers&&!function(Gt){for(var Kt in Gt)if(Gt.hasOwnProperty(Kt))return!1;return!0}(Tt.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in Tt&&(rn.responseType=Tt.responseType),"beforeSend"in Tt&&typeof Tt.beforeSend=="function"&&Tt.beforeSend(rn),rn.send(yn||null),rn}$.exports=te,$.exports.default=te,te.XMLHttpRequest=Y.XMLHttpRequest||function(){},te.XDomainRequest="withCredentials"in new te.XMLHttpRequest?te.XMLHttpRequest:Y.XDomainRequest,function(Tt,Ot){for(var jt=0;jt<Tt.length;jt++)Ot(Tt[jt])}(["get","put","post","patch","head","delete"],function(Tt){te[Tt==="delete"?"del":Tt]=function(Ot,jt,Ut){return(jt=ee(Ot,jt,Ut)).method=Tt.toUpperCase(),ne(jt)}});var ie=$.exports;const oe=[200,201,202,204,308],re=[408,502,503,504];class se{constructor(Ot){this.endpoint=Ot.endpoint,this.file=Ot.file,this.fileName=encodeURI(this.file.name),this.headers=Ot.headers||{},this.method=Ot.method||"PUT",this.chunkSize=Ot.chunkSize||5120,this.attempts=Ot.attempts||5,this.delayBeforeAttempt=Ot.delayBeforeAttempt||1,this.md5=Ot.md5||"",this.maxFileBytes=1024*(Ot.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(Ot,jt){this.eventTarget.on(Ot,jt)}abort(){this.pause(),this.currentXhr?.abort()}pause(){this.paused=!0}resume(){this.paused&&(this.paused=!1,this.sendChunks())}dispatch(Ot,jt){this.eventTarget.emit(Ot,jt)}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(Ot=>(this.endpointValue=Ot,this.endpointValue))}getChunk(){return new Promise(Ot=>{const jt=this.totalChunks===1?this.file.size:this.chunkByteSize,Ut=jt*this.chunkCount;this.reader.onload=()=>{this.reader.result!==null&&(this.chunk=new Blob([this.reader.result],{type:"application/octet-stream"})),Ot(()=>{})},this.reader.readAsArrayBuffer(this.file.slice(Ut,Ut+jt))})}xhrPromise(Ot){const jt=Ut=>{Ut.upload.onprogress=Wt=>{const Xt=100/this.totalChunks,tn=Xt*this.file.size,en=Xt*this.chunkCount,rn=Wt.loaded/(Wt.total??tn)*Xt;this.dispatch("progress",Math.min(en+rn,100))}};return new Promise((Ut,Wt)=>{this.currentXhr=ie({...Ot,beforeSend:jt},(Xt,tn)=>(this.currentXhr=void 0,Xt?Wt(Xt):Ut(tn)))})}sendChunk(){if(!this.chunk)return;const Ot=this.chunkCount*this.chunkByteSize,jt=Ot+this.chunk.size-1,Ut={...this.headers,FileName:this.fileName,FileMD5:this.md5,"Content-Type":this.file.type,"Content-Range":`bytes ${Ot}-${jt}/${this.file.size}`};if(this.dispatch("attempt",{chunkNumber:this.chunkCount,chunkSize:this.chunk.size}),this.endpointValue)return this.xhrPromise({headers:Ut,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(Ot=>{if(this.attemptCount=this.attemptCount+1,Ot!=null&&oe.includes(Ot.statusCode)){this.dispatch("chunkSuccess",{chunk:this.chunkCount,attempts:this.attemptCount,response:Ot}),this.attemptCount=0,this.chunkCount=this.chunkCount+1,this.chunkCount<this.totalChunks?this.sendChunks():(this.success=!0,this.dispatch("success"));const jt=100*(this.chunkCount/this.totalChunks*this.file.size)/this.file.size;this.dispatch("progress",jt)}else if(Ot!=null&&re.includes(Ot.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:${Ot?.statusCode}\uFF0C\u505C\u6B62\u4E0A\u4F20\u3002`,chunkNumber:this.chunkCount,attempts:this.attemptCount})}}).catch(Ot=>{this.paused||this.offline||this.manageRetries()})}}const ae=new class{hasClass(Tt,Ot){return Tt.className.match(new RegExp("(\\s|^)"+Ot+"(\\s|$)"))}addClass(Tt,Ot){this.hasClass(Tt,Ot)||(Tt.className+=" "+Ot)}removeClass(Tt,Ot){if(this.hasClass(Tt,Ot)){const jt=new RegExp("(\\s|^)"+Ot+"(\\s|$)");Tt.className=Tt.className.replace(jt," ")}}toggleClass(Tt,Ot){this.hasClass(Tt,Ot)?this.removeClass(Tt,Ot):this.addClass(Tt,Ot)}},ce=A.get("is_LockScreen",!1),le={isLock:ce,lockTime:ce=="true"?he():0};function ue(Tt){le.isLock=Tt,A.set("is_LockScreen",Tt,10),Tt&&(O(),console.log("\u9501\u5C4F\u4E86\u2026\u2026"))}function he(){let Tt=3600;return R.Config.UI?.LockTime&&R.Config.UI?.LockTime>=10&&(Tt=R.Config.UI.LockTime),Tt}let de;function pe(){clearInterval(de),window.location.href.indexOf("/login")>0||le.isLock||(ue(!1),le.lockTime=he(),de=setInterval(()=>{if(le.lockTime--,le.lockTime<=0)return ue(!0),clearInterval(de)},1e3))}var fe={exports:{}},me=fe.exports=function Tt(Ot,jt,Ut){function Wt(en,rn){if(!jt[en]){if(!Ot[en]){if(!rn&&a)return a(en);if(Xt)return Xt(en,!0);var an=new Error("Cannot find module '"+en+"'");throw an.code="MODULE_NOT_FOUND",an}var ln=jt[en]={exports:{}};Ot[en][0].call(ln.exports,function(hn){var yn=Ot[en][1][hn];return Wt(yn||hn)},ln,ln.exports,Tt,Ot,jt,Ut)}return jt[en].exports}for(var Xt=a,tn=0;tn<Ut.length;tn++)Wt(Ut[tn]);return Wt}({1:[function(Tt,Ot,jt){(function(Ut){var Wt,Xt,tn=Ut.MutationObserver||Ut.WebKitMutationObserver;if(tn){var en=0,rn=new tn(yn),an=Ut.document.createTextNode("");rn.observe(an,{characterData:!0}),Wt=function(){an.data=en=++en%2}}else if(Ut.setImmediate||Ut.MessageChannel===void 0)Wt="document"in Ut&&"onreadystatechange"in Ut.document.createElement("script")?function(){var gn=Ut.document.createElement("script");gn.onreadystatechange=function(){yn(),gn.onreadystatechange=null,gn.parentNode.removeChild(gn),gn=null},Ut.document.documentElement.appendChild(gn)}:function(){setTimeout(yn,0)};else{var ln=new Ut.MessageChannel;ln.port1.onmessage=yn,Wt=function(){ln.port2.postMessage(0)}}var hn=[];function yn(){var gn,nn;Xt=!0;for(var qt=hn.length;qt;){for(nn=hn,hn=[],gn=-1;++gn<qt;)nn[gn]();qt=hn.length}Xt=!1}function bn(gn){hn.push(gn)!==1||Xt||Wt()}Ot.exports=bn}).call(this,s!==void 0?s:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],2:[function(Tt,Ot,jt){var Ut=Tt(1);function Wt(){}var Xt={},tn=["REJECTED"],en=["FULFILLED"],rn=["PENDING"];function an(Vt){if(typeof Vt!="function")throw new TypeError("resolver must be a function");this.state=rn,this.queue=[],this.outcome=void 0,Vt!==Wt&&bn(this,Vt)}function ln(Vt,Jt,mn){this.promise=Vt,typeof Jt=="function"&&(this.onFulfilled=Jt,this.callFulfilled=this.otherCallFulfilled),typeof mn=="function"&&(this.onRejected=mn,this.callRejected=this.otherCallRejected)}function hn(Vt,Jt,mn){Ut(function(){var pn;try{pn=Jt(mn)}catch(fn){return Xt.reject(Vt,fn)}pn===Vt?Xt.reject(Vt,new TypeError("Cannot resolve promise with itself")):Xt.resolve(Vt,pn)})}function yn(Vt){var Jt=Vt&&Vt.then;if(Vt&&(typeof Vt=="object"||typeof Vt=="function")&&typeof Jt=="function")return function(){Jt.apply(Vt,arguments)}}function bn(Vt,Jt){var mn=!1;function pn(Cn){mn||(mn=!0,Xt.reject(Vt,Cn))}function fn(Cn){mn||(mn=!0,Xt.resolve(Vt,Cn))}function xn(){Jt(fn,pn)}var Sn=gn(xn);Sn.status==="error"&&pn(Sn.value)}function gn(Vt,Jt){var mn={};try{mn.value=Vt(Jt),mn.status="success"}catch(pn){mn.status="error",mn.value=pn}return mn}function nn(Vt){return Vt instanceof this?Vt:Xt.resolve(new this(Wt),Vt)}function qt(Vt){var Jt=new this(Wt);return Xt.reject(Jt,Vt)}function Gt(Vt){var Jt=this;if(Object.prototype.toString.call(Vt)!=="[object Array]")return this.reject(new TypeError("must be an array"));var mn=Vt.length,pn=!1;if(!mn)return this.resolve([]);for(var fn=new Array(mn),xn=0,Sn=-1,Cn=new this(Wt);++Sn<mn;)zn(Vt[Sn],Sn);return Cn;function zn(_n,Mn){function Bn(Ln){fn[Mn]=Ln,++xn!==mn||pn||(pn=!0,Xt.resolve(Cn,fn))}Jt.resolve(_n).then(Bn,function(Ln){pn||(pn=!0,Xt.reject(Cn,Ln))})}}function Kt(Vt){var Jt=this;if(Object.prototype.toString.call(Vt)!=="[object Array]")return this.reject(new TypeError("must be an array"));var mn=Vt.length,pn=!1;if(!mn)return this.resolve([]);for(var fn=-1,xn=new this(Wt);++fn<mn;)Sn(Vt[fn]);return xn;function Sn(Cn){Jt.resolve(Cn).then(function(zn){pn||(pn=!0,Xt.resolve(xn,zn))},function(zn){pn||(pn=!0,Xt.reject(xn,zn))})}}Ot.exports=an,an.prototype.catch=function(Vt){return this.then(null,Vt)},an.prototype.then=function(Vt,Jt){if(typeof Vt!="function"&&this.state===en||typeof Jt!="function"&&this.state===tn)return this;var mn=new this.constructor(Wt);return this.state!==rn?hn(mn,this.state===en?Vt:Jt,this.outcome):this.queue.push(new ln(mn,Vt,Jt)),mn},ln.prototype.callFulfilled=function(Vt){Xt.resolve(this.promise,Vt)},ln.prototype.otherCallFulfilled=function(Vt){hn(this.promise,this.onFulfilled,Vt)},ln.prototype.callRejected=function(Vt){Xt.reject(this.promise,Vt)},ln.prototype.otherCallRejected=function(Vt){hn(this.promise,this.onRejected,Vt)},Xt.resolve=function(Vt,Jt){var mn=gn(yn,Jt);if(mn.status==="error")return Xt.reject(Vt,mn.value);var pn=mn.value;if(pn)bn(Vt,pn);else{Vt.state=en,Vt.outcome=Jt;for(var fn=-1,xn=Vt.queue.length;++fn<xn;)Vt.queue[fn].callFulfilled(Jt)}return Vt},Xt.reject=function(Vt,Jt){Vt.state=tn,Vt.outcome=Jt;for(var mn=-1,pn=Vt.queue.length;++mn<pn;)Vt.queue[mn].callRejected(Jt);return Vt},an.resolve=nn,an.reject=qt,an.all=Gt,an.race=Kt},{1:1}],3:[function(Tt,Ot,jt){(function(Ut){typeof Ut.Promise!="function"&&(Ut.Promise=Tt(2))}).call(this,s!==void 0?s:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{2:2}],4:[function(Tt,Ot,jt){var Ut=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ft){return typeof Ft}:function(Ft){return Ft&&typeof Symbol=="function"&&Ft.constructor===Symbol&&Ft!==Symbol.prototype?"symbol":typeof Ft};function Wt(Ft,$t){if(!(Ft instanceof $t))throw new TypeError("Cannot call a class as a function")}function Xt(){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 tn=Xt();function en(){try{if(!tn||!tn.open)return!1;var Ft=typeof openDatabase!="undefined"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),$t=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!Ft||$t)&&typeof indexedDB!="undefined"&&typeof IDBKeyRange!="undefined"}catch{return!1}}function rn(Ft,$t){Ft=Ft||[],$t=$t||{};try{return new Blob(Ft,$t)}catch(Yt){if(Yt.name!=="TypeError")throw Yt;for(var Ht=new(typeof BlobBuilder!="undefined"?BlobBuilder:typeof MSBlobBuilder!="undefined"?MSBlobBuilder:typeof MozBlobBuilder!="undefined"?MozBlobBuilder:WebKitBlobBuilder),Zt=0;Zt<Ft.length;Zt+=1)Ht.append(Ft[Zt]);return Ht.getBlob($t.type)}}typeof Promise=="undefined"&&Tt(3);var an=Promise;function ln(Ft,$t){$t&&Ft.then(function(Ht){$t(null,Ht)},function(Ht){$t(Ht)})}function hn(Ft,$t,Ht){typeof $t=="function"&&Ft.then($t),typeof Ht=="function"&&Ft.catch(Ht)}function yn(Ft){return typeof Ft!="string"&&(console.warn(Ft+" used as a key, but it is not a string."),Ft=String(Ft)),Ft}function bn(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var gn="local-forage-detect-blob-support",nn=void 0,qt={},Gt=Object.prototype.toString,Kt="readonly",Vt="readwrite";function Jt(Ft){for(var $t=Ft.length,Ht=new ArrayBuffer($t),Zt=new Uint8Array(Ht),Yt=0;Yt<$t;Yt++)Zt[Yt]=Ft.charCodeAt(Yt);return Ht}function mn(Ft){return new an(function($t){var Ht=Ft.transaction(gn,Vt),Zt=rn([""]);Ht.objectStore(gn).put(Zt,"key"),Ht.onabort=function(Yt){Yt.preventDefault(),Yt.stopPropagation(),$t(!1)},Ht.oncomplete=function(){var Yt=navigator.userAgent.match(/Chrome\/(\d+)/),Qt=navigator.userAgent.match(/Edge\//);$t(Qt||!Yt||parseInt(Yt[1],10)>=43)}}).catch(function(){return!1})}function pn(Ft){return typeof nn=="boolean"?an.resolve(nn):mn(Ft).then(function($t){return nn=$t})}function fn(Ft){var $t=qt[Ft.name],Ht={};Ht.promise=new an(function(Zt,Yt){Ht.resolve=Zt,Ht.reject=Yt}),$t.deferredOperations.push(Ht),$t.dbReady?$t.dbReady=$t.dbReady.then(function(){return Ht.promise}):$t.dbReady=Ht.promise}function xn(Ft){var $t=qt[Ft.name].deferredOperations.pop();if($t)return $t.resolve(),$t.promise}function Sn(Ft,$t){var Ht=qt[Ft.name].deferredOperations.pop();if(Ht)return Ht.reject($t),Ht.promise}function Cn(Ft,$t){return new an(function(Ht,Zt){if(qt[Ft.name]=qt[Ft.name]||Yn(),Ft.db){if(!$t)return Ht(Ft.db);fn(Ft),Ft.db.close()}var Yt=[Ft.name];$t&&Yt.push(Ft.version);var Qt=tn.open.apply(tn,Yt);$t&&(Qt.onupgradeneeded=function(on){var sn=Qt.result;try{sn.createObjectStore(Ft.storeName),on.oldVersion<=1&&sn.createObjectStore(gn)}catch(cn){if(cn.name!=="ConstraintError")throw cn;console.warn('The database "'+Ft.name+'" has been upgraded from version '+on.oldVersion+" to version "+on.newVersion+', but the storage "'+Ft.storeName+'" already exists.')}}),Qt.onerror=function(on){on.preventDefault(),Zt(Qt.error)},Qt.onsuccess=function(){var on=Qt.result;on.onversionchange=function(sn){sn.target.close()},Ht(on),xn(Ft)}})}function zn(Ft){return Cn(Ft,!1)}function _n(Ft){return Cn(Ft,!0)}function Mn(Ft,$t){if(!Ft.db)return!0;var Ht=!Ft.db.objectStoreNames.contains(Ft.storeName),Zt=Ft.version<Ft.db.version,Yt=Ft.version>Ft.db.version;if(Zt&&(Ft.version!==$t&&console.warn('The database "'+Ft.name+`" can't be downgraded from version `+Ft.db.version+" to version "+Ft.version+"."),Ft.version=Ft.db.version),Yt||Ht){if(Ht){var Qt=Ft.db.version+1;Qt>Ft.version&&(Ft.version=Qt)}return!0}return!1}function Bn(Ft){return new an(function($t,Ht){var Zt=new FileReader;Zt.onerror=Ht,Zt.onloadend=function(Yt){var Qt=btoa(Yt.target.result||"");$t({__local_forage_encoded_blob:!0,data:Qt,type:Ft.type})},Zt.readAsBinaryString(Ft)})}function Ln(Ft){return rn([Jt(atob(Ft.data))],{type:Ft.type})}function Pn(Ft){return Ft&&Ft.__local_forage_encoded_blob}function Fn(Ft){var $t=this,Ht=$t._initReady().then(function(){var Zt=qt[$t._dbInfo.name];if(Zt&&Zt.dbReady)return Zt.dbReady});return hn(Ht,Ft,Ft),Ht}function Wn(Ft){fn(Ft);for(var $t=qt[Ft.name],Ht=$t.forages,Zt=0;Zt<Ht.length;Zt++){var Yt=Ht[Zt];Yt._dbInfo.db&&(Yt._dbInfo.db.close(),Yt._dbInfo.db=null)}return Ft.db=null,zn(Ft).then(function(Qt){return Ft.db=Qt,Mn(Ft)?_n(Ft):Qt}).then(function(Qt){Ft.db=$t.db=Qt;for(var on=0;on<Ht.length;on++)Ht[on]._dbInfo.db=Qt}).catch(function(Qt){throw Sn(Ft,Qt),Qt})}function Rn(Ft,$t,Ht,Zt){Zt===void 0&&(Zt=1);try{var Yt=Ft.db.transaction(Ft.storeName,$t);Ht(null,Yt)}catch(Qt){if(Zt>0&&(!Ft.db||Qt.name==="InvalidStateError"||Qt.name==="NotFoundError"))return an.resolve().then(function(){if(!Ft.db||Qt.name==="NotFoundError"&&!Ft.db.objectStoreNames.contains(Ft.storeName)&&Ft.version<=Ft.db.version)return Ft.db&&(Ft.version=Ft.db.version+1),_n(Ft)}).then(function(){return Wn(Ft).then(function(){Rn(Ft,$t,Ht,Zt-1)})}).catch(Ht);Ht(Qt)}}function Yn(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function vi(Ft){var $t=this,Ht={db:null};if(Ft)for(var Zt in Ft)Ht[Zt]=Ft[Zt];var Yt=qt[Ht.name];Yt||(Yt=Yn(),qt[Ht.name]=Yt),Yt.forages.push($t),$t._initReady||($t._initReady=$t.ready,$t.ready=Fn);var Qt=[];function on(){return an.resolve()}for(var sn=0;sn<Yt.forages.length;sn++){var cn=Yt.forages[sn];cn!==$t&&Qt.push(cn._initReady().catch(on))}var un=Yt.forages.slice(0);return an.all(Qt).then(function(){return Ht.db=Yt.db,zn(Ht)}).then(function(dn){return Ht.db=dn,Mn(Ht,$t._defaultConfig.version)?_n(Ht):dn}).then(function(dn){Ht.db=Yt.db=dn,$t._dbInfo=Ht;for(var vn=0;vn<un.length;vn++){var wn=un[vn];wn!==$t&&(wn._dbInfo.db=Ht.db,wn._dbInfo.version=Ht.version)}})}function yi(Ft,$t){var Ht=this;Ft=yn(Ft);var Zt=new an(function(Yt,Qt){Ht.ready().then(function(){Rn(Ht._dbInfo,Kt,function(on,sn){if(on)return Qt(on);try{var cn=sn.objectStore(Ht._dbInfo.storeName).get(Ft);cn.onsuccess=function(){var un=cn.result;un===void 0&&(un=null),Pn(un)&&(un=Ln(un)),Yt(un)},cn.onerror=function(){Qt(cn.error)}}catch(un){Qt(un)}})}).catch(Qt)});return ln(Zt,$t),Zt}function wi(Ft,$t){var Ht=this,Zt=new an(function(Yt,Qt){Ht.ready().then(function(){Rn(Ht._dbInfo,Kt,function(on,sn){if(on)return Qt(on);try{var cn=sn.objectStore(Ht._dbInfo.storeName).openCursor(),un=1;cn.onsuccess=function(){var dn=cn.result;if(dn){var vn=dn.value;Pn(vn)&&(vn=Ln(vn));var wn=Ft(vn,dn.key,un++);wn!==void 0?Yt(wn):dn.continue()}else Yt()},cn.onerror=function(){Qt(cn.error)}}catch(dn){Qt(dn)}})}).catch(Qt)});return ln(Zt,$t),Zt}function bi(Ft,$t,Ht){var Zt=this;Ft=yn(Ft);var Yt=new an(function(Qt,on){var sn;Zt.ready().then(function(){return sn=Zt._dbInfo,Gt.call($t)==="[object Blob]"?pn(sn.db).then(function(cn){return cn?$t:Bn($t)}):$t}).then(function(cn){Rn(Zt._dbInfo,Vt,function(un,dn){if(un)return on(un);try{var vn=dn.objectStore(Zt._dbInfo.storeName);cn===null&&(cn=void 0);var wn=vn.put(cn,Ft);dn.oncomplete=function(){cn===void 0&&(cn=null),Qt(cn)},dn.onabort=dn.onerror=function(){var En=wn.error?wn.error:wn.transaction.error;on(En)}}catch(En){on(En)}})}).catch(on)});return ln(Yt,Ht),Yt}function xi(Ft,$t){var Ht=this;Ft=yn(Ft);var Zt=new an(function(Yt,Qt){Ht.ready().then(function(){Rn(Ht._dbInfo,Vt,function(on,sn){if(on)return Qt(on);try{var cn=sn.objectStore(Ht._dbInfo.storeName).delete(Ft);sn.oncomplete=function(){Yt()},sn.onerror=function(){Qt(cn.error)},sn.onabort=function(){var un=cn.error?cn.error:cn.transaction.error;Qt(un)}}catch(un){Qt(un)}})}).catch(Qt)});return ln(Zt,$t),Zt}function Si(Ft){var $t=this,Ht=new an(function(Zt,Yt){$t.ready().then(function(){Rn($t._dbInfo,Vt,function(Qt,on){if(Qt)return Yt(Qt);try{var sn=on.objectStore($t._dbInfo.storeName).clear();on.oncomplete=function(){Zt()},on.onabort=on.onerror=function(){var cn=sn.error?sn.error:sn.transaction.error;Yt(cn)}}catch(cn){Yt(cn)}})}).catch(Yt)});return ln(Ht,Ft),Ht}function Ci(Ft){var $t=this,Ht=new an(function(Zt,Yt){$t.ready().then(function(){Rn($t._dbInfo,Kt,function(Qt,on){if(Qt)return Yt(Qt);try{var sn=on.objectStore($t._dbInfo.storeName).count();sn.onsuccess=function(){Zt(sn.result)},sn.onerror=function(){Yt(sn.error)}}catch(cn){Yt(cn)}})}).catch(Yt)});return ln(Ht,Ft),Ht}function Ei(Ft,$t){var Ht=this,Zt=new an(function(Yt,Qt){Ft<0?Yt(null):Ht.ready().then(function(){Rn(Ht._dbInfo,Kt,function(on,sn){if(on)return Qt(on);try{var cn=sn.objectStore(Ht._dbInfo.storeName),un=!1,dn=cn.openKeyCursor();dn.onsuccess=function(){var vn=dn.result;vn?Ft===0||un?Yt(vn.key):(un=!0,vn.advance(Ft)):Yt(null)},dn.onerror=function(){Qt(dn.error)}}catch(vn){Qt(vn)}})}).catch(Qt)});return ln(Zt,$t),Zt}function ki(Ft){var $t=this,Ht=new an(function(Zt,Yt){$t.ready().then(function(){Rn($t._dbInfo,Kt,function(Qt,on){if(Qt)return Yt(Qt);try{var sn=on.objectStore($t._dbInfo.storeName).openKeyCursor(),cn=[];sn.onsuccess=function(){var un=sn.result;un?(cn.push(un.key),un.continue()):Zt(cn)},sn.onerror=function(){Yt(sn.error)}}catch(un){Yt(un)}})}).catch(Yt)});return ln(Ht,Ft),Ht}function zi(Ft,$t){$t=bn.apply(this,arguments);var Ht=this.config();(Ft=typeof Ft!="function"&&Ft||{}).name||(Ft.name=Ft.name||Ht.name,Ft.storeName=Ft.storeName||Ht.storeName);var Zt,Yt=this;if(Ft.name){var Qt=Ft.name===Ht.name&&Yt._dbInfo.db?an.resolve(Yt._dbInfo.db):zn(Ft).then(function(on){var sn=qt[Ft.name],cn=sn.forages;sn.db=on;for(var un=0;un<cn.length;un++)cn[un]._dbInfo.db=on;return on});Zt=Ft.storeName?Qt.then(function(on){if(on.objectStoreNames.contains(Ft.storeName)){var sn=on.version+1;fn(Ft);var cn=qt[Ft.name],un=cn.forages;on.close();for(var dn=0;dn<un.length;dn++){var vn=un[dn];vn._dbInfo.db=null,vn._dbInfo.version=sn}return new an(function(wn,En){var kn=tn.open(Ft.name,sn);kn.onerror=function(In){kn.result.close(),En(In)},kn.onupgradeneeded=function(){kn.result.deleteObjectStore(Ft.storeName)},kn.onsuccess=function(){var In=kn.result;In.close(),wn(In)}}).then(function(wn){cn.db=wn;for(var En=0;En<un.length;En++){var kn=un[En];kn._dbInfo.db=wn,xn(kn._dbInfo)}}).catch(function(wn){throw(Sn(Ft,wn)||an.resolve()).catch(function(){}),wn})}}):Qt.then(function(on){fn(Ft);var sn=qt[Ft.name],cn=sn.forages;on.close();for(var un=0;un<cn.length;un++)cn[un]._dbInfo.db=null;return new an(function(dn,vn){var wn=tn.deleteDatabase(Ft.name);wn.onerror=function(){var En=wn.result;En&&En.close(),vn(wn.error)},wn.onblocked=function(){console.warn('dropInstance blocked for database "'+Ft.name+'" until all open connections are closed')},wn.onsuccess=function(){var En=wn.result;En&&En.close(),dn(En)}}).then(function(dn){sn.db=dn;for(var vn=0;vn<cn.length;vn++)xn(cn[vn]._dbInfo)}).catch(function(dn){throw(Sn(Ft,dn)||an.resolve()).catch(function(){}),dn})})}else Zt=an.reject("Invalid arguments");return ln(Zt,$t),Zt}var _i={_driver:"asyncStorage",_initStorage:vi,_support:en(),iterate:wi,getItem:yi,setItem:bi,removeItem:xi,clear:Si,length:Ci,key:Ei,keys:ki,dropInstance:zi};function Mi(){return typeof openDatabase=="function"}var Nn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Li="~~local_forage_type~",Jn=/^~~local_forage_type~([^~]+)~/,jn="__lfsc__:",$n=jn.length,Hn="arbf",qn="blob",Zn="si08",Qn="ui08",ei="uic8",ti="si16",ni="si32",ii="ur16",oi="ui32",ri="fl32",si="fl64",ai=$n+Hn.length,ci=Object.prototype.toString;function ui(Ft){var $t,Ht,Zt,Yt,Qt,on=.75*Ft.length,sn=Ft.length,cn=0;Ft[Ft.length-1]==="="&&(on--,Ft[Ft.length-2]==="="&&on--);var un=new ArrayBuffer(on),dn=new Uint8Array(un);for($t=0;$t<sn;$t+=4)Ht=Nn.indexOf(Ft[$t]),Zt=Nn.indexOf(Ft[$t+1]),Yt=Nn.indexOf(Ft[$t+2]),Qt=Nn.indexOf(Ft[$t+3]),dn[cn++]=Ht<<2|Zt>>4,dn[cn++]=(15&Zt)<<4|Yt>>2,dn[cn++]=(3&Yt)<<6|63&Qt;return un}function Vn(Ft){var $t,Ht=new Uint8Array(Ft),Zt="";for($t=0;$t<Ht.length;$t+=3)Zt+=Nn[Ht[$t]>>2],Zt+=Nn[(3&Ht[$t])<<4|Ht[$t+1]>>4],Zt+=Nn[(15&Ht[$t+1])<<2|Ht[$t+2]>>6],Zt+=Nn[63&Ht[$t+2]];return Ht.length%3==2?Zt=Zt.substring(0,Zt.length-1)+"=":Ht.length%3==1&&(Zt=Zt.substring(0,Zt.length-2)+"=="),Zt}function Bi(Ft,$t){var Ht="";if(Ft&&(Ht=ci.call(Ft)),Ft&&(Ht==="[object ArrayBuffer]"||Ft.buffer&&ci.call(Ft.buffer)==="[object ArrayBuffer]")){var Zt,Yt=jn;Ft instanceof ArrayBuffer?(Zt=Ft,Yt+=Hn):(Zt=Ft.buffer,Ht==="[object Int8Array]"?Yt+=Zn:Ht==="[object Uint8Array]"?Yt+=Qn:Ht==="[object Uint8ClampedArray]"?Yt+=ei:Ht==="[object Int16Array]"?Yt+=ti:Ht==="[object Uint16Array]"?Yt+=ii:Ht==="[object Int32Array]"?Yt+=ni:Ht==="[object Uint32Array]"?Yt+=oi:Ht==="[object Float32Array]"?Yt+=ri:Ht==="[object Float64Array]"?Yt+=si:$t(new Error("Failed to get type for BinaryArray"))),$t(Yt+Vn(Zt))}else if(Ht==="[object Blob]"){var Qt=new FileReader;Qt.onload=function(){var on=Li+Ft.type+"~"+Vn(this.result);$t(jn+qn+on)},Qt.readAsArrayBuffer(Ft)}else try{$t(JSON.stringify(Ft))}catch(on){console.error("Couldn't convert value into a JSON string: ",Ft),$t(null,on)}}function Ii(Ft){if(Ft.substring(0,$n)!==jn)return JSON.parse(Ft);var $t,Ht=Ft.substring(ai),Zt=Ft.substring($n,ai);if(Zt===qn&&Jn.test(Ht)){var Yt=Ht.match(Jn);$t=Yt[1],Ht=Ht.substring(Yt[0].length)}var Qt=ui(Ht);switch(Zt){case Hn:return Qt;case qn:return rn([Qt],{type:$t});case Zn:return new Int8Array(Qt);case Qn:return new Uint8Array(Qt);case ei:return new Uint8ClampedArray(Qt);case ti:return new Int16Array(Qt);case ii:return new Uint16Array(Qt);case ni:return new Int32Array(Qt);case oi:return new Uint32Array(Qt);case ri:return new Float32Array(Qt);case si:return new Float64Array(Qt);default:throw new Error("Unkown type: "+Zt)}}var Xn={serialize:Bi,deserialize:Ii,stringToBuffer:ui,bufferToString:Vn};function li(Ft,$t,Ht,Zt){Ft.executeSql("CREATE TABLE IF NOT EXISTS "+$t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],Ht,Zt)}function Pi(Ft){var $t=this,Ht={db:null};if(Ft)for(var Zt in Ft)Ht[Zt]=typeof Ft[Zt]!="string"?Ft[Zt].toString():Ft[Zt];var Yt=new an(function(Qt,on){try{Ht.db=openDatabase(Ht.name,String(Ht.version),Ht.description,Ht.size)}catch(sn){return on(sn)}Ht.db.transaction(function(sn){li(sn,Ht,function(){$t._dbInfo=Ht,Qt()},function(cn,un){on(un)})},on)});return Ht.serializer=Xn,Yt}function Dn(Ft,$t,Ht,Zt,Yt,Qt){Ft.executeSql(Ht,Zt,Yt,function(on,sn){sn.code===sn.SYNTAX_ERR?on.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[$t.storeName],function(cn,un){un.rows.length?Qt(cn,sn):li(cn,$t,function(){cn.executeSql(Ht,Zt,Yt,Qt)},Qt)},Qt):Qt(on,sn)},Qt)}function Ri(Ft,$t){var Ht=this;Ft=yn(Ft);var Zt=new an(function(Yt,Qt){Ht.ready().then(function(){var on=Ht._dbInfo;on.db.transaction(function(sn){Dn(sn,on,"SELECT * FROM "+on.storeName+" WHERE key = ? LIMIT 1",[Ft],function(cn,un){var dn=un.rows.length?un.rows.item(0).value:null;dn&&(dn=on.serializer.deserialize(dn)),Yt(dn)},function(cn,un){Qt(un)})})}).catch(Qt)});return ln(Zt,$t),Zt}function Ni(Ft,$t){var Ht=this,Zt=new an(function(Yt,Qt){Ht.ready().then(function(){var on=Ht._dbInfo;on.db.transaction(function(sn){Dn(sn,on,"SELECT * FROM "+on.storeName,[],function(cn,un){for(var dn=un.rows,vn=dn.length,wn=0;wn<vn;wn++){var En=dn.item(wn),kn=En.value;if(kn&&(kn=on.serializer.deserialize(kn)),(kn=Ft(kn,En.key,wn+1))!==void 0)return void Yt(kn)}Yt()},function(cn,un){Qt(un)})})}).catch(Qt)});return ln(Zt,$t),Zt}function hi(Ft,$t,Ht,Zt){var Yt=this;Ft=yn(Ft);var Qt=new an(function(on,sn){Yt.ready().then(function(){$t===void 0&&($t=null);var cn=$t,un=Yt._dbInfo;un.serializer.serialize($t,function(dn,vn){vn?sn(vn):un.db.transaction(function(wn){Dn(wn,un,"INSERT OR REPLACE INTO "+un.storeName+" (key, value) VALUES (?, ?)",[Ft,dn],function(){on(cn)},function(En,kn){sn(kn)})},function(wn){if(wn.code===wn.QUOTA_ERR){if(Zt>0)return void on(hi.apply(Yt,[Ft,cn,Ht,Zt-1]));sn(wn)}})})}).catch(sn)});return ln(Qt,Ht),Qt}function Di(Ft,$t,Ht){return hi.apply(this,[Ft,$t,Ht,1])}function Ai(Ft,$t){var Ht=this;Ft=yn(Ft);var Zt=new an(function(Yt,Qt){Ht.ready().then(function(){var on=Ht._dbInfo;on.db.transaction(function(sn){Dn(sn,on,"DELETE FROM "+on.storeName+" WHERE key = ?",[Ft],function(){Yt()},function(cn,un){Qt(un)})})}).catch(Qt)});return ln(Zt,$t),Zt}function Ti(Ft){var $t=this,Ht=new an(function(Zt,Yt){$t.ready().then(function(){var Qt=$t._dbInfo;Qt.db.transaction(function(on){Dn(on,Qt,"DELETE FROM "+Qt.storeName,[],function(){Zt()},function(sn,cn){Yt(cn)})})}).catch(Yt)});return ln(Ht,Ft),Ht}function Oi(Ft){var $t=this,Ht=new an(function(Zt,Yt){$t.ready().then(function(){var Qt=$t._dbInfo;Qt.db.transaction(function(on){Dn(on,Qt,"SELECT COUNT(key) as c FROM "+Qt.storeName,[],function(sn,cn){var un=cn.rows.item(0).c;Zt(un)},function(sn,cn){Yt(cn)})})}).catch(Yt)});return ln(Ht,Ft),Ht}function ji(Ft,$t){var Ht=this,Zt=new an(function(Yt,Qt){Ht.ready().then(function(){var on=Ht._dbInfo;on.db.transaction(function(sn){Dn(sn,on,"SELECT key FROM "+on.storeName+" WHERE id = ? LIMIT 1",[Ft+1],function(cn,un){var dn=un.rows.length?un.rows.item(0).key:null;Yt(dn)},function(cn,un){Qt(un)})})}).catch(Qt)});return ln(Zt,$t),Zt}function Ui(Ft){var $t=this,Ht=new an(function(Zt,Yt){$t.ready().then(function(){var Qt=$t._dbInfo;Qt.db.transaction(function(on){Dn(on,Qt,"SELECT key FROM "+Qt.storeName,[],function(sn,cn){for(var un=[],dn=0;dn<cn.rows.length;dn++)un.push(cn.rows.item(dn).key);Zt(un)},function(sn,cn){Yt(cn)})})}).catch(Yt)});return ln(Ht,Ft),Ht}function Fi(Ft){return new an(function($t,Ht){Ft.transaction(function(Zt){Zt.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(Yt,Qt){for(var on=[],sn=0;sn<Qt.rows.length;sn++)on.push(Qt.rows.item(sn).name);$t({db:Ft,storeNames:on})},function(Yt,Qt){Ht(Qt)})},function(Zt){Ht(Zt)})})}function Wi(Ft,$t){$t=bn.apply(this,arguments);var Ht=this.config();(Ft=typeof Ft!="function"&&Ft||{}).name||(Ft.name=Ft.name||Ht.name,Ft.storeName=Ft.storeName||Ht.storeName);var Zt,Yt=this;return ln(Zt=Ft.name?new an(function(Qt){var on;on=Ft.name===Ht.name?Yt._dbInfo.db:openDatabase(Ft.name,"","",0),Ft.storeName?Qt({db:on,storeNames:[Ft.storeName]}):Qt(Fi(on))}).then(function(Qt){return new an(function(on,sn){Qt.db.transaction(function(cn){function un(En){return new an(function(kn,In){cn.executeSql("DROP TABLE IF EXISTS "+En,[],function(){kn()},function(mi,On){In(On)})})}for(var dn=[],vn=0,wn=Qt.storeNames.length;vn<wn;vn++)dn.push(un(Qt.storeNames[vn]));an.all(dn).then(function(){on()}).catch(function(En){sn(En)})},function(cn){sn(cn)})})}):an.reject("Invalid arguments"),$t),Zt}var $i={_driver:"webSQLStorage",_initStorage:Pi,_support:Mi(),iterate:Ni,getItem:Ri,setItem:Di,removeItem:Ai,clear:Ti,length:Oi,key:ji,keys:Ui,dropInstance:Wi};function Hi(){try{return typeof localStorage!="undefined"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function di(Ft,$t){var Ht=Ft.name+"/";return Ft.storeName!==$t.storeName&&(Ht+=Ft.storeName+"/"),Ht}function qi(){var Ft="_localforage_support_test";try{return localStorage.setItem(Ft,!0),localStorage.removeItem(Ft),!1}catch{return!0}}function Vi(){return!qi()||localStorage.length>0}function Xi(Ft){var $t=this,Ht={};if(Ft)for(var Zt in Ft)Ht[Zt]=Ft[Zt];return Ht.keyPrefix=di(Ft,$t._defaultConfig),Vi()?($t._dbInfo=Ht,Ht.serializer=Xn,an.resolve()):an.reject()}function Gi(Ft){var $t=this,Ht=$t.ready().then(function(){for(var Zt=$t._dbInfo.keyPrefix,Yt=localStorage.length-1;Yt>=0;Yt--){var Qt=localStorage.key(Yt);Qt.indexOf(Zt)===0&&localStorage.removeItem(Qt)}});return ln(Ht,Ft),Ht}function Ki(Ft,$t){var Ht=this;Ft=yn(Ft);var Zt=Ht.ready().then(function(){var Yt=Ht._dbInfo,Qt=localStorage.getItem(Yt.keyPrefix+Ft);return Qt&&(Qt=Yt.serializer.deserialize(Qt)),Qt});return ln(Zt,$t),Zt}function Yi(Ft,$t){var Ht=this,Zt=Ht.ready().then(function(){for(var Yt=Ht._dbInfo,Qt=Yt.keyPrefix,on=Qt.length,sn=localStorage.length,cn=1,un=0;un<sn;un++){var dn=localStorage.key(un);if(dn.indexOf(Qt)===0){var vn=localStorage.getItem(dn);if(vn&&(vn=Yt.serializer.deserialize(vn)),(vn=Ft(vn,dn.substring(on),cn++))!==void 0)return vn}}});return ln(Zt,$t),Zt}function Ji(Ft,$t){var Ht=this,Zt=Ht.ready().then(function(){var Yt,Qt=Ht._dbInfo;try{Yt=localStorage.key(Ft)}catch{Yt=null}return Yt&&(Yt=Yt.substring(Qt.keyPrefix.length)),Yt});return ln(Zt,$t),Zt}function Zi(Ft){var $t=this,Ht=$t.ready().then(function(){for(var Zt=$t._dbInfo,Yt=localStorage.length,Qt=[],on=0;on<Yt;on++){var sn=localStorage.key(on);sn.indexOf(Zt.keyPrefix)===0&&Qt.push(sn.substring(Zt.keyPrefix.length))}return Qt});return ln(Ht,Ft),Ht}function Qi(Ft){var $t=this.keys().then(function(Ht){return Ht.length});return ln($t,Ft),$t}function eo(Ft,$t){var Ht=this;Ft=yn(Ft);var Zt=Ht.ready().then(function(){var Yt=Ht._dbInfo;localStorage.removeItem(Yt.keyPrefix+Ft)});return ln(Zt,$t),Zt}function to(Ft,$t,Ht){var Zt=this;Ft=yn(Ft);var Yt=Zt.ready().then(function(){$t===void 0&&($t=null);var Qt=$t;return new an(function(on,sn){var cn=Zt._dbInfo;cn.serializer.serialize($t,function(un,dn){if(dn)sn(dn);else try{localStorage.setItem(cn.keyPrefix+Ft,un),on(Qt)}catch(vn){vn.name!=="QuotaExceededError"&&vn.name!=="NS_ERROR_DOM_QUOTA_REACHED"||sn(vn),sn(vn)}})})});return ln(Yt,Ht),Yt}function no(Ft,$t){if($t=bn.apply(this,arguments),!(Ft=typeof Ft!="function"&&Ft||{}).name){var Ht=this.config();Ft.name=Ft.name||Ht.name,Ft.storeName=Ft.storeName||Ht.storeName}var Zt,Yt=this;return ln(Zt=Ft.name?new an(function(Qt){Ft.storeName?Qt(di(Ft,Yt._defaultConfig)):Qt(Ft.name+"/")}).then(function(Qt){for(var on=localStorage.length-1;on>=0;on--){var sn=localStorage.key(on);sn.indexOf(Qt)===0&&localStorage.removeItem(sn)}}):an.reject("Invalid arguments"),$t),Zt}var io={_driver:"localStorageWrapper",_initStorage:Xi,_support:Hi(),iterate:Yi,getItem:Ki,setItem:to,removeItem:eo,clear:Gi,length:Qi,key:Ji,keys:Zi,dropInstance:no},oo=function(Ft,$t){return Ft===$t||typeof Ft=="number"&&typeof $t=="number"&&isNaN(Ft)&&isNaN($t)},ro=function(Ft,$t){for(var Ht=Ft.length,Zt=0;Zt<Ht;){if(oo(Ft[Zt],$t))return!0;Zt++}return!1},pi=Array.isArray||function(Ft){return Object.prototype.toString.call(Ft)==="[object Array]"},Tn={},fi={},An={INDEXEDDB:_i,WEBSQL:$i,LOCALSTORAGE:io},so=[An.INDEXEDDB._driver,An.WEBSQL._driver,An.LOCALSTORAGE._driver],Un=["dropInstance"],Gn=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Un),ao={description:"",driver:so.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function co(Ft,$t){Ft[$t]=function(){var Ht=arguments;return Ft.ready().then(function(){return Ft[$t].apply(Ft,Ht)})}}function Kn(){for(var Ft=1;Ft<arguments.length;Ft++){var $t=arguments[Ft];if($t)for(var Ht in $t)$t.hasOwnProperty(Ht)&&(pi($t[Ht])?arguments[0][Ht]=$t[Ht].slice():arguments[0][Ht]=$t[Ht])}return arguments[0]}var uo=new(function(){function Ft($t){for(var Ht in Wt(this,Ft),An)if(An.hasOwnProperty(Ht)){var Zt=An[Ht],Yt=Zt._driver;this[Ht]=Yt,Tn[Yt]||this.defineDriver(Zt)}this._defaultConfig=Kn({},ao),this._config=Kn({},this._defaultConfig,$t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return Ft.prototype.config=function($t){if(($t===void 0?"undefined":Ut($t))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var Ht in $t){if(Ht==="storeName"&&($t[Ht]=$t[Ht].replace(/\W/g,"_")),Ht==="version"&&typeof $t[Ht]!="number")return new Error("Database version must be a number.");this._config[Ht]=$t[Ht]}return!("driver"in $t)||!$t.driver||this.setDriver(this._config.driver)}return typeof $t=="string"?this._config[$t]:this._config},Ft.prototype.defineDriver=function($t,Ht,Zt){var Yt=new an(function(Qt,on){try{var sn=$t._driver,cn=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!$t._driver)return void on(cn);for(var un=Gn.concat("_initStorage"),dn=0,vn=un.length;dn<vn;dn++){var wn=un[dn];if((!ro(Un,wn)||$t[wn])&&typeof $t[wn]!="function")return void on(cn)}(function(){for(var kn=function(lo){return function(){var ho=new Error("Method "+lo+" is not implemented by the current driver"),gi=an.reject(ho);return ln(gi,arguments[arguments.length-1]),gi}},In=0,mi=Un.length;In<mi;In++){var On=Un[In];$t[On]||($t[On]=kn(On))}})();var En=function(kn){Tn[sn]&&console.info("Redefining LocalForage driver: "+sn),Tn[sn]=$t,fi[sn]=kn,Qt()};"_support"in $t?$t._support&&typeof $t._support=="function"?$t._support().then(En,on):En(!!$t._support):En(!0)}catch(kn){on(kn)}});return hn(Yt,Ht,Zt),Yt},Ft.prototype.driver=function(){return this._driver||null},Ft.prototype.getDriver=function($t,Ht,Zt){var Yt=Tn[$t]?an.resolve(Tn[$t]):an.reject(new Error("Driver not found."));return hn(Yt,Ht,Zt),Yt},Ft.prototype.getSerializer=function($t){var Ht=an.resolve(Xn);return hn(Ht,$t),Ht},Ft.prototype.ready=function($t){var Ht=this,Zt=Ht._driverSet.then(function(){return Ht._ready===null&&(Ht._ready=Ht._initDriver()),Ht._ready});return hn(Zt,$t,$t),Zt},Ft.prototype.setDriver=function($t,Ht,Zt){var Yt=this;pi($t)||($t=[$t]);var Qt=this._getSupportedDrivers($t);function on(){Yt._config.driver=Yt.driver()}function sn(dn){return Yt._extend(dn),on(),Yt._ready=Yt._initStorage(Yt._config),Yt._ready}function cn(dn){return function(){var vn=0;function wn(){for(;vn<dn.length;){var En=dn[vn];return vn++,Yt._dbInfo=null,Yt._ready=null,Yt.getDriver(En).then(sn).catch(wn)}on();var kn=new Error("No available storage method found.");return Yt._driverSet=an.reject(kn),Yt._driverSet}return wn()}}var un=this._driverSet!==null?this._driverSet.catch(function(){return an.resolve()}):an.resolve();return this._driverSet=un.then(function(){var dn=Qt[0];return Yt._dbInfo=null,Yt._ready=null,Yt.getDriver(dn).then(function(vn){Yt._driver=vn._driver,on(),Yt._wrapLibraryMethodsWithReady(),Yt._initDriver=cn(Qt)})}).catch(function(){on();var dn=new Error("No available storage method found.");return Yt._driverSet=an.reject(dn),Yt._driverSet}),hn(this._driverSet,Ht,Zt),this._driverSet},Ft.prototype.supports=function($t){return!!fi[$t]},Ft.prototype._extend=function($t){Kn(this,$t)},Ft.prototype._getSupportedDrivers=function($t){for(var Ht=[],Zt=0,Yt=$t.length;Zt<Yt;Zt++){var Qt=$t[Zt];this.supports(Qt)&&Ht.push(Qt)}return Ht},Ft.prototype._wrapLibraryMethodsWithReady=function(){for(var $t=0,Ht=Gn.length;$t<Ht;$t++)co(this,Gn[$t])},Ft.prototype.createInstance=function($t){return new Ft($t)},Ft}());Ot.exports=uo},{3:3}]},{},[4])(4),ge={exports:{}};/*!
3
3
  localForage -- Offline Storage, Improved
4
4
  Version 1.10.0
5
5
  https://localforage.github.io/localForage
6
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:`
7
+ */(function(Tt){ge.exports=(()=>{const Ot=typeof window=="object"?window:this;Ot.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");let jt=null,Ut=!1;const Wt=Ot.WebStreamsPolyfill||{},Xt=Ot.isSecureContext;let tn=/constructor/i.test(Ot.HTMLElement)||!!Ot.safari||!!Ot.WebKitPoint;const en=Xt||"MozAppearance"in document.documentElement.style?"iframe":"navigate",rn={createWriteStream:function(ln,hn,yn){let bn={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},gn=0,nn=null,qt=null,Gt=null;if(Number.isFinite(hn)?([yn,hn]=[hn,yn],console.warn("[StreamSaver] Depricated pass an object as 2nd argument when creating a write stream"),bn.size=yn,bn.writableStrategy=hn):hn&&hn.highWaterMark?(console.warn("[StreamSaver] Depricated pass an object as 2nd argument when creating a write stream"),bn.size=yn,bn.writableStrategy=hn):bn=hn||{},!tn){jt||(jt=Xt?an(rn.mitm):function(mn){const pn="width=200,height=100",fn=document.createDocumentFragment(),xn={frame:Ot.open(mn,"popup",pn),loaded:!1,isIframe:!1,isPopup:!0,remove(){xn.frame.close()},addEventListener(...Cn){fn.addEventListener(...Cn)},dispatchEvent(...Cn){fn.dispatchEvent(...Cn)},removeEventListener(...Cn){fn.removeEventListener(...Cn)},postMessage(...Cn){xn.frame.postMessage(...Cn)}},Sn=Cn=>{Cn.source===xn.frame&&(xn.loaded=!0,Ot.removeEventListener("message",Sn),xn.dispatchEvent(new Event("load")))};return Ot.addEventListener("message",Sn),xn}(rn.mitm)),qt=new MessageChannel,ln=encodeURIComponent(ln.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const Vt={transferringReadable:Ut,pathname:bn.pathname||Math.random().toString().slice(-6)+"/"+ln,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+ln}};bn.size&&(Vt.headers["Content-Length"]=bn.size);const Jt=[Vt,"*",[qt.port2]];if(Ut){const mn=en==="iframe"?void 0:{transform(fn,xn){if(!(fn instanceof Uint8Array))throw new TypeError("Can only wirte Uint8Arrays");gn+=fn.length,xn.enqueue(fn),nn&&(location.href=nn,nn=null)},flush(){nn&&(location.href=nn)}};Gt=new rn.TransformStream(mn,bn.writableStrategy,bn.readableStrategy);const pn=Gt.readable;qt.port1.postMessage({readableStream:pn},[pn])}qt.port1.onmessage=mn=>{mn.data.download&&(en==="navigate"?(jt.remove(),jt=null,gn?location.href=mn.data.download:nn=mn.data.download):(jt.isPopup&&(jt.remove(),jt=null,en==="iframe"&&an(rn.mitm)),an(mn.data.download)))},jt.loaded?jt.postMessage(...Jt):jt.addEventListener("load",()=>{jt.postMessage(...Jt)},{once:!0})}let Kt=[];return!tn&&Gt&&Gt.writable||new rn.WritableStream({write(Vt){if(!(Vt instanceof Uint8Array))throw new TypeError("Can only wirte Uint8Arrays");tn?Kt.push(Vt):(qt.port1.postMessage(Vt),gn+=Vt.length,nn&&(location.href=nn,nn=null))},close(){if(tn){const Vt=new Blob(Kt,{type:"application/octet-stream; charset=utf-8"}),Jt=document.createElement("a");Jt.href=URL.createObjectURL(Vt),Jt.download=ln,Jt.click()}else qt.port1.postMessage("end")},abort(){Kt=[],qt.port1.postMessage("abort"),qt.port1.onmessage=null,qt.port1.close(),qt.port2.close(),qt=null}},bn.writableStrategy)},WritableStream:Ot.WritableStream||Wt.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 an(ln){if(!ln)throw new Error("meh");const hn=document.createElement("iframe");return hn.hidden=!0,hn.src=ln,hn.loaded=!1,hn.name="iframe",hn.isIframe=!0,hn.postMessage=(...yn)=>hn.contentWindow.postMessage(...yn),hn.addEventListener("load",()=>{hn.loaded=!0},{once:!0}),document.body.appendChild(hn),hn}try{new Response(new ReadableStream),Xt&&!("serviceWorker"in navigator)&&(tn=!0)}catch{tn=!0}return(ln=>{try{ln()}catch{}})(()=>{const{readable:ln}=new TransformStream,hn=new MessageChannel;hn.port1.postMessage(ln,[ln]),hn.port1.close(),hn.port2.close(),Ut=!0,Object.defineProperty(rn,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})}),rn})()})();var ve=ge.exports;const ye=Object.prototype.toString;function we(Tt,Ot){return ye.call(Tt)===`[object ${Ot}]`}function be(Tt){return we(Tt,"Function")}const xe=Tt=>Tt!==void 0,Se=Tt=>!xe(Tt);function Ce(Tt){return Tt===null}const Ee=Tt=>Tt!==null&&we(Tt,"Object");function ke(Tt){return we(Tt,"String")}function ze(Tt){return Tt&&Array.isArray(Tt)}const _e=typeof window=="undefined",Me=e.reactive({panelGroups:{}}),Le=()=>({useGroupAccordion:Tt=>e.computed(()=>Me.panelGroups[Tt].accordion),setGroupAccordionStatus:(Tt,Ot)=>{Me.panelGroups[Tt]={...Me.panelGroups[Tt],accordion:Ot}},panelExpanded:(Tt,Ot)=>e.computed(()=>Me.panelGroups[Tt]?.panelExpandStatus?.[Ot]||!1),setPanelExpandedStatus:(Tt,Ot,jt)=>{Me.panelGroups[Tt]={...Me.panelGroups[Tt],panelExpandStatus:{...Me.panelGroups[Tt]?.panelExpandStatus||{},[Ot]:jt}}},togglePanelExpandedStatus:(Tt,Ot)=>{Me.panelGroups[Tt].accordion&&(Me.panelGroups[Tt].panelExpandStatus[Ot]||Object.keys(Me.panelGroups[Tt].panelExpandStatus).forEach(jt=>{Me.panelGroups[Tt].panelExpandStatus[jt]=!1})),Me.panelGroups[Tt].panelExpandStatus[Ot]=!Me.panelGroups[Tt].panelExpandStatus[Ot]}}),Be=Tt=>Tt>255?255:Tt<0?0:Tt,Ie=(Tt,Ot)=>{const jt=Tt.replace("#",""),Ut=parseInt(jt,16),Wt=Be((Ut>>16)+Ot),Xt=Be((Ut>>8&255)+Ot);return"#"+(Be((255&Ut)+Ot)|Xt<<8|Wt<<16).toString(16)};var Pe=e.defineComponent({name:"VueCollapsiblePanelGroup",props:{accordion:{type:Boolean,default:!1},baseColor:{type:String,default:"#333333"}},setup(Tt){const Ot=e.ref(`group-${g()}`),{setGroupAccordionStatus:jt}=Le(),Ut={"--base-color":Tt.baseColor,"--border-color":Ie(Tt.baseColor,180),"--bg-color-header":Ie(Tt.baseColor,140),"--bg-color-header-hover":Ie(Tt.baseColor,190),"--bg-color-header-active":Ie(Tt.baseColor,200),"--bg-color-body":"#fff"};return jt(Ot.value,Tt.accordion),{idGroup:Ot,cssColorVars:Ut}}});const Re=["data-id-group"];Pe.render=function(Tt,Ot,jt,Ut,Wt,Xt){return e.openBlock(),e.createElementBlock("div",{"data-id-group":Tt.idGroup,style:e.normalizeStyle(Tt.cssColorVars),class:"vcpg"},[e.renderSlot(Tt.$slots,"default")],12,Re)},Pe.__scopeId="data-v-23ab5317",Pe.__file="src/controls/collapsepanel/VCollapsiblePanelGroup.vue";var Ne=e.defineComponent({name:"VueCollapsiblePanel",props:{expanded:{type:Boolean,default:!0}},setup(Tt,Ot){const jt=`panel-${g()}`,Ut=e.ref(),Wt=e.ref(),Xt=e.ref(),{panelExpanded:tn,togglePanelExpandedStatus:en,setPanelExpandedStatus:rn}=Le(),an=e.computed(()=>({hasContent:Ot.slots.content&&Ot.slots.content()[0].children.length>0,dataKey:g()})),ln=e.computed(()=>Ut.value?.parentElement?.getAttribute("data-id-group")||""),hn=e.computed(()=>tn(ln.value,jt).value&&an.value.hasContent);return e.onMounted(()=>{rn(ln.value,jt,Tt.expanded)}),e.onUpdated(()=>{(async()=>{await e.nextTick(),Wt.value&&Xt.value&&(Wt.value.style.height=`${Math.min(Xt.value.scrollHeight,Wt.value.scrollHeight)}px`)})()}),{body:an,panelRef:Ut,bodyRef:Wt,bodyContentRef:Xt,isExpanded:hn,collapse:yn=>{yn.style.height="0"},expand:yn=>{yn.style.height=`${yn.scrollHeight}px`},toggle:()=>{an.value.hasContent&&en(ln.value,jt)},toggleIcon:`
8
8
  <svg
9
9
  width="24px"
10
10
  height="24px"
@@ -14,4 +14,4 @@
14
14
  >
15
15
  <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
16
  </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;
17
+ `}}});const De={class:"vcp__header-title"},Ae={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(Tt){return window.TouchEvent&&Tt instanceof TouchEvent}Ne.render=function(Tt,Ot,jt,Ut,Wt,Xt){return e.openBlock(),e.createElementBlock("section",{ref:"panelRef",class:e.normalizeClass(["vcp",{"vcp--expanded":Tt.isExpanded,"vcp--expandable":Tt.body.hasContent}])},[e.createElementVNode("header",{class:"vcp__header",onClick:Ot[0]||(Ot[0]=(...tn)=>Tt.toggle&&Tt.toggle(...tn))},[e.createElementVNode("div",De,[e.renderSlot(Tt.$slots,"title")]),Tt.body.hasContent?(e.openBlock(),e.createElementBlock("div",Ae,[e.renderSlot(Tt.$slots,"icon",{},()=>[e.createElementVNode("span",{innerHTML:Tt.toggleIcon},null,8,Te)])])):e.createCommentVNode("v-if",!0)]),e.createVNode(e.Transition,{"data-key":Tt.body.dataKey,name:"slide",onBeforeEnter:Tt.collapse,onEnter:Tt.expand,onBeforeLeave:Tt.expand,onLeave:Tt.collapse},{default:e.withCtx(()=>[Tt.isExpanded?(e.openBlock(),e.createElementBlock("div",Oe,[e.createElementVNode("div",je,[e.renderSlot(Tt.$slots,"content")],512)],512)):e.createCommentVNode("v-if",!0)]),_:3},8,["data-key","onBeforeEnter","onEnter","onBeforeLeave","onLeave"])],2)},Ne.__scopeId="data-v-08c94cf8",Ne.__file="src/controls/collapsepanel/VCollapsiblePanel.vue";class We{constructor(Ot){this.e=Ot}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 Fe(this.clientX,this.clientY)}static bindDown(Ot,jt,Ut,Wt=!1){const Xt=en=>{jt(new We(en))},tn=en=>{en.touches.length===1&&jt(new We(en)),en.touches.length>1&&Ut&&Ut(new We(en))};return Ot.addEventListener("mousedown",Xt,Wt),Ot.addEventListener("touchstart",tn,Wt),()=>{Ot.removeEventListener("mousedown",Xt,Wt),Ot.removeEventListener("touchstart",tn,Wt)}}static bindMove(Ot,jt,Ut=!1){const Wt=tn=>{jt(new We(tn))},Xt=tn=>{tn.touches.length===1&&jt(new We(tn))};return Ot.addEventListener("mousemove",Wt,Ut),Ot.addEventListener("touchmove",Xt,Ut),()=>{Ot.removeEventListener("mousemove",Wt,Ut),Ot.removeEventListener("touchmove",Xt,Ut)}}static bindUp(Ot,jt,Ut=!1){const Wt=tn=>{jt(new We(tn))},Xt=tn=>{tn.touches.length===0&&jt(new We(tn))};return Ot.addEventListener("mouseup",Wt,Ut),Ot.addEventListener("touchend",Xt,Ut),()=>{Ot.removeEventListener("mouseup",Wt,Ut),Ot.removeEventListener("touchend",Xt,Ut)}}originalEvent({mouse:Ot,touch:jt}){Ue(this.e)?jt&&jt(this.e):Ot&&Ot(this.e)}}class Fe{constructor(Ot,jt){this.x=Ot,this.y=jt}clone(){return new Fe(this.x,this.y)}}class $e{constructor(Ot,jt,Ut={}){this.mousedown=Wt=>{if(Wt.preventDefault(),this.handle){const{left:Xt,top:tn}=this.handle.getBoundingClientRect();this.offsetX=Wt.clientX-Xt,this.offsetY=Wt.clientY-tn}this.options.onMoveStart&&this.options.onMoveStart(),this.unbindMove=We.bindMove(document,this.mousemove),this.unbindUp=We.bindUp(document,this.mouseup)},this.mousemove=Wt=>{this.container&&(this.container.style.left=Wt.clientX-this.offsetX+"px",this.container.style.top=Wt.clientY-this.offsetY+"px"),this.options.onMove&&this.options.onMove()},this.mouseup=Wt=>{this.options.onMoveEnd&&this.options.onMoveEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0},this.handle=Ot,this.container=jt,this.options=Ut,Ot&&(this.unbindDown=We.bindDown(Ot,this.mousedown),Ot.classList.add("draggable-handle"))}teardown(){this.handle?.classList.remove("draggable-handle"),this.unbindDown&&this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove()}}class He{constructor(Ot,jt){this._group=Ot,this.onChange=jt,this.a(Ut=>Ut.push(this))}set group(Ot){this._group=Ot;const jt=Ve(this._group),Ut=Ve(Ot);jt.splice(jt.indexOf(this),1),Ut.push(this),Ge()}get group(){return this._group}unregister(){this.a(Ot=>Ot.splice(Ot.indexOf(this),1))}raise(){this.a(Ot=>{Ot.splice(Ot.indexOf(this),1),Ot.push(this)})}a(Ot){Ot(Ve(this._group)),Ge()}}const qe=new Map;function Ve(Tt){return qe.has(Tt)||qe.set(Tt,[]),qe.get(Tt)}function Xe(Tt,Ot){return Tt>Ot?-Xe(Ot,Tt):Tt<0&&Ot>=0?1:Tt-Ot}function Ge(){let Tt=0;for(const Ot of function(jt){const Ut=[];return jt.forEach((Wt,Xt)=>Ut.push(Xt)),Ut}(qe).sort(Xe))for(const jt of Ve(Ot))Tt!=jt.zIndex&&(jt.zIndex=Tt,jt.onChange(Tt)),Tt++}function Ke(Tt){if(Tt){const{width:Ot,height:jt}=Tt.style;Tt.style.width="auto",Tt.style.height="auto";const Ut=Ye(Tt);return Tt.style.width=Ot,Tt.style.height=jt,Ut}return{width:0,height:0,top:0,left:0,bottom:0,right:0}}function Ye(Tt){const Ot=Tt.getBoundingClientRect(),jt=Ot.width,Ut=Ot.height,Wt=Ot.top,Xt=Ot.left;return{width:jt,height:Ut,top:Wt,left:Xt,bottom:Wt+Ut,right:Xt+jt}}class Je{constructor(Ot,jt){if(this.container=Ot,this.options=jt,Ot&&jt){this.handles=Ze.map(rn=>new rn(Ot,this));const{width:Ut,height:Wt}=Ke(Ot),Xt=jt.maxWidth||window.innerWidth,tn=jt.maxHeight||window.innerHeight;let en=!1;(Ut<jt.minWidth||Ut>Xt)&&(Ot.style.width=`${et(Ut,jt.minWidth,Xt)}px`,en=!0),(Wt<jt.minHeight||Wt>tn)&&(Ot.style.height=`${et(Wt,jt.minHeight,tn)}px`,en=!0),en&&jt.onResize&&jt.onResize()}}teardown(){this.handles?.forEach(Ot=>Ot.teardown())}}const Ze=[];class Qe{constructor(Ot,jt){this.handleSize=8,this.mousedown=Ut=>{Ut.preventDefault(),Ut.stopPropagation();const{left:Wt,top:Xt,width:tn,height:en}=Ye(this.container);this.x0=Ut.clientX,this.y0=Ut.clientY,this.left0=Wt,this.top0=Xt,this.width0=tn,this.height0=en,this.calcSafeBoundaries(),this.helper.options&&this.helper.options.onResizeStart&&this.helper.options.onResizeStart(),this.unbindMove=We.bindMove(document,this.mousemove),this.unbindUp=We.bindUp(document,this.mouseup)},this.mousemove=Ut=>{Ut.preventDefault(),Ut.stopPropagation(),this.setPosition(Ut),this.fixPosition(),this.helper.options&&this.helper.options.onResize&&this.helper.options.onResize()},this.mouseup=Ut=>{Ut.preventDefault(),Ut.stopPropagation(),this.helper.options&&this.helper.options.onResizeEnd&&this.helper.options.onResizeEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0},this.container=Ot,this.helper=jt,this.handle=this.createHandleElement(),this.unbindDown=We.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:Ot,top:jt,right:Ut,bottom:Wt}=Ye(this.container),Xt=this.helper.options,tn=Xt.maxWidth||window.innerWidth,en=Xt.maxHeight||window.innerHeight;this.minLeft=Math.max(Ut-tn,0),this.maxLeft=Ut-Xt.minWidth,this.minRight=Ot+Xt.minWidth,this.maxRight=Math.min(Ot+tn,window.innerWidth),this.minTop=Math.max(Wt-en,0),this.maxTop=Wt-Xt.minHeight,this.minBottom=jt+Xt.minHeight,this.maxBottom=Math.min(jt+en,window.innerHeight)}fixPosition(){const{width:Ot,height:jt,left:Ut,top:Wt,right:Xt,bottom:tn}=Ye(this.container),en=this.helper.options;en&&(Ut<this.minLeft?(this.container.style.width=Ot+Ut-this.minLeft+"px",this.container.style.left=`${this.minLeft}px`):Ut>this.maxLeft?(this.container.style.width=`${en.minWidth}px`,this.container.style.left=`${this.maxLeft}px`):Xt<this.minRight?this.container.style.width=`${en.minWidth}px`:Xt>this.maxRight&&(this.container.style.width=this.maxRight-Ut+"px"),Wt<this.minTop?(this.container.style.height=jt+Wt-this.minTop+"px",this.container.style.top=`${this.minTop}px`):Wt>this.maxTop?(this.container.style.height=`${en.minHeight}px`,this.container.style.top=`${this.maxTop}px`):tn<this.minBottom?this.container.style.height=`${en.minHeight}px`:tn>this.maxBottom&&(this.container.style.height=this.maxBottom-Wt+"px"))}createHandleElement(){const Ot=document.createElement("div"),jt=Ot.style;return jt.position="absolute",this.applyStyle(jt),this.container.appendChild(Ot),Ot}}function et(Tt,Ot,jt){return Tt<Ot?Ot:Tt>jt?jt:Tt}Ze.push(class extends Qe{setPosition(Tt){this.container.style.width=this.width0+Tt.clientX-this.x0+"px",this.container.style.height=this.height0+Tt.clientY-this.y0+"px"}applyStyle(Tt){Tt.width=2*this.handleSize+"px",Tt.height=2*this.handleSize+"px",Tt.right=-this.handleSize+"px",Tt.bottom=-this.handleSize+"px",Tt.cursor="nwse-resize"}},class extends Qe{setPosition(Tt){this.container.style.height=this.height0+Tt.clientY-this.y0+"px"}applyStyle(Tt){Tt.right=`${this.handleSize}px`,Tt.left=`${this.handleSize}px`,Tt.height=2*this.handleSize+"px",Tt.bottom=-this.handleSize+"px",Tt.cursor="ns-resize"}},class extends Qe{setPosition(Tt){this.container.style.left=this.left0+Tt.clientX-this.x0+"px",this.container.style.width=this.width0-(Tt.clientX-this.x0)+"px",this.container.style.height=this.height0+Tt.clientY-this.y0+"px"}applyStyle(Tt){Tt.left=-this.handleSize+"px",Tt.bottom=-this.handleSize+"px",Tt.width=2*this.handleSize+"px",Tt.height=2*this.handleSize+"px",Tt.cursor="nesw-resize"}},class extends Qe{setPosition(Tt){this.container.style.left=this.left0+Tt.clientX-this.x0+"px",this.container.style.width=this.width0-(Tt.clientX-this.x0)+"px"}applyStyle(Tt){Tt.left=-this.handleSize+"px",Tt.bottom=`${this.handleSize}px`,Tt.width=2*this.handleSize+"px",Tt.top=`${this.handleSize}px`,Tt.cursor="ew-resize"}},class extends Qe{setPosition(Tt){this.container.style.left=this.left0+Tt.clientX-this.x0+"px",this.container.style.width=this.width0-(Tt.clientX-this.x0)+"px",this.container.style.top=this.top0+Tt.clientY-this.y0+"px",this.container.style.height=this.height0-(Tt.clientY-this.y0)+"px"}applyStyle(Tt){Tt.left=-this.handleSize+"px",Tt.top=-this.handleSize+"px",Tt.width=2*this.handleSize+"px",Tt.height=2*this.handleSize+"px",Tt.cursor="nwse-resize"}},class extends Qe{setPosition(Tt){this.container.style.top=this.top0+Tt.clientY-this.y0+"px",this.container.style.height=this.height0-(Tt.clientY-this.y0)+"px"}applyStyle(Tt){Tt.left=`${this.handleSize}px`,Tt.right=`${this.handleSize}px`,Tt.height=2*this.handleSize+"px",Tt.top=-this.handleSize+"px",Tt.cursor="ns-resize"}},class extends Qe{setPosition(Tt){this.container.style.top=this.top0+Tt.clientY-this.y0+"px",this.container.style.height=this.height0-(Tt.clientY-this.y0)+"px",this.container.style.width=this.width0+Tt.clientX-this.x0+"px"}applyStyle(Tt){Tt.right=-this.handleSize+"px",Tt.top=-this.handleSize+"px",Tt.height=2*this.handleSize+"px",Tt.width=2*this.handleSize+"px",Tt.cursor="nesw-resize"}},class extends Qe{setPosition(Tt){this.container.style.width=this.width0+Tt.clientX-this.x0+"px"}applyStyle(Tt){Tt.right=-this.handleSize+"px",Tt.top=`${this.handleSize}px`,Tt.bottom=`${this.handleSize}px`,Tt.width=2*this.handleSize+"px",Tt.cursor="ew-resize"}});var tt=e.defineComponent({name:"",props:{disabled:{type:Boolean,default:!1},windowStyle:{type:Object,required:!0}},components:{},setup(Tt){const Ot=e.ref(!1),jt=e.ref(!1);return{hover:Ot,active:jt,style:function(){let Ut=Tt.windowStyle.button;return Ot.value&&(Ut={...Ut,...this.windowStyle.buttonHover}),jt.value&&(Ut={...Ut,...this.windowStyle.buttonActive}),Ut},mouseup:function(Ut){this.active&&this.$emit("click")},mousedown:function(Ut){Ut.preventDefault(),jt.value=!0;const Wt=We.bindUp(document,()=>{jt.value=!1,Wt()})}}}});const nt=["disabled"];tt.render=function(Tt,Ot,jt,Ut,Wt,Xt){return e.openBlock(),e.createElementBlock("div",{class:"btn",style:e.normalizeStyle(Tt.style()),onMouseenter:Ot[0]||(Ot[0]=tn=>Tt.hover=!0),onMouseleave:Ot[1]||(Ot[1]=tn=>Tt.hover=!1),onMousedown:Ot[2]||(Ot[2]=e.withModifiers((...tn)=>Tt.mousedown&&Tt.mousedown(...tn),["stop"])),onTouchstart:Ot[3]||(Ot[3]=e.withModifiers((...tn)=>Tt.mousedown&&Tt.mousedown(...tn),["stop"])),onMouseup:Ot[4]||(Ot[4]=(...tn)=>Tt.mouseup&&Tt.mouseup(...tn)),onTouchend:Ot[5]||(Ot[5]=(...tn)=>Tt.mouseup&&Tt.mouseup(...tn)),disabled:Tt.disabled},[e.renderSlot(Tt.$slots,"default")],44,nt)},tt.__scopeId="data-v-71662210",tt.__file="src/controls/vuewindow/window/Button.vue";const it=new Set;function ot(Tt){return Tt!==null?parseFloat(Tt):0}function rt(Tt){const Ot=window.getComputedStyle(Tt);return{width:Math.ceil([Ot.paddingLeft,Ot.width,Ot.paddingRight].map(ot).reduce((jt,Ut)=>jt+Ut)),height:Math.ceil([Ot.paddingTop,Ot.height,Ot.paddingBottom].map(ot).reduce((jt,Ut)=>jt+Ut))}}class st{constructor(Ot,jt){this.width=Ot,this.height=jt}}function at(Tt){const Ot=Tt.windowEl;if(Ot){const jt=parseFloat(Ot.style.left||"NaN"),Ut=parseFloat(Ot.style.top||"NaN");if(!isNaN(jt)&&!isNaN(Ut))return{left:jt,top:Ut}}return null}function ct(Tt,Ot,jt,Ut){const Wt=Tt-jt,Xt=Ot-Ut;return Wt*Wt+Xt*Xt}window.addEventListener("resize",Tt=>{it.forEach(Ot=>{Ot?.fixPosition()})});const lt=[];var ut=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(Tt,{emit:Ot}){const jt=e.getCurrentInstance();if(!jt)return;const{proxy:Ut}=jt;let Wt=0,Xt,tn,en;const rn=e.ref(Tt.isOpen),an=()=>{lt.push(Ut),en=new He(Tt.zGroup,ln),Tt.isOpen&&(e.nextTick(()=>{Wt++==0&&(Kt(Ut),function(){const pn=hn.value,{width:fn,height:xn}=Ke(pn);let Sn,Cn;if(Tt.left!==void 0!=(Tt.top!==void 0))throw new Error("Either of left or top is specified. Both must be set or not set.");if(typeof Tt.left=="number")Sn=Tt.left,Cn=Tt.top;else{const zn=Tt.positionHint||"auto";switch(zn){case"auto":{let _n=20,Mn=50,Bn=0;do{if(lt.every(Ln=>{if(!Ln.isOpen||Ut==Ln)return!0;const Pn=at(Ln);if(Pn==null)return!0;const{left:Fn,top:Wn}=Pn;return ct(Fn,Wn,_n,Mn)>16}))break;_n=(_n+40)%(window.innerWidth-200),Mn=(Mn+40)%(window.innerHeight-200)}while(++Bn<100);Sn=_n,Cn=Mn}break;case"center":Sn=(window.innerWidth-fn)/2,Cn=(window.innerHeight-xn)/2,console.log(Sn,Cn,window.innerWidth,window.innerHeight,"111111");break;default:try{const _n=zn.split("/").map(Number);if(_n.length!=2)throw null;const[Mn,Bn]=_n;if(!isFinite(Mn)||!isFinite(Bn))throw null;Sn=Mn>=0?Mn:window.innerWidth-fn+Mn,Cn=Bn>=0?Bn:window.innerHeight-xn+Bn}catch{throw new Error(`invalid position string: ${zn}`)}}}pn&&(pn.style.left=`${Sn}px`,pn.style.top=`${Cn}px`)}()),Tt.resizable&&Vt(),mn(),Xt=new $e(yn.value,hn.value,{onMove:()=>mn(),onMoveStart:()=>Ot("move-start"),onMoveEnd:()=>Ot("move-end")}),Tt.resizable&&function(){const{height:pn}=Ke(yn.value);tn=new Je(hn.value,{onResize:()=>Vt(),onResizeStart:()=>Ot("resize-start"),onResizeEnd:()=>Ot("resize-end"),minWidth:Tt.minWidth,minHeight:Tt.minHeight+pn,maxWidth:Tt.maxWidth,maxHeight:Tt.maxHeight?Tt.maxHeight+pn:void 0})}()}),Tt.activateWhenOpen&&gn()),it.add(Ut)};function ln(pn){nn.value.zIndex=`${pn}`}const hn=e.ref(null),yn=e.ref(null),bn=e.ref(null);function gn(){en.raise(),Ot("activate")}const nn=e.ref({...Tt.windowStyle.window,zIndex:"auto",overflow:Tt.overflow}),qt=e.computed(()=>Tt.windowStyle.titlebar),Gt=e.computed(()=>{const pn={...Tt.windowStyle.content};return Tt.resizable?pn.padding="0":Tt.padding!=null&&(pn.padding=`${Tt.padding}px`),Tt.isScrollable&&(pn.overflow="auto"),pn});function Kt(pn){const{width:fn,height:xn,top:Sn,left:Cn}=pn,zn=hn;if(zn&&fn!=null&&(zn.value.style.width=`${fn}px`),xn!=null){const _n=yn.value;if(_n){const Mn=rt(_n).height;zn.value.style.height=`${xn+Mn}px`}}zn&&Cn!=null&&(zn.value.style.left=`${Cn}px`),zn&&Sn!=null&&(zn.value.style.top=`${Sn}px`)}function Vt(pn=!0){const fn=hn.value,xn=yn.value,Sn=bn.value;if(Sn&&fn&&xn){const{width:Cn,height:zn}=rt(Sn),{width:_n,height:Mn}=rt(fn),Bn=rt(xn).height,Ln=_n-(Sn.offsetWidth-Cn),Pn=Mn-Bn-(Sn.offsetHeight-zn);Sn.style.width=`${Ln}px`,Sn.style.height=`${Pn}px`,Jt(),Ot("resize",new st(Ln,Pn)),pn&&(Ot("update:width",Ln),Ot("update:height",Pn))}}function Jt(){const pn=hn.value;if(pn){const fn=pn.getBoundingClientRect();fn.left<0&&(nn.value.left="0px"),fn.top<0&&(nn.value.top="0px"),fn.right>window.innerWidth&&(nn.value.left=window.innerWidth-fn.width+"px"),fn.bottom>window.innerHeight&&(nn.value.top=window.innerHeight-fn.height+"px")}}function mn(pn=!0){Jt();const fn=hn.value;if(fn){const{left:xn,top:Sn}=fn.getBoundingClientRect();pn&&(Ot("update:left",xn),Ot("update:top",Sn))}}return e.watch(()=>Tt.isOpen,pn=>{rn.value=pn}),e.watch(()=>Tt.zGroup,pn=>{en.group=pn}),e.watch(()=>Tt.width,pn=>{Kt({width:pn}),Vt(!1)}),e.watch(()=>Tt.height,pn=>{Kt({height:pn}),Vt(!1)}),e.onMounted(()=>{an()}),e.onBeforeUnmount(()=>{it.delete(this),en.unregister(),tn&&tn.teardown(),Xt&&Xt.teardown(),lt.splice(lt.indexOf(Ut),1)}),{isOpen:rn,windowEl:hn,titlebar:yn,content:bn,activate:gn,styleWindow:nn,styleTitlebar:qt,styleContent:Gt,closeButtonClick:function(){rn.value=!1,Ot("closebuttonclick")}}}});const ht={class:"title"},dt=e.createTextVNode("\xD7");var pt,ft;ut.render=function(Tt,Ot,jt,Ut,Wt,Xt){const tn=e.resolveComponent("myButton");return e.openBlock(),e.createBlock(e.Transition,{name:"fade",onAfterLeave:Ot[2]||(Ot[2]=en=>Tt.$emit("close")),onAfterEnter:Ot[3]||(Ot[3]=en=>Tt.$emit("open"))},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:"window",style:e.normalizeStyle(Tt.styleWindow),ref:"windowEl",onMousedown:Ot[0]||(Ot[0]=(...en)=>Tt.activate&&Tt.activate(...en)),onTouchstart:Ot[1]||(Ot[1]=(...en)=>Tt.activate&&Tt.activate(...en))},[e.createElementVNode("div",{class:"titlebar",style:e.normalizeStyle(Tt.styleTitlebar),ref:"titlebar"},[e.createElementVNode("div",ht,[Tt.$slots.title?e.renderSlot(Tt.$slots,"title",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(Tt.title),1)],2112))]),Tt.closeButton?(e.openBlock(),e.createBlock(tn,{key:0,windowStyle:Tt.windowStyle,onClick:Tt.closeButtonClick},{default:e.withCtx(()=>[dt]),_:1},8,["windowStyle","onClick"])):e.createCommentVNode("v-if",!0)],4),e.createElementVNode("div",{class:"content",style:e.normalizeStyle(Tt.styleContent),ref:"content"},[e.renderSlot(Tt.$slots,"default")],4)],36),[[e.vShow,Tt.isOpen]])]),_:3})},ut.__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=ut;var gt;exports.LayoutContainerEnum=void 0,(gt=exports.LayoutContainerEnum||(exports.LayoutContainerEnum={}))[gt.top=0]="top",gt[gt.bottom=1]="bottom",gt[gt.centerBack=2]="centerBack",gt[gt.centerMain=3]="centerMain",gt[gt.centerFront=4]="centerFront",gt[gt.left=5]="left",gt[gt.right=6]="right";class vt{constructor(Ot,jt){this.layoutMap=new Map,this.preConditionMap=new Map,this.widgetsLoadedSet=new Set,this.layoutState=Ot,this.widgetCofig=jt,this.widgetCofig.forEach(Ut=>{if(Ut.afterid)if(this.preConditionMap.has(Ut.afterid))this.preConditionMap.get(Ut.afterid)?.add(Ut);else{const Wt=new Set;Wt.add(Ut),this.preConditionMap.set(Ut.afterid,Wt)}})}getWidgetConfig(){return this.widgetCofig}preloadWidgets(){this.widgetCofig.filter(Ot=>Ot.preload&&!Ot.afterid).forEach(Ot=>{this._loadWidget(Ot,this.loadOtherDependenceWidgets.bind(this))})}loadWidget(Ot){if(!Ot)return;let jt;Ee(Ot)?jt=Ot:ke(Ot)&&(jt=this.widgetCofig.find(Ut=>Ut.id===Ot)),jt&&this._loadWidget(jt,this.loadOtherDependenceWidgets.bind(this))}loadOtherDependenceWidgets(Ot){this.preConditionMap.has(Ot)&&this.preConditionMap.get(Ot)?.forEach(jt=>{jt.preload&&this._loadWidget(jt)})}_loadWidget(Ot,jt){if(!this.widgetsLoadedSet.has(Ot.id))return Ot.component().then(Ut=>{if(Ut.default){const Wt=e.markRaw(Ut.default);this.getContainerComponents(Ot.container).value.set(Ot.id,Wt),this.widgetsLoadedSet.add(Ot.id),R.EventBus.emit(z.WidgetLoadedEvent,Ot.id),jt&&jt(Ot.id)}})}hasDependentWidgets(Ot){let jt=!1;if(this.preConditionMap.has(Ot)){const Ut=this.preConditionMap.get(Ot);if(Ut){for(const Wt of Ut)if(this.isWidgetLoaded(Wt.id)){jt=!0;break}}}return jt}unloadWidget(Ot){if(!Ot||!this.isWidgetLoaded(Ot))return;const jt=this.widgetCofig.find(Ut=>Ut.id===Ot);if(jt){if(this.preConditionMap.has(Ot)){const Ut=this.preConditionMap.get(Ot);if(Ut)for(const Wt of Ut)this.unloadWidget(Wt.id)}this.getContainerComponents(jt.container).value.delete(Ot),this.widgetsLoadedSet.delete(Ot),R.EventBus.emit(z.WidgetUnLoadedEvent,Ot)}}isWidgetLoaded(Ot){return this.widgetsLoadedSet.has(Ot)}splitTwoContainer(Ot=!1){const jt=this.layoutState.centerMainContainer,Ut=this.layoutState.centerBackContainer;Ot?(jt&&(jt.style.left="0",jt.style.width="100%"),Ut&&(Ut.style.width="100%")):(jt&&(jt.style.left="50%",jt.style.width="50%"),Ut&&(Ut.style.width="50%"))}getLayoutContainer(Ot){switch(Ot){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(Ot,jt=!1){const Ut=this.getLayoutContainer(Ot);Ut&&(Ut.style.visibility=jt?"visible":"hidden")}changeWidgetVisible(Ot,jt=!1){const Ut=this.getWidgetComponent(Ot);Ut&&R.EventBus.emit(z.WidgetVisibleChanged,{id:Ot,name:Ut.name,visible:jt})}getWidgetComponent(Ot){if(this.widgetsLoadedSet.has(Ot)){const jt=this.widgetCofig.find(Ut=>Ut.id===Ot);if(jt)return this.getContainerComponents(jt.container).value.get(Ot)}}getWigetItem(Ot){return this.widgetCofig.find(jt=>jt.id===Ot)}getGroupWigetItems(Ot){return this.widgetCofig.filter(jt=>jt.group===Ot)}getContainerComponents(Ot){if(this.layoutMap.has(Ot))return this.layoutMap.get(Ot);{const jt=e.ref(new Map);return this.layoutMap.set(Ot,jt),jt}}addContainerComponent(Ot,jt){}}var yt=e.defineComponent({name:"MainContainer",props:{widgetConfig:{type:Array,required:!0,default:()=>[]},layoutStyle:{type:Object}},components:{},setup(Tt,{attrs:Ot,slots:jt,emit:Ut}){const Wt=e.reactive({topContainer:void 0,centerBackContainer:void 0,centerMainContainer:void 0,centerFrontContainer:void 0,bottomContainer:void 0,leftContainer:void 0,rightContainer:void 0});if(!R.LayoutManager){const bn=new vt(Wt,Tt.widgetConfig);R.LayoutManager=bn,bn.preloadWidgets()}const Xt=hn(exports.LayoutContainerEnum.top),tn=hn(exports.LayoutContainerEnum.centerBack),en=hn(exports.LayoutContainerEnum.centerFront),rn=hn(exports.LayoutContainerEnum.left),an=hn(exports.LayoutContainerEnum.right),ln=hn(exports.LayoutContainerEnum.bottom);function hn(bn){return R.LayoutManager?.getContainerComponents(bn)}const yn=e.computed(()=>Tt.layoutStyle);return{...e.toRefs(Wt),topContainerComponents:Xt,centerbackComponents:tn,centerfrontComponents:en,leftContainerComponents:rn,rightContainerComponents:an,bottomContainerComponents:ln,containerStyle:yn}}});const wt={ref:"topContainer",class:"topContainer"},bt={ref:"centerBackContainer",class:"centerdiv backContainer"},xt={ref:"centerMainContainer",class:"centerdiv mainContainer"},St={ref:"centerFrontContainer",class:"centerdiv centerContainer"},Ct={ref:"leftContainer",class:"leftContainer"},Et={ref:"rightContainer",class:"rightContainer"},kt={ref:"bottomContainer",class:"bottomContainer"};yt.render=function(Tt,Ot,jt,Ut,Wt,Xt){const tn=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",{class:"layoutContainer",style:e.normalizeStyle(Tt.containerStyle)},[e.createElementVNode("div",wt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Tt.topContainerComponents,([en,rn])=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(rn),{key:en}))),128))],512),e.createElementVNode("div",null,[e.createCommentVNode(" \u5E95\u5C42-\u4E3B\u5BB9\u5668 "),e.createElementVNode("div",bt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Tt.centerbackComponents,([en,rn])=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(rn),{key:en}))),128))],512),e.createCommentVNode(" \u4E3B\u8981\u5BB9\u5668 "),e.createElementVNode("div",xt,[e.createVNode(tn,null,{default:e.withCtx(({Component:en})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(en)))]),_:1})],512),e.createCommentVNode(" \u6D6E\u52A8-\u4E3B\u5BB9\u5668 "),e.createElementVNode("div",St,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Tt.centerfrontComponents,([en,rn])=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(rn),{key:en}))),128))],512),e.createElementVNode("div",Ct,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Tt.leftContainerComponents,([en,rn])=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(rn),{key:en}))),128))],512),e.createElementVNode("div",Et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Tt.rightContainerComponents,([en,rn])=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(rn),{key:en}))),128))],512)]),e.createElementVNode("div",kt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Tt.bottomContainerComponents,([en,rn])=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(rn),{key:en}))),128))],512)],4)},yt.__file="src/controls/layoutcontainer/layout.vue";const zt=new Map,_t=new Map;let Mt;const Lt={getDefaultClient(){if(Mt||(Mt=new B(SysConfig.DefaultHproseAPI)),!Mt)throw Error("HproseProxy\u5BF9\u8C61\u4E3A\u7A7A");return Mt},registerHprose(Tt,Ot){const jt=_t.get(Tt);if(!jt){const Ut=new B(Ot);zt.set(Tt,Ut)}return jt},getHprose:Tt=>_t?.get(Tt),getProxyHprose:Tt=>zt.get(Tt),unregisterHprose(Tt){zt.get(Tt)&&(_t.delete(Tt),zt.delete(Tt))}},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"},It=R.Config.ServiceURL.LoginAuthURL;function Pt(){const Tt=j();Tt&&W(Bt.RefreshToken,It,{refreshToken:Tt}).then(Ot=>{Nt(Ot.data)})}function Rt(Tt){R.User||(R.User={id:Tt.id,name:Tt.name});const Ot=new Date().getTime(),jt=new Date(Tt.expire).getTime()-Ot;jt>0&&(jt<=4e3?Pt():setTimeout(Pt,jt-4e3))}function Nt(Tt){R.User&&(R.User.doubleToken=Tt);const Ot=new Date().getTime(),jt=new Date(Tt.accessToken.expires).getTime()-Ot;if(jt>0&&R.User){const Ut={id:R.User.id,name:R.User.name,token:Tt.accessToken.tokenContent,expire:Tt.accessToken.expires,refresh:Tt.refreshToken.tokenContent};A.set("access_token",Ut,jt/1e3),Rt(Ut)}else A.remove("access_token")}function Dt(Tt){R.User=Tt}const At=R.Config.ServiceURL.LoginAuthURL;exports.BigFileDownload=class{constructor(Tt,Ot,jt=5){this.ChunkUnitM=1048576,this.totalChunks=1,this.fileMetaData=null,this.finishNum=0,this.isStarting=!1,this.fileID=Tt,this.downloadURL=Ot,this.chunkByteSize=jt*this.ChunkUnitM,this.eventTarget=E(),this.initIndexDB()}on(Tt,Ot){this.eventTarget.on(Tt,Ot)}dispatch(Tt,Ot){this.eventTarget.emit(Tt,Ot)}dispatchError(Tt){this.eventTarget.emit("error",Tt)}dispatchInfo(Tt){this.eventTarget.emit("info",Tt)}async queryDownloadFileMeta(Tt,Ot="",jt){this.dispatchInfo("\u5F00\u59CB\u83B7\u53D6\u6587\u4EF6\u4FE1\u606F");const Ut=await W(Ot,Tt,jt);let Wt=null;return Ut&&Ut.status===200&&(Wt=Ut.data),Wt}async getIFileMeta(){if(this.fileMetaData===null){const Tt=await this.currentDB?.getItem("fileinfo");this.fileMetaData=Tt||null}return this.fileMetaData}initIndexDB(){this.currentDB=me.createInstance({name:this.fileID,driver:me.INDEXEDDB})}async init(Tt){if(this.finishNum=0,Tt){const Ot="fileinfo";this.fileMetaData={id:Tt.id,name:Tt.name,length:Tt.length,downloadID:Tt.downloadID,chunkSize:this.chunkByteSize},this.fileName=Tt.name,this.currentDB?.setItem(Ot,this.fileMetaData)}if(this.fileMetaData!=null){const Ot=this.fileMetaData.chunkSize;Ot!=null&&Ot>0&&(this.chunkByteSize=Ot)}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(Tt){Tt&&(this.downloadURL=Tt);const Ot=this.downloadURL;if(!Ot)throw Error("\u4E0B\u8F7DURL\u4E0D\u80FD\u4E3A\u7A7A!");this.currentDB||this.initIndexDB();const jt=R.Axios.CancelToken;this.cancelSource=jt.source(),this.isStarting=!0;const Ut={key:this.fileMetaData?.downloadID};let Wt=0;for(let Xt=0;Xt<this.totalChunks;Xt++){if(this.keys&&this.keys?.indexOf(Xt.toString())>=0){Wt++,Wt>this.finishNum&&(this.finishNum=Wt,this.downloadProgress());continue}const tn=Xt*this.chunkByteSize;let en=tn+this.chunkByteSize-1;this.fileMetaData&&en>this.fileMetaData.length&&(en=this.fileMetaData.length-1);const rn={range:`bytes=${tn}-${en}`},an=Xt.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${Xt+1}/${this.totalChunks}`),W("",Ot,Ut,rn,"arraybuffer",this.cancelSource?.token).then(ln=>{const hn=ln.data;this.currentDB?.setItem(an,hn),Wt++,Wt>this.finishNum&&(this.finishNum=Wt,this.downloadProgress());const yn=parseInt(an)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${yn}/${this.totalChunks}`),this.savefile()})}this.finishNum===this.totalChunks&&this.savefile()}downloadProgress(){const Tt=100*this.finishNum/this.totalChunks;this.dispatch("downloadProgress",Tt)}outputProgress(Tt){const Ot=100*Tt/this.totalChunks;this.dispatch("saveProgress",Ot)}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 Tt=ve.createWriteStream(this.fileName).getWriter();let Ot=0;for(let jt=0;jt<this.totalChunks;jt++){const Ut=jt.toString(),Wt=await this.currentDB?.getItem(Ut);let Xt=new Response(Wt).body;if(Xt===null)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${jt+1}\uFF09\u4E2A\u9519\u8BEF\uFF0C\u9000\u51FA\uFF01`);const tn=Xt.getReader();for(;;){const{done:en,value:rn}=await tn.read();if(en)break;Tt.write(rn)}Ot++,this.outputProgress(Ot),this.dispatchInfo(`\u5B8C\u6210\u7B2C${jt+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}Tt.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:Tt,target:Ot="_blank",fileName:jt}){const Ut=new URL(Tt).host==location.host;return new Promise((Wt,Xt)=>{if(Ut){const tn=document.createElement("a");if(tn.href=Tt,tn.target=Ot,tn.download!==void 0&&(tn.download=jt||M(Tt)),document.createEvent){const en=document.createEvent("MouseEvents");return en.initEvent("click",!0,!0),tn.dispatchEvent(en),Wt(!0)}return Tt.indexOf("?")===-1&&(Tt+="?download"),window.open(Tt,Ot),Wt(!0)}{const tn=document.createElement("canvas"),en=document.createElement("img");en.setAttribute("crossOrigin","Anonymous"),en.src=Tt,en.onload=rn=>{tn.width=en.width,tn.height=en.height,tn.getContext("2d").drawImage(en,0,0,en.width,en.height),tn.toBlob(an=>{const ln=document.createElement("a");ln.href=window.URL.createObjectURL(an),ln.download=M(Tt),ln.click(),URL.revokeObjectURL(ln.href),Wt(!0)},"image/jpeg")},en.onerror=rn=>Xt(rn)}})},exports.Global=R,exports.GlobalHprose=Lt,exports.GlobalMitt=k,exports.H5Tool=d,exports.HproseClient=L,exports.HttpDownload=(Tt,Ot,jt)=>{Tt.get(Ot).then(function(Ut){_(Ut.data,jt)}).catch(Ut=>{console.warn(Ut),k.emit(z.CommonWarnEvent,"\u4E0B\u8F7D\u6587\u4EF6\u62A5\u9519\uFF01")})},exports.JsonDownload=(Tt,Ot)=>{const jt=JSON.stringify(Tt,null,2);Ot?_(jt,Ot+".json"):k.emit(z.CommonWarnEvent,"\u53C2\u6570JsonID\u4E0D\u80FD\u4E3A\u7A7A\uFF01")},exports.LayoutContainer=yt,exports.LayoutManager=class{constructor(Tt,Ot){this.layoutMap=new Map,this.preConditionMap=new Map,this.widgetsLoadedSet=new Set,this.layoutState=Tt,this.widgetCofig=Ot,this.widgetCofig.forEach(jt=>{if(jt.afterid)if(this.preConditionMap.has(jt.afterid))this.preConditionMap.get(jt.afterid)?.add(jt);else{const Ut=new Set;Ut.add(jt),this.preConditionMap.set(jt.afterid,Ut)}})}getWidgetConfig(){return this.widgetCofig}preloadWidgets(){this.widgetCofig.filter(Tt=>Tt.preload&&!Tt.afterid).forEach(Tt=>{this._loadWidget(Tt,this.loadOtherDependenceWidgets.bind(this))})}loadWidget(Tt){if(!Tt)return;let Ot;Ee(Tt)?Ot=Tt:ke(Tt)&&(Ot=this.widgetCofig.find(jt=>jt.id===Tt)),Ot&&this._loadWidget(Ot,this.loadOtherDependenceWidgets.bind(this))}loadOtherDependenceWidgets(Tt){this.preConditionMap.has(Tt)&&this.preConditionMap.get(Tt)?.forEach(Ot=>{Ot.preload&&this._loadWidget(Ot)})}_loadWidget(Tt,Ot){if(!this.widgetsLoadedSet.has(Tt.id))return Tt.component().then(jt=>{if(jt.default){const Ut=e.markRaw(jt.default);this.getContainerComponents(Tt.container).value.set(Tt.id,Ut),this.widgetsLoadedSet.add(Tt.id),R.EventBus.emit(z.WidgetLoadedEvent,Tt.id),Ot&&Ot(Tt.id)}})}hasDependentWidgets(Tt){let Ot=!1;if(this.preConditionMap.has(Tt)){const jt=this.preConditionMap.get(Tt);if(jt){for(const Ut of jt)if(this.isWidgetLoaded(Ut.id)){Ot=!0;break}}}return Ot}unloadWidget(Tt){if(!Tt||!this.isWidgetLoaded(Tt))return;const Ot=this.widgetCofig.find(jt=>jt.id===Tt);if(Ot){if(this.preConditionMap.has(Tt)){const jt=this.preConditionMap.get(Tt);if(jt)for(const Ut of jt)this.unloadWidget(Ut.id)}this.getContainerComponents(Ot.container).value.delete(Tt),this.widgetsLoadedSet.delete(Tt),R.EventBus.emit(z.WidgetUnLoadedEvent,Tt)}}isWidgetLoaded(Tt){return this.widgetsLoadedSet.has(Tt)}splitTwoContainer(Tt=!1){const Ot=this.layoutState.centerMainContainer,jt=this.layoutState.centerBackContainer;Tt?(Ot&&(Ot.style.left="0",Ot.style.width="100%"),jt&&(jt.style.width="100%")):(Ot&&(Ot.style.left="50%",Ot.style.width="50%"),jt&&(jt.style.width="50%"))}getLayoutContainer(Tt){switch(Tt){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(Tt,Ot=!1){const jt=this.getLayoutContainer(Tt);jt&&(jt.style.visibility=Ot?"visible":"hidden")}changeWidgetVisible(Tt,Ot=!1){const jt=this.getWidgetComponent(Tt);jt&&R.EventBus.emit(z.WidgetVisibleChanged,{id:Tt,name:jt.name,visible:Ot})}getWidgetComponent(Tt){if(this.widgetsLoadedSet.has(Tt)){const Ot=this.widgetCofig.find(jt=>jt.id===Tt);if(Ot)return this.getContainerComponents(Ot.container).value.get(Tt)}}getWigetItem(Tt){return this.widgetCofig.find(Ot=>Ot.id===Tt)}getGroupWigetItems(Tt){return this.widgetCofig.filter(Ot=>Ot.group===Tt)}getContainerComponents(Tt){if(this.layoutMap.has(Tt))return this.layoutMap.get(Tt);{const Ot=e.ref(new Map);return this.layoutMap.set(Tt,Ot),Ot}}addContainerComponent(Tt,Ot){}},exports.ObjToUrlParams=function(Tt,Ot){let jt="",Ut="";for(const Wt in Ot)jt+=Wt+"="+encodeURIComponent(Ot[Wt])+"&";return jt=jt.replace(/&$/,""),Ut=/\?$/.test(Tt)?Tt+jt:Tt.replace(/\/?$/,"?")+jt,Ut},exports.Pane=r,exports.ProxyClient=B,exports.SaveAs=function(Tt,Ot){const jt=window.URL||window.webkitURL||window,Ut=new Blob([Tt]),Wt=document.createElement("a");Wt.href=jt.createObjectURL(Ut),Wt.download=Ot,Wt.click(),jt.revokeObjectURL(Wt.href)},exports.Splitpanes=o,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=Ne,exports.VCollapsiblePanelGroup=Pe,exports.VWindow=ut,exports.WindowResizeEvent=st,exports.WindowType=mt,exports.calculateBestTextColor=function(Tt){const Ot=b(Tt.substring(1));var jt,Ut;return jt=Ot.split(","),Ut=[0,0,0],(S(~~jt[0],~~jt[1],~~jt[2])+.05)/(S(Ut[0],Ut[1],Ut[2])+.05)>=12?"#000000":"#FFFFFF"},exports.changePWD=function(Tt){return W(Bt.ChangePWD,At,Tt)},exports.checkDoRefreshToken=Rt,exports.checkLogin=async function(Tt){const Ot=(await W(Bt.CheckLogin,At,Tt))?.data;return Ot&&Ot.isSuccess&&(Dt(Ot.resultValue),Nt(Ot.resultValue.doubleToken)),Ot},exports.checkToken=function(Tt){return W(Bt.CheckToken,At,{token:Tt})},exports.clearLocalToken=O,exports.colorIsDark=function(Tt){if(!w(Tt))return;const[Ot,jt,Ut]=b(Tt).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(Wt=>Number(Wt));return .299*Ot+.578*jt+.114*Ut<192},exports.createFileUpload=Tt=>new se(Tt),exports.darken=function(Tt,Ot){return Tt=Tt.indexOf("#")>=0?Tt.substring(1,Tt.length):Tt,Ot=Math.trunc(255*Ot/100),`#${C(Tt.substring(0,2),Ot)}${C(Tt.substring(2,4),Ot)}${C(Tt.substring(4,6),Ot)}`},exports.deepMerge=function Tt(Ot={},jt={}){let Ut;for(Ut in jt)Ot[Ut]=Ee(Ot[Ut])?Tt(Ot[Ut],jt[Ut]):Ot[Ut]=jt[Ut];return Ot},exports.doRefreshToken=Pt,exports.get=function(Tt,Ot){return W(Tt,void 0,Ot)},exports.getData=function(Tt,Ot){return R.Axios?.get(Tt,{params:Ot}).catch(function(jt){console.log(jt),R.Message?.err("\u5916\u90E8Get\u670D\u52A1\u8BF7\u6C42\u9519\u8BEF\uFF1A"+Tt)})},exports.getHexColor=function(Tt){const Ot=Tt.toLowerCase().replace(/rgb?a?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),jt=parseFloat(Ot[3]||"1"),Ut=Math.floor(jt*parseInt(Ot[0])+255*(1-jt)),Wt=Math.floor(jt*parseInt(Ot[1])+255*(1-jt)),Xt=Math.floor(jt*parseInt(Ot[2])+255*(1-jt));return"#"+("0"+Ut.toString(16)).slice(-2)+("0"+Wt.toString(16)).slice(-2)+("0"+Xt.toString(16)).slice(-2)},exports.getLocalToken=T,exports.getLockState=function(){return A.get("is_LockScreen",!1)},exports.getLongHexColor=function(Tt){const Ot=Tt;if(Ot.length===4){let Ut="#";for(var jt=1;jt<4;jt+=1){const Wt=Ot.slice(jt,jt+1);Ut+=Wt.concat(Wt)}return Ut}return Ot},exports.getProxyClient=D,exports.getRGBColor=function(Tt){var Ot=Tt.toLowerCase();if(w(Tt)){if(Ot.length===4){for(var jt="#",Ut=1;Ut<4;Ut+=1){const Xt=Ot.slice(Ut,Ut+1);jt+=Xt.concat(Xt)}Ot=jt}var Wt=[];for(Ut=1;Ut<7;Ut+=2)Wt.push(parseInt("0x"+Ot.slice(Ut,Ut+2)));return"rgb("+Wt.join(",")+")"}return Ot},exports.getRGBColorFromHSLA=function(Tt){if(!!Tt){var Ot=Tt.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(!!Ot){var jt,Ut,Wt,Xt=(parseFloat(Ot[1])%360+360)%360/360,tn=parseFloat(Ot[2])/(/%$/.test(Ot[2])?100:1),en=parseFloat(Ot[3])/(/%$/.test(Ot[3])?100:1);if(tn===0)jt=Ut=Wt=en;else{var rn=en<=.5?en*(tn+1):en+tn-en*tn,an=2*en-rn;jt=y(an,rn,Xt+1/3),Ut=y(an,rn,Xt),Wt=y(an,rn,Xt-1/3)}return`rgba(${jt=Math.round(255*jt)},${Ut=Math.round(255*Ut)},${Wt=Math.round(255*Wt)},${Ot[4]?parseFloat(Ot[4]):1})`}}},exports.getRefreshToken=j,exports.hexToRGB=b,exports.init=N,exports.initDefaultProxyClient=function(Tt){const Ot=D(Tt);return Ot&&(R.DefaultProxyClient=Ot),Ot},exports.initXFrame=function(Tt){N(Tt.message,Tt.axios,Tt.defaultHproseURL),Tt.config&&(R.Config=Tt.config)},exports.is=we,exports.isArray=ze,exports.isAsyncFunction=function(Tt){return we(Tt,"AsyncFunction")},exports.isBoolean=function(Tt){return Tt===!0||Tt===!1||we(Tt,"Boolean")},exports.isClient=()=>typeof window!="undefined",exports.isDate=function(Tt){return we(Tt,"Date")},exports.isDef=xe,exports.isElement=Tt=>Ee(Tt)&&!!Tt.tagName,exports.isEmpty=function(Tt){return Tt==null||(ke(Tt)||ze(Tt)?Tt.length===0:!!Ee(Tt)&&JSON.stringify(Tt)==="{}")},exports.isEnumColor=function(Tt){if(typeof Tt=="object"||!Tt)return;const Ot=Tt.toLowerCase().substr(0,1);return Ot==="#"?exports.EnumColor.Hex:Ot==="r"||Ot==="("?exports.EnumColor.RGBA:Ot==="h"?exports.EnumColor.Hsla:exports.EnumColor.RGBA},exports.isError=function(Tt){return we(Tt,"Error")},exports.isFunction=be,exports.isHexColor=w,exports.isImageDom=function(Tt){return Tt&&["IMAGE","IMG"].includes(Tt.tagName)},exports.isMap=function(Tt){return we(Tt,"Map")},exports.isNull=Ce,exports.isNullAndUnDef=function(Tt){return Se(Tt)&&Ce(Tt)},exports.isNullOrUnDef=function(Tt){return Se(Tt)||Ce(Tt)},exports.isNumber=function(Tt){return we(Tt,"Number")},exports.isObject=Ee,exports.isPromise=function(Tt){return we(Tt,"Promise")&&Ee(Tt)&&be(Tt.then)&&be(Tt.catch)},exports.isServer=_e,exports.isString=ke,exports.isSymbol=function(Tt){return we(Tt,"Symbol")},exports.isUnDef=Se,exports.isValidURL=Tt=>/^(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(Tt),exports.isWeakMap=function(Tt){return we(Tt,"WeakMap")},exports.isWeakSet=function(Tt){return we(Tt,"WeakSet")},exports.isWindow=Tt=>typeof window!="undefined"&&we(Tt,"Window"),exports.jquery=ae,exports.lighten=function(Tt,Ot){return Tt=Tt.indexOf("#")>=0?Tt.substring(1,Tt.length):Tt,Ot=Math.trunc(255*Ot/100),`#${x(Tt.substring(0,2),Ot)}${x(Tt.substring(2,4),Ot)}${x(Tt.substring(4,6),Ot)}`},exports.login=async function(Tt){const Ot=(await W(Bt.Login,At,Tt))?.data;return Ot&&Ot.isSuccess&&(Dt(Ot.resultValue),Nt(Ot.resultValue.doubleToken)),Ot},exports.logout=function(){const Tt=T();Tt&&(F(Bt.Logout,At,{token:Tt.token,reftoken:Tt.refresh}),O())},exports.newGuid=function(){var Tt=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(Ot){var jt=(Tt+16*Math.random())%16|0;return Tt=Math.floor(Tt/16),(Ot==="x"?jt:3&jt|8).toString(16)})},exports.onLockListener=function(){pe(),document.addEventListener("mousedown",pe)},exports.post=function(Tt,Ot){return F(Tt,void 0,Ot)},exports.requestGet=W,exports.requestPost=F,exports.requestPostBody=function(Tt,Ot,jt,Ut,Wt,Xt="json"){const tn=U(Ut,Ot,Wt,Xt);return R.Axios?.post(Tt,jt,tn).catch(function(en){console.log(en),R.Message?.err("\u670D\u52A1Post\u8BF7\u6C42\u9519\u8BEF\uFF1A"+Tt)})},exports.rgbToHex=function(Tt,Ot,jt){const Ut=(Tt<<16|Ot<<8|jt).toString(16);return"#"+new Array(Math.abs(Ut.length-7)).join("0")+Ut},exports.setLocalToken=Nt,exports.setUser=Dt,exports.sleep=function(Tt){for(var Ot=new Date().getTime();new Date().getTime()-Ot<Tt;);console.log(`\u5F3A\u5236\u7B49\u5F85${Tt}\u6BEB\u79D2`)},exports.storage=m,exports.storageHelper=A,exports.unLockListener=function(){document.removeEventListener("mousedown",pe)},exports.uuid=g;