xframelib 0.6.9 → 0.7.0
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 +1 -0
- package/dist/assets/output-79ea15e6.css +305 -0
- package/dist/index.cjs +3 -3
- package/dist/index.css +88 -88
- package/dist/index.js +3 -3
- package/dist/utils/AxiosHelper.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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&&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(b>0&&C-b>2){const E=v.substring(b+2,C);E.indexOf("System.Exception")>0?t.message="\u540E\u53F0\u670D\u52A1\u5185\u90E8\u51FA\u9519\uFF01":(o=!0,t.message=E)}}else t.message="\u670D\u52A1\u5668\u7AEF\u51FA\u9519";break;case 501:t.message="\u7F51\u7EDC\u672A\u5B9E\u73B0";break;case 502:t.message="\u7F51\u7EDC\u9519\u8BEF";break;case 503:t.message="\u670D\u52A1\u4E0D\u53EF\u7528";break;case 504:t.message="\u7F51\u7EDC\u8D85\u65F6";break;case 505:t.message="http\u7248\u672C\u4E0D\u652F\u6301\u8BE5\u8BF7\u6C42";break;default:t.message=`\u8FDE\u63A5\u9519\u8BEF${t.response.status}`}let p={address:r,code:l,isExceptionInfo:o,message:t.message,result:t.response.data};if(B.EventBus.emit(nt.AxiosRequestErrorEvent,p),o)throw new Error(t.message)}else{if(t?.message)throw new Error(t.message);console.error(t,"Http\u8BF7\u6C42\u9519\u8BEF!")}}function Zn(t,e,n,i,r,o="json",l){const p=He(i,e,r,o);l&&l>=2e4&&(p.timeout=l);const v=function(b){let C=new FormData;return b&&Object.keys(b).forEach(E=>{if(!b)return;let A=b[E];A!=null&&(Te(A)?A.forEach(D=>{C.append(E,ti(D))}):C.append(E,ti(A)))}),C}(n);return B.Axios?.post(t,v,p).catch(function(b){Zt(b,e,t,"Post")})}function Qn(t,e,n,i,r,o="json",l){const p=He(i,e,r,o);return l&&l>=2e4&&(p.timeout=l),B.Axios?.post(t,n,p).catch(function(v){Zt(v,e,t,"Post")})}function Ao(t,e){return lt(t,void 0,e)}function Po(t,e){return Zn(t,void 0,e)}function To(t,e){return B.Axios?.get(t,{params:e}).catch(function(n){Zt(n,t,"","\u5916\u90E8Get")})}function ti(t){return t instanceof Blob?t:t.toString()}var qe={exports:{}},Do=typeof window<"u"?window:xt!==void 0?xt:typeof self<"u"?self:{},Bo=function(t){if(!t)return!1;var e=No.call(t);return e==="[object Function]"||typeof t=="function"&&e!=="[object RegExp]"||typeof window<"u"&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)},No=Object.prototype.toString,Ge=function(t){return t.replace(/^\s+|\s+$/g,"")},Uo=function(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var i in n)Oo.call(n,i)&&(t[i]=n[i])}return t},Oo=Object.prototype.hasOwnProperty,ei=Do,jo=Bo,Fo=function(t){if(!t)return{};for(var e,n={},i=Ge(t).split(`
|
|
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)t[n]=St(t[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={
|
|
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(b>0&&C-b>2){const E=v.substring(b+2,C);E.indexOf("System.Exception")>0?t.message="\u540E\u53F0\u670D\u52A1\u5185\u90E8\u51FA\u9519\uFF01":(o=!0,t.message=E)}}else t.message="\u670D\u52A1\u5668\u7AEF\u51FA\u9519";break;case 501:t.message="\u7F51\u7EDC\u672A\u5B9E\u73B0";break;case 502:t.message="\u7F51\u7EDC\u9519\u8BEF";break;case 503:t.message="\u670D\u52A1\u4E0D\u53EF\u7528";break;case 504:t.message="\u7F51\u7EDC\u8D85\u65F6";break;case 505:t.message="http\u7248\u672C\u4E0D\u652F\u6301\u8BE5\u8BF7\u6C42";break;default:t.message=`\u8FDE\u63A5\u9519\u8BEF${t.response.status}`}let p={address:r,code:l,isExceptionInfo:o,message:t.message,result:t.response.data};if(B.EventBus.emit(nt.AxiosRequestErrorEvent,p),o)throw new Error(t.message)}else{if(t?.message)throw new Error(t.message);console.error(t,"Http\u8BF7\u6C42\u9519\u8BEF!")}}function Zn(t,e,n,i,r,o="json",l){const p=He(i,e,r,o);l&&l>=2e4&&(p.timeout=l),p.headers["Content-Type"]="multipart/form-data";const v=function(b){let C=new FormData;return b&&Object.keys(b).forEach(E=>{if(!b)return;let A=b[E];A!=null&&(Te(A)?A.forEach(D=>{C.append(E,ti(D))}):C.append(E,ti(A)))}),C}(n);return B.Axios?.post(t,v,p).catch(function(b){Zt(b,e,t,"Post")})}function Qn(t,e,n,i,r,o="json",l){const p=He(i,e,r,o);return l&&l>=2e4&&(p.timeout=l),B.Axios?.post(t,n,p).catch(function(v){Zt(v,e,t,"Post")})}function Ao(t,e){return lt(t,void 0,e)}function Po(t,e){return Zn(t,void 0,e)}function To(t,e){return B.Axios?.get(t,{params:e}).catch(function(n){Zt(n,t,"","\u5916\u90E8Get")})}function ti(t){return t instanceof Blob?t:t.toString()}var qe={exports:{}},Do=typeof window<"u"?window:xt!==void 0?xt:typeof self<"u"?self:{},Bo=function(t){if(!t)return!1;var e=No.call(t);return e==="[object Function]"||typeof t=="function"&&e!=="[object RegExp]"||typeof window<"u"&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)},No=Object.prototype.toString,Ge=function(t){return t.replace(/^\s+|\s+$/g,"")},Uo=function(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var i in n)Oo.call(n,i)&&(t[i]=n[i])}return t},Oo=Object.prototype.hasOwnProperty,ei=Do,jo=Bo,Fo=function(t){if(!t)return{};for(var e,n={},i=Ge(t).split(`
|
|
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
4
|
`,r=0;t.forEach(o=>{const l=o.split(":");if(l&&l.length===2){const p="icon"+r;n+=`import ${p} from '~icons/${l[0]}/${l[1]}'
|
|
5
5
|
`,i+=` '${o}':${p},
|
|
6
6
|
`,r++}}),r>0&&(i+=`};
|
|
@@ -21,7 +21,7 @@ declare function requestGet(apiUrl: string, baseUrl?: string, _params?: any, hea
|
|
|
21
21
|
* @param timeoutMS 超时时间,默认为60000毫秒
|
|
22
22
|
* @returns 返回Promise对象
|
|
23
23
|
*/
|
|
24
|
-
declare function requestPost(apiUrl: string, baseUrl?: string,
|
|
24
|
+
declare function requestPost(apiUrl: string, baseUrl?: string, _bodyFormParams?: any, _queryParams?: any, headers?: any, responseType?: ResponseType, timeoutMS?: number): Promise<any>;
|
|
25
25
|
/**
|
|
26
26
|
* Post服务请求-Body方式
|
|
27
27
|
* @param apiUrl API接口路径
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xframelib",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "积累的前端开发基础库",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"common": "dist/index.cjs",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"rimraf": "^3.0.2",
|
|
48
48
|
"rollup-plugin-copy": "^3.4.0",
|
|
49
49
|
"rollup-plugin-esbuild": "^5.0.0",
|
|
50
|
-
"rollup-plugin-scss": "^
|
|
50
|
+
"rollup-plugin-scss": "^3.0.0",
|
|
51
51
|
"rollup-plugin-terser": "^7.0.2",
|
|
52
52
|
"rollup-plugin-typescript2": "^0.34.1",
|
|
53
53
|
"rollup-plugin-vue": "^6.0.0",
|