xframelib 0.7.0 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/assets/{output-232043b1.css → index-b43c71d9.css} +119 -119
- package/dist/core/SysEvents.d.ts +1 -0
- package/dist/index.cjs +8 -8
- package/dist/index.js +8 -8
- package/dist/model/IRole.d.ts +9 -0
- package/dist/utils/SignalRClient.d.ts +8 -0
- package/dist/utils/ValidateTool.d.ts +149 -0
- package/dist/utils/WaterMark.d.ts +10 -0
- package/dist/utils/index.d.ts +4 -1
- package/package.json +17 -16
- package/dist/assets/output-79ea15e6.css +0 -305
- package/dist/assets/output-7c052984.css +0 -305
- package/dist/assets/output-915eebd6.css +0 -305
- package/dist/controls/collapsepanel/VCollapsiblePanel.d.ts +0 -27
- package/dist/controls/collapsepanel/VCollapsiblePanelGroup.d.ts +0 -33
- package/dist/controls/layoutcontainer/layout.d.ts +0 -60
- package/dist/controls/vuewindow/window/Button.d.ts +0 -29
- package/dist/controls/vuewindow/window/index.d.ts +0 -211
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{h as Pr,openBlock as H,createElementBlock as Y,normalizeStyle as vt,renderSlot as pt,reactive as Dn,computed as mt,defineComponent as At,ref as it,onMounted as Re,onUpdated as Tr,nextTick as Me,normalizeClass as Dr,createElementVNode as J,createCommentVNode as yt,createVNode as Bn,Transition as Nn,withCtx as Wt,withModifiers as Un,getCurrentInstance as Br,watch as Pt,onBeforeUnmount as Nr,resolveComponent as On,createBlock as ct,withDirectives as Ur,Fragment as wt,createTextVNode as jn,toDisplayString as Or,vShow as jr,markRaw as Fr,toRefs as $r,renderList as Rt,resolveDynamicComponent as bt}from"vue";import Wr from"axios";import Hr from"qs";import{Client as qr,ClientContext as _e}from"@hprose/rpc-core";import{ByteStream as Fn}from"@hprose/io";import{HttpTransport as Gr}from"@hprose/rpc-html5";var Xr={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,e)=>(t[e.id]=e)&&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,e){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=e},onMouseMove(t){this.touch.mouseDown&&(t.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(t)),this.$emit("resize",this.panes.map(e=>({min:e.min,max:e.max,size:e.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,e){"ontouchstart"in window&&(t.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===e?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(t,e),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=e,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[e])},onSplitterDblClick(t,e){let n=0;this.panes=this.panes.map((i,r)=>(i.size=r===e?i.max:i.min,r!==e&&(n+=i.min),i)),this.panes[e].size-=n,this.$emit("pane-maximize",this.panes[e])},onPaneClick(t,e){this.$emit("pane-click",this.indexedPanes[e])},getCurrentMouseDrag(t){const e=this.container.getBoundingClientRect(),{clientX:n,clientY:i}="ontouchstart"in window&&t.touches?t.touches[0]:t;return{x:n-e.left,y:i-e.top}},getCurrentDragPercentage(t){t=t[this.horizontal?"y":"x"];const e=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(t=e-t),100*t/e},calculatePanesSize(t){const e=this.touch.activeSplitter;let n={prevPanesSize:this.sumPrevPanesSize(e),nextPanesSize:this.sumNextPanesSize(e),prevReachedMinPanes:0,nextReachedMinPanes:0};const i=0+(this.pushOtherPanes?0:n.prevPanesSize),r=100-(this.pushOtherPanes?0:n.nextPanesSize),o=Math.max(Math.min(this.getCurrentDragPercentage(t),r),i);let l=[e,e+1],p=this.panes[l[0]]||null,v=this.panes[l[1]]||null;const b=p.max<100&&o>=p.max+n.prevPanesSize,C=v.max<100&&o<=100-(v.max+this.sumNextPanesSize(e+1));if(b||C)b?(p.size=p.max,v.size=Math.max(100-p.max-n.prevPanesSize-n.nextPanesSize,0)):(p.size=Math.max(100-v.max-n.prevPanesSize-this.sumNextPanesSize(e+1),0),v.size=v.max);else{if(this.pushOtherPanes){const E=this.doPushOtherPanes(n,o);if(!E)return;({sums:n,panesToResize:l}=E),p=this.panes[l[0]]||null,v=this.panes[l[1]]||null}p!==null&&(p.size=Math.min(Math.max(o-n.prevPanesSize-n.prevReachedMinPanes,p.min),p.max)),v!==null&&(v.size=Math.min(Math.max(100-o-n.nextPanesSize-n.nextReachedMinPanes,v.min),v.max))}},doPushOtherPanes(t,e){const n=this.touch.activeSplitter,i=[n,n+1];return e<t.prevPanesSize+this.panes[i[0]].min&&(i[0]=this.findPrevExpandedPane(n).index,t.prevReachedMinPanes=0,i[0]<n&&this.panes.forEach((r,o)=>{o>i[0]&&o<=n&&(r.size=r.min,t.prevReachedMinPanes+=r.min)}),t.prevPanesSize=this.sumPrevPanesSize(i[0]),i[0]===void 0)?(t.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((r,o)=>{o>0&&o<=n&&(r.size=r.min,t.prevReachedMinPanes+=r.min)}),this.panes[i[1]].size=100-t.prevReachedMinPanes-this.panes[0].min-t.prevPanesSize-t.nextPanesSize,null):e>100-t.nextPanesSize-this.panes[i[1]].min&&(i[1]=this.findNextExpandedPane(n).index,t.nextReachedMinPanes=0,i[1]>n+1&&this.panes.forEach((r,o)=>{o>n&&o<i[1]&&(r.size=r.min,t.nextReachedMinPanes+=r.min)}),t.nextPanesSize=this.sumNextPanesSize(i[1]-1),i[1]===void 0)?(t.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((r,o)=>{o<this.panesCount-1&&o>=n+1&&(r.size=r.min,t.nextReachedMinPanes+=r.min)}),this.panes[i[0]].size=100-t.prevPanesSize-t.nextReachedMinPanes-this.panes[this.panesCount-1].min-t.nextPanesSize,null):{sums:t,panesToResize:i}},sumPrevPanesSize(t){return this.panes.reduce((e,n,i)=>e+(i<t?n.size:0),0)},sumNextPanesSize(t){return this.panes.reduce((e,n,i)=>e+(i>t+1?n.size:0),0)},findPrevExpandedPane(t){return[...this.panes].reverse().find(e=>e.index<t&&e.size>e.min)||{}},findNextExpandedPane(t){return this.panes.find(e=>e.index>t+1&&e.size>e.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(t=>{const e=t.classList.contains("splitpanes__pane"),n=t.classList.contains("splitpanes__splitter");if(!e&&!n)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,e,n=!1){const i=t-1,r=document.createElement("div");r.classList.add("splitpanes__splitter"),n||(r.onmousedown=o=>this.onMouseDown(o,i),typeof window<"u"&&"ontouchstart"in window&&(r.ontouchstart=o=>this.onMouseDown(o,i)),r.onclick=o=>this.onSplitterClick(o,i+1)),this.dblClickSplitter&&(r.ondblclick=o=>this.onSplitterDblClick(o,i+1)),e.parentNode.insertBefore(r,e)},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(n=>{n.className.includes("splitpanes__splitter")&&this.removeSplitter(n)});let e=0;t.forEach(n=>{n.className.includes("splitpanes__pane")&&(!e&&this.firstSplitter?this.addSplitter(e,n,!0):e&&this.addSplitter(e,n),e++)})},requestUpdate({target:t,...e}){const n=this.indexedPanes[t._.uid];Object.entries(e).forEach(([i,r])=>n[i]=r)},onPaneAdd(t){let e=-1;Array.from(t.$el.parentNode.children).some(r=>(r.className.includes("splitpanes__pane")&&e++,r===t.$el));const n=parseFloat(t.minSize),i=parseFloat(t.maxSize);this.panes.splice(e,0,{id:t._.uid,index:e,min:isNaN(n)?0:n,max:isNaN(i)?100:i,size:t.size===null?null:parseFloat(t.size),givenSize:t.size,update:t.update}),this.panes.forEach((r,o)=>r.index=o),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[e]}),this.$emit("pane-add",{index:e,panes:this.panes.map(r=>({min:r.min,max:r.max,size:r.size}))})})},onPaneRemove(t){const e=this.panes.findIndex(i=>i.id===t._.uid),n=this.panes.splice(e,1)[0];this.panes.forEach((i,r)=>i.index=r),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...n,index:e}}),this.$emit("pane-remove",{removed:n,panes:this.panes.map(i=>({min:i.min,max:i.max,size:i.size}))})})},resetPaneSizes(t={}){t.addedPane||t.removedPane?this.panes.some(e=>e.givenSize!==null||e.min||e.max<100)?this.equalizeAfterAddOrRemove(t):this.equalize():this.initialPanesSizing(),this.ready&&this.$emit("resized",this.panes.map(e=>({min:e.min,max:e.max,size:e.size})))},equalize(){const t=100/this.panesCount;let e=0;const n=[],i=[];this.panes.forEach(r=>{r.size=Math.max(Math.min(t,r.max),r.min),e-=r.size,r.size>=r.max&&n.push(r.id),r.size<=r.min&&i.push(r.id)}),e>.1&&this.readjustSizes(e,n,i)},initialPanesSizing(){let t=100;const e=[],n=[];let i=0;this.panes.forEach(o=>{t-=o.size,o.size!==null&&i++,o.size>=o.max&&e.push(o.id),o.size<=o.min&&n.push(o.id)});let r=100;t>.1&&(this.panes.forEach(o=>{o.size===null&&(o.size=Math.max(Math.min(t/(this.panesCount-i),o.max),o.min)),r-=o.size}),r>.1&&this.readjustSizes(t,e,n))},equalizeAfterAddOrRemove({addedPane:t}={}){let e=100/this.panesCount,n=0;const i=[],r=[];t&&t.givenSize!==null&&(e=(100-t.givenSize)/(this.panesCount-1)),this.panes.forEach(o=>{n-=o.size,o.size>=o.max&&i.push(o.id),o.size<=o.min&&r.push(o.id)}),!(Math.abs(n)<.1)&&(this.panes.forEach(o=>{t&&t.givenSize!==null&&t.id===o.id||(o.size=Math.max(Math.min(e,o.max),o.min)),n-=o.size,o.size>=o.max&&i.push(o.id),o.size<=o.min&&r.push(o.id)}),n>.1&&this.readjustSizes(n,i,r))},readjustSizes(t,e,n){let i;i=t>0?t/(this.panesCount-e.length):t/(this.panesCount-n.length),this.panes.forEach(r=>{if(t>0&&!e.includes(r.id)){const o=Math.max(Math.min(r.size+i,r.max),r.min),l=o-r.size;t-=l,r.size=o}else if(!n.includes(r.id)){const o=Math.max(Math.min(r.size+i,r.max),r.min),l=o-r.size;t-=l,r.size=o}r.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[r.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((e,n)=>{e.ondblclick=t?i=>this.onSplitterDblClick(i,n):void 0})}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.updatePaneComponents(),this.$emit("ready"),this.ready=!0},render(){return Pr("div",{ref:"container",class:["splitpanes","splitpanes--"+(this.horizontal?"horizontal":"vertical"),{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())},__file:"src/controls/splitpanes/splitpanes.vue"},Le={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})}}};Le.render=function(t,e,n,i,r,o){return H(),Y("div",{class:"splitpanes__pane",onClick:e[0]||(e[0]=l=>o.onPaneClick(l,t._.uid)),style:vt(t.style)},[pt(t.$slots,"default")],4)},Le.__file="src/controls/splitpanes/pane.vue";const Vr=Object.prototype.toString;function Z(t,e){return Vr.call(t)===`[object ${e}]`}function Ht(t){return Z(t,"Function")}const $n=t=>typeof t<"u",Ae=t=>!$n(t);function Pe(t){return t===null}function Kr(t){return Ae(t)&&Pe(t)}function Yr(t){return Ae(t)||Pe(t)}const St=t=>t!=null&&t!==null&&Z(t,"Object");function Jr(t){return Z(t,"Date")}function Zr(t){return Z(t,"Number")}function Qr(t){return Z(t,"AsyncFunction")}function to(t){return Z(t,"Promise")&&St(t)&&Ht(t.then)&&Ht(t.catch)}function qt(t){return Z(t,"String")}function eo(t){return t===!0||t===!1||Z(t,"Boolean")}function Te(t){return t&&Array.isArray(t)}const no=()=>typeof window<"u",io=t=>typeof window<"u"&&Z(t,"Window"),ro=t=>St(t)&&!!t.tagName,oo=typeof window>"u";function so(t){return t&&["IMAGE","IMG"].includes(t.tagName)}function ao(t){return t==null||(qt(t)||Te(t)?t.length===0:!!St(t)&&JSON.stringify(t)==="{}")}function co(t){return Z(t,"Error")}function uo(t){return Z(t,"WeakSet")}function lo(t){return Z(t,"WeakMap")}function ho(t){return Z(t,"Symbol")}function fo(t){return Z(t,"Map")}const po=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);var xt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},mo={exports:{}},De=mo.exports=function(t){var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(S,u){var f=S[0],d=S[1],h=S[2],g=S[3];d=((d+=((h=((h+=((g=((g+=((f=((f+=(d&h|~d&g)+u[0]-680876936|0)<<7|f>>>25)+d|0)&d|~f&h)+u[1]-389564586|0)<<12|g>>>20)+f|0)&f|~g&d)+u[2]+606105819|0)<<17|h>>>15)+g|0)&g|~h&f)+u[3]-1044525330|0)<<22|d>>>10)+h|0,d=((d+=((h=((h+=((g=((g+=((f=((f+=(d&h|~d&g)+u[4]-176418897|0)<<7|f>>>25)+d|0)&d|~f&h)+u[5]+1200080426|0)<<12|g>>>20)+f|0)&f|~g&d)+u[6]-1473231341|0)<<17|h>>>15)+g|0)&g|~h&f)+u[7]-45705983|0)<<22|d>>>10)+h|0,d=((d+=((h=((h+=((g=((g+=((f=((f+=(d&h|~d&g)+u[8]+1770035416|0)<<7|f>>>25)+d|0)&d|~f&h)+u[9]-1958414417|0)<<12|g>>>20)+f|0)&f|~g&d)+u[10]-42063|0)<<17|h>>>15)+g|0)&g|~h&f)+u[11]-1990404162|0)<<22|d>>>10)+h|0,d=((d+=((h=((h+=((g=((g+=((f=((f+=(d&h|~d&g)+u[12]+1804603682|0)<<7|f>>>25)+d|0)&d|~f&h)+u[13]-40341101|0)<<12|g>>>20)+f|0)&f|~g&d)+u[14]-1502002290|0)<<17|h>>>15)+g|0)&g|~h&f)+u[15]+1236535329|0)<<22|d>>>10)+h|0,d=((d+=((h=((h+=((g=((g+=((f=((f+=(d&g|h&~g)+u[1]-165796510|0)<<5|f>>>27)+d|0)&h|d&~h)+u[6]-1069501632|0)<<9|g>>>23)+f|0)&d|f&~d)+u[11]+643717713|0)<<14|h>>>18)+g|0)&f|g&~f)+u[0]-373897302|0)<<20|d>>>12)+h|0,d=((d+=((h=((h+=((g=((g+=((f=((f+=(d&g|h&~g)+u[5]-701558691|0)<<5|f>>>27)+d|0)&h|d&~h)+u[10]+38016083|0)<<9|g>>>23)+f|0)&d|f&~d)+u[15]-660478335|0)<<14|h>>>18)+g|0)&f|g&~f)+u[4]-405537848|0)<<20|d>>>12)+h|0,d=((d+=((h=((h+=((g=((g+=((f=((f+=(d&g|h&~g)+u[9]+568446438|0)<<5|f>>>27)+d|0)&h|d&~h)+u[14]-1019803690|0)<<9|g>>>23)+f|0)&d|f&~d)+u[3]-187363961|0)<<14|h>>>18)+g|0)&f|g&~f)+u[8]+1163531501|0)<<20|d>>>12)+h|0,d=((d+=((h=((h+=((g=((g+=((f=((f+=(d&g|h&~g)+u[13]-1444681467|0)<<5|f>>>27)+d|0)&h|d&~h)+u[2]-51403784|0)<<9|g>>>23)+f|0)&d|f&~d)+u[7]+1735328473|0)<<14|h>>>18)+g|0)&f|g&~f)+u[12]-1926607734|0)<<20|d>>>12)+h|0,d=((d+=((h=((h+=((g=((g+=((f=((f+=(d^h^g)+u[5]-378558|0)<<4|f>>>28)+d|0)^d^h)+u[8]-2022574463|0)<<11|g>>>21)+f|0)^f^d)+u[11]+1839030562|0)<<16|h>>>16)+g|0)^g^f)+u[14]-35309556|0)<<23|d>>>9)+h|0,d=((d+=((h=((h+=((g=((g+=((f=((f+=(d^h^g)+u[1]-1530992060|0)<<4|f>>>28)+d|0)^d^h)+u[4]+1272893353|0)<<11|g>>>21)+f|0)^f^d)+u[7]-155497632|0)<<16|h>>>16)+g|0)^g^f)+u[10]-1094730640|0)<<23|d>>>9)+h|0,d=((d+=((h=((h+=((g=((g+=((f=((f+=(d^h^g)+u[13]+681279174|0)<<4|f>>>28)+d|0)^d^h)+u[0]-358537222|0)<<11|g>>>21)+f|0)^f^d)+u[3]-722521979|0)<<16|h>>>16)+g|0)^g^f)+u[6]+76029189|0)<<23|d>>>9)+h|0,d=((d+=((h=((h+=((g=((g+=((f=((f+=(d^h^g)+u[9]-640364487|0)<<4|f>>>28)+d|0)^d^h)+u[12]-421815835|0)<<11|g>>>21)+f|0)^f^d)+u[15]+530742520|0)<<16|h>>>16)+g|0)^g^f)+u[2]-995338651|0)<<23|d>>>9)+h|0,d=((d+=((g=((g+=(d^((f=((f+=(h^(d|~g))+u[0]-198630844|0)<<6|f>>>26)+d|0)|~h))+u[7]+1126891415|0)<<10|g>>>22)+f|0)^((h=((h+=(f^(g|~d))+u[14]-1416354905|0)<<15|h>>>17)+g|0)|~f))+u[5]-57434055|0)<<21|d>>>11)+h|0,d=((d+=((g=((g+=(d^((f=((f+=(h^(d|~g))+u[12]+1700485571|0)<<6|f>>>26)+d|0)|~h))+u[3]-1894986606|0)<<10|g>>>22)+f|0)^((h=((h+=(f^(g|~d))+u[10]-1051523|0)<<15|h>>>17)+g|0)|~f))+u[1]-2054922799|0)<<21|d>>>11)+h|0,d=((d+=((g=((g+=(d^((f=((f+=(h^(d|~g))+u[8]+1873313359|0)<<6|f>>>26)+d|0)|~h))+u[15]-30611744|0)<<10|g>>>22)+f|0)^((h=((h+=(f^(g|~d))+u[6]-1560198380|0)<<15|h>>>17)+g|0)|~f))+u[13]+1309151649|0)<<21|d>>>11)+h|0,d=((d+=((g=((g+=(d^((f=((f+=(h^(d|~g))+u[4]-145523070|0)<<6|f>>>26)+d|0)|~h))+u[11]-1120210379|0)<<10|g>>>22)+f|0)^((h=((h+=(f^(g|~d))+u[2]+718787259|0)<<15|h>>>17)+g|0)|~f))+u[9]-343485551|0)<<21|d>>>11)+h|0,S[0]=f+S[0]|0,S[1]=d+S[1]|0,S[2]=h+S[2]|0,S[3]=g+S[3]|0}function i(S){var u,f=[];for(u=0;u<64;u+=4)f[u>>2]=S.charCodeAt(u)+(S.charCodeAt(u+1)<<8)+(S.charCodeAt(u+2)<<16)+(S.charCodeAt(u+3)<<24);return f}function r(S){var u,f=[];for(u=0;u<64;u+=4)f[u>>2]=S[u]+(S[u+1]<<8)+(S[u+2]<<16)+(S[u+3]<<24);return f}function o(S){var u,f,d,h,g,P,I=S.length,L=[1732584193,-271733879,-1732584194,271733878];for(u=64;u<=I;u+=64)n(L,i(S.substring(u-64,u)));for(f=(S=S.substring(u-64)).length,d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u=0;u<f;u+=1)d[u>>2]|=S.charCodeAt(u)<<(u%4<<3);if(d[u>>2]|=128<<(u%4<<3),u>55)for(n(L,d),u=0;u<16;u+=1)d[u]=0;return h=(h=8*I).toString(16).match(/(.*?)(.{0,8})$/),g=parseInt(h[2],16),P=parseInt(h[1],16)||0,d[14]=g,d[15]=P,n(L,d),L}function l(S){var u,f,d,h,g,P,I=S.length,L=[1732584193,-271733879,-1732584194,271733878];for(u=64;u<=I;u+=64)n(L,r(S.subarray(u-64,u)));for(f=(S=u-64<I?S.subarray(u-64):new Uint8Array(0)).length,d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u=0;u<f;u+=1)d[u>>2]|=S[u]<<(u%4<<3);if(d[u>>2]|=128<<(u%4<<3),u>55)for(n(L,d),u=0;u<16;u+=1)d[u]=0;return h=(h=8*I).toString(16).match(/(.*?)(.{0,8})$/),g=parseInt(h[2],16),P=parseInt(h[1],16)||0,d[14]=g,d[15]=P,n(L,d),L}function p(S){var u,f="";for(u=0;u<4;u+=1)f+=e[S>>8*u+4&15]+e[S>>8*u&15];return f}function v(S){var u;for(u=0;u<S.length;u+=1)S[u]=p(S[u]);return S.join("")}function b(S){return/[\u0080-\uFFFF]/.test(S)&&(S=unescape(encodeURIComponent(S))),S}function C(S,u){var f,d=S.length,h=new ArrayBuffer(d),g=new Uint8Array(h);for(f=0;f<d;f+=1)g[f]=S.charCodeAt(f);return u?g:h}function E(S){return String.fromCharCode.apply(null,new Uint8Array(S))}function A(S,u,f){var d=new Uint8Array(S.byteLength+u.byteLength);return d.set(new Uint8Array(S)),d.set(new Uint8Array(u),S.byteLength),f?d:d.buffer}function D(S){var u,f=[],d=S.length;for(u=0;u<d-1;u+=2)f.push(parseInt(S.substr(u,2),16));return String.fromCharCode.apply(String,f)}function z(){this.reset()}return v(o("hello")),typeof ArrayBuffer>"u"||ArrayBuffer.prototype.slice||function(){function S(u,f){return(u=0|u||0)<0?Math.max(u+f,0):Math.min(u,f)}ArrayBuffer.prototype.slice=function(u,f){var d,h,g,P,I=this.byteLength,L=S(u,I),N=I;return f!==t&&(N=S(f,I)),L>N?new ArrayBuffer(0):(d=N-L,h=new ArrayBuffer(d),g=new Uint8Array(h),P=new Uint8Array(this,L,d),g.set(P),h)}}(),z.prototype.append=function(S){return this.appendBinary(b(S)),this},z.prototype.appendBinary=function(S){this._buff+=S,this._length+=S.length;var u,f=this._buff.length;for(u=64;u<=f;u+=64)n(this._hash,i(this._buff.substring(u-64,u)));return this._buff=this._buff.substring(u-64),this},z.prototype.end=function(S){var u,f,d=this._buff,h=d.length,g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(u=0;u<h;u+=1)g[u>>2]|=d.charCodeAt(u)<<(u%4<<3);return this._finish(g,h),f=v(this._hash),S&&(f=D(f)),this.reset(),f},z.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},z.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},z.prototype.setState=function(S){return this._buff=S.buff,this._length=S.length,this._hash=S.hash,this},z.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},z.prototype._finish=function(S,u){var f,d,h,g=u;if(S[g>>2]|=128<<(g%4<<3),g>55)for(n(this._hash,S),g=0;g<16;g+=1)S[g]=0;f=(f=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),d=parseInt(f[2],16),h=parseInt(f[1],16)||0,S[14]=d,S[15]=h,n(this._hash,S)},z.hash=function(S,u){return z.hashBinary(b(S),u)},z.hashBinary=function(S,u){var f=v(o(S));return u?D(f):f},z.ArrayBuffer=function(){this.reset()},z.ArrayBuffer.prototype.append=function(S){var u,f=A(this._buff.buffer,S,!0),d=f.length;for(this._length+=S.byteLength,u=64;u<=d;u+=64)n(this._hash,r(f.subarray(u-64,u)));return this._buff=u-64<d?new Uint8Array(f.buffer.slice(u-64)):new Uint8Array(0),this},z.ArrayBuffer.prototype.end=function(S){var u,f,d=this._buff,h=d.length,g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(u=0;u<h;u+=1)g[u>>2]|=d[u]<<(u%4<<3);return this._finish(g,h),f=v(this._hash),S&&(f=D(f)),this.reset(),f},z.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},z.ArrayBuffer.prototype.getState=function(){var S=z.prototype.getState.call(this);return S.buff=E(S.buff),S},z.ArrayBuffer.prototype.setState=function(S){return S.buff=C(S.buff,!0),z.prototype.setState.call(this,S)},z.ArrayBuffer.prototype.destroy=z.prototype.destroy,z.ArrayBuffer.prototype._finish=z.prototype._finish,z.ArrayBuffer.hash=function(S,u){var f=v(l(new Uint8Array(S)));return u?D(f):f},z}();const Be=[];class rt{static addHandler(e,n,i){e.addEventListener?e.addEventListener(n,i,!1):e.attachEvent?e.attachEvent("on"+n,i):e["on"+n]=i}static windowResizeHandler(e){rt.addHandler(window,"resize",e)}static fullscreenEnabled(){const e=window.document;return document.fullscreenEnabled||window.fullScreen||e.mozFullscreenEnabled||e.webkitIsFullScreen}static fullScreen(e,n){if(n){const i=window.document;let r=window.document.exitFullscreen||i.msExitFullscreen||i.mozCancelFullScreen||i.webkitCancelFullScreen;typeof r<"u"&&r?r.call(window.document):typeof window.ActiveXObject<"u"&&new window.ActiveXObject("WScript.Shell")?.SendKeys("{F11}")}else{let i=e;i||(i=window.document.documentElement);let r=i.requestFullScreen||i.webkitRequestFullScreen||i.mozRequestFullScreen||i.msRequestFullScreen;typeof r<"u"&&r?r.call(i):typeof window.ActiveXObject<"u"&&new window.ActiveXObject("WScript.Shell")?.SendKeys("{F11}")}}static requestFullScreen(e=window.document.documentElement){let n=e;var i=n.requestFullScreen||n.webkitRequestFullScreen||n.mozRequestFullScreen||n.msRequestFullScreen;if(i)i.call(n);else if(typeof window.ActiveXObject<"u"){var r=new window.ActiveXObject("WScript.Shell");r!==null&&r.SendKeys("{F11}")}}static exitFullScreen(){const e=window.document;var n=document.exitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen||e.webkitExitFullscreen;if(n)n.call(document);else if(typeof window.ActiveXObject<"u"){var i=new window.ActiveXObject("WScript.Shell");i!==null&&i.SendKeys("{F11}")}}static fullScreenElement(){return window.document.fullscreenElement||window.document.webkitFullscreenElement||window.document.mozFullscreenElement||window.document.msFullscreenElement}static isFullScreen(){return!!rt.fullScreenElement()}static onFullScreenChanged(e){let n;"onfullscreenchange"in window.document?n="fullscreenchange":"onwebkitfullscreenchange"in window.document?n="webkitfullscreenchange":"onmozfullscreenchange"in window.document&&(n="mozfullscreenchange"),n?document.addEventListener(n,function(){const i=rt.isFullScreen();e(i)}):document.addEventListener("MSFullscreenChange",function(){const i=rt.isFullScreen();e(i)})}static stringifyCircularHandler(e,n){if(typeof n=="object"&&n!==null){if(Be.indexOf(n)!==-1)return;Be.push(n)}return n}static jsonStringify(e){if(!e)return"";const n=JSON.stringify(e,rt.stringifyCircularHandler);return Be.length=0,n}static jsonParse(e){const n=rt.jsonStringify(e);if(n.length>1)return JSON.parse(n)}static getObjectURL(e){let n;const i=window;return i.createObjcectURL!=null?n=i.createOjcectURL(e):window.URL!=null?n=window.URL.createObjectURL(e):window.webkitURL!=null&&(n=window.webkitURL.createObjectURL(e)),n}static getFileShortMD5(e,n){const i=File.prototype,r=i.slice||i.mozSlice||i.webkitSlice,o=e,l=2097152,p=new De.ArrayBuffer,v=new FileReader;v.onload=function(b){p.append(b.target?.result);const C=p.end();n({isOK:!0,data:C})},v.onerror=function(){const b="\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01";console.warn(b),n({isOK:!1,data:b})},function(){const b=0+l>=o.size?o.size:0+l;v.readAsArrayBuffer(r.call(o,0,b))}()}static getFileMD5(e,n){const i=File.prototype,r=i.slice||i.mozSlice||i.webkitSlice,o=e,l=2097152,p=Math.ceil(o.size/l);let v=0;const b=new De.ArrayBuffer,C=new FileReader;function E(){const A=v*l,D=A+l>=o.size?o.size:A+l;C.readAsArrayBuffer(r.call(o,A,D))}C.onload=function(A){if(b.append(A.target?.result),v++,v<p)E();else{const D=b.end();n({isOK:!0,data:D})}},C.onerror=function(){const A=`${o.name}:\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01`;console.warn(A),n({isOK:!1,data:A})},E()}static MD5(e,n=!1){return De.hash(e,n)}static copyTextByCommand(e){return new Promise((n,i)=>{const r=document.createElement("input");r.value=e,document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove(),n(!0)})}static copyText=e=>navigator.clipboard?navigator.clipboard.writeText(e).then(function(){return!0},function(n){return!1}):rt.copyTextByCommand(e);static copyElementTextByCommand(e){const n=document.createRange();n.selectNode(document.getElementById(e));const i=window.getSelection();i.rangeCount>0&&i.removeAllRanges(),i.addRange(n);try{return document.execCommand("copy"),i.removeRange(n),!0}catch(r){return i.removeRange(n),console.error("Command\u590D\u5236\u6587\u672C\u9519\u8BEF",r),!1}}static copyElementText(e){if(!navigator.clipboard)return rt.copyElementTextByCommand(e);const n=document.createRange();n.selectNode(document.getElementById(e));const i=window.getSelection();return i.rangeCount>0&&i.removeAllRanges(),i.addRange(n),navigator.clipboard.writeText(i).then(function(){return i.removeRange(n),!0},function(r){return i.removeRange(n),console.error("Clipboard\u590D\u5236\u6587\u672C\u9519\u8BEF",r),!1})}static setGrayMode(e){rt.toggleClass(e,"grayMode",document.documentElement)}static toggleClass(e,n,i){const r=i||document.body;let{className:o}=r;o=o.replace(n,""),r.className=e?`${o} ${n} `:o}static setCssVar(e,n,i=document.documentElement){i.style.setProperty(e,n)}static dispatchWindowResize(){const e=new Event("resize");window.dispatchEvent(e)}static dispatchElementEvent(e,n="click",i){let r;if(r=qt(e)?document.getElementById(e):e,r){const o=new Event(n,{bubbles:!0,cancelable:!0});i&&r.addEventListener("ev",l=>{i(l)},!1),r.dispatchEvent(o)}}}class Gt{static isNullOrEmpty=e=>e===null||e===""||e===void 0||e.length===0;static isNotEmpty=e=>!(e===null||e===""||e===void 0||e.length===0);static toHump(e){return e.replace(/[\-\/\_](\w)/g,(n,i)=>i.toUpperCase()).replace("views","")}}class Xt{prefixKey;storage;constructor(e="",n=localStorage){this.prefixKey=e,this.storage=n}getKey(e){return`${this.prefixKey}${e}`.toUpperCase()}set(e,n,i=604800){const r=JSON.stringify({value:n,expire:i!==null?new Date().getTime()+1e3*i:null});this.storage.setItem(this.getKey(e),r)}get(e,n=null){const i=this.storage.getItem(this.getKey(e));if(i)try{const r=JSON.parse(i),{value:o,expire:l}=r;if(l===null||l>=Date.now())return o;this.remove(this.getKey(e))}catch{return n}return n}getJsonObject(e){const n=this.storage.getItem(this.getKey(e));if(n)try{const i=JSON.parse(n);if(i.expire===null||i.expire>=Date.now())return i;this.remove(this.getKey(e))}catch{return}}remove(e){this.storage.removeItem(this.getKey(e))}clear(){this.storage.clear()}setCookie(e,n,i=604800){document.cookie=`${this.getKey(e)}=${n}; Max-Age=${i}`}getCookie(e){const n=document.cookie.split("; ");for(let i=0,r=n.length;i<r;i++){const o=n[i].split("=");if(o[0]===this.getKey(e))return o[1]}return""}removeCookie(e){this.setCookie(e,1,-1)}clearCookie(){const e=document.cookie.match(/[^ =;]+(?==)/g);if(e)for(let n=e.length;n--;)document.cookie=e[n]+"=0;expire="+new Date(0).toUTCString()}}const go=new Xt("",localStorage);function Vt(){let t=[];const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(var n=0;n<36;n++){const r=Math.floor(16*Math.random());t[n]=e.substring(r,r+1)}t[14]="4";const i=3&Number(t[19])|8;return t[19]=e.substring(i,i+1),t[8]=t[13]=t[18]=t[23]="-",t.join("")}function vo(){var t=new Date().getTime(),e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var i=(t+16*Math.random())%16|0;return t=Math.floor(t/16),(n==="x"?i:3&i|8).toString(16)});return e}function yo(t){const e=t.toLowerCase().replace(/rgb?a?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),n=parseFloat(e[3]||"1"),i=Math.floor(n*parseInt(e[0])+255*(1-n)),r=Math.floor(n*parseInt(e[1])+255*(1-n)),o=Math.floor(n*parseInt(e[2])+255*(1-n));return"#"+("0"+i.toString(16)).slice(-2)+("0"+r.toString(16)).slice(-2)+("0"+o.toString(16)).slice(-2)}function wo(t){var e=t.toLowerCase();if(Kt(t)){if(e.length===4){for(var n="#",i=1;i<4;i+=1){const o=e.slice(i,i+1);n+=o.concat(o)}e=n}var r=[];for(i=1;i<7;i+=2)r.push(parseInt("0x"+e.slice(i,i+2)));return"rgb("+r.join(",")+")"}return e}function bo(t){const e=t;if(e.length===4){let i="#";for(var n=1;n<4;n+=1){const r=e.slice(n,n+1);i+=r.concat(r)}return i}return e}var Ct;function So(t){if(typeof t=="object"||!t)return;const e=t.toLowerCase().substring(0,1);return e==="#"?Ct.Hex:e==="r"||e==="("?Ct.RGBA:e==="h"?Ct.Hsla:Ct.RGBA}function xo(t){if(!!t){var e=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(!!e){var n,i,r,o=(parseFloat(e[1])%360+360)%360/360,l=parseFloat(e[2])/(/%$/.test(e[2])?100:1),p=parseFloat(e[3])/(/%$/.test(e[3])?100:1);if(l===0)n=i=r=p;else{var v=p<=.5?p*(l+1):p+l-p*l,b=2*p-v;n=Ne(b,v,o+1/3),i=Ne(b,v,o),r=Ne(b,v,o-1/3)}return`rgba(${n=Math.round(255*n)},${i=Math.round(255*i)},${r=Math.round(255*r)},${e[4]?parseFloat(e[4]):1})`}}}function Ne(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Kt(t){return/^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/.test(t)}function Co(t,e,n){const i=(t<<16|e<<8|n).toString(16);return"#"+new Array(Math.abs(i.length-7)).join("0")+i}function Ue(t){let e=t.toLowerCase();if(Kt(t)){if(e.length===4){let i="#";for(let r=1;r<4;r+=1)i+=e.slice(r,r+1).concat(e.slice(r,r+1));e=i}const n=[];for(let i=1;i<7;i+=2)n.push(parseInt("0x"+e.slice(i,i+2)));return"RGB("+n.join(",")+")"}return e}function Eo(t){if(!Kt(t))return;const[e,n,i]=Ue(t).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(r=>Number(r));return .299*e+.578*n+.114*i<192}function ko(t,e){return t=t.indexOf("#")>=0?t.substring(1,t.length):t,e=Math.trunc(255*e/100),`#${je(t.substring(0,2),e)}${je(t.substring(2,4),e)}${je(t.substring(4,6),e)}`}function zo(t,e){return t=t.indexOf("#")>=0?t.substring(1,t.length):t,e=Math.trunc(255*e/100),`#${Oe(t.substring(0,2),e)}${Oe(t.substring(2,4),e)}${Oe(t.substring(4,6),e)}`}function Oe(t,e){const n=parseInt(t,16)+e,i=n>255?255:n;return i.toString(16).length>1?i.toString(16):`0${i.toString(16)}`}function Wn(t,e,n){const i=[t,e,n].map(r=>(r/=255)<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4));return .2126*i[0]+.7152*i[1]+.0722*i[2]}function Io(t){return function(e,n){return(Wn(~~e[0],~~e[1],~~e[2])+.05)/(Wn(n[0],n[1],n[2])+.05)}(Ue(t.substring(1)).split(","),[0,0,0])>=12?"#000000":"#FFFFFF"}function je(t,e){const n=parseInt(t,16)-e,i=n<0?0:n;return i.toString(16).length>1?i.toString(16):`0${i.toString(16)}`}function Fe(t){return{all:t=t||new Map,on(e,n){const i=t?.get(e);i&&i.push(n)||t?.set(e,[n])},off(e,n){const i=t?.get(e);i&&i.splice(i.indexOf(n)>>>0,1)},emit(e,n){(t?.get(e)||[]).slice().map(i=>{i(n)}),(t?.get("*")||[]).slice().map(i=>{i(e,n)})}}}(function(t){t[t.RGBA=0]="RGBA",t[t.Hex=1]="Hex",t[t.Hsla=2]="Hsla"})(Ct||(Ct={}));const Mt=Fe(),nt={HproseServiceErrorEvent:"HproseServiceError",WebAPIErrorEvent:"WebAPIError",AlertInfoEvent:"AlertInfoEvent",CommonWarnEvent:"CommonWarnEvent",WidgetLoadedEvent:"WidgetLoaded",WidgetUnLoadedEvent:"WidgetUnLoaded",WidgetVisibleChanged:"WidgetVisibleChanged",AxiosRequestErrorEvent:"AxiosRequestErrorEvent"},Yt=(t,e)=>{const n=document.createElement("a");n.download=e,n.style.display="none";const i=new Blob([t],{type:"application/octet-stream"});n.href=URL.createObjectURL(i),document.body.appendChild(n),n.click(),document.body.removeChild(n)};function Ro(t,e){const n=window.URL||window.webkitURL||window,i=new Blob([t]),r=document.createElement("a");r.href=n.createObjectURL(i),r.download=e,r.click(),n.revokeObjectURL(r.href)}const Hn=(t,e)=>{const n=JSON.stringify(t,null,2);e?Yt(n,e+".json"):Mt.emit(nt.CommonWarnEvent,"\u53C2\u6570JsonID\u4E0D\u80FD\u4E3A\u7A7A\uFF01")},Mo=(t,e,n)=>{t.get(e,{responseType:"blob"}).then(function(i){Yt(i.data,n)}).catch(i=>{console.warn(i),Mt.emit(nt.CommonWarnEvent,"\u4E0B\u8F7D\u6587\u4EF6\u62A5\u9519\uFF01")})};function qn(t){const e=t.lastIndexOf("/")+1;let n=t.substring(e);return n=decodeURI(n.split("?")[0]),n}function _o({url:t,target:e="_blank",fileName:n}){const i=new URL(t).host==location.host;return new Promise((r,o)=>{if(i){const l=document.createElement("a");if(l.href=t,l.target=e,l.download!==void 0&&(l.download=n||qn(t)),document.createEvent){const p=document.createEvent("MouseEvents");return p.initEvent("click",!0,!0),l.dispatchEvent(p),r(!0)}return t.indexOf("?")===-1&&(t+="?download"),window.open(t,e),r(!0)}{const l=document.createElement("canvas"),p=document.createElement("img");p.setAttribute("crossOrigin","Anonymous"),p.src=t,p.onload=v=>{l.width=p.width,l.height=p.height,l.getContext("2d").drawImage(p,0,0,p.width,p.height),l.toBlob(b=>{if(b){const C=document.createElement("a");C.href=window.URL.createObjectURL(b),C.download=qn(t),C.click(),URL.revokeObjectURL(C.href),r(!0)}},"image/jpeg")},p.onerror=v=>o(v)}})}function Lo(t){const e=new Date().getTime();let n=new Date().getTime();for(;n-e<t;)n=new Date().getTime();console.log(`\u5F3A\u5236\u7B49\u5F85${Gn}\u6BEB\u79D2`)}function Gn(t){return new Promise(e=>setTimeout(e,t))}var Xn,Vn,$e,Jt={exports:{}};Vn=xt,$e=function(){var t=function(){},e="undefined",n=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"];function r(z,S){var u=z[S];if(typeof u.bind=="function")return u.bind(z);try{return Function.prototype.bind.call(u,z)}catch{return function(){return Function.prototype.apply.apply(u,[z,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(z){return z==="debug"&&(z="log"),typeof console!==e&&(z==="trace"&&n?o:console[z]!==void 0?r(console,z):console.log!==void 0?r(console,"log"):t)}function p(z,S){for(var u=0;u<i.length;u++){var f=i[u];this[f]=u<z?t:this.methodFactory(f,z,S)}this.log=this.debug}function v(z,S,u){return function(){typeof console!==e&&(p.call(this,S,u),this[z].apply(this,arguments))}}function b(z,S,u){return l(z)||v.apply(this,arguments)}function C(z,S,u){var f,d=this;S=S??"WARN";var h="loglevel";function g(){var I;if(typeof window!==e&&h){try{I=window.localStorage[h]}catch{}if(typeof I===e)try{var L=window.document.cookie,N=L.indexOf(encodeURIComponent(h)+"=");N!==-1&&(I=/^([^;]+)/.exec(L.slice(N))[1])}catch{}return d.levels[I]===void 0&&(I=void 0),I}}typeof z=="string"?h+=":"+z:typeof z=="symbol"&&(h=void 0),d.name=z,d.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},d.methodFactory=u||b,d.getLevel=function(){return f},d.setLevel=function(I,L){if(typeof I=="string"&&d.levels[I.toUpperCase()]!==void 0&&(I=d.levels[I.toUpperCase()]),!(typeof I=="number"&&I>=0&&I<=d.levels.SILENT))throw"log.setLevel() called with invalid level: "+I;if(f=I,L!==!1&&function(N){var j=(i[N]||"silent").toUpperCase();if(typeof window!==e&&h){try{return void(window.localStorage[h]=j)}catch{}try{window.document.cookie=encodeURIComponent(h)+"="+j+";"}catch{}}}(I),p.call(d,I,z),typeof console===e&&I<d.levels.SILENT)return"No console available for logging"},d.setDefaultLevel=function(I){S=I,g()||d.setLevel(I,!1)},d.resetLevel=function(){d.setLevel(S,!1),function(){if(typeof window!==e&&h){try{return void window.localStorage.removeItem(h)}catch{}try{window.document.cookie=encodeURIComponent(h)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}()},d.enableAll=function(I){d.setLevel(d.levels.TRACE,I)},d.disableAll=function(I){d.setLevel(d.levels.SILENT,I)};var P=g();P==null&&(P=S),d.setLevel(P,!1)}var E=new C,A={};E.getLogger=function(z){if(typeof z!="symbol"&&typeof z!="string"||z==="")throw new TypeError("You must supply a name when creating a logger.");var S=A[z];return S||(S=A[z]=new C(z,E.getLevel(),E.methodFactory)),S};var D=typeof window!==e?window.log:void 0;return E.noConflict=function(){return typeof window!==e&&window.log===E&&(window.log=D),E},E.getLoggers=function(){return A},E.default=E,E},(Xn=Jt).exports?Xn.exports=$e():Vn.log=$e();let Kn=!1;const B={Config:SysConfig,EventBus:Mt,DefaultProxyClient:null,Axios:Wr,Logger:t=>{Kn||(import.meta.env.DEV||SysConfig.UI.ProductLog?Jt.exports.enableAll():Jt.exports.setDefaultLevel("warn"),Kn=!0);const e=t||"default";return Jt.exports.getLogger(e)}},Yn="access_token",ut=new Xt("user",localStorage);function Et(){return ut.get(Yn)}function We(){ut.remove(Yn)}function Jn(){return Et()?.refresh}function He(t,e,n,i="json",r){const o={baseURL:B.Config.ServiceURL.DefaultWebAPI,timeout:6e4,params:t,paramsSerializer:{serialize:function(l){return Hr.stringify(l,{indices:!1,arrayFormat:"repeat"})}},headers:{"Content-Type":"application/json",Authorization:"bearer "+Et()?.token},responseType:i,cancelToken:r};if(n)for(let l in n)o.headers[l]=n[l];return B.SystemID&&(o.headers.sysid=B.SystemID,B.SystemGroup&&(o.headers.sysgroup=B.SystemGroup)),e&&(o.baseURL=e),o}function lt(t,e,n,i,r="json",o,l){const p=He(n,e,i,r,o);return l&&l>=2e4&&(p.timeout=l),B.Axios?.get(t,p).catch(function(v){Zt(v,e,t,"Get")})}function Zt(t,e,n,i="Get"){const r=`${e}${n}`;if(t&&t.response){let o=!1;const l=t.response.status;switch(l){case 400:t.message="\u9519\u8BEF\u8BF7\u6C42";break;case 401:t.message="\u672A\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55";break;case 403:t.message="\u62D2\u7EDD\u8BBF\u95EE";break;case 404:t.message="\u8BF7\u6C42\u9519\u8BEF,\u672A\u627E\u5230\u8BE5\u8D44\u6E90";break;case 405:t.message="\u8BF7\u6C42\u65B9\u6CD5\u672A\u5141\u8BB8";break;case 408:t.message="\u8BF7\u6C42\u8D85\u65F6";break;case 500:const v=t.response.data;if(v){const b=v.indexOf(":"),C=v.indexOf(`
|
|
2
|
-
`);if(
|
|
3
|
-
`),r=0;r<i.length;r++){var o=i[r],l=o.indexOf(":"),p=Ge(o.slice(0,l)).toLowerCase(),v=Ge(o.slice(l+1));n[p]===void 0?n[p]=v:(e=n[p],Object.prototype.toString.call(e)==="[object Array]"?n[p].push(v):n[p]=[n[p],v])}return n},$o=Uo;function ni(t,e,n){var i=t;return jo(e)?(n=e,typeof t=="string"&&(i={uri:t})):i=$o(e,{uri:t}),i.callback=n,i}function ht(t,e,n){return ii(e=ni(t,e,n))}function ii(t){if(t.callback===void 0)throw new Error("callback argument missing");var e=!1,n=function(f,d,h){e||(e=!0,t.callback(f,d,h))};function i(){var f=void 0;if(f=v.response?v.response:v.responseText||function(d){try{if(d.responseType==="document")return d.responseXML;var h=d.responseXML&&d.responseXML.documentElement.nodeName==="parsererror";if(d.responseType===""&&!h)return d.responseXML}catch{}return null}(v),S)try{f=JSON.parse(f)}catch{}return f}function r(f){return clearTimeout(b),f instanceof Error||(f=new Error(""+(f||"Unknown XMLHttpRequest Error"))),f.statusCode=0,n(f,u)}function o(){if(!p){var f;clearTimeout(b),f=t.useXDR&&v.status===void 0?200:v.status===1223?204:v.status;var d=u,h=null;return f!==0?(d={body:i(),statusCode:f,method:E,headers:{},url:C,rawRequest:v},v.getAllResponseHeaders&&(d.headers=Fo(v.getAllResponseHeaders()))):h=new Error("Internal XMLHttpRequest Error"),n(h,d,d.body)}}var l,p,v=t.xhr||null;v||(v=t.cors||t.useXDR?new ht.XDomainRequest:new ht.XMLHttpRequest);var b,C=v.url=t.uri||t.url,E=v.method=t.method||"GET",A=t.body||t.data,D=v.headers=t.headers||{},z=!!t.sync,S=!1,u={body:void 0,headers:{},statusCode:0,method:E,url:C,rawRequest:v};if("json"in t&&t.json!==!1&&(S=!0,D.accept||D.Accept||(D.Accept="application/json"),E!=="GET"&&E!=="HEAD"&&(D["content-type"]||D["Content-Type"]||(D["Content-Type"]="application/json"),A=JSON.stringify(t.json===!0?A:t.json))),v.onreadystatechange=function(){v.readyState===4&&setTimeout(o,0)},v.onload=o,v.onerror=r,v.onprogress=function(){},v.onabort=function(){p=!0},v.ontimeout=r,v.open(E,C,!z,t.username,t.password),z||(v.withCredentials=!!t.withCredentials),!z&&t.timeout>0&&(b=setTimeout(function(){if(!p){p=!0,v.abort("timeout");var f=new Error("XMLHttpRequest timeout");f.code="ETIMEDOUT",r(f)}},t.timeout)),v.setRequestHeader)for(l in D)D.hasOwnProperty(l)&&v.setRequestHeader(l,D[l]);else if(t.headers&&!function(f){for(var d in f)if(f.hasOwnProperty(d))return!1;return!0}(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(v.responseType=t.responseType),"beforeSend"in t&&typeof t.beforeSend=="function"&&t.beforeSend(v),v.send(A||null),v}qe.exports=ht,qe.exports.default=ht,ht.XMLHttpRequest=ei.XMLHttpRequest||function(){},ht.XDomainRequest="withCredentials"in new ht.XMLHttpRequest?ht.XMLHttpRequest:ei.XDomainRequest,function(t,e){for(var n=0;n<t.length;n++)e(t[n])}(["get","put","post","patch","head","delete"],function(t){ht[t==="delete"?"del":t]=function(e,n,i){return(n=ni(e,n,i)).method=t.toUpperCase(),ii(n)}});const Wo=[200,201,202,204,308],Ho=[408,502,503,504];class ri{endpoint;file;headers;method;chunkSize;attempts;delayBeforeAttempt;md5;chunk;chunkCount;chunkByteSize;maxFileBytes;endpointValue;totalChunks;attemptCount;offline;paused;success;currentXhr;reader;eventTarget;fileName;constructor(e){this.endpoint=e.endpoint,this.file=e.file,this.fileName=encodeURI(this.file.name),this.headers=e.headers||{},this.method=e.method||"PUT",this.chunkSize=e.chunkSize||5120,this.attempts=e.attempts||5,this.delayBeforeAttempt=e.delayBeforeAttempt||1,this.md5=e.md5||"",this.maxFileBytes=1024*(e.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=Fe(),this.validateOptions(),this.getEndpoint().then(()=>this.sendChunks()),typeof window<"u"&&(window.addEventListener("online",()=>{!this.offline||(this.offline=!1,this.dispatch("online"),this.sendChunks())}),window.addEventListener("offline",()=>{this.offline=!0,this.dispatch("offline")}))}on(e,n){this.eventTarget.on(e,n)}abort(){this.pause(),this.currentXhr?.abort()}pause(){this.paused=!0}resume(){this.paused&&(this.paused=!1,this.sendChunks())}dispatch(e,n){this.eventTarget.emit(e,n)}validateOptions(){if(!this.endpoint||typeof this.endpoint!="function"&&typeof this.endpoint!="string")throw new TypeError("endpoint\u5FC5\u987B\u4E3A\uFF1A\u6587\u4EF6\u4E0A\u4F20URL\u5B57\u7B26\u4E32\uFF0C\u6216\u8FD4\u56DE\u5730\u5740\u7684\u51FD\u6570\uFF01");if(!(this.file instanceof File))throw new TypeError("file\u5FC5\u987B\u4E3A\u6587\u4EF6\u5BF9\u8C61");if(this.headers&&typeof this.headers!="object")throw new TypeError("\u6587\u4EF6\u5934\u5FC5\u987B\u4E3A\u5BF9\u8C61\u6216\u7A7A\uFF01");if(this.chunkSize&&(typeof this.chunkSize!="number"||this.chunkSize<=0||this.chunkSize%256!=0))throw new TypeError("chunkSize\u5FC5\u987B\u5927\u4E8E0,\u5E76\u662F256\u7684\u6574\u6570\u500D");if(this.maxFileBytes>0&&this.maxFileBytes<this.file.size)throw new Error(`\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u6700\u5927\u5141\u8BB8\u503C\uFF1A(${this.file.size} > ${this.maxFileBytes})`);if(this.attempts&&(typeof this.attempts!="number"||this.attempts<=0))throw new TypeError("\u91CD\u8BD5\u6B21\u6570\u5FC5\u987B\u4E3A\u6B63\u6570\uFF01");if(this.delayBeforeAttempt&&(typeof this.delayBeforeAttempt!="number"||this.delayBeforeAttempt<0))throw new TypeError("\u5EF6\u65F6\u91CD\u8BD5\u65F6\u95F4\u5FC5\u987B\u4E3A\u6B63\u6570\uFF01\u9ED8\u8BA4\u4E3A1")}getEndpoint(){return typeof this.endpoint=="string"?(this.endpointValue=this.endpoint,Promise.resolve(this.endpoint)):this.endpoint(this.file).then(e=>(this.endpointValue=e,this.endpointValue))}getChunk(){return new Promise(e=>{const n=this.totalChunks===1?this.file.size:this.chunkByteSize,i=n*this.chunkCount;this.reader.onload=()=>{this.reader.result!==null&&(this.chunk=new Blob([this.reader.result],{type:"application/octet-stream"})),e(()=>{})},this.reader.readAsArrayBuffer(this.file.slice(i,i+n))})}xhrPromise(e){const n=i=>{i.upload.onprogress=r=>{const o=100/this.totalChunks,l=o*this.file.size,p=o*this.chunkCount,v=r.loaded/(r.total??l)*o;this.dispatch("progress",Math.min(p+v,100))}};return new Promise((i,r)=>{this.currentXhr=qe.exports({...e,beforeSend:n},(o,l)=>(this.currentXhr=void 0,o?r(o):i(l)))})}sendChunk(){if(!this.chunk)return;const e=this.chunkCount*this.chunkByteSize,n=e+this.chunk.size-1,i={...this.headers,FileName:this.fileName,FileMD5:this.md5,"Content-Type":this.file.type,"Content-Range":`bytes ${e}-${n}/${this.file.size}`};if(this.dispatch("attempt",{chunkNumber:this.chunkCount,chunkSize:this.chunk.size}),this.endpointValue)return this.xhrPromise({headers:i,url:this.endpointValue,method:this.method,body:this.chunk});console.warn("\u6587\u4EF6\u4E0A\u4F20endpointValue\u4E0D\u80FD\u4E3A\u7A7A\uFF01"),this.dispatch("error",{message:"\u6587\u4EF6\u4E0A\u4F20endpointValue\u4E0D\u80FD\u4E3A\u7A7A\uFF01\u53D6\u6D88\u4E0A\u4F20\uFF01",chunk:this.chunkCount,attempts:this.attemptCount})}manageRetries(){if(this.attemptCount<this.attempts)return setTimeout(()=>this.sendChunks(),1e3*this.delayBeforeAttempt),void this.dispatch("attemptFailure",{message:`\u4E0A\u4F20\u5206\u7247\uFF1A${this.chunkCount}\u5931\u8D25\u3002\u8FD8\u4F1A\u518D\u5C1D\u8BD5 ${this.attempts-this.attemptCount}\u6B21\uFF01`,chunkNumber:this.chunkCount,attemptsLeft:this.attempts-this.attemptCount});this.dispatch("error",{message:`\u4E0A\u4F20\u5206\u7247\u9519\u8BEF\uFF1A ${this.chunkCount}\u3002\u505C\u6B62\u5C1D\u8BD5\uFF0C\u53D6\u6D88\u4E0A\u4F20\uFF01`,chunk:this.chunkCount,attempts:this.attemptCount})}sendChunks(){console.log(this.paused,this.offline,this.success,"sendChunks this.paused || this.offline || this.success"),!(this.paused||this.offline||this.success)&&this.getChunk().then(()=>this.sendChunk()).then(e=>{if(this.attemptCount=this.attemptCount+1,e!=null&&Wo.includes(e.statusCode)){this.dispatch("chunkSuccess",{chunk:this.chunkCount,attempts:this.attemptCount,response:e}),this.attemptCount=0,this.chunkCount=this.chunkCount+1,this.chunkCount<this.totalChunks?this.sendChunks():(this.success=!0,this.dispatch("success"));const n=this.chunkCount/this.totalChunks*this.file.size*100/this.file.size;this.dispatch("progress",n)}else if(e!=null&&Ho.includes(e.statusCode)){if(this.paused||this.offline)return;this.manageRetries()}else{if(this.paused||this.offline)return;console.log(`\u670D\u52A1\u5668\u9519\u8BEF:${e?.statusCode}\uFF0C\u505C\u6B62\u4E0A\u4F20\u3002`),this.dispatch("error",{message:`\u670D\u52A1\u5668\u9519\u8BEF:${e?.statusCode}\uFF0C\u505C\u6B62\u4E0A\u4F20\u3002`,chunkNumber:this.chunkCount,attempts:this.attemptCount})}}).catch(e=>{this.paused||this.offline||this.manageRetries()})}}const qo=t=>new ri(t),Go=new class{hasClass(t,e){return t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))}addClass(t,e){this.hasClass(t,e)||(t.className+=" "+e)}removeClass(t,e){if(this.hasClass(t,e)){const n=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className=t.className.replace(n," ")}}toggleClass(t,e){this.hasClass(t,e)?this.removeClass(t,e):this.addClass(t,e)}setCSSProperty(t,e,n){t?.style.setProperty(e,n)}};class Ot{hproseURL;client;hproseProxy;static httpTransport;constructor(e){if(e&&!Gt.isNullOrEmpty(e)){if(Ot.httpTransport||(Ot.httpTransport=new Gr),this.client=new qr(e),!this.client)throw Error("Hprose Client\u521D\u59CB\u5316\u9519\u8BEF");this.hproseURL=e,this.init()}}init(){this.client&&this.client.useServiceAsync().then(e=>{this.hproseProxy=e}).catch(e=>{String(e).indexOf("find this method ~")>0?(this.hproseProxy=this.client?.useService(),console.warn("\u65E7\u7248\u672C\u4E0D\u652F\u6301useServiceAsync")):Mt.emit(nt.HproseServiceErrorEvent,"\u521D\u59CB\u5316\u9ED8\u8BA4Hprose!"),console.warn(e)})}async getProxy(){if(!this.hproseProxy)try{this.client&&(this.hproseProxy=await this.client.useServiceAsync())}catch(e){console.warn(e),this.hproseProxy=this.client?.useService()}return this.hproseProxy}async invoke(e,n,i){if(this.client)return await this.client.invoke(e,n,i)}encode(e,n,i){if(this.client)return this.client.codec.encode(e,n,i)}decode(e,n){if(this.client)return this.client.codec.decode(e,n)}}class Tt{hproseClient;hpProxyObj;defaultContext=new _e;constructor(e){this.hproseClient=new Ot(e),this.hpProxyObj=null}getClientContext(e,n){const i={};n&&(i.requestHeaders=n);const r=Et();i.httpRequestHeaders=e||{};const o=i.httpRequestHeaders;return r&&(o.token=r.token),B.SystemID&&(o.sysid=B.SystemID,B.SystemGroup&&(o.sysgroup=B.SystemGroup)),new _e(i)}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 e=await this.hproseClient.getProxy();this.hpProxyObj=e}return this.hpProxyObj||Mt.emit(nt.HproseServiceErrorEvent,"HproseProxy\u5BF9\u8C61\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5\uFF01"),this.hpProxyObj}async hproseInvoke(e,n,i){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");return await this.hproseClient.invoke(e,n,i)}async hproseInvokeContext(e,n,...i){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");const r=Et();return console.log(r,"userToken3"),r&&(n||(n=new _e({httpRequestHeaders:{token:r.token}}))),await this.hproseClient.invoke(e,i,n)}async hproseInvokeEncode(e){const n=new Fn(e).toBytes(),i=await this.hproseClient.client?.request(n,this.defaultContext);return i&&this.hproseClient.client?.codec.decode(i,this.defaultContext)}encodeRequest(e,...n){const i=this.hproseClient.client?.codec?.encode(e,n,this.defaultContext);return Fn.toString(i)}}class Xo{message;eventBus;constructor(e,n){e&&(this.message=e),n&&(this.eventBus=n)}msg(e,n=3,i="success"){if(this.message)if(typeof this.message=="function")this.message({type:i,message:e,duration:n});else switch(i){case"info":this.message.info(e,n);break;case"success":this.message.success(e,n);break;case"warning":this.message.warn?this.message.warn(e,n):this.message.warning&&this.message.warning(e,n);break;case"error":this.message.error(e,n)}else{switch(i){case"info":case"success":console.log(e);break;case"warning":console.warn(e);break;case"error":i="dark",console.error(e)}this.eventBus&&this.eventBus.emit(nt.AlertInfoEvent,{type:i,info:e})}}info(e,n=3){this.msg(e,n,"info")}warn(e,n=3){this.msg(e,n,"warning")}err(e,n=3){this.msg(e,n,"error")}success(e,n=3){this.msg(e,n,"success")}}const Xe=new Map,Vo=function(t,e,n){!B.Config.DefaultHproseAPI&&B.Config.ServiceURL&&(B.Config.DefaultHproseAPI=B.Config.ServiceURL.DefaultHproseAPI),B.Config.DefaultHproseAPI&&Gt.isNotEmpty(B.Config.DefaultHproseAPI)&&(B.DefaultProxyClient=new Tt(B.Config.DefaultHproseAPI));const i=B.Config.UI.GrayMode;i&&rt.setGrayMode(i);const r=new Xo(t,B.EventBus);B.Message=r,B.SystemID=e,B.SystemGroup=n,B.EventBus.on(nt.HproseServiceErrorEvent,o=>{const l=`\u5F53\u524D\u540E\u53F0\u4E1A\u52A1\u670D\u52A1\u4E0D\u53EF\u7528!${o}`;console.warn("Hprose\u8BF7\u6C42\u9519\u8BEF",l)}),B.EventBus.on(nt.WebAPIErrorEvent,o=>{const l=`WebAPI\u540E\u53F0\u670D\u52A1\u4E0D\u53EF\u7528!${o}`;console.warn("WebAPI\u8BF7\u6C42\u9519\u8BEF",l)}),B.EventBus.on(nt.AxiosRequestErrorEvent,o=>{const l=`Http\u8BF7\u6C42'${o.code}'\u9519\u8BEF: ${o.message}`;console.warn("Http\u8BF7\u6C42\u9519\u8BEF",l)}),B.EventBus.on(nt.CommonWarnEvent,o=>{r.warn(o)})};function oi(t){if(t&&Gt.isNotEmpty(t)){if(Xe.has(t))return Xe.get(t);{const e=new Tt(t);return Xe.set(t,e),e}}}function Ko(t){const e=oi(t);return e&&(B.DefaultProxyClient=e),e}const Ve="is_LockScreen",si=ut.get(Ve,!1),Dt={isLock:si,lockTime:si=="true"?ci():0};function ai(t){Dt.isLock=t,ut.set(Ve,t,10),t&&(We(),console.log("\u9501\u5C4F\u4E86\u2026\u2026"))}function Yo(){return ut.get(Ve,!1)}function ci(){let t=3600;return B.Config.UI?.LockTime&&B.Config.UI?.LockTime>=10&&(t=B.Config.UI.LockTime),t}let Ke;function Ye(){clearInterval(Ke),!(window.location.href.indexOf("/login")>0||Dt.isLock)&&(ai(!1),Dt.lockTime=ci(),Ke=setInterval(()=>{if(Dt.lockTime--,Dt.lockTime<=0)return ai(!0),clearInterval(Ke)},1e3))}function Jo(){Ye(),document.addEventListener("mousedown",Ye)}function Zo(){document.removeEventListener("mousedown",Ye)}function Je(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 Qo={exports:{}},Qt=Qo.exports=function t(e,n,i){function r(p,v){if(!n[p]){if(!e[p]){if(!v&&Je)return Je(p);if(o)return o(p,!0);var b=new Error("Cannot find module '"+p+"'");throw b.code="MODULE_NOT_FOUND",b}var C=n[p]={exports:{}};e[p][0].call(C.exports,function(E){var A=e[p][1][E];return r(A||E)},C,C.exports,t,e,n,i)}return n[p].exports}for(var o=Je,l=0;l<i.length;l++)r(i[l]);return r}({1:[function(t,e,n){(function(i){var r,o,l=i.MutationObserver||i.WebKitMutationObserver;if(l){var p=0,v=new l(A),b=i.document.createTextNode("");v.observe(b,{characterData:!0}),r=function(){b.data=p=++p%2}}else if(i.setImmediate||i.MessageChannel===void 0)r="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var z=i.document.createElement("script");z.onreadystatechange=function(){A(),z.onreadystatechange=null,z.parentNode.removeChild(z),z=null},i.document.documentElement.appendChild(z)}:function(){setTimeout(A,0)};else{var C=new i.MessageChannel;C.port1.onmessage=A,r=function(){C.port2.postMessage(0)}}var E=[];function A(){var z,S;o=!0;for(var u=E.length;u;){for(S=E,E=[],z=-1;++z<u;)S[z]();u=E.length}o=!1}function D(z){E.push(z)!==1||o||r()}e.exports=D}).call(this,xt!==void 0?xt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(t,e,n){var i=t(1);function r(){}var o={},l=["REJECTED"],p=["FULFILLED"],v=["PENDING"];function b(h){if(typeof h!="function")throw new TypeError("resolver must be a function");this.state=v,this.queue=[],this.outcome=void 0,h!==r&&D(this,h)}function C(h,g,P){this.promise=h,typeof g=="function"&&(this.onFulfilled=g,this.callFulfilled=this.otherCallFulfilled),typeof P=="function"&&(this.onRejected=P,this.callRejected=this.otherCallRejected)}function E(h,g,P){i(function(){var I;try{I=g(P)}catch(L){return o.reject(h,L)}I===h?o.reject(h,new TypeError("Cannot resolve promise with itself")):o.resolve(h,I)})}function A(h){var g=h&&h.then;if(h&&(typeof h=="object"||typeof h=="function")&&typeof g=="function")return function(){g.apply(h,arguments)}}function D(h,g){var P=!1;function I(O){P||(P=!0,o.reject(h,O))}function L(O){P||(P=!0,o.resolve(h,O))}function N(){g(L,I)}var j=z(N);j.status==="error"&&I(j.value)}function z(h,g){var P={};try{P.value=h(g),P.status="success"}catch(I){P.status="error",P.value=I}return P}function S(h){return h instanceof this?h:o.resolve(new this(r),h)}function u(h){var g=new this(r);return o.reject(g,h)}function f(h){var g=this;if(Object.prototype.toString.call(h)!=="[object Array]")return this.reject(new TypeError("must be an array"));var P=h.length,I=!1;if(!P)return this.resolve([]);for(var L=new Array(P),N=0,j=-1,O=new this(r);++j<P;)W(h[j],j);return O;function W(et,X){function K(q){L[X]=q,++N!==P||I||(I=!0,o.resolve(O,L))}g.resolve(et).then(K,function(q){I||(I=!0,o.reject(O,q))})}}function d(h){var g=this;if(Object.prototype.toString.call(h)!=="[object Array]")return this.reject(new TypeError("must be an array"));var P=h.length,I=!1;if(!P)return this.resolve([]);for(var L=-1,N=new this(r);++L<P;)j(h[L]);return N;function j(O){g.resolve(O).then(function(W){I||(I=!0,o.resolve(N,W))},function(W){I||(I=!0,o.reject(N,W))})}}e.exports=b,b.prototype.catch=function(h){return this.then(null,h)},b.prototype.then=function(h,g){if(typeof h!="function"&&this.state===p||typeof g!="function"&&this.state===l)return this;var P=new this.constructor(r);return this.state!==v?E(P,this.state===p?h:g,this.outcome):this.queue.push(new C(P,h,g)),P},C.prototype.callFulfilled=function(h){o.resolve(this.promise,h)},C.prototype.otherCallFulfilled=function(h){E(this.promise,this.onFulfilled,h)},C.prototype.callRejected=function(h){o.reject(this.promise,h)},C.prototype.otherCallRejected=function(h){E(this.promise,this.onRejected,h)},o.resolve=function(h,g){var P=z(A,g);if(P.status==="error")return o.reject(h,P.value);var I=P.value;if(I)D(h,I);else{h.state=p,h.outcome=g;for(var L=-1,N=h.queue.length;++L<N;)h.queue[L].callFulfilled(g)}return h},o.reject=function(h,g){h.state=l,h.outcome=g;for(var P=-1,I=h.queue.length;++P<I;)h.queue[P].callRejected(g);return h},b.resolve=S,b.reject=u,b.all=f,b.race=d},{1:1}],3:[function(t,e,n){(function(i){typeof i.Promise!="function"&&(i.Promise=t(2))}).call(this,xt!==void 0?xt:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(t,e,n){var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s};function r(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function o(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var l=o();function p(){try{if(!l||!l.open)return!1;var s=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),a=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!s||a)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function v(s,a){s=s||[],a=a||{};try{return new Blob(s,a)}catch(m){if(m.name!=="TypeError")throw m;for(var c=new(typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder),y=0;y<s.length;y+=1)c.append(s[y]);return c.getBlob(a.type)}}typeof Promise>"u"&&t(3);var b=Promise;function C(s,a){a&&s.then(function(c){a(null,c)},function(c){a(c)})}function E(s,a,c){typeof a=="function"&&s.then(a),typeof c=="function"&&s.catch(c)}function A(s){return typeof s!="string"&&(console.warn(s+" used as a key, but it is not a string."),s=String(s)),s}function D(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var z="local-forage-detect-blob-support",S=void 0,u={},f=Object.prototype.toString,d="readonly",h="readwrite";function g(s){for(var a=s.length,c=new ArrayBuffer(a),y=new Uint8Array(c),m=0;m<a;m++)y[m]=s.charCodeAt(m);return c}function P(s){return new b(function(a){var c=s.transaction(z,h),y=v([""]);c.objectStore(z).put(y,"key"),c.onabort=function(m){m.preventDefault(),m.stopPropagation(),a(!1)},c.oncomplete=function(){var m=navigator.userAgent.match(/Chrome\/(\d+)/),w=navigator.userAgent.match(/Edge\//);a(w||!m||parseInt(m[1],10)>=43)}}).catch(function(){return!1})}function I(s){return typeof S=="boolean"?b.resolve(S):P(s).then(function(a){return S=a})}function L(s){var a=u[s.name],c={};c.promise=new b(function(y,m){c.resolve=y,c.reject=m}),a.deferredOperations.push(c),a.dbReady?a.dbReady=a.dbReady.then(function(){return c.promise}):a.dbReady=c.promise}function N(s){var a=u[s.name].deferredOperations.pop();if(a)return a.resolve(),a.promise}function j(s,a){var c=u[s.name].deferredOperations.pop();if(c)return c.reject(a),c.promise}function O(s,a){return new b(function(c,y){if(u[s.name]=u[s.name]||mn(),s.db){if(!a)return c(s.db);L(s),s.db.close()}var m=[s.name];a&&m.push(s.version);var w=l.open.apply(l,m);a&&(w.onupgradeneeded=function(x){var k=w.result;try{k.createObjectStore(s.storeName),x.oldVersion<=1&&k.createObjectStore(z)}catch(R){if(R.name!=="ConstraintError")throw R;console.warn('The database "'+s.name+'" has been upgraded from version '+x.oldVersion+" to version "+x.newVersion+', but the storage "'+s.storeName+'" already exists.')}}),w.onerror=function(x){x.preventDefault(),y(w.error)},w.onsuccess=function(){var x=w.result;x.onversionchange=function(k){k.target.close()},c(x),N(s)}})}function W(s){return O(s,!1)}function et(s){return O(s,!0)}function X(s,a){if(!s.db)return!0;var c=!s.db.objectStoreNames.contains(s.storeName),y=s.version<s.db.version,m=s.version>s.db.version;if(y&&(s.version!==a&&console.warn('The database "'+s.name+`" can't be downgraded from version `+s.db.version+" to version "+s.version+"."),s.version=s.db.version),m||c){if(c){var w=s.db.version+1;w>s.version&&(s.version=w)}return!0}return!1}function K(s){return new b(function(a,c){var y=new FileReader;y.onerror=c,y.onloadend=function(m){var w=btoa(m.target.result||"");a({__local_forage_encoded_blob:!0,data:w,type:s.type})},y.readAsBinaryString(s)})}function q(s){return v([g(atob(s.data))],{type:s.type})}function st(s){return s&&s.__local_forage_encoded_blob}function jt(s){var a=this,c=a._initReady().then(function(){var y=u[a._dbInfo.name];if(y&&y.dbReady)return y.dbReady});return E(c,s,s),c}function ye(s){L(s);for(var a=u[s.name],c=a.forages,y=0;y<c.length;y++){var m=c[y];m._dbInfo.db&&(m._dbInfo.db.close(),m._dbInfo.db=null)}return s.db=null,W(s).then(function(w){return s.db=w,X(s)?et(s):w}).then(function(w){s.db=a.db=w;for(var x=0;x<c.length;x++)c[x]._dbInfo.db=w}).catch(function(w){throw j(s,w),w})}function ot(s,a,c,y){y===void 0&&(y=1);try{var m=s.db.transaction(s.storeName,a);c(null,m)}catch(w){if(y>0&&(!s.db||w.name==="InvalidStateError"||w.name==="NotFoundError"))return b.resolve().then(function(){if(!s.db||w.name==="NotFoundError"&&!s.db.objectStoreNames.contains(s.storeName)&&s.version<=s.db.version)return s.db&&(s.version=s.db.version+1),et(s)}).then(function(){return ye(s).then(function(){ot(s,a,c,y-1)})}).catch(c);c(w)}}function mn(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Ni(s){var a=this,c={db:null};if(s)for(var y in s)c[y]=s[y];var m=u[c.name];m||(m=mn(),u[c.name]=m),m.forages.push(a),a._initReady||(a._initReady=a.ready,a.ready=jt);var w=[];function x(){return b.resolve()}for(var k=0;k<m.forages.length;k++){var R=m.forages[k];R!==a&&w.push(R._initReady().catch(x))}var M=m.forages.slice(0);return b.all(w).then(function(){return c.db=m.db,W(c)}).then(function(_){return c.db=_,X(c,a._defaultConfig.version)?et(c):_}).then(function(_){c.db=m.db=_,a._dbInfo=c;for(var T=0;T<M.length;T++){var U=M[T];U!==a&&(U._dbInfo.db=c.db,U._dbInfo.version=c.version)}})}function Ui(s,a){var c=this;s=A(s);var y=new b(function(m,w){c.ready().then(function(){ot(c._dbInfo,d,function(x,k){if(x)return w(x);try{var R=k.objectStore(c._dbInfo.storeName).get(s);R.onsuccess=function(){var M=R.result;M===void 0&&(M=null),st(M)&&(M=q(M)),m(M)},R.onerror=function(){w(R.error)}}catch(M){w(M)}})}).catch(w)});return C(y,a),y}function Oi(s,a){var c=this,y=new b(function(m,w){c.ready().then(function(){ot(c._dbInfo,d,function(x,k){if(x)return w(x);try{var R=k.objectStore(c._dbInfo.storeName).openCursor(),M=1;R.onsuccess=function(){var _=R.result;if(_){var T=_.value;st(T)&&(T=q(T));var U=s(T,_.key,M++);U!==void 0?m(U):_.continue()}else m()},R.onerror=function(){w(R.error)}}catch(_){w(_)}})}).catch(w)});return C(y,a),y}function ji(s,a,c){var y=this;s=A(s);var m=new b(function(w,x){var k;y.ready().then(function(){return k=y._dbInfo,f.call(a)==="[object Blob]"?I(k.db).then(function(R){return R?a:K(a)}):a}).then(function(R){ot(y._dbInfo,h,function(M,_){if(M)return x(M);try{var T=_.objectStore(y._dbInfo.storeName);R===null&&(R=void 0);var U=T.put(R,s);_.oncomplete=function(){R===void 0&&(R=null),w(R)},_.onabort=_.onerror=function(){var F=U.error?U.error:U.transaction.error;x(F)}}catch(F){x(F)}})}).catch(x)});return C(m,c),m}function Fi(s,a){var c=this;s=A(s);var y=new b(function(m,w){c.ready().then(function(){ot(c._dbInfo,h,function(x,k){if(x)return w(x);try{var R=k.objectStore(c._dbInfo.storeName).delete(s);k.oncomplete=function(){m()},k.onerror=function(){w(R.error)},k.onabort=function(){var M=R.error?R.error:R.transaction.error;w(M)}}catch(M){w(M)}})}).catch(w)});return C(y,a),y}function $i(s){var a=this,c=new b(function(y,m){a.ready().then(function(){ot(a._dbInfo,h,function(w,x){if(w)return m(w);try{var k=x.objectStore(a._dbInfo.storeName).clear();x.oncomplete=function(){y()},x.onabort=x.onerror=function(){var R=k.error?k.error:k.transaction.error;m(R)}}catch(R){m(R)}})}).catch(m)});return C(c,s),c}function Wi(s){var a=this,c=new b(function(y,m){a.ready().then(function(){ot(a._dbInfo,d,function(w,x){if(w)return m(w);try{var k=x.objectStore(a._dbInfo.storeName).count();k.onsuccess=function(){y(k.result)},k.onerror=function(){m(k.error)}}catch(R){m(R)}})}).catch(m)});return C(c,s),c}function Hi(s,a){var c=this,y=new b(function(m,w){s<0?m(null):c.ready().then(function(){ot(c._dbInfo,d,function(x,k){if(x)return w(x);try{var R=k.objectStore(c._dbInfo.storeName),M=!1,_=R.openKeyCursor();_.onsuccess=function(){var T=_.result;T?s===0||M?m(T.key):(M=!0,T.advance(s)):m(null)},_.onerror=function(){w(_.error)}}catch(T){w(T)}})}).catch(w)});return C(y,a),y}function qi(s){var a=this,c=new b(function(y,m){a.ready().then(function(){ot(a._dbInfo,d,function(w,x){if(w)return m(w);try{var k=x.objectStore(a._dbInfo.storeName).openKeyCursor(),R=[];k.onsuccess=function(){var M=k.result;M?(R.push(M.key),M.continue()):y(R)},k.onerror=function(){m(k.error)}}catch(M){m(M)}})}).catch(m)});return C(c,s),c}function Gi(s,a){a=D.apply(this,arguments);var c=this.config();(s=typeof s!="function"&&s||{}).name||(s.name=s.name||c.name,s.storeName=s.storeName||c.storeName);var y,m=this;if(s.name){var w=s.name===c.name&&m._dbInfo.db?b.resolve(m._dbInfo.db):W(s).then(function(x){var k=u[s.name],R=k.forages;k.db=x;for(var M=0;M<R.length;M++)R[M]._dbInfo.db=x;return x});y=s.storeName?w.then(function(x){if(x.objectStoreNames.contains(s.storeName)){var k=x.version+1;L(s);var R=u[s.name],M=R.forages;x.close();for(var _=0;_<M.length;_++){var T=M[_];T._dbInfo.db=null,T._dbInfo.version=k}var U=new b(function(F,$){var G=l.open(s.name,k);G.onerror=function(at){G.result.close(),$(at)},G.onupgradeneeded=function(){G.result.deleteObjectStore(s.storeName)},G.onsuccess=function(){var at=G.result;at.close(),F(at)}});return U.then(function(F){R.db=F;for(var $=0;$<M.length;$++){var G=M[$];G._dbInfo.db=F,N(G._dbInfo)}}).catch(function(F){throw(j(s,F)||b.resolve()).catch(function(){}),F})}}):w.then(function(x){L(s);var k=u[s.name],R=k.forages;x.close();for(var M=0;M<R.length;M++)R[M]._dbInfo.db=null;var _=new b(function(T,U){var F=l.deleteDatabase(s.name);F.onerror=function(){var $=F.result;$&&$.close(),U(F.error)},F.onblocked=function(){console.warn('dropInstance blocked for database "'+s.name+'" until all open connections are closed')},F.onsuccess=function(){var $=F.result;$&&$.close(),T($)}});return _.then(function(T){k.db=T;for(var U=0;U<R.length;U++)N(R[U]._dbInfo)}).catch(function(T){throw(j(s,T)||b.resolve()).catch(function(){}),T})})}else y=b.reject("Invalid arguments");return C(y,a),y}var Xi={_driver:"asyncStorage",_initStorage:Ni,_support:p(),iterate:Oi,getItem:Ui,setItem:ji,removeItem:Fi,clear:$i,length:Wi,key:Hi,keys:qi,dropInstance:Gi};function Vi(){return typeof openDatabase=="function"}var dt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ki="~~local_forage_type~",gn=/^~~local_forage_type~([^~]+)~/,Ft="__lfsc__:",we=Ft.length,be="arbf",Se="blob",vn="si08",yn="ui08",wn="uic8",bn="si16",Sn="si32",xn="ur16",Cn="ui32",En="fl32",kn="fl64",zn=we+be.length,In=Object.prototype.toString;function Rn(s){var a,c,y,m,w,x=.75*s.length,k=s.length,R=0;s[s.length-1]==="="&&(x--,s[s.length-2]==="="&&x--);var M=new ArrayBuffer(x),_=new Uint8Array(M);for(a=0;a<k;a+=4)c=dt.indexOf(s[a]),y=dt.indexOf(s[a+1]),m=dt.indexOf(s[a+2]),w=dt.indexOf(s[a+3]),_[R++]=c<<2|y>>4,_[R++]=(15&y)<<4|m>>2,_[R++]=(3&m)<<6|63&w;return M}function xe(s){var a,c=new Uint8Array(s),y="";for(a=0;a<c.length;a+=3)y+=dt[c[a]>>2],y+=dt[(3&c[a])<<4|c[a+1]>>4],y+=dt[(15&c[a+1])<<2|c[a+2]>>6],y+=dt[63&c[a+2]];return c.length%3==2?y=y.substring(0,y.length-1)+"=":c.length%3==1&&(y=y.substring(0,y.length-2)+"=="),y}function Yi(s,a){var c="";if(s&&(c=In.call(s)),s&&(c==="[object ArrayBuffer]"||s.buffer&&In.call(s.buffer)==="[object ArrayBuffer]")){var y,m=Ft;s instanceof ArrayBuffer?(y=s,m+=be):(y=s.buffer,c==="[object Int8Array]"?m+=vn:c==="[object Uint8Array]"?m+=yn:c==="[object Uint8ClampedArray]"?m+=wn:c==="[object Int16Array]"?m+=bn:c==="[object Uint16Array]"?m+=xn:c==="[object Int32Array]"?m+=Sn:c==="[object Uint32Array]"?m+=Cn:c==="[object Float32Array]"?m+=En:c==="[object Float64Array]"?m+=kn:a(new Error("Failed to get type for BinaryArray"))),a(m+xe(y))}else if(c==="[object Blob]"){var w=new FileReader;w.onload=function(){var x=Ki+s.type+"~"+xe(this.result);a(Ft+Se+x)},w.readAsArrayBuffer(s)}else try{a(JSON.stringify(s))}catch(x){console.error("Couldn't convert value into a JSON string: ",s),a(null,x)}}function Ji(s){if(s.substring(0,we)!==Ft)return JSON.parse(s);var a,c=s.substring(zn),y=s.substring(we,zn);if(y===Se&&gn.test(c)){var m=c.match(gn);a=m[1],c=c.substring(m[0].length)}var w=Rn(c);switch(y){case be:return w;case Se:return v([w],{type:a});case vn:return new Int8Array(w);case yn:return new Uint8Array(w);case wn:return new Uint8ClampedArray(w);case bn:return new Int16Array(w);case xn:return new Uint16Array(w);case Sn:return new Int32Array(w);case Cn:return new Uint32Array(w);case En:return new Float32Array(w);case kn:return new Float64Array(w);default:throw new Error("Unkown type: "+y)}}var Ce={serialize:Yi,deserialize:Ji,stringToBuffer:Rn,bufferToString:xe};function Mn(s,a,c,y){s.executeSql("CREATE TABLE IF NOT EXISTS "+a.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],c,y)}function Zi(s){var a=this,c={db:null};if(s)for(var y in s)c[y]=typeof s[y]!="string"?s[y].toString():s[y];var m=new b(function(w,x){try{c.db=openDatabase(c.name,String(c.version),c.description,c.size)}catch(k){return x(k)}c.db.transaction(function(k){Mn(k,c,function(){a._dbInfo=c,w()},function(R,M){x(M)})},x)});return c.serializer=Ce,m}function ft(s,a,c,y,m,w){s.executeSql(c,y,m,function(x,k){k.code===k.SYNTAX_ERR?x.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[a.storeName],function(R,M){M.rows.length?w(R,k):Mn(R,a,function(){R.executeSql(c,y,m,w)},w)},w):w(x,k)},w)}function Qi(s,a){var c=this;s=A(s);var y=new b(function(m,w){c.ready().then(function(){var x=c._dbInfo;x.db.transaction(function(k){ft(k,x,"SELECT * FROM "+x.storeName+" WHERE key = ? LIMIT 1",[s],function(R,M){var _=M.rows.length?M.rows.item(0).value:null;_&&(_=x.serializer.deserialize(_)),m(_)},function(R,M){w(M)})})}).catch(w)});return C(y,a),y}function tr(s,a){var c=this,y=new b(function(m,w){c.ready().then(function(){var x=c._dbInfo;x.db.transaction(function(k){ft(k,x,"SELECT * FROM "+x.storeName,[],function(R,M){for(var _=M.rows,T=_.length,U=0;U<T;U++){var F=_.item(U),$=F.value;if($&&($=x.serializer.deserialize($)),($=s($,F.key,U+1))!==void 0)return void m($)}m()},function(R,M){w(M)})})}).catch(w)});return C(y,a),y}function _n(s,a,c,y){var m=this;s=A(s);var w=new b(function(x,k){m.ready().then(function(){a===void 0&&(a=null);var R=a,M=m._dbInfo;M.serializer.serialize(a,function(_,T){T?k(T):M.db.transaction(function(U){ft(U,M,"INSERT OR REPLACE INTO "+M.storeName+" (key, value) VALUES (?, ?)",[s,_],function(){x(R)},function(F,$){k($)})},function(U){if(U.code===U.QUOTA_ERR){if(y>0)return void x(_n.apply(m,[s,R,c,y-1]));k(U)}})})}).catch(k)});return C(w,c),w}function er(s,a,c){return _n.apply(this,[s,a,c,1])}function nr(s,a){var c=this;s=A(s);var y=new b(function(m,w){c.ready().then(function(){var x=c._dbInfo;x.db.transaction(function(k){ft(k,x,"DELETE FROM "+x.storeName+" WHERE key = ?",[s],function(){m()},function(R,M){w(M)})})}).catch(w)});return C(y,a),y}function ir(s){var a=this,c=new b(function(y,m){a.ready().then(function(){var w=a._dbInfo;w.db.transaction(function(x){ft(x,w,"DELETE FROM "+w.storeName,[],function(){y()},function(k,R){m(R)})})}).catch(m)});return C(c,s),c}function rr(s){var a=this,c=new b(function(y,m){a.ready().then(function(){var w=a._dbInfo;w.db.transaction(function(x){ft(x,w,"SELECT COUNT(key) as c FROM "+w.storeName,[],function(k,R){var M=R.rows.item(0).c;y(M)},function(k,R){m(R)})})}).catch(m)});return C(c,s),c}function or(s,a){var c=this,y=new b(function(m,w){c.ready().then(function(){var x=c._dbInfo;x.db.transaction(function(k){ft(k,x,"SELECT key FROM "+x.storeName+" WHERE id = ? LIMIT 1",[s+1],function(R,M){var _=M.rows.length?M.rows.item(0).key:null;m(_)},function(R,M){w(M)})})}).catch(w)});return C(y,a),y}function sr(s){var a=this,c=new b(function(y,m){a.ready().then(function(){var w=a._dbInfo;w.db.transaction(function(x){ft(x,w,"SELECT key FROM "+w.storeName,[],function(k,R){for(var M=[],_=0;_<R.rows.length;_++)M.push(R.rows.item(_).key);y(M)},function(k,R){m(R)})})}).catch(m)});return C(c,s),c}function ar(s){return new b(function(a,c){s.transaction(function(y){y.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(m,w){for(var x=[],k=0;k<w.rows.length;k++)x.push(w.rows.item(k).name);a({db:s,storeNames:x})},function(m,w){c(w)})},function(y){c(y)})})}function cr(s,a){a=D.apply(this,arguments);var c=this.config();(s=typeof s!="function"&&s||{}).name||(s.name=s.name||c.name,s.storeName=s.storeName||c.storeName);var y,m=this;return y=s.name?new b(function(w){var x;x=s.name===c.name?m._dbInfo.db:openDatabase(s.name,"","",0),s.storeName?w({db:x,storeNames:[s.storeName]}):w(ar(x))}).then(function(w){return new b(function(x,k){w.db.transaction(function(R){function M(F){return new b(function($,G){R.executeSql("DROP TABLE IF EXISTS "+F,[],function(){$()},function(at,ze){G(ze)})})}for(var _=[],T=0,U=w.storeNames.length;T<U;T++)_.push(M(w.storeNames[T]));b.all(_).then(function(){x()}).catch(function(F){k(F)})},function(R){k(R)})})}):b.reject("Invalid arguments"),C(y,a),y}var ur={_driver:"webSQLStorage",_initStorage:Zi,_support:Vi(),iterate:tr,getItem:Qi,setItem:er,removeItem:nr,clear:ir,length:rr,key:or,keys:sr,dropInstance:cr};function lr(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function Ln(s,a){var c=s.name+"/";return s.storeName!==a.storeName&&(c+=s.storeName+"/"),c}function hr(){var s="_localforage_support_test";try{return localStorage.setItem(s,!0),localStorage.removeItem(s),!1}catch{return!0}}function dr(){return!hr()||localStorage.length>0}function fr(s){var a=this,c={};if(s)for(var y in s)c[y]=s[y];return c.keyPrefix=Ln(s,a._defaultConfig),dr()?(a._dbInfo=c,c.serializer=Ce,b.resolve()):b.reject()}function pr(s){var a=this,c=a.ready().then(function(){for(var y=a._dbInfo.keyPrefix,m=localStorage.length-1;m>=0;m--){var w=localStorage.key(m);w.indexOf(y)===0&&localStorage.removeItem(w)}});return C(c,s),c}function mr(s,a){var c=this;s=A(s);var y=c.ready().then(function(){var m=c._dbInfo,w=localStorage.getItem(m.keyPrefix+s);return w&&(w=m.serializer.deserialize(w)),w});return C(y,a),y}function gr(s,a){var c=this,y=c.ready().then(function(){for(var m=c._dbInfo,w=m.keyPrefix,x=w.length,k=localStorage.length,R=1,M=0;M<k;M++){var _=localStorage.key(M);if(_.indexOf(w)===0){var T=localStorage.getItem(_);if(T&&(T=m.serializer.deserialize(T)),(T=s(T,_.substring(x),R++))!==void 0)return T}}});return C(y,a),y}function vr(s,a){var c=this,y=c.ready().then(function(){var m,w=c._dbInfo;try{m=localStorage.key(s)}catch{m=null}return m&&(m=m.substring(w.keyPrefix.length)),m});return C(y,a),y}function yr(s){var a=this,c=a.ready().then(function(){for(var y=a._dbInfo,m=localStorage.length,w=[],x=0;x<m;x++){var k=localStorage.key(x);k.indexOf(y.keyPrefix)===0&&w.push(k.substring(y.keyPrefix.length))}return w});return C(c,s),c}function wr(s){var a=this.keys().then(function(c){return c.length});return C(a,s),a}function br(s,a){var c=this;s=A(s);var y=c.ready().then(function(){var m=c._dbInfo;localStorage.removeItem(m.keyPrefix+s)});return C(y,a),y}function Sr(s,a,c){var y=this;s=A(s);var m=y.ready().then(function(){a===void 0&&(a=null);var w=a;return new b(function(x,k){var R=y._dbInfo;R.serializer.serialize(a,function(M,_){if(_)k(_);else try{localStorage.setItem(R.keyPrefix+s,M),x(w)}catch(T){T.name!=="QuotaExceededError"&&T.name!=="NS_ERROR_DOM_QUOTA_REACHED"||k(T),k(T)}})})});return C(m,c),m}function xr(s,a){if(a=D.apply(this,arguments),!(s=typeof s!="function"&&s||{}).name){var c=this.config();s.name=s.name||c.name,s.storeName=s.storeName||c.storeName}var y,m=this;return y=s.name?new b(function(w){s.storeName?w(Ln(s,m._defaultConfig)):w(s.name+"/")}).then(function(w){for(var x=localStorage.length-1;x>=0;x--){var k=localStorage.key(x);k.indexOf(w)===0&&localStorage.removeItem(k)}}):b.reject("Invalid arguments"),C(y,a),y}var Cr={_driver:"localStorageWrapper",_initStorage:fr,_support:lr(),iterate:gr,getItem:mr,setItem:Sr,removeItem:br,clear:pr,length:wr,key:vr,keys:yr,dropInstance:xr},Er=function(s,a){return s===a||typeof s=="number"&&typeof a=="number"&&isNaN(s)&&isNaN(a)},kr=function(s,a){for(var c=s.length,y=0;y<c;){if(Er(s[y],a))return!0;y++}return!1},An=Array.isArray||function(s){return Object.prototype.toString.call(s)==="[object Array]"},Lt={},Pn={},It={INDEXEDDB:Xi,WEBSQL:ur,LOCALSTORAGE:Cr},zr=[It.INDEXEDDB._driver,It.WEBSQL._driver,It.LOCALSTORAGE._driver],$t=["dropInstance"],Ee=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat($t),Ir={description:"",driver:zr.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Rr(s,a){s[a]=function(){var c=arguments;return s.ready().then(function(){return s[a].apply(s,c)})}}function ke(){for(var s=1;s<arguments.length;s++){var a=arguments[s];if(a)for(var c in a)a.hasOwnProperty(c)&&(An(a[c])?arguments[0][c]=a[c].slice():arguments[0][c]=a[c])}return arguments[0]}var Mr=function(){function s(a){for(var c in r(this,s),It)if(It.hasOwnProperty(c)){var y=It[c],m=y._driver;this[c]=m,Lt[m]||this.defineDriver(y)}this._defaultConfig=ke({},Ir),this._config=ke({},this._defaultConfig,a),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return s.prototype.config=function(a){if((a===void 0?"undefined":i(a))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var c in a){if(c==="storeName"&&(a[c]=a[c].replace(/\W/g,"_")),c==="version"&&typeof a[c]!="number")return new Error("Database version must be a number.");this._config[c]=a[c]}return!("driver"in a)||!a.driver||this.setDriver(this._config.driver)}return typeof a=="string"?this._config[a]:this._config},s.prototype.defineDriver=function(a,c,y){var m=new b(function(w,x){try{var k=a._driver,R=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!a._driver)return void x(R);for(var M=Ee.concat("_initStorage"),_=0,T=M.length;_<T;_++){var U=M[_];if((!kr($t,U)||a[U])&&typeof a[U]!="function")return void x(R)}var F=function(){for(var G=function(Lr){return function(){var Ar=new Error("Method "+Lr+" is not implemented by the current driver"),Tn=b.reject(Ar);return C(Tn,arguments[arguments.length-1]),Tn}},at=0,ze=$t.length;at<ze;at++){var Ie=$t[at];a[Ie]||(a[Ie]=G(Ie))}};F();var $=function(G){Lt[k]&&console.info("Redefining LocalForage driver: "+k),Lt[k]=a,Pn[k]=G,w()};"_support"in a?a._support&&typeof a._support=="function"?a._support().then($,x):$(!!a._support):$(!0)}catch(G){x(G)}});return E(m,c,y),m},s.prototype.driver=function(){return this._driver||null},s.prototype.getDriver=function(a,c,y){var m=Lt[a]?b.resolve(Lt[a]):b.reject(new Error("Driver not found."));return E(m,c,y),m},s.prototype.getSerializer=function(a){var c=b.resolve(Ce);return E(c,a),c},s.prototype.ready=function(a){var c=this,y=c._driverSet.then(function(){return c._ready===null&&(c._ready=c._initDriver()),c._ready});return E(y,a,a),y},s.prototype.setDriver=function(a,c,y){var m=this;An(a)||(a=[a]);var w=this._getSupportedDrivers(a);function x(){m._config.driver=m.driver()}function k(_){return m._extend(_),x(),m._ready=m._initStorage(m._config),m._ready}function R(_){return function(){var T=0;function U(){for(;T<_.length;){var F=_[T];return T++,m._dbInfo=null,m._ready=null,m.getDriver(F).then(k).catch(U)}x();var $=new Error("No available storage method found.");return m._driverSet=b.reject($),m._driverSet}return U()}}var M=this._driverSet!==null?this._driverSet.catch(function(){return b.resolve()}):b.resolve();return this._driverSet=M.then(function(){var _=w[0];return m._dbInfo=null,m._ready=null,m.getDriver(_).then(function(T){m._driver=T._driver,x(),m._wrapLibraryMethodsWithReady(),m._initDriver=R(w)})}).catch(function(){x();var _=new Error("No available storage method found.");return m._driverSet=b.reject(_),m._driverSet}),E(this._driverSet,c,y),this._driverSet},s.prototype.supports=function(a){return!!Pn[a]},s.prototype._extend=function(a){ke(this,a)},s.prototype._getSupportedDrivers=function(a){for(var c=[],y=0,m=a.length;y<m;y++){var w=a[y];this.supports(w)&&c.push(w)}return c},s.prototype._wrapLibraryMethodsWithReady=function(){for(var a=0,c=Ee.length;a<c;a++)Rr(this,Ee[a])},s.prototype.createInstance=function(a){return new s(a)},s}(),_r=new Mr;e.exports=_r},{3:3}]},{},[4])(4),ui={exports:{}};(function(t){((e,n)=>{t.exports=n()})(0,()=>{const e=typeof window=="object"?window:this;e.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");let n=null,i=!1;const r=e.WebStreamsPolyfill||{},o=e.isSecureContext;let l=/constructor/i.test(e.HTMLElement)||!!e.safari||!!e.WebKitPoint;const p=o||"MozAppearance"in document.documentElement.style?"iframe":"navigate",v={createWriteStream:function(C,E,A){let D={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},z=0,S=null,u=null,f=null;if(Number.isFinite(E)?([A,E]=[E,A],console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),D.size=A,D.writableStrategy=E):E&&E.highWaterMark?(console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),D.size=A,D.writableStrategy=E):D=E||{},!l){n||(n=o?b(v.mitm):function(P){const I="width=200,height=100",L=document.createDocumentFragment(),N={frame:e.open(P,"popup",I),loaded:!1,isIframe:!1,isPopup:!0,remove(){N.frame.close()},addEventListener(...O){L.addEventListener(...O)},dispatchEvent(...O){L.dispatchEvent(...O)},removeEventListener(...O){L.removeEventListener(...O)},postMessage(...O){N.frame.postMessage(...O)}},j=O=>{O.source===N.frame&&(N.loaded=!0,e.removeEventListener("message",j),N.dispatchEvent(new Event("load")))};return e.addEventListener("message",j),N}(v.mitm)),u=new MessageChannel,C=encodeURIComponent(C.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const h={transferringReadable:i,pathname:D.pathname||Math.random().toString().slice(-6)+"/"+C,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+C}};D.size&&(h.headers["Content-Length"]=D.size);const g=[h,"*",[u.port2]];if(i){const P=p==="iframe"?void 0:{transform(L,N){if(!(L instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");z+=L.length,N.enqueue(L),S&&(location.href=S,S=null)},flush(){S&&(location.href=S)}};f=new v.TransformStream(P,D.writableStrategy,D.readableStrategy);const I=f.readable;u.port1.postMessage({readableStream:I},[I])}u.port1.onmessage=P=>{P.data.download?p==="navigate"?(n.remove(),n=null,z?location.href=P.data.download:S=P.data.download):(n.isPopup&&(n.remove(),n=null,p==="iframe"&&b(v.mitm)),b(P.data.download)):P.data.abort&&(d=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null)},n.loaded?n.postMessage(...g):n.addEventListener("load",()=>{n.postMessage(...g)},{once:!0})}let d=[];return!l&&f&&f.writable||new v.WritableStream({write(h){if(!(h instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");l?d.push(h):(u.port1.postMessage(h),z+=h.length,S&&(location.href=S,S=null))},close(){if(l){const h=new Blob(d,{type:"application/octet-stream; charset=utf-8"}),g=document.createElement("a");g.href=URL.createObjectURL(h),g.download=C,g.click()}else u.port1.postMessage("end")},abort(){d=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null}},D.writableStrategy)},WritableStream:e.WritableStream||r.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 b(C){if(!C)throw new Error("meh");const E=document.createElement("iframe");return E.hidden=!0,E.src=C,E.loaded=!1,E.name="iframe",E.isIframe=!0,E.postMessage=(...A)=>E.contentWindow.postMessage(...A),E.addEventListener("load",()=>{E.loaded=!0},{once:!0}),document.body.appendChild(E),E}try{new Response(new ReadableStream),o&&!("serviceWorker"in navigator)&&(l=!0)}catch{l=!0}return(C=>{try{C()}catch{}})(()=>{const{readable:C}=new TransformStream,E=new MessageChannel;E.port1.postMessage(C,[C]),E.port1.close(),E.port2.close(),i=!0,Object.defineProperty(v,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})}),v})})(ui);var ts=ui.exports;class es{fileID;downloadURL;ChunkUnitM=1048576;chunkByteSize;totalChunks=1;currentDB;keys;fileMetaData=null;finishNum=0;eventTarget;cancelSource;isStarting=!1;fileName;cacheSize=6;requestTimeout=6e4;constructor(e,n,i=3,r=6,o=6e4){this.fileID=e,this.downloadURL=n,this.chunkByteSize=i*this.ChunkUnitM,this.eventTarget=Fe(),this.initIndexDB(),r>=3&&(this.cacheSize=r),o>this.requestTimeout&&(this.requestTimeout=o)}on(e,n){this.eventTarget.on(e,n)}dispatch(e,n){this.eventTarget.emit(e,n)}dispatchError(e){this.eventTarget.emit("error",e)}dispatchInfo(e){this.eventTarget.emit("info",e)}async queryDownloadFileMeta(e,n="",i){this.dispatchInfo("\u5F00\u59CB\u83B7\u53D6\u6587\u4EF6\u4FE1\u606F");const r=await lt(n,e,i);let o=null;return r&&r.status===200&&(o=r.data),o}async getIFileMeta(){if(this.fileMetaData===null){const e=await this.currentDB?.getItem("fileinfo");this.fileMetaData=e||null}return this.fileMetaData}initIndexDB(){this.currentDB=Qt.createInstance({name:this.fileID,driver:Qt.INDEXEDDB})}async init(e){if(this.finishNum=0,e){const n="fileinfo";this.fileMetaData={id:e.id,name:e.name,length:e.length,downloadID:e.downloadID,chunkSize:this.chunkByteSize},this.fileName=e.name,this.currentDB?.setItem(n,this.fileMetaData)}if(this.fileMetaData!=null){const n=this.fileMetaData.chunkSize;n!=null&&n>0&&(this.chunkByteSize=n)}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(),Qt.dropInstance({name:this.fileID}),this.currentDB=void 0,this.keys&&(this.keys.length=0,this.keys=void 0),this.finishNum=0,this.downloadProgress(),this.outputProgress(0),this.dispatchInfo("\u5DF2\u5220\u9664\u4E0B\u8F7D\u4EFB\u52A1")}sleep(e){return new Promise(n=>setTimeout(n,e))}async download(e,n){let i=e;if(!i&&this.downloadURL&&(i=this.downloadURL),!i)throw Error("\u4E0B\u8F7DURL\u4E0D\u80FD\u4E3A\u7A7A!");this.currentDB||this.initIndexDB();const r=B.Axios.CancelToken;this.cancelSource=r.source(),this.isStarting=!0;const o={key:this.fileMetaData?.downloadID};let l=0;const p=this.cacheSize;let v=0;for(let b=0;b<this.totalChunks;b++){if(this.keys&&this.keys?.indexOf(b.toString())>=0){l++,l>this.finishNum&&(this.finishNum=l,this.downloadProgress());continue}const C=b*this.chunkByteSize;let E=C+this.chunkByteSize-1;this.fileMetaData&&E>this.fileMetaData.length&&(E=this.fileMetaData.length-1);const A={range:`bytes=${C}-${E}`};for(;v>=p;)await this.sleep(200);const D=b.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${b+1}/${this.totalChunks}`),v++,lt(i,n,o,A,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then(async z=>{const S=z.data;v--,await this.currentDB?.setItem(D,S),l++,l>this.finishNum&&(this.finishNum=l,this.downloadProgress());const u=parseInt(D)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${u}/${this.totalChunks}`),this.savefile()}).catch(z=>{v--;const S=parseInt(D)+1;this.dispatchError(`\u4E0B\u8F7D\u7B2C${S}\uFF09\u4E2A\u5206\u7247\u5185\u5BB9\u5931\u8D25\uFF01`)})}this.finishNum===this.totalChunks&&this.savefile()}downloadProgress(){const e=100*this.finishNum/this.totalChunks;this.dispatch("downloadProgress",e)}outputProgress(e){const n=100*e/this.totalChunks;this.dispatch("saveProgress",n)}async savefile(){if(this.finishNum===this.totalChunks){if(!this.fileName)return void this.dispatchError("\u4E0B\u8F7D\u9519\u8BEF\uFF1A\u6587\u4EF6\u540D\u4E3A\u7A7A!");this.dispatchInfo("\u5F00\u59CB\u4FDD\u5B58\u4E0B\u8F7D\u6587\u4EF6:"+this.fileName);const e=ts.createWriteStream(this.fileName).getWriter();let n=0;for(let i=0;i<this.totalChunks;i++){const r=i.toString();let o=await this.currentDB?.getItem(r);if(o||(o=await this.currentDB?.getItem(r)),!o)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${i+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);let l=new Response(o).body;if(l===null)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${i+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);const p=l.getReader();for(;;){const{done:v,value:b}=await p.read();if(v)break;await e.write(b)}n++,this.outputProgress(n),this.dispatchInfo(`\u5B8C\u6210\u7B2C${i+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}e.close(),Qt.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("\u5B8C\u6210\u6587\u4EF6\u4E0B\u8F7D")}}}function ns(t,e){let n="",i="";for(const r in e)n+=r+"="+encodeURIComponent(e[r])+"&";return n=n.replace(/&$/,""),i=/\?$/.test(t)?t+n:t.replace(/\/?$/,"?")+n,i}function li(t={},e={}){let n;for(n in e)St(e[n])?li(t[n],e[n]):t[n]=e[n];return t}function is(t,e){const n=`${t}_${e}`;return rt.MD5(n)}function hi(t){const e=function(p){if(!p)return;const v=p,b=[];if(v)for(let C of v){const E=di(C);E&&b.push(E)}return b}(t.bussinessRoutes),n=function(p){if(!p)return;const v=p;if(v&&v.length>0){const b=[];return v.forEach(C=>{const E=fi(C);E&&b.push(E)}),b}}(t.widgetMenuConfig),i=function(p){if(p&&p.length>0){const v=[];return p.forEach(b=>{const C=function(E){return E?{id:E.id,label:E.label,container:E.container,preload:E.preload,afterid:E.afterid,bindid:E.bindid,group:E.group}:void 0}(b);C&&v.push(C)}),v}}(t.widgetConfig),r=function(p){if(p&&p.length>0)return p}(t.functionList),o=t.pkgObject.version,l=t.pkgObject.name;return{id:is(l,o),name:B.Config.UI.SiteTitle,group:B.Config.UI.Group,product:l,version:o,routes:e,widgetMenu:n,widgets:i,functions:r}}function di(t){if(t){let e=0;t.meta?.hidden&&(e=1);let n={path:t.path,name:t.name,title:t.meta?.title,type:e,index:t.meta?.index};if(t.children){const i=[];for(let r of t.children){const o=di(r);o&&i.push(o)}i.length>0&&(n.children=i)}return n}}function fi(t){if(!t)return;const e={name:t.name,index:t.index,path:t.path,type:t.type};return t.children&&t.children.length>0&&(e.children=[],t.children.forEach(n=>{const i=fi(n);i&&e.children?.push(i)})),e}function rs(t,e="IconifyList.ts"){let n="",i=`const iconlist={
|
|
4
|
-
`,r=0;
|
|
5
|
-
`,
|
|
6
|
-
`,r++}}),r>0&&(
|
|
7
|
-
`,Yt(n+i+"export default iconlist;","IconifyList.ts"))}function os(t,e){const n=hi(t);Hn(n,e),B.Message?.msg("\u5BFC\u51FA\u7CFB\u7EDF\u529F\u80FD\u6743\u9650\u6587\u4EF6\u6210\u529F\uFF01")}let pi=!0;try{String.fromCharCode.apply(String,[1,2])}catch{pi=!1,Object.defineProperty(Array.prototype,"subarray",{value:Array.prototype.slice})}var Ze=2654435769;function mi(t,e){var n=t.length,i=n<<2;if(e){var r=t[n-1];if(r<(i-=4)-3||r>i)return null;i=r}for(var o=new Uint8Array(i),l=0;l<i;++l)o[l]=t[l>>2]>>((3&l)<<3);return o}function te(t,e){var n,i=t.length,r=i>>2;(3&i)!=0&&++r,e?(n=new Uint32Array(r+1))[r]=i:n=new Uint32Array(r);for(var o=0;o<i;++o)n[o>>2]|=t[o]<<((3&o)<<3);return n}function kt(t){return 4294967295&t}function ee(t,e,n,i,r,o){return(n>>>5^e<<2)+(e>>>3^n<<4)^(t^e)+(o[3&i^r]^n)}function gi(t){if(t.length<16){var e=new Uint8Array(16);e.set(t),t=e}return t}function ne(t){for(var e=t.length,n=new Uint8Array(3*e),i=0,r=0;r<e;r++){var o=t.charCodeAt(r);if(o<128)n[i++]=o;else if(o<2048)n[i++]=192|o>>6,n[i++]=128|63&o;else{if(!(o<55296||o>57343)){if(r+1<e){var l=t.charCodeAt(r+1);if(o<56320&&56320<=l&&l<=57343){var p=65536+((1023&o)<<10|1023&l);n[i++]=240|p>>18,n[i++]=128|p>>12&63,n[i++]=128|p>>6&63,n[i++]=128|63&p,r++;continue}}throw new Error("Malformed string")}n[i++]=224|o>>12,n[i++]=128|o>>6&63,n[i++]=128|63&o}}return n.subarray(0,i)}function vi(t){var e=t.length;return e===0?"":e<32767?function(n,i){for(var r=new Array(i),o=0,l=0,p=n.length;o<i&&l<p;o++){var v=n[l++];switch(v>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:r[o]=v;break;case 12:case 13:if(!(l<p))throw new Error("Unfinished UTF-8 octet sequence");r[o]=(31&v)<<6|63&n[l++];break;case 14:if(!(l+1<p))throw new Error("Unfinished UTF-8 octet sequence");r[o]=(15&v)<<12|(63&n[l++])<<6|63&n[l++];break;case 15:if(!(l+2<p))throw new Error("Unfinished UTF-8 octet sequence");var b=((7&v)<<18|(63&n[l++])<<12|(63&n[l++])<<6|63&n[l++])-65536;if(!(0<=b&&b<=1048575))throw new Error("Character outside valid Unicode range: 0x"+b.toString(16));r[o++]=b>>10&1023|55296,r[o]=1023&b|56320;break;default:throw new Error("Bad UTF-8 encoding 0x"+v.toString(16))}}return o<i&&(r.length=o),String.fromCharCode.apply(String,r)}(t,e):function(n,i){for(var r=[],o=new Array(32768),l=0,p=0,v=n.length;l<i&&p<v;l++){var b=n[p++];switch(b>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:o[l]=b;break;case 12:case 13:if(!(p<v))throw new Error("Unfinished UTF-8 octet sequence");o[l]=(31&b)<<6|63&n[p++];break;case 14:if(!(p+1<v))throw new Error("Unfinished UTF-8 octet sequence");o[l]=(15&b)<<12|(63&n[p++])<<6|63&n[p++];break;case 15:if(!(p+2<v))throw new Error("Unfinished UTF-8 octet sequence");var C=((7&b)<<18|(63&n[p++])<<12|(63&n[p++])<<6|63&n[p++])-65536;if(!(0<=C&&C<=1048575))throw new Error("Character outside valid Unicode range: 0x"+C.toString(16));o[l++]=C>>10&1023|55296,o[l]=1023&C|56320;break;default:throw new Error("Bad UTF-8 encoding 0x"+b.toString(16))}if(l>=32766){var E=l+1;o.length=E,r.push(String.fromCharCode.apply(String,o)),i-=E,l=-1}}return l>0&&(o.length=l,r.push(String.fromCharCode.apply(String,o))),r.join("")}(t,e)}function ss(t){var e=t.length;if(e===0)return"";var n=pi?t:function(p){for(var v=p.length,b=new Array(p.length),C=0;C<v;++C)b[C]=p[C];return b}(t);if(e<65535)return String.fromCharCode.apply(String,n);for(var i=32767&e,r=e>>15,o=new Array(i?r+1:r),l=0;l<r;++l)o[l]=String.fromCharCode.apply(String,n.subarray(l<<15,l+1<<15));return i&&(o[r]=String.fromCharCode.apply(String,n.subarray(r<<15,e))),o.join("")}function yi(t,e){return typeof t=="string"&&(t=ne(t)),typeof e=="string"&&(e=ne(e)),t==null||t.length===0?t:mi(function(n,i){var r,o,l,p,v,b,C=n.length,E=C-1;for(o=n[E],l=0,b=0|Math.floor(6+52/C);b>0;--b){for(p=(l=kt(l+Ze))>>>2&3,v=0;v<E;++v)r=n[v+1],o=n[v]=kt(n[v]+ee(l,r,o,v,p,i));r=n[0],o=n[E]=kt(n[E]+ee(l,r,o,E,p,i))}return n}(te(t,!0),te(gi(e),!1)),!1)}function wi(t,e){return typeof t=="string"&&(t=function(n){for(var i=window.atob(n),r=i.length,o=new Uint8Array(r),l=0;l<r;l++)o[l]=i.charCodeAt(l);return o}(t)),typeof e=="string"&&(e=ne(e)),t==null||t.length===0?t:mi(function(n,i){var r,o,l,p,v,b=n.length,C=b-1;for(r=n[0],l=kt(Math.floor(6+52/b)*Ze);l!==0;l=kt(l-Ze)){for(p=l>>>2&3,v=C;v>0;--v)o=n[v-1],r=n[v]=kt(n[v]-ee(l,r,o,v,p,i));o=n[C],r=n[0]=kt(n[0]-ee(l,r,o,0,p,i))}return n}(te(t,!1),te(gi(e),!1)),!0)}const Bt={toBytes:ne,toString:vi,encrypt:yi,encryptToString:function(t,e){return window.btoa(ss(yi(t,e)))},decrypt:wi,decryptToString:function(t,e){return vi(wi(t,e))}},Q=Dn({panelGroups:{}}),bi=()=>({useGroupAccordion:t=>mt(()=>Q.panelGroups[t].accordion),setGroupAccordionStatus:(t,e)=>{Q.panelGroups[t]={...Q.panelGroups[t],accordion:e}},panelExpanded:(t,e)=>mt(()=>Q.panelGroups[t]?.panelExpandStatus?.[e]||!1),setPanelExpandedStatus:(t,e,n)=>{Q.panelGroups[t]={...Q.panelGroups[t],panelExpandStatus:{...Q.panelGroups[t]?.panelExpandStatus||{},[e]:n}}},togglePanelExpandedStatus:(t,e)=>{Q.panelGroups[t].accordion&&(Q.panelGroups[t].panelExpandStatus[e]||Object.keys(Q.panelGroups[t].panelExpandStatus).forEach(n=>{Q.panelGroups[t].panelExpandStatus[n]=!1})),Q.panelGroups[t].panelExpandStatus[e]=!Q.panelGroups[t].panelExpandStatus[e]}}),Qe=t=>t>255?255:t<0?0:t,ie=(t,e)=>{const n=t.replace("#",""),i=parseInt(n,16),r=Qe((i>>16)+e),o=Qe((i>>8&255)+e);return"#"+(Qe((255&i)+e)|o<<8|r<<16).toString(16)};var re=At({name:"VueCollapsiblePanelGroup",props:{accordion:{type:Boolean,default:!1},baseColor:{type:String,default:"#333333"}},setup(t){const e=it(`group-${Vt()}`),{setGroupAccordionStatus:n}=bi(),i={"--base-color":t.baseColor,"--border-color":ie(t.baseColor,180),"--bg-color-header":ie(t.baseColor,140),"--bg-color-header-hover":ie(t.baseColor,190),"--bg-color-header-active":ie(t.baseColor,200),"--bg-color-body":"#fff"};return n(e.value,t.accordion),{idGroup:e,cssColorVars:i}}});const as=["data-id-group"];re.render=function(t,e,n,i,r,o){return H(),Y("div",{"data-id-group":t.idGroup,style:vt(t.cssColorVars),class:"vcpg"},[pt(t.$slots,"default")],12,as)},re.__scopeId="data-v-23ab5317",re.__file="src/controls/collapsepanel/VCollapsiblePanelGroup.vue";var oe=At({name:"VueCollapsiblePanel",props:{expanded:{type:Boolean,default:!0}},setup(t,e){const n=`panel-${Vt()}`,i=it(),r=it(),o=it(),{panelExpanded:l,togglePanelExpandedStatus:p,setPanelExpandedStatus:v}=bi(),b=mt(()=>({hasContent:e.slots.content&&e.slots.content()[0].children.length>0,dataKey:Vt()})),C=mt(()=>i.value?.parentElement?.getAttribute("data-id-group")||""),E=mt(()=>l(C.value,n).value&&b.value.hasContent);return Re(()=>{v(C.value,n,t.expanded)}),Tr(()=>{(async()=>(await Me(),r.value&&o.value&&(r.value.style.height=`${Math.min(o.value.scrollHeight,r.value.scrollHeight)}px`)))()}),{body:b,panelRef:i,bodyRef:r,bodyContentRef:o,isExpanded:E,collapse:A=>{A.style.height="0"},expand:A=>{A.style.height=`${A.scrollHeight}px`},toggle:()=>{!b.value.hasContent||p(C.value,n)},toggleIcon:`
|
|
1
|
+
import{h as di,openBlock as G,createElementBlock as ot,normalizeStyle as kt,renderSlot as Ct,reactive as ao,computed as Et,defineComponent as Ft,ref as ht,onMounted as Ve,onUpdated as pi,nextTick as Ke,normalizeClass as fi,createElementVNode as rt,createCommentVNode as It,createVNode as co,Transition as lo,withCtx as ie,withModifiers as ho,getCurrentInstance as gi,watch as qt,onBeforeUnmount as mi,resolveComponent as uo,createBlock as vt,withDirectives as vi,Fragment as Tt,createTextVNode as po,toDisplayString as yi,vShow as wi,markRaw as bi,toRefs as _i,renderList as Bt,resolveDynamicComponent as Rt}from"vue";import Si from"axios";import Ci from"qs";import{Client as Ei,ClientContext as Je}from"@hprose/rpc-core";import{ByteStream as fo}from"@hprose/io";import{HttpTransport as xi}from"@hprose/rpc-html5";var ki={name:"splitpanes",props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},provide(){return{requestUpdate:this.requestUpdate,onPaneAdd:this.onPaneAdd,onPaneRemove:this.onPaneRemove,onPaneClick:this.onPaneClick}},data:()=>({container:null,ready:!1,panes:[],touch:{mouseDown:!1,dragging:!1,activeSplitter:null},splitterTaps:{splitter:null,timeoutId:null}}),computed:{panesCount(){return this.panes.length},indexedPanes(){return this.panes.reduce((e,t)=>(e[t.id]=t)&&e,{})}},methods:{updatePaneComponents(){this.panes.forEach(e=>{e.update&&e.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[e.id].size}%`})})},bindEvents(){document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),document.addEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.addEventListener("touchmove",this.onMouseMove,{passive:!1}),document.addEventListener("touchend",this.onMouseUp))},unbindEvents(){document.removeEventListener("mousemove",this.onMouseMove,{passive:!1}),document.removeEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.removeEventListener("touchmove",this.onMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onMouseUp))},onMouseDown(e,t){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=t},onMouseMove(e){this.touch.mouseDown&&(e.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(e)),this.$emit("resize",this.panes.map(t=>({min:t.min,max:t.max,size:t.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(e=>({min:e.min,max:e.max,size:e.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(e,t){"ontouchstart"in window&&(e.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===t?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(e,t),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=t,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[t])},onSplitterDblClick(e,t){let n=0;this.panes=this.panes.map((o,r)=>(o.size=r===t?o.max:o.min,r!==t&&(n+=o.min),o)),this.panes[t].size-=n,this.$emit("pane-maximize",this.panes[t])},onPaneClick(e,t){this.$emit("pane-click",this.indexedPanes[t])},getCurrentMouseDrag(e){const t=this.container.getBoundingClientRect(),{clientX:n,clientY:o}="ontouchstart"in window&&e.touches?e.touches[0]:e;return{x:n-t.left,y:o-t.top}},getCurrentDragPercentage(e){e=e[this.horizontal?"y":"x"];const t=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(e=t-e),100*e/t},calculatePanesSize(e){const t=this.touch.activeSplitter;let n={prevPanesSize:this.sumPrevPanesSize(t),nextPanesSize:this.sumNextPanesSize(t),prevReachedMinPanes:0,nextReachedMinPanes:0};const o=0+(this.pushOtherPanes?0:n.prevPanesSize),r=100-(this.pushOtherPanes?0:n.nextPanesSize),i=Math.max(Math.min(this.getCurrentDragPercentage(e),r),o);let s=[t,t+1],c=this.panes[s[0]]||null,p=this.panes[s[1]]||null;const m=c.max<100&&i>=c.max+n.prevPanesSize,_=p.max<100&&i<=100-(p.max+this.sumNextPanesSize(t+1));if(m||_)m?(c.size=c.max,p.size=Math.max(100-c.max-n.prevPanesSize-n.nextPanesSize,0)):(c.size=Math.max(100-p.max-n.prevPanesSize-this.sumNextPanesSize(t+1),0),p.size=p.max);else{if(this.pushOtherPanes){const C=this.doPushOtherPanes(n,i);if(!C)return;({sums:n,panesToResize:s}=C),c=this.panes[s[0]]||null,p=this.panes[s[1]]||null}c!==null&&(c.size=Math.min(Math.max(i-n.prevPanesSize-n.prevReachedMinPanes,c.min),c.max)),p!==null&&(p.size=Math.min(Math.max(100-i-n.nextPanesSize-n.nextReachedMinPanes,p.min),p.max))}},doPushOtherPanes(e,t){const n=this.touch.activeSplitter,o=[n,n+1];return t<e.prevPanesSize+this.panes[o[0]].min&&(o[0]=this.findPrevExpandedPane(n).index,e.prevReachedMinPanes=0,o[0]<n&&this.panes.forEach((r,i)=>{i>o[0]&&i<=n&&(r.size=r.min,e.prevReachedMinPanes+=r.min)}),e.prevPanesSize=this.sumPrevPanesSize(o[0]),o[0]===void 0)?(e.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((r,i)=>{i>0&&i<=n&&(r.size=r.min,e.prevReachedMinPanes+=r.min)}),this.panes[o[1]].size=100-e.prevReachedMinPanes-this.panes[0].min-e.prevPanesSize-e.nextPanesSize,null):t>100-e.nextPanesSize-this.panes[o[1]].min&&(o[1]=this.findNextExpandedPane(n).index,e.nextReachedMinPanes=0,o[1]>n+1&&this.panes.forEach((r,i)=>{i>n&&i<o[1]&&(r.size=r.min,e.nextReachedMinPanes+=r.min)}),e.nextPanesSize=this.sumNextPanesSize(o[1]-1),o[1]===void 0)?(e.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((r,i)=>{i<this.panesCount-1&&i>=n+1&&(r.size=r.min,e.nextReachedMinPanes+=r.min)}),this.panes[o[0]].size=100-e.prevPanesSize-e.nextReachedMinPanes-this.panes[this.panesCount-1].min-e.nextPanesSize,null):{sums:e,panesToResize:o}},sumPrevPanesSize(e){return this.panes.reduce((t,n,o)=>t+(o<e?n.size:0),0)},sumNextPanesSize(e){return this.panes.reduce((t,n,o)=>t+(o>e+1?n.size:0),0)},findPrevExpandedPane(e){return[...this.panes].reverse().find(t=>t.index<e&&t.size>t.min)||{}},findNextExpandedPane(e){return this.panes.find(t=>t.index>e+1&&t.size>t.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(e=>{const t=e.classList.contains("splitpanes__pane"),n=e.classList.contains("splitpanes__splitter");if(!t&&!n)return e.parentNode.removeChild(e),void console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed.")})},addSplitter(e,t,n=!1){const o=e-1,r=document.createElement("div");r.classList.add("splitpanes__splitter"),n||(r.onmousedown=i=>this.onMouseDown(i,o),typeof window<"u"&&"ontouchstart"in window&&(r.ontouchstart=i=>this.onMouseDown(i,o)),r.onclick=i=>this.onSplitterClick(i,o+1)),this.dblClickSplitter&&(r.ondblclick=i=>this.onSplitterDblClick(i,o+1)),t.parentNode.insertBefore(r,t)},removeSplitter(e){e.onmousedown=void 0,e.onclick=void 0,e.ondblclick=void 0,e.parentNode.removeChild(e)},redoSplitters(){const e=Array.from(this.container.children);e.forEach(n=>{n.className.includes("splitpanes__splitter")&&this.removeSplitter(n)});let t=0;e.forEach(n=>{n.className.includes("splitpanes__pane")&&(!t&&this.firstSplitter?this.addSplitter(t,n,!0):t&&this.addSplitter(t,n),t++)})},requestUpdate({target:e,...t}){const n=this.indexedPanes[e._.uid];Object.entries(t).forEach(([o,r])=>n[o]=r)},onPaneAdd(e){let t=-1;Array.from(e.$el.parentNode.children).some(r=>(r.className.includes("splitpanes__pane")&&t++,r===e.$el));const n=parseFloat(e.minSize),o=parseFloat(e.maxSize);this.panes.splice(t,0,{id:e._.uid,index:t,min:isNaN(n)?0:n,max:isNaN(o)?100:o,size:e.size===null?null:parseFloat(e.size),givenSize:e.size,update:e.update}),this.panes.forEach((r,i)=>r.index=i),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[t]}),this.$emit("pane-add",{index:t,panes:this.panes.map(r=>({min:r.min,max:r.max,size:r.size}))})})},onPaneRemove(e){const t=this.panes.findIndex(o=>o.id===e._.uid),n=this.panes.splice(t,1)[0];this.panes.forEach((o,r)=>o.index=r),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...n,index:t}}),this.$emit("pane-remove",{removed:n,panes:this.panes.map(o=>({min:o.min,max:o.max,size:o.size}))})})},resetPaneSizes(e={}){e.addedPane||e.removedPane?this.panes.some(t=>t.givenSize!==null||t.min||t.max<100)?this.equalizeAfterAddOrRemove(e):this.equalize():this.initialPanesSizing(),this.ready&&this.$emit("resized",this.panes.map(t=>({min:t.min,max:t.max,size:t.size})))},equalize(){const e=100/this.panesCount;let t=0;const n=[],o=[];this.panes.forEach(r=>{r.size=Math.max(Math.min(e,r.max),r.min),t-=r.size,r.size>=r.max&&n.push(r.id),r.size<=r.min&&o.push(r.id)}),t>.1&&this.readjustSizes(t,n,o)},initialPanesSizing(){let e=100;const t=[],n=[];let o=0;this.panes.forEach(i=>{e-=i.size,i.size!==null&&o++,i.size>=i.max&&t.push(i.id),i.size<=i.min&&n.push(i.id)});let r=100;e>.1&&(this.panes.forEach(i=>{i.size===null&&(i.size=Math.max(Math.min(e/(this.panesCount-o),i.max),i.min)),r-=i.size}),r>.1&&this.readjustSizes(e,t,n))},equalizeAfterAddOrRemove({addedPane:e}={}){let t=100/this.panesCount,n=0;const o=[],r=[];e&&e.givenSize!==null&&(t=(100-e.givenSize)/(this.panesCount-1)),this.panes.forEach(i=>{n-=i.size,i.size>=i.max&&o.push(i.id),i.size<=i.min&&r.push(i.id)}),!(Math.abs(n)<.1)&&(this.panes.forEach(i=>{e&&e.givenSize!==null&&e.id===i.id||(i.size=Math.max(Math.min(t,i.max),i.min)),n-=i.size,i.size>=i.max&&o.push(i.id),i.size<=i.min&&r.push(i.id)}),n>.1&&this.readjustSizes(n,o,r))},readjustSizes(e,t,n){let o;o=e>0?e/(this.panesCount-t.length):e/(this.panesCount-n.length),this.panes.forEach(r=>{if(e>0&&!t.includes(r.id)){const i=Math.max(Math.min(r.size+o,r.max),r.min),s=i-r.size;e-=s,r.size=i}else if(!n.includes(r.id)){const i=Math.max(Math.min(r.size+o,r.max),r.min),s=i-r.size;e-=s,r.size=i}r.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[r.id].size}%`})}),Math.abs(e)>.1&&this.$nextTick(()=>{this.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})}},watch:{panes:{deep:!0,immediate:!1,handler(){this.updatePaneComponents()}},horizontal(){this.updatePaneComponents()},firstSplitter(){this.redoSplitters()},dblClickSplitter(e){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((t,n)=>{t.ondblclick=e?o=>this.onSplitterDblClick(o,n):void 0})}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.updatePaneComponents(),this.$emit("ready"),this.ready=!0},render(){return di("div",{ref:"container",class:["splitpanes","splitpanes--"+(this.horizontal?"horizontal":"vertical"),{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())},__file:"src/controls/splitpanes/splitpanes.vue"},Ye={name:"pane",inject:["requestUpdate","onPaneAdd","onPaneRemove","onPaneClick"],props:{size:{type:[Number,String],default:10},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},data:()=>({style:{}}),mounted(){this.onPaneAdd(this)},beforeUnmount(){this.onPaneRemove(this)},methods:{update(e){this.style=e}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(e){this.requestUpdate({target:this,size:e})},minSizeNumber(e){this.requestUpdate({target:this,min:e})},maxSizeNumber(e){this.requestUpdate({target:this,max:e})}}};Ye.render=function(e,t,n,o,r,i){return G(),ot("div",{class:"splitpanes__pane",onClick:t[0]||(t[0]=s=>i.onPaneClick(s,e._.uid)),style:kt(e.style)},[Ct(e.$slots,"default")],4)},Ye.__file="src/controls/splitpanes/pane.vue";const Ii=Object.prototype.toString;function it(e,t){return Ii.call(e)===`[object ${t}]`}function se(e){return it(e,"Function")}const go=e=>typeof e<"u",Ze=e=>!go(e);function Qe(e){return e===null}function Ti(e){return Ze(e)&&Qe(e)}function Ri(e){return Ze(e)||Qe(e)}const Pt=e=>e!=null&&e!==null&&it(e,"Object");function Pi(e){return it(e,"Date")}function zi(e){return it(e,"Number")}function Di(e){return it(e,"AsyncFunction")}function Mi(e){return it(e,"Promise")&&Pt(e)&&se(e.then)&&se(e.catch)}function ae(e){return it(e,"String")}function $i(e){return e===!0||e===!1||it(e,"Boolean")}function tn(e){return e&&Array.isArray(e)}const Ai=()=>typeof window<"u",Li=e=>typeof window<"u"&&it(e,"Window"),Ni=e=>Pt(e)&&!!e.tagName,Bi=typeof window>"u";function Ui(e){return e&&["IMAGE","IMG"].includes(e.tagName)}function Oi(e){return e==null||(ae(e)||tn(e)?e.length===0:!!Pt(e)&&JSON.stringify(e)==="{}")}function ji(e){return it(e,"Error")}function Hi(e){return it(e,"WeakSet")}function Wi(e){return it(e,"WeakMap")}function Fi(e){return it(e,"Symbol")}function qi(e){return it(e,"Map")}const Gi=e=>/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/.test(e);var zt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},en={},Xi={get exports(){return en},set exports(e){en=e}};Xi.exports=function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(S,u){var g=S[0],f=S[1],d=S[2],y=S[3];f=((f+=((d=((d+=((y=((y+=((g=((g+=(f&d|~f&y)+u[0]-680876936|0)<<7|g>>>25)+f|0)&f|~g&d)+u[1]-389564586|0)<<12|y>>>20)+g|0)&g|~y&f)+u[2]+606105819|0)<<17|d>>>15)+y|0)&y|~d&g)+u[3]-1044525330|0)<<22|f>>>10)+d|0,f=((f+=((d=((d+=((y=((y+=((g=((g+=(f&d|~f&y)+u[4]-176418897|0)<<7|g>>>25)+f|0)&f|~g&d)+u[5]+1200080426|0)<<12|y>>>20)+g|0)&g|~y&f)+u[6]-1473231341|0)<<17|d>>>15)+y|0)&y|~d&g)+u[7]-45705983|0)<<22|f>>>10)+d|0,f=((f+=((d=((d+=((y=((y+=((g=((g+=(f&d|~f&y)+u[8]+1770035416|0)<<7|g>>>25)+f|0)&f|~g&d)+u[9]-1958414417|0)<<12|y>>>20)+g|0)&g|~y&f)+u[10]-42063|0)<<17|d>>>15)+y|0)&y|~d&g)+u[11]-1990404162|0)<<22|f>>>10)+d|0,f=((f+=((d=((d+=((y=((y+=((g=((g+=(f&d|~f&y)+u[12]+1804603682|0)<<7|g>>>25)+f|0)&f|~g&d)+u[13]-40341101|0)<<12|y>>>20)+g|0)&g|~y&f)+u[14]-1502002290|0)<<17|d>>>15)+y|0)&y|~d&g)+u[15]+1236535329|0)<<22|f>>>10)+d|0,f=((f+=((d=((d+=((y=((y+=((g=((g+=(f&y|d&~y)+u[1]-165796510|0)<<5|g>>>27)+f|0)&d|f&~d)+u[6]-1069501632|0)<<9|y>>>23)+g|0)&f|g&~f)+u[11]+643717713|0)<<14|d>>>18)+y|0)&g|y&~g)+u[0]-373897302|0)<<20|f>>>12)+d|0,f=((f+=((d=((d+=((y=((y+=((g=((g+=(f&y|d&~y)+u[5]-701558691|0)<<5|g>>>27)+f|0)&d|f&~d)+u[10]+38016083|0)<<9|y>>>23)+g|0)&f|g&~f)+u[15]-660478335|0)<<14|d>>>18)+y|0)&g|y&~g)+u[4]-405537848|0)<<20|f>>>12)+d|0,f=((f+=((d=((d+=((y=((y+=((g=((g+=(f&y|d&~y)+u[9]+568446438|0)<<5|g>>>27)+f|0)&d|f&~d)+u[14]-1019803690|0)<<9|y>>>23)+g|0)&f|g&~f)+u[3]-187363961|0)<<14|d>>>18)+y|0)&g|y&~g)+u[8]+1163531501|0)<<20|f>>>12)+d|0,f=((f+=((d=((d+=((y=((y+=((g=((g+=(f&y|d&~y)+u[13]-1444681467|0)<<5|g>>>27)+f|0)&d|f&~d)+u[2]-51403784|0)<<9|y>>>23)+g|0)&f|g&~f)+u[7]+1735328473|0)<<14|d>>>18)+y|0)&g|y&~g)+u[12]-1926607734|0)<<20|f>>>12)+d|0,f=((f+=((d=((d+=((y=((y+=((g=((g+=(f^d^y)+u[5]-378558|0)<<4|g>>>28)+f|0)^f^d)+u[8]-2022574463|0)<<11|y>>>21)+g|0)^g^f)+u[11]+1839030562|0)<<16|d>>>16)+y|0)^y^g)+u[14]-35309556|0)<<23|f>>>9)+d|0,f=((f+=((d=((d+=((y=((y+=((g=((g+=(f^d^y)+u[1]-1530992060|0)<<4|g>>>28)+f|0)^f^d)+u[4]+1272893353|0)<<11|y>>>21)+g|0)^g^f)+u[7]-155497632|0)<<16|d>>>16)+y|0)^y^g)+u[10]-1094730640|0)<<23|f>>>9)+d|0,f=((f+=((d=((d+=((y=((y+=((g=((g+=(f^d^y)+u[13]+681279174|0)<<4|g>>>28)+f|0)^f^d)+u[0]-358537222|0)<<11|y>>>21)+g|0)^g^f)+u[3]-722521979|0)<<16|d>>>16)+y|0)^y^g)+u[6]+76029189|0)<<23|f>>>9)+d|0,f=((f+=((d=((d+=((y=((y+=((g=((g+=(f^d^y)+u[9]-640364487|0)<<4|g>>>28)+f|0)^f^d)+u[12]-421815835|0)<<11|y>>>21)+g|0)^g^f)+u[15]+530742520|0)<<16|d>>>16)+y|0)^y^g)+u[2]-995338651|0)<<23|f>>>9)+d|0,f=((f+=((y=((y+=(f^((g=((g+=(d^(f|~y))+u[0]-198630844|0)<<6|g>>>26)+f|0)|~d))+u[7]+1126891415|0)<<10|y>>>22)+g|0)^((d=((d+=(g^(y|~f))+u[14]-1416354905|0)<<15|d>>>17)+y|0)|~g))+u[5]-57434055|0)<<21|f>>>11)+d|0,f=((f+=((y=((y+=(f^((g=((g+=(d^(f|~y))+u[12]+1700485571|0)<<6|g>>>26)+f|0)|~d))+u[3]-1894986606|0)<<10|y>>>22)+g|0)^((d=((d+=(g^(y|~f))+u[10]-1051523|0)<<15|d>>>17)+y|0)|~g))+u[1]-2054922799|0)<<21|f>>>11)+d|0,f=((f+=((y=((y+=(f^((g=((g+=(d^(f|~y))+u[8]+1873313359|0)<<6|g>>>26)+f|0)|~d))+u[15]-30611744|0)<<10|y>>>22)+g|0)^((d=((d+=(g^(y|~f))+u[6]-1560198380|0)<<15|d>>>17)+y|0)|~g))+u[13]+1309151649|0)<<21|f>>>11)+d|0,f=((f+=((y=((y+=(f^((g=((g+=(d^(f|~y))+u[4]-145523070|0)<<6|g>>>26)+f|0)|~d))+u[11]-1120210379|0)<<10|y>>>22)+g|0)^((d=((d+=(g^(y|~f))+u[2]+718787259|0)<<15|d>>>17)+y|0)|~g))+u[9]-343485551|0)<<21|f>>>11)+d|0,S[0]=g+S[0]|0,S[1]=f+S[1]|0,S[2]=d+S[2]|0,S[3]=y+S[3]|0}function o(S){var u,g=[];for(u=0;u<64;u+=4)g[u>>2]=S.charCodeAt(u)+(S.charCodeAt(u+1)<<8)+(S.charCodeAt(u+2)<<16)+(S.charCodeAt(u+3)<<24);return g}function r(S){var u,g=[];for(u=0;u<64;u+=4)g[u>>2]=S[u]+(S[u+1]<<8)+(S[u+2]<<16)+(S[u+3]<<24);return g}function i(S){var u,g,f,d,y,$,T=S.length,D=[1732584193,-271733879,-1732584194,271733878];for(u=64;u<=T;u+=64)n(D,o(S.substring(u-64,u)));for(g=(S=S.substring(u-64)).length,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u=0;u<g;u+=1)f[u>>2]|=S.charCodeAt(u)<<(u%4<<3);if(f[u>>2]|=128<<(u%4<<3),u>55)for(n(D,f),u=0;u<16;u+=1)f[u]=0;return d=(d=8*T).toString(16).match(/(.*?)(.{0,8})$/),y=parseInt(d[2],16),$=parseInt(d[1],16)||0,f[14]=y,f[15]=$,n(D,f),D}function s(S){var u,g,f,d,y,$,T=S.length,D=[1732584193,-271733879,-1732584194,271733878];for(u=64;u<=T;u+=64)n(D,r(S.subarray(u-64,u)));for(g=(S=u-64<T?S.subarray(u-64):new Uint8Array(0)).length,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u=0;u<g;u+=1)f[u>>2]|=S[u]<<(u%4<<3);if(f[u>>2]|=128<<(u%4<<3),u>55)for(n(D,f),u=0;u<16;u+=1)f[u]=0;return d=(d=8*T).toString(16).match(/(.*?)(.{0,8})$/),y=parseInt(d[2],16),$=parseInt(d[1],16)||0,f[14]=y,f[15]=$,n(D,f),D}function c(S){var u,g="";for(u=0;u<4;u+=1)g+=t[S>>8*u+4&15]+t[S>>8*u&15];return g}function p(S){var u;for(u=0;u<S.length;u+=1)S[u]=c(S[u]);return S.join("")}function m(S){return/[\u0080-\uFFFF]/.test(S)&&(S=unescape(encodeURIComponent(S))),S}function _(S,u){var g,f=S.length,d=new ArrayBuffer(f),y=new Uint8Array(d);for(g=0;g<f;g+=1)y[g]=S.charCodeAt(g);return u?y:d}function C(S){return String.fromCharCode.apply(null,new Uint8Array(S))}function M(S,u,g){var f=new Uint8Array(S.byteLength+u.byteLength);return f.set(new Uint8Array(S)),f.set(new Uint8Array(u),S.byteLength),g?f:f.buffer}function N(S){var u,g=[],f=S.length;for(u=0;u<f-1;u+=2)g.push(parseInt(S.substr(u,2),16));return String.fromCharCode.apply(String,g)}function I(){this.reset()}return p(i("hello")),typeof ArrayBuffer>"u"||ArrayBuffer.prototype.slice||function(){function S(u,g){return(u=0|u||0)<0?Math.max(u+g,0):Math.min(u,g)}ArrayBuffer.prototype.slice=function(u,g){var f,d,y,$,T=this.byteLength,D=S(u,T),B=T;return g!==e&&(B=S(g,T)),D>B?new ArrayBuffer(0):(f=B-D,d=new ArrayBuffer(f),y=new Uint8Array(d),$=new Uint8Array(this,D,f),y.set($),d)}}(),I.prototype.append=function(S){return this.appendBinary(m(S)),this},I.prototype.appendBinary=function(S){this._buff+=S,this._length+=S.length;var u,g=this._buff.length;for(u=64;u<=g;u+=64)n(this._hash,o(this._buff.substring(u-64,u)));return this._buff=this._buff.substring(u-64),this},I.prototype.end=function(S){var u,g,f=this._buff,d=f.length,y=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(u=0;u<d;u+=1)y[u>>2]|=f.charCodeAt(u)<<(u%4<<3);return this._finish(y,d),g=p(this._hash),S&&(g=N(g)),this.reset(),g},I.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},I.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},I.prototype.setState=function(S){return this._buff=S.buff,this._length=S.length,this._hash=S.hash,this},I.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},I.prototype._finish=function(S,u){var g,f,d,y=u;if(S[y>>2]|=128<<(y%4<<3),y>55)for(n(this._hash,S),y=0;y<16;y+=1)S[y]=0;g=(g=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),f=parseInt(g[2],16),d=parseInt(g[1],16)||0,S[14]=f,S[15]=d,n(this._hash,S)},I.hash=function(S,u){return I.hashBinary(m(S),u)},I.hashBinary=function(S,u){var g=p(i(S));return u?N(g):g},I.ArrayBuffer=function(){this.reset()},I.ArrayBuffer.prototype.append=function(S){var u,g=M(this._buff.buffer,S,!0),f=g.length;for(this._length+=S.byteLength,u=64;u<=f;u+=64)n(this._hash,r(g.subarray(u-64,u)));return this._buff=u-64<f?new Uint8Array(g.buffer.slice(u-64)):new Uint8Array(0),this},I.ArrayBuffer.prototype.end=function(S){var u,g,f=this._buff,d=f.length,y=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(u=0;u<d;u+=1)y[u>>2]|=f[u]<<(u%4<<3);return this._finish(y,d),g=p(this._hash),S&&(g=N(g)),this.reset(),g},I.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},I.ArrayBuffer.prototype.getState=function(){var S=I.prototype.getState.call(this);return S.buff=C(S.buff),S},I.ArrayBuffer.prototype.setState=function(S){return S.buff=_(S.buff,!0),I.prototype.setState.call(this,S)},I.ArrayBuffer.prototype.destroy=I.prototype.destroy,I.ArrayBuffer.prototype._finish=I.prototype._finish,I.ArrayBuffer.hash=function(S,u){var g=p(s(new Uint8Array(S)));return u?N(g):g},I}();var nn=en;const on=[];class ut{static addHandler(t,n,o){t.addEventListener?t.addEventListener(n,o,!1):t.attachEvent?t.attachEvent("on"+n,o):t["on"+n]=o}static windowResizeHandler(t){ut.addHandler(window,"resize",t)}static fullscreenEnabled(){const t=window.document;return document.fullscreenEnabled||window.fullScreen||t.mozFullscreenEnabled||t.webkitIsFullScreen}static fullScreen(t,n){if(n){const o=window.document;let r=window.document.exitFullscreen||o.msExitFullscreen||o.mozCancelFullScreen||o.webkitCancelFullScreen;typeof r<"u"&&r?r.call(window.document):typeof window.ActiveXObject<"u"&&new window.ActiveXObject("WScript.Shell")?.SendKeys("{F11}")}else{let o=t;o||(o=window.document.documentElement);let r=o.requestFullScreen||o.webkitRequestFullScreen||o.mozRequestFullScreen||o.msRequestFullScreen;typeof r<"u"&&r?r.call(o):typeof window.ActiveXObject<"u"&&new window.ActiveXObject("WScript.Shell")?.SendKeys("{F11}")}}static requestFullScreen(t=window.document.documentElement){let n=t;var o=n.requestFullScreen||n.webkitRequestFullScreen||n.mozRequestFullScreen||n.msRequestFullScreen;if(o)o.call(n);else if(typeof window.ActiveXObject<"u"){var r=new window.ActiveXObject("WScript.Shell");r!==null&&r.SendKeys("{F11}")}}static exitFullScreen(){const t=window.document;var n=document.exitFullscreen||t.mozCancelFullScreen||t.webkitExitFullscreen||t.webkitExitFullscreen;if(n)n.call(document);else if(typeof window.ActiveXObject<"u"){var o=new window.ActiveXObject("WScript.Shell");o!==null&&o.SendKeys("{F11}")}}static fullScreenElement(){return window.document.fullscreenElement||window.document.webkitFullscreenElement||window.document.mozFullscreenElement||window.document.msFullscreenElement}static isFullScreen(){return!!ut.fullScreenElement()}static onFullScreenChanged(t){let n;"onfullscreenchange"in window.document?n="fullscreenchange":"onwebkitfullscreenchange"in window.document?n="webkitfullscreenchange":"onmozfullscreenchange"in window.document&&(n="mozfullscreenchange"),n?document.addEventListener(n,function(){const o=ut.isFullScreen();t(o)}):document.addEventListener("MSFullscreenChange",function(){const o=ut.isFullScreen();t(o)})}static stringifyCircularHandler(t,n){if(typeof n=="object"&&n!==null){if(on.indexOf(n)!==-1)return;on.push(n)}return n}static jsonStringify(t){if(!t)return"";const n=JSON.stringify(t,ut.stringifyCircularHandler);return on.length=0,n}static jsonParse(t){const n=ut.jsonStringify(t);if(n.length>1)return JSON.parse(n)}static getObjectURL(t){let n;const o=window;return o.createObjcectURL!=null?n=o.createOjcectURL(t):window.URL!=null?n=window.URL.createObjectURL(t):window.webkitURL!=null&&(n=window.webkitURL.createObjectURL(t)),n}static getFileShortMD5(t,n){const o=File.prototype,r=o.slice||o.mozSlice||o.webkitSlice,i=t,s=2097152,c=new nn.ArrayBuffer,p=new FileReader;p.onload=function(m){c.append(m.target?.result);const _=c.end();n({isOK:!0,data:_})},p.onerror=function(){const m="\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01";console.warn(m),n({isOK:!1,data:m})},function(){const m=0+s>=i.size?i.size:0+s;p.readAsArrayBuffer(r.call(i,0,m))}()}static getFileMD5(t,n){const o=File.prototype,r=o.slice||o.mozSlice||o.webkitSlice,i=t,s=2097152,c=Math.ceil(i.size/s);let p=0;const m=new nn.ArrayBuffer,_=new FileReader;function C(){const M=p*s,N=M+s>=i.size?i.size:M+s;_.readAsArrayBuffer(r.call(i,M,N))}_.onload=function(M){if(m.append(M.target?.result),p++,p<c)C();else{const N=m.end();n({isOK:!0,data:N})}},_.onerror=function(){const M=`${i.name}:\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01`;console.warn(M),n({isOK:!1,data:M})},C()}static MD5(t,n=!1){return nn.hash(t,n)}static copyTextByCommand(t){return new Promise((n,o)=>{const r=document.createElement("input");r.value=t,document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove(),n(!0)})}static copyText=t=>navigator.clipboard?navigator.clipboard.writeText(t).then(function(){return!0},function(n){return!1}):ut.copyTextByCommand(t);static copyElementTextByCommand(t){const n=document.createRange();n.selectNode(document.getElementById(t));const o=window.getSelection();o.rangeCount>0&&o.removeAllRanges(),o.addRange(n);try{return document.execCommand("copy"),o.removeRange(n),!0}catch(r){return o.removeRange(n),console.error("Command\u590D\u5236\u6587\u672C\u9519\u8BEF",r),!1}}static copyElementText(t){if(!navigator.clipboard)return ut.copyElementTextByCommand(t);const n=document.createRange();n.selectNode(document.getElementById(t));const o=window.getSelection();return o.rangeCount>0&&o.removeAllRanges(),o.addRange(n),navigator.clipboard.writeText(o).then(function(){return o.removeRange(n),!0},function(r){return o.removeRange(n),console.error("Clipboard\u590D\u5236\u6587\u672C\u9519\u8BEF",r),!1})}static setGrayMode(t){ut.toggleClass(t,"grayMode",document.documentElement)}static toggleClass(t,n,o){const r=o||document.body;let{className:i}=r;i=i.replace(n,""),r.className=t?`${i} ${n} `:i}static setCssVar(t,n,o=document.documentElement){o.style.setProperty(t,n)}static dispatchWindowResize(){const t=new Event("resize");window.dispatchEvent(t)}static dispatchElementEvent(t,n="click",o){let r;if(r=ae(t)?document.getElementById(t):t,r){const i=new Event(n,{bubbles:!0,cancelable:!0});o&&r.addEventListener("ev",s=>{o(s)},!1),r.dispatchEvent(i)}}}class ce{static isNullOrEmpty=t=>t===null||t===""||t===void 0||t.length===0;static isNotEmpty=t=>!(t===null||t===""||t===void 0||t.length===0);static toHump(t){return t.replace(/[\-\/\_](\w)/g,(n,o)=>o.toUpperCase()).replace("views","")}}class le{prefixKey;storage;constructor(t="",n=localStorage){this.prefixKey=t,this.storage=n}getKey(t){return`${this.prefixKey}${t}`.toUpperCase()}set(t,n,o=604800){const r=JSON.stringify({value:n,expire:o!==null?new Date().getTime()+1e3*o:null});this.storage.setItem(this.getKey(t),r)}get(t,n=null){const o=this.storage.getItem(this.getKey(t));if(o)try{const r=JSON.parse(o),{value:i,expire:s}=r;if(s===null||s>=Date.now())return i;this.remove(this.getKey(t))}catch{return n}return n}getJsonObject(t){const n=this.storage.getItem(this.getKey(t));if(n)try{const o=JSON.parse(n);if(o.expire===null||o.expire>=Date.now())return o;this.remove(this.getKey(t))}catch{return}}remove(t){this.storage.removeItem(this.getKey(t))}clear(){this.storage.clear()}setCookie(t,n,o=604800){document.cookie=`${this.getKey(t)}=${n}; Max-Age=${o}`}getCookie(t){const n=document.cookie.split("; ");for(let o=0,r=n.length;o<r;o++){const i=n[o].split("=");if(i[0]===this.getKey(t))return i[1]}return""}removeCookie(t){this.setCookie(t,1,-1)}clearCookie(){const t=document.cookie.match(/[^ =;]+(?==)/g);if(t)for(let n=t.length;n--;)document.cookie=t[n]+"=0;expire="+new Date(0).toUTCString()}}const Vi=new le("",localStorage);function he(){let e=[];const t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(var n=0;n<36;n++){const r=Math.floor(16*Math.random());e[n]=t.substring(r,r+1)}e[14]="4";const o=3&Number(e[19])|8;return e[19]=t.substring(o,o+1),e[8]=e[13]=e[18]=e[23]="-",e.join("")}function Ki(){var e=new Date().getTime(),t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var o=(e+16*Math.random())%16|0;return e=Math.floor(e/16),(n==="x"?o:3&o|8).toString(16)});return t}function Ji(e){const t=e.toLowerCase().replace(/rgb?a?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),n=parseFloat(t[3]||"1"),o=Math.floor(n*parseInt(t[0])+255*(1-n)),r=Math.floor(n*parseInt(t[1])+255*(1-n)),i=Math.floor(n*parseInt(t[2])+255*(1-n));return"#"+("0"+o.toString(16)).slice(-2)+("0"+r.toString(16)).slice(-2)+("0"+i.toString(16)).slice(-2)}function Yi(e){var t=e.toLowerCase();if(ue(e)){if(t.length===4){for(var n="#",o=1;o<4;o+=1){const i=t.slice(o,o+1);n+=i.concat(i)}t=n}var r=[];for(o=1;o<7;o+=2)r.push(parseInt("0x"+t.slice(o,o+2)));return"rgb("+r.join(",")+")"}return t}function Zi(e){const t=e;if(t.length===4){let o="#";for(var n=1;n<4;n+=1){const r=t.slice(n,n+1);o+=r.concat(r)}return o}return t}var Dt;function Qi(e){if(typeof e=="object"||!e)return;const t=e.toLowerCase().substring(0,1);return t==="#"?Dt.Hex:t==="r"||t==="("?Dt.RGBA:t==="h"?Dt.Hsla:Dt.RGBA}function ts(e){if(e){var t=e.toLowerCase().match(/^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/i);if(t){var n,o,r,i=(parseFloat(t[1])%360+360)%360/360,s=parseFloat(t[2])/(/%$/.test(t[2])?100:1),c=parseFloat(t[3])/(/%$/.test(t[3])?100:1);if(s===0)n=o=r=c;else{var p=c<=.5?c*(s+1):c+s-c*s,m=2*c-p;n=rn(m,p,i+1/3),o=rn(m,p,i),r=rn(m,p,i-1/3)}return`rgba(${n=Math.round(255*n)},${o=Math.round(255*o)},${r=Math.round(255*r)},${t[4]?parseFloat(t[4]):1})`}}}function rn(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ue(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/.test(e)}function es(e,t,n){const o=(e<<16|t<<8|n).toString(16);return"#"+new Array(Math.abs(o.length-7)).join("0")+o}function sn(e){let t=e.toLowerCase();if(ue(e)){if(t.length===4){let o="#";for(let r=1;r<4;r+=1)o+=t.slice(r,r+1).concat(t.slice(r,r+1));t=o}const n=[];for(let o=1;o<7;o+=2)n.push(parseInt("0x"+t.slice(o,o+2)));return"RGB("+n.join(",")+")"}return t}function ns(e){if(!ue(e))return;const[t,n,o]=sn(e).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(r=>Number(r));return .299*t+.578*n+.114*o<192}function os(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${cn(e.substring(0,2),t)}${cn(e.substring(2,4),t)}${cn(e.substring(4,6),t)}`}function rs(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${an(e.substring(0,2),t)}${an(e.substring(2,4),t)}${an(e.substring(4,6),t)}`}function an(e,t){const n=parseInt(e,16)+t,o=n>255?255:n;return o.toString(16).length>1?o.toString(16):`0${o.toString(16)}`}function mo(e,t,n){const o=[e,t,n].map(r=>(r/=255)<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4));return .2126*o[0]+.7152*o[1]+.0722*o[2]}function is(e){return function(t,n){return(mo(~~t[0],~~t[1],~~t[2])+.05)/(mo(n[0],n[1],n[2])+.05)}(sn(e.substring(1)).split(","),[0,0,0])>=12?"#000000":"#FFFFFF"}function cn(e,t){const n=parseInt(e,16)-t,o=n<0?0:n;return o.toString(16).length>1?o.toString(16):`0${o.toString(16)}`}function ln(e){return{all:e=e||new Map,on(t,n){const o=e?.get(t);o&&o.push(n)||e?.set(t,[n])},off(t,n){const o=e?.get(t);o&&o.splice(o.indexOf(n)>>>0,1)},emit(t,n){(e?.get(t)||[]).slice().map(o=>{o(n)}),(e?.get("*")||[]).slice().map(o=>{o(t,n)})}}}(function(e){e[e.RGBA=0]="RGBA",e[e.Hex=1]="Hex",e[e.Hsla=2]="Hsla"})(Dt||(Dt={}));const Ut=ln(),st={HproseServiceErrorEvent:"HproseServiceError",WebAPIErrorEvent:"WebAPIError",AlertInfoEvent:"AlertInfoEvent",CommonWarnEvent:"CommonWarnEvent",WidgetLoadedEvent:"WidgetLoaded",WidgetUnLoadedEvent:"WidgetUnLoaded",WidgetLoadedErrorEvent:"WidgetLoadedError",WidgetVisibleChanged:"WidgetVisibleChanged",AxiosRequestErrorEvent:"AxiosRequestErrorEvent"},de=(e,t)=>{const n=document.createElement("a");n.download=t,n.style.display="none";const o=new Blob([e],{type:"application/octet-stream"});n.href=URL.createObjectURL(o),document.body.appendChild(n),n.click(),document.body.removeChild(n)};function ss(e,t){const n=window.URL||window.webkitURL||window,o=new Blob([e]),r=document.createElement("a");r.href=n.createObjectURL(o),r.download=t,r.click(),n.revokeObjectURL(r.href)}const vo=(e,t)=>{const n=JSON.stringify(e,null,2);t?de(n,t+".json"):Ut.emit(st.CommonWarnEvent,"\u53C2\u6570JsonID\u4E0D\u80FD\u4E3A\u7A7A\uFF01")},as=(e,t,n)=>{e.get(t,{responseType:"blob"}).then(function(o){de(o.data,n)}).catch(o=>{console.warn(o),Ut.emit(st.CommonWarnEvent,"\u4E0B\u8F7D\u6587\u4EF6\u62A5\u9519\uFF01")})};function yo(e){const t=e.lastIndexOf("/")+1;let n=e.substring(t);return n=decodeURI(n.split("?")[0]),n}function cs({url:e,target:t="_blank",fileName:n}){const o=new URL(e).host==location.host;return new Promise((r,i)=>{if(o){const s=document.createElement("a");if(s.href=e,s.target=t,s.download!==void 0&&(s.download=n||yo(e)),document.createEvent){const c=document.createEvent("MouseEvents");return c.initEvent("click",!0,!0),s.dispatchEvent(c),r(!0)}return e.indexOf("?")===-1&&(e+="?download"),window.open(e,t),r(!0)}{const s=document.createElement("canvas"),c=document.createElement("img");c.setAttribute("crossOrigin","Anonymous"),c.src=e,c.onload=p=>{s.width=c.width,s.height=c.height,s.getContext("2d").drawImage(c,0,0,c.width,c.height),s.toBlob(m=>{if(m){const _=document.createElement("a");_.href=window.URL.createObjectURL(m),_.download=yo(e),_.click(),URL.revokeObjectURL(_.href),r(!0)}},"image/jpeg")},c.onerror=p=>i(p)}})}function ls(e){const t=new Date().getTime();let n=new Date().getTime();for(;n-t<e;)n=new Date().getTime();console.log(`\u5F3A\u5236\u7B49\u5F85${wo}\u6BEB\u79D2`)}function wo(e){return new Promise(t=>setTimeout(t,e))}var bo,_o,hn,Gt={},hs={get exports(){return Gt},set exports(e){Gt=e}};_o=zt,hn=function(){var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),o=["trace","debug","info","warn","error"];function r(I,S){var u=I[S];if(typeof u.bind=="function")return u.bind(I);try{return Function.prototype.bind.call(u,I)}catch{return function(){return Function.prototype.apply.apply(u,[I,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function s(I){return I==="debug"&&(I="log"),typeof console!==t&&(I==="trace"&&n?i:console[I]!==void 0?r(console,I):console.log!==void 0?r(console,"log"):e)}function c(I,S){for(var u=0;u<o.length;u++){var g=o[u];this[g]=u<I?e:this.methodFactory(g,I,S)}this.log=this.debug}function p(I,S,u){return function(){typeof console!==t&&(c.call(this,S,u),this[I].apply(this,arguments))}}function m(I,S,u){return s(I)||p.apply(this,arguments)}function _(I,S,u){var g,f=this;S=S??"WARN";var d="loglevel";function y(){var T;if(typeof window!==t&&d){try{T=window.localStorage[d]}catch{}if(typeof T===t)try{var D=window.document.cookie,B=D.indexOf(encodeURIComponent(d)+"=");B!==-1&&(T=/^([^;]+)/.exec(D.slice(B))[1])}catch{}return f.levels[T]===void 0&&(T=void 0),T}}typeof I=="string"?d+=":"+I:typeof I=="symbol"&&(d=void 0),f.name=I,f.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},f.methodFactory=u||m,f.getLevel=function(){return g},f.setLevel=function(T,D){if(typeof T=="string"&&f.levels[T.toUpperCase()]!==void 0&&(T=f.levels[T.toUpperCase()]),!(typeof T=="number"&&T>=0&&T<=f.levels.SILENT))throw"log.setLevel() called with invalid level: "+T;if(g=T,D!==!1&&function(B){var j=(o[B]||"silent").toUpperCase();if(typeof window!==t&&d){try{return void(window.localStorage[d]=j)}catch{}try{window.document.cookie=encodeURIComponent(d)+"="+j+";"}catch{}}}(T),c.call(f,T,I),typeof console===t&&T<f.levels.SILENT)return"No console available for logging"},f.setDefaultLevel=function(T){S=T,y()||f.setLevel(T,!1)},f.resetLevel=function(){f.setLevel(S,!1),function(){if(typeof window!==t&&d){try{return void window.localStorage.removeItem(d)}catch{}try{window.document.cookie=encodeURIComponent(d)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}()},f.enableAll=function(T){f.setLevel(f.levels.TRACE,T)},f.disableAll=function(T){f.setLevel(f.levels.SILENT,T)};var $=y();$==null&&($=S),f.setLevel($,!1)}var C=new _,M={};C.getLogger=function(I){if(typeof I!="symbol"&&typeof I!="string"||I==="")throw new TypeError("You must supply a name when creating a logger.");var S=M[I];return S||(S=M[I]=new _(I,C.getLevel(),C.methodFactory)),S};var N=typeof window!==t?window.log:void 0;return C.noConflict=function(){return typeof window!==t&&window.log===C&&(window.log=N),C},C.getLoggers=function(){return M},C.default=C,C},(bo=hs).exports?bo.exports=hn():_o.log=hn();let So=!1;const L={Config:SysConfig,EventBus:Ut,DefaultProxyClient:null,Axios:Si,Logger:e=>{So||(import.meta.env.DEV||SysConfig.UI.ProductLog?Gt.enableAll():Gt.setDefaultLevel("warn"),So=!0);const t=e||"default";return Gt.getLogger(t)}},Co="access_token",yt=new le("user",localStorage);function Mt(){return yt.get(Co)}function un(){yt.remove(Co)}function Eo(){return Mt()?.refresh}function dn(e,t,n,o="json",r){const i={baseURL:L.Config.ServiceURL.DefaultWebAPI,timeout:6e4,params:e,paramsSerializer:{serialize:function(s){return Ci.stringify(s,{indices:!1,arrayFormat:"repeat"})}},headers:{"Content-Type":"application/json",Authorization:"bearer "+Mt()?.token},responseType:o,cancelToken:r};if(n)for(let s in n)i.headers[s]=n[s];return L.SystemID&&(i.headers.sysid=L.SystemID,L.SystemGroup&&(i.headers.sysgroup=L.SystemGroup)),t&&(i.baseURL=t),i}function wt(e,t,n,o,r="json",i,s){const c=dn(n,t,o,r,i);return s&&s>=2e4&&(c.timeout=s),L.Axios?.get(e,c).catch(function(p){pe(p,t,e,"Get")})}function pe(e,t,n,o="Get"){const r=`${t}${n}`;if(e&&e.response){let i=!1;const s=e.response.status;switch(s){case 400:e.message="\u9519\u8BEF\u8BF7\u6C42";break;case 401:e.message="\u672A\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55";break;case 403:e.message="\u62D2\u7EDD\u8BBF\u95EE";break;case 404:e.message="\u8BF7\u6C42\u9519\u8BEF,\u672A\u627E\u5230\u8BE5\u8D44\u6E90";break;case 405:e.message="\u8BF7\u6C42\u65B9\u6CD5\u672A\u5141\u8BB8";break;case 408:e.message="\u8BF7\u6C42\u8D85\u65F6";break;case 500:const p=e.response.data;if(p){const m=p.indexOf(":"),_=p.indexOf(`
|
|
2
|
+
`);if(m>0&&_-m>2){const C=p.substring(m+2,_);C.indexOf("System.Exception")>0?e.message="\u540E\u53F0\u670D\u52A1\u5185\u90E8\u51FA\u9519\uFF01":(i=!0,e.message=C)}}else e.message="\u670D\u52A1\u5668\u7AEF\u51FA\u9519";break;case 501:e.message="\u7F51\u7EDC\u672A\u5B9E\u73B0";break;case 502:e.message="\u7F51\u7EDC\u9519\u8BEF";break;case 503:e.message="\u670D\u52A1\u4E0D\u53EF\u7528";break;case 504:e.message="\u7F51\u7EDC\u8D85\u65F6";break;case 505:e.message="http\u7248\u672C\u4E0D\u652F\u6301\u8BE5\u8BF7\u6C42";break;default:e.message=`\u8FDE\u63A5\u9519\u8BEF${e.response.status}`}let c={address:r,code:s,isExceptionInfo:i,message:e.message,result:e.response.data};if(L.EventBus.emit(st.AxiosRequestErrorEvent,c),i)throw new Error(e.message)}else{if(e?.message)throw new Error(e.message);console.error(e,"Http\u8BF7\u6C42\u9519\u8BEF!")}}function xo(e,t,n,o,r,i="json",s){const c=dn(o,t,r,i);s&&s>=2e4&&(c.timeout=s),c.headers["Content-Type"]="multipart/form-data";const p=function(m){let _=new FormData;return m&&Object.keys(m).forEach(C=>{if(!m)return;let M=m[C];M!=null&&(tn(M)?M.forEach(N=>{_.append(C,Io(N))}):_.append(C,Io(M)))}),_}(n);return L.Axios?.post(e,p,c).catch(function(m){pe(m,t,e,"Post")})}function ko(e,t,n,o,r,i="json",s){const c=dn(o,t,r,i);return s&&s>=2e4&&(c.timeout=s),L.Axios?.post(e,n,c).catch(function(p){pe(p,t,e,"Post")})}function us(e,t){return wt(e,void 0,t)}function ds(e,t){return xo(e,void 0,t)}function ps(e,t){return L.Axios?.get(e,{params:t}).catch(function(n){pe(n,e,"","\u5916\u90E8Get")})}function Io(e){return e instanceof Blob?e:e.toString()}var fe={},fs={get exports(){return fe},set exports(e){fe=e}},gs=typeof window<"u"?window:zt!==void 0?zt:typeof self<"u"?self:{},ms=function(e){if(!e)return!1;var t=vs.call(e);return t==="[object Function]"||typeof e=="function"&&t!=="[object RegExp]"||typeof window<"u"&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},vs=Object.prototype.toString,pn=function(e){return e.replace(/^\s+|\s+$/g,"")},ys=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var o in n)ws.call(n,o)&&(e[o]=n[o])}return e},ws=Object.prototype.hasOwnProperty,To=gs,bs=ms,_s=function(e){if(!e)return{};for(var t,n={},o=pn(e).split(`
|
|
3
|
+
`),r=0;r<o.length;r++){var i=o[r],s=i.indexOf(":"),c=pn(i.slice(0,s)).toLowerCase(),p=pn(i.slice(s+1));n[c]===void 0?n[c]=p:(t=n[c],Object.prototype.toString.call(t)==="[object Array]"?n[c].push(p):n[c]=[n[c],p])}return n},Ss=ys;function Ro(e,t,n){var o=e;return bs(t)?(n=t,typeof e=="string"&&(o={uri:e})):o=Ss(t,{uri:e}),o.callback=n,o}function bt(e,t,n){return Po(t=Ro(e,t,n))}function Po(e){if(e.callback===void 0)throw new Error("callback argument missing");var t=!1,n=function(g,f,d){t||(t=!0,e.callback(g,f,d))};function o(){var g=void 0;if(g=p.response?p.response:p.responseText||function(f){try{if(f.responseType==="document")return f.responseXML;var d=f.responseXML&&f.responseXML.documentElement.nodeName==="parsererror";if(f.responseType===""&&!d)return f.responseXML}catch{}return null}(p),S)try{g=JSON.parse(g)}catch{}return g}function r(g){return clearTimeout(m),g instanceof Error||(g=new Error(""+(g||"Unknown XMLHttpRequest Error"))),g.statusCode=0,n(g,u)}function i(){if(!c){var g;clearTimeout(m),g=e.useXDR&&p.status===void 0?200:p.status===1223?204:p.status;var f=u,d=null;return g!==0?(f={body:o(),statusCode:g,method:C,headers:{},url:_,rawRequest:p},p.getAllResponseHeaders&&(f.headers=_s(p.getAllResponseHeaders()))):d=new Error("Internal XMLHttpRequest Error"),n(d,f,f.body)}}var s,c,p=e.xhr||null;p||(p=e.cors||e.useXDR?new bt.XDomainRequest:new bt.XMLHttpRequest);var m,_=p.url=e.uri||e.url,C=p.method=e.method||"GET",M=e.body||e.data,N=p.headers=e.headers||{},I=!!e.sync,S=!1,u={body:void 0,headers:{},statusCode:0,method:C,url:_,rawRequest:p};if("json"in e&&e.json!==!1&&(S=!0,N.accept||N.Accept||(N.Accept="application/json"),C!=="GET"&&C!=="HEAD"&&(N["content-type"]||N["Content-Type"]||(N["Content-Type"]="application/json"),M=JSON.stringify(e.json===!0?M:e.json))),p.onreadystatechange=function(){p.readyState===4&&setTimeout(i,0)},p.onload=i,p.onerror=r,p.onprogress=function(){},p.onabort=function(){c=!0},p.ontimeout=r,p.open(C,_,!I,e.username,e.password),I||(p.withCredentials=!!e.withCredentials),!I&&e.timeout>0&&(m=setTimeout(function(){if(!c){c=!0,p.abort("timeout");var g=new Error("XMLHttpRequest timeout");g.code="ETIMEDOUT",r(g)}},e.timeout)),p.setRequestHeader)for(s in N)N.hasOwnProperty(s)&&p.setRequestHeader(s,N[s]);else if(e.headers&&!function(g){for(var f in g)if(g.hasOwnProperty(f))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(p.responseType=e.responseType),"beforeSend"in e&&typeof e.beforeSend=="function"&&e.beforeSend(p),p.send(M||null),p}fs.exports=bt,fe.default=bt,bt.XMLHttpRequest=To.XMLHttpRequest||function(){},bt.XDomainRequest="withCredentials"in new bt.XMLHttpRequest?bt.XMLHttpRequest:To.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],function(e){bt[e==="delete"?"del":e]=function(t,n,o){return(n=Ro(t,n,o)).method=e.toUpperCase(),Po(n)}});const Cs=[200,201,202,204,308],Es=[408,502,503,504];class zo{endpoint;file;headers;method;chunkSize;attempts;delayBeforeAttempt;md5;chunk;chunkCount;chunkByteSize;maxFileBytes;endpointValue;totalChunks;attemptCount;offline;paused;success;currentXhr;reader;eventTarget;fileName;constructor(t){this.endpoint=t.endpoint,this.file=t.file,this.fileName=encodeURI(this.file.name),this.headers=t.headers||{},this.method=t.method||"PUT",this.chunkSize=t.chunkSize||5120,this.attempts=t.attempts||5,this.delayBeforeAttempt=t.delayBeforeAttempt||1,this.md5=t.md5||"",this.maxFileBytes=1024*(t.maxFileSize||0),this.chunkCount=0,this.chunkByteSize=1024*this.chunkSize,this.totalChunks=Math.ceil(this.file.size/this.chunkByteSize),this.attemptCount=0,this.offline=!1,this.paused=!1,this.success=!1,this.reader=new FileReader,this.eventTarget=ln(),this.validateOptions(),this.getEndpoint().then(()=>this.sendChunks()),typeof window<"u"&&(window.addEventListener("online",()=>{this.offline&&(this.offline=!1,this.dispatch("online"),this.sendChunks())}),window.addEventListener("offline",()=>{this.offline=!0,this.dispatch("offline")}))}on(t,n){this.eventTarget.on(t,n)}abort(){this.pause(),this.currentXhr?.abort()}pause(){this.paused=!0}resume(){this.paused&&(this.paused=!1,this.sendChunks())}dispatch(t,n){this.eventTarget.emit(t,n)}validateOptions(){if(!this.endpoint||typeof this.endpoint!="function"&&typeof this.endpoint!="string")throw new TypeError("endpoint\u5FC5\u987B\u4E3A\uFF1A\u6587\u4EF6\u4E0A\u4F20URL\u5B57\u7B26\u4E32\uFF0C\u6216\u8FD4\u56DE\u5730\u5740\u7684\u51FD\u6570\uFF01");if(!(this.file instanceof File))throw new TypeError("file\u5FC5\u987B\u4E3A\u6587\u4EF6\u5BF9\u8C61");if(this.headers&&typeof this.headers!="object")throw new TypeError("\u6587\u4EF6\u5934\u5FC5\u987B\u4E3A\u5BF9\u8C61\u6216\u7A7A\uFF01");if(this.chunkSize&&(typeof this.chunkSize!="number"||this.chunkSize<=0||this.chunkSize%256!=0))throw new TypeError("chunkSize\u5FC5\u987B\u5927\u4E8E0,\u5E76\u662F256\u7684\u6574\u6570\u500D");if(this.maxFileBytes>0&&this.maxFileBytes<this.file.size)throw new Error(`\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u6700\u5927\u5141\u8BB8\u503C\uFF1A(${this.file.size} > ${this.maxFileBytes})`);if(this.attempts&&(typeof this.attempts!="number"||this.attempts<=0))throw new TypeError("\u91CD\u8BD5\u6B21\u6570\u5FC5\u987B\u4E3A\u6B63\u6570\uFF01");if(this.delayBeforeAttempt&&(typeof this.delayBeforeAttempt!="number"||this.delayBeforeAttempt<0))throw new TypeError("\u5EF6\u65F6\u91CD\u8BD5\u65F6\u95F4\u5FC5\u987B\u4E3A\u6B63\u6570\uFF01\u9ED8\u8BA4\u4E3A1")}getEndpoint(){return typeof this.endpoint=="string"?(this.endpointValue=this.endpoint,Promise.resolve(this.endpoint)):this.endpoint(this.file).then(t=>(this.endpointValue=t,this.endpointValue))}getChunk(){return new Promise(t=>{const n=this.totalChunks===1?this.file.size:this.chunkByteSize,o=n*this.chunkCount;this.reader.onload=()=>{this.reader.result!==null&&(this.chunk=new Blob([this.reader.result],{type:"application/octet-stream"})),t(()=>{})},this.reader.readAsArrayBuffer(this.file.slice(o,o+n))})}xhrPromise(t){const n=o=>{o.upload.onprogress=r=>{const i=100/this.totalChunks,s=i*this.file.size,c=i*this.chunkCount,p=r.loaded/(r.total??s)*i;this.dispatch("progress",Math.min(c+p,100))}};return new Promise((o,r)=>{this.currentXhr=fe({...t,beforeSend:n},(i,s)=>(this.currentXhr=void 0,i?r(i):o(s)))})}sendChunk(){if(!this.chunk)return;const t=this.chunkCount*this.chunkByteSize,n=t+this.chunk.size-1,o={...this.headers,FileName:this.fileName,FileMD5:this.md5,"Content-Type":this.file.type,"Content-Range":`bytes ${t}-${n}/${this.file.size}`};if(this.dispatch("attempt",{chunkNumber:this.chunkCount,chunkSize:this.chunk.size}),this.endpointValue)return this.xhrPromise({headers:o,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(){console.log(this.paused,this.offline,this.success,"sendChunks this.paused || this.offline || this.success"),!(this.paused||this.offline||this.success)&&this.getChunk().then(()=>this.sendChunk()).then(t=>{if(this.attemptCount=this.attemptCount+1,t!=null&&Cs.includes(t.statusCode)){this.dispatch("chunkSuccess",{chunk:this.chunkCount,attempts:this.attemptCount,response:t}),this.attemptCount=0,this.chunkCount=this.chunkCount+1,this.chunkCount<this.totalChunks?this.sendChunks():(this.success=!0,this.dispatch("success"));const n=this.chunkCount/this.totalChunks*this.file.size*100/this.file.size;this.dispatch("progress",n)}else if(t!=null&&Es.includes(t.statusCode)){if(this.paused||this.offline)return;this.manageRetries()}else{if(this.paused||this.offline)return;console.log(`\u670D\u52A1\u5668\u9519\u8BEF:${t?.statusCode}\uFF0C\u505C\u6B62\u4E0A\u4F20\u3002`),this.dispatch("error",{message:`\u670D\u52A1\u5668\u9519\u8BEF:${t?.statusCode}\uFF0C\u505C\u6B62\u4E0A\u4F20\u3002`,chunkNumber:this.chunkCount,attempts:this.attemptCount})}}).catch(t=>{this.paused||this.offline||this.manageRetries()})}}const xs=e=>new zo(e),ks=new class{hasClass(e,t){return e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}addClass(e,t){this.hasClass(e,t)||(e.className+=" "+t)}removeClass(e,t){if(this.hasClass(e,t)){const n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")}}toggleClass(e,t){this.hasClass(e,t)?this.removeClass(e,t):this.addClass(e,t)}setCSSProperty(e,t,n){e?.style.setProperty(t,n)}};class ee{hproseURL;client;hproseProxy;static httpTransport;constructor(t){if(t&&!ce.isNullOrEmpty(t)){if(ee.httpTransport||(ee.httpTransport=new xi),this.client=new Ei(t),!this.client)throw Error("Hprose Client\u521D\u59CB\u5316\u9519\u8BEF");this.hproseURL=t,this.init()}}init(){this.client&&this.client.useServiceAsync().then(t=>{this.hproseProxy=t}).catch(t=>{String(t).indexOf("find this method ~")>0?(this.hproseProxy=this.client?.useService(),console.warn("\u65E7\u7248\u672C\u4E0D\u652F\u6301useServiceAsync")):Ut.emit(st.HproseServiceErrorEvent,"\u521D\u59CB\u5316\u9ED8\u8BA4Hprose!"),console.warn(t)})}async getProxy(){if(!this.hproseProxy)try{this.client&&(this.hproseProxy=await this.client.useServiceAsync())}catch(t){console.warn(t),this.hproseProxy=this.client?.useService()}return this.hproseProxy}async invoke(t,n,o){if(this.client)return await this.client.invoke(t,n,o)}encode(t,n,o){if(this.client)return this.client.codec.encode(t,n,o)}decode(t,n){if(this.client)return this.client.codec.decode(t,n)}}class Xt{hproseClient;hpProxyObj;defaultContext=new Je;constructor(t){this.hproseClient=new ee(t),this.hpProxyObj=null}getClientContext(t,n){const o={};n&&(o.requestHeaders=n);const r=Mt();o.httpRequestHeaders=t||{};const i=o.httpRequestHeaders;return r&&(i.token=r.token),L.SystemID&&(i.sysid=L.SystemID,L.SystemGroup&&(i.sysgroup=L.SystemGroup)),new Je(o)}async getHproseProxy(){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");if(!this.hpProxyObj){const t=await this.hproseClient.getProxy();this.hpProxyObj=t}return this.hpProxyObj||Ut.emit(st.HproseServiceErrorEvent,"HproseProxy\u5BF9\u8C61\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5\uFF01"),this.hpProxyObj}async hproseInvoke(t,n,o){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");return await this.hproseClient.invoke(t,n,o)}async hproseInvokeContext(t,n,...o){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");const r=Mt();return console.log(r,"userToken3"),r&&(n||(n=new Je({httpRequestHeaders:{token:r.token}}))),await this.hproseClient.invoke(t,o,n)}async hproseInvokeEncode(t){const n=new fo(t).toBytes(),o=await this.hproseClient.client?.request(n,this.defaultContext);return o&&this.hproseClient.client?.codec.decode(o,this.defaultContext)}encodeRequest(t,...n){const o=this.hproseClient.client?.codec?.encode(t,n,this.defaultContext);return fo.toString(o)}}class Is{message;eventBus;constructor(t,n){t&&(this.message=t),n&&(this.eventBus=n)}msg(t,n=3,o="success"){if(this.message)if(typeof this.message=="function")this.message({type:o,message:t,duration:n});else switch(o){case"info":this.message.info(t,n);break;case"success":this.message.success(t,n);break;case"warning":this.message.warn?this.message.warn(t,n):this.message.warning&&this.message.warning(t,n);break;case"error":this.message.error(t,n)}else{switch(o){case"info":case"success":console.log(t);break;case"warning":console.warn(t);break;case"error":o="dark",console.error(t)}this.eventBus&&this.eventBus.emit(st.AlertInfoEvent,{type:o,info:t})}}info(t,n=3){this.msg(t,n,"info")}warn(t,n=3){this.msg(t,n,"warning")}err(t,n=3){this.msg(t,n,"error")}success(t,n=3){this.msg(t,n,"success")}}const fn=new Map,Ts=function(e,t,n){!L.Config.DefaultHproseAPI&&L.Config.ServiceURL&&(L.Config.DefaultHproseAPI=L.Config.ServiceURL.DefaultHproseAPI),L.Config.DefaultHproseAPI&&ce.isNotEmpty(L.Config.DefaultHproseAPI)&&(L.DefaultProxyClient=new Xt(L.Config.DefaultHproseAPI));const o=L.Config.UI.GrayMode;o&&ut.setGrayMode(o);const r=new Is(e,L.EventBus);L.Message=r,L.SystemID=t,L.SystemGroup=n,L.EventBus.on(st.HproseServiceErrorEvent,i=>{const s=`\u5F53\u524D\u540E\u53F0\u4E1A\u52A1\u670D\u52A1\u4E0D\u53EF\u7528!${i}`;console.warn("Hprose\u8BF7\u6C42\u9519\u8BEF",s)}),L.EventBus.on(st.WebAPIErrorEvent,i=>{const s=`WebAPI\u540E\u53F0\u670D\u52A1\u4E0D\u53EF\u7528!${i}`;console.warn("WebAPI\u8BF7\u6C42\u9519\u8BEF",s)}),L.EventBus.on(st.AxiosRequestErrorEvent,i=>{const s=`Http\u8BF7\u6C42'${i.code}'\u9519\u8BEF: ${i.message}`;console.warn("Http\u8BF7\u6C42\u9519\u8BEF",s)}),L.EventBus.on(st.CommonWarnEvent,i=>{r.warn(i)})};function Do(e){if(e&&ce.isNotEmpty(e)){if(fn.has(e))return fn.get(e);{const t=new Xt(e);return fn.set(e,t),t}}}function Rs(e){const t=Do(e);return t&&(L.DefaultProxyClient=t),t}const gn="is_LockScreen",Mo=yt.get(gn,!1),Vt={isLock:Mo,lockTime:Mo=="true"?Ao():0};function $o(e){Vt.isLock=e,yt.set(gn,e,10),e&&(un(),console.log("\u9501\u5C4F\u4E86\u2026\u2026"))}function Ps(){return yt.get(gn,!1)}function Ao(){let e=3600;return L.Config.UI?.LockTime&&L.Config.UI?.LockTime>=10&&(e=L.Config.UI.LockTime),e}let mn;function vn(){clearInterval(mn),!(window.location.href.indexOf("/login")>0||Vt.isLock)&&($o(!1),Vt.lockTime=Ao(),mn=setInterval(()=>{if(Vt.lockTime--,Vt.lockTime<=0)return $o(!0),clearInterval(mn)},1e3))}function zs(){vn(),document.addEventListener("mousedown",vn)}function Ds(){document.removeEventListener("mousedown",vn)}function yn(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var wn={},Ms={get exports(){return wn},set exports(e){wn=e}};Ms.exports=function e(t,n,o){function r(c,p){if(!n[c]){if(!t[c]){if(!p&&yn)return yn(c);if(i)return i(c,!0);var m=new Error("Cannot find module '"+c+"'");throw m.code="MODULE_NOT_FOUND",m}var _=n[c]={exports:{}};t[c][0].call(_.exports,function(C){var M=t[c][1][C];return r(M||C)},_,_.exports,e,t,n,o)}return n[c].exports}for(var i=yn,s=0;s<o.length;s++)r(o[s]);return r}({1:[function(e,t,n){(function(o){var r,i,s=o.MutationObserver||o.WebKitMutationObserver;if(s){var c=0,p=new s(M),m=o.document.createTextNode("");p.observe(m,{characterData:!0}),r=function(){m.data=c=++c%2}}else if(o.setImmediate||o.MessageChannel===void 0)r="document"in o&&"onreadystatechange"in o.document.createElement("script")?function(){var I=o.document.createElement("script");I.onreadystatechange=function(){M(),I.onreadystatechange=null,I.parentNode.removeChild(I),I=null},o.document.documentElement.appendChild(I)}:function(){setTimeout(M,0)};else{var _=new o.MessageChannel;_.port1.onmessage=M,r=function(){_.port2.postMessage(0)}}var C=[];function M(){var I,S;i=!0;for(var u=C.length;u;){for(S=C,C=[],I=-1;++I<u;)S[I]();u=C.length}i=!1}function N(I){C.push(I)!==1||i||r()}t.exports=N}).call(this,zt!==void 0?zt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(e,t,n){var o=e(1);function r(){}var i={},s=["REJECTED"],c=["FULFILLED"],p=["PENDING"];function m(d){if(typeof d!="function")throw new TypeError("resolver must be a function");this.state=p,this.queue=[],this.outcome=void 0,d!==r&&N(this,d)}function _(d,y,$){this.promise=d,typeof y=="function"&&(this.onFulfilled=y,this.callFulfilled=this.otherCallFulfilled),typeof $=="function"&&(this.onRejected=$,this.callRejected=this.otherCallRejected)}function C(d,y,$){o(function(){var T;try{T=y($)}catch(D){return i.reject(d,D)}T===d?i.reject(d,new TypeError("Cannot resolve promise with itself")):i.resolve(d,T)})}function M(d){var y=d&&d.then;if(d&&(typeof d=="object"||typeof d=="function")&&typeof y=="function")return function(){y.apply(d,arguments)}}function N(d,y){var $=!1;function T(O){$||($=!0,i.reject(d,O))}function D(O){$||($=!0,i.resolve(d,O))}function B(){y(D,T)}var j=I(B);j.status==="error"&&T(j.value)}function I(d,y){var $={};try{$.value=d(y),$.status="success"}catch(T){$.status="error",$.value=T}return $}function S(d){return d instanceof this?d:i.resolve(new this(r),d)}function u(d){var y=new this(r);return i.reject(y,d)}function g(d){var y=this;if(Object.prototype.toString.call(d)!=="[object Array]")return this.reject(new TypeError("must be an array"));var $=d.length,T=!1;if(!$)return this.resolve([]);for(var D=new Array($),B=0,j=-1,O=new this(r);++j<$;)F(d[j],j);return O;function F(lt,Q){function nt(Y){D[Q]=Y,++B!==$||T||(T=!0,i.resolve(O,D))}y.resolve(lt).then(nt,function(Y){T||(T=!0,i.reject(O,Y))})}}function f(d){var y=this;if(Object.prototype.toString.call(d)!=="[object Array]")return this.reject(new TypeError("must be an array"));var $=d.length,T=!1;if(!$)return this.resolve([]);for(var D=-1,B=new this(r);++D<$;)j(d[D]);return B;function j(O){y.resolve(O).then(function(F){T||(T=!0,i.resolve(B,F))},function(F){T||(T=!0,i.reject(B,F))})}}t.exports=m,m.prototype.catch=function(d){return this.then(null,d)},m.prototype.then=function(d,y){if(typeof d!="function"&&this.state===c||typeof y!="function"&&this.state===s)return this;var $=new this.constructor(r);return this.state!==p?C($,this.state===c?d:y,this.outcome):this.queue.push(new _($,d,y)),$},_.prototype.callFulfilled=function(d){i.resolve(this.promise,d)},_.prototype.otherCallFulfilled=function(d){C(this.promise,this.onFulfilled,d)},_.prototype.callRejected=function(d){i.reject(this.promise,d)},_.prototype.otherCallRejected=function(d){C(this.promise,this.onRejected,d)},i.resolve=function(d,y){var $=I(M,y);if($.status==="error")return i.reject(d,$.value);var T=$.value;if(T)N(d,T);else{d.state=c,d.outcome=y;for(var D=-1,B=d.queue.length;++D<B;)d.queue[D].callFulfilled(y)}return d},i.reject=function(d,y){d.state=s,d.outcome=y;for(var $=-1,T=d.queue.length;++$<T;)d.queue[$].callRejected(y);return d},m.resolve=S,m.reject=u,m.all=g,m.race=f},{1:1}],3:[function(e,t,n){(function(o){typeof o.Promise!="function"&&(o.Promise=e(2))}).call(this,zt!==void 0?zt:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(e,t,n){var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function r(a,l){if(!(a instanceof l))throw new TypeError("Cannot call a class as a function")}function i(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var s=i();function c(){try{if(!s||!s.open)return!1;var a=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),l=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!a||l)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function p(a,l){a=a||[],l=l||{};try{return new Blob(a,l)}catch(v){if(v.name!=="TypeError")throw v;for(var h=new(typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder),w=0;w<a.length;w+=1)h.append(a[w]);return h.getBlob(l.type)}}typeof Promise>"u"&&e(3);var m=Promise;function _(a,l){l&&a.then(function(h){l(null,h)},function(h){l(h)})}function C(a,l,h){typeof l=="function"&&a.then(l),typeof h=="function"&&a.catch(h)}function M(a){return typeof a!="string"&&(console.warn(a+" used as a key, but it is not a string."),a=String(a)),a}function N(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var I="local-forage-detect-blob-support",S=void 0,u={},g=Object.prototype.toString,f="readonly",d="readwrite";function y(a){for(var l=a.length,h=new ArrayBuffer(l),w=new Uint8Array(h),v=0;v<l;v++)w[v]=a.charCodeAt(v);return h}function $(a){return new m(function(l){var h=a.transaction(I,d),w=p([""]);h.objectStore(I).put(w,"key"),h.onabort=function(v){v.preventDefault(),v.stopPropagation(),l(!1)},h.oncomplete=function(){var v=navigator.userAgent.match(/Chrome\/(\d+)/),b=navigator.userAgent.match(/Edge\//);l(b||!v||parseInt(v[1],10)>=43)}}).catch(function(){return!1})}function T(a){return typeof S=="boolean"?m.resolve(S):$(a).then(function(l){return S=l})}function D(a){var l=u[a.name],h={};h.promise=new m(function(w,v){h.resolve=w,h.reject=v}),l.deferredOperations.push(h),l.dbReady?l.dbReady=l.dbReady.then(function(){return h.promise}):l.dbReady=h.promise}function B(a){var l=u[a.name].deferredOperations.pop();if(l)return l.resolve(),l.promise}function j(a,l){var h=u[a.name].deferredOperations.pop();if(h)return h.reject(l),h.promise}function O(a,l){return new m(function(h,w){if(u[a.name]=u[a.name]||jn(),a.db){if(!l)return h(a.db);D(a),a.db.close()}var v=[a.name];l&&v.push(a.version);var b=s.open.apply(s,v);l&&(b.onupgradeneeded=function(E){var k=b.result;try{k.createObjectStore(a.storeName),E.oldVersion<=1&&k.createObjectStore(I)}catch(R){if(R.name!=="ConstraintError")throw R;console.warn('The database "'+a.name+'" has been upgraded from version '+E.oldVersion+" to version "+E.newVersion+', but the storage "'+a.storeName+'" already exists.')}}),b.onerror=function(E){E.preventDefault(),w(b.error)},b.onsuccess=function(){var E=b.result;E.onversionchange=function(k){k.target.close()},h(E),B(a)}})}function F(a){return O(a,!1)}function lt(a){return O(a,!0)}function Q(a,l){if(!a.db)return!0;var h=!a.db.objectStoreNames.contains(a.storeName),w=a.version<a.db.version,v=a.version>a.db.version;if(w&&(a.version!==l&&console.warn('The database "'+a.name+`" can't be downgraded from version `+a.db.version+" to version "+a.version+"."),a.version=a.db.version),v||h){if(h){var b=a.db.version+1;b>a.version&&(a.version=b)}return!0}return!1}function nt(a){return new m(function(l,h){var w=new FileReader;w.onerror=h,w.onloadend=function(v){var b=btoa(v.target.result||"");l({__local_forage_encoded_blob:!0,data:b,type:a.type})},w.readAsBinaryString(a)})}function Y(a){return p([y(atob(a.data))],{type:a.type})}function gt(a){return a&&a.__local_forage_encoded_blob}function ne(a){var l=this,h=l._initReady().then(function(){var w=u[l._dbInfo.name];if(w&&w.dbReady)return w.dbReady});return C(h,a,a),h}function Be(a){D(a);for(var l=u[a.name],h=l.forages,w=0;w<h.length;w++){var v=h[w];v._dbInfo.db&&(v._dbInfo.db.close(),v._dbInfo.db=null)}return a.db=null,F(a).then(function(b){return a.db=b,Q(a)?lt(a):b}).then(function(b){a.db=l.db=b;for(var E=0;E<h.length;E++)h[E]._dbInfo.db=b}).catch(function(b){throw j(a,b),b})}function pt(a,l,h,w){w===void 0&&(w=1);try{var v=a.db.transaction(a.storeName,l);h(null,v)}catch(b){if(w>0&&(!a.db||b.name==="InvalidStateError"||b.name==="NotFoundError"))return m.resolve().then(function(){if(!a.db||b.name==="NotFoundError"&&!a.db.objectStoreNames.contains(a.storeName)&&a.version<=a.db.version)return a.db&&(a.version=a.db.version+1),lt(a)}).then(function(){return Be(a).then(function(){pt(a,l,h,w-1)})}).catch(h);h(b)}}function jn(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function mr(a){var l=this,h={db:null};if(a)for(var w in a)h[w]=a[w];var v=u[h.name];v||(v=jn(),u[h.name]=v),v.forages.push(l),l._initReady||(l._initReady=l.ready,l.ready=ne);var b=[];function E(){return m.resolve()}for(var k=0;k<v.forages.length;k++){var R=v.forages[k];R!==l&&b.push(R._initReady().catch(E))}var P=v.forages.slice(0);return m.all(b).then(function(){return h.db=v.db,F(h)}).then(function(z){return h.db=z,Q(h,l._defaultConfig.version)?lt(h):z}).then(function(z){h.db=v.db=z,l._dbInfo=h;for(var A=0;A<P.length;A++){var U=P[A];U!==l&&(U._dbInfo.db=h.db,U._dbInfo.version=h.version)}})}function vr(a,l){var h=this;a=M(a);var w=new m(function(v,b){h.ready().then(function(){pt(h._dbInfo,f,function(E,k){if(E)return b(E);try{var R=k.objectStore(h._dbInfo.storeName).get(a);R.onsuccess=function(){var P=R.result;P===void 0&&(P=null),gt(P)&&(P=Y(P)),v(P)},R.onerror=function(){b(R.error)}}catch(P){b(P)}})}).catch(b)});return _(w,l),w}function yr(a,l){var h=this,w=new m(function(v,b){h.ready().then(function(){pt(h._dbInfo,f,function(E,k){if(E)return b(E);try{var R=k.objectStore(h._dbInfo.storeName).openCursor(),P=1;R.onsuccess=function(){var z=R.result;if(z){var A=z.value;gt(A)&&(A=Y(A));var U=a(A,z.key,P++);U!==void 0?v(U):z.continue()}else v()},R.onerror=function(){b(R.error)}}catch(z){b(z)}})}).catch(b)});return _(w,l),w}function wr(a,l,h){var w=this;a=M(a);var v=new m(function(b,E){var k;w.ready().then(function(){return k=w._dbInfo,g.call(l)==="[object Blob]"?T(k.db).then(function(R){return R?l:nt(l)}):l}).then(function(R){pt(w._dbInfo,d,function(P,z){if(P)return E(P);try{var A=z.objectStore(w._dbInfo.storeName);R===null&&(R=void 0);var U=A.put(R,a);z.oncomplete=function(){R===void 0&&(R=null),b(R)},z.onabort=z.onerror=function(){var H=U.error?U.error:U.transaction.error;E(H)}}catch(H){E(H)}})}).catch(E)});return _(v,h),v}function br(a,l){var h=this;a=M(a);var w=new m(function(v,b){h.ready().then(function(){pt(h._dbInfo,d,function(E,k){if(E)return b(E);try{var R=k.objectStore(h._dbInfo.storeName).delete(a);k.oncomplete=function(){v()},k.onerror=function(){b(R.error)},k.onabort=function(){var P=R.error?R.error:R.transaction.error;b(P)}}catch(P){b(P)}})}).catch(b)});return _(w,l),w}function _r(a){var l=this,h=new m(function(w,v){l.ready().then(function(){pt(l._dbInfo,d,function(b,E){if(b)return v(b);try{var k=E.objectStore(l._dbInfo.storeName).clear();E.oncomplete=function(){w()},E.onabort=E.onerror=function(){var R=k.error?k.error:k.transaction.error;v(R)}}catch(R){v(R)}})}).catch(v)});return _(h,a),h}function Sr(a){var l=this,h=new m(function(w,v){l.ready().then(function(){pt(l._dbInfo,f,function(b,E){if(b)return v(b);try{var k=E.objectStore(l._dbInfo.storeName).count();k.onsuccess=function(){w(k.result)},k.onerror=function(){v(k.error)}}catch(R){v(R)}})}).catch(v)});return _(h,a),h}function Cr(a,l){var h=this,w=new m(function(v,b){a<0?v(null):h.ready().then(function(){pt(h._dbInfo,f,function(E,k){if(E)return b(E);try{var R=k.objectStore(h._dbInfo.storeName),P=!1,z=R.openKeyCursor();z.onsuccess=function(){var A=z.result;A?a===0||P?v(A.key):(P=!0,A.advance(a)):v(null)},z.onerror=function(){b(z.error)}}catch(A){b(A)}})}).catch(b)});return _(w,l),w}function Er(a){var l=this,h=new m(function(w,v){l.ready().then(function(){pt(l._dbInfo,f,function(b,E){if(b)return v(b);try{var k=E.objectStore(l._dbInfo.storeName).openKeyCursor(),R=[];k.onsuccess=function(){var P=k.result;P?(R.push(P.key),P.continue()):w(R)},k.onerror=function(){v(k.error)}}catch(P){v(P)}})}).catch(v)});return _(h,a),h}function xr(a,l){l=N.apply(this,arguments);var h=this.config();(a=typeof a!="function"&&a||{}).name||(a.name=a.name||h.name,a.storeName=a.storeName||h.storeName);var w,v=this;if(a.name){var b=a.name===h.name&&v._dbInfo.db?m.resolve(v._dbInfo.db):F(a).then(function(E){var k=u[a.name],R=k.forages;k.db=E;for(var P=0;P<R.length;P++)R[P]._dbInfo.db=E;return E});w=a.storeName?b.then(function(E){if(E.objectStoreNames.contains(a.storeName)){var k=E.version+1;D(a);var R=u[a.name],P=R.forages;E.close();for(var z=0;z<P.length;z++){var A=P[z];A._dbInfo.db=null,A._dbInfo.version=k}var U=new m(function(H,W){var Z=s.open(a.name,k);Z.onerror=function(mt){Z.result.close(),W(mt)},Z.onupgradeneeded=function(){Z.result.deleteObjectStore(a.storeName)},Z.onsuccess=function(){var mt=Z.result;mt.close(),H(mt)}});return U.then(function(H){R.db=H;for(var W=0;W<P.length;W++){var Z=P[W];Z._dbInfo.db=H,B(Z._dbInfo)}}).catch(function(H){throw(j(a,H)||m.resolve()).catch(function(){}),H})}}):b.then(function(E){D(a);var k=u[a.name],R=k.forages;E.close();for(var P=0;P<R.length;P++)R[P]._dbInfo.db=null;var z=new m(function(A,U){var H=s.deleteDatabase(a.name);H.onerror=function(){var W=H.result;W&&W.close(),U(H.error)},H.onblocked=function(){console.warn('dropInstance blocked for database "'+a.name+'" until all open connections are closed')},H.onsuccess=function(){var W=H.result;W&&W.close(),A(W)}});return z.then(function(A){k.db=A;for(var U=0;U<R.length;U++)B(R[U]._dbInfo)}).catch(function(A){throw(j(a,A)||m.resolve()).catch(function(){}),A})})}else w=m.reject("Invalid arguments");return _(w,l),w}var kr={_driver:"asyncStorage",_initStorage:mr,_support:c(),iterate:yr,getItem:vr,setItem:wr,removeItem:br,clear:_r,length:Sr,key:Cr,keys:Er,dropInstance:xr};function Ir(){return typeof openDatabase=="function"}var _t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Tr="~~local_forage_type~",Hn=/^~~local_forage_type~([^~]+)~/,oe="__lfsc__:",Ue=oe.length,Oe="arbf",je="blob",Wn="si08",Fn="ui08",qn="uic8",Gn="si16",Xn="si32",Vn="ur16",Kn="ui32",Jn="fl32",Yn="fl64",Zn=Ue+Oe.length,Qn=Object.prototype.toString;function to(a){var l,h,w,v,b,E=.75*a.length,k=a.length,R=0;a[a.length-1]==="="&&(E--,a[a.length-2]==="="&&E--);var P=new ArrayBuffer(E),z=new Uint8Array(P);for(l=0;l<k;l+=4)h=_t.indexOf(a[l]),w=_t.indexOf(a[l+1]),v=_t.indexOf(a[l+2]),b=_t.indexOf(a[l+3]),z[R++]=h<<2|w>>4,z[R++]=(15&w)<<4|v>>2,z[R++]=(3&v)<<6|63&b;return P}function He(a){var l,h=new Uint8Array(a),w="";for(l=0;l<h.length;l+=3)w+=_t[h[l]>>2],w+=_t[(3&h[l])<<4|h[l+1]>>4],w+=_t[(15&h[l+1])<<2|h[l+2]>>6],w+=_t[63&h[l+2]];return h.length%3==2?w=w.substring(0,w.length-1)+"=":h.length%3==1&&(w=w.substring(0,w.length-2)+"=="),w}function Rr(a,l){var h="";if(a&&(h=Qn.call(a)),a&&(h==="[object ArrayBuffer]"||a.buffer&&Qn.call(a.buffer)==="[object ArrayBuffer]")){var w,v=oe;a instanceof ArrayBuffer?(w=a,v+=Oe):(w=a.buffer,h==="[object Int8Array]"?v+=Wn:h==="[object Uint8Array]"?v+=Fn:h==="[object Uint8ClampedArray]"?v+=qn:h==="[object Int16Array]"?v+=Gn:h==="[object Uint16Array]"?v+=Vn:h==="[object Int32Array]"?v+=Xn:h==="[object Uint32Array]"?v+=Kn:h==="[object Float32Array]"?v+=Jn:h==="[object Float64Array]"?v+=Yn:l(new Error("Failed to get type for BinaryArray"))),l(v+He(w))}else if(h==="[object Blob]"){var b=new FileReader;b.onload=function(){var E=Tr+a.type+"~"+He(this.result);l(oe+je+E)},b.readAsArrayBuffer(a)}else try{l(JSON.stringify(a))}catch(E){console.error("Couldn't convert value into a JSON string: ",a),l(null,E)}}function Pr(a){if(a.substring(0,Ue)!==oe)return JSON.parse(a);var l,h=a.substring(Zn),w=a.substring(Ue,Zn);if(w===je&&Hn.test(h)){var v=h.match(Hn);l=v[1],h=h.substring(v[0].length)}var b=to(h);switch(w){case Oe:return b;case je:return p([b],{type:l});case Wn:return new Int8Array(b);case Fn:return new Uint8Array(b);case qn:return new Uint8ClampedArray(b);case Gn:return new Int16Array(b);case Vn:return new Uint16Array(b);case Xn:return new Int32Array(b);case Kn:return new Uint32Array(b);case Jn:return new Float32Array(b);case Yn:return new Float64Array(b);default:throw new Error("Unkown type: "+w)}}var We={serialize:Rr,deserialize:Pr,stringToBuffer:to,bufferToString:He};function eo(a,l,h,w){a.executeSql("CREATE TABLE IF NOT EXISTS "+l.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],h,w)}function zr(a){var l=this,h={db:null};if(a)for(var w in a)h[w]=typeof a[w]!="string"?a[w].toString():a[w];var v=new m(function(b,E){try{h.db=openDatabase(h.name,String(h.version),h.description,h.size)}catch(k){return E(k)}h.db.transaction(function(k){eo(k,h,function(){l._dbInfo=h,b()},function(R,P){E(P)})},E)});return h.serializer=We,v}function St(a,l,h,w,v,b){a.executeSql(h,w,v,function(E,k){k.code===k.SYNTAX_ERR?E.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[l.storeName],function(R,P){P.rows.length?b(R,k):eo(R,l,function(){R.executeSql(h,w,v,b)},b)},b):b(E,k)},b)}function Dr(a,l){var h=this;a=M(a);var w=new m(function(v,b){h.ready().then(function(){var E=h._dbInfo;E.db.transaction(function(k){St(k,E,"SELECT * FROM "+E.storeName+" WHERE key = ? LIMIT 1",[a],function(R,P){var z=P.rows.length?P.rows.item(0).value:null;z&&(z=E.serializer.deserialize(z)),v(z)},function(R,P){b(P)})})}).catch(b)});return _(w,l),w}function Mr(a,l){var h=this,w=new m(function(v,b){h.ready().then(function(){var E=h._dbInfo;E.db.transaction(function(k){St(k,E,"SELECT * FROM "+E.storeName,[],function(R,P){for(var z=P.rows,A=z.length,U=0;U<A;U++){var H=z.item(U),W=H.value;if(W&&(W=E.serializer.deserialize(W)),(W=a(W,H.key,U+1))!==void 0)return void v(W)}v()},function(R,P){b(P)})})}).catch(b)});return _(w,l),w}function no(a,l,h,w){var v=this;a=M(a);var b=new m(function(E,k){v.ready().then(function(){l===void 0&&(l=null);var R=l,P=v._dbInfo;P.serializer.serialize(l,function(z,A){A?k(A):P.db.transaction(function(U){St(U,P,"INSERT OR REPLACE INTO "+P.storeName+" (key, value) VALUES (?, ?)",[a,z],function(){E(R)},function(H,W){k(W)})},function(U){if(U.code===U.QUOTA_ERR){if(w>0)return void E(no.apply(v,[a,R,h,w-1]));k(U)}})})}).catch(k)});return _(b,h),b}function $r(a,l,h){return no.apply(this,[a,l,h,1])}function Ar(a,l){var h=this;a=M(a);var w=new m(function(v,b){h.ready().then(function(){var E=h._dbInfo;E.db.transaction(function(k){St(k,E,"DELETE FROM "+E.storeName+" WHERE key = ?",[a],function(){v()},function(R,P){b(P)})})}).catch(b)});return _(w,l),w}function Lr(a){var l=this,h=new m(function(w,v){l.ready().then(function(){var b=l._dbInfo;b.db.transaction(function(E){St(E,b,"DELETE FROM "+b.storeName,[],function(){w()},function(k,R){v(R)})})}).catch(v)});return _(h,a),h}function Nr(a){var l=this,h=new m(function(w,v){l.ready().then(function(){var b=l._dbInfo;b.db.transaction(function(E){St(E,b,"SELECT COUNT(key) as c FROM "+b.storeName,[],function(k,R){var P=R.rows.item(0).c;w(P)},function(k,R){v(R)})})}).catch(v)});return _(h,a),h}function Br(a,l){var h=this,w=new m(function(v,b){h.ready().then(function(){var E=h._dbInfo;E.db.transaction(function(k){St(k,E,"SELECT key FROM "+E.storeName+" WHERE id = ? LIMIT 1",[a+1],function(R,P){var z=P.rows.length?P.rows.item(0).key:null;v(z)},function(R,P){b(P)})})}).catch(b)});return _(w,l),w}function Ur(a){var l=this,h=new m(function(w,v){l.ready().then(function(){var b=l._dbInfo;b.db.transaction(function(E){St(E,b,"SELECT key FROM "+b.storeName,[],function(k,R){for(var P=[],z=0;z<R.rows.length;z++)P.push(R.rows.item(z).key);w(P)},function(k,R){v(R)})})}).catch(v)});return _(h,a),h}function Or(a){return new m(function(l,h){a.transaction(function(w){w.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(v,b){for(var E=[],k=0;k<b.rows.length;k++)E.push(b.rows.item(k).name);l({db:a,storeNames:E})},function(v,b){h(b)})},function(w){h(w)})})}function jr(a,l){l=N.apply(this,arguments);var h=this.config();(a=typeof a!="function"&&a||{}).name||(a.name=a.name||h.name,a.storeName=a.storeName||h.storeName);var w,v=this;return w=a.name?new m(function(b){var E;E=a.name===h.name?v._dbInfo.db:openDatabase(a.name,"","",0),a.storeName?b({db:E,storeNames:[a.storeName]}):b(Or(E))}).then(function(b){return new m(function(E,k){b.db.transaction(function(R){function P(H){return new m(function(W,Z){R.executeSql("DROP TABLE IF EXISTS "+H,[],function(){W()},function(mt,Ge){Z(Ge)})})}for(var z=[],A=0,U=b.storeNames.length;A<U;A++)z.push(P(b.storeNames[A]));m.all(z).then(function(){E()}).catch(function(H){k(H)})},function(R){k(R)})})}):m.reject("Invalid arguments"),_(w,l),w}var Hr={_driver:"webSQLStorage",_initStorage:zr,_support:Ir(),iterate:Mr,getItem:Dr,setItem:$r,removeItem:Ar,clear:Lr,length:Nr,key:Br,keys:Ur,dropInstance:jr};function Wr(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function oo(a,l){var h=a.name+"/";return a.storeName!==l.storeName&&(h+=a.storeName+"/"),h}function Fr(){var a="_localforage_support_test";try{return localStorage.setItem(a,!0),localStorage.removeItem(a),!1}catch{return!0}}function qr(){return!Fr()||localStorage.length>0}function Gr(a){var l=this,h={};if(a)for(var w in a)h[w]=a[w];return h.keyPrefix=oo(a,l._defaultConfig),qr()?(l._dbInfo=h,h.serializer=We,m.resolve()):m.reject()}function Xr(a){var l=this,h=l.ready().then(function(){for(var w=l._dbInfo.keyPrefix,v=localStorage.length-1;v>=0;v--){var b=localStorage.key(v);b.indexOf(w)===0&&localStorage.removeItem(b)}});return _(h,a),h}function Vr(a,l){var h=this;a=M(a);var w=h.ready().then(function(){var v=h._dbInfo,b=localStorage.getItem(v.keyPrefix+a);return b&&(b=v.serializer.deserialize(b)),b});return _(w,l),w}function Kr(a,l){var h=this,w=h.ready().then(function(){for(var v=h._dbInfo,b=v.keyPrefix,E=b.length,k=localStorage.length,R=1,P=0;P<k;P++){var z=localStorage.key(P);if(z.indexOf(b)===0){var A=localStorage.getItem(z);if(A&&(A=v.serializer.deserialize(A)),(A=a(A,z.substring(E),R++))!==void 0)return A}}});return _(w,l),w}function Jr(a,l){var h=this,w=h.ready().then(function(){var v,b=h._dbInfo;try{v=localStorage.key(a)}catch{v=null}return v&&(v=v.substring(b.keyPrefix.length)),v});return _(w,l),w}function Yr(a){var l=this,h=l.ready().then(function(){for(var w=l._dbInfo,v=localStorage.length,b=[],E=0;E<v;E++){var k=localStorage.key(E);k.indexOf(w.keyPrefix)===0&&b.push(k.substring(w.keyPrefix.length))}return b});return _(h,a),h}function Zr(a){var l=this.keys().then(function(h){return h.length});return _(l,a),l}function Qr(a,l){var h=this;a=M(a);var w=h.ready().then(function(){var v=h._dbInfo;localStorage.removeItem(v.keyPrefix+a)});return _(w,l),w}function ti(a,l,h){var w=this;a=M(a);var v=w.ready().then(function(){l===void 0&&(l=null);var b=l;return new m(function(E,k){var R=w._dbInfo;R.serializer.serialize(l,function(P,z){if(z)k(z);else try{localStorage.setItem(R.keyPrefix+a,P),E(b)}catch(A){A.name!=="QuotaExceededError"&&A.name!=="NS_ERROR_DOM_QUOTA_REACHED"||k(A),k(A)}})})});return _(v,h),v}function ei(a,l){if(l=N.apply(this,arguments),!(a=typeof a!="function"&&a||{}).name){var h=this.config();a.name=a.name||h.name,a.storeName=a.storeName||h.storeName}var w,v=this;return w=a.name?new m(function(b){a.storeName?b(oo(a,v._defaultConfig)):b(a.name+"/")}).then(function(b){for(var E=localStorage.length-1;E>=0;E--){var k=localStorage.key(E);k.indexOf(b)===0&&localStorage.removeItem(k)}}):m.reject("Invalid arguments"),_(w,l),w}var ni={_driver:"localStorageWrapper",_initStorage:Gr,_support:Wr(),iterate:Kr,getItem:Vr,setItem:ti,removeItem:Qr,clear:Xr,length:Zr,key:Jr,keys:Yr,dropInstance:ei},oi=function(a,l){return a===l||typeof a=="number"&&typeof l=="number"&&isNaN(a)&&isNaN(l)},ri=function(a,l){for(var h=a.length,w=0;w<h;){if(oi(a[w],l))return!0;w++}return!1},ro=Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"},Wt={},io={},Nt={INDEXEDDB:kr,WEBSQL:Hr,LOCALSTORAGE:ni},ii=[Nt.INDEXEDDB._driver,Nt.WEBSQL._driver,Nt.LOCALSTORAGE._driver],re=["dropInstance"],Fe=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(re),si={description:"",driver:ii.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function ai(a,l){a[l]=function(){var h=arguments;return a.ready().then(function(){return a[l].apply(a,h)})}}function qe(){for(var a=1;a<arguments.length;a++){var l=arguments[a];if(l)for(var h in l)l.hasOwnProperty(h)&&(ro(l[h])?arguments[0][h]=l[h].slice():arguments[0][h]=l[h])}return arguments[0]}var ci=function(){function a(l){for(var h in r(this,a),Nt)if(Nt.hasOwnProperty(h)){var w=Nt[h],v=w._driver;this[h]=v,Wt[v]||this.defineDriver(w)}this._defaultConfig=qe({},si),this._config=qe({},this._defaultConfig,l),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return a.prototype.config=function(l){if((l===void 0?"undefined":o(l))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var h in l){if(h==="storeName"&&(l[h]=l[h].replace(/\W/g,"_")),h==="version"&&typeof l[h]!="number")return new Error("Database version must be a number.");this._config[h]=l[h]}return!("driver"in l)||!l.driver||this.setDriver(this._config.driver)}return typeof l=="string"?this._config[l]:this._config},a.prototype.defineDriver=function(l,h,w){var v=new m(function(b,E){try{var k=l._driver,R=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!l._driver)return void E(R);for(var P=Fe.concat("_initStorage"),z=0,A=P.length;z<A;z++){var U=P[z];if((!ri(re,U)||l[U])&&typeof l[U]!="function")return void E(R)}var H=function(){for(var Z=function(hi){return function(){var ui=new Error("Method "+hi+" is not implemented by the current driver"),so=m.reject(ui);return _(so,arguments[arguments.length-1]),so}},mt=0,Ge=re.length;mt<Ge;mt++){var Xe=re[mt];l[Xe]||(l[Xe]=Z(Xe))}};H();var W=function(Z){Wt[k]&&console.info("Redefining LocalForage driver: "+k),Wt[k]=l,io[k]=Z,b()};"_support"in l?l._support&&typeof l._support=="function"?l._support().then(W,E):W(!!l._support):W(!0)}catch(Z){E(Z)}});return C(v,h,w),v},a.prototype.driver=function(){return this._driver||null},a.prototype.getDriver=function(l,h,w){var v=Wt[l]?m.resolve(Wt[l]):m.reject(new Error("Driver not found."));return C(v,h,w),v},a.prototype.getSerializer=function(l){var h=m.resolve(We);return C(h,l),h},a.prototype.ready=function(l){var h=this,w=h._driverSet.then(function(){return h._ready===null&&(h._ready=h._initDriver()),h._ready});return C(w,l,l),w},a.prototype.setDriver=function(l,h,w){var v=this;ro(l)||(l=[l]);var b=this._getSupportedDrivers(l);function E(){v._config.driver=v.driver()}function k(z){return v._extend(z),E(),v._ready=v._initStorage(v._config),v._ready}function R(z){return function(){var A=0;function U(){for(;A<z.length;){var H=z[A];return A++,v._dbInfo=null,v._ready=null,v.getDriver(H).then(k).catch(U)}E();var W=new Error("No available storage method found.");return v._driverSet=m.reject(W),v._driverSet}return U()}}var P=this._driverSet!==null?this._driverSet.catch(function(){return m.resolve()}):m.resolve();return this._driverSet=P.then(function(){var z=b[0];return v._dbInfo=null,v._ready=null,v.getDriver(z).then(function(A){v._driver=A._driver,E(),v._wrapLibraryMethodsWithReady(),v._initDriver=R(b)})}).catch(function(){E();var z=new Error("No available storage method found.");return v._driverSet=m.reject(z),v._driverSet}),C(this._driverSet,h,w),this._driverSet},a.prototype.supports=function(l){return!!io[l]},a.prototype._extend=function(l){qe(this,l)},a.prototype._getSupportedDrivers=function(l){for(var h=[],w=0,v=l.length;w<v;w++){var b=l[w];this.supports(b)&&h.push(b)}return h},a.prototype._wrapLibraryMethodsWithReady=function(){for(var l=0,h=Fe.length;l<h;l++)ai(this,Fe[l])},a.prototype.createInstance=function(l){return new a(l)},a}(),li=new ci;t.exports=li},{3:3}]},{},[4])(4);var ge=wn,bn={},$s={get exports(){return bn},set exports(e){bn=e}};/*! streamsaver. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */(function(e){((t,n)=>{e.exports=n()})(0,()=>{const t=typeof window=="object"?window:this;t.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");let n=null,o=!1;const r=t.WebStreamsPolyfill||{},i=t.isSecureContext;let s=/constructor/i.test(t.HTMLElement)||!!t.safari||!!t.WebKitPoint;const c=i||"MozAppearance"in document.documentElement.style?"iframe":"navigate",p={createWriteStream:function(_,C,M){let N={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},I=0,S=null,u=null,g=null;if(Number.isFinite(C)?([M,C]=[C,M],console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),N.size=M,N.writableStrategy=C):C&&C.highWaterMark?(console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),N.size=M,N.writableStrategy=C):N=C||{},!s){n||(n=i?m(p.mitm):function($){const T="width=200,height=100",D=document.createDocumentFragment(),B={frame:t.open($,"popup",T),loaded:!1,isIframe:!1,isPopup:!0,remove(){B.frame.close()},addEventListener(...O){D.addEventListener(...O)},dispatchEvent(...O){D.dispatchEvent(...O)},removeEventListener(...O){D.removeEventListener(...O)},postMessage(...O){B.frame.postMessage(...O)}},j=O=>{O.source===B.frame&&(B.loaded=!0,t.removeEventListener("message",j),B.dispatchEvent(new Event("load")))};return t.addEventListener("message",j),B}(p.mitm)),u=new MessageChannel,_=encodeURIComponent(_.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const d={transferringReadable:o,pathname:N.pathname||Math.random().toString().slice(-6)+"/"+_,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+_}};N.size&&(d.headers["Content-Length"]=N.size);const y=[d,"*",[u.port2]];if(o){const $=c==="iframe"?void 0:{transform(D,B){if(!(D instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");I+=D.length,B.enqueue(D),S&&(location.href=S,S=null)},flush(){S&&(location.href=S)}};g=new p.TransformStream($,N.writableStrategy,N.readableStrategy);const T=g.readable;u.port1.postMessage({readableStream:T},[T])}u.port1.onmessage=$=>{$.data.download?c==="navigate"?(n.remove(),n=null,I?location.href=$.data.download:S=$.data.download):(n.isPopup&&(n.remove(),n=null,c==="iframe"&&m(p.mitm)),m($.data.download)):$.data.abort&&(f=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null)},n.loaded?n.postMessage(...y):n.addEventListener("load",()=>{n.postMessage(...y)},{once:!0})}let f=[];return!s&&g&&g.writable||new p.WritableStream({write(d){if(!(d instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");s?f.push(d):(u.port1.postMessage(d),I+=d.length,S&&(location.href=S,S=null))},close(){if(s){const d=new Blob(f,{type:"application/octet-stream; charset=utf-8"}),y=document.createElement("a");y.href=URL.createObjectURL(d),y.download=_,y.click()}else u.port1.postMessage("end")},abort(){f=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null}},N.writableStrategy)},WritableStream:t.WritableStream||r.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 m(_){if(!_)throw new Error("meh");const C=document.createElement("iframe");return C.hidden=!0,C.src=_,C.loaded=!1,C.name="iframe",C.isIframe=!0,C.postMessage=(...M)=>C.contentWindow.postMessage(...M),C.addEventListener("load",()=>{C.loaded=!0},{once:!0}),document.body.appendChild(C),C}try{new Response(new ReadableStream),i&&!("serviceWorker"in navigator)&&(s=!0)}catch{s=!0}return(_=>{try{_()}catch{}})(()=>{const{readable:_}=new TransformStream,C=new MessageChannel;C.port1.postMessage(_,[_]),C.port1.close(),C.port2.close(),o=!0,Object.defineProperty(p,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})}),p})})($s);var As=bn;class Ls{fileID;downloadURL;ChunkUnitM=1048576;chunkByteSize;totalChunks=1;currentDB;keys;fileMetaData=null;finishNum=0;eventTarget;cancelSource;isStarting=!1;fileName;cacheSize=6;requestTimeout=6e4;constructor(t,n,o=3,r=6,i=6e4){this.fileID=t,this.downloadURL=n,this.chunkByteSize=o*this.ChunkUnitM,this.eventTarget=ln(),this.initIndexDB(),r>=3&&(this.cacheSize=r),i>this.requestTimeout&&(this.requestTimeout=i)}on(t,n){this.eventTarget.on(t,n)}dispatch(t,n){this.eventTarget.emit(t,n)}dispatchError(t){this.eventTarget.emit("error",t)}dispatchInfo(t){this.eventTarget.emit("info",t)}async queryDownloadFileMeta(t,n="",o){this.dispatchInfo("\u5F00\u59CB\u83B7\u53D6\u6587\u4EF6\u4FE1\u606F");const r=await wt(n,t,o);let i=null;return r&&r.status===200&&(i=r.data),i}async getIFileMeta(){if(this.fileMetaData===null){const t=await this.currentDB?.getItem("fileinfo");this.fileMetaData=t||null}return this.fileMetaData}initIndexDB(){this.currentDB=ge.createInstance({name:this.fileID,driver:ge.INDEXEDDB})}async init(t){if(this.finishNum=0,t){const n="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(n,this.fileMetaData)}if(this.fileMetaData!=null){const n=this.fileMetaData.chunkSize;n!=null&&n>0&&(this.chunkByteSize=n)}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(),ge.dropInstance({name:this.fileID}),this.currentDB=void 0,this.keys&&(this.keys.length=0,this.keys=void 0),this.finishNum=0,this.downloadProgress(),this.outputProgress(0),this.dispatchInfo("\u5DF2\u5220\u9664\u4E0B\u8F7D\u4EFB\u52A1")}sleep(t){return new Promise(n=>setTimeout(n,t))}async download(t,n){let o=t;if(!o&&this.downloadURL&&(o=this.downloadURL),!o)throw Error("\u4E0B\u8F7DURL\u4E0D\u80FD\u4E3A\u7A7A!");this.currentDB||this.initIndexDB();const r=L.Axios.CancelToken;this.cancelSource=r.source(),this.isStarting=!0;const i={key:this.fileMetaData?.downloadID};let s=0;const c=this.cacheSize;let p=0;for(let m=0;m<this.totalChunks;m++){if(this.keys&&this.keys?.indexOf(m.toString())>=0){s++,s>this.finishNum&&(this.finishNum=s,this.downloadProgress());continue}const _=m*this.chunkByteSize;let C=_+this.chunkByteSize-1;this.fileMetaData&&C>this.fileMetaData.length&&(C=this.fileMetaData.length-1);const M={range:`bytes=${_}-${C}`};for(;p>=c;)await this.sleep(200);const N=m.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${m+1}/${this.totalChunks}`),p++,wt(o,n,i,M,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then(async I=>{const S=I.data;p--,await this.currentDB?.setItem(N,S),s++,s>this.finishNum&&(this.finishNum=s,this.downloadProgress());const u=parseInt(N)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${u}/${this.totalChunks}`),this.savefile()}).catch(I=>{p--;const S=parseInt(N)+1;this.dispatchError(`\u4E0B\u8F7D\u7B2C${S}\uFF09\u4E2A\u5206\u7247\u5185\u5BB9\u5931\u8D25\uFF01`)})}this.finishNum===this.totalChunks&&this.savefile()}downloadProgress(){const t=100*this.finishNum/this.totalChunks;this.dispatch("downloadProgress",t)}outputProgress(t){const n=100*t/this.totalChunks;this.dispatch("saveProgress",n)}async savefile(){if(this.finishNum===this.totalChunks){if(!this.fileName)return void this.dispatchError("\u4E0B\u8F7D\u9519\u8BEF\uFF1A\u6587\u4EF6\u540D\u4E3A\u7A7A!");this.dispatchInfo("\u5F00\u59CB\u4FDD\u5B58\u4E0B\u8F7D\u6587\u4EF6:"+this.fileName);const t=As.createWriteStream(this.fileName).getWriter();let n=0;for(let o=0;o<this.totalChunks;o++){const r=o.toString();let i=await this.currentDB?.getItem(r);if(i||(i=await this.currentDB?.getItem(r)),!i)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${o+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);let s=new Response(i).body;if(s===null)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${o+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);const c=s.getReader();for(;;){const{done:p,value:m}=await c.read();if(p)break;await t.write(m)}n++,this.outputProgress(n),this.dispatchInfo(`\u5B8C\u6210\u7B2C${o+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}t.close(),ge.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("\u5B8C\u6210\u6587\u4EF6\u4E0B\u8F7D")}}}function Ns(e,t){let n="",o="";for(const r in t)n+=r+"="+encodeURIComponent(t[r])+"&";return n=n.replace(/&$/,""),o=/\?$/.test(e)?e+n:e.replace(/\/?$/,"?")+n,o}function Lo(e={},t={}){let n;for(n in t)Pt(t[n])?e[n]=Lo(e[n],t[n]):e[n]=t[n];return e}function Bs(e,t){const n=`${e}_${t}`;return ut.MD5(n)}function No(e){const t=function(c){if(!c)return;const p=c,m=[];if(p)for(let _ of p){const C=Bo(_);C&&m.push(C)}return m}(e.bussinessRoutes),n=function(c){if(!c)return;const p=c;if(p&&p.length>0){const m=[];return p.forEach(_=>{const C=Uo(_);C&&m.push(C)}),m}}(e.widgetMenuConfig),o=function(c){if(c&&c.length>0){const p=[];return c.forEach(m=>{const _=function(C){return C?{id:C.id,label:C.label,container:C.container,preload:C.preload,afterid:C.afterid,bindid:C.bindid,group:C.group}:void 0}(m);_&&p.push(_)}),p}}(e.widgetConfig),r=function(c){if(c&&c.length>0)return c}(e.functionList),i=e.pkgObject.version,s=e.pkgObject.name;return{id:Bs(s,i),name:L.Config.UI.SiteTitle,group:L.Config.UI.Group,product:s,version:i,routes:t,widgetMenu:n,widgets:o,functions:r}}function Bo(e){if(e){let t=0;e.meta?.hidden&&(t=1);let n={path:e.path,name:e.name,title:e.meta?.title,type:t,index:e.meta?.index};if(e.children){const o=[];for(let r of e.children){const i=Bo(r);i&&o.push(i)}o.length>0&&(n.children=o)}return n}}function Uo(e){if(!e)return;const t={name:e.name,index:e.index,path:e.path,type:e.type};return e.children&&e.children.length>0&&(t.children=[],e.children.forEach(n=>{const o=Uo(n);o&&t.children?.push(o)})),t}function Us(e,t="IconifyList.ts"){let n="",o=`const iconlist={
|
|
4
|
+
`,r=0;e.forEach(i=>{const s=i.split(":");if(s&&s.length===2){const c="icon"+r;n+=`import ${c} from '~icons/${s[0]}/${s[1]}'
|
|
5
|
+
`,o+=` '${i}':${c},
|
|
6
|
+
`,r++}}),r>0&&(o+=`};
|
|
7
|
+
`,de(n+o+"export default iconlist;","IconifyList.ts"))}function Os(e,t){const n=No(e);vo(n,t),L.Message?.msg("\u5BFC\u51FA\u7CFB\u7EDF\u529F\u80FD\u6743\u9650\u6587\u4EF6\u6210\u529F\uFF01")}function js(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[^\d]/g,""),t=t.replace(/^0/g,""),t=t.replace(/^[1-9]\d\d{1,3}$/,"100"),t}function Hs(e){let t=_n(e);return t=t.replace(/^[1-9]\d\d{1,3}$/,"100"),t=t.replace(/^100\.$/,"100"),t}function _n(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[^\d.]/g,""),t=t.replace(/^0{2}$/g,"0"),t=t.replace(/^\./g,""),t=t.replace(".","$#$").replace(/\./g,"").replace("$#$","."),t=t.replace(/^(\-)*(\d+)\.(\d\d).*$/,"$1$2.$3"),t}function Ws(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[\.]*/g,""),t=t.replace(/(^0[\d]*)$/g,"0"),t=t.replace(/^0\d$/g,"0"),t=t.replace(/[^\d]/g,""),t}function Fs(e){let t=e.replace(/[\u4e00-\u9fa5\s]+/g,"");return t=t.replace(/(^\s*)|(\s*$)/g,""),t}function qs(e){let t=e.replace(/[a-zA-Z]+/g,"");return t=t.replace(/(^\s*)|(\s*$)/g,""),t}function Gs(e){return e.replace(/(^\s*)|(\s*$)/g,"")}function Xs(e){let t=_n(e);return t=t.toString().split("."),t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t=t.join("."),t}function Vs(e,t="",n="red"){return t.replace(new RegExp(e,"gi"),`<span style='color: ${n}'>${e}</span>`)}function Ks(e,t="\u4EDF\u4F70\u62FE\u4EBF\u4EDF\u4F70\u62FE\u4E07\u4EDF\u4F70\u62FE\u5143\u89D2\u5206",n=""){let o=(e+="00").indexOf(".");o>=0&&(e=e.substring(0,o)+e.substr(o+1,2)),t=t.substr(t.length-e.length);for(let r=0;r<e.length;r++)n+="\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396".substr(e.substr(r,1),1)+t.substr(r,1);return n=n.replace(/零角零分$/,"\u6574").replace(/零[仟佰拾]/g,"\u96F6").replace(/零{2,}/g,"\u96F6").replace(/零([亿|万])/g,"$1").replace(/零+元/,"\u5143").replace(/亿零{0,3}万/,"\u4EBF").replace(/^元/,"\u96F6\u5143")}function Js(e){return!!/^((12[0-9])|(13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0|1,5-9]))\d{8}$/.test(e)}function Ys(e){return!!/\d{3}-\d{8}|\d{4}-\d{7}/.test(e)}function Zs(e){return!!/^[a-zA-Z][a-zA-Z0-9_]{4,15}$/.test(e)}function Qs(e){return!!/^[a-zA-Z]\w{5,15}$/.test(e)}function ta(e){return!!/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)}function ea(e){let t="";return/^(?:\d+|[a-zA-Z]+|[!@#$%^&\.*]+){6,16}$/.test(e)&&(t="\u5F31"),/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)&&(t="\u4E2D"),/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)&&(t="\u5F3A"),t}function na(e){return!!/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test(e)}function oa(e){return!!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function ra(e){return!!/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(e)}function ia(e){return!!/^[\u4e00-\u9fa5]{1,6}(·[\u4e00-\u9fa5]{1,6}){0,2}$/.test(e)}function sa(e){return!!/^[1-9][0-9]{5}$/.test(e)}function aa(e){return!!/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(e)}function ca(e){return!!/^(([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/.test(e)}let Oo=!0;try{String.fromCharCode.apply(String,[1,2])}catch{Oo=!1,Object.defineProperty(Array.prototype,"subarray",{value:Array.prototype.slice})}var Sn=2654435769;function jo(e,t){var n=e.length,o=n<<2;if(t){var r=e[n-1];if(r<(o-=4)-3||r>o)return null;o=r}for(var i=new Uint8Array(o),s=0;s<o;++s)i[s]=e[s>>2]>>((3&s)<<3);return i}function me(e,t){var n,o=e.length,r=o>>2;3&o&&++r,t?(n=new Uint32Array(r+1))[r]=o:n=new Uint32Array(r);for(var i=0;i<o;++i)n[i>>2]|=e[i]<<((3&i)<<3);return n}function $t(e){return 4294967295&e}function ve(e,t,n,o,r,i){return(n>>>5^t<<2)+(t>>>3^n<<4)^(e^t)+(i[3&o^r]^n)}function Ho(e){if(e.length<16){var t=new Uint8Array(16);t.set(e),e=t}return e}function ye(e){for(var t=e.length,n=new Uint8Array(3*t),o=0,r=0;r<t;r++){var i=e.charCodeAt(r);if(i<128)n[o++]=i;else if(i<2048)n[o++]=192|i>>6,n[o++]=128|63&i;else{if(!(i<55296||i>57343)){if(r+1<t){var s=e.charCodeAt(r+1);if(i<56320&&56320<=s&&s<=57343){var c=65536+((1023&i)<<10|1023&s);n[o++]=240|c>>18,n[o++]=128|c>>12&63,n[o++]=128|c>>6&63,n[o++]=128|63&c,r++;continue}}throw new Error("Malformed string")}n[o++]=224|i>>12,n[o++]=128|i>>6&63,n[o++]=128|63&i}}return n.subarray(0,o)}function Wo(e){var t=e.length;return t===0?"":t<32767?function(n,o){for(var r=new Array(o),i=0,s=0,c=n.length;i<o&&s<c;i++){var p=n[s++];switch(p>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:r[i]=p;break;case 12:case 13:if(!(s<c))throw new Error("Unfinished UTF-8 octet sequence");r[i]=(31&p)<<6|63&n[s++];break;case 14:if(!(s+1<c))throw new Error("Unfinished UTF-8 octet sequence");r[i]=(15&p)<<12|(63&n[s++])<<6|63&n[s++];break;case 15:if(!(s+2<c))throw new Error("Unfinished UTF-8 octet sequence");var m=((7&p)<<18|(63&n[s++])<<12|(63&n[s++])<<6|63&n[s++])-65536;if(!(0<=m&&m<=1048575))throw new Error("Character outside valid Unicode range: 0x"+m.toString(16));r[i++]=m>>10&1023|55296,r[i]=1023&m|56320;break;default:throw new Error("Bad UTF-8 encoding 0x"+p.toString(16))}}return i<o&&(r.length=i),String.fromCharCode.apply(String,r)}(e,t):function(n,o){for(var r=[],i=new Array(32768),s=0,c=0,p=n.length;s<o&&c<p;s++){var m=n[c++];switch(m>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:i[s]=m;break;case 12:case 13:if(!(c<p))throw new Error("Unfinished UTF-8 octet sequence");i[s]=(31&m)<<6|63&n[c++];break;case 14:if(!(c+1<p))throw new Error("Unfinished UTF-8 octet sequence");i[s]=(15&m)<<12|(63&n[c++])<<6|63&n[c++];break;case 15:if(!(c+2<p))throw new Error("Unfinished UTF-8 octet sequence");var _=((7&m)<<18|(63&n[c++])<<12|(63&n[c++])<<6|63&n[c++])-65536;if(!(0<=_&&_<=1048575))throw new Error("Character outside valid Unicode range: 0x"+_.toString(16));i[s++]=_>>10&1023|55296,i[s]=1023&_|56320;break;default:throw new Error("Bad UTF-8 encoding 0x"+m.toString(16))}if(s>=32766){var C=s+1;i.length=C,r.push(String.fromCharCode.apply(String,i)),o-=C,s=-1}}return s>0&&(i.length=s,r.push(String.fromCharCode.apply(String,i))),r.join("")}(e,t)}function la(e){var t=e.length;if(t===0)return"";var n=Oo?e:function(c){for(var p=c.length,m=new Array(c.length),_=0;_<p;++_)m[_]=c[_];return m}(e);if(t<65535)return String.fromCharCode.apply(String,n);for(var o=32767&t,r=t>>15,i=new Array(o?r+1:r),s=0;s<r;++s)i[s]=String.fromCharCode.apply(String,n.subarray(s<<15,s+1<<15));return o&&(i[r]=String.fromCharCode.apply(String,n.subarray(r<<15,t))),i.join("")}function Fo(e,t){return typeof e=="string"&&(e=ye(e)),typeof t=="string"&&(t=ye(t)),e==null||e.length===0?e:jo(function(n,o){var r,i,s,c,p,m,_=n.length,C=_-1;for(i=n[C],s=0,m=0|Math.floor(6+52/_);m>0;--m){for(c=(s=$t(s+Sn))>>>2&3,p=0;p<C;++p)r=n[p+1],i=n[p]=$t(n[p]+ve(s,r,i,p,c,o));r=n[0],i=n[C]=$t(n[C]+ve(s,r,i,C,c,o))}return n}(me(e,!0),me(Ho(t),!1)),!1)}function qo(e,t){return typeof e=="string"&&(e=function(n){for(var o=window.atob(n),r=o.length,i=new Uint8Array(r),s=0;s<r;s++)i[s]=o.charCodeAt(s);return i}(e)),typeof t=="string"&&(t=ye(t)),e==null||e.length===0?e:jo(function(n,o){var r,i,s,c,p,m=n.length,_=m-1;for(r=n[0],s=$t(Math.floor(6+52/m)*Sn);s!==0;s=$t(s-Sn)){for(c=s>>>2&3,p=_;p>0;--p)i=n[p-1],r=n[p]=$t(n[p]-ve(s,r,i,p,c,o));i=n[_],r=n[0]=$t(n[0]-ve(s,r,i,0,c,o))}return n}(me(e,!1),me(Ho(t),!1)),!0)}const Kt={toBytes:ye,toString:Wo,encrypt:Fo,encryptToString:function(e,t){return window.btoa(la(Fo(e,t)))},decrypt:qo,decryptToString:function(e,t){return Wo(qo(e,t))}},Go=e=>{const t="1.23452384164.123412416";document.getElementById(t)!==null&&document.body.removeChild(document.getElementById(t));const n=document.createElement("canvas");n.width=200,n.height=130;const o=n.getContext("2d");o.rotate(-20*Math.PI/180),o.font="12px Vedana",o.fillStyle="rgba(200, 200, 200, 0.30)",o.textBaseline="middle",o.fillText(e,n.width/10,n.height/2);const r=document.createElement("div");return r.id=t,r.style.pointerEvents="none",r.style.top="0px",r.style.left="0px",r.style.position="fixed",r.style.zIndex="10000000",r.style.width=`${document.documentElement.clientWidth}px`,r.style.height=`${document.documentElement.clientHeight}px`,r.style.background=`url(${n.toDataURL("image/png")}) left top repeat`,document.body.appendChild(r),t},ha={set:e=>{let t=Go(e);document.getElementById(t)===null&&(t=Go(e))},del:()=>{let e="1.23452384164.123412416";document.getElementById(e)!==null&&document.body.removeChild(document.getElementById(e))}};class Ot extends Error{constructor(t,n){const o=new.target.prototype;super(`${t}: Status code '${n}'`),this.statusCode=n,this.__proto__=o}}class Cn extends Error{constructor(t="A timeout occurred."){const n=new.target.prototype;super(t),this.__proto__=n}}class ft extends Error{constructor(t="An abort occurred."){const n=new.target.prototype;super(t),this.__proto__=n}}class ua extends Error{constructor(t,n){const o=new.target.prototype;super(t),this.transport=n,this.errorType="UnsupportedTransportError",this.__proto__=o}}class da extends Error{constructor(t,n){const o=new.target.prototype;super(t),this.transport=n,this.errorType="DisabledTransportError",this.__proto__=o}}class pa extends Error{constructor(t,n){const o=new.target.prototype;super(t),this.transport=n,this.errorType="FailedToStartTransportError",this.__proto__=o}}class fa extends Error{constructor(t){const n=new.target.prototype;super(t),this.errorType="FailedToNegotiateWithServerError",this.__proto__=n}}class ga extends Error{constructor(t,n){const o=new.target.prototype;super(t),this.innerErrors=n,this.__proto__=o}}class Xo{constructor(t,n,o){this.statusCode=t,this.statusText=n,this.content=o}}class we{get(t,n){return this.send({...n,method:"GET",url:t})}post(t,n){return this.send({...n,method:"POST",url:t})}delete(t,n){return this.send({...n,method:"DELETE",url:t})}getCookieString(t){return""}}var x;(function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"})(x||(x={}));class Jt{constructor(){}log(t,n){}}Jt.instance=new Jt;class V{static isRequired(t,n){if(t==null)throw new Error(`The '${n}' argument is required.`)}static isNotEmpty(t,n){if(!t||t.match(/^\s*$/))throw new Error(`The '${n}' argument should not be empty.`)}static isIn(t,n,o){if(!(t in n))throw new Error(`Unknown ${o} value: ${t}.`)}}class K{static get isBrowser(){return typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return typeof self=="object"&&"importScripts"in self}static get isReactNative(){return typeof window=="object"&&window.document===void 0}static get isNode(){return!this.isBrowser&&!this.isWebWorker&&!this.isReactNative}}function Yt(e,t){let n="";return Zt(e)?(n=`Binary data of length ${e.byteLength}`,t&&(n+=`. Content: '${function(o){const r=new Uint8Array(o);let i="";return r.forEach(s=>{i+=`0x${s<16?"0":""}${s.toString(16)} `}),i.substr(0,i.length-1)}(e)}'`)):typeof e=="string"&&(n=`String data of length ${e.length}`,t&&(n+=`. Content: '${e}'`)),n}function Zt(e){return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||e.constructor&&e.constructor.name==="ArrayBuffer")}async function Vo(e,t,n,o,r,i){const s={},[c,p]=jt();s[c]=p,e.log(x.Trace,`(${t} transport) sending data. ${Yt(r,i.logMessageContent)}.`);const m=Zt(r)?"arraybuffer":"text",_=await n.post(o,{content:r,headers:{...s,...i.headers},responseType:m,timeout:i.timeout,withCredentials:i.withCredentials});e.log(x.Trace,`(${t} transport) request complete. Response status: ${_.statusCode}.`)}class ma{constructor(t,n){this._subject=t,this._observer=n}dispose(){const t=this._subject.observers.indexOf(this._observer);t>-1&&this._subject.observers.splice(t,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(n=>{})}}class be{constructor(t){this._minLevel=t,this.out=console}log(t,n){if(t>=this._minLevel){const o=`[${new Date().toISOString()}] ${x[t]}: ${n}`;switch(t){case x.Critical:case x.Error:this.out.error(o);break;case x.Warning:this.out.warn(o);break;case x.Information:this.out.info(o);break;default:this.out.log(o)}}}}function jt(){let e="X-SignalR-User-Agent";return K.isNode&&(e="User-Agent"),[e,va("7.0.3",ya(),ba(),wa())]}function va(e,t,n,o){let r="Microsoft SignalR/";const i=e.split(".");return r+=`${i[0]}.${i[1]}`,r+=` (${e}; `,r+=t&&t!==""?`${t}; `:"Unknown OS; ",r+=`${n}`,r+=o?`; ${o}`:"; Unknown Runtime Version",r+=")",r}function ya(){if(!K.isNode)return"";switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}}function wa(){if(K.isNode)return process.versions.node}function ba(){return K.isNode?"NodeJS":"Browser"}function Ko(e){return e.stack?e.stack:e.message?e.message:`${e}`}class _a extends we{constructor(t){if(super(),this._logger=t,typeof fetch>"u"){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(n("tough-cookie")).CookieJar,this._fetchType=n("node-fetch"),this._fetchType=n("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}());if(typeof AbortController>"u"){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=n("abort-controller")}else this._abortControllerType=AbortController}async send(t){if(t.abortSignal&&t.abortSignal.aborted)throw new ft;if(!t.method)throw new Error("No method defined.");if(!t.url)throw new Error("No url defined.");const n=new this._abortControllerType;let o;t.abortSignal&&(t.abortSignal.onabort=()=>{n.abort(),o=new ft});let r,i=null;if(t.timeout){const p=t.timeout;i=setTimeout(()=>{n.abort(),this._logger.log(x.Warning,"Timeout from HTTP request."),o=new Cn},p)}t.content===""&&(t.content=void 0),t.content&&(t.headers=t.headers||{},Zt(t.content)?t.headers["Content-Type"]="application/octet-stream":t.headers["Content-Type"]="text/plain;charset=UTF-8");try{r=await this._fetchType(t.url,{body:t.content,cache:"no-cache",credentials:t.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...t.headers},method:t.method,mode:"cors",redirect:"follow",signal:n.signal})}catch(p){throw o||(this._logger.log(x.Warning,`Error from HTTP request. ${p}.`),p)}finally{i&&clearTimeout(i),t.abortSignal&&(t.abortSignal.onabort=null)}if(!r.ok){const p=await Jo(r,"text");throw new Ot(p||r.statusText,r.status)}const s=Jo(r,t.responseType),c=await s;return new Xo(r.status,r.statusText,c)}getCookieString(t){let n="";return K.isNode&&this._jar&&this._jar.getCookies(t,(o,r)=>n=r.join("; ")),n}}function Jo(e,t){let n;switch(t){case"arraybuffer":n=e.arrayBuffer();break;case"text":default:n=e.text();break;case"blob":case"document":case"json":throw new Error(`${t} is not supported.`)}return n}class Sa extends we{constructor(t){super(),this._logger=t}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new ft):t.method?t.url?new Promise((n,o)=>{const r=new XMLHttpRequest;r.open(t.method,t.url,!0),r.withCredentials=t.withCredentials===void 0||t.withCredentials,r.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.content===""&&(t.content=void 0),t.content&&(Zt(t.content)?r.setRequestHeader("Content-Type","application/octet-stream"):r.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const i=t.headers;i&&Object.keys(i).forEach(s=>{r.setRequestHeader(s,i[s])}),t.responseType&&(r.responseType=t.responseType),t.abortSignal&&(t.abortSignal.onabort=()=>{r.abort(),o(new ft)}),t.timeout&&(r.timeout=t.timeout),r.onload=()=>{t.abortSignal&&(t.abortSignal.onabort=null),r.status>=200&&r.status<300?n(new Xo(r.status,r.statusText,r.response||r.responseText)):o(new Ot(r.response||r.responseText||r.statusText,r.status))},r.onerror=()=>{this._logger.log(x.Warning,`Error from HTTP request. ${r.status}: ${r.statusText}.`),o(new Ot(r.statusText,r.status))},r.ontimeout=()=>{this._logger.log(x.Warning,"Timeout from HTTP request."),o(new Cn)},r.send(t.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class Ca extends we{constructor(t){if(super(),typeof fetch<"u"||K.isNode)this._httpClient=new _a(t);else{if(typeof XMLHttpRequest>"u")throw new Error("No usable HttpClient found.");this._httpClient=new Sa(t)}}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new ft):t.method?t.url?this._httpClient.send(t):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(t){return this._httpClient.getCookieString(t)}}class dt{static write(t){return`${t}${dt.RecordSeparator}`}static parse(t){if(t[t.length-1]!==dt.RecordSeparator)throw new Error("Message is incomplete.");const n=t.split(dt.RecordSeparator);return n.pop(),n}}dt.RecordSeparatorCode=30,dt.RecordSeparator=String.fromCharCode(dt.RecordSeparatorCode);class Ea{writeHandshakeRequest(t){return dt.write(JSON.stringify(t))}parseHandshakeResponse(t){let n,o;if(Zt(t)){const s=new Uint8Array(t),c=s.indexOf(dt.RecordSeparatorCode);if(c===-1)throw new Error("Message is incomplete.");const p=c+1;n=String.fromCharCode.apply(null,Array.prototype.slice.call(s.slice(0,p))),o=s.byteLength>p?s.slice(p).buffer:null}else{const s=t,c=s.indexOf(dt.RecordSeparator);if(c===-1)throw new Error("Message is incomplete.");const p=c+1;n=s.substring(0,p),o=s.length>p?s.substring(p):null}const r=dt.parse(n),i=JSON.parse(r[0]);if(i.type)throw new Error("Expected a handshake response from the server.");return[o,i]}}var q;(function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close"})(q||(q={}));class xa{constructor(){this.observers=[]}next(t){for(const n of this.observers)n.next(t)}error(t){for(const n of this.observers)n.error&&n.error(t)}complete(){for(const t of this.observers)t.complete&&t.complete()}subscribe(t){return this.observers.push(t),new ma(this,t)}}var X;(function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"})(X||(X={}));class Bn{constructor(t,n,o,r){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(x.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://docs.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},V.isRequired(t,"connection"),V.isRequired(n,"logger"),V.isRequired(o,"protocol"),this.serverTimeoutInMilliseconds=3e4,this.keepAliveIntervalInMilliseconds=15e3,this._logger=n,this._protocol=o,this.connection=t,this._reconnectPolicy=r,this._handshakeProtocol=new Ea,this.connection.onreceive=i=>this._processIncomingData(i),this.connection.onclose=i=>this._connectionClosed(i),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=X.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:q.Ping})}static create(t,n,o,r){return new Bn(t,n,o,r)}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(t){if(this._connectionState!==X.Disconnected&&this._connectionState!==X.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!t)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=t}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==X.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=X.Connecting,this._logger.log(x.Debug,"Starting HubConnection.");try{await this._startInternal(),K.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=X.Connected,this._connectionStarted=!0,this._logger.log(x.Debug,"HubConnection connected successfully.")}catch(t){return this._connectionState=X.Disconnected,this._logger.log(x.Debug,`HubConnection failed to start successfully because of error '${t}'.`),Promise.reject(t)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const t=new Promise((n,o)=>{this._handshakeResolver=n,this._handshakeRejecter=o});await this.connection.start(this._protocol.transferFormat);try{const n={protocol:this._protocol.name,version:this._protocol.version};if(this._logger.log(x.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(n)),this._logger.log(x.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await t,this._stopDuringStartError)throw this._stopDuringStartError;this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(n){throw this._logger.log(x.Debug,`Hub handshake failed with error '${n}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(n),n}}async stop(){const t=this._startPromise;this._stopPromise=this._stopInternal(),await this._stopPromise;try{await t}catch{}}_stopInternal(t){return this._connectionState===X.Disconnected?(this._logger.log(x.Debug,`Call to HubConnection.stop(${t}) ignored because it is already in the disconnected state.`),Promise.resolve()):this._connectionState===X.Disconnecting?(this._logger.log(x.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise):(this._connectionState=X.Disconnecting,this._logger.log(x.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(x.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=t||new ft("The connection was stopped before the hub handshake could complete."),this.connection.stop(t)))}stream(t,...n){const[o,r]=this._replaceStreamingParams(n),i=this._createStreamInvocation(t,n,r);let s;const c=new xa;return c.cancelCallback=()=>{const p=this._createCancelInvocation(i.invocationId);return delete this._callbacks[i.invocationId],s.then(()=>this._sendWithProtocol(p))},this._callbacks[i.invocationId]=(p,m)=>{m?c.error(m):p&&(p.type===q.Completion?p.error?c.error(new Error(p.error)):c.complete():c.next(p.item))},s=this._sendWithProtocol(i).catch(p=>{c.error(p),delete this._callbacks[i.invocationId]}),this._launchStreams(o,s),c}_sendMessage(t){return this._resetKeepAliveInterval(),this.connection.send(t)}_sendWithProtocol(t){return this._sendMessage(this._protocol.writeMessage(t))}send(t,...n){const[o,r]=this._replaceStreamingParams(n),i=this._sendWithProtocol(this._createInvocation(t,n,!0,r));return this._launchStreams(o,i),i}invoke(t,...n){const[o,r]=this._replaceStreamingParams(n),i=this._createInvocation(t,n,!1,r);return new Promise((c,p)=>{this._callbacks[i.invocationId]=(_,C)=>{C?p(C):_&&(_.type===q.Completion?_.error?p(new Error(_.error)):c(_.result):p(new Error(`Unexpected message type: ${_.type}`)))};const m=this._sendWithProtocol(i).catch(_=>{p(_),delete this._callbacks[i.invocationId]});this._launchStreams(o,m)})}on(t,n){t&&n&&(t=t.toLowerCase(),this._methods[t]||(this._methods[t]=[]),this._methods[t].indexOf(n)===-1&&this._methods[t].push(n))}off(t,n){if(!t)return;t=t.toLowerCase();const o=this._methods[t];if(o)if(n){const r=o.indexOf(n);r!==-1&&(o.splice(r,1),o.length===0&&delete this._methods[t])}else delete this._methods[t]}onclose(t){t&&this._closedCallbacks.push(t)}onreconnecting(t){t&&this._reconnectingCallbacks.push(t)}onreconnected(t){t&&this._reconnectedCallbacks.push(t)}_processIncomingData(t){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(t=this._processHandshakeResponse(t),this._receivedHandshakeResponse=!0),t){const n=this._protocol.parseMessages(t,this._logger);for(const o of n)switch(o.type){case q.Invocation:this._invokeClientMethod(o);break;case q.StreamItem:case q.Completion:{const r=this._callbacks[o.invocationId];if(r){o.type===q.Completion&&delete this._callbacks[o.invocationId];try{r(o)}catch(i){this._logger.log(x.Error,`Stream callback threw error: ${Ko(i)}`)}}break}case q.Ping:break;case q.Close:{this._logger.log(x.Information,"Close message received from server.");const r=o.error?new Error("Server returned an error on close: "+o.error):void 0;o.allowReconnect===!0?this.connection.stop(r):this._stopPromise=this._stopInternal(r);break}default:this._logger.log(x.Warning,`Invalid message type: ${o.type}.`)}}this._resetTimeoutPeriod()}_processHandshakeResponse(t){let n,o;try{[o,n]=this._handshakeProtocol.parseHandshakeResponse(t)}catch(r){const i="Error parsing handshake response: "+r;this._logger.log(x.Error,i);const s=new Error(i);throw this._handshakeRejecter(s),s}if(n.error){const r="Server returned handshake error: "+n.error;this._logger.log(x.Error,r);const i=new Error(r);throw this._handshakeRejecter(i),i}return this._logger.log(x.Debug,"Server handshake complete."),this._handshakeResolver(),o}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if(!(this.connection.features&&this.connection.features.inherentKeepAlive||(this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds),this._pingServerHandle!==void 0))){let t=this._nextKeepAlive-new Date().getTime();t<0&&(t=0),this._pingServerHandle=setTimeout(async()=>{if(this._connectionState===X.Connected)try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}},t)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(t){const n=t.target.toLowerCase(),o=this._methods[n];if(!o)return this._logger.log(x.Warning,`No client method with the name '${n}' found.`),void(t.invocationId&&(this._logger.log(x.Warning,`No result given for '${n}' method and invocation ID '${t.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null))));const r=o.slice(),i=!!t.invocationId;let s,c,p;for(const m of r)try{const _=s;s=await m.apply(this,t.arguments),i&&s&&_&&(this._logger.log(x.Error,`Multiple results provided for '${n}'. Sending error to server.`),p=this._createCompletionMessage(t.invocationId,"Client provided multiple results.",null)),c=void 0}catch(_){c=_,this._logger.log(x.Error,`A callback for the method '${n}' threw error '${_}'.`)}p?await this._sendWithProtocol(p):i?(c?p=this._createCompletionMessage(t.invocationId,`${c}`,null):s!==void 0?p=this._createCompletionMessage(t.invocationId,null,s):(this._logger.log(x.Warning,`No result given for '${n}' method and invocation ID '${t.invocationId}'.`),p=this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(p)):s&&this._logger.log(x.Error,`Result given for '${n}' method but server is not expecting a result.`)}_connectionClosed(t){this._logger.log(x.Debug,`HubConnection.connectionClosed(${t}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||t||new ft("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(t||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===X.Disconnecting?this._completeClose(t):this._connectionState===X.Connected&&this._reconnectPolicy?this._reconnect(t):this._connectionState===X.Connected&&this._completeClose(t)}_completeClose(t){if(this._connectionStarted){this._connectionState=X.Disconnected,this._connectionStarted=!1,K.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(n=>n.apply(this,[t]))}catch(n){this._logger.log(x.Error,`An onclose callback called with error '${t}' threw error '${n}'.`)}}}async _reconnect(t){const n=Date.now();let o=0,r=t!==void 0?t:new Error("Attempting to reconnect due to a unknown error."),i=this._getNextRetryDelay(o++,0,r);if(i===null)return this._logger.log(x.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),void this._completeClose(t);if(this._connectionState=X.Reconnecting,t?this._logger.log(x.Information,`Connection reconnecting because of error '${t}'.`):this._logger.log(x.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(s=>s.apply(this,[t]))}catch(s){this._logger.log(x.Error,`An onreconnecting callback called with error '${t}' threw error '${s}'.`)}if(this._connectionState!==X.Reconnecting)return void this._logger.log(x.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.")}for(;i!==null;){if(this._logger.log(x.Information,`Reconnect attempt number ${o} will start in ${i} ms.`),await new Promise(s=>{this._reconnectDelayHandle=setTimeout(s,i)}),this._reconnectDelayHandle=void 0,this._connectionState!==X.Reconnecting)return void this._logger.log(x.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");try{if(await this._startInternal(),this._connectionState=X.Connected,this._logger.log(x.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(s=>s.apply(this,[this.connection.connectionId]))}catch(s){this._logger.log(x.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${s}'.`)}return}catch(s){if(this._logger.log(x.Information,`Reconnect attempt failed because of error '${s}'.`),this._connectionState!==X.Reconnecting)return this._logger.log(x.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),void(this._connectionState===X.Disconnecting&&this._completeClose());r=s instanceof Error?s:new Error(s.toString()),i=this._getNextRetryDelay(o++,Date.now()-n,r)}}this._logger.log(x.Information,`Reconnect retries have been exhausted after ${Date.now()-n} ms and ${o} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(t,n,o){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:n,previousRetryCount:t,retryReason:o})}catch(r){return this._logger.log(x.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${t}, ${n}) threw error '${r}'.`),null}}_cancelCallbacksWithError(t){const n=this._callbacks;this._callbacks={},Object.keys(n).forEach(o=>{const r=n[o];try{r(null,t)}catch(i){this._logger.log(x.Error,`Stream 'error' callback called with '${t}' threw error: ${Ko(i)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(t,n,o,r){if(o)return r.length!==0?{arguments:n,streamIds:r,target:t,type:q.Invocation}:{arguments:n,target:t,type:q.Invocation};{const i=this._invocationId;return this._invocationId++,r.length!==0?{arguments:n,invocationId:i.toString(),streamIds:r,target:t,type:q.Invocation}:{arguments:n,invocationId:i.toString(),target:t,type:q.Invocation}}}_launchStreams(t,n){if(t.length!==0){n||(n=Promise.resolve());for(const o in t)t[o].subscribe({complete:()=>{n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(o)))},error:r=>{let i;i=r instanceof Error?r.message:r&&r.toString?r.toString():"Unknown error",n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(o,i)))},next:r=>{n=n.then(()=>this._sendWithProtocol(this._createStreamItemMessage(o,r)))}})}}_replaceStreamingParams(t){const n=[],o=[];for(let r=0;r<t.length;r++){const i=t[r];if(this._isObservable(i)){const s=this._invocationId;this._invocationId++,n[s]=i,o.push(s.toString()),t.splice(r,1)}}return[n,o]}_isObservable(t){return t&&t.subscribe&&typeof t.subscribe=="function"}_createStreamInvocation(t,n,o){const r=this._invocationId;return this._invocationId++,o.length!==0?{arguments:n,invocationId:r.toString(),streamIds:o,target:t,type:q.StreamInvocation}:{arguments:n,invocationId:r.toString(),target:t,type:q.StreamInvocation}}_createCancelInvocation(t){return{invocationId:t,type:q.CancelInvocation}}_createStreamItemMessage(t,n){return{invocationId:t,item:n,type:q.StreamItem}}_createCompletionMessage(t,n,o){return n?{error:n,invocationId:t,type:q.Completion}:{invocationId:t,result:o,type:q.Completion}}}const ka=[0,2e3,1e4,3e4,null];class Yo{constructor(t){this._retryDelays=t!==void 0?[...t,null]:ka}nextRetryDelayInMilliseconds(t){return this._retryDelays[t.previousRetryCount]}}class At{}At.Authorization="Authorization",At.Cookie="Cookie";class Ia extends we{constructor(t,n){super(),this._innerClient=t,this._accessTokenFactory=n}async send(t){let n=!0;this._accessTokenFactory&&(!this._accessToken||t.url&&t.url.indexOf("/negotiate?")>0)&&(n=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(t);const o=await this._innerClient.send(t);return n&&o.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(t),await this._innerClient.send(t)):o}_setAuthorizationHeader(t){t.headers||(t.headers={}),this._accessToken?t.headers[At.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&t.headers[At.Authorization]&&delete t.headers[At.Authorization]}getCookieString(t){return this._innerClient.getCookieString(t)}}var J,tt;(function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"})(J||(J={})),function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"}(tt||(tt={}));class Ta{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}}class Zo{constructor(t,n,o){this._httpClient=t,this._logger=n,this._pollAbort=new Ta,this._options=o,this._running=!1,this.onreceive=null,this.onclose=null}get pollAborted(){return this._pollAbort.aborted}async connect(t,n){if(V.isRequired(t,"url"),V.isRequired(n,"transferFormat"),V.isIn(n,tt,"transferFormat"),this._url=t,this._logger.log(x.Trace,"(LongPolling transport) Connecting."),n===tt.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[o,r]=jt(),i={[o]:r,...this._options.headers},s={abortSignal:this._pollAbort.signal,headers:i,timeout:1e5,withCredentials:this._options.withCredentials};n===tt.Binary&&(s.responseType="arraybuffer");const c=`${t}&_=${Date.now()}`;this._logger.log(x.Trace,`(LongPolling transport) polling: ${c}.`);const p=await this._httpClient.get(c,s);p.statusCode!==200?(this._logger.log(x.Error,`(LongPolling transport) Unexpected response code: ${p.statusCode}.`),this._closeError=new Ot(p.statusText||"",p.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,s)}async _poll(t,n){try{for(;this._running;)try{const o=`${t}&_=${Date.now()}`;this._logger.log(x.Trace,`(LongPolling transport) polling: ${o}.`);const r=await this._httpClient.get(o,n);r.statusCode===204?(this._logger.log(x.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):r.statusCode!==200?(this._logger.log(x.Error,`(LongPolling transport) Unexpected response code: ${r.statusCode}.`),this._closeError=new Ot(r.statusText||"",r.statusCode),this._running=!1):r.content?(this._logger.log(x.Trace,`(LongPolling transport) data received. ${Yt(r.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(r.content)):this._logger.log(x.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(o){this._running?o instanceof Cn?this._logger.log(x.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=o,this._running=!1):this._logger.log(x.Trace,`(LongPolling transport) Poll errored after shutdown: ${o.message}`)}}finally{this._logger.log(x.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(t){return this._running?Vo(this._logger,"LongPolling",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(x.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(x.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const t={},[n,o]=jt();t[n]=o;const r={headers:{...t,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};await this._httpClient.delete(this._url,r),this._logger.log(x.Trace,"(LongPolling transport) DELETE request sent.")}finally{this._logger.log(x.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let t="(LongPolling transport) Firing onclose event.";this._closeError&&(t+=" Error: "+this._closeError),this._logger.log(x.Trace,t),this.onclose(this._closeError)}}}class Ra{constructor(t,n,o,r){this._httpClient=t,this._accessToken=n,this._logger=o,this._options=r,this.onreceive=null,this.onclose=null}async connect(t,n){return V.isRequired(t,"url"),V.isRequired(n,"transferFormat"),V.isIn(n,tt,"transferFormat"),this._logger.log(x.Trace,"(SSE transport) Connecting."),this._url=t,this._accessToken&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((o,r)=>{let i,s=!1;if(n===tt.Text){if(K.isBrowser||K.isWebWorker)i=new this._options.EventSource(t,{withCredentials:this._options.withCredentials});else{const c=this._httpClient.getCookieString(t),p={};p.Cookie=c;const[m,_]=jt();p[m]=_,i=new this._options.EventSource(t,{withCredentials:this._options.withCredentials,headers:{...p,...this._options.headers}})}try{i.onmessage=c=>{if(this.onreceive)try{this._logger.log(x.Trace,`(SSE transport) data received. ${Yt(c.data,this._options.logMessageContent)}.`),this.onreceive(c.data)}catch(p){return void this._close(p)}},i.onerror=c=>{s?this._close():r(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},i.onopen=()=>{this._logger.log(x.Information,`SSE connected to ${this._url}`),this._eventSource=i,s=!0,o()}}catch(c){return void r(c)}}else r(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"))})}async send(t){return this._eventSource?Vo(this._logger,"SSE",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(t){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(t))}}class Pa{constructor(t,n,o,r,i,s){this._logger=o,this._accessTokenFactory=n,this._logMessageContent=r,this._webSocketConstructor=i,this._httpClient=t,this.onreceive=null,this.onclose=null,this._headers=s}async connect(t,n){let o;return V.isRequired(t,"url"),V.isRequired(n,"transferFormat"),V.isIn(n,tt,"transferFormat"),this._logger.log(x.Trace,"(WebSockets transport) Connecting."),this._accessTokenFactory&&(o=await this._accessTokenFactory()),new Promise((r,i)=>{let s;t=t.replace(/^http/,"ws");const c=this._httpClient.getCookieString(t);let p=!1;if(K.isNode||K.isReactNative){const m={},[_,C]=jt();m[_]=C,o&&(m[At.Authorization]=`Bearer ${o}`),c&&(m[At.Cookie]=c),s=new this._webSocketConstructor(t,void 0,{headers:{...m,...this._headers}})}else o&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(o)}`);s||(s=new this._webSocketConstructor(t)),n===tt.Binary&&(s.binaryType="arraybuffer"),s.onopen=m=>{this._logger.log(x.Information,`WebSocket connected to ${t}.`),this._webSocket=s,p=!0,r()},s.onerror=m=>{let _=null;_=typeof ErrorEvent<"u"&&m instanceof ErrorEvent?m.error:"There was an error with the transport",this._logger.log(x.Information,`(WebSockets transport) ${_}.`)},s.onmessage=m=>{if(this._logger.log(x.Trace,`(WebSockets transport) data received. ${Yt(m.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(m.data)}catch(_){return void this._close(_)}},s.onclose=m=>{if(p)this._close(m);else{let _=null;_=typeof ErrorEvent<"u"&&m instanceof ErrorEvent?m.error:"WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",i(new Error(_))}}})}send(t){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(x.Trace,`(WebSockets transport) sending data. ${Yt(t,this._logMessageContent)}.`),this._webSocket.send(t),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(t){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(x.Trace,"(WebSockets transport) socket closed."),this.onclose&&(!this._isCloseEvent(t)||t.wasClean!==!1&&t.code===1e3?t instanceof Error?this.onclose(t):this.onclose():this.onclose(new Error(`WebSocket closed with status code: ${t.code} (${t.reason||"no reason given"}).`)))}_isCloseEvent(t){return t&&typeof t.wasClean=="boolean"&&typeof t.code=="number"}}class za{constructor(t,n={}){var o;if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,V.isRequired(t,"url"),this._logger=(o=n.logger)===void 0?new be(x.Information):o===null?Jt.instance:o.log!==void 0?o:new be(o),this.baseUrl=this._resolveUrl(t),(n=n||{}).logMessageContent=n.logMessageContent!==void 0&&n.logMessageContent,typeof n.withCredentials!="boolean"&&n.withCredentials!==void 0)throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");n.withCredentials=n.withCredentials===void 0||n.withCredentials,n.timeout=n.timeout===void 0?1e5:n.timeout;let r=null,i=null;if(K.isNode&&typeof require<"u"){const s=typeof __webpack_require__=="function"?__non_webpack_require__:require;r=s("ws"),i=s("eventsource")}K.isNode||typeof WebSocket>"u"||n.WebSocket?K.isNode&&!n.WebSocket&&r&&(n.WebSocket=r):n.WebSocket=WebSocket,K.isNode||typeof EventSource>"u"||n.EventSource?K.isNode&&!n.EventSource&&i!==void 0&&(n.EventSource=i):n.EventSource=EventSource,this._httpClient=new Ia(n.httpClient||new Ca(this._logger),n.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=n,this.onreceive=null,this.onclose=null}async start(t){if(t=t||tt.Binary,V.isIn(t,tt,"transferFormat"),this._logger.log(x.Debug,`Starting connection with transfer format '${tt[t]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(t),await this._startInternalPromise,this._connectionState==="Disconnecting"){const n="Failed to start the HttpConnection before stop() was called.";return this._logger.log(x.Error,n),await this._stopPromise,Promise.reject(new ft(n))}if(this._connectionState!=="Connected"){const n="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(x.Error,n),Promise.reject(new ft(n))}this._connectionStarted=!0}send(t){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new Un(this.transport)),this._sendQueue.send(t))}async stop(t){return this._connectionState==="Disconnected"?(this._logger.log(x.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnected state.`),Promise.resolve()):this._connectionState==="Disconnecting"?(this._logger.log(x.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise):(this._connectionState="Disconnecting",this._stopPromise=new Promise(n=>{this._stopPromiseResolver=n}),await this._stopInternal(t),void await this._stopPromise)}async _stopInternal(t){this._stopError=t;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(n){this._logger.log(x.Error,`HttpConnection.transport.stop() threw error '${n}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(x.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(t){let n=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation){if(this._options.transport!==J.WebSockets)throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");this.transport=this._constructTransport(J.WebSockets),await this._startTransport(n,t)}else{let o=null,r=0;do{if(o=await this._getNegotiationResponse(n),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new ft("The connection was stopped during negotiation.");if(o.error)throw new Error(o.error);if(o.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(o.url&&(n=o.url),o.accessToken){const i=o.accessToken;this._accessTokenFactory=()=>i,this._httpClient._accessToken=i,this._httpClient._accessTokenFactory=void 0}r++}while(o.url&&r<100);if(r===100&&o.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(n,this._options.transport,o,t)}this.transport instanceof Zo&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(x.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(o){return this._logger.log(x.Error,"Failed to start the connection: "+o),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(o)}}async _getNegotiationResponse(t){const n={},[o,r]=jt();n[o]=r;const i=this._resolveNegotiateUrl(t);this._logger.log(x.Debug,`Sending negotiation request: ${i}.`);try{const s=await this._httpClient.post(i,{content:"",headers:{...n,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(s.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${s.statusCode}'`));const c=JSON.parse(s.content);return(!c.negotiateVersion||c.negotiateVersion<1)&&(c.connectionToken=c.connectionId),c}catch(s){let c="Failed to complete negotiation with the server: "+s;return s instanceof Ot&&s.statusCode===404&&(c+=" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(x.Error,c),Promise.reject(new fa(c))}}_createConnectUrl(t,n){return n?t+(t.indexOf("?")===-1?"?":"&")+`id=${n}`:t}async _createTransport(t,n,o,r){let i=this._createConnectUrl(t,o.connectionToken);if(this._isITransport(n))return this._logger.log(x.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=n,await this._startTransport(i,r),void(this.connectionId=o.connectionId);const s=[],c=o.availableTransports||[];let p=o;for(const m of c){const _=this._resolveTransportOrError(m,n,r);if(_ instanceof Error)s.push(`${m.transport} failed:`),s.push(_);else if(this._isITransport(_)){if(this.transport=_,!p){try{p=await this._getNegotiationResponse(t)}catch(C){return Promise.reject(C)}i=this._createConnectUrl(t,p.connectionToken)}try{return await this._startTransport(i,r),void(this.connectionId=p.connectionId)}catch(C){if(this._logger.log(x.Error,`Failed to start the transport '${m.transport}': ${C}`),p=void 0,s.push(new pa(`${m.transport} failed: ${C}`,J[m.transport])),this._connectionState!=="Connecting"){const M="Failed to select transport before stop() was called.";return this._logger.log(x.Debug,M),Promise.reject(new ft(M))}}}}return s.length>0?Promise.reject(new ga(`Unable to connect to the server with any of the available transports. ${s.join(" ")}`,s)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(t){switch(t){case J.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new Pa(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case J.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new Ra(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case J.LongPolling:return new Zo(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${t}.`)}}_startTransport(t,n){return this.transport.onreceive=this.onreceive,this.transport.onclose=o=>this._stopConnection(o),this.transport.connect(t,n)}_resolveTransportOrError(t,n,o){const r=J[t.transport];if(r==null)return this._logger.log(x.Debug,`Skipping transport '${t.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${t.transport}' because it is not supported by this client.`);if(!function(i,s){return!i||(s&i)!=0}(n,r))return this._logger.log(x.Debug,`Skipping transport '${J[r]}' because it was disabled by the client.`),new da(`'${J[r]}' is disabled by the client.`,r);{if(!(t.transferFormats.map(s=>tt[s]).indexOf(o)>=0))return this._logger.log(x.Debug,`Skipping transport '${J[r]}' because it does not support the requested transfer format '${tt[o]}'.`),new Error(`'${J[r]}' does not support ${tt[o]}.`);if(r===J.WebSockets&&!this._options.WebSocket||r===J.ServerSentEvents&&!this._options.EventSource)return this._logger.log(x.Debug,`Skipping transport '${J[r]}' because it is not supported in your environment.'`),new ua(`'${J[r]}' is not supported in your environment.`,r);this._logger.log(x.Debug,`Selecting transport '${J[r]}'.`);try{return this._constructTransport(r)}catch(s){return s}}}_isITransport(t){return t&&typeof t=="object"&&"connect"in t}_stopConnection(t){if(this._logger.log(x.Debug,`HttpConnection.stopConnection(${t}) called while in state ${this._connectionState}.`),this.transport=void 0,t=this._stopError||t,this._stopError=void 0,this._connectionState!=="Disconnected"){if(this._connectionState==="Connecting")throw this._logger.log(x.Warning,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${t}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),t?this._logger.log(x.Error,`Connection disconnected with error '${t}'.`):this._logger.log(x.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(n=>{this._logger.log(x.Error,`TransportSendQueue.stop() threw error '${n}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(t)}catch(n){this._logger.log(x.Error,`HttpConnection.onclose(${t}) threw error '${n}'.`)}}}else this._logger.log(x.Debug,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is already in the disconnected state.`)}_resolveUrl(t){if(t.lastIndexOf("https://",0)===0||t.lastIndexOf("http://",0)===0)return t;if(!K.isBrowser)throw new Error(`Cannot resolve '${t}'.`);const n=window.document.createElement("a");return n.href=t,this._logger.log(x.Information,`Normalizing '${t}' to '${n.href}'.`),n.href}_resolveNegotiateUrl(t){const n=t.indexOf("?");let o=t.substring(0,n===-1?t.length:n);return o[o.length-1]!=="/"&&(o+="/"),o+="negotiate",o+=n===-1?"":t.substring(n),o.indexOf("negotiateVersion")===-1&&(o+=n===-1?"?":"&",o+="negotiateVersion="+this._negotiateVersion),o}}class Un{constructor(t){this._transport=t,this._buffer=[],this._executing=!0,this._sendBufferedData=new _e,this._transportResult=new _e,this._sendLoopPromise=this._sendLoop()}send(t){return this._bufferData(t),this._transportResult||(this._transportResult=new _e),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(t){if(this._buffer.length&&typeof this._buffer[0]!=typeof t)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof t}`);this._buffer.push(t),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new _e;const t=this._transportResult;this._transportResult=void 0;const n=typeof this._buffer[0]=="string"?this._buffer.join(""):Un._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(n),t.resolve()}catch(o){t.reject(o)}}}static _concatBuffers(t){const n=t.map(i=>i.byteLength).reduce((i,s)=>i+s),o=new Uint8Array(n);let r=0;for(const i of t)o.set(new Uint8Array(i),r),r+=i.byteLength;return o.buffer}}class _e{constructor(){this.promise=new Promise((t,n)=>[this._resolver,this._rejecter]=[t,n])}resolve(){this._resolver()}reject(t){this._rejecter(t)}}class Da{constructor(){this.name="json",this.version=1,this.transferFormat=tt.Text}parseMessages(t,n){if(typeof t!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!t)return[];n===null&&(n=Jt.instance);const o=dt.parse(t),r=[];for(const i of o){const s=JSON.parse(i);if(typeof s.type!="number")throw new Error("Invalid payload.");switch(s.type){case q.Invocation:this._isInvocationMessage(s);break;case q.StreamItem:this._isStreamItemMessage(s);break;case q.Completion:this._isCompletionMessage(s);break;case q.Ping:case q.Close:break;default:n.log(x.Information,"Unknown message type '"+s.type+"' ignored.");continue}r.push(s)}return r}writeMessage(t){return dt.write(JSON.stringify(t))}_isInvocationMessage(t){this._assertNotEmptyString(t.target,"Invalid payload for Invocation message."),t.invocationId!==void 0&&this._assertNotEmptyString(t.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(t){if(this._assertNotEmptyString(t.invocationId,"Invalid payload for StreamItem message."),t.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(t){if(t.result&&t.error)throw new Error("Invalid payload for Completion message.");!t.result&&t.error&&this._assertNotEmptyString(t.error,"Invalid payload for Completion message."),this._assertNotEmptyString(t.invocationId,"Invalid payload for Completion message.")}_assertNotEmptyString(t,n){if(typeof t!="string"||t==="")throw new Error(n)}}const Ma={trace:x.Trace,debug:x.Debug,info:x.Information,information:x.Information,warn:x.Warning,warning:x.Warning,error:x.Error,critical:x.Critical,none:x.None};class $a{configureLogging(t){if(V.isRequired(t,"logging"),t.log!==void 0)this.logger=t;else if(typeof t=="string"){const n=function(o){const r=Ma[o.toLowerCase()];if(r!==void 0)return r;throw new Error(`Unknown log level: ${o}`)}(t);this.logger=new be(n)}else this.logger=new be(t);return this}withUrl(t,n){return V.isRequired(t,"url"),V.isNotEmpty(t,"url"),this.url=t,this.httpConnectionOptions=typeof n=="object"?{...this.httpConnectionOptions,...n}:{...this.httpConnectionOptions,transport:n},this}withHubProtocol(t){return V.isRequired(t,"protocol"),this.protocol=t,this}withAutomaticReconnect(t){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return t?Array.isArray(t)?this.reconnectPolicy=new Yo(t):this.reconnectPolicy=t:this.reconnectPolicy=new Yo,this}build(){const t=this.httpConnectionOptions||{};if(t.logger===void 0&&(t.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const n=new za(this.url,t);return Bn.create(n,this.logger||Jt.instance,this.protocol||new Da,this.reconnectPolicy)}}let Se;function Aa(e){if(!e){if(Se)return Se;throw new Error("\u9996\u6B21\u6784\u5EFA\uFF0CsignalrURL\u53C2\u6570\u4E0D\u80FD\u4E3A\u7A7A\uFF01")}const t=new $a().configureLogging(x.Information).withUrl(e).withAutomaticReconnect({nextRetryDelayInMilliseconds:()=>5e3}).build();return t.keepAliveIntervalInMilliseconds=15e3,t.serverTimeoutInMilliseconds=18e5,t.start().then(()=>{L.Logger().info("\u542F\u52A8SignalR\u8FDE\u63A5\uFF01")}),t.onclose(async()=>{L.Logger().info("\u65AD\u5F00SignalR\u8FDE\u63A5!")}),t.onreconnecting(()=>{L.Logger().warn("SignalR\u670D\u52A1\u5DF2\u65AD\u7EBF\uFF0C\u91CD\u8FDE\u4E2D...\uFF01")}),t.onreconnected(()=>{L.Logger().warn("SignalR\u91CD\u8FDE\u6210\u529F!")}),Se||(Se=t),t}const at=ao({panelGroups:{}}),Qo=()=>({useGroupAccordion:e=>Et(()=>at.panelGroups[e].accordion),setGroupAccordionStatus:(e,t)=>{at.panelGroups[e]={...at.panelGroups[e],accordion:t}},panelExpanded:(e,t)=>Et(()=>at.panelGroups[e]?.panelExpandStatus?.[t]||!1),setPanelExpandedStatus:(e,t,n)=>{at.panelGroups[e]={...at.panelGroups[e],panelExpandStatus:{...at.panelGroups[e]?.panelExpandStatus||{},[t]:n}}},togglePanelExpandedStatus:(e,t)=>{at.panelGroups[e].accordion&&(at.panelGroups[e].panelExpandStatus[t]||Object.keys(at.panelGroups[e].panelExpandStatus).forEach(n=>{at.panelGroups[e].panelExpandStatus[n]=!1})),at.panelGroups[e].panelExpandStatus[t]=!at.panelGroups[e].panelExpandStatus[t]}}),En=e=>e>255?255:e<0?0:e,Ce=(e,t)=>{const n=e.replace("#",""),o=parseInt(n,16),r=En((o>>16)+t),i=En((o>>8&255)+t);return"#"+(En((255&o)+t)|i<<8|r<<16).toString(16)};var Ee=Ft({name:"VueCollapsiblePanelGroup",props:{accordion:{type:Boolean,default:!1},baseColor:{type:String,default:"#333333"}},setup(e){const t=ht(`group-${he()}`),{setGroupAccordionStatus:n}=Qo(),o={"--base-color":e.baseColor,"--border-color":Ce(e.baseColor,180),"--bg-color-header":Ce(e.baseColor,140),"--bg-color-header-hover":Ce(e.baseColor,190),"--bg-color-header-active":Ce(e.baseColor,200),"--bg-color-body":"#fff"};return n(t.value,e.accordion),{idGroup:t,cssColorVars:o}}});const La=["data-id-group"];Ee.render=function(e,t,n,o,r,i){return G(),ot("div",{"data-id-group":e.idGroup,style:kt(e.cssColorVars),class:"vcpg"},[Ct(e.$slots,"default")],12,La)},Ee.__scopeId="data-v-23ab5317",Ee.__file="src/controls/collapsepanel/VCollapsiblePanelGroup.vue";var xe=Ft({name:"VueCollapsiblePanel",props:{expanded:{type:Boolean,default:!0}},setup(e,t){const n=`panel-${he()}`,o=ht(),r=ht(),i=ht(),{panelExpanded:s,togglePanelExpandedStatus:c,setPanelExpandedStatus:p}=Qo(),m=Et(()=>({hasContent:t.slots.content&&t.slots.content()[0].children.length>0,dataKey:he()})),_=Et(()=>o.value?.parentElement?.getAttribute("data-id-group")||""),C=Et(()=>s(_.value,n).value&&m.value.hasContent);return Ve(()=>{p(_.value,n,e.expanded)}),pi(()=>{(async()=>(await Ke(),r.value&&i.value&&(r.value.style.height=`${Math.min(i.value.scrollHeight,r.value.scrollHeight)}px`)))()}),{body:m,panelRef:o,bodyRef:r,bodyContentRef:i,isExpanded:C,collapse:M=>{M.style.height="0"},expand:M=>{M.style.height=`${M.scrollHeight}px`},toggle:()=>{m.value.hasContent&&c(_.value,n)},toggleIcon:`
|
|
8
8
|
<svg
|
|
9
9
|
width="24px"
|
|
10
10
|
height="24px"
|
|
@@ -14,4 +14,4 @@ import{h as Pr,openBlock as H,createElementBlock as Y,normalizeStyle as vt,rende
|
|
|
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 cs={class:"vcp__header-title"},us={key:0,class:"vcp__header-icon"},ls=["innerHTML"],hs={key:0,ref:"bodyRef",class:"vcp__body"},ds={ref:"bodyContentRef",class:"vcp__body-content"};function tn(t){return window.TouchEvent&&t instanceof TouchEvent}oe.render=function(t,e,n,i,r,o){return H(),Y("section",{ref:"panelRef",class:Dr(["vcp",{"vcp--expanded":t.isExpanded,"vcp--expandable":t.body.hasContent}])},[J("header",{class:"vcp__header",onClick:e[0]||(e[0]=(...l)=>t.toggle&&t.toggle(...l))},[J("div",cs,[pt(t.$slots,"title")]),t.body.hasContent?(H(),Y("div",us,[pt(t.$slots,"icon",{},()=>[J("span",{innerHTML:t.toggleIcon},null,8,ls)])])):yt("v-if",!0)]),Bn(Nn,{"data-key":t.body.dataKey,name:"slide",onBeforeEnter:t.collapse,onEnter:t.expand,onBeforeLeave:t.expand,onLeave:t.collapse},{default:Wt(()=>[t.isExpanded?(H(),Y("div",hs,[J("div",ds,[pt(t.$slots,"content")],512)],512)):yt("v-if",!0)]),_:3},8,["data-key","onBeforeEnter","onEnter","onBeforeLeave","onLeave"])],2)},oe.__scopeId="data-v-08c94cf8",oe.__file="src/controls/collapsepanel/VCollapsiblePanel.vue";class tt{e;constructor(e){this.e=e}stopPropagation(){this.e.stopPropagation()}preventDefault(){this.e.preventDefault()}get clientX(){return tn(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientX:this.e.clientX}get clientY(){return tn(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientY:this.e.clientY}get clientCoord(){return new pn(this.clientX,this.clientY)}static bindDown(e,n,i,r=!1){const o=p=>{n(new tt(p))},l=p=>{p.touches.length===1&&n(new tt(p)),p.touches.length>1&&i&&i(new tt(p))};return e.addEventListener("mousedown",o,r),e.addEventListener("touchstart",l,r),()=>{e.removeEventListener("mousedown",o,r),e.removeEventListener("touchstart",l,r)}}static bindMove(e,n,i=!1){const r=l=>{n(new tt(l))},o=l=>{l.touches.length===1&&n(new tt(l))};return e.addEventListener("mousemove",r,i),e.addEventListener("touchmove",o,i),()=>{e.removeEventListener("mousemove",r,i),e.removeEventListener("touchmove",o,i)}}static bindUp(e,n,i=!1){const r=l=>{n(new tt(l))},o=l=>{l.touches.length===0&&n(new tt(l))};return e.addEventListener("mouseup",r,i),e.addEventListener("touchend",o,i),()=>{e.removeEventListener("mouseup",r,i),e.removeEventListener("touchend",o,i)}}originalEvent({mouse:e,touch:n}){tn(this.e)?n&&n(this.e):e&&e(this.e)}}class pn{x;y;constructor(e,n){this.x=e,this.y=n}clone(){return new pn(this.x,this.y)}}class fs{handle;container;options;unbindDown;unbindMove;unbindUp;constructor(e,n,i={}){this.handle=e,this.container=n,this.options=i,e&&(this.unbindDown=tt.bindDown(e,this.mousedown),e.classList.add("draggable-handle"))}teardown(){this.handle?.classList.remove("draggable-handle"),this.unbindDown&&this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove()}offsetX;offsetY;mousedown=e=>{if(e.preventDefault(),this.handle){const{left:n,top:i}=this.handle.getBoundingClientRect();this.offsetX=e.clientX-n,this.offsetY=e.clientY-i}this.options.onMoveStart&&this.options.onMoveStart(),this.unbindMove=tt.bindMove(document,this.mousemove),this.unbindUp=tt.bindUp(document,this.mouseup)};mousemove=e=>{this.container&&(this.container.style.left=e.clientX-this.offsetX+"px",this.container.style.top=e.clientY-this.offsetY+"px"),this.options.onMove&&this.options.onMove()};mouseup=e=>{this.options.onMoveEnd&&this.options.onMoveEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0}}class ps{_group;onChange;zIndex;constructor(e,n){this._group=e,this.onChange=n,this.a(i=>i.push(this))}set group(e){this._group=e;const n=ae(this._group),i=ae(e);n.splice(n.indexOf(this),1),i.push(this),xi()}get group(){return this._group}unregister(){this.a(e=>e.splice(e.indexOf(this),1))}raise(){this.a(e=>{e.splice(e.indexOf(this),1),e.push(this)})}a(e){e(ae(this._group)),xi()}}const se=new Map;function ae(t){return se.has(t)||se.set(t,[]),se.get(t)}function Si(t,e){return t>e?-Si(e,t):t<0&&e>=0?1:t-e}function xi(){let t=0;for(const e of function(n){const i=[];return n.forEach((r,o)=>i.push(o)),i}(se).sort(Si))for(const n of ae(e))t!=n.zIndex&&(n.zIndex=t,n.onChange(t)),t++}function en(t){if(t){const{width:e,height:n}=t.style;t.style.width="auto",t.style.height="auto";const i=ce(t);return t.style.width=e,t.style.height=n,i}return{width:0,height:0,top:0,left:0,bottom:0,right:0}}function ce(t){const e=t.getBoundingClientRect(),n=e.width,i=e.height,r=e.top,o=e.left;return{width:n,height:i,top:r,left:o,bottom:r+i,right:o+n}}class ms{container;options;handles;constructor(e,n){if(this.container=e,this.options=n,e&&n){this.handles=Ci.map(v=>new v(e,this));const{width:i,height:r}=en(e),o=n.maxWidth||window.innerWidth,l=n.maxHeight||window.innerHeight;let p=!1;(i<n.minWidth||i>o)&&(e.style.width=`${Ei(i,n.minWidth,o)}px`,p=!0),(r<n.minHeight||r>l)&&(e.style.height=`${Ei(r,n.minHeight,l)}px`,p=!0),p&&n.onResize&&n.onResize()}}teardown(){this.handles?.forEach(e=>e.teardown())}}const Ci=[];class gt{container;helper;handle;handleSize=8;unbindDown;unbindMove;unbindUp;constructor(e,n){this.container=e,this.helper=n,this.handle=this.createHandleElement(),this.unbindDown=tt.bindDown(this.handle,this.mousedown)}teardown(){this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove(),this.handle.parentElement.removeChild(this.handle)}x0;y0;left0;top0;width0;height0;mousedown=e=>{e.preventDefault(),e.stopPropagation();const{left:n,top:i,width:r,height:o}=ce(this.container);this.x0=e.clientX,this.y0=e.clientY,this.left0=n,this.top0=i,this.width0=r,this.height0=o,this.calcSafeBoundaries(),this.helper.options&&this.helper.options.onResizeStart&&this.helper.options.onResizeStart(),this.unbindMove=tt.bindMove(document,this.mousemove),this.unbindUp=tt.bindUp(document,this.mouseup)};minLeft;maxLeft;minRight;maxRight;minTop;maxTop;minBottom;maxBottom;calcSafeBoundaries(){if(!this.helper.options)return;const{left:e,top:n,right:i,bottom:r}=ce(this.container),o=this.helper.options,l=o.maxWidth||window.innerWidth,p=o.maxHeight||window.innerHeight;this.minLeft=Math.max(i-l,0),this.maxLeft=i-o.minWidth,this.minRight=e+o.minWidth,this.maxRight=Math.min(e+l,window.innerWidth),this.minTop=Math.max(r-p,0),this.maxTop=r-o.minHeight,this.minBottom=n+o.minHeight,this.maxBottom=Math.min(n+p,window.innerHeight)}mousemove=e=>{e.preventDefault(),e.stopPropagation(),this.setPosition(e),this.fixPosition(),this.helper.options&&this.helper.options.onResize&&this.helper.options.onResize()};fixPosition(){const{width:e,height:n,left:i,top:r,right:o,bottom:l}=ce(this.container),p=this.helper.options;!p||(i<this.minLeft?(this.container.style.width=e+i-this.minLeft+"px",this.container.style.left=`${this.minLeft}px`):i>this.maxLeft?(this.container.style.width=`${p.minWidth}px`,this.container.style.left=`${this.maxLeft}px`):o<this.minRight?this.container.style.width=`${p.minWidth}px`:o>this.maxRight&&(this.container.style.width=this.maxRight-i+"px"),r<this.minTop?(this.container.style.height=n+r-this.minTop+"px",this.container.style.top=`${this.minTop}px`):r>this.maxTop?(this.container.style.height=`${p.minHeight}px`,this.container.style.top=`${this.maxTop}px`):l<this.minBottom?this.container.style.height=`${p.minHeight}px`:l>this.maxBottom&&(this.container.style.height=this.maxBottom-r+"px"))}mouseup=e=>{e.preventDefault(),e.stopPropagation(),this.helper.options&&this.helper.options.onResizeEnd&&this.helper.options.onResizeEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0};createHandleElement(){const e=document.createElement("div"),n=e.style;return n.position="absolute",this.applyStyle(n),this.container.appendChild(e),e}}function Ei(t,e,n){return t<e?e:t>n?n:t}Ci.push(class extends gt{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 gt{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 gt{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 gt{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 gt{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 gt{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 gt{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 gt{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 ue=At({name:"",props:{disabled:{type:Boolean,default:!1},windowStyle:{type:Object,required:!0}},components:{},setup(t){const e=it(!1),n=it(!1);return{hover:e,active:n,style:function(){let i=t.windowStyle.button;return e.value&&(i={...i,...this.windowStyle.buttonHover}),n.value&&(i={...i,...this.windowStyle.buttonActive}),i},mouseup:function(i){this.active&&this.$emit("click")},mousedown:function(i){i.preventDefault(),n.value=!0;const r=tt.bindUp(document,()=>{n.value=!1,r()})}}}});const gs=["disabled"];ue.render=function(t,e,n,i,r,o){return H(),Y("div",{class:"btn",style:vt(t.style()),onMouseenter:e[0]||(e[0]=l=>t.hover=!0),onMouseleave:e[1]||(e[1]=l=>t.hover=!1),onMousedown:e[2]||(e[2]=Un((...l)=>t.mousedown&&t.mousedown(...l),["stop"])),onTouchstart:e[3]||(e[3]=Un((...l)=>t.mousedown&&t.mousedown(...l),["stop"])),onMouseup:e[4]||(e[4]=(...l)=>t.mouseup&&t.mouseup(...l)),onTouchend:e[5]||(e[5]=(...l)=>t.mouseup&&t.mouseup(...l)),disabled:t.disabled},[pt(t.$slots,"default")],44,gs)},ue.__scopeId="data-v-71662210",ue.__file="src/controls/vuewindow/window/Button.vue";const nn=new Set;function ki(t){return t!==null?parseFloat(t):0}function le(t){const e=window.getComputedStyle(t),n=Math.ceil([e.paddingLeft,e.width,e.paddingRight].map(ki).reduce((r,o)=>r+o)),i=Math.ceil([e.paddingTop,e.height,e.paddingBottom].map(ki).reduce((r,o)=>r+o));return{width:n,height:i}}class zi{width;height;constructor(e,n){this.width=e,this.height=n}}function vs(t){const e=t.windowEl;if(e){const n=parseFloat(e.style.left||"NaN"),i=parseFloat(e.style.top||"NaN");if(!isNaN(n)&&!isNaN(i))return{left:n,top:i}}return null}function ys(t,e,n,i){const r=t-n,o=e-i;return r*r+o*o}window.addEventListener("resize",t=>{nn.forEach(e=>{e&&Ht(e.fixPosition)&&e.fixPosition()})});const he=[];var de=At({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:ue},setup(t,{emit:e}){const n=Br();if(!n)return;const{proxy:i}=n;let r=0,o,l,p;const v=it(t.isOpen),b=()=>{he.push(i),p=new ps(t.zGroup,C),t.isOpen&&function(I){I&&(Me(()=>{r++==0&&(d(i),function(){const L=E.value,{width:N,height:j}=en(L);let O,W;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")O=t.left,W=t.top;else{const et=t.positionHint||"auto";switch(et){case"auto":{let X=20,K=50,q=0;do{if(he.every(st=>{if(!st.isOpen||i==st)return!0;const jt=vs(st);if(jt==null)return!0;const{left:ye,top:ot}=jt;return ys(ye,ot,X,K)>16}))break;X=(X+40)%(window.innerWidth-200),K=(K+40)%(window.innerHeight-200)}while(++q<100);O=X,W=K}break;case"center":O=(window.innerWidth-N)/2,W=(window.innerHeight-j)/2,console.log(O,W,window.innerWidth,window.innerHeight,"111111");break;default:try{const X=et.split("/").map(Number);if(X.length!=2)throw null;const[K,q]=X;if(!isFinite(K)||!isFinite(q))throw null;O=K>=0?K:window.innerWidth-N+K,W=q>=0?q:window.innerHeight-j+q}catch{throw new Error(`invalid position string: ${et}`)}}}L&&(L.style.left=`${O}px`,L.style.top=`${W}px`)}()),t.resizable&&h(),P(),o=new fs(A.value,E.value,{onMove:()=>P(),onMoveStart:()=>e("move-start"),onMoveEnd:()=>e("move-end")}),t.resizable&&function(){const{height:L}=en(A.value);l=new ms(E.value,{onResize:()=>h(),onResizeStart:()=>e("resize-start"),onResizeEnd:()=>e("resize-end"),minWidth:t.minWidth,minHeight:t.minHeight+L,maxWidth:t.maxWidth,maxHeight:t.maxHeight?t.maxHeight+L:void 0})}()}),t.activateWhenOpen&&z())}(!0),nn.add(i)};function C(I){S.value.zIndex=`${I}`}const E=it(null),A=it(null),D=it(null);function z(){p.raise(),e("activate")}const S=it({...t.windowStyle.window,zIndex:"auto",overflow:t.overflow}),u=mt(()=>t.windowStyle.titlebar),f=mt(()=>{const I={...t.windowStyle.content};return t.resizable?I.padding="0":t.padding!=null&&(I.padding=`${t.padding}px`),t.isScrollable&&(I.overflow="auto"),I});function d(I){const{width:L,height:N,top:j,left:O}=I,W=E;if(W&&L!=null&&(W.value.style.width=`${L}px`),N!=null){const et=A.value;if(et){const X=le(et).height;W.value.style.height=`${N+X}px`}}W&&O!=null&&(W.value.style.left=`${O}px`),W&&j!=null&&(W.value.style.top=`${j}px`)}function h(I=!0){const L=E.value,N=A.value,j=D.value;if(j&&L&&N){const{width:O,height:W}=le(j),{width:et,height:X}=le(L),K=le(N).height,q=et-(j.offsetWidth-O),st=X-K-(j.offsetHeight-W);j.style.width=`${q}px`,j.style.height=`${st}px`,g(),e("resize",new zi(q,st)),I&&(e("update:width",q),e("update:height",st))}}function g(){const I=E.value;if(I){const L=I.getBoundingClientRect();L.left<0&&(S.value.left="0px"),L.top<0&&(S.value.top="0px"),L.right>window.innerWidth&&(S.value.left=window.innerWidth-L.width+"px"),L.bottom>window.innerHeight&&(S.value.top=window.innerHeight-L.height+"px")}}function P(I=!0){g();const L=E.value;if(L){const{left:N,top:j}=L.getBoundingClientRect();I&&(e("update:left",N),e("update:top",j))}}return Pt(()=>t.isOpen,I=>{v.value=I}),Pt(()=>t.zGroup,I=>{p.group=I}),Pt(()=>t.width,I=>{d({width:I}),h(!1)}),Pt(()=>t.height,I=>{d({height:I}),h(!1)}),Re(()=>{b()}),Nr(()=>{nn.delete(this),p.unregister(),l&&l.teardown(),o&&o.teardown(),he.splice(he.indexOf(i),1)}),{isOpen:v,windowEl:E,titlebar:A,content:D,activate:z,styleWindow:S,styleTitlebar:u,styleContent:f,closeButtonClick:function(){v.value=!1,e("closebuttonclick")},fixPosition:g}}});const ws={class:"title"};var Ii;de.render=function(t,e,n,i,r,o){const l=On("myButton");return H(),ct(Nn,{name:"fade",onAfterLeave:e[2]||(e[2]=p=>t.$emit("close")),onAfterEnter:e[3]||(e[3]=p=>t.$emit("open")),persisted:""},{default:Wt(()=>[Ur(J("div",{class:"window",style:vt(t.styleWindow),ref:"windowEl",onMousedown:e[0]||(e[0]=(...p)=>t.activate&&t.activate(...p)),onTouchstart:e[1]||(e[1]=(...p)=>t.activate&&t.activate(...p))},[J("div",{class:"titlebar",style:vt(t.styleTitlebar),ref:"titlebar"},[J("div",ws,[t.$slots.title?pt(t.$slots,"title",{key:0}):(H(),Y(wt,{key:1},[jn(Or(t.title),1)],64))]),t.closeButton?(H(),ct(l,{key:0,windowStyle:t.windowStyle,onClick:t.closeButtonClick},{default:Wt(()=>[jn("\xD7")]),_:1},8,["windowStyle","onClick"])):yt("v-if",!0)],4),J("div",{class:"content",style:vt(t.styleContent),ref:"content"},[pt(t.$slots,"default")],4)],36),[[jr,t.isOpen]])]),_:3})},de.__file="src/controls/vuewindow/window/index.vue",function(t){t[t.StyleBlack=0]="StyleBlack",t[t.StyleWhite=1]="StyleWhite",t[t.StyleMetal=2]="StyleMetal",t[t.StyleGrayblue=3]="StyleGrayblue"}(Ii||(Ii={}));const bs={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)"}},Ss={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)"}},xs={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)"}},Cs={window:{color:"#fff",fontSize:"14px",boxShadow:"0 0 3pt rgba(255, 255, 255, 0.75)",backgroundColor:"rgba(4,51,81,0.6)",borderRadius:"5px"},titlebar:{backgroundColor:"rgba(4,51,81,0.8)",border:"1px solid rgba(153, 153, 153, 0.5)",borderRadius:"5px",fontSize:"16px",fontWeight:400,color:"#fff"},content:{},button:{color:"white",fontSize:"18px"},buttonHover:{backgroundColor:"rgba(255, 255, 255, 0.25)"},buttonActive:{color:"black",backgroundColor:"rgba(255, 255, 255, 0.5)"}},Es=de;var V;(function(t){t[t.top=0]="top",t[t.bottom=1]="bottom",t[t.centerBack=2]="centerBack",t[t.centerMain=3]="centerMain",t[t.centerFront=4]="centerFront",t[t.left=5]="left",t[t.right=6]="right"})(V||(V={}));class Ri{layoutState;layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;widgetConfig=new Array;_LayoutID;constructor(e,n,i){this.layoutState=e,this._LayoutID=i,n.forEach(r=>{if(r.layoutID===i&&(this.widgetConfig.push(r),r.afterid))if(this.preConditionMap.has(r.afterid))this.preConditionMap.get(r.afterid)?.add(r);else{const o=new Set;o.add(r),this.preConditionMap.set(r.afterid,o)}})}getLayoutID(){return this._LayoutID}getWidgetConfig(){return this.widgetConfig}preloadWidgets(){this.widgetConfig.filter(e=>e.preload&&!e.afterid).forEach(e=>{this._loadWidget(e)})}async loadWidget(e){if(!e)return;let n;return St(e)?n=e:qt(e)&&(n=this.widgetConfig.find(i=>i.id===e)),n?n.afterid?(this.isWidgetLoaded(n.afterid)||await this.loadWidget(n.afterid),this._loadWidget(n)):this._loadWidget(n):void 0}loadOtherDependenceWidgets(e){this.preConditionMap.has(e)&&this.preConditionMap.get(e)?.forEach(n=>{n.preload&&this._loadWidget(n)})}_loadWidget(e){if(!this.widgetsLoadedSet.has(e.id))return e.component().then(n=>{if(n.default){const i=Fr(n.default);this.getContainerComponents(e.container).value.set(e.id,i),this.widgetsLoadedSet.add(e.id),Me().then(()=>{B.EventBus.emit(nt.WidgetLoadedEvent,{layoutID:this._LayoutID,widgetID:e.id}),this.loadOtherDependenceWidgets(e.id)})}})}hasDependentWidgets(e){let n=!1;if(this.preConditionMap.has(e)){const i=this.preConditionMap.get(e);if(i){for(const r of i)if(this.isWidgetLoaded(r.id)){n=!0;break}}}return n}unloadWidget(e){if(!e||!this.isWidgetLoaded(e))return;const n=this.widgetConfig.find(i=>i.id===e);if(n){if(this.preConditionMap.has(e)){const o=this.preConditionMap.get(e);if(o)for(const l of o)this.unloadWidget(l.id)}const i=this.getContainerComponents(n.container),r=i.value.get(e);r&&r.unmounted&&r.unmounted(),i.value.delete(e),this.widgetsLoadedSet.delete(e),B.EventBus.emit(nt.WidgetUnLoadedEvent,{layoutID:this._LayoutID,widgetID:e})}}isWidgetLoaded(e){return this.widgetsLoadedSet.has(e)}splitTwoContainer(e=!1){const n=this.layoutState.centerMainContainer,i=this.layoutState.centerBackContainer;e?(n&&(n.style.left="0",n.style.width="100%"),i&&(i.style.width="100%")):(n&&(n.style.left="50%",n.style.width="50%"),i&&(i.style.width="50%"))}getLayoutContainer(e){switch(e){case V.top:return this.layoutState.topContainer;case V.bottom:return this.layoutState.bottomContainer;case V.left:return this.layoutState.leftContainer;case V.right:return this.layoutState.rightContainer;case V.centerBack:return this.layoutState.centerBackContainer;case V.centerMain:return this.layoutState.centerMainContainer;case V.centerFront:return this.layoutState.centerFrontContainer}}changeContainerVisible(e,n=!1){const i=this.getLayoutContainer(e);i&&(i.style.visibility=n?"visible":"hidden")}changeWidgetVisible(e,n=!1){const i=this.getWidgetComponent(e);i&&B.EventBus.emit(nt.WidgetVisibleChanged,{id:e,layoutID:this._LayoutID,name:i.name,visible:n})}getWidgetComponent(e){if(this.widgetsLoadedSet.has(e)){const n=this.widgetConfig.find(i=>i.id===e);if(n)return this.getContainerComponents(n.container).value.get(e)}}getWigetItem(e){return this.widgetConfig.find(n=>n.id===e)}getGroupWigetItems(e){return this.widgetConfig.filter(n=>n.group===e)}getContainerComponents(e){if(this.layoutMap.has(e))return this.layoutMap.get(e);{const n=it(new Map);return this.layoutMap.set(e,n),n}}addContainerComponent(e,n){}}var fe=At({name:"MainContainer",props:{widgetConfig:{type:Array,required:!0,default:()=>[]},layoutID:{type:String,default:void 0},layoutStyle:{type:Object},enableRouterView:{type:Boolean,default:!0}},emits:["containerLoaded"],setup(t,{attrs:e,slots:n,emit:i}){const r=t.layoutID,o=it(t.enableRouterView);Pt(()=>t.enableRouterView,()=>{o.value=t.enableRouterView});const l=Dn({topContainer:void 0,centerBackContainer:void 0,centerMainContainer:void 0,centerFrontContainer:void 0,bottomContainer:void 0,leftContainer:void 0,rightContainer:void 0}),p=new Ri(l,t.widgetConfig,r),v=z(V.top),b=z(V.centerBack),C=z(V.centerFront),E=z(V.left),A=z(V.right),D=z(V.bottom);function z(u){return p?.getContainerComponents(u)}const S=mt(()=>t.layoutStyle);return Re(()=>{p&&(p.preloadWidgets(),r===void 0&&(B.LayoutManager=p),i("containerLoaded",{layoutID:r,layoutManager:p}))}),{...$r(l),topContainerComponents:v,centerbackComponents:b,centerfrontComponents:C,leftContainerComponents:E,rightContainerComponents:A,bottomContainerComponents:D,containerStyle:S,isEnableRouterView:o}}});const ks={ref:"topContainer",class:"topContainer"},zs={key:0,ref:"centerMainContainer",class:"centerdiv mainContainer"},Is={ref:"centerBackContainer",class:"centerdiv backContainer"},Rs={ref:"centerFrontContainer",class:"centerdiv centerContainer"},Ms={ref:"leftContainer",class:"leftContainer"},_s={ref:"rightContainer",class:"rightContainer"},Ls={ref:"bottomContainer",class:"bottomContainer"};fe.render=function(t,e,n,i,r,o){const l=On("router-view");return H(),Y("div",{class:"layoutContainer",style:vt(t.containerStyle)},[J("div",ks,[(H(!0),Y(wt,null,Rt(t.topContainerComponents,([p,v])=>(H(),ct(bt(v),{key:p}))),128))],512),J("div",null,[yt(" \u4E3B\u8981\u5BB9\u5668-\u5E95\u90E8 "),t.isEnableRouterView?(H(),Y("div",zs,[Bn(l,null,{default:Wt(({Component:p})=>[(H(),ct(bt(p)))]),_:1})],512)):yt("v-if",!0),yt(" \u4E0A\u4E00\u5C42-\u4E3B\u5BB9\u5668 "),J("div",Is,[(H(!0),Y(wt,null,Rt(t.centerbackComponents,([p,v])=>(H(),ct(bt(v),{key:p}))),128))],512),yt(" \u6700\u4E0A\u6D6E\u52A8-\u4E3B\u5BB9\u5668 "),J("div",Rs,[(H(!0),Y(wt,null,Rt(t.centerfrontComponents,([p,v])=>(H(),ct(bt(v),{key:p}))),128))],512),J("div",Ms,[(H(!0),Y(wt,null,Rt(t.leftContainerComponents,([p,v])=>(H(),ct(bt(v),{key:p}))),128))],512),J("div",_s,[(H(!0),Y(wt,null,Rt(t.rightContainerComponents,([p,v])=>(H(),ct(bt(v),{key:p}))),128))],512)]),J("div",Ls,[(H(!0),Y(wt,null,Rt(t.bottomContainerComponents,([p,v])=>(H(),ct(bt(v),{key:p}))),128))],512)],4)},fe.__scopeId="data-v-4d081e5c",fe.__file="src/controls/layoutcontainer/layout.vue";const pe=new Map,rn=new Map;let me;const As={getDefaultClient(){if(me||(me=new Tt(SysConfig.DefaultHproseAPI)),!me)throw Error("HproseProxy\u5BF9\u8C61\u4E3A\u7A7A");return me},registerHprose(t,e){const n=rn.get(t);if(!n){const i=new Tt(e);pe.set(t,i)}return n},getHprose:t=>rn?.get(t),getProxyHprose:t=>pe.get(t),unregisterHprose(t){pe.get(t)&&(rn.delete(t),pe.delete(t))}},Ps=5e3,Ts=36e5,zt={Login:"/api/User/Login",ChangeMyPwd:"/api/User/ChangeMyPwd",Logout:"/api/Check/ExitLogin",RefreshToken:"/api/Check/RefreshToken",CheckToken:"/api/Check/CheckToken",GetSystemRights:"/api/System/GetSystem"},on="access_token",Ds=B.Config.ServiceURL.LoginAuthURL;function sn(){const t=Jn();t&<(zt.RefreshToken,Ds,{refreshToken:t}).then(e=>{an(e.data)})}function Mi(){const t=ut.getJsonObject(on);if(!t)return;const e=new Date().getTime(),n=new Date(t.expire).getTime()-e;n>0&&(n<=5e3?sn():setTimeout(sn,n-5e3))}function an(t){const e=new Date().getTime();let n=new Date(t.accessToken.expires).getTime()-e;if(n>=36e5?(n=18e5,console.warn("\u5BA2\u6237\u7AEF\u65F6\u95F4\u4E0E\u670D\u52A1\u5668\u4E0D\u4E00\u81F4\uFF1A\u8FC7\u53BB\u65F6\u95F4\uFF01")):n<-6e5&&(n=18e5,console.warn("\u5BA2\u6237\u7AEF\u65F6\u95F4\u4E0E\u670D\u52A1\u5668\u4E0D\u4E00\u81F4\uFF1A\u672A\u6765\u65F6\u95F4\uFF01")),n>0){let i=Et();i?(i.token=t.accessToken.tokenContent,i.expire=t.accessToken.expires,i.refresh=t.refreshToken.tokenContent):i={token:t.accessToken.tokenContent,expire:t.accessToken.expires,refresh:t.refreshToken.tokenContent},ut.set(on,i,n/1e3),Mi()}else ut.remove(on)}const ge="Wm314243",ve=B.Config.ServiceURL.LoginAuthURL;async function Bs(t){const e={username:t.username,pwd:Bt.encryptToString(t.pwd,ge)},n=(await lt(zt.Login,ve,e))?.data;return n&&an(n.doubletoken),n}function Ns(t){const e={oldpwd:Bt.encryptToString(t.oldpwd,ge),newpwd:Bt.encryptToString(t.newpwd,ge)};return lt(zt.ChangeMyPwd,ve,e)}function Us(t){return Bt.encryptToString(t,ge)}function Os(){const t=Et();t&&(Qn(zt.Logout,ve,{token:t.token,reftoken:t.refresh}),We())}function js(t){return lt(zt.CheckToken,ve,{token:t})}const cn="ROLE_SYSTEM_RIGHT",un=new Xt("",sessionStorage);function _i(){return un.get(cn)}function ln(t){un.set(cn,t)}function Li(){un.remove(cn)}function _t(t){if(t)for(let e=0;e<t.length;e++){const n=t[e];n.children&&n.children.length>0?(_t(n.children),n.children.length===0&&(t.splice(e,1),e--)):n.selected||(t.splice(e,1),e--)}}function Ai(t,e,n="name"){t&&e&&t.forEach(i=>{const r=e.find(o=>o[n]===i[n]);r&&(i.children?r.children&&Ai(i.children,r.children,n):(!r.children||r.children.length===0)&&r.selected&&(i.selected=r.selected))})}function Pi(t,e,n="name"){t&&e&&t.forEach(i=>{const r=e.find(o=>o[n]===i[n]);r&&(i.children?r.children&&Pi(i.children,r.children,n):(!r.children||r.children.length===0)&&r.selected&&(i.selected=r.selected))})}function Nt(t,e,n,i="name"){const r=t[n],o=e[n];r?o&&Pi(r,o,i):o&&(t[n]=o)}function Ti(t){if(t&&t.length>0){const e=t.length;let n,i=!1;if(e>0){i=St(t[0]);const r=i?t[0]:JSON.parse(t[0]);if(e>1)for(let o=1;o<t.length;o++){const l=t[o],p=i?l:JSON.parse(l);Nt(r,p,"routes","name"),Nt(r,p,"widgetMenu","name"),Nt(r,p,"widgets","id"),Nt(r,p,"functions","id")}n=r}return n&&(_t(n.routes),_t(n.widgetMenu),_t(n.widgets),_t(n.functions)),n}}const hn=[],dn=[],fn=[];function Ut(){return _i()}async function Fs(t,e=!1){Li();const n=zt.GetSystemRights,i=B.Config.ServiceURL.LoginAuthURL,r=await lt(n,i,{systemid:t});if(!r||!r.data)return void B.Message?.warn("\u65E0\u6CD5\u83B7\u53D6\u529F\u80FD\u6388\u6743\u5217\u8868\uFF01");const o=r.data;if(o&&o.length>0){if(e){const l=JSON.parse(o[0]);return ln(l),l}{const l=Ti(o);return ln(l),l}}}function Di(t,e){const n={...t};return n.meta||(n.meta={}),e.index!=null&&(n.meta.index=e.index),e.title!=null&&(n.meta.title=e.title),t.children&&(n.children=[],e.children&&e.children.forEach(i=>{const r=t.children?.find(o=>o.path===i.path);if(r){const o=Di(r,i);o&&n.children?.push(o)}})),n}function $s(t,e=2){if(e===0)return t;const n=Ut();return n&&n.routes?(fn.length>0||t.forEach(i=>{const r=n.routes?.find(o=>o.name===i.name);if(r){const o=Di(i,r);o&&fn.push(o)}}),fn):void 0}function Bi(t,e){const n={...t};return e.index!=null&&(n.index=e.index),t.children&&(n.children=[],e.children&&e.children.forEach(i=>{const r=t.children?.find(o=>o.name===i.name);if(r){const o=Bi(r,i);o&&n.children?.push(o)}})),n}function Ws(t,e=2){if(e===0)return t;const n=Ut();return n&&n.widgetMenu?(dn.length>0||t.forEach(i=>{const r=n.widgetMenu?.find(o=>o.name===i.name);if(r){const o=Bi(i,r);o&&dn.push(o)}}),dn):void 0}function Hs(t,e=2){if(e===0)return t;const n=Ut();return n&&n.widgets?(hn.length>0||t?.forEach(i=>{n.widgets?.find(r=>r.id===i.id)&&hn.push(i)}),hn):void 0}function qs(t,e=2){if(e===0)return t;const n=Ut();return n?n.functions:void 0}export{es as BigFileDownload,Yt as Download,_o as DownloadByUrl,Ct as EnumColor,ri as FileUpload,B as Global,As as GlobalHprose,Mt as GlobalMitt,rt as H5Tool,Ot as HproseClient,Mo as HttpDownload,Hn as JsonDownload,fe as LayoutContainer,V as LayoutContainerEnum,Ri as LayoutManager,ns as ObjToUrlParams,Le as Pane,Tt as ProxyClient,Ro as SaveAs,Xr as Splitpanes,Xt as Storage,Gt as StringUtils,bs as StyleBlack,Cs as StyleGrayblue,xs as StyleMetal,Ss as StyleWhite,nt as SysEvents,Ps as TOKEN_REFRESH_TIME,Ts as TOKEN_VALID_TIMESPAN,zt as USER_TOKEN_API,oe as VCollapsiblePanel,re as VCollapsiblePanelGroup,de as VWindow,zi as WindowResizeEvent,Es as WindowType,Bt as XXTEA,Io as calculateBestTextColor,Ns as changeMyPWD,Mi as checkDoRefreshToken,js as checkToken,We as clearLocalToken,Li as clearRight,Eo as colorIsDark,qo as createFileUpload,ko as darken,li as deepMerge,Gn as delay,sn as doRefreshToken,hi as exportSystemRights,Ao as get,Ut as getCurrentSystemRight,To as getData,Us as getEncryptPWD,qs as getFunctions,yo as getHexColor,Et as getLocalToken,Yo as getLockState,bo as getLongHexColor,oi as getProxyClient,wo as getRGBColor,xo as getRGBColorFromHSLA,Jn as getRefreshToken,_i as getRight,$s as getRoutes,Fs as getSystemRoleRight,Hs as getWidgetConfig,Ws as getWidgetMenus,_t as handleNodes,Ue as hexToRGB,Vo as init,Ko as initDefaultProxyClient,Z as is,Te as isArray,Qr as isAsyncFunction,eo as isBoolean,no as isClient,Jr as isDate,$n as isDef,ro as isElement,ao as isEmpty,So as isEnumColor,co as isError,Ht as isFunction,Kt as isHexColor,so as isImageDom,fo as isMap,Pe as isNull,Kr as isNullAndUnDef,Yr as isNullOrUnDef,Zr as isNumber,St as isObjectX,to as isPromise,oo as isServer,qt as isString,ho as isSymbol,Ae as isUnDef,po as isValidURL,lo as isWeakMap,uo as isWeakSet,io as isWindow,Go as jquery,zo as lighten,Bs as login,Os as logout,Ti as mergeFilterRoleSysRight,Ai as mergeNodes,Nt as mergeNodesAll,vo as newGuid,Jo as onLockListener,Po as post,lt as requestGet,Zn as requestPost,Qn as requestPostBody,Co as rgbToHex,an as setLocalToken,ln as setRight,Lo as sleep,go as storage,ut as storageHelper,Zo as unLockListener,Vt as uuid,rs as writeIconifyList,os as writeSysRoleRight};
|
|
17
|
+
`}}});const Na={class:"vcp__header-title"},Ba={key:0,class:"vcp__header-icon"},Ua=["innerHTML"],Oa={key:0,ref:"bodyRef",class:"vcp__body"},ja={ref:"bodyContentRef",class:"vcp__body-content"};function xn(e){return window.TouchEvent&&e instanceof TouchEvent}xe.render=function(e,t,n,o,r,i){return G(),ot("section",{ref:"panelRef",class:fi(["vcp",{"vcp--expanded":e.isExpanded,"vcp--expandable":e.body.hasContent}])},[rt("header",{class:"vcp__header",onClick:t[0]||(t[0]=(...s)=>e.toggle&&e.toggle(...s))},[rt("div",Na,[Ct(e.$slots,"title")]),e.body.hasContent?(G(),ot("div",Ba,[Ct(e.$slots,"icon",{},()=>[rt("span",{innerHTML:e.toggleIcon},null,8,Ua)])])):It("v-if",!0)]),co(lo,{"data-key":e.body.dataKey,name:"slide",onBeforeEnter:e.collapse,onEnter:e.expand,onBeforeLeave:e.expand,onLeave:e.collapse},{default:ie(()=>[e.isExpanded?(G(),ot("div",Oa,[rt("div",ja,[Ct(e.$slots,"content")],512)],512)):It("v-if",!0)]),_:3},8,["data-key","onBeforeEnter","onEnter","onBeforeLeave","onLeave"])],2)},xe.__scopeId="data-v-08c94cf8",xe.__file="src/controls/collapsepanel/VCollapsiblePanel.vue";class ct{e;constructor(t){this.e=t}stopPropagation(){this.e.stopPropagation()}preventDefault(){this.e.preventDefault()}get clientX(){return xn(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientX:this.e.clientX}get clientY(){return xn(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientY:this.e.clientY}get clientCoord(){return new On(this.clientX,this.clientY)}static bindDown(t,n,o,r=!1){const i=c=>{n(new ct(c))},s=c=>{c.touches.length===1&&n(new ct(c)),c.touches.length>1&&o&&o(new ct(c))};return t.addEventListener("mousedown",i,r),t.addEventListener("touchstart",s,r),()=>{t.removeEventListener("mousedown",i,r),t.removeEventListener("touchstart",s,r)}}static bindMove(t,n,o=!1){const r=s=>{n(new ct(s))},i=s=>{s.touches.length===1&&n(new ct(s))};return t.addEventListener("mousemove",r,o),t.addEventListener("touchmove",i,o),()=>{t.removeEventListener("mousemove",r,o),t.removeEventListener("touchmove",i,o)}}static bindUp(t,n,o=!1){const r=s=>{n(new ct(s))},i=s=>{s.touches.length===0&&n(new ct(s))};return t.addEventListener("mouseup",r,o),t.addEventListener("touchend",i,o),()=>{t.removeEventListener("mouseup",r,o),t.removeEventListener("touchend",i,o)}}originalEvent({mouse:t,touch:n}){xn(this.e)?n&&n(this.e):t&&t(this.e)}}class On{x;y;constructor(t,n){this.x=t,this.y=n}clone(){return new On(this.x,this.y)}}class Ha{handle;container;options;unbindDown;unbindMove;unbindUp;constructor(t,n,o={}){this.handle=t,this.container=n,this.options=o,t&&(this.unbindDown=ct.bindDown(t,this.mousedown),t.classList.add("draggable-handle"))}teardown(){this.handle?.classList.remove("draggable-handle"),this.unbindDown&&this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove()}offsetX;offsetY;mousedown=t=>{if(t.preventDefault(),this.handle){const{left:n,top:o}=this.handle.getBoundingClientRect();this.offsetX=t.clientX-n,this.offsetY=t.clientY-o}this.options.onMoveStart&&this.options.onMoveStart(),this.unbindMove=ct.bindMove(document,this.mousemove),this.unbindUp=ct.bindUp(document,this.mouseup)};mousemove=t=>{this.container&&(this.container.style.left=t.clientX-this.offsetX+"px",this.container.style.top=t.clientY-this.offsetY+"px"),this.options.onMove&&this.options.onMove()};mouseup=t=>{this.options.onMoveEnd&&this.options.onMoveEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0}}class Wa{_group;onChange;zIndex;constructor(t,n){this._group=t,this.onChange=n,this.a(o=>o.push(this))}set group(t){this._group=t;const n=Ie(this._group),o=Ie(t);n.splice(n.indexOf(this),1),o.push(this),er()}get group(){return this._group}unregister(){this.a(t=>t.splice(t.indexOf(this),1))}raise(){this.a(t=>{t.splice(t.indexOf(this),1),t.push(this)})}a(t){t(Ie(this._group)),er()}}const ke=new Map;function Ie(e){return ke.has(e)||ke.set(e,[]),ke.get(e)}function tr(e,t){return e>t?-tr(t,e):e<0&&t>=0?1:e-t}function er(){let e=0;for(const t of function(n){const o=[];return n.forEach((r,i)=>o.push(i)),o}(ke).sort(tr))for(const n of Ie(t))e!=n.zIndex&&(n.zIndex=e,n.onChange(e)),e++}function kn(e){if(e){const{width:t,height:n}=e.style;e.style.width="auto",e.style.height="auto";const o=Te(e);return e.style.width=t,e.style.height=n,o}return{width:0,height:0,top:0,left:0,bottom:0,right:0}}function Te(e){const t=e.getBoundingClientRect(),n=t.width,o=t.height,r=t.top,i=t.left;return{width:n,height:o,top:r,left:i,bottom:r+o,right:i+n}}class Fa{container;options;handles;constructor(t,n){if(this.container=t,this.options=n,t&&n){this.handles=nr.map(p=>new p(t,this));const{width:o,height:r}=kn(t),i=n.maxWidth||window.innerWidth,s=n.maxHeight||window.innerHeight;let c=!1;(o<n.minWidth||o>i)&&(t.style.width=`${or(o,n.minWidth,i)}px`,c=!0),(r<n.minHeight||r>s)&&(t.style.height=`${or(r,n.minHeight,s)}px`,c=!0),c&&n.onResize&&n.onResize()}}teardown(){this.handles?.forEach(t=>t.teardown())}}const nr=[];class xt{container;helper;handle;handleSize=8;unbindDown;unbindMove;unbindUp;constructor(t,n){this.container=t,this.helper=n,this.handle=this.createHandleElement(),this.unbindDown=ct.bindDown(this.handle,this.mousedown)}teardown(){this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove(),this.handle.parentElement.removeChild(this.handle)}x0;y0;left0;top0;width0;height0;mousedown=t=>{t.preventDefault(),t.stopPropagation();const{left:n,top:o,width:r,height:i}=Te(this.container);this.x0=t.clientX,this.y0=t.clientY,this.left0=n,this.top0=o,this.width0=r,this.height0=i,this.calcSafeBoundaries(),this.helper.options&&this.helper.options.onResizeStart&&this.helper.options.onResizeStart(),this.unbindMove=ct.bindMove(document,this.mousemove),this.unbindUp=ct.bindUp(document,this.mouseup)};minLeft;maxLeft;minRight;maxRight;minTop;maxTop;minBottom;maxBottom;calcSafeBoundaries(){if(!this.helper.options)return;const{left:t,top:n,right:o,bottom:r}=Te(this.container),i=this.helper.options,s=i.maxWidth||window.innerWidth,c=i.maxHeight||window.innerHeight;this.minLeft=Math.max(o-s,0),this.maxLeft=o-i.minWidth,this.minRight=t+i.minWidth,this.maxRight=Math.min(t+s,window.innerWidth),this.minTop=Math.max(r-c,0),this.maxTop=r-i.minHeight,this.minBottom=n+i.minHeight,this.maxBottom=Math.min(n+c,window.innerHeight)}mousemove=t=>{t.preventDefault(),t.stopPropagation(),this.setPosition(t),this.fixPosition(),this.helper.options&&this.helper.options.onResize&&this.helper.options.onResize()};fixPosition(){const{width:t,height:n,left:o,top:r,right:i,bottom:s}=Te(this.container),c=this.helper.options;c&&(o<this.minLeft?(this.container.style.width=t+o-this.minLeft+"px",this.container.style.left=`${this.minLeft}px`):o>this.maxLeft?(this.container.style.width=`${c.minWidth}px`,this.container.style.left=`${this.maxLeft}px`):i<this.minRight?this.container.style.width=`${c.minWidth}px`:i>this.maxRight&&(this.container.style.width=this.maxRight-o+"px"),r<this.minTop?(this.container.style.height=n+r-this.minTop+"px",this.container.style.top=`${this.minTop}px`):r>this.maxTop?(this.container.style.height=`${c.minHeight}px`,this.container.style.top=`${this.maxTop}px`):s<this.minBottom?this.container.style.height=`${c.minHeight}px`:s>this.maxBottom&&(this.container.style.height=this.maxBottom-r+"px"))}mouseup=t=>{t.preventDefault(),t.stopPropagation(),this.helper.options&&this.helper.options.onResizeEnd&&this.helper.options.onResizeEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0};createHandleElement(){const t=document.createElement("div"),n=t.style;return n.position="absolute",this.applyStyle(n),this.container.appendChild(t),t}}function or(e,t,n){return e<t?t:e>n?n:e}nr.push(class extends xt{setPosition(e){this.container.style.width=this.width0+e.clientX-this.x0+"px",this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.right=-this.handleSize+"px",e.bottom=-this.handleSize+"px",e.cursor="nwse-resize"}},class extends xt{setPosition(e){this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.right=`${this.handleSize}px`,e.left=`${this.handleSize}px`,e.height=2*this.handleSize+"px",e.bottom=-this.handleSize+"px",e.cursor="ns-resize"}},class extends xt{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px",this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.bottom=-this.handleSize+"px",e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.cursor="nesw-resize"}},class extends xt{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.bottom=`${this.handleSize}px`,e.width=2*this.handleSize+"px",e.top=`${this.handleSize}px`,e.cursor="ew-resize"}},class extends xt{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px",this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.top=-this.handleSize+"px",e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.cursor="nwse-resize"}},class extends xt{setPosition(e){this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px"}applyStyle(e){e.left=`${this.handleSize}px`,e.right=`${this.handleSize}px`,e.height=2*this.handleSize+"px",e.top=-this.handleSize+"px",e.cursor="ns-resize"}},class extends xt{setPosition(e){this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px",this.container.style.width=this.width0+e.clientX-this.x0+"px"}applyStyle(e){e.right=-this.handleSize+"px",e.top=-this.handleSize+"px",e.height=2*this.handleSize+"px",e.width=2*this.handleSize+"px",e.cursor="nesw-resize"}},class extends xt{setPosition(e){this.container.style.width=this.width0+e.clientX-this.x0+"px"}applyStyle(e){e.right=-this.handleSize+"px",e.top=`${this.handleSize}px`,e.bottom=`${this.handleSize}px`,e.width=2*this.handleSize+"px",e.cursor="ew-resize"}});var Re=Ft({name:"",props:{disabled:{type:Boolean,default:!1},windowStyle:{type:Object,required:!0}},components:{},setup(e){const t=ht(!1),n=ht(!1);return{hover:t,active:n,style:function(){let o=e.windowStyle.button;return t.value&&(o={...o,...this.windowStyle.buttonHover}),n.value&&(o={...o,...this.windowStyle.buttonActive}),o},mouseup:function(o){this.active&&this.$emit("click")},mousedown:function(o){o.preventDefault(),n.value=!0;const r=ct.bindUp(document,()=>{n.value=!1,r()})}}}});const qa=["disabled"];Re.render=function(e,t,n,o,r,i){return G(),ot("div",{class:"btn",style:kt(e.style()),onMouseenter:t[0]||(t[0]=s=>e.hover=!0),onMouseleave:t[1]||(t[1]=s=>e.hover=!1),onMousedown:t[2]||(t[2]=ho((...s)=>e.mousedown&&e.mousedown(...s),["stop"])),onTouchstart:t[3]||(t[3]=ho((...s)=>e.mousedown&&e.mousedown(...s),["stop"])),onMouseup:t[4]||(t[4]=(...s)=>e.mouseup&&e.mouseup(...s)),onTouchend:t[5]||(t[5]=(...s)=>e.mouseup&&e.mouseup(...s)),disabled:e.disabled},[Ct(e.$slots,"default")],44,qa)},Re.__scopeId="data-v-71662210",Re.__file="src/controls/vuewindow/window/Button.vue";const In=new Set;function rr(e){return e!==null?parseFloat(e):0}function Pe(e){const t=window.getComputedStyle(e),n=Math.ceil([t.paddingLeft,t.width,t.paddingRight].map(rr).reduce((r,i)=>r+i)),o=Math.ceil([t.paddingTop,t.height,t.paddingBottom].map(rr).reduce((r,i)=>r+i));return{width:n,height:o}}class ir{width;height;constructor(t,n){this.width=t,this.height=n}}function Ga(e){const t=e.windowEl;if(t){const n=parseFloat(t.style.left||"NaN"),o=parseFloat(t.style.top||"NaN");if(!isNaN(n)&&!isNaN(o))return{left:n,top:o}}return null}function Xa(e,t,n,o){const r=e-n,i=t-o;return r*r+i*i}window.addEventListener("resize",e=>{In.forEach(t=>{t&&se(t.fixPosition)&&t.fixPosition()})});const ze=[];var De=Ft({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:Re},setup(e,{emit:t}){const n=gi();if(!n)return;const{proxy:o}=n;let r=0,i,s,c;const p=ht(e.isOpen),m=()=>{ze.push(o),c=new Wa(e.zGroup,_),e.isOpen&&function(T){T&&(Ke(()=>{r++==0&&(f(o),function(){const D=C.value,{width:B,height:j}=kn(D);let O,F;if(e.left!==void 0!=(e.top!==void 0))throw new Error("Either of left or top is specified. Both must be set or not set.");if(typeof e.left=="number")O=e.left,F=e.top;else{const lt=e.positionHint||"auto";switch(lt){case"auto":{let Q=20,nt=50,Y=0;do{if(ze.every(gt=>{if(!gt.isOpen||o==gt)return!0;const ne=Ga(gt);if(ne==null)return!0;const{left:Be,top:pt}=ne;return Xa(Be,pt,Q,nt)>16}))break;Q=(Q+40)%(window.innerWidth-200),nt=(nt+40)%(window.innerHeight-200)}while(++Y<100);O=Q,F=nt}break;case"center":O=(window.innerWidth-B)/2,F=(window.innerHeight-j)/2,console.log(O,F,window.innerWidth,window.innerHeight,"111111");break;default:try{const Q=lt.split("/").map(Number);if(Q.length!=2)throw null;const[nt,Y]=Q;if(!isFinite(nt)||!isFinite(Y))throw null;O=nt>=0?nt:window.innerWidth-B+nt,F=Y>=0?Y:window.innerHeight-j+Y}catch{throw new Error(`invalid position string: ${lt}`)}}}D&&(D.style.left=`${O}px`,D.style.top=`${F}px`)}()),e.resizable&&d(),$(),i=new Ha(M.value,C.value,{onMove:()=>$(),onMoveStart:()=>t("move-start"),onMoveEnd:()=>t("move-end")}),e.resizable&&function(){const{height:D}=kn(M.value);s=new Fa(C.value,{onResize:()=>d(),onResizeStart:()=>t("resize-start"),onResizeEnd:()=>t("resize-end"),minWidth:e.minWidth,minHeight:e.minHeight+D,maxWidth:e.maxWidth,maxHeight:e.maxHeight?e.maxHeight+D:void 0})}()}),e.activateWhenOpen&&I())}(!0),In.add(o)};function _(T){S.value.zIndex=`${T}`}const C=ht(null),M=ht(null),N=ht(null);function I(){c.raise(),t("activate")}const S=ht({...e.windowStyle.window,zIndex:"auto",overflow:e.overflow}),u=Et(()=>e.windowStyle.titlebar),g=Et(()=>{const T={...e.windowStyle.content};return e.resizable?T.padding="0":e.padding!=null&&(T.padding=`${e.padding}px`),e.isScrollable&&(T.overflow="auto"),T});function f(T){const{width:D,height:B,top:j,left:O}=T,F=C;if(F&&D!=null&&(F.value.style.width=`${D}px`),B!=null){const lt=M.value;if(lt){const Q=Pe(lt).height;F.value.style.height=`${B+Q}px`}}F&&O!=null&&(F.value.style.left=`${O}px`),F&&j!=null&&(F.value.style.top=`${j}px`)}function d(T=!0){const D=C.value,B=M.value,j=N.value;if(j&&D&&B){const{width:O,height:F}=Pe(j),{width:lt,height:Q}=Pe(D),nt=Pe(B).height,Y=lt-(j.offsetWidth-O),gt=Q-nt-(j.offsetHeight-F);j.style.width=`${Y}px`,j.style.height=`${gt}px`,y(),t("resize",new ir(Y,gt)),T&&(t("update:width",Y),t("update:height",gt))}}function y(){const T=C.value;if(T){const D=T.getBoundingClientRect();D.left<0&&(S.value.left="0px"),D.top<0&&(S.value.top="0px"),D.right>window.innerWidth&&(S.value.left=window.innerWidth-D.width+"px"),D.bottom>window.innerHeight&&(S.value.top=window.innerHeight-D.height+"px")}}function $(T=!0){y();const D=C.value;if(D){const{left:B,top:j}=D.getBoundingClientRect();T&&(t("update:left",B),t("update:top",j))}}return qt(()=>e.isOpen,T=>{p.value=T}),qt(()=>e.zGroup,T=>{c.group=T}),qt(()=>e.width,T=>{f({width:T}),d(!1)}),qt(()=>e.height,T=>{f({height:T}),d(!1)}),Ve(()=>{m()}),mi(()=>{In.delete(this),c.unregister(),s&&s.teardown(),i&&i.teardown(),ze.splice(ze.indexOf(o),1)}),{isOpen:p,windowEl:C,titlebar:M,content:N,activate:I,styleWindow:S,styleTitlebar:u,styleContent:g,closeButtonClick:function(){p.value=!1,t("closebuttonclick")},fixPosition:y}}});const Va={class:"title"};var sr;De.render=function(e,t,n,o,r,i){const s=uo("myButton");return G(),vt(lo,{name:"fade",onAfterLeave:t[2]||(t[2]=c=>e.$emit("close")),onAfterEnter:t[3]||(t[3]=c=>e.$emit("open")),persisted:""},{default:ie(()=>[vi(rt("div",{class:"window",style:kt(e.styleWindow),ref:"windowEl",onMousedown:t[0]||(t[0]=(...c)=>e.activate&&e.activate(...c)),onTouchstart:t[1]||(t[1]=(...c)=>e.activate&&e.activate(...c))},[rt("div",{class:"titlebar",style:kt(e.styleTitlebar),ref:"titlebar"},[rt("div",Va,[e.$slots.title?Ct(e.$slots,"title",{key:0}):(G(),ot(Tt,{key:1},[po(yi(e.title),1)],64))]),e.closeButton?(G(),vt(s,{key:0,windowStyle:e.windowStyle,onClick:e.closeButtonClick},{default:ie(()=>[po("\xD7")]),_:1},8,["windowStyle","onClick"])):It("v-if",!0)],4),rt("div",{class:"content",style:kt(e.styleContent),ref:"content"},[Ct(e.$slots,"default")],4)],36),[[wi,e.isOpen]])]),_:3})},De.__file="src/controls/vuewindow/window/index.vue",function(e){e[e.StyleBlack=0]="StyleBlack",e[e.StyleWhite=1]="StyleWhite",e[e.StyleMetal=2]="StyleMetal",e[e.StyleGrayblue=3]="StyleGrayblue"}(sr||(sr={}));const Ka={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)"}},Ja={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)"}},Ya={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)"}},Za={window:{color:"#fff",fontSize:"14px",boxShadow:"0 0 3pt rgba(255, 255, 255, 0.75)",backgroundColor:"rgba(4,51,81,0.6)",borderRadius:"5px"},titlebar:{backgroundColor:"rgba(4,51,81,0.8)",border:"1px solid rgba(153, 153, 153, 0.5)",borderRadius:"5px",fontSize:"16px",fontWeight:400,color:"#fff"},content:{},button:{color:"white",fontSize:"18px"},buttonHover:{backgroundColor:"rgba(255, 255, 255, 0.25)"},buttonActive:{color:"black",backgroundColor:"rgba(255, 255, 255, 0.5)"}},Qa=De;var et;(function(e){e[e.top=0]="top",e[e.bottom=1]="bottom",e[e.centerBack=2]="centerBack",e[e.centerMain=3]="centerMain",e[e.centerFront=4]="centerFront",e[e.left=5]="left",e[e.right=6]="right"})(et||(et={}));class ar{layoutState;layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;widgetConfig=new Array;_LayoutID;constructor(t,n,o){this.layoutState=t,this._LayoutID=o,n.forEach(r=>{if(r.layoutID===o&&(this.widgetConfig.push(r),r.afterid))if(this.preConditionMap.has(r.afterid))this.preConditionMap.get(r.afterid)?.add(r);else{const i=new Set;i.add(r),this.preConditionMap.set(r.afterid,i)}})}getLayoutID(){return this._LayoutID}getWidgetConfig(){return this.widgetConfig}preloadWidgets(){this.widgetConfig.filter(t=>t.preload&&!t.afterid).forEach(t=>{this._loadWidget(t)})}async loadWidget(t){if(!t)return;let n;return Pt(t)?n=t:ae(t)&&(n=this.widgetConfig.find(o=>o.id===t)),n?n.afterid?(this.isWidgetLoaded(n.afterid)||await this.loadWidget(n.afterid),this._loadWidget(n)):this._loadWidget(n):void 0}loadOtherDependenceWidgets(t){this.preConditionMap.has(t)&&this.preConditionMap.get(t)?.forEach(n=>{n.preload&&this._loadWidget(n)})}_loadWidget(t){if(!this.widgetsLoadedSet.has(t.id))return t.component().then(n=>{if(n.default){const o=bi(n.default);this.getContainerComponents(t.container).value.set(t.id,o),this.widgetsLoadedSet.add(t.id),Ke().then(()=>{L.EventBus.emit(st.WidgetLoadedEvent,{layoutID:this._LayoutID,widgetID:t.id}),this.loadOtherDependenceWidgets(t.id)})}}).catch(n=>{L.Logger().error("\u52A0\u8F7DWidget\u5931\u8D25\uFF01",t),L.EventBus.emit(st.WidgetLoadedErrorEvent,t)})}hasDependentWidgets(t){let n=!1;if(this.preConditionMap.has(t)){const o=this.preConditionMap.get(t);if(o){for(const r of o)if(this.isWidgetLoaded(r.id)){n=!0;break}}}return n}unloadWidget(t){if(!t||!this.isWidgetLoaded(t))return;const n=this.widgetConfig.find(o=>o.id===t);if(n){if(this.preConditionMap.has(t)){const i=this.preConditionMap.get(t);if(i)for(const s of i)this.unloadWidget(s.id)}const o=this.getContainerComponents(n.container),r=o.value.get(t);r&&r.unmounted&&r.unmounted(),o.value.delete(t),this.widgetsLoadedSet.delete(t),L.EventBus.emit(st.WidgetUnLoadedEvent,{layoutID:this._LayoutID,widgetID:t})}}isWidgetLoaded(t){return this.widgetsLoadedSet.has(t)}splitTwoContainer(t=!1){const n=this.layoutState.centerMainContainer,o=this.layoutState.centerBackContainer;t?(n&&(n.style.left="0",n.style.width="100%"),o&&(o.style.width="100%")):(n&&(n.style.left="50%",n.style.width="50%"),o&&(o.style.width="50%"))}getLayoutContainer(t){switch(t){case et.top:return this.layoutState.topContainer;case et.bottom:return this.layoutState.bottomContainer;case et.left:return this.layoutState.leftContainer;case et.right:return this.layoutState.rightContainer;case et.centerBack:return this.layoutState.centerBackContainer;case et.centerMain:return this.layoutState.centerMainContainer;case et.centerFront:return this.layoutState.centerFrontContainer}}changeContainerVisible(t,n=!1){const o=this.getLayoutContainer(t);o&&(o.style.visibility=n?"visible":"hidden")}changeWidgetVisible(t,n=!1){const o=this.getWidgetComponent(t);o&&L.EventBus.emit(st.WidgetVisibleChanged,{id:t,layoutID:this._LayoutID,name:o.name,visible:n})}getWidgetComponent(t){if(this.widgetsLoadedSet.has(t)){const n=this.widgetConfig.find(o=>o.id===t);if(n)return this.getContainerComponents(n.container).value.get(t)}}getWigetItem(t){return this.widgetConfig.find(n=>n.id===t)}getGroupWigetItems(t){return this.widgetConfig.filter(n=>n.group===t)}getContainerComponents(t){if(this.layoutMap.has(t))return this.layoutMap.get(t);{const n=ht(new Map);return this.layoutMap.set(t,n),n}}addContainerComponent(t,n){}}var Me=Ft({name:"MainContainer",props:{widgetConfig:{type:Array,required:!0,default:()=>[]},layoutID:{type:String,default:void 0},layoutStyle:{type:Object},enableRouterView:{type:Boolean,default:!0}},emits:["containerLoaded"],setup(e,{attrs:t,slots:n,emit:o}){const r=e.layoutID,i=ht(e.enableRouterView);qt(()=>e.enableRouterView,()=>{i.value=e.enableRouterView});const s=ao({topContainer:void 0,centerBackContainer:void 0,centerMainContainer:void 0,centerFrontContainer:void 0,bottomContainer:void 0,leftContainer:void 0,rightContainer:void 0}),c=new ar(s,e.widgetConfig,r),p=I(et.top),m=I(et.centerBack),_=I(et.centerFront),C=I(et.left),M=I(et.right),N=I(et.bottom);function I(u){return c?.getContainerComponents(u)}const S=Et(()=>e.layoutStyle);return Ve(()=>{c&&(c.preloadWidgets(),r===void 0&&(L.LayoutManager=c),o("containerLoaded",{layoutID:r,layoutManager:c}))}),{..._i(s),topContainerComponents:p,centerbackComponents:m,centerfrontComponents:_,leftContainerComponents:C,rightContainerComponents:M,bottomContainerComponents:N,containerStyle:S,isEnableRouterView:i}}});const tc={ref:"topContainer",class:"topContainer"},ec={key:0,ref:"centerMainContainer",class:"centerdiv mainContainer"},nc={ref:"centerBackContainer",class:"centerdiv backContainer"},oc={ref:"centerFrontContainer",class:"centerdiv centerContainer"},rc={ref:"leftContainer",class:"leftContainer"},ic={ref:"rightContainer",class:"rightContainer"},sc={ref:"bottomContainer",class:"bottomContainer"};Me.render=function(e,t,n,o,r,i){const s=uo("router-view");return G(),ot("div",{class:"layoutContainer",style:kt(e.containerStyle)},[rt("div",tc,[(G(!0),ot(Tt,null,Bt(e.topContainerComponents,([c,p])=>(G(),vt(Rt(p),{key:c}))),128))],512),rt("div",null,[It(" \u4E3B\u8981\u5BB9\u5668-\u5E95\u90E8 "),e.isEnableRouterView?(G(),ot("div",ec,[co(s,null,{default:ie(({Component:c})=>[(G(),vt(Rt(c)))]),_:1})],512)):It("v-if",!0),It(" \u4E0A\u4E00\u5C42-\u4E3B\u5BB9\u5668 "),rt("div",nc,[(G(!0),ot(Tt,null,Bt(e.centerbackComponents,([c,p])=>(G(),vt(Rt(p),{key:c}))),128))],512),It(" \u6700\u4E0A\u6D6E\u52A8-\u4E3B\u5BB9\u5668 "),rt("div",oc,[(G(!0),ot(Tt,null,Bt(e.centerfrontComponents,([c,p])=>(G(),vt(Rt(p),{key:c}))),128))],512),rt("div",rc,[(G(!0),ot(Tt,null,Bt(e.leftContainerComponents,([c,p])=>(G(),vt(Rt(p),{key:c}))),128))],512),rt("div",ic,[(G(!0),ot(Tt,null,Bt(e.rightContainerComponents,([c,p])=>(G(),vt(Rt(p),{key:c}))),128))],512)]),rt("div",sc,[(G(!0),ot(Tt,null,Bt(e.bottomContainerComponents,([c,p])=>(G(),vt(Rt(p),{key:c}))),128))],512)],4)},Me.__scopeId="data-v-4d081e5c",Me.__file="src/controls/layoutcontainer/layout.vue";const $e=new Map,Tn=new Map;let Ae;const ac={getDefaultClient(){if(Ae||(Ae=new Xt(SysConfig.DefaultHproseAPI)),!Ae)throw Error("HproseProxy\u5BF9\u8C61\u4E3A\u7A7A");return Ae},registerHprose(e,t){const n=Tn.get(e);if(!n){const o=new Xt(t);$e.set(e,o)}return n},getHprose:e=>Tn?.get(e),getProxyHprose:e=>$e.get(e),unregisterHprose(e){$e.get(e)&&(Tn.delete(e),$e.delete(e))}},cc=5e3,lc=36e5,Lt={Login:"/api/User/Login",ChangeMyPwd:"/api/User/ChangeMyPwd",Logout:"/api/Check/ExitLogin",RefreshToken:"/api/Check/RefreshToken",CheckToken:"/api/Check/CheckToken",GetSystemRights:"/api/System/GetSystem"},Rn="access_token",hc=L.Config.ServiceURL.LoginAuthURL;function Pn(){const e=Eo();e&&wt(Lt.RefreshToken,hc,{refreshToken:e}).then(t=>{zn(t.data)})}function cr(){const e=yt.getJsonObject(Rn);if(!e)return;const t=new Date().getTime(),n=new Date(e.expire).getTime()-t;n>0&&(n<=5e3?Pn():setTimeout(Pn,n-5e3))}function zn(e){const t=new Date().getTime();let n=new Date(e.accessToken.expires).getTime()-t;if(n>=36e5?(n=18e5,console.warn("\u5BA2\u6237\u7AEF\u65F6\u95F4\u4E0E\u670D\u52A1\u5668\u4E0D\u4E00\u81F4\uFF1A\u8FC7\u53BB\u65F6\u95F4\uFF01")):n<-6e5&&(n=18e5,console.warn("\u5BA2\u6237\u7AEF\u65F6\u95F4\u4E0E\u670D\u52A1\u5668\u4E0D\u4E00\u81F4\uFF1A\u672A\u6765\u65F6\u95F4\uFF01")),n>0){let o=Mt();o?(o.token=e.accessToken.tokenContent,o.expire=e.accessToken.expires,o.refresh=e.refreshToken.tokenContent):o={token:e.accessToken.tokenContent,expire:e.accessToken.expires,refresh:e.refreshToken.tokenContent},yt.set(Rn,o,n/1e3),cr()}else yt.remove(Rn)}const Le="Wm314243",Ne=L.Config.ServiceURL.LoginAuthURL;async function uc(e){const t={username:e.username,pwd:Kt.encryptToString(e.pwd,Le)},n=(await wt(Lt.Login,Ne,t))?.data;return n&&zn(n.doubletoken),n}function dc(e){const t={oldpwd:Kt.encryptToString(e.oldpwd,Le),newpwd:Kt.encryptToString(e.newpwd,Le)};return wt(Lt.ChangeMyPwd,Ne,t)}function pc(e){return Kt.encryptToString(e,Le)}function fc(){const e=Mt();e&&(ko(Lt.Logout,Ne,{token:e.token,reftoken:e.refresh}),un())}function gc(e){return wt(Lt.CheckToken,Ne,{token:e})}const Dn="ROLE_SYSTEM_RIGHT",Mn=new le("",sessionStorage);function lr(){return Mn.get(Dn)}function $n(e){Mn.set(Dn,e)}function hr(){Mn.remove(Dn)}function Ht(e){if(e)for(let t=0;t<e.length;t++){const n=e[t];n.children&&n.children.length>0?(Ht(n.children),n.children.length===0&&(e.splice(t,1),t--)):n.selected||(e.splice(t,1),t--)}}function ur(e,t,n="name"){e&&t&&e.forEach(o=>{const r=t.find(i=>i[n]===o[n]);r&&(o.children?r.children&&ur(o.children,r.children,n):(!r.children||r.children.length===0)&&r.selected&&(o.selected=r.selected))})}function dr(e,t,n="name"){e&&t&&e.forEach(o=>{const r=t.find(i=>i[n]===o[n]);r&&(o.children?r.children&&dr(o.children,r.children,n):(!r.children||r.children.length===0)&&r.selected&&(o.selected=r.selected))})}function Qt(e,t,n,o="name"){const r=e[n],i=t[n];r?i&&dr(r,i,o):i&&(e[n]=i)}function pr(e){if(e&&e.length>0){const t=e.length;let n,o=!1;if(t>0){o=Pt(e[0]);const r=o?e[0]:JSON.parse(e[0]);if(t>1)for(let i=1;i<e.length;i++){const s=e[i],c=o?s:JSON.parse(s);Qt(r,c,"routes","name"),Qt(r,c,"widgetMenu","name"),Qt(r,c,"widgets","id"),Qt(r,c,"functions","id")}n=r}return n&&(Ht(n.routes),Ht(n.widgetMenu),Ht(n.widgets),Ht(n.functions)),n}}const An=[],Ln=[],Nn=[];function te(){return lr()}async function mc(e,t=!1){hr();const n=Lt.GetSystemRights,o=L.Config.ServiceURL.LoginAuthURL,r=await wt(n,o,{systemid:e});if(!r||!r.data)return void L.Message?.warn("\u65E0\u6CD5\u83B7\u53D6\u529F\u80FD\u6388\u6743\u5217\u8868\uFF01");const i=r.data;if(i&&i.length>0){if(t){const s=JSON.parse(i[0]);return $n(s),s}{const s=pr(i);return $n(s),s}}}function fr(e,t){const n={...e};return n.meta||(n.meta={}),t.index!=null&&(n.meta.index=t.index),t.title!=null&&(n.meta.title=t.title),e.children&&(n.children=[],t.children&&t.children.forEach(o=>{const r=e.children?.find(i=>i.path===o.path);if(r){const i=fr(r,o);i&&n.children?.push(i)}})),n}function vc(e,t=2){if(t===0)return e;const n=te();return n&&n.routes?(Nn.length>0||e.forEach(o=>{const r=n.routes?.find(i=>i.name===o.name);if(r){const i=fr(o,r);i&&Nn.push(i)}}),Nn):void 0}function gr(e,t){const n={...e};return t.index!=null&&(n.index=t.index),e.children&&(n.children=[],t.children&&t.children.forEach(o=>{const r=e.children?.find(i=>i.name===o.name);if(r){const i=gr(r,o);i&&n.children?.push(i)}})),n}function yc(e,t=2){if(t===0)return e;const n=te();return n&&n.widgetMenu?(Ln.length>0||e.forEach(o=>{const r=n.widgetMenu?.find(i=>i.name===o.name);if(r){const i=gr(o,r);i&&Ln.push(i)}}),Ln):void 0}function wc(e,t=2){if(t===0)return e;const n=te();return n&&n.widgets?(An.length>0||e?.forEach(o=>{n.widgets?.find(r=>r.id===o.id)&&An.push(o)}),An):void 0}function bc(e,t=2){if(t===0)return e;const n=te();return n?n.functions:void 0}export{Ls as BigFileDownload,de as Download,cs as DownloadByUrl,Dt as EnumColor,zo as FileUpload,Aa as GetSignalRClient,L as Global,ac as GlobalHprose,Ut as GlobalMitt,ut as H5Tool,ee as HproseClient,as as HttpDownload,vo as JsonDownload,Me as LayoutContainer,et as LayoutContainerEnum,ar as LayoutManager,Ns as ObjToUrlParams,Ye as Pane,Xt as ProxyClient,ss as SaveAs,ki as Splitpanes,le as Storage,ce as StringUtils,Ka as StyleBlack,Za as StyleGrayblue,Ya as StyleMetal,Ja as StyleWhite,st as SysEvents,cc as TOKEN_REFRESH_TIME,lc as TOKEN_VALID_TIMESPAN,Lt as USER_TOKEN_API,xe as VCollapsiblePanel,Ee as VCollapsiblePanelGroup,De as VWindow,ha as WaterMark,ir as WindowResizeEvent,Qa as WindowType,Kt as XXTEA,is as calculateBestTextColor,dc as changeMyPWD,cr as checkDoRefreshToken,gc as checkToken,un as clearLocalToken,hr as clearRight,ns as colorIsDark,xs as createFileUpload,os as darken,Lo as deepMerge,wo as delay,Pn as doRefreshToken,No as exportSystemRights,us as get,te as getCurrentSystemRight,ps as getData,pc as getEncryptPWD,bc as getFunctions,Ji as getHexColor,Mt as getLocalToken,Ps as getLockState,Zi as getLongHexColor,Do as getProxyClient,Yi as getRGBColor,ts as getRGBColorFromHSLA,Eo as getRefreshToken,lr as getRight,vc as getRoutes,mc as getSystemRoleRight,wc as getWidgetConfig,yc as getWidgetMenus,Ht as handleNodes,sn as hexToRGB,Ts as init,Rs as initDefaultProxyClient,it as is,tn as isArray,Di as isAsyncFunction,$i as isBoolean,Ai as isClient,Pi as isDate,go as isDef,Ni as isElement,Oi as isEmpty,Qi as isEnumColor,ji as isError,se as isFunction,ue as isHexColor,Ui as isImageDom,qi as isMap,Qe as isNull,Ti as isNullAndUnDef,Ri as isNullOrUnDef,zi as isNumber,Pt as isObjectX,Mi as isPromise,Bi as isServer,ae as isString,Fi as isSymbol,Ze as isUnDef,Gi as isValidURL,Wi as isWeakMap,Hi as isWeakSet,Li as isWindow,ks as jquery,rs as lighten,uc as login,fc as logout,pr as mergeFilterRoleSysRight,ur as mergeNodes,Qt as mergeNodesAll,Ki as newGuid,zs as onLockListener,ds as post,wt as requestGet,xo as requestPost,ko as requestPostBody,es as rgbToHex,zn as setLocalToken,$n as setRight,ls as sleep,Vi as storage,yt as storageHelper,Ds as unLockListener,he as uuid,Ws as verifiyNumberInteger,Zs as verifyAccount,Gs as verifyAndSpace,ca as verifyCarNum,Fs as verifyCnAndSpace,oa as verifyEmail,qs as verifyEnAndSpace,ia as verifyFullName,na as verifyIPAddress,ra as verifyIdCard,Ks as verifyNumberCnUppercase,Xs as verifyNumberComma,_n as verifyNumberIntegerAndFloat,js as verifyNumberPercentage,Hs as verifyNumberPercentageFloat,Qs as verifyPassword,ta as verifyPasswordPowerful,ea as verifyPasswordStrength,Js as verifyPhone,sa as verifyPostalCode,Ys as verifyTelPhone,Vs as verifyTextColor,aa as verifyUrl,Us as writeIconifyList,Os as writeSysRoleRight};
|