@zyzgroup/core-web 0.1.9 → 0.1.10
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/dist/zyzgroup_core_web.iife.js +4 -4
- package/dist/zyzgroup_core_web.iife.js.map +1 -1
- package/dist/zyzgroup_core_web.js +14 -12
- package/dist/zyzgroup_core_web.js.map +1 -1
- package/dist/zyzgroup_core_web.umd.cjs +4 -4
- package/dist/zyzgroup_core_web.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/types/dom/DOMEventBus.d.ts +4 -4
- package/types/dom/DOMEventBus.d.ts.map +1 -1
- package/types/dom/DOMParse.d.ts +2 -2
- package/types/dom/DOMParse.d.ts.map +1 -1
- package/types/math/Shape.d.ts +2 -2
- package/types/math/Shape.d.ts.map +1 -1
- package/types/math/core/Box2.d.ts.map +1 -0
- package/types/math/{math/math → core}/Box3.d.ts +2 -2
- package/types/math/core/Box3.d.ts.map +1 -0
- package/types/math/{math/core → core}/BufferAttribute.d.ts +2 -2
- package/types/math/core/BufferAttribute.d.ts.map +1 -0
- package/types/math/core/Color.d.ts.map +1 -0
- package/types/math/core/ColorManagement.d.ts.map +1 -0
- package/types/math/core/Cylindrical.d.ts.map +1 -0
- package/types/math/core/Euler.d.ts.map +1 -0
- package/types/math/{math/math → core}/Frustum.d.ts +1 -1
- package/types/math/core/Frustum.d.ts.map +1 -0
- package/types/math/core/Layers.d.ts.map +1 -0
- package/types/math/core/Line3.d.ts.map +1 -0
- package/types/math/core/Matrix.d.ts.map +1 -0
- package/types/math/core/Matrix2.d.ts.map +1 -0
- package/types/math/core/Matrix3.d.ts.map +1 -0
- package/types/math/core/Matrix4.d.ts.map +1 -0
- package/types/math/{math/core → core}/Object3D.d.ts +10 -7
- package/types/math/core/Object3D.d.ts.map +1 -0
- package/types/math/core/Plane.d.ts.map +1 -0
- package/types/math/core/Quaternion.d.ts.map +1 -0
- package/types/math/core/Ray.d.ts.map +1 -0
- package/types/math/core/Sphere.d.ts.map +1 -0
- package/types/math/core/Spherical.d.ts.map +1 -0
- package/types/math/core/SphericalHarmonics3.d.ts.map +1 -0
- package/types/math/core/Triangle.d.ts.map +1 -0
- package/types/math/core/Vector.d.ts.map +1 -0
- package/types/math/{math/math → core}/Vector2.d.ts +1 -1
- package/types/math/core/Vector2.d.ts.map +1 -0
- package/types/math/{math/math → core}/Vector3.d.ts +1 -1
- package/types/math/core/Vector3.d.ts.map +1 -0
- package/types/math/core/Vector4.d.ts.map +1 -0
- package/types/math/{math → core}/constants.d.ts.map +1 -1
- package/types/math/core/index.d.ts +9 -0
- package/types/math/core/index.d.ts.map +1 -0
- package/types/math/index.d.ts +1 -1
- package/types/math/index.d.ts.map +1 -1
- package/types/math/math/cameras/Camera.d.ts +0 -11
- package/types/math/math/cameras/Camera.d.ts.map +1 -1
- package/types/math/math/controls/Controls.d.ts +0 -24
- package/types/math/math/controls/Controls.d.ts.map +1 -1
- package/types/math/math/core/GLBufferAttribute.d.ts +0 -18
- package/types/math/math/core/GLBufferAttribute.d.ts.map +1 -1
- package/types/math/math/core/BufferAttribute.d.ts.map +0 -1
- package/types/math/math/core/EventDispatcher.d.ts +0 -14
- package/types/math/math/core/EventDispatcher.d.ts.map +0 -1
- package/types/math/math/core/Layers.d.ts.map +0 -1
- package/types/math/math/core/Object3D.d.ts.map +0 -1
- package/types/math/math/index.d.ts +0 -10
- package/types/math/math/index.d.ts.map +0 -1
- package/types/math/math/math/Box2.d.ts.map +0 -1
- package/types/math/math/math/Box3.d.ts.map +0 -1
- package/types/math/math/math/Color.d.ts.map +0 -1
- package/types/math/math/math/ColorManagement.d.ts.map +0 -1
- package/types/math/math/math/Cylindrical.d.ts.map +0 -1
- package/types/math/math/math/Euler.d.ts.map +0 -1
- package/types/math/math/math/Frustum.d.ts.map +0 -1
- package/types/math/math/math/Line3.d.ts.map +0 -1
- package/types/math/math/math/Matrix.d.ts.map +0 -1
- package/types/math/math/math/Matrix2.d.ts.map +0 -1
- package/types/math/math/math/Matrix3.d.ts.map +0 -1
- package/types/math/math/math/Matrix4.d.ts.map +0 -1
- package/types/math/math/math/Plane.d.ts.map +0 -1
- package/types/math/math/math/Quaternion.d.ts.map +0 -1
- package/types/math/math/math/Ray.d.ts.map +0 -1
- package/types/math/math/math/Sphere.d.ts.map +0 -1
- package/types/math/math/math/Spherical.d.ts.map +0 -1
- package/types/math/math/math/SphericalHarmonics3.d.ts.map +0 -1
- package/types/math/math/math/Triangle.d.ts.map +0 -1
- package/types/math/math/math/Vector.d.ts.map +0 -1
- package/types/math/math/math/Vector2.d.ts.map +0 -1
- package/types/math/math/math/Vector3.d.ts.map +0 -1
- package/types/math/math/math/Vector4.d.ts.map +0 -1
- /package/types/math/{math/math → core}/Box2.d.ts +0 -0
- /package/types/math/{math/math → core}/Color.d.ts +0 -0
- /package/types/math/{math/math → core}/ColorManagement.d.ts +0 -0
- /package/types/math/{math/math → core}/Cylindrical.d.ts +0 -0
- /package/types/math/{math/math → core}/Euler.d.ts +0 -0
- /package/types/math/{math/core → core}/Layers.d.ts +0 -0
- /package/types/math/{math/math → core}/Line3.d.ts +0 -0
- /package/types/math/{math/math → core}/Matrix.d.ts +0 -0
- /package/types/math/{math/math → core}/Matrix2.d.ts +0 -0
- /package/types/math/{math/math → core}/Matrix3.d.ts +0 -0
- /package/types/math/{math/math → core}/Matrix4.d.ts +0 -0
- /package/types/math/{math/math → core}/Plane.d.ts +0 -0
- /package/types/math/{math/math → core}/Quaternion.d.ts +0 -0
- /package/types/math/{math/math → core}/Ray.d.ts +0 -0
- /package/types/math/{math/math → core}/Sphere.d.ts +0 -0
- /package/types/math/{math/math → core}/Spherical.d.ts +0 -0
- /package/types/math/{math/math → core}/SphericalHarmonics3.d.ts +0 -0
- /package/types/math/{math/math → core}/Triangle.d.ts +0 -0
- /package/types/math/{math/math → core}/Vector.d.ts +0 -0
- /package/types/math/{math/math → core}/Vector4.d.ts +0 -0
- /package/types/math/{math → core}/constants.d.ts +0 -0
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|[\u{2B740}-\u{2B81D}]
|
|
8
8
|
|[\u{2B820}-\u{2CEAF}]
|
|
9
9
|
|[\u{2CEB0}-\u{2EBEF}]
|
|
10
|
-
`.replace(/\s+/g,""),"u");break;case"mime-image":t=/^image\//;break;case"mime-video":t=/^video\//;break;case"mime-audio":t=/^audio\//;break;case"mime-document-word":t=/^application\/(?:vnd\.openxmlformats-officedocument\.wordprocessingml\.document|msword|vnd\.ms-word\.document\.macroenabled\.12|vnd\.openxmlformats-officedocument\.wordprocessingml\.template|vnd\.ms-word\.template\.macroenabled\.12)$/;break;case"mime-document-excel":t=/^application\/(?:vnd\.openxmlformats-officedocument\.spreadsheetml\.sheet|vnd\.ms-excel|vnd\.ms-excel\.sheet\.macroenabled\.12|vnd\.openxmlformats-officedocument\.spreadsheetml\.template|vnd\.ms-excel\.template\.macroenabled\.12)$/;break;case"mime-document-ppt":t=/^application\/(?:vnd\.ms-powerpoint|vnd\.openxmlformats-officedocument\.presentationml\.presentation|vnd\.ms-powerpoint\.presentation\.macroenabled\.12|vnd\.openxmlformats-officedocument\.presentationml\.template|vnd\.ms-powerpoint\.template\.macroenabled\.12)$/;break;case"mime-document-json":t=/^application\/json$/;break;case"mime-document-xml":t=/^(?:application|text)\/(?:xml|xhtml\+xml)$/;break}return t},zt=(n,t)=>(typeof n=="string"&&(n=os(n)||new RegExp(n)),n.test(t)),ki=(n,t)=>{typeof n=="string"&&(n=os(n)||new RegExp(n));const e=t.match(n);return e?n.flags.toLowerCase().indexOf("g")>=0?e.map(s=>({matchIndex:-1,fullMatch:s,groupMatchs:[]})):{matchIndex:typeof e.index=="number"?e.index:-1,fullMatch:e[0],groupMatchs:e.slice(1)}:null},Li=(n,t)=>{typeof n=="string"&&(n=os(n)||new RegExp(n));const e=[],s=t.matchAll(n);for(const i of s)e.push({matchIndex:typeof i.index=="number"?i.index:-1,fullMatch:i[0],groupMatchs:i.slice(1)});return e};function Eo(n){const t=n.match(/[\s\S]/gu);return t?t.length:0}function Ri(n,t){const e=n.codePointAt(t);return e?String.fromCodePoint(e):void 0}function Oi(n=12){const t="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghijklmnopqrstuvwxyz0123456789",e=t.length;let s="";for(let i=0;i<n;i++)s+=t[Math.floor(Math.random()*e)];return s}function _o(n){return n.replace(/(^\w)/g,t=>t.toLowerCase())}const ct=(n,t="-")=>{let e=n.replace(new RegExp(`${t}?([A-Z])`,"g"),t+"$1").toLowerCase();return e=e.replace(new RegExp(`^${t}`),""),e};function Ao(n){return n.replace(/(^\w|[_-]\w)/g,t=>t.slice(-1).toUpperCase())}function Fi(n){return _o(Ao(n))}function Ni(n){let t="";for(let e=0,s=n.length;e<s;e++){const i=n.charCodeAt(e);i>=1&&i<=127?t+=n.charAt(e):i>2047?(t+=String.fromCharCode(224|i>>12&15),t+=String.fromCharCode(128|i>>6&63),t+=String.fromCharCode(128|i>>0&63)):(t+=String.fromCharCode(192|i>>6&31),t+=String.fromCharCode(128|i>>0&63))}return t}const Do="[object String]",Io="[object Symbol]";function Bi(n){return Object.prototype.toString.call(n)}function Mo(n){return n!=null}function ko(n){return Bi(n)===Do}function Lo(n){return n===n+0}function Ro(n){return Bi(n)===Io}function Oo(n,...t){return new n.constructor(...t)}function Ui(n,t){for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&!t(e,n[e])&&delete n[e];return n}function Fo(n,t="",e=["","sign","key"]){return Object.keys(n).filter(s=>{for(let i=0,r=e.length;i<r;i++)if(n[s]==e[i])return!1;return!0}).sort().map(s=>`${s}=${n[s]}`).join("&")+t}function Pe(n,t){const e=n.findIndex(s=>s===t);return e>=0&&n.splice(e,1),n}function Yi(n,t){return n.findIndex(e=>e==t)>=0}function No(n,...t){return t.forEach(e=>{Yi(n,e)||n.push(e)}),n}let Xi;try{Xi=Map}catch{Xi=function(){}}let zi;try{zi=Set}catch{zi=function(){}}function Bo(n){return typeof n=="number"&&Number.isNaN(n)}function Kt(n,t){if(n=parseFloat(n),Bo(n)){if(typeof t=="number")return t;throw new Error(`parseNumber(${n}) isNaN!`)}return n}function hs(n,t,e=Number.EPSILON*Math.pow(2,2)){return Math.abs(n-t)<e}const H=(n,t,e)=>n<t?t:n>e?e:n,Uo=(n,t,e)=>s=>{const i=H(s,n,t);return e==0?i:t-i<e?t:Math.round(i/e)*e};function Yo(n,t=12){return Kt(n,0).toFixed(t)}function Ot(n,t=12){return+Yo(n,t)}function cn(n,t){const e=ki("number-single",String(n));return{hasNumber:!!e,number:e&&!Array.isArray(e)&&e.fullMatch?parseFloat(e.fullMatch):Mo(t)?t:NaN,prefix:e&&!Array.isArray(e)&&e.fullMatch?n.substring(0,e.matchIndex):"",suffix:e&&!Array.isArray(e)&&e.fullMatch?n.substring(e.matchIndex+e.fullMatch.length):""}}function Gi(n){const t=ki("number",n);return t?Array.isArray(t)?t.map(e=>Number(e.fullMatch)):[Number(t.fullMatch)]:[]}Xo();function Xo(){const n=new ArrayBuffer(4),t=new Float32Array(n),e=new Uint32Array(n),s=new Uint32Array(512),i=new Uint32Array(512);for(let h=0;h<256;++h){const c=h-127;c<-27?(s[h]=0,s[h|256]=32768,i[h]=24,i[h|256]=24):c<-14?(s[h]=1024>>-c-14,s[h|256]=1024>>-c-14|32768,i[h]=-c-1,i[h|256]=-c-1):c<=15?(s[h]=c+15<<10,s[h|256]=c+15<<10|32768,i[h]=13,i[h|256]=13):c<128?(s[h]=31744,s[h|256]=64512,i[h]=24,i[h|256]=24):(s[h]=31744,s[h|256]=64512,i[h]=13,i[h|256]=13)}const r=new Uint32Array(2048),a=new Uint32Array(64),o=new Uint32Array(64);for(let h=1;h<1024;++h){let c=h<<13,l=0;for(;!(c&8388608);)c<<=1,l-=8388608;c&=-8388609,l+=947912704,r[h]=c|l}for(let h=1024;h<2048;++h)r[h]=939524096+(h-1024<<13);for(let h=1;h<31;++h)a[h]=h<<23;a[31]=1199570944,a[32]=2147483648;for(let h=33;h<63;++h)a[h]=2147483648+(h-32<<23);a[63]=3347054592;for(let h=1;h<64;++h)h!==32&&(o[h]=1024);return{floatView:t,uint32View:e,baseTable:s,shiftTable:i,mantissaTable:r,exponentTable:a,offsetTable:o}}var lt=(n=>(n.UNKNOWN="",n.TEXT="text/plain",n.MD="text/plain",n.HTML="text/html",n.XML_TEXT="text/xml",n.CSS="text/css",n.JPEG="image/jpeg",n.PNG="image/png",n.GIF="image/gif",n.BMP="image/bmp",n.WEBP="image/webp",n.SVG="image/svg+xml",n.ICON="image/x-icon",n.MICROSOFT_ICON="image/vnd.microsoft.icon",n.MPEG="audio/mpeg",n.MP3="audio/mpeg",n.MP4="video/mp4",n.OGG="audio/ogg",n.WAV="audio/wav",n.MIDI="audio/midi",n.WEBM="video/webm",n.VIDEO_OGG="video/ogg",n.OCTET_STREAM="application/octet-stream",n.JAVASCRIPT="application/javascript",n.ECMASCRIPT="application/ecmascript",n.JSON="application/json",n.XML="application/xml",n.XHTML="application/xhtml+xml",n.XWWW="application/x-www-form-urlencoded",n.DOC="application/msword",n.CSV="application/x-csv",n.EXCEL="application/vnb.ms-excel",n.PPT="application/vnb.mspowerpoint",n.PDF="application/pdf",n.ZIP="application/zip",n.TGZ="application/x-gtar",n.TAR_GZ="application/x-gzip",n.EOT="appliaction/vnd.ms-fontobject",n.TTF="aplication/font-sfnt",n.PKCS12="aplication/pkcs12",n))(lt||{}),cs=(n=>(n.ascii="ascii",n.utf8="utf8",n.utf16le="utf16le",n.ucs2="ucs2",n.base64="base64",n.base64url="base64url",n.latin1="latin1",n.binary="binary",n.hex="hex",n))(cs||{}),Ct=(n=>(n.text="text",n.dataURL="dataURL",n.binaryString="binaryString",n.arraybuffer="arraybuffer",n))(Ct||{});const Ee=(n,t=16)=>{let e=n.toLowerCase();const s=e.indexOf("0b")==0,i=e.indexOf("0o")==0,r=e.indexOf("0x")==0;(s||i||r)&&(e=e.slice(2)),s&&(t=2),i&&(t=8),r&&(t=16);const a=parseInt(e,t);if(isNaN(a))throw new Error(`radixStringToNumber(${n}, ${t}) 无法解析!`);return a};function zo(n){return new TextEncoder().encode(n)}function Go(n){return String.fromCharCode.apply(null,new Uint16Array(n))}const ln=(n,t,e)=>t?e===cs.base64?new Blob([n],{type:`${t};${e}`}):e===cs.utf8?new Blob([n],{type:`${t};charset=${e}`}):new Blob([n],{type:`${t}`}):new Blob([n]),Vo=n=>{let t=lt.UNKNOWN;switch(new DataView(n).getUint32(0,qo()).toString(16).toUpperCase()){case"FFD8FFDB":t=lt.JPEG;break;case"FFD8FFE0":case"FFD8FFE1":case"FFD8FFE2":case"FFD8FFE3":t=lt.JPEG;break;case"89504E47":t=lt.PNG;break;case"47494638":t=lt.GIF;break;case"52494646":t=lt.WEBP;break;case"25504446":t=lt.PDF;break;case"504B0304":t=lt.ZIP;break}return t};function qo(){const n=Uint32Array.of(305419896),t=new Uint8Array(n.buffer);switch(t[0]*16777216+t[1]*65536+t[2]*256+t[3]){case 305419896:return!1;case 2018915346:return!0}}function $(){return(performance||Date).now()}function jo(n,t=3,e=":"){let s=""+n[0]+n[1];switch(t){case 1:break;case 2:s+=e+n[2]+n[3];break;case 3:s+=e+n[4]+n[5];break}return s}function Ho(n){let t=0;for(let e=5;e>=0;e=e-2)e==5?t+=n[e-1]*10+n[e]:e==3?t+=(n[e-1]*10+n[e])*60:e==1&&(t+=(n[e-1]*10+n[e])*60*60);return t=Math.floor(Math.max(0,t)),t*1e3}function $o(n){let t=Ho(n)/1e3;const e=t%60;n[5]=e%10,n[4]=Math.floor(e/10),t=Math.floor(t/60);const s=t%60;n[3]=s%10,n[2]=Math.floor(s/10),t=Math.floor(t/60);const i=t%60%24;return n[1]=i%10,n[0]=Math.floor(i/10),n}function Wo(n,t=1){return n[5]+=t,$o(n)}function Jo(n,t){let e;return function(...s){clearTimeout(e),e=setTimeout(()=>{n.apply(this,s)},t)}}class ls{events;constructor(){this.events={}}on(t,e){return this.events[t]||(this.events[t]=[]),this.events[t].push(e),this}addListener(t,e){return this.on(t,e),this}prependListener(t,e){return this.events[t]||(this.events[t]=[]),this.events[t].unshift(e),this}removeListener(t,e){if(this.events[t])return this.events[t]=this.events[t].filter(s=>s!==e),this}off(t,e){return this.removeListener(t,e),this}removeAllListeners(t){return t?this.events[t]=[]:this.events={},this}emit(t,...e){return this.events[t]&&this.events[t].forEach(s=>{s(...e)}),this}once(t,e){const i=(()=>{let r=!1;return(...a)=>{r||(r=!0,e(...a),this.off(t,i))}})();return this.on(t,i),this}}const Vi=()=>{};function Zo(n){let t=!1;return function(...e){if(!t)return t=!0,n.apply(this,e)}}Array.prototype.ap=function(n){return this.reduce((t,e)=>t.concat(n.map(e)),[])};let Re;function gt(n){Re=n,n(),Re=null}class Ko{subscribers=new Set;add(){Re&&!this.subscribers.has(Re)&&this.subscribers.add(Re)}notify(){this.subscribers.forEach(t=>t())}}const qi=new WeakMap;function us(n,t){let e=qi.get(n);e||(e=new Map,qi.set(n,e));let s=e.get(t);return s||(s=new Ko,e.set(t,s)),s}function Qo(n,t=!1){return Object.keys(n).forEach(e=>{let s=n[e];if(t&&typeof s=="object"&&s!==null)n[e]=un(s,t);else{const i=us(n,e);Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get(){return i.add(),s},set(r){s!=r&&(s=r,i.notify())}})}}),n}function fs(n,t=!1){return Qo({value:n},t)}function un(n,t=!1){const e={get(i,r,a){const o=Reflect.get(i,r,a);if(t&&typeof o=="object"&&o!==null&&!("isYZReactiveProxy"in o)){const c=un(o,t);c.YZReactiveProxyParentTarget=i,c.YZReactiveProxyParentKey=r,Reflect.set(a,r,c)}return us(i,r).add(),Reflect.get(i,r,a)},set(i,r,a,o){const h=Reflect.get(i,r,o),c=Reflect.set(i,r,a,o);return Array.isArray(i)?us(i.YZReactiveProxyParentTarget,i.YZReactiveProxyParentKey).notify():h!=a&&us(i,r).notify(),c},has(i,r){return r==="isYZReactiveProxy"||r in i}};return new Proxy(n,e)}const ji=un;class ue{maps=new Map;mapsAddedDuringUpdate=new Map;entries(){return Array.from(this.maps.entries())}keys(){return Array.from(this.maps.keys())}values(){return Array.from(this.maps.values())}json(){return this.entries().reduce((t,[e,s])=>((ko(e)||Lo(e)||Ro(e))&&(t[e]=s),t),{})}get length(){return this.entries().length}set(t,e){this.maps.set(t,e),this.mapsAddedDuringUpdate.set(t,e)}get(t){return this.maps.get(t)}getIndex(t){const e=this.entries();if(e.length&&e[t]){const[s,i]=e[t];return[s,i]}}top(){return this.getIndex(0)}shift(){const t=this.top();if(t){const[e]=t;this.delete(e)}return t}delete(t){return this.mapsAddedDuringUpdate.delete(t),this.maps.delete(t)}clear(){this.maps.clear(),this.mapsAddedDuringUpdate.clear()}filter(t){let e=Array.from(this.maps.entries());for(;e.length>0;){this.mapsAddedDuringUpdate.clear();for(let s=0,i=e.length;s<i;s++){const[r,a]=e[s];t(r,a)===!1&&this.delete(r)}e=Array.from(this.mapsAddedDuringUpdate.entries())}}}function th(n,t=(e,s)=>e<=s){const e=n.length;let s=Math.floor(e/2);for(;s>0;){for(let i=s;i<e;i++){const r=n[i];let a=i;for(;a>=s&&!t(n[a-s],r);)n[a]=n[a-s],a-=s;n[a]=r}s=Math.floor(s/2)}}function eh(){const n={};return n.promise=new Promise((t,e)=>{n.resolve=t,n.reject=e}),n}let Hi;try{Hi=Promise}catch{Hi=function(){}}function $i(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Wi={exports:{}};(function(n,t){(function(e){n.exports=e()})(function(e){var s=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function i(v,x){var p=v[0],g=v[1],E=v[2],C=v[3];p+=(g&E|~g&C)+x[0]-680876936|0,p=(p<<7|p>>>25)+g|0,C+=(p&g|~p&E)+x[1]-389564586|0,C=(C<<12|C>>>20)+p|0,E+=(C&p|~C&g)+x[2]+606105819|0,E=(E<<17|E>>>15)+C|0,g+=(E&C|~E&p)+x[3]-1044525330|0,g=(g<<22|g>>>10)+E|0,p+=(g&E|~g&C)+x[4]-176418897|0,p=(p<<7|p>>>25)+g|0,C+=(p&g|~p&E)+x[5]+1200080426|0,C=(C<<12|C>>>20)+p|0,E+=(C&p|~C&g)+x[6]-1473231341|0,E=(E<<17|E>>>15)+C|0,g+=(E&C|~E&p)+x[7]-45705983|0,g=(g<<22|g>>>10)+E|0,p+=(g&E|~g&C)+x[8]+1770035416|0,p=(p<<7|p>>>25)+g|0,C+=(p&g|~p&E)+x[9]-1958414417|0,C=(C<<12|C>>>20)+p|0,E+=(C&p|~C&g)+x[10]-42063|0,E=(E<<17|E>>>15)+C|0,g+=(E&C|~E&p)+x[11]-1990404162|0,g=(g<<22|g>>>10)+E|0,p+=(g&E|~g&C)+x[12]+1804603682|0,p=(p<<7|p>>>25)+g|0,C+=(p&g|~p&E)+x[13]-40341101|0,C=(C<<12|C>>>20)+p|0,E+=(C&p|~C&g)+x[14]-1502002290|0,E=(E<<17|E>>>15)+C|0,g+=(E&C|~E&p)+x[15]+1236535329|0,g=(g<<22|g>>>10)+E|0,p+=(g&C|E&~C)+x[1]-165796510|0,p=(p<<5|p>>>27)+g|0,C+=(p&E|g&~E)+x[6]-1069501632|0,C=(C<<9|C>>>23)+p|0,E+=(C&g|p&~g)+x[11]+643717713|0,E=(E<<14|E>>>18)+C|0,g+=(E&p|C&~p)+x[0]-373897302|0,g=(g<<20|g>>>12)+E|0,p+=(g&C|E&~C)+x[5]-701558691|0,p=(p<<5|p>>>27)+g|0,C+=(p&E|g&~E)+x[10]+38016083|0,C=(C<<9|C>>>23)+p|0,E+=(C&g|p&~g)+x[15]-660478335|0,E=(E<<14|E>>>18)+C|0,g+=(E&p|C&~p)+x[4]-405537848|0,g=(g<<20|g>>>12)+E|0,p+=(g&C|E&~C)+x[9]+568446438|0,p=(p<<5|p>>>27)+g|0,C+=(p&E|g&~E)+x[14]-1019803690|0,C=(C<<9|C>>>23)+p|0,E+=(C&g|p&~g)+x[3]-187363961|0,E=(E<<14|E>>>18)+C|0,g+=(E&p|C&~p)+x[8]+1163531501|0,g=(g<<20|g>>>12)+E|0,p+=(g&C|E&~C)+x[13]-1444681467|0,p=(p<<5|p>>>27)+g|0,C+=(p&E|g&~E)+x[2]-51403784|0,C=(C<<9|C>>>23)+p|0,E+=(C&g|p&~g)+x[7]+1735328473|0,E=(E<<14|E>>>18)+C|0,g+=(E&p|C&~p)+x[12]-1926607734|0,g=(g<<20|g>>>12)+E|0,p+=(g^E^C)+x[5]-378558|0,p=(p<<4|p>>>28)+g|0,C+=(p^g^E)+x[8]-2022574463|0,C=(C<<11|C>>>21)+p|0,E+=(C^p^g)+x[11]+1839030562|0,E=(E<<16|E>>>16)+C|0,g+=(E^C^p)+x[14]-35309556|0,g=(g<<23|g>>>9)+E|0,p+=(g^E^C)+x[1]-1530992060|0,p=(p<<4|p>>>28)+g|0,C+=(p^g^E)+x[4]+1272893353|0,C=(C<<11|C>>>21)+p|0,E+=(C^p^g)+x[7]-155497632|0,E=(E<<16|E>>>16)+C|0,g+=(E^C^p)+x[10]-1094730640|0,g=(g<<23|g>>>9)+E|0,p+=(g^E^C)+x[13]+681279174|0,p=(p<<4|p>>>28)+g|0,C+=(p^g^E)+x[0]-358537222|0,C=(C<<11|C>>>21)+p|0,E+=(C^p^g)+x[3]-722521979|0,E=(E<<16|E>>>16)+C|0,g+=(E^C^p)+x[6]+76029189|0,g=(g<<23|g>>>9)+E|0,p+=(g^E^C)+x[9]-640364487|0,p=(p<<4|p>>>28)+g|0,C+=(p^g^E)+x[12]-421815835|0,C=(C<<11|C>>>21)+p|0,E+=(C^p^g)+x[15]+530742520|0,E=(E<<16|E>>>16)+C|0,g+=(E^C^p)+x[2]-995338651|0,g=(g<<23|g>>>9)+E|0,p+=(E^(g|~C))+x[0]-198630844|0,p=(p<<6|p>>>26)+g|0,C+=(g^(p|~E))+x[7]+1126891415|0,C=(C<<10|C>>>22)+p|0,E+=(p^(C|~g))+x[14]-1416354905|0,E=(E<<15|E>>>17)+C|0,g+=(C^(E|~p))+x[5]-57434055|0,g=(g<<21|g>>>11)+E|0,p+=(E^(g|~C))+x[12]+1700485571|0,p=(p<<6|p>>>26)+g|0,C+=(g^(p|~E))+x[3]-1894986606|0,C=(C<<10|C>>>22)+p|0,E+=(p^(C|~g))+x[10]-1051523|0,E=(E<<15|E>>>17)+C|0,g+=(C^(E|~p))+x[1]-2054922799|0,g=(g<<21|g>>>11)+E|0,p+=(E^(g|~C))+x[8]+1873313359|0,p=(p<<6|p>>>26)+g|0,C+=(g^(p|~E))+x[15]-30611744|0,C=(C<<10|C>>>22)+p|0,E+=(p^(C|~g))+x[6]-1560198380|0,E=(E<<15|E>>>17)+C|0,g+=(C^(E|~p))+x[13]+1309151649|0,g=(g<<21|g>>>11)+E|0,p+=(E^(g|~C))+x[4]-145523070|0,p=(p<<6|p>>>26)+g|0,C+=(g^(p|~E))+x[11]-1120210379|0,C=(C<<10|C>>>22)+p|0,E+=(p^(C|~g))+x[2]+718787259|0,E=(E<<15|E>>>17)+C|0,g+=(C^(E|~p))+x[9]-343485551|0,g=(g<<21|g>>>11)+E|0,v[0]=p+v[0]|0,v[1]=g+v[1]|0,v[2]=E+v[2]|0,v[3]=C+v[3]|0}function r(v){var x=[],p;for(p=0;p<64;p+=4)x[p>>2]=v.charCodeAt(p)+(v.charCodeAt(p+1)<<8)+(v.charCodeAt(p+2)<<16)+(v.charCodeAt(p+3)<<24);return x}function a(v){var x=[],p;for(p=0;p<64;p+=4)x[p>>2]=v[p]+(v[p+1]<<8)+(v[p+2]<<16)+(v[p+3]<<24);return x}function o(v){var x=v.length,p=[1732584193,-271733879,-1732584194,271733878],g,E,C,F,G,V;for(g=64;g<=x;g+=64)i(p,r(v.substring(g-64,g)));for(v=v.substring(g-64),E=v.length,C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g=0;g<E;g+=1)C[g>>2]|=v.charCodeAt(g)<<(g%4<<3);if(C[g>>2]|=128<<(g%4<<3),g>55)for(i(p,C),g=0;g<16;g+=1)C[g]=0;return F=x*8,F=F.toString(16).match(/(.*?)(.{0,8})$/),G=parseInt(F[2],16),V=parseInt(F[1],16)||0,C[14]=G,C[15]=V,i(p,C),p}function h(v){var x=v.length,p=[1732584193,-271733879,-1732584194,271733878],g,E,C,F,G,V;for(g=64;g<=x;g+=64)i(p,a(v.subarray(g-64,g)));for(v=g-64<x?v.subarray(g-64):new Uint8Array(0),E=v.length,C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g=0;g<E;g+=1)C[g>>2]|=v[g]<<(g%4<<3);if(C[g>>2]|=128<<(g%4<<3),g>55)for(i(p,C),g=0;g<16;g+=1)C[g]=0;return F=x*8,F=F.toString(16).match(/(.*?)(.{0,8})$/),G=parseInt(F[2],16),V=parseInt(F[1],16)||0,C[14]=G,C[15]=V,i(p,C),p}function c(v){var x="",p;for(p=0;p<4;p+=1)x+=s[v>>p*8+4&15]+s[v>>p*8&15];return x}function l(v){var x;for(x=0;x<v.length;x+=1)v[x]=c(v[x]);return v.join("")}l(o("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function v(x,p){return x=x|0||0,x<0?Math.max(x+p,0):Math.min(x,p)}ArrayBuffer.prototype.slice=function(x,p){var g=this.byteLength,E=v(x,g),C=g,F,G,V,K;return p!==e&&(C=v(p,g)),E>C?new ArrayBuffer(0):(F=C-E,G=new ArrayBuffer(F),V=new Uint8Array(G),K=new Uint8Array(this,E,F),V.set(K),G)}}();function d(v){return/[\u0080-\uFFFF]/.test(v)&&(v=unescape(encodeURIComponent(v))),v}function y(v,x){var p=v.length,g=new ArrayBuffer(p),E=new Uint8Array(g),C;for(C=0;C<p;C+=1)E[C]=v.charCodeAt(C);return x?E:g}function b(v){return String.fromCharCode.apply(null,new Uint8Array(v))}function w(v,x,p){var g=new Uint8Array(v.byteLength+x.byteLength);return g.set(new Uint8Array(v)),g.set(new Uint8Array(x),v.byteLength),p?g:g.buffer}function _(v){var x=[],p=v.length,g;for(g=0;g<p-1;g+=2)x.push(parseInt(v.substr(g,2),16));return String.fromCharCode.apply(String,x)}function S(){this.reset()}return S.prototype.append=function(v){return this.appendBinary(d(v)),this},S.prototype.appendBinary=function(v){this._buff+=v,this._length+=v.length;var x=this._buff.length,p;for(p=64;p<=x;p+=64)i(this._hash,r(this._buff.substring(p-64,p)));return this._buff=this._buff.substring(p-64),this},S.prototype.end=function(v){var x=this._buff,p=x.length,g,E=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],C;for(g=0;g<p;g+=1)E[g>>2]|=x.charCodeAt(g)<<(g%4<<3);return this._finish(E,p),C=l(this._hash),v&&(C=_(C)),this.reset(),C},S.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},S.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},S.prototype.setState=function(v){return this._buff=v.buff,this._length=v.length,this._hash=v.hash,this},S.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},S.prototype._finish=function(v,x){var p=x,g,E,C;if(v[p>>2]|=128<<(p%4<<3),p>55)for(i(this._hash,v),p=0;p<16;p+=1)v[p]=0;g=this._length*8,g=g.toString(16).match(/(.*?)(.{0,8})$/),E=parseInt(g[2],16),C=parseInt(g[1],16)||0,v[14]=E,v[15]=C,i(this._hash,v)},S.hash=function(v,x){return S.hashBinary(d(v),x)},S.hashBinary=function(v,x){var p=o(v),g=l(p);return x?_(g):g},S.ArrayBuffer=function(){this.reset()},S.ArrayBuffer.prototype.append=function(v){var x=w(this._buff.buffer,v,!0),p=x.length,g;for(this._length+=v.byteLength,g=64;g<=p;g+=64)i(this._hash,a(x.subarray(g-64,g)));return this._buff=g-64<p?new Uint8Array(x.buffer.slice(g-64)):new Uint8Array(0),this},S.ArrayBuffer.prototype.end=function(v){var x=this._buff,p=x.length,g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],E,C;for(E=0;E<p;E+=1)g[E>>2]|=x[E]<<(E%4<<3);return this._finish(g,p),C=l(this._hash),v&&(C=_(C)),this.reset(),C},S.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},S.ArrayBuffer.prototype.getState=function(){var v=S.prototype.getState.call(this);return v.buff=b(v.buff),v},S.ArrayBuffer.prototype.setState=function(v){return v.buff=y(v.buff,!0),S.prototype.setState.call(this,v)},S.ArrayBuffer.prototype.destroy=S.prototype.destroy,S.ArrayBuffer.prototype._finish=S.prototype._finish,S.ArrayBuffer.hash=function(v,x){var p=h(new Uint8Array(v)),g=l(p);return x?_(g):g},S})})(Wi);var sh=Wi.exports;const nh=$i(sh);function Ji(n,t){return function(){return n.apply(t,arguments)}}const{toString:ih}=Object.prototype,{getPrototypeOf:fn}=Object,ds=(n=>t=>{const e=ih.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Dt=n=>(n=n.toLowerCase(),t=>ds(t)===n),ms=n=>t=>typeof t===n,{isArray:_e}=Array,Oe=ms("undefined");function rh(n){return n!==null&&!Oe(n)&&n.constructor!==null&&!Oe(n.constructor)&&bt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Zi=Dt("ArrayBuffer");function ah(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&Zi(n.buffer),t}const oh=ms("string"),bt=ms("function"),Ki=ms("number"),ps=n=>n!==null&&typeof n=="object",hh=n=>n===!0||n===!1,gs=n=>{if(ds(n)!=="object")return!1;const t=fn(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},ch=Dt("Date"),lh=Dt("File"),uh=Dt("Blob"),fh=Dt("FileList"),dh=n=>ps(n)&&bt(n.pipe),mh=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||bt(n.append)&&((t=ds(n))==="formdata"||t==="object"&&bt(n.toString)&&n.toString()==="[object FormData]"))},ph=Dt("URLSearchParams"),[gh,yh,wh,xh]=["ReadableStream","Request","Response","Headers"].map(Dt),bh=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Fe(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let s,i;if(typeof n!="object"&&(n=[n]),_e(n))for(s=0,i=n.length;s<i;s++)t.call(null,n[s],s,n);else{const r=e?Object.getOwnPropertyNames(n):Object.keys(n),a=r.length;let o;for(s=0;s<a;s++)o=r[s],t.call(null,n[o],o,n)}}function Qi(n,t){t=t.toLowerCase();const e=Object.keys(n);let s=e.length,i;for(;s-- >0;)if(i=e[s],t===i.toLowerCase())return i;return null}const fe=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),tr=n=>!Oe(n)&&n!==fe;function dn(){const{caseless:n}=tr(this)&&this||{},t={},e=(s,i)=>{const r=n&&Qi(t,i)||i;gs(t[r])&&gs(s)?t[r]=dn(t[r],s):gs(s)?t[r]=dn({},s):_e(s)?t[r]=s.slice():t[r]=s};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&Fe(arguments[s],e);return t}const vh=(n,t,e,{allOwnKeys:s}={})=>(Fe(t,(i,r)=>{e&&bt(i)?n[r]=Ji(i,e):n[r]=i},{allOwnKeys:s}),n),Sh=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),Th=(n,t,e,s)=>{n.prototype=Object.create(t.prototype,s),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},Ch=(n,t,e,s)=>{let i,r,a;const o={};if(t=t||{},n==null)return t;do{for(i=Object.getOwnPropertyNames(n),r=i.length;r-- >0;)a=i[r],(!s||s(a,n,t))&&!o[a]&&(t[a]=n[a],o[a]=!0);n=e!==!1&&fn(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},Ph=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const s=n.indexOf(t,e);return s!==-1&&s===e},Eh=n=>{if(!n)return null;if(_e(n))return n;let t=n.length;if(!Ki(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},_h=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&fn(Uint8Array)),Ah=(n,t)=>{const s=(n&&n[Symbol.iterator]).call(n);let i;for(;(i=s.next())&&!i.done;){const r=i.value;t.call(n,r[0],r[1])}},Dh=(n,t)=>{let e;const s=[];for(;(e=n.exec(t))!==null;)s.push(e);return s},Ih=Dt("HTMLFormElement"),Mh=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,s,i){return s.toUpperCase()+i}),er=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),kh=Dt("RegExp"),sr=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),s={};Fe(e,(i,r)=>{let a;(a=t(i,r,n))!==!1&&(s[r]=a||i)}),Object.defineProperties(n,s)},Lh=n=>{sr(n,(t,e)=>{if(bt(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const s=n[e];if(bt(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},Rh=(n,t)=>{const e={},s=i=>{i.forEach(r=>{e[r]=!0})};return _e(n)?s(n):s(String(n).split(t)),e},Oh=()=>{},Fh=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function Nh(n){return!!(n&&bt(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const Bh=n=>{const t=new Array(10),e=(s,i)=>{if(ps(s)){if(t.indexOf(s)>=0)return;if(!("toJSON"in s)){t[i]=s;const r=_e(s)?[]:{};return Fe(s,(a,o)=>{const h=e(a,i+1);!Oe(h)&&(r[o]=h)}),t[i]=void 0,r}}return s};return e(n,0)},Uh=Dt("AsyncFunction"),Yh=n=>n&&(ps(n)||bt(n))&&bt(n.then)&&bt(n.catch),nr=((n,t)=>n?setImmediate:t?((e,s)=>(fe.addEventListener("message",({source:i,data:r})=>{i===fe&&r===e&&s.length&&s.shift()()},!1),i=>{s.push(i),fe.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",bt(fe.postMessage)),Xh=typeof queueMicrotask<"u"?queueMicrotask.bind(fe):typeof process<"u"&&process.nextTick||nr,D={isArray:_e,isArrayBuffer:Zi,isBuffer:rh,isFormData:mh,isArrayBufferView:ah,isString:oh,isNumber:Ki,isBoolean:hh,isObject:ps,isPlainObject:gs,isReadableStream:gh,isRequest:yh,isResponse:wh,isHeaders:xh,isUndefined:Oe,isDate:ch,isFile:lh,isBlob:uh,isRegExp:kh,isFunction:bt,isStream:dh,isURLSearchParams:ph,isTypedArray:_h,isFileList:fh,forEach:Fe,merge:dn,extend:vh,trim:bh,stripBOM:Sh,inherits:Th,toFlatObject:Ch,kindOf:ds,kindOfTest:Dt,endsWith:Ph,toArray:Eh,forEachEntry:Ah,matchAll:Dh,isHTMLForm:Ih,hasOwnProperty:er,hasOwnProp:er,reduceDescriptors:sr,freezeMethods:Lh,toObjectSet:Rh,toCamelCase:Mh,noop:Oh,toFiniteNumber:Fh,findKey:Qi,global:fe,isContextDefined:tr,isSpecCompliantForm:Nh,toJSONObject:Bh,isAsyncFn:Uh,isThenable:Yh,setImmediate:nr,asap:Xh};function N(n,t,e,s,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),s&&(this.request=s),i&&(this.response=i,this.status=i.status?i.status:null)}D.inherits(N,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:D.toJSONObject(this.config),code:this.code,status:this.status}}});const ir=N.prototype,rr={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{rr[n]={value:n}}),Object.defineProperties(N,rr),Object.defineProperty(ir,"isAxiosError",{value:!0}),N.from=(n,t,e,s,i,r)=>{const a=Object.create(ir);return D.toFlatObject(n,a,function(h){return h!==Error.prototype},o=>o!=="isAxiosError"),N.call(a,n.message,t,e,s,i),a.cause=n,a.name=n.name,r&&Object.assign(a,r),a};const zh=null;function mn(n){return D.isPlainObject(n)||D.isArray(n)}function ar(n){return D.endsWith(n,"[]")?n.slice(0,-2):n}function or(n,t,e){return n?n.concat(t).map(function(i,r){return i=ar(i),!e&&r?"["+i+"]":i}).join(e?".":""):t}function Gh(n){return D.isArray(n)&&!n.some(mn)}const Vh=D.toFlatObject(D,{},null,function(t){return/^is[A-Z]/.test(t)});function ys(n,t,e){if(!D.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=D.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,S){return!D.isUndefined(S[_])});const s=e.metaTokens,i=e.visitor||l,r=e.dots,a=e.indexes,h=(e.Blob||typeof Blob<"u"&&Blob)&&D.isSpecCompliantForm(t);if(!D.isFunction(i))throw new TypeError("visitor must be a function");function c(w){if(w===null)return"";if(D.isDate(w))return w.toISOString();if(!h&&D.isBlob(w))throw new N("Blob is not supported. Use a Buffer instead.");return D.isArrayBuffer(w)||D.isTypedArray(w)?h&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function l(w,_,S){let v=w;if(w&&!S&&typeof w=="object"){if(D.endsWith(_,"{}"))_=s?_:_.slice(0,-2),w=JSON.stringify(w);else if(D.isArray(w)&&Gh(w)||(D.isFileList(w)||D.endsWith(_,"[]"))&&(v=D.toArray(w)))return _=ar(_),v.forEach(function(p,g){!(D.isUndefined(p)||p===null)&&t.append(a===!0?or([_],g,r):a===null?_:_+"[]",c(p))}),!1}return mn(w)?!0:(t.append(or(S,_,r),c(w)),!1)}const d=[],y=Object.assign(Vh,{defaultVisitor:l,convertValue:c,isVisitable:mn});function b(w,_){if(!D.isUndefined(w)){if(d.indexOf(w)!==-1)throw Error("Circular reference detected in "+_.join("."));d.push(w),D.forEach(w,function(v,x){(!(D.isUndefined(v)||v===null)&&i.call(t,v,D.isString(x)?x.trim():x,_,y))===!0&&b(v,_?_.concat(x):[x])}),d.pop()}}if(!D.isObject(n))throw new TypeError("data must be an object");return b(n),t}function hr(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function pn(n,t){this._pairs=[],n&&ys(n,this,t)}const cr=pn.prototype;cr.append=function(t,e){this._pairs.push([t,e])},cr.toString=function(t){const e=t?function(s){return t.call(this,s,hr)}:hr;return this._pairs.map(function(i){return e(i[0])+"="+e(i[1])},"").join("&")};function qh(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function lr(n,t,e){if(!t)return n;const s=e&&e.encode||qh;D.isFunction(e)&&(e={serialize:e});const i=e&&e.serialize;let r;if(i?r=i(t,e):r=D.isURLSearchParams(t)?t.toString():new pn(t,e).toString(s),r){const a=n.indexOf("#");a!==-1&&(n=n.slice(0,a)),n+=(n.indexOf("?")===-1?"?":"&")+r}return n}class jh{constructor(){this.handlers=[]}use(t,e,s){return this.handlers.push({fulfilled:t,rejected:e,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){D.forEach(this.handlers,function(s){s!==null&&t(s)})}}const ur=jh,fr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Hh={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:pn,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},gn=typeof window<"u"&&typeof document<"u",yn=typeof navigator=="object"&&navigator||void 0,$h=gn&&(!yn||["ReactNative","NativeScript","NS"].indexOf(yn.product)<0),Wh=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Jh=gn&&window.location.href||"http://localhost",rt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:gn,hasStandardBrowserEnv:$h,hasStandardBrowserWebWorkerEnv:Wh,navigator:yn,origin:Jh},Symbol.toStringTag,{value:"Module"})),...Hh};function Zh(n,t){return ys(n,new rt.classes.URLSearchParams,Object.assign({visitor:function(e,s,i,r){return rt.isNode&&D.isBuffer(e)?(this.append(s,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}function Kh(n){return D.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Qh(n){const t={},e=Object.keys(n);let s;const i=e.length;let r;for(s=0;s<i;s++)r=e[s],t[r]=n[r];return t}function dr(n){function t(e,s,i,r){let a=e[r++];if(a==="__proto__")return!0;const o=Number.isFinite(+a),h=r>=e.length;return a=!a&&D.isArray(i)?i.length:a,h?(D.hasOwnProp(i,a)?i[a]=[i[a],s]:i[a]=s,!o):((!i[a]||!D.isObject(i[a]))&&(i[a]=[]),t(e,s,i[a],r)&&D.isArray(i[a])&&(i[a]=Qh(i[a])),!o)}if(D.isFormData(n)&&D.isFunction(n.entries)){const e={};return D.forEachEntry(n,(s,i)=>{t(Kh(s),i,e,0)}),e}return null}function tc(n,t,e){if(D.isString(n))try{return(t||JSON.parse)(n),D.trim(n)}catch(s){if(s.name!=="SyntaxError")throw s}return(e||JSON.stringify)(n)}const wn={transitional:fr,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const s=e.getContentType()||"",i=s.indexOf("application/json")>-1,r=D.isObject(t);if(r&&D.isHTMLForm(t)&&(t=new FormData(t)),D.isFormData(t))return i?JSON.stringify(dr(t)):t;if(D.isArrayBuffer(t)||D.isBuffer(t)||D.isStream(t)||D.isFile(t)||D.isBlob(t)||D.isReadableStream(t))return t;if(D.isArrayBufferView(t))return t.buffer;if(D.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(r){if(s.indexOf("application/x-www-form-urlencoded")>-1)return Zh(t,this.formSerializer).toString();if((o=D.isFileList(t))||s.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return ys(o?{"files[]":t}:t,h&&new h,this.formSerializer)}}return r||i?(e.setContentType("application/json",!1),tc(t)):t}],transformResponse:[function(t){const e=this.transitional||wn.transitional,s=e&&e.forcedJSONParsing,i=this.responseType==="json";if(D.isResponse(t)||D.isReadableStream(t))return t;if(t&&D.isString(t)&&(s&&!this.responseType||i)){const a=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(o){if(a)throw o.name==="SyntaxError"?N.from(o,N.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rt.classes.FormData,Blob:rt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};D.forEach(["delete","get","head","post","put","patch"],n=>{wn.headers[n]={}});const xn=wn,ec=D.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),sc=n=>{const t={};let e,s,i;return n&&n.split(`
|
|
10
|
+
`.replace(/\s+/g,""),"u");break;case"mime-image":t=/^image\//;break;case"mime-video":t=/^video\//;break;case"mime-audio":t=/^audio\//;break;case"mime-document-word":t=/^application\/(?:vnd\.openxmlformats-officedocument\.wordprocessingml\.document|msword|vnd\.ms-word\.document\.macroenabled\.12|vnd\.openxmlformats-officedocument\.wordprocessingml\.template|vnd\.ms-word\.template\.macroenabled\.12)$/;break;case"mime-document-excel":t=/^application\/(?:vnd\.openxmlformats-officedocument\.spreadsheetml\.sheet|vnd\.ms-excel|vnd\.ms-excel\.sheet\.macroenabled\.12|vnd\.openxmlformats-officedocument\.spreadsheetml\.template|vnd\.ms-excel\.template\.macroenabled\.12)$/;break;case"mime-document-ppt":t=/^application\/(?:vnd\.ms-powerpoint|vnd\.openxmlformats-officedocument\.presentationml\.presentation|vnd\.ms-powerpoint\.presentation\.macroenabled\.12|vnd\.openxmlformats-officedocument\.presentationml\.template|vnd\.ms-powerpoint\.template\.macroenabled\.12)$/;break;case"mime-document-json":t=/^application\/json$/;break;case"mime-document-xml":t=/^(?:application|text)\/(?:xml|xhtml\+xml)$/;break}return t},zt=(n,t)=>(typeof n=="string"&&(n=os(n)||new RegExp(n)),n.test(t)),ki=(n,t)=>{typeof n=="string"&&(n=os(n)||new RegExp(n));const e=t.match(n);return e?n.flags.toLowerCase().indexOf("g")>=0?e.map(s=>({matchIndex:-1,fullMatch:s,groupMatchs:[]})):{matchIndex:typeof e.index=="number"?e.index:-1,fullMatch:e[0],groupMatchs:e.slice(1)}:null},Li=(n,t)=>{typeof n=="string"&&(n=os(n)||new RegExp(n));const e=[],s=t.matchAll(n);for(const i of s)e.push({matchIndex:typeof i.index=="number"?i.index:-1,fullMatch:i[0],groupMatchs:i.slice(1)});return e};function Eo(n){const t=n.match(/[\s\S]/gu);return t?t.length:0}function Ri(n,t){const e=n.codePointAt(t);return e?String.fromCodePoint(e):void 0}function Oi(n=12){const t="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghijklmnopqrstuvwxyz0123456789",e=t.length;let s="";for(let i=0;i<n;i++)s+=t[Math.floor(Math.random()*e)];return s}function _o(n){return n.replace(/(^\w)/g,t=>t.toLowerCase())}const ct=(n,t="-")=>{let e=n.replace(new RegExp(`${t}?([A-Z])`,"g"),t+"$1").toLowerCase();return e=e.replace(new RegExp(`^${t}`),""),e};function Ao(n){return n.replace(/(^\w|[_-]\w)/g,t=>t.slice(-1).toUpperCase())}function Fi(n){return _o(Ao(n))}function Ni(n){let t="";for(let e=0,s=n.length;e<s;e++){const i=n.charCodeAt(e);i>=1&&i<=127?t+=n.charAt(e):i>2047?(t+=String.fromCharCode(224|i>>12&15),t+=String.fromCharCode(128|i>>6&63),t+=String.fromCharCode(128|i>>0&63)):(t+=String.fromCharCode(192|i>>6&31),t+=String.fromCharCode(128|i>>0&63))}return t}const Do="[object String]",Io="[object Symbol]";function Bi(n){return Object.prototype.toString.call(n)}function Mo(n){return n!=null}function ko(n){return Bi(n)===Do}function Lo(n){return n===n+0}function Ro(n){return Bi(n)===Io}function Oo(n,...t){return new n.constructor(...t)}function Ui(n,t){for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&!t(e,n[e])&&delete n[e];return n}function Fo(n,t="",e=["","sign","key"]){return Object.keys(n).filter(s=>{for(let i=0,r=e.length;i<r;i++)if(n[s]==e[i])return!1;return!0}).sort().map(s=>`${s}=${n[s]}`).join("&")+t}function Pe(n,t){const e=n.findIndex(s=>s===t);return e>=0&&n.splice(e,1),n}function Yi(n,t){return n.findIndex(e=>e==t)>=0}function No(n,...t){return t.forEach(e=>{Yi(n,e)||n.push(e)}),n}let Xi;try{Xi=Map}catch{Xi=function(){}}let zi;try{zi=Set}catch{zi=function(){}}function Bo(n){return typeof n=="number"&&Number.isNaN(n)}function Kt(n,t){if(n=parseFloat(n),Bo(n)){if(typeof t=="number")return t;throw new Error(`parseNumber(${n}) isNaN!`)}return n}function hs(n,t,e=Number.EPSILON*Math.pow(2,2)){return Math.abs(n-t)<e}const H=(n,t,e)=>n<t?t:n>e?e:n,Uo=(n,t,e)=>s=>{const i=H(s,n,t);return e==0?i:t-i<e?t:Math.round(i/e)*e};function Yo(n,t=12){return Kt(n,0).toFixed(t)}function Ot(n,t=12){return+Yo(n,t)}function cn(n,t){const e=ki("number-single",String(n));return{hasNumber:!!e,number:e&&!Array.isArray(e)&&e.fullMatch?parseFloat(e.fullMatch):Mo(t)?t:NaN,prefix:e&&!Array.isArray(e)&&e.fullMatch?n.substring(0,e.matchIndex):"",suffix:e&&!Array.isArray(e)&&e.fullMatch?n.substring(e.matchIndex+e.fullMatch.length):""}}function Gi(n){const t=ki("number",n);return t?Array.isArray(t)?t.map(e=>Number(e.fullMatch)):[Number(t.fullMatch)]:[]}Xo();function Xo(){const n=new ArrayBuffer(4),t=new Float32Array(n),e=new Uint32Array(n),s=new Uint32Array(512),i=new Uint32Array(512);for(let h=0;h<256;++h){const c=h-127;c<-27?(s[h]=0,s[h|256]=32768,i[h]=24,i[h|256]=24):c<-14?(s[h]=1024>>-c-14,s[h|256]=1024>>-c-14|32768,i[h]=-c-1,i[h|256]=-c-1):c<=15?(s[h]=c+15<<10,s[h|256]=c+15<<10|32768,i[h]=13,i[h|256]=13):c<128?(s[h]=31744,s[h|256]=64512,i[h]=24,i[h|256]=24):(s[h]=31744,s[h|256]=64512,i[h]=13,i[h|256]=13)}const r=new Uint32Array(2048),a=new Uint32Array(64),o=new Uint32Array(64);for(let h=1;h<1024;++h){let c=h<<13,l=0;for(;!(c&8388608);)c<<=1,l-=8388608;c&=-8388609,l+=947912704,r[h]=c|l}for(let h=1024;h<2048;++h)r[h]=939524096+(h-1024<<13);for(let h=1;h<31;++h)a[h]=h<<23;a[31]=1199570944,a[32]=2147483648;for(let h=33;h<63;++h)a[h]=2147483648+(h-32<<23);a[63]=3347054592;for(let h=1;h<64;++h)h!==32&&(o[h]=1024);return{floatView:t,uint32View:e,baseTable:s,shiftTable:i,mantissaTable:r,exponentTable:a,offsetTable:o}}var lt=(n=>(n.UNKNOWN="",n.TEXT="text/plain",n.MD="text/plain",n.HTML="text/html",n.XML_TEXT="text/xml",n.CSS="text/css",n.JPEG="image/jpeg",n.PNG="image/png",n.GIF="image/gif",n.BMP="image/bmp",n.WEBP="image/webp",n.SVG="image/svg+xml",n.ICON="image/x-icon",n.MICROSOFT_ICON="image/vnd.microsoft.icon",n.MPEG="audio/mpeg",n.MP3="audio/mpeg",n.MP4="video/mp4",n.OGG="audio/ogg",n.WAV="audio/wav",n.MIDI="audio/midi",n.WEBM="video/webm",n.VIDEO_OGG="video/ogg",n.OCTET_STREAM="application/octet-stream",n.JAVASCRIPT="application/javascript",n.ECMASCRIPT="application/ecmascript",n.JSON="application/json",n.XML="application/xml",n.XHTML="application/xhtml+xml",n.XWWW="application/x-www-form-urlencoded",n.DOC="application/msword",n.CSV="application/x-csv",n.EXCEL="application/vnb.ms-excel",n.PPT="application/vnb.mspowerpoint",n.PDF="application/pdf",n.ZIP="application/zip",n.TGZ="application/x-gtar",n.TAR_GZ="application/x-gzip",n.EOT="appliaction/vnd.ms-fontobject",n.TTF="aplication/font-sfnt",n.PKCS12="aplication/pkcs12",n))(lt||{}),cs=(n=>(n.ascii="ascii",n.utf8="utf8",n.utf16le="utf16le",n.ucs2="ucs2",n.base64="base64",n.base64url="base64url",n.latin1="latin1",n.binary="binary",n.hex="hex",n))(cs||{}),Ct=(n=>(n.text="text",n.dataURL="dataURL",n.binaryString="binaryString",n.arraybuffer="arraybuffer",n))(Ct||{});const Ee=(n,t=16)=>{let e=n.toLowerCase();const s=e.indexOf("0b")==0,i=e.indexOf("0o")==0,r=e.indexOf("0x")==0;(s||i||r)&&(e=e.slice(2)),s&&(t=2),i&&(t=8),r&&(t=16);const a=parseInt(e,t);if(isNaN(a))throw new Error(`radixStringToNumber(${n}, ${t}) 无法解析!`);return a};function zo(n){return new TextEncoder().encode(n)}function Go(n){return String.fromCharCode.apply(null,new Uint16Array(n))}const ln=(n,t,e)=>t?e===cs.base64?new Blob([n],{type:`${t};${e}`}):e===cs.utf8?new Blob([n],{type:`${t};charset=${e}`}):new Blob([n],{type:`${t}`}):new Blob([n]),Vo=n=>{let t=lt.UNKNOWN;switch(new DataView(n).getUint32(0,qo()).toString(16).toUpperCase()){case"FFD8FFDB":t=lt.JPEG;break;case"FFD8FFE0":case"FFD8FFE1":case"FFD8FFE2":case"FFD8FFE3":t=lt.JPEG;break;case"89504E47":t=lt.PNG;break;case"47494638":t=lt.GIF;break;case"52494646":t=lt.WEBP;break;case"25504446":t=lt.PDF;break;case"504B0304":t=lt.ZIP;break}return t};function qo(){const n=Uint32Array.of(305419896),t=new Uint8Array(n.buffer);switch(t[0]*16777216+t[1]*65536+t[2]*256+t[3]){case 305419896:return!1;case 2018915346:return!0}}function $(){return(performance||Date).now()}function jo(n,t=3,e=":"){let s=""+n[0]+n[1];switch(t){case 1:break;case 2:s+=e+n[2]+n[3];break;case 3:s+=e+n[4]+n[5];break}return s}function Ho(n){let t=0;for(let e=5;e>=0;e=e-2)e==5?t+=n[e-1]*10+n[e]:e==3?t+=(n[e-1]*10+n[e])*60:e==1&&(t+=(n[e-1]*10+n[e])*60*60);return t=Math.floor(Math.max(0,t)),t*1e3}function $o(n){let t=Ho(n)/1e3;const e=t%60;n[5]=e%10,n[4]=Math.floor(e/10),t=Math.floor(t/60);const s=t%60;n[3]=s%10,n[2]=Math.floor(s/10),t=Math.floor(t/60);const i=t%60%24;return n[1]=i%10,n[0]=Math.floor(i/10),n}function Wo(n,t=1){return n[5]+=t,$o(n)}function Jo(n,t){let e;return function(...s){clearTimeout(e),e=setTimeout(()=>{n.apply(this,s)},t)}}class ls{events;constructor(){this.events={}}has(t,e){return this.events[t]!==void 0&&this.events[t].indexOf(e)!==-1}prependListener(t,e){return this.events[t]||(this.events[t]=[]),this.events[t].unshift(e),this}addListener(t,e){return this.events[t]||(this.events[t]=[]),this.events[t].push(e),this}on(t,e){return this.addListener(t,e),this}removeListener(t,e){return this.events[t]&&(this.events[t]=this.events[t].filter(s=>s!==e)),this}off(t,e){return this.removeListener(t,e),this}removeAllListeners(t){return t?this.events[t]=[]:this.events={},this}emit(t,...e){return this.events[t]&&this.events[t].slice(0).forEach(i=>{i(...e)}),this}once(t,e){const i=(()=>{let r=!1;return(...a)=>{r||(r=!0,e(...a),this.off(t,i))}})();return this.on(t,i),this}}const Vi=()=>{};function Zo(n){let t=!1;return function(...e){if(!t)return t=!0,n.apply(this,e)}}Array.prototype.ap=function(n){return this.reduce((t,e)=>t.concat(n.map(e)),[])};let Re;function gt(n){Re=n,n(),Re=null}class Ko{subscribers=new Set;add(){Re&&!this.subscribers.has(Re)&&this.subscribers.add(Re)}notify(){this.subscribers.forEach(t=>t())}}const qi=new WeakMap;function us(n,t){let e=qi.get(n);e||(e=new Map,qi.set(n,e));let s=e.get(t);return s||(s=new Ko,e.set(t,s)),s}function Qo(n,t=!1){return Object.keys(n).forEach(e=>{let s=n[e];if(t&&typeof s=="object"&&s!==null)n[e]=un(s,t);else{const i=us(n,e);Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get(){return i.add(),s},set(r){s!=r&&(s=r,i.notify())}})}}),n}function fs(n,t=!1){return Qo({value:n},t)}function un(n,t=!1){const e={get(i,r,a){const o=Reflect.get(i,r,a);if(t&&typeof o=="object"&&o!==null&&!("isYZReactiveProxy"in o)){const c=un(o,t);c.YZReactiveProxyParentTarget=i,c.YZReactiveProxyParentKey=r,Reflect.set(a,r,c)}return us(i,r).add(),Reflect.get(i,r,a)},set(i,r,a,o){const h=Reflect.get(i,r,o),c=Reflect.set(i,r,a,o);return Array.isArray(i)?us(i.YZReactiveProxyParentTarget,i.YZReactiveProxyParentKey).notify():h!=a&&us(i,r).notify(),c},has(i,r){return r==="isYZReactiveProxy"||r in i}};return new Proxy(n,e)}const ji=un;class ue{maps=new Map;mapsAddedDuringUpdate=new Map;entries(){return Array.from(this.maps.entries())}keys(){return Array.from(this.maps.keys())}values(){return Array.from(this.maps.values())}json(){return this.entries().reduce((t,[e,s])=>((ko(e)||Lo(e)||Ro(e))&&(t[e]=s),t),{})}get length(){return this.entries().length}set(t,e){this.maps.set(t,e),this.mapsAddedDuringUpdate.set(t,e)}get(t){return this.maps.get(t)}getIndex(t){const e=this.entries();if(e.length&&e[t]){const[s,i]=e[t];return[s,i]}}top(){return this.getIndex(0)}shift(){const t=this.top();if(t){const[e]=t;this.delete(e)}return t}delete(t){return this.mapsAddedDuringUpdate.delete(t),this.maps.delete(t)}clear(){this.maps.clear(),this.mapsAddedDuringUpdate.clear()}filter(t){let e=Array.from(this.maps.entries());for(;e.length>0;){this.mapsAddedDuringUpdate.clear();for(let s=0,i=e.length;s<i;s++){const[r,a]=e[s];t(r,a)===!1&&this.delete(r)}e=Array.from(this.mapsAddedDuringUpdate.entries())}}}function th(n,t=(e,s)=>e<=s){const e=n.length;let s=Math.floor(e/2);for(;s>0;){for(let i=s;i<e;i++){const r=n[i];let a=i;for(;a>=s&&!t(n[a-s],r);)n[a]=n[a-s],a-=s;n[a]=r}s=Math.floor(s/2)}}function eh(){const n={};return n.promise=new Promise((t,e)=>{n.resolve=t,n.reject=e}),n}let Hi;try{Hi=Promise}catch{Hi=function(){}}function $i(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Wi={exports:{}};(function(n,t){(function(e){n.exports=e()})(function(e){var s=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function i(v,x){var p=v[0],g=v[1],E=v[2],C=v[3];p+=(g&E|~g&C)+x[0]-680876936|0,p=(p<<7|p>>>25)+g|0,C+=(p&g|~p&E)+x[1]-389564586|0,C=(C<<12|C>>>20)+p|0,E+=(C&p|~C&g)+x[2]+606105819|0,E=(E<<17|E>>>15)+C|0,g+=(E&C|~E&p)+x[3]-1044525330|0,g=(g<<22|g>>>10)+E|0,p+=(g&E|~g&C)+x[4]-176418897|0,p=(p<<7|p>>>25)+g|0,C+=(p&g|~p&E)+x[5]+1200080426|0,C=(C<<12|C>>>20)+p|0,E+=(C&p|~C&g)+x[6]-1473231341|0,E=(E<<17|E>>>15)+C|0,g+=(E&C|~E&p)+x[7]-45705983|0,g=(g<<22|g>>>10)+E|0,p+=(g&E|~g&C)+x[8]+1770035416|0,p=(p<<7|p>>>25)+g|0,C+=(p&g|~p&E)+x[9]-1958414417|0,C=(C<<12|C>>>20)+p|0,E+=(C&p|~C&g)+x[10]-42063|0,E=(E<<17|E>>>15)+C|0,g+=(E&C|~E&p)+x[11]-1990404162|0,g=(g<<22|g>>>10)+E|0,p+=(g&E|~g&C)+x[12]+1804603682|0,p=(p<<7|p>>>25)+g|0,C+=(p&g|~p&E)+x[13]-40341101|0,C=(C<<12|C>>>20)+p|0,E+=(C&p|~C&g)+x[14]-1502002290|0,E=(E<<17|E>>>15)+C|0,g+=(E&C|~E&p)+x[15]+1236535329|0,g=(g<<22|g>>>10)+E|0,p+=(g&C|E&~C)+x[1]-165796510|0,p=(p<<5|p>>>27)+g|0,C+=(p&E|g&~E)+x[6]-1069501632|0,C=(C<<9|C>>>23)+p|0,E+=(C&g|p&~g)+x[11]+643717713|0,E=(E<<14|E>>>18)+C|0,g+=(E&p|C&~p)+x[0]-373897302|0,g=(g<<20|g>>>12)+E|0,p+=(g&C|E&~C)+x[5]-701558691|0,p=(p<<5|p>>>27)+g|0,C+=(p&E|g&~E)+x[10]+38016083|0,C=(C<<9|C>>>23)+p|0,E+=(C&g|p&~g)+x[15]-660478335|0,E=(E<<14|E>>>18)+C|0,g+=(E&p|C&~p)+x[4]-405537848|0,g=(g<<20|g>>>12)+E|0,p+=(g&C|E&~C)+x[9]+568446438|0,p=(p<<5|p>>>27)+g|0,C+=(p&E|g&~E)+x[14]-1019803690|0,C=(C<<9|C>>>23)+p|0,E+=(C&g|p&~g)+x[3]-187363961|0,E=(E<<14|E>>>18)+C|0,g+=(E&p|C&~p)+x[8]+1163531501|0,g=(g<<20|g>>>12)+E|0,p+=(g&C|E&~C)+x[13]-1444681467|0,p=(p<<5|p>>>27)+g|0,C+=(p&E|g&~E)+x[2]-51403784|0,C=(C<<9|C>>>23)+p|0,E+=(C&g|p&~g)+x[7]+1735328473|0,E=(E<<14|E>>>18)+C|0,g+=(E&p|C&~p)+x[12]-1926607734|0,g=(g<<20|g>>>12)+E|0,p+=(g^E^C)+x[5]-378558|0,p=(p<<4|p>>>28)+g|0,C+=(p^g^E)+x[8]-2022574463|0,C=(C<<11|C>>>21)+p|0,E+=(C^p^g)+x[11]+1839030562|0,E=(E<<16|E>>>16)+C|0,g+=(E^C^p)+x[14]-35309556|0,g=(g<<23|g>>>9)+E|0,p+=(g^E^C)+x[1]-1530992060|0,p=(p<<4|p>>>28)+g|0,C+=(p^g^E)+x[4]+1272893353|0,C=(C<<11|C>>>21)+p|0,E+=(C^p^g)+x[7]-155497632|0,E=(E<<16|E>>>16)+C|0,g+=(E^C^p)+x[10]-1094730640|0,g=(g<<23|g>>>9)+E|0,p+=(g^E^C)+x[13]+681279174|0,p=(p<<4|p>>>28)+g|0,C+=(p^g^E)+x[0]-358537222|0,C=(C<<11|C>>>21)+p|0,E+=(C^p^g)+x[3]-722521979|0,E=(E<<16|E>>>16)+C|0,g+=(E^C^p)+x[6]+76029189|0,g=(g<<23|g>>>9)+E|0,p+=(g^E^C)+x[9]-640364487|0,p=(p<<4|p>>>28)+g|0,C+=(p^g^E)+x[12]-421815835|0,C=(C<<11|C>>>21)+p|0,E+=(C^p^g)+x[15]+530742520|0,E=(E<<16|E>>>16)+C|0,g+=(E^C^p)+x[2]-995338651|0,g=(g<<23|g>>>9)+E|0,p+=(E^(g|~C))+x[0]-198630844|0,p=(p<<6|p>>>26)+g|0,C+=(g^(p|~E))+x[7]+1126891415|0,C=(C<<10|C>>>22)+p|0,E+=(p^(C|~g))+x[14]-1416354905|0,E=(E<<15|E>>>17)+C|0,g+=(C^(E|~p))+x[5]-57434055|0,g=(g<<21|g>>>11)+E|0,p+=(E^(g|~C))+x[12]+1700485571|0,p=(p<<6|p>>>26)+g|0,C+=(g^(p|~E))+x[3]-1894986606|0,C=(C<<10|C>>>22)+p|0,E+=(p^(C|~g))+x[10]-1051523|0,E=(E<<15|E>>>17)+C|0,g+=(C^(E|~p))+x[1]-2054922799|0,g=(g<<21|g>>>11)+E|0,p+=(E^(g|~C))+x[8]+1873313359|0,p=(p<<6|p>>>26)+g|0,C+=(g^(p|~E))+x[15]-30611744|0,C=(C<<10|C>>>22)+p|0,E+=(p^(C|~g))+x[6]-1560198380|0,E=(E<<15|E>>>17)+C|0,g+=(C^(E|~p))+x[13]+1309151649|0,g=(g<<21|g>>>11)+E|0,p+=(E^(g|~C))+x[4]-145523070|0,p=(p<<6|p>>>26)+g|0,C+=(g^(p|~E))+x[11]-1120210379|0,C=(C<<10|C>>>22)+p|0,E+=(p^(C|~g))+x[2]+718787259|0,E=(E<<15|E>>>17)+C|0,g+=(C^(E|~p))+x[9]-343485551|0,g=(g<<21|g>>>11)+E|0,v[0]=p+v[0]|0,v[1]=g+v[1]|0,v[2]=E+v[2]|0,v[3]=C+v[3]|0}function r(v){var x=[],p;for(p=0;p<64;p+=4)x[p>>2]=v.charCodeAt(p)+(v.charCodeAt(p+1)<<8)+(v.charCodeAt(p+2)<<16)+(v.charCodeAt(p+3)<<24);return x}function a(v){var x=[],p;for(p=0;p<64;p+=4)x[p>>2]=v[p]+(v[p+1]<<8)+(v[p+2]<<16)+(v[p+3]<<24);return x}function o(v){var x=v.length,p=[1732584193,-271733879,-1732584194,271733878],g,E,C,F,G,V;for(g=64;g<=x;g+=64)i(p,r(v.substring(g-64,g)));for(v=v.substring(g-64),E=v.length,C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g=0;g<E;g+=1)C[g>>2]|=v.charCodeAt(g)<<(g%4<<3);if(C[g>>2]|=128<<(g%4<<3),g>55)for(i(p,C),g=0;g<16;g+=1)C[g]=0;return F=x*8,F=F.toString(16).match(/(.*?)(.{0,8})$/),G=parseInt(F[2],16),V=parseInt(F[1],16)||0,C[14]=G,C[15]=V,i(p,C),p}function h(v){var x=v.length,p=[1732584193,-271733879,-1732584194,271733878],g,E,C,F,G,V;for(g=64;g<=x;g+=64)i(p,a(v.subarray(g-64,g)));for(v=g-64<x?v.subarray(g-64):new Uint8Array(0),E=v.length,C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g=0;g<E;g+=1)C[g>>2]|=v[g]<<(g%4<<3);if(C[g>>2]|=128<<(g%4<<3),g>55)for(i(p,C),g=0;g<16;g+=1)C[g]=0;return F=x*8,F=F.toString(16).match(/(.*?)(.{0,8})$/),G=parseInt(F[2],16),V=parseInt(F[1],16)||0,C[14]=G,C[15]=V,i(p,C),p}function c(v){var x="",p;for(p=0;p<4;p+=1)x+=s[v>>p*8+4&15]+s[v>>p*8&15];return x}function l(v){var x;for(x=0;x<v.length;x+=1)v[x]=c(v[x]);return v.join("")}l(o("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function v(x,p){return x=x|0||0,x<0?Math.max(x+p,0):Math.min(x,p)}ArrayBuffer.prototype.slice=function(x,p){var g=this.byteLength,E=v(x,g),C=g,F,G,V,K;return p!==e&&(C=v(p,g)),E>C?new ArrayBuffer(0):(F=C-E,G=new ArrayBuffer(F),V=new Uint8Array(G),K=new Uint8Array(this,E,F),V.set(K),G)}}();function d(v){return/[\u0080-\uFFFF]/.test(v)&&(v=unescape(encodeURIComponent(v))),v}function y(v,x){var p=v.length,g=new ArrayBuffer(p),E=new Uint8Array(g),C;for(C=0;C<p;C+=1)E[C]=v.charCodeAt(C);return x?E:g}function b(v){return String.fromCharCode.apply(null,new Uint8Array(v))}function w(v,x,p){var g=new Uint8Array(v.byteLength+x.byteLength);return g.set(new Uint8Array(v)),g.set(new Uint8Array(x),v.byteLength),p?g:g.buffer}function _(v){var x=[],p=v.length,g;for(g=0;g<p-1;g+=2)x.push(parseInt(v.substr(g,2),16));return String.fromCharCode.apply(String,x)}function S(){this.reset()}return S.prototype.append=function(v){return this.appendBinary(d(v)),this},S.prototype.appendBinary=function(v){this._buff+=v,this._length+=v.length;var x=this._buff.length,p;for(p=64;p<=x;p+=64)i(this._hash,r(this._buff.substring(p-64,p)));return this._buff=this._buff.substring(p-64),this},S.prototype.end=function(v){var x=this._buff,p=x.length,g,E=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],C;for(g=0;g<p;g+=1)E[g>>2]|=x.charCodeAt(g)<<(g%4<<3);return this._finish(E,p),C=l(this._hash),v&&(C=_(C)),this.reset(),C},S.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},S.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},S.prototype.setState=function(v){return this._buff=v.buff,this._length=v.length,this._hash=v.hash,this},S.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},S.prototype._finish=function(v,x){var p=x,g,E,C;if(v[p>>2]|=128<<(p%4<<3),p>55)for(i(this._hash,v),p=0;p<16;p+=1)v[p]=0;g=this._length*8,g=g.toString(16).match(/(.*?)(.{0,8})$/),E=parseInt(g[2],16),C=parseInt(g[1],16)||0,v[14]=E,v[15]=C,i(this._hash,v)},S.hash=function(v,x){return S.hashBinary(d(v),x)},S.hashBinary=function(v,x){var p=o(v),g=l(p);return x?_(g):g},S.ArrayBuffer=function(){this.reset()},S.ArrayBuffer.prototype.append=function(v){var x=w(this._buff.buffer,v,!0),p=x.length,g;for(this._length+=v.byteLength,g=64;g<=p;g+=64)i(this._hash,a(x.subarray(g-64,g)));return this._buff=g-64<p?new Uint8Array(x.buffer.slice(g-64)):new Uint8Array(0),this},S.ArrayBuffer.prototype.end=function(v){var x=this._buff,p=x.length,g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],E,C;for(E=0;E<p;E+=1)g[E>>2]|=x[E]<<(E%4<<3);return this._finish(g,p),C=l(this._hash),v&&(C=_(C)),this.reset(),C},S.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},S.ArrayBuffer.prototype.getState=function(){var v=S.prototype.getState.call(this);return v.buff=b(v.buff),v},S.ArrayBuffer.prototype.setState=function(v){return v.buff=y(v.buff,!0),S.prototype.setState.call(this,v)},S.ArrayBuffer.prototype.destroy=S.prototype.destroy,S.ArrayBuffer.prototype._finish=S.prototype._finish,S.ArrayBuffer.hash=function(v,x){var p=h(new Uint8Array(v)),g=l(p);return x?_(g):g},S})})(Wi);var sh=Wi.exports;const nh=$i(sh);function Ji(n,t){return function(){return n.apply(t,arguments)}}const{toString:ih}=Object.prototype,{getPrototypeOf:fn}=Object,ds=(n=>t=>{const e=ih.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Dt=n=>(n=n.toLowerCase(),t=>ds(t)===n),ms=n=>t=>typeof t===n,{isArray:_e}=Array,Oe=ms("undefined");function rh(n){return n!==null&&!Oe(n)&&n.constructor!==null&&!Oe(n.constructor)&&bt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Zi=Dt("ArrayBuffer");function ah(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&Zi(n.buffer),t}const oh=ms("string"),bt=ms("function"),Ki=ms("number"),ps=n=>n!==null&&typeof n=="object",hh=n=>n===!0||n===!1,gs=n=>{if(ds(n)!=="object")return!1;const t=fn(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},ch=Dt("Date"),lh=Dt("File"),uh=Dt("Blob"),fh=Dt("FileList"),dh=n=>ps(n)&&bt(n.pipe),mh=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||bt(n.append)&&((t=ds(n))==="formdata"||t==="object"&&bt(n.toString)&&n.toString()==="[object FormData]"))},ph=Dt("URLSearchParams"),[gh,yh,wh,xh]=["ReadableStream","Request","Response","Headers"].map(Dt),bh=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Fe(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let s,i;if(typeof n!="object"&&(n=[n]),_e(n))for(s=0,i=n.length;s<i;s++)t.call(null,n[s],s,n);else{const r=e?Object.getOwnPropertyNames(n):Object.keys(n),a=r.length;let o;for(s=0;s<a;s++)o=r[s],t.call(null,n[o],o,n)}}function Qi(n,t){t=t.toLowerCase();const e=Object.keys(n);let s=e.length,i;for(;s-- >0;)if(i=e[s],t===i.toLowerCase())return i;return null}const fe=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),tr=n=>!Oe(n)&&n!==fe;function dn(){const{caseless:n}=tr(this)&&this||{},t={},e=(s,i)=>{const r=n&&Qi(t,i)||i;gs(t[r])&&gs(s)?t[r]=dn(t[r],s):gs(s)?t[r]=dn({},s):_e(s)?t[r]=s.slice():t[r]=s};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&Fe(arguments[s],e);return t}const vh=(n,t,e,{allOwnKeys:s}={})=>(Fe(t,(i,r)=>{e&&bt(i)?n[r]=Ji(i,e):n[r]=i},{allOwnKeys:s}),n),Sh=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),Th=(n,t,e,s)=>{n.prototype=Object.create(t.prototype,s),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},Ch=(n,t,e,s)=>{let i,r,a;const o={};if(t=t||{},n==null)return t;do{for(i=Object.getOwnPropertyNames(n),r=i.length;r-- >0;)a=i[r],(!s||s(a,n,t))&&!o[a]&&(t[a]=n[a],o[a]=!0);n=e!==!1&&fn(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},Ph=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const s=n.indexOf(t,e);return s!==-1&&s===e},Eh=n=>{if(!n)return null;if(_e(n))return n;let t=n.length;if(!Ki(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},_h=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&fn(Uint8Array)),Ah=(n,t)=>{const s=(n&&n[Symbol.iterator]).call(n);let i;for(;(i=s.next())&&!i.done;){const r=i.value;t.call(n,r[0],r[1])}},Dh=(n,t)=>{let e;const s=[];for(;(e=n.exec(t))!==null;)s.push(e);return s},Ih=Dt("HTMLFormElement"),Mh=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,s,i){return s.toUpperCase()+i}),er=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),kh=Dt("RegExp"),sr=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),s={};Fe(e,(i,r)=>{let a;(a=t(i,r,n))!==!1&&(s[r]=a||i)}),Object.defineProperties(n,s)},Lh=n=>{sr(n,(t,e)=>{if(bt(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const s=n[e];if(bt(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},Rh=(n,t)=>{const e={},s=i=>{i.forEach(r=>{e[r]=!0})};return _e(n)?s(n):s(String(n).split(t)),e},Oh=()=>{},Fh=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function Nh(n){return!!(n&&bt(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const Bh=n=>{const t=new Array(10),e=(s,i)=>{if(ps(s)){if(t.indexOf(s)>=0)return;if(!("toJSON"in s)){t[i]=s;const r=_e(s)?[]:{};return Fe(s,(a,o)=>{const h=e(a,i+1);!Oe(h)&&(r[o]=h)}),t[i]=void 0,r}}return s};return e(n,0)},Uh=Dt("AsyncFunction"),Yh=n=>n&&(ps(n)||bt(n))&&bt(n.then)&&bt(n.catch),nr=((n,t)=>n?setImmediate:t?((e,s)=>(fe.addEventListener("message",({source:i,data:r})=>{i===fe&&r===e&&s.length&&s.shift()()},!1),i=>{s.push(i),fe.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",bt(fe.postMessage)),Xh=typeof queueMicrotask<"u"?queueMicrotask.bind(fe):typeof process<"u"&&process.nextTick||nr,D={isArray:_e,isArrayBuffer:Zi,isBuffer:rh,isFormData:mh,isArrayBufferView:ah,isString:oh,isNumber:Ki,isBoolean:hh,isObject:ps,isPlainObject:gs,isReadableStream:gh,isRequest:yh,isResponse:wh,isHeaders:xh,isUndefined:Oe,isDate:ch,isFile:lh,isBlob:uh,isRegExp:kh,isFunction:bt,isStream:dh,isURLSearchParams:ph,isTypedArray:_h,isFileList:fh,forEach:Fe,merge:dn,extend:vh,trim:bh,stripBOM:Sh,inherits:Th,toFlatObject:Ch,kindOf:ds,kindOfTest:Dt,endsWith:Ph,toArray:Eh,forEachEntry:Ah,matchAll:Dh,isHTMLForm:Ih,hasOwnProperty:er,hasOwnProp:er,reduceDescriptors:sr,freezeMethods:Lh,toObjectSet:Rh,toCamelCase:Mh,noop:Oh,toFiniteNumber:Fh,findKey:Qi,global:fe,isContextDefined:tr,isSpecCompliantForm:Nh,toJSONObject:Bh,isAsyncFn:Uh,isThenable:Yh,setImmediate:nr,asap:Xh};function N(n,t,e,s,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),s&&(this.request=s),i&&(this.response=i,this.status=i.status?i.status:null)}D.inherits(N,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:D.toJSONObject(this.config),code:this.code,status:this.status}}});const ir=N.prototype,rr={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{rr[n]={value:n}}),Object.defineProperties(N,rr),Object.defineProperty(ir,"isAxiosError",{value:!0}),N.from=(n,t,e,s,i,r)=>{const a=Object.create(ir);return D.toFlatObject(n,a,function(h){return h!==Error.prototype},o=>o!=="isAxiosError"),N.call(a,n.message,t,e,s,i),a.cause=n,a.name=n.name,r&&Object.assign(a,r),a};const zh=null;function mn(n){return D.isPlainObject(n)||D.isArray(n)}function ar(n){return D.endsWith(n,"[]")?n.slice(0,-2):n}function or(n,t,e){return n?n.concat(t).map(function(i,r){return i=ar(i),!e&&r?"["+i+"]":i}).join(e?".":""):t}function Gh(n){return D.isArray(n)&&!n.some(mn)}const Vh=D.toFlatObject(D,{},null,function(t){return/^is[A-Z]/.test(t)});function ys(n,t,e){if(!D.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=D.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,S){return!D.isUndefined(S[_])});const s=e.metaTokens,i=e.visitor||l,r=e.dots,a=e.indexes,h=(e.Blob||typeof Blob<"u"&&Blob)&&D.isSpecCompliantForm(t);if(!D.isFunction(i))throw new TypeError("visitor must be a function");function c(w){if(w===null)return"";if(D.isDate(w))return w.toISOString();if(!h&&D.isBlob(w))throw new N("Blob is not supported. Use a Buffer instead.");return D.isArrayBuffer(w)||D.isTypedArray(w)?h&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function l(w,_,S){let v=w;if(w&&!S&&typeof w=="object"){if(D.endsWith(_,"{}"))_=s?_:_.slice(0,-2),w=JSON.stringify(w);else if(D.isArray(w)&&Gh(w)||(D.isFileList(w)||D.endsWith(_,"[]"))&&(v=D.toArray(w)))return _=ar(_),v.forEach(function(p,g){!(D.isUndefined(p)||p===null)&&t.append(a===!0?or([_],g,r):a===null?_:_+"[]",c(p))}),!1}return mn(w)?!0:(t.append(or(S,_,r),c(w)),!1)}const d=[],y=Object.assign(Vh,{defaultVisitor:l,convertValue:c,isVisitable:mn});function b(w,_){if(!D.isUndefined(w)){if(d.indexOf(w)!==-1)throw Error("Circular reference detected in "+_.join("."));d.push(w),D.forEach(w,function(v,x){(!(D.isUndefined(v)||v===null)&&i.call(t,v,D.isString(x)?x.trim():x,_,y))===!0&&b(v,_?_.concat(x):[x])}),d.pop()}}if(!D.isObject(n))throw new TypeError("data must be an object");return b(n),t}function hr(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function pn(n,t){this._pairs=[],n&&ys(n,this,t)}const cr=pn.prototype;cr.append=function(t,e){this._pairs.push([t,e])},cr.toString=function(t){const e=t?function(s){return t.call(this,s,hr)}:hr;return this._pairs.map(function(i){return e(i[0])+"="+e(i[1])},"").join("&")};function qh(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function lr(n,t,e){if(!t)return n;const s=e&&e.encode||qh;D.isFunction(e)&&(e={serialize:e});const i=e&&e.serialize;let r;if(i?r=i(t,e):r=D.isURLSearchParams(t)?t.toString():new pn(t,e).toString(s),r){const a=n.indexOf("#");a!==-1&&(n=n.slice(0,a)),n+=(n.indexOf("?")===-1?"?":"&")+r}return n}class jh{constructor(){this.handlers=[]}use(t,e,s){return this.handlers.push({fulfilled:t,rejected:e,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){D.forEach(this.handlers,function(s){s!==null&&t(s)})}}const ur=jh,fr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Hh={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:pn,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},gn=typeof window<"u"&&typeof document<"u",yn=typeof navigator=="object"&&navigator||void 0,$h=gn&&(!yn||["ReactNative","NativeScript","NS"].indexOf(yn.product)<0),Wh=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Jh=gn&&window.location.href||"http://localhost",rt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:gn,hasStandardBrowserEnv:$h,hasStandardBrowserWebWorkerEnv:Wh,navigator:yn,origin:Jh},Symbol.toStringTag,{value:"Module"})),...Hh};function Zh(n,t){return ys(n,new rt.classes.URLSearchParams,Object.assign({visitor:function(e,s,i,r){return rt.isNode&&D.isBuffer(e)?(this.append(s,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}function Kh(n){return D.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Qh(n){const t={},e=Object.keys(n);let s;const i=e.length;let r;for(s=0;s<i;s++)r=e[s],t[r]=n[r];return t}function dr(n){function t(e,s,i,r){let a=e[r++];if(a==="__proto__")return!0;const o=Number.isFinite(+a),h=r>=e.length;return a=!a&&D.isArray(i)?i.length:a,h?(D.hasOwnProp(i,a)?i[a]=[i[a],s]:i[a]=s,!o):((!i[a]||!D.isObject(i[a]))&&(i[a]=[]),t(e,s,i[a],r)&&D.isArray(i[a])&&(i[a]=Qh(i[a])),!o)}if(D.isFormData(n)&&D.isFunction(n.entries)){const e={};return D.forEachEntry(n,(s,i)=>{t(Kh(s),i,e,0)}),e}return null}function tc(n,t,e){if(D.isString(n))try{return(t||JSON.parse)(n),D.trim(n)}catch(s){if(s.name!=="SyntaxError")throw s}return(e||JSON.stringify)(n)}const wn={transitional:fr,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const s=e.getContentType()||"",i=s.indexOf("application/json")>-1,r=D.isObject(t);if(r&&D.isHTMLForm(t)&&(t=new FormData(t)),D.isFormData(t))return i?JSON.stringify(dr(t)):t;if(D.isArrayBuffer(t)||D.isBuffer(t)||D.isStream(t)||D.isFile(t)||D.isBlob(t)||D.isReadableStream(t))return t;if(D.isArrayBufferView(t))return t.buffer;if(D.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(r){if(s.indexOf("application/x-www-form-urlencoded")>-1)return Zh(t,this.formSerializer).toString();if((o=D.isFileList(t))||s.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return ys(o?{"files[]":t}:t,h&&new h,this.formSerializer)}}return r||i?(e.setContentType("application/json",!1),tc(t)):t}],transformResponse:[function(t){const e=this.transitional||wn.transitional,s=e&&e.forcedJSONParsing,i=this.responseType==="json";if(D.isResponse(t)||D.isReadableStream(t))return t;if(t&&D.isString(t)&&(s&&!this.responseType||i)){const a=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(o){if(a)throw o.name==="SyntaxError"?N.from(o,N.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rt.classes.FormData,Blob:rt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};D.forEach(["delete","get","head","post","put","patch"],n=>{wn.headers[n]={}});const xn=wn,ec=D.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),sc=n=>{const t={};let e,s,i;return n&&n.split(`
|
|
11
11
|
`).forEach(function(a){i=a.indexOf(":"),e=a.substring(0,i).trim().toLowerCase(),s=a.substring(i+1).trim(),!(!e||t[e]&&ec[e])&&(e==="set-cookie"?t[e]?t[e].push(s):t[e]=[s]:t[e]=t[e]?t[e]+", "+s:s)}),t},mr=Symbol("internals");function Ne(n){return n&&String(n).trim().toLowerCase()}function ws(n){return n===!1||n==null?n:D.isArray(n)?n.map(ws):String(n)}function nc(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=e.exec(n);)t[s[1]]=s[2];return t}const ic=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function bn(n,t,e,s,i){if(D.isFunction(s))return s.call(this,t,e);if(i&&(t=e),!!D.isString(t)){if(D.isString(s))return t.indexOf(s)!==-1;if(D.isRegExp(s))return s.test(t)}}function rc(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,s)=>e.toUpperCase()+s)}function ac(n,t){const e=D.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(n,s+e,{value:function(i,r,a){return this[s].call(this,t,i,r,a)},configurable:!0})})}class xs{constructor(t){t&&this.set(t)}set(t,e,s){const i=this;function r(o,h,c){const l=Ne(h);if(!l)throw new Error("header name must be a non-empty string");const d=D.findKey(i,l);(!d||i[d]===void 0||c===!0||c===void 0&&i[d]!==!1)&&(i[d||h]=ws(o))}const a=(o,h)=>D.forEach(o,(c,l)=>r(c,l,h));if(D.isPlainObject(t)||t instanceof this.constructor)a(t,e);else if(D.isString(t)&&(t=t.trim())&&!ic(t))a(sc(t),e);else if(D.isHeaders(t))for(const[o,h]of t.entries())r(h,o,s);else t!=null&&r(e,t,s);return this}get(t,e){if(t=Ne(t),t){const s=D.findKey(this,t);if(s){const i=this[s];if(!e)return i;if(e===!0)return nc(i);if(D.isFunction(e))return e.call(this,i,s);if(D.isRegExp(e))return e.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Ne(t),t){const s=D.findKey(this,t);return!!(s&&this[s]!==void 0&&(!e||bn(this,this[s],s,e)))}return!1}delete(t,e){const s=this;let i=!1;function r(a){if(a=Ne(a),a){const o=D.findKey(s,a);o&&(!e||bn(s,s[o],o,e))&&(delete s[o],i=!0)}}return D.isArray(t)?t.forEach(r):r(t),i}clear(t){const e=Object.keys(this);let s=e.length,i=!1;for(;s--;){const r=e[s];(!t||bn(this,this[r],r,t,!0))&&(delete this[r],i=!0)}return i}normalize(t){const e=this,s={};return D.forEach(this,(i,r)=>{const a=D.findKey(s,r);if(a){e[a]=ws(i),delete e[r];return}const o=t?rc(r):String(r).trim();o!==r&&delete e[r],e[o]=ws(i),s[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return D.forEach(this,(s,i)=>{s!=null&&s!==!1&&(e[i]=t&&D.isArray(s)?s.join(", "):s)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
|
12
12
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const s=new this(t);return e.forEach(i=>s.set(i)),s}static accessor(t){const s=(this[mr]=this[mr]={accessors:{}}).accessors,i=this.prototype;function r(a){const o=Ne(a);s[o]||(ac(i,a),s[o]=!0)}return D.isArray(t)?t.forEach(r):r(t),this}}xs.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),D.reduceDescriptors(xs.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(s){this[e]=s}}}),D.freezeMethods(xs);const It=xs;function vn(n,t){const e=this||xn,s=t||e,i=It.from(s.headers);let r=s.data;return D.forEach(n,function(o){r=o.call(e,r,i.normalize(),t?t.status:void 0)}),i.normalize(),r}function pr(n){return!!(n&&n.__CANCEL__)}function Ae(n,t,e){N.call(this,n??"canceled",N.ERR_CANCELED,t,e),this.name="CanceledError"}D.inherits(Ae,N,{__CANCEL__:!0});function gr(n,t,e){const s=e.config.validateStatus;!e.status||!s||s(e.status)?n(e):t(new N("Request failed with status code "+e.status,[N.ERR_BAD_REQUEST,N.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function oc(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function hc(n,t){n=n||10;const e=new Array(n),s=new Array(n);let i=0,r=0,a;return t=t!==void 0?t:1e3,function(h){const c=Date.now(),l=s[r];a||(a=c),e[i]=h,s[i]=c;let d=r,y=0;for(;d!==i;)y+=e[d++],d=d%n;if(i=(i+1)%n,i===r&&(r=(r+1)%n),c-a<t)return;const b=l&&c-l;return b?Math.round(y*1e3/b):void 0}}function cc(n,t){let e=0,s=1e3/t,i,r;const a=(c,l=Date.now())=>{e=l,i=null,r&&(clearTimeout(r),r=null),n.apply(null,c)};return[(...c)=>{const l=Date.now(),d=l-e;d>=s?a(c,l):(i=c,r||(r=setTimeout(()=>{r=null,a(i)},s-d)))},()=>i&&a(i)]}const bs=(n,t,e=3)=>{let s=0;const i=hc(50,250);return cc(r=>{const a=r.loaded,o=r.lengthComputable?r.total:void 0,h=a-s,c=i(h),l=a<=o;s=a;const d={loaded:a,total:o,progress:o?a/o:void 0,bytes:h,rate:c||void 0,estimated:c&&o&&l?(o-a)/c:void 0,event:r,lengthComputable:o!=null,[t?"download":"upload"]:!0};n(d)},e)},yr=(n,t)=>{const e=n!=null;return[s=>t[0]({lengthComputable:e,total:n,loaded:s}),t[1]]},wr=n=>(...t)=>D.asap(()=>n(...t)),lc=rt.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,rt.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(rt.origin),rt.navigator&&/(msie|trident)/i.test(rt.navigator.userAgent)):()=>!0,uc=rt.hasStandardBrowserEnv?{write(n,t,e,s,i,r){const a=[n+"="+encodeURIComponent(t)];D.isNumber(e)&&a.push("expires="+new Date(e).toGMTString()),D.isString(s)&&a.push("path="+s),D.isString(i)&&a.push("domain="+i),r===!0&&a.push("secure"),document.cookie=a.join("; ")},read(n){const t=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function fc(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function dc(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function xr(n,t,e){let s=!fc(t);return n&&(s||e==!1)?dc(n,t):t}const br=n=>n instanceof It?{...n}:n;function de(n,t){t=t||{};const e={};function s(c,l,d,y){return D.isPlainObject(c)&&D.isPlainObject(l)?D.merge.call({caseless:y},c,l):D.isPlainObject(l)?D.merge({},l):D.isArray(l)?l.slice():l}function i(c,l,d,y){if(D.isUndefined(l)){if(!D.isUndefined(c))return s(void 0,c,d,y)}else return s(c,l,d,y)}function r(c,l){if(!D.isUndefined(l))return s(void 0,l)}function a(c,l){if(D.isUndefined(l)){if(!D.isUndefined(c))return s(void 0,c)}else return s(void 0,l)}function o(c,l,d){if(d in t)return s(c,l);if(d in n)return s(void 0,c)}const h={url:r,method:r,data:r,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:o,headers:(c,l,d)=>i(br(c),br(l),d,!0)};return D.forEach(Object.keys(Object.assign({},n,t)),function(l){const d=h[l]||i,y=d(n[l],t[l],l);D.isUndefined(y)&&d!==o||(e[l]=y)}),e}const vr=n=>{const t=de({},n);let{data:e,withXSRFToken:s,xsrfHeaderName:i,xsrfCookieName:r,headers:a,auth:o}=t;t.headers=a=It.from(a),t.url=lr(xr(t.baseURL,t.url,t.allowAbsoluteUrls),n.params,n.paramsSerializer),o&&a.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):"")));let h;if(D.isFormData(e)){if(rt.hasStandardBrowserEnv||rt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((h=a.getContentType())!==!1){const[c,...l]=h?h.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...l].join("; "))}}if(rt.hasStandardBrowserEnv&&(s&&D.isFunction(s)&&(s=s(t)),s||s!==!1&&lc(t.url))){const c=i&&r&&uc.read(r);c&&a.set(i,c)}return t},mc=typeof XMLHttpRequest<"u"&&function(n){return new Promise(function(e,s){const i=vr(n);let r=i.data;const a=It.from(i.headers).normalize();let{responseType:o,onUploadProgress:h,onDownloadProgress:c}=i,l,d,y,b,w;function _(){b&&b(),w&&w(),i.cancelToken&&i.cancelToken.unsubscribe(l),i.signal&&i.signal.removeEventListener("abort",l)}let S=new XMLHttpRequest;S.open(i.method.toUpperCase(),i.url,!0),S.timeout=i.timeout;function v(){if(!S)return;const p=It.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders()),E={data:!o||o==="text"||o==="json"?S.responseText:S.response,status:S.status,statusText:S.statusText,headers:p,config:n,request:S};gr(function(F){e(F),_()},function(F){s(F),_()},E),S=null}"onloadend"in S?S.onloadend=v:S.onreadystatechange=function(){!S||S.readyState!==4||S.status===0&&!(S.responseURL&&S.responseURL.indexOf("file:")===0)||setTimeout(v)},S.onabort=function(){S&&(s(new N("Request aborted",N.ECONNABORTED,n,S)),S=null)},S.onerror=function(){s(new N("Network Error",N.ERR_NETWORK,n,S)),S=null},S.ontimeout=function(){let g=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||fr;i.timeoutErrorMessage&&(g=i.timeoutErrorMessage),s(new N(g,E.clarifyTimeoutError?N.ETIMEDOUT:N.ECONNABORTED,n,S)),S=null},r===void 0&&a.setContentType(null),"setRequestHeader"in S&&D.forEach(a.toJSON(),function(g,E){S.setRequestHeader(E,g)}),D.isUndefined(i.withCredentials)||(S.withCredentials=!!i.withCredentials),o&&o!=="json"&&(S.responseType=i.responseType),c&&([y,w]=bs(c,!0),S.addEventListener("progress",y)),h&&S.upload&&([d,b]=bs(h),S.upload.addEventListener("progress",d),S.upload.addEventListener("loadend",b)),(i.cancelToken||i.signal)&&(l=p=>{S&&(s(!p||p.type?new Ae(null,n,S):p),S.abort(),S=null)},i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));const x=oc(i.url);if(x&&rt.protocols.indexOf(x)===-1){s(new N("Unsupported protocol "+x+":",N.ERR_BAD_REQUEST,n));return}S.send(r||null)})},pc=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let s=new AbortController,i;const r=function(c){if(!i){i=!0,o();const l=c instanceof Error?c:this.reason;s.abort(l instanceof N?l:new Ae(l instanceof Error?l.message:l))}};let a=t&&setTimeout(()=>{a=null,r(new N(`timeout ${t} of ms exceeded`,N.ETIMEDOUT))},t);const o=()=>{n&&(a&&clearTimeout(a),a=null,n.forEach(c=>{c.unsubscribe?c.unsubscribe(r):c.removeEventListener("abort",r)}),n=null)};n.forEach(c=>c.addEventListener("abort",r));const{signal:h}=s;return h.unsubscribe=()=>D.asap(o),h}},gc=function*(n,t){let e=n.byteLength;if(!t||e<t){yield n;return}let s=0,i;for(;s<e;)i=s+t,yield n.slice(s,i),s=i},yc=async function*(n,t){for await(const e of wc(n))yield*gc(e,t)},wc=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:s}=await t.read();if(e)break;yield s}}finally{await t.cancel()}},Sr=(n,t,e,s)=>{const i=yc(n,t);let r=0,a,o=h=>{a||(a=!0,s&&s(h))};return new ReadableStream({async pull(h){try{const{done:c,value:l}=await i.next();if(c){o(),h.close();return}let d=l.byteLength;if(e){let y=r+=d;e(y)}h.enqueue(new Uint8Array(l))}catch(c){throw o(c),c}},cancel(h){return o(h),i.return()}},{highWaterMark:2})},vs=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Tr=vs&&typeof ReadableStream=="function",xc=vs&&(typeof TextEncoder=="function"?(n=>t=>n.encode(t))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),Cr=(n,...t)=>{try{return!!n(...t)}catch{return!1}},bc=Tr&&Cr(()=>{let n=!1;const t=new Request(rt.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!t}),Pr=64*1024,Sn=Tr&&Cr(()=>D.isReadableStream(new Response("").body)),Ss={stream:Sn&&(n=>n.body)};vs&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ss[t]&&(Ss[t]=D.isFunction(n[t])?e=>e[t]():(e,s)=>{throw new N(`Response type '${t}' is not supported`,N.ERR_NOT_SUPPORT,s)})})})(new Response);const vc=async n=>{if(n==null)return 0;if(D.isBlob(n))return n.size;if(D.isSpecCompliantForm(n))return(await new Request(rt.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(D.isArrayBufferView(n)||D.isArrayBuffer(n))return n.byteLength;if(D.isURLSearchParams(n)&&(n=n+""),D.isString(n))return(await xc(n)).byteLength},Sc=async(n,t)=>{const e=D.toFiniteNumber(n.getContentLength());return e??vc(t)},Tn={http:zh,xhr:mc,fetch:vs&&(async n=>{let{url:t,method:e,data:s,signal:i,cancelToken:r,timeout:a,onDownloadProgress:o,onUploadProgress:h,responseType:c,headers:l,withCredentials:d="same-origin",fetchOptions:y}=vr(n);c=c?(c+"").toLowerCase():"text";let b=pc([i,r&&r.toAbortSignal()],a),w;const _=b&&b.unsubscribe&&(()=>{b.unsubscribe()});let S;try{if(h&&bc&&e!=="get"&&e!=="head"&&(S=await Sc(l,s))!==0){let E=new Request(t,{method:"POST",body:s,duplex:"half"}),C;if(D.isFormData(s)&&(C=E.headers.get("content-type"))&&l.setContentType(C),E.body){const[F,G]=yr(S,bs(wr(h)));s=Sr(E.body,Pr,F,G)}}D.isString(d)||(d=d?"include":"omit");const v="credentials"in Request.prototype;w=new Request(t,{...y,signal:b,method:e.toUpperCase(),headers:l.normalize().toJSON(),body:s,duplex:"half",credentials:v?d:void 0});let x=await fetch(w);const p=Sn&&(c==="stream"||c==="response");if(Sn&&(o||p&&_)){const E={};["status","statusText","headers"].forEach(V=>{E[V]=x[V]});const C=D.toFiniteNumber(x.headers.get("content-length")),[F,G]=o&&yr(C,bs(wr(o),!0))||[];x=new Response(Sr(x.body,Pr,F,()=>{G&&G(),_&&_()}),E)}c=c||"text";let g=await Ss[D.findKey(Ss,c)||"text"](x,n);return!p&&_&&_(),await new Promise((E,C)=>{gr(E,C,{data:g,headers:It.from(x.headers),status:x.status,statusText:x.statusText,config:n,request:w})})}catch(v){throw _&&_(),v&&v.name==="TypeError"&&/fetch/i.test(v.message)?Object.assign(new N("Network Error",N.ERR_NETWORK,n,w),{cause:v.cause||v}):N.from(v,v&&v.code,n,w)}})};D.forEach(Tn,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const Er=n=>`- ${n}`,Tc=n=>D.isFunction(n)||n===null||n===!1,_r={getAdapter:n=>{n=D.isArray(n)?n:[n];const{length:t}=n;let e,s;const i={};for(let r=0;r<t;r++){e=n[r];let a;if(s=e,!Tc(e)&&(s=Tn[(a=String(e)).toLowerCase()],s===void 0))throw new N(`Unknown adapter '${a}'`);if(s)break;i[a||"#"+r]=s}if(!s){const r=Object.entries(i).map(([o,h])=>`adapter ${o} `+(h===!1?"is not supported by the environment":"is not available in the build"));let a=t?r.length>1?`since :
|
|
13
13
|
`+r.map(Er).join(`
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
* Copyright (c) 2016 Jorik Tangelder;
|
|
34
34
|
* Licensed under the MIT license */(function(n){(function(t,e,s,i){var r=["","webkit","Moz","MS","ms","o"],a=e.createElement("div"),o="function",h=Math.round,c=Math.abs,l=Date.now;function d(u,m,P){return setTimeout(p(u,P),m)}function y(u,m,P){return Array.isArray(u)?(b(u,P[m],P),!0):!1}function b(u,m,P){var A;if(u)if(u.forEach)u.forEach(m,P);else if(u.length!==i)for(A=0;A<u.length;)m.call(P,u[A],A,u),A++;else for(A in u)u.hasOwnProperty(A)&&m.call(P,u[A],A,u)}function w(u,m,P){var A="DEPRECATED METHOD: "+m+`
|
|
35
35
|
`+P+` AT
|
|
36
|
-
`;return function(){var M=new Error("get-stack-trace"),R=M&&M.stack?M.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",X=t.console&&(t.console.warn||t.console.log);return X&&X.call(t.console,A,R),u.apply(this,arguments)}}var _;typeof Object.assign!="function"?_=function(m){if(m===i||m===null)throw new TypeError("Cannot convert undefined or null to object");for(var P=Object(m),A=1;A<arguments.length;A++){var M=arguments[A];if(M!==i&&M!==null)for(var R in M)M.hasOwnProperty(R)&&(P[R]=M[R])}return P}:_=Object.assign;var S=w(function(m,P,A){for(var M=Object.keys(P),R=0;R<M.length;)(!A||A&&m[M[R]]===i)&&(m[M[R]]=P[M[R]]),R++;return m},"extend","Use `assign`."),v=w(function(m,P){return S(m,P,!0)},"merge","Use `assign`.");function x(u,m,P){var A=m.prototype,M;M=u.prototype=Object.create(A),M.constructor=u,M._super=A,P&&_(M,P)}function p(u,m){return function(){return u.apply(m,arguments)}}function g(u,m){return typeof u==o?u.apply(m&&m[0]||i,m):u}function E(u,m){return u===i?m:u}function C(u,m,P){b(K(m),function(A){u.addEventListener(A,P,!1)})}function F(u,m,P){b(K(m),function(A){u.removeEventListener(A,P,!1)})}function G(u,m){for(;u;){if(u==m)return!0;u=u.parentNode}return!1}function V(u,m){return u.indexOf(m)>-1}function K(u){return u.trim().split(/\s+/g)}function Q(u,m,P){if(u.indexOf&&!P)return u.indexOf(m);for(var A=0;A<u.length;){if(P&&u[A][P]==m||!P&&u[A]===m)return A;A++}return-1}function ht(u){return Array.prototype.slice.call(u,0)}function Et(u,m,P){for(var A=[],M=[],R=0;R<u.length;){var X=m?u[R][m]:u[R];Q(M,X)<0&&A.push(u[R]),M[R]=X,R++}return P&&(m?A=A.sort(function(it,pt){return it[m]>pt[m]}):A=A.sort()),A}function xt(u,m){for(var P,A,M=m[0].toUpperCase()+m.slice(1),R=0;R<r.length;){if(P=r[R],A=P?P+M:m,A in u)return A;R++}return i}var Me=1;function ce(){return Me++}function ve(u){var m=u.ownerDocument||u;return m.defaultView||m.parentWindow||t}var ke=/mobile|tablet|ip(ad|hone|od)|android/i,O="ontouchstart"in t,k=xt(t,"PointerEvent")!==i,Y=O&&ke.test(navigator.userAgent),q="touch",mt="pen",Lt="mouse",Js="kinect",Zs=25,st=1,Bt=2,J=4,I=8,Ks=1,ts=2,es=4,ss=8,ns=16,Ut=ts|es,Se=ss|ns,ao=Ut|Se,oo=["x","y"],Qs=["clientX","clientY"];function _t(u,m){var P=this;this.manager=u,this.callback=m,this.element=u.element,this.target=u.options.inputTarget,this.domHandler=function(A){g(u.options.enable,[u])&&P.handler(A)},this.init()}_t.prototype={handler:function(){},init:function(){this.evEl&&C(this.element,this.evEl,this.domHandler),this.evTarget&&C(this.target,this.evTarget,this.domHandler),this.evWin&&C(ve(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&F(this.element,this.evEl,this.domHandler),this.evTarget&&F(this.target,this.evTarget,this.domHandler),this.evWin&&F(ve(this.element),this.evWin,this.domHandler)}};function cm(u){var m,P=u.options.inputClass;return P?m=P:k?m=vi:Y?m=sn:O?m=Si:m=en,new m(u,lm)}function lm(u,m,P){var A=P.pointers.length,M=P.changedPointers.length,R=m&st&&A-M===0,X=m&(J|I)&&A-M===0;P.isFirst=!!R,P.isFinal=!!X,R&&(u.session={}),P.eventType=m,um(u,P),u.emit("hammer.input",P),u.recognize(P),u.session.prevInput=P}function um(u,m){var P=u.session,A=m.pointers,M=A.length;P.firstInput||(P.firstInput=ho(m)),M>1&&!P.firstMultiple?P.firstMultiple=ho(m):M===1&&(P.firstMultiple=!1);var R=P.firstInput,X=P.firstMultiple,nt=X?X.center:R.center,it=m.center=co(A);m.timeStamp=l(),m.deltaTime=m.timeStamp-R.timeStamp,m.angle=bi(nt,it),m.distance=tn(nt,it),fm(P,m),m.offsetDirection=uo(m.deltaX,m.deltaY);var pt=lo(m.deltaTime,m.deltaX,m.deltaY);m.overallVelocityX=pt.x,m.overallVelocityY=pt.y,m.overallVelocity=c(pt.x)>c(pt.y)?pt.x:pt.y,m.scale=X?pm(X.pointers,A):1,m.rotation=X?mm(X.pointers,A):0,m.maxPointers=P.prevInput?m.pointers.length>P.prevInput.maxPointers?m.pointers.length:P.prevInput.maxPointers:m.pointers.length,dm(P,m);var Xt=u.element;G(m.srcEvent.target,Xt)&&(Xt=m.srcEvent.target),m.target=Xt}function fm(u,m){var P=m.center,A=u.offsetDelta||{},M=u.prevDelta||{},R=u.prevInput||{};(m.eventType===st||R.eventType===J)&&(M=u.prevDelta={x:R.deltaX||0,y:R.deltaY||0},A=u.offsetDelta={x:P.x,y:P.y}),m.deltaX=M.x+(P.x-A.x),m.deltaY=M.y+(P.y-A.y)}function dm(u,m){var P=u.lastInterval||m,A=m.timeStamp-P.timeStamp,M,R,X,nt;if(m.eventType!=I&&(A>Zs||P.velocity===i)){var it=m.deltaX-P.deltaX,pt=m.deltaY-P.deltaY,Xt=lo(A,it,pt);R=Xt.x,X=Xt.y,M=c(Xt.x)>c(Xt.y)?Xt.x:Xt.y,nt=uo(it,pt),u.lastInterval=m}else M=P.velocity,R=P.velocityX,X=P.velocityY,nt=P.direction;m.velocity=M,m.velocityX=R,m.velocityY=X,m.direction=nt}function ho(u){for(var m=[],P=0;P<u.pointers.length;)m[P]={clientX:h(u.pointers[P].clientX),clientY:h(u.pointers[P].clientY)},P++;return{timeStamp:l(),pointers:m,center:co(m),deltaX:u.deltaX,deltaY:u.deltaY}}function co(u){var m=u.length;if(m===1)return{x:h(u[0].clientX),y:h(u[0].clientY)};for(var P=0,A=0,M=0;M<m;)P+=u[M].clientX,A+=u[M].clientY,M++;return{x:h(P/m),y:h(A/m)}}function lo(u,m,P){return{x:m/u||0,y:P/u||0}}function uo(u,m){return u===m?Ks:c(u)>=c(m)?u<0?ts:es:m<0?ss:ns}function tn(u,m,P){P||(P=oo);var A=m[P[0]]-u[P[0]],M=m[P[1]]-u[P[1]];return Math.sqrt(A*A+M*M)}function bi(u,m,P){P||(P=oo);var A=m[P[0]]-u[P[0]],M=m[P[1]]-u[P[1]];return Math.atan2(M,A)*180/Math.PI}function mm(u,m){return bi(m[1],m[0],Qs)+bi(u[1],u[0],Qs)}function pm(u,m){return tn(m[0],m[1],Qs)/tn(u[0],u[1],Qs)}var gm={mousedown:st,mousemove:Bt,mouseup:J},ym="mousedown",wm="mousemove mouseup";function en(){this.evEl=ym,this.evWin=wm,this.pressed=!1,_t.apply(this,arguments)}x(en,_t,{handler:function(m){var P=gm[m.type];P&st&&m.button===0&&(this.pressed=!0),P&Bt&&m.which!==1&&(P=J),this.pressed&&(P&J&&(this.pressed=!1),this.callback(this.manager,P,{pointers:[m],changedPointers:[m],pointerType:Lt,srcEvent:m}))}});var xm={pointerdown:st,pointermove:Bt,pointerup:J,pointercancel:I,pointerout:I},bm={2:q,3:mt,4:Lt,5:Js},fo="pointerdown",mo="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(fo="MSPointerDown",mo="MSPointerMove MSPointerUp MSPointerCancel");function vi(){this.evEl=fo,this.evWin=mo,_t.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}x(vi,_t,{handler:function(m){var P=this.store,A=!1,M=m.type.toLowerCase().replace("ms",""),R=xm[M],X=bm[m.pointerType]||m.pointerType,nt=X==q,it=Q(P,m.pointerId,"pointerId");R&st&&(m.button===0||nt)?it<0&&(P.push(m),it=P.length-1):R&(J|I)&&(A=!0),!(it<0)&&(P[it]=m,this.callback(this.manager,R,{pointers:P,changedPointers:[m],pointerType:X,srcEvent:m}),A&&P.splice(it,1))}});var vm={touchstart:st,touchmove:Bt,touchend:J,touchcancel:I},Sm="touchstart",Tm="touchstart touchmove touchend touchcancel";function po(){this.evTarget=Sm,this.evWin=Tm,this.started=!1,_t.apply(this,arguments)}x(po,_t,{handler:function(m){var P=vm[m.type];if(P===st&&(this.started=!0),!!this.started){var A=Cm.call(this,m,P);P&(J|I)&&A[0].length-A[1].length===0&&(this.started=!1),this.callback(this.manager,P,{pointers:A[0],changedPointers:A[1],pointerType:q,srcEvent:m})}}});function Cm(u,m){var P=ht(u.touches),A=ht(u.changedTouches);return m&(J|I)&&(P=Et(P.concat(A),"identifier",!0)),[P,A]}var Pm={touchstart:st,touchmove:Bt,touchend:J,touchcancel:I},Em="touchstart touchmove touchend touchcancel";function sn(){this.evTarget=Em,this.targetIds={},_t.apply(this,arguments)}x(sn,_t,{handler:function(m){var P=Pm[m.type],A=_m.call(this,m,P);A&&this.callback(this.manager,P,{pointers:A[0],changedPointers:A[1],pointerType:q,srcEvent:m})}});function _m(u,m){var P=ht(u.touches),A=this.targetIds;if(m&(st|Bt)&&P.length===1)return A[P[0].identifier]=!0,[P,P];var M,R,X=ht(u.changedTouches),nt=[],it=this.target;if(R=P.filter(function(pt){return G(pt.target,it)}),m===st)for(M=0;M<R.length;)A[R[M].identifier]=!0,M++;for(M=0;M<X.length;)A[X[M].identifier]&&nt.push(X[M]),m&(J|I)&&delete A[X[M].identifier],M++;if(nt.length)return[Et(R.concat(nt),"identifier",!0),nt]}var Am=2500,go=25;function Si(){_t.apply(this,arguments);var u=p(this.handler,this);this.touch=new sn(this.manager,u),this.mouse=new en(this.manager,u),this.primaryTouch=null,this.lastTouches=[]}x(Si,_t,{handler:function(m,P,A){var M=A.pointerType==q,R=A.pointerType==Lt;if(!(R&&A.sourceCapabilities&&A.sourceCapabilities.firesTouchEvents)){if(M)Dm.call(this,P,A);else if(R&&Im.call(this,A))return;this.callback(m,P,A)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function Dm(u,m){u&st?(this.primaryTouch=m.changedPointers[0].identifier,yo.call(this,m)):u&(J|I)&&yo.call(this,m)}function yo(u){var m=u.changedPointers[0];if(m.identifier===this.primaryTouch){var P={x:m.clientX,y:m.clientY};this.lastTouches.push(P);var A=this.lastTouches,M=function(){var R=A.indexOf(P);R>-1&&A.splice(R,1)};setTimeout(M,Am)}}function Im(u){for(var m=u.srcEvent.clientX,P=u.srcEvent.clientY,A=0;A<this.lastTouches.length;A++){var M=this.lastTouches[A],R=Math.abs(m-M.x),X=Math.abs(P-M.y);if(R<=go&&X<=go)return!0}return!1}var wo=xt(a.style,"touchAction"),xo=wo!==i,bo="compute",vo="auto",Ti="manipulation",Te="none",is="pan-x",rs="pan-y",nn=km();function Ci(u,m){this.manager=u,this.set(m)}Ci.prototype={set:function(u){u==bo&&(u=this.compute()),xo&&this.manager.element.style&&nn[u]&&(this.manager.element.style[wo]=u),this.actions=u.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var u=[];return b(this.manager.recognizers,function(m){g(m.options.enable,[m])&&(u=u.concat(m.getTouchAction()))}),Mm(u.join(" "))},preventDefaults:function(u){var m=u.srcEvent,P=u.offsetDirection;if(this.manager.session.prevented){m.preventDefault();return}var A=this.actions,M=V(A,Te)&&!nn[Te],R=V(A,rs)&&!nn[rs],X=V(A,is)&&!nn[is];if(M){var nt=u.pointers.length===1,it=u.distance<2,pt=u.deltaTime<250;if(nt&&it&&pt)return}if(!(X&&R)&&(M||R&&P&Ut||X&&P&Se))return this.preventSrc(m)},preventSrc:function(u){this.manager.session.prevented=!0,u.preventDefault()}};function Mm(u){if(V(u,Te))return Te;var m=V(u,is),P=V(u,rs);return m&&P?Te:m||P?m?is:rs:V(u,Ti)?Ti:vo}function km(){if(!xo)return!1;var u={},m=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(P){u[P]=m?t.CSS.supports("touch-action",P):!0}),u}var rn=1,At=2,Le=4,le=8,Wt=le,as=16,Yt=32;function Jt(u){this.options=_({},this.defaults,u||{}),this.id=ce(),this.manager=null,this.options.enable=E(this.options.enable,!0),this.state=rn,this.simultaneous={},this.requireFail=[]}Jt.prototype={defaults:{},set:function(u){return _(this.options,u),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(u){if(y(u,"recognizeWith",this))return this;var m=this.simultaneous;return u=an(u,this),m[u.id]||(m[u.id]=u,u.recognizeWith(this)),this},dropRecognizeWith:function(u){return y(u,"dropRecognizeWith",this)?this:(u=an(u,this),delete this.simultaneous[u.id],this)},requireFailure:function(u){if(y(u,"requireFailure",this))return this;var m=this.requireFail;return u=an(u,this),Q(m,u)===-1&&(m.push(u),u.requireFailure(this)),this},dropRequireFailure:function(u){if(y(u,"dropRequireFailure",this))return this;u=an(u,this);var m=Q(this.requireFail,u);return m>-1&&this.requireFail.splice(m,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(u){return!!this.simultaneous[u.id]},emit:function(u){var m=this,P=this.state;function A(M){m.manager.emit(M,u)}P<le&&A(m.options.event+So(P)),A(m.options.event),u.additionalEvent&&A(u.additionalEvent),P>=le&&A(m.options.event+So(P))},tryEmit:function(u){if(this.canEmit())return this.emit(u);this.state=Yt},canEmit:function(){for(var u=0;u<this.requireFail.length;){if(!(this.requireFail[u].state&(Yt|rn)))return!1;u++}return!0},recognize:function(u){var m=_({},u);if(!g(this.options.enable,[this,m])){this.reset(),this.state=Yt;return}this.state&(Wt|as|Yt)&&(this.state=rn),this.state=this.process(m),this.state&(At|Le|le|as)&&this.tryEmit(m)},process:function(u){},getTouchAction:function(){},reset:function(){}};function So(u){return u&as?"cancel":u&le?"end":u&Le?"move":u&At?"start":""}function To(u){return u==ns?"down":u==ss?"up":u==ts?"left":u==es?"right":""}function an(u,m){var P=m.manager;return P?P.get(u):u}function Rt(){Jt.apply(this,arguments)}x(Rt,Jt,{defaults:{pointers:1},attrTest:function(u){var m=this.options.pointers;return m===0||u.pointers.length===m},process:function(u){var m=this.state,P=u.eventType,A=m&(At|Le),M=this.attrTest(u);return A&&(P&I||!M)?m|as:A||M?P&J?m|le:m&At?m|Le:At:Yt}});function on(){Rt.apply(this,arguments),this.pX=null,this.pY=null}x(on,Rt,{defaults:{event:"pan",threshold:10,pointers:1,direction:ao},getTouchAction:function(){var u=this.options.direction,m=[];return u&Ut&&m.push(rs),u&Se&&m.push(is),m},directionTest:function(u){var m=this.options,P=!0,A=u.distance,M=u.direction,R=u.deltaX,X=u.deltaY;return M&m.direction||(m.direction&Ut?(M=R===0?Ks:R<0?ts:es,P=R!=this.pX,A=Math.abs(u.deltaX)):(M=X===0?Ks:X<0?ss:ns,P=X!=this.pY,A=Math.abs(u.deltaY))),u.direction=M,P&&A>m.threshold&&M&m.direction},attrTest:function(u){return Rt.prototype.attrTest.call(this,u)&&(this.state&At||!(this.state&At)&&this.directionTest(u))},emit:function(u){this.pX=u.deltaX,this.pY=u.deltaY;var m=To(u.direction);m&&(u.additionalEvent=this.options.event+m),this._super.emit.call(this,u)}});function Pi(){Rt.apply(this,arguments)}x(Pi,Rt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Te]},attrTest:function(u){return this._super.attrTest.call(this,u)&&(Math.abs(u.scale-1)>this.options.threshold||this.state&At)},emit:function(u){if(u.scale!==1){var m=u.scale<1?"in":"out";u.additionalEvent=this.options.event+m}this._super.emit.call(this,u)}});function Ei(){Jt.apply(this,arguments),this._timer=null,this._input=null}x(Ei,Jt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[vo]},process:function(u){var m=this.options,P=u.pointers.length===m.pointers,A=u.distance<m.threshold,M=u.deltaTime>m.time;if(this._input=u,!A||!P||u.eventType&(J|I)&&!M)this.reset();else if(u.eventType&st)this.reset(),this._timer=d(function(){this.state=Wt,this.tryEmit()},m.time,this);else if(u.eventType&J)return Wt;return Yt},reset:function(){clearTimeout(this._timer)},emit:function(u){this.state===Wt&&(u&&u.eventType&J?this.manager.emit(this.options.event+"up",u):(this._input.timeStamp=l(),this.manager.emit(this.options.event,this._input)))}});function _i(){Rt.apply(this,arguments)}x(_i,Rt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Te]},attrTest:function(u){return this._super.attrTest.call(this,u)&&(Math.abs(u.rotation)>this.options.threshold||this.state&At)}});function Ai(){Rt.apply(this,arguments)}x(Ai,Rt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Ut|Se,pointers:1},getTouchAction:function(){return on.prototype.getTouchAction.call(this)},attrTest:function(u){var m=this.options.direction,P;return m&(Ut|Se)?P=u.overallVelocity:m&Ut?P=u.overallVelocityX:m&Se&&(P=u.overallVelocityY),this._super.attrTest.call(this,u)&&m&u.offsetDirection&&u.distance>this.options.threshold&&u.maxPointers==this.options.pointers&&c(P)>this.options.velocity&&u.eventType&J},emit:function(u){var m=To(u.offsetDirection);m&&this.manager.emit(this.options.event+m,u),this.manager.emit(this.options.event,u)}});function hn(){Jt.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}x(hn,Jt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Ti]},process:function(u){var m=this.options,P=u.pointers.length===m.pointers,A=u.distance<m.threshold,M=u.deltaTime<m.time;if(this.reset(),u.eventType&st&&this.count===0)return this.failTimeout();if(A&&M&&P){if(u.eventType!=J)return this.failTimeout();var R=this.pTime?u.timeStamp-this.pTime<m.interval:!0,X=!this.pCenter||tn(this.pCenter,u.center)<m.posThreshold;this.pTime=u.timeStamp,this.pCenter=u.center,!X||!R?this.count=1:this.count+=1,this._input=u;var nt=this.count%m.taps;if(nt===0)return this.hasRequireFailures()?(this._timer=d(function(){this.state=Wt,this.tryEmit()},m.interval,this),At):Wt}return Yt},failTimeout:function(){return this._timer=d(function(){this.state=Yt},this.options.interval,this),Yt},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==Wt&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function Zt(u,m){return m=m||{},m.recognizers=E(m.recognizers,Zt.defaults.preset),new Di(u,m)}Zt.VERSION="2.0.7",Zt.defaults={domEvents:!1,touchAction:bo,enable:!0,inputTarget:null,inputClass:null,preset:[[_i,{enable:!1}],[Pi,{enable:!1},["rotate"]],[Ai,{direction:Ut}],[on,{direction:Ut},["swipe"]],[hn],[hn,{event:"doubletap",taps:2},["tap"]],[Ei]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Lm=1,Co=2;function Di(u,m){this.options=_({},Zt.defaults,m||{}),this.options.inputTarget=this.options.inputTarget||u,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=u,this.input=cm(this),this.touchAction=new Ci(this,this.options.touchAction),Po(this,!0),b(this.options.recognizers,function(P){var A=this.add(new P[0](P[1]));P[2]&&A.recognizeWith(P[2]),P[3]&&A.requireFailure(P[3])},this)}Di.prototype={set:function(u){return _(this.options,u),u.touchAction&&this.touchAction.update(),u.inputTarget&&(this.input.destroy(),this.input.target=u.inputTarget,this.input.init()),this},stop:function(u){this.session.stopped=u?Co:Lm},recognize:function(u){var m=this.session;if(!m.stopped){this.touchAction.preventDefaults(u);var P,A=this.recognizers,M=m.curRecognizer;(!M||M&&M.state&Wt)&&(M=m.curRecognizer=null);for(var R=0;R<A.length;)P=A[R],m.stopped!==Co&&(!M||P==M||P.canRecognizeWith(M))?P.recognize(u):P.reset(),!M&&P.state&(At|Le|le)&&(M=m.curRecognizer=P),R++}},get:function(u){if(u instanceof Jt)return u;for(var m=this.recognizers,P=0;P<m.length;P++)if(m[P].options.event==u)return m[P];return null},add:function(u){if(y(u,"add",this))return this;var m=this.get(u.options.event);return m&&this.remove(m),this.recognizers.push(u),u.manager=this,this.touchAction.update(),u},remove:function(u){if(y(u,"remove",this))return this;if(u=this.get(u),u){var m=this.recognizers,P=Q(m,u);P!==-1&&(m.splice(P,1),this.touchAction.update())}return this},on:function(u,m){if(u!==i&&m!==i){var P=this.handlers;return b(K(u),function(A){P[A]=P[A]||[],P[A].push(m)}),this}},off:function(u,m){if(u!==i){var P=this.handlers;return b(K(u),function(A){m?P[A]&&P[A].splice(Q(P[A],m),1):delete P[A]}),this}},emit:function(u,m){this.options.domEvents&&Rm(u,m);var P=this.handlers[u]&&this.handlers[u].slice();if(!(!P||!P.length)){m.type=u,m.preventDefault=function(){m.srcEvent.preventDefault()};for(var A=0;A<P.length;)P[A](m),A++}},destroy:function(){this.element&&Po(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function Po(u,m){var P=u.element;if(P.style){var A;b(u.options.cssProps,function(M,R){A=xt(P.style,R),m?(u.oldCssProps[A]=P.style[A],P.style[A]=M):P.style[A]=u.oldCssProps[A]||""}),m||(u.oldCssProps={})}}function Rm(u,m){var P=e.createEvent("Event");P.initEvent(u,!0,!0),P.gesture=m,m.target.dispatchEvent(P)}_(Zt,{INPUT_START:st,INPUT_MOVE:Bt,INPUT_END:J,INPUT_CANCEL:I,STATE_POSSIBLE:rn,STATE_BEGAN:At,STATE_CHANGED:Le,STATE_ENDED:le,STATE_RECOGNIZED:Wt,STATE_CANCELLED:as,STATE_FAILED:Yt,DIRECTION_NONE:Ks,DIRECTION_LEFT:ts,DIRECTION_RIGHT:es,DIRECTION_UP:ss,DIRECTION_DOWN:ns,DIRECTION_HORIZONTAL:Ut,DIRECTION_VERTICAL:Se,DIRECTION_ALL:ao,Manager:Di,Input:_t,TouchAction:Ci,TouchInput:sn,MouseInput:en,PointerEventInput:vi,TouchMouseInput:Si,SingleTouchInput:po,Recognizer:Jt,AttrRecognizer:Rt,Tap:hn,Pan:on,Swipe:Ai,Pinch:Pi,Rotate:_i,Press:Ei,on:C,off:F,each:b,merge:v,extend:S,assign:_,inherit:x,bindFn:p,prefixed:xt});var Om=typeof t<"u"?t:typeof self<"u"?self:{};Om.Hammer=Zt,typeof i=="function"&&i.amd?i(function(){return Zt}):n.exports?n.exports=Zt:t[s]=Zt})(window,document,"Hammer")})(ka);var nf=ka.exports;const rf=$i(nf);function af(){return{screenWidth:window.screen.width,screenHeight:window.screen.height,screenX:window.screenX,screenY:window.screenY}}function Je(){const n=document.documentElement;return{clientWidth:n.clientWidth,clientHeight:n.clientHeight,clientTop:n.clientTop,clientLeft:n.clientLeft,scrollWidth:n.scrollWidth,scrollHeight:n.scrollHeight,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft,offsetWidth:n.offsetWidth,offsetHeight:n.offsetHeight,offsetTop:n.offsetTop,offsetLeft:n.offsetLeft,offsetParent:n.offsetParent}}function of(){const n=document.body;return{clientWidth:n.clientWidth,clientHeight:n.clientHeight,clientTop:n.clientTop,clientLeft:n.clientLeft,scrollWidth:n.scrollWidth,scrollHeight:n.scrollHeight,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft,offsetWidth:n.offsetWidth,offsetHeight:n.offsetHeight,offsetTop:n.offsetTop,offsetLeft:n.offsetLeft,offsetParent:n.offsetParent}}function hf(){return typeof window.innerWidth=="number"?{width:window.innerWidth,height:window.innerHeight}:document.compatMode==="CSS1Compat"?{width:document.documentElement.clientWidth,height:document.documentElement.clientHeight}:{width:document.body.clientWidth,height:document.body.clientHeight}}function cf(){const{scrollWidth:n,scrollHeight:t}=Je();return{width:n,height:t}}function ni(n){const{top:t,left:e,width:s,height:i}=n.getBoundingClientRect(),{scrollLeft:r,scrollTop:a}=Je();return{x:e+r,y:t+a,width:s,height:i}}function lf(n){let t=n,e=0,s=0;for(;t!==null;)e+=t.offsetLeft,s+=t.offsetTop,t.offsetParent instanceof HTMLElement?t=t.offsetParent:t=null;return{x:e,y:s,width:n.offsetWidth,height:n.offsetHeight}}function La(n){return n.getBoundingClientRect()}function uf(n){const t=n.getBoundingClientRect();return{x:n.offsetLeft,y:n.offsetTop,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}function ff(){const{clientHeight:n,scrollTop:t,scrollHeight:e}=Je(),s=e-n;return s<=0?0:t/s*100}function df(n){if("center"in n){const t=n.center,e=La(n.target);return{x:t.x-e.x,y:t.y-e.y}}return{x:n.clientX,y:n.clientY}}function ii(n){if("center"in n)return n.center;if(typeof n.pageX=="number"&&typeof n.pageY=="number")return{x:n.pageX,y:n.pageY};const{scrollLeft:t,scrollTop:e}=Je();return{x:n.clientX+t,y:n.clientY+e}}function kt(n,t){const e={x:0,y:0};if(t){const s=ii(n),i=ni(t);e.x=s.x-i.x,e.y=s.y-i.y}else{let s=0,i=0;if("currentTarget"in n&&n.currentTarget&&n.target&&n.currentTarget!=n.target){const r=n.currentTarget.getBoundingClientRect(),a=n.target.getBoundingClientRect();s=a.left-r.left,i=a.top-r.top}if("offsetX"in n)e.x=n.offsetX+s,e.y=n.offsetY+i;else{const r=ii(n),a=ni(n.target);e.x=r.x-a.x+s,e.y=r.y-a.y+i}}return e}class mf extends ls{container;width;height;mousePoint={x:0,y:0,dx:0,dy:0,dStartX:0,dStartY:0};hammer;removes=[];constructor(t=document.documentElement,e=!0,s){super(),this.container=t,this.width=t.offsetWidth,this.height=t.offsetHeight,this.hammer=new rf(this.container),e&&this.start(s)}emitDebounce=Jo((t,...e)=>super.emit(t,...e),50);emit(t,...e){switch(t){case"panLeft":case"panRight":this.emitDebounce(t,...e);break;default:super.emit(t,...e);break}return this}start(t){this.registerMouseEventListeners(),this.registerTransitionEventListeners(),this.registerAnimationEventListeners(),this.registerResizeObserver(),t&&t.forEach(e=>{this.addRemoves(e())}),this.on("pointerMove",e=>{this.setMousePoint(kt(e,this.container))})}destroy(){this.removes.forEach(t=>t()),this.removes=[],this.removeAllListeners()}restart(){this.destroy(),this.start()}addRemoves(t){this.removes.push(t)}registerMouseEventListeners(){const t=I=>{this.emit("mouseDown",I)},e=I=>{this.emit("mouseUp",I)},s=I=>{this.emit("mouseMove",I)},i=I=>{this.emit("mouseOver",I)},r=I=>{this.emit("mouseOut",I)},a=I=>{this.emit("mouseEnter",I)},o=I=>{this.emit("mouseLeave",I)},h=I=>{this.emit("mouseClick",I)},c=I=>{this.emit("mouseDoubleClick",I)},l=I=>{this.emit("mouseWheel",I)},d=I=>{this.emit("mouseContextMenu",I)},y=I=>{this.emit("touchStart",I)},b=I=>{this.emit("touchEnd",I)},w=I=>{this.emit("touchCancel",I)},_=I=>{this.emit("touchMove",I)},S=I=>{this.emit("pointerDown",I)},v=I=>{this.emit("pointerUp",I)},x=I=>{this.emit("pointerCancel",I)},p=I=>{this.emit("pointerMove",I)},g=I=>{this.emit("pan",I)},E=I=>{this.emit("panStart",I)},C=I=>{this.emit("panMove",I)},F=I=>{this.emit("panEnd",I)},G=I=>{this.emit("panCancel",I)},V=I=>{this.emit("panLeft",I)},K=I=>{this.emit("panRight",I)},Q=I=>{this.emit("panUp",I)},ht=I=>{this.emit("panDown",I)},Et=I=>{this.emit("pinch",I)},xt=I=>{this.emit("press",I)},Me=I=>{this.emit("rotate",I)},ce=I=>{this.emit("swipe",I)},ve=I=>{this.emit("swipeLeft",I)},ke=I=>{this.emit("swipeRight",I)},O=I=>{this.emit("swipeUp",I)},k=I=>{this.emit("swipeDown",I)},Y=I=>{this.emit("tap",I)},q=I=>{!I.target||this.container==I.target||this.container.contains(I.target)||this.emit("tapOutSide",I)},mt=I=>{this.emit("inputChange",I,this.container.files)},Lt=I=>{this.emit("dragstart",I)},Js=I=>{I.dataTransfer&&(I.dataTransfer.dropEffect="copy"),this.emit("dragover",I)},Zs=I=>{this.emit("dragenter",I)},st=I=>{this.emit("dragend",I)},Bt=I=>{I.dataTransfer,this.emit("drop",I,I.dataTransfer?.files)};this.container.addEventListener("mousedown",t,!1),this.container.addEventListener("mouseup",e,!1),this.container.addEventListener("mousemove",s,!1),this.container.addEventListener("mouseover",i,!1),this.container.addEventListener("mouseout",r,!1),this.container.addEventListener("mouseenter",a,!1),this.container.addEventListener("mouseleave",o,!1),this.container.addEventListener("click",h,!1),this.container.addEventListener("dblclick",c,!1),this.container.addEventListener("wheel",l,!1),this.container.addEventListener("contextmenu",d,!1),this.container.addEventListener("touchstart",y,!1),this.container.addEventListener("touchend",b,!1),this.container.addEventListener("touchcancel",w,!1),this.container.addEventListener("touchmove",_,!1),this.container.addEventListener("pointerdown",S,!1),this.container.addEventListener("pointerup",v,!1),this.container.addEventListener("pointercancel",x,!1),this.container.addEventListener("pointermove",p,!1),this.hammer.on("pan",g),this.hammer.on("panstart",E),this.hammer.on("panmove",C),this.hammer.on("panend",F),this.hammer.on("pancancel",G),this.hammer.on("panleft",V),this.hammer.on("panright",K),this.hammer.on("panup",Q),this.hammer.on("pandown",ht),this.hammer.on("pinch",Et),this.hammer.on("press",xt),this.hammer.on("rotate",Me),this.hammer.on("swipe",ce),this.hammer.on("swipeleft",ve),this.hammer.on("swiperight",ke),this.hammer.on("swipeup",O),this.hammer.on("swipedown",k),this.hammer.on("tap",Y),document.addEventListener("pointerdown",q,!1),this.container instanceof HTMLInputElement&&this.container.addEventListener("change",mt,!1),this.container.addEventListener("dragstart",Lt,!1),this.container.addEventListener("dragover",Js,!1),this.container.addEventListener("dragenter",Zs,!1),this.container.addEventListener("dragend",st,!1),this.container.addEventListener("drop",Bt,!1);const J=()=>{this.container.removeEventListener("mousedown",t,!1),this.container.removeEventListener("mouseup",e,!1),this.container.removeEventListener("mousemove",s,!1),this.container.removeEventListener("mouseover",i,!1),this.container.removeEventListener("mouseout",r,!1),this.container.removeEventListener("mouseenter",a,!1),this.container.removeEventListener("mouseleave",o,!1),this.container.removeEventListener("click",h,!1),this.container.removeEventListener("dblclick",c,!1),this.container.removeEventListener("wheel",l,!1),this.container.removeEventListener("contextmenu",d,!1),this.container.removeEventListener("touchstart",y,!1),this.container.removeEventListener("touchend",b,!1),this.container.removeEventListener("touchcancel",w,!1),this.container.removeEventListener("touchmove",_,!1),this.container.removeEventListener("pointerdown",S,!1),this.container.removeEventListener("pointerup",v,!1),this.container.removeEventListener("pointercancel",x),this.container.removeEventListener("pointermove",p,!1),this.hammer.off("pan",g),this.hammer.off("panstart",E),this.hammer.off("panmove",C),this.hammer.off("panend",F),this.hammer.off("pancancel",G),this.hammer.off("panleft",V),this.hammer.off("panright",K),this.hammer.off("panup",Q),this.hammer.off("pandown",ht),this.hammer.off("pinch",Et),this.hammer.off("press",xt),this.hammer.off("rotate",Me),this.hammer.off("swipe",ce),this.hammer.off("swipeleft",ve),this.hammer.off("swiperight",ke),this.hammer.off("swipeup",O),this.hammer.off("swipedown",k),this.hammer.off("tap",Y),document.removeEventListener("pointerdown",q,!1),document.removeEventListener("touchstart",q,!1),document.removeEventListener("mousedown",q,!1),this.container instanceof HTMLInputElement&&this.container.removeEventListener("change",mt,!1),this.container.removeEventListener("dragstart",Lt,!1),this.container.removeEventListener("dragover",Js,!1),this.container.removeEventListener("dragenter",Zs,!1),this.container.removeEventListener("dragend",st,!1),this.container.removeEventListener("drop",Bt,!1)};return this.addRemoves(J),J}registerTransitionEventListeners(){const t=i=>{this.emit("transitionstart",i)},e=i=>{this.emit("transitionend",i)};this.container.addEventListener("transitionstart",t,!1),this.container.addEventListener("transitionend",e,!1);const s=()=>{this.container.removeEventListener("transitionstart",t,!1),this.container.removeEventListener("transitionend",e,!1)};return this.addRemoves(s),s}registerAnimationEventListeners(){const t=i=>{this.emit("animationstart",i)},e=i=>{this.emit("animationend",i)};this.container.addEventListener("animationstart",t,!1),this.container.addEventListener("animationend",e,!1);const s=()=>{this.container.removeEventListener("animationstart",t,!1),this.container.removeEventListener("animationend",e,!1)};return this.addRemoves(s),s}registerResizeObserver(){const{on:t,destroy:e}=ba(this.container),s=t((r,a)=>{this.width=r,this.height=a,this.emit("resize",r,a)}),i=()=>{s(),e()};return this.addRemoves(i),i}registerPullDownRefresh(t){const e=t?.distance||50;return this.captureDrag({move:(s,i)=>{i.dStartY>0&&i.dStartY<e&&this.emit("pullDowning",i.dStartY)},end:(s,i)=>{i.dStartY>=e&&this.emit("pullDown")}})}registerPullUpLoading(t){const e=t?.distance||50;return this.captureDrag({move:(s,i)=>{i.dStartY>0&&i.dStartY<e&&this.emit("pullUping",i.dStartY)},end:(s,i)=>{i.dStartY>=e&&this.emit("pullUp")}})}setMousePoint(t){this.mousePoint.x=t.x,this.mousePoint.y=t.y,this.mousePoint.dx=typeof t.dx=="number"?t.dx:0,this.mousePoint.dy=typeof t.dy=="number"?t.dy:0,this.mousePoint.dStartX=typeof t.dStartX=="number"?t.dStartX:0,this.mousePoint.dStartY=typeof t.dStartY=="number"?t.dStartY:0}captureDrag(t){return this.captureDragUsePointer(t)}captureDragUsePointer(t){let e,s;const i=h=>{h.preventDefault(),h.stopPropagation(),this.on("pointerMove",a),this.on("pointerUp",r),this.on("pointerCancel",r),s=kt(h,this.container);const c={...s};e=c,this.setMousePoint(c),t?.start?.(h,c)},r=h=>{h.preventDefault(),h.stopPropagation(),this.off("pointerMove",a),this.off("pointerUp",r),this.off("pointerCancel",r),s=kt(h,this.container);const c={...s,dStartX:e?s.x-e.x:0,dStartY:e?s.y-e.y:0};this.setMousePoint(c),t?.end?.(h,c),e=null},a=h=>{h.preventDefault(),h.stopPropagation();const c={...s};s=kt(h,this.container);const l={...s,dx:s.x-(c.x||0),dy:s.y-(c.y||0),dStartX:e?s.x-e.x:0,dStartY:e?s.y-e.y:0};this.setMousePoint(l),t?.move?.(h,l)};this.on("pointerDown",i);const o=()=>{this.off("pointerDown",i)};return this.addRemoves(o),o}captureDragUseMouse(t){let e,s;const i=h=>{h.preventDefault(),h.stopPropagation(),document.addEventListener("mousemove",a,!1),document.addEventListener("mouseup",r,!1),s=kt(h,this.container);const c={...s};e=c,this.setMousePoint(c),t?.start?.(h,c)},r=h=>{h.preventDefault(),h.stopPropagation(),document.removeEventListener("mousemove",a,!1),document.removeEventListener("mouseup",r,!1),s=kt(h,this.container);const c={...s,dStartX:e?s.x-e.x:0,dStartY:e?s.y-e.y:0};this.setMousePoint(c),t?.end?.(h,c),e=null},a=h=>{h.preventDefault(),h.stopPropagation();const c={...s};s=kt(h,this.container);const l={...s,dx:s.x-(c.x||0),dy:s.y-(c.y||0),dStartX:e?s.x-e.x:0,dStartY:e?s.y-e.y:0};this.setMousePoint(l),t?.move?.(h,l)};this.on("mouseDown",i);const o=()=>{this.off("mouseDown",i)};return this.addRemoves(o),o}captureDragUseTouch(t){let e,s;const i=h=>{h.preventDefault(),h.stopPropagation(),this.on("touchMove",a),this.on("touchEnd",r),this.on("touchCancel",r);const c=h.changedTouches[0];s=kt(c,this.container);const l={...s};e=l,this.setMousePoint(l),t?.start?.(c,l)},r=h=>{h.preventDefault(),h.stopPropagation(),this.off("touchMove",a),this.off("touchEnd",r),this.off("touchCancel",r);const c=h.changedTouches[0];s=kt(c,this.container);const l={...s,dStartX:e?s.x-e.x:0,dStartY:e?s.y-e.y:0};this.setMousePoint(l),t?.end?.(c,l),e=null},a=h=>{h.preventDefault(),h.stopPropagation();const c=h.changedTouches[0],l={...s};s=kt(c,this.container);const d={...s,dx:s.x-(l.x||0),dy:s.y-(l.y||0),dStartX:e?s.x-e.x:0,dStartY:e?s.y-e.y:0};this.setMousePoint(d),t?.move?.(c,d)};this.on("touchStart",i);const o=()=>{this.off("touchStart",i)};return this.addRemoves(o),o}}class Ze{video;constructor(t){this.video=t}setSrcObject(t){this.video.addEventListener("loadedmetadata",e=>{e.target}),this.video.srcObject=t}captureWebCamera(){navigator.mediaDevices.getUserMedia({video:!0}).then(t=>{this.setSrcObject(t)})}static async videoMediaChangeSupport(){return new Promise(t=>{const e=document.createElement("iframe"),s=document.createElement("video"),i=document.createElement("source"),r=new MediaSource;r.addEventListener("sourceopen",()=>t(!0)),i.src=URL.createObjectURL(r),i.media="(min-width:10px)",s.append(i),e.width="5",e.style.cssText="position: absolute; visibility: hidden;",document.documentElement.append(e),e.contentDocument?.body.append(s),setTimeout(()=>{e.width="15"}),setTimeout(()=>{e.remove(),t(!1)},1e3)})}static tryAutoPlayOrAutoPlayAfterClick(t){return new Promise(e=>{t.play().then(()=>{t.autoplay=!0,e(!0)}).catch(()=>{Ze.setAutoPlayWhenClick(t),e(!1)})})}static setAutoPlayWhenClick(t){function e(){t.autoplay=!0,t.play(),document.removeEventListener("click",e),document.removeEventListener("touchend",e)}document.addEventListener("click",e),document.addEventListener("touchend",e)}}class Ra extends ls{source;raw="";mode="text";tagname="";nodename="";textchunk="";entity="";quote="";attrs={};constructor(t){super(),this.source=t}parse(){const t=Eo(this.source);if(t===0){this.emit("finish");return}let e,s,i=Ri(this.source,0);for(let r=1;r<t;r++)e=s,s=i,i=Ri(this.source,r),this.raw+=s,s&&this.step(s,i,e);i&&this.step(i,void 0,s),this.emit("finish")}step(t,e,s){t==`
|
|
36
|
+
`;return function(){var M=new Error("get-stack-trace"),R=M&&M.stack?M.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",X=t.console&&(t.console.warn||t.console.log);return X&&X.call(t.console,A,R),u.apply(this,arguments)}}var _;typeof Object.assign!="function"?_=function(m){if(m===i||m===null)throw new TypeError("Cannot convert undefined or null to object");for(var P=Object(m),A=1;A<arguments.length;A++){var M=arguments[A];if(M!==i&&M!==null)for(var R in M)M.hasOwnProperty(R)&&(P[R]=M[R])}return P}:_=Object.assign;var S=w(function(m,P,A){for(var M=Object.keys(P),R=0;R<M.length;)(!A||A&&m[M[R]]===i)&&(m[M[R]]=P[M[R]]),R++;return m},"extend","Use `assign`."),v=w(function(m,P){return S(m,P,!0)},"merge","Use `assign`.");function x(u,m,P){var A=m.prototype,M;M=u.prototype=Object.create(A),M.constructor=u,M._super=A,P&&_(M,P)}function p(u,m){return function(){return u.apply(m,arguments)}}function g(u,m){return typeof u==o?u.apply(m&&m[0]||i,m):u}function E(u,m){return u===i?m:u}function C(u,m,P){b(K(m),function(A){u.addEventListener(A,P,!1)})}function F(u,m,P){b(K(m),function(A){u.removeEventListener(A,P,!1)})}function G(u,m){for(;u;){if(u==m)return!0;u=u.parentNode}return!1}function V(u,m){return u.indexOf(m)>-1}function K(u){return u.trim().split(/\s+/g)}function Q(u,m,P){if(u.indexOf&&!P)return u.indexOf(m);for(var A=0;A<u.length;){if(P&&u[A][P]==m||!P&&u[A]===m)return A;A++}return-1}function ht(u){return Array.prototype.slice.call(u,0)}function Et(u,m,P){for(var A=[],M=[],R=0;R<u.length;){var X=m?u[R][m]:u[R];Q(M,X)<0&&A.push(u[R]),M[R]=X,R++}return P&&(m?A=A.sort(function(it,pt){return it[m]>pt[m]}):A=A.sort()),A}function xt(u,m){for(var P,A,M=m[0].toUpperCase()+m.slice(1),R=0;R<r.length;){if(P=r[R],A=P?P+M:m,A in u)return A;R++}return i}var Me=1;function ce(){return Me++}function ve(u){var m=u.ownerDocument||u;return m.defaultView||m.parentWindow||t}var ke=/mobile|tablet|ip(ad|hone|od)|android/i,O="ontouchstart"in t,k=xt(t,"PointerEvent")!==i,Y=O&&ke.test(navigator.userAgent),q="touch",mt="pen",Lt="mouse",Js="kinect",Zs=25,st=1,Bt=2,J=4,I=8,Ks=1,ts=2,es=4,ss=8,ns=16,Ut=ts|es,Se=ss|ns,ao=Ut|Se,oo=["x","y"],Qs=["clientX","clientY"];function _t(u,m){var P=this;this.manager=u,this.callback=m,this.element=u.element,this.target=u.options.inputTarget,this.domHandler=function(A){g(u.options.enable,[u])&&P.handler(A)},this.init()}_t.prototype={handler:function(){},init:function(){this.evEl&&C(this.element,this.evEl,this.domHandler),this.evTarget&&C(this.target,this.evTarget,this.domHandler),this.evWin&&C(ve(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&F(this.element,this.evEl,this.domHandler),this.evTarget&&F(this.target,this.evTarget,this.domHandler),this.evWin&&F(ve(this.element),this.evWin,this.domHandler)}};function cm(u){var m,P=u.options.inputClass;return P?m=P:k?m=vi:Y?m=sn:O?m=Si:m=en,new m(u,lm)}function lm(u,m,P){var A=P.pointers.length,M=P.changedPointers.length,R=m&st&&A-M===0,X=m&(J|I)&&A-M===0;P.isFirst=!!R,P.isFinal=!!X,R&&(u.session={}),P.eventType=m,um(u,P),u.emit("hammer.input",P),u.recognize(P),u.session.prevInput=P}function um(u,m){var P=u.session,A=m.pointers,M=A.length;P.firstInput||(P.firstInput=ho(m)),M>1&&!P.firstMultiple?P.firstMultiple=ho(m):M===1&&(P.firstMultiple=!1);var R=P.firstInput,X=P.firstMultiple,nt=X?X.center:R.center,it=m.center=co(A);m.timeStamp=l(),m.deltaTime=m.timeStamp-R.timeStamp,m.angle=bi(nt,it),m.distance=tn(nt,it),fm(P,m),m.offsetDirection=uo(m.deltaX,m.deltaY);var pt=lo(m.deltaTime,m.deltaX,m.deltaY);m.overallVelocityX=pt.x,m.overallVelocityY=pt.y,m.overallVelocity=c(pt.x)>c(pt.y)?pt.x:pt.y,m.scale=X?pm(X.pointers,A):1,m.rotation=X?mm(X.pointers,A):0,m.maxPointers=P.prevInput?m.pointers.length>P.prevInput.maxPointers?m.pointers.length:P.prevInput.maxPointers:m.pointers.length,dm(P,m);var Xt=u.element;G(m.srcEvent.target,Xt)&&(Xt=m.srcEvent.target),m.target=Xt}function fm(u,m){var P=m.center,A=u.offsetDelta||{},M=u.prevDelta||{},R=u.prevInput||{};(m.eventType===st||R.eventType===J)&&(M=u.prevDelta={x:R.deltaX||0,y:R.deltaY||0},A=u.offsetDelta={x:P.x,y:P.y}),m.deltaX=M.x+(P.x-A.x),m.deltaY=M.y+(P.y-A.y)}function dm(u,m){var P=u.lastInterval||m,A=m.timeStamp-P.timeStamp,M,R,X,nt;if(m.eventType!=I&&(A>Zs||P.velocity===i)){var it=m.deltaX-P.deltaX,pt=m.deltaY-P.deltaY,Xt=lo(A,it,pt);R=Xt.x,X=Xt.y,M=c(Xt.x)>c(Xt.y)?Xt.x:Xt.y,nt=uo(it,pt),u.lastInterval=m}else M=P.velocity,R=P.velocityX,X=P.velocityY,nt=P.direction;m.velocity=M,m.velocityX=R,m.velocityY=X,m.direction=nt}function ho(u){for(var m=[],P=0;P<u.pointers.length;)m[P]={clientX:h(u.pointers[P].clientX),clientY:h(u.pointers[P].clientY)},P++;return{timeStamp:l(),pointers:m,center:co(m),deltaX:u.deltaX,deltaY:u.deltaY}}function co(u){var m=u.length;if(m===1)return{x:h(u[0].clientX),y:h(u[0].clientY)};for(var P=0,A=0,M=0;M<m;)P+=u[M].clientX,A+=u[M].clientY,M++;return{x:h(P/m),y:h(A/m)}}function lo(u,m,P){return{x:m/u||0,y:P/u||0}}function uo(u,m){return u===m?Ks:c(u)>=c(m)?u<0?ts:es:m<0?ss:ns}function tn(u,m,P){P||(P=oo);var A=m[P[0]]-u[P[0]],M=m[P[1]]-u[P[1]];return Math.sqrt(A*A+M*M)}function bi(u,m,P){P||(P=oo);var A=m[P[0]]-u[P[0]],M=m[P[1]]-u[P[1]];return Math.atan2(M,A)*180/Math.PI}function mm(u,m){return bi(m[1],m[0],Qs)+bi(u[1],u[0],Qs)}function pm(u,m){return tn(m[0],m[1],Qs)/tn(u[0],u[1],Qs)}var gm={mousedown:st,mousemove:Bt,mouseup:J},ym="mousedown",wm="mousemove mouseup";function en(){this.evEl=ym,this.evWin=wm,this.pressed=!1,_t.apply(this,arguments)}x(en,_t,{handler:function(m){var P=gm[m.type];P&st&&m.button===0&&(this.pressed=!0),P&Bt&&m.which!==1&&(P=J),this.pressed&&(P&J&&(this.pressed=!1),this.callback(this.manager,P,{pointers:[m],changedPointers:[m],pointerType:Lt,srcEvent:m}))}});var xm={pointerdown:st,pointermove:Bt,pointerup:J,pointercancel:I,pointerout:I},bm={2:q,3:mt,4:Lt,5:Js},fo="pointerdown",mo="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(fo="MSPointerDown",mo="MSPointerMove MSPointerUp MSPointerCancel");function vi(){this.evEl=fo,this.evWin=mo,_t.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}x(vi,_t,{handler:function(m){var P=this.store,A=!1,M=m.type.toLowerCase().replace("ms",""),R=xm[M],X=bm[m.pointerType]||m.pointerType,nt=X==q,it=Q(P,m.pointerId,"pointerId");R&st&&(m.button===0||nt)?it<0&&(P.push(m),it=P.length-1):R&(J|I)&&(A=!0),!(it<0)&&(P[it]=m,this.callback(this.manager,R,{pointers:P,changedPointers:[m],pointerType:X,srcEvent:m}),A&&P.splice(it,1))}});var vm={touchstart:st,touchmove:Bt,touchend:J,touchcancel:I},Sm="touchstart",Tm="touchstart touchmove touchend touchcancel";function po(){this.evTarget=Sm,this.evWin=Tm,this.started=!1,_t.apply(this,arguments)}x(po,_t,{handler:function(m){var P=vm[m.type];if(P===st&&(this.started=!0),!!this.started){var A=Cm.call(this,m,P);P&(J|I)&&A[0].length-A[1].length===0&&(this.started=!1),this.callback(this.manager,P,{pointers:A[0],changedPointers:A[1],pointerType:q,srcEvent:m})}}});function Cm(u,m){var P=ht(u.touches),A=ht(u.changedTouches);return m&(J|I)&&(P=Et(P.concat(A),"identifier",!0)),[P,A]}var Pm={touchstart:st,touchmove:Bt,touchend:J,touchcancel:I},Em="touchstart touchmove touchend touchcancel";function sn(){this.evTarget=Em,this.targetIds={},_t.apply(this,arguments)}x(sn,_t,{handler:function(m){var P=Pm[m.type],A=_m.call(this,m,P);A&&this.callback(this.manager,P,{pointers:A[0],changedPointers:A[1],pointerType:q,srcEvent:m})}});function _m(u,m){var P=ht(u.touches),A=this.targetIds;if(m&(st|Bt)&&P.length===1)return A[P[0].identifier]=!0,[P,P];var M,R,X=ht(u.changedTouches),nt=[],it=this.target;if(R=P.filter(function(pt){return G(pt.target,it)}),m===st)for(M=0;M<R.length;)A[R[M].identifier]=!0,M++;for(M=0;M<X.length;)A[X[M].identifier]&&nt.push(X[M]),m&(J|I)&&delete A[X[M].identifier],M++;if(nt.length)return[Et(R.concat(nt),"identifier",!0),nt]}var Am=2500,go=25;function Si(){_t.apply(this,arguments);var u=p(this.handler,this);this.touch=new sn(this.manager,u),this.mouse=new en(this.manager,u),this.primaryTouch=null,this.lastTouches=[]}x(Si,_t,{handler:function(m,P,A){var M=A.pointerType==q,R=A.pointerType==Lt;if(!(R&&A.sourceCapabilities&&A.sourceCapabilities.firesTouchEvents)){if(M)Dm.call(this,P,A);else if(R&&Im.call(this,A))return;this.callback(m,P,A)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function Dm(u,m){u&st?(this.primaryTouch=m.changedPointers[0].identifier,yo.call(this,m)):u&(J|I)&&yo.call(this,m)}function yo(u){var m=u.changedPointers[0];if(m.identifier===this.primaryTouch){var P={x:m.clientX,y:m.clientY};this.lastTouches.push(P);var A=this.lastTouches,M=function(){var R=A.indexOf(P);R>-1&&A.splice(R,1)};setTimeout(M,Am)}}function Im(u){for(var m=u.srcEvent.clientX,P=u.srcEvent.clientY,A=0;A<this.lastTouches.length;A++){var M=this.lastTouches[A],R=Math.abs(m-M.x),X=Math.abs(P-M.y);if(R<=go&&X<=go)return!0}return!1}var wo=xt(a.style,"touchAction"),xo=wo!==i,bo="compute",vo="auto",Ti="manipulation",Te="none",is="pan-x",rs="pan-y",nn=km();function Ci(u,m){this.manager=u,this.set(m)}Ci.prototype={set:function(u){u==bo&&(u=this.compute()),xo&&this.manager.element.style&&nn[u]&&(this.manager.element.style[wo]=u),this.actions=u.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var u=[];return b(this.manager.recognizers,function(m){g(m.options.enable,[m])&&(u=u.concat(m.getTouchAction()))}),Mm(u.join(" "))},preventDefaults:function(u){var m=u.srcEvent,P=u.offsetDirection;if(this.manager.session.prevented){m.preventDefault();return}var A=this.actions,M=V(A,Te)&&!nn[Te],R=V(A,rs)&&!nn[rs],X=V(A,is)&&!nn[is];if(M){var nt=u.pointers.length===1,it=u.distance<2,pt=u.deltaTime<250;if(nt&&it&&pt)return}if(!(X&&R)&&(M||R&&P&Ut||X&&P&Se))return this.preventSrc(m)},preventSrc:function(u){this.manager.session.prevented=!0,u.preventDefault()}};function Mm(u){if(V(u,Te))return Te;var m=V(u,is),P=V(u,rs);return m&&P?Te:m||P?m?is:rs:V(u,Ti)?Ti:vo}function km(){if(!xo)return!1;var u={},m=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(P){u[P]=m?t.CSS.supports("touch-action",P):!0}),u}var rn=1,At=2,Le=4,le=8,Wt=le,as=16,Yt=32;function Jt(u){this.options=_({},this.defaults,u||{}),this.id=ce(),this.manager=null,this.options.enable=E(this.options.enable,!0),this.state=rn,this.simultaneous={},this.requireFail=[]}Jt.prototype={defaults:{},set:function(u){return _(this.options,u),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(u){if(y(u,"recognizeWith",this))return this;var m=this.simultaneous;return u=an(u,this),m[u.id]||(m[u.id]=u,u.recognizeWith(this)),this},dropRecognizeWith:function(u){return y(u,"dropRecognizeWith",this)?this:(u=an(u,this),delete this.simultaneous[u.id],this)},requireFailure:function(u){if(y(u,"requireFailure",this))return this;var m=this.requireFail;return u=an(u,this),Q(m,u)===-1&&(m.push(u),u.requireFailure(this)),this},dropRequireFailure:function(u){if(y(u,"dropRequireFailure",this))return this;u=an(u,this);var m=Q(this.requireFail,u);return m>-1&&this.requireFail.splice(m,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(u){return!!this.simultaneous[u.id]},emit:function(u){var m=this,P=this.state;function A(M){m.manager.emit(M,u)}P<le&&A(m.options.event+So(P)),A(m.options.event),u.additionalEvent&&A(u.additionalEvent),P>=le&&A(m.options.event+So(P))},tryEmit:function(u){if(this.canEmit())return this.emit(u);this.state=Yt},canEmit:function(){for(var u=0;u<this.requireFail.length;){if(!(this.requireFail[u].state&(Yt|rn)))return!1;u++}return!0},recognize:function(u){var m=_({},u);if(!g(this.options.enable,[this,m])){this.reset(),this.state=Yt;return}this.state&(Wt|as|Yt)&&(this.state=rn),this.state=this.process(m),this.state&(At|Le|le|as)&&this.tryEmit(m)},process:function(u){},getTouchAction:function(){},reset:function(){}};function So(u){return u&as?"cancel":u&le?"end":u&Le?"move":u&At?"start":""}function To(u){return u==ns?"down":u==ss?"up":u==ts?"left":u==es?"right":""}function an(u,m){var P=m.manager;return P?P.get(u):u}function Rt(){Jt.apply(this,arguments)}x(Rt,Jt,{defaults:{pointers:1},attrTest:function(u){var m=this.options.pointers;return m===0||u.pointers.length===m},process:function(u){var m=this.state,P=u.eventType,A=m&(At|Le),M=this.attrTest(u);return A&&(P&I||!M)?m|as:A||M?P&J?m|le:m&At?m|Le:At:Yt}});function on(){Rt.apply(this,arguments),this.pX=null,this.pY=null}x(on,Rt,{defaults:{event:"pan",threshold:10,pointers:1,direction:ao},getTouchAction:function(){var u=this.options.direction,m=[];return u&Ut&&m.push(rs),u&Se&&m.push(is),m},directionTest:function(u){var m=this.options,P=!0,A=u.distance,M=u.direction,R=u.deltaX,X=u.deltaY;return M&m.direction||(m.direction&Ut?(M=R===0?Ks:R<0?ts:es,P=R!=this.pX,A=Math.abs(u.deltaX)):(M=X===0?Ks:X<0?ss:ns,P=X!=this.pY,A=Math.abs(u.deltaY))),u.direction=M,P&&A>m.threshold&&M&m.direction},attrTest:function(u){return Rt.prototype.attrTest.call(this,u)&&(this.state&At||!(this.state&At)&&this.directionTest(u))},emit:function(u){this.pX=u.deltaX,this.pY=u.deltaY;var m=To(u.direction);m&&(u.additionalEvent=this.options.event+m),this._super.emit.call(this,u)}});function Pi(){Rt.apply(this,arguments)}x(Pi,Rt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Te]},attrTest:function(u){return this._super.attrTest.call(this,u)&&(Math.abs(u.scale-1)>this.options.threshold||this.state&At)},emit:function(u){if(u.scale!==1){var m=u.scale<1?"in":"out";u.additionalEvent=this.options.event+m}this._super.emit.call(this,u)}});function Ei(){Jt.apply(this,arguments),this._timer=null,this._input=null}x(Ei,Jt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[vo]},process:function(u){var m=this.options,P=u.pointers.length===m.pointers,A=u.distance<m.threshold,M=u.deltaTime>m.time;if(this._input=u,!A||!P||u.eventType&(J|I)&&!M)this.reset();else if(u.eventType&st)this.reset(),this._timer=d(function(){this.state=Wt,this.tryEmit()},m.time,this);else if(u.eventType&J)return Wt;return Yt},reset:function(){clearTimeout(this._timer)},emit:function(u){this.state===Wt&&(u&&u.eventType&J?this.manager.emit(this.options.event+"up",u):(this._input.timeStamp=l(),this.manager.emit(this.options.event,this._input)))}});function _i(){Rt.apply(this,arguments)}x(_i,Rt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Te]},attrTest:function(u){return this._super.attrTest.call(this,u)&&(Math.abs(u.rotation)>this.options.threshold||this.state&At)}});function Ai(){Rt.apply(this,arguments)}x(Ai,Rt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Ut|Se,pointers:1},getTouchAction:function(){return on.prototype.getTouchAction.call(this)},attrTest:function(u){var m=this.options.direction,P;return m&(Ut|Se)?P=u.overallVelocity:m&Ut?P=u.overallVelocityX:m&Se&&(P=u.overallVelocityY),this._super.attrTest.call(this,u)&&m&u.offsetDirection&&u.distance>this.options.threshold&&u.maxPointers==this.options.pointers&&c(P)>this.options.velocity&&u.eventType&J},emit:function(u){var m=To(u.offsetDirection);m&&this.manager.emit(this.options.event+m,u),this.manager.emit(this.options.event,u)}});function hn(){Jt.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}x(hn,Jt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Ti]},process:function(u){var m=this.options,P=u.pointers.length===m.pointers,A=u.distance<m.threshold,M=u.deltaTime<m.time;if(this.reset(),u.eventType&st&&this.count===0)return this.failTimeout();if(A&&M&&P){if(u.eventType!=J)return this.failTimeout();var R=this.pTime?u.timeStamp-this.pTime<m.interval:!0,X=!this.pCenter||tn(this.pCenter,u.center)<m.posThreshold;this.pTime=u.timeStamp,this.pCenter=u.center,!X||!R?this.count=1:this.count+=1,this._input=u;var nt=this.count%m.taps;if(nt===0)return this.hasRequireFailures()?(this._timer=d(function(){this.state=Wt,this.tryEmit()},m.interval,this),At):Wt}return Yt},failTimeout:function(){return this._timer=d(function(){this.state=Yt},this.options.interval,this),Yt},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==Wt&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function Zt(u,m){return m=m||{},m.recognizers=E(m.recognizers,Zt.defaults.preset),new Di(u,m)}Zt.VERSION="2.0.7",Zt.defaults={domEvents:!1,touchAction:bo,enable:!0,inputTarget:null,inputClass:null,preset:[[_i,{enable:!1}],[Pi,{enable:!1},["rotate"]],[Ai,{direction:Ut}],[on,{direction:Ut},["swipe"]],[hn],[hn,{event:"doubletap",taps:2},["tap"]],[Ei]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Lm=1,Co=2;function Di(u,m){this.options=_({},Zt.defaults,m||{}),this.options.inputTarget=this.options.inputTarget||u,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=u,this.input=cm(this),this.touchAction=new Ci(this,this.options.touchAction),Po(this,!0),b(this.options.recognizers,function(P){var A=this.add(new P[0](P[1]));P[2]&&A.recognizeWith(P[2]),P[3]&&A.requireFailure(P[3])},this)}Di.prototype={set:function(u){return _(this.options,u),u.touchAction&&this.touchAction.update(),u.inputTarget&&(this.input.destroy(),this.input.target=u.inputTarget,this.input.init()),this},stop:function(u){this.session.stopped=u?Co:Lm},recognize:function(u){var m=this.session;if(!m.stopped){this.touchAction.preventDefaults(u);var P,A=this.recognizers,M=m.curRecognizer;(!M||M&&M.state&Wt)&&(M=m.curRecognizer=null);for(var R=0;R<A.length;)P=A[R],m.stopped!==Co&&(!M||P==M||P.canRecognizeWith(M))?P.recognize(u):P.reset(),!M&&P.state&(At|Le|le)&&(M=m.curRecognizer=P),R++}},get:function(u){if(u instanceof Jt)return u;for(var m=this.recognizers,P=0;P<m.length;P++)if(m[P].options.event==u)return m[P];return null},add:function(u){if(y(u,"add",this))return this;var m=this.get(u.options.event);return m&&this.remove(m),this.recognizers.push(u),u.manager=this,this.touchAction.update(),u},remove:function(u){if(y(u,"remove",this))return this;if(u=this.get(u),u){var m=this.recognizers,P=Q(m,u);P!==-1&&(m.splice(P,1),this.touchAction.update())}return this},on:function(u,m){if(u!==i&&m!==i){var P=this.handlers;return b(K(u),function(A){P[A]=P[A]||[],P[A].push(m)}),this}},off:function(u,m){if(u!==i){var P=this.handlers;return b(K(u),function(A){m?P[A]&&P[A].splice(Q(P[A],m),1):delete P[A]}),this}},emit:function(u,m){this.options.domEvents&&Rm(u,m);var P=this.handlers[u]&&this.handlers[u].slice();if(!(!P||!P.length)){m.type=u,m.preventDefault=function(){m.srcEvent.preventDefault()};for(var A=0;A<P.length;)P[A](m),A++}},destroy:function(){this.element&&Po(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function Po(u,m){var P=u.element;if(P.style){var A;b(u.options.cssProps,function(M,R){A=xt(P.style,R),m?(u.oldCssProps[A]=P.style[A],P.style[A]=M):P.style[A]=u.oldCssProps[A]||""}),m||(u.oldCssProps={})}}function Rm(u,m){var P=e.createEvent("Event");P.initEvent(u,!0,!0),P.gesture=m,m.target.dispatchEvent(P)}_(Zt,{INPUT_START:st,INPUT_MOVE:Bt,INPUT_END:J,INPUT_CANCEL:I,STATE_POSSIBLE:rn,STATE_BEGAN:At,STATE_CHANGED:Le,STATE_ENDED:le,STATE_RECOGNIZED:Wt,STATE_CANCELLED:as,STATE_FAILED:Yt,DIRECTION_NONE:Ks,DIRECTION_LEFT:ts,DIRECTION_RIGHT:es,DIRECTION_UP:ss,DIRECTION_DOWN:ns,DIRECTION_HORIZONTAL:Ut,DIRECTION_VERTICAL:Se,DIRECTION_ALL:ao,Manager:Di,Input:_t,TouchAction:Ci,TouchInput:sn,MouseInput:en,PointerEventInput:vi,TouchMouseInput:Si,SingleTouchInput:po,Recognizer:Jt,AttrRecognizer:Rt,Tap:hn,Pan:on,Swipe:Ai,Pinch:Pi,Rotate:_i,Press:Ei,on:C,off:F,each:b,merge:v,extend:S,assign:_,inherit:x,bindFn:p,prefixed:xt});var Om=typeof t<"u"?t:typeof self<"u"?self:{};Om.Hammer=Zt,typeof i=="function"&&i.amd?i(function(){return Zt}):n.exports?n.exports=Zt:t[s]=Zt})(window,document,"Hammer")})(ka);var nf=ka.exports;const rf=$i(nf);function af(){return{screenWidth:window.screen.width,screenHeight:window.screen.height,screenX:window.screenX,screenY:window.screenY}}function Je(){const n=document.documentElement;return{clientWidth:n.clientWidth,clientHeight:n.clientHeight,clientTop:n.clientTop,clientLeft:n.clientLeft,scrollWidth:n.scrollWidth,scrollHeight:n.scrollHeight,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft,offsetWidth:n.offsetWidth,offsetHeight:n.offsetHeight,offsetTop:n.offsetTop,offsetLeft:n.offsetLeft,offsetParent:n.offsetParent}}function of(){const n=document.body;return{clientWidth:n.clientWidth,clientHeight:n.clientHeight,clientTop:n.clientTop,clientLeft:n.clientLeft,scrollWidth:n.scrollWidth,scrollHeight:n.scrollHeight,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft,offsetWidth:n.offsetWidth,offsetHeight:n.offsetHeight,offsetTop:n.offsetTop,offsetLeft:n.offsetLeft,offsetParent:n.offsetParent}}function hf(){return typeof window.innerWidth=="number"?{width:window.innerWidth,height:window.innerHeight}:document.compatMode==="CSS1Compat"?{width:document.documentElement.clientWidth,height:document.documentElement.clientHeight}:{width:document.body.clientWidth,height:document.body.clientHeight}}function cf(){const{scrollWidth:n,scrollHeight:t}=Je();return{width:n,height:t}}function ni(n){const{top:t,left:e,width:s,height:i}=n.getBoundingClientRect(),{scrollLeft:r,scrollTop:a}=Je();return{x:e+r,y:t+a,width:s,height:i}}function lf(n){let t=n,e=0,s=0;for(;t!==null;)e+=t.offsetLeft,s+=t.offsetTop,t.offsetParent instanceof HTMLElement?t=t.offsetParent:t=null;return{x:e,y:s,width:n.offsetWidth,height:n.offsetHeight}}function La(n){return n.getBoundingClientRect()}function uf(n){const t=n.getBoundingClientRect();return{x:n.offsetLeft,y:n.offsetTop,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}function ff(){const{clientHeight:n,scrollTop:t,scrollHeight:e}=Je(),s=e-n;return s<=0?0:t/s*100}function df(n){if("center"in n){const t=n.center,e=La(n.target);return{x:t.x-e.x,y:t.y-e.y}}return{x:n.clientX,y:n.clientY}}function ii(n){if("center"in n)return n.center;if(typeof n.pageX=="number"&&typeof n.pageY=="number")return{x:n.pageX,y:n.pageY};const{scrollLeft:t,scrollTop:e}=Je();return{x:n.clientX+t,y:n.clientY+e}}function kt(n,t){const e={x:0,y:0};if(t){const s=ii(n),i=ni(t);e.x=s.x-i.x,e.y=s.y-i.y}else{let s=0,i=0;if("currentTarget"in n&&n.currentTarget&&n.target&&n.currentTarget!=n.target){const r=n.currentTarget.getBoundingClientRect(),a=n.target.getBoundingClientRect();s=a.left-r.left,i=a.top-r.top}if("offsetX"in n)e.x=n.offsetX+s,e.y=n.offsetY+i;else{const r=ii(n),a=ni(n.target);e.x=r.x-a.x+s,e.y=r.y-a.y+i}}return e}class mf extends ls{container;width;height;mousePoint={x:0,y:0,dx:0,dy:0,dStartX:0,dStartY:0};hammer;removes=[];constructor(t=document.documentElement,e=!0,s){super(),this.container=t,this.width=t.offsetWidth,this.height=t.offsetHeight,this.hammer=new rf(this.container),e&&this.start(s)}emitDebounce=Jo((t,...e)=>super.emit(t,...e),50);emit(t,...e){switch(t){case"panLeft":case"panRight":this.emitDebounce(t,...e);break;default:super.emit(t,...e);break}return this}start(t){this.registerMouseEventListeners(),this.registerTransitionEventListeners(),this.registerAnimationEventListeners(),this.registerResizeObserver(),t&&t.forEach(e=>{this.addRemoves(e())}),this.on("pointerMove",e=>{this.setMousePoint(kt(e,this.container))})}destroy(){this.removes.forEach(t=>t()),this.removes=[],this.removeAllListeners()}restart(){this.destroy(),this.start()}addRemoves(t){this.removes.push(t)}registerMouseEventListeners(){const t=I=>{this.emit("mouseDown",I)},e=I=>{this.emit("mouseUp",I)},s=I=>{this.emit("mouseMove",I)},i=I=>{this.emit("mouseOver",I)},r=I=>{this.emit("mouseOut",I)},a=I=>{this.emit("mouseEnter",I)},o=I=>{this.emit("mouseLeave",I)},h=I=>{this.emit("mouseClick",I)},c=I=>{this.emit("mouseDoubleClick",I)},l=I=>{this.emit("mouseWheel",I)},d=I=>{this.emit("mouseContextMenu",I)},y=I=>{this.emit("touchStart",I)},b=I=>{this.emit("touchEnd",I)},w=I=>{this.emit("touchCancel",I)},_=I=>{this.emit("touchMove",I)},S=I=>{this.emit("pointerDown",I)},v=I=>{this.emit("pointerUp",I)},x=I=>{this.emit("pointerCancel",I)},p=I=>{this.emit("pointerMove",I)},g=I=>{this.emit("pan",I)},E=I=>{this.emit("panStart",I)},C=I=>{this.emit("panMove",I)},F=I=>{this.emit("panEnd",I)},G=I=>{this.emit("panCancel",I)},V=I=>{this.emit("panLeft",I)},K=I=>{this.emit("panRight",I)},Q=I=>{this.emit("panUp",I)},ht=I=>{this.emit("panDown",I)},Et=I=>{this.emit("pinch",I)},xt=I=>{this.emit("press",I)},Me=I=>{this.emit("rotate",I)},ce=I=>{this.emit("swipe",I)},ve=I=>{this.emit("swipeLeft",I)},ke=I=>{this.emit("swipeRight",I)},O=I=>{this.emit("swipeUp",I)},k=I=>{this.emit("swipeDown",I)},Y=I=>{this.emit("tap",I)},q=I=>{!I.target||this.container==I.target||this.container.contains(I.target)||this.emit("tapOutSide",I)},mt=I=>{this.emit("inputChange",I,this.container.files)},Lt=I=>{this.emit("dragstart",I)},Js=I=>{I.dataTransfer&&(I.dataTransfer.dropEffect="copy"),this.emit("dragover",I)},Zs=I=>{this.emit("dragenter",I)},st=I=>{this.emit("dragend",I)},Bt=I=>{I.dataTransfer,this.emit("drop",I,I.dataTransfer?.files||null)};this.container.addEventListener("mousedown",t,!1),this.container.addEventListener("mouseup",e,!1),this.container.addEventListener("mousemove",s,!1),this.container.addEventListener("mouseover",i,!1),this.container.addEventListener("mouseout",r,!1),this.container.addEventListener("mouseenter",a,!1),this.container.addEventListener("mouseleave",o,!1),this.container.addEventListener("click",h,!1),this.container.addEventListener("dblclick",c,!1),this.container.addEventListener("wheel",l,!1),this.container.addEventListener("contextmenu",d,!1),this.container.addEventListener("touchstart",y,!1),this.container.addEventListener("touchend",b,!1),this.container.addEventListener("touchcancel",w,!1),this.container.addEventListener("touchmove",_,!1),this.container.addEventListener("pointerdown",S,!1),this.container.addEventListener("pointerup",v,!1),this.container.addEventListener("pointercancel",x,!1),this.container.addEventListener("pointermove",p,!1),this.hammer.on("pan",g),this.hammer.on("panstart",E),this.hammer.on("panmove",C),this.hammer.on("panend",F),this.hammer.on("pancancel",G),this.hammer.on("panleft",V),this.hammer.on("panright",K),this.hammer.on("panup",Q),this.hammer.on("pandown",ht),this.hammer.on("pinch",Et),this.hammer.on("press",xt),this.hammer.on("rotate",Me),this.hammer.on("swipe",ce),this.hammer.on("swipeleft",ve),this.hammer.on("swiperight",ke),this.hammer.on("swipeup",O),this.hammer.on("swipedown",k),this.hammer.on("tap",Y),document.addEventListener("pointerdown",q,!1),this.container instanceof HTMLInputElement&&this.container.addEventListener("change",mt,!1),this.container.addEventListener("dragstart",Lt,!1),this.container.addEventListener("dragover",Js,!1),this.container.addEventListener("dragenter",Zs,!1),this.container.addEventListener("dragend",st,!1),this.container.addEventListener("drop",Bt,!1);const J=()=>{this.container.removeEventListener("mousedown",t,!1),this.container.removeEventListener("mouseup",e,!1),this.container.removeEventListener("mousemove",s,!1),this.container.removeEventListener("mouseover",i,!1),this.container.removeEventListener("mouseout",r,!1),this.container.removeEventListener("mouseenter",a,!1),this.container.removeEventListener("mouseleave",o,!1),this.container.removeEventListener("click",h,!1),this.container.removeEventListener("dblclick",c,!1),this.container.removeEventListener("wheel",l,!1),this.container.removeEventListener("contextmenu",d,!1),this.container.removeEventListener("touchstart",y,!1),this.container.removeEventListener("touchend",b,!1),this.container.removeEventListener("touchcancel",w,!1),this.container.removeEventListener("touchmove",_,!1),this.container.removeEventListener("pointerdown",S,!1),this.container.removeEventListener("pointerup",v,!1),this.container.removeEventListener("pointercancel",x),this.container.removeEventListener("pointermove",p,!1),this.hammer.off("pan",g),this.hammer.off("panstart",E),this.hammer.off("panmove",C),this.hammer.off("panend",F),this.hammer.off("pancancel",G),this.hammer.off("panleft",V),this.hammer.off("panright",K),this.hammer.off("panup",Q),this.hammer.off("pandown",ht),this.hammer.off("pinch",Et),this.hammer.off("press",xt),this.hammer.off("rotate",Me),this.hammer.off("swipe",ce),this.hammer.off("swipeleft",ve),this.hammer.off("swiperight",ke),this.hammer.off("swipeup",O),this.hammer.off("swipedown",k),this.hammer.off("tap",Y),document.removeEventListener("pointerdown",q,!1),document.removeEventListener("touchstart",q,!1),document.removeEventListener("mousedown",q,!1),this.container instanceof HTMLInputElement&&this.container.removeEventListener("change",mt,!1),this.container.removeEventListener("dragstart",Lt,!1),this.container.removeEventListener("dragover",Js,!1),this.container.removeEventListener("dragenter",Zs,!1),this.container.removeEventListener("dragend",st,!1),this.container.removeEventListener("drop",Bt,!1)};return this.addRemoves(J),J}registerTransitionEventListeners(){const t=i=>{this.emit("transitionstart",i)},e=i=>{this.emit("transitionend",i)};this.container.addEventListener("transitionstart",t,!1),this.container.addEventListener("transitionend",e,!1);const s=()=>{this.container.removeEventListener("transitionstart",t,!1),this.container.removeEventListener("transitionend",e,!1)};return this.addRemoves(s),s}registerAnimationEventListeners(){const t=i=>{this.emit("animationstart",i)},e=i=>{this.emit("animationend",i)};this.container.addEventListener("animationstart",t,!1),this.container.addEventListener("animationend",e,!1);const s=()=>{this.container.removeEventListener("animationstart",t,!1),this.container.removeEventListener("animationend",e,!1)};return this.addRemoves(s),s}registerResizeObserver(){const{on:t,destroy:e}=ba(this.container),s=t((r,a)=>{this.width=r,this.height=a,this.emit("resize",r,a)}),i=()=>{s(),e()};return this.addRemoves(i),i}registerPullDownRefresh(t){const e=t?.distance||50;return this.captureDrag({move:(s,i)=>{i.dStartY>0&&i.dStartY<e&&this.emit("pullDowning",i.dStartY)},end:(s,i)=>{i.dStartY>=e&&this.emit("pullDown")}})}registerPullUpLoading(t){const e=t?.distance||50;return this.captureDrag({move:(s,i)=>{i.dStartY>0&&i.dStartY<e&&this.emit("pullUping",i.dStartY)},end:(s,i)=>{i.dStartY>=e&&this.emit("pullUp")}})}setMousePoint(t){this.mousePoint.x=t.x,this.mousePoint.y=t.y,this.mousePoint.dx=typeof t.dx=="number"?t.dx:0,this.mousePoint.dy=typeof t.dy=="number"?t.dy:0,this.mousePoint.dStartX=typeof t.dStartX=="number"?t.dStartX:0,this.mousePoint.dStartY=typeof t.dStartY=="number"?t.dStartY:0}captureDrag(t){return this.captureDragUsePointer(t)}captureDragUsePointer(t){let e,s;const i=h=>{h.preventDefault(),h.stopPropagation(),this.on("pointerMove",a),this.on("pointerUp",r),this.on("pointerCancel",r),s=kt(h,this.container);const c={...s};e=c,this.setMousePoint(c),t?.start?.(h,c)},r=h=>{h.preventDefault(),h.stopPropagation(),this.off("pointerMove",a),this.off("pointerUp",r),this.off("pointerCancel",r),s=kt(h,this.container);const c={...s,dStartX:e?s.x-e.x:0,dStartY:e?s.y-e.y:0};this.setMousePoint(c),t?.end?.(h,c),e=null},a=h=>{h.preventDefault(),h.stopPropagation();const c={...s};s=kt(h,this.container);const l={...s,dx:s.x-(c.x||0),dy:s.y-(c.y||0),dStartX:e?s.x-e.x:0,dStartY:e?s.y-e.y:0};this.setMousePoint(l),t?.move?.(h,l)};this.on("pointerDown",i);const o=()=>{this.off("pointerDown",i)};return this.addRemoves(o),o}captureDragUseMouse(t){let e,s;const i=h=>{h.preventDefault(),h.stopPropagation(),document.addEventListener("mousemove",a,!1),document.addEventListener("mouseup",r,!1),s=kt(h,this.container);const c={...s};e=c,this.setMousePoint(c),t?.start?.(h,c)},r=h=>{h.preventDefault(),h.stopPropagation(),document.removeEventListener("mousemove",a,!1),document.removeEventListener("mouseup",r,!1),s=kt(h,this.container);const c={...s,dStartX:e?s.x-e.x:0,dStartY:e?s.y-e.y:0};this.setMousePoint(c),t?.end?.(h,c),e=null},a=h=>{h.preventDefault(),h.stopPropagation();const c={...s};s=kt(h,this.container);const l={...s,dx:s.x-(c.x||0),dy:s.y-(c.y||0),dStartX:e?s.x-e.x:0,dStartY:e?s.y-e.y:0};this.setMousePoint(l),t?.move?.(h,l)};this.on("mouseDown",i);const o=()=>{this.off("mouseDown",i)};return this.addRemoves(o),o}captureDragUseTouch(t){let e,s;const i=h=>{h.preventDefault(),h.stopPropagation(),this.on("touchMove",a),this.on("touchEnd",r),this.on("touchCancel",r);const c=h.changedTouches[0];s=kt(c,this.container);const l={...s};e=l,this.setMousePoint(l),t?.start?.(c,l)},r=h=>{h.preventDefault(),h.stopPropagation(),this.off("touchMove",a),this.off("touchEnd",r),this.off("touchCancel",r);const c=h.changedTouches[0];s=kt(c,this.container);const l={...s,dStartX:e?s.x-e.x:0,dStartY:e?s.y-e.y:0};this.setMousePoint(l),t?.end?.(c,l),e=null},a=h=>{h.preventDefault(),h.stopPropagation();const c=h.changedTouches[0],l={...s};s=kt(c,this.container);const d={...s,dx:s.x-(l.x||0),dy:s.y-(l.y||0),dStartX:e?s.x-e.x:0,dStartY:e?s.y-e.y:0};this.setMousePoint(d),t?.move?.(c,d)};this.on("touchStart",i);const o=()=>{this.off("touchStart",i)};return this.addRemoves(o),o}}class Ze{video;constructor(t){this.video=t}setSrcObject(t){this.video.addEventListener("loadedmetadata",e=>{e.target}),this.video.srcObject=t}captureWebCamera(){navigator.mediaDevices.getUserMedia({video:!0}).then(t=>{this.setSrcObject(t)})}static async videoMediaChangeSupport(){return new Promise(t=>{const e=document.createElement("iframe"),s=document.createElement("video"),i=document.createElement("source"),r=new MediaSource;r.addEventListener("sourceopen",()=>t(!0)),i.src=URL.createObjectURL(r),i.media="(min-width:10px)",s.append(i),e.width="5",e.style.cssText="position: absolute; visibility: hidden;",document.documentElement.append(e),e.contentDocument?.body.append(s),setTimeout(()=>{e.width="15"}),setTimeout(()=>{e.remove(),t(!1)},1e3)})}static tryAutoPlayOrAutoPlayAfterClick(t){return new Promise(e=>{t.play().then(()=>{t.autoplay=!0,e(!0)}).catch(()=>{Ze.setAutoPlayWhenClick(t),e(!1)})})}static setAutoPlayWhenClick(t){function e(){t.autoplay=!0,t.play(),document.removeEventListener("click",e),document.removeEventListener("touchend",e)}document.addEventListener("click",e),document.addEventListener("touchend",e)}}class Ra extends ls{source;raw="";mode="text";tagname="";nodename="";textchunk="";entity="";quote="";attrs={};constructor(t){super(),this.source=t}parse(){const t=Eo(this.source);if(t===0){this.emit("finish");return}let e,s,i=Ri(this.source,0);for(let r=1;r<t;r++)e=s,s=i,i=Ri(this.source,r),this.raw+=s,s&&this.step(s,i,e);i&&this.step(i,void 0,s),this.emit("finish")}step(t,e,s){t==`
|
|
37
37
|
`&&this.emit("newline"),this.act(t,e,s)}act(t,e,s){switch(this.mode){case"text":switch(t){case"<":case"eof":this.nodename="",this.attrs={},this.mode="tag name start",this.raw=this.raw.slice(0,-1),this.textchunk&&this.emit("text",this.textchunk),this.raw+=t,this.textchunk="";break;case"&":this.mode="entity",this.entity="";break;default:this.textchunk+=t;break}break;case"entity":zt("whitespace",t)?(this.textchunk+=Oa(this.entity),this.mode="text"):t==";"?(this.textchunk+=Oa(this.entity+t),this.mode="text"):this.entity+=t;break;case"special":if(s=="!"&&t=="-"&&e=="-"){this.mode="comment start";break}if(this.textchunk=="[CDATA"&&t=="["){this.mode="cdata",this.textchunk="";break}if(t==">"||t=="eof"){this.emit("special",this.textchunk),this.mode="text",this.textchunk="";break}this.textchunk+=t;break;case"cdata":if(s=="]"&&t=="]"&&e==">"){this.mode="cdata end",this.textchunk=this.textchunk.slice(0,-1);break}t=="eof"&&(this.mode="cdata end",this.act(t,e,s)),this.textchunk+=t;break;case"cdata end":this.emit("cdata",this.textchunk),this.textchunk="",this.mode="text";break;case"comment start":e==">"||t=="eof"?(this.emit("comment",""),this.mode="skip"):this.mode="comment";break;case"skip":this.mode="text";break;case"comment":t=="-"&&s=="-"&&e==">"?(this.mode="comment end",this.textchunk=this.textchunk.slice(0,-1)):t=="eof"?this.emit("comment",this.textchunk):this.textchunk+=t;break;case"comment end":this.emit("comment",this.textchunk),this.textchunk="",this.mode="text";break;case"declaration":if(t=="?"&&e==">"){this.mode="declaration end";break}t=="eof"&&this.emit("comment",this.textchunk),this.textchunk+=t;break;case"declaration end":this.emit("comment",this.textchunk),this.textchunk="",this.mode="text";break;case"tag name start":if(t=="eof"){this.emit("text","<");break}if(!zt("whitespace",t)){if(this.mode="tag name",t=="/"){this.mode="close tag name start";break}else if(t=="!"){this.mode="special",this.textchunk="";break}else if(t=="?"){this.mode="declaration";break}this.act(t,e,s)}break;case"close tag name start":zt("whitespace",t)||(this.mode="close tag name",this.tagname="",this.nodename="",this.act(t,e,s));break;case"close tag name":if(zt("whitespace",t))this.tagname=this.nodename;else switch(t){case">":this.emit("/tag",this.tagname||this.nodename,this.attrs),this.mode="text";break;default:!this.tagname&&(this.nodename+=t);break}break;case"tag name":if(zt("whitespace",t))this.tagname=this.nodename,this.nodename="",this.mode="attr start";else switch(t){case">":this.emit("tag",this.nodename,this.attrs),this.mode="text";break;case"/":this.raw+=e,this.emit("tag",this.nodename,this.attrs),this.emit("/tag",this.nodename,this.attrs),this.mode="skip";break;default:this.nodename+=t;break}break;case"attr start":zt("whitespace",t)||(this.mode="attr",this.nodename="",this.act(t,e,s));break;case"attr":if(zt("whitespace",t)||t=="=")this.attrs[this.nodename]="",this.mode="attr value start";else switch(t){case">":this.nodename=="/"?(delete this.attrs["/"],this.emit("tag",this.tagname,this.attrs),this.emit("/tag",this.tagname,this.attrs)):(this.nodename&&(this.attrs[this.nodename]=""),this.emit("tag",this.tagname,this.attrs)),this.mode="text";break;default:this.nodename+=t;break}break;case"attr value start":if(!zt("whitespace",t)){if(this.mode="attr value",this.quote="",t=="'"||t=='"'){this.quote=t;return}this.act(t,e,s)}break;case"attr value":if(zt("whitespace",t)&&!this.quote)this.mode="attr start";else if(t==">"&&!this.quote)this.emit("tag",this.tagname,this.attrs),this.mode="text";else switch(t){case'"':case"'":this.quote==t&&s!="\\"&&(this.mode="attr start");break;default:this.attrs[this.nodename]+=t;break}break}}}function Oa(n){const t={lt:60,"lt;":60,"AMP;":38,AMP:38,"GT;":62,GT:62,"QUOT;":34,QUOT:34,"apos;":39,"bull;":8226,"bullet;":8226,"copy;":169,copy:169,"deg;":176,deg:176};let e;return n.charAt(0)=="#"?n.charAt(1).toLowerCase()=="x"?e=parseInt(n.substring(2),16):e=parseInt(n.substring(1),10):e=t[n],e?String.fromCharCode(e):"&"+n}var Fa=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Na(n,t={}){var e=1,s=1;function i(O){var k=O.match(/\n/g);k&&(e+=k.length);var Y=O.lastIndexOf(`
|
|
38
|
-
`);s=~Y?O.length-Y:s+O.length}function r(){var O={line:e,column:s};return function(k){return k.position=new a(O),w(),k}}function a(O){this.start=O,this.end={line:e,column:s},this.source=t.source}a.prototype.content=n;var o=[];function h(O){var k=new Error(t.source+":"+e+":"+s+": "+O);if(k.reason=O,k.filename=t.source,k.line=e,k.column=s,k.source=n,t.silent)o.push(k);else throw k}function c(){var O=y();return{type:"stylesheet",stylesheet:{source:t.source,rules:O,parsingErrors:o}}}function l(){return b(/^{\s*/)}function d(){return b(/^}/)}function y(){var O,k=[];for(w(),_(k);n.length&&n.charAt(0)!="}"&&(O=ve()||ke());)O!==!1&&(k.push(O),_(k));return k}function b(O){var k=O.exec(n);if(k){var Y=k[0];return i(Y),n=n.slice(Y.length),k}}function w(){b(/^\s*/)}function _(O){var k;for(O=O||[];k=S();)k!==!1&&O.push(k);return O}function S(){var O=r();if(!(n.charAt(0)!="/"||n.charAt(1)!="*")){for(var k=2;n.charAt(k)!=""&&(n.charAt(k)!="*"||n.charAt(k+1)!="/");)++k;if(k+=2,n.charAt(k-1)==="")return h("End of comment missing");var Y=n.slice(2,k-2);return s+=2,i(Y),n=n.slice(k),s+=2,O({type:"comment",comment:Y})}}function v(){var O=b(/^([^{]+)/);if(O)return qt(O[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(k){return k.replace(/,/g,"")}).split(/\s*(?![^(]*\)),\s*/).map(function(k){return k.replace(/\u200C/g,",")})}function x(){var O=r(),k=b(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(k){if(k=qt(k[0]),!b(/^:\s*/))return h("property missing ':'");var Y=b(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/),q=O({type:"declaration",property:k.replace(Fa,""),value:Y?qt(Y[0]).replace(Fa,""):""});return b(/^[;\s]*/),q}}function p(){var O=[];if(!l())return h("missing '{'");_(O);for(var k;k=x();)k!==!1&&(O.push(k),_(O));return d()?O:h("missing '}'")}function g(){for(var O,k=[],Y=r();O=b(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)k.push(O[1]),b(/^,\s*/);if(k.length)return Y({type:"keyframe",values:k,declarations:p()})}function E(){var O=r(),k=b(/^@([-\w]+)?keyframes\s*/);if(k){var Y=k[1];if(k=b(/^([-\w]+)\s*/),!k)return h("@keyframes missing name");var q=k[1];if(!l())return h("@keyframes missing '{'");for(var mt,Lt=_();mt=g();)Lt.push(mt),Lt=Lt.concat(_());return d()?O({type:"keyframes",name:q,vendor:Y,keyframes:Lt}):h("@keyframes missing '}'")}}function C(){var O=r(),k=b(/^@supports *([^{]+)/);if(k){var Y=qt(k[1]);if(!l())return h("@supports missing '{'");var q=_().concat(y());return d()?O({type:"supports",supports:Y,rules:q}):h("@supports missing '}'")}}function F(){var O=r(),k=b(/^@host\s*/);if(k){if(!l())return h("@host missing '{'");var Y=_().concat(y());return d()?O({type:"host",rules:Y}):h("@host missing '}'")}}function G(){var O=r(),k=b(/^@media *([^{]+)/);if(k){var Y=qt(k[1]);if(!l())return h("@media missing '{'");var q=_().concat(y());return d()?O({type:"media",media:Y,rules:q}):h("@media missing '}'")}}function V(){var O=r(),k=b(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(k)return O({type:"custom-media",name:qt(k[1]),media:qt(k[2])})}function K(){var O=r(),k=b(/^@page */);if(k){var Y=v()||[];if(!l())return h("@page missing '{'");for(var q=_(),mt;mt=x();)q.push(mt),q=q.concat(_());return d()?O({type:"page",selectors:Y,declarations:q}):h("@page missing '}'")}}function Q(){var O=r(),k=b(/^@([-\w]+)?document *([^{]+)/);if(k){var Y=qt(k[1]),q=qt(k[2]);if(!l())return h("@document missing '{'");var mt=_().concat(y());return d()?O({type:"document",document:q,vendor:Y,rules:mt}):h("@document missing '}'")}}function ht(){var O=r(),k=b(/^@font-face\s*/);if(k){if(!l())return h("@font-face missing '{'");for(var Y=_(),q;q=x();)Y.push(q),Y=Y.concat(_());return d()?O({type:"font-face",declarations:Y}):h("@font-face missing '}'")}}var Et=ce("import"),xt=ce("charset"),Me=ce("namespace");function ce(O){var k=new RegExp("^@"+O+"\\s*([^;]+);");return function(){var Y=r(),q=b(k);if(q){var mt={type:O};return mt[O]=q[1].trim(),Y(mt)}}}function ve(){if(n[0]=="@")return E()||G()||V()||C()||Et()||xt()||Me()||Q()||K()||F()||ht()}function ke(){var O=r(),k=v();return k?(_(),O({type:"rule",selectors:k,declarations:p()})):h("selector missing")}return ri(c())}function qt(n){return n?n.replace(/^\s+|\s+$/g,""):""}function ri(n,t){var e=n&&typeof n.type=="string",s=e?n:t;for(var i in n){var r=n[i];Array.isArray(r)?r.forEach(function(a){ri(a,s)}):r&&typeof r=="object"&&ri(r,s)}return e&&Object.defineProperty(n,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),n}class Ba extends Ra{currentItem={};items=[];groups=[];globalStyles={};grad={};idtops={};text="";constructor(t){super(t),this.on("tag",(e,s)=>{switch(this.text="",this.currentItem={type:e},e){case"g":this.groups.push(this.currentItem);break}this.processAttrs(e,s)}),this.on("text",e=>{if(this.currentItem.type=="style"){try{const s=Na(e);for(const i of s.stylesheet.rules)for(const r of i.declarations)for(const a of i.selectors)this.globalStyles[a]=this.globalStyles[a]||[],this.globalStyles[a].push(`${r.property}:${r.value}`)}catch{console.error("CAN'T parse css text: "+e)}return}this.text+=e}),this.on("/tag",(e,s)=>{let i=this.groups.length;for(;i--;)if(this.groups[i]!=this.currentItem){let r="",a="";for(const o in this.groups[i])o=="transform"?r=this.groups[i].transform:o=="class"&&this.globalStyles["."+this.groups[i][o]]?a=this.globalStyles["."+this.groups[i][o]].join(";")+";"+a:o=="id"&&this.globalStyles["#"+this.groups[i][o]]?a=this.globalStyles["#"+this.groups[i][o]].join(";")+";"+a:typeof this.currentItem[o]>"u"&&(this.currentItem[o]=this.groups[i][o]);typeof this.currentItem.transform>"u"?this.currentItem.transform=r:this.currentItem.transform+=" "+r,typeof this.currentItem.style>"u"?this.currentItem.style=a:this.currentItem.style=a+this.currentItem.style,this.currentItem.class&&this.globalStyles["."+this.currentItem.class]?this.currentItem.style=this.globalStyles["."+this.currentItem.class].join(";")+";"+this.currentItem.style:this.currentItem.id&&this.globalStyles["#"+this.currentItem.id]&&(this.currentItem.style=this.globalStyles["#"+this.currentItem.id].join(";")+";"+this.currentItem.style),oi(this.currentItem.style,this.currentItem,hi)}switch(this.processAttrs(e,s),e){case"g":this.groups.pop();break;case"cirlce":this.addToItems();break;case"ellipse":this.addToItems();break;case"polygon":this.addToItems();break;case"path":this.addToItems();break;case"line":this.addToItems();break;case"rect":this.addToItems();break;case"image":this.addToItems();break;case"text":this.currentItem.text=this.text,this.currentItem["text-anchor"]=this.currentItem["text-anchor"]||"start",this.addToItems();break}}),this.on("finish",()=>{this.emit("result",this.items)})}parse(){return super.parse(),this.items}processAttrs(t,e){let s=[],i;switch(t){case"svg":let r="",a="";if(e.width&&e.height)r=e.width,a=e.height;else if(e.viewBox){const o=e.viewBox.split(/\s+/gi);o.length==4&&(r=String(parseFloat(o[2])-parseFloat(o[0])),a=String(parseFloat(o[3])-parseFloat(o[1])))}r&&a&&this.items.push({type:"viewbox",width:r,height:a});break;case"line":typeof e.x1=="number"&&typeof e.y1=="number"&&typeof e.x2=="number"&&typeof e.y2=="number"&&(this.currentItem.path="M"+[e.x1,e.y1,e.x2,e.y2]);break;case"stop":i={},e.style&&oi(e.style,i),i.offset=i.offset||e.offset,i.color=i["stop-color"]||e["stop-color"],i.opacity=i["stop-opacity"]||e["stop-opacity"],~(i.offset+"").indexOf("%")?i.offset=parseFloat(i.offset):i.offset=parseFloat(i.offset)*100,i.offset=+i.offset.toFixed(2),this.grad.stops.push(i);break;case"linearGradient":this.grad.angle=(360+ai(parseFloat(e.x1),parseFloat(e.y1),parseFloat(e.x2),parseFloat(e.y2),parseFloat(e.x1)+100,parseFloat(e.y1))).toFixed(2),s=[this.grad.angle];for(let o=0,h=this.grad.stops.length;o<h;o++)i=this.grad.stops[o],o&&o!=h-1?s.push(i.color+":"+i.offset):s.push(i.color);this.idtops[this.grad.id]=s.join("-"),this.items.forEach(o=>{o.fillid==this.grad.id&&(o.fill=this.idtops[this.grad.id])});break;case"radialGradient":s=[];for(let o=0,h=this.grad.stops.length;o<h;o++)i=this.grad.stops[o],o&&o!=h-1?s.push(i.color+":"+i.offset):s.push(i.color);this.idtops[this.grad.id]=s.join("-"),this.items.forEach(o=>{o.fillid==this.grad.id&&(o.fill=this.idtops[this.grad.id])});break}for(const r in e){const a=e[r];if(hi.includes(r)&&(this.currentItem[r]=a),r==="id"&&(this.currentItem.type==="linearGradient"&&(this.grad={id:r,stops:[]}),this.currentItem.type==="radialGradient"&&(this.grad={id:r,stops:[]})),r==="style"&&oi(a,this.currentItem,hi),r==="transform"&&(this.currentItem.transform=a+(this.currentItem.transform||" ")),r==="fill"){const o=a.match(/url\(#([^)]+)\)/);if(o){const h=o[1];this.currentItem.fillid=h,this.idtops[h]&&(this.currentItem.fill=this.idtops[h])}}r==="points"&&this.currentItem.type=="polygon"&&(this.currentItem.path="M"+a+"z"),r==="d"&&this.currentItem.type=="path"&&(this.currentItem.path=a),r==="xlink:href"&&this.currentItem.type=="image"&&(this.currentItem.src=a)}}addToItems(){this.items.push(this.currentItem)}}function ai(n,t,e,s,i,r){if(typeof i>"u"||typeof r>"u"){const a=n-e,o=t-s;return!a&&!o?0:(180+Math.atan2(-o,-a)*180/Math.PI+360)%360}else return ai(n,t,i,r)-ai(e,s,i,r)}function oi(n,t,e){const s=(n+"").split(";"),i=/^\s+|\s+$/g;for(let r=0,a=s.length;r<a;r++){const o=s[r].split(":"),h=o[0].replace(i,"").replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()});(!e||e.includes(h))&&(t[h]=o[1].replace(i,""))}}const hi=["id","class","viewBox","width","height","x","y","cx","cy","r","rx","ry","cursor","opacity","src","fill","fill-opacity","stroke","stroke-dasharray","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","font","font-family","font-size","font-style","font-weight","letter-spacing"];class pf{app;rootEl;ue;shapes=[];isMouseDown=!1;currentMouseInShape;currentEnableDragMouseInShape;dragDx=0;dragDy=0;constructor(t,e,s){this.app=t,this.rootEl=vt.createSVGElement("svg"),this.ue=$t(this.rootEl);const i=$t(this.app.container);i.empty(),i.insert(this.rootEl),e&&s?this.setSize(e,s):(this.setSize(this.app.width,this.app.height),this.app.on("resize",()=>{this.setSize(this.app.width,this.app.height)})),this.app.captureDrag({start:()=>{this.isMouseDown=!0,this.dragDx=0,this.dragDy=0,this.setCursor()},end:()=>{this.isMouseDown=!1,this.dragDx=0,this.dragDy=0,this.setCursor()},move:(r,a)=>{this.currentEnableDragMouseInShape&&(this.dragDx+=a.dx,this.dragDy+=a.dy),this.setCursor()}}),this.app.on("tap",()=>{for(const r of this.shapes)if(this.currentMouseInShape==r){r.emit("clicked");let a=r.parent;for(;a;)a.emit("clicked",r),a=a.parent;break}})}setCursor(){this.currentEnableDragMouseInShape?(this.app.container.style.cursor="grab",this.isMouseDown&&(this.app.container.style.cursor="grabbing")):this.currentMouseInShape?this.app.container.style.cursor="pointer":this.app.container.style.cursor="default"}setSize(t,e){return ne(this.rootEl,{viewBox:`0 0 ${t} ${e}`,width:`${t}`,height:`${e}`}),this}download(){return vt.downloadFromSVGElement(this.rootEl)}_addDrawShape(t){this.shapes.findIndex(e=>e.id==t.id)===-1&&(this.shapes.push(t),t instanceof ot&&t.shapes.forEach(e=>{this._addDrawShape(e)}))}path(t){(Array.isArray(t)?t:[t]).forEach(e=>{this._addDrawShape(e)}),this.isMouseDown&&this.currentEnableDragMouseInShape||(this.currentMouseInShape=void 0);for(const e of this.shapes){if(!e.isShow){e.el&&(e.el.remove(),delete e.el);continue}if(e.frameStart(this.app.mousePoint),e.el||(e instanceof Ke?e.el=this.text(e.text,e.x,e.y,Ui(e.getAttrs(),(i,r)=>typeof r=="string")):(e.el=vt.createSvgPath(e.toSVGPathD(),e.id),this.ue.insert(e.el))),e.followMouse&&(!hs(e.x,this.app.mousePoint.x,5)||!hs(e.y,this.app.mousePoint.y,5))&&e.followTo(this.app.mousePoint),e.targetToAfterDragFree&&(this.isMouseDown||e.runEaseTo({x:e.targetToAfterDragFree.targetX,y:e.targetToAfterDragFree.targetY},{easing:e.targetToAfterDragFree?.easing})),this.isMouseDown&&this.currentEnableDragMouseInShape==e){e.isDragging=!0;const i=this.dragDx,r=this.dragDy;if(this.dragDx=0,this.dragDy=0,i||r){if(e.x+=i,e.y+=r,e.alongPath){const a=e.alongPath.closestPoint(e.x,e.y);e.x=a.point.x-e.cX,e.y=a.point.y-e.cY}e.emit("draging",i,r)}}else e.isDragging=!1;e instanceof Ke&&(e.setAttr("x",String(e.x)),e.setAttr("y",String(e.y))),e.frameUpdate(this.app.mousePoint);const s=e.toSVGPathD();if(this.attr(e,Ui(e.getAttrs(),(i,r)=>typeof r=="string")),this.attr(e,"d",s),!this.currentMouseInShape){const i=e.isPointInPath(this.app.mousePoint.x,this.app.mousePoint.y,this.rootEl)||e.isPointInStroke(this.app.mousePoint.x,this.app.mousePoint.y,this.rootEl)||!1;e.isMouseIn=i,i&&(this.currentMouseInShape=e,e.enableDrag&&(this.currentEnableDragMouseInShape=e))}e.frameEnd(this.app.mousePoint)}this.currentMouseInShape||(this.currentEnableDragMouseInShape=void 0)}delete(t){(Array.isArray(t)?t:[t]).forEach(e=>{e.el&&e.el.remove(),delete e.el,this.shapes=this.shapes.filter(s=>s.id!==e.id)})}clear(){this.shapes.forEach(t=>{t.el&&t.el.remove(),delete t.el}),this.ue.empty(),this.shapes=[]}attr(t,e,s){const i=t.el||t;return i instanceof SVGElement?e===void 0&&s===void 0?ne(i):typeof e=="string"&&s===void 0?ne(i,ct(e))||"":(typeof e=="object"?ne(i,e):typeof e=="string"&&s!==void 0&&ne(i,ct(e),s),this):this}circle(t,e,s){return this.path(new jt({x:t,y:e,radius:s}))}circleEl(t,e,s){const i=vt.createSVGElement("circle",{cx:String(t),cy:String(e),r:String(s)});return this.ue.insert(i),i}ellipse(t,e,s,i){return this.path(new Ya({x:t,y:e,rx:s,ry:i}))}ellipseEl(t,e,s,i){const r=vt.createSVGElement("ellipse",{cx:String(t),cy:String(e),rx:String(s),ry:String(i)});return this.ue.insert(r),r}rect(t,e,s,i){return this.path(new Ht({x:t,y:e,width:s,height:i}))}rectEl(t,e,s,i){const r=vt.createSVGElement("rect",{x:String(t),y:String(e),width:String(s),height:String(i)});return this.ue.insert(r),r}image(t,e,s,i,r){}text(t,e,s,i){const r=vt.createSVGElement("text",{x:String(e),y:String(s)});return $t(r).html(t),this.attr(r,Object.assign({"alignment-baseline":"middle"},i)),this.ue.insert(r),r}textWithTspan(t,e,s,i){const r=i?.["line-height"]||"1.2em",a=vt.createSVGElement("text",{x:String(e),y:String(s)});return t.split(`
|
|
38
|
+
`);s=~Y?O.length-Y:s+O.length}function r(){var O={line:e,column:s};return function(k){return k.position=new a(O),w(),k}}function a(O){this.start=O,this.end={line:e,column:s},this.source=t.source}a.prototype.content=n;var o=[];function h(O){var k=new Error(t.source+":"+e+":"+s+": "+O);if(k.reason=O,k.filename=t.source,k.line=e,k.column=s,k.source=n,t.silent)o.push(k);else throw k}function c(){var O=y();return{type:"stylesheet",stylesheet:{source:t.source,rules:O,parsingErrors:o}}}function l(){return b(/^{\s*/)}function d(){return b(/^}/)}function y(){var O,k=[];for(w(),_(k);n.length&&n.charAt(0)!="}"&&(O=ve()||ke());)O!==!1&&(k.push(O),_(k));return k}function b(O){var k=O.exec(n);if(k){var Y=k[0];return i(Y),n=n.slice(Y.length),k}}function w(){b(/^\s*/)}function _(O){var k;for(O=O||[];k=S();)k!==!1&&O.push(k);return O}function S(){var O=r();if(!(n.charAt(0)!="/"||n.charAt(1)!="*")){for(var k=2;n.charAt(k)!=""&&(n.charAt(k)!="*"||n.charAt(k+1)!="/");)++k;if(k+=2,n.charAt(k-1)==="")return h("End of comment missing");var Y=n.slice(2,k-2);return s+=2,i(Y),n=n.slice(k),s+=2,O({type:"comment",comment:Y})}}function v(){var O=b(/^([^{]+)/);if(O)return qt(O[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(k){return k.replace(/,/g,"")}).split(/\s*(?![^(]*\)),\s*/).map(function(k){return k.replace(/\u200C/g,",")})}function x(){var O=r(),k=b(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(k){if(k=qt(k[0]),!b(/^:\s*/))return h("property missing ':'");var Y=b(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/),q=O({type:"declaration",property:k.replace(Fa,""),value:Y?qt(Y[0]).replace(Fa,""):""});return b(/^[;\s]*/),q}}function p(){var O=[];if(!l())return h("missing '{'");_(O);for(var k;k=x();)k!==!1&&(O.push(k),_(O));return d()?O:h("missing '}'")}function g(){for(var O,k=[],Y=r();O=b(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)k.push(O[1]),b(/^,\s*/);if(k.length)return Y({type:"keyframe",values:k,declarations:p()})}function E(){var O=r(),k=b(/^@([-\w]+)?keyframes\s*/);if(k){var Y=k[1];if(k=b(/^([-\w]+)\s*/),!k)return h("@keyframes missing name");var q=k[1];if(!l())return h("@keyframes missing '{'");for(var mt,Lt=_();mt=g();)Lt.push(mt),Lt=Lt.concat(_());return d()?O({type:"keyframes",name:q,vendor:Y,keyframes:Lt}):h("@keyframes missing '}'")}}function C(){var O=r(),k=b(/^@supports *([^{]+)/);if(k){var Y=qt(k[1]);if(!l())return h("@supports missing '{'");var q=_().concat(y());return d()?O({type:"supports",supports:Y,rules:q}):h("@supports missing '}'")}}function F(){var O=r(),k=b(/^@host\s*/);if(k){if(!l())return h("@host missing '{'");var Y=_().concat(y());return d()?O({type:"host",rules:Y}):h("@host missing '}'")}}function G(){var O=r(),k=b(/^@media *([^{]+)/);if(k){var Y=qt(k[1]);if(!l())return h("@media missing '{'");var q=_().concat(y());return d()?O({type:"media",media:Y,rules:q}):h("@media missing '}'")}}function V(){var O=r(),k=b(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(k)return O({type:"custom-media",name:qt(k[1]),media:qt(k[2])})}function K(){var O=r(),k=b(/^@page */);if(k){var Y=v()||[];if(!l())return h("@page missing '{'");for(var q=_(),mt;mt=x();)q.push(mt),q=q.concat(_());return d()?O({type:"page",selectors:Y,declarations:q}):h("@page missing '}'")}}function Q(){var O=r(),k=b(/^@([-\w]+)?document *([^{]+)/);if(k){var Y=qt(k[1]),q=qt(k[2]);if(!l())return h("@document missing '{'");var mt=_().concat(y());return d()?O({type:"document",document:q,vendor:Y,rules:mt}):h("@document missing '}'")}}function ht(){var O=r(),k=b(/^@font-face\s*/);if(k){if(!l())return h("@font-face missing '{'");for(var Y=_(),q;q=x();)Y.push(q),Y=Y.concat(_());return d()?O({type:"font-face",declarations:Y}):h("@font-face missing '}'")}}var Et=ce("import"),xt=ce("charset"),Me=ce("namespace");function ce(O){var k=new RegExp("^@"+O+"\\s*([^;]+);");return function(){var Y=r(),q=b(k);if(q){var mt={type:O};return mt[O]=q[1].trim(),Y(mt)}}}function ve(){if(n[0]=="@")return E()||G()||V()||C()||Et()||xt()||Me()||Q()||K()||F()||ht()}function ke(){var O=r(),k=v();return k?(_(),O({type:"rule",selectors:k,declarations:p()})):h("selector missing")}return ri(c())}function qt(n){return n?n.replace(/^\s+|\s+$/g,""):""}function ri(n,t){var e=n&&typeof n.type=="string",s=e?n:t;for(var i in n){var r=n[i];Array.isArray(r)?r.forEach(function(a){ri(a,s)}):r&&typeof r=="object"&&ri(r,s)}return e&&Object.defineProperty(n,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),n}class Ba extends Ra{currentItem={};items=[];groups=[];globalStyles={};grad={};idtops={};text="";constructor(t){super(t),this.on("tag",(e,s)=>{switch(this.text="",this.currentItem={type:e},e){case"g":this.groups.push(this.currentItem);break}this.processAttrs(e,s)}),this.on("text",e=>{if(this.currentItem.type=="style"){try{const s=Na(e);for(const i of s.stylesheet.rules)for(const r of i.declarations)for(const a of i.selectors)this.globalStyles[a]=this.globalStyles[a]||[],this.globalStyles[a].push(`${r.property}:${r.value}`)}catch{console.error("CAN'T parse css text: "+e)}return}this.text+=e}),this.on("/tag",(e,s)=>{let i=this.groups.length;for(;i--;)if(this.groups[i]!=this.currentItem){let r="",a="";for(const o in this.groups[i])o=="transform"?r=this.groups[i].transform:o=="class"&&this.globalStyles["."+this.groups[i][o]]?a=this.globalStyles["."+this.groups[i][o]].join(";")+";"+a:o=="id"&&this.globalStyles["#"+this.groups[i][o]]?a=this.globalStyles["#"+this.groups[i][o]].join(";")+";"+a:typeof this.currentItem[o]>"u"&&(this.currentItem[o]=this.groups[i][o]);typeof this.currentItem.transform>"u"?this.currentItem.transform=r:this.currentItem.transform+=" "+r,typeof this.currentItem.style>"u"?this.currentItem.style=a:this.currentItem.style=a+this.currentItem.style,this.currentItem.class&&this.globalStyles["."+this.currentItem.class]?this.currentItem.style=this.globalStyles["."+this.currentItem.class].join(";")+";"+this.currentItem.style:this.currentItem.id&&this.globalStyles["#"+this.currentItem.id]&&(this.currentItem.style=this.globalStyles["#"+this.currentItem.id].join(";")+";"+this.currentItem.style),oi(this.currentItem.style,this.currentItem,hi)}switch(this.processAttrs(e,s),e){case"g":this.groups.pop();break;case"cirlce":this.addToItems();break;case"ellipse":this.addToItems();break;case"polygon":this.addToItems();break;case"path":this.addToItems();break;case"line":this.addToItems();break;case"rect":this.addToItems();break;case"image":this.addToItems();break;case"text":this.currentItem.text=this.text,this.currentItem["text-anchor"]=this.currentItem["text-anchor"]||"start",this.addToItems();break}}),this.on("finish",()=>{this.emit("result",this.items)})}parse(){return super.parse(),this.items}processAttrs(t,e){let s=[],i;switch(t){case"svg":let r="",a="";if(e.width&&e.height)r=e.width,a=e.height;else if(e.viewBox){const o=e.viewBox.split(/\s+/gi);o.length==4&&(r=String(parseFloat(o[2])-parseFloat(o[0])),a=String(parseFloat(o[3])-parseFloat(o[1])))}r&&a&&this.items.push({type:"viewbox",width:r,height:a});break;case"line":typeof e.x1=="number"&&typeof e.y1=="number"&&typeof e.x2=="number"&&typeof e.y2=="number"&&(this.currentItem.path="M"+[e.x1,e.y1,e.x2,e.y2]);break;case"stop":i={},e.style&&oi(e.style,i),i.offset=i.offset||e.offset,i.color=i["stop-color"]||e["stop-color"],i.opacity=i["stop-opacity"]||e["stop-opacity"],~(i.offset+"").indexOf("%")?i.offset=parseFloat(i.offset):i.offset=parseFloat(i.offset)*100,i.offset=+i.offset.toFixed(2),this.grad.stops.push(i);break;case"linearGradient":this.grad.angle=(360+ai(parseFloat(e.x1),parseFloat(e.y1),parseFloat(e.x2),parseFloat(e.y2),parseFloat(e.x1)+100,parseFloat(e.y1))).toFixed(2),s=[this.grad.angle];for(let o=0,h=this.grad.stops.length;o<h;o++)i=this.grad.stops[o],o&&o!=h-1?s.push(i.color+":"+i.offset):s.push(i.color);this.idtops[this.grad.id]=s.join("-"),this.items.forEach(o=>{o.fillid==this.grad.id&&(o.fill=this.idtops[this.grad.id])});break;case"radialGradient":s=[];for(let o=0,h=this.grad.stops.length;o<h;o++)i=this.grad.stops[o],o&&o!=h-1?s.push(i.color+":"+i.offset):s.push(i.color);this.idtops[this.grad.id]=s.join("-"),this.items.forEach(o=>{o.fillid==this.grad.id&&(o.fill=this.idtops[this.grad.id])});break}for(const r in e){const a=e[r];if(hi.includes(r)&&(this.currentItem[r]=a),r==="id"&&(this.currentItem.type==="linearGradient"&&(this.grad={id:r,stops:[]}),this.currentItem.type==="radialGradient"&&(this.grad={id:r,stops:[]})),r==="style"&&oi(a,this.currentItem,hi),r==="transform"&&(this.currentItem.transform=a+(this.currentItem.transform||" ")),r==="fill"){const o=a.match(/url\(#([^)]+)\)/);if(o){const h=o[1];this.currentItem.fillid=h,this.idtops[h]&&(this.currentItem.fill=this.idtops[h])}}r==="points"&&this.currentItem.type=="polygon"&&(this.currentItem.path="M"+a+"z"),r==="d"&&this.currentItem.type=="path"&&(this.currentItem.path=a),r==="xlink:href"&&this.currentItem.type=="image"&&(this.currentItem.src=a)}}addToItems(){this.items.push(this.currentItem)}}function ai(n,t,e,s,i,r){if(typeof i>"u"||typeof r>"u"){const a=n-e,o=t-s;return!a&&!o?0:(180+Math.atan2(-o,-a)*180/Math.PI+360)%360}else return ai(n,t,i,r)-ai(e,s,i,r)}function oi(n,t,e){const s=(n+"").split(";"),i=/^\s+|\s+$/g;for(let r=0,a=s.length;r<a;r++){const o=s[r].split(":"),h=o[0].replace(i,"").replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()});(!e||e.includes(h))&&(t[h]=o[1].replace(i,""))}}const hi=["id","class","viewBox","width","height","x","y","cx","cy","r","rx","ry","cursor","opacity","src","fill","fill-opacity","stroke","stroke-dasharray","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","font","font-family","font-size","font-style","font-weight","letter-spacing"];class pf{app;rootEl;ue;shapes=[];isMouseDown=!1;currentMouseInShape;currentEnableDragMouseInShape;dragDx=0;dragDy=0;constructor(t,e,s){this.app=t,this.rootEl=vt.createSVGElement("svg"),this.ue=$t(this.rootEl);const i=$t(this.app.container);i.empty(),i.insert(this.rootEl),e&&s?this.setSize(e,s):(this.setSize(this.app.width,this.app.height),this.app.on("resize",()=>{this.setSize(this.app.width,this.app.height)})),this.app.captureDrag({start:()=>{this.isMouseDown=!0,this.dragDx=0,this.dragDy=0,this.setCursor()},end:()=>{this.isMouseDown=!1,this.dragDx=0,this.dragDy=0,this.setCursor()},move:(r,a)=>{this.currentEnableDragMouseInShape&&(this.dragDx+=a.dx,this.dragDy+=a.dy),this.setCursor()}}),this.app.on("tap",()=>{for(const r of this.shapes)if(this.currentMouseInShape==r){r.emit("clicked",r);let a=r.parent;for(;a;)a.emit("clicked",r),a=a.parent;break}})}setCursor(){this.currentEnableDragMouseInShape?(this.app.container.style.cursor="grab",this.isMouseDown&&(this.app.container.style.cursor="grabbing")):this.currentMouseInShape?this.app.container.style.cursor="pointer":this.app.container.style.cursor="default"}setSize(t,e){return ne(this.rootEl,{viewBox:`0 0 ${t} ${e}`,width:`${t}`,height:`${e}`}),this}download(){return vt.downloadFromSVGElement(this.rootEl)}_addDrawShape(t){this.shapes.findIndex(e=>e.id==t.id)===-1&&(this.shapes.push(t),t instanceof ot&&t.shapes.forEach(e=>{this._addDrawShape(e)}))}path(t){(Array.isArray(t)?t:[t]).forEach(e=>{this._addDrawShape(e)}),this.isMouseDown&&this.currentEnableDragMouseInShape||(this.currentMouseInShape=void 0);for(const e of this.shapes){if(!e.isShow){e.el&&(e.el.remove(),delete e.el);continue}if(e.frameStart(this.app.mousePoint),e.el||(e instanceof Ke?e.el=this.text(e.text,e.x,e.y,Ui(e.getAttrs(),(i,r)=>typeof r=="string")):(e.el=vt.createSvgPath(e.toSVGPathD(),e.id),this.ue.insert(e.el))),e.followMouse&&(!hs(e.x,this.app.mousePoint.x,5)||!hs(e.y,this.app.mousePoint.y,5))&&e.followTo(this.app.mousePoint),e.targetToAfterDragFree&&(this.isMouseDown||e.runEaseTo({x:e.targetToAfterDragFree.targetX,y:e.targetToAfterDragFree.targetY},{easing:e.targetToAfterDragFree?.easing})),this.isMouseDown&&this.currentEnableDragMouseInShape==e){e.isDragging=!0;const i=this.dragDx,r=this.dragDy;if(this.dragDx=0,this.dragDy=0,i||r){if(e.x+=i,e.y+=r,e.alongPath){const a=e.alongPath.closestPoint(e.x,e.y);e.x=a.point.x-e.cX,e.y=a.point.y-e.cY}e.emit("draging",i,r)}}else e.isDragging=!1;e instanceof Ke&&(e.setAttr("x",String(e.x)),e.setAttr("y",String(e.y))),e.frameUpdate(this.app.mousePoint);const s=e.toSVGPathD();if(this.attr(e,Ui(e.getAttrs(),(i,r)=>typeof r=="string")),this.attr(e,"d",s),!this.currentMouseInShape){const i=e.isPointInPath(this.app.mousePoint.x,this.app.mousePoint.y,this.rootEl)||e.isPointInStroke(this.app.mousePoint.x,this.app.mousePoint.y,this.rootEl)||!1;e.isMouseIn=i,i&&(this.currentMouseInShape=e,e.enableDrag&&(this.currentEnableDragMouseInShape=e))}e.frameEnd(this.app.mousePoint)}this.currentMouseInShape||(this.currentEnableDragMouseInShape=void 0)}delete(t){(Array.isArray(t)?t:[t]).forEach(e=>{e.el&&e.el.remove(),delete e.el,this.shapes=this.shapes.filter(s=>s.id!==e.id)})}clear(){this.shapes.forEach(t=>{t.el&&t.el.remove(),delete t.el}),this.ue.empty(),this.shapes=[]}attr(t,e,s){const i=t.el||t;return i instanceof SVGElement?e===void 0&&s===void 0?ne(i):typeof e=="string"&&s===void 0?ne(i,ct(e))||"":(typeof e=="object"?ne(i,e):typeof e=="string"&&s!==void 0&&ne(i,ct(e),s),this):this}circle(t,e,s){return this.path(new jt({x:t,y:e,radius:s}))}circleEl(t,e,s){const i=vt.createSVGElement("circle",{cx:String(t),cy:String(e),r:String(s)});return this.ue.insert(i),i}ellipse(t,e,s,i){return this.path(new Ya({x:t,y:e,rx:s,ry:i}))}ellipseEl(t,e,s,i){const r=vt.createSVGElement("ellipse",{cx:String(t),cy:String(e),rx:String(s),ry:String(i)});return this.ue.insert(r),r}rect(t,e,s,i){return this.path(new Ht({x:t,y:e,width:s,height:i}))}rectEl(t,e,s,i){const r=vt.createSVGElement("rect",{x:String(t),y:String(e),width:String(s),height:String(i)});return this.ue.insert(r),r}image(t,e,s,i,r){}text(t,e,s,i){const r=vt.createSVGElement("text",{x:String(e),y:String(s)});return $t(r).html(t),this.attr(r,Object.assign({"alignment-baseline":"middle"},i)),this.ue.insert(r),r}textWithTspan(t,e,s,i){const r=i?.["line-height"]||"1.2em",a=vt.createSVGElement("text",{x:String(e),y:String(s)});return t.split(`
|
|
39
39
|
`).forEach((o,h)=>{if(o.trim()){const c=vt.createSVGElement("tspan",{x:String(e),dy:h>0?r:"0"});$t(c).html(o),$t(a).insert(c),this.attr(c,Object.assign({"alignment-baseline":"middle"},i))}}),this.ue.insert(a),a}}class gf extends ot{svgWidth=0;svgHeight=0;width=0;height=0;constructor(t){super(t);const e=new Ba(t.svg).parse();for(let s=0,i=e.length;s<i;s++){const r=e[s];if(r.type=="viewbox"&&r.width&&r.height){if(this.svgWidth=parseFloat(r.width),this.svgHeight=parseFloat(r.height),t.width){const l=this.svgWidth/this.svgHeight;this.width=t.width,this.height=this.width/l}else this.width=this.svgWidth,this.height=this.svgHeight;continue}if(r.type!="path"||!pe.isSVGPath(r.path))continue;const a={};for(const l in r)l==="type"||l==="path"||l==="transform"||(a[l]=r[l]);const o=pe.absolutizeSVGPath(pe.parseSVGPath(r.path)),h=[];let c=[];for(let l=0,d=o.length;l<d;l++){const y=o[l];c.push(y),y[0].toLowerCase()=="z"&&(h.push(c),c=[])}c.length&&h.push(c),h.forEach(l=>{const d=Hn(r.transform??"");d.scale(this.width&&this.svgWidth?this.width/this.svgWidth:1),this.addShape(new j({...t,attrs:{...a,...t?.attrs||{}},d:l,originMatrix:d}))})}}shapeInit(){this.trim()}}class jt extends j{radius;constructor(t){super(t),this.radius=t?.radius||0}getBoundingClientRect(){return{x:this.x-this.radius,y:this.y-this.radius,width:this.radius*2,height:this.radius*2}}toSVGPathData(){return this.radius?[["m",0,-this.radius],["a",this.radius,this.radius,0,1,1,0,2*this.radius],["a",this.radius,this.radius,0,1,1,0,-2*this.radius],["z"]]:[["m",0,0]]}toCanvasContext(t){t.beginPath(),t.arc(0,0,this.radius,0,Math.PI*2,!0),t.closePath()}eq(t){return this.x===t.x&&this.y===t.y&&this.radius===t.radius&&this.mass===t.mass}midPointBtw(t){return{x:this.x+(t.x-this.x)/2,y:this.y+(t.y-this.y)/2}}length(){return Rs(this.x,this.y)}scalar(t){return this.x*=t,this.y*=t,this}normalize(t=1){const e=this.length();if(e){const s=t/e;this.scalar(s)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,s=this.y;return{x:s*t.x-e*t.y,y:e*t.y-s*t.x}}multiply(t){return{x:this.x*t.x,y:this.y*t.y}}div(t){return{x:this.x/t.x,y:this.y/t.y}}add(t){return{x:this.x+t.x,y:this.y+t.y}}sub(t){return{x:this.x-t.x,y:this.y-t.y}}dot(t){return this.x*t.x+this.y*t.y}reflect(t){const e=this.dot(t);return{x:this.x-2*e*t.x,y:this.y-2*e*t.y}}checkCollision(t){const e=t.x-this.x,s=t.y-this.y;if(Math.sqrt(e*e+s*s)<this.radius+t.radius){const r=Math.atan2(s,e),a={x:0,y:0},o=Mt(-r,e,s),h=Mt(-r,this.vx,this.vy),c=Mt(-r,t.vx,t.vy),l=h.x-c.x;h.x=((this.mass-t.mass)*h.x+2*t.mass*c.x)/(this.mass+t.mass),c.x=l+h.x;const d=Math.abs(h.x)+Math.abs(c.x),y=this.radius+t.radius-Math.abs(a.x-o.x);a.x+=h.x/d*y,o.x+=c.x/d*y;const b=Mt(r,a.x,a.y),w=Mt(r,o.x,o.y);t.x=this.x+w.x,t.y=this.y+w.y,this.x=this.x+b.x,this.y=this.y+b.y;const _=Mt(r,h.x,h.y),S=Mt(r,c.x,c.y);this.vx=_.x,this.vy=_.y,t.vx=S.x,t.vy=S.y}}checkWall(t){const e=typeof t?.bounce=="number"?t.bounce:-1,s=t.wall.x,i=t.wall.y,r=t.wall.x+t.wall.width,a=t.wall.y+t.wall.height;this.x+this.radius>r?(this.x=r-this.radius,this.vx*=e):this.x-this.radius<s&&(this.x=s+this.radius,this.vx*=e),this.y+this.radius>a?(this.y=a-this.radius,this.vy*=e):this.y-this.radius<i&&(this.y=i+this.radius,this.vy*=e)}}class Ua extends j{points;isStraight;constructor(t){if(super(t),this.points=t.points,this.points.length<3)throw new Error("points length must >= 3");this.isStraight=typeof t?.isStraight=="boolean"?t.isStraight:!0}toSVGPathData(){const t=[],e=this.points.length;if(this.isStraight){t.push(["M",this.points[0].x,this.points[0].y]);for(let s=1;s<=e-1;s++)t.push(["L",this.points[s].x,this.points[s].y]);t.push(["Z"])}else{const s=(this.points[0].x+this.points[e-1].x)/2,i=(this.points[0].y+this.points[e-1].y)/2;t.push(["M",s,i]);for(let r=0;r<e-1;r++){const a=(this.points[r].x+this.points[r+1].x)/2,o=(this.points[r].y+this.points[r+1].y)/2;t.push(["Q",this.points[r].x,this.points[r].y,a,o])}t.push(["Q",this.points[e-1].x,this.points[e-1].y,s,i])}return t}toCanvasContext(t){t.beginPath();const e=this.points.length;if(this.isStraight){t.moveTo(this.points[0].x,this.points[0].y);for(let s=1;s<=e-1;s++)t.lineTo(this.points[s].x,this.points[s].y);t.closePath()}else{const s=(this.points[0].x+this.points[e-1].x)/2,i=(this.points[0].y+this.points[e-1].y)/2;t.moveTo(s,i);for(let r=0;r<e-1;r++){const a=(this.points[r].x+this.points[r+1].x)/2,o=(this.points[r].y+this.points[r+1].y)/2;t.quadraticCurveTo(this.points[r].x,this.points[r].y,a,o)}t.quadraticCurveTo(this.points[e-1].x,this.points[e-1].y,s,i)}}isContainPoint(t,e){const s=this.points.length;let i=!1;const r=2e-10;for(let a=0,o=s-1;a<s;o=a,a++){const h=this.points[a].x,c=this.points[a].y,l=this.points[o].x,d=this.points[o].y;if(h===t&&c===e||l===t&&d===e||e===c&&e===d)return!0;if(e>=c&&e<d||e<c&&e>=d){const y=(l-h)/(d-c),b=h+y*(e-c);if(b===t||Math.abs(b-t)<r)return!0;b>t&&(i=!i)}}return i}[Symbol.iterator](){let t=-1;return{next:()=>({value:t<=this.points.length-1?this.points[++t]:void 0,done:t>=this.points.length})}}}class Ht extends j{width;height;borderRadius;constructor(t){super(t),this.width=t.width,this.height=t.height,this.borderRadius=t.borderRadius||0}static fromCubicBezier(t,e,s,i,r,a,o,h){const c=new yt({x:t,y:e,c1x:s,c1y:i,c2x:r,c2y:a,toX:o,toY:h});return new Ht(c.getBoundingClientRect())}getBoundingClientRect(){return{x:this.x,y:this.y,width:this.width,height:this.height}}toSVGPathData(){return this.borderRadius?[["m",this.borderRadius,0],["l",this.width-this.borderRadius*2,0],["a",this.borderRadius,this.borderRadius,0,0,1,this.borderRadius,this.borderRadius],["l",0,this.height-this.borderRadius*2],["a",this.borderRadius,this.borderRadius,0,0,1,-this.borderRadius,this.borderRadius],["l",this.borderRadius*2-this.width,0],["a",this.borderRadius,this.borderRadius,0,0,1,-this.borderRadius,-this.borderRadius],["l",0,this.borderRadius*2-this.height],["a",this.borderRadius,this.borderRadius,0,0,1,this.borderRadius,-this.borderRadius],["z"]]:[["m",0,0],["l",this.width,0],["l",0,this.height],["l",-this.width,0],["z"]]}toCanvasContext(t){t.beginPath(),this.borderRadius<=0?t.rect(0,0,this.width,this.height):(t.moveTo(0,this.borderRadius),t.lineTo(0,this.height-this.borderRadius),t.quadraticCurveTo(0,this.height,this.borderRadius,this.height),t.lineTo(this.width-this.borderRadius,this.height),t.quadraticCurveTo(this.width,this.height,this.width,this.height-this.borderRadius),t.lineTo(this.width,this.borderRadius),t.quadraticCurveTo(this.width,0,this.width-this.borderRadius,0),t.lineTo(this.borderRadius,0),t.quadraticCurveTo(0,0,0,this.borderRadius)),t.closePath()}eq(t){return this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height&&this.borderRadius===t.borderRadius}isIntersectRect(t){return!(this.x+this.width<t.x||t.x+t.width<this.x||this.y+this.height<t.y||t.y+t.height<this.y)}isContainPoint(t,e){return t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height}}class Ya extends j{rx;ry;constructor(t){super(t),this.rx=t?.rx||0,this.ry=t?.ry||0}getBoundingClientRect(){return{x:this.x-this.rx,y:this.y-this.ry,width:this.rx*2,height:this.ry*2}}toSVGPathData(){return[["m",0,-this.ry],["a",this.rx,this.ry,0,1,1,0,2*this.ry],["a",this.rx,this.ry,0,1,1,0,-2*this.ry],["z"]]}toCanvasContext(t){t.beginPath(),t.ellipse(0,0,this.rx,this.ry,0,0,2*Math.PI,!0),t.closePath()}}class yf extends j{constructor(t){super(t)}toSVGPathData(){return[["m",-50,-25],["l",50,0],["l",0,-25],["l",50,50],["l",-50,50],["l",0,-25],["l",-50,0],["l",0,-50],["z"]]}toCanvasContext(t){t.beginPath(),t.moveTo(-50,-25),t.lineTo(0,-25),t.lineTo(0,-50),t.lineTo(50,0),t.lineTo(0,50),t.lineTo(0,25),t.lineTo(-50,25),t.lineTo(-50,-25),t.closePath()}}class wf extends j{constructor(t){super(t)}toSVGPathData(){return[["m",4,24],["l",4,-8],["l",6,-6],["l",1,-10],["l",-6,-10],["l",-7,10],["l",-4,0],["l",-7,-10],["l",-6,10],["l",1,10],["l",6,6],["l",4,8],["z"]]}toCanvasContext(t){t.beginPath(),t.moveTo(4,24),t.lineTo(8,16),t.lineTo(14,10),t.lineTo(15,0),t.lineTo(9,-10),t.lineTo(2,0),t.lineTo(-2,0),t.lineTo(-9,-10),t.lineTo(-15,0),t.lineTo(-14,10),t.lineTo(-8,16),t.lineTo(-4,24),t.closePath()}}class xf extends j{rx;ry;constructor(t){super(t),this.rx=t?.rx||10,this.ry=t?.ry||10}toSVGPathData(){return[["m",0,0],["l",this.rx*2.4,-this.ry*3.14],["a",this.rx/2,this.ry/2,0,0,0,-this.rx*2.4,-this.ry*1.5],["a",this.rx/2,this.ry/2,0,0,0,-this.rx*2.4,this.ry*1.5],["l",this.rx*2.4,this.ry*3.14],["z"]]}}class bf extends j{rx;ry;constructor(t){super(t),this.rx=t?.rx??50,this.ry=t?.ry??50}toSVGPathData(){return[["m",0,0+this.ry*.3],["C",0,0,0-this.rx/2,0,0-this.rx/2,0+this.ry*.3],["C",0-this.rx/2,0+(this.ry+this.ry*.3)/2,0,0+(this.ry+this.ry*.3)/1.4,0,0+this.ry],["C",0,0+(this.ry+this.ry*.3)/1.8,0+this.rx/2,0+(this.ry+this.ry*.3)/2,0+this.rx/2,0+this.ry*.3],["C",0+this.rx/2,0,0,0,0,0+this.ry*.3],["z"]]}}class vf extends j{r;constructor(t){super(t),this.r=t?.r||20}toSVGPathData(){const t=[["m",0,-this.r]];for(let e=0;e<6;e+=1){const s=288+e*144,i=this.r*Math.cos(B(s)),r=this.r*Math.sin(B(s));t.push(["l",i,r])}return t}}class Sf extends j{constructor(t){super(t)}toSVGPathData(){return[["M",0,0],["C",15,0,15,-40,5,-30],["L",0,0],["C",-15,0,-15,-40,-5,-30],["L",0,0],["a",15,15,0,1,1,0,2*15],["a",15,15,0,1,1,0,-2*15]]}}class Tf extends j{constructor(t){super(t),this.originD="m5.068 9.267-3.08-.77a.512.512 0 0 1 0-.994l3.08-.77a2.289 2.289 0 0 0 1.665-1.665l.77-3.08a.512.512 0 0 1 .994 0l.77 3.08c.205.82.845 1.46 1.665 1.665l3.08.77a.512.512 0 0 1 0 .994l-3.08.77a2.29 2.29 0 0 0-1.665 1.665l-.77 3.08a.512.512 0 0 1-.994 0l-.77-3.08a2.289 2.289 0 0 0-1.665-1.665Z"}}class Cf extends ot{constructor(t){super(t);const e=new xe({...t,x:this.x,y:this.y,toX:this.x,toY:this.y-140-Math.random()*20}),s=30+Math.random()*30,i=new xe({...t,x:this.x,y:this.y-s,diffYInGroup:-s,toX:this.x+Math.random()*80-40,toY:this.y-100-Math.random()*40}),r=60+Math.random()*40,a=new xe({...t,x:this.x,y:this.y-r,diffYInGroup:-r,toX:this.x+Math.random()*60-30,toY:this.y-110-Math.random()*20});this.addShape([e,i,a])}}class Ke extends j{text;width=0;height=0;constructor(t){super(t),this.text=t.text,this.setAttr({fontSize:"10px",fontFamily:'system-ui, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif',emojiFontFamily:'"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif',fill:"#666666",stroke:"none","alignment-baseline":"middle",textAnchor:"start",...this.getAttrs()});const e=cn(this.getAttr("fontSize"),10).number,s=cn(this.getAttr("fontWeight"),400).number,i=this.measureText(this.text,e,s);this.width=i.width,this.height=i.height}getBoundingClientRect(){return null}toSVGPathData(){return[]}toCanvasContext(t){t.fillText(this.text,0,0)}measureText(t,e=12,s=400){const i=document.createElement("span");i.style.visibility="hidden",i.style.margin="0",i.style.padding="0",i.style.inset="0",i.style.whiteSpace="nowrap",i.style.overflow="visible",i.style.fontSize=e+"px",i.style.fontWeight=s.toString(),i.innerText=t,document.body.appendChild(i);const r=i.offsetWidth,a=i.offsetHeight;return document.body.removeChild(i),{width:r,height:a}}getFixedWidthText(t,e,s=12,i=400,r=!0){let a="";if(!t||e<s)return a;const o=t.split(""),h="...";let c=r?this.measureText(h,s,i).width:0;for(let l=0,d=o.length;l<d;l++)if(c+=this.measureText(o[l],s,i).width,c>e){r&&(a+=h);break}else a+=o[l];return a}}class Xa extends ot{text;bg;padding;offset;isShow;textShape;bgShape;constructor(t){super(t),this.text=t.text,this.bg=t.bg||"rgba(0,0,0,0.5)",this.padding=t.padding||4,this.offset=t.offset||20,this.isShow=typeof t?.isShow=="boolean"?t?.isShow:!1,this.textShape=new Ke({...t,x:this.x+this.offset,y:this.y+this.offset,text:this.text,attrs:{...this.getAttrs(),fill:We(this.bg).opposite(!0).toString(),textAnchor:"start"}}),this.bgShape=new Ht({...t,x:this.textShape.x-this.padding,y:this.textShape.y-this.textShape.height/2-this.padding,width:this.textShape.width+this.padding*2,height:this.textShape.height+this.padding*2,attrs:{...this.getAttrs(),fill:this.bg}}),this.addShape([this.bgShape,this.textShape])}shapeInit(){gt(()=>{this.textShape.x=this.x+this.offset,this.textShape.y=this.y+this.offset,this.textShape.text=this.text,this.textShape.isShow=this.isShow,this.bgShape.x=this.textShape.x-this.padding,this.bgShape.y=this.textShape.y-this.textShape.height/2-this.padding,this.bgShape.width=this.textShape.width+this.padding*2,this.bgShape.height=this.textShape.height+this.padding*2,this.bgShape.isShow=this.isShow})}}class Pf extends ot{radius;expandRaidus;startDegree;endDegree;text="";defaultShowText;tip="";p1=new jt;p1Offset=10;p2=new jt;p2Offset=40;p3=new jt;p3Offset=10;p4=new jt;p4Offset=10;direction=1;sectorArc;line12;line23;textShape;tipShape;constructor(t){super(t),this.radius=t.radius,this.expandRaidus=t.expandRaidus??20,this.startDegree=t.startDegree,this.endDegree=t.endDegree,this.text=t.text||"",this.defaultShowText=typeof t?.defaultShowText=="boolean"?t.defaultShowText:!!this.text,this.tip=t.tip||"",this.sectorArc=new za({x:this.x,y:this.y,radius:this.radius,expandRaidus:this.expandRaidus,startDegree:this.startDegree,endDegree:this.endDegree,attrs:Object.assign({...this.getAttrs()},{strokeWidth:"0"})}),this.addShape(this.sectorArc);const e=Object.assign({...this.getAttrs()},{fill:"none"});this.line12=new xe({x:this.p1.x,y:this.p1.y,toX:this.p2.x,toY:this.p2.y,attrs:{...e},isShow:this.defaultShowText}),this.line23=new xe({x:this.p2.x,y:this.p2.y,toX:this.p3.x,toY:this.p3.y,attrs:{...e},isShow:this.defaultShowText}),this.textShape=new Ke({x:this.p4.x,y:this.p4.y,text:this.text,attrs:{stroke:e.stroke,textAnchor:this.direction==1?"start":"end"},isShow:this.defaultShowText}),this.text&&(this.addShape(this.line12),this.addShape(this.line23),this.addShape(this.textShape)),this.tipShape=new Xa({x:0,y:0,text:this.tip,isShow:!1}),this.tip&&this.addShape(this.tipShape)}frameUpdate(t){this.text&&!this.defaultShowText&&(this.line12.isShow=this.sectorArc.isMouseIn,this.line23.isShow=this.sectorArc.isMouseIn,this.textShape.isShow=this.sectorArc.isMouseIn);const e=this.startDegree+(this.endDegree-this.startDegree)/2,{dx:s,dy:i}=Nt(B(e),this.sectorArc.radius+this.p1Offset);this.p1.x=this.x+s,this.p1.y=this.y+i;const{dx:r,dy:a}=Nt(B(e),this.sectorArc.radius+this.p1Offset+this.p2Offset);this.p2.x=this.x+r,this.p2.y=this.y+a,this.line12.x=this.p1.x,this.line12.y=this.p1.y,this.line12.toX=this.p2.x,this.line12.toY=this.p2.y,this.direction=this.p1.x>this.x?1:-1,this.p3.x=this.p2.x+this.direction*this.p3Offset,this.p3.y=this.p2.y,this.p4.x=this.p3.x+this.direction*this.p4Offset,this.p4.y=this.p3.y,this.line23.x=this.p2.x,this.line23.y=this.p2.y,this.line23.toX=this.p3.x,this.line23.toY=this.p3.y,this.textShape.x=this.p4.x,this.textShape.y=this.p4.y,this.textShape.setAttr("textAnchor",this.direction==1?"start":"end"),this.sectorArc.isMouseIn?(this.tipShape.isShow=!0,this.tipShape.x=t.x,this.tipShape.y=t.y):(this.tipShape.isShow=!1,this.tipShape.x=t.x,this.tipShape.y=t.y)}}class za extends j{radius;realRadius;expandRaidus;startDegree;endDegree;vr;ar;bounce;durationTime;status;constructor(t){super(t),this.radius=0,this.realRadius=t.radius,this.expandRaidus=t.expandRaidus??20,this.startDegree=t.startDegree,this.endDegree=t.endDegree,this.vr=0,this.ar=.03,this.bounce=.6,this.durationTime=1e3/120,this.status=0}frameUpdate(){this.status==0&&this.radius<this.realRadius?(this.expand(this.realRadius),this.radius>=this.realRadius&&(this.status=1)):this.isMouseIn?this.expand(this.realRadius+this.expandRaidus):this.shrink(this.realRadius)}expand(t){this.vr+=this.ar,this.radius+=this.vr*this.durationTime,this.radius>t&&(this.radius=t,this.vr*=-this.bounce)}shrink(t){this.vr-=this.ar,this.radius+=this.vr*this.durationTime,this.radius<t&&(this.radius=t,this.vr*=-this.bounce)}toSVGPathData(){const{dx:t,dy:e}=Nt(B(this.startDegree),this.radius),{dx:s,dy:i}=Nt(B(this.endDegree),this.radius);return[["m",0,0],["l",t,e],["a",this.radius,this.radius,0,Math.abs(this.endDegree-this.startDegree)>=180?1:0,1,s-t,i-e],["z"]]}toCanvasContext(t){t.beginPath(),t.moveTo(0,0),t.arc(0,0,this.radius,B(this.startDegree),B(this.endDegree),!1),t.closePath()}containPoint(t,e){const s=Os(this.x,this.y,t,e),i=at(se(this.x,this.y,t,e));return s<=this.radius&&i>=this.startDegree&&i<=this.endDegree}}class Ef extends ot{showFlame;ship;flame;constructor(t){super(t),this.showFlame=typeof t?.showFlame=="boolean"?t.showFlame:!1,this.ship=new j({...t,d:[["M",10,0],["L",-10,10],["L",-5,0],["L",-10,-10],["L",10,0],["Z"]]}),this.addShape(this.ship),this.flame=new j({...t,isShow:this.showFlame,d:[["m",-10,-5],["l",-7.5,5],["l",7.5,5],["z"]]}),this.addShape(this.flame)}shapeInit(){gt(()=>{this.ship.x=this.x,this.ship.y=this.y,this.flame.x=this.x,this.flame.y=this.y,this.flame.isShow=this.showFlame})}}class _f extends ot{value;backgroundRect;occupyRect;handle;constructor(t){super(t);const e=t?.min||0,s=t?.max||100,i=t?.step||1,r=Uo(e,s,i);this.value=r(typeof t?.defaultValue=="number"?H(t.defaultValue,e,s):e);const a=this.value/(s-e),o=t?.barWidth||100,h=t?.barHeight||4,c=t?.handleRadius||10,l=h*.5,d=t?.barColor||ei.colorGrayF5,y=t?.handleColor||ei.colorPrimary;this.backgroundRect=new Ht({x:this.x,y:this.y,width:o,height:h,borderRadius:l,attrs:{fill:d},enableDrag:!1,independentTransformInGroup:!0}),this.addShape(this.backgroundRect),this.occupyRect=new Ht({x:this.x,y:this.y,width:o*a,height:h,borderRadius:l,attrs:{fill:y},enableDrag:!1,independentTransformInGroup:!0}),this.addShape(this.occupyRect),this.handle=new jt({x:this.x+o*a,y:this.y+l,diffXInGroup:o*a,diffYInGroup:l,radius:c,alongPath:new Wl({x:this.x,y:this.y+l,d:[["m",0,0],["l",o,0]]}),attrs:{fill:y},enableDrag:!0,independentTransformInGroup:!0}),this.addShape(this.handle),this.handle.on("draging",b=>{this.occupyRect.width=H(this.occupyRect.width+b,0,o),this.value=r((this.handle.x-this.x)/o*(s-e)+e),this.emit("change",this.value)})}}class Af extends ot{width;height;cornerRadius;controlPoint;mainRect;rightPoint;constructor(t){super(t),this.width=t.width,this.height=t.height,this.cornerRadius=this.height/2,this.controlPoint=new jt({...t,x:this.x,y:this.y,radius:2}),this.forceSetCXY(this.controlPoint.cX,this.controlPoint.cY),this.mainRect=new Ht({...t,x:this.x-this.cornerRadius,y:this.y-this.cornerRadius,diffXInGroup:-this.cornerRadius,diffYInGroup:-this.cornerRadius,width:this.width+this.cornerRadius*2,height:this.height,borderRadius:this.cornerRadius}),this.rightPoint=new jt({...t,x:this.x+this.width,y:this.y,diffXInGroup:this.width,radius:2}),this.addShape([this.mainRect,this.controlPoint,this.rightPoint])}getPin(){return{x:this.controlPoint.x+Math.cos(B(this.controlPoint.degree))*this.width,y:this.controlPoint.y+Math.sin(B(this.controlPoint.degree))*this.width}}}class ci extends j{extendDegree;radius;startDegree;endDegree;diffDegree;constructor(t){super(t),this.extendDegree=t?.extendDegree||0,this.x=(t.x||0)+t.width/2;const e=Math.min(t.width/2,t.height)-t.lineWidth;this.radius=e-e*Math.abs(Math.sin(B(this.extendDegree))),this.y=(t.y||0)+t.height-t.lineWidth-this.radius*Math.abs(Math.sin(B(this.extendDegree))),this.diffDegree=t.endDegree-t.startDegree,this.startDegree=180+t.startDegree-this.extendDegree,this.endDegree=180+t.endDegree+this.extendDegree,this.setAttr({"stroke-linecap":"round","stroke-width":String(t.lineWidth),stroke:t.color||"none"})}setPercent(t){this.endDegree=this.startDegree+(this.diffDegree+this.extendDegree*2)*t}toSVGPathData(){const{dx:t,dy:e}=Nt(B(this.startDegree),this.radius),{dx:s,dy:i}=Nt(B(this.endDegree),this.radius);return[["m",t,e],["a",this.radius,this.radius,0,Math.abs(this.endDegree-this.startDegree)>=180?1:0,1,s-t,i-e]]}toCanvasContext(t){t.beginPath(),t.arc(0,0,this.radius,B(this.startDegree),B(this.endDegree),!1)}}class Df extends ot{percent=0;ringBg;ring;lines=[];bgColor;startColor;endColor;indicatorLineCount;constructor(t){super(t);const e=t?.startDegree||0,s=t?.endDegree||180,i=t?.extendDegree||15,r=t?.lineWidth||12;this.bgColor=t?.bgColor||"#B3C6E7",this.startColor=t?.startColor||"#5A82F0",this.endColor=t?.endColor||"#66B3FF",this.percent=t?.percent||0,this.indicatorLineCount=22+1;const a=20,o=2,h=17;this.ringBg=new ci({...t,x:t?.x,y:t?.y,width:t.width,height:t.height,startDegree:e,endDegree:s,extendDegree:i,lineWidth:r,color:this.bgColor}),this.addShape(this.ringBg),this.ring=new ci({...t,x:t?.x,y:t?.y,width:t.width,height:t.height,startDegree:e,endDegree:s,extendDegree:i,lineWidth:r}),this.addShape(this.ring);const c=this.ringBg.y-this.ringBg.radius+a;for(let l=0;l<this.indicatorLineCount;l++)this.lines.push(new xe({...t,centerX:this.ringBg.x,centerY:this.ringBg.y,x:this.ringBg.x,y:c,toX:this.ringBg.x,toY:c+h,degree:this.ringBg.startDegree+90+(s-e+i*2)/(this.indicatorLineCount-1)*l,attrs:{"stroke-linecap":"round","stroke-width":String(o),stroke:this.bgColor}}));this.addShape(this.lines)}setPercent(t){this.percent=t}shapeInit(){this.on("draging",(t,e,s)=>{this.shapes.forEach(i=>{i!=s&&(i.x+=t,i.y+=e)})})}frameUpdate(t,e){const s=this.ringBg.radius-this.ringBg.radius*Math.cos(Math.PI*this.percent),i=this.ringBg.radius*Math.sin(Math.PI*this.percent);if(e){const r=e.createLinearGradient(-this.ringBg.radius,0,-this.ringBg.radius+s,-i,{0:this.startColor,1:this.endColor});this.ring.setAttr({stroke:r})}else this.ring.setAttr({stroke:this.startColor});this.ring.setPercent(this.percent);for(let r=0;r<this.indicatorLineCount;r++){const a=r/(this.indicatorLineCount-1)<=this.percent;this.lines[r].setAttr({stroke:a&&e?e.createLinearGradient(0,0,this.lines[r].toX-this.lines[r].x,this.lines[r].toY-this.lines[r].y,{0:this.startColor,1:this.endColor}):a?this.startColor:this.bgColor})}}}class If extends j{x;y;z;brightness;constructor(t){super(t),this.x=t?.x||0,this.y=t?.y||0,this.z=t?.z||0,this.brightness=this.setBrightness(t?.brightness||1)}setBrightness(t){return this.brightness=H(t,0,1),this.brightness}toSVGPathData(){return[]}}const Mf=If;class kf extends j{points;light;constructor(t=[]){if(t.length<3)throw new Error("points length must >= 3");super(),this.points=t,this.light=new Mf({x:0,y:0,z:0,brightness:1})}toSVGPathData(){const t=[];t.push(["M",this.points[0].getScreenX(),this.points[0].getScreenY()]);for(let e=0,s=this.points.length;e<=s-1;e++)t.push(["L",this.points[e].getScreenX(),this.points[e].getScreenY()]);return t.push(["L",this.points[0].getScreenX(),this.points[0].getScreenY()]),t}toCanvasContext(t){t.beginPath(),t.moveTo(0,0);for(let e=0,s=this.points.length;e<=s-1;e++)t.lineTo(this.points[e].getScreenX()-this.points[0].getScreenX(),this.points[e].getScreenY()-this.points[0].getScreenY());t.lineTo(0,0)}get length(){return this.points.length}getDepth(){return Math.min(...this.points.map(t=>t.z))}isBackface(){const t=this.points[2].getScreenX()-this.points[0].getScreenX(),e=this.points[2].getScreenY()-this.points[0].getScreenY(),s=this.points[1].getScreenX()-this.points[2].getScreenX(),i=this.points[1].getScreenY()-this.points[2].getScreenY();return t*i>e*s}getLightFactor(){const t={x:this.points[0].x-this.points[1].x,y:this.points[0].y-this.points[1].y,z:this.points[0].z-this.points[1].z},e={x:this.points[1].x-this.points[2].x,y:this.points[1].y-this.points[2].y,z:this.points[1].z-this.points[2].z},s={x:t.y*e.z-t.z*e.y,y:-(t.x*e.z-t.z*e.x),z:t.x*e.y-t.y*e.x},i=s.x*this.light.x+s.y*this.light.y+s.z*this.light.z,r=Math.sqrt(s.x*s.x+s.y*s.y+s.z*s.z),a=Math.sqrt(this.light.x*this.light.x+this.light.y*this.light.y+this.light.z*this.light.z);return Math.acos(i/(r*a))/Math.PI*this.light.brightness}getAdjustedColor(t){const e=We(t),s=this.getLightFactor();return e.r*=s,e.g*=s,e.b*=s,e.toString()}}class Lf extends ot{fettis=[];constructor(t,e,s){super();const{shape:i,x:r,y:a,particleCount:o,angle:h,spread:c,startVelocity:l,decay:d,gravity:y,drift:b,ticks:w,colors:_,scalar:S,flat:v}=Object.assign({shape:Ht,x:.5,y:.6,particleCount:100,angle:90,spread:70,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,colors:Ma,scalar:1,flat:!1},s||{}),x=B(h),p=B(c);let g=o;for(;g--;){const E=_[g%_.length],C=new i({x:t*r,y:e*a,width:10,height:10,scalar:S,attrs:{fill:E},independentTransformInGroup:!0});this.addShape(C),this.fettis.push({shape:C,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:l*.5+Math.random()*l,angle2D:-x+(.5*p-Math.random()*p),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,tick:0,totalTicks:w,decay:d,drift:b,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:y*3,scalar:S,flat:v,color:We(E)})}}frameUpdate(t){this.fettis.length&&(this.fettis=this.fettis.filter(e=>{e.shape.x+=Math.cos(e.angle2D)*e.velocity+e.drift,e.shape.y+=Math.sin(e.angle2D)*e.velocity+e.gravity,e.velocity*=e.decay,e.flat?(e.wobble=0,e.wobbleX=e.shape.x+10*e.scalar,e.wobbleY=e.shape.y+10*e.scalar,e.tiltSin=0,e.tiltCos=0,e.random=1):(e.wobble+=e.wobbleSpeed,e.wobbleX=e.shape.x+10*e.scalar*Math.cos(e.wobble),e.wobbleY=e.shape.y+10*e.scalar*Math.sin(e.wobble),e.tiltAngle+=.1,e.tiltSin=Math.sin(e.tiltAngle),e.tiltCos=Math.cos(e.tiltAngle),e.random=Math.random()+2);const s=e.tick++/e.totalTicks,i=e.shape.x+e.random*e.tiltCos,r=e.shape.y+e.random*e.tiltSin,a=e.wobbleX+e.random*e.tiltCos,o=e.wobbleY+e.random*e.tiltSin;return e.shape.setAttr("fill",e.color.setAlpha(1-s).toString()),e.shape.degree=at(Math.PI/10*e.wobble),e.shape.scalarX=Math.abs(a-i)*.1,e.shape.scalarY=Math.abs(o-r)*.1,e.tick<e.totalTicks}))}}class li{shapes;constructor(t){this.shapes=t}run(t){this.shapes.forEach(s=>{s.run(),t?.wall&&s.checkWall({wall:t.wall,bounce:t.bounce})});const e=this.shapes.length;for(let s=0,i=e-1;s<i;s++)for(let r=s+1;r<e;r++)this.shapes[s].checkCollision(this.shapes[r])}gravitate(){const t=this.shapes.length;this.shapes.forEach((e,s)=>{e.run();for(let i=s+1;i<t;i++)e.checkCollision(this.shapes[i]),e.gravitateTo(this.shapes[i])})}springChain(t){this.shapes.forEach((e,s)=>{s>0&&e.runSpringTo(this.shapes[s-1],t)})}springConnect(t){const e=Kt(t?.springLength,100);this.shapes.forEach(s=>{s.isDragging||this.shapes.filter(i=>i.id!==s.id).forEach(i=>{const r=se(s.x,s.y,i.x,i.y);s.runSpringTo({x:i.x-Math.cos(r)*e,y:i.y-Math.sin(r)*e},t)})})}springMass(t,e){const s=this.shapes.length,i=[];return this.shapes.forEach((r,a)=>{r.run(e),r.x>t.x+t.width?r.x=t.x:r.x<t.x&&(r.x=t.x+t.width),r.y>t.y+t.height?r.y=t.y:r.y<t.y&&(r.y=t.y+t.height);for(let o=a+1;o<s;o++)i.push([r.x,r.y,this.shapes[o].x,this.shapes[o].y,r.springMassTo(this.shapes[o],e)])}),i}polymorph(){if(this.shapes.length<2)throw new Error("shapes个数必须大于等于2");const t=this.shapes.length-1,e=new Array(t);for(let i=0;i<t;i++){const r=this.shapes[i].initPathD();this.shapes[i].frameStart();const a=this.shapes[i+1].initPathD();this.shapes[i+1].frameStart();const o=Math.max(r.polymorphPoints.length,a.polymorphPoints.length);e[i]=St.getPathInterpolator(r.expendFill(o),a.expendFill(o))}const s=new j({d:e[0](0)});return i=>{const r=Ot(t*i,6),a=Math.min(Math.floor(r),t-1),o=Ot(r-a,6);s.originD=e[a](o);const h=this.shapes[a].getAttr("fill","none"),c=this.shapes[a+1].getAttr("fill","none");typeof h=="string"&&typeof c=="string"&&s.setAttr("fill",dt.gradient(h,c,o).toString());const l=this.shapes[a].getAttr("stroke","none"),d=this.shapes[a+1].getAttr("stroke","none");return typeof l=="string"&&typeof d=="string"&&s.setAttr("stroke",dt.gradient(l,d,o).toString()),s}}polymorphGroup(){if(this.shapes.length<2)throw new Error("shapes个数必须大于等于2");let t=0,e;const s=[];this.shapes.forEach(o=>{let h;o instanceof ot?(h=o,h.sortPathD()):(h=new ot,h.addShape(o)),s.push(h),t<h.shapes.length&&(t=h.shapes.length,e=h)}),s.forEach(o=>{o!==e&&o.expendFill(e)});const i=[];s.forEach((o,h)=>{o.shapes.forEach((c,l)=>{i[l]=i[l]||[],i[l][h]=c})});const r=[];i.forEach(o=>{r.push(new li(o).polymorph())});const a=new ot;return r.forEach(o=>{a.addShape(o(0))}),o=>(r.forEach(h=>{h(o)}),a)}polymorphTween(t=6e3,e){const s=this.shapes.findIndex(o=>o instanceof ot)>=0?this.polymorphGroup():this.polymorph(),i=s(0),r=e?.onUpdate,a=new ks({frameDuration:t});a.addTween({t:0},{t:1},Object.assign(e||{},{onUpdate:(o,h)=>{s(o.t),r?.(o,h),e?.draw?.(i)}})),a.play()}static generatePointsShape(t,e,s,i){const r=[];for(let a=0;a<i;a++){const o=a/i*2*Math.PI,{dx:h,dy:c}=Nt(o,s);r.push({x:t+h,y:e+c})}return new Ua({points:r})}static generateRosettaShape(t,e,s,i,r){if(r==0)throw new Error("no dividing by zero, please");const a=[],o=360/r;for(let h=0;h<r;h+=1){const c=o*h*Math.PI/180,l=t+2*s*Math.cos(c),d=e+2*s*Math.sin(c);a.push(new qn({x:t,y:e,rx:s,ry:i,xAxisRotate:o*h,largeArcFlag:1,sweepFlag:1,toX:l,toY:d})),a.push(new qn({x:l,y:d,rx:s,ry:i,xAxisRotate:o*h,largeArcFlag:1,sweepFlag:1,toX:t,toY:e}))}return new j({d:St.fromLines(a)})}}const Ga={map:new Map,transform:function(n){if($r)return n;if(this.map.has(n))return this.map.get(n);const t=new OffscreenCanvas(n.width,n.height);return t.getContext("2d")?.drawImage(n,0,0),this.map.set(n,t),t},clear:function(){this.map.clear()}};function Rf(n,t,e){const s=new OffscreenCanvas(n,t),i=s.getContext("2d");if(i)return e(i),s.transferToImageBitmap()}function Of(n,t,e){const s=n.createPattern(Ga.transform(t),"no-repeat");if(s){const i=$n(e);s.setTransform(i),n.fillStyle=s}}function Va(n){return window.URL.createObjectURL(n)}function Ff(n){return window.URL.revokeObjectURL(n)}const qa=new ue;async function ja(n,t=6e4){const e=typeof n=="string"?n:Va(n);return new Promise((s,i)=>{const r=qa.get(e);if(r)return s(r);const a=document.createElement("img");a.onload=h=>{clearTimeout(o);const c=a.naturalWidth||a.width,l=a.naturalHeight||a.height,d={width:c,height:l,aspectRatio:c/l,element:a,imageData:va(a)};qa.set(e,d),s(d),a.onerror=a.onload=null},a.onerror=h=>{clearTimeout(o),i(h)},a.src=e;const o=setTimeout(()=>{i("Timeout!")},t)})}async function ui(n=Ct.text,t=["*"]){const s=(await An(t))[0],i=await Be(s,n);return{type:s.type,name:s.name,size:s.size,data:i}}async function Nf(n=["image/*"]){const e=(await An(n))[0];if(!e.type.match(/image\/*/))return new Error("Not Image Type!");const s=await Be(e,Ct.arraybuffer),i=ln(s),r=await ja(i);return{type:e.type,name:e.name,size:e.size,data:s,width:r.width,height:r.height,aspectRatio:r.aspectRatio,imageData:r.imageData}}function Bf(n,t){const e=t.ctrl||!1,s=t.shift||!1,i=t.alt||!1;return(e===n.metaKey||e===n.ctrlKey)&&s===n.shiftKey&&i===n.altKey&&t.keys.map(r=>r.toLowerCase()).includes(n.key.toLowerCase())}function Uf(n){const t=[];return n.ctrl&&t.push(Mn()?"Cmd":"Ctrl"),n.shift&&t.push("Shift"),n.alt&&t.push("Alt"),t.push(...n.keys),t}function fi(n,t,e){const s=n.target||document||window;let i=!1,r=!1;const a=Z(s,"keydown",async h=>{r||(i=Bf(h,n),i&&(h.stopPropagation(),h.preventDefault(),await t()))}),o=Z(s,"keyup",async h=>{r||i&&e&&(h.stopPropagation(),h.preventDefault(),await e())});return{hotKeys:Uf(n),destroy:()=>{a(),o()},pause:()=>r=!0,resume:()=>r=!1}}const Yf={BACKSPACE:8,TAB:9,COMMA:188,DELETE:46,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,UP:38,DOWN:40,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32};function Xf(n){if(n.key)return n.key;if(n.keyCode)return n.keyCode;if(n.which)return n.which}async function zf(n={keys:["o"]},t=Ct.text){const e=eh(),s=fi(n,async()=>{try{e.resolve(await ui(t))}catch(i){e.reject(i)}s.destroy()},()=>{});return await e.promise}function Gf(n={keys:["o"]},t=Ct.text){const e=te();return fi(n,async()=>{try{e.emit("file",await ui(t))}catch{}},()=>{}),{on:s=>{e.on("file",s)},off:s=>{e.off("file",s)}}}async function Vf(n,t=6e4){return new Promise((e,s)=>{const i=document.createElement("script");i.type="text/javascript",i.async=!1,i.onload=a=>{clearTimeout(r),e(a),i.onerror=i.onload=null},i.onerror=a=>{clearTimeout(r),s(a)},i.src=n;const r=setTimeout(()=>{s("Timeout!")},t);document.body.appendChild(i)})}async function qf(n,t=document.getElementsByTagName("head")[0],e=6e4){return new Promise((s,i)=>{const r=document.createElement("link");r.setAttribute("type","text/css"),r.setAttribute("rel","stylesheet"),r.onload=o=>{clearTimeout(a),s(o),r.onerror=r.onload=null},r.onerror=o=>{clearTimeout(a),i(o)},r.setAttribute("href",n);const a=setTimeout(()=>{i("Timeout!")},e);t.appendChild(r)})}function jf(){return new Promise(n=>{const t=Array.from(document.querySelectorAll("link[rel=stylesheet]"));let e=document.styleSheets.length||0;const s=()=>e>=t.length?(n(),!0):!1;s()||t.forEach(i=>{i.onload=()=>{e+=1,s()}})})}function di(n,t){const e=document.createElement("a");e.style.visibility="hidden",e.download=t,typeof n=="string"?e.href=n:e.href=window.URL.createObjectURL(n),e.click()}const mi=new ue;async function Ha(n,t){if(typeof fetch>"u")throw new Error("fetch() not supported!");if(typeof AbortController>"u")throw new Error("AbortController not supported!");const e=Vs(n,t),s=new AbortController;mi.set(e,s);const{responseType:i,onProgress:r,timeout:a}={responseType:"json",timeout:6e4,...t},o=setTimeout(()=>{throw s.abort(),new Error(`${a} ms Timeout!`)},a);let h=await fetch(new Request(n,{...t,signal:s.signal}));if(mi.delete(e),clearTimeout(o),h.status===200||h.status===0){if(h.status===0&&console.warn("useFetch: HTTP Status 0 received."),typeof ReadableStream<"u"&&h.body!==void 0&&h.body?.getReader!==void 0&&r){const c=h.body.getReader(),l=h.headers.get("X-File-Size")||h.headers.get("Content-Length"),d=l?parseInt(l):0,y=d!==0;let b=0;const w=new ReadableStream({start(_){function S(){c.read().then(({done:v,value:x})=>{v?_.close():(b+=x.byteLength,r?.(new ProgressEvent("progress",{lengthComputable:y,loaded:b,total:d})),_.enqueue(x),S())}).catch(v=>{_.error(v)})}S()}});h=new Response(w)}switch(i){case"arraybuffer":return[h.arrayBuffer(),h];case"blob":return[h.blob(),h];case"json":return[h.json(),h];case"text":default:return[h.text(),h]}}else throw new Ii(`useFetch for "${h.url}" responded with ${h.status}: ${h.statusText}`,h)}const $a=new ue,pi=new ue;async function Hf(n,t){const e=Vs(n,t);try{const s=$a.get(e);if(s)return s;const i=pi.get(e);if(i)return await i;const r=Ha(n,t);pi.set(e,r);const a=await r;return $a.set(e,a),pi.delete(e),a}catch{}}function $f(n,t){const e=mi.get(Vs(n,t));e&&e.abort()}function Vs(n,t){return JSON.stringify({url:n,...t})}function Wf(n,t,e){if(typeof t=="string"&&(t=Fi(t)),(typeof t=="string"||t===void 0)&&e===void 0){const s=Object.assign({},n.dataset);return Object.keys(s).forEach(i=>{if(s[i]?.startsWith("[")||s[i]?.startsWith("{"))try{s[i]=JSON.parse(s[i]||"")}catch{}}),typeof t=="string"?s[t]:s}else{let s={};typeof t=="object"?s=t:typeof t=="string"&&(s[t]=e),Object.entries(s).forEach(([i,r])=>{r?n.dataset[i]=r instanceof Object?JSON.stringify(r):r:delete n.dataset[i]})}}function Jf(n,t){t.split(/[,\s]+/).forEach(e=>{e.trim()!=""&&delete n.dataset[e.trim()]})}function gi(n,t,e="toggle"){const s=t.split(/[,\s]+/);if(n.classList)s.forEach(i=>{const r=i.trim();r!==""&&n.classList[e](r)});else{const i=n.className.split(/ +/);let r=!1;s.forEach(a=>{const o=a.trim();if(o!==""){const h=i.indexOf(o);switch(e){case"add":h===-1&&(i.push(o),r=!0);break;case"remove":h!==-1&&(i.splice(h,1),r=!0);break;case"toggle":h===-1?i.push(o):i.splice(h,1),r=!0;break}}}),r&&ne(n,"class",i.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}}function Zf(n,t){gi(n,t,"add")}function Kf(n,t){gi(n,t,"remove")}function Qf(n,t){return new RegExp("(?:^|\\s+)"+t+"(?:\\s+|$)").test(n.className)||!1}function td(n,t){ge(n,"display")=="none"&&t===void 0||t===!0?Wa(n):Ja(n)}function Wa(n){Wn(n,"display",n instanceof HTMLTableRowElement?"table-row":n instanceof HTMLTableCellElement?"table-cell":"block")}function Ja(n){Wn(n,"display","none")}function $t(n){return{el:n,isRoot:()=>/(html|body)/i.test(n.tagName)||n===document.documentElement,isActive:()=>n===document.activeElement&&(n.type||n.href),getRemSize:function(){return parseFloat(getComputedStyle(document.documentElement).fontSize)},rem2px:function(t){return t*this.getRemSize()},getEmSize:function(){return n.parentElement?parseFloat(getComputedStyle(n.parentElement).fontSize):this.getRemSize()},nearestElement:()=>{let t=n;for(;t&&t.nodeType!==1&&t.parentElement;)t=t.parentElement;return t},parent:()=>n.parentElement,parents:function(t=n,e=[]){return!t||t.parentElement===null?e:this.parents(t.parentElement,e.concat([t]))},scrollParent:function(){const t=this.parents();for(let e=0,s=t.length;e<s;e++)if(/(auto|scroll)/.test(ge(t[e],"overflow")+ge(t[e],"overflow-y")+ge(t[e],"overflow-x")))return t[e];return document.scrollingElement||document.documentElement},contains:t=>n.contains?n!=t&&n.contains(t):!!(n.compareDocumentPosition(t)&16),siblings:()=>Array.prototype.slice.call(n.parentElement?.children).filter(t=>t!==n),nextElementSibling:()=>n.nextElementSibling,previousElementSibling:()=>n.previousElementSibling,closest:t=>n.closest(t),shadowRoot:()=>n.shadowRoot,isInput:()=>n.tagName==="INPUT"||n instanceof HTMLInputElement,isSelect:()=>n.tagName==="SELECT"||n instanceof HTMLSelectElement,isTextArea:()=>n.tagName==="TEXTAREA"||n instanceof HTMLTextAreaElement,isInputCheckbox:function(){return this.isInput(n)&&n.getAttribute("type")==="checkbox"},isInputRadio:function(){return this.isInput(n)&&n.getAttribute("type")==="radio"},isInputText:function(){return this.isInput(n)&&n.getAttribute("type")==="text"},isInputNumber:function(){return this.isInput(n)&&n.getAttribute("type")==="number"},changeSelected:function(t){if(this.isSelect()){const e=n.options;for(let s=0,i=e.length;s<i;s++)e[s].selected=e[s].value==t}},changeRadioChecked:function(t){if(this.isInputRadio()){const e=document.getElementsByName(n.name);for(let s=0,i=e.length;s<i;s++){const r=e[s];r.checked=r.value==t}}},changeCheckboxChecked:function(t){this.isInputCheckbox()&&(n.checked=t)},insert:(t,e="append")=>{typeof t=="string"?n[e](Za(t)):n[e](t)},html:function(t){if(typeof t=="string"){n.innerHTML=t;const e=Ka(n);e!=n&&(n=e)}else this.insert(t,"replaceWith")},empty:function(){this.html("")},text:t=>{n.textContent=t},getInnerText:()=>{if(n instanceof SVGElement)return"";let t=n.innerText;if(!t){const e=n.querySelector("slot")?.assignedNodes()||[];let s=0;for(;!t&&s<=e.length-1;)"innerText"in e[s]&&(t=e[s].innerText),s++}return t},remove:()=>n.remove()}}function Za(n){const t=document.createElement("template");return t.innerHTML=n,t.content.childNodes.forEach(e=>{const s=Ka(e);s!=e&&t.content.replaceChild(s,e)}),t.content}function ed(n){return document.createElement.call(document,n)}function sd(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function nd(n){return document.createTextNode.call(document,n)}function Ka(n){return n.tagName=="SCRIPT"&&(n=Qa(n)),n.querySelectorAll&&n.querySelectorAll("script").forEach(t=>{t.parentNode?.replaceChild(Qa(t),t)}),n}function Qa(n){const t=n.ownerDocument.createElement("script");t.text=n.text;const e=n.attributes;for(let s=0,i=e.length;s<i;s++)t.setAttribute(e[s].name,e[s].value);return t}function id(n){return{shadowRoot:()=>{let t=n;for(;t;){const e=n.parentElement||n.parentNode;if(e)t=e;else break}return t}}}function rd(n,t="http://test.com/localstorage.html"){const e=document.createElement("iframe");e.src=t,document.body.append(e),setTimeout(function(){e.contentWindow?.postMessage(n,t)},4e3),setTimeout(function(){e.remove()},6e3)}async function ad(n){if(navigator.clipboard)return await navigator.clipboard.writeText(n);{const t=document.createElement("textarea");return t.value=n,t.style.opacity="0",t.style.position="fixed",t.style.top="0",t.style.left="0",t.focus(),t.select(),document.execCommand("copy")}}function od(){return"geolocation"in navigator?new Promise((n,t)=>{navigator.geolocation.getCurrentPosition(e=>{const s=e.coords.latitude,i=e.coords.longitude;n({latitude:s,longitude:i})},e=>{t(e)})}):Promise.reject("Geolocation is not available.")}function hd(n=200){"vibrate"in navigator?window.navigator.vibrate(n):console.error("Your device is not support vibrate on this browser.")}function cd(n){const t=new Proxy(window,{get(e,s,i){if(typeof s=="string"&&["open","location","document"].includes(s))throw new Error(`禁止访问 key: ${s}`);return s==="window"?t:Reflect.get(e,s,i)},set(e,s,i,r){return Reflect.set(e,s,i,r)}});new Function("window",`with(window) { ${n} }`)(t,null)}const ld={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:(n,t)=>{switch(t){case"W":return`${n}周`;default:return`${n}日`}},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:(n,t)=>{const e=n*100+t;return e<600?"凌晨":e<900?"早上":e<1100?"上午":e<1300?"中午":e<1800?"下午":"晚上"}},ud={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:n=>{const t=["th","st","nd","rd"],e=n%100;return`[${n}${t[(e-20)%10]||t[e]||t[0]}]`}},he=new ue;let qs="zh-cn";yi(ud),yi(ld);function yi(n,t){if(!n)return he.get(qs);let e;if(typeof n=="string"){const s=n.toLowerCase();if(he.get(s))e=s;else if(t)he.set(s,t),e=s;else return he.get(qs)}else{const{name:s}=n;he.set(s,n),e=s}return e&&(qs=e),he.get(e)||he.get(qs)}function be(n,t={},e=[],s){return{tag:n,props:t,children:e,el:s}}function js(n){return be(n.tagName,Kn(n),Array.from(n.children).map(t=>js(t)),n)}function Ie(n,t=document.documentElement){if(n.el)return n.el;if(n.el=document.createElement(n.tag),n.props)for(const e in n.props){const s=n.props[e];e.startsWith("on")?n.el.addEventListener(e.slice(2).toLowerCase(),s):e==="style"?Xs(n.el,n.props[e]):zs(n.el,e,s)}return n.children&&(typeof n.children=="string"?n.el.appendChild(document.createTextNode(n.children)):n.children.forEach(e=>{Ie(e,n.el)})),t.appendChild(n.el),n.el}function Hs(n,t){if(!n.el)return;if(n.tag!==t.tag){(n.el.parentElement||document.body).replaceChild(Ie(t),n.el);return}const e=t.el=n.el,s=n.props,i=t.props;for(const o in s)o in i||(o.startsWith("on")?e.removeEventListener(o.slice(2).toLowerCase(),s[o]):e.removeAttribute(o));for(const o in i){const h=s[o],c=i[o];if(c!=h)if(o.startsWith("on")){const l=o.slice(2).toLowerCase();e.removeEventListener(l,h),e.addEventListener(l,c)}else if(o==="style"){for(const l in h)l in c||Zn(e,l);Xs(e,c)}else zs(e,o,c)}const r=n.children||[],a=t.children||[];if(typeof a=="string")e.innerHTML=a;else if(typeof r=="string")e.innerHTML="",a.forEach(o=>{Ie(o,e)});else{const o=Math.min(r.length,a.length);for(let h=0;h<o;h++)Hs(r[h],a[h]);a.length>r.length&&a.slice(r.length).forEach(h=>{Ie(h,e)}),a.length<r.length&&r.slice(a.length).forEach(h=>{h.el&&e.removeChild(h.el)})}}class fd{state;el;constructor(t,e){this.state=ji(t,!0),this.el=e,this.compile(this.el)}compile(t){t.childNodes.forEach(e=>{switch(e.nodeType){case 1:const s=e;[...s.attributes].forEach(o=>{const h=o.name,c=o.value;if(h==="v-model")if($t(s).isInputRadio()){const l=s;gt(()=>{l.checked=this.getStateValue(c)==l.value}),l.addEventListener("change",d=>{this.setStateValue(c,d.target.value)})}else if($t(s).isInputCheckbox()){const l=s;gt(()=>{l.checked=Yi(this.getStateValue(c),l.value)}),l.addEventListener("change",d=>{const y=d.target,b=y.value;y.checked?No(this.getStateValue(c),b):Pe(this.getStateValue(c),b)})}else if($t(s).isSelect()){const l=s;gt(()=>{l.value=this.getStateValue(c)}),l.addEventListener("change",d=>{this.setStateValue(c,d.target.value)})}else{const l=s;gt(()=>{l.value=this.getStateValue(c)});const d=y=>{this.setStateValue(c,y.target.value)};l.addEventListener("input",d)}else h==="v-text"?gt(()=>{s.innerText=this.getStateValue(c)}):h==="v-html"&>(()=>{s.innerHTML=this.getStateValue(c)})}),s.childNodes.length>0&&this.compile(s);break;case 3:const i=e.textContent||"",r=/\{\{\s*([^{}\s]+)\s*\}\}/g,a=r.exec(i);a&&a[1]&>(()=>{e.textContent=i.replace(r,this.getStateValue(a[1]))});break}})}getStateValue(t){let e=this.state;return t.split(".").forEach(s=>{e=e[s]}),e}setStateValue(t,e){let s=this.state;const i=t.split("."),r=i.length;for(let a=0;a<r-1;a++)s=s[i[a]];s[i[r-1]]=e}static compileTemplate(t){return t=t.replace(/<%=(.+?)%>/g,"`); \n echo( $1 ); \n echo(`").replace(/<%([\s\S]+?)%>/g,"`); \n $1 \n echo(`"),t="echo(`"+t+"`);",`(function parse(data){
|
|
40
40
|
let output = "";
|
|
41
41
|
function echo(html){
|
|
@@ -54,7 +54,7 @@ Content-Type: `+b.type+`\r
|
|
|
54
54
|
`):t.data[l.name]=l.value;break}}return t.multipartFormDataString="--"+t.boundary+`\r
|
|
55
55
|
`+e.join("--"+t.boundary+`\r
|
|
56
56
|
`)+"--"+t.boundary+`--\r
|
|
57
|
-
`,t}class Pd{app;ctx;shapes=[];isMouseDown=!1;currentMouseInShape;currentEnableDragMouseInShape;dragDx=0;dragDy=0;constructor(t,e=!1){if(this.app=t,!(this.app.container instanceof HTMLCanvasElement))throw new Error("app.container 应该为 HTMLCanvasElement!");this.ctx=new Us(this.app.container,this.app.width,this.app.height,e),this.app.captureDrag({start:()=>{this.isMouseDown=!0,this.dragDx=0,this.dragDy=0,this.setCursor()},end:()=>{this.isMouseDown=!1,this.dragDx=0,this.dragDy=0,this.setCursor()},move:(s,i)=>{this.currentEnableDragMouseInShape&&(this.dragDx+=i.dx,this.dragDy+=i.dy),this.setCursor()}}),this.app.on("tap",()=>{for(const s of this.shapes)if(this.currentMouseInShape==s){s.emit("clicked");let i=s.parent;for(;i;)i.emit("clicked",s),i=i.parent;break}})}setCursor(){this.currentEnableDragMouseInShape?(this.app.container.style.cursor="grab",this.isMouseDown&&(this.app.container.style.cursor="grabbing")):this.currentMouseInShape?this.app.container.style.cursor="pointer":this.app.container.style.cursor="default"}transformCtxBaseOnShape(t){t.usePathDtoCanvasContext||(this.ctx.translate(t.x,t.y),this.ctx.rotate(B(t.degree),t.cX,t.cY),this.ctx.scale(t.scalarX,t.scalarY,t.cX,t.cY))}_addDrawShape(t){this.shapes.push(t),t instanceof ot&&t.shapes.forEach(e=>{this._addDrawShape(e)})}draw(t=[]){this.shapes=[],(Array.isArray(t)?t:[t]).forEach(e=>{this._addDrawShape(e)}),this.isMouseDown&&this.currentEnableDragMouseInShape||(this.currentMouseInShape=void 0);for(const e of this.shapes){if(!e.isShow)continue;if(this.ctx.save(),e.frameStart(this.app.mousePoint),Ed(this.ctx,e.getAttrs()),e.followMouse&&(!hs(e.x,this.app.mousePoint.x,5)||!hs(e.y,this.app.mousePoint.y,5))&&e.followTo(this.app.mousePoint),e.targetToAfterDragFree&&(this.isMouseDown||e.runEaseTo({x:e.targetToAfterDragFree.targetX,y:e.targetToAfterDragFree.targetY},{easing:e.targetToAfterDragFree?.easing})),this.isMouseDown&&this.currentEnableDragMouseInShape==e){e.isDragging=!0;const i=this.dragDx,r=this.dragDy;if(this.dragDx=0,this.dragDy=0,i||r){if(e.x+=i,e.y+=r,e.alongPath){const a=e.alongPath.closestPoint(e.x,e.y);e.x=a.point.x-e.cX,e.y=a.point.y-e.cY}e.emit("draging",i,r)}}else e.isDragging=!1;e.frameUpdate(this.app.mousePoint,this.ctx),this.transformCtxBaseOnShape(e),e.toCanvasContext(this.ctx),this.ctx.hasSetCustomStrokeStyle&&this.ctx.stroke(),this.ctx.hasSetCustomFillStyle&&this.ctx.fill();const s=this.ctx.currentPath2D;if(!this.currentMouseInShape){const i=this.ctx.isPointInPath(s,this.app.mousePoint.x,this.app.mousePoint.y)||this.ctx.isPointInStroke(s,this.app.mousePoint.x,this.app.mousePoint.y)||!1;e.isMouseIn=i,i&&(this.currentMouseInShape=e,e.enableDrag&&(this.currentEnableDragMouseInShape=e))}e.frameEnd(this.app.mousePoint),this.ctx.restore()}this.currentMouseInShape||(this.currentEnableDragMouseInShape=void 0)}drawMouseMoveLine(t="line",e){switch(t){case"brush":const s=e?.brushSize??10,i=e?.brushDensity??50,r=e?.brushColor??"#000000",a=this.ctx.getImageData(0,0,this.ctx.canvas.width,this.ctx.canvas.height),o=a.data,h=We(r);return this.app.captureDrag({move:()=>{if(this.isMouseDown){for(let c=0;c<i;c++){const l=Math.random()*Math.PI*2,d=Math.random()*s,y=this.app.mousePoint.x+Math.cos(l)*d|0,b=this.app.mousePoint.y+Math.sin(l)*d|0,w=(y+b*a.width)*4;o[w]=h.r,o[w+1]=h.g,o[w+2]=h.b,o[w+3]=255}this.ctx.putImageData(a)}}});case"line":default:return this.app.captureDrag({start:c=>{this.ctx.beginPath(),this.ctx.moveTo(this.app.mousePoint.x,this.app.mousePoint.y)},end:()=>{this.ctx.closePath()},move:()=>{this.isMouseDown&&(this.ctx.lineTo(this.app.mousePoint.x,this.app.mousePoint.y),this.ctx.stroke())}})}}}function Ed(n,t){for(const e in t){const s=t[e];switch(e){case"fill":s!=="none"&&(n.fillStyle=s);break;case"stroke":s!=="none"&&(n.strokeStyle=s);break;case"stroke-width":case"strokeWidth":n.lineWidth=Number(s);break;case"stroke-linecap":case"strokeLinecap":n.lineCap=s;break;case"stroke-linejoin":case"strokeLinejoin":switch(s){case"round":case"bevel":case"miter":n.lineJoin=s;break;default:n.lineJoin="miter";break}break;case"stroke-miterlimit":case"strokeMiterlimit":n.miterLimit=Number(s);break;case"stroke-opacity":case"strokeOpacity":break;case"stroke-dashoffset":case"strokeDashoffset":n.lineDashOffset=Number(s);break;case"stroke-dasharray":case"strokeDasharray":typeof s=="string"&&n.setLineDash(s.split(/\s+/).map(i=>Number(i)));break;case"cursor":break;case"font":typeof s=="string"&&(n.font=s);break;case"font-size":case"fontSize":n.font+=` ${s}`;break;case"font-family":case"fontFamily":n.font+=` ${s}`;break;case"font-weight":case"fontWeight":break;case"font-style":case"fontStyle":break;case"text-anchor":case"textAnchor":switch(s){case"middle":n.textAlign="center";break;case"end":n.textAlign="end";break;case"start":n.textAlign="start";break}break;case"alignment-baseline":case"alignmentBaseline":switch(s){case"middle":case"bottom":case"top":case"alphabetic":case"hanging":case"ideographic":n.textBaseline=s;break;default:n.textBaseline="alphabetic";break}break}}}class _d{localVideoUtil;remoteVideoUtil;localPeerConnection=null;remotePeerConnection=null;constructor(t,e){this.localVideoUtil=new Ze(t),this.remoteVideoUtil=new Ze(e)}start(){this.getLocalMediaStream().then(t=>{this.call(t)})}end(){this.localPeerConnection?.close(),this.remotePeerConnection?.close(),this.localPeerConnection=null,this.remotePeerConnection=null,this.trace("Ending call.")}getLocalMediaStream(){return new Promise((t,e)=>{navigator.mediaDevices.getUserMedia({audio:!0,video:!0}).then(s=>{this.localVideoUtil.setSrcObject(s),t(s)}).catch(s=>{this.trace(`navigator.getUserMedia error: ${s}.`),e(s)})})}gotRemoteMediaStream(t){const e=t.streams[0];this.remoteVideoUtil.setSrcObject(e),this.trace("Remote peer connection received remote stream.")}call(t){const e=t.getVideoTracks(),s=t.getAudioTracks();e.length>0&&this.trace(`Using video device: ${e[0].label}.`),s.length>0&&this.trace(`Using audio device: ${s[0].label}.`);const i=void 0,r=new RTCPeerConnection(i);this.localPeerConnection=r,this.trace("Created local peer connection object localPeerConnection."),r.addEventListener("icecandidate",this.handleConnection),r.addEventListener("iceconnectionstatechange",this.handleConnectionChange);const a=new RTCPeerConnection(i);this.remotePeerConnection=a,this.trace("Created remote peer connection object remotePeerConnection."),a.addEventListener("icecandidate",this.handleConnection),a.addEventListener("iceconnectionstatechange",this.handleConnectionChange),a.addEventListener("track",this.gotRemoteMediaStream),this.trace("Add local localStream to localPeerConnection."),r.addTrack(e[0],t),r.addTrack(s[0],t),this.trace("localPeerConnection createOffer start."),r.createOffer({offerToReceiveVideo:!0}).then(o=>this.createdOffer(o)).catch(o=>this.setSessionDescriptionError(o))}handleConnection(t){const e=t.target,s=t.candidate;if(e&&s){const i=new RTCIceCandidate(s),r=this.getOtherPeer(e);r&&(r.addIceCandidate(i).then(()=>{this.handleConnectionSuccess(e)}).catch(a=>{this.handleConnectionFailure(e,a)}),this.trace(`${this.getPeerName(e)} ICE candidate:
|
|
57
|
+
`,t}class Pd{app;ctx;shapes=[];isMouseDown=!1;currentMouseInShape;currentEnableDragMouseInShape;dragDx=0;dragDy=0;constructor(t,e=!1){if(this.app=t,!(this.app.container instanceof HTMLCanvasElement))throw new Error("app.container 应该为 HTMLCanvasElement!");this.ctx=new Us(this.app.container,this.app.width,this.app.height,e),this.app.captureDrag({start:()=>{this.isMouseDown=!0,this.dragDx=0,this.dragDy=0,this.setCursor()},end:()=>{this.isMouseDown=!1,this.dragDx=0,this.dragDy=0,this.setCursor()},move:(s,i)=>{this.currentEnableDragMouseInShape&&(this.dragDx+=i.dx,this.dragDy+=i.dy),this.setCursor()}}),this.app.on("tap",()=>{for(const s of this.shapes)if(this.currentMouseInShape==s){s.emit("clicked",s);let i=s.parent;for(;i;)i.emit("clicked",s),i=i.parent;break}})}setCursor(){this.currentEnableDragMouseInShape?(this.app.container.style.cursor="grab",this.isMouseDown&&(this.app.container.style.cursor="grabbing")):this.currentMouseInShape?this.app.container.style.cursor="pointer":this.app.container.style.cursor="default"}transformCtxBaseOnShape(t){t.usePathDtoCanvasContext||(this.ctx.translate(t.x,t.y),this.ctx.rotate(B(t.degree),t.cX,t.cY),this.ctx.scale(t.scalarX,t.scalarY,t.cX,t.cY))}_addDrawShape(t){this.shapes.push(t),t instanceof ot&&t.shapes.forEach(e=>{this._addDrawShape(e)})}draw(t=[]){this.shapes=[],(Array.isArray(t)?t:[t]).forEach(e=>{this._addDrawShape(e)}),this.isMouseDown&&this.currentEnableDragMouseInShape||(this.currentMouseInShape=void 0);for(const e of this.shapes){if(!e.isShow)continue;if(this.ctx.save(),e.frameStart(this.app.mousePoint),Ed(this.ctx,e.getAttrs()),e.followMouse&&(!hs(e.x,this.app.mousePoint.x,5)||!hs(e.y,this.app.mousePoint.y,5))&&e.followTo(this.app.mousePoint),e.targetToAfterDragFree&&(this.isMouseDown||e.runEaseTo({x:e.targetToAfterDragFree.targetX,y:e.targetToAfterDragFree.targetY},{easing:e.targetToAfterDragFree?.easing})),this.isMouseDown&&this.currentEnableDragMouseInShape==e){e.isDragging=!0;const i=this.dragDx,r=this.dragDy;if(this.dragDx=0,this.dragDy=0,i||r){if(e.x+=i,e.y+=r,e.alongPath){const a=e.alongPath.closestPoint(e.x,e.y);e.x=a.point.x-e.cX,e.y=a.point.y-e.cY}e.emit("draging",i,r)}}else e.isDragging=!1;e.frameUpdate(this.app.mousePoint,this.ctx),this.transformCtxBaseOnShape(e),e.toCanvasContext(this.ctx),this.ctx.hasSetCustomStrokeStyle&&this.ctx.stroke(),this.ctx.hasSetCustomFillStyle&&this.ctx.fill();const s=this.ctx.currentPath2D;if(!this.currentMouseInShape){const i=this.ctx.isPointInPath(s,this.app.mousePoint.x,this.app.mousePoint.y)||this.ctx.isPointInStroke(s,this.app.mousePoint.x,this.app.mousePoint.y)||!1;e.isMouseIn=i,i&&(this.currentMouseInShape=e,e.enableDrag&&(this.currentEnableDragMouseInShape=e))}e.frameEnd(this.app.mousePoint),this.ctx.restore()}this.currentMouseInShape||(this.currentEnableDragMouseInShape=void 0)}drawMouseMoveLine(t="line",e){switch(t){case"brush":const s=e?.brushSize??10,i=e?.brushDensity??50,r=e?.brushColor??"#000000",a=this.ctx.getImageData(0,0,this.ctx.canvas.width,this.ctx.canvas.height),o=a.data,h=We(r);return this.app.captureDrag({move:()=>{if(this.isMouseDown){for(let c=0;c<i;c++){const l=Math.random()*Math.PI*2,d=Math.random()*s,y=this.app.mousePoint.x+Math.cos(l)*d|0,b=this.app.mousePoint.y+Math.sin(l)*d|0,w=(y+b*a.width)*4;o[w]=h.r,o[w+1]=h.g,o[w+2]=h.b,o[w+3]=255}this.ctx.putImageData(a)}}});case"line":default:return this.app.captureDrag({start:c=>{this.ctx.beginPath(),this.ctx.moveTo(this.app.mousePoint.x,this.app.mousePoint.y)},end:()=>{this.ctx.closePath()},move:()=>{this.isMouseDown&&(this.ctx.lineTo(this.app.mousePoint.x,this.app.mousePoint.y),this.ctx.stroke())}})}}}function Ed(n,t){for(const e in t){const s=t[e];switch(e){case"fill":s!=="none"&&(n.fillStyle=s);break;case"stroke":s!=="none"&&(n.strokeStyle=s);break;case"stroke-width":case"strokeWidth":n.lineWidth=Number(s);break;case"stroke-linecap":case"strokeLinecap":n.lineCap=s;break;case"stroke-linejoin":case"strokeLinejoin":switch(s){case"round":case"bevel":case"miter":n.lineJoin=s;break;default:n.lineJoin="miter";break}break;case"stroke-miterlimit":case"strokeMiterlimit":n.miterLimit=Number(s);break;case"stroke-opacity":case"strokeOpacity":break;case"stroke-dashoffset":case"strokeDashoffset":n.lineDashOffset=Number(s);break;case"stroke-dasharray":case"strokeDasharray":typeof s=="string"&&n.setLineDash(s.split(/\s+/).map(i=>Number(i)));break;case"cursor":break;case"font":typeof s=="string"&&(n.font=s);break;case"font-size":case"fontSize":n.font+=` ${s}`;break;case"font-family":case"fontFamily":n.font+=` ${s}`;break;case"font-weight":case"fontWeight":break;case"font-style":case"fontStyle":break;case"text-anchor":case"textAnchor":switch(s){case"middle":n.textAlign="center";break;case"end":n.textAlign="end";break;case"start":n.textAlign="start";break}break;case"alignment-baseline":case"alignmentBaseline":switch(s){case"middle":case"bottom":case"top":case"alphabetic":case"hanging":case"ideographic":n.textBaseline=s;break;default:n.textBaseline="alphabetic";break}break}}}class _d{localVideoUtil;remoteVideoUtil;localPeerConnection=null;remotePeerConnection=null;constructor(t,e){this.localVideoUtil=new Ze(t),this.remoteVideoUtil=new Ze(e)}start(){this.getLocalMediaStream().then(t=>{this.call(t)})}end(){this.localPeerConnection?.close(),this.remotePeerConnection?.close(),this.localPeerConnection=null,this.remotePeerConnection=null,this.trace("Ending call.")}getLocalMediaStream(){return new Promise((t,e)=>{navigator.mediaDevices.getUserMedia({audio:!0,video:!0}).then(s=>{this.localVideoUtil.setSrcObject(s),t(s)}).catch(s=>{this.trace(`navigator.getUserMedia error: ${s}.`),e(s)})})}gotRemoteMediaStream(t){const e=t.streams[0];this.remoteVideoUtil.setSrcObject(e),this.trace("Remote peer connection received remote stream.")}call(t){const e=t.getVideoTracks(),s=t.getAudioTracks();e.length>0&&this.trace(`Using video device: ${e[0].label}.`),s.length>0&&this.trace(`Using audio device: ${s[0].label}.`);const i=void 0,r=new RTCPeerConnection(i);this.localPeerConnection=r,this.trace("Created local peer connection object localPeerConnection."),r.addEventListener("icecandidate",this.handleConnection),r.addEventListener("iceconnectionstatechange",this.handleConnectionChange);const a=new RTCPeerConnection(i);this.remotePeerConnection=a,this.trace("Created remote peer connection object remotePeerConnection."),a.addEventListener("icecandidate",this.handleConnection),a.addEventListener("iceconnectionstatechange",this.handleConnectionChange),a.addEventListener("track",this.gotRemoteMediaStream),this.trace("Add local localStream to localPeerConnection."),r.addTrack(e[0],t),r.addTrack(s[0],t),this.trace("localPeerConnection createOffer start."),r.createOffer({offerToReceiveVideo:!0}).then(o=>this.createdOffer(o)).catch(o=>this.setSessionDescriptionError(o))}handleConnection(t){const e=t.target,s=t.candidate;if(e&&s){const i=new RTCIceCandidate(s),r=this.getOtherPeer(e);r&&(r.addIceCandidate(i).then(()=>{this.handleConnectionSuccess(e)}).catch(a=>{this.handleConnectionFailure(e,a)}),this.trace(`${this.getPeerName(e)} ICE candidate:
|
|
58
58
|
${t.candidate.candidate}.`))}}handleConnectionSuccess(t){this.trace(`${this.getPeerName(t)} addIceCandidate success.`)}handleConnectionFailure(t,e){this.trace(`${this.getPeerName(t)} failed to add ICE Candidate:
|
|
59
59
|
${e.toString()}.`)}handleConnectionChange(t){const e=t.target;console.log("ICE state change event: ",t),e&&this.trace(`${this.getPeerName(e)} ICE state: ${e.iceConnectionState}.`)}createdOffer(t){this.trace(`Offer from localPeerConnection:
|
|
60
60
|
${t.sdp}`),this.localPeerConnection&&(this.trace("localPeerConnection setLocalDescription start."),this.localPeerConnection.setLocalDescription(t).then(()=>{this.setLocalDescriptionSuccess(this.localPeerConnection)}).catch(e=>this.setSessionDescriptionError(e))),this.remotePeerConnection&&(this.trace("remotePeerConnection setRemoteDescription start."),this.remotePeerConnection.setRemoteDescription(t).then(()=>{this.setRemoteDescriptionSuccess(this.remotePeerConnection)}).catch(e=>this.setSessionDescriptionError(e)),this.trace("remotePeerConnection createAnswer start."),this.remotePeerConnection.createAnswer().then(e=>this.createdAnswer(e)).catch(e=>this.setSessionDescriptionError(e)))}createdAnswer(t){this.trace(`Answer from remotePeerConnection:
|