@zyzgroup/core-web 0.1.82 → 0.1.83
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 +14 -14
- package/dist/zyzgroup_core_web.iife.js.map +1 -1
- package/dist/zyzgroup_core_web.js +399 -401
- package/dist/zyzgroup_core_web.js.map +1 -1
- package/dist/zyzgroup_core_web.umd.cjs +14 -14
- package/dist/zyzgroup_core_web.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/types/WebSocketClient.d.ts.map +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(d,Cn){typeof exports=="object"&&typeof module<"u"?Cn(exports):typeof define=="function"&&define.amd?define(["exports"],Cn):(d=typeof globalThis<"u"?globalThis:d||self,Cn(d.ZYZGroupCoreWeb={}))})(this,function(d){"use strict";const Cn={};function Ml(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this||Cn}const wt=Ml(),Al="@YZ/";function wi(s,t=Al){return s.startsWith(t)?s:`${t}${s}`}function xi(s){return typeof s=="string"&&s.startsWith("Symbol(")&&s.endsWith(")")}function bi(s){return xi(s)&&(s=s.slice(7,-1)),s}function
|
|
1
|
+
(function(d,Cn){typeof exports=="object"&&typeof module<"u"?Cn(exports):typeof define=="function"&&define.amd?define(["exports"],Cn):(d=typeof globalThis<"u"?globalThis:d||self,Cn(d.ZYZGroupCoreWeb={}))})(this,function(d){"use strict";const Cn={};function Ml(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this||Cn}const wt=Ml(),Al="@YZ/";function wi(s,t=Al){return s.startsWith(t)?s:`${t}${s}`}function xi(s){return typeof s=="string"&&s.startsWith("Symbol(")&&s.endsWith(")")}function bi(s){return xi(s)&&(s=s.slice(7,-1)),s}function us(s){return s=bi(s),s=wi(s),typeof Symbol=="function"?Symbol(s):`Symbol(${s})`}const Tn=us("TIMESTAMP"),kl=us("META");function Il(s,t){const e=t.toString();if(!xi(e))return!1;if(s&&typeof s=="object"){if(bi(e)=="")return t in s;for(const n of Reflect.ownKeys(s))if(n.toString()==e)return!0;return!1}return!1}function ua(s){if(!xi(s))return s;switch(s=bi(s),s){case wi("TIMESTAMP"):return Tn;case wi("META"):return kl;default:return us(s)}}function vi(s){if(Array.isArray(s))return s.map(vi);if(s&&typeof s=="object"){const t={};for(const e of Reflect.ownKeys(s)){const n=s[e];t[typeof e=="symbol"?e.toString():e]=typeof n=="symbol"?n.toString():vi(n)}return t}return typeof s=="symbol"?s.toString():s}function _i(s){if(Array.isArray(s))return s.map(_i);if(s&&typeof s=="object"){const t={};for(const e of Object.keys(s))t[ua(e)]=_i(s[e]);return t}return ua(s)}function Si(s){return JSON.stringify(vi(s))}const Ci=Si;function la(s){return _i(JSON.parse(s))}var Tt=(s=>(s.UNKNOWN="",s.TEXT="text/plain",s.MD="text/plain",s.HTML="text/html",s.XML_TEXT="text/xml",s.CSS="text/css",s.JPEG="image/jpeg",s.PNG="image/png",s.GIF="image/gif",s.BMP="image/bmp",s.WEBP="image/webp",s.SVG="image/svg+xml",s.ICON="image/x-icon",s.MICROSOFT_ICON="image/vnd.microsoft.icon",s.MPEG="audio/mpeg",s.MP3="audio/mpeg",s.MP4="video/mp4",s.OGG="audio/ogg",s.WAV="audio/wav",s.MIDI="audio/midi",s.WEBM="video/webm",s.VIDEO_OGG="video/ogg",s.OCTET_STREAM="application/octet-stream",s.JAVASCRIPT="application/javascript",s.ECMASCRIPT="application/ecmascript",s.JSON="application/json",s.XML="application/xml",s.XHTML="application/xhtml+xml",s.XWWW="application/x-www-form-urlencoded",s.DOC="application/msword",s.CSV="application/x-csv",s.EXCEL="application/vnb.ms-excel",s.PPT="application/vnb.mspowerpoint",s.PDF="application/pdf",s.ZIP="application/zip",s.TGZ="application/x-gtar",s.TAR_GZ="application/x-gzip",s.EOT="appliaction/vnd.ms-fontobject",s.TTF="aplication/font-sfnt",s.PKCS12="aplication/pkcs12",s))(Tt||{}),ls=(s=>(s.ascii="ascii",s.utf8="utf8",s.utf16le="utf16le",s.ucs2="ucs2",s.base64="base64",s.base64url="base64url",s.latin1="latin1",s.binary="binary",s.hex="hex",s))(ls||{}),$t=(s=>(s.text="text",s.dataURL="dataURL",s.binaryString="binaryString",s.arraybuffer="arraybuffer",s))($t||{});function Dl(s,t=(e,n)=>e<=n){const e=s.length;let n=Math.floor(e/2);for(;n>0;){for(let i=n;i<e;i++){const r=s[i];let o=i;for(;o>=n&&!t(s[o-n],r);)s[o]=s[o-n],o-=n;s[o]=r}n=Math.floor(n/2)}}const fs=s=>{let t=null;switch(s){case"any-character":t=/[^]/;break;case"bin":t=/^(0b)?[0-1]+$/i;break;case"oct":t=/^(0o)?[0-7]+$/i;break;case"hex":t=/^(0x)?[0-9a-fA-F]+$/i;break;case"ascii":t=/^[\x00-\xFF]+$/i;break;case"int":t=/^[-+]?[0-9]+$/;break;case"number":t=/[-+]?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;break;case"number-single":t=/[-+]?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/i;break;case"split":t=/\s*,\s*/gi;break;case"trim":t=/^\s+|\s+$/g;break;case"regexp":t=/[\\^$.*+?()[\]{}|]/g;break;case"regexp-flags":t=/\w*$/;break;case"native-method":t=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(fs("regexp"),"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");break;case"svg-segment":t=/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi;break;case"mobile-china":t=/^[1]{1}[0-9]{10}$/;break;case"email":t=/^[A-Za-z0-9_!#$%&'*+/=?`{|}~^.-]+\@[A-Za-z0-9._-]+\.[A-Za-z0-9]+$/gm;break;case"ip":t=/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;break;case"url":t=/^http[s]?:\/\/([\w-]+\.)+[\w-]+([\w-./?%&=]*)?$/;break;case"element-url":t=/^url\(['"]?(.+?)['"]?\)$/i;break;case"date":t=/^\d{4}(\-|\/|\.)(\d{1,2})(\-|\/|\.)(\d{1,2})$/;break;case"time":t=/^(\d{1,2}):(\d{1,2}):(\d{1,2})$/;break;case"datetime":t=/^\d{4}(\-|\/|\.)(\d{1,2})(\-|\/|\.)(\d{1,2})\s+(\d{1,2}):(\d{1,2}):(\d{1,2})$/;break;case"base64-data":t=/^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([a-z0-9!$&',()*+;=\-._~:@/?%\s]*?)\s*$/i;break;case"hex-color":t=/^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;break;case"color":t=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i;break;case"whitespace":t=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]/g;break;case"commaSpaces":t=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/;break;case"var-name":t=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/;break;case"bezier":t=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/;break;case"chinese-name":t=/^(?:[\u4e00-\u9fa5·]{2,16})$/;break;case"chinese":t=new RegExp(String.raw`
|
|
2
2
|
[\u{FA0E}\u{FA0F}\u{FA11}\u{FA13}\u{FA14}\u{FA1F}\u{FA21}\u{FA23}\u{FA24}\u{FA27}-\u{FA29}]
|
|
3
3
|
|[\u{4E00}-\u{9FCC}]
|
|
4
4
|
|[\u{3400}-\u{4DB5}]
|
|
@@ -7,24 +7,24 @@
|
|
|
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},ue=(s,t)=>(typeof s=="string"&&(s=ds(s)||new RegExp(s)),s.test(t)),fa=(s,t)=>{typeof s=="string"&&(s=ds(s)||new RegExp(s));const e=t.match(s);return e?s.flags.toLowerCase().indexOf("g")>=0?e.map(n=>({matchIndex:-1,fullMatch:n,groupMatchs:[]})):{matchIndex:typeof e.index=="number"?e.index:-1,fullMatch:e[0],groupMatchs:e.slice(1)}:null},da=(s,t)=>{typeof s=="string"&&(s=ds(s)||new RegExp(s));const e=[],n=t.matchAll(s);for(const i of n)e.push({matchIndex:typeof i.index=="number"?i.index:-1,fullMatch:i[0],groupMatchs:i.slice(1)});return e};function Ll(s){const t=s.match(/[\s\S]/gu);return t?t.length:0}function ma(s,t){const e=s.codePointAt(t);return e?String.fromCodePoint(e):void 0}function on(s=12,t="all"){let e="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghijklmnopqrstuvwxyz0123456789";t=="number"&&(e="0123456789");const n=e.length;let i="";for(let r=0;r<s;r++)i+=e[Math.floor(Math.random()*n)];return i}function Rl(s){return s.replace(/(^\w)/g,t=>t.toLowerCase())}const xt=(s,t="-")=>{let e=s.replace(new RegExp(`${t}?([A-Z])`,"g"),t+"$1").toLowerCase();return e=e.replace(new RegExp(`^${t}`),""),e};function Ol(s){return s.replace(/(^\w|[_-]\w)/g,t=>t.slice(-1).toUpperCase())}function pa(s){return Rl(Ol(s))}function ga(s){let t="";for(let e=0,n=s.length;e<n;e++){const i=s.charCodeAt(e);i>=1&&i<=127?t+=s.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}function zl(s){return s.slice(0)}function Nl(s,t=!0){const e=t?zl(s.buffer):s.buffer;return new s.constructor(e,s.byteOffset,s.length)}const Bl="[object Undefined]",Fl="[object Null]",Yl="[object Boolean]",$l="[object Number]",Xl="[object BigInt]",Ul="[object String]",Vl="[object Symbol]",Gl="[object Array]";function ya(s){return Object.prototype.toString.call(s)}function ql(s){return s!=null}function jl(s){const t=ya(s);return t===Bl||t===Fl||t===Yl||t===$l||t===Ul||t===Vl||t===Xl}function Hl(s){return ya(s)===Gl}function Wl(s){return!!s&&typeof s=="object"}function En(s){return Wl(s)&&!Hl(s)}function Jl(s){const t=[];for(const e in s)Object.prototype.hasOwnProperty.call(s,e)&&t.push(e);return t}function Pn(s,t,e=!1){if(En(s)&&En(t))for(const n in t)En(t[n])?(typeof s[n]>"u"&&Object.assign(s,{[n]:{}}),Pn(s[n],t[n],e)):(e||typeof s[n]>"u")&&Object.assign(s,{[n]:t[n]});return s}function wa(s,...t){return new s.constructor(...t)}function an(s){if(!En(s))return""+s;const t=[];return Jl(s).forEach(e=>{En(s[e])?t.push(an(s[e])):t.push(`${e}: ${s[e]}`)}),`{ ${t.join(", ")} }`}function Zl(s,t="",e=["","sign","key"]){return Object.keys(s).filter(n=>{for(let i=0,r=e.length;i<r;i++)if(s[n]==e[i])return!1;return!0}).sort().map(n=>`${n}=${s[n]}`).join("&")+t}function Ql(s=[],t=[]){const e=s.length,n=t.length;for(let r=0;r<n;r++)s[r]=t[r];let i=Math.max(0,e-n);for(;i>0;)s.pop(),i--;return s}function Ne(s,t){const e=s.findIndex(n=>n===t);return e>=0&&s.splice(e,1),s}function xa(s,t){return s.findIndex(e=>e==t)>=0}function Kl(s,...t){return t.forEach(e=>{xa(s,e)||s.push(e)}),s}let ba;try{ba=Map}catch{ba=function(){}}let va;try{va=Set}catch{va=function(){}}function qt(s,t){const e=parseFloat(s);if(Number.isNaN(e)){if(typeof t=="number")return t;throw new Error(`"${s}" is NaN!`)}return e}function _a(s,t,e=Number.EPSILON*Math.pow(2,2)){return Math.abs(s-t)<e}function N(s,t,e){const n=Math.min(t,e),i=Math.max(t,e);return s<n?n:s>i?i:s}function tf(s,t){return(s%t+t)%t}function ms(s,t,e){return(1-e)*s+e*t}function ef(s,t,e){const n=s.length,i=new Array(n);for(let r=0;r<n;r++)i[r]=Z(ms(s[r],t[r],e),6);return i}const nf=(s,t,e)=>n=>{const i=N(n,s,t);return e==0?i:t-i<e?t:Math.round(i/e)*e};function sf(s,t=12){return qt(s,0).toFixed(t)}function Z(s,t=12){return+sf(s,t)}function rf(s,t){const e=fa("number-single",String(s));return{hasNumber:!!e,number:e&&!Array.isArray(e)&&e.fullMatch?parseFloat(e.fullMatch):ql(t)?t:NaN,prefix:e&&!Array.isArray(e)&&e.fullMatch?s.substring(0,e.matchIndex):"",suffix:e&&!Array.isArray(e)&&e.fullMatch?s.substring(e.matchIndex+e.fullMatch.length):""}}function Ti(s){const t=fa("number",s);return t?Array.isArray(t)?t.map(e=>Number(e.fullMatch)):[Number(t.fullMatch)]:[]}const hn=(s,t=16)=>{let e=s.toLowerCase();const n=e.indexOf("0b")==0,i=e.indexOf("0o")==0,r=e.indexOf("0x")==0;(n||i||r)&&(e=e.slice(2)),n&&(t=2),i&&(t=8),r&&(t=16);const o=parseInt(e,t);if(isNaN(o))throw new Error(`radixStringToNumber(${s}, ${t}) 无法解析!`);return o};function of(s){return new TextEncoder().encode(s)}function af(s){return String.fromCharCode.apply(null,new Uint16Array(s))}const Ei=(s,t,e)=>t?e===fs.base64?new Blob([s],{type:`${t};${e}`}):e===fs.utf8?new Blob([s],{type:`${t};charset=${e}`}):new Blob([s],{type:`${t}`}):new Blob([s]),hf=s=>{let t=Tt.UNKNOWN;switch(new DataView(s).getUint32(0,cf()).toString(16).toUpperCase()){case"FFD8FFDB":t=Tt.JPEG;break;case"FFD8FFE0":case"FFD8FFE1":case"FFD8FFE2":case"FFD8FFE3":t=Tt.JPEG;break;case"89504E47":t=Tt.PNG;break;case"47494638":t=Tt.GIF;break;case"52494646":t=Tt.WEBP;break;case"25504446":t=Tt.PDF;break;case"504B0304":t=Tt.ZIP;break}return t};function cf(){const s=Uint32Array.of(305419896),t=new Uint8Array(s.buffer);switch(t[0]*16777216+t[1]*65536+t[2]*256+t[3]){case 305419896:return!1;case 2018915346:return!0}}function ut(){return(performance||Date).now()}function se(s=new Date){return s.getTime()}function uf(s,t=3){const e=Math.max(s.length,6);let n="";for(let r=0;r<e-4;r++)n+=s[r]||"0";const i=[n,""+(s[e-4]||"0")+(s[e-3]||"0"),""+(s[e-2]||"0")+(s[e-1]||"0")];switch(t){case 1:return i[0];case 2:return i[0]+":"+i[1];case 3:return i[0]+":"+i[1]+":"+i[2]}}function lf(s){const t=Math.max(s.length,6);let e=0;e+=(s[t-2]||0)*10+(s[t-1]||0),e+=((s[t-4]||0)*10+(s[t-3]||0))*60;let n=0;for(let i=0;i<t-4;i++)n=n*10+(s[i]||0);return e+=n*60*60,Math.floor(Math.max(0,e))}function ff(s,t=!1){let e=0;typeof s=="number"?e=s:e=lf(s);const n=[],i=e%60;n.unshift(i%10),n.unshift(Math.floor(i/10)),e=Math.floor(e/60);const r=e%60;if(n.unshift(r%10),n.unshift(Math.floor(r/10)),e=Math.floor(e/60),t){const o=e%100;for(n.unshift(o%10),n.unshift(Math.floor(o/10)),e=Math.floor(e/100);e;)n.unshift(e%10),e=Math.floor(e/10)}else{const o=e%24;n.unshift(o%10),n.unshift(Math.floor(o/10))}return n}function df(s,t=1,e=!1){return s[s.length-1]+=t,ff(s,e)}const Mn={THROW:1,DROP:2,SLIDE:3,EXPAND:4};class mf{queue;limit;overflow;constructor(t=10,e=Mn.EXPAND){this.queue=[],this.limit=t,this.overflow=e}length(){return this.queue.length}isEmpty(){return this.length()===0}findIndex(t){return this.queue.findIndex(t)}deleteIndex(t){return!!this.queue.splice(t,1).length}delete(t){const e=this.findIndex(t);return e>-1?this.deleteIndex(e):!1}enqueue(t){if(this.length()<this.limit){this.queue.push(t);return}switch(this.overflow){case Mn.EXPAND:this.limit*=2,this.queue.push(t);break;case Mn.SLIDE:this.deleteIndex(0),this.queue.push(t);break;case Mn.THROW:throw new Error(`Queue limit(${this.limit}) overflow!`)}}push(t){this.enqueue(t)}put(t){this.enqueue(t)}dequeue(){return this.queue.shift()}pop(){return this.dequeue()}take(){return this.dequeue()}peek(){return this.queue[0]}index(t){return this.queue[t]}clear(){this.queue=[]}flush(){const t=[];let e;for(;e=this.dequeue();)t.push(e);return t}}const pf=s=>new mf(s,Mn.EXPAND);class cn{maps=new Map;constructor(){}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,n])=>(t[e]=n,t),{})}get length(){return this.entries().length}set(t,e){this.maps.set(t,e)}get(t){return this.maps.get(t)}has(t){return this.maps.has(t)}getEntryFromIndex(t){return this.entries()[t]}getEntry(t){const e=this.entries();for(let n=0,i=e.length;n<i;n++){const r=e[n];if(t(r[0],r[1]))return r}}firstEntry(){return this.getEntryFromIndex(0)}shift(){const t=this.firstEntry();if(t){const[e]=t;this.delete(e)}return t}delete(t){return this.maps.delete(t)}clear(){this.maps.clear()}update(t){const e=this.entries();for(let n=0,i=e.length;n<i;n++){const[r,o]=e[n];t(r,o)===!1&&this.delete(r)}}}function gf(){wt.OPEN_LOG=!0}function yf(){wt.OPEN_LOG=!1}function wf(s){wt.LOG_UPLOAD_FN=s}function Sa(){return!!wt.OPEN_LOG}function Ca(s){wt.LOG_UPLOAD_FN&&wt.LOG_UPLOAD_FN(s)}function ie(s){Ca({level:"info",msg:s}),Sa()&&(!console||typeof console!="object"||typeof console.log!="function"||console.log(s))}function An(s){Ca({level:"warn",msg:s}),Sa()&&(!console||typeof console!="object"||typeof console.warn!="function"||console.warn(s))}const Ta=()=>{};function Ea(s=0,t){const e=t?.min||300,n=t?.max||6e4,i=t?.exponent||2,r=t?.factor||.5;let o=e*Math.pow(i,s);if(r){const a=Math.random(),h=Math.floor(a*r*o);o=Math.floor(a*10)&1?o+h:o-h}return Math.min(o,n)|0}function Pi(s,t=3,e,n){return async function(...i){const r=`retry(${s.name})(${i.map(an)})`;let o;for(let a=0;a<t;a++)try{return await s.call(n||this,...i)}catch(h){ie(`(${r}) 第 ${a+1} 次尝试失败, retrying...`),o=h,await new Promise(c=>setTimeout(c,typeof e=="number"?e:Ea(a)))}throw ie(`(${r}) 已 ${t} 次失败,不再重试。 Last error: ${an(o)}`),o}}function Mi(s,t=60,e=new cn,n){return async function(...i){const r=`cache(${s.name})(${i.map(an)})`,o=Date.now();t&&e.update((c,u)=>o-u.timestamp<t*1e3);const a=Ci(i),h=e.get(a);if(h){if(!t||o-h.timestamp<t*1e3)return ie(`${r} 击中缓存`),h.value;e.delete(a)}try{ie(`${r} 没有缓存, 尝试立即执行...`);const c=await s.call(n||this,...i);return ie(`${r} 缓存设置成功`),e.set(a,{value:c,timestamp:Date.now()}),c}catch(c){throw ie(`${r} 执行失败 : ${an(c)}`),c}}}var Ai=function(s,t){return Ai=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])},Ai(s,t)};function ki(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ai(s,t);function e(){this.constructor=s}s.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function Pa(s){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&s[t],n=0;if(e)return e.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&n>=s.length&&(s=void 0),{value:s&&s[n++],done:!s}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ii(s,t){var e=typeof Symbol=="function"&&s[Symbol.iterator];if(!e)return s;var n=e.call(s),i,r=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)r.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(o)throw o.error}}return r}function Di(s,t,e){if(e||arguments.length===2)for(var n=0,i=t.length,r;n<i;n++)(r||!(n in t))&&(r||(r=Array.prototype.slice.call(t,0,n)),r[n]=t[n]);return s.concat(r||Array.prototype.slice.call(t))}function le(s){return typeof s=="function"}function xf(s){var t=function(n){Error.call(n),n.stack=new Error().stack},e=s(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var Li=xf(function(s){return function(t){s(this),this.message=t?t.length+` errors occurred during unsubscription:
|
|
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},ue=(s,t)=>(typeof s=="string"&&(s=fs(s)||new RegExp(s)),s.test(t)),fa=(s,t)=>{typeof s=="string"&&(s=fs(s)||new RegExp(s));const e=t.match(s);return e?s.flags.toLowerCase().indexOf("g")>=0?e.map(n=>({matchIndex:-1,fullMatch:n,groupMatchs:[]})):{matchIndex:typeof e.index=="number"?e.index:-1,fullMatch:e[0],groupMatchs:e.slice(1)}:null},da=(s,t)=>{typeof s=="string"&&(s=fs(s)||new RegExp(s));const e=[],n=t.matchAll(s);for(const i of n)e.push({matchIndex:typeof i.index=="number"?i.index:-1,fullMatch:i[0],groupMatchs:i.slice(1)});return e};function Ll(s){const t=s.match(/[\s\S]/gu);return t?t.length:0}function ma(s,t){const e=s.codePointAt(t);return e?String.fromCodePoint(e):void 0}function on(s=12,t="all"){let e="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghijklmnopqrstuvwxyz0123456789";t=="number"&&(e="0123456789");const n=e.length;let i="";for(let r=0;r<s;r++)i+=e[Math.floor(Math.random()*n)];return i}function Rl(s){return s.replace(/(^\w)/g,t=>t.toLowerCase())}const xt=(s,t="-")=>{let e=s.replace(new RegExp(`${t}?([A-Z])`,"g"),t+"$1").toLowerCase();return e=e.replace(new RegExp(`^${t}`),""),e};function Ol(s){return s.replace(/(^\w|[_-]\w)/g,t=>t.slice(-1).toUpperCase())}function pa(s){return Rl(Ol(s))}function ga(s){let t="";for(let e=0,n=s.length;e<n;e++){const i=s.charCodeAt(e);i>=1&&i<=127?t+=s.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}function zl(s){return s.slice(0)}function Nl(s,t=!0){const e=t?zl(s.buffer):s.buffer;return new s.constructor(e,s.byteOffset,s.length)}const Bl="[object Undefined]",Fl="[object Null]",Yl="[object Boolean]",$l="[object Number]",Xl="[object BigInt]",Ul="[object String]",Vl="[object Symbol]",Gl="[object Array]";function ya(s){return Object.prototype.toString.call(s)}function ql(s){return s!=null}function jl(s){const t=ya(s);return t===Bl||t===Fl||t===Yl||t===$l||t===Ul||t===Vl||t===Xl}function Hl(s){return ya(s)===Gl}function Wl(s){return!!s&&typeof s=="object"}function En(s){return Wl(s)&&!Hl(s)}function Jl(s){const t=[];for(const e in s)Object.prototype.hasOwnProperty.call(s,e)&&t.push(e);return t}function Pn(s,t,e=!1){if(En(s)&&En(t))for(const n in t)En(t[n])?(typeof s[n]>"u"&&Object.assign(s,{[n]:{}}),Pn(s[n],t[n],e)):(e||typeof s[n]>"u")&&Object.assign(s,{[n]:t[n]});return s}function wa(s,...t){return new s.constructor(...t)}function an(s){if(!En(s))return""+s;const t=[];return Jl(s).forEach(e=>{En(s[e])?t.push(an(s[e])):t.push(`${e}: ${s[e]}`)}),`{ ${t.join(", ")} }`}function Zl(s,t="",e=["","sign","key"]){return Object.keys(s).filter(n=>{for(let i=0,r=e.length;i<r;i++)if(s[n]==e[i])return!1;return!0}).sort().map(n=>`${n}=${s[n]}`).join("&")+t}function Ql(s=[],t=[]){const e=s.length,n=t.length;for(let r=0;r<n;r++)s[r]=t[r];let i=Math.max(0,e-n);for(;i>0;)s.pop(),i--;return s}function Ne(s,t){const e=s.findIndex(n=>n===t);return e>=0&&s.splice(e,1),s}function xa(s,t){return s.findIndex(e=>e==t)>=0}function Kl(s,...t){return t.forEach(e=>{xa(s,e)||s.push(e)}),s}let ba;try{ba=Map}catch{ba=function(){}}let va;try{va=Set}catch{va=function(){}}function qt(s,t){const e=parseFloat(s);if(Number.isNaN(e)){if(typeof t=="number")return t;throw new Error(`"${s}" is NaN!`)}return e}function _a(s,t,e=Number.EPSILON*Math.pow(2,2)){return Math.abs(s-t)<e}function N(s,t,e){const n=Math.min(t,e),i=Math.max(t,e);return s<n?n:s>i?i:s}function tf(s,t){return(s%t+t)%t}function ds(s,t,e){return(1-e)*s+e*t}function ef(s,t,e){const n=s.length,i=new Array(n);for(let r=0;r<n;r++)i[r]=Z(ds(s[r],t[r],e),6);return i}const nf=(s,t,e)=>n=>{const i=N(n,s,t);return e==0?i:t-i<e?t:Math.round(i/e)*e};function sf(s,t=12){return qt(s,0).toFixed(t)}function Z(s,t=12){return+sf(s,t)}function rf(s,t){const e=fa("number-single",String(s));return{hasNumber:!!e,number:e&&!Array.isArray(e)&&e.fullMatch?parseFloat(e.fullMatch):ql(t)?t:NaN,prefix:e&&!Array.isArray(e)&&e.fullMatch?s.substring(0,e.matchIndex):"",suffix:e&&!Array.isArray(e)&&e.fullMatch?s.substring(e.matchIndex+e.fullMatch.length):""}}function Ti(s){const t=fa("number",s);return t?Array.isArray(t)?t.map(e=>Number(e.fullMatch)):[Number(t.fullMatch)]:[]}const hn=(s,t=16)=>{let e=s.toLowerCase();const n=e.indexOf("0b")==0,i=e.indexOf("0o")==0,r=e.indexOf("0x")==0;(n||i||r)&&(e=e.slice(2)),n&&(t=2),i&&(t=8),r&&(t=16);const o=parseInt(e,t);if(isNaN(o))throw new Error(`radixStringToNumber(${s}, ${t}) 无法解析!`);return o};function of(s){return new TextEncoder().encode(s)}function af(s){return String.fromCharCode.apply(null,new Uint16Array(s))}const Ei=(s,t,e)=>t?e===ls.base64?new Blob([s],{type:`${t};${e}`}):e===ls.utf8?new Blob([s],{type:`${t};charset=${e}`}):new Blob([s],{type:`${t}`}):new Blob([s]),hf=s=>{let t=Tt.UNKNOWN;switch(new DataView(s).getUint32(0,cf()).toString(16).toUpperCase()){case"FFD8FFDB":t=Tt.JPEG;break;case"FFD8FFE0":case"FFD8FFE1":case"FFD8FFE2":case"FFD8FFE3":t=Tt.JPEG;break;case"89504E47":t=Tt.PNG;break;case"47494638":t=Tt.GIF;break;case"52494646":t=Tt.WEBP;break;case"25504446":t=Tt.PDF;break;case"504B0304":t=Tt.ZIP;break}return t};function cf(){const s=Uint32Array.of(305419896),t=new Uint8Array(s.buffer);switch(t[0]*16777216+t[1]*65536+t[2]*256+t[3]){case 305419896:return!1;case 2018915346:return!0}}function ut(){return(performance||Date).now()}function se(s=new Date){return s.getTime()}function uf(s,t=3){const e=Math.max(s.length,6);let n="";for(let r=0;r<e-4;r++)n+=s[r]||"0";const i=[n,""+(s[e-4]||"0")+(s[e-3]||"0"),""+(s[e-2]||"0")+(s[e-1]||"0")];switch(t){case 1:return i[0];case 2:return i[0]+":"+i[1];case 3:return i[0]+":"+i[1]+":"+i[2]}}function lf(s){const t=Math.max(s.length,6);let e=0;e+=(s[t-2]||0)*10+(s[t-1]||0),e+=((s[t-4]||0)*10+(s[t-3]||0))*60;let n=0;for(let i=0;i<t-4;i++)n=n*10+(s[i]||0);return e+=n*60*60,Math.floor(Math.max(0,e))}function ff(s,t=!1){let e=0;typeof s=="number"?e=s:e=lf(s);const n=[],i=e%60;n.unshift(i%10),n.unshift(Math.floor(i/10)),e=Math.floor(e/60);const r=e%60;if(n.unshift(r%10),n.unshift(Math.floor(r/10)),e=Math.floor(e/60),t){const o=e%100;for(n.unshift(o%10),n.unshift(Math.floor(o/10)),e=Math.floor(e/100);e;)n.unshift(e%10),e=Math.floor(e/10)}else{const o=e%24;n.unshift(o%10),n.unshift(Math.floor(o/10))}return n}function df(s,t=1,e=!1){return s[s.length-1]+=t,ff(s,e)}const Mn={THROW:1,DROP:2,SLIDE:3,EXPAND:4};class mf{queue;limit;overflow;constructor(t=10,e=Mn.EXPAND){this.queue=[],this.limit=t,this.overflow=e}length(){return this.queue.length}isEmpty(){return this.length()===0}findIndex(t){return this.queue.findIndex(t)}deleteIndex(t){return!!this.queue.splice(t,1).length}delete(t){const e=this.findIndex(t);return e>-1?this.deleteIndex(e):!1}enqueue(t){if(this.length()<this.limit){this.queue.push(t);return}switch(this.overflow){case Mn.EXPAND:this.limit*=2,this.queue.push(t);break;case Mn.SLIDE:this.deleteIndex(0),this.queue.push(t);break;case Mn.THROW:throw new Error(`Queue limit(${this.limit}) overflow!`)}}push(t){this.enqueue(t)}put(t){this.enqueue(t)}dequeue(){return this.queue.shift()}pop(){return this.dequeue()}take(){return this.dequeue()}peek(){return this.queue[0]}index(t){return this.queue[t]}clear(){this.queue=[]}flush(){const t=[];let e;for(;e=this.dequeue();)t.push(e);return t}}const pf=s=>new mf(s,Mn.EXPAND);class cn{maps=new Map;constructor(){}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,n])=>(t[e]=n,t),{})}get length(){return this.entries().length}set(t,e){this.maps.set(t,e)}get(t){return this.maps.get(t)}has(t){return this.maps.has(t)}getEntryFromIndex(t){return this.entries()[t]}getEntry(t){const e=this.entries();for(let n=0,i=e.length;n<i;n++){const r=e[n];if(t(r[0],r[1]))return r}}firstEntry(){return this.getEntryFromIndex(0)}shift(){const t=this.firstEntry();if(t){const[e]=t;this.delete(e)}return t}delete(t){return this.maps.delete(t)}clear(){this.maps.clear()}update(t){const e=this.entries();for(let n=0,i=e.length;n<i;n++){const[r,o]=e[n];t(r,o)===!1&&this.delete(r)}}}function gf(){wt.OPEN_LOG=!0}function yf(){wt.OPEN_LOG=!1}function wf(s){wt.LOG_UPLOAD_FN=s}function Sa(){return!!wt.OPEN_LOG}function Ca(s){wt.LOG_UPLOAD_FN&&wt.LOG_UPLOAD_FN(s)}function ie(s){Ca({level:"info",msg:s}),Sa()&&(!console||typeof console!="object"||typeof console.log!="function"||console.log(s))}function ms(s){Ca({level:"warn",msg:s}),Sa()&&(!console||typeof console!="object"||typeof console.warn!="function"||console.warn(s))}const Ta=()=>{};function Ea(s=0,t){const e=t?.min||300,n=t?.max||6e4,i=t?.exponent||2,r=t?.factor||.5;let o=e*Math.pow(i,s);if(r){const a=Math.random(),h=Math.floor(a*r*o);o=Math.floor(a*10)&1?o+h:o-h}return Math.min(o,n)|0}function Pi(s,t=3,e,n){return async function(...i){const r=`retry(${s.name})(${i.map(an)})`;let o;for(let a=0;a<t;a++)try{return await s.call(n||this,...i)}catch(h){ie(`(${r}) 第 ${a+1} 次尝试失败, retrying...`),o=h,await new Promise(c=>setTimeout(c,typeof e=="number"?e:Ea(a)))}throw ie(`(${r}) 已 ${t} 次失败,不再重试。 Last error: ${an(o)}`),o}}function Mi(s,t=60,e=new cn,n){return async function(...i){const r=`cache(${s.name})(${i.map(an)})`,o=Date.now();t&&e.update((c,u)=>o-u.timestamp<t*1e3);const a=Ci(i),h=e.get(a);if(h){if(!t||o-h.timestamp<t*1e3)return ie(`${r} 击中缓存`),h.value;e.delete(a)}try{ie(`${r} 没有缓存, 尝试立即执行...`);const c=await s.call(n||this,...i);return ie(`${r} 缓存设置成功`),e.set(a,{value:c,timestamp:Date.now()}),c}catch(c){throw ie(`${r} 执行失败 : ${an(c)}`),c}}}var Ai=function(s,t){return Ai=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])},Ai(s,t)};function ki(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ai(s,t);function e(){this.constructor=s}s.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function Pa(s){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&s[t],n=0;if(e)return e.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&n>=s.length&&(s=void 0),{value:s&&s[n++],done:!s}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ii(s,t){var e=typeof Symbol=="function"&&s[Symbol.iterator];if(!e)return s;var n=e.call(s),i,r=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)r.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(o)throw o.error}}return r}function Di(s,t,e){if(e||arguments.length===2)for(var n=0,i=t.length,r;n<i;n++)(r||!(n in t))&&(r||(r=Array.prototype.slice.call(t,0,n)),r[n]=t[n]);return s.concat(r||Array.prototype.slice.call(t))}function le(s){return typeof s=="function"}function xf(s){var t=function(n){Error.call(n),n.stack=new Error().stack},e=s(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var Li=xf(function(s){return function(t){s(this),this.message=t?t.length+` errors occurred during unsubscription:
|
|
11
11
|
`+t.map(function(e,n){return n+1+") "+e.toString()}).join(`
|
|
12
|
-
`):"",this.name="UnsubscriptionError",this.errors=t}});function Ma(s,t){if(s){var e=s.indexOf(t);0<=e&&s.splice(e,1)}}var Ri=function(){function s(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return s.prototype.unsubscribe=function(){var t,e,n,i,r;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=Pa(o),h=a.next();!h.done;h=a.next()){var c=h.value;c.remove(this)}}catch(y){t={error:y}}finally{try{h&&!h.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var u=this.initialTeardown;if(le(u))try{u()}catch(y){r=y instanceof Li?y.errors:[y]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var m=Pa(l),f=m.next();!f.done;f=m.next()){var p=f.value;try{ka(p)}catch(y){r=r??[],y instanceof Li?r=Di(Di([],Ii(r)),Ii(y.errors)):r.push(y)}}}catch(y){n={error:y}}finally{try{f&&!f.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}}if(r)throw new Li(r)}},s.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)ka(t);else{if(t instanceof s){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},s.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},s.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},s.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Ma(e,t)},s.prototype.remove=function(t){var e=this._finalizers;e&&Ma(e,t),t instanceof s&&t._removeParent(this)},s.EMPTY=function(){var t=new s;return t.closed=!0,t}(),s}();Ri.EMPTY;function Aa(s){return s instanceof Ri||s&&"closed"in s&&le(s.remove)&&le(s.add)&&le(s.unsubscribe)}function ka(s){le(s)?s():s.unsubscribe()}var Ia={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},bf={setTimeout:function(s,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];return setTimeout.apply(void 0,Di([s,t],Ii(e)))},clearTimeout:function(s){return clearTimeout(s)},delegate:void 0};function vf(s){bf.setTimeout(function(){throw s})}function Da(){}function _f(s){s()}var Oi=function(s){ki(t,s);function t(e){var n=s.call(this)||this;return n.isStopped=!1,e?(n.destination=e,Aa(e)&&e.add(n)):n.destination=Ef,n}return t.create=function(e,n,i){return new Ni(e,n,i)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,s.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Ri),Sf=Function.prototype.bind;function zi(s,t){return Sf.call(s,t)}var Cf=function(){function s(t){this.partialObserver=t}return s.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(n){ps(n)}},s.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(n){ps(n)}else ps(t)},s.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){ps(e)}},s}(),Ni=function(s){ki(t,s);function t(e,n,i){var r=s.call(this)||this,o;if(le(e)||!e)o={next:e??void 0,error:n??void 0,complete:i??void 0};else{var a;r&&Ia.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return r.unsubscribe()},o={next:e.next&&zi(e.next,a),error:e.error&&zi(e.error,a),complete:e.complete&&zi(e.complete,a)}):o=e}return r.destination=new Cf(o),r}return t}(Oi);function ps(s){vf(s)}function Tf(s){throw s}var Ef={closed:!0,next:Da,error:Tf,complete:Da},Pf=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Mf(s){return s}function Af(s){return s.length===0?Mf:s.length===1?s[0]:function(t){return s.reduce(function(e,n){return n(e)},t)}}(function(){function s(t){t&&(this._subscribe=t)}return s.prototype.lift=function(t){var e=new s;return e.source=this,e.operator=t,e},s.prototype.subscribe=function(t,e,n){var i=this,r=If(t)?t:new Ni(t,e,n);return _f(function(){var o=i,a=o.operator,h=o.source;r.add(a?a.call(r,h):h?i._subscribe(r):i._trySubscribe(r))}),r},s.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},s.prototype.forEach=function(t,e){var n=this;return e=La(e),new e(function(i,r){var o=new Ni({next:function(a){try{t(a)}catch(h){r(h),o.unsubscribe()}},error:r,complete:i});n.subscribe(o)})},s.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},s.prototype[Pf]=function(){return this},s.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Af(t)(this)},s.prototype.toPromise=function(t){var e=this;return t=La(t),new t(function(n,i){var r;e.subscribe(function(o){return r=o},function(o){return i(o)},function(){return n(r)})})},s.create=function(t){return new s(t)},s})();function La(s){var t;return(t=s??Ia.Promise)!==null&&t!==void 0?t:Promise}function kf(s){return s&&le(s.next)&&le(s.error)&&le(s.complete)}function If(s){return s&&s instanceof Oi||kf(s)&&Aa(s)}(function(s){ki(t,s);function t(e,n,i,r,o,a){var h=s.call(this,e)||this;return h.onFinalize=o,h.shouldUnsubscribe=a,h._next=n?function(c){try{n(c)}catch(u){e.error(u)}}:s.prototype._next,h._error=r?function(c){try{r(c)}catch(u){e.error(u)}finally{this.unsubscribe()}}:s.prototype._error,h._complete=i?function(){try{i()}catch(c){e.error(c)}finally{this.unsubscribe()}}:s.prototype._complete,h}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;s.prototype.unsubscribe.call(this),!n&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t})(Oi);let kn;function jt(s){kn=s,s(),kn=null}class Df{subscribers=new Set;add(){kn&&!this.subscribers.has(kn)&&this.subscribers.add(kn)}notify(){this.subscribers.forEach(t=>t())}}const Ra=new WeakMap;function gs(s,t){let e=Ra.get(s);e||(e=new Map,Ra.set(s,e));let n=e.get(t);return n||(n=new Df,e.set(t,n)),n}function Lf(s,t=!1){return Object.keys(s).forEach(e=>{let n=s[e];if(t&&typeof n=="object"&&n!==null)s[e]=Fi(n,t);else{const i=gs(s,e);Object.defineProperty(s,e,{configurable:!0,enumerable:!0,get(){return i.add(),n},set(r){n!=r&&(n=r,i.notify())}})}}),s}function Bi(s,t=!1){return Lf({value:s},t)}function Fi(s,t=!1){const e={get(n,i,r){const o=Reflect.get(n,i,r);if(t&&typeof o=="object"&&o!==null&&!("isYZReactiveProxy"in o)){const a=Fi(o,t);a.YZReactiveProxyParentTarget=n,a.YZReactiveProxyParentKey=i,Reflect.set(r,i,a)}return gs(n,i).add(),Reflect.get(n,i,r)},set(n,i,r,o){const a=Reflect.get(n,i,o),h=Reflect.set(n,i,r,o);return Array.isArray(n)?gs(n.YZReactiveProxyParentTarget,n.YZReactiveProxyParentKey).notify():a!=r&&gs(n,i).notify(),h},has(n,i){return i==="isYZReactiveProxy"||i in n}};return new Proxy(s,e)}const Oa=Fi;class ys{events;constructor(){this.events={}}isEmpty(t){return this.events[t]==null||this.events[t].length==0}has(t,e){return this.events[t]!==void 0&&this.events[t].indexOf(e)!==-1}prependListener(t,e,n){return this.events[t]||(this.events[t]=[]),this.events[t].unshift(n?e.bind(n):e),this}addListener(t,e,n){return this.events[t]||(this.events[t]=[]),this.events[t].push(n?e.bind(n):e),this}on(t,e,n){return this.addListener(t,e,n),this}removeListener(t,e){return this.events[t]&&(this.events[t]=this.events[t].filter(n=>n!==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(n=>{n(...e)}),this}once(t,e,n){const i=(...r)=>{n?e.apply(n,r):e(...r),this.off(t,i)};return this.on(t,i),this}}function Rf(){const s={};return s.promise=new Promise((t,e)=>{s.resolve=t,s.reject=e}),s}let Of=0;function zf(s){const t=Rf();let e=!1;return{name:s.name||String(++Of),deadline:typeof s.deadline=="number"?Math.max(s.deadline,0):-1,run:async()=>{if(!e){e=!0;try{let n;const i=s.args||[];s.thisArg?n=await s.fn.call(s.thisArg,...i):n=await s.fn(...i),t.resolve(n)}catch(n){t.reject(n)}}},result:()=>t.promise}}class Nf{queue;suspend=!1;semaphore=0;concurrency=1;timeRemaining=-1;timeoutId;constructor(t){this.queue=t?.queue||pf(10),typeof t?.concurrency=="number"&&(this.concurrency=Math.max(t?.concurrency,1)),typeof t?.timeRemaining=="number"&&this.setTimeRemaining(t.timeRemaining)}setTimeRemaining(t){this.timeRemaining=Math.max(0,t)}increaseTimeRemaining(t,e=!1){this.timeRemaining!==-1?this.setTimeRemaining(this.timeRemaining+t):e&&this.setTimeRemaining(t)}decreaseTimeRemaining(t){this.timeRemaining!==-1&&this.setTimeRemaining(this.timeRemaining-t)}_exec(t,e=!0){const n=se();try{this.semaphore++,t.run()}finally{this.semaphore--,e&&(this.decreaseTimeRemaining(se()-n),this._flush())}}_flush(){for(;!this.suspend&&this.semaphore<this.concurrency&&(this.timeRemaining==-1||this.timeRemaining>0);){const t=this.queue.dequeue();if(!t)break;this._exec(t)}this._timeout()}_timeout(t=0,e=0){clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{if(!(this.suspend||this.semaphore>0||!this.queue.length)){for(let n=0;n<this.queue.length();){const i=this.queue.index(n);if(!i)break;i.deadline!=-1&&i.deadline<=se()?(this._exec(i,!1),this.queue.deleteIndex(n)):n++}this.queue.length()&&(this.timeoutId=setTimeout(()=>{this._timeout(t,++e)},300*Math.pow(2,e)))}},t)}pause(){this.suspend=!0}resume(){this.suspend=!1,this._flush()}addTask(t){this.queue.delete(e=>e.name==t.name),this.queue.enqueue(t)}immediately(t){this._exec(t),this._flush()}asap(t){this.addTask(t),this._flush()}idleCallback(t){this.setTimeRemaining(t.timeRemaining()),this._flush()}clear(){this.queue.clear()}}class Bf extends Nf{constructor(t){super(t)}_exec(t,e=!0){const n=se();try{this.semaphore++,t.run()}finally{t.result().finally(()=>{this.semaphore--,e&&(this.decreaseTimeRemaining(se()-n),this._flush())})}}}function za(s,t={},e){if(typeof t=="function"&&(e=t,t={}),e)return e(za)(s,t);let n=t;const i=[],r=c=>(i.push(c),()=>{Ne(i,c)}),o=c=>{n=s(n,c),i.forEach(u=>u())},a=()=>n,h=c=>{s=c,o({type:Symbol()})};return o({type:Symbol()}),{getState:a,dispatch:o,subscribe:r,replaceReducer:h}}function Na(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Ba={exports:{}};(function(s,t){(function(e){s.exports=e()})(function(e){var n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function i(w,_){var x=w[0],b=w[1],E=w[2],C=w[3];x+=(b&E|~b&C)+_[0]-680876936|0,x=(x<<7|x>>>25)+b|0,C+=(x&b|~x&E)+_[1]-389564586|0,C=(C<<12|C>>>20)+x|0,E+=(C&x|~C&b)+_[2]+606105819|0,E=(E<<17|E>>>15)+C|0,b+=(E&C|~E&x)+_[3]-1044525330|0,b=(b<<22|b>>>10)+E|0,x+=(b&E|~b&C)+_[4]-176418897|0,x=(x<<7|x>>>25)+b|0,C+=(x&b|~x&E)+_[5]+1200080426|0,C=(C<<12|C>>>20)+x|0,E+=(C&x|~C&b)+_[6]-1473231341|0,E=(E<<17|E>>>15)+C|0,b+=(E&C|~E&x)+_[7]-45705983|0,b=(b<<22|b>>>10)+E|0,x+=(b&E|~b&C)+_[8]+1770035416|0,x=(x<<7|x>>>25)+b|0,C+=(x&b|~x&E)+_[9]-1958414417|0,C=(C<<12|C>>>20)+x|0,E+=(C&x|~C&b)+_[10]-42063|0,E=(E<<17|E>>>15)+C|0,b+=(E&C|~E&x)+_[11]-1990404162|0,b=(b<<22|b>>>10)+E|0,x+=(b&E|~b&C)+_[12]+1804603682|0,x=(x<<7|x>>>25)+b|0,C+=(x&b|~x&E)+_[13]-40341101|0,C=(C<<12|C>>>20)+x|0,E+=(C&x|~C&b)+_[14]-1502002290|0,E=(E<<17|E>>>15)+C|0,b+=(E&C|~E&x)+_[15]+1236535329|0,b=(b<<22|b>>>10)+E|0,x+=(b&C|E&~C)+_[1]-165796510|0,x=(x<<5|x>>>27)+b|0,C+=(x&E|b&~E)+_[6]-1069501632|0,C=(C<<9|C>>>23)+x|0,E+=(C&b|x&~b)+_[11]+643717713|0,E=(E<<14|E>>>18)+C|0,b+=(E&x|C&~x)+_[0]-373897302|0,b=(b<<20|b>>>12)+E|0,x+=(b&C|E&~C)+_[5]-701558691|0,x=(x<<5|x>>>27)+b|0,C+=(x&E|b&~E)+_[10]+38016083|0,C=(C<<9|C>>>23)+x|0,E+=(C&b|x&~b)+_[15]-660478335|0,E=(E<<14|E>>>18)+C|0,b+=(E&x|C&~x)+_[4]-405537848|0,b=(b<<20|b>>>12)+E|0,x+=(b&C|E&~C)+_[9]+568446438|0,x=(x<<5|x>>>27)+b|0,C+=(x&E|b&~E)+_[14]-1019803690|0,C=(C<<9|C>>>23)+x|0,E+=(C&b|x&~b)+_[3]-187363961|0,E=(E<<14|E>>>18)+C|0,b+=(E&x|C&~x)+_[8]+1163531501|0,b=(b<<20|b>>>12)+E|0,x+=(b&C|E&~C)+_[13]-1444681467|0,x=(x<<5|x>>>27)+b|0,C+=(x&E|b&~E)+_[2]-51403784|0,C=(C<<9|C>>>23)+x|0,E+=(C&b|x&~b)+_[7]+1735328473|0,E=(E<<14|E>>>18)+C|0,b+=(E&x|C&~x)+_[12]-1926607734|0,b=(b<<20|b>>>12)+E|0,x+=(b^E^C)+_[5]-378558|0,x=(x<<4|x>>>28)+b|0,C+=(x^b^E)+_[8]-2022574463|0,C=(C<<11|C>>>21)+x|0,E+=(C^x^b)+_[11]+1839030562|0,E=(E<<16|E>>>16)+C|0,b+=(E^C^x)+_[14]-35309556|0,b=(b<<23|b>>>9)+E|0,x+=(b^E^C)+_[1]-1530992060|0,x=(x<<4|x>>>28)+b|0,C+=(x^b^E)+_[4]+1272893353|0,C=(C<<11|C>>>21)+x|0,E+=(C^x^b)+_[7]-155497632|0,E=(E<<16|E>>>16)+C|0,b+=(E^C^x)+_[10]-1094730640|0,b=(b<<23|b>>>9)+E|0,x+=(b^E^C)+_[13]+681279174|0,x=(x<<4|x>>>28)+b|0,C+=(x^b^E)+_[0]-358537222|0,C=(C<<11|C>>>21)+x|0,E+=(C^x^b)+_[3]-722521979|0,E=(E<<16|E>>>16)+C|0,b+=(E^C^x)+_[6]+76029189|0,b=(b<<23|b>>>9)+E|0,x+=(b^E^C)+_[9]-640364487|0,x=(x<<4|x>>>28)+b|0,C+=(x^b^E)+_[12]-421815835|0,C=(C<<11|C>>>21)+x|0,E+=(C^x^b)+_[15]+530742520|0,E=(E<<16|E>>>16)+C|0,b+=(E^C^x)+_[2]-995338651|0,b=(b<<23|b>>>9)+E|0,x+=(E^(b|~C))+_[0]-198630844|0,x=(x<<6|x>>>26)+b|0,C+=(b^(x|~E))+_[7]+1126891415|0,C=(C<<10|C>>>22)+x|0,E+=(x^(C|~b))+_[14]-1416354905|0,E=(E<<15|E>>>17)+C|0,b+=(C^(E|~x))+_[5]-57434055|0,b=(b<<21|b>>>11)+E|0,x+=(E^(b|~C))+_[12]+1700485571|0,x=(x<<6|x>>>26)+b|0,C+=(b^(x|~E))+_[3]-1894986606|0,C=(C<<10|C>>>22)+x|0,E+=(x^(C|~b))+_[10]-1051523|0,E=(E<<15|E>>>17)+C|0,b+=(C^(E|~x))+_[1]-2054922799|0,b=(b<<21|b>>>11)+E|0,x+=(E^(b|~C))+_[8]+1873313359|0,x=(x<<6|x>>>26)+b|0,C+=(b^(x|~E))+_[15]-30611744|0,C=(C<<10|C>>>22)+x|0,E+=(x^(C|~b))+_[6]-1560198380|0,E=(E<<15|E>>>17)+C|0,b+=(C^(E|~x))+_[13]+1309151649|0,b=(b<<21|b>>>11)+E|0,x+=(E^(b|~C))+_[4]-145523070|0,x=(x<<6|x>>>26)+b|0,C+=(b^(x|~E))+_[11]-1120210379|0,C=(C<<10|C>>>22)+x|0,E+=(x^(C|~b))+_[2]+718787259|0,E=(E<<15|E>>>17)+C|0,b+=(C^(E|~x))+_[9]-343485551|0,b=(b<<21|b>>>11)+E|0,w[0]=x+w[0]|0,w[1]=b+w[1]|0,w[2]=E+w[2]|0,w[3]=C+w[3]|0}function r(w){var _=[],x;for(x=0;x<64;x+=4)_[x>>2]=w.charCodeAt(x)+(w.charCodeAt(x+1)<<8)+(w.charCodeAt(x+2)<<16)+(w.charCodeAt(x+3)<<24);return _}function o(w){var _=[],x;for(x=0;x<64;x+=4)_[x>>2]=w[x]+(w[x+1]<<8)+(w[x+2]<<16)+(w[x+3]<<24);return _}function a(w){var _=w.length,x=[1732584193,-271733879,-1732584194,271733878],b,E,C,L,B,F;for(b=64;b<=_;b+=64)i(x,r(w.substring(b-64,b)));for(w=w.substring(b-64),E=w.length,C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],b=0;b<E;b+=1)C[b>>2]|=w.charCodeAt(b)<<(b%4<<3);if(C[b>>2]|=128<<(b%4<<3),b>55)for(i(x,C),b=0;b<16;b+=1)C[b]=0;return L=_*8,L=L.toString(16).match(/(.*?)(.{0,8})$/),B=parseInt(L[2],16),F=parseInt(L[1],16)||0,C[14]=B,C[15]=F,i(x,C),x}function h(w){var _=w.length,x=[1732584193,-271733879,-1732584194,271733878],b,E,C,L,B,F;for(b=64;b<=_;b+=64)i(x,o(w.subarray(b-64,b)));for(w=b-64<_?w.subarray(b-64):new Uint8Array(0),E=w.length,C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],b=0;b<E;b+=1)C[b>>2]|=w[b]<<(b%4<<3);if(C[b>>2]|=128<<(b%4<<3),b>55)for(i(x,C),b=0;b<16;b+=1)C[b]=0;return L=_*8,L=L.toString(16).match(/(.*?)(.{0,8})$/),B=parseInt(L[2],16),F=parseInt(L[1],16)||0,C[14]=B,C[15]=F,i(x,C),x}function c(w){var _="",x;for(x=0;x<4;x+=1)_+=n[w>>x*8+4&15]+n[w>>x*8&15];return _}function u(w){var _;for(_=0;_<w.length;_+=1)w[_]=c(w[_]);return w.join("")}u(a("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function w(_,x){return _=_|0||0,_<0?Math.max(_+x,0):Math.min(_,x)}ArrayBuffer.prototype.slice=function(_,x){var b=this.byteLength,E=w(_,b),C=b,L,B,F,U;return x!==e&&(C=w(x,b)),E>C?new ArrayBuffer(0):(L=C-E,B=new ArrayBuffer(L),F=new Uint8Array(B),U=new Uint8Array(this,E,L),F.set(U),B)}}();function l(w){return/[\u0080-\uFFFF]/.test(w)&&(w=unescape(encodeURIComponent(w))),w}function m(w,_){var x=w.length,b=new ArrayBuffer(x),E=new Uint8Array(b),C;for(C=0;C<x;C+=1)E[C]=w.charCodeAt(C);return _?E:b}function f(w){return String.fromCharCode.apply(null,new Uint8Array(w))}function p(w,_,x){var b=new Uint8Array(w.byteLength+_.byteLength);return b.set(new Uint8Array(w)),b.set(new Uint8Array(_),w.byteLength),x?b:b.buffer}function y(w){var _=[],x=w.length,b;for(b=0;b<x-1;b+=2)_.push(parseInt(w.substr(b,2),16));return String.fromCharCode.apply(String,_)}function v(){this.reset()}return v.prototype.append=function(w){return this.appendBinary(l(w)),this},v.prototype.appendBinary=function(w){this._buff+=w,this._length+=w.length;var _=this._buff.length,x;for(x=64;x<=_;x+=64)i(this._hash,r(this._buff.substring(x-64,x)));return this._buff=this._buff.substring(x-64),this},v.prototype.end=function(w){var _=this._buff,x=_.length,b,E=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],C;for(b=0;b<x;b+=1)E[b>>2]|=_.charCodeAt(b)<<(b%4<<3);return this._finish(E,x),C=u(this._hash),w&&(C=y(C)),this.reset(),C},v.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},v.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},v.prototype.setState=function(w){return this._buff=w.buff,this._length=w.length,this._hash=w.hash,this},v.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},v.prototype._finish=function(w,_){var x=_,b,E,C;if(w[x>>2]|=128<<(x%4<<3),x>55)for(i(this._hash,w),x=0;x<16;x+=1)w[x]=0;b=this._length*8,b=b.toString(16).match(/(.*?)(.{0,8})$/),E=parseInt(b[2],16),C=parseInt(b[1],16)||0,w[14]=E,w[15]=C,i(this._hash,w)},v.hash=function(w,_){return v.hashBinary(l(w),_)},v.hashBinary=function(w,_){var x=a(w),b=u(x);return _?y(b):b},v.ArrayBuffer=function(){this.reset()},v.ArrayBuffer.prototype.append=function(w){var _=p(this._buff.buffer,w,!0),x=_.length,b;for(this._length+=w.byteLength,b=64;b<=x;b+=64)i(this._hash,o(_.subarray(b-64,b)));return this._buff=b-64<x?new Uint8Array(_.buffer.slice(b-64)):new Uint8Array(0),this},v.ArrayBuffer.prototype.end=function(w){var _=this._buff,x=_.length,b=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],E,C;for(E=0;E<x;E+=1)b[E>>2]|=_[E]<<(E%4<<3);return this._finish(b,x),C=u(this._hash),w&&(C=y(C)),this.reset(),C},v.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},v.ArrayBuffer.prototype.getState=function(){var w=v.prototype.getState.call(this);return w.buff=f(w.buff),w},v.ArrayBuffer.prototype.setState=function(w){return w.buff=m(w.buff,!0),v.prototype.setState.call(this,w)},v.ArrayBuffer.prototype.destroy=v.prototype.destroy,v.ArrayBuffer.prototype._finish=v.prototype._finish,v.ArrayBuffer.hash=function(w,_){var x=h(new Uint8Array(w)),b=u(x);return _?y(b):b},v})})(Ba);var Ff=Ba.exports;const Yf=Na(Ff);function Fa(s,t){return function(){return s.apply(t,arguments)}}const{toString:$f}=Object.prototype,{getPrototypeOf:Yi}=Object,ws=(s=>t=>{const e=$f.call(t);return s[e]||(s[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ht=s=>(s=s.toLowerCase(),t=>ws(t)===s),xs=s=>t=>typeof t===s,{isArray:un}=Array,In=xs("undefined");function Xf(s){return s!==null&&!In(s)&&s.constructor!==null&&!In(s.constructor)&&Rt(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const Ya=Ht("ArrayBuffer");function Uf(s){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(s):t=s&&s.buffer&&Ya(s.buffer),t}const Vf=xs("string"),Rt=xs("function"),$a=xs("number"),bs=s=>s!==null&&typeof s=="object",Gf=s=>s===!0||s===!1,vs=s=>{if(ws(s)!=="object")return!1;const t=Yi(s);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)},qf=Ht("Date"),jf=Ht("File"),Hf=Ht("Blob"),Wf=Ht("FileList"),Jf=s=>bs(s)&&Rt(s.pipe),Zf=s=>{let t;return s&&(typeof FormData=="function"&&s instanceof FormData||Rt(s.append)&&((t=ws(s))==="formdata"||t==="object"&&Rt(s.toString)&&s.toString()==="[object FormData]"))},Qf=Ht("URLSearchParams"),[Kf,td,ed,nd]=["ReadableStream","Request","Response","Headers"].map(Ht),sd=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Dn(s,t,{allOwnKeys:e=!1}={}){if(s===null||typeof s>"u")return;let n,i;if(typeof s!="object"&&(s=[s]),un(s))for(n=0,i=s.length;n<i;n++)t.call(null,s[n],n,s);else{const r=e?Object.getOwnPropertyNames(s):Object.keys(s),o=r.length;let a;for(n=0;n<o;n++)a=r[n],t.call(null,s[a],a,s)}}function Xa(s,t){t=t.toLowerCase();const e=Object.keys(s);let n=e.length,i;for(;n-- >0;)if(i=e[n],t===i.toLowerCase())return i;return null}const Be=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Ua=s=>!In(s)&&s!==Be;function $i(){const{caseless:s}=Ua(this)&&this||{},t={},e=(n,i)=>{const r=s&&Xa(t,i)||i;vs(t[r])&&vs(n)?t[r]=$i(t[r],n):vs(n)?t[r]=$i({},n):un(n)?t[r]=n.slice():t[r]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&Dn(arguments[n],e);return t}const id=(s,t,e,{allOwnKeys:n}={})=>(Dn(t,(i,r)=>{e&&Rt(i)?s[r]=Fa(i,e):s[r]=i},{allOwnKeys:n}),s),rd=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),od=(s,t,e,n)=>{s.prototype=Object.create(t.prototype,n),s.prototype.constructor=s,Object.defineProperty(s,"super",{value:t.prototype}),e&&Object.assign(s.prototype,e)},ad=(s,t,e,n)=>{let i,r,o;const a={};if(t=t||{},s==null)return t;do{for(i=Object.getOwnPropertyNames(s),r=i.length;r-- >0;)o=i[r],(!n||n(o,s,t))&&!a[o]&&(t[o]=s[o],a[o]=!0);s=e!==!1&&Yi(s)}while(s&&(!e||e(s,t))&&s!==Object.prototype);return t},hd=(s,t,e)=>{s=String(s),(e===void 0||e>s.length)&&(e=s.length),e-=t.length;const n=s.indexOf(t,e);return n!==-1&&n===e},cd=s=>{if(!s)return null;if(un(s))return s;let t=s.length;if(!$a(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=s[t];return e},ud=(s=>t=>s&&t instanceof s)(typeof Uint8Array<"u"&&Yi(Uint8Array)),ld=(s,t)=>{const n=(s&&s[Symbol.iterator]).call(s);let i;for(;(i=n.next())&&!i.done;){const r=i.value;t.call(s,r[0],r[1])}},fd=(s,t)=>{let e;const n=[];for(;(e=s.exec(t))!==null;)n.push(e);return n},dd=Ht("HTMLFormElement"),md=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,i){return n.toUpperCase()+i}),Va=(({hasOwnProperty:s})=>(t,e)=>s.call(t,e))(Object.prototype),pd=Ht("RegExp"),Ga=(s,t)=>{const e=Object.getOwnPropertyDescriptors(s),n={};Dn(e,(i,r)=>{let o;(o=t(i,r,s))!==!1&&(n[r]=o||i)}),Object.defineProperties(s,n)},gd=s=>{Ga(s,(t,e)=>{if(Rt(s)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const n=s[e];if(Rt(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},yd=(s,t)=>{const e={},n=i=>{i.forEach(r=>{e[r]=!0})};return un(s)?n(s):n(String(s).split(t)),e},wd=()=>{},xd=(s,t)=>s!=null&&Number.isFinite(s=+s)?s:t;function bd(s){return!!(s&&Rt(s.append)&&s[Symbol.toStringTag]==="FormData"&&s[Symbol.iterator])}const vd=s=>{const t=new Array(10),e=(n,i)=>{if(bs(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[i]=n;const r=un(n)?[]:{};return Dn(n,(o,a)=>{const h=e(o,i+1);!In(h)&&(r[a]=h)}),t[i]=void 0,r}}return n};return e(s,0)},_d=Ht("AsyncFunction"),Sd=s=>s&&(bs(s)||Rt(s))&&Rt(s.then)&&Rt(s.catch),qa=((s,t)=>s?setImmediate:t?((e,n)=>(Be.addEventListener("message",({source:i,data:r})=>{i===Be&&r===e&&n.length&&n.shift()()},!1),i=>{n.push(i),Be.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",Rt(Be.postMessage)),Cd=typeof queueMicrotask<"u"?queueMicrotask.bind(Be):typeof process<"u"&&process.nextTick||qa,A={isArray:un,isArrayBuffer:Ya,isBuffer:Xf,isFormData:Zf,isArrayBufferView:Uf,isString:Vf,isNumber:$a,isBoolean:Gf,isObject:bs,isPlainObject:vs,isReadableStream:Kf,isRequest:td,isResponse:ed,isHeaders:nd,isUndefined:In,isDate:qf,isFile:jf,isBlob:Hf,isRegExp:pd,isFunction:Rt,isStream:Jf,isURLSearchParams:Qf,isTypedArray:ud,isFileList:Wf,forEach:Dn,merge:$i,extend:id,trim:sd,stripBOM:rd,inherits:od,toFlatObject:ad,kindOf:ws,kindOfTest:Ht,endsWith:hd,toArray:cd,forEachEntry:ld,matchAll:fd,isHTMLForm:dd,hasOwnProperty:Va,hasOwnProp:Va,reduceDescriptors:Ga,freezeMethods:gd,toObjectSet:yd,toCamelCase:md,noop:wd,toFiniteNumber:xd,findKey:Xa,global:Be,isContextDefined:Ua,isSpecCompliantForm:bd,toJSONObject:vd,isAsyncFn:_d,isThenable:Sd,setImmediate:qa,asap:Cd};function Y(s,t,e,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=s,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}A.inherits(Y,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:A.toJSONObject(this.config),code:this.code,status:this.status}}});const ja=Y.prototype,Ha={};["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(s=>{Ha[s]={value:s}}),Object.defineProperties(Y,Ha),Object.defineProperty(ja,"isAxiosError",{value:!0}),Y.from=(s,t,e,n,i,r)=>{const o=Object.create(ja);return A.toFlatObject(s,o,function(h){return h!==Error.prototype},a=>a!=="isAxiosError"),Y.call(o,s.message,t,e,n,i),o.cause=s,o.name=s.name,r&&Object.assign(o,r),o};const Td=null;function Xi(s){return A.isPlainObject(s)||A.isArray(s)}function Wa(s){return A.endsWith(s,"[]")?s.slice(0,-2):s}function Ja(s,t,e){return s?s.concat(t).map(function(i,r){return i=Wa(i),!e&&r?"["+i+"]":i}).join(e?".":""):t}function Ed(s){return A.isArray(s)&&!s.some(Xi)}const Pd=A.toFlatObject(A,{},null,function(t){return/^is[A-Z]/.test(t)});function _s(s,t,e){if(!A.isObject(s))throw new TypeError("target must be an object");t=t||new FormData,e=A.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,v){return!A.isUndefined(v[y])});const n=e.metaTokens,i=e.visitor||u,r=e.dots,o=e.indexes,h=(e.Blob||typeof Blob<"u"&&Blob)&&A.isSpecCompliantForm(t);if(!A.isFunction(i))throw new TypeError("visitor must be a function");function c(p){if(p===null)return"";if(A.isDate(p))return p.toISOString();if(!h&&A.isBlob(p))throw new Y("Blob is not supported. Use a Buffer instead.");return A.isArrayBuffer(p)||A.isTypedArray(p)?h&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,y,v){let w=p;if(p&&!v&&typeof p=="object"){if(A.endsWith(y,"{}"))y=n?y:y.slice(0,-2),p=JSON.stringify(p);else if(A.isArray(p)&&Ed(p)||(A.isFileList(p)||A.endsWith(y,"[]"))&&(w=A.toArray(p)))return y=Wa(y),w.forEach(function(x,b){!(A.isUndefined(x)||x===null)&&t.append(o===!0?Ja([y],b,r):o===null?y:y+"[]",c(x))}),!1}return Xi(p)?!0:(t.append(Ja(v,y,r),c(p)),!1)}const l=[],m=Object.assign(Pd,{defaultVisitor:u,convertValue:c,isVisitable:Xi});function f(p,y){if(!A.isUndefined(p)){if(l.indexOf(p)!==-1)throw Error("Circular reference detected in "+y.join("."));l.push(p),A.forEach(p,function(w,_){(!(A.isUndefined(w)||w===null)&&i.call(t,w,A.isString(_)?_.trim():_,y,m))===!0&&f(w,y?y.concat(_):[_])}),l.pop()}}if(!A.isObject(s))throw new TypeError("data must be an object");return f(s),t}function Za(s){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Ui(s,t){this._pairs=[],s&&_s(s,this,t)}const Qa=Ui.prototype;Qa.append=function(t,e){this._pairs.push([t,e])},Qa.toString=function(t){const e=t?function(n){return t.call(this,n,Za)}:Za;return this._pairs.map(function(i){return e(i[0])+"="+e(i[1])},"").join("&")};function Md(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ka(s,t,e){if(!t)return s;const n=e&&e.encode||Md;A.isFunction(e)&&(e={serialize:e});const i=e&&e.serialize;let r;if(i?r=i(t,e):r=A.isURLSearchParams(t)?t.toString():new Ui(t,e).toString(n),r){const o=s.indexOf("#");o!==-1&&(s=s.slice(0,o)),s+=(s.indexOf("?")===-1?"?":"&")+r}return s}class Ad{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){A.forEach(this.handlers,function(n){n!==null&&t(n)})}}const th=Ad,eh={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},kd={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ui,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Vi=typeof window<"u"&&typeof document<"u",Gi=typeof navigator=="object"&&navigator||void 0,Id=Vi&&(!Gi||["ReactNative","NativeScript","NS"].indexOf(Gi.product)<0),Dd=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Ld=Vi&&window.location.href||"http://localhost",bt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Vi,hasStandardBrowserEnv:Id,hasStandardBrowserWebWorkerEnv:Dd,navigator:Gi,origin:Ld},Symbol.toStringTag,{value:"Module"})),...kd};function Rd(s,t){return _s(s,new bt.classes.URLSearchParams,Object.assign({visitor:function(e,n,i,r){return bt.isNode&&A.isBuffer(e)?(this.append(n,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}function Od(s){return A.matchAll(/\w+|\[(\w*)]/g,s).map(t=>t[0]==="[]"?"":t[1]||t[0])}function zd(s){const t={},e=Object.keys(s);let n;const i=e.length;let r;for(n=0;n<i;n++)r=e[n],t[r]=s[r];return t}function nh(s){function t(e,n,i,r){let o=e[r++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),h=r>=e.length;return o=!o&&A.isArray(i)?i.length:o,h?(A.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!a):((!i[o]||!A.isObject(i[o]))&&(i[o]=[]),t(e,n,i[o],r)&&A.isArray(i[o])&&(i[o]=zd(i[o])),!a)}if(A.isFormData(s)&&A.isFunction(s.entries)){const e={};return A.forEachEntry(s,(n,i)=>{t(Od(n),i,e,0)}),e}return null}function Nd(s,t,e){if(A.isString(s))try{return(t||JSON.parse)(s),A.trim(s)}catch(n){if(n.name!=="SyntaxError")throw n}return(e||JSON.stringify)(s)}const qi={transitional:eh,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,r=A.isObject(t);if(r&&A.isHTMLForm(t)&&(t=new FormData(t)),A.isFormData(t))return i?JSON.stringify(nh(t)):t;if(A.isArrayBuffer(t)||A.isBuffer(t)||A.isStream(t)||A.isFile(t)||A.isBlob(t)||A.isReadableStream(t))return t;if(A.isArrayBufferView(t))return t.buffer;if(A.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Rd(t,this.formSerializer).toString();if((a=A.isFileList(t))||n.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return _s(a?{"files[]":t}:t,h&&new h,this.formSerializer)}}return r||i?(e.setContentType("application/json",!1),Nd(t)):t}],transformResponse:[function(t){const e=this.transitional||qi.transitional,n=e&&e.forcedJSONParsing,i=this.responseType==="json";if(A.isResponse(t)||A.isReadableStream(t))return t;if(t&&A.isString(t)&&(n&&!this.responseType||i)){const o=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(o)throw a.name==="SyntaxError"?Y.from(a,Y.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:bt.classes.FormData,Blob:bt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};A.forEach(["delete","get","head","post","put","patch"],s=>{qi.headers[s]={}});const ji=qi,Bd=A.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"]),Fd=s=>{const t={};let e,n,i;return s&&s.split(`
|
|
13
|
-
`).forEach(function(o){i=o.indexOf(":"),e=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!e||t[e]&&Bd[e])&&(e==="set-cookie"?t[e]?t[e].push(n):t[e]=[n]:t[e]=t[e]?t[e]+", "+n:n)}),t},sh=Symbol("internals");function
|
|
14
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[sh]=this[sh]={accessors:{}}).accessors,i=this.prototype;function r(o){const a=Ln(o);n[a]||(Ud(i,o),n[a]=!0)}return A.isArray(t)?t.forEach(r):r(t),this}}Cs.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),A.reduceDescriptors(Cs.prototype,({value:s},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>s,set(n){this[e]=n}}}),A.freezeMethods(Cs);const Wt=Cs;function Wi(s,t){const e=this||ji,n=t||e,i=Wt.from(n.headers);let r=n.data;return A.forEach(s,function(a){r=a.call(e,r,i.normalize(),t?t.status:void 0)}),i.normalize(),r}function ih(s){return!!(s&&s.__CANCEL__)}function ln(s,t,e){Y.call(this,s??"canceled",Y.ERR_CANCELED,t,e),this.name="CanceledError"}A.inherits(ln,Y,{__CANCEL__:!0});function rh(s,t,e){const n=e.config.validateStatus;!e.status||!n||n(e.status)?s(e):t(new Y("Request failed with status code "+e.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function Vd(s){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(s);return t&&t[1]||""}function Gd(s,t){s=s||10;const e=new Array(s),n=new Array(s);let i=0,r=0,o;return t=t!==void 0?t:1e3,function(h){const c=Date.now(),u=n[r];o||(o=c),e[i]=h,n[i]=c;let l=r,m=0;for(;l!==i;)m+=e[l++],l=l%s;if(i=(i+1)%s,i===r&&(r=(r+1)%s),c-o<t)return;const f=u&&c-u;return f?Math.round(m*1e3/f):void 0}}function qd(s,t){let e=0,n=1e3/t,i,r;const o=(c,u=Date.now())=>{e=u,i=null,r&&(clearTimeout(r),r=null),s.apply(null,c)};return[(...c)=>{const u=Date.now(),l=u-e;l>=n?o(c,u):(i=c,r||(r=setTimeout(()=>{r=null,o(i)},n-l)))},()=>i&&o(i)]}const Ts=(s,t,e=3)=>{let n=0;const i=Gd(50,250);return qd(r=>{const o=r.loaded,a=r.lengthComputable?r.total:void 0,h=o-n,c=i(h),u=o<=a;n=o;const l={loaded:o,total:a,progress:a?o/a:void 0,bytes:h,rate:c||void 0,estimated:c&&a&&u?(a-o)/c:void 0,event:r,lengthComputable:a!=null,[t?"download":"upload"]:!0};s(l)},e)},oh=(s,t)=>{const e=s!=null;return[n=>t[0]({lengthComputable:e,total:s,loaded:n}),t[1]]},ah=s=>(...t)=>A.asap(()=>s(...t)),jd=bt.hasStandardBrowserEnv?((s,t)=>e=>(e=new URL(e,bt.origin),s.protocol===e.protocol&&s.host===e.host&&(t||s.port===e.port)))(new URL(bt.origin),bt.navigator&&/(msie|trident)/i.test(bt.navigator.userAgent)):()=>!0,Hd=bt.hasStandardBrowserEnv?{write(s,t,e,n,i,r){const o=[s+"="+encodeURIComponent(t)];A.isNumber(e)&&o.push("expires="+new Date(e).toGMTString()),A.isString(n)&&o.push("path="+n),A.isString(i)&&o.push("domain="+i),r===!0&&o.push("secure"),document.cookie=o.join("; ")},read(s){const t=document.cookie.match(new RegExp("(^|;\\s*)("+s+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(s){this.write(s,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Wd(s){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function Jd(s,t){return t?s.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):s}function hh(s,t,e){let n=!Wd(t);return s&&(n||e==!1)?Jd(s,t):t}const ch=s=>s instanceof Wt?{...s}:s;function Fe(s,t){t=t||{};const e={};function n(c,u,l,m){return A.isPlainObject(c)&&A.isPlainObject(u)?A.merge.call({caseless:m},c,u):A.isPlainObject(u)?A.merge({},u):A.isArray(u)?u.slice():u}function i(c,u,l,m){if(A.isUndefined(u)){if(!A.isUndefined(c))return n(void 0,c,l,m)}else return n(c,u,l,m)}function r(c,u){if(!A.isUndefined(u))return n(void 0,u)}function o(c,u){if(A.isUndefined(u)){if(!A.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function a(c,u,l){if(l in t)return n(c,u);if(l in s)return n(void 0,c)}const h={url:r,method:r,data:r,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,u,l)=>i(ch(c),ch(u),l,!0)};return A.forEach(Object.keys(Object.assign({},s,t)),function(u){const l=h[u]||i,m=l(s[u],t[u],u);A.isUndefined(m)&&l!==a||(e[u]=m)}),e}const uh=s=>{const t=Fe({},s);let{data:e,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:r,headers:o,auth:a}=t;t.headers=o=Wt.from(o),t.url=Ka(hh(t.baseURL,t.url,t.allowAbsoluteUrls),s.params,s.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let h;if(A.isFormData(e)){if(bt.hasStandardBrowserEnv||bt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((h=o.getContentType())!==!1){const[c,...u]=h?h.split(";").map(l=>l.trim()).filter(Boolean):[];o.setContentType([c||"multipart/form-data",...u].join("; "))}}if(bt.hasStandardBrowserEnv&&(n&&A.isFunction(n)&&(n=n(t)),n||n!==!1&&jd(t.url))){const c=i&&r&&Hd.read(r);c&&o.set(i,c)}return t},Zd=typeof XMLHttpRequest<"u"&&function(s){return new Promise(function(e,n){const i=uh(s);let r=i.data;const o=Wt.from(i.headers).normalize();let{responseType:a,onUploadProgress:h,onDownloadProgress:c}=i,u,l,m,f,p;function y(){f&&f(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let v=new XMLHttpRequest;v.open(i.method.toUpperCase(),i.url,!0),v.timeout=i.timeout;function w(){if(!v)return;const x=Wt.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),E={data:!a||a==="text"||a==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:x,config:s,request:v};rh(function(L){e(L),y()},function(L){n(L),y()},E),v=null}"onloadend"in v?v.onloadend=w:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(w)},v.onabort=function(){v&&(n(new Y("Request aborted",Y.ECONNABORTED,s,v)),v=null)},v.onerror=function(){n(new Y("Network Error",Y.ERR_NETWORK,s,v)),v=null},v.ontimeout=function(){let b=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||eh;i.timeoutErrorMessage&&(b=i.timeoutErrorMessage),n(new Y(b,E.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,s,v)),v=null},r===void 0&&o.setContentType(null),"setRequestHeader"in v&&A.forEach(o.toJSON(),function(b,E){v.setRequestHeader(E,b)}),A.isUndefined(i.withCredentials)||(v.withCredentials=!!i.withCredentials),a&&a!=="json"&&(v.responseType=i.responseType),c&&([m,p]=Ts(c,!0),v.addEventListener("progress",m)),h&&v.upload&&([l,f]=Ts(h),v.upload.addEventListener("progress",l),v.upload.addEventListener("loadend",f)),(i.cancelToken||i.signal)&&(u=x=>{v&&(n(!x||x.type?new ln(null,s,v):x),v.abort(),v=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const _=Vd(i.url);if(_&&bt.protocols.indexOf(_)===-1){n(new Y("Unsupported protocol "+_+":",Y.ERR_BAD_REQUEST,s));return}v.send(r||null)})},Qd=(s,t)=>{const{length:e}=s=s?s.filter(Boolean):[];if(t||e){let n=new AbortController,i;const r=function(c){if(!i){i=!0,a();const u=c instanceof Error?c:this.reason;n.abort(u instanceof Y?u:new ln(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,r(new Y(`timeout ${t} of ms exceeded`,Y.ETIMEDOUT))},t);const a=()=>{s&&(o&&clearTimeout(o),o=null,s.forEach(c=>{c.unsubscribe?c.unsubscribe(r):c.removeEventListener("abort",r)}),s=null)};s.forEach(c=>c.addEventListener("abort",r));const{signal:h}=n;return h.unsubscribe=()=>A.asap(a),h}},Kd=function*(s,t){let e=s.byteLength;if(!t||e<t){yield s;return}let n=0,i;for(;n<e;)i=n+t,yield s.slice(n,i),n=i},tm=async function*(s,t){for await(const e of em(s))yield*Kd(e,t)},em=async function*(s){if(s[Symbol.asyncIterator]){yield*s;return}const t=s.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},lh=(s,t,e,n)=>{const i=tm(s,t);let r=0,o,a=h=>{o||(o=!0,n&&n(h))};return new ReadableStream({async pull(h){try{const{done:c,value:u}=await i.next();if(c){a(),h.close();return}let l=u.byteLength;if(e){let m=r+=l;e(m)}h.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(h){return a(h),i.return()}},{highWaterMark:2})},Es=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",fh=Es&&typeof ReadableStream=="function",nm=Es&&(typeof TextEncoder=="function"?(s=>t=>s.encode(t))(new TextEncoder):async s=>new Uint8Array(await new Response(s).arrayBuffer())),dh=(s,...t)=>{try{return!!s(...t)}catch{return!1}},sm=fh&&dh(()=>{let s=!1;const t=new Request(bt.origin,{body:new ReadableStream,method:"POST",get duplex(){return s=!0,"half"}}).headers.has("Content-Type");return s&&!t}),mh=64*1024,Ji=fh&&dh(()=>A.isReadableStream(new Response("").body)),Ps={stream:Ji&&(s=>s.body)};Es&&(s=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ps[t]&&(Ps[t]=A.isFunction(s[t])?e=>e[t]():(e,n)=>{throw new Y(`Response type '${t}' is not supported`,Y.ERR_NOT_SUPPORT,n)})})})(new Response);const im=async s=>{if(s==null)return 0;if(A.isBlob(s))return s.size;if(A.isSpecCompliantForm(s))return(await new Request(bt.origin,{method:"POST",body:s}).arrayBuffer()).byteLength;if(A.isArrayBufferView(s)||A.isArrayBuffer(s))return s.byteLength;if(A.isURLSearchParams(s)&&(s=s+""),A.isString(s))return(await nm(s)).byteLength},rm=async(s,t)=>{const e=A.toFiniteNumber(s.getContentLength());return e??im(t)},Zi={http:Td,xhr:Zd,fetch:Es&&(async s=>{let{url:t,method:e,data:n,signal:i,cancelToken:r,timeout:o,onDownloadProgress:a,onUploadProgress:h,responseType:c,headers:u,withCredentials:l="same-origin",fetchOptions:m}=uh(s);c=c?(c+"").toLowerCase():"text";let f=Qd([i,r&&r.toAbortSignal()],o),p;const y=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let v;try{if(h&&sm&&e!=="get"&&e!=="head"&&(v=await rm(u,n))!==0){let E=new Request(t,{method:"POST",body:n,duplex:"half"}),C;if(A.isFormData(n)&&(C=E.headers.get("content-type"))&&u.setContentType(C),E.body){const[L,B]=oh(v,Ts(ah(h)));n=lh(E.body,mh,L,B)}}A.isString(l)||(l=l?"include":"omit");const w="credentials"in Request.prototype;p=new Request(t,{...m,signal:f,method:e.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:w?l:void 0});let _=await fetch(p);const x=Ji&&(c==="stream"||c==="response");if(Ji&&(a||x&&y)){const E={};["status","statusText","headers"].forEach(F=>{E[F]=_[F]});const C=A.toFiniteNumber(_.headers.get("content-length")),[L,B]=a&&oh(C,Ts(ah(a),!0))||[];_=new Response(lh(_.body,mh,L,()=>{B&&B(),y&&y()}),E)}c=c||"text";let b=await Ps[A.findKey(Ps,c)||"text"](_,s);return!x&&y&&y(),await new Promise((E,C)=>{rh(E,C,{data:b,headers:Wt.from(_.headers),status:_.status,statusText:_.statusText,config:s,request:p})})}catch(w){throw y&&y(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new Y("Network Error",Y.ERR_NETWORK,s,p),{cause:w.cause||w}):Y.from(w,w&&w.code,s,p)}})};A.forEach(Zi,(s,t)=>{if(s){try{Object.defineProperty(s,"name",{value:t})}catch{}Object.defineProperty(s,"adapterName",{value:t})}});const ph=s=>`- ${s}`,om=s=>A.isFunction(s)||s===null||s===!1,gh={getAdapter:s=>{s=A.isArray(s)?s:[s];const{length:t}=s;let e,n;const i={};for(let r=0;r<t;r++){e=s[r];let o;if(n=e,!om(e)&&(n=Zi[(o=String(e)).toLowerCase()],n===void 0))throw new Y(`Unknown adapter '${o}'`);if(n)break;i[o||"#"+r]=n}if(!n){const r=Object.entries(i).map(([a,h])=>`adapter ${a} `+(h===!1?"is not supported by the environment":"is not available in the build"));let o=t?r.length>1?`since :
|
|
12
|
+
`):"",this.name="UnsubscriptionError",this.errors=t}});function Ma(s,t){if(s){var e=s.indexOf(t);0<=e&&s.splice(e,1)}}var Ri=function(){function s(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return s.prototype.unsubscribe=function(){var t,e,n,i,r;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=Pa(o),h=a.next();!h.done;h=a.next()){var c=h.value;c.remove(this)}}catch(y){t={error:y}}finally{try{h&&!h.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var u=this.initialTeardown;if(le(u))try{u()}catch(y){r=y instanceof Li?y.errors:[y]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var m=Pa(l),f=m.next();!f.done;f=m.next()){var p=f.value;try{ka(p)}catch(y){r=r??[],y instanceof Li?r=Di(Di([],Ii(r)),Ii(y.errors)):r.push(y)}}}catch(y){n={error:y}}finally{try{f&&!f.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}}if(r)throw new Li(r)}},s.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)ka(t);else{if(t instanceof s){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},s.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},s.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},s.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Ma(e,t)},s.prototype.remove=function(t){var e=this._finalizers;e&&Ma(e,t),t instanceof s&&t._removeParent(this)},s.EMPTY=function(){var t=new s;return t.closed=!0,t}(),s}();Ri.EMPTY;function Aa(s){return s instanceof Ri||s&&"closed"in s&&le(s.remove)&&le(s.add)&&le(s.unsubscribe)}function ka(s){le(s)?s():s.unsubscribe()}var Ia={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},bf={setTimeout:function(s,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];return setTimeout.apply(void 0,Di([s,t],Ii(e)))},clearTimeout:function(s){return clearTimeout(s)},delegate:void 0};function vf(s){bf.setTimeout(function(){throw s})}function Da(){}function _f(s){s()}var Oi=function(s){ki(t,s);function t(e){var n=s.call(this)||this;return n.isStopped=!1,e?(n.destination=e,Aa(e)&&e.add(n)):n.destination=Ef,n}return t.create=function(e,n,i){return new Ni(e,n,i)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,s.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Ri),Sf=Function.prototype.bind;function zi(s,t){return Sf.call(s,t)}var Cf=function(){function s(t){this.partialObserver=t}return s.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(n){ps(n)}},s.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(n){ps(n)}else ps(t)},s.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){ps(e)}},s}(),Ni=function(s){ki(t,s);function t(e,n,i){var r=s.call(this)||this,o;if(le(e)||!e)o={next:e??void 0,error:n??void 0,complete:i??void 0};else{var a;r&&Ia.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return r.unsubscribe()},o={next:e.next&&zi(e.next,a),error:e.error&&zi(e.error,a),complete:e.complete&&zi(e.complete,a)}):o=e}return r.destination=new Cf(o),r}return t}(Oi);function ps(s){vf(s)}function Tf(s){throw s}var Ef={closed:!0,next:Da,error:Tf,complete:Da},Pf=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Mf(s){return s}function Af(s){return s.length===0?Mf:s.length===1?s[0]:function(t){return s.reduce(function(e,n){return n(e)},t)}}(function(){function s(t){t&&(this._subscribe=t)}return s.prototype.lift=function(t){var e=new s;return e.source=this,e.operator=t,e},s.prototype.subscribe=function(t,e,n){var i=this,r=If(t)?t:new Ni(t,e,n);return _f(function(){var o=i,a=o.operator,h=o.source;r.add(a?a.call(r,h):h?i._subscribe(r):i._trySubscribe(r))}),r},s.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},s.prototype.forEach=function(t,e){var n=this;return e=La(e),new e(function(i,r){var o=new Ni({next:function(a){try{t(a)}catch(h){r(h),o.unsubscribe()}},error:r,complete:i});n.subscribe(o)})},s.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},s.prototype[Pf]=function(){return this},s.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Af(t)(this)},s.prototype.toPromise=function(t){var e=this;return t=La(t),new t(function(n,i){var r;e.subscribe(function(o){return r=o},function(o){return i(o)},function(){return n(r)})})},s.create=function(t){return new s(t)},s})();function La(s){var t;return(t=s??Ia.Promise)!==null&&t!==void 0?t:Promise}function kf(s){return s&&le(s.next)&&le(s.error)&&le(s.complete)}function If(s){return s&&s instanceof Oi||kf(s)&&Aa(s)}(function(s){ki(t,s);function t(e,n,i,r,o,a){var h=s.call(this,e)||this;return h.onFinalize=o,h.shouldUnsubscribe=a,h._next=n?function(c){try{n(c)}catch(u){e.error(u)}}:s.prototype._next,h._error=r?function(c){try{r(c)}catch(u){e.error(u)}finally{this.unsubscribe()}}:s.prototype._error,h._complete=i?function(){try{i()}catch(c){e.error(c)}finally{this.unsubscribe()}}:s.prototype._complete,h}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;s.prototype.unsubscribe.call(this),!n&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t})(Oi);let An;function jt(s){An=s,s(),An=null}class Df{subscribers=new Set;add(){An&&!this.subscribers.has(An)&&this.subscribers.add(An)}notify(){this.subscribers.forEach(t=>t())}}const Ra=new WeakMap;function gs(s,t){let e=Ra.get(s);e||(e=new Map,Ra.set(s,e));let n=e.get(t);return n||(n=new Df,e.set(t,n)),n}function Lf(s,t=!1){return Object.keys(s).forEach(e=>{let n=s[e];if(t&&typeof n=="object"&&n!==null)s[e]=Fi(n,t);else{const i=gs(s,e);Object.defineProperty(s,e,{configurable:!0,enumerable:!0,get(){return i.add(),n},set(r){n!=r&&(n=r,i.notify())}})}}),s}function Bi(s,t=!1){return Lf({value:s},t)}function Fi(s,t=!1){const e={get(n,i,r){const o=Reflect.get(n,i,r);if(t&&typeof o=="object"&&o!==null&&!("isYZReactiveProxy"in o)){const a=Fi(o,t);a.YZReactiveProxyParentTarget=n,a.YZReactiveProxyParentKey=i,Reflect.set(r,i,a)}return gs(n,i).add(),Reflect.get(n,i,r)},set(n,i,r,o){const a=Reflect.get(n,i,o),h=Reflect.set(n,i,r,o);return Array.isArray(n)?gs(n.YZReactiveProxyParentTarget,n.YZReactiveProxyParentKey).notify():a!=r&&gs(n,i).notify(),h},has(n,i){return i==="isYZReactiveProxy"||i in n}};return new Proxy(s,e)}const Oa=Fi;class ys{events;constructor(){this.events={}}isEmpty(t){return this.events[t]==null||this.events[t].length==0}has(t,e){return this.events[t]!==void 0&&this.events[t].indexOf(e)!==-1}prependListener(t,e,n){return this.events[t]||(this.events[t]=[]),this.events[t].unshift(n?e.bind(n):e),this}addListener(t,e,n){return this.events[t]||(this.events[t]=[]),this.events[t].push(n?e.bind(n):e),this}on(t,e,n){return this.addListener(t,e,n),this}removeListener(t,e){return this.events[t]&&(this.events[t]=this.events[t].filter(n=>n!==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(n=>{n(...e)}),this}once(t,e,n){const i=(...r)=>{n?e.apply(n,r):e(...r),this.off(t,i)};return this.on(t,i),this}}function Rf(){const s={};return s.promise=new Promise((t,e)=>{s.resolve=t,s.reject=e}),s}let Of=0;function zf(s){const t=Rf();let e=!1;return{name:s.name||String(++Of),deadline:typeof s.deadline=="number"?Math.max(s.deadline,0):-1,run:async()=>{if(!e){e=!0;try{let n;const i=s.args||[];s.thisArg?n=await s.fn.call(s.thisArg,...i):n=await s.fn(...i),t.resolve(n)}catch(n){t.reject(n)}}},result:()=>t.promise}}class Nf{queue;suspend=!1;semaphore=0;concurrency=1;timeRemaining=-1;timeoutId;constructor(t){this.queue=t?.queue||pf(10),typeof t?.concurrency=="number"&&(this.concurrency=Math.max(t?.concurrency,1)),typeof t?.timeRemaining=="number"&&this.setTimeRemaining(t.timeRemaining)}setTimeRemaining(t){this.timeRemaining=Math.max(0,t)}increaseTimeRemaining(t,e=!1){this.timeRemaining!==-1?this.setTimeRemaining(this.timeRemaining+t):e&&this.setTimeRemaining(t)}decreaseTimeRemaining(t){this.timeRemaining!==-1&&this.setTimeRemaining(this.timeRemaining-t)}_exec(t,e=!0){const n=se();try{this.semaphore++,t.run()}finally{this.semaphore--,e&&(this.decreaseTimeRemaining(se()-n),this._flush())}}_flush(){for(;!this.suspend&&this.semaphore<this.concurrency&&(this.timeRemaining==-1||this.timeRemaining>0);){const t=this.queue.dequeue();if(!t)break;this._exec(t)}this._timeout()}_timeout(t=0,e=0){clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{if(!(this.suspend||this.semaphore>0||!this.queue.length)){for(let n=0;n<this.queue.length();){const i=this.queue.index(n);if(!i)break;i.deadline!=-1&&i.deadline<=se()?(this._exec(i,!1),this.queue.deleteIndex(n)):n++}this.queue.length()&&(this.timeoutId=setTimeout(()=>{this._timeout(t,++e)},300*Math.pow(2,e)))}},t)}pause(){this.suspend=!0}resume(){this.suspend=!1,this._flush()}addTask(t){this.queue.delete(e=>e.name==t.name),this.queue.enqueue(t)}immediately(t){this._exec(t),this._flush()}asap(t){this.addTask(t),this._flush()}idleCallback(t){this.setTimeRemaining(t.timeRemaining()),this._flush()}clear(){this.queue.clear()}}class Bf extends Nf{constructor(t){super(t)}_exec(t,e=!0){const n=se();try{this.semaphore++,t.run()}finally{t.result().finally(()=>{this.semaphore--,e&&(this.decreaseTimeRemaining(se()-n),this._flush())})}}}function za(s,t={},e){if(typeof t=="function"&&(e=t,t={}),e)return e(za)(s,t);let n=t;const i=[],r=c=>(i.push(c),()=>{Ne(i,c)}),o=c=>{n=s(n,c),i.forEach(u=>u())},a=()=>n,h=c=>{s=c,o({type:Symbol()})};return o({type:Symbol()}),{getState:a,dispatch:o,subscribe:r,replaceReducer:h}}function Na(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Ba={exports:{}};(function(s,t){(function(e){s.exports=e()})(function(e){var n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function i(w,_){var x=w[0],b=w[1],E=w[2],C=w[3];x+=(b&E|~b&C)+_[0]-680876936|0,x=(x<<7|x>>>25)+b|0,C+=(x&b|~x&E)+_[1]-389564586|0,C=(C<<12|C>>>20)+x|0,E+=(C&x|~C&b)+_[2]+606105819|0,E=(E<<17|E>>>15)+C|0,b+=(E&C|~E&x)+_[3]-1044525330|0,b=(b<<22|b>>>10)+E|0,x+=(b&E|~b&C)+_[4]-176418897|0,x=(x<<7|x>>>25)+b|0,C+=(x&b|~x&E)+_[5]+1200080426|0,C=(C<<12|C>>>20)+x|0,E+=(C&x|~C&b)+_[6]-1473231341|0,E=(E<<17|E>>>15)+C|0,b+=(E&C|~E&x)+_[7]-45705983|0,b=(b<<22|b>>>10)+E|0,x+=(b&E|~b&C)+_[8]+1770035416|0,x=(x<<7|x>>>25)+b|0,C+=(x&b|~x&E)+_[9]-1958414417|0,C=(C<<12|C>>>20)+x|0,E+=(C&x|~C&b)+_[10]-42063|0,E=(E<<17|E>>>15)+C|0,b+=(E&C|~E&x)+_[11]-1990404162|0,b=(b<<22|b>>>10)+E|0,x+=(b&E|~b&C)+_[12]+1804603682|0,x=(x<<7|x>>>25)+b|0,C+=(x&b|~x&E)+_[13]-40341101|0,C=(C<<12|C>>>20)+x|0,E+=(C&x|~C&b)+_[14]-1502002290|0,E=(E<<17|E>>>15)+C|0,b+=(E&C|~E&x)+_[15]+1236535329|0,b=(b<<22|b>>>10)+E|0,x+=(b&C|E&~C)+_[1]-165796510|0,x=(x<<5|x>>>27)+b|0,C+=(x&E|b&~E)+_[6]-1069501632|0,C=(C<<9|C>>>23)+x|0,E+=(C&b|x&~b)+_[11]+643717713|0,E=(E<<14|E>>>18)+C|0,b+=(E&x|C&~x)+_[0]-373897302|0,b=(b<<20|b>>>12)+E|0,x+=(b&C|E&~C)+_[5]-701558691|0,x=(x<<5|x>>>27)+b|0,C+=(x&E|b&~E)+_[10]+38016083|0,C=(C<<9|C>>>23)+x|0,E+=(C&b|x&~b)+_[15]-660478335|0,E=(E<<14|E>>>18)+C|0,b+=(E&x|C&~x)+_[4]-405537848|0,b=(b<<20|b>>>12)+E|0,x+=(b&C|E&~C)+_[9]+568446438|0,x=(x<<5|x>>>27)+b|0,C+=(x&E|b&~E)+_[14]-1019803690|0,C=(C<<9|C>>>23)+x|0,E+=(C&b|x&~b)+_[3]-187363961|0,E=(E<<14|E>>>18)+C|0,b+=(E&x|C&~x)+_[8]+1163531501|0,b=(b<<20|b>>>12)+E|0,x+=(b&C|E&~C)+_[13]-1444681467|0,x=(x<<5|x>>>27)+b|0,C+=(x&E|b&~E)+_[2]-51403784|0,C=(C<<9|C>>>23)+x|0,E+=(C&b|x&~b)+_[7]+1735328473|0,E=(E<<14|E>>>18)+C|0,b+=(E&x|C&~x)+_[12]-1926607734|0,b=(b<<20|b>>>12)+E|0,x+=(b^E^C)+_[5]-378558|0,x=(x<<4|x>>>28)+b|0,C+=(x^b^E)+_[8]-2022574463|0,C=(C<<11|C>>>21)+x|0,E+=(C^x^b)+_[11]+1839030562|0,E=(E<<16|E>>>16)+C|0,b+=(E^C^x)+_[14]-35309556|0,b=(b<<23|b>>>9)+E|0,x+=(b^E^C)+_[1]-1530992060|0,x=(x<<4|x>>>28)+b|0,C+=(x^b^E)+_[4]+1272893353|0,C=(C<<11|C>>>21)+x|0,E+=(C^x^b)+_[7]-155497632|0,E=(E<<16|E>>>16)+C|0,b+=(E^C^x)+_[10]-1094730640|0,b=(b<<23|b>>>9)+E|0,x+=(b^E^C)+_[13]+681279174|0,x=(x<<4|x>>>28)+b|0,C+=(x^b^E)+_[0]-358537222|0,C=(C<<11|C>>>21)+x|0,E+=(C^x^b)+_[3]-722521979|0,E=(E<<16|E>>>16)+C|0,b+=(E^C^x)+_[6]+76029189|0,b=(b<<23|b>>>9)+E|0,x+=(b^E^C)+_[9]-640364487|0,x=(x<<4|x>>>28)+b|0,C+=(x^b^E)+_[12]-421815835|0,C=(C<<11|C>>>21)+x|0,E+=(C^x^b)+_[15]+530742520|0,E=(E<<16|E>>>16)+C|0,b+=(E^C^x)+_[2]-995338651|0,b=(b<<23|b>>>9)+E|0,x+=(E^(b|~C))+_[0]-198630844|0,x=(x<<6|x>>>26)+b|0,C+=(b^(x|~E))+_[7]+1126891415|0,C=(C<<10|C>>>22)+x|0,E+=(x^(C|~b))+_[14]-1416354905|0,E=(E<<15|E>>>17)+C|0,b+=(C^(E|~x))+_[5]-57434055|0,b=(b<<21|b>>>11)+E|0,x+=(E^(b|~C))+_[12]+1700485571|0,x=(x<<6|x>>>26)+b|0,C+=(b^(x|~E))+_[3]-1894986606|0,C=(C<<10|C>>>22)+x|0,E+=(x^(C|~b))+_[10]-1051523|0,E=(E<<15|E>>>17)+C|0,b+=(C^(E|~x))+_[1]-2054922799|0,b=(b<<21|b>>>11)+E|0,x+=(E^(b|~C))+_[8]+1873313359|0,x=(x<<6|x>>>26)+b|0,C+=(b^(x|~E))+_[15]-30611744|0,C=(C<<10|C>>>22)+x|0,E+=(x^(C|~b))+_[6]-1560198380|0,E=(E<<15|E>>>17)+C|0,b+=(C^(E|~x))+_[13]+1309151649|0,b=(b<<21|b>>>11)+E|0,x+=(E^(b|~C))+_[4]-145523070|0,x=(x<<6|x>>>26)+b|0,C+=(b^(x|~E))+_[11]-1120210379|0,C=(C<<10|C>>>22)+x|0,E+=(x^(C|~b))+_[2]+718787259|0,E=(E<<15|E>>>17)+C|0,b+=(C^(E|~x))+_[9]-343485551|0,b=(b<<21|b>>>11)+E|0,w[0]=x+w[0]|0,w[1]=b+w[1]|0,w[2]=E+w[2]|0,w[3]=C+w[3]|0}function r(w){var _=[],x;for(x=0;x<64;x+=4)_[x>>2]=w.charCodeAt(x)+(w.charCodeAt(x+1)<<8)+(w.charCodeAt(x+2)<<16)+(w.charCodeAt(x+3)<<24);return _}function o(w){var _=[],x;for(x=0;x<64;x+=4)_[x>>2]=w[x]+(w[x+1]<<8)+(w[x+2]<<16)+(w[x+3]<<24);return _}function a(w){var _=w.length,x=[1732584193,-271733879,-1732584194,271733878],b,E,C,L,B,F;for(b=64;b<=_;b+=64)i(x,r(w.substring(b-64,b)));for(w=w.substring(b-64),E=w.length,C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],b=0;b<E;b+=1)C[b>>2]|=w.charCodeAt(b)<<(b%4<<3);if(C[b>>2]|=128<<(b%4<<3),b>55)for(i(x,C),b=0;b<16;b+=1)C[b]=0;return L=_*8,L=L.toString(16).match(/(.*?)(.{0,8})$/),B=parseInt(L[2],16),F=parseInt(L[1],16)||0,C[14]=B,C[15]=F,i(x,C),x}function h(w){var _=w.length,x=[1732584193,-271733879,-1732584194,271733878],b,E,C,L,B,F;for(b=64;b<=_;b+=64)i(x,o(w.subarray(b-64,b)));for(w=b-64<_?w.subarray(b-64):new Uint8Array(0),E=w.length,C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],b=0;b<E;b+=1)C[b>>2]|=w[b]<<(b%4<<3);if(C[b>>2]|=128<<(b%4<<3),b>55)for(i(x,C),b=0;b<16;b+=1)C[b]=0;return L=_*8,L=L.toString(16).match(/(.*?)(.{0,8})$/),B=parseInt(L[2],16),F=parseInt(L[1],16)||0,C[14]=B,C[15]=F,i(x,C),x}function c(w){var _="",x;for(x=0;x<4;x+=1)_+=n[w>>x*8+4&15]+n[w>>x*8&15];return _}function u(w){var _;for(_=0;_<w.length;_+=1)w[_]=c(w[_]);return w.join("")}u(a("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function w(_,x){return _=_|0||0,_<0?Math.max(_+x,0):Math.min(_,x)}ArrayBuffer.prototype.slice=function(_,x){var b=this.byteLength,E=w(_,b),C=b,L,B,F,U;return x!==e&&(C=w(x,b)),E>C?new ArrayBuffer(0):(L=C-E,B=new ArrayBuffer(L),F=new Uint8Array(B),U=new Uint8Array(this,E,L),F.set(U),B)}}();function l(w){return/[\u0080-\uFFFF]/.test(w)&&(w=unescape(encodeURIComponent(w))),w}function m(w,_){var x=w.length,b=new ArrayBuffer(x),E=new Uint8Array(b),C;for(C=0;C<x;C+=1)E[C]=w.charCodeAt(C);return _?E:b}function f(w){return String.fromCharCode.apply(null,new Uint8Array(w))}function p(w,_,x){var b=new Uint8Array(w.byteLength+_.byteLength);return b.set(new Uint8Array(w)),b.set(new Uint8Array(_),w.byteLength),x?b:b.buffer}function y(w){var _=[],x=w.length,b;for(b=0;b<x-1;b+=2)_.push(parseInt(w.substr(b,2),16));return String.fromCharCode.apply(String,_)}function v(){this.reset()}return v.prototype.append=function(w){return this.appendBinary(l(w)),this},v.prototype.appendBinary=function(w){this._buff+=w,this._length+=w.length;var _=this._buff.length,x;for(x=64;x<=_;x+=64)i(this._hash,r(this._buff.substring(x-64,x)));return this._buff=this._buff.substring(x-64),this},v.prototype.end=function(w){var _=this._buff,x=_.length,b,E=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],C;for(b=0;b<x;b+=1)E[b>>2]|=_.charCodeAt(b)<<(b%4<<3);return this._finish(E,x),C=u(this._hash),w&&(C=y(C)),this.reset(),C},v.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},v.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},v.prototype.setState=function(w){return this._buff=w.buff,this._length=w.length,this._hash=w.hash,this},v.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},v.prototype._finish=function(w,_){var x=_,b,E,C;if(w[x>>2]|=128<<(x%4<<3),x>55)for(i(this._hash,w),x=0;x<16;x+=1)w[x]=0;b=this._length*8,b=b.toString(16).match(/(.*?)(.{0,8})$/),E=parseInt(b[2],16),C=parseInt(b[1],16)||0,w[14]=E,w[15]=C,i(this._hash,w)},v.hash=function(w,_){return v.hashBinary(l(w),_)},v.hashBinary=function(w,_){var x=a(w),b=u(x);return _?y(b):b},v.ArrayBuffer=function(){this.reset()},v.ArrayBuffer.prototype.append=function(w){var _=p(this._buff.buffer,w,!0),x=_.length,b;for(this._length+=w.byteLength,b=64;b<=x;b+=64)i(this._hash,o(_.subarray(b-64,b)));return this._buff=b-64<x?new Uint8Array(_.buffer.slice(b-64)):new Uint8Array(0),this},v.ArrayBuffer.prototype.end=function(w){var _=this._buff,x=_.length,b=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],E,C;for(E=0;E<x;E+=1)b[E>>2]|=_[E]<<(E%4<<3);return this._finish(b,x),C=u(this._hash),w&&(C=y(C)),this.reset(),C},v.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},v.ArrayBuffer.prototype.getState=function(){var w=v.prototype.getState.call(this);return w.buff=f(w.buff),w},v.ArrayBuffer.prototype.setState=function(w){return w.buff=m(w.buff,!0),v.prototype.setState.call(this,w)},v.ArrayBuffer.prototype.destroy=v.prototype.destroy,v.ArrayBuffer.prototype._finish=v.prototype._finish,v.ArrayBuffer.hash=function(w,_){var x=h(new Uint8Array(w)),b=u(x);return _?y(b):b},v})})(Ba);var Ff=Ba.exports;const Yf=Na(Ff);function Fa(s,t){return function(){return s.apply(t,arguments)}}const{toString:$f}=Object.prototype,{getPrototypeOf:Yi}=Object,ws=(s=>t=>{const e=$f.call(t);return s[e]||(s[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ht=s=>(s=s.toLowerCase(),t=>ws(t)===s),xs=s=>t=>typeof t===s,{isArray:un}=Array,kn=xs("undefined");function Xf(s){return s!==null&&!kn(s)&&s.constructor!==null&&!kn(s.constructor)&&Rt(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const Ya=Ht("ArrayBuffer");function Uf(s){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(s):t=s&&s.buffer&&Ya(s.buffer),t}const Vf=xs("string"),Rt=xs("function"),$a=xs("number"),bs=s=>s!==null&&typeof s=="object",Gf=s=>s===!0||s===!1,vs=s=>{if(ws(s)!=="object")return!1;const t=Yi(s);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)},qf=Ht("Date"),jf=Ht("File"),Hf=Ht("Blob"),Wf=Ht("FileList"),Jf=s=>bs(s)&&Rt(s.pipe),Zf=s=>{let t;return s&&(typeof FormData=="function"&&s instanceof FormData||Rt(s.append)&&((t=ws(s))==="formdata"||t==="object"&&Rt(s.toString)&&s.toString()==="[object FormData]"))},Qf=Ht("URLSearchParams"),[Kf,td,ed,nd]=["ReadableStream","Request","Response","Headers"].map(Ht),sd=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function In(s,t,{allOwnKeys:e=!1}={}){if(s===null||typeof s>"u")return;let n,i;if(typeof s!="object"&&(s=[s]),un(s))for(n=0,i=s.length;n<i;n++)t.call(null,s[n],n,s);else{const r=e?Object.getOwnPropertyNames(s):Object.keys(s),o=r.length;let a;for(n=0;n<o;n++)a=r[n],t.call(null,s[a],a,s)}}function Xa(s,t){t=t.toLowerCase();const e=Object.keys(s);let n=e.length,i;for(;n-- >0;)if(i=e[n],t===i.toLowerCase())return i;return null}const Be=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Ua=s=>!kn(s)&&s!==Be;function $i(){const{caseless:s}=Ua(this)&&this||{},t={},e=(n,i)=>{const r=s&&Xa(t,i)||i;vs(t[r])&&vs(n)?t[r]=$i(t[r],n):vs(n)?t[r]=$i({},n):un(n)?t[r]=n.slice():t[r]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&In(arguments[n],e);return t}const id=(s,t,e,{allOwnKeys:n}={})=>(In(t,(i,r)=>{e&&Rt(i)?s[r]=Fa(i,e):s[r]=i},{allOwnKeys:n}),s),rd=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),od=(s,t,e,n)=>{s.prototype=Object.create(t.prototype,n),s.prototype.constructor=s,Object.defineProperty(s,"super",{value:t.prototype}),e&&Object.assign(s.prototype,e)},ad=(s,t,e,n)=>{let i,r,o;const a={};if(t=t||{},s==null)return t;do{for(i=Object.getOwnPropertyNames(s),r=i.length;r-- >0;)o=i[r],(!n||n(o,s,t))&&!a[o]&&(t[o]=s[o],a[o]=!0);s=e!==!1&&Yi(s)}while(s&&(!e||e(s,t))&&s!==Object.prototype);return t},hd=(s,t,e)=>{s=String(s),(e===void 0||e>s.length)&&(e=s.length),e-=t.length;const n=s.indexOf(t,e);return n!==-1&&n===e},cd=s=>{if(!s)return null;if(un(s))return s;let t=s.length;if(!$a(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=s[t];return e},ud=(s=>t=>s&&t instanceof s)(typeof Uint8Array<"u"&&Yi(Uint8Array)),ld=(s,t)=>{const n=(s&&s[Symbol.iterator]).call(s);let i;for(;(i=n.next())&&!i.done;){const r=i.value;t.call(s,r[0],r[1])}},fd=(s,t)=>{let e;const n=[];for(;(e=s.exec(t))!==null;)n.push(e);return n},dd=Ht("HTMLFormElement"),md=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,i){return n.toUpperCase()+i}),Va=(({hasOwnProperty:s})=>(t,e)=>s.call(t,e))(Object.prototype),pd=Ht("RegExp"),Ga=(s,t)=>{const e=Object.getOwnPropertyDescriptors(s),n={};In(e,(i,r)=>{let o;(o=t(i,r,s))!==!1&&(n[r]=o||i)}),Object.defineProperties(s,n)},gd=s=>{Ga(s,(t,e)=>{if(Rt(s)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const n=s[e];if(Rt(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},yd=(s,t)=>{const e={},n=i=>{i.forEach(r=>{e[r]=!0})};return un(s)?n(s):n(String(s).split(t)),e},wd=()=>{},xd=(s,t)=>s!=null&&Number.isFinite(s=+s)?s:t;function bd(s){return!!(s&&Rt(s.append)&&s[Symbol.toStringTag]==="FormData"&&s[Symbol.iterator])}const vd=s=>{const t=new Array(10),e=(n,i)=>{if(bs(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[i]=n;const r=un(n)?[]:{};return In(n,(o,a)=>{const h=e(o,i+1);!kn(h)&&(r[a]=h)}),t[i]=void 0,r}}return n};return e(s,0)},_d=Ht("AsyncFunction"),Sd=s=>s&&(bs(s)||Rt(s))&&Rt(s.then)&&Rt(s.catch),qa=((s,t)=>s?setImmediate:t?((e,n)=>(Be.addEventListener("message",({source:i,data:r})=>{i===Be&&r===e&&n.length&&n.shift()()},!1),i=>{n.push(i),Be.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",Rt(Be.postMessage)),Cd=typeof queueMicrotask<"u"?queueMicrotask.bind(Be):typeof process<"u"&&process.nextTick||qa,A={isArray:un,isArrayBuffer:Ya,isBuffer:Xf,isFormData:Zf,isArrayBufferView:Uf,isString:Vf,isNumber:$a,isBoolean:Gf,isObject:bs,isPlainObject:vs,isReadableStream:Kf,isRequest:td,isResponse:ed,isHeaders:nd,isUndefined:kn,isDate:qf,isFile:jf,isBlob:Hf,isRegExp:pd,isFunction:Rt,isStream:Jf,isURLSearchParams:Qf,isTypedArray:ud,isFileList:Wf,forEach:In,merge:$i,extend:id,trim:sd,stripBOM:rd,inherits:od,toFlatObject:ad,kindOf:ws,kindOfTest:Ht,endsWith:hd,toArray:cd,forEachEntry:ld,matchAll:fd,isHTMLForm:dd,hasOwnProperty:Va,hasOwnProp:Va,reduceDescriptors:Ga,freezeMethods:gd,toObjectSet:yd,toCamelCase:md,noop:wd,toFiniteNumber:xd,findKey:Xa,global:Be,isContextDefined:Ua,isSpecCompliantForm:bd,toJSONObject:vd,isAsyncFn:_d,isThenable:Sd,setImmediate:qa,asap:Cd};function Y(s,t,e,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=s,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}A.inherits(Y,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:A.toJSONObject(this.config),code:this.code,status:this.status}}});const ja=Y.prototype,Ha={};["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(s=>{Ha[s]={value:s}}),Object.defineProperties(Y,Ha),Object.defineProperty(ja,"isAxiosError",{value:!0}),Y.from=(s,t,e,n,i,r)=>{const o=Object.create(ja);return A.toFlatObject(s,o,function(h){return h!==Error.prototype},a=>a!=="isAxiosError"),Y.call(o,s.message,t,e,n,i),o.cause=s,o.name=s.name,r&&Object.assign(o,r),o};const Td=null;function Xi(s){return A.isPlainObject(s)||A.isArray(s)}function Wa(s){return A.endsWith(s,"[]")?s.slice(0,-2):s}function Ja(s,t,e){return s?s.concat(t).map(function(i,r){return i=Wa(i),!e&&r?"["+i+"]":i}).join(e?".":""):t}function Ed(s){return A.isArray(s)&&!s.some(Xi)}const Pd=A.toFlatObject(A,{},null,function(t){return/^is[A-Z]/.test(t)});function _s(s,t,e){if(!A.isObject(s))throw new TypeError("target must be an object");t=t||new FormData,e=A.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,v){return!A.isUndefined(v[y])});const n=e.metaTokens,i=e.visitor||u,r=e.dots,o=e.indexes,h=(e.Blob||typeof Blob<"u"&&Blob)&&A.isSpecCompliantForm(t);if(!A.isFunction(i))throw new TypeError("visitor must be a function");function c(p){if(p===null)return"";if(A.isDate(p))return p.toISOString();if(!h&&A.isBlob(p))throw new Y("Blob is not supported. Use a Buffer instead.");return A.isArrayBuffer(p)||A.isTypedArray(p)?h&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,y,v){let w=p;if(p&&!v&&typeof p=="object"){if(A.endsWith(y,"{}"))y=n?y:y.slice(0,-2),p=JSON.stringify(p);else if(A.isArray(p)&&Ed(p)||(A.isFileList(p)||A.endsWith(y,"[]"))&&(w=A.toArray(p)))return y=Wa(y),w.forEach(function(x,b){!(A.isUndefined(x)||x===null)&&t.append(o===!0?Ja([y],b,r):o===null?y:y+"[]",c(x))}),!1}return Xi(p)?!0:(t.append(Ja(v,y,r),c(p)),!1)}const l=[],m=Object.assign(Pd,{defaultVisitor:u,convertValue:c,isVisitable:Xi});function f(p,y){if(!A.isUndefined(p)){if(l.indexOf(p)!==-1)throw Error("Circular reference detected in "+y.join("."));l.push(p),A.forEach(p,function(w,_){(!(A.isUndefined(w)||w===null)&&i.call(t,w,A.isString(_)?_.trim():_,y,m))===!0&&f(w,y?y.concat(_):[_])}),l.pop()}}if(!A.isObject(s))throw new TypeError("data must be an object");return f(s),t}function Za(s){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Ui(s,t){this._pairs=[],s&&_s(s,this,t)}const Qa=Ui.prototype;Qa.append=function(t,e){this._pairs.push([t,e])},Qa.toString=function(t){const e=t?function(n){return t.call(this,n,Za)}:Za;return this._pairs.map(function(i){return e(i[0])+"="+e(i[1])},"").join("&")};function Md(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ka(s,t,e){if(!t)return s;const n=e&&e.encode||Md;A.isFunction(e)&&(e={serialize:e});const i=e&&e.serialize;let r;if(i?r=i(t,e):r=A.isURLSearchParams(t)?t.toString():new Ui(t,e).toString(n),r){const o=s.indexOf("#");o!==-1&&(s=s.slice(0,o)),s+=(s.indexOf("?")===-1?"?":"&")+r}return s}class Ad{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){A.forEach(this.handlers,function(n){n!==null&&t(n)})}}const th=Ad,eh={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},kd={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ui,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Vi=typeof window<"u"&&typeof document<"u",Gi=typeof navigator=="object"&&navigator||void 0,Id=Vi&&(!Gi||["ReactNative","NativeScript","NS"].indexOf(Gi.product)<0),Dd=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Ld=Vi&&window.location.href||"http://localhost",bt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Vi,hasStandardBrowserEnv:Id,hasStandardBrowserWebWorkerEnv:Dd,navigator:Gi,origin:Ld},Symbol.toStringTag,{value:"Module"})),...kd};function Rd(s,t){return _s(s,new bt.classes.URLSearchParams,Object.assign({visitor:function(e,n,i,r){return bt.isNode&&A.isBuffer(e)?(this.append(n,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}function Od(s){return A.matchAll(/\w+|\[(\w*)]/g,s).map(t=>t[0]==="[]"?"":t[1]||t[0])}function zd(s){const t={},e=Object.keys(s);let n;const i=e.length;let r;for(n=0;n<i;n++)r=e[n],t[r]=s[r];return t}function nh(s){function t(e,n,i,r){let o=e[r++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),h=r>=e.length;return o=!o&&A.isArray(i)?i.length:o,h?(A.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!a):((!i[o]||!A.isObject(i[o]))&&(i[o]=[]),t(e,n,i[o],r)&&A.isArray(i[o])&&(i[o]=zd(i[o])),!a)}if(A.isFormData(s)&&A.isFunction(s.entries)){const e={};return A.forEachEntry(s,(n,i)=>{t(Od(n),i,e,0)}),e}return null}function Nd(s,t,e){if(A.isString(s))try{return(t||JSON.parse)(s),A.trim(s)}catch(n){if(n.name!=="SyntaxError")throw n}return(e||JSON.stringify)(s)}const qi={transitional:eh,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,r=A.isObject(t);if(r&&A.isHTMLForm(t)&&(t=new FormData(t)),A.isFormData(t))return i?JSON.stringify(nh(t)):t;if(A.isArrayBuffer(t)||A.isBuffer(t)||A.isStream(t)||A.isFile(t)||A.isBlob(t)||A.isReadableStream(t))return t;if(A.isArrayBufferView(t))return t.buffer;if(A.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Rd(t,this.formSerializer).toString();if((a=A.isFileList(t))||n.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return _s(a?{"files[]":t}:t,h&&new h,this.formSerializer)}}return r||i?(e.setContentType("application/json",!1),Nd(t)):t}],transformResponse:[function(t){const e=this.transitional||qi.transitional,n=e&&e.forcedJSONParsing,i=this.responseType==="json";if(A.isResponse(t)||A.isReadableStream(t))return t;if(t&&A.isString(t)&&(n&&!this.responseType||i)){const o=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(o)throw a.name==="SyntaxError"?Y.from(a,Y.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:bt.classes.FormData,Blob:bt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};A.forEach(["delete","get","head","post","put","patch"],s=>{qi.headers[s]={}});const ji=qi,Bd=A.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"]),Fd=s=>{const t={};let e,n,i;return s&&s.split(`
|
|
13
|
+
`).forEach(function(o){i=o.indexOf(":"),e=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!e||t[e]&&Bd[e])&&(e==="set-cookie"?t[e]?t[e].push(n):t[e]=[n]:t[e]=t[e]?t[e]+", "+n:n)}),t},sh=Symbol("internals");function Dn(s){return s&&String(s).trim().toLowerCase()}function Ss(s){return s===!1||s==null?s:A.isArray(s)?s.map(Ss):String(s)}function Yd(s){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=e.exec(s);)t[n[1]]=n[2];return t}const $d=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function Hi(s,t,e,n,i){if(A.isFunction(n))return n.call(this,t,e);if(i&&(t=e),!!A.isString(t)){if(A.isString(n))return t.indexOf(n)!==-1;if(A.isRegExp(n))return n.test(t)}}function Xd(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,n)=>e.toUpperCase()+n)}function Ud(s,t){const e=A.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(s,n+e,{value:function(i,r,o){return this[n].call(this,t,i,r,o)},configurable:!0})})}class Cs{constructor(t){t&&this.set(t)}set(t,e,n){const i=this;function r(a,h,c){const u=Dn(h);if(!u)throw new Error("header name must be a non-empty string");const l=A.findKey(i,u);(!l||i[l]===void 0||c===!0||c===void 0&&i[l]!==!1)&&(i[l||h]=Ss(a))}const o=(a,h)=>A.forEach(a,(c,u)=>r(c,u,h));if(A.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(A.isString(t)&&(t=t.trim())&&!$d(t))o(Fd(t),e);else if(A.isHeaders(t))for(const[a,h]of t.entries())r(h,a,n);else t!=null&&r(e,t,n);return this}get(t,e){if(t=Dn(t),t){const n=A.findKey(this,t);if(n){const i=this[n];if(!e)return i;if(e===!0)return Yd(i);if(A.isFunction(e))return e.call(this,i,n);if(A.isRegExp(e))return e.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Dn(t),t){const n=A.findKey(this,t);return!!(n&&this[n]!==void 0&&(!e||Hi(this,this[n],n,e)))}return!1}delete(t,e){const n=this;let i=!1;function r(o){if(o=Dn(o),o){const a=A.findKey(n,o);a&&(!e||Hi(n,n[a],a,e))&&(delete n[a],i=!0)}}return A.isArray(t)?t.forEach(r):r(t),i}clear(t){const e=Object.keys(this);let n=e.length,i=!1;for(;n--;){const r=e[n];(!t||Hi(this,this[r],r,t,!0))&&(delete this[r],i=!0)}return i}normalize(t){const e=this,n={};return A.forEach(this,(i,r)=>{const o=A.findKey(n,r);if(o){e[o]=Ss(i),delete e[r];return}const a=t?Xd(r):String(r).trim();a!==r&&delete e[r],e[a]=Ss(i),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return A.forEach(this,(n,i)=>{n!=null&&n!==!1&&(e[i]=t&&A.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
|
14
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[sh]=this[sh]={accessors:{}}).accessors,i=this.prototype;function r(o){const a=Dn(o);n[a]||(Ud(i,o),n[a]=!0)}return A.isArray(t)?t.forEach(r):r(t),this}}Cs.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),A.reduceDescriptors(Cs.prototype,({value:s},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>s,set(n){this[e]=n}}}),A.freezeMethods(Cs);const Wt=Cs;function Wi(s,t){const e=this||ji,n=t||e,i=Wt.from(n.headers);let r=n.data;return A.forEach(s,function(a){r=a.call(e,r,i.normalize(),t?t.status:void 0)}),i.normalize(),r}function ih(s){return!!(s&&s.__CANCEL__)}function ln(s,t,e){Y.call(this,s??"canceled",Y.ERR_CANCELED,t,e),this.name="CanceledError"}A.inherits(ln,Y,{__CANCEL__:!0});function rh(s,t,e){const n=e.config.validateStatus;!e.status||!n||n(e.status)?s(e):t(new Y("Request failed with status code "+e.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function Vd(s){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(s);return t&&t[1]||""}function Gd(s,t){s=s||10;const e=new Array(s),n=new Array(s);let i=0,r=0,o;return t=t!==void 0?t:1e3,function(h){const c=Date.now(),u=n[r];o||(o=c),e[i]=h,n[i]=c;let l=r,m=0;for(;l!==i;)m+=e[l++],l=l%s;if(i=(i+1)%s,i===r&&(r=(r+1)%s),c-o<t)return;const f=u&&c-u;return f?Math.round(m*1e3/f):void 0}}function qd(s,t){let e=0,n=1e3/t,i,r;const o=(c,u=Date.now())=>{e=u,i=null,r&&(clearTimeout(r),r=null),s.apply(null,c)};return[(...c)=>{const u=Date.now(),l=u-e;l>=n?o(c,u):(i=c,r||(r=setTimeout(()=>{r=null,o(i)},n-l)))},()=>i&&o(i)]}const Ts=(s,t,e=3)=>{let n=0;const i=Gd(50,250);return qd(r=>{const o=r.loaded,a=r.lengthComputable?r.total:void 0,h=o-n,c=i(h),u=o<=a;n=o;const l={loaded:o,total:a,progress:a?o/a:void 0,bytes:h,rate:c||void 0,estimated:c&&a&&u?(a-o)/c:void 0,event:r,lengthComputable:a!=null,[t?"download":"upload"]:!0};s(l)},e)},oh=(s,t)=>{const e=s!=null;return[n=>t[0]({lengthComputable:e,total:s,loaded:n}),t[1]]},ah=s=>(...t)=>A.asap(()=>s(...t)),jd=bt.hasStandardBrowserEnv?((s,t)=>e=>(e=new URL(e,bt.origin),s.protocol===e.protocol&&s.host===e.host&&(t||s.port===e.port)))(new URL(bt.origin),bt.navigator&&/(msie|trident)/i.test(bt.navigator.userAgent)):()=>!0,Hd=bt.hasStandardBrowserEnv?{write(s,t,e,n,i,r){const o=[s+"="+encodeURIComponent(t)];A.isNumber(e)&&o.push("expires="+new Date(e).toGMTString()),A.isString(n)&&o.push("path="+n),A.isString(i)&&o.push("domain="+i),r===!0&&o.push("secure"),document.cookie=o.join("; ")},read(s){const t=document.cookie.match(new RegExp("(^|;\\s*)("+s+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(s){this.write(s,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Wd(s){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function Jd(s,t){return t?s.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):s}function hh(s,t,e){let n=!Wd(t);return s&&(n||e==!1)?Jd(s,t):t}const ch=s=>s instanceof Wt?{...s}:s;function Fe(s,t){t=t||{};const e={};function n(c,u,l,m){return A.isPlainObject(c)&&A.isPlainObject(u)?A.merge.call({caseless:m},c,u):A.isPlainObject(u)?A.merge({},u):A.isArray(u)?u.slice():u}function i(c,u,l,m){if(A.isUndefined(u)){if(!A.isUndefined(c))return n(void 0,c,l,m)}else return n(c,u,l,m)}function r(c,u){if(!A.isUndefined(u))return n(void 0,u)}function o(c,u){if(A.isUndefined(u)){if(!A.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function a(c,u,l){if(l in t)return n(c,u);if(l in s)return n(void 0,c)}const h={url:r,method:r,data:r,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,u,l)=>i(ch(c),ch(u),l,!0)};return A.forEach(Object.keys(Object.assign({},s,t)),function(u){const l=h[u]||i,m=l(s[u],t[u],u);A.isUndefined(m)&&l!==a||(e[u]=m)}),e}const uh=s=>{const t=Fe({},s);let{data:e,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:r,headers:o,auth:a}=t;t.headers=o=Wt.from(o),t.url=Ka(hh(t.baseURL,t.url,t.allowAbsoluteUrls),s.params,s.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let h;if(A.isFormData(e)){if(bt.hasStandardBrowserEnv||bt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((h=o.getContentType())!==!1){const[c,...u]=h?h.split(";").map(l=>l.trim()).filter(Boolean):[];o.setContentType([c||"multipart/form-data",...u].join("; "))}}if(bt.hasStandardBrowserEnv&&(n&&A.isFunction(n)&&(n=n(t)),n||n!==!1&&jd(t.url))){const c=i&&r&&Hd.read(r);c&&o.set(i,c)}return t},Zd=typeof XMLHttpRequest<"u"&&function(s){return new Promise(function(e,n){const i=uh(s);let r=i.data;const o=Wt.from(i.headers).normalize();let{responseType:a,onUploadProgress:h,onDownloadProgress:c}=i,u,l,m,f,p;function y(){f&&f(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let v=new XMLHttpRequest;v.open(i.method.toUpperCase(),i.url,!0),v.timeout=i.timeout;function w(){if(!v)return;const x=Wt.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),E={data:!a||a==="text"||a==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:x,config:s,request:v};rh(function(L){e(L),y()},function(L){n(L),y()},E),v=null}"onloadend"in v?v.onloadend=w:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(w)},v.onabort=function(){v&&(n(new Y("Request aborted",Y.ECONNABORTED,s,v)),v=null)},v.onerror=function(){n(new Y("Network Error",Y.ERR_NETWORK,s,v)),v=null},v.ontimeout=function(){let b=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||eh;i.timeoutErrorMessage&&(b=i.timeoutErrorMessage),n(new Y(b,E.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,s,v)),v=null},r===void 0&&o.setContentType(null),"setRequestHeader"in v&&A.forEach(o.toJSON(),function(b,E){v.setRequestHeader(E,b)}),A.isUndefined(i.withCredentials)||(v.withCredentials=!!i.withCredentials),a&&a!=="json"&&(v.responseType=i.responseType),c&&([m,p]=Ts(c,!0),v.addEventListener("progress",m)),h&&v.upload&&([l,f]=Ts(h),v.upload.addEventListener("progress",l),v.upload.addEventListener("loadend",f)),(i.cancelToken||i.signal)&&(u=x=>{v&&(n(!x||x.type?new ln(null,s,v):x),v.abort(),v=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const _=Vd(i.url);if(_&&bt.protocols.indexOf(_)===-1){n(new Y("Unsupported protocol "+_+":",Y.ERR_BAD_REQUEST,s));return}v.send(r||null)})},Qd=(s,t)=>{const{length:e}=s=s?s.filter(Boolean):[];if(t||e){let n=new AbortController,i;const r=function(c){if(!i){i=!0,a();const u=c instanceof Error?c:this.reason;n.abort(u instanceof Y?u:new ln(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,r(new Y(`timeout ${t} of ms exceeded`,Y.ETIMEDOUT))},t);const a=()=>{s&&(o&&clearTimeout(o),o=null,s.forEach(c=>{c.unsubscribe?c.unsubscribe(r):c.removeEventListener("abort",r)}),s=null)};s.forEach(c=>c.addEventListener("abort",r));const{signal:h}=n;return h.unsubscribe=()=>A.asap(a),h}},Kd=function*(s,t){let e=s.byteLength;if(!t||e<t){yield s;return}let n=0,i;for(;n<e;)i=n+t,yield s.slice(n,i),n=i},tm=async function*(s,t){for await(const e of em(s))yield*Kd(e,t)},em=async function*(s){if(s[Symbol.asyncIterator]){yield*s;return}const t=s.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},lh=(s,t,e,n)=>{const i=tm(s,t);let r=0,o,a=h=>{o||(o=!0,n&&n(h))};return new ReadableStream({async pull(h){try{const{done:c,value:u}=await i.next();if(c){a(),h.close();return}let l=u.byteLength;if(e){let m=r+=l;e(m)}h.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(h){return a(h),i.return()}},{highWaterMark:2})},Es=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",fh=Es&&typeof ReadableStream=="function",nm=Es&&(typeof TextEncoder=="function"?(s=>t=>s.encode(t))(new TextEncoder):async s=>new Uint8Array(await new Response(s).arrayBuffer())),dh=(s,...t)=>{try{return!!s(...t)}catch{return!1}},sm=fh&&dh(()=>{let s=!1;const t=new Request(bt.origin,{body:new ReadableStream,method:"POST",get duplex(){return s=!0,"half"}}).headers.has("Content-Type");return s&&!t}),mh=64*1024,Ji=fh&&dh(()=>A.isReadableStream(new Response("").body)),Ps={stream:Ji&&(s=>s.body)};Es&&(s=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ps[t]&&(Ps[t]=A.isFunction(s[t])?e=>e[t]():(e,n)=>{throw new Y(`Response type '${t}' is not supported`,Y.ERR_NOT_SUPPORT,n)})})})(new Response);const im=async s=>{if(s==null)return 0;if(A.isBlob(s))return s.size;if(A.isSpecCompliantForm(s))return(await new Request(bt.origin,{method:"POST",body:s}).arrayBuffer()).byteLength;if(A.isArrayBufferView(s)||A.isArrayBuffer(s))return s.byteLength;if(A.isURLSearchParams(s)&&(s=s+""),A.isString(s))return(await nm(s)).byteLength},rm=async(s,t)=>{const e=A.toFiniteNumber(s.getContentLength());return e??im(t)},Zi={http:Td,xhr:Zd,fetch:Es&&(async s=>{let{url:t,method:e,data:n,signal:i,cancelToken:r,timeout:o,onDownloadProgress:a,onUploadProgress:h,responseType:c,headers:u,withCredentials:l="same-origin",fetchOptions:m}=uh(s);c=c?(c+"").toLowerCase():"text";let f=Qd([i,r&&r.toAbortSignal()],o),p;const y=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let v;try{if(h&&sm&&e!=="get"&&e!=="head"&&(v=await rm(u,n))!==0){let E=new Request(t,{method:"POST",body:n,duplex:"half"}),C;if(A.isFormData(n)&&(C=E.headers.get("content-type"))&&u.setContentType(C),E.body){const[L,B]=oh(v,Ts(ah(h)));n=lh(E.body,mh,L,B)}}A.isString(l)||(l=l?"include":"omit");const w="credentials"in Request.prototype;p=new Request(t,{...m,signal:f,method:e.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:w?l:void 0});let _=await fetch(p);const x=Ji&&(c==="stream"||c==="response");if(Ji&&(a||x&&y)){const E={};["status","statusText","headers"].forEach(F=>{E[F]=_[F]});const C=A.toFiniteNumber(_.headers.get("content-length")),[L,B]=a&&oh(C,Ts(ah(a),!0))||[];_=new Response(lh(_.body,mh,L,()=>{B&&B(),y&&y()}),E)}c=c||"text";let b=await Ps[A.findKey(Ps,c)||"text"](_,s);return!x&&y&&y(),await new Promise((E,C)=>{rh(E,C,{data:b,headers:Wt.from(_.headers),status:_.status,statusText:_.statusText,config:s,request:p})})}catch(w){throw y&&y(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new Y("Network Error",Y.ERR_NETWORK,s,p),{cause:w.cause||w}):Y.from(w,w&&w.code,s,p)}})};A.forEach(Zi,(s,t)=>{if(s){try{Object.defineProperty(s,"name",{value:t})}catch{}Object.defineProperty(s,"adapterName",{value:t})}});const ph=s=>`- ${s}`,om=s=>A.isFunction(s)||s===null||s===!1,gh={getAdapter:s=>{s=A.isArray(s)?s:[s];const{length:t}=s;let e,n;const i={};for(let r=0;r<t;r++){e=s[r];let o;if(n=e,!om(e)&&(n=Zi[(o=String(e)).toLowerCase()],n===void 0))throw new Y(`Unknown adapter '${o}'`);if(n)break;i[o||"#"+r]=n}if(!n){const r=Object.entries(i).map(([a,h])=>`adapter ${a} `+(h===!1?"is not supported by the environment":"is not available in the build"));let o=t?r.length>1?`since :
|
|
15
15
|
`+r.map(ph).join(`
|
|
16
16
|
`):" "+ph(r[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:Zi};function Qi(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new ln(null,s)}function yh(s){return Qi(s),s.headers=Wt.from(s.headers),s.data=Wi.call(s,s.transformRequest),["post","put","patch"].indexOf(s.method)!==-1&&s.headers.setContentType("application/x-www-form-urlencoded",!1),gh.getAdapter(s.adapter||ji.adapter)(s).then(function(n){return Qi(s),n.data=Wi.call(s,s.transformResponse,n),n.headers=Wt.from(n.headers),n},function(n){return ih(n)||(Qi(s),n&&n.response&&(n.response.data=Wi.call(s,s.transformResponse,n.response),n.response.headers=Wt.from(n.response.headers))),Promise.reject(n)})}const wh="1.8.4",Ms={};["object","boolean","number","function","string","symbol"].forEach((s,t)=>{Ms[s]=function(n){return typeof n===s||"a"+(t<1?"n ":" ")+s}});const xh={};Ms.transitional=function(t,e,n){function i(r,o){return"[Axios v"+wh+"] Transitional option '"+r+"'"+o+(n?". "+n:"")}return(r,o,a)=>{if(t===!1)throw new Y(i(o," has been removed"+(e?" in "+e:"")),Y.ERR_DEPRECATED);return e&&!xh[o]&&(xh[o]=!0,console.warn(i(o," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(r,o,a):!0}},Ms.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function am(s,t,e){if(typeof s!="object")throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const n=Object.keys(s);let i=n.length;for(;i-- >0;){const r=n[i],o=t[r];if(o){const a=s[r],h=a===void 0||o(a,r,s);if(h!==!0)throw new Y("option "+r+" must be "+h,Y.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new Y("Unknown option "+r,Y.ERR_BAD_OPTION)}}const As={assertOptions:am,validators:Ms},re=As.validators;class ks{constructor(t){this.defaults=t,this.interceptors={request:new th,response:new th}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const r=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?r&&!String(n.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
17
|
-
`+r):n.stack=r}catch{}}throw n}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Fe(this.defaults,e);const{transitional:n,paramsSerializer:i,headers:r}=e;n!==void 0&&As.assertOptions(n,{silentJSONParsing:re.transitional(re.boolean),forcedJSONParsing:re.transitional(re.boolean),clarifyTimeoutError:re.transitional(re.boolean)},!1),i!=null&&(A.isFunction(i)?e.paramsSerializer={serialize:i}:As.assertOptions(i,{encode:re.function,serialize:re.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),As.assertOptions(e,{baseUrl:re.spelling("baseURL"),withXsrfToken:re.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=r&&A.merge(r.common,r[e.method]);r&&A.forEach(["delete","get","head","post","put","patch","common"],p=>{delete r[p]}),e.headers=Wt.concat(o,r);const a=[];let h=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(e)===!1||(h=h&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});const c=[];this.interceptors.response.forEach(function(y){c.push(y.fulfilled,y.rejected)});let u,l=0,m;if(!h){const p=[yh.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,c),m=p.length,u=Promise.resolve(e);l<m;)u=u.then(p[l++],p[l++]);return u}m=a.length;let f=e;for(l=0;l<m;){const p=a[l++],y=a[l++];try{f=p(f)}catch(v){y.call(this,v);break}}try{u=yh.call(this,f)}catch(p){return Promise.reject(p)}for(l=0,m=c.length;l<m;)u=u.then(c[l++],c[l++]);return u}getUri(t){t=Fe(this.defaults,t);const e=hh(t.baseURL,t.url,t.allowAbsoluteUrls);return Ka(e,t.params,t.paramsSerializer)}}A.forEach(["delete","get","head","options"],function(t){ks.prototype[t]=function(e,n){return this.request(Fe(n||{},{method:t,url:e,data:(n||{}).data}))}}),A.forEach(["post","put","patch"],function(t){function e(n){return function(r,o,a){return this.request(Fe(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:o}))}}ks.prototype[t]=e(),ks.prototype[t+"Form"]=e(!0)});const Is=ks;class Ki{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(r){e=r});const n=this;this.promise.then(i=>{if(!n._listeners)return;let r=n._listeners.length;for(;r-- >0;)n._listeners[r](i);n._listeners=null}),this.promise.then=i=>{let r;const o=new Promise(a=>{n.subscribe(a),r=a}).then(i);return o.cancel=function(){n.unsubscribe(r)},o},t(function(r,o,a){n.reason||(n.reason=new ln(r,o,a),e(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=n=>{t.abort(n)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new Ki(function(i){t=i}),cancel:t}}}const hm=Ki;function cm(s){return function(e){return s.apply(null,e)}}function um(s){return A.isObject(s)&&s.isAxiosError===!0}const tr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(tr).forEach(([s,t])=>{tr[t]=s});const lm=tr;function bh(s){const t=new Is(s),e=Fa(Is.prototype.request,t);return A.extend(e,Is.prototype,t,{allOwnKeys:!0}),A.extend(e,t,null,{allOwnKeys:!0}),e.create=function(i){return bh(Fe(s,i))},e}const ht=bh(ji);ht.Axios=Is,ht.CanceledError=ln,ht.CancelToken=hm,ht.isCancel=ih,ht.VERSION=wh,ht.toFormData=_s,ht.AxiosError=Y,ht.Cancel=ht.CanceledError,ht.all=function(t){return Promise.all(t)},ht.spread=cm,ht.isAxiosError=um,ht.mergeConfig=Fe,ht.AxiosHeaders=Wt,ht.formToJSON=s=>nh(A.isHTMLForm(s)?new FormData(s):s),ht.getAdapter=gh.getAdapter,ht.HttpStatusCode=lm,ht.default=ht;const fm=ht;class er{instance;canceler;retryCount=0;cacheTime=0;caches=new cn;constructor(t){this.instance=fm.create(t),this.canceler=new dm,this.retryCount=t?.retry||0,this.cacheTime=t?.cache||0,this.instance.interceptors.request.use(e=>(this.canceler.pendingRequest(e),t?.interceptor?.request?.(e),e),e=>(this.canceler.cancelRequest(e.config),t?.interceptor?.requestError?.(e),e)),this.instance.interceptors.response.use(e=>(this.canceler.confirmRequest(e.config),t?.interceptor?.response?.(e),e.status==200?Promise.resolve(e):Promise.reject(e)),e=>(this.canceler.cancelRequest(e.config),t?.interceptor?.responseError?.(e),Promise.reject(e.response)))}request(t){let e=this.instance.request;const n=t.retry||this.retryCount;n&&(e=Pi(e,n));const i=t.cache||this.cacheTime;return i&&(e=Mi(e,i,this.caches)),e(t)}cancel(t){this.canceler.cancelRequest(t)}get(t,e){return this.request({...e,method:"get",url:t})}delete(t,e){return this.request({...e,method:"delete",url:t})}head(t,e){return this.request({...e,method:"head",url:t})}options(t,e){return this.request({...e,method:"options",url:t})}post(t,e,n){return this.request({...n,method:"post",url:t,data:e})}postBlob(t,e,n){return n={...n,headers:{...n?.headers,"Content-Type":"multipart/form-data"}},this.request({...n,method:"post",url:t,data:e})}postForm(t,e,n){return this.instance.postForm(t,e,{...n})}put(t,e,n){return this.request({...n,method:"put",url:t,data:e})}patch(t,e,n){return this.request({...n,method:"patch",url:t,data:e})}getUri(t){return this.instance.getUri(t)}}class dm{pendingRequestMap;constructor(){this.pendingRequestMap=new Map}getRequestId(t){const{method:e,url:n,params:i,data:r}=t;return Ci({method:e,url:n,params:i,data:r})}pendingRequest(t){const e=this.getRequestId(t);if(this.pendingRequestMap.has(e))t.signal=this.pendingRequestMap.get(e)?.signal;else{const n=new AbortController;t.signal=n.signal,this.pendingRequestMap.set(e,n)}}confirmRequest(t){if(this.pendingRequestMap.size===0)return;const e=this.getRequestId(t);this.pendingRequestMap.has(e)&&this.pendingRequestMap.delete(e)}cancelRequest(t){if(this.pendingRequestMap.size===0)return;const e=this.getRequestId(t);this.pendingRequestMap.has(e)&&(this.pendingRequestMap.get(e)?.abort(),this.pendingRequestMap.delete(e))}cancelAllRequest(){const t=this.pendingRequestMap.values();for(const e of t)e.abort();this.pendingRequestMap.clear()}}const nr=s=>new XMLSerializer().serializeToString(s),mm=(s,t="text/html")=>new DOMParser().parseFromString(s,t),sr=(s,t=Tt.SVG,e=fs.utf8)=>Ei(nr(s),t,e);async function ir(s=["*"],t){let e=[];const n=document.createElement("input");return n.setAttribute("type","file"),n.setAttribute("visibility","hidden"),n.setAttribute("accept",s.join(",")),t&&n.setAttribute("multiple","true"),n.addEventListener("click",i=>{n.value=""},!1),new Promise((i,r)=>{n.addEventListener("change",o=>{e=Array.from(o.target.files||[]),e.length===0?r(new Error("Cancel")):i(e)},!1),window.addEventListener("focus",()=>{setTimeout(()=>{e.length===0&&r(new Error("Cancel"))},1e3)},{once:!0}),n.click()}).then(i=>(n.remove(),i)).catch(i=>{throw n.remove(),i})}function Rn(s,t=$t.text,e){return new Promise((n,i)=>{const r=new FileReader;switch(r.addEventListener("progress",o=>{e?.(o.loaded,o.total)}),r.addEventListener("load",o=>{n(o.target?.result)}),r.addEventListener("error",o=>{i(o)}),t){case $t.dataURL:r.readAsDataURL(s);break;case $t.binaryString:r.readAsBinaryString(s);break;case $t.arraybuffer:r.readAsArrayBuffer(s);break;case $t.text:default:r.readAsText(s)}})}async function pm(s){const t=await Rn(s,$t.arraybuffer);return hf(t)}const gm=s=>{let t;return s instanceof File?t=s.name:t=s,t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i)?.[1]||""};function ym(s){switch(s.toLowerCase()){case"jpg":case"jpeg":return Tt.JPEG;case"gif":return Tt.GIF;case"svg":return Tt.SVG;case"pdf":return Tt.PDF;case"png":default:return Tt.PNG}}function vh(s,t,e,n,i,r,o){const a=new FileReader;a.addEventListener("load",h=>{if(!h.target||!h.target.result)return t(h);if(e.append(h.target.result),o<n.size)vh(s,t,e,n,i,o,Math.min(o+i,n.size));else return s(e.end())}),a.addEventListener("error",h=>t(h)),a.readAsArrayBuffer(n.slice(r,o))}async function _h(s,t=1*1024*1024){return await new Promise((e,n)=>vh(e,n,new Yf.ArrayBuffer,s,t,0,Math.min(t,s.size)))}class wm{axios;checkURL;uploadURL;file;fileHash;chunkSize;chunks;currentChunk=0;isUploading=!1;begin=0;end=0;timer;time=[0,0,0,0,0,0];onExist;onStart;onProgress;onComplete;onTime;constructor(t){this.axios=new er({baseURL:t.baseURL,interceptor:{response:e=>{e.config.url==this.uploadURL&&e.status==200&&(this.onProgress?.(this.currentChunk++,this.chunks),this.end==this.file.size?(this.isUploading=!1,this.stopTimeCount(),this.onComplete?.()):this.isUploading&&this.uploadChunk())}}}),this.checkURL=t.checkURL,this.uploadURL=t.uploadURL,this.file=t.file,this.chunkSize=t.chunkSize||1*1024*1024,this.chunks=Math.ceil(this.file.size/this.chunkSize),this.onExist=t.onExist,this.onStart=t.onStart,this.onProgress=t.onProgress,this.onComplete=t.onComplete,this.onTime=t.onTime}async start(){this.fileHash||(this.fileHash=await _h(this.file,this.chunkSize)),(await this.axios.post(this.checkURL,{fileName:this.file.name,fileHash:this.fileHash})).data.isExist?(this.isUploading=!1,this.onExist?.()):this.isUploading||(this.onStart?.(),this.startTimeCount(),await this.uploadChunk())}pause(){this.isUploading&&(this.isUploading=!1,this.stopTimeCount())}async uploadChunk(){this.isUploading=!0,this.begin=this.currentChunk*this.chunkSize,this.end=Math.min(this.begin+this.chunkSize,this.file.size);const t=this.file.slice(this.begin,this.end),e=new FormData;e.append("fileData",t),e.append("fileName",this.file.name),e.append("fileHash",this.fileHash),e.append("chunkIndex",String(this.currentChunk)),e.append("chunks",String(this.chunks)),await this.axios.postBlob(this.uploadURL,e)}startTimeCount(){this.stopTimeCount(),this.timer=setInterval(()=>{df(this.time,1),this.onTime?.(uf(this.time))},1e3)}stopTimeCount(){this.timer&&(clearInterval(this.timer),this.timer=void 0)}}var Sh={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
17
|
+
`+r):n.stack=r}catch{}}throw n}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Fe(this.defaults,e);const{transitional:n,paramsSerializer:i,headers:r}=e;n!==void 0&&As.assertOptions(n,{silentJSONParsing:re.transitional(re.boolean),forcedJSONParsing:re.transitional(re.boolean),clarifyTimeoutError:re.transitional(re.boolean)},!1),i!=null&&(A.isFunction(i)?e.paramsSerializer={serialize:i}:As.assertOptions(i,{encode:re.function,serialize:re.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),As.assertOptions(e,{baseUrl:re.spelling("baseURL"),withXsrfToken:re.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=r&&A.merge(r.common,r[e.method]);r&&A.forEach(["delete","get","head","post","put","patch","common"],p=>{delete r[p]}),e.headers=Wt.concat(o,r);const a=[];let h=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(e)===!1||(h=h&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});const c=[];this.interceptors.response.forEach(function(y){c.push(y.fulfilled,y.rejected)});let u,l=0,m;if(!h){const p=[yh.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,c),m=p.length,u=Promise.resolve(e);l<m;)u=u.then(p[l++],p[l++]);return u}m=a.length;let f=e;for(l=0;l<m;){const p=a[l++],y=a[l++];try{f=p(f)}catch(v){y.call(this,v);break}}try{u=yh.call(this,f)}catch(p){return Promise.reject(p)}for(l=0,m=c.length;l<m;)u=u.then(c[l++],c[l++]);return u}getUri(t){t=Fe(this.defaults,t);const e=hh(t.baseURL,t.url,t.allowAbsoluteUrls);return Ka(e,t.params,t.paramsSerializer)}}A.forEach(["delete","get","head","options"],function(t){ks.prototype[t]=function(e,n){return this.request(Fe(n||{},{method:t,url:e,data:(n||{}).data}))}}),A.forEach(["post","put","patch"],function(t){function e(n){return function(r,o,a){return this.request(Fe(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:o}))}}ks.prototype[t]=e(),ks.prototype[t+"Form"]=e(!0)});const Is=ks;class Ki{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(r){e=r});const n=this;this.promise.then(i=>{if(!n._listeners)return;let r=n._listeners.length;for(;r-- >0;)n._listeners[r](i);n._listeners=null}),this.promise.then=i=>{let r;const o=new Promise(a=>{n.subscribe(a),r=a}).then(i);return o.cancel=function(){n.unsubscribe(r)},o},t(function(r,o,a){n.reason||(n.reason=new ln(r,o,a),e(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=n=>{t.abort(n)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new Ki(function(i){t=i}),cancel:t}}}const hm=Ki;function cm(s){return function(e){return s.apply(null,e)}}function um(s){return A.isObject(s)&&s.isAxiosError===!0}const tr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(tr).forEach(([s,t])=>{tr[t]=s});const lm=tr;function bh(s){const t=new Is(s),e=Fa(Is.prototype.request,t);return A.extend(e,Is.prototype,t,{allOwnKeys:!0}),A.extend(e,t,null,{allOwnKeys:!0}),e.create=function(i){return bh(Fe(s,i))},e}const ht=bh(ji);ht.Axios=Is,ht.CanceledError=ln,ht.CancelToken=hm,ht.isCancel=ih,ht.VERSION=wh,ht.toFormData=_s,ht.AxiosError=Y,ht.Cancel=ht.CanceledError,ht.all=function(t){return Promise.all(t)},ht.spread=cm,ht.isAxiosError=um,ht.mergeConfig=Fe,ht.AxiosHeaders=Wt,ht.formToJSON=s=>nh(A.isHTMLForm(s)?new FormData(s):s),ht.getAdapter=gh.getAdapter,ht.HttpStatusCode=lm,ht.default=ht;const fm=ht;class er{instance;canceler;retryCount=0;cacheTime=0;caches=new cn;constructor(t){this.instance=fm.create(t),this.canceler=new dm,this.retryCount=t?.retry||0,this.cacheTime=t?.cache||0,this.instance.interceptors.request.use(e=>(this.canceler.pendingRequest(e),t?.interceptor?.request?.(e),e),e=>(this.canceler.cancelRequest(e.config),t?.interceptor?.requestError?.(e),e)),this.instance.interceptors.response.use(e=>(this.canceler.confirmRequest(e.config),t?.interceptor?.response?.(e),e.status==200?Promise.resolve(e):Promise.reject(e)),e=>(this.canceler.cancelRequest(e.config),t?.interceptor?.responseError?.(e),Promise.reject(e.response)))}request(t){let e=this.instance.request;const n=t.retry||this.retryCount;n&&(e=Pi(e,n));const i=t.cache||this.cacheTime;return i&&(e=Mi(e,i,this.caches)),e(t)}cancel(t){this.canceler.cancelRequest(t)}get(t,e){return this.request({...e,method:"get",url:t})}delete(t,e){return this.request({...e,method:"delete",url:t})}head(t,e){return this.request({...e,method:"head",url:t})}options(t,e){return this.request({...e,method:"options",url:t})}post(t,e,n){return this.request({...n,method:"post",url:t,data:e})}postBlob(t,e,n){return n={...n,headers:{...n?.headers,"Content-Type":"multipart/form-data"}},this.request({...n,method:"post",url:t,data:e})}postForm(t,e,n){return this.instance.postForm(t,e,{...n})}put(t,e,n){return this.request({...n,method:"put",url:t,data:e})}patch(t,e,n){return this.request({...n,method:"patch",url:t,data:e})}getUri(t){return this.instance.getUri(t)}}class dm{pendingRequestMap;constructor(){this.pendingRequestMap=new Map}getRequestId(t){const{method:e,url:n,params:i,data:r}=t;return Ci({method:e,url:n,params:i,data:r})}pendingRequest(t){const e=this.getRequestId(t);if(this.pendingRequestMap.has(e))t.signal=this.pendingRequestMap.get(e)?.signal;else{const n=new AbortController;t.signal=n.signal,this.pendingRequestMap.set(e,n)}}confirmRequest(t){if(this.pendingRequestMap.size===0)return;const e=this.getRequestId(t);this.pendingRequestMap.has(e)&&this.pendingRequestMap.delete(e)}cancelRequest(t){if(this.pendingRequestMap.size===0)return;const e=this.getRequestId(t);this.pendingRequestMap.has(e)&&(this.pendingRequestMap.get(e)?.abort(),this.pendingRequestMap.delete(e))}cancelAllRequest(){const t=this.pendingRequestMap.values();for(const e of t)e.abort();this.pendingRequestMap.clear()}}const nr=s=>new XMLSerializer().serializeToString(s),mm=(s,t="text/html")=>new DOMParser().parseFromString(s,t),sr=(s,t=Tt.SVG,e=ls.utf8)=>Ei(nr(s),t,e);async function ir(s=["*"],t){let e=[];const n=document.createElement("input");return n.setAttribute("type","file"),n.setAttribute("visibility","hidden"),n.setAttribute("accept",s.join(",")),t&&n.setAttribute("multiple","true"),n.addEventListener("click",i=>{n.value=""},!1),new Promise((i,r)=>{n.addEventListener("change",o=>{e=Array.from(o.target.files||[]),e.length===0?r(new Error("Cancel")):i(e)},!1),window.addEventListener("focus",()=>{setTimeout(()=>{e.length===0&&r(new Error("Cancel"))},1e3)},{once:!0}),n.click()}).then(i=>(n.remove(),i)).catch(i=>{throw n.remove(),i})}function Ln(s,t=$t.text,e){return new Promise((n,i)=>{const r=new FileReader;switch(r.addEventListener("progress",o=>{e?.(o.loaded,o.total)}),r.addEventListener("load",o=>{n(o.target?.result)}),r.addEventListener("error",o=>{i(o)}),t){case $t.dataURL:r.readAsDataURL(s);break;case $t.binaryString:r.readAsBinaryString(s);break;case $t.arraybuffer:r.readAsArrayBuffer(s);break;case $t.text:default:r.readAsText(s)}})}async function pm(s){const t=await Ln(s,$t.arraybuffer);return hf(t)}const gm=s=>{let t;return s instanceof File?t=s.name:t=s,t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i)?.[1]||""};function ym(s){switch(s.toLowerCase()){case"jpg":case"jpeg":return Tt.JPEG;case"gif":return Tt.GIF;case"svg":return Tt.SVG;case"pdf":return Tt.PDF;case"png":default:return Tt.PNG}}function vh(s,t,e,n,i,r,o){const a=new FileReader;a.addEventListener("load",h=>{if(!h.target||!h.target.result)return t(h);if(e.append(h.target.result),o<n.size)vh(s,t,e,n,i,o,Math.min(o+i,n.size));else return s(e.end())}),a.addEventListener("error",h=>t(h)),a.readAsArrayBuffer(n.slice(r,o))}async function _h(s,t=1*1024*1024){return await new Promise((e,n)=>vh(e,n,new Yf.ArrayBuffer,s,t,0,Math.min(t,s.size)))}class wm{axios;checkURL;uploadURL;file;fileHash;chunkSize;chunks;currentChunk=0;isUploading=!1;begin=0;end=0;timer;time=[0,0,0,0,0,0];onExist;onStart;onProgress;onComplete;onTime;constructor(t){this.axios=new er({baseURL:t.baseURL,interceptor:{response:e=>{e.config.url==this.uploadURL&&e.status==200&&(this.onProgress?.(this.currentChunk++,this.chunks),this.end==this.file.size?(this.isUploading=!1,this.stopTimeCount(),this.onComplete?.()):this.isUploading&&this.uploadChunk())}}}),this.checkURL=t.checkURL,this.uploadURL=t.uploadURL,this.file=t.file,this.chunkSize=t.chunkSize||1*1024*1024,this.chunks=Math.ceil(this.file.size/this.chunkSize),this.onExist=t.onExist,this.onStart=t.onStart,this.onProgress=t.onProgress,this.onComplete=t.onComplete,this.onTime=t.onTime}async start(){this.fileHash||(this.fileHash=await _h(this.file,this.chunkSize)),(await this.axios.post(this.checkURL,{fileName:this.file.name,fileHash:this.fileHash})).data.isExist?(this.isUploading=!1,this.onExist?.()):this.isUploading||(this.onStart?.(),this.startTimeCount(),await this.uploadChunk())}pause(){this.isUploading&&(this.isUploading=!1,this.stopTimeCount())}async uploadChunk(){this.isUploading=!0,this.begin=this.currentChunk*this.chunkSize,this.end=Math.min(this.begin+this.chunkSize,this.file.size);const t=this.file.slice(this.begin,this.end),e=new FormData;e.append("fileData",t),e.append("fileName",this.file.name),e.append("fileHash",this.fileHash),e.append("chunkIndex",String(this.currentChunk)),e.append("chunks",String(this.chunks)),await this.axios.postBlob(this.uploadURL,e)}startTimeCount(){this.stopTimeCount(),this.timer=setInterval(()=>{df(this.time,1),this.onTime?.(uf(this.time))},1e3)}stopTimeCount(){this.timer&&(clearInterval(this.timer),this.timer=void 0)}}var Sh={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
18
18
|
* http://hammerjs.github.io/
|
|
19
19
|
*
|
|
20
20
|
* Copyright (c) 2016 Jorik Tangelder;
|
|
21
21
|
* Licensed under the MIT license */(function(s){(function(t,e,n,i){var r=["","webkit","Moz","MS","ms","o"],o=e.createElement("div"),a="function",h=Math.round,c=Math.abs,u=Date.now;function l(g,S,P){return setTimeout(x(g,P),S)}function m(g,S,P){return Array.isArray(g)?(f(g,P[S],P),!0):!1}function f(g,S,P){var M;if(g)if(g.forEach)g.forEach(S,P);else if(g.length!==i)for(M=0;M<g.length;)S.call(P,g[M],M,g),M++;else for(M in g)g.hasOwnProperty(M)&&S.call(P,g[M],M,g)}function p(g,S,P){var M="DEPRECATED METHOD: "+S+`
|
|
22
22
|
`+P+` AT
|
|
23
|
-
`;return function(){var I=new Error("get-stack-trace"),z=I&&I.stack?I.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",V=t.console&&(t.console.warn||t.console.log);return V&&V.call(t.console,M,z),g.apply(this,arguments)}}var y;typeof Object.assign!="function"?y=function(S){if(S===i||S===null)throw new TypeError("Cannot convert undefined or null to object");for(var P=Object(S),M=1;M<arguments.length;M++){var I=arguments[M];if(I!==i&&I!==null)for(var z in I)I.hasOwnProperty(z)&&(P[z]=I[z])}return P}:y=Object.assign;var v=p(function(S,P,M){for(var I=Object.keys(P),z=0;z<I.length;)(!M||M&&S[I[z]]===i)&&(S[I[z]]=P[I[z]]),z++;return S},"extend","Use `assign`."),w=p(function(S,P){return v(S,P,!0)},"merge","Use `assign`.");function _(g,S,P){var M=S.prototype,I;I=g.prototype=Object.create(M),I.constructor=g,I._super=M,P&&y(I,P)}function x(g,S){return function(){return g.apply(S,arguments)}}function b(g,S){return typeof g==a?g.apply(S&&S[0]||i,S):g}function E(g,S){return g===i?S:g}function C(g,S,P){f(U(S),function(M){g.addEventListener(M,P,!1)})}function L(g,S,P){f(U(S),function(M){g.removeEventListener(M,P,!1)})}function B(g,S){for(;g;){if(g==S)return!0;g=g.parentNode}return!1}function F(g,S){return g.indexOf(S)>-1}function U(g){return g.trim().split(/\s+/g)}function G(g,S,P){if(g.indexOf&&!P)return g.indexOf(S);for(var M=0;M<g.length;){if(P&&g[M][P]==S||!P&&g[M]===S)return M;M++}return-1}function J(g){return Array.prototype.slice.call(g,0)}function st(g,S,P){for(var M=[],I=[],z=0;z<g.length;){var V=S?g[z][S]:g[z];G(I,V)<0&&M.push(g[z]),I[z]=V,z++}return P&&(S?M=M.sort(function(yt,kt){return yt[S]>kt[S]}):M=M.sort()),M}function K(g,S){for(var P,M,I=S[0].toUpperCase()+S.slice(1),z=0;z<r.length;){if(P=r[z],M=P?P+I:S,M in g)return M;z++}return i}var Kt=1;function Yt(){return Kt++}function Ut(g){var S=g.ownerDocument||g;return S.defaultView||S.parentWindow||t}var te=/mobile|tablet|ip(ad|hone|od)|android/i,R="ontouchstart"in t,D=K(t,"PointerEvent")!==i,$=R&&te.test(navigator.userAgent),H="touch",At="pen",ee="mouse",ai="kinect",hi=25,mt=1,ae=2,it=4,Ct=8,_n=1,en=2,nn=4,Oe=8,k=16,at=en|nn,sn=Oe|k,cl=at|sn,ul=["x","y"],ci=["clientX","clientY"];function Vt(g,S){var P=this;this.manager=g,this.callback=S,this.element=g.element,this.target=g.options.inputTarget,this.domHandler=function(M){b(g.options.enable,[g])&&P.handler(M)},this.init()}Vt.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(Ut(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&L(this.element,this.evEl,this.domHandler),this.evTarget&&L(this.target,this.evTarget,this.domHandler),this.evWin&&L(Ut(this.element),this.evWin,this.domHandler)}};function M2(g){var S,P=g.options.inputClass;return P?S=P:D?S=ta:$?S=fi:R?S=ea:S=li,new S(g,A2)}function A2(g,S,P){var M=P.pointers.length,I=P.changedPointers.length,z=S&mt&&M-I===0,V=S&(it|Ct)&&M-I===0;P.isFirst=!!z,P.isFinal=!!V,z&&(g.session={}),P.eventType=S,k2(g,P),g.emit("hammer.input",P),g.recognize(P),g.session.prevInput=P}function k2(g,S){var P=g.session,M=S.pointers,I=M.length;P.firstInput||(P.firstInput=ll(S)),I>1&&!P.firstMultiple?P.firstMultiple=ll(S):I===1&&(P.firstMultiple=!1);var z=P.firstInput,V=P.firstMultiple,pt=V?V.center:z.center,yt=S.center=fl(M);S.timeStamp=u(),S.deltaTime=S.timeStamp-z.timeStamp,S.angle=Ko(pt,yt),S.distance=ui(pt,yt),I2(P,S),S.offsetDirection=ml(S.deltaX,S.deltaY);var kt=dl(S.deltaTime,S.deltaX,S.deltaY);S.overallVelocityX=kt.x,S.overallVelocityY=kt.y,S.overallVelocity=c(kt.x)>c(kt.y)?kt.x:kt.y,S.scale=V?R2(V.pointers,M):1,S.rotation=V?L2(V.pointers,M):0,S.maxPointers=P.prevInput?S.pointers.length>P.prevInput.maxPointers?S.pointers.length:P.prevInput.maxPointers:S.pointers.length,D2(P,S);var ce=g.element;B(S.srcEvent.target,ce)&&(ce=S.srcEvent.target),S.target=ce}function I2(g,S){var P=S.center,M=g.offsetDelta||{},I=g.prevDelta||{},z=g.prevInput||{};(S.eventType===mt||z.eventType===it)&&(I=g.prevDelta={x:z.deltaX||0,y:z.deltaY||0},M=g.offsetDelta={x:P.x,y:P.y}),S.deltaX=I.x+(P.x-M.x),S.deltaY=I.y+(P.y-M.y)}function D2(g,S){var P=g.lastInterval||S,M=S.timeStamp-P.timeStamp,I,z,V,pt;if(S.eventType!=Ct&&(M>hi||P.velocity===i)){var yt=S.deltaX-P.deltaX,kt=S.deltaY-P.deltaY,ce=dl(M,yt,kt);z=ce.x,V=ce.y,I=c(ce.x)>c(ce.y)?ce.x:ce.y,pt=ml(yt,kt),g.lastInterval=S}else I=P.velocity,z=P.velocityX,V=P.velocityY,pt=P.direction;S.velocity=I,S.velocityX=z,S.velocityY=V,S.direction=pt}function ll(g){for(var S=[],P=0;P<g.pointers.length;)S[P]={clientX:h(g.pointers[P].clientX),clientY:h(g.pointers[P].clientY)},P++;return{timeStamp:u(),pointers:S,center:fl(S),deltaX:g.deltaX,deltaY:g.deltaY}}function fl(g){var S=g.length;if(S===1)return{x:h(g[0].clientX),y:h(g[0].clientY)};for(var P=0,M=0,I=0;I<S;)P+=g[I].clientX,M+=g[I].clientY,I++;return{x:h(P/S),y:h(M/S)}}function dl(g,S,P){return{x:S/g||0,y:P/g||0}}function ml(g,S){return g===S?_n:c(g)>=c(S)?g<0?en:nn:S<0?Oe:k}function ui(g,S,P){P||(P=ul);var M=S[P[0]]-g[P[0]],I=S[P[1]]-g[P[1]];return Math.sqrt(M*M+I*I)}function Ko(g,S,P){P||(P=ul);var M=S[P[0]]-g[P[0]],I=S[P[1]]-g[P[1]];return Math.atan2(I,M)*180/Math.PI}function L2(g,S){return Ko(S[1],S[0],ci)+Ko(g[1],g[0],ci)}function R2(g,S){return ui(S[0],S[1],ci)/ui(g[0],g[1],ci)}var O2={mousedown:mt,mousemove:ae,mouseup:it},z2="mousedown",N2="mousemove mouseup";function li(){this.evEl=z2,this.evWin=N2,this.pressed=!1,Vt.apply(this,arguments)}_(li,Vt,{handler:function(S){var P=O2[S.type];P&mt&&S.button===0&&(this.pressed=!0),P&ae&&S.which!==1&&(P=it),this.pressed&&(P&it&&(this.pressed=!1),this.callback(this.manager,P,{pointers:[S],changedPointers:[S],pointerType:ee,srcEvent:S}))}});var B2={pointerdown:mt,pointermove:ae,pointerup:it,pointercancel:Ct,pointerout:Ct},F2={2:H,3:At,4:ee,5:ai},pl="pointerdown",gl="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(pl="MSPointerDown",gl="MSPointerMove MSPointerUp MSPointerCancel");function ta(){this.evEl=pl,this.evWin=gl,Vt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}_(ta,Vt,{handler:function(S){var P=this.store,M=!1,I=S.type.toLowerCase().replace("ms",""),z=B2[I],V=F2[S.pointerType]||S.pointerType,pt=V==H,yt=G(P,S.pointerId,"pointerId");z&mt&&(S.button===0||pt)?yt<0&&(P.push(S),yt=P.length-1):z&(it|Ct)&&(M=!0),!(yt<0)&&(P[yt]=S,this.callback(this.manager,z,{pointers:P,changedPointers:[S],pointerType:V,srcEvent:S}),M&&P.splice(yt,1))}});var Y2={touchstart:mt,touchmove:ae,touchend:it,touchcancel:Ct},$2="touchstart",X2="touchstart touchmove touchend touchcancel";function yl(){this.evTarget=$2,this.evWin=X2,this.started=!1,Vt.apply(this,arguments)}_(yl,Vt,{handler:function(S){var P=Y2[S.type];if(P===mt&&(this.started=!0),!!this.started){var M=U2.call(this,S,P);P&(it|Ct)&&M[0].length-M[1].length===0&&(this.started=!1),this.callback(this.manager,P,{pointers:M[0],changedPointers:M[1],pointerType:H,srcEvent:S})}}});function U2(g,S){var P=J(g.touches),M=J(g.changedTouches);return S&(it|Ct)&&(P=st(P.concat(M),"identifier",!0)),[P,M]}var V2={touchstart:mt,touchmove:ae,touchend:it,touchcancel:Ct},G2="touchstart touchmove touchend touchcancel";function fi(){this.evTarget=G2,this.targetIds={},Vt.apply(this,arguments)}_(fi,Vt,{handler:function(S){var P=V2[S.type],M=q2.call(this,S,P);M&&this.callback(this.manager,P,{pointers:M[0],changedPointers:M[1],pointerType:H,srcEvent:S})}});function q2(g,S){var P=J(g.touches),M=this.targetIds;if(S&(mt|ae)&&P.length===1)return M[P[0].identifier]=!0,[P,P];var I,z,V=J(g.changedTouches),pt=[],yt=this.target;if(z=P.filter(function(kt){return B(kt.target,yt)}),S===mt)for(I=0;I<z.length;)M[z[I].identifier]=!0,I++;for(I=0;I<V.length;)M[V[I].identifier]&&pt.push(V[I]),S&(it|Ct)&&delete M[V[I].identifier],I++;if(pt.length)return[st(z.concat(pt),"identifier",!0),pt]}var j2=2500,wl=25;function ea(){Vt.apply(this,arguments);var g=x(this.handler,this);this.touch=new fi(this.manager,g),this.mouse=new li(this.manager,g),this.primaryTouch=null,this.lastTouches=[]}_(ea,Vt,{handler:function(S,P,M){var I=M.pointerType==H,z=M.pointerType==ee;if(!(z&&M.sourceCapabilities&&M.sourceCapabilities.firesTouchEvents)){if(I)H2.call(this,P,M);else if(z&&W2.call(this,M))return;this.callback(S,P,M)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function H2(g,S){g&mt?(this.primaryTouch=S.changedPointers[0].identifier,xl.call(this,S)):g&(it|Ct)&&xl.call(this,S)}function xl(g){var S=g.changedPointers[0];if(S.identifier===this.primaryTouch){var P={x:S.clientX,y:S.clientY};this.lastTouches.push(P);var M=this.lastTouches,I=function(){var z=M.indexOf(P);z>-1&&M.splice(z,1)};setTimeout(I,j2)}}function W2(g){for(var S=g.srcEvent.clientX,P=g.srcEvent.clientY,M=0;M<this.lastTouches.length;M++){var I=this.lastTouches[M],z=Math.abs(S-I.x),V=Math.abs(P-I.y);if(z<=wl&&V<=wl)return!0}return!1}var bl=K(o.style,"touchAction"),vl=bl!==i,_l="compute",Sl="auto",na="manipulation",rn="none",as="pan-x",hs="pan-y",di=Z2();function sa(g,S){this.manager=g,this.set(S)}sa.prototype={set:function(g){g==_l&&(g=this.compute()),vl&&this.manager.element.style&&di[g]&&(this.manager.element.style[bl]=g),this.actions=g.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var g=[];return f(this.manager.recognizers,function(S){b(S.options.enable,[S])&&(g=g.concat(S.getTouchAction()))}),J2(g.join(" "))},preventDefaults:function(g){var S=g.srcEvent,P=g.offsetDirection;if(this.manager.session.prevented){S.preventDefault();return}var M=this.actions,I=F(M,rn)&&!di[rn],z=F(M,hs)&&!di[hs],V=F(M,as)&&!di[as];if(I){var pt=g.pointers.length===1,yt=g.distance<2,kt=g.deltaTime<250;if(pt&&yt&&kt)return}if(!(V&&z)&&(I||z&&P&at||V&&P&sn))return this.preventSrc(S)},preventSrc:function(g){this.manager.session.prevented=!0,g.preventDefault()}};function J2(g){if(F(g,rn))return rn;var S=F(g,as),P=F(g,hs);return S&&P?rn:S||P?S?as:hs:F(g,na)?na:Sl}function Z2(){if(!vl)return!1;var g={},S=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(P){g[P]=S?t.CSS.supports("touch-action",P):!0}),g}var mi=1,Gt=2,Sn=4,ze=8,xe=ze,cs=16,he=32;function be(g){this.options=y({},this.defaults,g||{}),this.id=Yt(),this.manager=null,this.options.enable=E(this.options.enable,!0),this.state=mi,this.simultaneous={},this.requireFail=[]}be.prototype={defaults:{},set:function(g){return y(this.options,g),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(g){if(m(g,"recognizeWith",this))return this;var S=this.simultaneous;return g=pi(g,this),S[g.id]||(S[g.id]=g,g.recognizeWith(this)),this},dropRecognizeWith:function(g){return m(g,"dropRecognizeWith",this)?this:(g=pi(g,this),delete this.simultaneous[g.id],this)},requireFailure:function(g){if(m(g,"requireFailure",this))return this;var S=this.requireFail;return g=pi(g,this),G(S,g)===-1&&(S.push(g),g.requireFailure(this)),this},dropRequireFailure:function(g){if(m(g,"dropRequireFailure",this))return this;g=pi(g,this);var S=G(this.requireFail,g);return S>-1&&this.requireFail.splice(S,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(g){return!!this.simultaneous[g.id]},emit:function(g){var S=this,P=this.state;function M(I){S.manager.emit(I,g)}P<ze&&M(S.options.event+Cl(P)),M(S.options.event),g.additionalEvent&&M(g.additionalEvent),P>=ze&&M(S.options.event+Cl(P))},tryEmit:function(g){if(this.canEmit())return this.emit(g);this.state=he},canEmit:function(){for(var g=0;g<this.requireFail.length;){if(!(this.requireFail[g].state&(he|mi)))return!1;g++}return!0},recognize:function(g){var S=y({},g);if(!b(this.options.enable,[this,S])){this.reset(),this.state=he;return}this.state&(xe|cs|he)&&(this.state=mi),this.state=this.process(S),this.state&(Gt|Sn|ze|cs)&&this.tryEmit(S)},process:function(g){},getTouchAction:function(){},reset:function(){}};function Cl(g){return g&cs?"cancel":g&ze?"end":g&Sn?"move":g&Gt?"start":""}function Tl(g){return g==k?"down":g==Oe?"up":g==en?"left":g==nn?"right":""}function pi(g,S){var P=S.manager;return P?P.get(g):g}function ne(){be.apply(this,arguments)}_(ne,be,{defaults:{pointers:1},attrTest:function(g){var S=this.options.pointers;return S===0||g.pointers.length===S},process:function(g){var S=this.state,P=g.eventType,M=S&(Gt|Sn),I=this.attrTest(g);return M&&(P&Ct||!I)?S|cs:M||I?P&it?S|ze:S&Gt?S|Sn:Gt:he}});function gi(){ne.apply(this,arguments),this.pX=null,this.pY=null}_(gi,ne,{defaults:{event:"pan",threshold:10,pointers:1,direction:cl},getTouchAction:function(){var g=this.options.direction,S=[];return g&at&&S.push(hs),g&sn&&S.push(as),S},directionTest:function(g){var S=this.options,P=!0,M=g.distance,I=g.direction,z=g.deltaX,V=g.deltaY;return I&S.direction||(S.direction&at?(I=z===0?_n:z<0?en:nn,P=z!=this.pX,M=Math.abs(g.deltaX)):(I=V===0?_n:V<0?Oe:k,P=V!=this.pY,M=Math.abs(g.deltaY))),g.direction=I,P&&M>S.threshold&&I&S.direction},attrTest:function(g){return ne.prototype.attrTest.call(this,g)&&(this.state&Gt||!(this.state&Gt)&&this.directionTest(g))},emit:function(g){this.pX=g.deltaX,this.pY=g.deltaY;var S=Tl(g.direction);S&&(g.additionalEvent=this.options.event+S),this._super.emit.call(this,g)}});function ia(){ne.apply(this,arguments)}_(ia,ne,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[rn]},attrTest:function(g){return this._super.attrTest.call(this,g)&&(Math.abs(g.scale-1)>this.options.threshold||this.state&Gt)},emit:function(g){if(g.scale!==1){var S=g.scale<1?"in":"out";g.additionalEvent=this.options.event+S}this._super.emit.call(this,g)}});function ra(){be.apply(this,arguments),this._timer=null,this._input=null}_(ra,be,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Sl]},process:function(g){var S=this.options,P=g.pointers.length===S.pointers,M=g.distance<S.threshold,I=g.deltaTime>S.time;if(this._input=g,!M||!P||g.eventType&(it|Ct)&&!I)this.reset();else if(g.eventType&mt)this.reset(),this._timer=l(function(){this.state=xe,this.tryEmit()},S.time,this);else if(g.eventType&it)return xe;return he},reset:function(){clearTimeout(this._timer)},emit:function(g){this.state===xe&&(g&&g.eventType&it?this.manager.emit(this.options.event+"up",g):(this._input.timeStamp=u(),this.manager.emit(this.options.event,this._input)))}});function oa(){ne.apply(this,arguments)}_(oa,ne,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[rn]},attrTest:function(g){return this._super.attrTest.call(this,g)&&(Math.abs(g.rotation)>this.options.threshold||this.state&Gt)}});function aa(){ne.apply(this,arguments)}_(aa,ne,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:at|sn,pointers:1},getTouchAction:function(){return gi.prototype.getTouchAction.call(this)},attrTest:function(g){var S=this.options.direction,P;return S&(at|sn)?P=g.overallVelocity:S&at?P=g.overallVelocityX:S&sn&&(P=g.overallVelocityY),this._super.attrTest.call(this,g)&&S&g.offsetDirection&&g.distance>this.options.threshold&&g.maxPointers==this.options.pointers&&c(P)>this.options.velocity&&g.eventType&it},emit:function(g){var S=Tl(g.offsetDirection);S&&this.manager.emit(this.options.event+S,g),this.manager.emit(this.options.event,g)}});function yi(){be.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}_(yi,be,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[na]},process:function(g){var S=this.options,P=g.pointers.length===S.pointers,M=g.distance<S.threshold,I=g.deltaTime<S.time;if(this.reset(),g.eventType&mt&&this.count===0)return this.failTimeout();if(M&&I&&P){if(g.eventType!=it)return this.failTimeout();var z=this.pTime?g.timeStamp-this.pTime<S.interval:!0,V=!this.pCenter||ui(this.pCenter,g.center)<S.posThreshold;this.pTime=g.timeStamp,this.pCenter=g.center,!V||!z?this.count=1:this.count+=1,this._input=g;var pt=this.count%S.taps;if(pt===0)return this.hasRequireFailures()?(this._timer=l(function(){this.state=xe,this.tryEmit()},S.interval,this),Gt):xe}return he},failTimeout:function(){return this._timer=l(function(){this.state=he},this.options.interval,this),he},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==xe&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function ve(g,S){return S=S||{},S.recognizers=E(S.recognizers,ve.defaults.preset),new ha(g,S)}ve.VERSION="2.0.7",ve.defaults={domEvents:!1,touchAction:_l,enable:!0,inputTarget:null,inputClass:null,preset:[[oa,{enable:!1}],[ia,{enable:!1},["rotate"]],[aa,{direction:at}],[gi,{direction:at},["swipe"]],[yi],[yi,{event:"doubletap",taps:2},["tap"]],[ra]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Q2=1,El=2;function ha(g,S){this.options=y({},ve.defaults,S||{}),this.options.inputTarget=this.options.inputTarget||g,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=g,this.input=M2(this),this.touchAction=new sa(this,this.options.touchAction),Pl(this,!0),f(this.options.recognizers,function(P){var M=this.add(new P[0](P[1]));P[2]&&M.recognizeWith(P[2]),P[3]&&M.requireFailure(P[3])},this)}ha.prototype={set:function(g){return y(this.options,g),g.touchAction&&this.touchAction.update(),g.inputTarget&&(this.input.destroy(),this.input.target=g.inputTarget,this.input.init()),this},stop:function(g){this.session.stopped=g?El:Q2},recognize:function(g){var S=this.session;if(!S.stopped){this.touchAction.preventDefaults(g);var P,M=this.recognizers,I=S.curRecognizer;(!I||I&&I.state&xe)&&(I=S.curRecognizer=null);for(var z=0;z<M.length;)P=M[z],S.stopped!==El&&(!I||P==I||P.canRecognizeWith(I))?P.recognize(g):P.reset(),!I&&P.state&(Gt|Sn|ze)&&(I=S.curRecognizer=P),z++}},get:function(g){if(g instanceof be)return g;for(var S=this.recognizers,P=0;P<S.length;P++)if(S[P].options.event==g)return S[P];return null},add:function(g){if(m(g,"add",this))return this;var S=this.get(g.options.event);return S&&this.remove(S),this.recognizers.push(g),g.manager=this,this.touchAction.update(),g},remove:function(g){if(m(g,"remove",this))return this;if(g=this.get(g),g){var S=this.recognizers,P=G(S,g);P!==-1&&(S.splice(P,1),this.touchAction.update())}return this},on:function(g,S){if(g!==i&&S!==i){var P=this.handlers;return f(U(g),function(M){P[M]=P[M]||[],P[M].push(S)}),this}},off:function(g,S){if(g!==i){var P=this.handlers;return f(U(g),function(M){S?P[M]&&P[M].splice(G(P[M],S),1):delete P[M]}),this}},emit:function(g,S){this.options.domEvents&&K2(g,S);var P=this.handlers[g]&&this.handlers[g].slice();if(!(!P||!P.length)){S.type=g,S.preventDefault=function(){S.srcEvent.preventDefault()};for(var M=0;M<P.length;)P[M](S),M++}},destroy:function(){this.element&&Pl(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function Pl(g,S){var P=g.element;if(P.style){var M;f(g.options.cssProps,function(I,z){M=K(P.style,z),S?(g.oldCssProps[M]=P.style[M],P.style[M]=I):P.style[M]=g.oldCssProps[M]||""}),S||(g.oldCssProps={})}}function K2(g,S){var P=e.createEvent("Event");P.initEvent(g,!0,!0),P.gesture=S,S.target.dispatchEvent(P)}y(ve,{INPUT_START:mt,INPUT_MOVE:ae,INPUT_END:it,INPUT_CANCEL:Ct,STATE_POSSIBLE:mi,STATE_BEGAN:Gt,STATE_CHANGED:Sn,STATE_ENDED:ze,STATE_RECOGNIZED:xe,STATE_CANCELLED:cs,STATE_FAILED:he,DIRECTION_NONE:_n,DIRECTION_LEFT:en,DIRECTION_RIGHT:nn,DIRECTION_UP:Oe,DIRECTION_DOWN:k,DIRECTION_HORIZONTAL:at,DIRECTION_VERTICAL:sn,DIRECTION_ALL:cl,Manager:ha,Input:Vt,TouchAction:sa,TouchInput:fi,MouseInput:li,PointerEventInput:ta,TouchMouseInput:ea,SingleTouchInput:yl,Recognizer:be,AttrRecognizer:ne,Tap:yi,Pan:gi,Swipe:aa,Pinch:ia,Rotate:oa,Press:ra,on:C,off:L,each:f,merge:w,extend:v,assign:y,inherit:_,bindFn:x,prefixed:K});var tx=typeof t<"u"?t:typeof self<"u"?self:{};tx.Hammer=ve,typeof i=="function"&&i.amd?i(function(){return ve}):s.exports?s.exports=ve:t[n]=ve})(window,document,"Hammer")})(Sh);var xm=Sh.exports;const tt=Na(xm);var rr=function(s,t){return rr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])},rr(s,t)};function fe(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");rr(s,t);function e(){this.constructor=s}s.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function bm(s,t,e,n){function i(r){return r instanceof e?r:new e(function(o){o(r)})}return new(e||(e=Promise))(function(r,o){function a(u){try{c(n.next(u))}catch(l){o(l)}}function h(u){try{c(n.throw(u))}catch(l){o(l)}}function c(u){u.done?r(u.value):i(u.value).then(a,h)}c((n=n.apply(s,t||[])).next())})}function Ch(s,t){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(u){return h([c,u])}}function h(c){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(e=0)),e;)try{if(n=1,i&&(r=c[0]&2?i.return:c[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,c[1])).done)return r;switch(i=0,r&&(c=[c[0]&2,r.value]),c[0]){case 0:case 1:r=c;break;case 4:return e.label++,{value:c[1],done:!1};case 5:e.label++,i=c[1],c=[0];continue;case 7:c=e.ops.pop(),e.trys.pop();continue;default:if(r=e.trys,!(r=r.length>0&&r[r.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]<r[3])){e.label=c[1];break}if(c[0]===6&&e.label<r[1]){e.label=r[1],r=c;break}if(r&&e.label<r[2]){e.label=r[2],e.ops.push(c);break}r[2]&&e.ops.pop(),e.trys.pop();continue}c=t.call(s,e)}catch(u){c=[6,u],i=0}finally{n=r=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Ye(s){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&s[t],n=0;if(e)return e.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&n>=s.length&&(s=void 0),{value:s&&s[n++],done:!s}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Se(s,t){var e=typeof Symbol=="function"&&s[Symbol.iterator];if(!e)return s;var n=e.call(s),i,r=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)r.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(o)throw o.error}}return r}function $e(s,t,e){if(e||arguments.length===2)for(var n=0,i=t.length,r;n<i;n++)(r||!(n in t))&&(r||(r=Array.prototype.slice.call(t,0,n)),r[n]=t[n]);return s.concat(r||Array.prototype.slice.call(t))}function fn(s){return this instanceof fn?(this.v=s,this):new fn(s)}function vm(s,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=e.apply(s,t||[]),i,r=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(f){return function(p){return Promise.resolve(p).then(f,l)}}function a(f,p){n[f]&&(i[f]=function(y){return new Promise(function(v,w){r.push([f,y,v,w])>1||h(f,y)})},p&&(i[f]=p(i[f])))}function h(f,p){try{c(n[f](p))}catch(y){m(r[0][3],y)}}function c(f){f.value instanceof fn?Promise.resolve(f.value.v).then(u,l):m(r[0][2],f)}function u(f){h("next",f)}function l(f){h("throw",f)}function m(f,p){f(p),r.shift(),r.length&&h(r[0][0],r[0][1])}}function _m(s){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=s[Symbol.asyncIterator],e;return t?t.call(s):(s=typeof Ye=="function"?Ye(s):s[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=s[r]&&function(o){return new Promise(function(a,h){o=s[r](o),i(a,h,o.done,o.value)})}}function i(r,o,a,h){Promise.resolve(h).then(function(c){r({value:c,done:a})},o)}}typeof SuppressedError=="function"&&SuppressedError;function j(s){return typeof s=="function"}function or(s){var t=function(n){Error.call(n),n.stack=new Error().stack},e=s(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var ar=or(function(s){return function(e){s(this),this.message=e?e.length+` errors occurred during unsubscription:
|
|
23
|
+
`;return function(){var I=new Error("get-stack-trace"),z=I&&I.stack?I.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",V=t.console&&(t.console.warn||t.console.log);return V&&V.call(t.console,M,z),g.apply(this,arguments)}}var y;typeof Object.assign!="function"?y=function(S){if(S===i||S===null)throw new TypeError("Cannot convert undefined or null to object");for(var P=Object(S),M=1;M<arguments.length;M++){var I=arguments[M];if(I!==i&&I!==null)for(var z in I)I.hasOwnProperty(z)&&(P[z]=I[z])}return P}:y=Object.assign;var v=p(function(S,P,M){for(var I=Object.keys(P),z=0;z<I.length;)(!M||M&&S[I[z]]===i)&&(S[I[z]]=P[I[z]]),z++;return S},"extend","Use `assign`."),w=p(function(S,P){return v(S,P,!0)},"merge","Use `assign`.");function _(g,S,P){var M=S.prototype,I;I=g.prototype=Object.create(M),I.constructor=g,I._super=M,P&&y(I,P)}function x(g,S){return function(){return g.apply(S,arguments)}}function b(g,S){return typeof g==a?g.apply(S&&S[0]||i,S):g}function E(g,S){return g===i?S:g}function C(g,S,P){f(U(S),function(M){g.addEventListener(M,P,!1)})}function L(g,S,P){f(U(S),function(M){g.removeEventListener(M,P,!1)})}function B(g,S){for(;g;){if(g==S)return!0;g=g.parentNode}return!1}function F(g,S){return g.indexOf(S)>-1}function U(g){return g.trim().split(/\s+/g)}function G(g,S,P){if(g.indexOf&&!P)return g.indexOf(S);for(var M=0;M<g.length;){if(P&&g[M][P]==S||!P&&g[M]===S)return M;M++}return-1}function J(g){return Array.prototype.slice.call(g,0)}function st(g,S,P){for(var M=[],I=[],z=0;z<g.length;){var V=S?g[z][S]:g[z];G(I,V)<0&&M.push(g[z]),I[z]=V,z++}return P&&(S?M=M.sort(function(yt,kt){return yt[S]>kt[S]}):M=M.sort()),M}function K(g,S){for(var P,M,I=S[0].toUpperCase()+S.slice(1),z=0;z<r.length;){if(P=r[z],M=P?P+I:S,M in g)return M;z++}return i}var Kt=1;function Yt(){return Kt++}function Ut(g){var S=g.ownerDocument||g;return S.defaultView||S.parentWindow||t}var te=/mobile|tablet|ip(ad|hone|od)|android/i,R="ontouchstart"in t,D=K(t,"PointerEvent")!==i,$=R&&te.test(navigator.userAgent),H="touch",At="pen",ee="mouse",ai="kinect",hi=25,mt=1,ae=2,it=4,Ct=8,_n=1,en=2,nn=4,Oe=8,k=16,at=en|nn,sn=Oe|k,cl=at|sn,ul=["x","y"],ci=["clientX","clientY"];function Vt(g,S){var P=this;this.manager=g,this.callback=S,this.element=g.element,this.target=g.options.inputTarget,this.domHandler=function(M){b(g.options.enable,[g])&&P.handler(M)},this.init()}Vt.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(Ut(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&L(this.element,this.evEl,this.domHandler),this.evTarget&&L(this.target,this.evTarget,this.domHandler),this.evWin&&L(Ut(this.element),this.evWin,this.domHandler)}};function M2(g){var S,P=g.options.inputClass;return P?S=P:D?S=ta:$?S=fi:R?S=ea:S=li,new S(g,A2)}function A2(g,S,P){var M=P.pointers.length,I=P.changedPointers.length,z=S&mt&&M-I===0,V=S&(it|Ct)&&M-I===0;P.isFirst=!!z,P.isFinal=!!V,z&&(g.session={}),P.eventType=S,k2(g,P),g.emit("hammer.input",P),g.recognize(P),g.session.prevInput=P}function k2(g,S){var P=g.session,M=S.pointers,I=M.length;P.firstInput||(P.firstInput=ll(S)),I>1&&!P.firstMultiple?P.firstMultiple=ll(S):I===1&&(P.firstMultiple=!1);var z=P.firstInput,V=P.firstMultiple,pt=V?V.center:z.center,yt=S.center=fl(M);S.timeStamp=u(),S.deltaTime=S.timeStamp-z.timeStamp,S.angle=Ko(pt,yt),S.distance=ui(pt,yt),I2(P,S),S.offsetDirection=ml(S.deltaX,S.deltaY);var kt=dl(S.deltaTime,S.deltaX,S.deltaY);S.overallVelocityX=kt.x,S.overallVelocityY=kt.y,S.overallVelocity=c(kt.x)>c(kt.y)?kt.x:kt.y,S.scale=V?R2(V.pointers,M):1,S.rotation=V?L2(V.pointers,M):0,S.maxPointers=P.prevInput?S.pointers.length>P.prevInput.maxPointers?S.pointers.length:P.prevInput.maxPointers:S.pointers.length,D2(P,S);var ce=g.element;B(S.srcEvent.target,ce)&&(ce=S.srcEvent.target),S.target=ce}function I2(g,S){var P=S.center,M=g.offsetDelta||{},I=g.prevDelta||{},z=g.prevInput||{};(S.eventType===mt||z.eventType===it)&&(I=g.prevDelta={x:z.deltaX||0,y:z.deltaY||0},M=g.offsetDelta={x:P.x,y:P.y}),S.deltaX=I.x+(P.x-M.x),S.deltaY=I.y+(P.y-M.y)}function D2(g,S){var P=g.lastInterval||S,M=S.timeStamp-P.timeStamp,I,z,V,pt;if(S.eventType!=Ct&&(M>hi||P.velocity===i)){var yt=S.deltaX-P.deltaX,kt=S.deltaY-P.deltaY,ce=dl(M,yt,kt);z=ce.x,V=ce.y,I=c(ce.x)>c(ce.y)?ce.x:ce.y,pt=ml(yt,kt),g.lastInterval=S}else I=P.velocity,z=P.velocityX,V=P.velocityY,pt=P.direction;S.velocity=I,S.velocityX=z,S.velocityY=V,S.direction=pt}function ll(g){for(var S=[],P=0;P<g.pointers.length;)S[P]={clientX:h(g.pointers[P].clientX),clientY:h(g.pointers[P].clientY)},P++;return{timeStamp:u(),pointers:S,center:fl(S),deltaX:g.deltaX,deltaY:g.deltaY}}function fl(g){var S=g.length;if(S===1)return{x:h(g[0].clientX),y:h(g[0].clientY)};for(var P=0,M=0,I=0;I<S;)P+=g[I].clientX,M+=g[I].clientY,I++;return{x:h(P/S),y:h(M/S)}}function dl(g,S,P){return{x:S/g||0,y:P/g||0}}function ml(g,S){return g===S?_n:c(g)>=c(S)?g<0?en:nn:S<0?Oe:k}function ui(g,S,P){P||(P=ul);var M=S[P[0]]-g[P[0]],I=S[P[1]]-g[P[1]];return Math.sqrt(M*M+I*I)}function Ko(g,S,P){P||(P=ul);var M=S[P[0]]-g[P[0]],I=S[P[1]]-g[P[1]];return Math.atan2(I,M)*180/Math.PI}function L2(g,S){return Ko(S[1],S[0],ci)+Ko(g[1],g[0],ci)}function R2(g,S){return ui(S[0],S[1],ci)/ui(g[0],g[1],ci)}var O2={mousedown:mt,mousemove:ae,mouseup:it},z2="mousedown",N2="mousemove mouseup";function li(){this.evEl=z2,this.evWin=N2,this.pressed=!1,Vt.apply(this,arguments)}_(li,Vt,{handler:function(S){var P=O2[S.type];P&mt&&S.button===0&&(this.pressed=!0),P&ae&&S.which!==1&&(P=it),this.pressed&&(P&it&&(this.pressed=!1),this.callback(this.manager,P,{pointers:[S],changedPointers:[S],pointerType:ee,srcEvent:S}))}});var B2={pointerdown:mt,pointermove:ae,pointerup:it,pointercancel:Ct,pointerout:Ct},F2={2:H,3:At,4:ee,5:ai},pl="pointerdown",gl="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(pl="MSPointerDown",gl="MSPointerMove MSPointerUp MSPointerCancel");function ta(){this.evEl=pl,this.evWin=gl,Vt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}_(ta,Vt,{handler:function(S){var P=this.store,M=!1,I=S.type.toLowerCase().replace("ms",""),z=B2[I],V=F2[S.pointerType]||S.pointerType,pt=V==H,yt=G(P,S.pointerId,"pointerId");z&mt&&(S.button===0||pt)?yt<0&&(P.push(S),yt=P.length-1):z&(it|Ct)&&(M=!0),!(yt<0)&&(P[yt]=S,this.callback(this.manager,z,{pointers:P,changedPointers:[S],pointerType:V,srcEvent:S}),M&&P.splice(yt,1))}});var Y2={touchstart:mt,touchmove:ae,touchend:it,touchcancel:Ct},$2="touchstart",X2="touchstart touchmove touchend touchcancel";function yl(){this.evTarget=$2,this.evWin=X2,this.started=!1,Vt.apply(this,arguments)}_(yl,Vt,{handler:function(S){var P=Y2[S.type];if(P===mt&&(this.started=!0),!!this.started){var M=U2.call(this,S,P);P&(it|Ct)&&M[0].length-M[1].length===0&&(this.started=!1),this.callback(this.manager,P,{pointers:M[0],changedPointers:M[1],pointerType:H,srcEvent:S})}}});function U2(g,S){var P=J(g.touches),M=J(g.changedTouches);return S&(it|Ct)&&(P=st(P.concat(M),"identifier",!0)),[P,M]}var V2={touchstart:mt,touchmove:ae,touchend:it,touchcancel:Ct},G2="touchstart touchmove touchend touchcancel";function fi(){this.evTarget=G2,this.targetIds={},Vt.apply(this,arguments)}_(fi,Vt,{handler:function(S){var P=V2[S.type],M=q2.call(this,S,P);M&&this.callback(this.manager,P,{pointers:M[0],changedPointers:M[1],pointerType:H,srcEvent:S})}});function q2(g,S){var P=J(g.touches),M=this.targetIds;if(S&(mt|ae)&&P.length===1)return M[P[0].identifier]=!0,[P,P];var I,z,V=J(g.changedTouches),pt=[],yt=this.target;if(z=P.filter(function(kt){return B(kt.target,yt)}),S===mt)for(I=0;I<z.length;)M[z[I].identifier]=!0,I++;for(I=0;I<V.length;)M[V[I].identifier]&&pt.push(V[I]),S&(it|Ct)&&delete M[V[I].identifier],I++;if(pt.length)return[st(z.concat(pt),"identifier",!0),pt]}var j2=2500,wl=25;function ea(){Vt.apply(this,arguments);var g=x(this.handler,this);this.touch=new fi(this.manager,g),this.mouse=new li(this.manager,g),this.primaryTouch=null,this.lastTouches=[]}_(ea,Vt,{handler:function(S,P,M){var I=M.pointerType==H,z=M.pointerType==ee;if(!(z&&M.sourceCapabilities&&M.sourceCapabilities.firesTouchEvents)){if(I)H2.call(this,P,M);else if(z&&W2.call(this,M))return;this.callback(S,P,M)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function H2(g,S){g&mt?(this.primaryTouch=S.changedPointers[0].identifier,xl.call(this,S)):g&(it|Ct)&&xl.call(this,S)}function xl(g){var S=g.changedPointers[0];if(S.identifier===this.primaryTouch){var P={x:S.clientX,y:S.clientY};this.lastTouches.push(P);var M=this.lastTouches,I=function(){var z=M.indexOf(P);z>-1&&M.splice(z,1)};setTimeout(I,j2)}}function W2(g){for(var S=g.srcEvent.clientX,P=g.srcEvent.clientY,M=0;M<this.lastTouches.length;M++){var I=this.lastTouches[M],z=Math.abs(S-I.x),V=Math.abs(P-I.y);if(z<=wl&&V<=wl)return!0}return!1}var bl=K(o.style,"touchAction"),vl=bl!==i,_l="compute",Sl="auto",na="manipulation",rn="none",os="pan-x",as="pan-y",di=Z2();function sa(g,S){this.manager=g,this.set(S)}sa.prototype={set:function(g){g==_l&&(g=this.compute()),vl&&this.manager.element.style&&di[g]&&(this.manager.element.style[bl]=g),this.actions=g.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var g=[];return f(this.manager.recognizers,function(S){b(S.options.enable,[S])&&(g=g.concat(S.getTouchAction()))}),J2(g.join(" "))},preventDefaults:function(g){var S=g.srcEvent,P=g.offsetDirection;if(this.manager.session.prevented){S.preventDefault();return}var M=this.actions,I=F(M,rn)&&!di[rn],z=F(M,as)&&!di[as],V=F(M,os)&&!di[os];if(I){var pt=g.pointers.length===1,yt=g.distance<2,kt=g.deltaTime<250;if(pt&&yt&&kt)return}if(!(V&&z)&&(I||z&&P&at||V&&P&sn))return this.preventSrc(S)},preventSrc:function(g){this.manager.session.prevented=!0,g.preventDefault()}};function J2(g){if(F(g,rn))return rn;var S=F(g,os),P=F(g,as);return S&&P?rn:S||P?S?os:as:F(g,na)?na:Sl}function Z2(){if(!vl)return!1;var g={},S=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(P){g[P]=S?t.CSS.supports("touch-action",P):!0}),g}var mi=1,Gt=2,Sn=4,ze=8,xe=ze,hs=16,he=32;function be(g){this.options=y({},this.defaults,g||{}),this.id=Yt(),this.manager=null,this.options.enable=E(this.options.enable,!0),this.state=mi,this.simultaneous={},this.requireFail=[]}be.prototype={defaults:{},set:function(g){return y(this.options,g),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(g){if(m(g,"recognizeWith",this))return this;var S=this.simultaneous;return g=pi(g,this),S[g.id]||(S[g.id]=g,g.recognizeWith(this)),this},dropRecognizeWith:function(g){return m(g,"dropRecognizeWith",this)?this:(g=pi(g,this),delete this.simultaneous[g.id],this)},requireFailure:function(g){if(m(g,"requireFailure",this))return this;var S=this.requireFail;return g=pi(g,this),G(S,g)===-1&&(S.push(g),g.requireFailure(this)),this},dropRequireFailure:function(g){if(m(g,"dropRequireFailure",this))return this;g=pi(g,this);var S=G(this.requireFail,g);return S>-1&&this.requireFail.splice(S,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(g){return!!this.simultaneous[g.id]},emit:function(g){var S=this,P=this.state;function M(I){S.manager.emit(I,g)}P<ze&&M(S.options.event+Cl(P)),M(S.options.event),g.additionalEvent&&M(g.additionalEvent),P>=ze&&M(S.options.event+Cl(P))},tryEmit:function(g){if(this.canEmit())return this.emit(g);this.state=he},canEmit:function(){for(var g=0;g<this.requireFail.length;){if(!(this.requireFail[g].state&(he|mi)))return!1;g++}return!0},recognize:function(g){var S=y({},g);if(!b(this.options.enable,[this,S])){this.reset(),this.state=he;return}this.state&(xe|hs|he)&&(this.state=mi),this.state=this.process(S),this.state&(Gt|Sn|ze|hs)&&this.tryEmit(S)},process:function(g){},getTouchAction:function(){},reset:function(){}};function Cl(g){return g&hs?"cancel":g&ze?"end":g&Sn?"move":g&Gt?"start":""}function Tl(g){return g==k?"down":g==Oe?"up":g==en?"left":g==nn?"right":""}function pi(g,S){var P=S.manager;return P?P.get(g):g}function ne(){be.apply(this,arguments)}_(ne,be,{defaults:{pointers:1},attrTest:function(g){var S=this.options.pointers;return S===0||g.pointers.length===S},process:function(g){var S=this.state,P=g.eventType,M=S&(Gt|Sn),I=this.attrTest(g);return M&&(P&Ct||!I)?S|hs:M||I?P&it?S|ze:S&Gt?S|Sn:Gt:he}});function gi(){ne.apply(this,arguments),this.pX=null,this.pY=null}_(gi,ne,{defaults:{event:"pan",threshold:10,pointers:1,direction:cl},getTouchAction:function(){var g=this.options.direction,S=[];return g&at&&S.push(as),g&sn&&S.push(os),S},directionTest:function(g){var S=this.options,P=!0,M=g.distance,I=g.direction,z=g.deltaX,V=g.deltaY;return I&S.direction||(S.direction&at?(I=z===0?_n:z<0?en:nn,P=z!=this.pX,M=Math.abs(g.deltaX)):(I=V===0?_n:V<0?Oe:k,P=V!=this.pY,M=Math.abs(g.deltaY))),g.direction=I,P&&M>S.threshold&&I&S.direction},attrTest:function(g){return ne.prototype.attrTest.call(this,g)&&(this.state&Gt||!(this.state&Gt)&&this.directionTest(g))},emit:function(g){this.pX=g.deltaX,this.pY=g.deltaY;var S=Tl(g.direction);S&&(g.additionalEvent=this.options.event+S),this._super.emit.call(this,g)}});function ia(){ne.apply(this,arguments)}_(ia,ne,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[rn]},attrTest:function(g){return this._super.attrTest.call(this,g)&&(Math.abs(g.scale-1)>this.options.threshold||this.state&Gt)},emit:function(g){if(g.scale!==1){var S=g.scale<1?"in":"out";g.additionalEvent=this.options.event+S}this._super.emit.call(this,g)}});function ra(){be.apply(this,arguments),this._timer=null,this._input=null}_(ra,be,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Sl]},process:function(g){var S=this.options,P=g.pointers.length===S.pointers,M=g.distance<S.threshold,I=g.deltaTime>S.time;if(this._input=g,!M||!P||g.eventType&(it|Ct)&&!I)this.reset();else if(g.eventType&mt)this.reset(),this._timer=l(function(){this.state=xe,this.tryEmit()},S.time,this);else if(g.eventType&it)return xe;return he},reset:function(){clearTimeout(this._timer)},emit:function(g){this.state===xe&&(g&&g.eventType&it?this.manager.emit(this.options.event+"up",g):(this._input.timeStamp=u(),this.manager.emit(this.options.event,this._input)))}});function oa(){ne.apply(this,arguments)}_(oa,ne,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[rn]},attrTest:function(g){return this._super.attrTest.call(this,g)&&(Math.abs(g.rotation)>this.options.threshold||this.state&Gt)}});function aa(){ne.apply(this,arguments)}_(aa,ne,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:at|sn,pointers:1},getTouchAction:function(){return gi.prototype.getTouchAction.call(this)},attrTest:function(g){var S=this.options.direction,P;return S&(at|sn)?P=g.overallVelocity:S&at?P=g.overallVelocityX:S&sn&&(P=g.overallVelocityY),this._super.attrTest.call(this,g)&&S&g.offsetDirection&&g.distance>this.options.threshold&&g.maxPointers==this.options.pointers&&c(P)>this.options.velocity&&g.eventType&it},emit:function(g){var S=Tl(g.offsetDirection);S&&this.manager.emit(this.options.event+S,g),this.manager.emit(this.options.event,g)}});function yi(){be.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}_(yi,be,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[na]},process:function(g){var S=this.options,P=g.pointers.length===S.pointers,M=g.distance<S.threshold,I=g.deltaTime<S.time;if(this.reset(),g.eventType&mt&&this.count===0)return this.failTimeout();if(M&&I&&P){if(g.eventType!=it)return this.failTimeout();var z=this.pTime?g.timeStamp-this.pTime<S.interval:!0,V=!this.pCenter||ui(this.pCenter,g.center)<S.posThreshold;this.pTime=g.timeStamp,this.pCenter=g.center,!V||!z?this.count=1:this.count+=1,this._input=g;var pt=this.count%S.taps;if(pt===0)return this.hasRequireFailures()?(this._timer=l(function(){this.state=xe,this.tryEmit()},S.interval,this),Gt):xe}return he},failTimeout:function(){return this._timer=l(function(){this.state=he},this.options.interval,this),he},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==xe&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function ve(g,S){return S=S||{},S.recognizers=E(S.recognizers,ve.defaults.preset),new ha(g,S)}ve.VERSION="2.0.7",ve.defaults={domEvents:!1,touchAction:_l,enable:!0,inputTarget:null,inputClass:null,preset:[[oa,{enable:!1}],[ia,{enable:!1},["rotate"]],[aa,{direction:at}],[gi,{direction:at},["swipe"]],[yi],[yi,{event:"doubletap",taps:2},["tap"]],[ra]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Q2=1,El=2;function ha(g,S){this.options=y({},ve.defaults,S||{}),this.options.inputTarget=this.options.inputTarget||g,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=g,this.input=M2(this),this.touchAction=new sa(this,this.options.touchAction),Pl(this,!0),f(this.options.recognizers,function(P){var M=this.add(new P[0](P[1]));P[2]&&M.recognizeWith(P[2]),P[3]&&M.requireFailure(P[3])},this)}ha.prototype={set:function(g){return y(this.options,g),g.touchAction&&this.touchAction.update(),g.inputTarget&&(this.input.destroy(),this.input.target=g.inputTarget,this.input.init()),this},stop:function(g){this.session.stopped=g?El:Q2},recognize:function(g){var S=this.session;if(!S.stopped){this.touchAction.preventDefaults(g);var P,M=this.recognizers,I=S.curRecognizer;(!I||I&&I.state&xe)&&(I=S.curRecognizer=null);for(var z=0;z<M.length;)P=M[z],S.stopped!==El&&(!I||P==I||P.canRecognizeWith(I))?P.recognize(g):P.reset(),!I&&P.state&(Gt|Sn|ze)&&(I=S.curRecognizer=P),z++}},get:function(g){if(g instanceof be)return g;for(var S=this.recognizers,P=0;P<S.length;P++)if(S[P].options.event==g)return S[P];return null},add:function(g){if(m(g,"add",this))return this;var S=this.get(g.options.event);return S&&this.remove(S),this.recognizers.push(g),g.manager=this,this.touchAction.update(),g},remove:function(g){if(m(g,"remove",this))return this;if(g=this.get(g),g){var S=this.recognizers,P=G(S,g);P!==-1&&(S.splice(P,1),this.touchAction.update())}return this},on:function(g,S){if(g!==i&&S!==i){var P=this.handlers;return f(U(g),function(M){P[M]=P[M]||[],P[M].push(S)}),this}},off:function(g,S){if(g!==i){var P=this.handlers;return f(U(g),function(M){S?P[M]&&P[M].splice(G(P[M],S),1):delete P[M]}),this}},emit:function(g,S){this.options.domEvents&&K2(g,S);var P=this.handlers[g]&&this.handlers[g].slice();if(!(!P||!P.length)){S.type=g,S.preventDefault=function(){S.srcEvent.preventDefault()};for(var M=0;M<P.length;)P[M](S),M++}},destroy:function(){this.element&&Pl(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function Pl(g,S){var P=g.element;if(P.style){var M;f(g.options.cssProps,function(I,z){M=K(P.style,z),S?(g.oldCssProps[M]=P.style[M],P.style[M]=I):P.style[M]=g.oldCssProps[M]||""}),S||(g.oldCssProps={})}}function K2(g,S){var P=e.createEvent("Event");P.initEvent(g,!0,!0),P.gesture=S,S.target.dispatchEvent(P)}y(ve,{INPUT_START:mt,INPUT_MOVE:ae,INPUT_END:it,INPUT_CANCEL:Ct,STATE_POSSIBLE:mi,STATE_BEGAN:Gt,STATE_CHANGED:Sn,STATE_ENDED:ze,STATE_RECOGNIZED:xe,STATE_CANCELLED:hs,STATE_FAILED:he,DIRECTION_NONE:_n,DIRECTION_LEFT:en,DIRECTION_RIGHT:nn,DIRECTION_UP:Oe,DIRECTION_DOWN:k,DIRECTION_HORIZONTAL:at,DIRECTION_VERTICAL:sn,DIRECTION_ALL:cl,Manager:ha,Input:Vt,TouchAction:sa,TouchInput:fi,MouseInput:li,PointerEventInput:ta,TouchMouseInput:ea,SingleTouchInput:yl,Recognizer:be,AttrRecognizer:ne,Tap:yi,Pan:gi,Swipe:aa,Pinch:ia,Rotate:oa,Press:ra,on:C,off:L,each:f,merge:w,extend:v,assign:y,inherit:_,bindFn:x,prefixed:K});var tx=typeof t<"u"?t:typeof self<"u"?self:{};tx.Hammer=ve,typeof i=="function"&&i.amd?i(function(){return ve}):s.exports?s.exports=ve:t[n]=ve})(window,document,"Hammer")})(Sh);var xm=Sh.exports;const tt=Na(xm);var rr=function(s,t){return rr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])},rr(s,t)};function fe(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");rr(s,t);function e(){this.constructor=s}s.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function bm(s,t,e,n){function i(r){return r instanceof e?r:new e(function(o){o(r)})}return new(e||(e=Promise))(function(r,o){function a(u){try{c(n.next(u))}catch(l){o(l)}}function h(u){try{c(n.throw(u))}catch(l){o(l)}}function c(u){u.done?r(u.value):i(u.value).then(a,h)}c((n=n.apply(s,t||[])).next())})}function Ch(s,t){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(u){return h([c,u])}}function h(c){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(e=0)),e;)try{if(n=1,i&&(r=c[0]&2?i.return:c[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,c[1])).done)return r;switch(i=0,r&&(c=[c[0]&2,r.value]),c[0]){case 0:case 1:r=c;break;case 4:return e.label++,{value:c[1],done:!1};case 5:e.label++,i=c[1],c=[0];continue;case 7:c=e.ops.pop(),e.trys.pop();continue;default:if(r=e.trys,!(r=r.length>0&&r[r.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]<r[3])){e.label=c[1];break}if(c[0]===6&&e.label<r[1]){e.label=r[1],r=c;break}if(r&&e.label<r[2]){e.label=r[2],e.ops.push(c);break}r[2]&&e.ops.pop(),e.trys.pop();continue}c=t.call(s,e)}catch(u){c=[6,u],i=0}finally{n=r=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Ye(s){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&s[t],n=0;if(e)return e.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&n>=s.length&&(s=void 0),{value:s&&s[n++],done:!s}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Se(s,t){var e=typeof Symbol=="function"&&s[Symbol.iterator];if(!e)return s;var n=e.call(s),i,r=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)r.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(o)throw o.error}}return r}function $e(s,t,e){if(e||arguments.length===2)for(var n=0,i=t.length,r;n<i;n++)(r||!(n in t))&&(r||(r=Array.prototype.slice.call(t,0,n)),r[n]=t[n]);return s.concat(r||Array.prototype.slice.call(t))}function fn(s){return this instanceof fn?(this.v=s,this):new fn(s)}function vm(s,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=e.apply(s,t||[]),i,r=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(f){return function(p){return Promise.resolve(p).then(f,l)}}function a(f,p){n[f]&&(i[f]=function(y){return new Promise(function(v,w){r.push([f,y,v,w])>1||h(f,y)})},p&&(i[f]=p(i[f])))}function h(f,p){try{c(n[f](p))}catch(y){m(r[0][3],y)}}function c(f){f.value instanceof fn?Promise.resolve(f.value.v).then(u,l):m(r[0][2],f)}function u(f){h("next",f)}function l(f){h("throw",f)}function m(f,p){f(p),r.shift(),r.length&&h(r[0][0],r[0][1])}}function _m(s){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=s[Symbol.asyncIterator],e;return t?t.call(s):(s=typeof Ye=="function"?Ye(s):s[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=s[r]&&function(o){return new Promise(function(a,h){o=s[r](o),i(a,h,o.done,o.value)})}}function i(r,o,a,h){Promise.resolve(h).then(function(c){r({value:c,done:a})},o)}}typeof SuppressedError=="function"&&SuppressedError;function j(s){return typeof s=="function"}function or(s){var t=function(n){Error.call(n),n.stack=new Error().stack},e=s(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var ar=or(function(s){return function(e){s(this),this.message=e?e.length+` errors occurred during unsubscription:
|
|
24
24
|
`+e.map(function(n,i){return i+1+") "+n.toString()}).join(`
|
|
25
|
-
`):"",this.name="UnsubscriptionError",this.errors=e}});function On(s,t){if(s){var e=s.indexOf(t);0<=e&&s.splice(e,1)}}var dn=function(){function s(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return s.prototype.unsubscribe=function(){var t,e,n,i,r;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=Ye(o),h=a.next();!h.done;h=a.next()){var c=h.value;c.remove(this)}}catch(y){t={error:y}}finally{try{h&&!h.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var u=this.initialTeardown;if(j(u))try{u()}catch(y){r=y instanceof ar?y.errors:[y]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var m=Ye(l),f=m.next();!f.done;f=m.next()){var p=f.value;try{Ph(p)}catch(y){r=r??[],y instanceof ar?r=$e($e([],Se(r)),Se(y.errors)):r.push(y)}}}catch(y){n={error:y}}finally{try{f&&!f.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}}if(r)throw new ar(r)}},s.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Ph(t);else{if(t instanceof s){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},s.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},s.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},s.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&On(e,t)},s.prototype.remove=function(t){var e=this._finalizers;e&&On(e,t),t instanceof s&&t._removeParent(this)},s.EMPTY=function(){var t=new s;return t.closed=!0,t}(),s}(),Th=dn.EMPTY;function Eh(s){return s instanceof dn||s&&"closed"in s&&j(s.remove)&&j(s.add)&&j(s.unsubscribe)}function Ph(s){j(s)?s():s.unsubscribe()}var Mh={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},hr={setTimeout:function(s,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];var i=hr.delegate;return i?.setTimeout?i.setTimeout.apply(i,$e([s,t],Se(e))):setTimeout.apply(void 0,$e([s,t],Se(e)))},clearTimeout:function(s){var t=hr.delegate;return(t?.clearTimeout||clearTimeout)(s)},delegate:void 0};function Ah(s){hr.setTimeout(function(){throw s})}function zn(){}function Ds(s){s()}var cr=function(s){fe(t,s);function t(e){var n=s.call(this)||this;return n.isStopped=!1,e?(n.destination=e,Eh(e)&&e.add(n)):n.destination=Em,n}return t.create=function(e,n,i){return new Ls(e,n,i)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,s.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(dn),Sm=Function.prototype.bind;function ur(s,t){return Sm.call(s,t)}var Cm=function(){function s(t){this.partialObserver=t}return s.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(n){Rs(n)}},s.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(n){Rs(n)}else Rs(t)},s.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){Rs(e)}},s}(),Ls=function(s){fe(t,s);function t(e,n,i){var r=s.call(this)||this,o;if(j(e)||!e)o={next:e??void 0,error:n??void 0,complete:i??void 0};else{var a;r&&Mh.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return r.unsubscribe()},o={next:e.next&&ur(e.next,a),error:e.error&&ur(e.error,a),complete:e.complete&&ur(e.complete,a)}):o=e}return r.destination=new Cm(o),r}return t}(cr);function Rs(s){Ah(s)}function Tm(s){throw s}var Em={closed:!0,next:zn,error:Tm,complete:zn},lr=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Xe(s){return s}function Pm(s){return s.length===0?Xe:s.length===1?s[0]:function(e){return s.reduce(function(n,i){return i(n)},e)}}var et=function(){function s(t){t&&(this._subscribe=t)}return s.prototype.lift=function(t){var e=new s;return e.source=this,e.operator=t,e},s.prototype.subscribe=function(t,e,n){var i=this,r=Am(t)?t:new Ls(t,e,n);return Ds(function(){var o=i,a=o.operator,h=o.source;r.add(a?a.call(r,h):h?i._subscribe(r):i._trySubscribe(r))}),r},s.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},s.prototype.forEach=function(t,e){var n=this;return e=kh(e),new e(function(i,r){var o=new Ls({next:function(a){try{t(a)}catch(h){r(h),o.unsubscribe()}},error:r,complete:i});n.subscribe(o)})},s.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},s.prototype[lr]=function(){return this},s.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Pm(t)(this)},s.prototype.toPromise=function(t){var e=this;return t=kh(t),new t(function(n,i){var r;e.subscribe(function(o){return r=o},function(o){return i(o)},function(){return n(r)})})},s.create=function(t){return new s(t)},s}();function kh(s){var t;return(t=s??Mh.Promise)!==null&&t!==void 0?t:Promise}function Mm(s){return s&&j(s.next)&&j(s.error)&&j(s.complete)}function Am(s){return s&&s instanceof cr||Mm(s)&&Eh(s)}function km(s){return j(s?.lift)}function Ot(s){return function(t){if(km(t))return t.lift(function(e){try{return s(e,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function lt(s,t,e,n,i){return new Im(s,t,e,n,i)}var Im=function(s){fe(t,s);function t(e,n,i,r,o,a){var h=s.call(this,e)||this;return h.onFinalize=o,h.shouldUnsubscribe=a,h._next=n?function(c){try{n(c)}catch(u){e.error(u)}}:s.prototype._next,h._error=r?function(c){try{r(c)}catch(u){e.error(u)}finally{this.unsubscribe()}}:s.prototype._error,h._complete=i?function(){try{i()}catch(c){e.error(c)}finally{this.unsubscribe()}}:s.prototype._complete,h}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;s.prototype.unsubscribe.call(this),!n&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t}(cr),Dm=or(function(s){return function(){s(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),mn=function(s){fe(t,s);function t(){var e=s.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var n=new Ih(this,this);return n.operator=e,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new Dm},t.prototype.next=function(e){var n=this;Ds(function(){var i,r;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var o=Ye(n.currentObservers),a=o.next();!a.done;a=o.next()){var h=a.value;h.next(e)}}catch(c){i={error:c}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}}})},t.prototype.error=function(e){var n=this;Ds(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=e;for(var i=n.observers;i.length;)i.shift().error(e)}})},t.prototype.complete=function(){var e=this;Ds(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var n=e.observers;n.length;)n.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),s.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var n=this,i=this,r=i.hasError,o=i.isStopped,a=i.observers;return r||o?Th:(this.currentObservers=null,a.push(e),new dn(function(){n.currentObservers=null,On(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var n=this,i=n.hasError,r=n.thrownError,o=n.isStopped;i?e.error(r):o&&e.complete()},t.prototype.asObservable=function(){var e=new et;return e.source=this,e},t.create=function(e,n){return new Ih(e,n)},t}(et),Ih=function(s){fe(t,s);function t(e,n){var i=s.call(this)||this;return i.destination=e,i.source=n,i}return t.prototype.next=function(e){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,e)},t.prototype.error=function(e){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,e)},t.prototype.complete=function(){var e,n;(n=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||n===void 0||n.call(e)},t.prototype._subscribe=function(e){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(e))!==null&&i!==void 0?i:Th},t}(mn),Lm=function(s){fe(t,s);function t(e){var n=s.call(this)||this;return n._value=e,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(e){var n=s.prototype._subscribe.call(this,e);return!n.closed&&e.next(this._value),n},t.prototype.getValue=function(){var e=this,n=e.hasError,i=e.thrownError,r=e._value;if(n)throw i;return this._throwIfClosed(),r},t.prototype.next=function(e){s.prototype.next.call(this,this._value=e)},t}(mn),Dh={now:function(){return(Dh.delegate||Date).now()},delegate:void 0},Rm=function(s){fe(t,s);function t(e,n){return s.call(this)||this}return t.prototype.schedule=function(e,n){return this},t}(dn),Os={setInterval:function(s,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];var i=Os.delegate;return i?.setInterval?i.setInterval.apply(i,$e([s,t],Se(e))):setInterval.apply(void 0,$e([s,t],Se(e)))},clearInterval:function(s){var t=Os.delegate;return(t?.clearInterval||clearInterval)(s)},delegate:void 0},Om=function(s){fe(t,s);function t(e,n){var i=s.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.pending=!1,i}return t.prototype.schedule=function(e,n){var i;if(n===void 0&&(n=0),this.closed)return this;this.state=e;var r=this.id,o=this.scheduler;return r!=null&&(this.id=this.recycleAsyncId(o,r,n)),this.pending=!0,this.delay=n,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(o,this.id,n),this},t.prototype.requestAsyncId=function(e,n,i){return i===void 0&&(i=0),Os.setInterval(e.flush.bind(e,this),i)},t.prototype.recycleAsyncId=function(e,n,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return n;n!=null&&Os.clearInterval(n)},t.prototype.execute=function(e,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(e,n);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,n){var i=!1,r;try{this.work(e)}catch(o){i=!0,r=o||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var e=this,n=e.id,i=e.scheduler,r=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,On(r,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,s.prototype.unsubscribe.call(this)}},t}(Rm),Lh=function(){function s(t,e){e===void 0&&(e=s.now),this.schedulerActionCtor=t,this.now=e}return s.prototype.schedule=function(t,e,n){return e===void 0&&(e=0),new this.schedulerActionCtor(this,t).schedule(n,e)},s.now=Dh.now,s}(),zm=function(s){fe(t,s);function t(e,n){n===void 0&&(n=Lh.now);var i=s.call(this,e,n)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(e){var n=this.actions;if(this._active){n.push(e);return}var i;this._active=!0;do if(i=e.execute(e.state,e.delay))break;while(e=n.shift());if(this._active=!1,i){for(;e=n.shift();)e.unsubscribe();throw i}},t}(Lh),fr=new zm(Om),Nm=fr,Rh=new et(function(s){return s.complete()});function Oh(s){return s&&j(s.schedule)}function dr(s){return s[s.length-1]}function Bm(s){return j(dr(s))?s.pop():void 0}function Nn(s){return Oh(dr(s))?s.pop():void 0}function Fm(s,t){return typeof dr(s)=="number"?s.pop():t}var mr=function(s){return s&&typeof s.length=="number"&&typeof s!="function"};function zh(s){return j(s?.then)}function Nh(s){return j(s[lr])}function Bh(s){return Symbol.asyncIterator&&j(s?.[Symbol.asyncIterator])}function Fh(s){return new TypeError("You provided "+(s!==null&&typeof s=="object"?"an invalid object":"'"+s+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Ym(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Yh=Ym();function $h(s){return j(s?.[Yh])}function Xh(s){return vm(this,arguments,function(){var e,n,i,r;return Ch(this,function(o){switch(o.label){case 0:e=s.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,fn(e.read())];case 3:return n=o.sent(),i=n.value,r=n.done,r?[4,fn(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,fn(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function Uh(s){return j(s?.getReader)}function vt(s){if(s instanceof et)return s;if(s!=null){if(Nh(s))return $m(s);if(mr(s))return Xm(s);if(zh(s))return Um(s);if(Bh(s))return Vh(s);if($h(s))return Vm(s);if(Uh(s))return Gm(s)}throw Fh(s)}function $m(s){return new et(function(t){var e=s[lr]();if(j(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Xm(s){return new et(function(t){for(var e=0;e<s.length&&!t.closed;e++)t.next(s[e]);t.complete()})}function Um(s){return new et(function(t){s.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,Ah)})}function Vm(s){return new et(function(t){var e,n;try{for(var i=Ye(s),r=i.next();!r.done;r=i.next()){var o=r.value;if(t.next(o),t.closed)return}}catch(a){e={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}t.complete()})}function Vh(s){return new et(function(t){qm(s,t).catch(function(e){return t.error(e)})})}function Gm(s){return Vh(Xh(s))}function qm(s,t){var e,n,i,r;return bm(this,void 0,void 0,function(){var o,a;return Ch(this,function(h){switch(h.label){case 0:h.trys.push([0,5,6,11]),e=_m(s),h.label=1;case 1:return[4,e.next()];case 2:if(n=h.sent(),!!n.done)return[3,4];if(o=n.value,t.next(o),t.closed)return[2];h.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=h.sent(),i={error:a},[3,11];case 6:return h.trys.push([6,,9,10]),n&&!n.done&&(r=e.return)?[4,r.call(e)]:[3,8];case 7:h.sent(),h.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function de(s,t,e,n,i){n===void 0&&(n=0),i===void 0&&(i=!1);var r=t.schedule(function(){e(),i?s.add(this.schedule(null,n)):this.unsubscribe()},n);if(s.add(r),!i)return r}function Gh(s,t){return t===void 0&&(t=0),Ot(function(e,n){e.subscribe(lt(n,function(i){return de(n,s,function(){return n.next(i)},t)},function(){return de(n,s,function(){return n.complete()},t)},function(i){return de(n,s,function(){return n.error(i)},t)}))})}function pr(s,t){return t===void 0&&(t=0),Ot(function(e,n){n.add(s.schedule(function(){return e.subscribe(n)},t))})}function jm(s,t){return vt(s).pipe(pr(t),Gh(t))}function Hm(s,t){return vt(s).pipe(pr(t),Gh(t))}function Wm(s,t){return new et(function(e){var n=0;return t.schedule(function(){n===s.length?e.complete():(e.next(s[n++]),e.closed||this.schedule())})})}function Jm(s,t){return new et(function(e){var n;return de(e,t,function(){n=s[Yh](),de(e,t,function(){var i,r,o;try{i=n.next(),r=i.value,o=i.done}catch(a){e.error(a);return}o?e.complete():e.next(r)},0,!0)}),function(){return j(n?.return)&&n.return()}})}function qh(s,t){if(!s)throw new Error("Iterable cannot be null");return new et(function(e){de(e,t,function(){var n=s[Symbol.asyncIterator]();de(e,t,function(){n.next().then(function(i){i.done?e.complete():e.next(i.value)})},0,!0)})})}function Zm(s,t){return qh(Xh(s),t)}function Qm(s,t){if(s!=null){if(Nh(s))return jm(s,t);if(mr(s))return Wm(s,t);if(zh(s))return Hm(s,t);if(Bh(s))return qh(s,t);if($h(s))return Jm(s,t);if(Uh(s))return Zm(s,t)}throw Fh(s)}function Bn(s,t){return t?Qm(s,t):vt(s)}function Km(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];var e=Nn(s);return Bn(s,e)}var tp=or(function(s){return function(){s(this),this.name="EmptyError",this.message="no elements in sequence"}});function ep(s,t){var e=typeof t=="object";return new Promise(function(n,i){var r=new Ls({next:function(o){n(o),r.unsubscribe()},error:i,complete:function(){e?n(t.defaultValue):i(new tp)}});s.subscribe(r)})}function np(s){return s instanceof Date&&!isNaN(s)}function rt(s,t){return Ot(function(e,n){var i=0;e.subscribe(lt(n,function(r){n.next(s.call(t,r,i++))}))})}var sp=Array.isArray;function ip(s,t){return sp(t)?s.apply(void 0,$e([],Se(t))):s(t)}function gr(s){return rt(function(t){return ip(s,t)})}var rp=Array.isArray,op=Object.getPrototypeOf,hp=Object.prototype,cp=Object.keys;function up(s){if(s.length===1){var t=s[0];if(rp(t))return{args:t,keys:null};if(lp(t)){var e=cp(t);return{args:e.map(function(n){return t[n]}),keys:e}}}return{args:s,keys:null}}function lp(s){return s&&typeof s=="object"&&op(s)===hp}function fp(s,t){return s.reduce(function(e,n,i){return e[n]=t[i],e},{})}function dp(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];var e=Nn(s),n=Bm(s),i=up(s),r=i.args,o=i.keys;if(r.length===0)return Bn([],e);var a=new et(mp(r,e,o?function(h){return fp(o,h)}:Xe));return n?a.pipe(gr(n)):a}function mp(s,t,e){return e===void 0&&(e=Xe),function(n){jh(t,function(){for(var i=s.length,r=new Array(i),o=i,a=i,h=function(u){jh(t,function(){var l=Bn(s[u],t),m=!1;l.subscribe(lt(n,function(f){r[u]=f,m||(m=!0,a--),a||n.next(e(r.slice()))},function(){--o||n.complete()}))},n)},c=0;c<i;c++)h(c)},n)}}function jh(s,t,e){s?de(e,s,t):t()}function pp(s,t,e,n,i,r,o,a){var h=[],c=0,u=0,l=!1,m=function(){l&&!h.length&&!c&&t.complete()},f=function(y){return c<n?p(y):h.push(y)},p=function(y){r&&t.next(y),c++;var v=!1;vt(e(y,u++)).subscribe(lt(t,function(w){i?.(w),r?f(w):t.next(w)},function(){v=!0},void 0,function(){if(v)try{c--;for(var w=function(){var _=h.shift();o?de(t,o,function(){return p(_)}):p(_)};h.length&&c<n;)w();m()}catch(_){t.error(_)}}))};return s.subscribe(lt(t,f,function(){l=!0,m()})),function(){a?.()}}function yr(s,t,e){return e===void 0&&(e=1/0),j(t)?yr(function(n,i){return rt(function(r,o){return t(n,r,i,o)})(vt(s(n,i)))},e):(typeof t=="number"&&(e=t),Ot(function(n,i){return pp(n,i,s,e)}))}function Hh(s){return s===void 0&&(s=1/0),yr(Xe,s)}function gp(){return Hh(1)}function Wh(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];return gp()(Bn(s,Nn(s)))}var yp=["addListener","removeListener"],wp=["addEventListener","removeEventListener"],xp=["on","off"];function wr(s,t,e,n){if(j(e)&&(n=e,e=void 0),n)return wr(s,t,e).pipe(gr(n));var i=Se(_p(s)?wp.map(function(a){return function(h){return s[a](t,h,e)}}):bp(s)?yp.map(Jh(s,t)):vp(s)?xp.map(Jh(s,t)):[],2),r=i[0],o=i[1];if(!r&&mr(s))return yr(function(a){return wr(a,t,e)})(vt(s));if(!r)throw new TypeError("Invalid event target");return new et(function(a){var h=function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return a.next(1<c.length?c:c[0])};return r(h),function(){return o(h)}})}function Jh(s,t){return function(e){return function(n){return s[e](t,n)}}}function bp(s){return j(s.addListener)&&j(s.removeListener)}function vp(s){return j(s.on)&&j(s.off)}function _p(s){return j(s.addEventListener)&&j(s.removeEventListener)}function nt(s,t,e){return e?nt(s,t).pipe(gr(e)):new et(function(n){var i=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return n.next(o.length===1?o[0]:o)},r=s(i);return j(t)?function(){return t(i,r)}:void 0})}function Sp(s,t,e){s===void 0&&(s=0),e===void 0&&(e=Nm);var n=-1;return t!=null&&(Oh(t)?e=t:n=t),new et(function(i){var r=np(s)?+s-e.now():s;r<0&&(r=0);var o=0;return e.schedule(function(){i.closed||(i.next(o++),0<=n?this.schedule(void 0,n):i.complete())},r)})}function Cp(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];var e=Nn(s),n=Fm(s,1/0),i=s;return i.length?i.length===1?vt(i[0]):Hh(n)(Bn(i,e)):Rh}var Tp=Array.isArray;function Ep(s){return s.length===1&&Tp(s[0])?s[0]:s}function Zh(s,t){return Ot(function(e,n){var i=0;e.subscribe(lt(n,function(r){return s.call(t,r,i++)&&n.next(r)}))})}function xr(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];return s=Ep(s),s.length===1?vt(s[0]):new et(Pp(s))}function Pp(s){return function(t){for(var e=[],n=function(r){e.push(vt(s[r]).subscribe(lt(t,function(o){if(e){for(var a=0;a<e.length;a++)a!==r&&e[a].unsubscribe();e=null}t.next(o)})))},i=0;e&&!t.closed&&i<s.length;i++)n(i)}}function Ce(s,t){return t===void 0&&(t=Xe),s=s??Mp,Ot(function(e,n){var i,r=!0;e.subscribe(lt(n,function(o){var a=t(o);(r||!s(i,a))&&(r=!1,i=a,n.next(o))}))})}function Mp(s,t){return s===t}function Qh(s,t){return t?function(e){return e.pipe(Qh(function(n,i){return vt(s(n,i)).pipe(rt(function(r,o){return t(n,r,i,o)}))}))}:Ot(function(e,n){var i=0,r=null,o=!1;e.subscribe(lt(n,function(a){r||(r=lt(n,void 0,function(){r=null,o&&n.complete()}),vt(s(a,i++)).subscribe(r))},function(){o=!0,!r&&n.complete()}))})}function Te(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];var e=Nn(s);return Ot(function(n,i){(e?Wh(s,n,e):Wh(s,n)).subscribe(i)})}function zs(s,t){return Ot(function(e,n){var i=null,r=0,o=!1,a=function(){return o&&!i&&n.complete()};e.subscribe(lt(n,function(h){i?.unsubscribe();var c=0,u=r++;vt(s(h,u)).subscribe(i=lt(n,function(l){return n.next(t?t(h,l,u,c++):l)},function(){i=null,a()}))},function(){o=!0,a()}))})}function Ap(){return zs(Xe)}function br(s){return Ot(function(t,e){vt(s).subscribe(lt(e,function(){return e.complete()},zn)),!e.closed&&t.subscribe(e)})}function Ue(s,t,e){var n=j(s)||t||e?{next:s,error:t,complete:e}:s;return n?Ot(function(i,r){var o;(o=n.subscribe)===null||o===void 0||o.call(n);var a=!0;i.subscribe(lt(r,function(h){var c;(c=n.next)===null||c===void 0||c.call(n,h),r.next(h)},function(){var h;a=!1,(h=n.complete)===null||h===void 0||h.call(n),r.complete()},function(h){var c;a=!1,(c=n.error)===null||c===void 0||c.call(n,h),r.error(h)},function(){var h,c;a&&((h=n.unsubscribe)===null||h===void 0||h.call(n)),(c=n.finalize)===null||c===void 0||c.call(n)}))}):Xe}function kp(s,t){return Ot(function(e,n){var i=t??{},r=i.leading,o=r===void 0?!0:r,a=i.trailing,h=a===void 0?!1:a,c=!1,u=null,l=null,m=!1,f=function(){l?.unsubscribe(),l=null,h&&(v(),m&&n.complete())},p=function(){l=null,m&&n.complete()},y=function(w){return l=vt(s(w)).subscribe(lt(n,f,p))},v=function(){if(c){c=!1;var w=u;u=null,n.next(w),!m&&y(w)}};e.subscribe(lt(n,function(w){c=!0,u=w,!(l&&!l.closed)&&(o?v():y(w))},function(){m=!0,!(h&&c&&l&&!l.closed)&&n.complete()}))})}function Ip(s,t,e){t===void 0&&(t=fr);var n=Sp(s,t);return kp(function(){return n},e)}function Dp(s,t){return Ot(function(e,n){var i=[],r=function(o){for(;0<i.length;)i.shift().error(o);n.error(o)};vt(s).subscribe(lt(n,function(o){var a=new mn;i.push(a);var h=new dn,c=function(){On(i,a),a.complete(),h.unsubscribe()},u;try{u=vt(t(o))}catch(l){r(l);return}n.next(a.asObservable()),h.add(u.subscribe(lt(n,c,zn,r)))},zn)),e.subscribe(lt(n,function(o){var a,h,c=i.slice();try{for(var u=Ye(c),l=u.next();!l.done;l=u.next()){var m=l.value;m.next(o)}}catch(f){a={error:f}}finally{try{l&&!l.done&&(h=u.return)&&h.call(u)}finally{if(a)throw a.error}}},function(){for(;0<i.length;)i.shift().complete();n.complete()},r,function(){for(;0<i.length;)i.shift().unsubscribe()}))})}function W(s,t,e,n=!1){const i=async r=>{await e(r)};try{s.addEventListener(t,i,n)}catch{s.attachEvent("on"+t,i)}return()=>{try{s.removeEventListener(t,i,n)}catch{s.detachEvent("on"+t,i)}}}function X(s,t,e=!1){return wr(s,t,{capture:e})}function Ee(s){if(s.preventDefault){s.preventDefault();return}try{s.returnValue=!1}catch{}}function Kh(s){if(s.stopPropagation){s.stopPropagation();return}try{s.cancelBubble=!0}catch{}}const Lp=["click","dblclick","wheel","contextmenu","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave"],Rp=["keydown","keyup","keypress"],Op=["touchstart","touchend","touchcancel","touchmove"],zp=["pointerdown","pointerup","pointercancel","pointermove"],Np=["dragstart","drag","dragend","dragenter","dragover","dragleave","drop"],Bp=["change"];function Fp(s,t,e={bubbles:!0,detail:{}}){if(!s)return;let n;try{Lp.includes(t)?n=new MouseEvent(t,e):Rp.includes(t)?n=new KeyboardEvent(t,e):Op.includes(t)?n=new TouchEvent(t,e):zp.includes(t)?n=new PointerEvent(t,e):Np.includes(t)?n=new DragEvent(t,e):Bp.includes(t)?n=new Event(t,e):n=new CustomEvent(t,e)}catch{document.createEvent?n=document.createEvent("HTMLEvents").initEvent(t,!0,!0):document.createEventObject&&(n=document.createEventObject())}if(s.dispatchEvent)s.dispatchEvent(n);else if(s.fireEvent&&document.createEventObject)s.fireEvent("on"+t,n);else throw new Error(`Can't fire event : ${t}`)}function Yp(s,t){const e=s.changedTouches[0];return new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,detail:1,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null})}function $p(s,t){let e=document.createElement(s);t="on"+t;let n=t in e;return n||(e.setAttribute(t,"return;"),n=typeof e[t]=="function"),e=null,n}(function(){if(!window.requestAnimationFrame){let s=ut();window.requestAnimationFrame=function(t){const e=ut(),n=Math.max(0,16-(e-s)),i=window.setTimeout(function(){t(e+n)},n);return s=e+n,i}}window.cancelAnimationFrame||(window.cancelAnimationFrame=function(s){clearTimeout(s)})})();function vr(s){let t=!1;return window.requestAnimationFrame(function e(n){!t&&s(n)&&window.requestAnimationFrame(e)}),()=>{t=!0}}function _r(s,t=0){if(t==0)return s(ut()),()=>{};{const e=ut();return vr(n=>n-e>=t?(s(n),!1):!0)}}function Xp(s,t=0){let e=!1,n=0;const i=ut(),r=o=>{if(e)return;n++;const a=o-i-n*t;s(o,n,t<=a),_r(r,Math.max(0,t-a))};return _r(r,t),()=>{e=!0}}function Up(s,t=20){const e=1e3/t;let n=0,i;return()=>(ut()-n>=e&&(n=ut(),i=s()),i)}window.requestIdleCallback=window.requestIdleCallback||function(s,t){const e=ut();return setTimeout(()=>{const n=ut()-e;s({didTimeout:!0,timeRemaining:()=>Math.max(0,50-n)})},t?.timeout)},window.cancelIdleCallback=window.cancelIdleCallback||function(s){clearTimeout(s)};function tc(s,t){window.requestIdleCallback(e=>{e.timeRemaining()>0||e.didTimeout?s():tc(s,t)},{timeout:t?.timeout})}let Ns=0,Sr=0,Ve=33,Pe=33,Cr,Tr=-1;const ec=new MessageChannel,Vp=ec.port2;ec.port1.onmessage=s=>{Cr&&Cr({didTimeout:Tr==-1?!1:ut()-Ns>Tr,timeRemaining:()=>Math.max(0,Sr-ut())})};function Gp(s,t){return Cr=s,Tr=typeof t?.timeout=="number"?t?.timeout:-1,requestAnimationFrame(e=>{Ns=e;let n=Pe+Ns-Sr;n<Pe&&Ve<Pe?(n<8&&(n=8),Pe=n<Ve?Ve:n):n>Pe&&Ve>Pe?Pe=n<Ve?Ve:n:Ve=n,Sr=Ns+Pe,Vp.postMessage(null)})}const nc=new Bf({concurrency:1,timeRemaining:0});let Er=!1;function sc(s,t){const e=zf({fn:s,name:t?.name,deadline:typeof t?.timeout=="number"?se()+t.timeout:void 0});nc.addTask(e),!Er&&(Er=!0,Gp(n=>{Er=!1,nc.idleCallback(n)}))}class Fn{static _nextId=0;static nextId(){return Fn._nextId++}}const O={Linear:{None:function(s){return s}},Ease:{In:function(s){return Math.pow(s,1.7)}},Quadratic:{In:function(s){return s*s},Out:function(s){return s*(2-s)},InOut:function(s){return(s*=2)<1?.5*s*s:-.5*(--s*(s-2)-1)}},Cubic:{In:function(s){return s*s*s},Out:function(s){return--s*s*s+1},InOut:function(s){return(s*=2)<1?.5*s*s*s:.5*((s-=2)*s*s+2)}},Quartic:{In:function(s){return s*s*s*s},Out:function(s){return 1- --s*s*s*s},InOut:function(s){return(s*=2)<1?.5*s*s*s*s:-.5*((s-=2)*s*s*s-2)}},Quintic:{In:function(s){return s*s*s*s*s},Out:function(s){return--s*s*s*s*s+1},InOut:function(s){return(s*=2)<1?.5*s*s*s*s*s:.5*((s-=2)*s*s*s*s+2)}},Sinusoidal:{In:function(s){return 1-Math.sin((1-s)*Math.PI/2)},Out:function(s){return Math.sin(s*Math.PI/2)},InOut:function(s){return .5*(1-Math.sin(Math.PI*(.5-s)))}},Exponential:{In:function(s){return s===0?0:Math.pow(1024,s-1)},Out:function(s){return s===1?1:1-Math.pow(2,-10*s)},InOut:function(s){return s===0?0:s===1?1:(s*=2)<1?.5*Math.pow(1024,s-1):.5*(-Math.pow(2,-10*(s-1))+2)}},Circular:{In:function(s){return 1-Math.sqrt(1-s*s)},Out:function(s){return Math.sqrt(1- --s*s)},InOut:function(s){return(s*=2)<1?-.5*(Math.sqrt(1-s*s)-1):.5*(Math.sqrt(1-(s-=2)*s)+1)}},Elastic:{In:function(s){return s===0?0:s===1?1:-Math.pow(2,10*(s-1))*Math.sin((s-1.1)*5*Math.PI)},Out:function(s){return s===0?0:s===1?1:Math.pow(2,-10*s)*Math.sin((s-.1)*5*Math.PI)+1},InOut:function(s){return s===0?0:s===1?1:(s*=2,s<1?-.5*Math.pow(2,10*(s-1))*Math.sin((s-1.1)*5*Math.PI):.5*Math.pow(2,-10*(s-1))*Math.sin((s-1.1)*5*Math.PI)+1)}},Back:{In:function(s){return s===1?1:s*s*((1.70158+1)*s-1.70158)},Out:function(s){return s===0?0:--s*s*((1.70158+1)*s+1.70158)+1},InOut:function(s){const t=2.5949095;return(s*=2)<1?.5*(s*s*((t+1)*s-t)):.5*((s-=2)*s*((t+1)*s+t)+2)}},Bounce:{In:function(s){return 1-O.Bounce.Out(1-s)},Out:function(s){return s<1/2.75?7.5625*s*s:s<2/2.75?7.5625*(s-=1.5/2.75)*s+.75:s<2.5/2.75?7.5625*(s-=2.25/2.75)*s+.9375:7.5625*(s-=2.625/2.75)*s+.984375},InOut:function(s){return s<.5?O.Bounce.In(s*2)*.5:O.Bounce.Out(s*2-1)*.5+.5}},generatePow:function(s=4){return s=s<Number.EPSILON?Number.EPSILON:s,s=s>1e4?1e4:s,{In:function(t){return t**s},Out:function(t){return 1-(1-t)**s},InOut:function(t){return t<.5?(t*2)**s/2:(1-(2-t*2)**s)/2+.5}}},random:function(s){return Math.random()},createStep:function(s){return function(t){return Math.floor(t*s)/s}},createNoisyEasing:function(s,t=.1){const e=1-t;return function(n){return t*Math.random()+e*s(n)}},swing:function(s){return s+Math.sin(s*Math.PI*2)/2},causeSeizures:function(s){return s+.2*Math.random()-.1}};function ic(s){switch(s){case O.Quadratic.In:return O.Quadratic.Out;case O.Quadratic.Out:return O.Quadratic.In;case O.Quadratic.InOut:return O.Quadratic.InOut;case O.Cubic.In:return O.Cubic.Out;case O.Cubic.Out:return O.Cubic.In;case O.Cubic.InOut:return O.Cubic.InOut;case O.Quartic.In:return O.Quartic.Out;case O.Quartic.Out:return O.Quartic.In;case O.Quartic.InOut:return O.Quartic.InOut;case O.Quintic.In:return O.Quintic.Out;case O.Quintic.Out:return O.Quintic.In;case O.Quintic.InOut:return O.Quintic.InOut;case O.Sinusoidal.In:return O.Sinusoidal.Out;case O.Sinusoidal.Out:return O.Sinusoidal.In;case O.Sinusoidal.InOut:return O.Sinusoidal.InOut;case O.Exponential.In:return O.Exponential.Out;case O.Exponential.Out:return O.Exponential.In;case O.Exponential.InOut:return O.Exponential.InOut;case O.Circular.In:return O.Circular.Out;case O.Circular.Out:return O.Circular.In;case O.Circular.InOut:return O.Circular.InOut;case O.Elastic.In:return O.Elastic.Out;case O.Elastic.Out:return O.Elastic.In;case O.Elastic.InOut:return O.Elastic.InOut;case O.Back.In:return O.Back.Out;case O.Back.Out:return O.Back.In;case O.Back.InOut:return O.Back.InOut;case O.Bounce.In:return O.Bounce.Out;case O.Bounce.Out:return O.Bounce.In;case O.Bounce.InOut:return O.Bounce.InOut;default:return s}}const qp=4,jp=.001,Hp=1e-7,Wp=10,Yn=11,Bs=1/(Yn-1),Jp=typeof Float32Array=="function";function rc(s,t){return 1-3*t+3*s}function oc(s,t){return 3*t-6*s}function ac(s){return 3*s}function Fs(s,t,e){return((rc(t,e)*s+oc(t,e))*s+ac(t))*s}function hc(s,t,e){return 3*rc(t,e)*s*s+2*oc(t,e)*s+ac(t)}function Zp(s,t,e,n,i){let r,o,a=0;do o=t+(e-t)/2,r=Fs(o,n,i)-s,r>0?e=o:t=o;while(Math.abs(r)>Hp&&++a<Wp);return o}function Qp(s,t,e,n){for(let i=0;i<qp;++i){const r=hc(t,e,n);if(r===0)return t;const o=Fs(t,e,n)-s;t-=o/r}return t}function Kp(s){return s}function Pr(s,t,e,n){if(!(0<=s&&s<=1&&0<=e&&e<=1))throw new Error("bezier x values must be in [0, 1] range");if(s===t&&e===n)return Kp;const i=Jp?new Float32Array(Yn):new Array(Yn);for(let o=0;o<Yn;++o)i[o]=Fs(o*Bs,s,e);function r(o){let a=0,h=1;const c=Yn-1;for(;h!==c&&i[h]<=o;++h)a+=Bs;--h;const u=(o-i[h])/(i[h+1]-i[h]),l=a+u*Bs,m=hc(l,s,e);return m>=jp?Qp(o,l,s,e):m===0?l:Zp(o,a,a+Bs,s,e)}return o=>o===0||o===1?o:Fs(r(o),t,n)}function Mr(s){switch(s){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-in-out":return[.42,0,.58,1];case"ease-out":return[0,0,.58,1]}}function cc(s){const[t,e,n,i]=Mr(s);return[1-n,1-i,1-t,1-e]}function tg(s){return Pr(...Mr(s))}function eg(s){return Pr(...cc(s))}const me={Utils:{Linear:function(s,t,e){return(t-s)*e+s},Factorial:function(){const s=[1];return function(t){let e=1;if(s[t])return s[t];for(let n=t;n>1;n--)e*=n;return s[t]=e,e}}(),Bernstein:function(s,t){const e=me.Utils.Factorial;return e(s)/e(t)/e(s-t)},CatmullRom:function(s,t,e,n,i){const r=(e-s)*.5,o=(n-t)*.5,a=i*i,h=i*a;return(2*t-2*e+r+o)*h+(-3*t+3*e-2*r-o)*a+r*i+t},QuadraticBezier:(s,t,e,n)=>{const i=1-n;return i*i*s+2*i*n*t+n*n*e},CubicBezier:(s,t,e,n,i)=>{const r=1-i;return r*r*r*s+3*r*r*i*t+3*r*i*i*e+i*i*i*n}},Linear:function(s,t){const e=s.length-1,n=e*t,i=Math.floor(n),r=me.Utils.Linear;return t<0?r(s[0],s[1],n):t>1?r(s[e],s[e-1],e-n):r(s[i],s[i+1>e?e:i+1],n-i)},Bezier:function(s,t){let e=0;const n=s.length-1,i=Math.pow,r=me.Utils.Bernstein;for(let o=0;o<=n;o++)e+=i(1-t,n-o)*i(t,o)*s[o]*r(n,o);return e},CatmullRom:function(s,t){const e=s.length-1;let n=e*t,i=Math.floor(n);const r=me.Utils.CatmullRom;return s[0]===s[e]?(t<0&&(i=Math.floor(n=e*(1+t))),r(s[(i-1+e)%e],s[i],s[(i+1)%e],s[(i+2)%e],n-i)):t<0?s[0]-(r(s[0],s[0],s[1],s[1],-n)-s[0]):t>1?s[e]-(r(s[e],s[e],s[e-1],s[e-1],n-e)-s[e]):r(s[i?i-1:0],s[i],s[e<i+1?e:i+1],s[e<i+2?e:i+2],n-i)}};class uc{_tweens={};_tweensAddedDuringUpdate={};getAll(){return Object.keys(this._tweens).map(t=>this._tweens[t])}removeAll(){this._tweens={}}add(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t}remove(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]}update(t=ut(),e=!1){const n=Object.keys(this._tweens);for(let i=0;i<n.length;i++){const r=this._tweens[n[i]],o=!e;r&&r.update(t,o)===!1&&!e&&delete this._tweens[n[i]]}return!!Object.keys(this._tweens).length}}const Xt=new uc;class Ar{constructor(t,e=Xt){this._object=t,this._group=e}_id=Fn.nextId();_isPlaying=!1;_startTime=0;_delayTime=0;_durationTime=1e3;_isPaused=!1;_pauseStartTime=0;_initialRepeat=0;_repeat=0;_repeatDelayTime;_yoyo=!1;_reversed=!1;_valuesStart={};_valuesEnd={};_valuesStartRepeat={};_easingFunction=O.Linear.None;_interpolationFunction=me.Linear;_chainedTweens=[];_isChainStopped=!1;_onStartCallback;_onStartCallbackFired=!1;_onEveryStartCallback;_onEveryStartCallbackFired=!1;_onUpdateCallback;_onRepeatCallback;_onCompleteCallback;_onStopCallback;_goToEnd=!1;getId(){return this._id}isPlaying(){return this._isPlaying}isPaused(){return this._isPaused}to(t,e){return this._valuesEnd=Object.create(t),e!==void 0&&(this._durationTime=e),this}duration(t=1e3){return this._durationTime=t,this}start(t=ut()){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(const e in this._valuesStartRepeat)this._swapEndStartRepeatValues(e),this._valuesStart[e]=this._valuesStartRepeat[e]}return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this}_setupProperties(t,e,n,i){for(const r in n){const o=t[r],a=Array.isArray(o),h=a?"array":typeof o,c=!a&&Array.isArray(n[r]);if(!(h==="undefined"||h==="function")){if(c){let u=n[r];if(u.length===0)continue;u=u.map(this._handleRelativeValue.bind(this,o)),n[r]=[o].concat(u)}if((h==="object"||a)&&o&&!c){e[r]=a?[]:{};for(const u in o)e[r][u]=o[u];i[r]=a?[]:{},this._setupProperties(o,e[r],n[r],i[r])}else typeof e[r]>"u"&&(e[r]=o),a||(e[r]*=1),c?i[r]=n[r].slice().reverse():i[r]=e[r]||0}}}stop(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this}end(){return this._goToEnd=!0,this.update(1/0),this}pause(t=ut()){return this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStartTime=t,this._group&&this._group.remove(this),this)}resume(t=ut()){return!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStartTime,this._pauseStartTime=0,this._group&&this._group.add(this),this)}stopChainedTweens(){for(let t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this}group(t=Xt){return this._group=t,this}delay(t=0){return this._delayTime=t,this}repeat(t=0){return this._initialRepeat=t,this._repeat=t,this}repeatDelay(t){return this._repeatDelayTime=t,this}yoyo(t=!1){return this._yoyo=t,this}easing(t=O.Linear.None){return this._easingFunction=t,this}interpolation(t=me.Linear){return this._interpolationFunction=t,this}chain(...t){return this._chainedTweens=t,this}onStart(t){return this._onStartCallback=t,this}onEveryStart(t){return this._onEveryStartCallback=t,this}onUpdate(t){return this._onUpdateCallback=t,this}onRepeat(t){return this._onRepeatCallback=t,this}onComplete(t){return this._onCompleteCallback=t,this}onStop(t){return this._onStopCallback=t,this}update(t=ut(),e=!0){if(this._isPaused)return!0;let n,i;const r=this._startTime+this._durationTime;if(!this._goToEnd&&!this._isPlaying){if(t>r)return!1;e&&this.start(t)}if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0),i=(t-this._startTime)/this._durationTime,i=this._durationTime===0||i>1?1:i;const o=this._easingFunction(i);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,o),this._onUpdateCallback&&this._onUpdateCallback(this._object,i),i===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(n in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[n]=="string"&&(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(let a=0,h=this._chainedTweens.length;a<h;a++)this._chainedTweens[a].start(this._startTime+this._durationTime);return this._isPlaying=!1,!1}return!0}_updateProperties(t,e,n,i){for(const r in n){if(e[r]===void 0)continue;const o=e[r]||0;let a=n[r];const h=Array.isArray(t[r]),c=Array.isArray(a);!h&&c?t[r]=this._interpolationFunction(a,i):typeof a=="object"&&a?this._updateProperties(t[r],o,a,i):(a=this._handleRelativeValue(o,a),typeof a=="number"&&(t[r]=o+(a-o)*i))}}_handleRelativeValue(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)}_swapEndStartRepeatValues(t){const e=this._valuesStartRepeat[t],n=this._valuesEnd[t];typeof n=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(n):this._valuesStartRepeat[t]=n,this._valuesEnd[t]=e}}const ng=Fn.nextId,sg=Xt.getAll.bind(Xt),ig=Xt.removeAll.bind(Xt),rg=Xt.add.bind(Xt),og=Xt.remove.bind(Xt),ag=Xt.update.bind(Xt),hg={now:ut,Sequence:Fn,Easing:O,Interpolation:me,Group:uc,Tween:Ar,nextId:ng,getAll:sg,removeAll:ig,add:rg,remove:og,update:ag};class kr{autoStart;startTime;oldTime;elapsedTime;running;constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=ut(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=ut();t=e-this.oldTime,this.oldTime=e,this.elapsedTime+=t}return t}}class $n{tweens=[];frameDuration;onGroupStart;onGroupComplete;constructor(t){this.frameDuration=t?.frameDuration||1e3,this.onGroupStart=t?.onGroupStart,this.onGroupComplete=t?.onGroupComplete}get count(){return this.tweens.length}clear(){this.tweens=[]}sort(t=!1){Dl(this.tweens,(e,n)=>t?e.delay>n.delay:e.delay<=n.delay)}cloneTweens(t=this.tweens){const e=[];return t.forEach(n=>{const i={...n};delete i.tween,i.fromValues={...i.fromValues},i.toValues={...i.toValues},e.push(i)}),e}addTween(t,e,n){const i={fromValues:t,toValues:e,frames:typeof n?.frames=="number"?n.frames:1,delay:typeof n?.delay=="number"?n.delay:this.tweens.length,easeFunction:n?.easeFunction||O.Linear.None,interpolationFunction:n?.interpolationFunction||me.Linear,repeat:typeof n?.repeat=="number"?n.repeat:0,yoyo:n?.yoyo||!1,onStart:n?.onStart||(()=>{}),onUpdate:n?.onUpdate||(()=>{}),onComplete:n?.onComplete||(()=>{})};return this.tweens.push(i),this}cancelRequestAnimationCycle=()=>{};runTweens(t){this.cancelRequestAnimationCycle();const e=new kr,n=this.frameDuration;return new Promise(i=>{this.onGroupStart?.(),this.cancelRequestAnimationCycle=vr(r=>{if(!this.isPaused){const a=Math.max(0,r-this.pausedDuration),h=Math.max(0,e.getElapsedTime()-this.pausedDuration);t.filter(c=>c.delay*n<=h).forEach(c=>{c.tween||(c.tween=new Ar({...c.fromValues}).to({...c.toValues},c.frames*n).easing(c.easeFunction).interpolation(c.interpolationFunction).repeat(c.repeat).yoyo(c.yoyo).onStart(c.onStart).onUpdate(c.onUpdate).onComplete(c.onComplete),c.tween.start(a)),(c.delay+c.frames*(c.repeat+1))*n>h?c.tween.update(a):(c.tween.isPlaying()&&c.tween.end(),Ne(t,c))})}const o=!!t.length;return o||(this.onGroupComplete?.(),i()),o})})}isPaused=!1;pausedClock=new kr;pausedDuration=0;play(t=this.cloneTweens(this.tweens)){this.isPaused=!1,this.pausedDuration=0,this.runTweens(t)}reverse(){const t=this.cloneTweens(this.tweens);let e=0;t.forEach(n=>{e=Math.max(e,n.delay+n.frames),n.easeFunction=ic(n.easeFunction);const i={...n.toValues};n.toValues={...n.fromValues},n.fromValues={...i}}),t.forEach(n=>{n.delay=e-n.frames}),this.play(t)}pause(){this.pausedClock.start(),this.isPaused=!0}resume(){this.pausedDuration+=this.pausedClock.getElapsedTime(),this.pausedClock.stop(),this.isPaused=!1}}const Ys=new cn;function Ir(s){const t=Ys.getEntry((n,i)=>i.el==s);if(t)return t[1];const e=si(s);return Ys.set(e.name,e),e}function Dr(s,t){const e=Ir(s);e.alternate||(e.alternate=si(s)),t(e.alternate)}const lc=()=>{Ys.update((s,t)=>{const e=t.alternate;return e?(ii(t,e),t.alternate=void 0,Ys.set(e.name,e),!1):!0})};function cg(){lc()}function Lr(){sc(lc,{name:"FLUSH_VNODES",timeout:50})}function q(s){return s*Math.PI/180}function Et(s){return s*180/Math.PI}function pn(s,t,e=0){return Math.sqrt(s*s+t*t+e*e)}function Me(s,t,e,n){return pn(e-s,n-t)}function Jt(s,t,e,n){let i=Math.atan2(n-t,e-s);return i<0&&(i+=Math.PI*2),i}function Ae(s,t){return{dx:Math.cos(s)*t,dy:Math.sin(s)*t}}function ug(s,t,e){if(typeof e=="number"){const n=pn(s,t,e);return{x:s/=n,y:t/=n,z:e/=n}}else{const n=pn(s,t);return{x:s/=n,y:t/=n}}}function lg(s,t,e,n,i=10){if(Math.abs(e-s)<i&&Math.abs(n-t)<i)return"no";const r=Et(Jt(s,t,e,n));return r>=-135&&r<=-45?"up":r>45&&r<135?"down":r>=135&&r<=180||r>=-180&&r<-135?"left":"right"}const fc=fg("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);function fg(s,t=10){const e={},n=s.split(",");for(let i=0;i<n.length;i+=2){const r="&"+n[i+1]+";",o=parseInt(n[i],t);e[r]="&#"+o+";"}return e["\\xa0"]=" ",e}function Pt(s,t){const e=Object.keys(t);for(let n=0;n<e.length;n++)s=s.replace(new RegExp("{"+e[n]+"}","gi"),""+t[e[n]]);return s}function $s(s){let t,e;if(!s)throw new Error("cannot create a random attribute name for an undefined object");const n="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=n[Math.floor(Math.random()*n.length)];while(s[t]);return t}function dg(s){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[s]||t.start}function mg(s){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[s]||t.alphabetic}const Xn={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"},lineDash:{svgAttr:"stroke-dasharray",canvas:[],svg:null,apply:"stroke"},lineDashOffset:{svgAttr:"stroke-dashoffset",canvas:0,svg:0,apply:"stroke"}};let Xs=class{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}addColorStop(t,e){const n=this.__ctx.__createElement("stop");if(n.setAttribute("offset",""+t),e.indexOf("rgba")!==-1){const r=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(e);r&&(n.setAttribute("stop-color",Pt("rgb({r},{g},{b})",{r:r[1],g:r[2],b:r[3]})),n.setAttribute("stop-opacity",r[4]))}else n.setAttribute("stop-color",e);this.__root.appendChild(n)}},Rr=class{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}},dc=class ca{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:n=500}){t?(this.__canvas=t,this.__ctx=t.getContext("2d"),this.width=t.width,this.height=t.height):(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d"),this.width=e,this.height=n),this.__setDefaultStyles(),this.__styleStack=[this.__getStyleState()],this.__groupStack=[],this.__rootSVG=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__rootSVG.setAttribute("version","1.1"),this.__rootSVG.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__rootSVG.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__rootSVG.setAttribute("width",""+this.width),this.__rootSVG.setAttribute("height",""+this.height),this.__ids={},this.__SVGdefs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__rootSVG.appendChild(this.__SVGdefs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__rootSVG.appendChild(this.__currentElement)}__setDefaultStyles(){const t=Object.keys(Xn);for(let e=0,n=t.length;e<n;e++){const i=t[e];this[i]=Xn[i].canvas}}__getStyleState(){const t={},e=Object.keys(Xn);for(let n=0,i=e.length;n<i;n++){const r=e[n];t[r]=this[r]}return t}__applyStyleState(t){const e=Object.keys(t);for(let n=0,i=e.length;n<i;n++){const r=e[n];this[r]=t[r]}}__createElement(t,e={},n=!1){const i=this.__document.createElementNS("http://www.w3.org/2000/svg",t),r=Object.keys(e);n&&(i.setAttribute("fill","none"),i.setAttribute("stroke","none"));for(let o=0;o<r.length;o++){const a=r[o];i.setAttribute(a,e[a])}return i}__applyStyleToCurrentElement(t){let e=this.__currentElement;const n=this.__currentElementsToStyle;n&&(e.setAttribute(t,""),e=n.element,n.children.forEach(r=>{r.setAttribute(t,"")}));const i=Object.keys(Xn);for(let r=0;r<i.length;r++){const o=Xn[i[r]],a=this[i[r]];if(o.apply){if(a instanceof Rr){if(a.__ctx)for(;a.__ctx.__SVGdefs.childNodes.length;){const h=a.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[h]=h,this.__SVGdefs.appendChild(a.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(o.apply,Pt("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof Xs)e.setAttribute(o.apply,Pt("url(#{id})",{id:a.__root.getAttribute("id")}));else if(o.apply.indexOf(t)!==-1&&o.svg!==a)if((o.svgAttr==="stroke"||o.svgAttr==="fill")&&a.indexOf("rgba")!==-1){const c=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(a);if(c){e.setAttribute(o.svgAttr,Pt("rgb({r},{g},{b})",{r:c[1],g:c[2],b:c[3]}));let u=parseFloat(c[4]);const l=this.globalAlpha;l!=null&&(u*=l),e.setAttribute(o.svgAttr+"-opacity",""+u)}}else{let h=o.svgAttr;if(i[r]==="globalAlpha"&&(h=t+"-"+o.svgAttr,e.getAttribute(h)))continue;h&&e.setAttribute(h,a)}}}}__closestGroupOrSvg(t){return t=t||this.__currentElement,t.nodeName==="g"||t.nodeName==="svg"?t:this.__closestGroupOrSvg(t.parentNode)}getSerializedSvg(t){let e=new XMLSerializer().serializeToString(this.__rootSVG);if(/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi.test(e)&&(e=e.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),t){const i=Object.keys(fc);for(let r=0,o=i.length;r<o;r++){const a=i[r],h=fc[a],c=new RegExp(a,"gi");c.test(e)&&(e=e.replace(c,h))}}return e}getSvg(){return this.__rootSVG}save(){const t=this.__createElement("g"),e=this.__closestGroupOrSvg();this.__groupStack.push(e),e.appendChild(t),this.__currentElement=t,this.__styleStack.push(this.__getStyleState())}restore(){this.__currentElementsToStyle=null;const t=this.__groupStack.pop();t?this.__currentElement=t:this.__currentElement=this.__rootSVG.childNodes[1];const e=this.__styleStack.pop();e&&this.__applyStyleState(e)}__addTransform(t){const e=this.__closestGroupOrSvg();if(e.childNodes.length>0){this.__currentElement.nodeName==="path"&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());const i=this.__createElement("g");e.appendChild(i),this.__currentElement=i}let n=this.__currentElement.getAttribute("transform");n?n+=" ":n="",n+=t,this.__currentElement.setAttribute("transform",n)}scale(t,e){e===void 0&&(e=t),this.__addTransform(Pt("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(Pt("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(Pt("translate({x},{y})",{x:t,y:e}))}transform(t,e,n,i,r,o){this.__addTransform(Pt("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:n,d:i,e:r,f:o}))}beginPath(){this.__currentDefaultPath="",this.__currentPosition={};const t=this.__createElement("path",{},!0);this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t}__applyCurrentDefaultPath(){const t=this.__currentElement;t.nodeName==="path"&&t.setAttribute("d",this.__currentDefaultPath)}__addPathCommand(t){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=t}moveTo(t,e){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:t,y:e},this.__addPathCommand(Pt("M {x} {y}",this.__currentPosition))}closePath(){this.__currentDefaultPath&&this.__addPathCommand("Z")}lineTo(t,e){this.__currentPosition={x:t,y:e},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(Pt("L {x} {y}",this.__currentPosition)):this.__addPathCommand(Pt("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,n,i,r,o){this.__currentPosition={x:r,y:o},this.__addPathCommand(Pt("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:n,cp2y:i,x:r,y:o}))}quadraticCurveTo(t,e,n,i){this.__currentPosition={x:n,y:i},this.__addPathCommand(Pt("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:n,y:i}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,n,i,r){const o=this.__currentPosition&&this.__currentPosition.x,a=this.__currentPosition&&this.__currentPosition.y;if(typeof o>"u"||typeof a>"u")return;if(r<0)throw new Error("IndexSizeError: The radius provided ("+r+") is negative.");if(o===t&&a===e||t===n&&e===i||r===0){this.lineTo(t,e);return}const h=this.normalize([o-t,a-e]),c=this.normalize([n-t,i-e]);if(h[0]*c[1]===h[1]*c[0]){this.lineTo(t,e);return}const u=h[0]*c[0]+h[1]*c[1],l=Math.acos(Math.abs(u)),m=this.normalize([h[0]+c[0],h[1]+c[1]]),f=r/Math.sin(l/2),p=t+f*m[0],y=e+f*m[1],v=[-h[1],h[0]],w=[c[1],-c[0]],_=function(E){const C=E[0];return E[1]>=0?Math.acos(C):-Math.acos(C)},x=_(v),b=_(w);this.lineTo(p+v[0]*r,y+v[1]*r),this.arc(p,y,r,x,b)}stroke(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")}fill(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")}rect(t,e,n,i){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+n,e),this.lineTo(t+n,e+i),this.lineTo(t,e+i),this.lineTo(t,e),this.closePath()}fillRect(t,e,n,i){const r=this.__createElement("rect",{x:t,y:e,width:n,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,n,i){const r=this.__createElement("rect",{x:t,y:e,width:n,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),n=this.__rootSVG.childNodes[1],i=n.childNodes;for(let r=i.length-1;r>=0;r--)i[r]&&n.removeChild(i[r]);this.__currentElement=n,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,n,i){if(t===0&&e===0&&n===this.width&&i===this.height){this.__clearCanvas();return}const r=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:t,y:e,width:n,height:i,fill:"#FFFFFF"},!0);r.appendChild(o)}createLinearGradient(t,e,n,i){const r=this.__createElement("linearGradient",{id:$s(this.__ids),x1:t+"px",x2:n+"px",y1:e+"px",y2:i+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(r),new Xs(r,this)}createRadialGradient(t,e,n,i,r,o){const a=this.__createElement("radialGradient",{id:$s(this.__ids),cx:i+"px",cy:r+"px",r:o+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(a),new Xs(a,this)}__parseFont(){const e=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext]))(?:\s*\/\s*(normal|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext])))?\s*([-,'"\sa-z0-9]+?)\s*$/i.exec(this.font),n={style:e[1]||"normal",size:e[4]||"10px",family:e[6]||"sans-serif",weight:e[3]||"normal",decoration:e[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(n.decoration="underline"),this.__fontHref&&(n.href=this.__fontHref),n}__wrapTextLink(t,e){if(t.href){const n=this.__createElement("a");return n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),n.appendChild(e),n}return e}__applyText(t,e,n,i){const r=this.__parseFont(),o=this.__closestGroupOrSvg(),a=this.__createElement("text",{"font-family":r.family,"font-size":r.size,"font-style":r.style,"font-weight":r.weight,"text-decoration":r.decoration,x:e,y:n,"text-anchor":dg(this.textAlign),"dominant-baseline":mg(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(t)),this.__currentElement=a,this.__applyStyleToCurrentElement(i),o.appendChild(this.__wrapTextLink(r,a))}fillText(t,e,n){this.__applyText(t,e,n,"fill")}strokeText(t,e,n){this.__applyText(t,e,n,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,n,i,r,o){if(i===r)return;i=i%(2*Math.PI),r=r%(2*Math.PI),i===r&&(r=(r+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));const a=t+n*Math.cos(r),h=e+n*Math.sin(r),c=t+n*Math.cos(i),u=e+n*Math.sin(i),l=o?0:1;let m=0,f=r-i;f<0&&(f+=2*Math.PI),o?m=f>Math.PI?0:1:m=f>Math.PI?1:0,this.lineTo(c,u),this.__addPathCommand(Pt("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:n,ry:n,xAxisRotation:0,largeArcFlag:m,sweepFlag:l,endX:a,endY:h})),this.__currentPosition={x:a,y:h}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),n=$s(this.__ids),i=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",n),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",Pt("url(#{id})",{id:n})),t.appendChild(i),this.__currentElement=i}drawImage(...t){let e=t[0],n,i,r,o,a=0,h=0,c,u,l,m,f,p,y,v;if(t.length===3)n=t[1],i=t[2],c=e.width,u=e.height,r=c,o=u;else if(t.length===5)n=t[1],i=t[2],r=t[3],o=t[4],c=e.width,u=e.height;else if(t.length===9)a=t[1],h=t[2],c=t[3],u=t[4],n=t[5],i=t[6],r=t[7],o=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const w=this.__closestGroupOrSvg();this.__currentElement;const _="translate("+n+", "+i+")";if(e instanceof ca){if(l=e.getSvg().cloneNode(!0),l.childNodes&&l.childNodes.length>1){for(m=l.childNodes[0];m.childNodes.length;)v=m.childNodes[0].getAttribute("id"),this.__ids[v]=v,this.__SVGdefs.appendChild(m.childNodes[0]);if(f=l.childNodes[1],f){const x=f.getAttribute("transform");let b;x?b=x+" "+_:b=_,f.setAttribute("transform",b),w.appendChild(f)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(p=this.__createElement("image"),p.setAttribute("width",r),p.setAttribute("height",o),p.setAttribute("preserveAspectRatio","none"),(a||h||c!==e.width||u!==e.height)&&(y=this.__document.createElement("canvas"),y.width=r,y.height=o,y.getContext("2d")?.drawImage(e,a,h,c,u,0,0,r,o),e=y),p.setAttribute("transform",_),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),w.appendChild(p))}createPattern(t,e){const n=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),i=$s(this.__ids);let r;return n.setAttribute("id",i),t.nodeName==="CANVAS"||t.nodeName==="IMG"?(r=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),r.setAttribute("width",""+t.width),r.setAttribute("height",""+t.height),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.nodeName==="CANVAS"?t.toDataURL():t.getAttribute("src")),n.appendChild(r),this.__SVGdefs.appendChild(n)):t instanceof ca&&(n.setAttribute("width",""+t.width),n.setAttribute("height",""+t.height),n.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(n)),new Rr(n,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}},Or=class{canvas;context;customContext;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,n,i=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),i&&(this.customContext=new dc({canvas:this.canvas,width:e||this.canvas.width,height:n||this.canvas.height}))}set lineWidth(t){this.hasSetCustomStrokeStyle=!0,this.context.lineWidth=t,this.customContext&&(this.customContext.lineWidth=t)}get lineWidth(){return this.context.lineWidth}set lineCap(t){this.hasSetCustomStrokeStyle=!0,this.context.lineCap=t,this.customContext&&(this.customContext.lineCap=t)}get lineCap(){return this.context.lineCap}set lineJoin(t){this.hasSetCustomStrokeStyle=!0,this.context.lineJoin=t,this.customContext&&(this.customContext.lineCap=t)}get lineJoin(){return this.context.lineJoin}set lineDashOffset(t){this.hasSetCustomStrokeStyle=!0,this.context.lineDashOffset=t,this.customContext&&(this.customContext.lineDashOffset=t)}get lineDashOffset(){return this.context.lineDashOffset}set miterLimit(t){this.hasSetCustomStrokeStyle=!0,this.context.miterLimit=t,this.customContext&&(this.customContext.miterLimit=t)}get miterLimit(){return this.context.miterLimit}set globalAlpha(t){this.context.globalAlpha=t,this.customContext&&(this.customContext.globalAlpha=t)}get globalAlpha(){return this.context.globalAlpha}set fillStyle(t){this.hasSetCustomFillStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.fillStyle=t,this.customContext&&(this.customContext.fillStyle=t)):(this.context.fillStyle=t.gradient,this.customContext&&(this.customContext.fillStyle=t.gradientCustom))}get fillStyle(){return this.context.fillStyle}set strokeStyle(t){this.hasSetCustomStrokeStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.strokeStyle=t,this.customContext&&(this.customContext.strokeStyle=t)):(this.context.strokeStyle=t.gradient,this.customContext&&(this.customContext.strokeStyle=t.gradientCustom))}get strokeStyle(){return this.context.strokeStyle}set font(t){this.context.font=t,this.customContext&&(this.customContext.font=t)}get font(){return this.context.font}set textBaseline(t){this.context.textBaseline=t,this.customContext&&(this.customContext.textBaseline=t)}get textBaseline(){return this.context.textBaseline}set textAlign(t){this.context.textAlign=t,this.customContext&&(this.customContext.textAlign=t)}get textAlign(){return this.context.textAlign}fill(t){return t?this.context.fill(t):(this.context.fill(),this.customContext&&this.customContext.fill()),this}fillRect(t,e,n,i){return this.context.fillRect(t,e,n,i),this.customContext&&this.customContext.fillRect(t,e,n,i),this}fillText(t,e,n,i){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,n,i),this.customContext&&this.customContext.fillText(t,e,n),this}setLineDash(t){return this.context.setLineDash(t),this.customContext&&this.customContext.setLineDash(t),this}stroke(t){return t?this.context.stroke(t):(this.context.stroke(),this.customContext&&this.customContext.stroke()),this}strokeText(t,e,n,i){return this.context.strokeText(t,e,n,i),this.customContext&&this.customContext.strokeText(t,e,n),this}strokeRect(t,e,n,i){return this.context.strokeRect(t,e,n,i),this.customContext&&this.customContext.strokeRect(t,e,n,i),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,n=this.canvas.width,i=this.canvas.height){return this.context.clearRect(t,e,n,i),this.customContext&&this.customContext.clearRect(t,e,n,i),this}save(){return this.context.save(),this.customContext&&this.customContext.save(),this.currentMatrix=new DOMMatrix,this.path2Ds.push(this.currentPath2D),this.currentPath2D=new Path2D,this}restore(){return this.context.restore(),this.customContext&&this.customContext.restore(),this.hasSetCustomStrokeStyle=!1,this.hasSetCustomFillStyle=!1,this.currentMatrix=new DOMMatrix,this.currentPath2D=this.path2Ds.pop()||new Path2D,this}beginPath(){return this.context.beginPath(),this.customContext&&this.customContext.beginPath(),this}closePath(){return this.context.closePath(),this.customContext&&this.customContext.closePath(),this.currentPath2D.closePath(),this}changePath2D(t=this.currentPath2D,e=this.currentMatrix){const n=new Path2D;n.addPath(t,e),this.currentPath2D=n}isPointInStroke(...t){return t[0]instanceof Path2D?this.context.isPointInStroke(t[0],t[1],t[2]):this.context.isPointInStroke(t[0],t[1])}isPointInPath(...t){return t[0]instanceof Path2D?this.context.isPointInPath(t[0],t[1],t[2]):this.context.isPointInPath(t[0],t[1])}translate(t,e){return this.context.translate(t,e),this.customContext&&this.customContext.translate(t,e),this.currentMatrix.translate(t,e),this.changePath2D(),this}rotate(t,e=0,n=0){return this.translate(e,n),this.context.rotate(t),this.customContext&&this.customContext.rotate(t),this.currentMatrix.rotate(t),this.translate(-e,-n),this.changePath2D(),this}scale(t,e=t,n=0,i=0){return this.translate(n,i),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix.scale(t,e),this.translate(-n,-i),this.changePath2D(),this}moveTo(t,e){return this.context.moveTo(t,e),this.customContext&&this.customContext.moveTo(t,e),this.currentPath2D.moveTo(t,e),this}lineTo(t,e){return this.context.lineTo(t,e),this.customContext&&this.customContext.lineTo(t,e),this.currentPath2D.lineTo(t,e),this}arc(t,e,n,i,r,o){return this.context.arc(t,e,n,i,r,o),this.customContext&&this.customContext.arc(t,e,n,i,r,o?-1:1),this.currentPath2D.arc(t,e,n,i,r,o),this}arcTo(t,e,n,i,r){return this.context.arcTo(t,e,n,i,r),this.customContext&&this.customContext.arcTo(t,e,n,i,r),this.currentPath2D.arcTo(t,e,n,i,r),this}ellipse(t,e,n,i,r,o,a,h){return this.context.ellipse(t,e,n,i,r,o,a,h),this.currentPath2D.ellipse(t,e,n,i,r,o,a,h),this}quadraticCurveTo(t,e,n,i){return this.context.quadraticCurveTo(t,e,n,i),this.customContext&&this.customContext.quadraticCurveTo(t,e,n,i),this.currentPath2D.quadraticCurveTo(t,e,n,i),this}bezierCurveTo(t,e,n,i,r,o){return this.context.bezierCurveTo(t,e,n,i,r,o),this.customContext&&this.customContext.bezierCurveTo(t,e,n,i,r,o),this.currentPath2D.bezierCurveTo(t,e,n,i,r,o),this}rect(t,e,n,i){return this.context.rect(t,e,n,i),this.customContext&&this.customContext.rect(t,e,n,i),this.currentPath2D.rect(t,e,n,i),this}createLinearGradient(t,e,n,i,r){const o=this.context.createLinearGradient(t,e,n,i);return r&&Object.entries(r).forEach(([a,h])=>{o.addColorStop(parseFloat(a),h)}),o}createRadialGradient(t,e,n,i,r,o,a){const h=this.context.createRadialGradient(t,e,n,i,r,o);return a&&Object.entries(a).forEach(([c,u])=>{h.addColorStop(parseFloat(c),u)}),h}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const n=e[0],i=e[1];this.context.drawImage(t,n,i)}else if(e.length===4){const n=e[0],i=e[1],r=e[2],o=e[3];this.context.drawImage(t,n,i,r,o)}else if(e.length===8){const n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],h=e[5],c=e[6],u=e[7];this.context.drawImage(t,n,i,r,o,a,h,c,u)}else throw new Error("Invalid number of arguments passed to drawImage: "+e.length);return this.customContext&&this.customContext.drawImage(t,...e),this}getImageData(t=0,e=0,n=this.canvas.width,i=this.canvas.height,r){return this.context.getImageData(t,e,n,i,r)}putImageData(t,e=0,n=0){return this.context.putImageData(t,e,n)}createPattern(t,e){return this.context.createPattern(t,e)}toRawSVG(){if(this.customContext){const t=this.customContext.getSerializedSvg(!0),e=this.customContext.getSvg();return{raw:t,element:e}}else return{raw:"",element:null}}},zr=class{x;y;toX;toY;constructor(t){this.x=t?.x||0,this.y=t?.y||0,this.toX=t?.toX||0,this.toY=t?.toY||0}toSVGPathData(){return[["L",this.toX,this.toY]]}toCanvasContext(t){t.lineTo(this.toX,this.toY)}getBoundingClientRect(){const t=Jt(this.x,this.y,this.toX,this.toY);if(t===0){const e=Math.min(this.x,this.toX),n=Math.min(this.y,this.toY),i=Math.max(this.x,this.toX),r=Math.max(this.y,this.toY);return{x:e,y:n,width:i-e,height:r-n}}else{const e=Math.sin(t),n=Math.cos(t),i=n*this.x-e*this.y,r=n*this.toX-e*this.toY,o=n*this.y+e*this.x,a=n*this.toY+e*this.toX;return{x:Math.min(i,r),y:Math.min(o,a),width:Math.max(i,r)-Math.min(i,r),height:Math.max(o,a)-Math.min(o,a)}}}interpolate(t){return{x:this.x+t*(this.toX-this.x),y:this.y+t*(this.toY-this.y)}}intersection(t){const e=this.x,n=this.y,i=t.toX,r=t.toY,o=this.toX-e,a=t.x-i;if(!o&&!a)return null;const h=(this.toY-n)/o,c=(t.y-r)/a;if(o){if(!a)return{x:i,y:h*(i-e)+n}}else return{x:e,y:c*(e-i)+r};const u=(-c*i+r+h*e-n)/(h-c),l=h*(u-e)+n;return isNaN(u)||isNaN(l)?null:{x:u,y:l}}};const pg=class extends zr{rx;ry;xAxisRotate;largeArcFlag;sweepFlag;constructor(t){super(t),this.rx=t.rx,this.ry=t.ry,this.xAxisRotate=t?.xAxisRotate??0,this.largeArcFlag=t?.largeArcFlag??1,this.sweepFlag=t?.sweepFlag??1,this.toX=t.toX,this.toY=t.toY}toSVGPathData(){return[["A",this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag,this.toX,this.toY]]}toCanvasContext(t){const[e,n,i,r,o,a,h]=this.convert(this.x,this.y,this.toX,this.toY,this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag);t.ellipse(e,n,i,r,o,a,h,!this.sweepFlag)}convert(t,e,n,i,r,o,a,h,c){const u=a/180*Math.PI,l=(t-n)/2,m=(e-i)/2,f=Math.cos(u)*l+Math.sin(u)*m,p=-Math.sin(u)*l+Math.cos(u)*m,y=f*f/(r*r)+p*p/(o*o);if(y>1){const G=Math.sqrt(y);throw r=G*r,o=G*o,new Error(`Radii are too small to build an arc. Correcting them to ${r}/${o}.`)}const v=Math.sqrt((r*r*o*o-r*r*p*p-o*o*f*f)/(r*r*p*p+o*o*f*f)),w=h!=c?1:-1,_=w*v*r*p/o,x=w*v*-o*f/r,b=(t+n)/2,E=(e+i)/2,C=Math.cos(u)*_-Math.sin(u)*x+b,L=Math.sin(u)*_+Math.cos(u)*x+E,B=(G,J,st,K)=>(G*K>=J*st?1:-1)*Math.acos((G*st+J*K)/(Math.sqrt(G*G+J*J)*Math.sqrt(st*st+K*K))),F=B(1,0,t-C,e-L)-u,U=B(t-C,e-L,n-C,i-L);return[C,L,r,o,u,F,F+U]}},gg=class extends zr{cx;cy;isLineThrough;constructor(t){super(t),this.cx=t.cx,this.cy=t.cy,this.isLineThrough=typeof t.isLineThrough=="boolean"?t.isLineThrough:!1}toSVGPathData(){if(this.isLineThrough){const t=this.cx*2-(this.x+this.toX)/2,e=this.cy*2-(this.y+this.toY)/2;return[["Q",t,e,this.toX,this.toY]]}else return[["Q",this.cx,this.cy,this.toX,this.toY]]}toCanvasContext(t){if(this.isLineThrough){const e=this.cx*2-(this.x+this.toX)/2,n=this.cy*2-(this.y+this.toY)/2;t.quadraticCurveTo(e,n,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}getBoundingClientRect(){const t=[this.x,this.toX],e=[this.y,this.toY];let n,i,r,o;for(let c=0;c<2;++c)n=c==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,i=c==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,r=c==0?this.x:this.y,Math.abs(n)>1e-12&&(o=-i/(2*n),0<o&&o<1&&[t,e][c].push(n*o*o+i*o+r));const a={x:Math.min.apply(0,t),y:Math.min.apply(0,e)},h={x:Math.max.apply(0,t),y:Math.max.apply(0,e)};return{x:a.x,y:a.y,width:h.x-a.x,height:h.y-a.y}}interpolate(t){return{x:(1-t)*(1-t)*this.x+2*(1-t)*t*this.cx+t*t*this.toX,y:(1-t)*(1-t)*this.y+2*(1-t)*t*this.cy+t*t*this.toY}}},ke=class us extends zr{c1x;c1y;c2x;c2y;constructor(t){super(t),this.c1x=t.c1x,this.c1y=t.c1y,this.c2x=t.c2x,this.c2y=t.c2y}toSVGPathData(){return[["C",this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY]]}toCanvasContext(t){t.bezierCurveTo(this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY)}getBoundingClientRect(){let t=this.c2x-2*this.c1x+this.x-(this.toX-2*this.c2x+this.c1x),e=2*(this.c1x-this.x)-2*(this.c2x-this.c1x),n=this.x-this.c1x,i=(-e+Math.sqrt(e*e-4*t*n))/2/t,r=(-e-Math.sqrt(e*e-4*t*n))/2/t;const o=[this.y,this.toY],a=[this.x,this.toX];let h;const c=[];Math.abs(i)>1e12&&(i=.5),Math.abs(r)>1e12&&(r=.5),i>=0&&i<=1&&(h=this.interpolate(i),a.push(h.x),o.push(h.y),c.push({X:h.x,Y:h.y})),r>=0&&r<=1&&(h=this.interpolate(r),a.push(h.x),o.push(h.y),c.push({X:h.x,Y:h.y})),t=this.c2y-2*this.c1y+this.y-(this.toY-2*this.c2y+this.c1y),e=2*(this.c1y-this.y)-2*(this.c2y-this.c1y),n=this.y-this.c1y,i=(-e+Math.sqrt(e*e-4*t*n))/2/t,r=(-e-Math.sqrt(e*e-4*t*n))/2/t,Math.abs(i)>1e12&&(i=.5),Math.abs(r)>1e12&&(r=.5),i>=0&&i<=1&&(h=this.interpolate(i),a.push(h.x),o.push(h.y),c.push({X:h.x,Y:h.y})),r>=0&&r<=1&&(h=this.interpolate(r),a.push(h.x),o.push(h.y),c.push({X:h.x,Y:h.y}));const u=[],l=c.length;for(let p=0;p<l;p++){for(let y=p+1;y<l;y++)c[p].X===c[y].X&&c[p].Y===c[y].Y&&(y=++p);u.push({X:c[p].X,Y:c[p].Y})}const m={x:Math.min.apply(Math,a),y:Math.min.apply(Math,o)},f={x:Math.max.apply(Math,a),y:Math.max.apply(Math,o)};return{x:m.x,y:m.y,width:f.x-m.x,height:f.y-m.y,dots:u}}interpolate(t){return{x:Math.pow(1-t,3)*this.x+3*Math.pow(1-t,2)*t*this.c1x+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2x+Math.pow(t,3)*this.toX,y:Math.pow(1-t,3)*this.y+3*Math.pow(1-t,2)*t*this.c1y+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2y+Math.pow(t,3)*this.toY}}static base3(t,e,n,i,r){const o=-3*e+9*n-9*i+3*r,a=t*o+6*e-12*n+6*i;return t*a-3*e+3*n}static bezlen(t,e,n,i,r,o,a,h,c=1){c=Math.max(0,Math.min(c,1));const u=c/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],m=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let f=0;for(let p=0;p<12;p++){const y=u*l[p]+u,v=this.base3(y,t,n,r,a),w=this.base3(y,e,i,o,h);f+=m[p]*Math.sqrt(v*v+w*w)}return u*f}length(t=1){return us.bezlen(this.x,this.y,this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY,t)}getTatLen(t){const e=this.x,n=this.y,i=this.c1x,r=this.c1y,o=this.c2x,a=this.c2y,h=this.toX,c=this.toY;if(t<0||us.bezlen(e,n,i,r,o,a,h,c)<t)return 0;const u=1;let l=u/2,m=u-l,f=us.bezlen(e,n,i,r,o,a,h,c,m);for(;Math.abs(f-t)>.01;)l/=2,m+=(f<t?1:-1)*l,f=us.bezlen(e,n,i,r,o,a,h,c,m);return m}getPointAtSegmentLength(t){const e=this.getTatLen(t),n=1-e,i=Math.pow(n,3),r=Math.pow(n,2),o=e*e,a=o*e,h=i*this.x+r*3*e*this.c1x+n*3*e*e*this.c2x+a*this.toX,c=i*this.y+r*3*e*this.c1y+n*3*e*e*this.c2y+a*this.toY,u=this.x+2*e*(this.c1x-this.x)+o*(this.c2x-2*this.c1x+this.x),l=this.y+2*e*(this.c1y-this.y)+o*(this.c2y-2*this.c1y+this.y),m=this.c1x+2*e*(this.c2x-this.c1x)+o*(this.toX-2*this.c2x+this.c1x),f=this.c1y+2*e*(this.c2y-this.c1y)+o*(this.toY-2*this.c2y+this.c1y),p=n*this.x+e*this.c1x,y=n*this.y+e*this.c1y,v=n*this.c2x+e*this.toX,w=n*this.c2y+e*this.toY,_=90-Math.atan2(u-m,l-f)*180/Math.PI;return{x:h,y:c,m:{x:u,y:l},n:{x:m,y:f},start:{x:p,y},end:{x:v,y:w},alpha:_}}},Un=Math.PI*2;function mc(s,t,e,n){const i=s*n-t*e<0?-1:1;let r=s*e+t*n;return r>1&&(r=1),r<-1&&(r=-1),i*Math.acos(r)}function yg(s,t,e,n,i,r,o,a,h,c){const u=c*(s-e)/2+h*(t-n)/2,l=-h*(s-e)/2+c*(t-n)/2,m=o*o,f=a*a,p=u*u,y=l*l;let v=m*f-m*y-f*p;v<0&&(v=0),v/=m*y+f*p,v=Math.sqrt(v)*(i===r?-1:1);const w=v*o/a*l,_=v*-a/o*u,x=c*w-h*_+(s+e)/2,b=h*w+c*_+(t+n)/2,E=(u-w)/o,C=(l-_)/a,L=(-u-w)/o,B=(-l-_)/a,F=mc(1,0,E,C);let U=mc(E,C,L,B);return r===0&&U>0&&(U-=Un),r===1&&U<0&&(U+=Un),[x,b,F,U]}function wg(s,t){const e=1.3333333333333333*Math.tan(t/4),n=Math.cos(s),i=Math.sin(s),r=Math.cos(s+t),o=Math.sin(s+t);return[n,i,n-i*e,i+n*e,r+o*e,o-r*e,r,o]}function pc(s,t,e,n,i,r,o,a,h){const c=Math.sin(h*Un/360),u=Math.cos(h*Un/360),l=u*(s-e)/2+c*(t-n)/2,m=-c*(s-e)/2+u*(t-n)/2;if(l===0&&m===0)return[];if(o===0||a===0)return[];o=Math.abs(o),a=Math.abs(a);const f=l*l/(o*o)+m*m/(a*a);f>1&&(o*=Math.sqrt(f),a*=Math.sqrt(f));const p=yg(s,t,e,n,i,r,o,a,c,u),y=[];let v=p[2],w=p[3];const _=Math.max(Math.ceil(Math.abs(w)/(Un/4)),1);w/=_;for(let x=0;x<_;x++)y.push(wg(v,w)),v+=w;return y.map(x=>{for(let b=0;b<x.length;b+=2){let E=x[b+0],C=x[b+1];E*=o,C*=a;const L=u*E-c*C,B=c*E+u*C;x[b+0]=L+p[0],x[b+1]=B+p[1]}return x})}function Nr(s,t,e,n,i,r){return[s/3+2/3*e,t/3+2/3*n,i/3+2/3*e,r/3+2/3*n,i,r]}function Vn(s,t,e,n){return[s,t,e,n,e,n]}const Gn={a:7,c:6,s:4,q:4,t:2,m:2,l:2,h:1,v:1,z:0};class Ge{static createSVGElement(t="path",e){const n=document.createElementNS.call(document,"http://www.w3.org/2000/svg",t);return e&&je(n,e),n}static createSvgPath(t,e){return this.createSVGElement("path",{d:t,id:e||on()})}static downloadFromSVGElement(t,e="shape"){return Hs(sr(t),`${e}.svg`)}static downloadFromSVGString(t,e="shape"){return Hs(Ei(t),`${e}.svg`)}static getSVGRawStringFromElement(t){return nr(t)}static isSVGPath(t){return typeof t!="string"?!1:(t=t.trim(),/^[mlhvzaqtcs]\s*[-+.0-9][^mlhvzaqtcs]+/i.test(t)&&/[\dz]$/i.test(t))}static SVGPathDataToD(t){return t.map(e=>{if(!e[0])return"";switch(e[0].toLowerCase()){case"a":return`${e[0]} ${e[1]},${e[2]} ${e[3]} ${e[4]},${e[5]} ${e[6]},${e[7]}`;case"c":return`${e[0]} ${e[1]},${e[2]} ${e[3]},${e[4]} ${e[5]},${e[6]}`;case"s":case"q":return`${e[0]} ${e[1]},${e[2]} ${e[3]},${e[4]}`;default:return e[0]+" "+e.slice(1).join(",")}}).join(" ")}static parseSVGPath(t){const e=[];return Ge.isSVGPath(t)&&t.replace(/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi,(n,i,r)=>{let o=i.toLowerCase();const a=Ti(r);for(o=="m"&&a.length>Gn[o]&&(e.push([i,...a.splice(0,Gn[o])]),o="l",i=i=="m"?"l":"L");a.length;){if(a.length<Gn[o])throw new Error(`parseSVGPath substring:{ ${n} } command:{ ${i} } args:{ ${a} }`);e.push([i,...a.splice(0,Gn[o])])}return o=="z"&&e.push([i]),""}),e}static absolutizeSVGPath(t){let e=0,n=0,i=0,r=0;return t.map(function(o){const a=o[0],h=a.toUpperCase();if(a!=h)switch(o[0]=h,a){case"a":o[6]+=i,o[7]+=r;break;case"v":o[1]+=r;break;case"h":o[1]+=i;break;default:for(let c=1;c<o.length;)o[c++]+=i,o[c++]+=r}switch(h){case"Z":i=e,r=n;break;case"H":i=o[1];break;case"V":r=o[1];break;case"M":i=e=o[1],r=n=o[2];break;default:i=o[o.length-2],r=o[o.length-1]}return o})}static relativeSVGPath(t){let e=0,n=0,i=0,r=0;return t.map(function(o){const a=o[0],h=a.toLowerCase();if(a!=h)switch(o[0]=h,a){case"A":o[6]-=i,o[7]-=r;break;case"V":o[1]-=r;break;case"H":o[1]-=i;break;default:for(let c=1;c<o.length;)o[c++]-=i,o[c++]-=r}switch(h){case"z":i=e,r=n;break;case"h":i+=o[1];break;case"v":r+=o[1];break;case"m":i+=o[1],r+=o[2],e+=o[1],n+=o[2];break;default:i+=o[o.length-2],r+=o[o.length-1]}return o})}static normalizeSVGPath(t){const e=[];let n=0,i=0,r=0,o=0,a=0,h=0,c=0,u=0,l;for(let m=0,f=t.length;m<f;m++){let p=t[m];const y=p[0];switch(y){case"M":n=p[1],i=p[2];break;case"A":const v=pc(r,o,p[6],p[7],p[4],p[5],p[1],p[2],p[3]);if(!v.length)continue;v.forEach((x,b)=>{const[E,C,L,B,F,U,G,J]=x;p=["C",L,B,F,U,G,J],b<v.length-1&&e.push(p)});break;case"S":let w=r,_=o;(l=="C"||l=="S")&&(w+=w-c,_+=_-u),p=["C",w,_,p[1],p[2],p[3],p[4]];break;case"T":l=="Q"||l=="T"?(a=r*2-a,h=o*2-h):(a=r,h=o),p=["C",...Nr(r,o,a,h,p[1],p[2])];break;case"Q":a=p[1],h=p[2],p=["C",...Nr(r,o,p[1],p[2],p[3],p[4])];break;case"L":p=["C",...Vn(r,o,p[1],p[2])];break;case"H":p=["C",...Vn(r,o,p[1],o)];break;case"V":p=["C",...Vn(r,o,r,p[1])];break;case"Z":p=["C",...Vn(r,o,n,i)];break}l=y,r=p[p.length-2],o=p[p.length-1],p.length>4?(c=p[p.length-4],u=p[p.length-3]):(c=r,u=o),e.push(p)}return e}static catmullRom2bezier(t){const e=[];for(let n=0,i=t.length;i-2>n;n+=2){let r;n==0?r=[{x:t[n],y:t[n+1]},{x:t[n],y:t[n+1]},{x:t[n+2],y:t[n+3]},{x:t[n+4],y:t[n+5]}]:i-4==n?r=[{x:t[n-2],y:t[n-1]},{x:t[n],y:t[n+1]},{x:t[n+2],y:t[n+3]},{x:t[n+2],y:t[n+3]}]:r=[{x:t[n-2],y:t[n-1]},{x:t[n],y:t[n+1]},{x:t[n+2],y:t[n+3]},{x:t[n+4],y:t[n+5]}];const o=[{x:r[1].x,y:r[1].y},{x:(-r[0].x+6*r[1].x+r[2].x)/6,y:(-r[0].y+6*r[1].y+r[2].y)/6},{x:(r[1].x+6*r[2].x-r[3].x)/6,y:(r[1].y+6*r[2].y-r[3].y)/6},{x:r[2].x,y:r[2].y}];e.push(["C",o[1].x,o[1].y,o[2].x,o[2].y,o[3].x,o[3].y])}return e}static zvhToLSVGPath(t){const e=[];let n=["L",0,0],i;for(let r=0,o=t.length;r<o;r++){const a=t[r];switch(a[0]){case"M":n=["L",a[1],a[2]],e.push(a);break;case"Z":e.push(n);break;case"H":i=e[e.length-1]||["L",0,0],e.push(["L",a[1],i[i.length-1]]);break;case"V":i=e[e.length-1]||["L",0,0],e.push(["L",i[i.length-2],a[1]]);break;default:e.push(a)}}return e}static longhandSVGPath(t){const e={S:{to:"C",x:3},T:{to:"Q",x:1}};let n,i=0,r=0;for(let o=0,a=t.length;o<a;o++){const h=t[o],c=e[h[0]];c&&(h[0]=c.to,n&&(n[0]===c.to?(i=2*Number(n[c.x+2])-Number(n[c.x]),r=2*Number(n[c.x+3])-Number(n[c.x+1])):(i=Number(n[n.length-2]),r=Number(n[n.length-1]))),h.splice(1,0,i,r)),n=h}return t}}let xg=class _e{cX;cY;x;y;degree;scalarX;scalarY;startPathX=0;startPathY=0;prevPathX=0;prevPathY=0;normalizedLines=[];constructor(t){this.cX=0,this.cY=0,this.x=t?.x||0,this.y=t?.y||0,typeof t?.centerX=="number"&&typeof t?.centerY=="number"&&(this.cX=t.centerX-this.x,this.cY=t.centerY-this.y),this.degree=t?.degree||0,this.scalarX=1,this.scalarY=1,t?.scalar!==void 0&&(this.scalarX=t.scalar,this.scalarY=t.scalar),t?.scalarX!==void 0&&(this.scalarX=t.scalarX),t?.scalarY!==void 0&&(this.scalarY=t.scalarY),this.reset(t?.d,t?.originMatrix)}reset(t,e){typeof t=="string"?this.resetFromSVGPathData(Ge.parseSVGPath(t),e):t instanceof _e?this.resetFromSVGPathData(t.toSVGPathData(),e):this.resetFromSVGPathData(t||[],e)}resetFromSVGPathData(t,e){this.normalizedLines=[];const n=Ge.normalizeSVGPath(Ge.absolutizeSVGPath(t));this.prevPathX=this.startPathX=0,this.prevPathY=this.startPathY=0;let i=!1;for(let r=0,o=n.length;r<o;r++){const a=n[r];if(a[0]=="M"){i||(i=!0,this.startPathX=a[1],this.startPathY=a[2]),this.prevPathX=a[1],this.prevPathY=a[2];continue}this.appendLine(new ke({c1x:a[1],c1y:a[2],c2x:a[3],c2y:a[4],toX:a[5],toY:a[6]}))}e&&({x:this.startPathX,y:this.startPathY}=e.transformPoint({x:this.startPathX,y:this.startPathY}),{x:this.prevPathX,y:this.prevPathY}=e.transformPoint({x:this.prevPathX,y:this.prevPathY}),this.normalizedLines.forEach(r=>{({x:r.x,y:r.y}=e.transformPoint({x:r.x,y:r.y})),{x:r.c1x,y:r.c1y}=e.transformPoint({x:r.c1x,y:r.c1y}),{x:r.c2x,y:r.c2y}=e.transformPoint({x:r.c2x,y:r.c2y}),{x:r.toX,y:r.toY}=e.transformPoint({x:r.toX,y:r.toY})}))}static fromPolymorphPoints(t){const e=new _e;e.prevPathX=e.startPathX=t[0]||0,e.prevPathY=e.startPathY=t[1]||0;for(let n=2,i=t.length;n+5<i;n+=6)e.appendLine(new ke({c1x:t[n],c1y:t[n+1],c2x:t[n+2],c2y:t[n+3],toX:t[n+4],toY:t[n+5]}));return e}static fromLines(t){const e=new _e;e.prevPathX=e.startPathX=t[0].x||0,e.prevPathY=e.startPathY=t[0].y||0;for(let n=0,i=t.length;n<i;n++)e.appendLine(t[n]);return e}appendLine(t){if(t instanceof pg){pc(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(c=>{const[u,l,m,f,p,y,v,w]=c;this.normalizedLines.push(new ke({x:this.prevPathX,y:this.prevPathY,c1x:m,c1y:f,c2x:p,c2y:y,toX:v,toY:w})),this.prevPathX=v,this.prevPathY=w});return}let e,n,i,r,o,a;t instanceof ke?(e=t.c1x,n=t.c1y,i=t.c2x,r=t.c2y,o=t.toX,a=t.toY):t instanceof gg?[e,n,i,r,o,a]=Nr(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,n,i,r,o,a]=Vn(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new ke({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:n,c2x:i,c2y:r,toX:o,toY:a})),this.prevPathX=o,this.prevPathY=a}toSVGPathData(){const{startPathX:t,startPathY:e,normalizedLines:n}=this.updateTransform(),i=[];i.push(["M",t,e]);for(let r=0,o=n.length;r<o;r++)i.push(...n[r].toSVGPathData());return i}toSVGPathD(){return Ge.SVGPathDataToD(this.toSVGPathData())}toCanvasContext(t){const{startPathX:e,startPathY:n,normalizedLines:i}=this.updateTransform();t.beginPath(),t.moveTo(e,n),i.forEach(r=>{r.toCanvasContext(t)})}getBoundingClientRect(){const{normalizedLines:t}=this.updateTransform(),e=[],n=[];if(t.forEach(h=>{const c=h.getBoundingClientRect();e.push(c.x,c.x+c.width),n.push(c.y,c.y+c.height)}),e.length==0||n.length==0)return{x:0,y:0,width:0,height:0};const i=Math.min.apply(0,e),r=Math.min.apply(0,n),o=Math.max.apply(0,e),a=Math.max.apply(0,n);return{x:i,y:r,width:o-i,height:a-r}}update(t){this.cX=typeof t.cX=="number"?t.cX:this.cX,this.cY=typeof t.cY=="number"?t.cY:this.cY,this.x=t.x,this.y=t.y,this.degree=t.degree,this.scalarX=t.scalarX,this.scalarY=t.scalarY}updateTransform(){const t=new _t;if(t.translate(this.x+this.cX,this.y+this.cY),t.rotate(this.degree),t.scale(this.scalarX,this.scalarY),t.translate(-this.cX,-this.cY),t.isIdentity)return{startPathX:this.startPathX,startPathY:this.startPathY,normalizedLines:this.normalizedLines};{let e=this.startPathX,n=this.startPathY;({x:e,y:n}=t.transformPoint({x:e,y:n}));const i=[];return this.normalizedLines.forEach(r=>{let o=r.x,a=r.y,h=r.c1x,c=r.c1y,u=r.c2x,l=r.c2y,m=r.toX,f=r.toY;({x:o,y:a}=t.transformPoint({x:o,y:a})),{x:h,y:c}=t.transformPoint({x:h,y:c}),{x:u,y:l}=t.transformPoint({x:u,y:l}),{x:m,y:f}=t.transformPoint({x:m,y:f}),i.push(new ke({x:o,y:a,c1x:h,c1y:c,c2x:u,c2y:l,toX:m,toY:f}))}),{startPathX:e,startPathY:n,normalizedLines:i}}}getTotalLength(){const{normalizedLines:t}=this.updateTransform();return t.reduce((e,n)=>e+=n.length(),0)}getPointAtLength(t){const{normalizedLines:e}=this.updateTransform();let n=0;const i=e.length;for(let r=0;r<i;r++){const o=e[r],a=o.length();if(n+a>=t)return o.getPointAtSegmentLength(t-n);n+=a}return e[i-1].getPointAtSegmentLength(1)}interpolate(t){const{startPathX:e,startPathY:n,normalizedLines:i}=this.updateTransform(),r=i.length;if(r===0)return{x:e,y:n};if(r===1)return i[0].interpolate(t);{let o=t*r,a=i[0];if(o--,o>1)for(let h=1;h<r&&(a=i[h],o>1);h++)o-=1;return a.interpolate(o)}}getSubpath(t,e){if(this.getTotalLength()-e<1e-6)return this.getSubpathsAtLength(this,t);{const n=this.getSubpathsAtLength(this,e,1);return t?this.getSubpathsAtLength(n,t):n}}getSubpathsAtLength(t,e,n){const{startPathX:i,startPathY:r,normalizedLines:o}=t.updateTransform();let a=null,h=0;const c=new _e;c.prevPathX=c.startPathX=i,c.prevPathY=c.startPathY=r;for(let u=0,l=o.length;u<l;u++){const m=o[u],f=m.length();if(h+f>e&&!a){const p=m.getPointAtSegmentLength(e-h);if(c.appendLine(new ke({c1x:p.start.x,c1y:p.start.y,c2x:p.m.x,c2y:p.m.y,toX:p.x,toY:p.y})),n)return c;a=c,c.appendLine(new ke({c1x:p.n.x,c1y:p.n.y,c2x:p.end.x,c2y:p.end.y,toX:m.x,toY:m.y})),h+=f;continue}h+=f,c.appendLine(m)}return c}closestPoint(t,e){const n=this.getTotalLength();let i={x:t,y:e},r=0,o=1/0,a=8;for(let c=0;c<=n;c+=a){const u=this.getPointAtLength(c),l=Math.pow(Me(u.x,u.y,t,e),2);l<o&&(i=u,r=c,o=l)}for(a/=2;a>.5;){const c=r-a,u=this.getPointAtLength(c),l=Math.pow(Me(u.x,u.y,t,e),2),m=r+a,f=this.getPointAtLength(m),p=Math.pow(Me(f.x,f.y,t,e),2);c>=0&&l<o?(i=u,r=c,o=l):m<=n&&p<o?(i=f,r=m,o=p):a/=2}const h=this.getPointAtLength(r+(r===n?-.1:.1));return{point:i,rotation:r>=n?Jt(h.x,h.y,i.x,i.y):Jt(i.x,i.y,h.x,h.y),distance:Math.sqrt(o)}}get polymorphPoints(){const{startPathX:t,startPathY:e,normalizedLines:n}=this.updateTransform();return[t,e].concat(n.reduce((i,r)=>i.concat([r.c1x,r.c1y,r.c2x,r.c2y,r.toX,r.toY]),[]))}perimeterPoints(){const t=this.polymorphPoints,e=t.length;let n=t[e-2],i=t[e-1],r=0;for(let o=0;o<e;o+=6)r+=Me(t[o],t[o+1],n,i),n=t[o],i=t[o+1];return Math.floor(r)}expendFill(t){const e=this.polymorphPoints,n=e.length;let i=t-n;const r=Math.ceil(t/n),o=[];o.push(["M",e[0],e[1]]);let a=2;for(;a+5<=n-1;){const h=e[a++],c=e[a++],u=e[a++],l=e[a++],m=e[a++],f=e[a++];o.push(["C",h,c,u,l,m,f]);let p=0;for(;p<r&&i>0;)o.push(["C",m,f,m,f,m,f]),i-=6,p++}return o}static mixPoints(t,e,n){const i=t.length,r=new Array(i);for(let o=0;o<i;o++)r[o]=Z(t[o]+(e[o]-t[o])*n,6);return r}static getPathInterpolator(t,e){return n=>Math.abs(n-0)<Number.EPSILON?t:Math.abs(n-1)<Number.EPSILON?e:_e.fromPolymorphPoints(_e.mixPoints(new _e({d:t}).polymorphPoints,new _e({d:e}).polymorphPoints,n)).toSVGPathData()}},bg=class extends ys{id;originD;originMatrix;independentTransformInGroup;forceCXY=!1;cX;cY;x;y;degree;scalarX;scalarY;diffXInGroup;diffYInGroup;diffDegreeInGroup;diffScalarXInGroup;diffScalarYInGroup;vx;vy;ax;ay;mass;attrs;enableDrag;alongPath;isDragging=!1;isMouseIn=!1;targetToAfterDragFree;followMouse;strokeArmyAnts;strokeArmyAntsOffset=0;strokeDashTotalLength=0;isShow=!0;el;pathd;usePathDtoCanvasContext=!1;parent;shapes=[];constructor(t){if(super(),this.id=on(),t?.d&&(this.originD=t?.d),t?.originMatrix&&(this.originMatrix=t.originMatrix),this.independentTransformInGroup=typeof t?.independentTransformInGroup=="boolean"?t.independentTransformInGroup:!1,this.x=t?.x||0,this.y=t?.y||0,this.cX=0,this.cY=0,typeof t?.centerX=="number"&&typeof t?.centerY=="number"&&this.forceSetCXY(t.centerX-this.x,t.centerY-this.y),this.degree=t?.degree||0,this.scalarX=1,this.scalarY=1,t?.scalar!==void 0&&(this.scalarX=t.scalar,this.scalarY=t.scalar),t?.scalarX!==void 0&&(this.scalarX=t.scalarX),t?.scalarY!==void 0&&(this.scalarY=t.scalarY),this.diffXInGroup=t?.diffXInGroup||0,this.diffYInGroup=t?.diffYInGroup||0,this.diffDegreeInGroup=t?.diffDegreeInGroup||0,this.diffScalarXInGroup=t?.diffScalarXInGroup||1,this.diffScalarYInGroup=t?.diffScalarYInGroup||1,this.vx=t?.vx||0,this.vy=t?.vy||0,this.ax=t?.ax||0,this.ay=t?.ay||0,this.mass=t?.mass||1,this.attrs={stroke:"none",fill:"none"},t?.attrs&&this.setAttr(t?.attrs),this.enableDrag=t?.enableDrag||!1,this.alongPath=t?.alongPath,this.targetToAfterDragFree=t?.targetToAfterDragFree,this.followMouse=t?.followMouse||!1,this.isShow=typeof t?.isShow=="boolean"?t?.isShow:!0,this.strokeArmyAnts=t?.strokeArmyAnts||!1,this.strokeArmyAnts){const n=this.getAttr("stroke-dasharray","4 4");this.setAttr("stroke-dasharray",n),this.strokeDashTotalLength=Ti(n).reduce((i,r)=>i+r,0)}return Oa(this)}forceSetCXY(t,e){this.cX=t,this.cY=e,this.forceCXY=!0}shapeInit(){}initPathD(){if(!this.pathd){if(this.pathd=new xg,jt(()=>{this.pathd?.reset(this.originD||this.toSVGPathData(),this.originMatrix)}),this.pathd&&!this.forceCXY){const t=this.shapes.length==0?this.pathd.getBoundingClientRect():this.getBoundingClientRect();t&&(this.pathd.cX=this.cX=t.x+t.width/2-this.pathd.x,this.pathd.cY=this.cY=t.y+t.height/2-this.pathd.y)}this.shapeInit()}return this.pathd}frameStart(t){}frameUpdate(t,e){this.pathd=this.initPathD(),this.pathd.update(this),this.strokeArmyAnts&&(this.isMouseIn||(this.setAttr("stroke-dashoffset",String(this.strokeArmyAntsOffset++)),this.strokeArmyAntsOffset>this.strokeDashTotalLength&&(this.strokeArmyAntsOffset=0)))}frameEnd(t){}toSVGPathData(){return[]}toSVGPathD(){return this.pathd?.toSVGPathD()||""}toCanvasContext(t){this.usePathDtoCanvasContext=!0,this.pathd?.toCanvasContext(t)}getBoundingClientRect(){return this.pathd?.getBoundingClientRect()||null}get center(){const t=this.getBoundingClientRect(),e={x:this.x,y:this.y};return t&&(e.x=t.x+t.width/2,e.y=t.y+t.height/2),e}trim(){if(this.parent)return;const t=this.getBoundingClientRect();if(!t)return;this.shapes.forEach(n=>{const i=n.originMatrix?n.originMatrix.clone():new _t;i.translate(-t.x+n.x,-t.y+n.y),n.originMatrix=i});const e=this.originMatrix?this.originMatrix.clone():new _t;e.translate(-t.x+this.x,-t.y+this.y),this.originMatrix=e}isPointInPath(t,e,n){if(n instanceof Or)return n.isPointInPath(new Path2D(this.toSVGPathD()),t,e);let i;try{i=new SVGPoint(t,e)}catch{i=n.createSVGPoint(),i.x=t,i.y=e}if(this.el instanceof SVGGeometryElement)return this.el.isPointInFill(i);{const r=this.getBoundingClientRect();if(r)return t>=r.x&&t<=r.x+r.width&&e>=r.y&&e<=r.y+r.height}return!1}isPointInStroke(t,e,n){if(n instanceof Or)return n.isPointInStroke(new Path2D(this.toSVGPathD()),t,e);let i;try{i=new SVGPoint(t,e)}catch{i=n.createSVGPoint(),i.x=t,i.y=e}return this.el instanceof SVGGeometryElement?this.el.isPointInStroke(i):!1}clone(){return wa(this).copy(this)}copy(t){return this.id=t.id,this.originD=t.originD,this.originMatrix=t.originMatrix,this.independentTransformInGroup=t.independentTransformInGroup,this.x=t.x,this.y=t.y,this.cX=t.cX,this.cY=t.cY,this.degree=t.degree,this.scalarX=t.scalarX,this.scalarY=t.scalarY,this.diffXInGroup=t.diffXInGroup,this.diffYInGroup=t.diffYInGroup,this.diffDegreeInGroup=t.diffDegreeInGroup,this.diffScalarXInGroup=t.diffScalarXInGroup,this.diffScalarYInGroup=t.diffScalarYInGroup,this.vx=t.vx,this.vy=t.vy,this.ax=t.ax,this.ay=t.ay,this.mass=t.mass,this.attrs={...t.attrs},this.enableDrag=t.enableDrag,this.alongPath=t.alongPath,this.targetToAfterDragFree=t.targetToAfterDragFree,this.followMouse=t.followMouse,this.isShow=t.isShow,this.strokeArmyAnts=t.strokeArmyAnts,this.strokeDashTotalLength=t.strokeDashTotalLength,this}save(){}restore(){}setAttr(t,e){typeof t!="string"?Object.assign(this.attrs,Object.fromEntries(Object.entries(t).map(([n,i])=>[xt(n),i]))):e&&(this.attrs[xt(t)]=e)}getAttr(t,e){return this.attrs[t]||this.attrs[xt(t)]||e}getAttrs(){return this.attrs}hasAttr(t){return!!this.attrs[t]||!!this.attrs[xt(t)]}distance(t){return Me(this.x,this.y,t.x,t.y)}rotateTo(t){this.degree=Et(Jt(this.x,this.y,t.x,t.y))}followTo(t,e=3){this.rotateTo(t);const{dx:n,dy:i}=Ae(q(this.degree),e);this.vx=n,this.vy=i,this.run()}followAccelerationTo(t,e=.05){this.rotateTo(t);const{dx:n,dy:i}=Ae(q(this.degree),e);this.ax=n,this.ay=i,this.run()}checkCollision(t){}checkWall(t){}gravitateTo(t){const e=t.x-this.x,n=t.y-this.y,i=e*e+n*n,r=Math.sqrt(i),o=this.mass*t.mass/i,a=o*e/r,h=o*n/r;this.vx+=a/this.mass,this.vy+=h/this.mass,t.vx-=a/t.mass,t.vy-=h/t.mass}run(t){this.vx+=this.ax,this.vy+=this.ay;const e=qt(t?.gravity,0);this.vy+=e;const n=qt(t?.friction,1);this.vx*=n,this.vy*=n,this.x+=this.vx,this.y+=this.vy}runEaseTo(t,e){const n=qt(e?.easing,.05),i=t.x-this.cX-this.x,r=t.y-this.cY-this.y;this.vx=i*n,this.vy=r*n,this.run(e)}runSpringTo(t,e){const n=qt(e?.spring,.03);(Array.isArray(t)?t:[t]).forEach(i=>{const r=i.x-this.cX-this.x,o=i.y-this.cY-this.y,a=r*n,h=o*n;this.vx+=a,this.vy+=h}),this.run({friction:.9,...e})}springMassTo(t,e){const n=qt(e?.springLength,100),i=qt(e?.spring,1e-4),r=t.x-this.x,o=t.y-this.y,a=Math.sqrt(r*r+o*o);if(a<n){const h=r*i,c=o*i;return this.vx+=h/this.mass,this.vy+=c/this.mass,t.vx-=h/t.mass,t.vy-=c/t.mass,1-a/n}return 0}getTotalLength(){return this.initPathD().getTotalLength()}interpolate(t){return this.initPathD().interpolate(t)}getPointAtLength(t){return this.initPathD().getPointAtLength(t)}trailPath(t,e=0){const n=this.getTotalLength();return t.originD=this.initPathD().getSubpath(0,e*n),this.getPointAtLength(e*n)}strokeDashTween(t=1e3,e){const n=this.initPathD(),i=Z(n.getTotalLength(),0);this.setAttr({strokeDasharray:`${i} ${i}`,strokeDashoffset:`${i}`});const r=e?.onUpdate,o=new $n({frameDuration:t});o.addTween({offset:i},{offset:0},Object.assign(e||{},{onUpdate:(a,h)=>{this.setAttr("strokeDashoffset",""+Z(a.offset,2)),r?.(a,h)}})),o.play()}};class vg extends bg{x;y;z;fl;vpX;vpY;cX;cY;cZ;radius;constructor(t){super(t),this.x=t?.x||0,this.y=t?.y||0,this.z=t?.z||0,this.fl=t?.fl||250,this.vpX=t?.vpX||0,this.vpY=t?.vpY||0,this.cX=t?.cX||0,this.cY=t?.cY||0,this.cZ=t?.cZ||0,this.radius=t?.radius||0}toSVGPathData(){return this.radius?[["M",this.getScreenX(),this.getScreenY()-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",this.getScreenX(),this.getScreenY()]]}toCanvasContext(t){t.beginPath(),t.arc(0,0,this.radius,0,Math.PI*2,!0),t.closePath()}setVanishingPoint(t,e){this.vpX=t,this.vpY=e}setCenter(t,e,n){this.cX=t,this.cY=e,this.cZ=n}rotateX(t){({x:this.y,y:this.z}=Qt(q(t),this.y,this.z))}rotateY(t){({x:this.x,y:this.z}=Qt(q(t),this.x,this.z))}rotateZ(t){({x:this.x,y:this.y}=Qt(q(t),this.x,this.y))}getScreenX(){const t=this.fl/(this.fl+this.z+this.cZ);return this.vpX+(this.cX+this.x)*t}getScreenY(){const t=this.fl/(this.fl+this.z+this.cZ);return this.vpY+(this.cY+this.y)*t}eq(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.radius===t.radius&&this.mass===t.mass}length(){return pn(this.x,this.y,this.z)}distance(t){const e=t.x-this.x,n=t.y-this.y,i=t.z-this.z;return Math.sqrt(e*e+n*n+i*i)}scalar(t){return this.x*=t,this.y*=t,this.z*=t,this}normalize(t=1){const e=this.length();if(e){const n=t/e;this.scalar(n)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,n=this.y,i=this.z;return{x:n*t.z-i*t.y,y:i*t.x-e*t.z,z:e*t.y-n*t.x}}multiply(t){return{x:this.x*t.x,y:this.y*t.y,z:this.z*t.z}}div(t){return{x:this.x/t.x,y:this.y/t.y,z:this.z/t.z}}add(t){return{x:this.x+t.x,y:this.y+t.y,z:this.z+t.z}}sub(t){return{x:this.x-t.x,y:this.y-t.y,z:this.z-t.z}}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}reflect(t){const e=this.dot(t);return{x:this.x-2*e*t.x,y:this.y-2*e*t.y,z:this.z-2*e*t.z}}}const Us=vg;class Br{_x;_y;_z;_w;constructor(t=0,e=0,n=0,i=1){this._x=t,this._y=e,this._z=n,this._w=i}static slerpFlat(t,e,n,i,r,o,a){let h=n[i+0],c=n[i+1],u=n[i+2],l=n[i+3];const m=r[o+0],f=r[o+1],p=r[o+2],y=r[o+3];if(a===0){t[e+0]=h,t[e+1]=c,t[e+2]=u,t[e+3]=l;return}if(a===1){t[e+0]=m,t[e+1]=f,t[e+2]=p,t[e+3]=y;return}if(l!==y||h!==m||c!==f||u!==p){let v=1-a;const w=h*m+c*f+u*p+l*y,_=w>=0?1:-1,x=1-w*w;if(x>Number.EPSILON){const E=Math.sqrt(x),C=Math.atan2(E,w*_);v=Math.sin(v*C)/E,a=Math.sin(a*C)/E}const b=a*_;if(h=h*v+m*b,c=c*v+f*b,u=u*v+p*b,l=l*v+y*b,v===1-a){const E=1/Math.sqrt(h*h+c*c+u*u+l*l);h*=E,c*=E,u*=E,l*=E}}t[e]=h,t[e+1]=c,t[e+2]=u,t[e+3]=l}static multiplyQuaternionsFlat(t,e,n,i,r,o){const a=n[i],h=n[i+1],c=n[i+2],u=n[i+3],l=r[o],m=r[o+1],f=r[o+2],p=r[o+3];return t[e]=a*p+u*l+h*f-c*m,t[e+1]=h*p+u*m+c*l-a*f,t[e+2]=c*p+u*f+a*m-h*l,t[e+3]=u*p-a*l-h*m-c*f,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t=this._x,e=this._y,n=this._z,i=this._w){return this._x=t,this._y=e,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new Br(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){const n=t.x,i=t.y,r=t.z,o=t.order,a=Math.cos,h=Math.sin,c=a(n/2),u=a(i/2),l=a(r/2),m=h(n/2),f=h(i/2),p=h(r/2);switch(o){case"XYZ":this._x=m*u*l+c*f*p,this._y=c*f*l-m*u*p,this._z=c*u*p+m*f*l,this._w=c*u*l-m*f*p;break;case"YXZ":this._x=m*u*l+c*f*p,this._y=c*f*l-m*u*p,this._z=c*u*p-m*f*l,this._w=c*u*l+m*f*p;break;case"ZXY":this._x=m*u*l-c*f*p,this._y=c*f*l+m*u*p,this._z=c*u*p+m*f*l,this._w=c*u*l-m*f*p;break;case"ZYX":this._x=m*u*l-c*f*p,this._y=c*f*l+m*u*p,this._z=c*u*p-m*f*l,this._w=c*u*l+m*f*p;break;case"YZX":this._x=m*u*l+c*f*p,this._y=c*f*l+m*u*p,this._z=c*u*p-m*f*l,this._w=c*u*l-m*f*p;break;case"XZY":this._x=m*u*l-c*f*p,this._y=c*f*l-m*u*p,this._z=c*u*p+m*f*l,this._w=c*u*l+m*f*p;break;default:console.warn("Quaternion: .setFromEuler() encountered an unknown order: "+o)}return e===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const n=e/2,i=Math.sin(n);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix4(t){const e=t.value,n=e[0],i=e[4],r=e[8],o=e[1],a=e[5],h=e[9],c=e[2],u=e[6],l=e[10],m=n+a+l;if(m>0){const f=.5/Math.sqrt(m+1);this._w=.25/f,this._x=(u-h)*f,this._y=(r-c)*f,this._z=(o-i)*f}else if(n>a&&n>l){const f=2*Math.sqrt(1+n-a-l);this._w=(u-h)/f,this._x=.25*f,this._y=(i+o)/f,this._z=(r+c)/f}else if(a>l){const f=2*Math.sqrt(1+a-n-l);this._w=(r-c)/f,this._x=(i+o)/f,this._y=.25*f,this._z=(h+u)/f}else{const f=2*Math.sqrt(1+l-n-a);this._w=(o-i)/f,this._x=(r+c)/f,this._y=(h+u)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return n<Number.EPSILON?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(N(this.dot(t),-1,1)))}rotateTowards(t,e){const n=this.angleTo(t);if(n===0)return this;const i=Math.min(1,e/n);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const n=t._x,i=t._y,r=t._z,o=t._w,a=e._x,h=e._y,c=e._z,u=e._w;return this._x=n*u+o*a+i*c-r*h,this._y=i*u+o*h+r*a-n*c,this._z=r*u+o*c+n*h-i*a,this._w=o*u-n*a-i*h-r*c,this._onChangeCallback(),this}slerp(t,e){if(e===0)return this;if(e===1)return this.copy(t);const n=this._x,i=this._y,r=this._z,o=this._w;let a=o*t._w+n*t._x+i*t._y+r*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=i,this._z=r,this;const h=1-a*a;if(h<=Number.EPSILON){const f=1-e;return this._w=f*o+e*this._w,this._x=f*n+e*this._x,this._y=f*i+e*this._y,this._z=f*r+e*this._z,this.normalize(),this}const c=Math.sqrt(h),u=Math.atan2(c,a),l=Math.sin((1-e)*u)/c,m=Math.sin(e*u)/c;return this._w=o*l+this._w*m,this._x=n*l+this._x*m,this._y=i*l+this._y*m,this._z=r*l+this._z*m,this._onChangeCallback(),this}slerpQuaternions(t,e,n){return this.copy(t).slerp(e,n)}random(){const t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),n=Math.random(),i=Math.sqrt(1-n),r=Math.sqrt(n);return this.set(i*Math.sin(t),i*Math.cos(t),r*Math.sin(e),r*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class qn{x=0;y=0;constructor(t=0,e=0){this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t=0,e=0){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}copy(t){return this.x=t.x,this.y=t.y,this}clone(){return new qn(this.x,this.y)}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,n=this.y;return this.x=t.m11*e+t.m21*n+t.m31,this.y=t.m12*e+t.m22*n+t.m32,this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=N(this.x,t.x,e.x),this.y=N(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=N(this.x,t,e),this.y=N(this.y,t,e),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(N(n,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}perpendOnVector(t){return gc.copy(this).projectOnVector(t),this.sub(gc)}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}lengthSq(){return this.x*this.x+this.y*this.y}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(N(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y;return e*e+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const n=Math.cos(e),i=Math.sin(e),r=this.x-t.x,o=this.y-t.y;return this.x=r*n-o*i+t.x,this.y=r*i+o*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class zt{x=0;y=0;z=0;constructor(t=0,e=0,n=0){this.x=t,this.y=e,this.z=n}set(t=0,e=0,n=0){return this.x=t,this.y=e,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new zt(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(yc.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(yc.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,n=this.y,i=this.z,r=t.value;return this.x=r[0]*e+r[3]*n+r[6]*i,this.y=r[1]*e+r[4]*n+r[7]*i,this.z=r[2]*e+r[5]*n+r[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=t.value,o=1/(r[3]*e+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*e+r[4]*n+r[8]*i+r[12])*o,this.y=(r[1]*e+r[5]*n+r[9]*i+r[13])*o,this.z=(r[2]*e+r[6]*n+r[10]*i+r[14])*o,this}applyQuaternion(t){const e=this.x,n=this.y,i=this.z,r=t.x,o=t.y,a=t.z,h=t.w,c=2*(o*i-a*n),u=2*(a*e-r*i),l=2*(r*n-o*e);return this.x=e+h*c+o*l-a*u,this.y=n+h*u+a*c-r*l,this.z=i+h*l+r*u-o*c,this}transformDirection(t){const e=this.x,n=this.y,i=this.z,r=t.value;return this.x=r[0]*e+r[4]*n+r[8]*i,this.y=r[1]*e+r[5]*n+r[9]*i,this.z=r[2]*e+r[6]*n+r[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=N(this.x,t.x,e.x),this.y=N(this.y,t.y,e.y),this.z=N(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=N(this.x,t,e),this.y=N(this.y,t,e),this.z=N(this.z,t,e),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(N(n,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const n=t.x,i=t.y,r=t.z,o=e.x,a=e.y,h=e.z;return this.x=i*h-r*a,this.y=r*o-n*h,this.z=n*a-i*o,this}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}perpendOnVector(t){return Yr.copy(this).projectOnVector(t),this.sub(Yr)}projectOnPlane(t){return this.perpendOnVector(t)}reflect(t){return this.sub(Yr.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(N(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return e*e+n*n+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromMatrix4Position(t){const e=t.value;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrix4Scale(t){const e=this.setFromMatrix4Column(t,0).length(),n=this.setFromMatrix4Column(t,1).length(),i=this.setFromMatrix4Column(t,2).length();return this.x=e,this.y=n,this.z=i,this}setFromMatrix4Column(t,e){return this.fromArray(t.value,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.value,e*3)}setFromEuler(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,e=Math.random()*2-1,n=Math.sqrt(1-e*e);return this.x=n*Math.cos(t),this.y=e,this.z=n*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}class Fr{x=0;y=0;z=0;w=1;constructor(t=0,e=0,n=0,i=1){this.x=t,this.y=e,this.z=n,this.w=i}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t=0,e=0,n=0,i=1){return this.x=t,this.y=e,this.z=n,this.w=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new Fr(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=this.w,o=t.value;return this.x=o[0]*e+o[4]*n+o[8]*i+o[12]*r,this.y=o[1]*e+o[5]*n+o[9]*i+o[13]*r,this.z=o[2]*e+o[6]*n+o[10]*i+o[14]*r,this.w=o[3]*e+o[7]*n+o[11]*i+o[15]*r,this}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this.w/=t.w,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix4(t){let e,n,i,r;const h=t.value,c=h[0],u=h[4],l=h[8],m=h[1],f=h[5],p=h[9],y=h[2],v=h[6],w=h[10];if(Math.abs(u-m)<.01&&Math.abs(l-y)<.01&&Math.abs(p-v)<.01){if(Math.abs(u+m)<.1&&Math.abs(l+y)<.1&&Math.abs(p+v)<.1&&Math.abs(c+f+w-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;const x=(c+1)/2,b=(f+1)/2,E=(w+1)/2,C=(u+m)/4,L=(l+y)/4,B=(p+v)/4;return x>b&&x>E?x<.01?(n=0,i=.707106781,r=.707106781):(n=Math.sqrt(x),i=C/n,r=L/n):b>E?b<.01?(n=.707106781,i=0,r=.707106781):(i=Math.sqrt(b),n=C/i,r=B/i):E<.01?(n=.707106781,i=.707106781,r=0):(r=Math.sqrt(E),n=L/r,i=B/r),this.set(n,i,r,e),this}let _=Math.sqrt((v-p)*(v-p)+(l-y)*(l-y)+(m-u)*(m-u));return Math.abs(_)<.001&&(_=1),this.x=(v-p)/_,this.y=(l-y)/_,this.z=(m-u)/_,this.w=Math.acos((c+f+w-1)/2),this}setFromMatrix4Position(t){const e=t.value;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=N(this.x,t.x,e.x),this.y=N(this.y,t.y,e.y),this.z=N(this.z,t.z,e.z),this.w=N(this.w,t.w,e.w),this}clampScalar(t,e){return this.x=N(this.x,t,e),this.y=N(this.y,t,e),this.z=N(this.z,t,e),this.w=N(this.w,t,e),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(N(n,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0,1);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this.w=t.w+(e.w-t.w)*n,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}const gc=new qn,Yr=new zt,yc=new Br,jn=2e3,$r=2001,wc=[1,0,0,1],xc=[1,0,0,1,0,0],bc=[1,0,0,0,1,0,0,0,1],vc=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];class Xr{value;constructor(t=wc){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m21(){return this.value[2]}get m22(){return this.value[3]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m21(t){this.value[2]=t}set m22(t){this.value[3]=t}set(t=1,e=0,n=0,i=1){return this.m11=t,this.m21=e,this.m12=n,this.m22=i,this}identity(){return this.value=Array.from(wc),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m21==0&&this.m22==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m21=t.m21,this.m22=t.m22,this}clone(){return new Xr(this.value)}fromArray(t,e=0){for(let n=0;n<4;n++)this.value[n]=t[n+e];return this}toArray(t=[],e=0){return t[e]=this.m11,t[e+1]=this.m12,t[e+2]=this.m21,t[e+3]=this.m22,t}multiplyMatrices(t,e){const n=t.value,i=e.value,r=this.value,o=n[0],a=n[2],h=n[1],c=n[3],u=i[0],l=i[2],m=i[1],f=i[3];return r[0]=o*u+a*m,r[2]=o*l+a*f,r[1]=h*u+c*m,r[3]=h*l+c*f,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m21*=t,this.m22*=t,this}determinant(){return this.m11*this.m22-this.m21*this.m12}}class gn{value;constructor(t=bc){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this.value[2]}get m21(){return this.value[3]}get m22(){return this.value[4]}get m23(){return this.value[5]}get m31(){return this.value[6]}get m32(){return this.value[7]}get m33(){return this.value[8]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this.value[2]=t}set m21(t){this.value[3]=t}set m22(t){this.value[4]=t}set m23(t){this.value[5]=t}set m31(t){this.value[6]=t}set m32(t){this.value[7]=t}set m33(t){this.value[8]=t}set(t=1,e=0,n=0,i=0,r=1,o=0,a=0,h=0,c=1){const u=this.value;return u[0]=t,u[1]=i,u[2]=a,u[3]=e,u[4]=r,u[5]=h,u[6]=n,u[7]=o,u[8]=c,this}identity(){return this.value=Array.from(bc),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m31==0&&this.m32==0&&this.m33==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m13=t.m13,this.m21=t.m21,this.m22=t.m22,this.m23=t.m23,this.m31=t.m31,this.m32=t.m32,this.m33=t.m33,this}clone(){return new gn(this.value)}fromArray(t,e=0){for(let n=0;n<9;n++)this.value[n]=t[n+e];return this}toArray(t=[],e=0){return t[e]=this.m11,t[e+1]=this.m12,t[e+2]=this.m13,t[e+3]=this.m21,t[e+4]=this.m22,t[e+5]=this.m23,t[e+6]=this.m31,t[e+7]=this.m32,t[e+8]=this.m33,t}extractBasis(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){return this.set(t.m11,t.m21,t.m31,t.m12,t.m22,t.m32,t.m13,t.m23,t.m33),this}multiplyMatrices(t,e){const n=t.value,i=e.value,r=this.value,o=n[0],a=n[3],h=n[6],c=n[1],u=n[4],l=n[7],m=n[2],f=n[5],p=n[8],y=i[0],v=i[3],w=i[6],_=i[1],x=i[4],b=i[7],E=i[2],C=i[5],L=i[8];return r[0]=o*y+a*_+h*E,r[3]=o*v+a*x+h*C,r[6]=o*w+a*b+h*L,r[1]=c*y+u*_+l*E,r[4]=c*v+u*x+l*C,r[7]=c*w+u*b+l*L,r[2]=m*y+f*_+p*E,r[5]=m*v+f*x+p*C,r[8]=m*w+f*b+p*L,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m31*=t,this.m32*=t,this.m33*=t,this}determinant(){const t=this.value,e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],h=t[6],c=t[7],u=t[8];return e*o*u-e*a*c-n*r*u+n*a*h+i*r*c-i*o*h}invert(){const t=this.value,e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],h=t[6],c=t[7],u=t[8],l=u*o-a*c,m=a*h-u*r,f=c*r-o*h,p=e*l+n*m+i*f;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);const y=1/p;return t[0]=l*y,t[1]=(i*c-u*n)*y,t[2]=(a*n-i*o)*y,t[3]=m*y,t[4]=(u*e-i*h)*y,t[5]=(i*r-a*e)*y,t[6]=f*y,t[7]=(n*h-c*e)*y,t[8]=(o*e-n*r)*y,this}transpose(){let t;const e=this.value;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.value;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,n,i,r,o,a){const h=Math.cos(r),c=Math.sin(r);return this.set(n*h,n*c,-n*(h*o+c*a)+o+t,-i*c,i*h,-i*(-c*o+h*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(Ur.makeScale(t,e)),this}rotate(t){return this.premultiply(Ur.makeRotation(-t)),this}translate(t,e){return this.premultiply(Ur.makeTranslation(t,e)),this}makeTranslation(t,e){return typeof t=="number"?this.set(1,0,t,0,1,e,0,0,1):this.set(1,0,t.x,0,1,t.y,0,0,1),this}makeRotation(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,n,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){for(let e=0;e<9;e++)if(this.value[e]!==t.value[e])return!1;return!0}}class It{value;is3dSpecial=!1;constructor(t=vc){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this.value[2]}get m14(){return this.value[3]}get m21(){return this.value[4]}get m22(){return this.value[5]}get m23(){return this.value[6]}get m24(){return this.value[7]}get m31(){return this.value[8]}get m32(){return this.value[9]}get m33(){return this.value[10]}get m34(){return this.value[11]}get m41(){return this.value[12]}get m42(){return this.value[13]}get m43(){return this.value[14]}get m44(){return this.value[15]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this.value[2]=t}set m14(t){this.value[3]=t}set m21(t){this.value[4]=t}set m22(t){this.value[5]=t}set m23(t){this.value[6]=t}set m24(t){this.value[7]=t}set m31(t){this.value[8]=t}set m32(t){this.value[9]=t}set m33(t){this.value[10]=t}set m34(t){this.value[11]=t}set m41(t){this.value[12]=t}set m42(t){this.value[13]=t}set m43(t){this.value[14]=t}set m44(t){this.value[15]=t}set(t=1,e=0,n=0,i=0,r=0,o=1,a=0,h=0,c=0,u=0,l=1,m=0,f=0,p=0,y=0,v=1){const w=this.value;return w[0]=t,w[4]=e,w[8]=n,w[12]=i,w[1]=r,w[5]=o,w[9]=a,w[13]=h,w[2]=c,w[6]=u,w[10]=l,w[14]=m,w[3]=f,w[7]=p,w[11]=y,w[15]=v,this}is2D(){return!this.is3dSpecial&&this.m31==0&&this.m32==0&&this.m33==1&&this.m34==0&&this.m43==0&&this.m44==1}is3D(){return!this.is2D()}identity(){return this.value=Array.from(vc),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m14==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m24==0&&this.m31==0&&this.m32==0&&this.m33==1&&this.m34==0&&this.m41==0&&this.m42==0&&this.m43==0&&this.m44==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m13=t.m13,this.m14=t.m14,this.m21=t.m21,this.m22=t.m22,this.m23=t.m23,this.m24=t.m24,this.m31=t.m31,this.m32=t.m32,this.m33=t.m33,this.m34=t.m34,this.m41=t.m41,this.m42=t.m42,this.m43=t.m43,this.m44=t.m44,this}clone(){return new It(this.value)}static fromString(t){const e=new It,n=da("number",t);return n.length===16&&n.forEach((i,r)=>{i.fullMatch&&(e.value[r]=parseFloat(i.fullMatch))}),e}fromArray(t,e=0){for(let n=0;n<16;n++)this.value[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.value;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}copyPosition(t){const e=this.value,n=t.value;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this}setFromMatrix3(t){const e=t.value;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,n){return t.setFromMatrix4Column(this,0),e.setFromMatrix4Column(this,1),n.setFromMatrix4Column(this,2),this}makeBasis(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this}normalize(){return this.multiplyScalar(1/(this.m44||1e-4))}transformPoint(t){const e=t.z||1,n=t.w||1;return{x:t.x*this.m11+t.y*this.m21+e*this.m31+n*this.m41,y:t.x*this.m12+t.y*this.m22+e*this.m32+n*this.m42,z:t.x*this.m13+t.y*this.m23+e*this.m33+n*this.m43,w:t.x*this.m14+t.y*this.m24+e*this.m34+n*this.m44}}toMatrix(t){const{scalarX:e,scalarY:n,skewX:i,skewY:r,x:o,y:a}=this.split(),h=[e,r,i,n,o,a];return t?(t.value=h,t):new _t(h)}flatten(){return this.m31=0,this.m32=0,this.m33=1,this.m34=0,this.m14=0,this.m24=0,this.m43=0,this.m44=1,this}toString(t=6){return`matrix3d(${this.value.map(e=>Z(e,t)).join(",")})`}split(){const t=Math.sqrt(this.m11*this.m11+this.m12*this.m12+this.m13*this.m13),e=Math.sqrt(this.m21*this.m21+this.m22*this.m22+this.m23*this.m23),n=Math.sqrt(this.m31*this.m31+this.m32*this.m32+this.m33*this.m33),i=Et(N(Math.asin(-this.m13),-1,1));let r=Et(Math.atan2(this.m23,this.m33));Math.cos(q(i))===0&&(r=Et(Math.atan2(-this.m31,this.m22)));let o=Et(Math.atan2(this.m12,this.m11));return this.m11<0&&this.m22>=0&&(o+=180),{x:this.m41,y:this.m42,z:this.m43,scalarX:t,scalarY:e,scalarZ:n,degreeX:r,degreeY:i,degreeZ:o,skewX:Et(this.m14),skewY:Et(this.m24),skewZ:Et(this.m34),skewW:this.m44,perspective:this.m34?-(1/this.m34):0}}extractRotation(t){const e=this.value,n=t.value,i=1/yn.setFromMatrix4Column(t,0).length(),r=1/yn.setFromMatrix4Column(t,1).length(),o=1/yn.setFromMatrix4Column(t,2).length();return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=0,e[4]=n[4]*r,e[5]=n[5]*r,e[6]=n[6]*r,e[7]=0,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.value,n=t.x,i=t.y,r=t.z,o=Math.cos(n),a=Math.sin(n),h=Math.cos(i),c=Math.sin(i),u=Math.cos(r),l=Math.sin(r);if(t.order==="XYZ"){const m=o*u,f=o*l,p=a*u,y=a*l;e[0]=h*u,e[4]=-h*l,e[8]=c,e[1]=f+p*c,e[5]=m-y*c,e[9]=-a*h,e[2]=y-m*c,e[6]=p+f*c,e[10]=o*h}else if(t.order==="YXZ"){const m=h*u,f=h*l,p=c*u,y=c*l;e[0]=m+y*a,e[4]=p*a-f,e[8]=o*c,e[1]=o*l,e[5]=o*u,e[9]=-a,e[2]=f*a-p,e[6]=y+m*a,e[10]=o*h}else if(t.order==="ZXY"){const m=h*u,f=h*l,p=c*u,y=c*l;e[0]=m-y*a,e[4]=-o*l,e[8]=p+f*a,e[1]=f+p*a,e[5]=o*u,e[9]=y-m*a,e[2]=-o*c,e[6]=a,e[10]=o*h}else if(t.order==="ZYX"){const m=o*u,f=o*l,p=a*u,y=a*l;e[0]=h*u,e[4]=p*c-f,e[8]=m*c+y,e[1]=h*l,e[5]=y*c+m,e[9]=f*c-p,e[2]=-c,e[6]=a*h,e[10]=o*h}else if(t.order==="YZX"){const m=o*h,f=o*c,p=a*h,y=a*c;e[0]=h*u,e[4]=y-m*l,e[8]=p*l+f,e[1]=l,e[5]=o*u,e[9]=-a*u,e[2]=-c*u,e[6]=f*l+p,e[10]=m-y*l}else if(t.order==="XZY"){const m=o*h,f=o*c,p=a*h,y=a*c;e[0]=h*u,e[4]=-l,e[8]=c*u,e[1]=m*l+y,e[5]=o*u,e[9]=f*l-p,e[2]=p*l-f,e[6]=a*u,e[10]=y*l+m}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(_g,t,Sg)}lookAt(t,e,n){const i=this.value;return Nt.subVectors(t,e),Nt.lengthSq()===0&&(Nt.z=1),Nt.normalize(),Ie.crossVectors(n,Nt),Ie.lengthSq()===0&&(Math.abs(n.z)===1?Nt.x+=1e-4:Nt.z+=1e-4,Nt.normalize(),Ie.crossVectors(n,Nt)),Ie.normalize(),Vs.crossVectors(Nt,Ie),i[0]=Ie.x,i[4]=Vs.x,i[8]=Nt.x,i[1]=Ie.y,i[5]=Vs.y,i[9]=Nt.y,i[2]=Ie.z,i[6]=Vs.z,i[10]=Nt.z,this}multiplyMatrices(t,e){const n=t.value,i=e.value,r=this.value,o=n[0],a=n[4],h=n[8],c=n[12],u=n[1],l=n[5],m=n[9],f=n[13],p=n[2],y=n[6],v=n[10],w=n[14],_=n[3],x=n[7],b=n[11],E=n[15],C=i[0],L=i[4],B=i[8],F=i[12],U=i[1],G=i[5],J=i[9],st=i[13],K=i[2],Kt=i[6],Yt=i[10],Ut=i[14],te=i[3],R=i[7],D=i[11],$=i[15];return r[0]=o*C+a*U+h*K+c*te,r[4]=o*L+a*G+h*Kt+c*R,r[8]=o*B+a*J+h*Yt+c*D,r[12]=o*F+a*st+h*Ut+c*$,r[1]=u*C+l*U+m*K+f*te,r[5]=u*L+l*G+m*Kt+f*R,r[9]=u*B+l*J+m*Yt+f*D,r[13]=u*F+l*st+m*Ut+f*$,r[2]=p*C+y*U+v*K+w*te,r[6]=p*L+y*G+v*Kt+w*R,r[10]=p*B+y*J+v*Yt+w*D,r[14]=p*F+y*st+v*Ut+w*$,r[3]=_*C+x*U+b*K+E*te,r[7]=_*L+x*G+b*Kt+E*R,r[11]=_*B+x*J+b*Yt+E*D,r[15]=_*F+x*st+b*Ut+E*$,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m14*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m24*=t,this.m31*=t,this.m32*=t,this.m33*=t,this.m34*=t,this}determinant(){const t=this.value,e=t[0],n=t[4],i=t[8],r=t[12],o=t[1],a=t[5],h=t[9],c=t[13],u=t[2],l=t[6],m=t[10],f=t[14],p=t[3],y=t[7],v=t[11],w=t[15];return p*(+r*h*l-i*c*l-r*a*m+n*c*m+i*a*f-n*h*f)+y*(+e*h*f-e*c*m+r*o*m-i*o*f+i*c*u-r*h*u)+v*(+e*c*l-e*a*f-r*o*l+n*o*f+r*a*u-n*c*u)+w*(-i*a*u-e*h*l+e*a*m+i*o*l-n*o*m+n*h*u)}transpose(){const t=this.value;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,n){const i=this.value;return t instanceof zt?(i[12]=t.x,i[13]=t.y,i[14]=t.z):typeof t=="number"&&typeof e=="number"&&typeof n=="number"&&(i[12]=t,i[13]=e,i[14]=n),this}invert(){const t=this.value,e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],h=t[6],c=t[7],u=t[8],l=t[9],m=t[10],f=t[11],p=t[12],y=t[13],v=t[14],w=t[15],_=l*v*c-y*m*c+y*h*f-a*v*f-l*h*w+a*m*w,x=p*m*c-u*v*c-p*h*f+o*v*f+u*h*w-o*m*w,b=u*y*c-p*l*c+p*a*f-o*y*f-u*a*w+o*l*w,E=p*l*h-u*y*h-p*a*m+o*y*m+u*a*v-o*l*v,C=e*_+n*x+i*b+r*E;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const L=1/C;return t[0]=_*L,t[1]=(y*m*r-l*v*r-y*i*f+n*v*f+l*i*w-n*m*w)*L,t[2]=(a*v*r-y*h*r+y*i*c-n*v*c-a*i*w+n*h*w)*L,t[3]=(l*h*r-a*m*r-l*i*c+n*m*c+a*i*f-n*h*f)*L,t[4]=x*L,t[5]=(u*v*r-p*m*r+p*i*f-e*v*f-u*i*w+e*m*w)*L,t[6]=(p*h*r-o*v*r-p*i*c+e*v*c+o*i*w-e*h*w)*L,t[7]=(o*m*r-u*h*r+u*i*c-e*m*c-o*i*f+e*h*f)*L,t[8]=b*L,t[9]=(p*l*r-u*y*r-p*n*f+e*y*f+u*n*w-e*l*w)*L,t[10]=(o*y*r-p*a*r+p*n*c-e*y*c-o*n*w+e*a*w)*L,t[11]=(u*a*r-o*l*r-u*n*c+e*l*c+o*n*f-e*a*f)*L,t[12]=E*L,t[13]=(u*y*i-p*l*i+p*n*m-e*y*m-u*n*v+e*l*v)*L,t[14]=(p*a*i-o*y*i-p*n*h+e*y*h+o*n*v-e*a*v)*L,t[15]=(o*l*i-u*a*i+u*n*h-e*l*h-o*n*m+e*a*m)*L,this}getMaxScaleOnAxis(){const t=this.value,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,i))}makeTranslation(t,e,n){return t instanceof zt?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const n=Math.cos(e),i=Math.sin(e),r=1-n,o=t.x,a=t.y,h=t.z,c=r*o,u=r*a;return this.set(c*o+n,c*a-i*h,c*h+i*a,0,c*a+i*h,u*a+n,u*h-i*o,0,c*h-i*a,u*h+i*o,r*h*h+n,0,0,0,0,1),this}makeScale(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,e,n,i,r,o){return this.set(1,n,r,0,t,1,o,0,e,i,1,0,0,0,0,1),this}makePerspective(t,e,n,i,r,o,a=jn){const h=this.value,c=2*r/(e-t),u=2*r/(n-i),l=(e+t)/(e-t),m=(n+i)/(n-i);let f,p;if(a===jn)f=-(o+r)/(o-r),p=-2*o*r/(o-r);else if(a===$r)f=-o/(o-r),p=-o*r/(o-r);else throw new Error("Matrix4.makePerspective(): Invalid coordinate system: "+a);return h[0]=c,h[4]=0,h[8]=l,h[12]=0,h[1]=0,h[5]=u,h[9]=m,h[13]=0,h[2]=0,h[6]=0,h[10]=f,h[14]=p,h[3]=0,h[7]=0,h[11]=-1,h[15]=0,this}makeOrthographic(t,e,n,i,r,o,a=jn){const h=this.value,c=1/(e-t),u=1/(n-i),l=1/(o-r),m=(e+t)*c,f=(n+i)*u;let p,y;if(a===jn)p=(o+r)*l,y=-2*l;else if(a===$r)p=r*l,y=-1*l;else throw new Error("Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return h[0]=2*c,h[4]=0,h[8]=0,h[12]=-m,h[1]=0,h[5]=2*u,h[9]=0,h[13]=-f,h[2]=0,h[6]=0,h[10]=y,h[14]=-p,h[3]=0,h[7]=0,h[11]=0,h[15]=1,this}compose(t,e,n){const i=this.value,r=e.x,o=e.y,a=e.z,h=e.w,c=r+r,u=o+o,l=a+a,m=r*c,f=r*u,p=r*l,y=o*u,v=o*l,w=a*l,_=h*c,x=h*u,b=h*l,E=n.x,C=n.y,L=n.z;return i[0]=(1-(y+w))*E,i[1]=(f+b)*E,i[2]=(p-x)*E,i[3]=0,i[4]=(f-b)*C,i[5]=(1-(m+w))*C,i[6]=(v+_)*C,i[7]=0,i[8]=(p+x)*L,i[9]=(v-_)*L,i[10]=(1-(m+y))*L,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this}decompose(t,e,n){const i=this.value;let r=yn.set(i[0],i[1],i[2]).length();const o=yn.set(i[4],i[5],i[6]).length(),a=yn.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),t.x=i[12],t.y=i[13],t.z=i[14],Zt.copy(this);const c=1/r,u=1/o,l=1/a;return Zt.value[0]*=c,Zt.value[1]*=c,Zt.value[2]*=c,Zt.value[4]*=u,Zt.value[5]*=u,Zt.value[6]*=u,Zt.value[8]*=l,Zt.value[9]*=l,Zt.value[10]*=l,e.setFromRotationMatrix4(Zt),n.x=r,n.y=o,n.z=a,this}equals(t){for(let e=0;e<16;e++)if(this.value[e]!==t.value[e])return!1;return!0}translate(t=0,e=0,n=0){return this.multiply(new It([1,0,0,0,0,1,0,0,0,0,1,0,t,e,n,1]))}scale(t=1,e=1,n=1){return this.multiply(new It([t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1]))}scaleVector3(t){const e=this.value,n=t.x,i=t.y,r=t.z;return e[0]*=n,e[4]*=i,e[8]*=r,e[1]*=n,e[5]*=i,e[9]*=r,e[2]*=n,e[6]*=i,e[10]*=r,e[3]*=n,e[7]*=i,e[11]*=r,this}rotateX(t){const e=q(t),n=Math.cos(e),i=Math.sin(e);return this.multiply(new It([1,0,0,0,0,n,i,0,0,-i,n,0,0,0,0,1]))}rotateY(t){const e=q(t),n=Math.cos(e),i=Math.sin(e);return this.multiply(new It([n,0,-i,0,0,1,0,0,i,0,n,0,0,0,0,1]))}rotateZ(t){this.is3dSpecial=!0;const e=q(t),n=Math.cos(e),i=Math.sin(e);return this.multiply(new It([n,i,0,0,-i,n,0,0,0,0,1,0,0,0,0,1]))}skew(t=0,e=0,n=0){return this.multiply(new It([1,0,0,q(t),0,1,0,q(e),0,0,1,q(n),0,0,0,1]))}perspective(t){return this.multiply(new It([1,0,0,0,0,1,0,0,0,0,1,t?-(1/t):0,0,0,0,1]))}unproject(t){let e=t.x*this.m11+t.y*this.m21+this.m41,n=t.x*this.m12+t.y*this.m22+this.m42,i=t.x*this.m13+t.y*this.m23+this.m43,r=t.x*this.m14+t.y*this.m24+this.m44,o=e+this.m31,a=n+this.m32,h=i+this.m33,c=r+this.m34;r==0&&(r=1e-4),e/=r,n/=r,i/=r,c==0&&(c=1e-4),o/=c,a/=c,h/=c;const u=h-i;if(u==0)return{x:e,y:n,z:i,mass:r};const l=-i/u;return e+=l*(o-e),n+=l*(a-n),{x:e,y:n,z:i,mass:r}}project(t){const e=t.z;let n=t.x*this.m11+t.y*this.m21+e*this.m31+this.m41,i=t.x*this.m12+t.y*this.m22+e*this.m32+this.m42,r=t.x*this.m14+t.y*this.m24+e*this.m34+this.m44;return r==0&&(r=1e-4),n/=r,i/=r,r<0&&(n-=this.m41,i-=this.m42,n*=1/r,i*=1/r,n+=this.m41,i+=this.m42),{x:n,y:i,z:e,mass:r}}bounds(t,e,n,i){const r=new Us({x:t,y:e}),o=new Us({x:t+n,y:e}),a=new Us({x:t+n,y:e+i}),h=new Us({x:t,y:e+i});({x:r.x,y:r.y,z:r.z,mass:r.mass}=this.project(r)),{x:o.x,y:o.y,z:o.z,mass:o.mass}=this.project(o),{x:a.x,y:a.y,z:a.z,mass:a.mass}=this.project(a),{x:h.x,y:h.y,z:h.z,mass:h.mass}=this.project(h);const c=Math.min(r.x,o.x,a.x,h.x),u=Math.min(r.y,o.y,a.y,h.y),l=Math.max(r.x,o.x,a.x,h.x)-c,m=Math.max(r.y,o.y,a.y,h.y)-u;return{x:c,y:u,width:l,height:m}}}class _t{value;_m13=0;_m23=0;_m33=1;matrix4;constructor(t=xc){this.value=Array.from(t),this.matrix4=this.toMatrix4()}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this._m13}get m21(){return this.value[2]}get m22(){return this.value[3]}get m23(){return this._m23}get m31(){return this.value[4]}get m32(){return this.value[5]}get m33(){return this._m33}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this._m13=t}set m21(t){this.value[2]=t}set m22(t){this.value[3]=t}set m23(t){this._m23=t}set m31(t){this.value[4]=t}set m32(t){this.value[5]=t}set m33(t){this._m33=t}static fromString(t){const e=new _t,n=da("number",t);return n.length===6&&n.forEach((i,r)=>{i.fullMatch&&(e.value[r]=parseFloat(i.fullMatch))}),e}toMatrix4(t=this.matrix4){const e=[this.m11,this.m12,0,this.m13,this.m21,this.m22,0,this.m23,0,0,1,0,this.m31,this.m32,0,this.m33];return t?(t.value=e,t):new It(e)}identity(){return this.value=Array.from(xc),this.m13=0,this.m23=0,this.m33=1,this.matrix4=this.toMatrix4(),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m31==0&&this.m32==0&&this.m33==1}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m31*=t,this.m32*=t,this.m33*=t,this}normalize(){const t=this.m33||1e-4;return this.multiplyScalar(1/t)}transformPoint(t){const e=t.z||1;return{x:t.x*this.m11+t.y*this.m21+e*this.m31,y:t.x*this.m12+t.y*this.m22+e*this.m32,z:t.x*this.m13+t.y*this.m23+e*this.m33}}clone(){return new _t(this.value)}multiply(t){const e=this.clone(),n=t instanceof _t?t:new _t(t);return this.m11=n.m11*e.m11+n.m12*e.m21+n.m13*e.m31,this.m12=n.m11*e.m12+n.m12*e.m22+n.m13*e.m32,this.m13=n.m11*e.m13+n.m12*e.m23+n.m13*e.m33,this.m21=n.m21*e.m11+n.m22*e.m21+n.m23*e.m31,this.m22=n.m21*e.m12+n.m22*e.m22+n.m23*e.m32,this.m23=n.m21*e.m13+n.m22*e.m23+n.m23*e.m33,this.m31=n.m31*e.m11+n.m32*e.m21+n.m33*e.m31,this.m32=n.m31*e.m12+n.m32*e.m22+n.m33*e.m32,this.m33=n.m31*e.m13+n.m32*e.m23+n.m33*e.m33,this}append(t){return this.multiply(t)}prepend(t){return t.multiply(this),this}invert(){const t=this.m11,e=this.m12,n=this.m13,i=this.m21,r=this.m22,o=this.m23,a=this.m31,h=this.m32,c=this.m33,u=c*r-o*h,l=-c*i+o*a,m=h*i-r*a;let f=t*u+e*l+n*m;return f?(f=1/f,this.m11=u*f,this.m12=(-c*e+n*h)*f,this.m13=(o*e-n*r)*f,this.m21=l*f,this.m22=(c*t-n*a)*f,this.m23=(-o*t+n*i)*f,this.m31=m*f,this.m32=(-h*t+e*a)*f,this.m33=(r*t-e*i)*f,this):null}adjugate(){const t=new _t;return t.m11=this.m22*this.m33-this.m32*this.m23,t.m12=this.m32*this.m13-this.m12*this.m33,t.m13=this.m12*this.m23-this.m22*this.m13,t.m21=this.m31*this.m23-this.m21*this.m33,t.m22=this.m11*this.m33-this.m31*this.m13,t.m23=this.m21*this.m13-this.m11*this.m23,t.m31=this.m21*this.m32-this.m31*this.m22,t.m32=this.m31*this.m12-this.m11*this.m32,t.m33=this.m11*this.m22-this.m21*this.m12,t}split(){let t=Et(Math.atan2(this.m12,this.m11));return this.m11<0&&this.m22>=0&&(t+=180),{x:this.m31,y:this.m32,degree:t,scaleX:Math.sqrt(this.m11*this.m11+this.m12*this.m12),scaleY:Math.sqrt(this.m21*this.m21+this.m22*this.m22),skewX:Et(Math.atan2(-this.m21,this.m22)),skewY:Et(Math.atan2(this.m12,this.m11))}}getGroupCoords(t){const e=this.value[0],n=this.value[1],i=this.value[2],r=this.value[3],o=this.value[4],a=this.value[5],h=t.value[0],c=t.value[1],u=t.value[2],l=t.value[3],m=t.value[4],f=t.value[5],p=h*l,y=c*u,v=(u*n-e*l)/(y-p),w=(h*n-e*c)/(p-y),_=(u*r-i*l)/(y-p),x=(h*r-i*c)/(p-y),b=(u*(a-f)+l*(m-o))/(y-p),E=(h*(a-f)+c*(m-o))/(p-y),C=[v,w,_,x,b,E];return new _t(C)}toString(t=6){return this.matrix4.is2D()?`matrix(${this.value.map(e=>Z(e,t)).join(",")})`:this.matrix4.toString()}translate(t,e){return this.multiply([1,0,0,1,t,e]),this.toMatrix4(),this}translateTo(t,e){return this.translate(t-this.m31,e-this.m32)}translateX(t){return this.translate(t,0)}translateXTo(t){return this.translateTo(t,this.m32)}translateY(t){return this.translate(0,t)}translateYTo(t){return this.translateTo(this.m31,t)}translateZ(t){return this.matrix4.translate(0,0,t),this.matrix4.toMatrix(this),this}translateZTo(t){return this.translateZ(t-this.matrix4.m43),this}translate3d(t,e,n){return this.matrix4.translate(t,e,n),this.matrix4.toMatrix(this),this}translate3dTo(t,e,n){return this.translate3d(t-this.matrix4.m41,e-this.matrix4.m42,n-this.matrix4.m43),this}rotate(t,e=0,n=0){const i=q(t),r=Math.cos(i),o=Math.sin(i);return this.translate(e,n),this.multiply([r,o,-o,r,0,0]),this.translate(-e,-n),this.toMatrix4(),this}rotateTo(t,e=0,n=0){const{degree:i}=this.split();return this.rotate(t-i,e,n),this}rotateX(t){return this.matrix4.rotateX(t),this.matrix4.toMatrix(this),this}rotateXTo(t){const{degreeX:e}=this.matrix4.split();return this.rotateX(t-e),this}rotateY(t){return this.matrix4.rotateY(t),this.matrix4.toMatrix(this),this}rotateYTo(t){const{degreeY:e}=this.matrix4.split();return this.rotateY(t-e),this}rotateZ(t){return this.matrix4.rotateZ(t),this.matrix4.toMatrix(this),this}rotateZTo(t){const{degreeZ:e}=this.matrix4.split();return this.rotateZ(t-e),this}rotate3d(t,e,n){return this.matrix4.rotateX(t).rotateY(e).rotateZ(n),this.matrix4.toMatrix(this),this}rotate3dTo(t,e,n){const{degreeX:i,degreeY:r,degreeZ:o}=this.matrix4.split();return this.rotate3d(t-i,e-r,n-o),this}scale(t,e=t,n=0,i=0){return this.translate(n,i),this.multiply([t,0,0,e,0,0]),this.translate(-n,-i),this.toMatrix4(),this}scaleTo(t,e=t,n=0,i=0){return this.scale(t/this.m11,e/this.m22,n,i)}scaleX(t){return this.scale(t,1)}scaleXTo(t){return this.scale(t/this.m11,1)}scaleY(t){return this.scale(1,t)}scaleYTo(t){return this.scale(1,t/this.m22)}scaleZ(t){return this.matrix4.scale(1,1,t),this.matrix4.toMatrix(this),this}scaleZTo(t){const{scalarZ:e}=this.matrix4.split();return this.scaleZ(t/e),this}scale3d(t,e=t,n=t){return this.matrix4.scale(t,e,n),this.matrix4.toMatrix(this),this}scale3dTo(t,e=t,n=t){const{scalarX:i,scalarY:r,scalarZ:o}=this.matrix4.split();return this.scale3d(t/i,e/r,n/o),this}skew(t,e=t){return this.multiply([Math.cos(q(e)),Math.sin(q(e)),-Math.sin(q(t)),Math.cos(q(t)),0,0]),this.toMatrix4(),this}skewTo(t,e=t){const{skewX:n,skewY:i}=this.split();return this.skew(t-n,e-i)}skewX(t){const{skewY:e}=this.split();return this.skew(t,e)}skewXTo(t){const{skewY:e}=this.split();return this.skewTo(t,e)}skewY(t){const{skewX:e}=this.split();return this.skew(e,t)}skewYTo(t){const{skewX:e}=this.split();return this.skewTo(e,t)}skewZ(t){return this}skewZTo(t){return this}skew3d(t,e,n){return this}skew3dTo(t,e,n){return this}perspective(t){return this.matrix4.perspective(t),this.matrix4.toMatrix(this),this}}const _g=new zt(0,0,0),Sg=new zt(1,1,1),Ie=new zt,Vs=new zt,Nt=new zt,yn=new zt,Ur=new gn,Zt=new It;function Vr(s){const t=new _t;return s.replace(/([a-z0-9]+)\s*\(?\s*((-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)*[a-z%]*\s*,?\s*)+)\)?/gi,function(e,n,i){i.indexOf(",")>=0?i=i.split(/\s*,\s*/):i=i.split(/\s+/);const r=[];for(let o=0,a=i.length;o<a;o++)i[o].trim()&&r.push(parseFloat(""+i[o]));switch(n.toLowerCase()){case"t":case"translate":t.translate(r[0],r[1]);break;case"translatex":t.translateX(r[0]);break;case"translatey":t.translateY(r[0]);break;case"translatez":t.translateZ(r[0]);break;case"translate3d":t.translate3d(r[0],r[1],r[2]);break;case"r":case"rotate":t.rotate(r[0],r[1]??0,r[2]??0);break;case"rotatex":t.rotateX(r[0]);break;case"rotatey":t.rotateY(r[0]);break;case"rotatez":t.rotateZ(r[0]);break;case"rotate3d":t.rotate3d(r[0],r[1],r[2]);break;case"s":case"scale":t.scale(r[0],r[1]??r[0]);break;case"scalex":t.scaleX(r[0]);break;case"scaley":t.scaleY(r[0]);break;case"scalez":t.scaleZ(r[0]);break;case"scale3d":t.scale3d(r[0],r[1],r[2]);break;case"skew":t.skew(r[0],r[1]??0);break;case"skewx":t.skewX(r[0]);break;case"skewy":t.skewY(r[0]);break;case"skewz":t.skewZ(r[0]);break;case"skew3d":t.skew3d(r[0],r[1],r[2]);break;case"m":case"matrix":t.multiply([r[0],r[1],r[2],r[3],r[4],r[5]]),t.toMatrix4();break;case"matrix3d":t.matrix4.multiply(new It(r)),t.matrix4.toMatrix(t);break}return""}),t}function Qt(s,t,e){const n=new _t;return n.rotate(Et(s)),n.transformPoint({x:t,y:e})}function Gr(s){const t=typeof s?.x=="number"?s?.x:0,e=typeof s?.y=="number"?s?.y:0,n=typeof s?.degree=="number"?s?.degree:0,i=typeof s?.scalarX=="number"?s?.scalarX:1,r=typeof s?.scalarY=="number"?s?.scalarY:1,o=q(n),a=Math.cos(o),h=Math.sin(o),c=new DOMMatrix([a*i,h*i,-h*r,a*r,t,e]);return c.multiplySelf(new DOMMatrix(s?.originMatrix||"")),c}function Cg(s,t){const e=new Path2D(s),n=new Path2D;return n.addPath(e,Gr(t)),n}function qe(s,t,e){const n=Ir(s);return n.props.style=n.props.style||{},t?n.props.style[t]||n.props.style[pa(t)]||n.props.style[xt(t)]||"":n.props.style}function qr(s,t,e){Dr(s,n=>{n.props.style=n.props.style||{},typeof t=="string"&&e?n.props.style[t]=e:t instanceof Object&&Object.keys(t).forEach(i=>{n.props.style[i]=t[i]})}),Lr()}function jr(s){const t={};if(getComputedStyle){const e=getComputedStyle(s);for(let n=0,i=e.length;n<i;n++)t[e[n]]=e.getPropertyValue(t[n])}else{const e=s.currentStyle;for(const n in e)t[n]=e[n]}return s.style.cssText&&s.style.cssText.split(";").filter(e=>!!e).forEach(e=>{const[n,i]=e.split(":");n&&i&&(t[n.trim()]=i.trim())}),t}function Tg(s,t,e){let n=s.style[t]||"";if(!n&&getComputedStyle){t=xt(t);const i=getComputedStyle(s,e),r=i.getPropertyPriority(t);n=i.getPropertyValue(t).trim()+(r?"!"+r:"")}return n||(n=s.currentStyle[t]||""),n}function Gs(s,t,e){typeof t=="string"&&e?s.style.setProperty(xt(t),e.replace(/!important/i,""),e.toLowerCase().includes("!important")?"important":""):t instanceof Object&&Object.keys(t).forEach(n=>{Gs(s,n,t[n])})}function Hr(s,t){typeof t=="string"?s.style.removeProperty(xt(t)):Object.keys(t).forEach(e=>{Hr(s,e)})}function _c(s,t){let e;if(typeof t=="string"){const n=document.querySelector(t)?.shadowRoot;n?e=n:e=document.querySelector(t)}else e=t||document.getElementsByTagName("head")[0];if(e){const n=document.createElement("style");return n.innerHTML=s,e.appendChild(n),()=>{(e instanceof HTMLElement||e instanceof ShadowRoot)&&e.removeChild(n)}}else{const n=document.styleSheets[0].insertRule(s);return()=>{document.styleSheets[0].deleteRule(n)}}}function Eg(s,t,e={}){Object.prototype.hasOwnProperty.call(e,"transform")||Object.assign(e,{transform:qe(s,"transform")||""});const n=Vr(e.transform),i={};for(const r in t){const o=t[r];switch(r){case"transform":break;case"translate":n.translate(o[0]||0,o[1]||0);break;case"translateTo":n.translateTo(o[0]||0,o[1]||0);break;case"translateX":n.translateX(o||0);break;case"translateXTo":n.translateXTo(o||0);break;case"translateY":n.translateY(o||0);break;case"translateYTo":n.translateYTo(o||0);break;case"translateZ":n.translateZ(o||0);break;case"translateZTo":n.translateZTo(o||0);break;case"translate3d":n.translate3d(o[0]||0,o[1]||0,o[2]||0);break;case"translate3dTo":n.translate3dTo(o[0]||0,o[1]||0,o[2]||0);break;case"rotate":typeof o=="number"?n.rotate(o||0):n.rotate(o[0]||0,o[1]||0,o[2]||0);break;case"rotateTo":typeof o=="number"?n.rotateTo(o||0):n.rotateTo(o[0]||0,o[1]||0,o[2]||0);break;case"rotateX":n.rotateX(o||0);break;case"rotateXTo":n.rotateXTo(o||0);break;case"rotateY":n.rotateY(o||0);break;case"rotateYTo":n.rotateYTo(o||0);break;case"rotateZ":n.rotateZ(o||0);break;case"rotateZTo":n.rotateZTo(o||0);break;case"rotate3d":n.rotate3d(o[0]||0,o[1]||0,o[2]||0);break;case"rotate3dTo":n.rotate3dTo(o[0]||0,o[1]||0,o[2]||0);break;case"scale":typeof o=="number"?n.scale(o||1):n.scale(o[0]||1,o[1]||1,o[2]||0,o[3]||0);break;case"scaleTo":typeof o=="number"?n.scaleTo(o||1):n.scaleTo(o[0]||1,o[1]||1,o[2]||0,o[3]||0);break;case"scaleX":n.scaleX(o||1);break;case"scaleXTo":n.scaleXTo(o||1);break;case"scaleY":n.scaleY(o||1);break;case"scaleYTo":n.scaleYTo(o||1);break;case"scaleZ":n.scaleZ(o||1);break;case"scaleZTo":n.scaleZTo(o||1);break;case"scale3d":typeof o=="number"?n.scale3d(o||1):n.scale3d(o[0]||1,o[1]||1,o[2]||1);break;case"scale3dTo":typeof o=="number"?n.scale3dTo(o||1):n.scale3dTo(o[0]||1,o[1]||1,o[2]||1);break;case"skew":typeof o=="number"?n.skew(o||0):n.skew(o[0]||0,o[1]||0);break;case"skewTo":typeof o=="number"?n.skewTo(o||0):n.skewTo(o[0]||0,o[1]||0);break;case"skewX":n.skewX(o||0);break;case"skewXTo":n.skewXTo(o||0);break;case"skewY":n.skewY(o||0);break;case"skewYTo":n.skewYTo(o||0);break;case"skewZ":break;case"skewZTo":break;case"skew3d":break;case"skew3dTo":break;case"perspective":n.perspective(o||0);break;default:Object.prototype.hasOwnProperty.call(e,r)||(e[r]=qe(s,r)),Object.assign(i,{[r]:`${o}`});break}}return Object.assign(i,{transform:n.toString()}),i}function je(s,t,e){if(t===void 0&&e===void 0)return Wr(s);if(typeof t=="string"&&e===void 0)return Sc(s,t);let n={};typeof t=="object"?n=t:typeof t=="string"&&typeof e=="string"&&(n[t]=""+e),Dr(s,i=>{Object.entries(n).forEach(([r,o])=>{i.props[r]=""+o})}),Lr()}const Pg=["-o-","-ms-","-moz-","-webkit-",""];function Wr(s){const t={};for(let e=0,n=s.attributes,i=n.length;e<i;e++){const r=n[e];r.nodeName&&r.nodeValue&&(r.nodeName==="style"?t[r.nodeName]=jr(s):t[r.nodeName]=r.nodeValue)}return t}function Sc(s,t){return t==="style"?jr(s):s.getAttribute(xt(t))}function wn(s,t,e){return s.setAttribute(xt(t),""+e)}function Mg(s,t){t.split(/[,\s]+/i).forEach(e=>{const n=xt(e.trim());n!=""&&s.removeAttribute(n)})}function Cc(s,t){for(const e in t){const n=t[e];switch(e){case"fill":n!=="none"&&(s.fillStyle=n);break;case"stroke":n!=="none"&&(s.strokeStyle=n);break;case"stroke-width":case"strokeWidth":s.lineWidth=Number(n);break;case"stroke-linecap":case"strokeLinecap":s.lineCap=n;break;case"stroke-linejoin":case"strokeLinejoin":switch(n){case"round":case"bevel":case"miter":s.lineJoin=n;break;default:s.lineJoin="miter";break}break;case"stroke-miterlimit":case"strokeMiterlimit":s.miterLimit=Number(n);break;case"stroke-opacity":case"strokeOpacity":break;case"stroke-dashoffset":case"strokeDashoffset":s.lineDashOffset=Number(n);break;case"stroke-dasharray":case"strokeDasharray":typeof n=="string"&&s.setLineDash(n.split(/\s+/).map(i=>Number(i)));break;case"cursor":break;case"font":typeof n=="string"&&(s.font=n);break;case"font-size":case"fontSize":s.font+=` ${n}`;break;case"font-family":case"fontFamily":s.font+=` ${n}`;break;case"font-weight":case"fontWeight":break;case"font-style":case"fontStyle":break;case"text-anchor":case"textAnchor":switch(n){case"middle":s.textAlign="center";break;case"end":s.textAlign="end";break;case"start":s.textAlign="start";break}break;case"alignment-baseline":case"alignmentBaseline":switch(n){case"middle":case"bottom":case"top":case"alphabetic":case"hanging":case"ideographic":s.textBaseline=n;break;default:s.textBaseline="alphabetic";break}break}}}function Ag(s,t,e,n,i){const r=t/e;let o=0,a=0;switch(s){case"aspectFit":r>=1?(o=n,a=o/r,a>i&&(a=i,o=a*r)):(a=i,o=a*r,o>n&&(o=n,a=o/r));break;case"aspectFill":r>=1?(a=i,o=a*r):(o=n,a=o/r);break;case"widthFix":o=n,a=o/r;break;case"heightFix":a=i,o=a*r;break;case"scaleToFill":default:o=n,a=i;break}return{width:o,height:a}}function Tc(s){try{const t=document.createElement("canvas"),e=t.getContext("2d");return t.width=s.width,t.height=s.height,e.drawImage(s,0,0,t.width,t.height),e.getImageData(0,0,t.width,t.height)}catch{return new ImageData(s.width,s.height)}}const kg=s=>{const t=s.width,e=s.height,n=t*e*3,i=n+54,r=[66,77,i&255,i>>8&255,i>>16&255,i>>24&255,0,0,0,0,54,0,0,0],o=[40,0,0,0,t&255,t>>8&255,t>>16&255,t>>24&255,e&255,e>>8&255,e>>16&255,e>>24&255,1,0,24,0,0,0,0,0,n&255,n>>8&255,n>>16&255,n>>24&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=(4-t*3%4)%4,h=s.data;let c="";const u=t<<2;let l=e;const m=String.fromCharCode;do{const p=u*(l-1);let y="";for(let v=0;v<t;v++){const w=v<<2;y+=m(h[p+w+2])+m(h[p+w+1])+m(h[p+w])}for(let v=0;v<a;v++)y+=String.fromCharCode(0);c+=y}while(--l);function f(p){if(!window.btoa)throw"btoa undefined";let y="";if(typeof p=="string")y=p;else for(let v=0;v<p.length;v++)y+=String.fromCharCode(p[v]);return btoa(y)}return f(r.concat(o))+f(c)};function Ig(s){const{width:t,height:e}=s,n=document.createElement("canvas"),i=n.getContext("2d");return n.width=t,n.height=e,i.putImageData(s,0,0,0,0,t,e),n.toDataURL("image/png")}const Dg=(s,t,e)=>{const{width:n,height:i}=s,r=document.createElement("canvas"),o=r.getContext("2d");r.width=n,r.height=i,o.putImageData(s,0,0,0,0,n,i);const a=`image/${t?t.toLowerCase():"png"}`;r.toBlob(h=>{e?.(null,h)},a,1)};function Lg(s,t){return createImageBitmap(s,t)}function Rg(s){const t=[],e=[],n=[];let i=0;for(let h=0,c=s.data.length;h<c;h+=4)t[i]=s.data[h],e[i]=s.data[h+1],n[i]=s.data[h+2],i+=1;const r=Jr(t),o=Jr(e),a=Jr(n);return"rgb("+r+","+o+","+a+")"}function Jr(s){const t={},e=[],n=[];for(let a=0;a<s.length;a++)t[s[a]]?e.push(s[a]):t[s[a]]=1;let i=0;for(let a=0;a<e.length;a++){i=0;for(let h=0;h<e.length;h++)e[a]===e[h]&&(i+=1),n[a]=i}const r=Math.max.apply(null,n);let o=0;for(;o<n.length;o++)if(n[o]===r)return;return e[o]}const Og=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=t[(o*e+e-a-1)*4],i[h+1]=t[(o*e+e-a-1)*4+1],i[h+2]=t[(o*e+e-a-1)*4+2],i[h+3]=t[(o*e+e-a-1)*4+3]}return new ImageData(i,e,n)},zg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=t[((n-o-1)*e+a)*4],i[h+1]=t[((n-o-1)*e+a)*4+1],i[h+2]=t[((n-o-1)*e+a)*4+2],i[h+3]=t[((n-o-1)*e+a)*4+3]}return new ImageData(i,e,n)},Ng=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<e;o++)for(let a=0;a<n;a++){const h=(o*n+a)*4;i[h]=t[(a*e+e-o-1)*4],i[h+1]=t[(a*e+e-o-1)*4+1],i[h+2]=t[(a*e+e-o-1)*4+2],i[h+3]=t[(a*e+e-o-1)*4+3]}return new ImageData(i,n,e)},Bg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<e;o++)for(let a=0;a<n;a++){const h=(o*n+a)*4;i[h]=t[((n-a-1)*e+o)*4],i[h+1]=t[((n-a-1)*e+o)*4+1],i[h+2]=t[((n-a-1)*e+o)*4+2],i[h+3]=t[((n-a-1)*e+o)*4+3]}return new ImageData(i,n,e)},Fg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4,c=(t[h]+t[h+1]+t[h+2])/3;i[h]=c,i[h+1]=c,i[h+2]=c,i[h+3]=t[h+3]}return new ImageData(i,e,n)},Yg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4,c=.2126*t[h]+.7152*t[h+1]+.0722*t[h+2];i[h]=c,i[h+1]=c,i[h+2]=c,i[h+3]=t[h+3]}return new ImageData(i,e,n)},$g=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4,u=(t[h]+t[h+1]+t[h+2])/3>127?255:0;i[h]=u,i[h+1]=u,i[h+2]=u,i[h+3]=t[h+3]}return new ImageData(i,e,n)},Xg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=255-t[h],i[h+1]=255-t[h+1],i[h+2]=255-t[h+2],i[h+3]=t[h+3]}return new ImageData(i,e,n)},Ug=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=t[h],i[h+1]=0,i[h+2]=0,i[h+3]=t[h+3]}return new ImageData(i,e,n)},Vg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=0,i[h+1]=t[h+1],i[h+2]=0,i[h+3]=t[h+3]}return new ImageData(i,e,n)},Gg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=0,i[h+1]=0,i[h+2]=t[h+2],i[h+3]=t[h+3]}return new ImageData(i,e,n)},qg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=t[h],i[h+1]=t[h+1],i[h+2]=0,i[h+3]=t[h+3]}return new ImageData(i,e,n)},jg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=t[h],i[h+1]=0,i[h+2]=t[h+1],i[h+3]=t[h+3]}return new ImageData(i,e,n)},Hg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=0,i[h+1]=t[h+1],i[h+2]=t[h+1],i[h+3]=t[h+3]}return new ImageData(i,e,n)},Wg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4,c=(t[h+1]+t[h+2])/2;i[h]=t[h],i[h+1]=c,i[h+2]=c,i[h+3]=t[h+3]}return new ImageData(i,e,n)},Jg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4,c=(t[h]+t[h+2])/2;i[h]=c,i[h+1]=t[h+1],i[h+2]=c,i[h+3]=t[h+3]}return new ImageData(i,e,n)},Zg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4,c=(t[h]+t[h+1])/2;i[h]=c,i[h+1]=c,i[h+2]=t[h+2],i[h+3]=t[h+3]}return new ImageData(i,e,n)},Qg=s=>Ec(s,[-1,-1,-1,-1,9,-1,-1,-1,-1]),Kg=s=>Ec(s,[-1,-1,-1,-1,8,-1,-1,-1,-1]),t0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=t[h],i[h+1]=t[h+1],i[h+2]=t[h+2],i[h+3]=255}return new ImageData(i,e,n)},e0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;if(t[h+3]===0)i[h]=255,i[h+1]=255,i[h+2]=255,i[h+3]=255;else{const c=Pc([t[h],t[h+1],t[h+2],t[h+3]],[255,255,255,255]);i[h]=c[0],i[h+1]=c[1],i[h+2]=c[2],i[h+3]=c[3]}}return new ImageData(i,e,n)};function n0(s,t,e,n,i,r=!1,o){const{data:a,width:h,height:c}=s;let u=i,l=n,m=t,f=e;if(u<0?u=0:u>h&&(u=h),l<0?l=0:l>c&&(l=c),m<1?m=1:m>h&&(m=h),f<1?f=1:f>c&&(f=c),u+m>h&&(m=h-u),l+f>c&&(f=c-l),r){const p=new Uint8ClampedArray(a.length);for(let v=0;v<c;v++)for(let w=0;w<h;w++){const _=(v*h+w)*4;w>=u&&w<=u+m&&v>=l&&v<=l+f?(p[_]=a[_],p[_+1]=a[_+1],p[_+2]=a[_+2],p[_+3]=a[_+3]):(p[_]=255,p[_+1]=255,p[_+2]=255,p[_+3]=o&&["JPG","JPEG"].includes(o.toUpperCase())?255:0)}return new ImageData(p,h,c)}else{const p=new Uint8ClampedArray(m*f*4);for(let v=l;v<=l+f;v++)for(let w=u;w<=u+m;w++){const _=((v-l)*m+w-u)*4,x=(v*h+w)*4;p[_]=a[x],p[_+1]=a[x+1],p[_+2]=a[x+2],p[_+3]=a[x+3]}return new ImageData(p,m,f)}}function s0(s,t,e,n){const{data:i,width:r,height:o}=s;let a=t;a>Math.floor(r/2)&&(a=Math.floor(r/2)),a>Math.floor(o/2)&&(a=Math.floor(o/2)),a<0&&(a=0);const h=new Uint8ClampedArray(i.length);for(let u=0;u<o;u++)for(let l=0;l<r;l++){const m=(u*r+l)*4;let f=-1;l<a?u<a?f=Math.sqrt(Math.pow(a-l-1,2)+Math.pow(a-u-1,2)):u>o-a-1&&(f=Math.sqrt(Math.pow(a-l-1,2)+Math.pow(u-(o-a),2))):l>r-a-1&&(u<a?f=Math.sqrt(Math.pow(l-(r-a),2)+Math.pow(a-u-1,2)):u>o-a-1&&(f=Math.sqrt(Math.pow(l-(r-a),2)+Math.pow(u-(o-a),2)))),Math.round(f)>a?(h[m]=255,h[m+1]=255,h[m+2]=255,h[m+3]=n||e.toUpperCase()==="PNG"?0:255):(h[m]=i[m],h[m+1]=i[m+1],h[m+2]=i[m+2],h[m+3]=n||e.toUpperCase()==="PNG"?i[m+3]:255)}return new ImageData(h,r,o)}function i0(s,t,e,n,i,r=1e4){const o=new Image;o.src=s;const a=document.createElement("canvas"),h=a.getContext("2d");return a.width=r,a.height=r,h.drawImage(o,0,0,t,e,0,0,n,i),h.getImageData(0,0,n,i)}function r0(s,t){const{data:e,width:n,height:i}=s,r=new Uint8ClampedArray(e.length);for(let a=0;a<i;a++)for(let h=0;h<n;h++){const c=(a*n+h)*4;r[c]=Math.max(Math.min(e[c]+t,255),0),r[c+1]=Math.max(Math.min(e[c+1]+t,255),0),r[c+2]=Math.max(Math.min(e[c+2]+t,255),0),r[c+3]=e[c+3]}return new ImageData(r,n,i)}function o0(s,t,e=!1){const{data:n,width:i,height:r}=s,o=new Uint8ClampedArray(n.length);for(let h=0;h<r;h++)for(let c=0;c<i;c++){const u=(h*i+c)*4;n[u+3]===0?(o[u]=255,o[u+1]=255,o[u+2]=255):(o[u]=n[u],o[u+1]=n[u+1],o[u+2]=n[u+2]);let l=n[u+3];e?l=Math.max(Math.min(Math.floor(255*t),255),0):l=Math.max(Math.min(Math.floor(l+255*t),255),0),o[u+3]=l}return new ImageData(o,i,r)}function a0(s,t,e,n){const{data:i,width:r,height:o}=s,{data:a,width:h,height:c}=t;let u=e,l=n;e+c>o&&(u=o-c),n+h>r&&(l=r-h);const m=new Uint8ClampedArray(i.length);for(let p=0;p<o;p++)for(let y=0;y<r;y++){const v=(p*r+y)*4;if(y<l||y>l+h||p<=u||p>=u+c)m[v]=i[v],m[v+1]=i[v+1],m[v+2]=i[v+2],m[v+3]=i[v+3];else{const w=(p*r+y-((u+1)*r+(p-(u+1))*(r-h))+h-l-1)*4,_=[a[w],a[w+1],a[w+2],a[w+3]],x=[i[v],i[v+1],i[v+2],i[v+3]],b=Pc(_,x);m[v]=b[0],m[v+1]=b[1],m[v+2]=b[2],m[v+3]=b[3]}}return new ImageData(m,r,o)}function h0(s,t,e,n,i,r=10){const{data:o,width:a,height:h}=s;let c=i,u=n,l=t,m=e;c<0?c=0:c>a&&(c=a),u<0?u=0:u>h&&(u=h),l<1?l=1:l>a&&(l=a),m<1?m=1:m>h&&(m=h),c+l>a&&(l=a-c),u+m>h&&(m=h-u);const f=new Uint8ClampedArray(o.length);for(let y=0;y<h;y++)for(let v=0;v<a;v++){const w=(y*a+v)*4;if(v>=c&&v<=c+l&&y>=u&&y<=u+m){const _=Math.floor((v-c)/r),x=Math.floor((y-u)/r);let b=Math.floor(r*(_+1)-r/2+c),E=Math.floor(r*(x+1)-r/2+u);b>a-1&&(b=a-1),E>h-1&&(E=h-1);const C=(E*a+b)*4;f[w]=o[C],f[w+1]=o[C+1],f[w+2]=o[C+2],f[w+3]=o[C+3]}else f[w]=o[w],f[w+1]=o[w+1],f[w+2]=o[w+2],f[w+3]=o[w+3]}return new ImageData(f,a,h)}function c0(s,t,e={backgroundColor:{r:0,g:0,b:0,a:255},changeIntoColor:{r:0,g:0,b:0,a:0}}){if(t&&e){const{data:n,width:i,height:r}=s,{data:o}=t,a=new Uint8ClampedArray(n.length),{backgroundColor:h,changeIntoColor:c}=e;for(let l=0;l<r;l++)for(let m=0;m<i;m++){const f=(l*i+m)*4,p=o[f],y=o[f+1],v=o[f+2],w=o[f+3];p===h.r&&y===h.g&&v===h.b&&w===h.a&&c.a!==0?(a[f]=c.r,a[f+1]=c.g,a[f+2]=c.b,a[f+3]=c.a):(a[f]=n[f],a[f+1]=n[f+1],a[f+2]=n[f+2],a[f+3]=n[f+3])}return new ImageData(a,i,r)}return s}function Ec(s,t){const{data:e,width:n,height:i}=s,r=new Uint8ClampedArray(e.length);for(let a=0;a<i;a++)for(let h=0;h<n;h++){const c=(a*n+h)*4;for(let u=0;u<3;u++){const l=c+u;h===0||h===n-1||a===0||a===i-1?r[l]=e[l]:r[l]=t[0]*e[l-n*4-4]+t[1]*e[l-n*4]+t[2]*e[l-n*4+4]+t[3]*e[l-4]+t[4]*e[l]+t[5]*e[l+4]+t[6]*e[l+n*4-4]+t[7]*e[l+n*4]+t[8]*e[l+n*4+4]}r[c+3]=e[c+3]}return new ImageData(r,n,i)}function Pc(s,t){if(s&&s.length===4&&t&&t.length===4){const e=s[3],n=t[3];if(e===255||n===0)return s;if(e===0)return t;{const i=e/255,r=n/255,o=Math.max(Math.min(Math.floor(s[0]*i+t[0]*r*(1-i)),255),0),a=Math.max(Math.min(Math.floor(s[1]*i+t[1]*r*(1-i)),255),0),h=Math.max(Math.min(Math.floor(s[2]*i+t[2]*r*(1-i)),255),0),c=Math.max(Math.min(Math.floor((i+r*(1-i))*255),255),0);return[o,a,h,c]}}return[255,255,255,255]}const Zr=function(){const s=[];return{writeByte(t){s.push(t&255)},writeShort(t){this.writeByte(t),this.writeByte(t>>>8)},writeBytes(t,e=0,n=t.length){for(let i=0;i<n;i++)this.writeByte(t[i+e])},writeString(t){for(let e=0,n=t.length;e<n;e++)this.writeByte(t.charCodeAt(e))},toByteArray(){return s},toString(){let t="[";for(let e=0,n=s.length;e<n;e++)e>0&&(t+=","),t+=s[e];return t+="]",t}}},Mc=function(){let s=0,t=0,e=0,n="";const i=function(o){if(!(o<0)){if(o<26)return 65+o;if(o<52)return 97+(o-26);if(o<62)return 48+(o-52);if(o==62)return 43;if(o==63)return 47}throw new Error("n:"+o)},r=function(o){n+=String.fromCharCode(i(o&63))};return{writeByte(o){for(s=s<<8|o&255,t+=8,e+=1;t>=6;)r(s>>>t-6),t-=6},flush(){if(t>0&&(r(s<<6-t),s=0,t=0),e%3!=0){const o=3-e%3;for(let a=0;a<o;a++)n+="="}},toString(){return n}}},Ac=function(s,t,e){const n=new Array(s*s),i=function(a){const h=a;let c=0,u=0;return{write(l,m){if(l>>>m)throw new Error("length over");for(;c+m>=8;)h.writeByte(255&(l<<c|u)),m-=8-c,l>>>=8-c,u=0,c=0;u=l<<c|u,c=c+m},flush(){c>0&&h.writeByte(u)}}},r=function(a){const h=1<<a,c=(1<<a)+1;let u=a+1;const l=o();for(let v=0;v<h;v++)l.add(String.fromCharCode(v));l.add(String.fromCharCode(h)),l.add(String.fromCharCode(c));const m=Zr(),f=i(m);f.write(h,u);let p=0,y=String.fromCharCode(n[p]);for(p+=1;p<n.length;){const v=String.fromCharCode(n[p]);p+=1,l.contains(y+v)?y=y+v:(f.write(l.indexOf(y),u),l.size()<4095&&(l.size()==1<<u&&(u+=1),l.add(y+v)),y=v)}return f.write(l.indexOf(y),u),f.write(c,u),f.flush(),m.toByteArray()},o=function(){const a={};let h=0;return{add(c){if(this.contains(c))throw new Error("dup key:"+c);a[c]=h,h+=1},size(){return h},indexOf(c){return a[c]},contains(c){return typeof a[c]<"u"}}};return{setPixel(a,h,c){n[h*s+a]=c},write(a){a.writeString("GIF87a"),a.writeShort(s),a.writeShort(s),a.writeByte(128),a.writeByte(0),a.writeByte(0),a.writeByte(hn("0x"+t[1]+t[2])),a.writeByte(hn("0x"+t[3]+t[4])),a.writeByte(hn("0x"+t[5]+t[6])),a.writeByte(hn("0x"+e[1]+e[2])),a.writeByte(hn("0x"+e[3]+e[4])),a.writeByte(hn("0x"+e[5]+e[6])),a.writeString(","),a.writeShort(0),a.writeShort(0),a.writeShort(s),a.writeShort(s),a.writeByte(0);const h=2,c=r(h);a.writeByte(h);let u=0;for(;c.length-u>255;)a.writeByte(255),a.writeBytes(c,u,255),u+=255;a.writeByte(c.length-u),a.writeBytes(c,u,c.length-u),a.writeByte(0),a.writeString(";")}}},kc=function(s,t,e,n){const i=Ac(s,t,e);for(let c=0;c<s;c++)for(let u=0;u<s;u++)i.setPixel(u,c,n(u,c));const r=Zr();i.write(r);const o=Mc(),a=r.toByteArray();for(let c=0,u=a.length;c<u;c++)o.writeByte(a[c]);o.flush();let h="";return h+="data:image/gif;base64,",h+=o,h},Bt={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Hn={M:0,L:1,H:2,Q:3},De={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},dt={glog:function(s){if(s<1)throw new Error("glog("+s+")");return dt.LOG_TABLE[s]},gexp:function(s){for(;s<0;)s+=255;for(;s>=256;)s-=255;return dt.EXP_TABLE[s]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(let s=0;s<8;s++)dt.EXP_TABLE[s]=1<<s;for(let s=8;s<256;s++)dt.EXP_TABLE[s]=dt.EXP_TABLE[s-4]^dt.EXP_TABLE[s-5]^dt.EXP_TABLE[s-6]^dt.EXP_TABLE[s-8];for(let s=0;s<255;s++)dt.LOG_TABLE[dt.EXP_TABLE[s]]=s;const Q={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(s){let t=s<<10;for(;Q.getBCHDigit(t)-Q.getBCHDigit(Q.G15)>=0;)t^=Q.G15<<Q.getBCHDigit(t)-Q.getBCHDigit(Q.G15);return(s<<10|t)^Q.G15_MASK},getBCHTypeNumber:function(s){let t=s<<12;for(;Q.getBCHDigit(t)-Q.getBCHDigit(Q.G18)>=0;)t^=Q.G18<<Q.getBCHDigit(t)-Q.getBCHDigit(Q.G18);return s<<12|t},getBCHDigit:function(s){let t=0;for(;s!=0;)t++,s>>>=1;return t},getPatternPosition:function(s){return Q.PATTERN_POSITION_TABLE[s-1]},getMask:function(s,t,e){switch(s){case De.PATTERN000:return(t+e)%2==0;case De.PATTERN001:return t%2==0;case De.PATTERN010:return e%3==0;case De.PATTERN011:return(t+e)%3==0;case De.PATTERN100:return(Math.floor(t/2)+Math.floor(e/3))%2==0;case De.PATTERN101:return t*e%2+t*e%3==0;case De.PATTERN110:return(t*e%2+t*e%3)%2==0;case De.PATTERN111:return(t*e%3+(t+e)%2)%2==0;default:throw new Error("bad maskPattern:"+s)}},getErrorCorrectPolynomial:function(s){let t=new xn([1],0);for(let e=0;e<s;e++)t=t.multiply(new xn([1,dt.gexp(e)],0));return t},getLengthInBits:function(s,t){if(1<=t&&t<10)switch(s){case Bt.MODE_NUMBER:return 10;case Bt.MODE_ALPHA_NUM:return 9;case Bt.MODE_8BIT_BYTE:return 8;case Bt.MODE_KANJI:return 8;default:throw new Error("mode:"+s)}else if(t<27)switch(s){case Bt.MODE_NUMBER:return 12;case Bt.MODE_ALPHA_NUM:return 11;case Bt.MODE_8BIT_BYTE:return 16;case Bt.MODE_KANJI:return 10;default:throw new Error("mode:"+s)}else if(t<41)switch(s){case Bt.MODE_NUMBER:return 14;case Bt.MODE_ALPHA_NUM:return 13;case Bt.MODE_8BIT_BYTE:return 16;case Bt.MODE_KANJI:return 12;default:throw new Error("mode:"+s)}else throw new Error("type:"+t)},getLostPoint:function(s){const t=s.getModuleCount();let e=0;for(let r=0;r<t;r++)for(let o=0;o<t;o++){let a=0;const h=s.isDark(r,o);for(let c=-1;c<=1;c++)if(!(r+c<0||t<=r+c))for(let u=-1;u<=1;u++)o+u<0||t<=o+u||c==0&&u==0||h==s.isDark(r+c,o+u)&&a++;a>5&&(e+=3+a-5)}for(let r=0;r<t-1;r++)for(let o=0;o<t-1;o++){let a=0;s.isDark(r,o)&&a++,s.isDark(r+1,o)&&a++,s.isDark(r,o+1)&&a++,s.isDark(r+1,o+1)&&a++,(a==0||a==4)&&(e+=3)}for(let r=0;r<t;r++)for(let o=0;o<t-6;o++)s.isDark(r,o)&&!s.isDark(r,o+1)&&s.isDark(r,o+2)&&s.isDark(r,o+3)&&s.isDark(r,o+4)&&!s.isDark(r,o+5)&&s.isDark(r,o+6)&&(e+=40);for(let r=0;r<t;r++)for(let o=0;o<t-6;o++)s.isDark(o,r)&&!s.isDark(o+1,r)&&s.isDark(o+2,r)&&s.isDark(o+3,r)&&s.isDark(o+4,r)&&!s.isDark(o+5,r)&&s.isDark(o+6,r)&&(e+=40);let n=0;for(let r=0;r<t;r++)for(let o=0;o<t;o++)s.isDark(o,r)&&n++;const i=Math.abs(100*n/t/t-50)/5;return e+=i*10,e}};class xn{num;constructor(t,e){if(t.length==null)throw new Error(t.length+"/"+e);let n=0;for(;n<t.length&&t[n]==0;)n++;this.num=new Array(t.length-n+e);for(let i=0;i<t.length-n;i++)this.num[i]=t[i+n]}get(t){return this.num[t]}getLength(){return this.num.length}multiply(t){const e=new Array(this.getLength()+t.getLength()-1);for(let n=0;n<this.getLength();n++)for(let i=0;i<t.getLength();i++)e[n+i]^=dt.gexp(dt.glog(this.get(n))+dt.glog(t.get(i)));return new xn(e,0)}mod(t){if(this.getLength()-t.getLength()<0)return this;const e=dt.glog(this.get(0))-dt.glog(t.get(0)),n=new Array(this.getLength());for(let i=0;i<this.getLength();i++)n[i]=this.get(i);for(let i=0;i<t.getLength();i++)n[i]^=dt.gexp(dt.glog(t.get(i))+e);return new xn(n,0).mod(t)}}class pe{totalCount;dataCount;constructor(t,e){this.totalCount=t,this.dataCount=e}static RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];static getRSBlocks(t,e){const n=pe.getRsBlockTable(t,e);if(n==null)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);const i=n.length/3,r=[];for(let o=0;o<i;o++){const a=n[o*3+0],h=n[o*3+1],c=n[o*3+2];for(let u=0;u<a;u++)r.push(new pe(h,c))}return r}static getRsBlockTable(t,e){switch(e){case Hn.L:return pe.RS_BLOCK_TABLE[(t-1)*4+0];case Hn.M:return pe.RS_BLOCK_TABLE[(t-1)*4+1];case Hn.Q:return pe.RS_BLOCK_TABLE[(t-1)*4+2];case Hn.H:return pe.RS_BLOCK_TABLE[(t-1)*4+3];default:return}}}class Ic{buffer;length;constructor(){this.buffer=[],this.length=0}get(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)==1}put(t,e){for(let n=0;n<e;n++)this.putBit((t>>>e-n-1&1)==1)}getLengthInBits(){return this.length}putBit(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}}class u0{mode;data;constructor(t){this.mode=Bt.MODE_8BIT_BYTE,this.data=t}getLength(){return this.data.length}write(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data.charCodeAt(e),8)}}class Le{static PAD0=236;static PAD1=17;typeNumber;errorCorrectLevel;modules;moduleCount;dataCache;dataList;constructor(t,e){this.typeNumber=t,this.errorCorrectLevel=Hn[e],this.modules=[],this.moduleCount=0,this.dataCache=null,this.dataList=[]}addData(t){const e=new u0(t);this.dataList.push(e),this.dataCache=null}isDark(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]}getModuleCount(){return this.moduleCount}make(){if(this.typeNumber<1){let t=1;for(t=1;t<40;t++){const e=pe.getRSBlocks(t,this.errorCorrectLevel),n=new Ic;let i=0;for(let r=0;r<e.length;r++)i+=e[r].dataCount;for(let r=0;r<this.dataList.length;r++){const o=this.dataList[r];n.put(o.mode,4),n.put(o.getLength(),Q.getLengthInBits(o.mode,t)),o.write(n)}if(n.getLengthInBits()<=i*8)break}this.typeNumber=t}this.makeImpl(!1,this.getBestMaskPattern())}makeImpl(t,e){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(let n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(let i=0;i<this.moduleCount;i++)this.modules[n][i]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),this.dataCache==null&&(this.dataCache=Le.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)}setupPositionProbePattern(t,e){for(let n=-1;n<=7;n++)if(!(t+n<=-1||this.moduleCount<=t+n))for(let i=-1;i<=7;i++)e+i<=-1||this.moduleCount<=e+i||(0<=n&&n<=6&&(i==0||i==6)||0<=i&&i<=6&&(n==0||n==6)||2<=n&&n<=4&&2<=i&&i<=4?this.modules[t+n][e+i]=!0:this.modules[t+n][e+i]=!1)}getBestMaskPattern(){let t=0,e=0;for(let n=0;n<8;n++){this.makeImpl(!0,n);const i=Q.getLostPoint(this);(n==0||t>i)&&(t=i,e=n)}return e}createMovieClip(t,e,n){const i=t.createEmptyMovieClip(e,n),r=1;this.make();for(let o=0;o<this.modules.length;o++){const a=o*r;for(let h=0;h<this.modules[o].length;h++){const c=h*r;this.modules[o][h]&&(i.beginFill(0,100),i.moveTo(c,a),i.lineTo(c+r,a),i.lineTo(c+r,a+r),i.lineTo(c,a+r),i.endFill())}}return i}setupTimingPattern(){for(let t=8;t<this.moduleCount-8;t++)this.modules[t][6]==null&&(this.modules[t][6]=t%2==0);for(let t=8;t<this.moduleCount-8;t++)this.modules[6][t]==null&&(this.modules[6][t]=t%2==0)}setupPositionAdjustPattern(){const t=Q.getPatternPosition(this.typeNumber);for(let e=0;e<t.length;e++)for(let n=0;n<t.length;n++){const i=t[e],r=t[n];if(this.modules[i][r]==null)for(let o=-2;o<=2;o++)for(let a=-2;a<=2;a++)o==-2||o==2||a==-2||a==2||o==0&&a==0?this.modules[i+o][r+a]=!0:this.modules[i+o][r+a]=!1}}setupTypeNumber(t){const e=Q.getBCHTypeNumber(this.typeNumber);for(let n=0;n<18;n++){const i=!t&&(e>>n&1)==1;this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=i}for(let n=0;n<18;n++){const i=!t&&(e>>n&1)==1;this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=i}}setupTypeInfo(t,e){const n=this.errorCorrectLevel<<3|e,i=Q.getBCHTypeInfo(n);for(let r=0;r<15;r++){const o=!t&&(i>>r&1)==1;r<6?this.modules[r][8]=o:r<8?this.modules[r+1][8]=o:this.modules[this.moduleCount-15+r][8]=o}for(let r=0;r<15;r++){const o=!t&&(i>>r&1)==1;r<8?this.modules[8][this.moduleCount-r-1]=o:r<9?this.modules[8][15-r-1+1]=o:this.modules[8][15-r-1]=o}this.modules[this.moduleCount-8][8]=!t}mapData(t,e){let n=-1,i=this.moduleCount-1,r=7,o=0;for(let a=this.moduleCount-1;a>0;a-=2)for(a==6&&a--;;){for(let h=0;h<2;h++)if(this.modules[i][a-h]==null){let c=!1;o<t.length&&(c=(t[o]>>>r&1)==1),Q.getMask(e,i,a-h)&&(c=!c),this.modules[i][a-h]=c,r--,r==-1&&(o++,r=7)}if(i+=n,i<0||this.moduleCount<=i){i-=n,n=-n;break}}}static createData(t,e,n){const i=pe.getRSBlocks(t,e),r=new Ic;for(let a=0;a<n.length;a++){const h=n[a];r.put(h.mode,4),r.put(h.getLength(),Q.getLengthInBits(h.mode,t)),h.write(r)}let o=0;for(let a=0;a<i.length;a++)o+=i[a].dataCount;if(r.getLengthInBits()>o*8)throw new Error("code length overflow. ("+r.getLengthInBits()+">"+o*8+")");for(r.getLengthInBits()+4<=o*8&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(!1);for(;!(r.getLengthInBits()>=o*8||(r.put(Le.PAD0,8),r.getLengthInBits()>=o*8));)r.put(Le.PAD1,8);return Le.createBytes(r,i)}static createBytes(t,e){let n=0,i=0,r=0;const o=new Array(e.length),a=new Array(e.length);for(let l=0;l<e.length;l++){const m=e[l].dataCount,f=e[l].totalCount-m;i=Math.max(i,m),r=Math.max(r,f),o[l]=new Array(m);for(let w=0;w<o[l].length;w++)o[l][w]=255&t.buffer[w+n];n+=m;const p=Q.getErrorCorrectPolynomial(f),v=new xn(o[l],p.getLength()-1).mod(p);a[l]=new Array(p.getLength()-1);for(let w=0;w<a[l].length;w++){const _=w+v.getLength()-a[l].length;a[l][w]=_>=0?v.get(_):0}}let h=0;for(let l=0;l<e.length;l++)h+=e[l].totalCount;const c=new Array(h);let u=0;for(let l=0;l<i;l++)for(let m=0;m<e.length;m++)l<o[m].length&&(c[u++]=o[m][l]);for(let l=0;l<r;l++)for(let m=0;m<e.length;m++)l<a[m].length&&(c[u++]=a[m][l]);return c}}const Dc=Math.ceil,Wn=Math.floor,Lc=Math.round;function l0(s,t){const e=ga(s),n=t?.ecc||"H",i=t?.size||256,r=-1,o=t?.padding||0,a=t?.color||"#000000",h=t?.background||"#ffffff",c=new Le(r,n);c.addData(e),c.make();const u=c.getModuleCount(),l=(i-o*2)/u,m=o,f=i-o;return kc(i,a,h,function(p,y){if(m<=p&&p<f&&m<=y&&y<f){const v=Wn((p-m)/l),w=Wn((y-m)/l);return c.isDark(w,v)?0:1}else return 1})}function f0(s,t){const e=t.x||0,n=t.y||0,i=ga(s),r=t.ctx,o=t.ecc||"H",a=typeof t.size=="number"?Wn(t.size):256,h=t.padding||0,c=-1,u=t.color||"#000000",l=t.background||"#ffffff",m=new Le(c,o);m.addData(i),m.make();const f=m.getModuleCount(),p=(a-h*2)/f;r.fillStyle=l,r.fillRect(e,n,a,a);for(let y=0;y<f;y++)for(let v=0;v<f;v++){const w=Dc((v+1)*p)-Wn(v*p),_=Dc((y+1)*p)-Wn(y*p);r.fillStyle=m.isDark(y,v)?u:l,r.fillRect(e+Lc(v*p)+h,n+Lc(y*p)+h,w,_)}}const qs=()=>{const s=navigator.userAgent.toLowerCase();let t="Unknown";return/iphone|ipad|ipod/i.test(s)?t="iOS":/android/i.test(s)?t="Android":/BlackBerry/i.test(s)?t="BlackBerry":/mac/i.test(s)?t="macOS":/win/i.test(s)?t="Windows":/linux/i.test(s)?t="Linux":/bsd/i.test(s)&&(t="BSD"),t.toLowerCase()};function d0(s=navigator.userAgent){let t="Unknown";if(/iPhone|iPad|iPod/i.test(s)){const e=s.match(/OS (\d+_\d+)/i);e&&(t=e[1].replace("_","."))}else if(/Android/i.test(s)){const e=s.match(/Android (\d+\.\d+)/i);e&&(t=e[1])}else if(/Mac OS X/i.test(s)){const e=s.match(/Mac OS X (\d+_\d+)/i);e&&(t=e[1].replace("_","."))}else if(/Windows NT/i.test(s)){const e=s.match(/Windows NT (\d+\.\d+)/i);e&&(t=e[1])}return t.toLowerCase()}function m0(s,t){const e=s.split("."),n=t.split(".");for(let i=0,r=e.length;i<r;i++){if(n.length==i)return 1;if(e[i]!=n[i])return e[i]>n[i]?1:-1}return e.length!=n.length?-1:0}function Qr(){const s=navigator.userAgent.toLowerCase();let t="Unknown";return/opr/i.test(s)||/opera/i.test(s)?t="Opera":/chrome/i.test(s)?t="Chrome":/firefox/i.test(s)?t="Firefox":/safari/i.test(s)?t="Safari":/edge/i.test(s)?t="Edge":/msie|trident/i.test(s)?t="IE":/MicroMessenger/i.test(s)?t="Wechat":/alipay/i.test(s)&&(t="Ali"),t.toLowerCase()}const p0=()=>{const s=navigator.userAgent;let t="Unknown";if(/Chrome/.test(s)){const e=s.match(/Chrome\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Firefox/.test(s)){const e=s.match(/Firefox\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Safari/.test(s)){const e=s.match(/Version\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Edge/.test(s)){const e=s.match(/Edge\/(\d+\.\d+)/);e&&(t=e[1])}else if(/MSIE|Trident/.test(s)){const e=s.match(/(?:MSIE|rv:)(\d+\.\d+)/);e&&(t=e[1])}return t};function g0(){return(navigator.browserLanguage||navigator.language).toLowerCase()}function y0(){return Intl.DateTimeFormat().resolvedOptions().timeZone.toLowerCase()}function Kr(){return qs()==="ios"}function Rc(){return qs()==="macos"}function w0(){return Kr()|Rc()}function Oc(){return qs()==="android"}function x0(){return Kr()||Oc()}function zc(){const s=window.navigator.userAgent,t=s.indexOf("MSIE ");if(t>0)return parseInt(s.substring(t+5,s.indexOf(".",t)),10);if(s.indexOf("Trident/")>0){const i=s.indexOf("rv:");return parseInt(s.substring(i+3,s.indexOf(".",i)),10)}const n=s.indexOf("Edge/");return n>0?parseInt(s.substring(n+5,s.indexOf(".",n)),10):-1}const b0=zc()!==-1,v0=document.documentMode?document.documentMode===9:!1,_0=document.documentMode?document.documentMode===10:!1,S0=document.documentMode?document.documentMode===11:!1;function Nc(){return Qr()==="wechat"}function Bc(){return Qr()==="ali"}function C0(){return Nc()&&navigator.userAgent.match(/miniprogram/i)||window.__wxjs_environment==="miniprogram"}function T0(){return Bc()&&navigator.userAgent.match(/miniprogram/i)}const E0=typeof document<"u",Fc=typeof window<"u",P0=typeof history<"u",M0=Fc&&window.File&&window.FileReader&&window.FileList&&window.Blob,Yc=(()=>!!(wt.Worker&&wt.Blob&&wt.Promise&&wt.OffscreenCanvas&&wt.OffscreenCanvasRenderingContext2D&&wt.HTMLCanvasElement&&wt.HTMLCanvasElement.prototype.transferControlToOffscreen&&wt.URL&&wt.URL.createObjectURL))(),A0=typeof Path2D=="function"&&typeof DOMMatrix=="function",$c=function(){if(!wt.OffscreenCanvas)return!1;const s=new OffscreenCanvas(1,1),t=s.getContext("2d");t.fillRect(0,0,1,1);const e=s.transferToImageBitmap();try{t.createPattern(e,"no-repeat")}catch{return!1}return!0}(),k0=typeof HTMLElement=="object"?function(t){return t instanceof HTMLElement}:function(t){return t&&typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string"},I0="webkit moz ms o".split(" ");function D0(){return"ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0}const js=new qn,ct=new zt;function Jn(s,t){switch(t.constructor){case Float32Array:return s;case Uint32Array:return s/4294967295;case Uint16Array:return s/65535;case Uint8Array:return s/255;case Int32Array:return Math.max(s/2147483647,-1);case Int16Array:return Math.max(s/32767,-1);case Int8Array:return Math.max(s/127,-1);default:throw new Error("Invalid component type.")}}function Dt(s,t){switch(t.constructor){case Float32Array:return s;case Uint32Array:return Math.round(s*4294967295);case Uint16Array:return Math.round(s*65535);case Uint8Array:return Math.round(s*255);case Int32Array:return Math.round(s*2147483647);case Int16Array:return Math.round(s*32767);case Int8Array:return Math.round(s*127);default:throw new Error("Invalid component type.")}}class ge{array;itemSize;count;normalized;updateRanges;version;constructor(t,e,n=!1){if(Array.isArray(t))throw new TypeError("BufferAttribute: array should be a Typed Array.");this.array=t,this.itemSize=e,this.count=t.length/e,this.normalized=n,this.updateRanges=[],this.version=0}_onChangeCallback(){}set needsUpdate(t){t===!0&&this.version++}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.array=Nl(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this}copyAt(t,e,n){t*=this.itemSize,n*=e.itemSize;for(let i=0,r=this.itemSize;i<r;i++)this.array[t+i]=e.array[n+i];return this}copyArray(t){return this.array.set(t),this}applyMatrix3(t){if(this.itemSize===2)for(let e=0,n=this.count;e<n;e++)js.fromBufferAttribute(this,e),js.applyMatrix3(t),this.setXY(e,js.x,js.y);else if(this.itemSize===3)for(let e=0,n=this.count;e<n;e++)ct.fromBufferAttribute(this,e),ct.applyMatrix3(t),this.setXYZ(e,ct.x,ct.y,ct.z);return this}applyMatrix4(t){for(let e=0,n=this.count;e<n;e++)ct.fromBufferAttribute(this,e),ct.applyMatrix4(t),this.setXYZ(e,ct.x,ct.y,ct.z);return this}applyNormalMatrix(t){for(let e=0,n=this.count;e<n;e++)ct.fromBufferAttribute(this,e),ct.applyNormalMatrix(t),this.setXYZ(e,ct.x,ct.y,ct.z);return this}transformDirection(t){for(let e=0,n=this.count;e<n;e++)ct.fromBufferAttribute(this,e),ct.transformDirection(t),this.setXYZ(e,ct.x,ct.y,ct.z);return this}set(t,e=0){return this.array.set(t,e),this}getComponent(t,e){let n=this.array[t*this.itemSize+e];return this.normalized&&(n=Jn(n,this.array)),n}setComponent(t,e,n){return this.normalized&&(n=Dt(n,this.array)),this.array[t*this.itemSize+e]=n,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=Jn(e,this.array)),e}setX(t,e){return this.normalized&&(e=Dt(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=Jn(e,this.array)),e}setY(t,e){return this.normalized&&(e=Dt(e,this.array)),this.array[t*this.itemSize+1]=e,this}getZ(t){let e=this.array[t*this.itemSize+2];return this.normalized&&(e=Jn(e,this.array)),e}setZ(t,e){return this.normalized&&(e=Dt(e,this.array)),this.array[t*this.itemSize+2]=e,this}getW(t){let e=this.array[t*this.itemSize+3];return this.normalized&&(e=Jn(e,this.array)),e}setW(t,e){return this.normalized&&(e=Dt(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,n){return t*=this.itemSize,this.normalized&&(e=Dt(e,this.array),n=Dt(n,this.array)),this.array[t+0]=e,this.array[t+1]=n,this}setXYZ(t,e,n,i){return t*=this.itemSize,this.normalized&&(e=Dt(e,this.array),n=Dt(n,this.array),i=Dt(i,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this}setXYZW(t,e,n,i,r){return t*=this.itemSize,this.normalized&&(e=Dt(e,this.array),n=Dt(n,this.array),i=Dt(i,this.array),r=Dt(r,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this.array[t+3]=r,this}onChange(t){return this._onChangeCallback=t,this}clone(){return wa(this,this.array,this.itemSize,this.normalized).copy(this)}toJSON(){return{itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized}}}class L0 extends ge{constructor(t,e,n=!1){super(new Int8Array(t),e,n)}}class R0 extends ge{constructor(t,e,n=!1){super(new Uint8Array(t),e,n)}}class O0 extends ge{constructor(t,e,n=!1){super(new Uint8ClampedArray(t),e,n)}}class z0 extends ge{constructor(t,e,n=!1){super(new Int16Array(t),e,n)}}class N0 extends ge{constructor(t,e,n=!1){super(new Uint16Array(t),e,n)}}class B0 extends ge{constructor(t,e,n=!1){super(new Int32Array(t),e,n)}}class F0 extends ge{constructor(t,e,n=!1){super(new Uint32Array(t),e,n)}}class Y0 extends ge{constructor(t,e,n=!1){super(new Float32Array(t),e,n)}}const Xc={map:new Map,transform:function(s){if($c)return s;if(this.map.has(s))return this.map.get(s);const t=new OffscreenCanvas(s.width,s.height);return t.getContext("2d")?.drawImage(s,0,0),this.map.set(s,t),t},clear:function(){this.map.clear()}};function $0(s,t,e){const n=new OffscreenCanvas(s,t),i=n.getContext("2d");if(i)return e(i),n.transferToImageBitmap()}function X0(s,t,e){const n=s.createPattern(Xc.transform(t),"no-repeat");if(n){const i=Gr(e);n.setTransform(i),s.fillStyle=n}}function Uc(s){return window.URL.createObjectURL(s)}function U0(s){return window.URL.revokeObjectURL(s)}function Vc(s){let t=!1,e;function n(){document.readyState==="loading"||t||(s(),e?.(),t=!0)}try{e=W(document,"DOMContentLoaded",n)}catch{e=W(window,"load",n)}return n(),()=>{t||e()}}function Gc(s){return W(window,"beforeunload",t=>{s(t)})}async function V0(s,t=6e4){return new Promise((e,n)=>{const i=document.createElement("script");i.type="text/javascript",i.async=!1,i.onload=o=>{clearTimeout(r),e(o),i.onerror=i.onload=null},i.onerror=o=>{clearTimeout(r),n(o)},i.src=s;const r=setTimeout(()=>{n("Timeout!")},t);document.body.appendChild(i)})}function Hs(s,t){const e=document.createElement("a");e.style.visibility="hidden",e.download=t,typeof s=="string"?e.href=s:e.href=window.URL.createObjectURL(s),e.click()}async function G0(s,t=document.getElementsByTagName("head")[0],e=6e4){return new Promise((n,i)=>{const r=document.createElement("link");r.setAttribute("type","text/css"),r.setAttribute("rel","stylesheet"),r.onload=a=>{clearTimeout(o),n(a),r.onerror=r.onload=null},r.onerror=a=>{clearTimeout(o),i(a)},r.setAttribute("href",s);const o=setTimeout(()=>{i("Timeout!")},e);t.appendChild(r)})}function q0(){return new Promise(s=>{const t=Array.from(document.querySelectorAll("link[rel=stylesheet]"));let e=document.styleSheets.length||0;const n=()=>e>=t.length?(s(),!0):!1;n()||t.forEach(i=>{i.onload=()=>{e+=1,n()}})})}const qc=new cn;async function jc(s,t=6e4){return new Promise((e,n)=>{const i=typeof s=="string"?s:Uc(s),r=qc.get(i);if(r)return e(r);const o=setTimeout(()=>{n("Timeout!")},t),a=document.createElement("img");a.onload=()=>{clearTimeout(o),a.onerror=a.onload=null;const h=a.naturalWidth||a.width,c=a.naturalHeight||a.height,u={width:h,height:c,aspectRatio:h/c,element:a,imageData:Tc(a)};qc.set(i,u),e(u)},a.onerror=h=>{clearTimeout(o),n(h)},a.src=i})}async function Hc(s=$t.text,t=["*"]){const n=(await ir(t))[0],i=await Rn(n,s);return{type:n.type,name:n.name,size:n.size,data:i}}async function j0(s=["image/*"]){const e=(await ir(s))[0];if(!e.type.match(/image\/*/))return new Error("Not Image Type!");const n=await Rn(e,$t.arraybuffer),i=Ei(n),r=await jc(i);return{type:e.type,name:e.name,size:e.size,data:n,width:r.width,height:r.height,aspectRatio:r.aspectRatio,imageData:r.imageData}}function H0(){return window.getSelection()?.toString()||""}function W0(s){document.getElementsByTagName("title")[0].innerText=s,document.title=s}function J0(s=200){"vibrate"in navigator?window.navigator.vibrate(s):console.error("Your device is not support vibrate on this browser.")}async function Z0(s){if(navigator.clipboard)return await navigator.clipboard.writeText(s);{const t=document.createElement("textarea");return t.value=s,t.style.opacity="0",t.style.position="fixed",t.style.top="0",t.style.left="0",t.focus(),t.select(),document.execCommand("copy")}}function Q0(s,t){window.scrollTo(s,t)}function K0(){let s=Ta,t=Ta;return"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual",s=Gc(()=>{window.history.scrollRestoration="auto"}),t=Vc(()=>{window.history.scrollRestoration="manual"})),()=>{s(),t()}}function ty(s){return/(html|body)/i.test(s.tagName)||s===document.documentElement}const ey=s=>s===document.activeElement&&(s.type||s.href),to=function(){return parseFloat(getComputedStyle(document.documentElement).fontSize)};function ny(s){return s*to()}function sy(s){return s.parentElement?parseFloat(getComputedStyle(s.parentElement).fontSize):to()}const iy=s=>{let t=s;for(;t&&t.nodeType!==1&&t.parentElement;)t=t.parentElement;return t},ry=s=>s.parentElement,eo=(s,t=[])=>!s||s.parentElement===null&&s.parentNode===null?t:eo(s.parentElement,t.concat([s]));function oy(s){const t=eo(s);for(let e=0,n=t.length;e<n;e++)if(/(auto|scroll)/.test(qe(t[e],"overflow")+qe(t[e],"overflow-y")+qe(t[e],"overflow-x")))return t[e];return document.scrollingElement||document.documentElement}const ay=(s,t)=>s.contains?s!=t&&s.contains(t):!!(s.compareDocumentPosition(t)&16),hy=s=>Array.prototype.slice.call(s.parentElement?.children).filter(t=>t!==s),cy=s=>s.nextElementSibling,uy=s=>s.previousElementSibling,ly=(s,t)=>s.closest(t),fy=s=>s.shadowRoot,Zn=s=>s.tagName==="INPUT"||s instanceof HTMLInputElement,no=s=>s.tagName==="SELECT"||s instanceof HTMLSelectElement,dy=s=>s.tagName==="TEXTAREA"||s instanceof HTMLTextAreaElement,so=s=>Zn(s)&&s.getAttribute("type")==="checkbox",io=s=>Zn(s)&&s.getAttribute("type")==="radio",my=s=>Zn(s)&&s.getAttribute("type")==="text",py=s=>Zn(s)&&s.getAttribute("type")==="number";function gy(s,t){if(no(s)){const e=s.options;for(let n=0,i=e.length;n<i;n++)e[n].selected=e[n].value==t}}function yy(s,t){if(io(s)){const e=document.getElementsByName(s.name);for(let n=0,i=e.length;n<i;n++){const r=e[n];r.checked=r.value==t}}}function wy(s,t){so(s)&&(s.checked=t)}const Qn=(s,t,e="append")=>{typeof t=="string"?s[e](Kc(t)):s[e](t)},Wc=function(s,t){if(typeof t=="string"){s.innerHTML=t;const e=eu(s);e!=s&&(s=e)}else Qn(t,"replaceWith")},Jc=function(s){Wc(s,"")},xy=(s,t)=>{s.textContent=t},by=s=>{if(s instanceof SVGElement)return"";let t=s.innerText;if(!t){const e=s.querySelector("slot")?.assignedNodes()||[];let n=0;for(;!t&&n<=e.length-1;)"innerText"in e[n]&&(t=e[n].innerText),n++}return t},vy=s=>s.remove();function _y(s,t){qe(s,"display")=="none"&&t===void 0||t===!0?Zc(s):Qc(s)}function Zc(s){qr(s,"display",s instanceof HTMLTableRowElement?"table-row":s instanceof HTMLTableCellElement?"table-cell":"block")}function Qc(s){qr(s,"display","none")}function ro(s,t,e="toggle"){const n=t.split(/[,\s]+/);if(s.classList)n.forEach(i=>{const r=i.trim();r!==""&&s.classList[e](r)});else{const i=s.className.split(/ +/);let r=!1;n.forEach(o=>{const a=o.trim();if(a!==""){const h=i.indexOf(a);switch(e){case"add":h===-1&&(i.push(a),r=!0);break;case"remove":h!==-1&&(i.splice(h,1),r=!0);break;case"toggle":h===-1?i.push(a):i.splice(h,1),r=!0;break}}}),r&&je(s,"class",i.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}}function Sy(s,t){ro(s,t,"add")}function Cy(s,t){ro(s,t,"remove")}function Ty(s,t){return new RegExp("(?:^|\\s+)"+t+"(?:\\s+|$)").test(s.className)||!1}function Kc(s,t=!1){const e=document.createElement("template");return e.innerHTML=s,t&&e.content.childNodes.forEach(n=>{const i=eu(n);i!=n&&e.content.replaceChild(i,n)}),e.content}function tu(s){return document.createElement.call(document,s)}function Ey(s){return document.createElementNS("http://www.w3.org/1999/xhtml",s)}function Py(s){return document.createTextNode.call(document,s)}function eu(s){return s.tagName=="SCRIPT"&&(s=nu(s)),s.querySelectorAll&&s.querySelectorAll("script").forEach(t=>{t.parentNode?.replaceChild(nu(t),t)}),s}function nu(s){const t=s.ownerDocument.createElement("script");t.text=s.text;const e=s.attributes;for(let n=0,i=e.length;n<i;n++)t.setAttribute(e[n].name,e[n].value);return t}function My(s,t="http://test.com/localstorage.html"){const e=document.createElement("iframe");e.src=t,document.body.append(e),setTimeout(function(){e.contentWindow?.postMessage(s,t)},4e3),setTimeout(function(){e.remove()},6e3)}function Ay(s){const t=new Proxy(window,{get(e,n,i){if(typeof n=="string"&&["open","location","document"].includes(n))throw new Error(`禁止访问 key: ${n}`);return n==="window"?t:Reflect.get(e,n,i)},set(e,n,i,r){return Reflect.set(e,n,i,r)}});new Function("window",`with(window) { ${s} }`)(t,null)}function oo(){return{x:0,y:0,isDown:!1}}function He(){const s=oo(),t=oo();return{start:s,current:t,setStart:function(e,n){s.x=e.x,s.y=e.y,s.isDown=typeof n=="boolean"?n:typeof e.isDown=="boolean"?e.isDown:!1,this.setCurrent(e,n)},setCurrent:(e,n)=>{t.x=e.x,t.y=e.y,t.isDown=typeof n=="boolean"?n:typeof e.isDown=="boolean"?e.isDown:!1}}}function Ws(s=document.documentElement,t=!1){return X(s,"mousemove",t)}function su(s=document.documentElement,t=!1){return X(s,"mousedown",t)}function iu(s=document.documentElement,t=!1){return X(s,"mouseup",t)}function ky(s=document.documentElement,t=!1){return X(s,"mouseover",t)}function Iy(s=document.documentElement,t=!1){return X(s,"mouseout",t)}function Dy(s=document.documentElement,t=!1){return X(s,"mouseenter",t)}function Ly(s=document.documentElement,t=!1){return X(s,"mouseleave",t)}function Ry(s=document.documentElement,t=!1){return X(s,"click",t)}function Oy(s=document.documentElement,t=!1){return X(s,"dblclick",t)}function zy(s=document.documentElement,t=!1){return X(s,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",t)}function Ny(s=document.documentElement,t=!1){return X(s,"contextmenu",t)}function ru(s=document.documentElement,t=!1){return X(s,"touchmove",t)}function ou(s=document.documentElement,t=!1){return X(s,"touchstart",t)}function au(s=document.documentElement,t=!1){return X(s,"touchend",t)}function hu(s=document.documentElement,t=!1){return X(s,"touchcancel",t)}function ao(s=document.documentElement,t=!1){return X(s,"pointermove",t)}function ho(s=document.documentElement,t=!1){return X(s,"pointerdown",t)}function co(s=document.documentElement,t=!1){return X(s,"pointerup",t)}function uo(s=document.documentElement,t=!1){return X(s,"pointercancel",t)}function By(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("pan",e)},e=>{t.off("pan",e)})}function Fy(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("panmove",e)},e=>{t.off("panmove",e)})}function Yy(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("panstart",e)},e=>{t.off("panstart",e)})}function $y(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("panend",e)},e=>{t.off("panend",e)})}function Xy(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("pancancel",e)},e=>{t.off("pancancel",e)})}function Uy(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("panleft",e)},e=>{t.off("panleft",e)})}function Vy(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("panright",e)},e=>{t.off("panright",e)})}function Gy(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("panup",e)},e=>{t.off("panup",e)})}function qy(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("pandown",e)},e=>{t.off("pandown",e)})}function jy(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("pinch",e)},e=>{t.off("pinch",e)})}function Hy(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("pinchin",e)},e=>{t.off("pinchin",e)})}function Wy(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("pinchout",e)},e=>{t.off("pinchout",e)})}function Jy(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("press",e)},e=>{t.off("press",e)})}function Zy(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("rotate",e)},e=>{t.off("rotate",e)})}function Qy(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("swipe",e)},e=>{t.off("swipe",e)})}function Ky(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("swipeleft",e)},e=>{t.off("swipeleft",e)})}function t1(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("swiperight",e)},e=>{t.off("swiperight",e)})}function e1(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("swipeup",e)},e=>{t.off("swipeup",e)})}function n1(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("swipedown",e)},e=>{t.off("swipedown",e)})}function s1(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("tap",e)},e=>{t.off("tap",e)})}function i1(s=document.documentElement){const t=new tt(document.documentElement);return nt(e=>{const n=i=>{!i.target||s==i.target||s.contains(i.target)||e(i)};return t.on("tap",n),n},(e,n)=>{t.off("tap",n)})}function r1(s=document.documentElement,t=!1){return X(s,"transitionstart",t)}function o1(s=document.documentElement,t=!1){return X(s,"transitionend",t)}function a1(s=document.documentElement,t=!1){return X(s,"animationstart",t)}function h1(s=document.documentElement,t=!1){return X(s,"animationend",t)}function cu(s=document.documentElement,t=!1){return X(s,"drag",t)}function uu(s=document.documentElement,t=!1){return X(s,"dragstart",t)}function lu(s=document.documentElement,t=!1){return X(s,"dragend",t)}function fu(s=document.documentElement,t=!1){return X(s,"drop",t)}function du(s=document.documentElement,t=!1){return X(s,"dragenter",t)}function mu(s=document.documentElement,t=!1){return X(s,"dragleave",t)}function pu(s=document.documentElement,t=!1){return X(s,"dragover",t)}function gu(s=document.documentElement,t=!1){return X(s,"keydown",t)}function yu(s=document.documentElement,t=!1){return X(s,"keyup",t)}function c1(s=document.documentElement,t=!1){return X(s,"keypress",t)}function u1(s=document.documentElement,t){const e=t?.useMousePoint||He();return Ws(s).pipe(rt(n=>(e.setCurrent(ft(n,s)),e)))}function l1(s=document.documentElement,t){const e=t?.useMousePoint||He();return Ws(s).pipe(Dp(su(s).pipe(Ue(n=>{e.setStart(ft(n,s),!0),t?.start?.(n,e)})),()=>iu(s).pipe(Ue(n=>{e.setCurrent(ft(n,s),!1),t?.end?.(n,e)}))),Ap(),rt(n=>(e.setCurrent(ft(n,s),!0),e)))}function f1(s=document.documentElement,t){const e=t?.useMousePoint||He();return ou(s).pipe(Ue(n=>{const i=n.changedTouches[0];e.setStart(ft(i,s),!0),t?.start?.(i,e)}),zs(()=>ru(s).pipe(br(xr(au(s),hu(s)).pipe(Ue(n=>{const i=n.changedTouches[0];e.setCurrent(ft(i,s),!1),t?.end?.(i,e)}))))),rt(n=>{const i=n.changedTouches[0];return e.setCurrent(ft(i,s),!0),e}))}function Js(s=document.documentElement,t){const e=t?.useMousePoint||He();return ho(s).pipe(Ue(n=>{e.setStart(ft(n,s),!0),t?.start?.(n,e)}),zs(()=>ao(s).pipe(br(xr(co(s),uo(s)).pipe(Ue(n=>{e.setCurrent(ft(n,s),!1),t?.end?.(n,e)}))))),rt(n=>(e.setCurrent(ft(n,s),!0),e)))}function wu(s=document.documentElement,t){const e=t?.useMousePoint||He();return Cp(Ws(s),ho(s)).pipe(Qh(n=>n instanceof PointerEvent?(e.setStart(ft(n,s),!0),t?.start?.(n,e),ao(s).pipe(br(xr(co(s),uo(s)).pipe(Ue(i=>{e.setCurrent(ft(i,s),!1),t?.end?.(i,e)}))))):n instanceof MouseEvent?Km(n):Rh),rt(n=>(e.setCurrent(ft(n,s),n instanceof PointerEvent),e)))}function d1(s){return new et(t=>Js(s,{start:()=>{t.next(0)},end:(n,i)=>{t.next(i.current.x-i.start.x)}}).subscribe(n=>{t.next(n.current.y-n.start.y)}).unsubscribe).pipe(Ce())}function m1(s,t){wn(s,"draggable","true");const e=uu(s,!0).subscribe(r=>{Ee(r),Kh(r);const o=r.dataTransfer;o&&(o.effectAllowed="move",o.setData("text/plain","some-data")),t?.onStart?.(r)}),n=cu(s).subscribe(r=>{Ee(r),t?.onDrag?.(r)}),i=lu(s).subscribe(r=>{Ee(r),t?.onEnd?.(r)});return()=>{e.unsubscribe(),n.unsubscribe(),i.unsubscribe()}}function p1(s,t){const e=du(s).subscribe(o=>{Ee(o),t?.onEnter?.(o)}),n=pu(s).subscribe(o=>{Ee(o);const a=o.dataTransfer;a&&(a.dropEffect="move"),t?.onOver?.(o)}),i=mu(s).subscribe(o=>{Ee(o),t?.onLeave?.(o)}),r=fu(s).subscribe(o=>{Ee(o);const a=o.dataTransfer;if(!a){t?.onDrop?.(o,[]);return}t?.onDrop?.(o,[...a.files])});return()=>{e.unsubscribe(),n.unsubscribe(),i.unsubscribe(),r.unsubscribe()}}function xu(s=10){return X(window,"scroll",!0).pipe(Ip(s))}function g1(){return X(document,"visibilitychange",!0).pipe(rt(()=>document.visibilityState==="visible"),Ce())}function y1(){return{screenWidth:window.screen.width,screenHeight:window.screen.height,screenX:window.screenX,screenY:window.screenY}}function Kn(){const s=document.documentElement;return{clientWidth:s.clientWidth,clientHeight:s.clientHeight,clientTop:s.clientTop,clientLeft:s.clientLeft,scrollWidth:s.scrollWidth,scrollHeight:s.scrollHeight,scrollTop:s.scrollTop,scrollLeft:s.scrollLeft,offsetWidth:s.offsetWidth,offsetHeight:s.offsetHeight,offsetTop:s.offsetTop,offsetLeft:s.offsetLeft,offsetParent:s.offsetParent}}function w1(){const s=document.body;return{clientWidth:s.clientWidth,clientHeight:s.clientHeight,clientTop:s.clientTop,clientLeft:s.clientLeft,scrollWidth:s.scrollWidth,scrollHeight:s.scrollHeight,scrollTop:s.scrollTop,scrollLeft:s.scrollLeft,offsetWidth:s.offsetWidth,offsetHeight:s.offsetHeight,offsetTop:s.offsetTop,offsetLeft:s.offsetLeft,offsetParent:s.offsetParent}}function bu(){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 x1(){const{scrollWidth:s,scrollHeight:t}=Kn();return{width:s,height:t}}function lo(s){const{top:t,left:e,width:n,height:i}=s.getBoundingClientRect(),{scrollLeft:r,scrollTop:o}=Kn();return{x:e+r,y:t+o,width:n,height:i}}function b1(s){let t=s,e=0,n=0;for(;t!==null;)e+=t.offsetLeft,n+=t.offsetTop,t.offsetParent instanceof HTMLElement?t=t.offsetParent:t=null;return{x:e,y:n,width:s.offsetWidth,height:s.offsetHeight}}function vu(s){return s.getBoundingClientRect()}function v1(s){const t=s.getBoundingClientRect();return{x:s.offsetLeft,y:s.offsetTop,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}function _1(){const{clientHeight:s,scrollTop:t,scrollHeight:e}=Kn(),n=e-s;return n<=0?0:t/n*100}function S1(s){if("center"in s){const t=s.center,e=vu(s.target);return{x:t.x-e.x,y:t.y-e.y}}return{x:s.clientX,y:s.clientY}}function fo(s){if("center"in s)return s.center;if(typeof s.pageX=="number"&&typeof s.pageY=="number")return{x:s.pageX,y:s.pageY};const{scrollLeft:t,scrollTop:e}=Kn();return{x:s.clientX+t,y:s.clientY+e}}function ft(s,t){const e={x:0,y:0};if(t){const n=fo(s),i=lo(t);e.x=N(n.x-i.x,0,i.width),e.y=N(n.y-i.y,0,i.height)}else{let n=0,i=0;if("currentTarget"in s&&s.currentTarget&&s.target&&s.currentTarget!=s.target){const r=s.currentTarget.getBoundingClientRect(),o=s.target.getBoundingClientRect();n=o.left-r.left,i=o.top-r.top}if("offsetX"in s)e.x=s.offsetX+n,e.y=s.offsetY+i;else{const r=fo(s),o=lo(s.target);e.x=N(r.x-o.x+n,0,o.width),e.y=N(r.y-o.y+i,0,o.height)}}return e}function C1(s){if(document.implementation.hasFeature("MouseEvents","2.0"))return s.button;switch(s.button){case 0:case 1:case 3:case 5:case 7:return 0;case 2:case 6:return 2;case 4:return 1}}const T1={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 E1(s){if(s.key)return s.key;if(s.keyCode)return s.keyCode;if(s.which)return s.which}function _u(s,t){const e=t.ctrl||!1,n=t.shift||!1,i=t.alt||!1;return(e===s.metaKey||e===s.ctrlKey)&&n===s.shiftKey&&i===s.altKey&&t.keys.map(r=>r.toLowerCase()).includes(s.key.toLowerCase())}function Su(s){return gu(s.target||document||window).pipe(Zh(t=>_u(t,s)),rt(t=>{t.stopPropagation(),t.preventDefault()}))}function P1(s){return yu(s.target||document||window).pipe(Zh(t=>_u(t,s)),rt(t=>{t.stopPropagation(),t.preventDefault()}))}function Cu(s={keys:["o"]},t=$t.text){return Su(s).pipe(zs(async()=>await Hc(t)))}async function M1(s={keys:["o"]},t=$t.text){return ep(Cu(s,t))}async function Tu(s,t){return new Promise(e=>{const n=new ResizeObserver(i=>{const r=s.getBoundingClientRect();t(r),e(()=>{n.unobserve(s)})});n.observe(s)})}function mo(s=document.documentElement,t){return new et(e=>{const n=s.getBoundingClientRect();let i=n.x,r=n.y,o=n.width,a=n.height;e.next(n);const h=new ResizeObserver(c=>{const u=s.getBoundingClientRect();(i!=u.x||r!=u.y||o!=u.width||a!=u.height)&&(i=u.x,r=u.y,o=u.width,a=u.height,e.next(u))});return h.observe(s,t),()=>{h.unobserve(s),h.disconnect()}})}function A1(){return X(window,"orientationchange"in window?"orientationchange":"resize").pipe(rt(s=>({width:s.target.innerWidth,height:s.target.innerHeight})),Te({width:window.innerWidth,height:window.innerHeight}))}function k1(){const s={x:0,y:0,dx:0,dy:0,dStartX:0,dStartY:0,isDown:!1},t={x:0,y:0,dx:0,dy:0,dStartX:0,dStartY:0,isDown:!1};return{mousePoint:t,setStartMousePoint:function(e,n){s.x=e.x,s.y=e.y,s.isDown=typeof n=="boolean"?n:!1,this.setCurrentMousePoint(e,n)},setCurrentMousePoint:(e,n)=>{const i=t.x,r=t.y;t.x=e.x,t.y=e.y,t.dx=t.x-i,t.dy=t.y-r,t.dStartX=t.x-s.x,t.dStartY=t.y-s.y,t.isDown=typeof n=="boolean"?n:!1}}}function I1(s=document.documentElement){const t=new ys,e=new tt(s);let n=[];const i=k1(),r=i.mousePoint,o=k=>{t.emit("mouseDown",k)},a=k=>{t.emit("mouseUp",k)},h=k=>{r.isDown||i.setCurrentMousePoint(ft(k,s)),t.emit("mouseMove",k)},c=k=>{t.emit("mouseOver",k)},u=k=>{t.emit("mouseOut",k)},l=k=>{t.emit("mouseEnter",k)},m=k=>{t.emit("mouseLeave",k)},f=k=>{t.emit("mouseClick",k)},p=k=>{t.emit("mouseDoubleClick",k)},y=k=>{t.emit("mouseWheel",k)},v=k=>{t.emit("mouseContextMenu",k)},w=k=>{t.emit("touchStart",k)},_=k=>{t.emit("touchEnd",k)},x=k=>{t.emit("touchCancel",k)},b=k=>{const at=k.changedTouches[0];r.isDown||i.setCurrentMousePoint(ft(at,s)),t.emit("touchMove",k)},E=k=>{t.emit("pointerDown",k)},C=k=>{t.emit("pointerUp",k)},L=k=>{t.emit("pointerCancel",k)},B=k=>{t.emit("pointerMove",k)},F=k=>{t.emit("pan",k)},U=k=>{t.emit("panStart",k)},G=k=>{t.emit("panMove",k)},J=k=>{t.emit("panEnd",k)},st=k=>{t.emit("panCancel",k)},K=k=>{t.emit("panLeft",k)},Kt=k=>{t.emit("panRight",k)},Yt=k=>{t.emit("panUp",k)},Ut=k=>{t.emit("panDown",k)},te=k=>{t.emit("pinch",k)},R=k=>{t.emit("pinchin",k)},D=k=>{t.emit("pinchout",k)},$=k=>{t.emit("press",k)},H=k=>{t.emit("rotate",k)},At=k=>{t.emit("swipe",k)},ee=k=>{t.emit("swipeLeft",k)},ai=k=>{t.emit("swipeRight",k)},hi=k=>{t.emit("swipeUp",k)},mt=k=>{t.emit("swipeDown",k)},ae=k=>{t.emit("tap",k)},it=k=>{!k.target||s==k.target||s.contains(k.target)||t.emit("tapOutSide",k)},Ct=k=>{t.emit("transitionstart",k)},_n=k=>{t.emit("transitionend",k)},en=k=>{t.emit("animationstart",k)},nn=k=>{t.emit("animationend",k)};let Oe={...s.getBoundingClientRect(),width:s.offsetWidth,height:s.offsetHeight};return{el:s,get rect(){return Oe},mousePoint:r,eb:t,start:async function(){n.push(W(s,"mousedown",o)),n.push(W(s,"mouseup",a)),n.push(W(s,"mousemove",h)),n.push(W(s,"mouseover",c)),n.push(W(s,"mouseout",u)),n.push(W(s,"mouseenter",l)),n.push(W(s,"mouseleave",m)),n.push(W(s,"click",f)),n.push(W(s,"dblclick",p)),n.push(W(s,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",y)),n.push(W(s,"contextmenu",v)),n.push(W(s,"touchstart",w)),n.push(W(s,"touchend",_)),n.push(W(s,"touchcancel",x)),n.push(W(s,"touchmove",b)),n.push(W(s,"pointerdown",E)),n.push(W(s,"pointerup",C)),n.push(W(s,"pointercancel",L)),n.push(W(s,"pointermove",B)),e.on("pan",F),e.on("panstart",U),e.on("panmove",G),e.on("panend",J),e.on("pancancel",st),e.on("panleft",K),e.on("panright",Kt),e.on("panup",Yt),e.on("pandown",Ut),e.on("pinch",te),e.on("pinchin",R),e.on("pinchout",D),e.on("press",$),e.on("rotate",H),e.on("swipe",At),e.on("swipeleft",ee),e.on("swiperight",ai),e.on("swipeup",hi),e.on("swipedown",mt),e.on("tap",ae),n.push(W(document,"pointerdown",it)),n.push(W(s,"transitionstart",Ct)),n.push(W(s,"transitionend",_n)),n.push(W(s,"animationstart",en)),n.push(W(s,"animationend",nn));const k=await Tu(s,at=>{Oe=at,t.emit("resize",at)});n.push(k),n.push(Eu(this,{start:at=>{i.setStartMousePoint(ft(at,s),!0)},move:at=>{i.setCurrentMousePoint(ft(at,s))},end:at=>{i.setCurrentMousePoint(ft(at,s),!1)}}))},end:()=>{t.removeAllListeners(),n.forEach(k=>k()),n=[],e.off("pan",F),e.off("panstart",U),e.off("panmove",G),e.off("panend",J),e.off("pancancel",st),e.off("panleft",K),e.off("panright",Kt),e.off("panup",Yt),e.off("pandown",Ut),e.off("pinch",te),e.off("pinchin",R),e.off("pinchout",D),e.off("press",$),e.off("rotate",H),e.off("swipe",At),e.off("swipeleft",ee),e.off("swiperight",ai),e.off("swipeup",hi),e.off("swipedown",mt),e.off("tap",ae)}}}function Eu(s,t){return Pu(s,t)}function Pu(s,t){const e=s.eb,n=o=>{e.on("pointerMove",r),e.on("pointerUp",i),e.on("pointerCancel",i),t?.start?.(o)},i=o=>{e.off("pointerMove",r),e.off("pointerUp",i),e.off("pointerCancel",i),t?.end?.(o)},r=o=>{t?.move?.(o)};return e.on("pointerDown",n),()=>e.off("pointerDown",n)}function D1(s,t){const e=s.eb,n=o=>{document.addEventListener("mousemove",r,!1),document.addEventListener("mouseup",i,!1),t?.start?.(o)},i=o=>{document.removeEventListener("mousemove",r,!1),document.removeEventListener("mouseup",i,!1),t?.end?.(o)},r=o=>{t?.move?.(o)};return e.on("mouseDown",n),()=>e.off("mouseDown",n)}function L1(s,t){const e=s.eb,n=o=>{e.on("touchMove",r),e.on("touchEnd",i),e.on("touchCancel",i);const a=o.changedTouches[0];t?.start?.(a)},i=o=>{e.off("touchMove",r),e.off("touchEnd",i),e.off("touchCancel",i);const a=o.changedTouches[0];t?.end?.(a)},r=o=>{const a=o.changedTouches[0];t?.move?.(a)};return e.on("touchStart",n),()=>e.off("touchStart",n)}let po=class{x;y;toX;toY;constructor(t){this.x=t?.x||0,this.y=t?.y||0,this.toX=t?.toX||0,this.toY=t?.toY||0}toSVGPathData(){return[["L",this.toX,this.toY]]}toCanvasContext(t){t.lineTo(this.toX,this.toY)}getBoundingClientRect(){const t=Jt(this.x,this.y,this.toX,this.toY);if(t===0){const e=Math.min(this.x,this.toX),n=Math.min(this.y,this.toY),i=Math.max(this.x,this.toX),r=Math.max(this.y,this.toY);return{x:e,y:n,width:i-e,height:r-n}}else{const e=Math.sin(t),n=Math.cos(t),i=n*this.x-e*this.y,r=n*this.toX-e*this.toY,o=n*this.y+e*this.x,a=n*this.toY+e*this.toX;return{x:Math.min(i,r),y:Math.min(o,a),width:Math.max(i,r)-Math.min(i,r),height:Math.max(o,a)-Math.min(o,a)}}}interpolate(t){return{x:this.x+t*(this.toX-this.x),y:this.y+t*(this.toY-this.y)}}intersection(t){const e=this.x,n=this.y,i=t.toX,r=t.toY,o=this.toX-e,a=t.x-i;if(!o&&!a)return null;const h=(this.toY-n)/o,c=(t.y-r)/a;if(o){if(!a)return{x:i,y:h*(i-e)+n}}else return{x:e,y:c*(e-i)+r};const u=(-c*i+r+h*e-n)/(h-c),l=h*(u-e)+n;return isNaN(u)||isNaN(l)?null:{x:u,y:l}}};class go extends po{rx;ry;xAxisRotate;largeArcFlag;sweepFlag;constructor(t){super(t),this.rx=t.rx,this.ry=t.ry,this.xAxisRotate=typeof t?.xAxisRotate=="number"?t?.xAxisRotate:0,this.largeArcFlag=typeof t?.largeArcFlag=="number"?t?.largeArcFlag:1,this.sweepFlag=typeof t?.sweepFlag=="number"?t?.sweepFlag:1,this.toX=t.toX,this.toY=t.toY}toSVGPathData(){return[["A",this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag,this.toX,this.toY]]}toCanvasContext(t){const[e,n,i,r,o,a,h]=this.convert(this.x,this.y,this.toX,this.toY,this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag);t.ellipse(e,n,i,r,o,a,h,!this.sweepFlag)}convert(t,e,n,i,r,o,a,h,c){const u=a/180*Math.PI,l=(t-n)/2,m=(e-i)/2,f=Math.cos(u)*l+Math.sin(u)*m,p=-Math.sin(u)*l+Math.cos(u)*m,y=f*f/(r*r)+p*p/(o*o);if(y>1){const G=Math.sqrt(y);throw r=G*r,o=G*o,new Error(`Radii are too small to build an arc. Correcting them to ${r}/${o}.`)}const v=Math.sqrt((r*r*o*o-r*r*p*p-o*o*f*f)/(r*r*p*p+o*o*f*f)),w=h!=c?1:-1,_=w*v*r*p/o,x=w*v*-o*f/r,b=(t+n)/2,E=(e+i)/2,C=Math.cos(u)*_-Math.sin(u)*x+b,L=Math.sin(u)*_+Math.cos(u)*x+E,B=(G,J,st,K)=>(G*K>=J*st?1:-1)*Math.acos((G*st+J*K)/(Math.sqrt(G*G+J*J)*Math.sqrt(st*st+K*K))),F=B(1,0,t-C,e-L)-u,U=B(t-C,e-L,n-C,i-L);return[C,L,r,o,u,F,F+U]}}class R1 extends po{cx;cy;isLineThrough;constructor(t){super(t),this.cx=t.cx,this.cy=t.cy,this.isLineThrough=typeof t.isLineThrough=="boolean"?t.isLineThrough:!1}toSVGPathData(){if(this.isLineThrough){const t=this.cx*2-(this.x+this.toX)/2,e=this.cy*2-(this.y+this.toY)/2;return[["Q",t,e,this.toX,this.toY]]}else return[["Q",this.cx,this.cy,this.toX,this.toY]]}toCanvasContext(t){if(this.isLineThrough){const e=this.cx*2-(this.x+this.toX)/2,n=this.cy*2-(this.y+this.toY)/2;t.quadraticCurveTo(e,n,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}getBoundingClientRect(){const t=[this.x,this.toX],e=[this.y,this.toY];let n,i,r,o;for(let c=0;c<2;++c)n=c==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,i=c==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,r=c==0?this.x:this.y,Math.abs(n)>1e-12&&(o=-i/(2*n),0<o&&o<1&&[t,e][c].push(n*o*o+i*o+r));const a={x:Math.min(0,...t),y:Math.min(0,...e)},h={x:Math.max(0,...t),y:Math.max(0,...e)};return{x:a.x,y:a.y,width:h.x-a.x,height:h.y-a.y}}interpolate(t){return{x:(1-t)*(1-t)*this.x+2*(1-t)*t*this.cx+t*t*this.toX,y:(1-t)*(1-t)*this.y+2*(1-t)*t*this.cy+t*t*this.toY}}}const O1=R1;class gt extends po{c1x;c1y;c2x;c2y;constructor(t){super(t),this.c1x=t.c1x,this.c1y=t.c1y,this.c2x=t.c2x,this.c2y=t.c2y}clone(){return new gt({x:this.x,y:this.y,c1x:this.c1x,c1y:this.c1y,c2x:this.c2x,c2y:this.c2y,toX:this.toX,toY:this.toY})}toSVGPathData(){return[["C",this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY]]}toCanvasContext(t){t.bezierCurveTo(this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY)}getBoundingClientRect(){let t=this.c2x-2*this.c1x+this.x-(this.toX-2*this.c2x+this.c1x),e=2*(this.c1x-this.x)-2*(this.c2x-this.c1x),n=this.x-this.c1x,i=(-e+Math.sqrt(e*e-4*t*n))/2/t,r=(-e-Math.sqrt(e*e-4*t*n))/2/t;const o=[this.y,this.toY],a=[this.x,this.toX];let h;const c=[];Math.abs(i)>1e12&&(i=.5),Math.abs(r)>1e12&&(r=.5),i>=0&&i<=1&&(h=this.interpolate(i),a.push(h.x),o.push(h.y),c.push({X:h.x,Y:h.y})),r>=0&&r<=1&&(h=this.interpolate(r),a.push(h.x),o.push(h.y),c.push({X:h.x,Y:h.y})),t=this.c2y-2*this.c1y+this.y-(this.toY-2*this.c2y+this.c1y),e=2*(this.c1y-this.y)-2*(this.c2y-this.c1y),n=this.y-this.c1y,i=(-e+Math.sqrt(e*e-4*t*n))/2/t,r=(-e-Math.sqrt(e*e-4*t*n))/2/t,Math.abs(i)>1e12&&(i=.5),Math.abs(r)>1e12&&(r=.5),i>=0&&i<=1&&(h=this.interpolate(i),a.push(h.x),o.push(h.y),c.push({X:h.x,Y:h.y})),r>=0&&r<=1&&(h=this.interpolate(r),a.push(h.x),o.push(h.y),c.push({X:h.x,Y:h.y}));const u=[],l=c.length;for(let p=0;p<l;p++){for(let y=p+1;y<l;y++)c[p].X===c[y].X&&c[p].Y===c[y].Y&&(y=++p);u.push({X:c[p].X,Y:c[p].Y})}const m={x:Math.min(...a),y:Math.min(...o)},f={x:Math.max(...a),y:Math.max(...o)};return{x:m.x,y:m.y,width:f.x-m.x,height:f.y-m.y,dots:u}}interpolate(t){return{x:Math.pow(1-t,3)*this.x+3*Math.pow(1-t,2)*t*this.c1x+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2x+Math.pow(t,3)*this.toX,y:Math.pow(1-t,3)*this.y+3*Math.pow(1-t,2)*t*this.c1y+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2y+Math.pow(t,3)*this.toY}}static base3(t,e,n,i,r){const o=-3*e+9*n-9*i+3*r,a=t*o+6*e-12*n+6*i;return t*a-3*e+3*n}static bezlen(t,e,n,i,r,o,a,h,c=1){c=Math.max(0,Math.min(c,1));const u=c/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],m=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let f=0;for(let p=0;p<12;p++){const y=u*l[p]+u,v=gt.base3(y,t,n,r,a),w=gt.base3(y,e,i,o,h);f+=m[p]*Math.sqrt(v*v+w*w)}return u*f}length(t=1){return gt.bezlen(this.x,this.y,this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY,t)}getTatLen(t){const e=this.x,n=this.y,i=this.c1x,r=this.c1y,o=this.c2x,a=this.c2y,h=this.toX,c=this.toY;if(t<0||gt.bezlen(e,n,i,r,o,a,h,c)<t)return 0;const u=1;let l=u/2,m=u-l,f=gt.bezlen(e,n,i,r,o,a,h,c,m);for(;Math.abs(f-t)>.01;)l/=2,m+=(f<t?1:-1)*l,f=gt.bezlen(e,n,i,r,o,a,h,c,m);return m}getPointAtSegmentLength(t){const e=this.getTatLen(t),n=1-e,i=Math.pow(n,3),r=Math.pow(n,2),o=e*e,a=o*e,h=i*this.x+r*3*e*this.c1x+n*3*e*e*this.c2x+a*this.toX,c=i*this.y+r*3*e*this.c1y+n*3*e*e*this.c2y+a*this.toY,u=this.x+2*e*(this.c1x-this.x)+o*(this.c2x-2*this.c1x+this.x),l=this.y+2*e*(this.c1y-this.y)+o*(this.c2y-2*this.c1y+this.y),m=this.c1x+2*e*(this.c2x-this.c1x)+o*(this.toX-2*this.c2x+this.c1x),f=this.c1y+2*e*(this.c2y-this.c1y)+o*(this.toY-2*this.c2y+this.c1y),p=n*this.x+e*this.c1x,y=n*this.y+e*this.c1y,v=n*this.c2x+e*this.toX,w=n*this.c2y+e*this.toY,_=90-Math.atan2(u-m,l-f)*180/Math.PI;return{x:h,y:c,m:{x:u,y:l},n:{x:m,y:f},start:{x:p,y},end:{x:v,y:w},alpha:_}}}const ts=Math.PI*2;function Mu(s,t,e,n){const i=s*n-t*e<0?-1:1;let r=s*e+t*n;return r>1&&(r=1),r<-1&&(r=-1),i*Math.acos(r)}function z1(s,t,e,n,i,r,o,a,h,c){const u=c*(s-e)/2+h*(t-n)/2,l=-h*(s-e)/2+c*(t-n)/2,m=o*o,f=a*a,p=u*u,y=l*l;let v=m*f-m*y-f*p;v<0&&(v=0),v/=m*y+f*p,v=Math.sqrt(v)*(i===r?-1:1);const w=v*o/a*l,_=v*-a/o*u,x=c*w-h*_+(s+e)/2,b=h*w+c*_+(t+n)/2,E=(u-w)/o,C=(l-_)/a,L=(-u-w)/o,B=(-l-_)/a,F=Mu(1,0,E,C);let U=Mu(E,C,L,B);return r===0&&U>0&&(U-=ts),r===1&&U<0&&(U+=ts),[x,b,F,U]}function N1(s,t){const e=1.3333333333333333*Math.tan(t/4),n=Math.cos(s),i=Math.sin(s),r=Math.cos(s+t),o=Math.sin(s+t);return[n,i,n-i*e,i+n*e,r+o*e,o-r*e,r,o]}function Au(s,t,e,n,i,r,o,a,h){const c=Math.sin(h*ts/360),u=Math.cos(h*ts/360),l=u*(s-e)/2+c*(t-n)/2,m=-c*(s-e)/2+u*(t-n)/2;if(l===0&&m===0)return[];if(o===0||a===0)return[];o=Math.abs(o),a=Math.abs(a);const f=l*l/(o*o)+m*m/(a*a);f>1&&(o*=Math.sqrt(f),a*=Math.sqrt(f));const p=z1(s,t,e,n,i,r,o,a,c,u),y=[];let v=p[2],w=p[3];const _=Math.max(Math.ceil(Math.abs(w)/(ts/4)),1);w/=_;for(let x=0;x<_;x++)y.push(N1(v,w)),v+=w;return y.map(x=>{for(let b=0;b<x.length;b+=2){let E=x[b+0],C=x[b+1];E*=o,C*=a;const L=u*E-c*C,B=c*E+u*C;x[b+0]=L+p[0],x[b+1]=B+p[1]}return x})}function yo(s,t,e,n,i,r){return[s/3+2/3*e,t/3+2/3*n,i/3+2/3*e,r/3+2/3*n,i,r]}function es(s,t,e,n){return[s,t,e,n,e,n]}const Zs={a:7,c:6,s:4,q:4,t:2,m:2,l:2,h:1,v:1,z:0};function ku(s="path",t){const e=document.createElementNS.call(document,"http://www.w3.org/2000/svg",s);return t&&je(e,t),e}function B1(s,t){return ku("path",{d:s,id:t||on()})}function F1(s,t="shape"){return Hs(sr(s),`${t}.svg`)}function Iu(s){return typeof s!="string"?!1:(s=s.trim(),/^[mlhvzaqtcs]\s*[-+.0-9][^mlhvzaqtcs]+/i.test(s)&&/[\dz]$/i.test(s))}function Y1(s){return s.map(t=>{if(!t[0])return"";switch(t[0].toLowerCase()){case"a":return`${t[0]} ${t[1]},${t[2]} ${t[3]} ${t[4]},${t[5]} ${t[6]},${t[7]}`;case"c":return`${t[0]} ${t[1]},${t[2]} ${t[3]},${t[4]} ${t[5]},${t[6]}`;case"s":case"q":return`${t[0]} ${t[1]},${t[2]} ${t[3]},${t[4]}`;default:return t[0]+" "+t.slice(1).join(",")}}).join(" ")}function Du(s){const t=[];return Iu(s)&&s.replace(/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi,(e,n,i)=>{let r=n.toLowerCase();const o=Ti(i);for(r=="m"&&o.length>Zs[r]&&(t.push([n,...o.splice(0,Zs[r])]),r="l",n=n=="m"?"l":"L");o.length;){if(o.length<Zs[r])throw new Error(`parseSVGPath substring:{ ${e} } command:{ ${n} } args:{ ${o} }`);t.push([n,...o.splice(0,Zs[r])])}return r=="z"&&t.push([n]),""}),t}function Lu(s){let t=0,e=0,n=0,i=0;return s.map(function(r){const o=r[0],a=o.toUpperCase();if(o!=a)switch(r[0]=a,o){case"a":r[6]+=n,r[7]+=i;break;case"v":r[1]+=i;break;case"h":r[1]+=n;break;default:for(let h=1;h<r.length;)r[h++]+=n,r[h++]+=i}switch(a){case"Z":n=t,i=e;break;case"H":n=r[1];break;case"V":i=r[1];break;case"M":n=t=r[1],i=e=r[2];break;default:n=r[r.length-2],i=r[r.length-1]}return r})}function $1(s){const t=[];let e=0,n=0,i=0,r=0,o=0,a=0,h=0,c=0,u;for(let l=0,m=s.length;l<m;l++){let f=s[l];const p=f[0];switch(p){case"M":e=f[1],n=f[2];break;case"A":const y=Au(i,r,f[6],f[7],f[4],f[5],f[1],f[2],f[3]);if(!y.length)continue;y.forEach((_,x)=>{const[b,E,C,L,B,F,U,G]=_;f=["C",C,L,B,F,U,G],x<y.length-1&&t.push(f)});break;case"S":let v=i,w=r;(u=="C"||u=="S")&&(v+=v-h,w+=w-c),f=["C",v,w,f[1],f[2],f[3],f[4]];break;case"T":u=="Q"||u=="T"?(o=i*2-o,a=r*2-a):(o=i,a=r),f=["C",...yo(i,r,o,a,f[1],f[2])];break;case"Q":o=f[1],a=f[2],f=["C",...yo(i,r,f[1],f[2],f[3],f[4])];break;case"L":f=["C",...es(i,r,f[1],f[2])];break;case"H":f=["C",...es(i,r,f[1],r)];break;case"V":f=["C",...es(i,r,i,f[1])];break;case"Z":f=["C",...es(i,r,e,n)];break}u=p,i=f[f.length-2],r=f[f.length-1],f.length>4?(h=f[f.length-4],c=f[f.length-3]):(h=i,c=r),t.push(f)}return t}class ns{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"),n=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)",n.append(i),e.width="5",e.style.cssText="position: absolute; visibility: hidden;",document.documentElement.append(e),e.contentDocument?.body.append(n),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(()=>{ns.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 wo extends ys{source;raw="";mode="text";tagname="";nodename="";textchunk="";entity="";quote="";attrs={};constructor(t){super(),this.source=t}parse(){const t=Ll(this.source);if(t===0){this.emit("finish");return}let e,n,i=ma(this.source,0);for(let r=1;r<t;r++)e=n,n=i,i=ma(this.source,r),this.raw+=n,n&&this.step(n,i,e);i&&this.step(i,void 0,n),this.emit("finish")}step(t,e,n){t==`
|
|
25
|
+
`):"",this.name="UnsubscriptionError",this.errors=e}});function Rn(s,t){if(s){var e=s.indexOf(t);0<=e&&s.splice(e,1)}}var dn=function(){function s(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return s.prototype.unsubscribe=function(){var t,e,n,i,r;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=Ye(o),h=a.next();!h.done;h=a.next()){var c=h.value;c.remove(this)}}catch(y){t={error:y}}finally{try{h&&!h.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var u=this.initialTeardown;if(j(u))try{u()}catch(y){r=y instanceof ar?y.errors:[y]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var m=Ye(l),f=m.next();!f.done;f=m.next()){var p=f.value;try{Ph(p)}catch(y){r=r??[],y instanceof ar?r=$e($e([],Se(r)),Se(y.errors)):r.push(y)}}}catch(y){n={error:y}}finally{try{f&&!f.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}}if(r)throw new ar(r)}},s.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Ph(t);else{if(t instanceof s){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},s.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},s.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},s.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Rn(e,t)},s.prototype.remove=function(t){var e=this._finalizers;e&&Rn(e,t),t instanceof s&&t._removeParent(this)},s.EMPTY=function(){var t=new s;return t.closed=!0,t}(),s}(),Th=dn.EMPTY;function Eh(s){return s instanceof dn||s&&"closed"in s&&j(s.remove)&&j(s.add)&&j(s.unsubscribe)}function Ph(s){j(s)?s():s.unsubscribe()}var Mh={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},hr={setTimeout:function(s,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];var i=hr.delegate;return i?.setTimeout?i.setTimeout.apply(i,$e([s,t],Se(e))):setTimeout.apply(void 0,$e([s,t],Se(e)))},clearTimeout:function(s){var t=hr.delegate;return(t?.clearTimeout||clearTimeout)(s)},delegate:void 0};function Ah(s){hr.setTimeout(function(){throw s})}function On(){}function Ds(s){s()}var cr=function(s){fe(t,s);function t(e){var n=s.call(this)||this;return n.isStopped=!1,e?(n.destination=e,Eh(e)&&e.add(n)):n.destination=Em,n}return t.create=function(e,n,i){return new Ls(e,n,i)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,s.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(dn),Sm=Function.prototype.bind;function ur(s,t){return Sm.call(s,t)}var Cm=function(){function s(t){this.partialObserver=t}return s.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(n){Rs(n)}},s.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(n){Rs(n)}else Rs(t)},s.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){Rs(e)}},s}(),Ls=function(s){fe(t,s);function t(e,n,i){var r=s.call(this)||this,o;if(j(e)||!e)o={next:e??void 0,error:n??void 0,complete:i??void 0};else{var a;r&&Mh.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return r.unsubscribe()},o={next:e.next&&ur(e.next,a),error:e.error&&ur(e.error,a),complete:e.complete&&ur(e.complete,a)}):o=e}return r.destination=new Cm(o),r}return t}(cr);function Rs(s){Ah(s)}function Tm(s){throw s}var Em={closed:!0,next:On,error:Tm,complete:On},lr=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Xe(s){return s}function Pm(s){return s.length===0?Xe:s.length===1?s[0]:function(e){return s.reduce(function(n,i){return i(n)},e)}}var et=function(){function s(t){t&&(this._subscribe=t)}return s.prototype.lift=function(t){var e=new s;return e.source=this,e.operator=t,e},s.prototype.subscribe=function(t,e,n){var i=this,r=Am(t)?t:new Ls(t,e,n);return Ds(function(){var o=i,a=o.operator,h=o.source;r.add(a?a.call(r,h):h?i._subscribe(r):i._trySubscribe(r))}),r},s.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},s.prototype.forEach=function(t,e){var n=this;return e=kh(e),new e(function(i,r){var o=new Ls({next:function(a){try{t(a)}catch(h){r(h),o.unsubscribe()}},error:r,complete:i});n.subscribe(o)})},s.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},s.prototype[lr]=function(){return this},s.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Pm(t)(this)},s.prototype.toPromise=function(t){var e=this;return t=kh(t),new t(function(n,i){var r;e.subscribe(function(o){return r=o},function(o){return i(o)},function(){return n(r)})})},s.create=function(t){return new s(t)},s}();function kh(s){var t;return(t=s??Mh.Promise)!==null&&t!==void 0?t:Promise}function Mm(s){return s&&j(s.next)&&j(s.error)&&j(s.complete)}function Am(s){return s&&s instanceof cr||Mm(s)&&Eh(s)}function km(s){return j(s?.lift)}function Ot(s){return function(t){if(km(t))return t.lift(function(e){try{return s(e,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function lt(s,t,e,n,i){return new Im(s,t,e,n,i)}var Im=function(s){fe(t,s);function t(e,n,i,r,o,a){var h=s.call(this,e)||this;return h.onFinalize=o,h.shouldUnsubscribe=a,h._next=n?function(c){try{n(c)}catch(u){e.error(u)}}:s.prototype._next,h._error=r?function(c){try{r(c)}catch(u){e.error(u)}finally{this.unsubscribe()}}:s.prototype._error,h._complete=i?function(){try{i()}catch(c){e.error(c)}finally{this.unsubscribe()}}:s.prototype._complete,h}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;s.prototype.unsubscribe.call(this),!n&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t}(cr),Dm=or(function(s){return function(){s(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),mn=function(s){fe(t,s);function t(){var e=s.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var n=new Ih(this,this);return n.operator=e,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new Dm},t.prototype.next=function(e){var n=this;Ds(function(){var i,r;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var o=Ye(n.currentObservers),a=o.next();!a.done;a=o.next()){var h=a.value;h.next(e)}}catch(c){i={error:c}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}}})},t.prototype.error=function(e){var n=this;Ds(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=e;for(var i=n.observers;i.length;)i.shift().error(e)}})},t.prototype.complete=function(){var e=this;Ds(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var n=e.observers;n.length;)n.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),s.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var n=this,i=this,r=i.hasError,o=i.isStopped,a=i.observers;return r||o?Th:(this.currentObservers=null,a.push(e),new dn(function(){n.currentObservers=null,Rn(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var n=this,i=n.hasError,r=n.thrownError,o=n.isStopped;i?e.error(r):o&&e.complete()},t.prototype.asObservable=function(){var e=new et;return e.source=this,e},t.create=function(e,n){return new Ih(e,n)},t}(et),Ih=function(s){fe(t,s);function t(e,n){var i=s.call(this)||this;return i.destination=e,i.source=n,i}return t.prototype.next=function(e){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,e)},t.prototype.error=function(e){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,e)},t.prototype.complete=function(){var e,n;(n=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||n===void 0||n.call(e)},t.prototype._subscribe=function(e){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(e))!==null&&i!==void 0?i:Th},t}(mn),Lm=function(s){fe(t,s);function t(e){var n=s.call(this)||this;return n._value=e,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(e){var n=s.prototype._subscribe.call(this,e);return!n.closed&&e.next(this._value),n},t.prototype.getValue=function(){var e=this,n=e.hasError,i=e.thrownError,r=e._value;if(n)throw i;return this._throwIfClosed(),r},t.prototype.next=function(e){s.prototype.next.call(this,this._value=e)},t}(mn),Dh={now:function(){return(Dh.delegate||Date).now()},delegate:void 0},Rm=function(s){fe(t,s);function t(e,n){return s.call(this)||this}return t.prototype.schedule=function(e,n){return this},t}(dn),Os={setInterval:function(s,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];var i=Os.delegate;return i?.setInterval?i.setInterval.apply(i,$e([s,t],Se(e))):setInterval.apply(void 0,$e([s,t],Se(e)))},clearInterval:function(s){var t=Os.delegate;return(t?.clearInterval||clearInterval)(s)},delegate:void 0},Om=function(s){fe(t,s);function t(e,n){var i=s.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.pending=!1,i}return t.prototype.schedule=function(e,n){var i;if(n===void 0&&(n=0),this.closed)return this;this.state=e;var r=this.id,o=this.scheduler;return r!=null&&(this.id=this.recycleAsyncId(o,r,n)),this.pending=!0,this.delay=n,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(o,this.id,n),this},t.prototype.requestAsyncId=function(e,n,i){return i===void 0&&(i=0),Os.setInterval(e.flush.bind(e,this),i)},t.prototype.recycleAsyncId=function(e,n,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return n;n!=null&&Os.clearInterval(n)},t.prototype.execute=function(e,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(e,n);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,n){var i=!1,r;try{this.work(e)}catch(o){i=!0,r=o||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var e=this,n=e.id,i=e.scheduler,r=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Rn(r,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,s.prototype.unsubscribe.call(this)}},t}(Rm),Lh=function(){function s(t,e){e===void 0&&(e=s.now),this.schedulerActionCtor=t,this.now=e}return s.prototype.schedule=function(t,e,n){return e===void 0&&(e=0),new this.schedulerActionCtor(this,t).schedule(n,e)},s.now=Dh.now,s}(),zm=function(s){fe(t,s);function t(e,n){n===void 0&&(n=Lh.now);var i=s.call(this,e,n)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(e){var n=this.actions;if(this._active){n.push(e);return}var i;this._active=!0;do if(i=e.execute(e.state,e.delay))break;while(e=n.shift());if(this._active=!1,i){for(;e=n.shift();)e.unsubscribe();throw i}},t}(Lh),fr=new zm(Om),Nm=fr,Rh=new et(function(s){return s.complete()});function Oh(s){return s&&j(s.schedule)}function dr(s){return s[s.length-1]}function Bm(s){return j(dr(s))?s.pop():void 0}function zn(s){return Oh(dr(s))?s.pop():void 0}function Fm(s,t){return typeof dr(s)=="number"?s.pop():t}var mr=function(s){return s&&typeof s.length=="number"&&typeof s!="function"};function zh(s){return j(s?.then)}function Nh(s){return j(s[lr])}function Bh(s){return Symbol.asyncIterator&&j(s?.[Symbol.asyncIterator])}function Fh(s){return new TypeError("You provided "+(s!==null&&typeof s=="object"?"an invalid object":"'"+s+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Ym(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Yh=Ym();function $h(s){return j(s?.[Yh])}function Xh(s){return vm(this,arguments,function(){var e,n,i,r;return Ch(this,function(o){switch(o.label){case 0:e=s.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,fn(e.read())];case 3:return n=o.sent(),i=n.value,r=n.done,r?[4,fn(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,fn(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function Uh(s){return j(s?.getReader)}function vt(s){if(s instanceof et)return s;if(s!=null){if(Nh(s))return $m(s);if(mr(s))return Xm(s);if(zh(s))return Um(s);if(Bh(s))return Vh(s);if($h(s))return Vm(s);if(Uh(s))return Gm(s)}throw Fh(s)}function $m(s){return new et(function(t){var e=s[lr]();if(j(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Xm(s){return new et(function(t){for(var e=0;e<s.length&&!t.closed;e++)t.next(s[e]);t.complete()})}function Um(s){return new et(function(t){s.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,Ah)})}function Vm(s){return new et(function(t){var e,n;try{for(var i=Ye(s),r=i.next();!r.done;r=i.next()){var o=r.value;if(t.next(o),t.closed)return}}catch(a){e={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}t.complete()})}function Vh(s){return new et(function(t){qm(s,t).catch(function(e){return t.error(e)})})}function Gm(s){return Vh(Xh(s))}function qm(s,t){var e,n,i,r;return bm(this,void 0,void 0,function(){var o,a;return Ch(this,function(h){switch(h.label){case 0:h.trys.push([0,5,6,11]),e=_m(s),h.label=1;case 1:return[4,e.next()];case 2:if(n=h.sent(),!!n.done)return[3,4];if(o=n.value,t.next(o),t.closed)return[2];h.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=h.sent(),i={error:a},[3,11];case 6:return h.trys.push([6,,9,10]),n&&!n.done&&(r=e.return)?[4,r.call(e)]:[3,8];case 7:h.sent(),h.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function de(s,t,e,n,i){n===void 0&&(n=0),i===void 0&&(i=!1);var r=t.schedule(function(){e(),i?s.add(this.schedule(null,n)):this.unsubscribe()},n);if(s.add(r),!i)return r}function Gh(s,t){return t===void 0&&(t=0),Ot(function(e,n){e.subscribe(lt(n,function(i){return de(n,s,function(){return n.next(i)},t)},function(){return de(n,s,function(){return n.complete()},t)},function(i){return de(n,s,function(){return n.error(i)},t)}))})}function pr(s,t){return t===void 0&&(t=0),Ot(function(e,n){n.add(s.schedule(function(){return e.subscribe(n)},t))})}function jm(s,t){return vt(s).pipe(pr(t),Gh(t))}function Hm(s,t){return vt(s).pipe(pr(t),Gh(t))}function Wm(s,t){return new et(function(e){var n=0;return t.schedule(function(){n===s.length?e.complete():(e.next(s[n++]),e.closed||this.schedule())})})}function Jm(s,t){return new et(function(e){var n;return de(e,t,function(){n=s[Yh](),de(e,t,function(){var i,r,o;try{i=n.next(),r=i.value,o=i.done}catch(a){e.error(a);return}o?e.complete():e.next(r)},0,!0)}),function(){return j(n?.return)&&n.return()}})}function qh(s,t){if(!s)throw new Error("Iterable cannot be null");return new et(function(e){de(e,t,function(){var n=s[Symbol.asyncIterator]();de(e,t,function(){n.next().then(function(i){i.done?e.complete():e.next(i.value)})},0,!0)})})}function Zm(s,t){return qh(Xh(s),t)}function Qm(s,t){if(s!=null){if(Nh(s))return jm(s,t);if(mr(s))return Wm(s,t);if(zh(s))return Hm(s,t);if(Bh(s))return qh(s,t);if($h(s))return Jm(s,t);if(Uh(s))return Zm(s,t)}throw Fh(s)}function Nn(s,t){return t?Qm(s,t):vt(s)}function Km(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];var e=zn(s);return Nn(s,e)}var tp=or(function(s){return function(){s(this),this.name="EmptyError",this.message="no elements in sequence"}});function ep(s,t){var e=typeof t=="object";return new Promise(function(n,i){var r=new Ls({next:function(o){n(o),r.unsubscribe()},error:i,complete:function(){e?n(t.defaultValue):i(new tp)}});s.subscribe(r)})}function np(s){return s instanceof Date&&!isNaN(s)}function rt(s,t){return Ot(function(e,n){var i=0;e.subscribe(lt(n,function(r){n.next(s.call(t,r,i++))}))})}var sp=Array.isArray;function ip(s,t){return sp(t)?s.apply(void 0,$e([],Se(t))):s(t)}function gr(s){return rt(function(t){return ip(s,t)})}var rp=Array.isArray,op=Object.getPrototypeOf,hp=Object.prototype,cp=Object.keys;function up(s){if(s.length===1){var t=s[0];if(rp(t))return{args:t,keys:null};if(lp(t)){var e=cp(t);return{args:e.map(function(n){return t[n]}),keys:e}}}return{args:s,keys:null}}function lp(s){return s&&typeof s=="object"&&op(s)===hp}function fp(s,t){return s.reduce(function(e,n,i){return e[n]=t[i],e},{})}function dp(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];var e=zn(s),n=Bm(s),i=up(s),r=i.args,o=i.keys;if(r.length===0)return Nn([],e);var a=new et(mp(r,e,o?function(h){return fp(o,h)}:Xe));return n?a.pipe(gr(n)):a}function mp(s,t,e){return e===void 0&&(e=Xe),function(n){jh(t,function(){for(var i=s.length,r=new Array(i),o=i,a=i,h=function(u){jh(t,function(){var l=Nn(s[u],t),m=!1;l.subscribe(lt(n,function(f){r[u]=f,m||(m=!0,a--),a||n.next(e(r.slice()))},function(){--o||n.complete()}))},n)},c=0;c<i;c++)h(c)},n)}}function jh(s,t,e){s?de(e,s,t):t()}function pp(s,t,e,n,i,r,o,a){var h=[],c=0,u=0,l=!1,m=function(){l&&!h.length&&!c&&t.complete()},f=function(y){return c<n?p(y):h.push(y)},p=function(y){r&&t.next(y),c++;var v=!1;vt(e(y,u++)).subscribe(lt(t,function(w){i?.(w),r?f(w):t.next(w)},function(){v=!0},void 0,function(){if(v)try{c--;for(var w=function(){var _=h.shift();o?de(t,o,function(){return p(_)}):p(_)};h.length&&c<n;)w();m()}catch(_){t.error(_)}}))};return s.subscribe(lt(t,f,function(){l=!0,m()})),function(){a?.()}}function yr(s,t,e){return e===void 0&&(e=1/0),j(t)?yr(function(n,i){return rt(function(r,o){return t(n,r,i,o)})(vt(s(n,i)))},e):(typeof t=="number"&&(e=t),Ot(function(n,i){return pp(n,i,s,e)}))}function Hh(s){return s===void 0&&(s=1/0),yr(Xe,s)}function gp(){return Hh(1)}function Wh(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];return gp()(Nn(s,zn(s)))}var yp=["addListener","removeListener"],wp=["addEventListener","removeEventListener"],xp=["on","off"];function wr(s,t,e,n){if(j(e)&&(n=e,e=void 0),n)return wr(s,t,e).pipe(gr(n));var i=Se(_p(s)?wp.map(function(a){return function(h){return s[a](t,h,e)}}):bp(s)?yp.map(Jh(s,t)):vp(s)?xp.map(Jh(s,t)):[],2),r=i[0],o=i[1];if(!r&&mr(s))return yr(function(a){return wr(a,t,e)})(vt(s));if(!r)throw new TypeError("Invalid event target");return new et(function(a){var h=function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return a.next(1<c.length?c:c[0])};return r(h),function(){return o(h)}})}function Jh(s,t){return function(e){return function(n){return s[e](t,n)}}}function bp(s){return j(s.addListener)&&j(s.removeListener)}function vp(s){return j(s.on)&&j(s.off)}function _p(s){return j(s.addEventListener)&&j(s.removeEventListener)}function nt(s,t,e){return e?nt(s,t).pipe(gr(e)):new et(function(n){var i=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return n.next(o.length===1?o[0]:o)},r=s(i);return j(t)?function(){return t(i,r)}:void 0})}function Sp(s,t,e){s===void 0&&(s=0),e===void 0&&(e=Nm);var n=-1;return t!=null&&(Oh(t)?e=t:n=t),new et(function(i){var r=np(s)?+s-e.now():s;r<0&&(r=0);var o=0;return e.schedule(function(){i.closed||(i.next(o++),0<=n?this.schedule(void 0,n):i.complete())},r)})}function Cp(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];var e=zn(s),n=Fm(s,1/0),i=s;return i.length?i.length===1?vt(i[0]):Hh(n)(Nn(i,e)):Rh}var Tp=Array.isArray;function Ep(s){return s.length===1&&Tp(s[0])?s[0]:s}function Zh(s,t){return Ot(function(e,n){var i=0;e.subscribe(lt(n,function(r){return s.call(t,r,i++)&&n.next(r)}))})}function xr(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];return s=Ep(s),s.length===1?vt(s[0]):new et(Pp(s))}function Pp(s){return function(t){for(var e=[],n=function(r){e.push(vt(s[r]).subscribe(lt(t,function(o){if(e){for(var a=0;a<e.length;a++)a!==r&&e[a].unsubscribe();e=null}t.next(o)})))},i=0;e&&!t.closed&&i<s.length;i++)n(i)}}function Ce(s,t){return t===void 0&&(t=Xe),s=s??Mp,Ot(function(e,n){var i,r=!0;e.subscribe(lt(n,function(o){var a=t(o);(r||!s(i,a))&&(r=!1,i=a,n.next(o))}))})}function Mp(s,t){return s===t}function Qh(s,t){return t?function(e){return e.pipe(Qh(function(n,i){return vt(s(n,i)).pipe(rt(function(r,o){return t(n,r,i,o)}))}))}:Ot(function(e,n){var i=0,r=null,o=!1;e.subscribe(lt(n,function(a){r||(r=lt(n,void 0,function(){r=null,o&&n.complete()}),vt(s(a,i++)).subscribe(r))},function(){o=!0,!r&&n.complete()}))})}function Te(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];var e=zn(s);return Ot(function(n,i){(e?Wh(s,n,e):Wh(s,n)).subscribe(i)})}function zs(s,t){return Ot(function(e,n){var i=null,r=0,o=!1,a=function(){return o&&!i&&n.complete()};e.subscribe(lt(n,function(h){i?.unsubscribe();var c=0,u=r++;vt(s(h,u)).subscribe(i=lt(n,function(l){return n.next(t?t(h,l,u,c++):l)},function(){i=null,a()}))},function(){o=!0,a()}))})}function Ap(){return zs(Xe)}function br(s){return Ot(function(t,e){vt(s).subscribe(lt(e,function(){return e.complete()},On)),!e.closed&&t.subscribe(e)})}function Ue(s,t,e){var n=j(s)||t||e?{next:s,error:t,complete:e}:s;return n?Ot(function(i,r){var o;(o=n.subscribe)===null||o===void 0||o.call(n);var a=!0;i.subscribe(lt(r,function(h){var c;(c=n.next)===null||c===void 0||c.call(n,h),r.next(h)},function(){var h;a=!1,(h=n.complete)===null||h===void 0||h.call(n),r.complete()},function(h){var c;a=!1,(c=n.error)===null||c===void 0||c.call(n,h),r.error(h)},function(){var h,c;a&&((h=n.unsubscribe)===null||h===void 0||h.call(n)),(c=n.finalize)===null||c===void 0||c.call(n)}))}):Xe}function kp(s,t){return Ot(function(e,n){var i=t??{},r=i.leading,o=r===void 0?!0:r,a=i.trailing,h=a===void 0?!1:a,c=!1,u=null,l=null,m=!1,f=function(){l?.unsubscribe(),l=null,h&&(v(),m&&n.complete())},p=function(){l=null,m&&n.complete()},y=function(w){return l=vt(s(w)).subscribe(lt(n,f,p))},v=function(){if(c){c=!1;var w=u;u=null,n.next(w),!m&&y(w)}};e.subscribe(lt(n,function(w){c=!0,u=w,!(l&&!l.closed)&&(o?v():y(w))},function(){m=!0,!(h&&c&&l&&!l.closed)&&n.complete()}))})}function Ip(s,t,e){t===void 0&&(t=fr);var n=Sp(s,t);return kp(function(){return n},e)}function Dp(s,t){return Ot(function(e,n){var i=[],r=function(o){for(;0<i.length;)i.shift().error(o);n.error(o)};vt(s).subscribe(lt(n,function(o){var a=new mn;i.push(a);var h=new dn,c=function(){Rn(i,a),a.complete(),h.unsubscribe()},u;try{u=vt(t(o))}catch(l){r(l);return}n.next(a.asObservable()),h.add(u.subscribe(lt(n,c,On,r)))},On)),e.subscribe(lt(n,function(o){var a,h,c=i.slice();try{for(var u=Ye(c),l=u.next();!l.done;l=u.next()){var m=l.value;m.next(o)}}catch(f){a={error:f}}finally{try{l&&!l.done&&(h=u.return)&&h.call(u)}finally{if(a)throw a.error}}},function(){for(;0<i.length;)i.shift().complete();n.complete()},r,function(){for(;0<i.length;)i.shift().unsubscribe()}))})}function W(s,t,e,n=!1){const i=async r=>{await e(r)};try{s.addEventListener(t,i,n)}catch{s.attachEvent("on"+t,i)}return()=>{try{s.removeEventListener(t,i,n)}catch{s.detachEvent("on"+t,i)}}}function X(s,t,e=!1){return wr(s,t,{capture:e})}function Ee(s){if(s.preventDefault){s.preventDefault();return}try{s.returnValue=!1}catch{}}function Kh(s){if(s.stopPropagation){s.stopPropagation();return}try{s.cancelBubble=!0}catch{}}const Lp=["click","dblclick","wheel","contextmenu","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave"],Rp=["keydown","keyup","keypress"],Op=["touchstart","touchend","touchcancel","touchmove"],zp=["pointerdown","pointerup","pointercancel","pointermove"],Np=["dragstart","drag","dragend","dragenter","dragover","dragleave","drop"],Bp=["change"];function Fp(s,t,e={bubbles:!0,detail:{}}){if(!s)return;let n;try{Lp.includes(t)?n=new MouseEvent(t,e):Rp.includes(t)?n=new KeyboardEvent(t,e):Op.includes(t)?n=new TouchEvent(t,e):zp.includes(t)?n=new PointerEvent(t,e):Np.includes(t)?n=new DragEvent(t,e):Bp.includes(t)?n=new Event(t,e):n=new CustomEvent(t,e)}catch{document.createEvent?n=document.createEvent("HTMLEvents").initEvent(t,!0,!0):document.createEventObject&&(n=document.createEventObject())}if(s.dispatchEvent)s.dispatchEvent(n);else if(s.fireEvent&&document.createEventObject)s.fireEvent("on"+t,n);else throw new Error(`Can't fire event : ${t}`)}function Yp(s,t){const e=s.changedTouches[0];return new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,detail:1,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null})}function $p(s,t){let e=document.createElement(s);t="on"+t;let n=t in e;return n||(e.setAttribute(t,"return;"),n=typeof e[t]=="function"),e=null,n}(function(){if(!window.requestAnimationFrame){let s=ut();window.requestAnimationFrame=function(t){const e=ut(),n=Math.max(0,16-(e-s)),i=window.setTimeout(function(){t(e+n)},n);return s=e+n,i}}window.cancelAnimationFrame||(window.cancelAnimationFrame=function(s){clearTimeout(s)})})();function vr(s){let t=!1;return window.requestAnimationFrame(function e(n){!t&&s(n)&&window.requestAnimationFrame(e)}),()=>{t=!0}}function _r(s,t=0){if(t==0)return s(ut()),()=>{};{const e=ut();return vr(n=>n-e>=t?(s(n),!1):!0)}}function Xp(s,t=0){let e=!1,n=0;const i=ut(),r=o=>{if(e)return;n++;const a=o-i-n*t;s(o,n,t<=a),_r(r,Math.max(0,t-a))};return _r(r,t),()=>{e=!0}}function Up(s,t=20){const e=1e3/t;let n=0,i;return()=>(ut()-n>=e&&(n=ut(),i=s()),i)}window.requestIdleCallback=window.requestIdleCallback||function(s,t){const e=ut();return setTimeout(()=>{const n=ut()-e;s({didTimeout:!0,timeRemaining:()=>Math.max(0,50-n)})},t?.timeout)},window.cancelIdleCallback=window.cancelIdleCallback||function(s){clearTimeout(s)};function tc(s,t){window.requestIdleCallback(e=>{e.timeRemaining()>0||e.didTimeout?s():tc(s,t)},{timeout:t?.timeout})}let Ns=0,Sr=0,Ve=33,Pe=33,Cr,Tr=-1;const ec=new MessageChannel,Vp=ec.port2;ec.port1.onmessage=s=>{Cr&&Cr({didTimeout:Tr==-1?!1:ut()-Ns>Tr,timeRemaining:()=>Math.max(0,Sr-ut())})};function Gp(s,t){return Cr=s,Tr=typeof t?.timeout=="number"?t?.timeout:-1,requestAnimationFrame(e=>{Ns=e;let n=Pe+Ns-Sr;n<Pe&&Ve<Pe?(n<8&&(n=8),Pe=n<Ve?Ve:n):n>Pe&&Ve>Pe?Pe=n<Ve?Ve:n:Ve=n,Sr=Ns+Pe,Vp.postMessage(null)})}const nc=new Bf({concurrency:1,timeRemaining:0});let Er=!1;function sc(s,t){const e=zf({fn:s,name:t?.name,deadline:typeof t?.timeout=="number"?se()+t.timeout:void 0});nc.addTask(e),!Er&&(Er=!0,Gp(n=>{Er=!1,nc.idleCallback(n)}))}class Bn{static _nextId=0;static nextId(){return Bn._nextId++}}const O={Linear:{None:function(s){return s}},Ease:{In:function(s){return Math.pow(s,1.7)}},Quadratic:{In:function(s){return s*s},Out:function(s){return s*(2-s)},InOut:function(s){return(s*=2)<1?.5*s*s:-.5*(--s*(s-2)-1)}},Cubic:{In:function(s){return s*s*s},Out:function(s){return--s*s*s+1},InOut:function(s){return(s*=2)<1?.5*s*s*s:.5*((s-=2)*s*s+2)}},Quartic:{In:function(s){return s*s*s*s},Out:function(s){return 1- --s*s*s*s},InOut:function(s){return(s*=2)<1?.5*s*s*s*s:-.5*((s-=2)*s*s*s-2)}},Quintic:{In:function(s){return s*s*s*s*s},Out:function(s){return--s*s*s*s*s+1},InOut:function(s){return(s*=2)<1?.5*s*s*s*s*s:.5*((s-=2)*s*s*s*s+2)}},Sinusoidal:{In:function(s){return 1-Math.sin((1-s)*Math.PI/2)},Out:function(s){return Math.sin(s*Math.PI/2)},InOut:function(s){return .5*(1-Math.sin(Math.PI*(.5-s)))}},Exponential:{In:function(s){return s===0?0:Math.pow(1024,s-1)},Out:function(s){return s===1?1:1-Math.pow(2,-10*s)},InOut:function(s){return s===0?0:s===1?1:(s*=2)<1?.5*Math.pow(1024,s-1):.5*(-Math.pow(2,-10*(s-1))+2)}},Circular:{In:function(s){return 1-Math.sqrt(1-s*s)},Out:function(s){return Math.sqrt(1- --s*s)},InOut:function(s){return(s*=2)<1?-.5*(Math.sqrt(1-s*s)-1):.5*(Math.sqrt(1-(s-=2)*s)+1)}},Elastic:{In:function(s){return s===0?0:s===1?1:-Math.pow(2,10*(s-1))*Math.sin((s-1.1)*5*Math.PI)},Out:function(s){return s===0?0:s===1?1:Math.pow(2,-10*s)*Math.sin((s-.1)*5*Math.PI)+1},InOut:function(s){return s===0?0:s===1?1:(s*=2,s<1?-.5*Math.pow(2,10*(s-1))*Math.sin((s-1.1)*5*Math.PI):.5*Math.pow(2,-10*(s-1))*Math.sin((s-1.1)*5*Math.PI)+1)}},Back:{In:function(s){return s===1?1:s*s*((1.70158+1)*s-1.70158)},Out:function(s){return s===0?0:--s*s*((1.70158+1)*s+1.70158)+1},InOut:function(s){const t=2.5949095;return(s*=2)<1?.5*(s*s*((t+1)*s-t)):.5*((s-=2)*s*((t+1)*s+t)+2)}},Bounce:{In:function(s){return 1-O.Bounce.Out(1-s)},Out:function(s){return s<1/2.75?7.5625*s*s:s<2/2.75?7.5625*(s-=1.5/2.75)*s+.75:s<2.5/2.75?7.5625*(s-=2.25/2.75)*s+.9375:7.5625*(s-=2.625/2.75)*s+.984375},InOut:function(s){return s<.5?O.Bounce.In(s*2)*.5:O.Bounce.Out(s*2-1)*.5+.5}},generatePow:function(s=4){return s=s<Number.EPSILON?Number.EPSILON:s,s=s>1e4?1e4:s,{In:function(t){return t**s},Out:function(t){return 1-(1-t)**s},InOut:function(t){return t<.5?(t*2)**s/2:(1-(2-t*2)**s)/2+.5}}},random:function(s){return Math.random()},createStep:function(s){return function(t){return Math.floor(t*s)/s}},createNoisyEasing:function(s,t=.1){const e=1-t;return function(n){return t*Math.random()+e*s(n)}},swing:function(s){return s+Math.sin(s*Math.PI*2)/2},causeSeizures:function(s){return s+.2*Math.random()-.1}};function ic(s){switch(s){case O.Quadratic.In:return O.Quadratic.Out;case O.Quadratic.Out:return O.Quadratic.In;case O.Quadratic.InOut:return O.Quadratic.InOut;case O.Cubic.In:return O.Cubic.Out;case O.Cubic.Out:return O.Cubic.In;case O.Cubic.InOut:return O.Cubic.InOut;case O.Quartic.In:return O.Quartic.Out;case O.Quartic.Out:return O.Quartic.In;case O.Quartic.InOut:return O.Quartic.InOut;case O.Quintic.In:return O.Quintic.Out;case O.Quintic.Out:return O.Quintic.In;case O.Quintic.InOut:return O.Quintic.InOut;case O.Sinusoidal.In:return O.Sinusoidal.Out;case O.Sinusoidal.Out:return O.Sinusoidal.In;case O.Sinusoidal.InOut:return O.Sinusoidal.InOut;case O.Exponential.In:return O.Exponential.Out;case O.Exponential.Out:return O.Exponential.In;case O.Exponential.InOut:return O.Exponential.InOut;case O.Circular.In:return O.Circular.Out;case O.Circular.Out:return O.Circular.In;case O.Circular.InOut:return O.Circular.InOut;case O.Elastic.In:return O.Elastic.Out;case O.Elastic.Out:return O.Elastic.In;case O.Elastic.InOut:return O.Elastic.InOut;case O.Back.In:return O.Back.Out;case O.Back.Out:return O.Back.In;case O.Back.InOut:return O.Back.InOut;case O.Bounce.In:return O.Bounce.Out;case O.Bounce.Out:return O.Bounce.In;case O.Bounce.InOut:return O.Bounce.InOut;default:return s}}const qp=4,jp=.001,Hp=1e-7,Wp=10,Fn=11,Bs=1/(Fn-1),Jp=typeof Float32Array=="function";function rc(s,t){return 1-3*t+3*s}function oc(s,t){return 3*t-6*s}function ac(s){return 3*s}function Fs(s,t,e){return((rc(t,e)*s+oc(t,e))*s+ac(t))*s}function hc(s,t,e){return 3*rc(t,e)*s*s+2*oc(t,e)*s+ac(t)}function Zp(s,t,e,n,i){let r,o,a=0;do o=t+(e-t)/2,r=Fs(o,n,i)-s,r>0?e=o:t=o;while(Math.abs(r)>Hp&&++a<Wp);return o}function Qp(s,t,e,n){for(let i=0;i<qp;++i){const r=hc(t,e,n);if(r===0)return t;const o=Fs(t,e,n)-s;t-=o/r}return t}function Kp(s){return s}function Pr(s,t,e,n){if(!(0<=s&&s<=1&&0<=e&&e<=1))throw new Error("bezier x values must be in [0, 1] range");if(s===t&&e===n)return Kp;const i=Jp?new Float32Array(Fn):new Array(Fn);for(let o=0;o<Fn;++o)i[o]=Fs(o*Bs,s,e);function r(o){let a=0,h=1;const c=Fn-1;for(;h!==c&&i[h]<=o;++h)a+=Bs;--h;const u=(o-i[h])/(i[h+1]-i[h]),l=a+u*Bs,m=hc(l,s,e);return m>=jp?Qp(o,l,s,e):m===0?l:Zp(o,a,a+Bs,s,e)}return o=>o===0||o===1?o:Fs(r(o),t,n)}function Mr(s){switch(s){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-in-out":return[.42,0,.58,1];case"ease-out":return[0,0,.58,1]}}function cc(s){const[t,e,n,i]=Mr(s);return[1-n,1-i,1-t,1-e]}function tg(s){return Pr(...Mr(s))}function eg(s){return Pr(...cc(s))}const me={Utils:{Linear:function(s,t,e){return(t-s)*e+s},Factorial:function(){const s=[1];return function(t){let e=1;if(s[t])return s[t];for(let n=t;n>1;n--)e*=n;return s[t]=e,e}}(),Bernstein:function(s,t){const e=me.Utils.Factorial;return e(s)/e(t)/e(s-t)},CatmullRom:function(s,t,e,n,i){const r=(e-s)*.5,o=(n-t)*.5,a=i*i,h=i*a;return(2*t-2*e+r+o)*h+(-3*t+3*e-2*r-o)*a+r*i+t},QuadraticBezier:(s,t,e,n)=>{const i=1-n;return i*i*s+2*i*n*t+n*n*e},CubicBezier:(s,t,e,n,i)=>{const r=1-i;return r*r*r*s+3*r*r*i*t+3*r*i*i*e+i*i*i*n}},Linear:function(s,t){const e=s.length-1,n=e*t,i=Math.floor(n),r=me.Utils.Linear;return t<0?r(s[0],s[1],n):t>1?r(s[e],s[e-1],e-n):r(s[i],s[i+1>e?e:i+1],n-i)},Bezier:function(s,t){let e=0;const n=s.length-1,i=Math.pow,r=me.Utils.Bernstein;for(let o=0;o<=n;o++)e+=i(1-t,n-o)*i(t,o)*s[o]*r(n,o);return e},CatmullRom:function(s,t){const e=s.length-1;let n=e*t,i=Math.floor(n);const r=me.Utils.CatmullRom;return s[0]===s[e]?(t<0&&(i=Math.floor(n=e*(1+t))),r(s[(i-1+e)%e],s[i],s[(i+1)%e],s[(i+2)%e],n-i)):t<0?s[0]-(r(s[0],s[0],s[1],s[1],-n)-s[0]):t>1?s[e]-(r(s[e],s[e],s[e-1],s[e-1],n-e)-s[e]):r(s[i?i-1:0],s[i],s[e<i+1?e:i+1],s[e<i+2?e:i+2],n-i)}};class uc{_tweens={};_tweensAddedDuringUpdate={};getAll(){return Object.keys(this._tweens).map(t=>this._tweens[t])}removeAll(){this._tweens={}}add(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t}remove(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]}update(t=ut(),e=!1){const n=Object.keys(this._tweens);for(let i=0;i<n.length;i++){const r=this._tweens[n[i]],o=!e;r&&r.update(t,o)===!1&&!e&&delete this._tweens[n[i]]}return!!Object.keys(this._tweens).length}}const Xt=new uc;class Ar{constructor(t,e=Xt){this._object=t,this._group=e}_id=Bn.nextId();_isPlaying=!1;_startTime=0;_delayTime=0;_durationTime=1e3;_isPaused=!1;_pauseStartTime=0;_initialRepeat=0;_repeat=0;_repeatDelayTime;_yoyo=!1;_reversed=!1;_valuesStart={};_valuesEnd={};_valuesStartRepeat={};_easingFunction=O.Linear.None;_interpolationFunction=me.Linear;_chainedTweens=[];_isChainStopped=!1;_onStartCallback;_onStartCallbackFired=!1;_onEveryStartCallback;_onEveryStartCallbackFired=!1;_onUpdateCallback;_onRepeatCallback;_onCompleteCallback;_onStopCallback;_goToEnd=!1;getId(){return this._id}isPlaying(){return this._isPlaying}isPaused(){return this._isPaused}to(t,e){return this._valuesEnd=Object.create(t),e!==void 0&&(this._durationTime=e),this}duration(t=1e3){return this._durationTime=t,this}start(t=ut()){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(const e in this._valuesStartRepeat)this._swapEndStartRepeatValues(e),this._valuesStart[e]=this._valuesStartRepeat[e]}return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this}_setupProperties(t,e,n,i){for(const r in n){const o=t[r],a=Array.isArray(o),h=a?"array":typeof o,c=!a&&Array.isArray(n[r]);if(!(h==="undefined"||h==="function")){if(c){let u=n[r];if(u.length===0)continue;u=u.map(this._handleRelativeValue.bind(this,o)),n[r]=[o].concat(u)}if((h==="object"||a)&&o&&!c){e[r]=a?[]:{};for(const u in o)e[r][u]=o[u];i[r]=a?[]:{},this._setupProperties(o,e[r],n[r],i[r])}else typeof e[r]>"u"&&(e[r]=o),a||(e[r]*=1),c?i[r]=n[r].slice().reverse():i[r]=e[r]||0}}}stop(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this}end(){return this._goToEnd=!0,this.update(1/0),this}pause(t=ut()){return this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStartTime=t,this._group&&this._group.remove(this),this)}resume(t=ut()){return!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStartTime,this._pauseStartTime=0,this._group&&this._group.add(this),this)}stopChainedTweens(){for(let t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this}group(t=Xt){return this._group=t,this}delay(t=0){return this._delayTime=t,this}repeat(t=0){return this._initialRepeat=t,this._repeat=t,this}repeatDelay(t){return this._repeatDelayTime=t,this}yoyo(t=!1){return this._yoyo=t,this}easing(t=O.Linear.None){return this._easingFunction=t,this}interpolation(t=me.Linear){return this._interpolationFunction=t,this}chain(...t){return this._chainedTweens=t,this}onStart(t){return this._onStartCallback=t,this}onEveryStart(t){return this._onEveryStartCallback=t,this}onUpdate(t){return this._onUpdateCallback=t,this}onRepeat(t){return this._onRepeatCallback=t,this}onComplete(t){return this._onCompleteCallback=t,this}onStop(t){return this._onStopCallback=t,this}update(t=ut(),e=!0){if(this._isPaused)return!0;let n,i;const r=this._startTime+this._durationTime;if(!this._goToEnd&&!this._isPlaying){if(t>r)return!1;e&&this.start(t)}if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0),i=(t-this._startTime)/this._durationTime,i=this._durationTime===0||i>1?1:i;const o=this._easingFunction(i);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,o),this._onUpdateCallback&&this._onUpdateCallback(this._object,i),i===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(n in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[n]=="string"&&(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(let a=0,h=this._chainedTweens.length;a<h;a++)this._chainedTweens[a].start(this._startTime+this._durationTime);return this._isPlaying=!1,!1}return!0}_updateProperties(t,e,n,i){for(const r in n){if(e[r]===void 0)continue;const o=e[r]||0;let a=n[r];const h=Array.isArray(t[r]),c=Array.isArray(a);!h&&c?t[r]=this._interpolationFunction(a,i):typeof a=="object"&&a?this._updateProperties(t[r],o,a,i):(a=this._handleRelativeValue(o,a),typeof a=="number"&&(t[r]=o+(a-o)*i))}}_handleRelativeValue(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)}_swapEndStartRepeatValues(t){const e=this._valuesStartRepeat[t],n=this._valuesEnd[t];typeof n=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(n):this._valuesStartRepeat[t]=n,this._valuesEnd[t]=e}}const ng=Bn.nextId,sg=Xt.getAll.bind(Xt),ig=Xt.removeAll.bind(Xt),rg=Xt.add.bind(Xt),og=Xt.remove.bind(Xt),ag=Xt.update.bind(Xt),hg={now:ut,Sequence:Bn,Easing:O,Interpolation:me,Group:uc,Tween:Ar,nextId:ng,getAll:sg,removeAll:ig,add:rg,remove:og,update:ag};class kr{autoStart;startTime;oldTime;elapsedTime;running;constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=ut(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=ut();t=e-this.oldTime,this.oldTime=e,this.elapsedTime+=t}return t}}class Yn{tweens=[];frameDuration;onGroupStart;onGroupComplete;constructor(t){this.frameDuration=t?.frameDuration||1e3,this.onGroupStart=t?.onGroupStart,this.onGroupComplete=t?.onGroupComplete}get count(){return this.tweens.length}clear(){this.tweens=[]}sort(t=!1){Dl(this.tweens,(e,n)=>t?e.delay>n.delay:e.delay<=n.delay)}cloneTweens(t=this.tweens){const e=[];return t.forEach(n=>{const i={...n};delete i.tween,i.fromValues={...i.fromValues},i.toValues={...i.toValues},e.push(i)}),e}addTween(t,e,n){const i={fromValues:t,toValues:e,frames:typeof n?.frames=="number"?n.frames:1,delay:typeof n?.delay=="number"?n.delay:this.tweens.length,easeFunction:n?.easeFunction||O.Linear.None,interpolationFunction:n?.interpolationFunction||me.Linear,repeat:typeof n?.repeat=="number"?n.repeat:0,yoyo:n?.yoyo||!1,onStart:n?.onStart||(()=>{}),onUpdate:n?.onUpdate||(()=>{}),onComplete:n?.onComplete||(()=>{})};return this.tweens.push(i),this}cancelRequestAnimationCycle=()=>{};runTweens(t){this.cancelRequestAnimationCycle();const e=new kr,n=this.frameDuration;return new Promise(i=>{this.onGroupStart?.(),this.cancelRequestAnimationCycle=vr(r=>{if(!this.isPaused){const a=Math.max(0,r-this.pausedDuration),h=Math.max(0,e.getElapsedTime()-this.pausedDuration);t.filter(c=>c.delay*n<=h).forEach(c=>{c.tween||(c.tween=new Ar({...c.fromValues}).to({...c.toValues},c.frames*n).easing(c.easeFunction).interpolation(c.interpolationFunction).repeat(c.repeat).yoyo(c.yoyo).onStart(c.onStart).onUpdate(c.onUpdate).onComplete(c.onComplete),c.tween.start(a)),(c.delay+c.frames*(c.repeat+1))*n>h?c.tween.update(a):(c.tween.isPlaying()&&c.tween.end(),Ne(t,c))})}const o=!!t.length;return o||(this.onGroupComplete?.(),i()),o})})}isPaused=!1;pausedClock=new kr;pausedDuration=0;play(t=this.cloneTweens(this.tweens)){this.isPaused=!1,this.pausedDuration=0,this.runTweens(t)}reverse(){const t=this.cloneTweens(this.tweens);let e=0;t.forEach(n=>{e=Math.max(e,n.delay+n.frames),n.easeFunction=ic(n.easeFunction);const i={...n.toValues};n.toValues={...n.fromValues},n.fromValues={...i}}),t.forEach(n=>{n.delay=e-n.frames}),this.play(t)}pause(){this.pausedClock.start(),this.isPaused=!0}resume(){this.pausedDuration+=this.pausedClock.getElapsedTime(),this.pausedClock.stop(),this.isPaused=!1}}const Ys=new cn;function Ir(s){const t=Ys.getEntry((n,i)=>i.el==s);if(t)return t[1];const e=si(s);return Ys.set(e.name,e),e}function Dr(s,t){const e=Ir(s);e.alternate||(e.alternate=si(s)),t(e.alternate)}const lc=()=>{Ys.update((s,t)=>{const e=t.alternate;return e?(ii(t,e),t.alternate=void 0,Ys.set(e.name,e),!1):!0})};function cg(){lc()}function Lr(){sc(lc,{name:"FLUSH_VNODES",timeout:50})}function q(s){return s*Math.PI/180}function Et(s){return s*180/Math.PI}function pn(s,t,e=0){return Math.sqrt(s*s+t*t+e*e)}function Me(s,t,e,n){return pn(e-s,n-t)}function Jt(s,t,e,n){let i=Math.atan2(n-t,e-s);return i<0&&(i+=Math.PI*2),i}function Ae(s,t){return{dx:Math.cos(s)*t,dy:Math.sin(s)*t}}function ug(s,t,e){if(typeof e=="number"){const n=pn(s,t,e);return{x:s/=n,y:t/=n,z:e/=n}}else{const n=pn(s,t);return{x:s/=n,y:t/=n}}}function lg(s,t,e,n,i=10){if(Math.abs(e-s)<i&&Math.abs(n-t)<i)return"no";const r=Et(Jt(s,t,e,n));return r>=-135&&r<=-45?"up":r>45&&r<135?"down":r>=135&&r<=180||r>=-180&&r<-135?"left":"right"}const fc=fg("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);function fg(s,t=10){const e={},n=s.split(",");for(let i=0;i<n.length;i+=2){const r="&"+n[i+1]+";",o=parseInt(n[i],t);e[r]="&#"+o+";"}return e["\\xa0"]=" ",e}function Pt(s,t){const e=Object.keys(t);for(let n=0;n<e.length;n++)s=s.replace(new RegExp("{"+e[n]+"}","gi"),""+t[e[n]]);return s}function $s(s){let t,e;if(!s)throw new Error("cannot create a random attribute name for an undefined object");const n="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=n[Math.floor(Math.random()*n.length)];while(s[t]);return t}function dg(s){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[s]||t.start}function mg(s){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[s]||t.alphabetic}const $n={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"},lineDash:{svgAttr:"stroke-dasharray",canvas:[],svg:null,apply:"stroke"},lineDashOffset:{svgAttr:"stroke-dashoffset",canvas:0,svg:0,apply:"stroke"}};let Xs=class{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}addColorStop(t,e){const n=this.__ctx.__createElement("stop");if(n.setAttribute("offset",""+t),e.indexOf("rgba")!==-1){const r=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(e);r&&(n.setAttribute("stop-color",Pt("rgb({r},{g},{b})",{r:r[1],g:r[2],b:r[3]})),n.setAttribute("stop-opacity",r[4]))}else n.setAttribute("stop-color",e);this.__root.appendChild(n)}},Rr=class{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}},dc=class ca{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:n=500}){t?(this.__canvas=t,this.__ctx=t.getContext("2d"),this.width=t.width,this.height=t.height):(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d"),this.width=e,this.height=n),this.__setDefaultStyles(),this.__styleStack=[this.__getStyleState()],this.__groupStack=[],this.__rootSVG=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__rootSVG.setAttribute("version","1.1"),this.__rootSVG.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__rootSVG.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__rootSVG.setAttribute("width",""+this.width),this.__rootSVG.setAttribute("height",""+this.height),this.__ids={},this.__SVGdefs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__rootSVG.appendChild(this.__SVGdefs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__rootSVG.appendChild(this.__currentElement)}__setDefaultStyles(){const t=Object.keys($n);for(let e=0,n=t.length;e<n;e++){const i=t[e];this[i]=$n[i].canvas}}__getStyleState(){const t={},e=Object.keys($n);for(let n=0,i=e.length;n<i;n++){const r=e[n];t[r]=this[r]}return t}__applyStyleState(t){const e=Object.keys(t);for(let n=0,i=e.length;n<i;n++){const r=e[n];this[r]=t[r]}}__createElement(t,e={},n=!1){const i=this.__document.createElementNS("http://www.w3.org/2000/svg",t),r=Object.keys(e);n&&(i.setAttribute("fill","none"),i.setAttribute("stroke","none"));for(let o=0;o<r.length;o++){const a=r[o];i.setAttribute(a,e[a])}return i}__applyStyleToCurrentElement(t){let e=this.__currentElement;const n=this.__currentElementsToStyle;n&&(e.setAttribute(t,""),e=n.element,n.children.forEach(r=>{r.setAttribute(t,"")}));const i=Object.keys($n);for(let r=0;r<i.length;r++){const o=$n[i[r]],a=this[i[r]];if(o.apply){if(a instanceof Rr){if(a.__ctx)for(;a.__ctx.__SVGdefs.childNodes.length;){const h=a.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[h]=h,this.__SVGdefs.appendChild(a.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(o.apply,Pt("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof Xs)e.setAttribute(o.apply,Pt("url(#{id})",{id:a.__root.getAttribute("id")}));else if(o.apply.indexOf(t)!==-1&&o.svg!==a)if((o.svgAttr==="stroke"||o.svgAttr==="fill")&&a.indexOf("rgba")!==-1){const c=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(a);if(c){e.setAttribute(o.svgAttr,Pt("rgb({r},{g},{b})",{r:c[1],g:c[2],b:c[3]}));let u=parseFloat(c[4]);const l=this.globalAlpha;l!=null&&(u*=l),e.setAttribute(o.svgAttr+"-opacity",""+u)}}else{let h=o.svgAttr;if(i[r]==="globalAlpha"&&(h=t+"-"+o.svgAttr,e.getAttribute(h)))continue;h&&e.setAttribute(h,a)}}}}__closestGroupOrSvg(t){return t=t||this.__currentElement,t.nodeName==="g"||t.nodeName==="svg"?t:this.__closestGroupOrSvg(t.parentNode)}getSerializedSvg(t){let e=new XMLSerializer().serializeToString(this.__rootSVG);if(/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi.test(e)&&(e=e.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),t){const i=Object.keys(fc);for(let r=0,o=i.length;r<o;r++){const a=i[r],h=fc[a],c=new RegExp(a,"gi");c.test(e)&&(e=e.replace(c,h))}}return e}getSvg(){return this.__rootSVG}save(){const t=this.__createElement("g"),e=this.__closestGroupOrSvg();this.__groupStack.push(e),e.appendChild(t),this.__currentElement=t,this.__styleStack.push(this.__getStyleState())}restore(){this.__currentElementsToStyle=null;const t=this.__groupStack.pop();t?this.__currentElement=t:this.__currentElement=this.__rootSVG.childNodes[1];const e=this.__styleStack.pop();e&&this.__applyStyleState(e)}__addTransform(t){const e=this.__closestGroupOrSvg();if(e.childNodes.length>0){this.__currentElement.nodeName==="path"&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());const i=this.__createElement("g");e.appendChild(i),this.__currentElement=i}let n=this.__currentElement.getAttribute("transform");n?n+=" ":n="",n+=t,this.__currentElement.setAttribute("transform",n)}scale(t,e){e===void 0&&(e=t),this.__addTransform(Pt("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(Pt("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(Pt("translate({x},{y})",{x:t,y:e}))}transform(t,e,n,i,r,o){this.__addTransform(Pt("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:n,d:i,e:r,f:o}))}beginPath(){this.__currentDefaultPath="",this.__currentPosition={};const t=this.__createElement("path",{},!0);this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t}__applyCurrentDefaultPath(){const t=this.__currentElement;t.nodeName==="path"&&t.setAttribute("d",this.__currentDefaultPath)}__addPathCommand(t){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=t}moveTo(t,e){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:t,y:e},this.__addPathCommand(Pt("M {x} {y}",this.__currentPosition))}closePath(){this.__currentDefaultPath&&this.__addPathCommand("Z")}lineTo(t,e){this.__currentPosition={x:t,y:e},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(Pt("L {x} {y}",this.__currentPosition)):this.__addPathCommand(Pt("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,n,i,r,o){this.__currentPosition={x:r,y:o},this.__addPathCommand(Pt("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:n,cp2y:i,x:r,y:o}))}quadraticCurveTo(t,e,n,i){this.__currentPosition={x:n,y:i},this.__addPathCommand(Pt("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:n,y:i}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,n,i,r){const o=this.__currentPosition&&this.__currentPosition.x,a=this.__currentPosition&&this.__currentPosition.y;if(typeof o>"u"||typeof a>"u")return;if(r<0)throw new Error("IndexSizeError: The radius provided ("+r+") is negative.");if(o===t&&a===e||t===n&&e===i||r===0){this.lineTo(t,e);return}const h=this.normalize([o-t,a-e]),c=this.normalize([n-t,i-e]);if(h[0]*c[1]===h[1]*c[0]){this.lineTo(t,e);return}const u=h[0]*c[0]+h[1]*c[1],l=Math.acos(Math.abs(u)),m=this.normalize([h[0]+c[0],h[1]+c[1]]),f=r/Math.sin(l/2),p=t+f*m[0],y=e+f*m[1],v=[-h[1],h[0]],w=[c[1],-c[0]],_=function(E){const C=E[0];return E[1]>=0?Math.acos(C):-Math.acos(C)},x=_(v),b=_(w);this.lineTo(p+v[0]*r,y+v[1]*r),this.arc(p,y,r,x,b)}stroke(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")}fill(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")}rect(t,e,n,i){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+n,e),this.lineTo(t+n,e+i),this.lineTo(t,e+i),this.lineTo(t,e),this.closePath()}fillRect(t,e,n,i){const r=this.__createElement("rect",{x:t,y:e,width:n,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,n,i){const r=this.__createElement("rect",{x:t,y:e,width:n,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),n=this.__rootSVG.childNodes[1],i=n.childNodes;for(let r=i.length-1;r>=0;r--)i[r]&&n.removeChild(i[r]);this.__currentElement=n,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,n,i){if(t===0&&e===0&&n===this.width&&i===this.height){this.__clearCanvas();return}const r=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:t,y:e,width:n,height:i,fill:"#FFFFFF"},!0);r.appendChild(o)}createLinearGradient(t,e,n,i){const r=this.__createElement("linearGradient",{id:$s(this.__ids),x1:t+"px",x2:n+"px",y1:e+"px",y2:i+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(r),new Xs(r,this)}createRadialGradient(t,e,n,i,r,o){const a=this.__createElement("radialGradient",{id:$s(this.__ids),cx:i+"px",cy:r+"px",r:o+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(a),new Xs(a,this)}__parseFont(){const e=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext]))(?:\s*\/\s*(normal|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext])))?\s*([-,'"\sa-z0-9]+?)\s*$/i.exec(this.font),n={style:e[1]||"normal",size:e[4]||"10px",family:e[6]||"sans-serif",weight:e[3]||"normal",decoration:e[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(n.decoration="underline"),this.__fontHref&&(n.href=this.__fontHref),n}__wrapTextLink(t,e){if(t.href){const n=this.__createElement("a");return n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),n.appendChild(e),n}return e}__applyText(t,e,n,i){const r=this.__parseFont(),o=this.__closestGroupOrSvg(),a=this.__createElement("text",{"font-family":r.family,"font-size":r.size,"font-style":r.style,"font-weight":r.weight,"text-decoration":r.decoration,x:e,y:n,"text-anchor":dg(this.textAlign),"dominant-baseline":mg(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(t)),this.__currentElement=a,this.__applyStyleToCurrentElement(i),o.appendChild(this.__wrapTextLink(r,a))}fillText(t,e,n){this.__applyText(t,e,n,"fill")}strokeText(t,e,n){this.__applyText(t,e,n,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,n,i,r,o){if(i===r)return;i=i%(2*Math.PI),r=r%(2*Math.PI),i===r&&(r=(r+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));const a=t+n*Math.cos(r),h=e+n*Math.sin(r),c=t+n*Math.cos(i),u=e+n*Math.sin(i),l=o?0:1;let m=0,f=r-i;f<0&&(f+=2*Math.PI),o?m=f>Math.PI?0:1:m=f>Math.PI?1:0,this.lineTo(c,u),this.__addPathCommand(Pt("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:n,ry:n,xAxisRotation:0,largeArcFlag:m,sweepFlag:l,endX:a,endY:h})),this.__currentPosition={x:a,y:h}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),n=$s(this.__ids),i=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",n),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",Pt("url(#{id})",{id:n})),t.appendChild(i),this.__currentElement=i}drawImage(...t){let e=t[0],n,i,r,o,a=0,h=0,c,u,l,m,f,p,y,v;if(t.length===3)n=t[1],i=t[2],c=e.width,u=e.height,r=c,o=u;else if(t.length===5)n=t[1],i=t[2],r=t[3],o=t[4],c=e.width,u=e.height;else if(t.length===9)a=t[1],h=t[2],c=t[3],u=t[4],n=t[5],i=t[6],r=t[7],o=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const w=this.__closestGroupOrSvg();this.__currentElement;const _="translate("+n+", "+i+")";if(e instanceof ca){if(l=e.getSvg().cloneNode(!0),l.childNodes&&l.childNodes.length>1){for(m=l.childNodes[0];m.childNodes.length;)v=m.childNodes[0].getAttribute("id"),this.__ids[v]=v,this.__SVGdefs.appendChild(m.childNodes[0]);if(f=l.childNodes[1],f){const x=f.getAttribute("transform");let b;x?b=x+" "+_:b=_,f.setAttribute("transform",b),w.appendChild(f)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(p=this.__createElement("image"),p.setAttribute("width",r),p.setAttribute("height",o),p.setAttribute("preserveAspectRatio","none"),(a||h||c!==e.width||u!==e.height)&&(y=this.__document.createElement("canvas"),y.width=r,y.height=o,y.getContext("2d")?.drawImage(e,a,h,c,u,0,0,r,o),e=y),p.setAttribute("transform",_),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),w.appendChild(p))}createPattern(t,e){const n=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),i=$s(this.__ids);let r;return n.setAttribute("id",i),t.nodeName==="CANVAS"||t.nodeName==="IMG"?(r=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),r.setAttribute("width",""+t.width),r.setAttribute("height",""+t.height),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.nodeName==="CANVAS"?t.toDataURL():t.getAttribute("src")),n.appendChild(r),this.__SVGdefs.appendChild(n)):t instanceof ca&&(n.setAttribute("width",""+t.width),n.setAttribute("height",""+t.height),n.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(n)),new Rr(n,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}},Or=class{canvas;context;customContext;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,n,i=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),i&&(this.customContext=new dc({canvas:this.canvas,width:e||this.canvas.width,height:n||this.canvas.height}))}set lineWidth(t){this.hasSetCustomStrokeStyle=!0,this.context.lineWidth=t,this.customContext&&(this.customContext.lineWidth=t)}get lineWidth(){return this.context.lineWidth}set lineCap(t){this.hasSetCustomStrokeStyle=!0,this.context.lineCap=t,this.customContext&&(this.customContext.lineCap=t)}get lineCap(){return this.context.lineCap}set lineJoin(t){this.hasSetCustomStrokeStyle=!0,this.context.lineJoin=t,this.customContext&&(this.customContext.lineCap=t)}get lineJoin(){return this.context.lineJoin}set lineDashOffset(t){this.hasSetCustomStrokeStyle=!0,this.context.lineDashOffset=t,this.customContext&&(this.customContext.lineDashOffset=t)}get lineDashOffset(){return this.context.lineDashOffset}set miterLimit(t){this.hasSetCustomStrokeStyle=!0,this.context.miterLimit=t,this.customContext&&(this.customContext.miterLimit=t)}get miterLimit(){return this.context.miterLimit}set globalAlpha(t){this.context.globalAlpha=t,this.customContext&&(this.customContext.globalAlpha=t)}get globalAlpha(){return this.context.globalAlpha}set fillStyle(t){this.hasSetCustomFillStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.fillStyle=t,this.customContext&&(this.customContext.fillStyle=t)):(this.context.fillStyle=t.gradient,this.customContext&&(this.customContext.fillStyle=t.gradientCustom))}get fillStyle(){return this.context.fillStyle}set strokeStyle(t){this.hasSetCustomStrokeStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.strokeStyle=t,this.customContext&&(this.customContext.strokeStyle=t)):(this.context.strokeStyle=t.gradient,this.customContext&&(this.customContext.strokeStyle=t.gradientCustom))}get strokeStyle(){return this.context.strokeStyle}set font(t){this.context.font=t,this.customContext&&(this.customContext.font=t)}get font(){return this.context.font}set textBaseline(t){this.context.textBaseline=t,this.customContext&&(this.customContext.textBaseline=t)}get textBaseline(){return this.context.textBaseline}set textAlign(t){this.context.textAlign=t,this.customContext&&(this.customContext.textAlign=t)}get textAlign(){return this.context.textAlign}fill(t){return t?this.context.fill(t):(this.context.fill(),this.customContext&&this.customContext.fill()),this}fillRect(t,e,n,i){return this.context.fillRect(t,e,n,i),this.customContext&&this.customContext.fillRect(t,e,n,i),this}fillText(t,e,n,i){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,n,i),this.customContext&&this.customContext.fillText(t,e,n),this}setLineDash(t){return this.context.setLineDash(t),this.customContext&&this.customContext.setLineDash(t),this}stroke(t){return t?this.context.stroke(t):(this.context.stroke(),this.customContext&&this.customContext.stroke()),this}strokeText(t,e,n,i){return this.context.strokeText(t,e,n,i),this.customContext&&this.customContext.strokeText(t,e,n),this}strokeRect(t,e,n,i){return this.context.strokeRect(t,e,n,i),this.customContext&&this.customContext.strokeRect(t,e,n,i),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,n=this.canvas.width,i=this.canvas.height){return this.context.clearRect(t,e,n,i),this.customContext&&this.customContext.clearRect(t,e,n,i),this}save(){return this.context.save(),this.customContext&&this.customContext.save(),this.currentMatrix=new DOMMatrix,this.path2Ds.push(this.currentPath2D),this.currentPath2D=new Path2D,this}restore(){return this.context.restore(),this.customContext&&this.customContext.restore(),this.hasSetCustomStrokeStyle=!1,this.hasSetCustomFillStyle=!1,this.currentMatrix=new DOMMatrix,this.currentPath2D=this.path2Ds.pop()||new Path2D,this}beginPath(){return this.context.beginPath(),this.customContext&&this.customContext.beginPath(),this}closePath(){return this.context.closePath(),this.customContext&&this.customContext.closePath(),this.currentPath2D.closePath(),this}changePath2D(t=this.currentPath2D,e=this.currentMatrix){const n=new Path2D;n.addPath(t,e),this.currentPath2D=n}isPointInStroke(...t){return t[0]instanceof Path2D?this.context.isPointInStroke(t[0],t[1],t[2]):this.context.isPointInStroke(t[0],t[1])}isPointInPath(...t){return t[0]instanceof Path2D?this.context.isPointInPath(t[0],t[1],t[2]):this.context.isPointInPath(t[0],t[1])}translate(t,e){return this.context.translate(t,e),this.customContext&&this.customContext.translate(t,e),this.currentMatrix.translate(t,e),this.changePath2D(),this}rotate(t,e=0,n=0){return this.translate(e,n),this.context.rotate(t),this.customContext&&this.customContext.rotate(t),this.currentMatrix.rotate(t),this.translate(-e,-n),this.changePath2D(),this}scale(t,e=t,n=0,i=0){return this.translate(n,i),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix.scale(t,e),this.translate(-n,-i),this.changePath2D(),this}moveTo(t,e){return this.context.moveTo(t,e),this.customContext&&this.customContext.moveTo(t,e),this.currentPath2D.moveTo(t,e),this}lineTo(t,e){return this.context.lineTo(t,e),this.customContext&&this.customContext.lineTo(t,e),this.currentPath2D.lineTo(t,e),this}arc(t,e,n,i,r,o){return this.context.arc(t,e,n,i,r,o),this.customContext&&this.customContext.arc(t,e,n,i,r,o?-1:1),this.currentPath2D.arc(t,e,n,i,r,o),this}arcTo(t,e,n,i,r){return this.context.arcTo(t,e,n,i,r),this.customContext&&this.customContext.arcTo(t,e,n,i,r),this.currentPath2D.arcTo(t,e,n,i,r),this}ellipse(t,e,n,i,r,o,a,h){return this.context.ellipse(t,e,n,i,r,o,a,h),this.currentPath2D.ellipse(t,e,n,i,r,o,a,h),this}quadraticCurveTo(t,e,n,i){return this.context.quadraticCurveTo(t,e,n,i),this.customContext&&this.customContext.quadraticCurveTo(t,e,n,i),this.currentPath2D.quadraticCurveTo(t,e,n,i),this}bezierCurveTo(t,e,n,i,r,o){return this.context.bezierCurveTo(t,e,n,i,r,o),this.customContext&&this.customContext.bezierCurveTo(t,e,n,i,r,o),this.currentPath2D.bezierCurveTo(t,e,n,i,r,o),this}rect(t,e,n,i){return this.context.rect(t,e,n,i),this.customContext&&this.customContext.rect(t,e,n,i),this.currentPath2D.rect(t,e,n,i),this}createLinearGradient(t,e,n,i,r){const o=this.context.createLinearGradient(t,e,n,i);return r&&Object.entries(r).forEach(([a,h])=>{o.addColorStop(parseFloat(a),h)}),o}createRadialGradient(t,e,n,i,r,o,a){const h=this.context.createRadialGradient(t,e,n,i,r,o);return a&&Object.entries(a).forEach(([c,u])=>{h.addColorStop(parseFloat(c),u)}),h}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const n=e[0],i=e[1];this.context.drawImage(t,n,i)}else if(e.length===4){const n=e[0],i=e[1],r=e[2],o=e[3];this.context.drawImage(t,n,i,r,o)}else if(e.length===8){const n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],h=e[5],c=e[6],u=e[7];this.context.drawImage(t,n,i,r,o,a,h,c,u)}else throw new Error("Invalid number of arguments passed to drawImage: "+e.length);return this.customContext&&this.customContext.drawImage(t,...e),this}getImageData(t=0,e=0,n=this.canvas.width,i=this.canvas.height,r){return this.context.getImageData(t,e,n,i,r)}putImageData(t,e=0,n=0){return this.context.putImageData(t,e,n)}createPattern(t,e){return this.context.createPattern(t,e)}toRawSVG(){if(this.customContext){const t=this.customContext.getSerializedSvg(!0),e=this.customContext.getSvg();return{raw:t,element:e}}else return{raw:"",element:null}}},zr=class{x;y;toX;toY;constructor(t){this.x=t?.x||0,this.y=t?.y||0,this.toX=t?.toX||0,this.toY=t?.toY||0}toSVGPathData(){return[["L",this.toX,this.toY]]}toCanvasContext(t){t.lineTo(this.toX,this.toY)}getBoundingClientRect(){const t=Jt(this.x,this.y,this.toX,this.toY);if(t===0){const e=Math.min(this.x,this.toX),n=Math.min(this.y,this.toY),i=Math.max(this.x,this.toX),r=Math.max(this.y,this.toY);return{x:e,y:n,width:i-e,height:r-n}}else{const e=Math.sin(t),n=Math.cos(t),i=n*this.x-e*this.y,r=n*this.toX-e*this.toY,o=n*this.y+e*this.x,a=n*this.toY+e*this.toX;return{x:Math.min(i,r),y:Math.min(o,a),width:Math.max(i,r)-Math.min(i,r),height:Math.max(o,a)-Math.min(o,a)}}}interpolate(t){return{x:this.x+t*(this.toX-this.x),y:this.y+t*(this.toY-this.y)}}intersection(t){const e=this.x,n=this.y,i=t.toX,r=t.toY,o=this.toX-e,a=t.x-i;if(!o&&!a)return null;const h=(this.toY-n)/o,c=(t.y-r)/a;if(o){if(!a)return{x:i,y:h*(i-e)+n}}else return{x:e,y:c*(e-i)+r};const u=(-c*i+r+h*e-n)/(h-c),l=h*(u-e)+n;return isNaN(u)||isNaN(l)?null:{x:u,y:l}}};const pg=class extends zr{rx;ry;xAxisRotate;largeArcFlag;sweepFlag;constructor(t){super(t),this.rx=t.rx,this.ry=t.ry,this.xAxisRotate=t?.xAxisRotate??0,this.largeArcFlag=t?.largeArcFlag??1,this.sweepFlag=t?.sweepFlag??1,this.toX=t.toX,this.toY=t.toY}toSVGPathData(){return[["A",this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag,this.toX,this.toY]]}toCanvasContext(t){const[e,n,i,r,o,a,h]=this.convert(this.x,this.y,this.toX,this.toY,this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag);t.ellipse(e,n,i,r,o,a,h,!this.sweepFlag)}convert(t,e,n,i,r,o,a,h,c){const u=a/180*Math.PI,l=(t-n)/2,m=(e-i)/2,f=Math.cos(u)*l+Math.sin(u)*m,p=-Math.sin(u)*l+Math.cos(u)*m,y=f*f/(r*r)+p*p/(o*o);if(y>1){const G=Math.sqrt(y);throw r=G*r,o=G*o,new Error(`Radii are too small to build an arc. Correcting them to ${r}/${o}.`)}const v=Math.sqrt((r*r*o*o-r*r*p*p-o*o*f*f)/(r*r*p*p+o*o*f*f)),w=h!=c?1:-1,_=w*v*r*p/o,x=w*v*-o*f/r,b=(t+n)/2,E=(e+i)/2,C=Math.cos(u)*_-Math.sin(u)*x+b,L=Math.sin(u)*_+Math.cos(u)*x+E,B=(G,J,st,K)=>(G*K>=J*st?1:-1)*Math.acos((G*st+J*K)/(Math.sqrt(G*G+J*J)*Math.sqrt(st*st+K*K))),F=B(1,0,t-C,e-L)-u,U=B(t-C,e-L,n-C,i-L);return[C,L,r,o,u,F,F+U]}},gg=class extends zr{cx;cy;isLineThrough;constructor(t){super(t),this.cx=t.cx,this.cy=t.cy,this.isLineThrough=typeof t.isLineThrough=="boolean"?t.isLineThrough:!1}toSVGPathData(){if(this.isLineThrough){const t=this.cx*2-(this.x+this.toX)/2,e=this.cy*2-(this.y+this.toY)/2;return[["Q",t,e,this.toX,this.toY]]}else return[["Q",this.cx,this.cy,this.toX,this.toY]]}toCanvasContext(t){if(this.isLineThrough){const e=this.cx*2-(this.x+this.toX)/2,n=this.cy*2-(this.y+this.toY)/2;t.quadraticCurveTo(e,n,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}getBoundingClientRect(){const t=[this.x,this.toX],e=[this.y,this.toY];let n,i,r,o;for(let c=0;c<2;++c)n=c==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,i=c==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,r=c==0?this.x:this.y,Math.abs(n)>1e-12&&(o=-i/(2*n),0<o&&o<1&&[t,e][c].push(n*o*o+i*o+r));const a={x:Math.min.apply(0,t),y:Math.min.apply(0,e)},h={x:Math.max.apply(0,t),y:Math.max.apply(0,e)};return{x:a.x,y:a.y,width:h.x-a.x,height:h.y-a.y}}interpolate(t){return{x:(1-t)*(1-t)*this.x+2*(1-t)*t*this.cx+t*t*this.toX,y:(1-t)*(1-t)*this.y+2*(1-t)*t*this.cy+t*t*this.toY}}},ke=class cs extends zr{c1x;c1y;c2x;c2y;constructor(t){super(t),this.c1x=t.c1x,this.c1y=t.c1y,this.c2x=t.c2x,this.c2y=t.c2y}toSVGPathData(){return[["C",this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY]]}toCanvasContext(t){t.bezierCurveTo(this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY)}getBoundingClientRect(){let t=this.c2x-2*this.c1x+this.x-(this.toX-2*this.c2x+this.c1x),e=2*(this.c1x-this.x)-2*(this.c2x-this.c1x),n=this.x-this.c1x,i=(-e+Math.sqrt(e*e-4*t*n))/2/t,r=(-e-Math.sqrt(e*e-4*t*n))/2/t;const o=[this.y,this.toY],a=[this.x,this.toX];let h;const c=[];Math.abs(i)>1e12&&(i=.5),Math.abs(r)>1e12&&(r=.5),i>=0&&i<=1&&(h=this.interpolate(i),a.push(h.x),o.push(h.y),c.push({X:h.x,Y:h.y})),r>=0&&r<=1&&(h=this.interpolate(r),a.push(h.x),o.push(h.y),c.push({X:h.x,Y:h.y})),t=this.c2y-2*this.c1y+this.y-(this.toY-2*this.c2y+this.c1y),e=2*(this.c1y-this.y)-2*(this.c2y-this.c1y),n=this.y-this.c1y,i=(-e+Math.sqrt(e*e-4*t*n))/2/t,r=(-e-Math.sqrt(e*e-4*t*n))/2/t,Math.abs(i)>1e12&&(i=.5),Math.abs(r)>1e12&&(r=.5),i>=0&&i<=1&&(h=this.interpolate(i),a.push(h.x),o.push(h.y),c.push({X:h.x,Y:h.y})),r>=0&&r<=1&&(h=this.interpolate(r),a.push(h.x),o.push(h.y),c.push({X:h.x,Y:h.y}));const u=[],l=c.length;for(let p=0;p<l;p++){for(let y=p+1;y<l;y++)c[p].X===c[y].X&&c[p].Y===c[y].Y&&(y=++p);u.push({X:c[p].X,Y:c[p].Y})}const m={x:Math.min.apply(Math,a),y:Math.min.apply(Math,o)},f={x:Math.max.apply(Math,a),y:Math.max.apply(Math,o)};return{x:m.x,y:m.y,width:f.x-m.x,height:f.y-m.y,dots:u}}interpolate(t){return{x:Math.pow(1-t,3)*this.x+3*Math.pow(1-t,2)*t*this.c1x+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2x+Math.pow(t,3)*this.toX,y:Math.pow(1-t,3)*this.y+3*Math.pow(1-t,2)*t*this.c1y+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2y+Math.pow(t,3)*this.toY}}static base3(t,e,n,i,r){const o=-3*e+9*n-9*i+3*r,a=t*o+6*e-12*n+6*i;return t*a-3*e+3*n}static bezlen(t,e,n,i,r,o,a,h,c=1){c=Math.max(0,Math.min(c,1));const u=c/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],m=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let f=0;for(let p=0;p<12;p++){const y=u*l[p]+u,v=this.base3(y,t,n,r,a),w=this.base3(y,e,i,o,h);f+=m[p]*Math.sqrt(v*v+w*w)}return u*f}length(t=1){return cs.bezlen(this.x,this.y,this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY,t)}getTatLen(t){const e=this.x,n=this.y,i=this.c1x,r=this.c1y,o=this.c2x,a=this.c2y,h=this.toX,c=this.toY;if(t<0||cs.bezlen(e,n,i,r,o,a,h,c)<t)return 0;const u=1;let l=u/2,m=u-l,f=cs.bezlen(e,n,i,r,o,a,h,c,m);for(;Math.abs(f-t)>.01;)l/=2,m+=(f<t?1:-1)*l,f=cs.bezlen(e,n,i,r,o,a,h,c,m);return m}getPointAtSegmentLength(t){const e=this.getTatLen(t),n=1-e,i=Math.pow(n,3),r=Math.pow(n,2),o=e*e,a=o*e,h=i*this.x+r*3*e*this.c1x+n*3*e*e*this.c2x+a*this.toX,c=i*this.y+r*3*e*this.c1y+n*3*e*e*this.c2y+a*this.toY,u=this.x+2*e*(this.c1x-this.x)+o*(this.c2x-2*this.c1x+this.x),l=this.y+2*e*(this.c1y-this.y)+o*(this.c2y-2*this.c1y+this.y),m=this.c1x+2*e*(this.c2x-this.c1x)+o*(this.toX-2*this.c2x+this.c1x),f=this.c1y+2*e*(this.c2y-this.c1y)+o*(this.toY-2*this.c2y+this.c1y),p=n*this.x+e*this.c1x,y=n*this.y+e*this.c1y,v=n*this.c2x+e*this.toX,w=n*this.c2y+e*this.toY,_=90-Math.atan2(u-m,l-f)*180/Math.PI;return{x:h,y:c,m:{x:u,y:l},n:{x:m,y:f},start:{x:p,y},end:{x:v,y:w},alpha:_}}},Xn=Math.PI*2;function mc(s,t,e,n){const i=s*n-t*e<0?-1:1;let r=s*e+t*n;return r>1&&(r=1),r<-1&&(r=-1),i*Math.acos(r)}function yg(s,t,e,n,i,r,o,a,h,c){const u=c*(s-e)/2+h*(t-n)/2,l=-h*(s-e)/2+c*(t-n)/2,m=o*o,f=a*a,p=u*u,y=l*l;let v=m*f-m*y-f*p;v<0&&(v=0),v/=m*y+f*p,v=Math.sqrt(v)*(i===r?-1:1);const w=v*o/a*l,_=v*-a/o*u,x=c*w-h*_+(s+e)/2,b=h*w+c*_+(t+n)/2,E=(u-w)/o,C=(l-_)/a,L=(-u-w)/o,B=(-l-_)/a,F=mc(1,0,E,C);let U=mc(E,C,L,B);return r===0&&U>0&&(U-=Xn),r===1&&U<0&&(U+=Xn),[x,b,F,U]}function wg(s,t){const e=1.3333333333333333*Math.tan(t/4),n=Math.cos(s),i=Math.sin(s),r=Math.cos(s+t),o=Math.sin(s+t);return[n,i,n-i*e,i+n*e,r+o*e,o-r*e,r,o]}function pc(s,t,e,n,i,r,o,a,h){const c=Math.sin(h*Xn/360),u=Math.cos(h*Xn/360),l=u*(s-e)/2+c*(t-n)/2,m=-c*(s-e)/2+u*(t-n)/2;if(l===0&&m===0)return[];if(o===0||a===0)return[];o=Math.abs(o),a=Math.abs(a);const f=l*l/(o*o)+m*m/(a*a);f>1&&(o*=Math.sqrt(f),a*=Math.sqrt(f));const p=yg(s,t,e,n,i,r,o,a,c,u),y=[];let v=p[2],w=p[3];const _=Math.max(Math.ceil(Math.abs(w)/(Xn/4)),1);w/=_;for(let x=0;x<_;x++)y.push(wg(v,w)),v+=w;return y.map(x=>{for(let b=0;b<x.length;b+=2){let E=x[b+0],C=x[b+1];E*=o,C*=a;const L=u*E-c*C,B=c*E+u*C;x[b+0]=L+p[0],x[b+1]=B+p[1]}return x})}function Nr(s,t,e,n,i,r){return[s/3+2/3*e,t/3+2/3*n,i/3+2/3*e,r/3+2/3*n,i,r]}function Un(s,t,e,n){return[s,t,e,n,e,n]}const Vn={a:7,c:6,s:4,q:4,t:2,m:2,l:2,h:1,v:1,z:0};class Ge{static createSVGElement(t="path",e){const n=document.createElementNS.call(document,"http://www.w3.org/2000/svg",t);return e&&je(n,e),n}static createSvgPath(t,e){return this.createSVGElement("path",{d:t,id:e||on()})}static downloadFromSVGElement(t,e="shape"){return Hs(sr(t),`${e}.svg`)}static downloadFromSVGString(t,e="shape"){return Hs(Ei(t),`${e}.svg`)}static getSVGRawStringFromElement(t){return nr(t)}static isSVGPath(t){return typeof t!="string"?!1:(t=t.trim(),/^[mlhvzaqtcs]\s*[-+.0-9][^mlhvzaqtcs]+/i.test(t)&&/[\dz]$/i.test(t))}static SVGPathDataToD(t){return t.map(e=>{if(!e[0])return"";switch(e[0].toLowerCase()){case"a":return`${e[0]} ${e[1]},${e[2]} ${e[3]} ${e[4]},${e[5]} ${e[6]},${e[7]}`;case"c":return`${e[0]} ${e[1]},${e[2]} ${e[3]},${e[4]} ${e[5]},${e[6]}`;case"s":case"q":return`${e[0]} ${e[1]},${e[2]} ${e[3]},${e[4]}`;default:return e[0]+" "+e.slice(1).join(",")}}).join(" ")}static parseSVGPath(t){const e=[];return Ge.isSVGPath(t)&&t.replace(/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi,(n,i,r)=>{let o=i.toLowerCase();const a=Ti(r);for(o=="m"&&a.length>Vn[o]&&(e.push([i,...a.splice(0,Vn[o])]),o="l",i=i=="m"?"l":"L");a.length;){if(a.length<Vn[o])throw new Error(`parseSVGPath substring:{ ${n} } command:{ ${i} } args:{ ${a} }`);e.push([i,...a.splice(0,Vn[o])])}return o=="z"&&e.push([i]),""}),e}static absolutizeSVGPath(t){let e=0,n=0,i=0,r=0;return t.map(function(o){const a=o[0],h=a.toUpperCase();if(a!=h)switch(o[0]=h,a){case"a":o[6]+=i,o[7]+=r;break;case"v":o[1]+=r;break;case"h":o[1]+=i;break;default:for(let c=1;c<o.length;)o[c++]+=i,o[c++]+=r}switch(h){case"Z":i=e,r=n;break;case"H":i=o[1];break;case"V":r=o[1];break;case"M":i=e=o[1],r=n=o[2];break;default:i=o[o.length-2],r=o[o.length-1]}return o})}static relativeSVGPath(t){let e=0,n=0,i=0,r=0;return t.map(function(o){const a=o[0],h=a.toLowerCase();if(a!=h)switch(o[0]=h,a){case"A":o[6]-=i,o[7]-=r;break;case"V":o[1]-=r;break;case"H":o[1]-=i;break;default:for(let c=1;c<o.length;)o[c++]-=i,o[c++]-=r}switch(h){case"z":i=e,r=n;break;case"h":i+=o[1];break;case"v":r+=o[1];break;case"m":i+=o[1],r+=o[2],e+=o[1],n+=o[2];break;default:i+=o[o.length-2],r+=o[o.length-1]}return o})}static normalizeSVGPath(t){const e=[];let n=0,i=0,r=0,o=0,a=0,h=0,c=0,u=0,l;for(let m=0,f=t.length;m<f;m++){let p=t[m];const y=p[0];switch(y){case"M":n=p[1],i=p[2];break;case"A":const v=pc(r,o,p[6],p[7],p[4],p[5],p[1],p[2],p[3]);if(!v.length)continue;v.forEach((x,b)=>{const[E,C,L,B,F,U,G,J]=x;p=["C",L,B,F,U,G,J],b<v.length-1&&e.push(p)});break;case"S":let w=r,_=o;(l=="C"||l=="S")&&(w+=w-c,_+=_-u),p=["C",w,_,p[1],p[2],p[3],p[4]];break;case"T":l=="Q"||l=="T"?(a=r*2-a,h=o*2-h):(a=r,h=o),p=["C",...Nr(r,o,a,h,p[1],p[2])];break;case"Q":a=p[1],h=p[2],p=["C",...Nr(r,o,p[1],p[2],p[3],p[4])];break;case"L":p=["C",...Un(r,o,p[1],p[2])];break;case"H":p=["C",...Un(r,o,p[1],o)];break;case"V":p=["C",...Un(r,o,r,p[1])];break;case"Z":p=["C",...Un(r,o,n,i)];break}l=y,r=p[p.length-2],o=p[p.length-1],p.length>4?(c=p[p.length-4],u=p[p.length-3]):(c=r,u=o),e.push(p)}return e}static catmullRom2bezier(t){const e=[];for(let n=0,i=t.length;i-2>n;n+=2){let r;n==0?r=[{x:t[n],y:t[n+1]},{x:t[n],y:t[n+1]},{x:t[n+2],y:t[n+3]},{x:t[n+4],y:t[n+5]}]:i-4==n?r=[{x:t[n-2],y:t[n-1]},{x:t[n],y:t[n+1]},{x:t[n+2],y:t[n+3]},{x:t[n+2],y:t[n+3]}]:r=[{x:t[n-2],y:t[n-1]},{x:t[n],y:t[n+1]},{x:t[n+2],y:t[n+3]},{x:t[n+4],y:t[n+5]}];const o=[{x:r[1].x,y:r[1].y},{x:(-r[0].x+6*r[1].x+r[2].x)/6,y:(-r[0].y+6*r[1].y+r[2].y)/6},{x:(r[1].x+6*r[2].x-r[3].x)/6,y:(r[1].y+6*r[2].y-r[3].y)/6},{x:r[2].x,y:r[2].y}];e.push(["C",o[1].x,o[1].y,o[2].x,o[2].y,o[3].x,o[3].y])}return e}static zvhToLSVGPath(t){const e=[];let n=["L",0,0],i;for(let r=0,o=t.length;r<o;r++){const a=t[r];switch(a[0]){case"M":n=["L",a[1],a[2]],e.push(a);break;case"Z":e.push(n);break;case"H":i=e[e.length-1]||["L",0,0],e.push(["L",a[1],i[i.length-1]]);break;case"V":i=e[e.length-1]||["L",0,0],e.push(["L",i[i.length-2],a[1]]);break;default:e.push(a)}}return e}static longhandSVGPath(t){const e={S:{to:"C",x:3},T:{to:"Q",x:1}};let n,i=0,r=0;for(let o=0,a=t.length;o<a;o++){const h=t[o],c=e[h[0]];c&&(h[0]=c.to,n&&(n[0]===c.to?(i=2*Number(n[c.x+2])-Number(n[c.x]),r=2*Number(n[c.x+3])-Number(n[c.x+1])):(i=Number(n[n.length-2]),r=Number(n[n.length-1]))),h.splice(1,0,i,r)),n=h}return t}}let xg=class _e{cX;cY;x;y;degree;scalarX;scalarY;startPathX=0;startPathY=0;prevPathX=0;prevPathY=0;normalizedLines=[];constructor(t){this.cX=0,this.cY=0,this.x=t?.x||0,this.y=t?.y||0,typeof t?.centerX=="number"&&typeof t?.centerY=="number"&&(this.cX=t.centerX-this.x,this.cY=t.centerY-this.y),this.degree=t?.degree||0,this.scalarX=1,this.scalarY=1,t?.scalar!==void 0&&(this.scalarX=t.scalar,this.scalarY=t.scalar),t?.scalarX!==void 0&&(this.scalarX=t.scalarX),t?.scalarY!==void 0&&(this.scalarY=t.scalarY),this.reset(t?.d,t?.originMatrix)}reset(t,e){typeof t=="string"?this.resetFromSVGPathData(Ge.parseSVGPath(t),e):t instanceof _e?this.resetFromSVGPathData(t.toSVGPathData(),e):this.resetFromSVGPathData(t||[],e)}resetFromSVGPathData(t,e){this.normalizedLines=[];const n=Ge.normalizeSVGPath(Ge.absolutizeSVGPath(t));this.prevPathX=this.startPathX=0,this.prevPathY=this.startPathY=0;let i=!1;for(let r=0,o=n.length;r<o;r++){const a=n[r];if(a[0]=="M"){i||(i=!0,this.startPathX=a[1],this.startPathY=a[2]),this.prevPathX=a[1],this.prevPathY=a[2];continue}this.appendLine(new ke({c1x:a[1],c1y:a[2],c2x:a[3],c2y:a[4],toX:a[5],toY:a[6]}))}e&&({x:this.startPathX,y:this.startPathY}=e.transformPoint({x:this.startPathX,y:this.startPathY}),{x:this.prevPathX,y:this.prevPathY}=e.transformPoint({x:this.prevPathX,y:this.prevPathY}),this.normalizedLines.forEach(r=>{({x:r.x,y:r.y}=e.transformPoint({x:r.x,y:r.y})),{x:r.c1x,y:r.c1y}=e.transformPoint({x:r.c1x,y:r.c1y}),{x:r.c2x,y:r.c2y}=e.transformPoint({x:r.c2x,y:r.c2y}),{x:r.toX,y:r.toY}=e.transformPoint({x:r.toX,y:r.toY})}))}static fromPolymorphPoints(t){const e=new _e;e.prevPathX=e.startPathX=t[0]||0,e.prevPathY=e.startPathY=t[1]||0;for(let n=2,i=t.length;n+5<i;n+=6)e.appendLine(new ke({c1x:t[n],c1y:t[n+1],c2x:t[n+2],c2y:t[n+3],toX:t[n+4],toY:t[n+5]}));return e}static fromLines(t){const e=new _e;e.prevPathX=e.startPathX=t[0].x||0,e.prevPathY=e.startPathY=t[0].y||0;for(let n=0,i=t.length;n<i;n++)e.appendLine(t[n]);return e}appendLine(t){if(t instanceof pg){pc(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(c=>{const[u,l,m,f,p,y,v,w]=c;this.normalizedLines.push(new ke({x:this.prevPathX,y:this.prevPathY,c1x:m,c1y:f,c2x:p,c2y:y,toX:v,toY:w})),this.prevPathX=v,this.prevPathY=w});return}let e,n,i,r,o,a;t instanceof ke?(e=t.c1x,n=t.c1y,i=t.c2x,r=t.c2y,o=t.toX,a=t.toY):t instanceof gg?[e,n,i,r,o,a]=Nr(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,n,i,r,o,a]=Un(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new ke({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:n,c2x:i,c2y:r,toX:o,toY:a})),this.prevPathX=o,this.prevPathY=a}toSVGPathData(){const{startPathX:t,startPathY:e,normalizedLines:n}=this.updateTransform(),i=[];i.push(["M",t,e]);for(let r=0,o=n.length;r<o;r++)i.push(...n[r].toSVGPathData());return i}toSVGPathD(){return Ge.SVGPathDataToD(this.toSVGPathData())}toCanvasContext(t){const{startPathX:e,startPathY:n,normalizedLines:i}=this.updateTransform();t.beginPath(),t.moveTo(e,n),i.forEach(r=>{r.toCanvasContext(t)})}getBoundingClientRect(){const{normalizedLines:t}=this.updateTransform(),e=[],n=[];if(t.forEach(h=>{const c=h.getBoundingClientRect();e.push(c.x,c.x+c.width),n.push(c.y,c.y+c.height)}),e.length==0||n.length==0)return{x:0,y:0,width:0,height:0};const i=Math.min.apply(0,e),r=Math.min.apply(0,n),o=Math.max.apply(0,e),a=Math.max.apply(0,n);return{x:i,y:r,width:o-i,height:a-r}}update(t){this.cX=typeof t.cX=="number"?t.cX:this.cX,this.cY=typeof t.cY=="number"?t.cY:this.cY,this.x=t.x,this.y=t.y,this.degree=t.degree,this.scalarX=t.scalarX,this.scalarY=t.scalarY}updateTransform(){const t=new _t;if(t.translate(this.x+this.cX,this.y+this.cY),t.rotate(this.degree),t.scale(this.scalarX,this.scalarY),t.translate(-this.cX,-this.cY),t.isIdentity)return{startPathX:this.startPathX,startPathY:this.startPathY,normalizedLines:this.normalizedLines};{let e=this.startPathX,n=this.startPathY;({x:e,y:n}=t.transformPoint({x:e,y:n}));const i=[];return this.normalizedLines.forEach(r=>{let o=r.x,a=r.y,h=r.c1x,c=r.c1y,u=r.c2x,l=r.c2y,m=r.toX,f=r.toY;({x:o,y:a}=t.transformPoint({x:o,y:a})),{x:h,y:c}=t.transformPoint({x:h,y:c}),{x:u,y:l}=t.transformPoint({x:u,y:l}),{x:m,y:f}=t.transformPoint({x:m,y:f}),i.push(new ke({x:o,y:a,c1x:h,c1y:c,c2x:u,c2y:l,toX:m,toY:f}))}),{startPathX:e,startPathY:n,normalizedLines:i}}}getTotalLength(){const{normalizedLines:t}=this.updateTransform();return t.reduce((e,n)=>e+=n.length(),0)}getPointAtLength(t){const{normalizedLines:e}=this.updateTransform();let n=0;const i=e.length;for(let r=0;r<i;r++){const o=e[r],a=o.length();if(n+a>=t)return o.getPointAtSegmentLength(t-n);n+=a}return e[i-1].getPointAtSegmentLength(1)}interpolate(t){const{startPathX:e,startPathY:n,normalizedLines:i}=this.updateTransform(),r=i.length;if(r===0)return{x:e,y:n};if(r===1)return i[0].interpolate(t);{let o=t*r,a=i[0];if(o--,o>1)for(let h=1;h<r&&(a=i[h],o>1);h++)o-=1;return a.interpolate(o)}}getSubpath(t,e){if(this.getTotalLength()-e<1e-6)return this.getSubpathsAtLength(this,t);{const n=this.getSubpathsAtLength(this,e,1);return t?this.getSubpathsAtLength(n,t):n}}getSubpathsAtLength(t,e,n){const{startPathX:i,startPathY:r,normalizedLines:o}=t.updateTransform();let a=null,h=0;const c=new _e;c.prevPathX=c.startPathX=i,c.prevPathY=c.startPathY=r;for(let u=0,l=o.length;u<l;u++){const m=o[u],f=m.length();if(h+f>e&&!a){const p=m.getPointAtSegmentLength(e-h);if(c.appendLine(new ke({c1x:p.start.x,c1y:p.start.y,c2x:p.m.x,c2y:p.m.y,toX:p.x,toY:p.y})),n)return c;a=c,c.appendLine(new ke({c1x:p.n.x,c1y:p.n.y,c2x:p.end.x,c2y:p.end.y,toX:m.x,toY:m.y})),h+=f;continue}h+=f,c.appendLine(m)}return c}closestPoint(t,e){const n=this.getTotalLength();let i={x:t,y:e},r=0,o=1/0,a=8;for(let c=0;c<=n;c+=a){const u=this.getPointAtLength(c),l=Math.pow(Me(u.x,u.y,t,e),2);l<o&&(i=u,r=c,o=l)}for(a/=2;a>.5;){const c=r-a,u=this.getPointAtLength(c),l=Math.pow(Me(u.x,u.y,t,e),2),m=r+a,f=this.getPointAtLength(m),p=Math.pow(Me(f.x,f.y,t,e),2);c>=0&&l<o?(i=u,r=c,o=l):m<=n&&p<o?(i=f,r=m,o=p):a/=2}const h=this.getPointAtLength(r+(r===n?-.1:.1));return{point:i,rotation:r>=n?Jt(h.x,h.y,i.x,i.y):Jt(i.x,i.y,h.x,h.y),distance:Math.sqrt(o)}}get polymorphPoints(){const{startPathX:t,startPathY:e,normalizedLines:n}=this.updateTransform();return[t,e].concat(n.reduce((i,r)=>i.concat([r.c1x,r.c1y,r.c2x,r.c2y,r.toX,r.toY]),[]))}perimeterPoints(){const t=this.polymorphPoints,e=t.length;let n=t[e-2],i=t[e-1],r=0;for(let o=0;o<e;o+=6)r+=Me(t[o],t[o+1],n,i),n=t[o],i=t[o+1];return Math.floor(r)}expendFill(t){const e=this.polymorphPoints,n=e.length;let i=t-n;const r=Math.ceil(t/n),o=[];o.push(["M",e[0],e[1]]);let a=2;for(;a+5<=n-1;){const h=e[a++],c=e[a++],u=e[a++],l=e[a++],m=e[a++],f=e[a++];o.push(["C",h,c,u,l,m,f]);let p=0;for(;p<r&&i>0;)o.push(["C",m,f,m,f,m,f]),i-=6,p++}return o}static mixPoints(t,e,n){const i=t.length,r=new Array(i);for(let o=0;o<i;o++)r[o]=Z(t[o]+(e[o]-t[o])*n,6);return r}static getPathInterpolator(t,e){return n=>Math.abs(n-0)<Number.EPSILON?t:Math.abs(n-1)<Number.EPSILON?e:_e.fromPolymorphPoints(_e.mixPoints(new _e({d:t}).polymorphPoints,new _e({d:e}).polymorphPoints,n)).toSVGPathData()}},bg=class extends ys{id;originD;originMatrix;independentTransformInGroup;forceCXY=!1;cX;cY;x;y;degree;scalarX;scalarY;diffXInGroup;diffYInGroup;diffDegreeInGroup;diffScalarXInGroup;diffScalarYInGroup;vx;vy;ax;ay;mass;attrs;enableDrag;alongPath;isDragging=!1;isMouseIn=!1;targetToAfterDragFree;followMouse;strokeArmyAnts;strokeArmyAntsOffset=0;strokeDashTotalLength=0;isShow=!0;el;pathd;usePathDtoCanvasContext=!1;parent;shapes=[];constructor(t){if(super(),this.id=on(),t?.d&&(this.originD=t?.d),t?.originMatrix&&(this.originMatrix=t.originMatrix),this.independentTransformInGroup=typeof t?.independentTransformInGroup=="boolean"?t.independentTransformInGroup:!1,this.x=t?.x||0,this.y=t?.y||0,this.cX=0,this.cY=0,typeof t?.centerX=="number"&&typeof t?.centerY=="number"&&this.forceSetCXY(t.centerX-this.x,t.centerY-this.y),this.degree=t?.degree||0,this.scalarX=1,this.scalarY=1,t?.scalar!==void 0&&(this.scalarX=t.scalar,this.scalarY=t.scalar),t?.scalarX!==void 0&&(this.scalarX=t.scalarX),t?.scalarY!==void 0&&(this.scalarY=t.scalarY),this.diffXInGroup=t?.diffXInGroup||0,this.diffYInGroup=t?.diffYInGroup||0,this.diffDegreeInGroup=t?.diffDegreeInGroup||0,this.diffScalarXInGroup=t?.diffScalarXInGroup||1,this.diffScalarYInGroup=t?.diffScalarYInGroup||1,this.vx=t?.vx||0,this.vy=t?.vy||0,this.ax=t?.ax||0,this.ay=t?.ay||0,this.mass=t?.mass||1,this.attrs={stroke:"none",fill:"none"},t?.attrs&&this.setAttr(t?.attrs),this.enableDrag=t?.enableDrag||!1,this.alongPath=t?.alongPath,this.targetToAfterDragFree=t?.targetToAfterDragFree,this.followMouse=t?.followMouse||!1,this.isShow=typeof t?.isShow=="boolean"?t?.isShow:!0,this.strokeArmyAnts=t?.strokeArmyAnts||!1,this.strokeArmyAnts){const n=this.getAttr("stroke-dasharray","4 4");this.setAttr("stroke-dasharray",n),this.strokeDashTotalLength=Ti(n).reduce((i,r)=>i+r,0)}return Oa(this)}forceSetCXY(t,e){this.cX=t,this.cY=e,this.forceCXY=!0}shapeInit(){}initPathD(){if(!this.pathd){if(this.pathd=new xg,jt(()=>{this.pathd?.reset(this.originD||this.toSVGPathData(),this.originMatrix)}),this.pathd&&!this.forceCXY){const t=this.shapes.length==0?this.pathd.getBoundingClientRect():this.getBoundingClientRect();t&&(this.pathd.cX=this.cX=t.x+t.width/2-this.pathd.x,this.pathd.cY=this.cY=t.y+t.height/2-this.pathd.y)}this.shapeInit()}return this.pathd}frameStart(t){}frameUpdate(t,e){this.pathd=this.initPathD(),this.pathd.update(this),this.strokeArmyAnts&&(this.isMouseIn||(this.setAttr("stroke-dashoffset",String(this.strokeArmyAntsOffset++)),this.strokeArmyAntsOffset>this.strokeDashTotalLength&&(this.strokeArmyAntsOffset=0)))}frameEnd(t){}toSVGPathData(){return[]}toSVGPathD(){return this.pathd?.toSVGPathD()||""}toCanvasContext(t){this.usePathDtoCanvasContext=!0,this.pathd?.toCanvasContext(t)}getBoundingClientRect(){return this.pathd?.getBoundingClientRect()||null}get center(){const t=this.getBoundingClientRect(),e={x:this.x,y:this.y};return t&&(e.x=t.x+t.width/2,e.y=t.y+t.height/2),e}trim(){if(this.parent)return;const t=this.getBoundingClientRect();if(!t)return;this.shapes.forEach(n=>{const i=n.originMatrix?n.originMatrix.clone():new _t;i.translate(-t.x+n.x,-t.y+n.y),n.originMatrix=i});const e=this.originMatrix?this.originMatrix.clone():new _t;e.translate(-t.x+this.x,-t.y+this.y),this.originMatrix=e}isPointInPath(t,e,n){if(n instanceof Or)return n.isPointInPath(new Path2D(this.toSVGPathD()),t,e);let i;try{i=new SVGPoint(t,e)}catch{i=n.createSVGPoint(),i.x=t,i.y=e}if(this.el instanceof SVGGeometryElement)return this.el.isPointInFill(i);{const r=this.getBoundingClientRect();if(r)return t>=r.x&&t<=r.x+r.width&&e>=r.y&&e<=r.y+r.height}return!1}isPointInStroke(t,e,n){if(n instanceof Or)return n.isPointInStroke(new Path2D(this.toSVGPathD()),t,e);let i;try{i=new SVGPoint(t,e)}catch{i=n.createSVGPoint(),i.x=t,i.y=e}return this.el instanceof SVGGeometryElement?this.el.isPointInStroke(i):!1}clone(){return wa(this).copy(this)}copy(t){return this.id=t.id,this.originD=t.originD,this.originMatrix=t.originMatrix,this.independentTransformInGroup=t.independentTransformInGroup,this.x=t.x,this.y=t.y,this.cX=t.cX,this.cY=t.cY,this.degree=t.degree,this.scalarX=t.scalarX,this.scalarY=t.scalarY,this.diffXInGroup=t.diffXInGroup,this.diffYInGroup=t.diffYInGroup,this.diffDegreeInGroup=t.diffDegreeInGroup,this.diffScalarXInGroup=t.diffScalarXInGroup,this.diffScalarYInGroup=t.diffScalarYInGroup,this.vx=t.vx,this.vy=t.vy,this.ax=t.ax,this.ay=t.ay,this.mass=t.mass,this.attrs={...t.attrs},this.enableDrag=t.enableDrag,this.alongPath=t.alongPath,this.targetToAfterDragFree=t.targetToAfterDragFree,this.followMouse=t.followMouse,this.isShow=t.isShow,this.strokeArmyAnts=t.strokeArmyAnts,this.strokeDashTotalLength=t.strokeDashTotalLength,this}save(){}restore(){}setAttr(t,e){typeof t!="string"?Object.assign(this.attrs,Object.fromEntries(Object.entries(t).map(([n,i])=>[xt(n),i]))):e&&(this.attrs[xt(t)]=e)}getAttr(t,e){return this.attrs[t]||this.attrs[xt(t)]||e}getAttrs(){return this.attrs}hasAttr(t){return!!this.attrs[t]||!!this.attrs[xt(t)]}distance(t){return Me(this.x,this.y,t.x,t.y)}rotateTo(t){this.degree=Et(Jt(this.x,this.y,t.x,t.y))}followTo(t,e=3){this.rotateTo(t);const{dx:n,dy:i}=Ae(q(this.degree),e);this.vx=n,this.vy=i,this.run()}followAccelerationTo(t,e=.05){this.rotateTo(t);const{dx:n,dy:i}=Ae(q(this.degree),e);this.ax=n,this.ay=i,this.run()}checkCollision(t){}checkWall(t){}gravitateTo(t){const e=t.x-this.x,n=t.y-this.y,i=e*e+n*n,r=Math.sqrt(i),o=this.mass*t.mass/i,a=o*e/r,h=o*n/r;this.vx+=a/this.mass,this.vy+=h/this.mass,t.vx-=a/t.mass,t.vy-=h/t.mass}run(t){this.vx+=this.ax,this.vy+=this.ay;const e=qt(t?.gravity,0);this.vy+=e;const n=qt(t?.friction,1);this.vx*=n,this.vy*=n,this.x+=this.vx,this.y+=this.vy}runEaseTo(t,e){const n=qt(e?.easing,.05),i=t.x-this.cX-this.x,r=t.y-this.cY-this.y;this.vx=i*n,this.vy=r*n,this.run(e)}runSpringTo(t,e){const n=qt(e?.spring,.03);(Array.isArray(t)?t:[t]).forEach(i=>{const r=i.x-this.cX-this.x,o=i.y-this.cY-this.y,a=r*n,h=o*n;this.vx+=a,this.vy+=h}),this.run({friction:.9,...e})}springMassTo(t,e){const n=qt(e?.springLength,100),i=qt(e?.spring,1e-4),r=t.x-this.x,o=t.y-this.y,a=Math.sqrt(r*r+o*o);if(a<n){const h=r*i,c=o*i;return this.vx+=h/this.mass,this.vy+=c/this.mass,t.vx-=h/t.mass,t.vy-=c/t.mass,1-a/n}return 0}getTotalLength(){return this.initPathD().getTotalLength()}interpolate(t){return this.initPathD().interpolate(t)}getPointAtLength(t){return this.initPathD().getPointAtLength(t)}trailPath(t,e=0){const n=this.getTotalLength();return t.originD=this.initPathD().getSubpath(0,e*n),this.getPointAtLength(e*n)}strokeDashTween(t=1e3,e){const n=this.initPathD(),i=Z(n.getTotalLength(),0);this.setAttr({strokeDasharray:`${i} ${i}`,strokeDashoffset:`${i}`});const r=e?.onUpdate,o=new Yn({frameDuration:t});o.addTween({offset:i},{offset:0},Object.assign(e||{},{onUpdate:(a,h)=>{this.setAttr("strokeDashoffset",""+Z(a.offset,2)),r?.(a,h)}})),o.play()}};class vg extends bg{x;y;z;fl;vpX;vpY;cX;cY;cZ;radius;constructor(t){super(t),this.x=t?.x||0,this.y=t?.y||0,this.z=t?.z||0,this.fl=t?.fl||250,this.vpX=t?.vpX||0,this.vpY=t?.vpY||0,this.cX=t?.cX||0,this.cY=t?.cY||0,this.cZ=t?.cZ||0,this.radius=t?.radius||0}toSVGPathData(){return this.radius?[["M",this.getScreenX(),this.getScreenY()-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",this.getScreenX(),this.getScreenY()]]}toCanvasContext(t){t.beginPath(),t.arc(0,0,this.radius,0,Math.PI*2,!0),t.closePath()}setVanishingPoint(t,e){this.vpX=t,this.vpY=e}setCenter(t,e,n){this.cX=t,this.cY=e,this.cZ=n}rotateX(t){({x:this.y,y:this.z}=Qt(q(t),this.y,this.z))}rotateY(t){({x:this.x,y:this.z}=Qt(q(t),this.x,this.z))}rotateZ(t){({x:this.x,y:this.y}=Qt(q(t),this.x,this.y))}getScreenX(){const t=this.fl/(this.fl+this.z+this.cZ);return this.vpX+(this.cX+this.x)*t}getScreenY(){const t=this.fl/(this.fl+this.z+this.cZ);return this.vpY+(this.cY+this.y)*t}eq(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.radius===t.radius&&this.mass===t.mass}length(){return pn(this.x,this.y,this.z)}distance(t){const e=t.x-this.x,n=t.y-this.y,i=t.z-this.z;return Math.sqrt(e*e+n*n+i*i)}scalar(t){return this.x*=t,this.y*=t,this.z*=t,this}normalize(t=1){const e=this.length();if(e){const n=t/e;this.scalar(n)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,n=this.y,i=this.z;return{x:n*t.z-i*t.y,y:i*t.x-e*t.z,z:e*t.y-n*t.x}}multiply(t){return{x:this.x*t.x,y:this.y*t.y,z:this.z*t.z}}div(t){return{x:this.x/t.x,y:this.y/t.y,z:this.z/t.z}}add(t){return{x:this.x+t.x,y:this.y+t.y,z:this.z+t.z}}sub(t){return{x:this.x-t.x,y:this.y-t.y,z:this.z-t.z}}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}reflect(t){const e=this.dot(t);return{x:this.x-2*e*t.x,y:this.y-2*e*t.y,z:this.z-2*e*t.z}}}const Us=vg;class Br{_x;_y;_z;_w;constructor(t=0,e=0,n=0,i=1){this._x=t,this._y=e,this._z=n,this._w=i}static slerpFlat(t,e,n,i,r,o,a){let h=n[i+0],c=n[i+1],u=n[i+2],l=n[i+3];const m=r[o+0],f=r[o+1],p=r[o+2],y=r[o+3];if(a===0){t[e+0]=h,t[e+1]=c,t[e+2]=u,t[e+3]=l;return}if(a===1){t[e+0]=m,t[e+1]=f,t[e+2]=p,t[e+3]=y;return}if(l!==y||h!==m||c!==f||u!==p){let v=1-a;const w=h*m+c*f+u*p+l*y,_=w>=0?1:-1,x=1-w*w;if(x>Number.EPSILON){const E=Math.sqrt(x),C=Math.atan2(E,w*_);v=Math.sin(v*C)/E,a=Math.sin(a*C)/E}const b=a*_;if(h=h*v+m*b,c=c*v+f*b,u=u*v+p*b,l=l*v+y*b,v===1-a){const E=1/Math.sqrt(h*h+c*c+u*u+l*l);h*=E,c*=E,u*=E,l*=E}}t[e]=h,t[e+1]=c,t[e+2]=u,t[e+3]=l}static multiplyQuaternionsFlat(t,e,n,i,r,o){const a=n[i],h=n[i+1],c=n[i+2],u=n[i+3],l=r[o],m=r[o+1],f=r[o+2],p=r[o+3];return t[e]=a*p+u*l+h*f-c*m,t[e+1]=h*p+u*m+c*l-a*f,t[e+2]=c*p+u*f+a*m-h*l,t[e+3]=u*p-a*l-h*m-c*f,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t=this._x,e=this._y,n=this._z,i=this._w){return this._x=t,this._y=e,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new Br(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){const n=t.x,i=t.y,r=t.z,o=t.order,a=Math.cos,h=Math.sin,c=a(n/2),u=a(i/2),l=a(r/2),m=h(n/2),f=h(i/2),p=h(r/2);switch(o){case"XYZ":this._x=m*u*l+c*f*p,this._y=c*f*l-m*u*p,this._z=c*u*p+m*f*l,this._w=c*u*l-m*f*p;break;case"YXZ":this._x=m*u*l+c*f*p,this._y=c*f*l-m*u*p,this._z=c*u*p-m*f*l,this._w=c*u*l+m*f*p;break;case"ZXY":this._x=m*u*l-c*f*p,this._y=c*f*l+m*u*p,this._z=c*u*p+m*f*l,this._w=c*u*l-m*f*p;break;case"ZYX":this._x=m*u*l-c*f*p,this._y=c*f*l+m*u*p,this._z=c*u*p-m*f*l,this._w=c*u*l+m*f*p;break;case"YZX":this._x=m*u*l+c*f*p,this._y=c*f*l+m*u*p,this._z=c*u*p-m*f*l,this._w=c*u*l-m*f*p;break;case"XZY":this._x=m*u*l-c*f*p,this._y=c*f*l-m*u*p,this._z=c*u*p+m*f*l,this._w=c*u*l+m*f*p;break;default:console.warn("Quaternion: .setFromEuler() encountered an unknown order: "+o)}return e===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const n=e/2,i=Math.sin(n);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix4(t){const e=t.value,n=e[0],i=e[4],r=e[8],o=e[1],a=e[5],h=e[9],c=e[2],u=e[6],l=e[10],m=n+a+l;if(m>0){const f=.5/Math.sqrt(m+1);this._w=.25/f,this._x=(u-h)*f,this._y=(r-c)*f,this._z=(o-i)*f}else if(n>a&&n>l){const f=2*Math.sqrt(1+n-a-l);this._w=(u-h)/f,this._x=.25*f,this._y=(i+o)/f,this._z=(r+c)/f}else if(a>l){const f=2*Math.sqrt(1+a-n-l);this._w=(r-c)/f,this._x=(i+o)/f,this._y=.25*f,this._z=(h+u)/f}else{const f=2*Math.sqrt(1+l-n-a);this._w=(o-i)/f,this._x=(r+c)/f,this._y=(h+u)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return n<Number.EPSILON?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(N(this.dot(t),-1,1)))}rotateTowards(t,e){const n=this.angleTo(t);if(n===0)return this;const i=Math.min(1,e/n);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const n=t._x,i=t._y,r=t._z,o=t._w,a=e._x,h=e._y,c=e._z,u=e._w;return this._x=n*u+o*a+i*c-r*h,this._y=i*u+o*h+r*a-n*c,this._z=r*u+o*c+n*h-i*a,this._w=o*u-n*a-i*h-r*c,this._onChangeCallback(),this}slerp(t,e){if(e===0)return this;if(e===1)return this.copy(t);const n=this._x,i=this._y,r=this._z,o=this._w;let a=o*t._w+n*t._x+i*t._y+r*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=i,this._z=r,this;const h=1-a*a;if(h<=Number.EPSILON){const f=1-e;return this._w=f*o+e*this._w,this._x=f*n+e*this._x,this._y=f*i+e*this._y,this._z=f*r+e*this._z,this.normalize(),this}const c=Math.sqrt(h),u=Math.atan2(c,a),l=Math.sin((1-e)*u)/c,m=Math.sin(e*u)/c;return this._w=o*l+this._w*m,this._x=n*l+this._x*m,this._y=i*l+this._y*m,this._z=r*l+this._z*m,this._onChangeCallback(),this}slerpQuaternions(t,e,n){return this.copy(t).slerp(e,n)}random(){const t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),n=Math.random(),i=Math.sqrt(1-n),r=Math.sqrt(n);return this.set(i*Math.sin(t),i*Math.cos(t),r*Math.sin(e),r*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Gn{x=0;y=0;constructor(t=0,e=0){this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t=0,e=0){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}copy(t){return this.x=t.x,this.y=t.y,this}clone(){return new Gn(this.x,this.y)}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,n=this.y;return this.x=t.m11*e+t.m21*n+t.m31,this.y=t.m12*e+t.m22*n+t.m32,this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=N(this.x,t.x,e.x),this.y=N(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=N(this.x,t,e),this.y=N(this.y,t,e),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(N(n,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}perpendOnVector(t){return gc.copy(this).projectOnVector(t),this.sub(gc)}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}lengthSq(){return this.x*this.x+this.y*this.y}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(N(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y;return e*e+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const n=Math.cos(e),i=Math.sin(e),r=this.x-t.x,o=this.y-t.y;return this.x=r*n-o*i+t.x,this.y=r*i+o*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class zt{x=0;y=0;z=0;constructor(t=0,e=0,n=0){this.x=t,this.y=e,this.z=n}set(t=0,e=0,n=0){return this.x=t,this.y=e,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new zt(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(yc.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(yc.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,n=this.y,i=this.z,r=t.value;return this.x=r[0]*e+r[3]*n+r[6]*i,this.y=r[1]*e+r[4]*n+r[7]*i,this.z=r[2]*e+r[5]*n+r[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=t.value,o=1/(r[3]*e+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*e+r[4]*n+r[8]*i+r[12])*o,this.y=(r[1]*e+r[5]*n+r[9]*i+r[13])*o,this.z=(r[2]*e+r[6]*n+r[10]*i+r[14])*o,this}applyQuaternion(t){const e=this.x,n=this.y,i=this.z,r=t.x,o=t.y,a=t.z,h=t.w,c=2*(o*i-a*n),u=2*(a*e-r*i),l=2*(r*n-o*e);return this.x=e+h*c+o*l-a*u,this.y=n+h*u+a*c-r*l,this.z=i+h*l+r*u-o*c,this}transformDirection(t){const e=this.x,n=this.y,i=this.z,r=t.value;return this.x=r[0]*e+r[4]*n+r[8]*i,this.y=r[1]*e+r[5]*n+r[9]*i,this.z=r[2]*e+r[6]*n+r[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=N(this.x,t.x,e.x),this.y=N(this.y,t.y,e.y),this.z=N(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=N(this.x,t,e),this.y=N(this.y,t,e),this.z=N(this.z,t,e),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(N(n,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const n=t.x,i=t.y,r=t.z,o=e.x,a=e.y,h=e.z;return this.x=i*h-r*a,this.y=r*o-n*h,this.z=n*a-i*o,this}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}perpendOnVector(t){return Yr.copy(this).projectOnVector(t),this.sub(Yr)}projectOnPlane(t){return this.perpendOnVector(t)}reflect(t){return this.sub(Yr.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(N(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return e*e+n*n+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromMatrix4Position(t){const e=t.value;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrix4Scale(t){const e=this.setFromMatrix4Column(t,0).length(),n=this.setFromMatrix4Column(t,1).length(),i=this.setFromMatrix4Column(t,2).length();return this.x=e,this.y=n,this.z=i,this}setFromMatrix4Column(t,e){return this.fromArray(t.value,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.value,e*3)}setFromEuler(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,e=Math.random()*2-1,n=Math.sqrt(1-e*e);return this.x=n*Math.cos(t),this.y=e,this.z=n*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}class Fr{x=0;y=0;z=0;w=1;constructor(t=0,e=0,n=0,i=1){this.x=t,this.y=e,this.z=n,this.w=i}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t=0,e=0,n=0,i=1){return this.x=t,this.y=e,this.z=n,this.w=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new Fr(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=this.w,o=t.value;return this.x=o[0]*e+o[4]*n+o[8]*i+o[12]*r,this.y=o[1]*e+o[5]*n+o[9]*i+o[13]*r,this.z=o[2]*e+o[6]*n+o[10]*i+o[14]*r,this.w=o[3]*e+o[7]*n+o[11]*i+o[15]*r,this}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this.w/=t.w,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix4(t){let e,n,i,r;const h=t.value,c=h[0],u=h[4],l=h[8],m=h[1],f=h[5],p=h[9],y=h[2],v=h[6],w=h[10];if(Math.abs(u-m)<.01&&Math.abs(l-y)<.01&&Math.abs(p-v)<.01){if(Math.abs(u+m)<.1&&Math.abs(l+y)<.1&&Math.abs(p+v)<.1&&Math.abs(c+f+w-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;const x=(c+1)/2,b=(f+1)/2,E=(w+1)/2,C=(u+m)/4,L=(l+y)/4,B=(p+v)/4;return x>b&&x>E?x<.01?(n=0,i=.707106781,r=.707106781):(n=Math.sqrt(x),i=C/n,r=L/n):b>E?b<.01?(n=.707106781,i=0,r=.707106781):(i=Math.sqrt(b),n=C/i,r=B/i):E<.01?(n=.707106781,i=.707106781,r=0):(r=Math.sqrt(E),n=L/r,i=B/r),this.set(n,i,r,e),this}let _=Math.sqrt((v-p)*(v-p)+(l-y)*(l-y)+(m-u)*(m-u));return Math.abs(_)<.001&&(_=1),this.x=(v-p)/_,this.y=(l-y)/_,this.z=(m-u)/_,this.w=Math.acos((c+f+w-1)/2),this}setFromMatrix4Position(t){const e=t.value;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=N(this.x,t.x,e.x),this.y=N(this.y,t.y,e.y),this.z=N(this.z,t.z,e.z),this.w=N(this.w,t.w,e.w),this}clampScalar(t,e){return this.x=N(this.x,t,e),this.y=N(this.y,t,e),this.z=N(this.z,t,e),this.w=N(this.w,t,e),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(N(n,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0,1);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this.w=t.w+(e.w-t.w)*n,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}const gc=new Gn,Yr=new zt,yc=new Br,qn=2e3,$r=2001,wc=[1,0,0,1],xc=[1,0,0,1,0,0],bc=[1,0,0,0,1,0,0,0,1],vc=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];class Xr{value;constructor(t=wc){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m21(){return this.value[2]}get m22(){return this.value[3]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m21(t){this.value[2]=t}set m22(t){this.value[3]=t}set(t=1,e=0,n=0,i=1){return this.m11=t,this.m21=e,this.m12=n,this.m22=i,this}identity(){return this.value=Array.from(wc),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m21==0&&this.m22==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m21=t.m21,this.m22=t.m22,this}clone(){return new Xr(this.value)}fromArray(t,e=0){for(let n=0;n<4;n++)this.value[n]=t[n+e];return this}toArray(t=[],e=0){return t[e]=this.m11,t[e+1]=this.m12,t[e+2]=this.m21,t[e+3]=this.m22,t}multiplyMatrices(t,e){const n=t.value,i=e.value,r=this.value,o=n[0],a=n[2],h=n[1],c=n[3],u=i[0],l=i[2],m=i[1],f=i[3];return r[0]=o*u+a*m,r[2]=o*l+a*f,r[1]=h*u+c*m,r[3]=h*l+c*f,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m21*=t,this.m22*=t,this}determinant(){return this.m11*this.m22-this.m21*this.m12}}class gn{value;constructor(t=bc){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this.value[2]}get m21(){return this.value[3]}get m22(){return this.value[4]}get m23(){return this.value[5]}get m31(){return this.value[6]}get m32(){return this.value[7]}get m33(){return this.value[8]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this.value[2]=t}set m21(t){this.value[3]=t}set m22(t){this.value[4]=t}set m23(t){this.value[5]=t}set m31(t){this.value[6]=t}set m32(t){this.value[7]=t}set m33(t){this.value[8]=t}set(t=1,e=0,n=0,i=0,r=1,o=0,a=0,h=0,c=1){const u=this.value;return u[0]=t,u[1]=i,u[2]=a,u[3]=e,u[4]=r,u[5]=h,u[6]=n,u[7]=o,u[8]=c,this}identity(){return this.value=Array.from(bc),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m31==0&&this.m32==0&&this.m33==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m13=t.m13,this.m21=t.m21,this.m22=t.m22,this.m23=t.m23,this.m31=t.m31,this.m32=t.m32,this.m33=t.m33,this}clone(){return new gn(this.value)}fromArray(t,e=0){for(let n=0;n<9;n++)this.value[n]=t[n+e];return this}toArray(t=[],e=0){return t[e]=this.m11,t[e+1]=this.m12,t[e+2]=this.m13,t[e+3]=this.m21,t[e+4]=this.m22,t[e+5]=this.m23,t[e+6]=this.m31,t[e+7]=this.m32,t[e+8]=this.m33,t}extractBasis(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){return this.set(t.m11,t.m21,t.m31,t.m12,t.m22,t.m32,t.m13,t.m23,t.m33),this}multiplyMatrices(t,e){const n=t.value,i=e.value,r=this.value,o=n[0],a=n[3],h=n[6],c=n[1],u=n[4],l=n[7],m=n[2],f=n[5],p=n[8],y=i[0],v=i[3],w=i[6],_=i[1],x=i[4],b=i[7],E=i[2],C=i[5],L=i[8];return r[0]=o*y+a*_+h*E,r[3]=o*v+a*x+h*C,r[6]=o*w+a*b+h*L,r[1]=c*y+u*_+l*E,r[4]=c*v+u*x+l*C,r[7]=c*w+u*b+l*L,r[2]=m*y+f*_+p*E,r[5]=m*v+f*x+p*C,r[8]=m*w+f*b+p*L,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m31*=t,this.m32*=t,this.m33*=t,this}determinant(){const t=this.value,e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],h=t[6],c=t[7],u=t[8];return e*o*u-e*a*c-n*r*u+n*a*h+i*r*c-i*o*h}invert(){const t=this.value,e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],h=t[6],c=t[7],u=t[8],l=u*o-a*c,m=a*h-u*r,f=c*r-o*h,p=e*l+n*m+i*f;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);const y=1/p;return t[0]=l*y,t[1]=(i*c-u*n)*y,t[2]=(a*n-i*o)*y,t[3]=m*y,t[4]=(u*e-i*h)*y,t[5]=(i*r-a*e)*y,t[6]=f*y,t[7]=(n*h-c*e)*y,t[8]=(o*e-n*r)*y,this}transpose(){let t;const e=this.value;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.value;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,n,i,r,o,a){const h=Math.cos(r),c=Math.sin(r);return this.set(n*h,n*c,-n*(h*o+c*a)+o+t,-i*c,i*h,-i*(-c*o+h*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(Ur.makeScale(t,e)),this}rotate(t){return this.premultiply(Ur.makeRotation(-t)),this}translate(t,e){return this.premultiply(Ur.makeTranslation(t,e)),this}makeTranslation(t,e){return typeof t=="number"?this.set(1,0,t,0,1,e,0,0,1):this.set(1,0,t.x,0,1,t.y,0,0,1),this}makeRotation(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,n,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){for(let e=0;e<9;e++)if(this.value[e]!==t.value[e])return!1;return!0}}class It{value;is3dSpecial=!1;constructor(t=vc){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this.value[2]}get m14(){return this.value[3]}get m21(){return this.value[4]}get m22(){return this.value[5]}get m23(){return this.value[6]}get m24(){return this.value[7]}get m31(){return this.value[8]}get m32(){return this.value[9]}get m33(){return this.value[10]}get m34(){return this.value[11]}get m41(){return this.value[12]}get m42(){return this.value[13]}get m43(){return this.value[14]}get m44(){return this.value[15]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this.value[2]=t}set m14(t){this.value[3]=t}set m21(t){this.value[4]=t}set m22(t){this.value[5]=t}set m23(t){this.value[6]=t}set m24(t){this.value[7]=t}set m31(t){this.value[8]=t}set m32(t){this.value[9]=t}set m33(t){this.value[10]=t}set m34(t){this.value[11]=t}set m41(t){this.value[12]=t}set m42(t){this.value[13]=t}set m43(t){this.value[14]=t}set m44(t){this.value[15]=t}set(t=1,e=0,n=0,i=0,r=0,o=1,a=0,h=0,c=0,u=0,l=1,m=0,f=0,p=0,y=0,v=1){const w=this.value;return w[0]=t,w[4]=e,w[8]=n,w[12]=i,w[1]=r,w[5]=o,w[9]=a,w[13]=h,w[2]=c,w[6]=u,w[10]=l,w[14]=m,w[3]=f,w[7]=p,w[11]=y,w[15]=v,this}is2D(){return!this.is3dSpecial&&this.m31==0&&this.m32==0&&this.m33==1&&this.m34==0&&this.m43==0&&this.m44==1}is3D(){return!this.is2D()}identity(){return this.value=Array.from(vc),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m14==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m24==0&&this.m31==0&&this.m32==0&&this.m33==1&&this.m34==0&&this.m41==0&&this.m42==0&&this.m43==0&&this.m44==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m13=t.m13,this.m14=t.m14,this.m21=t.m21,this.m22=t.m22,this.m23=t.m23,this.m24=t.m24,this.m31=t.m31,this.m32=t.m32,this.m33=t.m33,this.m34=t.m34,this.m41=t.m41,this.m42=t.m42,this.m43=t.m43,this.m44=t.m44,this}clone(){return new It(this.value)}static fromString(t){const e=new It,n=da("number",t);return n.length===16&&n.forEach((i,r)=>{i.fullMatch&&(e.value[r]=parseFloat(i.fullMatch))}),e}fromArray(t,e=0){for(let n=0;n<16;n++)this.value[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.value;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}copyPosition(t){const e=this.value,n=t.value;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this}setFromMatrix3(t){const e=t.value;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,n){return t.setFromMatrix4Column(this,0),e.setFromMatrix4Column(this,1),n.setFromMatrix4Column(this,2),this}makeBasis(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this}normalize(){return this.multiplyScalar(1/(this.m44||1e-4))}transformPoint(t){const e=t.z||1,n=t.w||1;return{x:t.x*this.m11+t.y*this.m21+e*this.m31+n*this.m41,y:t.x*this.m12+t.y*this.m22+e*this.m32+n*this.m42,z:t.x*this.m13+t.y*this.m23+e*this.m33+n*this.m43,w:t.x*this.m14+t.y*this.m24+e*this.m34+n*this.m44}}toMatrix(t){const{scalarX:e,scalarY:n,skewX:i,skewY:r,x:o,y:a}=this.split(),h=[e,r,i,n,o,a];return t?(t.value=h,t):new _t(h)}flatten(){return this.m31=0,this.m32=0,this.m33=1,this.m34=0,this.m14=0,this.m24=0,this.m43=0,this.m44=1,this}toString(t=6){return`matrix3d(${this.value.map(e=>Z(e,t)).join(",")})`}split(){const t=Math.sqrt(this.m11*this.m11+this.m12*this.m12+this.m13*this.m13),e=Math.sqrt(this.m21*this.m21+this.m22*this.m22+this.m23*this.m23),n=Math.sqrt(this.m31*this.m31+this.m32*this.m32+this.m33*this.m33),i=Et(N(Math.asin(-this.m13),-1,1));let r=Et(Math.atan2(this.m23,this.m33));Math.cos(q(i))===0&&(r=Et(Math.atan2(-this.m31,this.m22)));let o=Et(Math.atan2(this.m12,this.m11));return this.m11<0&&this.m22>=0&&(o+=180),{x:this.m41,y:this.m42,z:this.m43,scalarX:t,scalarY:e,scalarZ:n,degreeX:r,degreeY:i,degreeZ:o,skewX:Et(this.m14),skewY:Et(this.m24),skewZ:Et(this.m34),skewW:this.m44,perspective:this.m34?-(1/this.m34):0}}extractRotation(t){const e=this.value,n=t.value,i=1/yn.setFromMatrix4Column(t,0).length(),r=1/yn.setFromMatrix4Column(t,1).length(),o=1/yn.setFromMatrix4Column(t,2).length();return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=0,e[4]=n[4]*r,e[5]=n[5]*r,e[6]=n[6]*r,e[7]=0,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.value,n=t.x,i=t.y,r=t.z,o=Math.cos(n),a=Math.sin(n),h=Math.cos(i),c=Math.sin(i),u=Math.cos(r),l=Math.sin(r);if(t.order==="XYZ"){const m=o*u,f=o*l,p=a*u,y=a*l;e[0]=h*u,e[4]=-h*l,e[8]=c,e[1]=f+p*c,e[5]=m-y*c,e[9]=-a*h,e[2]=y-m*c,e[6]=p+f*c,e[10]=o*h}else if(t.order==="YXZ"){const m=h*u,f=h*l,p=c*u,y=c*l;e[0]=m+y*a,e[4]=p*a-f,e[8]=o*c,e[1]=o*l,e[5]=o*u,e[9]=-a,e[2]=f*a-p,e[6]=y+m*a,e[10]=o*h}else if(t.order==="ZXY"){const m=h*u,f=h*l,p=c*u,y=c*l;e[0]=m-y*a,e[4]=-o*l,e[8]=p+f*a,e[1]=f+p*a,e[5]=o*u,e[9]=y-m*a,e[2]=-o*c,e[6]=a,e[10]=o*h}else if(t.order==="ZYX"){const m=o*u,f=o*l,p=a*u,y=a*l;e[0]=h*u,e[4]=p*c-f,e[8]=m*c+y,e[1]=h*l,e[5]=y*c+m,e[9]=f*c-p,e[2]=-c,e[6]=a*h,e[10]=o*h}else if(t.order==="YZX"){const m=o*h,f=o*c,p=a*h,y=a*c;e[0]=h*u,e[4]=y-m*l,e[8]=p*l+f,e[1]=l,e[5]=o*u,e[9]=-a*u,e[2]=-c*u,e[6]=f*l+p,e[10]=m-y*l}else if(t.order==="XZY"){const m=o*h,f=o*c,p=a*h,y=a*c;e[0]=h*u,e[4]=-l,e[8]=c*u,e[1]=m*l+y,e[5]=o*u,e[9]=f*l-p,e[2]=p*l-f,e[6]=a*u,e[10]=y*l+m}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(_g,t,Sg)}lookAt(t,e,n){const i=this.value;return Nt.subVectors(t,e),Nt.lengthSq()===0&&(Nt.z=1),Nt.normalize(),Ie.crossVectors(n,Nt),Ie.lengthSq()===0&&(Math.abs(n.z)===1?Nt.x+=1e-4:Nt.z+=1e-4,Nt.normalize(),Ie.crossVectors(n,Nt)),Ie.normalize(),Vs.crossVectors(Nt,Ie),i[0]=Ie.x,i[4]=Vs.x,i[8]=Nt.x,i[1]=Ie.y,i[5]=Vs.y,i[9]=Nt.y,i[2]=Ie.z,i[6]=Vs.z,i[10]=Nt.z,this}multiplyMatrices(t,e){const n=t.value,i=e.value,r=this.value,o=n[0],a=n[4],h=n[8],c=n[12],u=n[1],l=n[5],m=n[9],f=n[13],p=n[2],y=n[6],v=n[10],w=n[14],_=n[3],x=n[7],b=n[11],E=n[15],C=i[0],L=i[4],B=i[8],F=i[12],U=i[1],G=i[5],J=i[9],st=i[13],K=i[2],Kt=i[6],Yt=i[10],Ut=i[14],te=i[3],R=i[7],D=i[11],$=i[15];return r[0]=o*C+a*U+h*K+c*te,r[4]=o*L+a*G+h*Kt+c*R,r[8]=o*B+a*J+h*Yt+c*D,r[12]=o*F+a*st+h*Ut+c*$,r[1]=u*C+l*U+m*K+f*te,r[5]=u*L+l*G+m*Kt+f*R,r[9]=u*B+l*J+m*Yt+f*D,r[13]=u*F+l*st+m*Ut+f*$,r[2]=p*C+y*U+v*K+w*te,r[6]=p*L+y*G+v*Kt+w*R,r[10]=p*B+y*J+v*Yt+w*D,r[14]=p*F+y*st+v*Ut+w*$,r[3]=_*C+x*U+b*K+E*te,r[7]=_*L+x*G+b*Kt+E*R,r[11]=_*B+x*J+b*Yt+E*D,r[15]=_*F+x*st+b*Ut+E*$,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m14*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m24*=t,this.m31*=t,this.m32*=t,this.m33*=t,this.m34*=t,this}determinant(){const t=this.value,e=t[0],n=t[4],i=t[8],r=t[12],o=t[1],a=t[5],h=t[9],c=t[13],u=t[2],l=t[6],m=t[10],f=t[14],p=t[3],y=t[7],v=t[11],w=t[15];return p*(+r*h*l-i*c*l-r*a*m+n*c*m+i*a*f-n*h*f)+y*(+e*h*f-e*c*m+r*o*m-i*o*f+i*c*u-r*h*u)+v*(+e*c*l-e*a*f-r*o*l+n*o*f+r*a*u-n*c*u)+w*(-i*a*u-e*h*l+e*a*m+i*o*l-n*o*m+n*h*u)}transpose(){const t=this.value;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,n){const i=this.value;return t instanceof zt?(i[12]=t.x,i[13]=t.y,i[14]=t.z):typeof t=="number"&&typeof e=="number"&&typeof n=="number"&&(i[12]=t,i[13]=e,i[14]=n),this}invert(){const t=this.value,e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],h=t[6],c=t[7],u=t[8],l=t[9],m=t[10],f=t[11],p=t[12],y=t[13],v=t[14],w=t[15],_=l*v*c-y*m*c+y*h*f-a*v*f-l*h*w+a*m*w,x=p*m*c-u*v*c-p*h*f+o*v*f+u*h*w-o*m*w,b=u*y*c-p*l*c+p*a*f-o*y*f-u*a*w+o*l*w,E=p*l*h-u*y*h-p*a*m+o*y*m+u*a*v-o*l*v,C=e*_+n*x+i*b+r*E;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const L=1/C;return t[0]=_*L,t[1]=(y*m*r-l*v*r-y*i*f+n*v*f+l*i*w-n*m*w)*L,t[2]=(a*v*r-y*h*r+y*i*c-n*v*c-a*i*w+n*h*w)*L,t[3]=(l*h*r-a*m*r-l*i*c+n*m*c+a*i*f-n*h*f)*L,t[4]=x*L,t[5]=(u*v*r-p*m*r+p*i*f-e*v*f-u*i*w+e*m*w)*L,t[6]=(p*h*r-o*v*r-p*i*c+e*v*c+o*i*w-e*h*w)*L,t[7]=(o*m*r-u*h*r+u*i*c-e*m*c-o*i*f+e*h*f)*L,t[8]=b*L,t[9]=(p*l*r-u*y*r-p*n*f+e*y*f+u*n*w-e*l*w)*L,t[10]=(o*y*r-p*a*r+p*n*c-e*y*c-o*n*w+e*a*w)*L,t[11]=(u*a*r-o*l*r-u*n*c+e*l*c+o*n*f-e*a*f)*L,t[12]=E*L,t[13]=(u*y*i-p*l*i+p*n*m-e*y*m-u*n*v+e*l*v)*L,t[14]=(p*a*i-o*y*i-p*n*h+e*y*h+o*n*v-e*a*v)*L,t[15]=(o*l*i-u*a*i+u*n*h-e*l*h-o*n*m+e*a*m)*L,this}getMaxScaleOnAxis(){const t=this.value,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,i))}makeTranslation(t,e,n){return t instanceof zt?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const n=Math.cos(e),i=Math.sin(e),r=1-n,o=t.x,a=t.y,h=t.z,c=r*o,u=r*a;return this.set(c*o+n,c*a-i*h,c*h+i*a,0,c*a+i*h,u*a+n,u*h-i*o,0,c*h-i*a,u*h+i*o,r*h*h+n,0,0,0,0,1),this}makeScale(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,e,n,i,r,o){return this.set(1,n,r,0,t,1,o,0,e,i,1,0,0,0,0,1),this}makePerspective(t,e,n,i,r,o,a=qn){const h=this.value,c=2*r/(e-t),u=2*r/(n-i),l=(e+t)/(e-t),m=(n+i)/(n-i);let f,p;if(a===qn)f=-(o+r)/(o-r),p=-2*o*r/(o-r);else if(a===$r)f=-o/(o-r),p=-o*r/(o-r);else throw new Error("Matrix4.makePerspective(): Invalid coordinate system: "+a);return h[0]=c,h[4]=0,h[8]=l,h[12]=0,h[1]=0,h[5]=u,h[9]=m,h[13]=0,h[2]=0,h[6]=0,h[10]=f,h[14]=p,h[3]=0,h[7]=0,h[11]=-1,h[15]=0,this}makeOrthographic(t,e,n,i,r,o,a=qn){const h=this.value,c=1/(e-t),u=1/(n-i),l=1/(o-r),m=(e+t)*c,f=(n+i)*u;let p,y;if(a===qn)p=(o+r)*l,y=-2*l;else if(a===$r)p=r*l,y=-1*l;else throw new Error("Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return h[0]=2*c,h[4]=0,h[8]=0,h[12]=-m,h[1]=0,h[5]=2*u,h[9]=0,h[13]=-f,h[2]=0,h[6]=0,h[10]=y,h[14]=-p,h[3]=0,h[7]=0,h[11]=0,h[15]=1,this}compose(t,e,n){const i=this.value,r=e.x,o=e.y,a=e.z,h=e.w,c=r+r,u=o+o,l=a+a,m=r*c,f=r*u,p=r*l,y=o*u,v=o*l,w=a*l,_=h*c,x=h*u,b=h*l,E=n.x,C=n.y,L=n.z;return i[0]=(1-(y+w))*E,i[1]=(f+b)*E,i[2]=(p-x)*E,i[3]=0,i[4]=(f-b)*C,i[5]=(1-(m+w))*C,i[6]=(v+_)*C,i[7]=0,i[8]=(p+x)*L,i[9]=(v-_)*L,i[10]=(1-(m+y))*L,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this}decompose(t,e,n){const i=this.value;let r=yn.set(i[0],i[1],i[2]).length();const o=yn.set(i[4],i[5],i[6]).length(),a=yn.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),t.x=i[12],t.y=i[13],t.z=i[14],Zt.copy(this);const c=1/r,u=1/o,l=1/a;return Zt.value[0]*=c,Zt.value[1]*=c,Zt.value[2]*=c,Zt.value[4]*=u,Zt.value[5]*=u,Zt.value[6]*=u,Zt.value[8]*=l,Zt.value[9]*=l,Zt.value[10]*=l,e.setFromRotationMatrix4(Zt),n.x=r,n.y=o,n.z=a,this}equals(t){for(let e=0;e<16;e++)if(this.value[e]!==t.value[e])return!1;return!0}translate(t=0,e=0,n=0){return this.multiply(new It([1,0,0,0,0,1,0,0,0,0,1,0,t,e,n,1]))}scale(t=1,e=1,n=1){return this.multiply(new It([t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1]))}scaleVector3(t){const e=this.value,n=t.x,i=t.y,r=t.z;return e[0]*=n,e[4]*=i,e[8]*=r,e[1]*=n,e[5]*=i,e[9]*=r,e[2]*=n,e[6]*=i,e[10]*=r,e[3]*=n,e[7]*=i,e[11]*=r,this}rotateX(t){const e=q(t),n=Math.cos(e),i=Math.sin(e);return this.multiply(new It([1,0,0,0,0,n,i,0,0,-i,n,0,0,0,0,1]))}rotateY(t){const e=q(t),n=Math.cos(e),i=Math.sin(e);return this.multiply(new It([n,0,-i,0,0,1,0,0,i,0,n,0,0,0,0,1]))}rotateZ(t){this.is3dSpecial=!0;const e=q(t),n=Math.cos(e),i=Math.sin(e);return this.multiply(new It([n,i,0,0,-i,n,0,0,0,0,1,0,0,0,0,1]))}skew(t=0,e=0,n=0){return this.multiply(new It([1,0,0,q(t),0,1,0,q(e),0,0,1,q(n),0,0,0,1]))}perspective(t){return this.multiply(new It([1,0,0,0,0,1,0,0,0,0,1,t?-(1/t):0,0,0,0,1]))}unproject(t){let e=t.x*this.m11+t.y*this.m21+this.m41,n=t.x*this.m12+t.y*this.m22+this.m42,i=t.x*this.m13+t.y*this.m23+this.m43,r=t.x*this.m14+t.y*this.m24+this.m44,o=e+this.m31,a=n+this.m32,h=i+this.m33,c=r+this.m34;r==0&&(r=1e-4),e/=r,n/=r,i/=r,c==0&&(c=1e-4),o/=c,a/=c,h/=c;const u=h-i;if(u==0)return{x:e,y:n,z:i,mass:r};const l=-i/u;return e+=l*(o-e),n+=l*(a-n),{x:e,y:n,z:i,mass:r}}project(t){const e=t.z;let n=t.x*this.m11+t.y*this.m21+e*this.m31+this.m41,i=t.x*this.m12+t.y*this.m22+e*this.m32+this.m42,r=t.x*this.m14+t.y*this.m24+e*this.m34+this.m44;return r==0&&(r=1e-4),n/=r,i/=r,r<0&&(n-=this.m41,i-=this.m42,n*=1/r,i*=1/r,n+=this.m41,i+=this.m42),{x:n,y:i,z:e,mass:r}}bounds(t,e,n,i){const r=new Us({x:t,y:e}),o=new Us({x:t+n,y:e}),a=new Us({x:t+n,y:e+i}),h=new Us({x:t,y:e+i});({x:r.x,y:r.y,z:r.z,mass:r.mass}=this.project(r)),{x:o.x,y:o.y,z:o.z,mass:o.mass}=this.project(o),{x:a.x,y:a.y,z:a.z,mass:a.mass}=this.project(a),{x:h.x,y:h.y,z:h.z,mass:h.mass}=this.project(h);const c=Math.min(r.x,o.x,a.x,h.x),u=Math.min(r.y,o.y,a.y,h.y),l=Math.max(r.x,o.x,a.x,h.x)-c,m=Math.max(r.y,o.y,a.y,h.y)-u;return{x:c,y:u,width:l,height:m}}}class _t{value;_m13=0;_m23=0;_m33=1;matrix4;constructor(t=xc){this.value=Array.from(t),this.matrix4=this.toMatrix4()}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this._m13}get m21(){return this.value[2]}get m22(){return this.value[3]}get m23(){return this._m23}get m31(){return this.value[4]}get m32(){return this.value[5]}get m33(){return this._m33}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this._m13=t}set m21(t){this.value[2]=t}set m22(t){this.value[3]=t}set m23(t){this._m23=t}set m31(t){this.value[4]=t}set m32(t){this.value[5]=t}set m33(t){this._m33=t}static fromString(t){const e=new _t,n=da("number",t);return n.length===6&&n.forEach((i,r)=>{i.fullMatch&&(e.value[r]=parseFloat(i.fullMatch))}),e}toMatrix4(t=this.matrix4){const e=[this.m11,this.m12,0,this.m13,this.m21,this.m22,0,this.m23,0,0,1,0,this.m31,this.m32,0,this.m33];return t?(t.value=e,t):new It(e)}identity(){return this.value=Array.from(xc),this.m13=0,this.m23=0,this.m33=1,this.matrix4=this.toMatrix4(),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m31==0&&this.m32==0&&this.m33==1}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m31*=t,this.m32*=t,this.m33*=t,this}normalize(){const t=this.m33||1e-4;return this.multiplyScalar(1/t)}transformPoint(t){const e=t.z||1;return{x:t.x*this.m11+t.y*this.m21+e*this.m31,y:t.x*this.m12+t.y*this.m22+e*this.m32,z:t.x*this.m13+t.y*this.m23+e*this.m33}}clone(){return new _t(this.value)}multiply(t){const e=this.clone(),n=t instanceof _t?t:new _t(t);return this.m11=n.m11*e.m11+n.m12*e.m21+n.m13*e.m31,this.m12=n.m11*e.m12+n.m12*e.m22+n.m13*e.m32,this.m13=n.m11*e.m13+n.m12*e.m23+n.m13*e.m33,this.m21=n.m21*e.m11+n.m22*e.m21+n.m23*e.m31,this.m22=n.m21*e.m12+n.m22*e.m22+n.m23*e.m32,this.m23=n.m21*e.m13+n.m22*e.m23+n.m23*e.m33,this.m31=n.m31*e.m11+n.m32*e.m21+n.m33*e.m31,this.m32=n.m31*e.m12+n.m32*e.m22+n.m33*e.m32,this.m33=n.m31*e.m13+n.m32*e.m23+n.m33*e.m33,this}append(t){return this.multiply(t)}prepend(t){return t.multiply(this),this}invert(){const t=this.m11,e=this.m12,n=this.m13,i=this.m21,r=this.m22,o=this.m23,a=this.m31,h=this.m32,c=this.m33,u=c*r-o*h,l=-c*i+o*a,m=h*i-r*a;let f=t*u+e*l+n*m;return f?(f=1/f,this.m11=u*f,this.m12=(-c*e+n*h)*f,this.m13=(o*e-n*r)*f,this.m21=l*f,this.m22=(c*t-n*a)*f,this.m23=(-o*t+n*i)*f,this.m31=m*f,this.m32=(-h*t+e*a)*f,this.m33=(r*t-e*i)*f,this):null}adjugate(){const t=new _t;return t.m11=this.m22*this.m33-this.m32*this.m23,t.m12=this.m32*this.m13-this.m12*this.m33,t.m13=this.m12*this.m23-this.m22*this.m13,t.m21=this.m31*this.m23-this.m21*this.m33,t.m22=this.m11*this.m33-this.m31*this.m13,t.m23=this.m21*this.m13-this.m11*this.m23,t.m31=this.m21*this.m32-this.m31*this.m22,t.m32=this.m31*this.m12-this.m11*this.m32,t.m33=this.m11*this.m22-this.m21*this.m12,t}split(){let t=Et(Math.atan2(this.m12,this.m11));return this.m11<0&&this.m22>=0&&(t+=180),{x:this.m31,y:this.m32,degree:t,scaleX:Math.sqrt(this.m11*this.m11+this.m12*this.m12),scaleY:Math.sqrt(this.m21*this.m21+this.m22*this.m22),skewX:Et(Math.atan2(-this.m21,this.m22)),skewY:Et(Math.atan2(this.m12,this.m11))}}getGroupCoords(t){const e=this.value[0],n=this.value[1],i=this.value[2],r=this.value[3],o=this.value[4],a=this.value[5],h=t.value[0],c=t.value[1],u=t.value[2],l=t.value[3],m=t.value[4],f=t.value[5],p=h*l,y=c*u,v=(u*n-e*l)/(y-p),w=(h*n-e*c)/(p-y),_=(u*r-i*l)/(y-p),x=(h*r-i*c)/(p-y),b=(u*(a-f)+l*(m-o))/(y-p),E=(h*(a-f)+c*(m-o))/(p-y),C=[v,w,_,x,b,E];return new _t(C)}toString(t=6){return this.matrix4.is2D()?`matrix(${this.value.map(e=>Z(e,t)).join(",")})`:this.matrix4.toString()}translate(t,e){return this.multiply([1,0,0,1,t,e]),this.toMatrix4(),this}translateTo(t,e){return this.translate(t-this.m31,e-this.m32)}translateX(t){return this.translate(t,0)}translateXTo(t){return this.translateTo(t,this.m32)}translateY(t){return this.translate(0,t)}translateYTo(t){return this.translateTo(this.m31,t)}translateZ(t){return this.matrix4.translate(0,0,t),this.matrix4.toMatrix(this),this}translateZTo(t){return this.translateZ(t-this.matrix4.m43),this}translate3d(t,e,n){return this.matrix4.translate(t,e,n),this.matrix4.toMatrix(this),this}translate3dTo(t,e,n){return this.translate3d(t-this.matrix4.m41,e-this.matrix4.m42,n-this.matrix4.m43),this}rotate(t,e=0,n=0){const i=q(t),r=Math.cos(i),o=Math.sin(i);return this.translate(e,n),this.multiply([r,o,-o,r,0,0]),this.translate(-e,-n),this.toMatrix4(),this}rotateTo(t,e=0,n=0){const{degree:i}=this.split();return this.rotate(t-i,e,n),this}rotateX(t){return this.matrix4.rotateX(t),this.matrix4.toMatrix(this),this}rotateXTo(t){const{degreeX:e}=this.matrix4.split();return this.rotateX(t-e),this}rotateY(t){return this.matrix4.rotateY(t),this.matrix4.toMatrix(this),this}rotateYTo(t){const{degreeY:e}=this.matrix4.split();return this.rotateY(t-e),this}rotateZ(t){return this.matrix4.rotateZ(t),this.matrix4.toMatrix(this),this}rotateZTo(t){const{degreeZ:e}=this.matrix4.split();return this.rotateZ(t-e),this}rotate3d(t,e,n){return this.matrix4.rotateX(t).rotateY(e).rotateZ(n),this.matrix4.toMatrix(this),this}rotate3dTo(t,e,n){const{degreeX:i,degreeY:r,degreeZ:o}=this.matrix4.split();return this.rotate3d(t-i,e-r,n-o),this}scale(t,e=t,n=0,i=0){return this.translate(n,i),this.multiply([t,0,0,e,0,0]),this.translate(-n,-i),this.toMatrix4(),this}scaleTo(t,e=t,n=0,i=0){return this.scale(t/this.m11,e/this.m22,n,i)}scaleX(t){return this.scale(t,1)}scaleXTo(t){return this.scale(t/this.m11,1)}scaleY(t){return this.scale(1,t)}scaleYTo(t){return this.scale(1,t/this.m22)}scaleZ(t){return this.matrix4.scale(1,1,t),this.matrix4.toMatrix(this),this}scaleZTo(t){const{scalarZ:e}=this.matrix4.split();return this.scaleZ(t/e),this}scale3d(t,e=t,n=t){return this.matrix4.scale(t,e,n),this.matrix4.toMatrix(this),this}scale3dTo(t,e=t,n=t){const{scalarX:i,scalarY:r,scalarZ:o}=this.matrix4.split();return this.scale3d(t/i,e/r,n/o),this}skew(t,e=t){return this.multiply([Math.cos(q(e)),Math.sin(q(e)),-Math.sin(q(t)),Math.cos(q(t)),0,0]),this.toMatrix4(),this}skewTo(t,e=t){const{skewX:n,skewY:i}=this.split();return this.skew(t-n,e-i)}skewX(t){const{skewY:e}=this.split();return this.skew(t,e)}skewXTo(t){const{skewY:e}=this.split();return this.skewTo(t,e)}skewY(t){const{skewX:e}=this.split();return this.skew(e,t)}skewYTo(t){const{skewX:e}=this.split();return this.skewTo(e,t)}skewZ(t){return this}skewZTo(t){return this}skew3d(t,e,n){return this}skew3dTo(t,e,n){return this}perspective(t){return this.matrix4.perspective(t),this.matrix4.toMatrix(this),this}}const _g=new zt(0,0,0),Sg=new zt(1,1,1),Ie=new zt,Vs=new zt,Nt=new zt,yn=new zt,Ur=new gn,Zt=new It;function Vr(s){const t=new _t;return s.replace(/([a-z0-9]+)\s*\(?\s*((-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)*[a-z%]*\s*,?\s*)+)\)?/gi,function(e,n,i){i.indexOf(",")>=0?i=i.split(/\s*,\s*/):i=i.split(/\s+/);const r=[];for(let o=0,a=i.length;o<a;o++)i[o].trim()&&r.push(parseFloat(""+i[o]));switch(n.toLowerCase()){case"t":case"translate":t.translate(r[0],r[1]);break;case"translatex":t.translateX(r[0]);break;case"translatey":t.translateY(r[0]);break;case"translatez":t.translateZ(r[0]);break;case"translate3d":t.translate3d(r[0],r[1],r[2]);break;case"r":case"rotate":t.rotate(r[0],r[1]??0,r[2]??0);break;case"rotatex":t.rotateX(r[0]);break;case"rotatey":t.rotateY(r[0]);break;case"rotatez":t.rotateZ(r[0]);break;case"rotate3d":t.rotate3d(r[0],r[1],r[2]);break;case"s":case"scale":t.scale(r[0],r[1]??r[0]);break;case"scalex":t.scaleX(r[0]);break;case"scaley":t.scaleY(r[0]);break;case"scalez":t.scaleZ(r[0]);break;case"scale3d":t.scale3d(r[0],r[1],r[2]);break;case"skew":t.skew(r[0],r[1]??0);break;case"skewx":t.skewX(r[0]);break;case"skewy":t.skewY(r[0]);break;case"skewz":t.skewZ(r[0]);break;case"skew3d":t.skew3d(r[0],r[1],r[2]);break;case"m":case"matrix":t.multiply([r[0],r[1],r[2],r[3],r[4],r[5]]),t.toMatrix4();break;case"matrix3d":t.matrix4.multiply(new It(r)),t.matrix4.toMatrix(t);break}return""}),t}function Qt(s,t,e){const n=new _t;return n.rotate(Et(s)),n.transformPoint({x:t,y:e})}function Gr(s){const t=typeof s?.x=="number"?s?.x:0,e=typeof s?.y=="number"?s?.y:0,n=typeof s?.degree=="number"?s?.degree:0,i=typeof s?.scalarX=="number"?s?.scalarX:1,r=typeof s?.scalarY=="number"?s?.scalarY:1,o=q(n),a=Math.cos(o),h=Math.sin(o),c=new DOMMatrix([a*i,h*i,-h*r,a*r,t,e]);return c.multiplySelf(new DOMMatrix(s?.originMatrix||"")),c}function Cg(s,t){const e=new Path2D(s),n=new Path2D;return n.addPath(e,Gr(t)),n}function qe(s,t,e){const n=Ir(s);return n.props.style=n.props.style||{},t?n.props.style[t]||n.props.style[pa(t)]||n.props.style[xt(t)]||"":n.props.style}function qr(s,t,e){Dr(s,n=>{n.props.style=n.props.style||{},typeof t=="string"&&e?n.props.style[t]=e:t instanceof Object&&Object.keys(t).forEach(i=>{n.props.style[i]=t[i]})}),Lr()}function jr(s){const t={};if(getComputedStyle){const e=getComputedStyle(s);for(let n=0,i=e.length;n<i;n++)t[e[n]]=e.getPropertyValue(t[n])}else{const e=s.currentStyle;for(const n in e)t[n]=e[n]}return s.style.cssText&&s.style.cssText.split(";").filter(e=>!!e).forEach(e=>{const[n,i]=e.split(":");n&&i&&(t[n.trim()]=i.trim())}),t}function Tg(s,t,e){let n=s.style[t]||"";if(!n&&getComputedStyle){t=xt(t);const i=getComputedStyle(s,e),r=i.getPropertyPriority(t);n=i.getPropertyValue(t).trim()+(r?"!"+r:"")}return n||(n=s.currentStyle[t]||""),n}function Gs(s,t,e){typeof t=="string"&&e?s.style.setProperty(xt(t),e.replace(/!important/i,""),e.toLowerCase().includes("!important")?"important":""):t instanceof Object&&Object.keys(t).forEach(n=>{Gs(s,n,t[n])})}function Hr(s,t){typeof t=="string"?s.style.removeProperty(xt(t)):Object.keys(t).forEach(e=>{Hr(s,e)})}function _c(s,t){let e;if(typeof t=="string"){const n=document.querySelector(t)?.shadowRoot;n?e=n:e=document.querySelector(t)}else e=t||document.getElementsByTagName("head")[0];if(e){const n=document.createElement("style");return n.innerHTML=s,e.appendChild(n),()=>{(e instanceof HTMLElement||e instanceof ShadowRoot)&&e.removeChild(n)}}else{const n=document.styleSheets[0].insertRule(s);return()=>{document.styleSheets[0].deleteRule(n)}}}function Eg(s,t,e={}){Object.prototype.hasOwnProperty.call(e,"transform")||Object.assign(e,{transform:qe(s,"transform")||""});const n=Vr(e.transform),i={};for(const r in t){const o=t[r];switch(r){case"transform":break;case"translate":n.translate(o[0]||0,o[1]||0);break;case"translateTo":n.translateTo(o[0]||0,o[1]||0);break;case"translateX":n.translateX(o||0);break;case"translateXTo":n.translateXTo(o||0);break;case"translateY":n.translateY(o||0);break;case"translateYTo":n.translateYTo(o||0);break;case"translateZ":n.translateZ(o||0);break;case"translateZTo":n.translateZTo(o||0);break;case"translate3d":n.translate3d(o[0]||0,o[1]||0,o[2]||0);break;case"translate3dTo":n.translate3dTo(o[0]||0,o[1]||0,o[2]||0);break;case"rotate":typeof o=="number"?n.rotate(o||0):n.rotate(o[0]||0,o[1]||0,o[2]||0);break;case"rotateTo":typeof o=="number"?n.rotateTo(o||0):n.rotateTo(o[0]||0,o[1]||0,o[2]||0);break;case"rotateX":n.rotateX(o||0);break;case"rotateXTo":n.rotateXTo(o||0);break;case"rotateY":n.rotateY(o||0);break;case"rotateYTo":n.rotateYTo(o||0);break;case"rotateZ":n.rotateZ(o||0);break;case"rotateZTo":n.rotateZTo(o||0);break;case"rotate3d":n.rotate3d(o[0]||0,o[1]||0,o[2]||0);break;case"rotate3dTo":n.rotate3dTo(o[0]||0,o[1]||0,o[2]||0);break;case"scale":typeof o=="number"?n.scale(o||1):n.scale(o[0]||1,o[1]||1,o[2]||0,o[3]||0);break;case"scaleTo":typeof o=="number"?n.scaleTo(o||1):n.scaleTo(o[0]||1,o[1]||1,o[2]||0,o[3]||0);break;case"scaleX":n.scaleX(o||1);break;case"scaleXTo":n.scaleXTo(o||1);break;case"scaleY":n.scaleY(o||1);break;case"scaleYTo":n.scaleYTo(o||1);break;case"scaleZ":n.scaleZ(o||1);break;case"scaleZTo":n.scaleZTo(o||1);break;case"scale3d":typeof o=="number"?n.scale3d(o||1):n.scale3d(o[0]||1,o[1]||1,o[2]||1);break;case"scale3dTo":typeof o=="number"?n.scale3dTo(o||1):n.scale3dTo(o[0]||1,o[1]||1,o[2]||1);break;case"skew":typeof o=="number"?n.skew(o||0):n.skew(o[0]||0,o[1]||0);break;case"skewTo":typeof o=="number"?n.skewTo(o||0):n.skewTo(o[0]||0,o[1]||0);break;case"skewX":n.skewX(o||0);break;case"skewXTo":n.skewXTo(o||0);break;case"skewY":n.skewY(o||0);break;case"skewYTo":n.skewYTo(o||0);break;case"skewZ":break;case"skewZTo":break;case"skew3d":break;case"skew3dTo":break;case"perspective":n.perspective(o||0);break;default:Object.prototype.hasOwnProperty.call(e,r)||(e[r]=qe(s,r)),Object.assign(i,{[r]:`${o}`});break}}return Object.assign(i,{transform:n.toString()}),i}function je(s,t,e){if(t===void 0&&e===void 0)return Wr(s);if(typeof t=="string"&&e===void 0)return Sc(s,t);let n={};typeof t=="object"?n=t:typeof t=="string"&&typeof e=="string"&&(n[t]=""+e),Dr(s,i=>{Object.entries(n).forEach(([r,o])=>{i.props[r]=""+o})}),Lr()}const Pg=["-o-","-ms-","-moz-","-webkit-",""];function Wr(s){const t={};for(let e=0,n=s.attributes,i=n.length;e<i;e++){const r=n[e];r.nodeName&&r.nodeValue&&(r.nodeName==="style"?t[r.nodeName]=jr(s):t[r.nodeName]=r.nodeValue)}return t}function Sc(s,t){return t==="style"?jr(s):s.getAttribute(xt(t))}function wn(s,t,e){return s.setAttribute(xt(t),""+e)}function Mg(s,t){t.split(/[,\s]+/i).forEach(e=>{const n=xt(e.trim());n!=""&&s.removeAttribute(n)})}function Cc(s,t){for(const e in t){const n=t[e];switch(e){case"fill":n!=="none"&&(s.fillStyle=n);break;case"stroke":n!=="none"&&(s.strokeStyle=n);break;case"stroke-width":case"strokeWidth":s.lineWidth=Number(n);break;case"stroke-linecap":case"strokeLinecap":s.lineCap=n;break;case"stroke-linejoin":case"strokeLinejoin":switch(n){case"round":case"bevel":case"miter":s.lineJoin=n;break;default:s.lineJoin="miter";break}break;case"stroke-miterlimit":case"strokeMiterlimit":s.miterLimit=Number(n);break;case"stroke-opacity":case"strokeOpacity":break;case"stroke-dashoffset":case"strokeDashoffset":s.lineDashOffset=Number(n);break;case"stroke-dasharray":case"strokeDasharray":typeof n=="string"&&s.setLineDash(n.split(/\s+/).map(i=>Number(i)));break;case"cursor":break;case"font":typeof n=="string"&&(s.font=n);break;case"font-size":case"fontSize":s.font+=` ${n}`;break;case"font-family":case"fontFamily":s.font+=` ${n}`;break;case"font-weight":case"fontWeight":break;case"font-style":case"fontStyle":break;case"text-anchor":case"textAnchor":switch(n){case"middle":s.textAlign="center";break;case"end":s.textAlign="end";break;case"start":s.textAlign="start";break}break;case"alignment-baseline":case"alignmentBaseline":switch(n){case"middle":case"bottom":case"top":case"alphabetic":case"hanging":case"ideographic":s.textBaseline=n;break;default:s.textBaseline="alphabetic";break}break}}}function Ag(s,t,e,n,i){const r=t/e;let o=0,a=0;switch(s){case"aspectFit":r>=1?(o=n,a=o/r,a>i&&(a=i,o=a*r)):(a=i,o=a*r,o>n&&(o=n,a=o/r));break;case"aspectFill":r>=1?(a=i,o=a*r):(o=n,a=o/r);break;case"widthFix":o=n,a=o/r;break;case"heightFix":a=i,o=a*r;break;case"scaleToFill":default:o=n,a=i;break}return{width:o,height:a}}function Tc(s){try{const t=document.createElement("canvas"),e=t.getContext("2d");return t.width=s.width,t.height=s.height,e.drawImage(s,0,0,t.width,t.height),e.getImageData(0,0,t.width,t.height)}catch{return new ImageData(s.width,s.height)}}const kg=s=>{const t=s.width,e=s.height,n=t*e*3,i=n+54,r=[66,77,i&255,i>>8&255,i>>16&255,i>>24&255,0,0,0,0,54,0,0,0],o=[40,0,0,0,t&255,t>>8&255,t>>16&255,t>>24&255,e&255,e>>8&255,e>>16&255,e>>24&255,1,0,24,0,0,0,0,0,n&255,n>>8&255,n>>16&255,n>>24&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=(4-t*3%4)%4,h=s.data;let c="";const u=t<<2;let l=e;const m=String.fromCharCode;do{const p=u*(l-1);let y="";for(let v=0;v<t;v++){const w=v<<2;y+=m(h[p+w+2])+m(h[p+w+1])+m(h[p+w])}for(let v=0;v<a;v++)y+=String.fromCharCode(0);c+=y}while(--l);function f(p){if(!window.btoa)throw"btoa undefined";let y="";if(typeof p=="string")y=p;else for(let v=0;v<p.length;v++)y+=String.fromCharCode(p[v]);return btoa(y)}return f(r.concat(o))+f(c)};function Ig(s){const{width:t,height:e}=s,n=document.createElement("canvas"),i=n.getContext("2d");return n.width=t,n.height=e,i.putImageData(s,0,0,0,0,t,e),n.toDataURL("image/png")}const Dg=(s,t,e)=>{const{width:n,height:i}=s,r=document.createElement("canvas"),o=r.getContext("2d");r.width=n,r.height=i,o.putImageData(s,0,0,0,0,n,i);const a=`image/${t?t.toLowerCase():"png"}`;r.toBlob(h=>{e?.(null,h)},a,1)};function Lg(s,t){return createImageBitmap(s,t)}function Rg(s){const t=[],e=[],n=[];let i=0;for(let h=0,c=s.data.length;h<c;h+=4)t[i]=s.data[h],e[i]=s.data[h+1],n[i]=s.data[h+2],i+=1;const r=Jr(t),o=Jr(e),a=Jr(n);return"rgb("+r+","+o+","+a+")"}function Jr(s){const t={},e=[],n=[];for(let a=0;a<s.length;a++)t[s[a]]?e.push(s[a]):t[s[a]]=1;let i=0;for(let a=0;a<e.length;a++){i=0;for(let h=0;h<e.length;h++)e[a]===e[h]&&(i+=1),n[a]=i}const r=Math.max.apply(null,n);let o=0;for(;o<n.length;o++)if(n[o]===r)return;return e[o]}const Og=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=t[(o*e+e-a-1)*4],i[h+1]=t[(o*e+e-a-1)*4+1],i[h+2]=t[(o*e+e-a-1)*4+2],i[h+3]=t[(o*e+e-a-1)*4+3]}return new ImageData(i,e,n)},zg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=t[((n-o-1)*e+a)*4],i[h+1]=t[((n-o-1)*e+a)*4+1],i[h+2]=t[((n-o-1)*e+a)*4+2],i[h+3]=t[((n-o-1)*e+a)*4+3]}return new ImageData(i,e,n)},Ng=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<e;o++)for(let a=0;a<n;a++){const h=(o*n+a)*4;i[h]=t[(a*e+e-o-1)*4],i[h+1]=t[(a*e+e-o-1)*4+1],i[h+2]=t[(a*e+e-o-1)*4+2],i[h+3]=t[(a*e+e-o-1)*4+3]}return new ImageData(i,n,e)},Bg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<e;o++)for(let a=0;a<n;a++){const h=(o*n+a)*4;i[h]=t[((n-a-1)*e+o)*4],i[h+1]=t[((n-a-1)*e+o)*4+1],i[h+2]=t[((n-a-1)*e+o)*4+2],i[h+3]=t[((n-a-1)*e+o)*4+3]}return new ImageData(i,n,e)},Fg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4,c=(t[h]+t[h+1]+t[h+2])/3;i[h]=c,i[h+1]=c,i[h+2]=c,i[h+3]=t[h+3]}return new ImageData(i,e,n)},Yg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4,c=.2126*t[h]+.7152*t[h+1]+.0722*t[h+2];i[h]=c,i[h+1]=c,i[h+2]=c,i[h+3]=t[h+3]}return new ImageData(i,e,n)},$g=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4,u=(t[h]+t[h+1]+t[h+2])/3>127?255:0;i[h]=u,i[h+1]=u,i[h+2]=u,i[h+3]=t[h+3]}return new ImageData(i,e,n)},Xg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=255-t[h],i[h+1]=255-t[h+1],i[h+2]=255-t[h+2],i[h+3]=t[h+3]}return new ImageData(i,e,n)},Ug=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=t[h],i[h+1]=0,i[h+2]=0,i[h+3]=t[h+3]}return new ImageData(i,e,n)},Vg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=0,i[h+1]=t[h+1],i[h+2]=0,i[h+3]=t[h+3]}return new ImageData(i,e,n)},Gg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=0,i[h+1]=0,i[h+2]=t[h+2],i[h+3]=t[h+3]}return new ImageData(i,e,n)},qg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=t[h],i[h+1]=t[h+1],i[h+2]=0,i[h+3]=t[h+3]}return new ImageData(i,e,n)},jg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=t[h],i[h+1]=0,i[h+2]=t[h+1],i[h+3]=t[h+3]}return new ImageData(i,e,n)},Hg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=0,i[h+1]=t[h+1],i[h+2]=t[h+1],i[h+3]=t[h+3]}return new ImageData(i,e,n)},Wg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4,c=(t[h+1]+t[h+2])/2;i[h]=t[h],i[h+1]=c,i[h+2]=c,i[h+3]=t[h+3]}return new ImageData(i,e,n)},Jg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4,c=(t[h]+t[h+2])/2;i[h]=c,i[h+1]=t[h+1],i[h+2]=c,i[h+3]=t[h+3]}return new ImageData(i,e,n)},Zg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4,c=(t[h]+t[h+1])/2;i[h]=c,i[h+1]=c,i[h+2]=t[h+2],i[h+3]=t[h+3]}return new ImageData(i,e,n)},Qg=s=>Ec(s,[-1,-1,-1,-1,9,-1,-1,-1,-1]),Kg=s=>Ec(s,[-1,-1,-1,-1,8,-1,-1,-1,-1]),t0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;i[h]=t[h],i[h+1]=t[h+1],i[h+2]=t[h+2],i[h+3]=255}return new ImageData(i,e,n)},e0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;if(t[h+3]===0)i[h]=255,i[h+1]=255,i[h+2]=255,i[h+3]=255;else{const c=Pc([t[h],t[h+1],t[h+2],t[h+3]],[255,255,255,255]);i[h]=c[0],i[h+1]=c[1],i[h+2]=c[2],i[h+3]=c[3]}}return new ImageData(i,e,n)};function n0(s,t,e,n,i,r=!1,o){const{data:a,width:h,height:c}=s;let u=i,l=n,m=t,f=e;if(u<0?u=0:u>h&&(u=h),l<0?l=0:l>c&&(l=c),m<1?m=1:m>h&&(m=h),f<1?f=1:f>c&&(f=c),u+m>h&&(m=h-u),l+f>c&&(f=c-l),r){const p=new Uint8ClampedArray(a.length);for(let v=0;v<c;v++)for(let w=0;w<h;w++){const _=(v*h+w)*4;w>=u&&w<=u+m&&v>=l&&v<=l+f?(p[_]=a[_],p[_+1]=a[_+1],p[_+2]=a[_+2],p[_+3]=a[_+3]):(p[_]=255,p[_+1]=255,p[_+2]=255,p[_+3]=o&&["JPG","JPEG"].includes(o.toUpperCase())?255:0)}return new ImageData(p,h,c)}else{const p=new Uint8ClampedArray(m*f*4);for(let v=l;v<=l+f;v++)for(let w=u;w<=u+m;w++){const _=((v-l)*m+w-u)*4,x=(v*h+w)*4;p[_]=a[x],p[_+1]=a[x+1],p[_+2]=a[x+2],p[_+3]=a[x+3]}return new ImageData(p,m,f)}}function s0(s,t,e,n){const{data:i,width:r,height:o}=s;let a=t;a>Math.floor(r/2)&&(a=Math.floor(r/2)),a>Math.floor(o/2)&&(a=Math.floor(o/2)),a<0&&(a=0);const h=new Uint8ClampedArray(i.length);for(let u=0;u<o;u++)for(let l=0;l<r;l++){const m=(u*r+l)*4;let f=-1;l<a?u<a?f=Math.sqrt(Math.pow(a-l-1,2)+Math.pow(a-u-1,2)):u>o-a-1&&(f=Math.sqrt(Math.pow(a-l-1,2)+Math.pow(u-(o-a),2))):l>r-a-1&&(u<a?f=Math.sqrt(Math.pow(l-(r-a),2)+Math.pow(a-u-1,2)):u>o-a-1&&(f=Math.sqrt(Math.pow(l-(r-a),2)+Math.pow(u-(o-a),2)))),Math.round(f)>a?(h[m]=255,h[m+1]=255,h[m+2]=255,h[m+3]=n||e.toUpperCase()==="PNG"?0:255):(h[m]=i[m],h[m+1]=i[m+1],h[m+2]=i[m+2],h[m+3]=n||e.toUpperCase()==="PNG"?i[m+3]:255)}return new ImageData(h,r,o)}function i0(s,t,e,n,i,r=1e4){const o=new Image;o.src=s;const a=document.createElement("canvas"),h=a.getContext("2d");return a.width=r,a.height=r,h.drawImage(o,0,0,t,e,0,0,n,i),h.getImageData(0,0,n,i)}function r0(s,t){const{data:e,width:n,height:i}=s,r=new Uint8ClampedArray(e.length);for(let a=0;a<i;a++)for(let h=0;h<n;h++){const c=(a*n+h)*4;r[c]=Math.max(Math.min(e[c]+t,255),0),r[c+1]=Math.max(Math.min(e[c+1]+t,255),0),r[c+2]=Math.max(Math.min(e[c+2]+t,255),0),r[c+3]=e[c+3]}return new ImageData(r,n,i)}function o0(s,t,e=!1){const{data:n,width:i,height:r}=s,o=new Uint8ClampedArray(n.length);for(let h=0;h<r;h++)for(let c=0;c<i;c++){const u=(h*i+c)*4;n[u+3]===0?(o[u]=255,o[u+1]=255,o[u+2]=255):(o[u]=n[u],o[u+1]=n[u+1],o[u+2]=n[u+2]);let l=n[u+3];e?l=Math.max(Math.min(Math.floor(255*t),255),0):l=Math.max(Math.min(Math.floor(l+255*t),255),0),o[u+3]=l}return new ImageData(o,i,r)}function a0(s,t,e,n){const{data:i,width:r,height:o}=s,{data:a,width:h,height:c}=t;let u=e,l=n;e+c>o&&(u=o-c),n+h>r&&(l=r-h);const m=new Uint8ClampedArray(i.length);for(let p=0;p<o;p++)for(let y=0;y<r;y++){const v=(p*r+y)*4;if(y<l||y>l+h||p<=u||p>=u+c)m[v]=i[v],m[v+1]=i[v+1],m[v+2]=i[v+2],m[v+3]=i[v+3];else{const w=(p*r+y-((u+1)*r+(p-(u+1))*(r-h))+h-l-1)*4,_=[a[w],a[w+1],a[w+2],a[w+3]],x=[i[v],i[v+1],i[v+2],i[v+3]],b=Pc(_,x);m[v]=b[0],m[v+1]=b[1],m[v+2]=b[2],m[v+3]=b[3]}}return new ImageData(m,r,o)}function h0(s,t,e,n,i,r=10){const{data:o,width:a,height:h}=s;let c=i,u=n,l=t,m=e;c<0?c=0:c>a&&(c=a),u<0?u=0:u>h&&(u=h),l<1?l=1:l>a&&(l=a),m<1?m=1:m>h&&(m=h),c+l>a&&(l=a-c),u+m>h&&(m=h-u);const f=new Uint8ClampedArray(o.length);for(let y=0;y<h;y++)for(let v=0;v<a;v++){const w=(y*a+v)*4;if(v>=c&&v<=c+l&&y>=u&&y<=u+m){const _=Math.floor((v-c)/r),x=Math.floor((y-u)/r);let b=Math.floor(r*(_+1)-r/2+c),E=Math.floor(r*(x+1)-r/2+u);b>a-1&&(b=a-1),E>h-1&&(E=h-1);const C=(E*a+b)*4;f[w]=o[C],f[w+1]=o[C+1],f[w+2]=o[C+2],f[w+3]=o[C+3]}else f[w]=o[w],f[w+1]=o[w+1],f[w+2]=o[w+2],f[w+3]=o[w+3]}return new ImageData(f,a,h)}function c0(s,t,e={backgroundColor:{r:0,g:0,b:0,a:255},changeIntoColor:{r:0,g:0,b:0,a:0}}){if(t&&e){const{data:n,width:i,height:r}=s,{data:o}=t,a=new Uint8ClampedArray(n.length),{backgroundColor:h,changeIntoColor:c}=e;for(let l=0;l<r;l++)for(let m=0;m<i;m++){const f=(l*i+m)*4,p=o[f],y=o[f+1],v=o[f+2],w=o[f+3];p===h.r&&y===h.g&&v===h.b&&w===h.a&&c.a!==0?(a[f]=c.r,a[f+1]=c.g,a[f+2]=c.b,a[f+3]=c.a):(a[f]=n[f],a[f+1]=n[f+1],a[f+2]=n[f+2],a[f+3]=n[f+3])}return new ImageData(a,i,r)}return s}function Ec(s,t){const{data:e,width:n,height:i}=s,r=new Uint8ClampedArray(e.length);for(let a=0;a<i;a++)for(let h=0;h<n;h++){const c=(a*n+h)*4;for(let u=0;u<3;u++){const l=c+u;h===0||h===n-1||a===0||a===i-1?r[l]=e[l]:r[l]=t[0]*e[l-n*4-4]+t[1]*e[l-n*4]+t[2]*e[l-n*4+4]+t[3]*e[l-4]+t[4]*e[l]+t[5]*e[l+4]+t[6]*e[l+n*4-4]+t[7]*e[l+n*4]+t[8]*e[l+n*4+4]}r[c+3]=e[c+3]}return new ImageData(r,n,i)}function Pc(s,t){if(s&&s.length===4&&t&&t.length===4){const e=s[3],n=t[3];if(e===255||n===0)return s;if(e===0)return t;{const i=e/255,r=n/255,o=Math.max(Math.min(Math.floor(s[0]*i+t[0]*r*(1-i)),255),0),a=Math.max(Math.min(Math.floor(s[1]*i+t[1]*r*(1-i)),255),0),h=Math.max(Math.min(Math.floor(s[2]*i+t[2]*r*(1-i)),255),0),c=Math.max(Math.min(Math.floor((i+r*(1-i))*255),255),0);return[o,a,h,c]}}return[255,255,255,255]}const Zr=function(){const s=[];return{writeByte(t){s.push(t&255)},writeShort(t){this.writeByte(t),this.writeByte(t>>>8)},writeBytes(t,e=0,n=t.length){for(let i=0;i<n;i++)this.writeByte(t[i+e])},writeString(t){for(let e=0,n=t.length;e<n;e++)this.writeByte(t.charCodeAt(e))},toByteArray(){return s},toString(){let t="[";for(let e=0,n=s.length;e<n;e++)e>0&&(t+=","),t+=s[e];return t+="]",t}}},Mc=function(){let s=0,t=0,e=0,n="";const i=function(o){if(!(o<0)){if(o<26)return 65+o;if(o<52)return 97+(o-26);if(o<62)return 48+(o-52);if(o==62)return 43;if(o==63)return 47}throw new Error("n:"+o)},r=function(o){n+=String.fromCharCode(i(o&63))};return{writeByte(o){for(s=s<<8|o&255,t+=8,e+=1;t>=6;)r(s>>>t-6),t-=6},flush(){if(t>0&&(r(s<<6-t),s=0,t=0),e%3!=0){const o=3-e%3;for(let a=0;a<o;a++)n+="="}},toString(){return n}}},Ac=function(s,t,e){const n=new Array(s*s),i=function(a){const h=a;let c=0,u=0;return{write(l,m){if(l>>>m)throw new Error("length over");for(;c+m>=8;)h.writeByte(255&(l<<c|u)),m-=8-c,l>>>=8-c,u=0,c=0;u=l<<c|u,c=c+m},flush(){c>0&&h.writeByte(u)}}},r=function(a){const h=1<<a,c=(1<<a)+1;let u=a+1;const l=o();for(let v=0;v<h;v++)l.add(String.fromCharCode(v));l.add(String.fromCharCode(h)),l.add(String.fromCharCode(c));const m=Zr(),f=i(m);f.write(h,u);let p=0,y=String.fromCharCode(n[p]);for(p+=1;p<n.length;){const v=String.fromCharCode(n[p]);p+=1,l.contains(y+v)?y=y+v:(f.write(l.indexOf(y),u),l.size()<4095&&(l.size()==1<<u&&(u+=1),l.add(y+v)),y=v)}return f.write(l.indexOf(y),u),f.write(c,u),f.flush(),m.toByteArray()},o=function(){const a={};let h=0;return{add(c){if(this.contains(c))throw new Error("dup key:"+c);a[c]=h,h+=1},size(){return h},indexOf(c){return a[c]},contains(c){return typeof a[c]<"u"}}};return{setPixel(a,h,c){n[h*s+a]=c},write(a){a.writeString("GIF87a"),a.writeShort(s),a.writeShort(s),a.writeByte(128),a.writeByte(0),a.writeByte(0),a.writeByte(hn("0x"+t[1]+t[2])),a.writeByte(hn("0x"+t[3]+t[4])),a.writeByte(hn("0x"+t[5]+t[6])),a.writeByte(hn("0x"+e[1]+e[2])),a.writeByte(hn("0x"+e[3]+e[4])),a.writeByte(hn("0x"+e[5]+e[6])),a.writeString(","),a.writeShort(0),a.writeShort(0),a.writeShort(s),a.writeShort(s),a.writeByte(0);const h=2,c=r(h);a.writeByte(h);let u=0;for(;c.length-u>255;)a.writeByte(255),a.writeBytes(c,u,255),u+=255;a.writeByte(c.length-u),a.writeBytes(c,u,c.length-u),a.writeByte(0),a.writeString(";")}}},kc=function(s,t,e,n){const i=Ac(s,t,e);for(let c=0;c<s;c++)for(let u=0;u<s;u++)i.setPixel(u,c,n(u,c));const r=Zr();i.write(r);const o=Mc(),a=r.toByteArray();for(let c=0,u=a.length;c<u;c++)o.writeByte(a[c]);o.flush();let h="";return h+="data:image/gif;base64,",h+=o,h},Bt={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},jn={M:0,L:1,H:2,Q:3},De={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},dt={glog:function(s){if(s<1)throw new Error("glog("+s+")");return dt.LOG_TABLE[s]},gexp:function(s){for(;s<0;)s+=255;for(;s>=256;)s-=255;return dt.EXP_TABLE[s]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(let s=0;s<8;s++)dt.EXP_TABLE[s]=1<<s;for(let s=8;s<256;s++)dt.EXP_TABLE[s]=dt.EXP_TABLE[s-4]^dt.EXP_TABLE[s-5]^dt.EXP_TABLE[s-6]^dt.EXP_TABLE[s-8];for(let s=0;s<255;s++)dt.LOG_TABLE[dt.EXP_TABLE[s]]=s;const Q={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(s){let t=s<<10;for(;Q.getBCHDigit(t)-Q.getBCHDigit(Q.G15)>=0;)t^=Q.G15<<Q.getBCHDigit(t)-Q.getBCHDigit(Q.G15);return(s<<10|t)^Q.G15_MASK},getBCHTypeNumber:function(s){let t=s<<12;for(;Q.getBCHDigit(t)-Q.getBCHDigit(Q.G18)>=0;)t^=Q.G18<<Q.getBCHDigit(t)-Q.getBCHDigit(Q.G18);return s<<12|t},getBCHDigit:function(s){let t=0;for(;s!=0;)t++,s>>>=1;return t},getPatternPosition:function(s){return Q.PATTERN_POSITION_TABLE[s-1]},getMask:function(s,t,e){switch(s){case De.PATTERN000:return(t+e)%2==0;case De.PATTERN001:return t%2==0;case De.PATTERN010:return e%3==0;case De.PATTERN011:return(t+e)%3==0;case De.PATTERN100:return(Math.floor(t/2)+Math.floor(e/3))%2==0;case De.PATTERN101:return t*e%2+t*e%3==0;case De.PATTERN110:return(t*e%2+t*e%3)%2==0;case De.PATTERN111:return(t*e%3+(t+e)%2)%2==0;default:throw new Error("bad maskPattern:"+s)}},getErrorCorrectPolynomial:function(s){let t=new xn([1],0);for(let e=0;e<s;e++)t=t.multiply(new xn([1,dt.gexp(e)],0));return t},getLengthInBits:function(s,t){if(1<=t&&t<10)switch(s){case Bt.MODE_NUMBER:return 10;case Bt.MODE_ALPHA_NUM:return 9;case Bt.MODE_8BIT_BYTE:return 8;case Bt.MODE_KANJI:return 8;default:throw new Error("mode:"+s)}else if(t<27)switch(s){case Bt.MODE_NUMBER:return 12;case Bt.MODE_ALPHA_NUM:return 11;case Bt.MODE_8BIT_BYTE:return 16;case Bt.MODE_KANJI:return 10;default:throw new Error("mode:"+s)}else if(t<41)switch(s){case Bt.MODE_NUMBER:return 14;case Bt.MODE_ALPHA_NUM:return 13;case Bt.MODE_8BIT_BYTE:return 16;case Bt.MODE_KANJI:return 12;default:throw new Error("mode:"+s)}else throw new Error("type:"+t)},getLostPoint:function(s){const t=s.getModuleCount();let e=0;for(let r=0;r<t;r++)for(let o=0;o<t;o++){let a=0;const h=s.isDark(r,o);for(let c=-1;c<=1;c++)if(!(r+c<0||t<=r+c))for(let u=-1;u<=1;u++)o+u<0||t<=o+u||c==0&&u==0||h==s.isDark(r+c,o+u)&&a++;a>5&&(e+=3+a-5)}for(let r=0;r<t-1;r++)for(let o=0;o<t-1;o++){let a=0;s.isDark(r,o)&&a++,s.isDark(r+1,o)&&a++,s.isDark(r,o+1)&&a++,s.isDark(r+1,o+1)&&a++,(a==0||a==4)&&(e+=3)}for(let r=0;r<t;r++)for(let o=0;o<t-6;o++)s.isDark(r,o)&&!s.isDark(r,o+1)&&s.isDark(r,o+2)&&s.isDark(r,o+3)&&s.isDark(r,o+4)&&!s.isDark(r,o+5)&&s.isDark(r,o+6)&&(e+=40);for(let r=0;r<t;r++)for(let o=0;o<t-6;o++)s.isDark(o,r)&&!s.isDark(o+1,r)&&s.isDark(o+2,r)&&s.isDark(o+3,r)&&s.isDark(o+4,r)&&!s.isDark(o+5,r)&&s.isDark(o+6,r)&&(e+=40);let n=0;for(let r=0;r<t;r++)for(let o=0;o<t;o++)s.isDark(o,r)&&n++;const i=Math.abs(100*n/t/t-50)/5;return e+=i*10,e}};class xn{num;constructor(t,e){if(t.length==null)throw new Error(t.length+"/"+e);let n=0;for(;n<t.length&&t[n]==0;)n++;this.num=new Array(t.length-n+e);for(let i=0;i<t.length-n;i++)this.num[i]=t[i+n]}get(t){return this.num[t]}getLength(){return this.num.length}multiply(t){const e=new Array(this.getLength()+t.getLength()-1);for(let n=0;n<this.getLength();n++)for(let i=0;i<t.getLength();i++)e[n+i]^=dt.gexp(dt.glog(this.get(n))+dt.glog(t.get(i)));return new xn(e,0)}mod(t){if(this.getLength()-t.getLength()<0)return this;const e=dt.glog(this.get(0))-dt.glog(t.get(0)),n=new Array(this.getLength());for(let i=0;i<this.getLength();i++)n[i]=this.get(i);for(let i=0;i<t.getLength();i++)n[i]^=dt.gexp(dt.glog(t.get(i))+e);return new xn(n,0).mod(t)}}class pe{totalCount;dataCount;constructor(t,e){this.totalCount=t,this.dataCount=e}static RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];static getRSBlocks(t,e){const n=pe.getRsBlockTable(t,e);if(n==null)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);const i=n.length/3,r=[];for(let o=0;o<i;o++){const a=n[o*3+0],h=n[o*3+1],c=n[o*3+2];for(let u=0;u<a;u++)r.push(new pe(h,c))}return r}static getRsBlockTable(t,e){switch(e){case jn.L:return pe.RS_BLOCK_TABLE[(t-1)*4+0];case jn.M:return pe.RS_BLOCK_TABLE[(t-1)*4+1];case jn.Q:return pe.RS_BLOCK_TABLE[(t-1)*4+2];case jn.H:return pe.RS_BLOCK_TABLE[(t-1)*4+3];default:return}}}class Ic{buffer;length;constructor(){this.buffer=[],this.length=0}get(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)==1}put(t,e){for(let n=0;n<e;n++)this.putBit((t>>>e-n-1&1)==1)}getLengthInBits(){return this.length}putBit(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}}class u0{mode;data;constructor(t){this.mode=Bt.MODE_8BIT_BYTE,this.data=t}getLength(){return this.data.length}write(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data.charCodeAt(e),8)}}class Le{static PAD0=236;static PAD1=17;typeNumber;errorCorrectLevel;modules;moduleCount;dataCache;dataList;constructor(t,e){this.typeNumber=t,this.errorCorrectLevel=jn[e],this.modules=[],this.moduleCount=0,this.dataCache=null,this.dataList=[]}addData(t){const e=new u0(t);this.dataList.push(e),this.dataCache=null}isDark(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]}getModuleCount(){return this.moduleCount}make(){if(this.typeNumber<1){let t=1;for(t=1;t<40;t++){const e=pe.getRSBlocks(t,this.errorCorrectLevel),n=new Ic;let i=0;for(let r=0;r<e.length;r++)i+=e[r].dataCount;for(let r=0;r<this.dataList.length;r++){const o=this.dataList[r];n.put(o.mode,4),n.put(o.getLength(),Q.getLengthInBits(o.mode,t)),o.write(n)}if(n.getLengthInBits()<=i*8)break}this.typeNumber=t}this.makeImpl(!1,this.getBestMaskPattern())}makeImpl(t,e){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(let n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(let i=0;i<this.moduleCount;i++)this.modules[n][i]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),this.dataCache==null&&(this.dataCache=Le.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)}setupPositionProbePattern(t,e){for(let n=-1;n<=7;n++)if(!(t+n<=-1||this.moduleCount<=t+n))for(let i=-1;i<=7;i++)e+i<=-1||this.moduleCount<=e+i||(0<=n&&n<=6&&(i==0||i==6)||0<=i&&i<=6&&(n==0||n==6)||2<=n&&n<=4&&2<=i&&i<=4?this.modules[t+n][e+i]=!0:this.modules[t+n][e+i]=!1)}getBestMaskPattern(){let t=0,e=0;for(let n=0;n<8;n++){this.makeImpl(!0,n);const i=Q.getLostPoint(this);(n==0||t>i)&&(t=i,e=n)}return e}createMovieClip(t,e,n){const i=t.createEmptyMovieClip(e,n),r=1;this.make();for(let o=0;o<this.modules.length;o++){const a=o*r;for(let h=0;h<this.modules[o].length;h++){const c=h*r;this.modules[o][h]&&(i.beginFill(0,100),i.moveTo(c,a),i.lineTo(c+r,a),i.lineTo(c+r,a+r),i.lineTo(c,a+r),i.endFill())}}return i}setupTimingPattern(){for(let t=8;t<this.moduleCount-8;t++)this.modules[t][6]==null&&(this.modules[t][6]=t%2==0);for(let t=8;t<this.moduleCount-8;t++)this.modules[6][t]==null&&(this.modules[6][t]=t%2==0)}setupPositionAdjustPattern(){const t=Q.getPatternPosition(this.typeNumber);for(let e=0;e<t.length;e++)for(let n=0;n<t.length;n++){const i=t[e],r=t[n];if(this.modules[i][r]==null)for(let o=-2;o<=2;o++)for(let a=-2;a<=2;a++)o==-2||o==2||a==-2||a==2||o==0&&a==0?this.modules[i+o][r+a]=!0:this.modules[i+o][r+a]=!1}}setupTypeNumber(t){const e=Q.getBCHTypeNumber(this.typeNumber);for(let n=0;n<18;n++){const i=!t&&(e>>n&1)==1;this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=i}for(let n=0;n<18;n++){const i=!t&&(e>>n&1)==1;this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=i}}setupTypeInfo(t,e){const n=this.errorCorrectLevel<<3|e,i=Q.getBCHTypeInfo(n);for(let r=0;r<15;r++){const o=!t&&(i>>r&1)==1;r<6?this.modules[r][8]=o:r<8?this.modules[r+1][8]=o:this.modules[this.moduleCount-15+r][8]=o}for(let r=0;r<15;r++){const o=!t&&(i>>r&1)==1;r<8?this.modules[8][this.moduleCount-r-1]=o:r<9?this.modules[8][15-r-1+1]=o:this.modules[8][15-r-1]=o}this.modules[this.moduleCount-8][8]=!t}mapData(t,e){let n=-1,i=this.moduleCount-1,r=7,o=0;for(let a=this.moduleCount-1;a>0;a-=2)for(a==6&&a--;;){for(let h=0;h<2;h++)if(this.modules[i][a-h]==null){let c=!1;o<t.length&&(c=(t[o]>>>r&1)==1),Q.getMask(e,i,a-h)&&(c=!c),this.modules[i][a-h]=c,r--,r==-1&&(o++,r=7)}if(i+=n,i<0||this.moduleCount<=i){i-=n,n=-n;break}}}static createData(t,e,n){const i=pe.getRSBlocks(t,e),r=new Ic;for(let a=0;a<n.length;a++){const h=n[a];r.put(h.mode,4),r.put(h.getLength(),Q.getLengthInBits(h.mode,t)),h.write(r)}let o=0;for(let a=0;a<i.length;a++)o+=i[a].dataCount;if(r.getLengthInBits()>o*8)throw new Error("code length overflow. ("+r.getLengthInBits()+">"+o*8+")");for(r.getLengthInBits()+4<=o*8&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(!1);for(;!(r.getLengthInBits()>=o*8||(r.put(Le.PAD0,8),r.getLengthInBits()>=o*8));)r.put(Le.PAD1,8);return Le.createBytes(r,i)}static createBytes(t,e){let n=0,i=0,r=0;const o=new Array(e.length),a=new Array(e.length);for(let l=0;l<e.length;l++){const m=e[l].dataCount,f=e[l].totalCount-m;i=Math.max(i,m),r=Math.max(r,f),o[l]=new Array(m);for(let w=0;w<o[l].length;w++)o[l][w]=255&t.buffer[w+n];n+=m;const p=Q.getErrorCorrectPolynomial(f),v=new xn(o[l],p.getLength()-1).mod(p);a[l]=new Array(p.getLength()-1);for(let w=0;w<a[l].length;w++){const _=w+v.getLength()-a[l].length;a[l][w]=_>=0?v.get(_):0}}let h=0;for(let l=0;l<e.length;l++)h+=e[l].totalCount;const c=new Array(h);let u=0;for(let l=0;l<i;l++)for(let m=0;m<e.length;m++)l<o[m].length&&(c[u++]=o[m][l]);for(let l=0;l<r;l++)for(let m=0;m<e.length;m++)l<a[m].length&&(c[u++]=a[m][l]);return c}}const Dc=Math.ceil,Hn=Math.floor,Lc=Math.round;function l0(s,t){const e=ga(s),n=t?.ecc||"H",i=t?.size||256,r=-1,o=t?.padding||0,a=t?.color||"#000000",h=t?.background||"#ffffff",c=new Le(r,n);c.addData(e),c.make();const u=c.getModuleCount(),l=(i-o*2)/u,m=o,f=i-o;return kc(i,a,h,function(p,y){if(m<=p&&p<f&&m<=y&&y<f){const v=Hn((p-m)/l),w=Hn((y-m)/l);return c.isDark(w,v)?0:1}else return 1})}function f0(s,t){const e=t.x||0,n=t.y||0,i=ga(s),r=t.ctx,o=t.ecc||"H",a=typeof t.size=="number"?Hn(t.size):256,h=t.padding||0,c=-1,u=t.color||"#000000",l=t.background||"#ffffff",m=new Le(c,o);m.addData(i),m.make();const f=m.getModuleCount(),p=(a-h*2)/f;r.fillStyle=l,r.fillRect(e,n,a,a);for(let y=0;y<f;y++)for(let v=0;v<f;v++){const w=Dc((v+1)*p)-Hn(v*p),_=Dc((y+1)*p)-Hn(y*p);r.fillStyle=m.isDark(y,v)?u:l,r.fillRect(e+Lc(v*p)+h,n+Lc(y*p)+h,w,_)}}const qs=()=>{const s=navigator.userAgent.toLowerCase();let t="Unknown";return/iphone|ipad|ipod/i.test(s)?t="iOS":/android/i.test(s)?t="Android":/BlackBerry/i.test(s)?t="BlackBerry":/mac/i.test(s)?t="macOS":/win/i.test(s)?t="Windows":/linux/i.test(s)?t="Linux":/bsd/i.test(s)&&(t="BSD"),t.toLowerCase()};function d0(s=navigator.userAgent){let t="Unknown";if(/iPhone|iPad|iPod/i.test(s)){const e=s.match(/OS (\d+_\d+)/i);e&&(t=e[1].replace("_","."))}else if(/Android/i.test(s)){const e=s.match(/Android (\d+\.\d+)/i);e&&(t=e[1])}else if(/Mac OS X/i.test(s)){const e=s.match(/Mac OS X (\d+_\d+)/i);e&&(t=e[1].replace("_","."))}else if(/Windows NT/i.test(s)){const e=s.match(/Windows NT (\d+\.\d+)/i);e&&(t=e[1])}return t.toLowerCase()}function m0(s,t){const e=s.split("."),n=t.split(".");for(let i=0,r=e.length;i<r;i++){if(n.length==i)return 1;if(e[i]!=n[i])return e[i]>n[i]?1:-1}return e.length!=n.length?-1:0}function Qr(){const s=navigator.userAgent.toLowerCase();let t="Unknown";return/opr/i.test(s)||/opera/i.test(s)?t="Opera":/chrome/i.test(s)?t="Chrome":/firefox/i.test(s)?t="Firefox":/safari/i.test(s)?t="Safari":/edge/i.test(s)?t="Edge":/msie|trident/i.test(s)?t="IE":/MicroMessenger/i.test(s)?t="Wechat":/alipay/i.test(s)&&(t="Ali"),t.toLowerCase()}const p0=()=>{const s=navigator.userAgent;let t="Unknown";if(/Chrome/.test(s)){const e=s.match(/Chrome\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Firefox/.test(s)){const e=s.match(/Firefox\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Safari/.test(s)){const e=s.match(/Version\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Edge/.test(s)){const e=s.match(/Edge\/(\d+\.\d+)/);e&&(t=e[1])}else if(/MSIE|Trident/.test(s)){const e=s.match(/(?:MSIE|rv:)(\d+\.\d+)/);e&&(t=e[1])}return t};function g0(){return(navigator.browserLanguage||navigator.language).toLowerCase()}function y0(){return Intl.DateTimeFormat().resolvedOptions().timeZone.toLowerCase()}function Kr(){return qs()==="ios"}function Rc(){return qs()==="macos"}function w0(){return Kr()|Rc()}function Oc(){return qs()==="android"}function x0(){return Kr()||Oc()}function zc(){const s=window.navigator.userAgent,t=s.indexOf("MSIE ");if(t>0)return parseInt(s.substring(t+5,s.indexOf(".",t)),10);if(s.indexOf("Trident/")>0){const i=s.indexOf("rv:");return parseInt(s.substring(i+3,s.indexOf(".",i)),10)}const n=s.indexOf("Edge/");return n>0?parseInt(s.substring(n+5,s.indexOf(".",n)),10):-1}const b0=zc()!==-1,v0=document.documentMode?document.documentMode===9:!1,_0=document.documentMode?document.documentMode===10:!1,S0=document.documentMode?document.documentMode===11:!1;function Nc(){return Qr()==="wechat"}function Bc(){return Qr()==="ali"}function C0(){return Nc()&&navigator.userAgent.match(/miniprogram/i)||window.__wxjs_environment==="miniprogram"}function T0(){return Bc()&&navigator.userAgent.match(/miniprogram/i)}const E0=typeof document<"u",Fc=typeof window<"u",P0=typeof history<"u",M0=Fc&&window.File&&window.FileReader&&window.FileList&&window.Blob,Yc=(()=>!!(wt.Worker&&wt.Blob&&wt.Promise&&wt.OffscreenCanvas&&wt.OffscreenCanvasRenderingContext2D&&wt.HTMLCanvasElement&&wt.HTMLCanvasElement.prototype.transferControlToOffscreen&&wt.URL&&wt.URL.createObjectURL))(),A0=typeof Path2D=="function"&&typeof DOMMatrix=="function",$c=function(){if(!wt.OffscreenCanvas)return!1;const s=new OffscreenCanvas(1,1),t=s.getContext("2d");t.fillRect(0,0,1,1);const e=s.transferToImageBitmap();try{t.createPattern(e,"no-repeat")}catch{return!1}return!0}(),k0=typeof HTMLElement=="object"?function(t){return t instanceof HTMLElement}:function(t){return t&&typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string"},I0="webkit moz ms o".split(" ");function D0(){return"ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0}const js=new Gn,ct=new zt;function Wn(s,t){switch(t.constructor){case Float32Array:return s;case Uint32Array:return s/4294967295;case Uint16Array:return s/65535;case Uint8Array:return s/255;case Int32Array:return Math.max(s/2147483647,-1);case Int16Array:return Math.max(s/32767,-1);case Int8Array:return Math.max(s/127,-1);default:throw new Error("Invalid component type.")}}function Dt(s,t){switch(t.constructor){case Float32Array:return s;case Uint32Array:return Math.round(s*4294967295);case Uint16Array:return Math.round(s*65535);case Uint8Array:return Math.round(s*255);case Int32Array:return Math.round(s*2147483647);case Int16Array:return Math.round(s*32767);case Int8Array:return Math.round(s*127);default:throw new Error("Invalid component type.")}}class ge{array;itemSize;count;normalized;updateRanges;version;constructor(t,e,n=!1){if(Array.isArray(t))throw new TypeError("BufferAttribute: array should be a Typed Array.");this.array=t,this.itemSize=e,this.count=t.length/e,this.normalized=n,this.updateRanges=[],this.version=0}_onChangeCallback(){}set needsUpdate(t){t===!0&&this.version++}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.array=Nl(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this}copyAt(t,e,n){t*=this.itemSize,n*=e.itemSize;for(let i=0,r=this.itemSize;i<r;i++)this.array[t+i]=e.array[n+i];return this}copyArray(t){return this.array.set(t),this}applyMatrix3(t){if(this.itemSize===2)for(let e=0,n=this.count;e<n;e++)js.fromBufferAttribute(this,e),js.applyMatrix3(t),this.setXY(e,js.x,js.y);else if(this.itemSize===3)for(let e=0,n=this.count;e<n;e++)ct.fromBufferAttribute(this,e),ct.applyMatrix3(t),this.setXYZ(e,ct.x,ct.y,ct.z);return this}applyMatrix4(t){for(let e=0,n=this.count;e<n;e++)ct.fromBufferAttribute(this,e),ct.applyMatrix4(t),this.setXYZ(e,ct.x,ct.y,ct.z);return this}applyNormalMatrix(t){for(let e=0,n=this.count;e<n;e++)ct.fromBufferAttribute(this,e),ct.applyNormalMatrix(t),this.setXYZ(e,ct.x,ct.y,ct.z);return this}transformDirection(t){for(let e=0,n=this.count;e<n;e++)ct.fromBufferAttribute(this,e),ct.transformDirection(t),this.setXYZ(e,ct.x,ct.y,ct.z);return this}set(t,e=0){return this.array.set(t,e),this}getComponent(t,e){let n=this.array[t*this.itemSize+e];return this.normalized&&(n=Wn(n,this.array)),n}setComponent(t,e,n){return this.normalized&&(n=Dt(n,this.array)),this.array[t*this.itemSize+e]=n,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=Wn(e,this.array)),e}setX(t,e){return this.normalized&&(e=Dt(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=Wn(e,this.array)),e}setY(t,e){return this.normalized&&(e=Dt(e,this.array)),this.array[t*this.itemSize+1]=e,this}getZ(t){let e=this.array[t*this.itemSize+2];return this.normalized&&(e=Wn(e,this.array)),e}setZ(t,e){return this.normalized&&(e=Dt(e,this.array)),this.array[t*this.itemSize+2]=e,this}getW(t){let e=this.array[t*this.itemSize+3];return this.normalized&&(e=Wn(e,this.array)),e}setW(t,e){return this.normalized&&(e=Dt(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,n){return t*=this.itemSize,this.normalized&&(e=Dt(e,this.array),n=Dt(n,this.array)),this.array[t+0]=e,this.array[t+1]=n,this}setXYZ(t,e,n,i){return t*=this.itemSize,this.normalized&&(e=Dt(e,this.array),n=Dt(n,this.array),i=Dt(i,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this}setXYZW(t,e,n,i,r){return t*=this.itemSize,this.normalized&&(e=Dt(e,this.array),n=Dt(n,this.array),i=Dt(i,this.array),r=Dt(r,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this.array[t+3]=r,this}onChange(t){return this._onChangeCallback=t,this}clone(){return wa(this,this.array,this.itemSize,this.normalized).copy(this)}toJSON(){return{itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized}}}class L0 extends ge{constructor(t,e,n=!1){super(new Int8Array(t),e,n)}}class R0 extends ge{constructor(t,e,n=!1){super(new Uint8Array(t),e,n)}}class O0 extends ge{constructor(t,e,n=!1){super(new Uint8ClampedArray(t),e,n)}}class z0 extends ge{constructor(t,e,n=!1){super(new Int16Array(t),e,n)}}class N0 extends ge{constructor(t,e,n=!1){super(new Uint16Array(t),e,n)}}class B0 extends ge{constructor(t,e,n=!1){super(new Int32Array(t),e,n)}}class F0 extends ge{constructor(t,e,n=!1){super(new Uint32Array(t),e,n)}}class Y0 extends ge{constructor(t,e,n=!1){super(new Float32Array(t),e,n)}}const Xc={map:new Map,transform:function(s){if($c)return s;if(this.map.has(s))return this.map.get(s);const t=new OffscreenCanvas(s.width,s.height);return t.getContext("2d")?.drawImage(s,0,0),this.map.set(s,t),t},clear:function(){this.map.clear()}};function $0(s,t,e){const n=new OffscreenCanvas(s,t),i=n.getContext("2d");if(i)return e(i),n.transferToImageBitmap()}function X0(s,t,e){const n=s.createPattern(Xc.transform(t),"no-repeat");if(n){const i=Gr(e);n.setTransform(i),s.fillStyle=n}}function Uc(s){return window.URL.createObjectURL(s)}function U0(s){return window.URL.revokeObjectURL(s)}function Vc(s){let t=!1,e;function n(){document.readyState==="loading"||t||(s(),e?.(),t=!0)}try{e=W(document,"DOMContentLoaded",n)}catch{e=W(window,"load",n)}return n(),()=>{t||e()}}function Gc(s){return W(window,"beforeunload",t=>{s(t)})}async function V0(s,t=6e4){return new Promise((e,n)=>{const i=document.createElement("script");i.type="text/javascript",i.async=!1,i.onload=o=>{clearTimeout(r),e(o),i.onerror=i.onload=null},i.onerror=o=>{clearTimeout(r),n(o)},i.src=s;const r=setTimeout(()=>{n("Timeout!")},t);document.body.appendChild(i)})}function Hs(s,t){const e=document.createElement("a");e.style.visibility="hidden",e.download=t,typeof s=="string"?e.href=s:e.href=window.URL.createObjectURL(s),e.click()}async function G0(s,t=document.getElementsByTagName("head")[0],e=6e4){return new Promise((n,i)=>{const r=document.createElement("link");r.setAttribute("type","text/css"),r.setAttribute("rel","stylesheet"),r.onload=a=>{clearTimeout(o),n(a),r.onerror=r.onload=null},r.onerror=a=>{clearTimeout(o),i(a)},r.setAttribute("href",s);const o=setTimeout(()=>{i("Timeout!")},e);t.appendChild(r)})}function q0(){return new Promise(s=>{const t=Array.from(document.querySelectorAll("link[rel=stylesheet]"));let e=document.styleSheets.length||0;const n=()=>e>=t.length?(s(),!0):!1;n()||t.forEach(i=>{i.onload=()=>{e+=1,n()}})})}const qc=new cn;async function jc(s,t=6e4){return new Promise((e,n)=>{const i=typeof s=="string"?s:Uc(s),r=qc.get(i);if(r)return e(r);const o=setTimeout(()=>{n("Timeout!")},t),a=document.createElement("img");a.onload=()=>{clearTimeout(o),a.onerror=a.onload=null;const h=a.naturalWidth||a.width,c=a.naturalHeight||a.height,u={width:h,height:c,aspectRatio:h/c,element:a,imageData:Tc(a)};qc.set(i,u),e(u)},a.onerror=h=>{clearTimeout(o),n(h)},a.src=i})}async function Hc(s=$t.text,t=["*"]){const n=(await ir(t))[0],i=await Ln(n,s);return{type:n.type,name:n.name,size:n.size,data:i}}async function j0(s=["image/*"]){const e=(await ir(s))[0];if(!e.type.match(/image\/*/))return new Error("Not Image Type!");const n=await Ln(e,$t.arraybuffer),i=Ei(n),r=await jc(i);return{type:e.type,name:e.name,size:e.size,data:n,width:r.width,height:r.height,aspectRatio:r.aspectRatio,imageData:r.imageData}}function H0(){return window.getSelection()?.toString()||""}function W0(s){document.getElementsByTagName("title")[0].innerText=s,document.title=s}function J0(s=200){"vibrate"in navigator?window.navigator.vibrate(s):console.error("Your device is not support vibrate on this browser.")}async function Z0(s){if(navigator.clipboard)return await navigator.clipboard.writeText(s);{const t=document.createElement("textarea");return t.value=s,t.style.opacity="0",t.style.position="fixed",t.style.top="0",t.style.left="0",t.focus(),t.select(),document.execCommand("copy")}}function Q0(s,t){window.scrollTo(s,t)}function K0(){let s=Ta,t=Ta;return"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual",s=Gc(()=>{window.history.scrollRestoration="auto"}),t=Vc(()=>{window.history.scrollRestoration="manual"})),()=>{s(),t()}}function ty(s){return/(html|body)/i.test(s.tagName)||s===document.documentElement}const ey=s=>s===document.activeElement&&(s.type||s.href),to=function(){return parseFloat(getComputedStyle(document.documentElement).fontSize)};function ny(s){return s*to()}function sy(s){return s.parentElement?parseFloat(getComputedStyle(s.parentElement).fontSize):to()}const iy=s=>{let t=s;for(;t&&t.nodeType!==1&&t.parentElement;)t=t.parentElement;return t},ry=s=>s.parentElement,eo=(s,t=[])=>!s||s.parentElement===null&&s.parentNode===null?t:eo(s.parentElement,t.concat([s]));function oy(s){const t=eo(s);for(let e=0,n=t.length;e<n;e++)if(/(auto|scroll)/.test(qe(t[e],"overflow")+qe(t[e],"overflow-y")+qe(t[e],"overflow-x")))return t[e];return document.scrollingElement||document.documentElement}const ay=(s,t)=>s.contains?s!=t&&s.contains(t):!!(s.compareDocumentPosition(t)&16),hy=s=>Array.prototype.slice.call(s.parentElement?.children).filter(t=>t!==s),cy=s=>s.nextElementSibling,uy=s=>s.previousElementSibling,ly=(s,t)=>s.closest(t),fy=s=>s.shadowRoot,Jn=s=>s.tagName==="INPUT"||s instanceof HTMLInputElement,no=s=>s.tagName==="SELECT"||s instanceof HTMLSelectElement,dy=s=>s.tagName==="TEXTAREA"||s instanceof HTMLTextAreaElement,so=s=>Jn(s)&&s.getAttribute("type")==="checkbox",io=s=>Jn(s)&&s.getAttribute("type")==="radio",my=s=>Jn(s)&&s.getAttribute("type")==="text",py=s=>Jn(s)&&s.getAttribute("type")==="number";function gy(s,t){if(no(s)){const e=s.options;for(let n=0,i=e.length;n<i;n++)e[n].selected=e[n].value==t}}function yy(s,t){if(io(s)){const e=document.getElementsByName(s.name);for(let n=0,i=e.length;n<i;n++){const r=e[n];r.checked=r.value==t}}}function wy(s,t){so(s)&&(s.checked=t)}const Zn=(s,t,e="append")=>{typeof t=="string"?s[e](Kc(t)):s[e](t)},Wc=function(s,t){if(typeof t=="string"){s.innerHTML=t;const e=eu(s);e!=s&&(s=e)}else Zn(t,"replaceWith")},Jc=function(s){Wc(s,"")},xy=(s,t)=>{s.textContent=t},by=s=>{if(s instanceof SVGElement)return"";let t=s.innerText;if(!t){const e=s.querySelector("slot")?.assignedNodes()||[];let n=0;for(;!t&&n<=e.length-1;)"innerText"in e[n]&&(t=e[n].innerText),n++}return t},vy=s=>s.remove();function _y(s,t){qe(s,"display")=="none"&&t===void 0||t===!0?Zc(s):Qc(s)}function Zc(s){qr(s,"display",s instanceof HTMLTableRowElement?"table-row":s instanceof HTMLTableCellElement?"table-cell":"block")}function Qc(s){qr(s,"display","none")}function ro(s,t,e="toggle"){const n=t.split(/[,\s]+/);if(s.classList)n.forEach(i=>{const r=i.trim();r!==""&&s.classList[e](r)});else{const i=s.className.split(/ +/);let r=!1;n.forEach(o=>{const a=o.trim();if(a!==""){const h=i.indexOf(a);switch(e){case"add":h===-1&&(i.push(a),r=!0);break;case"remove":h!==-1&&(i.splice(h,1),r=!0);break;case"toggle":h===-1?i.push(a):i.splice(h,1),r=!0;break}}}),r&&je(s,"class",i.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}}function Sy(s,t){ro(s,t,"add")}function Cy(s,t){ro(s,t,"remove")}function Ty(s,t){return new RegExp("(?:^|\\s+)"+t+"(?:\\s+|$)").test(s.className)||!1}function Kc(s,t=!1){const e=document.createElement("template");return e.innerHTML=s,t&&e.content.childNodes.forEach(n=>{const i=eu(n);i!=n&&e.content.replaceChild(i,n)}),e.content}function tu(s){return document.createElement.call(document,s)}function Ey(s){return document.createElementNS("http://www.w3.org/1999/xhtml",s)}function Py(s){return document.createTextNode.call(document,s)}function eu(s){return s.tagName=="SCRIPT"&&(s=nu(s)),s.querySelectorAll&&s.querySelectorAll("script").forEach(t=>{t.parentNode?.replaceChild(nu(t),t)}),s}function nu(s){const t=s.ownerDocument.createElement("script");t.text=s.text;const e=s.attributes;for(let n=0,i=e.length;n<i;n++)t.setAttribute(e[n].name,e[n].value);return t}function My(s,t="http://test.com/localstorage.html"){const e=document.createElement("iframe");e.src=t,document.body.append(e),setTimeout(function(){e.contentWindow?.postMessage(s,t)},4e3),setTimeout(function(){e.remove()},6e3)}function Ay(s){const t=new Proxy(window,{get(e,n,i){if(typeof n=="string"&&["open","location","document"].includes(n))throw new Error(`禁止访问 key: ${n}`);return n==="window"?t:Reflect.get(e,n,i)},set(e,n,i,r){return Reflect.set(e,n,i,r)}});new Function("window",`with(window) { ${s} }`)(t,null)}function oo(){return{x:0,y:0,isDown:!1}}function He(){const s=oo(),t=oo();return{start:s,current:t,setStart:function(e,n){s.x=e.x,s.y=e.y,s.isDown=typeof n=="boolean"?n:typeof e.isDown=="boolean"?e.isDown:!1,this.setCurrent(e,n)},setCurrent:(e,n)=>{t.x=e.x,t.y=e.y,t.isDown=typeof n=="boolean"?n:typeof e.isDown=="boolean"?e.isDown:!1}}}function Ws(s=document.documentElement,t=!1){return X(s,"mousemove",t)}function su(s=document.documentElement,t=!1){return X(s,"mousedown",t)}function iu(s=document.documentElement,t=!1){return X(s,"mouseup",t)}function ky(s=document.documentElement,t=!1){return X(s,"mouseover",t)}function Iy(s=document.documentElement,t=!1){return X(s,"mouseout",t)}function Dy(s=document.documentElement,t=!1){return X(s,"mouseenter",t)}function Ly(s=document.documentElement,t=!1){return X(s,"mouseleave",t)}function Ry(s=document.documentElement,t=!1){return X(s,"click",t)}function Oy(s=document.documentElement,t=!1){return X(s,"dblclick",t)}function zy(s=document.documentElement,t=!1){return X(s,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",t)}function Ny(s=document.documentElement,t=!1){return X(s,"contextmenu",t)}function ru(s=document.documentElement,t=!1){return X(s,"touchmove",t)}function ou(s=document.documentElement,t=!1){return X(s,"touchstart",t)}function au(s=document.documentElement,t=!1){return X(s,"touchend",t)}function hu(s=document.documentElement,t=!1){return X(s,"touchcancel",t)}function ao(s=document.documentElement,t=!1){return X(s,"pointermove",t)}function ho(s=document.documentElement,t=!1){return X(s,"pointerdown",t)}function co(s=document.documentElement,t=!1){return X(s,"pointerup",t)}function uo(s=document.documentElement,t=!1){return X(s,"pointercancel",t)}function By(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("pan",e)},e=>{t.off("pan",e)})}function Fy(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("panmove",e)},e=>{t.off("panmove",e)})}function Yy(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("panstart",e)},e=>{t.off("panstart",e)})}function $y(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("panend",e)},e=>{t.off("panend",e)})}function Xy(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("pancancel",e)},e=>{t.off("pancancel",e)})}function Uy(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("panleft",e)},e=>{t.off("panleft",e)})}function Vy(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("panright",e)},e=>{t.off("panright",e)})}function Gy(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("panup",e)},e=>{t.off("panup",e)})}function qy(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("pandown",e)},e=>{t.off("pandown",e)})}function jy(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("pinch",e)},e=>{t.off("pinch",e)})}function Hy(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("pinchin",e)},e=>{t.off("pinchin",e)})}function Wy(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("pinchout",e)},e=>{t.off("pinchout",e)})}function Jy(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("press",e)},e=>{t.off("press",e)})}function Zy(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("rotate",e)},e=>{t.off("rotate",e)})}function Qy(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("swipe",e)},e=>{t.off("swipe",e)})}function Ky(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("swipeleft",e)},e=>{t.off("swipeleft",e)})}function t1(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("swiperight",e)},e=>{t.off("swiperight",e)})}function e1(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("swipeup",e)},e=>{t.off("swipeup",e)})}function n1(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("swipedown",e)},e=>{t.off("swipedown",e)})}function s1(s=document.documentElement){const t=new tt(s);return nt(e=>{t.on("tap",e)},e=>{t.off("tap",e)})}function i1(s=document.documentElement){const t=new tt(document.documentElement);return nt(e=>{const n=i=>{!i.target||s==i.target||s.contains(i.target)||e(i)};return t.on("tap",n),n},(e,n)=>{t.off("tap",n)})}function r1(s=document.documentElement,t=!1){return X(s,"transitionstart",t)}function o1(s=document.documentElement,t=!1){return X(s,"transitionend",t)}function a1(s=document.documentElement,t=!1){return X(s,"animationstart",t)}function h1(s=document.documentElement,t=!1){return X(s,"animationend",t)}function cu(s=document.documentElement,t=!1){return X(s,"drag",t)}function uu(s=document.documentElement,t=!1){return X(s,"dragstart",t)}function lu(s=document.documentElement,t=!1){return X(s,"dragend",t)}function fu(s=document.documentElement,t=!1){return X(s,"drop",t)}function du(s=document.documentElement,t=!1){return X(s,"dragenter",t)}function mu(s=document.documentElement,t=!1){return X(s,"dragleave",t)}function pu(s=document.documentElement,t=!1){return X(s,"dragover",t)}function gu(s=document.documentElement,t=!1){return X(s,"keydown",t)}function yu(s=document.documentElement,t=!1){return X(s,"keyup",t)}function c1(s=document.documentElement,t=!1){return X(s,"keypress",t)}function u1(s=document.documentElement,t){const e=t?.useMousePoint||He();return Ws(s).pipe(rt(n=>(e.setCurrent(ft(n,s)),e)))}function l1(s=document.documentElement,t){const e=t?.useMousePoint||He();return Ws(s).pipe(Dp(su(s).pipe(Ue(n=>{e.setStart(ft(n,s),!0),t?.start?.(n,e)})),()=>iu(s).pipe(Ue(n=>{e.setCurrent(ft(n,s),!1),t?.end?.(n,e)}))),Ap(),rt(n=>(e.setCurrent(ft(n,s),!0),e)))}function f1(s=document.documentElement,t){const e=t?.useMousePoint||He();return ou(s).pipe(Ue(n=>{const i=n.changedTouches[0];e.setStart(ft(i,s),!0),t?.start?.(i,e)}),zs(()=>ru(s).pipe(br(xr(au(s),hu(s)).pipe(Ue(n=>{const i=n.changedTouches[0];e.setCurrent(ft(i,s),!1),t?.end?.(i,e)}))))),rt(n=>{const i=n.changedTouches[0];return e.setCurrent(ft(i,s),!0),e}))}function Js(s=document.documentElement,t){const e=t?.useMousePoint||He();return ho(s).pipe(Ue(n=>{e.setStart(ft(n,s),!0),t?.start?.(n,e)}),zs(()=>ao(s).pipe(br(xr(co(s),uo(s)).pipe(Ue(n=>{e.setCurrent(ft(n,s),!1),t?.end?.(n,e)}))))),rt(n=>(e.setCurrent(ft(n,s),!0),e)))}function wu(s=document.documentElement,t){const e=t?.useMousePoint||He();return Cp(Ws(s),ho(s)).pipe(Qh(n=>n instanceof PointerEvent?(e.setStart(ft(n,s),!0),t?.start?.(n,e),ao(s).pipe(br(xr(co(s),uo(s)).pipe(Ue(i=>{e.setCurrent(ft(i,s),!1),t?.end?.(i,e)}))))):n instanceof MouseEvent?Km(n):Rh),rt(n=>(e.setCurrent(ft(n,s),n instanceof PointerEvent),e)))}function d1(s){return new et(t=>Js(s,{start:()=>{t.next(0)},end:(n,i)=>{t.next(i.current.x-i.start.x)}}).subscribe(n=>{t.next(n.current.y-n.start.y)}).unsubscribe).pipe(Ce())}function m1(s,t){wn(s,"draggable","true");const e=uu(s,!0).subscribe(r=>{Ee(r),Kh(r);const o=r.dataTransfer;o&&(o.effectAllowed="move",o.setData("text/plain","some-data")),t?.onStart?.(r)}),n=cu(s).subscribe(r=>{Ee(r),t?.onDrag?.(r)}),i=lu(s).subscribe(r=>{Ee(r),t?.onEnd?.(r)});return()=>{e.unsubscribe(),n.unsubscribe(),i.unsubscribe()}}function p1(s,t){const e=du(s).subscribe(o=>{Ee(o),t?.onEnter?.(o)}),n=pu(s).subscribe(o=>{Ee(o);const a=o.dataTransfer;a&&(a.dropEffect="move"),t?.onOver?.(o)}),i=mu(s).subscribe(o=>{Ee(o),t?.onLeave?.(o)}),r=fu(s).subscribe(o=>{Ee(o);const a=o.dataTransfer;if(!a){t?.onDrop?.(o,[]);return}t?.onDrop?.(o,[...a.files])});return()=>{e.unsubscribe(),n.unsubscribe(),i.unsubscribe(),r.unsubscribe()}}function xu(s=10){return X(window,"scroll",!0).pipe(Ip(s))}function g1(){return X(document,"visibilitychange",!0).pipe(rt(()=>document.visibilityState==="visible"),Ce())}function y1(){return{screenWidth:window.screen.width,screenHeight:window.screen.height,screenX:window.screenX,screenY:window.screenY}}function Qn(){const s=document.documentElement;return{clientWidth:s.clientWidth,clientHeight:s.clientHeight,clientTop:s.clientTop,clientLeft:s.clientLeft,scrollWidth:s.scrollWidth,scrollHeight:s.scrollHeight,scrollTop:s.scrollTop,scrollLeft:s.scrollLeft,offsetWidth:s.offsetWidth,offsetHeight:s.offsetHeight,offsetTop:s.offsetTop,offsetLeft:s.offsetLeft,offsetParent:s.offsetParent}}function w1(){const s=document.body;return{clientWidth:s.clientWidth,clientHeight:s.clientHeight,clientTop:s.clientTop,clientLeft:s.clientLeft,scrollWidth:s.scrollWidth,scrollHeight:s.scrollHeight,scrollTop:s.scrollTop,scrollLeft:s.scrollLeft,offsetWidth:s.offsetWidth,offsetHeight:s.offsetHeight,offsetTop:s.offsetTop,offsetLeft:s.offsetLeft,offsetParent:s.offsetParent}}function bu(){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 x1(){const{scrollWidth:s,scrollHeight:t}=Qn();return{width:s,height:t}}function lo(s){const{top:t,left:e,width:n,height:i}=s.getBoundingClientRect(),{scrollLeft:r,scrollTop:o}=Qn();return{x:e+r,y:t+o,width:n,height:i}}function b1(s){let t=s,e=0,n=0;for(;t!==null;)e+=t.offsetLeft,n+=t.offsetTop,t.offsetParent instanceof HTMLElement?t=t.offsetParent:t=null;return{x:e,y:n,width:s.offsetWidth,height:s.offsetHeight}}function vu(s){return s.getBoundingClientRect()}function v1(s){const t=s.getBoundingClientRect();return{x:s.offsetLeft,y:s.offsetTop,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}function _1(){const{clientHeight:s,scrollTop:t,scrollHeight:e}=Qn(),n=e-s;return n<=0?0:t/n*100}function S1(s){if("center"in s){const t=s.center,e=vu(s.target);return{x:t.x-e.x,y:t.y-e.y}}return{x:s.clientX,y:s.clientY}}function fo(s){if("center"in s)return s.center;if(typeof s.pageX=="number"&&typeof s.pageY=="number")return{x:s.pageX,y:s.pageY};const{scrollLeft:t,scrollTop:e}=Qn();return{x:s.clientX+t,y:s.clientY+e}}function ft(s,t){const e={x:0,y:0};if(t){const n=fo(s),i=lo(t);e.x=N(n.x-i.x,0,i.width),e.y=N(n.y-i.y,0,i.height)}else{let n=0,i=0;if("currentTarget"in s&&s.currentTarget&&s.target&&s.currentTarget!=s.target){const r=s.currentTarget.getBoundingClientRect(),o=s.target.getBoundingClientRect();n=o.left-r.left,i=o.top-r.top}if("offsetX"in s)e.x=s.offsetX+n,e.y=s.offsetY+i;else{const r=fo(s),o=lo(s.target);e.x=N(r.x-o.x+n,0,o.width),e.y=N(r.y-o.y+i,0,o.height)}}return e}function C1(s){if(document.implementation.hasFeature("MouseEvents","2.0"))return s.button;switch(s.button){case 0:case 1:case 3:case 5:case 7:return 0;case 2:case 6:return 2;case 4:return 1}}const T1={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 E1(s){if(s.key)return s.key;if(s.keyCode)return s.keyCode;if(s.which)return s.which}function _u(s,t){const e=t.ctrl||!1,n=t.shift||!1,i=t.alt||!1;return(e===s.metaKey||e===s.ctrlKey)&&n===s.shiftKey&&i===s.altKey&&t.keys.map(r=>r.toLowerCase()).includes(s.key.toLowerCase())}function Su(s){return gu(s.target||document||window).pipe(Zh(t=>_u(t,s)),rt(t=>{t.stopPropagation(),t.preventDefault()}))}function P1(s){return yu(s.target||document||window).pipe(Zh(t=>_u(t,s)),rt(t=>{t.stopPropagation(),t.preventDefault()}))}function Cu(s={keys:["o"]},t=$t.text){return Su(s).pipe(zs(async()=>await Hc(t)))}async function M1(s={keys:["o"]},t=$t.text){return ep(Cu(s,t))}async function Tu(s,t){return new Promise(e=>{const n=new ResizeObserver(i=>{const r=s.getBoundingClientRect();t(r),e(()=>{n.unobserve(s)})});n.observe(s)})}function mo(s=document.documentElement,t){return new et(e=>{const n=s.getBoundingClientRect();let i=n.x,r=n.y,o=n.width,a=n.height;e.next(n);const h=new ResizeObserver(c=>{const u=s.getBoundingClientRect();(i!=u.x||r!=u.y||o!=u.width||a!=u.height)&&(i=u.x,r=u.y,o=u.width,a=u.height,e.next(u))});return h.observe(s,t),()=>{h.unobserve(s),h.disconnect()}})}function A1(){return X(window,"orientationchange"in window?"orientationchange":"resize").pipe(rt(s=>({width:s.target.innerWidth,height:s.target.innerHeight})),Te({width:window.innerWidth,height:window.innerHeight}))}function k1(){const s={x:0,y:0,dx:0,dy:0,dStartX:0,dStartY:0,isDown:!1},t={x:0,y:0,dx:0,dy:0,dStartX:0,dStartY:0,isDown:!1};return{mousePoint:t,setStartMousePoint:function(e,n){s.x=e.x,s.y=e.y,s.isDown=typeof n=="boolean"?n:!1,this.setCurrentMousePoint(e,n)},setCurrentMousePoint:(e,n)=>{const i=t.x,r=t.y;t.x=e.x,t.y=e.y,t.dx=t.x-i,t.dy=t.y-r,t.dStartX=t.x-s.x,t.dStartY=t.y-s.y,t.isDown=typeof n=="boolean"?n:!1}}}function I1(s=document.documentElement){const t=new ys,e=new tt(s);let n=[];const i=k1(),r=i.mousePoint,o=k=>{t.emit("mouseDown",k)},a=k=>{t.emit("mouseUp",k)},h=k=>{r.isDown||i.setCurrentMousePoint(ft(k,s)),t.emit("mouseMove",k)},c=k=>{t.emit("mouseOver",k)},u=k=>{t.emit("mouseOut",k)},l=k=>{t.emit("mouseEnter",k)},m=k=>{t.emit("mouseLeave",k)},f=k=>{t.emit("mouseClick",k)},p=k=>{t.emit("mouseDoubleClick",k)},y=k=>{t.emit("mouseWheel",k)},v=k=>{t.emit("mouseContextMenu",k)},w=k=>{t.emit("touchStart",k)},_=k=>{t.emit("touchEnd",k)},x=k=>{t.emit("touchCancel",k)},b=k=>{const at=k.changedTouches[0];r.isDown||i.setCurrentMousePoint(ft(at,s)),t.emit("touchMove",k)},E=k=>{t.emit("pointerDown",k)},C=k=>{t.emit("pointerUp",k)},L=k=>{t.emit("pointerCancel",k)},B=k=>{t.emit("pointerMove",k)},F=k=>{t.emit("pan",k)},U=k=>{t.emit("panStart",k)},G=k=>{t.emit("panMove",k)},J=k=>{t.emit("panEnd",k)},st=k=>{t.emit("panCancel",k)},K=k=>{t.emit("panLeft",k)},Kt=k=>{t.emit("panRight",k)},Yt=k=>{t.emit("panUp",k)},Ut=k=>{t.emit("panDown",k)},te=k=>{t.emit("pinch",k)},R=k=>{t.emit("pinchin",k)},D=k=>{t.emit("pinchout",k)},$=k=>{t.emit("press",k)},H=k=>{t.emit("rotate",k)},At=k=>{t.emit("swipe",k)},ee=k=>{t.emit("swipeLeft",k)},ai=k=>{t.emit("swipeRight",k)},hi=k=>{t.emit("swipeUp",k)},mt=k=>{t.emit("swipeDown",k)},ae=k=>{t.emit("tap",k)},it=k=>{!k.target||s==k.target||s.contains(k.target)||t.emit("tapOutSide",k)},Ct=k=>{t.emit("transitionstart",k)},_n=k=>{t.emit("transitionend",k)},en=k=>{t.emit("animationstart",k)},nn=k=>{t.emit("animationend",k)};let Oe={...s.getBoundingClientRect(),width:s.offsetWidth,height:s.offsetHeight};return{el:s,get rect(){return Oe},mousePoint:r,eb:t,start:async function(){n.push(W(s,"mousedown",o)),n.push(W(s,"mouseup",a)),n.push(W(s,"mousemove",h)),n.push(W(s,"mouseover",c)),n.push(W(s,"mouseout",u)),n.push(W(s,"mouseenter",l)),n.push(W(s,"mouseleave",m)),n.push(W(s,"click",f)),n.push(W(s,"dblclick",p)),n.push(W(s,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",y)),n.push(W(s,"contextmenu",v)),n.push(W(s,"touchstart",w)),n.push(W(s,"touchend",_)),n.push(W(s,"touchcancel",x)),n.push(W(s,"touchmove",b)),n.push(W(s,"pointerdown",E)),n.push(W(s,"pointerup",C)),n.push(W(s,"pointercancel",L)),n.push(W(s,"pointermove",B)),e.on("pan",F),e.on("panstart",U),e.on("panmove",G),e.on("panend",J),e.on("pancancel",st),e.on("panleft",K),e.on("panright",Kt),e.on("panup",Yt),e.on("pandown",Ut),e.on("pinch",te),e.on("pinchin",R),e.on("pinchout",D),e.on("press",$),e.on("rotate",H),e.on("swipe",At),e.on("swipeleft",ee),e.on("swiperight",ai),e.on("swipeup",hi),e.on("swipedown",mt),e.on("tap",ae),n.push(W(document,"pointerdown",it)),n.push(W(s,"transitionstart",Ct)),n.push(W(s,"transitionend",_n)),n.push(W(s,"animationstart",en)),n.push(W(s,"animationend",nn));const k=await Tu(s,at=>{Oe=at,t.emit("resize",at)});n.push(k),n.push(Eu(this,{start:at=>{i.setStartMousePoint(ft(at,s),!0)},move:at=>{i.setCurrentMousePoint(ft(at,s))},end:at=>{i.setCurrentMousePoint(ft(at,s),!1)}}))},end:()=>{t.removeAllListeners(),n.forEach(k=>k()),n=[],e.off("pan",F),e.off("panstart",U),e.off("panmove",G),e.off("panend",J),e.off("pancancel",st),e.off("panleft",K),e.off("panright",Kt),e.off("panup",Yt),e.off("pandown",Ut),e.off("pinch",te),e.off("pinchin",R),e.off("pinchout",D),e.off("press",$),e.off("rotate",H),e.off("swipe",At),e.off("swipeleft",ee),e.off("swiperight",ai),e.off("swipeup",hi),e.off("swipedown",mt),e.off("tap",ae)}}}function Eu(s,t){return Pu(s,t)}function Pu(s,t){const e=s.eb,n=o=>{e.on("pointerMove",r),e.on("pointerUp",i),e.on("pointerCancel",i),t?.start?.(o)},i=o=>{e.off("pointerMove",r),e.off("pointerUp",i),e.off("pointerCancel",i),t?.end?.(o)},r=o=>{t?.move?.(o)};return e.on("pointerDown",n),()=>e.off("pointerDown",n)}function D1(s,t){const e=s.eb,n=o=>{document.addEventListener("mousemove",r,!1),document.addEventListener("mouseup",i,!1),t?.start?.(o)},i=o=>{document.removeEventListener("mousemove",r,!1),document.removeEventListener("mouseup",i,!1),t?.end?.(o)},r=o=>{t?.move?.(o)};return e.on("mouseDown",n),()=>e.off("mouseDown",n)}function L1(s,t){const e=s.eb,n=o=>{e.on("touchMove",r),e.on("touchEnd",i),e.on("touchCancel",i);const a=o.changedTouches[0];t?.start?.(a)},i=o=>{e.off("touchMove",r),e.off("touchEnd",i),e.off("touchCancel",i);const a=o.changedTouches[0];t?.end?.(a)},r=o=>{const a=o.changedTouches[0];t?.move?.(a)};return e.on("touchStart",n),()=>e.off("touchStart",n)}let po=class{x;y;toX;toY;constructor(t){this.x=t?.x||0,this.y=t?.y||0,this.toX=t?.toX||0,this.toY=t?.toY||0}toSVGPathData(){return[["L",this.toX,this.toY]]}toCanvasContext(t){t.lineTo(this.toX,this.toY)}getBoundingClientRect(){const t=Jt(this.x,this.y,this.toX,this.toY);if(t===0){const e=Math.min(this.x,this.toX),n=Math.min(this.y,this.toY),i=Math.max(this.x,this.toX),r=Math.max(this.y,this.toY);return{x:e,y:n,width:i-e,height:r-n}}else{const e=Math.sin(t),n=Math.cos(t),i=n*this.x-e*this.y,r=n*this.toX-e*this.toY,o=n*this.y+e*this.x,a=n*this.toY+e*this.toX;return{x:Math.min(i,r),y:Math.min(o,a),width:Math.max(i,r)-Math.min(i,r),height:Math.max(o,a)-Math.min(o,a)}}}interpolate(t){return{x:this.x+t*(this.toX-this.x),y:this.y+t*(this.toY-this.y)}}intersection(t){const e=this.x,n=this.y,i=t.toX,r=t.toY,o=this.toX-e,a=t.x-i;if(!o&&!a)return null;const h=(this.toY-n)/o,c=(t.y-r)/a;if(o){if(!a)return{x:i,y:h*(i-e)+n}}else return{x:e,y:c*(e-i)+r};const u=(-c*i+r+h*e-n)/(h-c),l=h*(u-e)+n;return isNaN(u)||isNaN(l)?null:{x:u,y:l}}};class go extends po{rx;ry;xAxisRotate;largeArcFlag;sweepFlag;constructor(t){super(t),this.rx=t.rx,this.ry=t.ry,this.xAxisRotate=typeof t?.xAxisRotate=="number"?t?.xAxisRotate:0,this.largeArcFlag=typeof t?.largeArcFlag=="number"?t?.largeArcFlag:1,this.sweepFlag=typeof t?.sweepFlag=="number"?t?.sweepFlag:1,this.toX=t.toX,this.toY=t.toY}toSVGPathData(){return[["A",this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag,this.toX,this.toY]]}toCanvasContext(t){const[e,n,i,r,o,a,h]=this.convert(this.x,this.y,this.toX,this.toY,this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag);t.ellipse(e,n,i,r,o,a,h,!this.sweepFlag)}convert(t,e,n,i,r,o,a,h,c){const u=a/180*Math.PI,l=(t-n)/2,m=(e-i)/2,f=Math.cos(u)*l+Math.sin(u)*m,p=-Math.sin(u)*l+Math.cos(u)*m,y=f*f/(r*r)+p*p/(o*o);if(y>1){const G=Math.sqrt(y);throw r=G*r,o=G*o,new Error(`Radii are too small to build an arc. Correcting them to ${r}/${o}.`)}const v=Math.sqrt((r*r*o*o-r*r*p*p-o*o*f*f)/(r*r*p*p+o*o*f*f)),w=h!=c?1:-1,_=w*v*r*p/o,x=w*v*-o*f/r,b=(t+n)/2,E=(e+i)/2,C=Math.cos(u)*_-Math.sin(u)*x+b,L=Math.sin(u)*_+Math.cos(u)*x+E,B=(G,J,st,K)=>(G*K>=J*st?1:-1)*Math.acos((G*st+J*K)/(Math.sqrt(G*G+J*J)*Math.sqrt(st*st+K*K))),F=B(1,0,t-C,e-L)-u,U=B(t-C,e-L,n-C,i-L);return[C,L,r,o,u,F,F+U]}}class R1 extends po{cx;cy;isLineThrough;constructor(t){super(t),this.cx=t.cx,this.cy=t.cy,this.isLineThrough=typeof t.isLineThrough=="boolean"?t.isLineThrough:!1}toSVGPathData(){if(this.isLineThrough){const t=this.cx*2-(this.x+this.toX)/2,e=this.cy*2-(this.y+this.toY)/2;return[["Q",t,e,this.toX,this.toY]]}else return[["Q",this.cx,this.cy,this.toX,this.toY]]}toCanvasContext(t){if(this.isLineThrough){const e=this.cx*2-(this.x+this.toX)/2,n=this.cy*2-(this.y+this.toY)/2;t.quadraticCurveTo(e,n,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}getBoundingClientRect(){const t=[this.x,this.toX],e=[this.y,this.toY];let n,i,r,o;for(let c=0;c<2;++c)n=c==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,i=c==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,r=c==0?this.x:this.y,Math.abs(n)>1e-12&&(o=-i/(2*n),0<o&&o<1&&[t,e][c].push(n*o*o+i*o+r));const a={x:Math.min(0,...t),y:Math.min(0,...e)},h={x:Math.max(0,...t),y:Math.max(0,...e)};return{x:a.x,y:a.y,width:h.x-a.x,height:h.y-a.y}}interpolate(t){return{x:(1-t)*(1-t)*this.x+2*(1-t)*t*this.cx+t*t*this.toX,y:(1-t)*(1-t)*this.y+2*(1-t)*t*this.cy+t*t*this.toY}}}const O1=R1;class gt extends po{c1x;c1y;c2x;c2y;constructor(t){super(t),this.c1x=t.c1x,this.c1y=t.c1y,this.c2x=t.c2x,this.c2y=t.c2y}clone(){return new gt({x:this.x,y:this.y,c1x:this.c1x,c1y:this.c1y,c2x:this.c2x,c2y:this.c2y,toX:this.toX,toY:this.toY})}toSVGPathData(){return[["C",this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY]]}toCanvasContext(t){t.bezierCurveTo(this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY)}getBoundingClientRect(){let t=this.c2x-2*this.c1x+this.x-(this.toX-2*this.c2x+this.c1x),e=2*(this.c1x-this.x)-2*(this.c2x-this.c1x),n=this.x-this.c1x,i=(-e+Math.sqrt(e*e-4*t*n))/2/t,r=(-e-Math.sqrt(e*e-4*t*n))/2/t;const o=[this.y,this.toY],a=[this.x,this.toX];let h;const c=[];Math.abs(i)>1e12&&(i=.5),Math.abs(r)>1e12&&(r=.5),i>=0&&i<=1&&(h=this.interpolate(i),a.push(h.x),o.push(h.y),c.push({X:h.x,Y:h.y})),r>=0&&r<=1&&(h=this.interpolate(r),a.push(h.x),o.push(h.y),c.push({X:h.x,Y:h.y})),t=this.c2y-2*this.c1y+this.y-(this.toY-2*this.c2y+this.c1y),e=2*(this.c1y-this.y)-2*(this.c2y-this.c1y),n=this.y-this.c1y,i=(-e+Math.sqrt(e*e-4*t*n))/2/t,r=(-e-Math.sqrt(e*e-4*t*n))/2/t,Math.abs(i)>1e12&&(i=.5),Math.abs(r)>1e12&&(r=.5),i>=0&&i<=1&&(h=this.interpolate(i),a.push(h.x),o.push(h.y),c.push({X:h.x,Y:h.y})),r>=0&&r<=1&&(h=this.interpolate(r),a.push(h.x),o.push(h.y),c.push({X:h.x,Y:h.y}));const u=[],l=c.length;for(let p=0;p<l;p++){for(let y=p+1;y<l;y++)c[p].X===c[y].X&&c[p].Y===c[y].Y&&(y=++p);u.push({X:c[p].X,Y:c[p].Y})}const m={x:Math.min(...a),y:Math.min(...o)},f={x:Math.max(...a),y:Math.max(...o)};return{x:m.x,y:m.y,width:f.x-m.x,height:f.y-m.y,dots:u}}interpolate(t){return{x:Math.pow(1-t,3)*this.x+3*Math.pow(1-t,2)*t*this.c1x+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2x+Math.pow(t,3)*this.toX,y:Math.pow(1-t,3)*this.y+3*Math.pow(1-t,2)*t*this.c1y+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2y+Math.pow(t,3)*this.toY}}static base3(t,e,n,i,r){const o=-3*e+9*n-9*i+3*r,a=t*o+6*e-12*n+6*i;return t*a-3*e+3*n}static bezlen(t,e,n,i,r,o,a,h,c=1){c=Math.max(0,Math.min(c,1));const u=c/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],m=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let f=0;for(let p=0;p<12;p++){const y=u*l[p]+u,v=gt.base3(y,t,n,r,a),w=gt.base3(y,e,i,o,h);f+=m[p]*Math.sqrt(v*v+w*w)}return u*f}length(t=1){return gt.bezlen(this.x,this.y,this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY,t)}getTatLen(t){const e=this.x,n=this.y,i=this.c1x,r=this.c1y,o=this.c2x,a=this.c2y,h=this.toX,c=this.toY;if(t<0||gt.bezlen(e,n,i,r,o,a,h,c)<t)return 0;const u=1;let l=u/2,m=u-l,f=gt.bezlen(e,n,i,r,o,a,h,c,m);for(;Math.abs(f-t)>.01;)l/=2,m+=(f<t?1:-1)*l,f=gt.bezlen(e,n,i,r,o,a,h,c,m);return m}getPointAtSegmentLength(t){const e=this.getTatLen(t),n=1-e,i=Math.pow(n,3),r=Math.pow(n,2),o=e*e,a=o*e,h=i*this.x+r*3*e*this.c1x+n*3*e*e*this.c2x+a*this.toX,c=i*this.y+r*3*e*this.c1y+n*3*e*e*this.c2y+a*this.toY,u=this.x+2*e*(this.c1x-this.x)+o*(this.c2x-2*this.c1x+this.x),l=this.y+2*e*(this.c1y-this.y)+o*(this.c2y-2*this.c1y+this.y),m=this.c1x+2*e*(this.c2x-this.c1x)+o*(this.toX-2*this.c2x+this.c1x),f=this.c1y+2*e*(this.c2y-this.c1y)+o*(this.toY-2*this.c2y+this.c1y),p=n*this.x+e*this.c1x,y=n*this.y+e*this.c1y,v=n*this.c2x+e*this.toX,w=n*this.c2y+e*this.toY,_=90-Math.atan2(u-m,l-f)*180/Math.PI;return{x:h,y:c,m:{x:u,y:l},n:{x:m,y:f},start:{x:p,y},end:{x:v,y:w},alpha:_}}}const Kn=Math.PI*2;function Mu(s,t,e,n){const i=s*n-t*e<0?-1:1;let r=s*e+t*n;return r>1&&(r=1),r<-1&&(r=-1),i*Math.acos(r)}function z1(s,t,e,n,i,r,o,a,h,c){const u=c*(s-e)/2+h*(t-n)/2,l=-h*(s-e)/2+c*(t-n)/2,m=o*o,f=a*a,p=u*u,y=l*l;let v=m*f-m*y-f*p;v<0&&(v=0),v/=m*y+f*p,v=Math.sqrt(v)*(i===r?-1:1);const w=v*o/a*l,_=v*-a/o*u,x=c*w-h*_+(s+e)/2,b=h*w+c*_+(t+n)/2,E=(u-w)/o,C=(l-_)/a,L=(-u-w)/o,B=(-l-_)/a,F=Mu(1,0,E,C);let U=Mu(E,C,L,B);return r===0&&U>0&&(U-=Kn),r===1&&U<0&&(U+=Kn),[x,b,F,U]}function N1(s,t){const e=1.3333333333333333*Math.tan(t/4),n=Math.cos(s),i=Math.sin(s),r=Math.cos(s+t),o=Math.sin(s+t);return[n,i,n-i*e,i+n*e,r+o*e,o-r*e,r,o]}function Au(s,t,e,n,i,r,o,a,h){const c=Math.sin(h*Kn/360),u=Math.cos(h*Kn/360),l=u*(s-e)/2+c*(t-n)/2,m=-c*(s-e)/2+u*(t-n)/2;if(l===0&&m===0)return[];if(o===0||a===0)return[];o=Math.abs(o),a=Math.abs(a);const f=l*l/(o*o)+m*m/(a*a);f>1&&(o*=Math.sqrt(f),a*=Math.sqrt(f));const p=z1(s,t,e,n,i,r,o,a,c,u),y=[];let v=p[2],w=p[3];const _=Math.max(Math.ceil(Math.abs(w)/(Kn/4)),1);w/=_;for(let x=0;x<_;x++)y.push(N1(v,w)),v+=w;return y.map(x=>{for(let b=0;b<x.length;b+=2){let E=x[b+0],C=x[b+1];E*=o,C*=a;const L=u*E-c*C,B=c*E+u*C;x[b+0]=L+p[0],x[b+1]=B+p[1]}return x})}function yo(s,t,e,n,i,r){return[s/3+2/3*e,t/3+2/3*n,i/3+2/3*e,r/3+2/3*n,i,r]}function ts(s,t,e,n){return[s,t,e,n,e,n]}const Zs={a:7,c:6,s:4,q:4,t:2,m:2,l:2,h:1,v:1,z:0};function ku(s="path",t){const e=document.createElementNS.call(document,"http://www.w3.org/2000/svg",s);return t&&je(e,t),e}function B1(s,t){return ku("path",{d:s,id:t||on()})}function F1(s,t="shape"){return Hs(sr(s),`${t}.svg`)}function Iu(s){return typeof s!="string"?!1:(s=s.trim(),/^[mlhvzaqtcs]\s*[-+.0-9][^mlhvzaqtcs]+/i.test(s)&&/[\dz]$/i.test(s))}function Y1(s){return s.map(t=>{if(!t[0])return"";switch(t[0].toLowerCase()){case"a":return`${t[0]} ${t[1]},${t[2]} ${t[3]} ${t[4]},${t[5]} ${t[6]},${t[7]}`;case"c":return`${t[0]} ${t[1]},${t[2]} ${t[3]},${t[4]} ${t[5]},${t[6]}`;case"s":case"q":return`${t[0]} ${t[1]},${t[2]} ${t[3]},${t[4]}`;default:return t[0]+" "+t.slice(1).join(",")}}).join(" ")}function Du(s){const t=[];return Iu(s)&&s.replace(/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi,(e,n,i)=>{let r=n.toLowerCase();const o=Ti(i);for(r=="m"&&o.length>Zs[r]&&(t.push([n,...o.splice(0,Zs[r])]),r="l",n=n=="m"?"l":"L");o.length;){if(o.length<Zs[r])throw new Error(`parseSVGPath substring:{ ${e} } command:{ ${n} } args:{ ${o} }`);t.push([n,...o.splice(0,Zs[r])])}return r=="z"&&t.push([n]),""}),t}function Lu(s){let t=0,e=0,n=0,i=0;return s.map(function(r){const o=r[0],a=o.toUpperCase();if(o!=a)switch(r[0]=a,o){case"a":r[6]+=n,r[7]+=i;break;case"v":r[1]+=i;break;case"h":r[1]+=n;break;default:for(let h=1;h<r.length;)r[h++]+=n,r[h++]+=i}switch(a){case"Z":n=t,i=e;break;case"H":n=r[1];break;case"V":i=r[1];break;case"M":n=t=r[1],i=e=r[2];break;default:n=r[r.length-2],i=r[r.length-1]}return r})}function $1(s){const t=[];let e=0,n=0,i=0,r=0,o=0,a=0,h=0,c=0,u;for(let l=0,m=s.length;l<m;l++){let f=s[l];const p=f[0];switch(p){case"M":e=f[1],n=f[2];break;case"A":const y=Au(i,r,f[6],f[7],f[4],f[5],f[1],f[2],f[3]);if(!y.length)continue;y.forEach((_,x)=>{const[b,E,C,L,B,F,U,G]=_;f=["C",C,L,B,F,U,G],x<y.length-1&&t.push(f)});break;case"S":let v=i,w=r;(u=="C"||u=="S")&&(v+=v-h,w+=w-c),f=["C",v,w,f[1],f[2],f[3],f[4]];break;case"T":u=="Q"||u=="T"?(o=i*2-o,a=r*2-a):(o=i,a=r),f=["C",...yo(i,r,o,a,f[1],f[2])];break;case"Q":o=f[1],a=f[2],f=["C",...yo(i,r,f[1],f[2],f[3],f[4])];break;case"L":f=["C",...ts(i,r,f[1],f[2])];break;case"H":f=["C",...ts(i,r,f[1],r)];break;case"V":f=["C",...ts(i,r,i,f[1])];break;case"Z":f=["C",...ts(i,r,e,n)];break}u=p,i=f[f.length-2],r=f[f.length-1],f.length>4?(h=f[f.length-4],c=f[f.length-3]):(h=i,c=r),t.push(f)}return t}class es{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"),n=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)",n.append(i),e.width="5",e.style.cssText="position: absolute; visibility: hidden;",document.documentElement.append(e),e.contentDocument?.body.append(n),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(()=>{es.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 wo extends ys{source;raw="";mode="text";tagname="";nodename="";textchunk="";entity="";quote="";attrs={};constructor(t){super(),this.source=t}parse(){const t=Ll(this.source);if(t===0){this.emit("finish");return}let e,n,i=ma(this.source,0);for(let r=1;r<t;r++)e=n,n=i,i=ma(this.source,r),this.raw+=n,n&&this.step(n,i,e);i&&this.step(i,void 0,n),this.emit("finish")}step(t,e,n){t==`
|
|
26
26
|
`&&this.emit("newline"),this.act(t,e,n)}act(t,e,n){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":ue("whitespace",t)?(this.textchunk+=Ru(this.entity),this.mode="text"):t==";"?(this.textchunk+=Ru(this.entity+t),this.mode="text"):this.entity+=t;break;case"special":if(n=="!"&&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(n=="]"&&t=="]"&&e==">"){this.mode="cdata end",this.textchunk=this.textchunk.slice(0,-1);break}t=="eof"&&(this.mode="cdata end",this.act(t,e,n)),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=="-"&&n=="-"&&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(!ue("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,n)}break;case"close tag name start":ue("whitespace",t)||(this.mode="close tag name",this.tagname="",this.nodename="",this.act(t,e,n));break;case"close tag name":if(ue("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(ue("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":ue("whitespace",t)||(this.mode="attr",this.nodename="",this.act(t,e,n));break;case"attr":if(ue("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(!ue("whitespace",t)){if(this.mode="attr value",this.quote="",t=="'"||t=='"'){this.quote=t;return}this.act(t,e,n)}break;case"attr value":if(ue("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&&n!="\\"&&(this.mode="attr start");break;default:this.attrs[this.nodename]+=t;break}break}}}function Ru(s){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 s.charAt(0)=="#"?s.charAt(1).toLowerCase()=="x"?e=parseInt(s.substring(2),16):e=parseInt(s.substring(1),10):e=t[s],e?String.fromCharCode(e):"&"+s}var Ou=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function xo(s,t={}){var e=1,n=1;function i(R){var D=R.match(/\n/g);D&&(e+=D.length);var $=R.lastIndexOf(`
|
|
27
|
-
`);n=~$?R.length-$:n+R.length}function r(){var R={line:e,column:n};return function(D){return D.position=new o(R),p(),D}}function o(R){this.start=R,this.end={line:e,column:n},this.source=t.source}o.prototype.content=s;var a=[];function h(R){var D=new Error(t.source+":"+e+":"+n+": "+R);if(D.reason=R,D.filename=t.source,D.line=e,D.column=n,D.source=s,t.silent)a.push(D);else throw D}function c(){var R=m();return{type:"stylesheet",stylesheet:{source:t.source,rules:R,parsingErrors:a}}}function u(){return f(/^{\s*/)}function l(){return f(/^}/)}function m(){var R,D=[];for(p(),y(D);s.length&&s.charAt(0)!="}"&&(R=Ut()||te());)R!==!1&&(D.push(R),y(D));return D}function f(R){var D=R.exec(s);if(D){var $=D[0];return i($),s=s.slice($.length),D}}function p(){f(/^\s*/)}function y(R){var D;for(R=R||[];D=v();)D!==!1&&R.push(D);return R}function v(){var R=r();if(!(s.charAt(0)!="/"||s.charAt(1)!="*")){for(var D=2;s.charAt(D)!=""&&(s.charAt(D)!="*"||s.charAt(D+1)!="/");)++D;if(D+=2,s.charAt(D-1)==="")return h("End of comment missing");var $=s.slice(2,D-2);return n+=2,i($),s=s.slice(D),n+=2,R({type:"comment",comment:$})}}function w(){var R=f(/^([^{]+)/);if(R)return ye(R[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(D){return D.replace(/,/g,"")}).split(/\s*(?![^(]*\)),\s*/).map(function(D){return D.replace(/\u200C/g,",")})}function _(){var R=r(),D=f(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(D){if(D=ye(D[0]),!f(/^:\s*/))return h("property missing ':'");var $=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/),H=R({type:"declaration",property:D.replace(Ou,""),value:$?ye($[0]).replace(Ou,""):""});return f(/^[;\s]*/),H}}function x(){var R=[];if(!u())return h("missing '{'");y(R);for(var D;D=_();)D!==!1&&(R.push(D),y(R));return l()?R:h("missing '}'")}function b(){for(var R,D=[],$=r();R=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)D.push(R[1]),f(/^,\s*/);if(D.length)return $({type:"keyframe",values:D,declarations:x()})}function E(){var R=r(),D=f(/^@([-\w]+)?keyframes\s*/);if(D){var $=D[1];if(D=f(/^([-\w]+)\s*/),!D)return h("@keyframes missing name");var H=D[1];if(!u())return h("@keyframes missing '{'");for(var At,ee=y();At=b();)ee.push(At),ee=ee.concat(y());return l()?R({type:"keyframes",name:H,vendor:$,keyframes:ee}):h("@keyframes missing '}'")}}function C(){var R=r(),D=f(/^@supports *([^{]+)/);if(D){var $=ye(D[1]);if(!u())return h("@supports missing '{'");var H=y().concat(m());return l()?R({type:"supports",supports:$,rules:H}):h("@supports missing '}'")}}function L(){var R=r(),D=f(/^@host\s*/);if(D){if(!u())return h("@host missing '{'");var $=y().concat(m());return l()?R({type:"host",rules:$}):h("@host missing '}'")}}function B(){var R=r(),D=f(/^@media *([^{]+)/);if(D){var $=ye(D[1]);if(!u())return h("@media missing '{'");var H=y().concat(m());return l()?R({type:"media",media:$,rules:H}):h("@media missing '}'")}}function F(){var R=r(),D=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(D)return R({type:"custom-media",name:ye(D[1]),media:ye(D[2])})}function U(){var R=r(),D=f(/^@page */);if(D){var $=w()||[];if(!u())return h("@page missing '{'");for(var H=y(),At;At=_();)H.push(At),H=H.concat(y());return l()?R({type:"page",selectors:$,declarations:H}):h("@page missing '}'")}}function G(){var R=r(),D=f(/^@([-\w]+)?document *([^{]+)/);if(D){var $=ye(D[1]),H=ye(D[2]);if(!u())return h("@document missing '{'");var At=y().concat(m());return l()?R({type:"document",document:H,vendor:$,rules:At}):h("@document missing '}'")}}function J(){var R=r(),D=f(/^@font-face\s*/);if(D){if(!u())return h("@font-face missing '{'");for(var $=y(),H;H=_();)$.push(H),$=$.concat(y());return l()?R({type:"font-face",declarations:$}):h("@font-face missing '}'")}}var st=Yt("import"),K=Yt("charset"),Kt=Yt("namespace");function Yt(R){var D=new RegExp("^@"+R+"\\s*([^;]+);");return function(){var $=r(),H=f(D);if(H){var At={type:R};return At[R]=H[1].trim(),$(At)}}}function Ut(){if(s[0]=="@")return E()||B()||F()||C()||st()||K()||Kt()||G()||U()||L()||J()}function te(){var R=r(),D=w();return D?(y(),R({type:"rule",selectors:D,declarations:x()})):h("selector missing")}return bo(c())}function ye(s){return s?s.replace(/^\s+|\s+$/g,""):""}function bo(s,t){var e=s&&typeof s.type=="string",n=e?s:t;for(var i in s){var r=s[i];Array.isArray(r)?r.forEach(function(o){bo(o,n)}):r&&typeof r=="object"&&bo(r,n)}return e&&Object.defineProperty(s,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),s}let X1=class extends wo{currentItem={};items=[];groups=[];globalStyles={};grad={};idtops={};text="";constructor(t){super(t),this.on("tag",(e,n)=>{switch(this.text="",this.currentItem={type:e},e){case"g":this.groups.push(this.currentItem);break}this.processAttrs(e,n)}),this.on("text",e=>{if(this.currentItem.type=="style"){try{const n=xo(e);for(const i of n.stylesheet.rules)for(const r of i.declarations)for(const o of i.selectors)this.globalStyles[o]=this.globalStyles[o]||[],this.globalStyles[o].push(`${r.property}:${r.value}`)}catch{console.error("CAN'T parse css text: "+e)}return}this.text+=e}),this.on("/tag",(e,n)=>{let i=this.groups.length;for(;i--;)if(this.groups[i]!=this.currentItem){let r="",o="";for(const a in this.groups[i])a=="transform"?r=this.groups[i].transform:a=="class"&&this.globalStyles["."+this.groups[i][a]]?o=this.globalStyles["."+this.groups[i][a]].join(";")+";"+o:a=="id"&&this.globalStyles["#"+this.groups[i][a]]?o=this.globalStyles["#"+this.groups[i][a]].join(";")+";"+o:typeof this.currentItem[a]>"u"&&(this.currentItem[a]=this.groups[i][a]);typeof this.currentItem.transform>"u"?this.currentItem.transform=r:this.currentItem.transform+=" "+r,typeof this.currentItem.style>"u"?this.currentItem.style=o:this.currentItem.style=o+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),_o(this.currentItem.style,this.currentItem,So)}switch(this.processAttrs(e,n),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 n=[],i;switch(t){case"svg":let r="",o="";if(e.width&&e.height)r=e.width,o=e.height;else if(e.viewBox){const a=e.viewBox.split(/\s+/gi);a.length==4&&(r=String(parseFloat(a[2])-parseFloat(a[0])),o=String(parseFloat(a[3])-parseFloat(a[1])))}r&&o&&this.items.push({type:"viewbox",width:r,height:o});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&&_o(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+vo(parseFloat(e.x1),parseFloat(e.y1),parseFloat(e.x2),parseFloat(e.y2),parseFloat(e.x1)+100,parseFloat(e.y1))).toFixed(2),n=[this.grad.angle];for(let a=0,h=this.grad.stops.length;a<h;a++)i=this.grad.stops[a],a&&a!=h-1?n.push(i.color+":"+i.offset):n.push(i.color);this.idtops[this.grad.id]=n.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break;case"radialGradient":n=[];for(let a=0,h=this.grad.stops.length;a<h;a++)i=this.grad.stops[a],a&&a!=h-1?n.push(i.color+":"+i.offset):n.push(i.color);this.idtops[this.grad.id]=n.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break}for(const r in e){const o=e[r];if(So.includes(r)&&(this.currentItem[r]=o),r==="id"&&(this.currentItem.type==="linearGradient"&&(this.grad={id:r,stops:[]}),this.currentItem.type==="radialGradient"&&(this.grad={id:r,stops:[]})),r==="style"&&_o(o,this.currentItem,So),r==="transform"&&(this.currentItem.transform=o+(this.currentItem.transform||" ")),r==="fill"){const a=o.match(/url\(#([^)]+)\)/);if(a){const h=a[1];this.currentItem.fillid=h,this.idtops[h]&&(this.currentItem.fill=this.idtops[h])}}r==="points"&&this.currentItem.type=="polygon"&&(this.currentItem.path="M"+o+"z"),r==="d"&&this.currentItem.type=="path"&&(this.currentItem.path=o),r==="xlink:href"&&this.currentItem.type=="image"&&(this.currentItem.src=o)}}addToItems(){this.items.push(this.currentItem)}};function vo(s,t,e,n,i,r){if(typeof i>"u"||typeof r>"u"){const o=s-e,a=t-n;return!o&&!a?0:(180+Math.atan2(-a,-o)*180/Math.PI+360)%360}else return vo(s,t,i,r)-vo(e,n,i,r)}function _o(s,t,e){const n=(s+"").split(";"),i=/^\s+|\s+$/g;for(let r=0,o=n.length;r<o;r++){const a=n[r].split(":"),h=a[0].replace(i,"").replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()});(!e||e.includes(h))&&(t[h]=a[1].replace(i,""))}}const So=["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 St{startPathX=0;startPathY=0;prevPathX=0;prevPathY=0;normalizedLines=[];constructor(t){const e=typeof t=="string"?Du(t):t||[],n=$1(Lu(e));let i=!1;for(let r=0,o=n.length;r<o;r++){const a=n[r];a[0]=="M"?(i||(i=!0,this.startPathX=a[1],this.startPathY=a[2]),this.prevPathX=a[1],this.prevPathY=a[2]):this._appendLine(new gt({c1x:a[1],c1y:a[2],c2x:a[3],c2y:a[4],toX:a[5],toY:a[6]}))}}_appendLine(t){if(t instanceof go){Au(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(c=>{const[u,l,m,f,p,y,v,w]=c;this.normalizedLines.push(new gt({x:this.prevPathX,y:this.prevPathY,c1x:m,c1y:f,c2x:p,c2y:y,toX:v,toY:w})),this.prevPathX=v,this.prevPathY=w});return}if(t instanceof gt){this.normalizedLines.push(t.clone()),this.prevPathX=t.toX,this.prevPathY=t.toY;return}let e,n,i,r,o,a;t instanceof O1?[e,n,i,r,o,a]=yo(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,n,i,r,o,a]=es(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new gt({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:n,c2x:i,c2y:r,toX:o,toY:a})),this.prevPathX=o,this.prevPathY=a}static fromPolymorphPoints(t){const e=new St;e.prevPathX=e.startPathX=t[0]||0,e.prevPathY=e.startPathY=t[1]||0;for(let n=2,i=t.length;n+5<i;n+=6)e._appendLine(new gt({c1x:t[n],c1y:t[n+1],c2x:t[n+2],c2y:t[n+3],toX:t[n+4],toY:t[n+5]}));return e}static fromLines(t){const e=new St;e.prevPathX=e.startPathX=t[0].x||0,e.prevPathY=e.startPathY=t[0].y||0;for(let n=0,i=t.length;n<i;n++)e._appendLine(t[n]);return e}clone(){return St.fromLines(this.normalizedLines)}toSVGPathData(){const t=[];t.push(["M",this.startPathX,this.startPathY]);for(let e=0,n=this.normalizedLines.length;e<n;e++)t.push(...this.normalizedLines[e].toSVGPathData());return t}toSVGPathD(){return Y1(this.toSVGPathData())}toCanvasContext(t){t.beginPath(),t.moveTo(this.startPathX,this.startPathY),this.normalizedLines.forEach(e=>{e.toCanvasContext(t)})}getBoundingClientRect(t=2){const e=[],n=[];if(this.normalizedLines.forEach(h=>{const c=h.getBoundingClientRect();e.push(c.x,c.x+c.width),n.push(c.y,c.y+c.height)}),e.length==0||n.length==0)return{x:0,y:0,width:0,height:0,center:{x:0,y:0}};const i=Math.min(...e),r=Math.min(...n),o=Math.max(...e),a=Math.max(...n);return{x:Z(i,t),y:Z(r,t),width:Z(o-i,t),height:Z(a-r,t)}}getBoundingClientRectCenter(t=2){const e=this.getBoundingClientRect(t);return{x:Z(e.x+e.width*.5,t),y:Z(e.y+e.height*.5,t)}}transform(t,e,n,i,r,o,a){const h=new _t;return h.translate(t,e),h.rotate(r,n,i),h.scale(o,a,n,i),h.isIdentity?this.clone():St.fromLines(this.normalizedLines.map(c=>{let u=c.x,l=c.y,m=c.c1x,f=c.c1y,p=c.c2x,y=c.c2y,v=c.toX,w=c.toY;return{x:u,y:l}=h.transformPoint({x:u,y:l}),{x:m,y:f}=h.transformPoint({x:m,y:f}),{x:p,y}=h.transformPoint({x:p,y}),{x:v,y:w}=h.transformPoint({x:v,y:w}),new gt({x:u,y:l,c1x:m,c1y:f,c2x:p,c2y:y,toX:v,toY:w})}))}getTotalLength(){return this.normalizedLines.reduce((t,e)=>t+=e.length(),0)}getPointAtLength(t){let e=0,n=0;const i=this.normalizedLines.length;for(let r=0;r<i;r++){const o=this.normalizedLines[r];if(n=o.length(),e+n>=t)return o.getPointAtSegmentLength(t-e);e+=n}return this.normalizedLines[i-1].getPointAtSegmentLength(n)}interpolate(t){const e=this.normalizedLines.length;if(e===0)return{x:0,y:0};if(e===1)return this.normalizedLines[0].interpolate(t);{let n=t*e,i=this.normalizedLines[0];if(n--,n>1)for(let r=1;r<e&&(i=this.normalizedLines[r],n>1);r++)n-=1;return i.interpolate(n)}}getSubPathD(t,e){if(this.getTotalLength()-e<1e-6)return this.getSubPathDAtLength(this,t);{const n=this.getSubPathDAtLength(this,e,1);return t?this.getSubPathDAtLength(n,t):n}}getSubPathDAtLength(t,e,n){let i=null,r=0;const o=new St;o.prevPathX=o.startPathX=t.startPathX,o.prevPathY=o.startPathY=t.startPathY;for(let a=0,h=this.normalizedLines.length;a<h;a++){const c=this.normalizedLines[a],u=c.length();if(r+u>e&&!i){const l=c.getPointAtSegmentLength(e-r);if(o._appendLine(new gt({c1x:l.start.x,c1y:l.start.y,c2x:l.m.x,c2y:l.m.y,toX:l.x,toY:l.y})),n)return o;i=o,o._appendLine(new gt({c1x:l.n.x,c1y:l.n.y,c2x:l.end.x,c2y:l.end.y,toX:c.x,toY:c.y})),r+=u;continue}r+=u,o._appendLine(c)}return o}closestPoint(t,e){const n=this.getTotalLength();let i={x:t,y:e},r=0,o=1/0,a=8;for(let c=0;c<=n;c+=a){const u=this.getPointAtLength(c),l=(t-u.x)*(t-u.x)+(e-u.y)*(e-u.y);l<o&&(i=u,r=c,o=l)}for(a/=2;a>.5;){const c=r-a,u=this.getPointAtLength(c),l=(t-u.x)*(t-u.x)+(e-u.y)*(e-u.y),m=r+a,f=this.getPointAtLength(m),p=(t-f.x)*(t-f.x)+(e-f.y)*(e-f.y);c>=0&&l<o?(i=u,r=c,o=l):m<=n&&p<o?(i=f,r=m,o=p):a/=2}const h=this.getPointAtLength(r+(r===n?-.1:.1));return{point:i,rotation:r>=n?Jt(h.x,h.y,i.x,i.y):Jt(i.x,i.y,h.x,h.y),distance:Math.sqrt(o)}}getPolymorphPoints(){return[this.startPathX,this.startPathY].concat(this.normalizedLines.reduce((t,e)=>t.concat([e.c1x,e.c1y,e.c2x,e.c2y,e.toX,e.toY]),[]))}getPolymorphPointsPerimeter(){const t=this.getPolymorphPoints(),e=t.length;let n=t[e-2],i=t[e-1],r=0;for(let o=0;o<e;o+=6)r+=Me(t[o],t[o+1],n,i),n=t[o],i=t[o+1];return Math.floor(r)}getExpendedPolymorphPointsPathD(t){const e=this.getPolymorphPoints(),n=e.length;let i=t-n;const r=Math.ceil(t/n),o=[];o.push(["M",e[0],e[1]]);let a=2;for(;a+5<=n-1;){const h=e[a++],c=e[a++],u=e[a++],l=e[a++],m=e[a++],f=e[a++];o.push(["C",h,c,u,l,m,f]);let p=0;for(;p<r&&i>0;)o.push(["C",m,f,m,f,m,f]),i-=6,p++}return new St(o)}static getInterpolator(t,e){return n=>Math.abs(n-0)<Number.EPSILON?new St(t.toSVGPathD()):Math.abs(n-1)<Number.EPSILON?new St(e.toSVGPathD()):St.fromPolymorphPoints(ef(t.getPolymorphPoints(),e.getPolymorphPoints(),n))}}const zu=U1("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);function U1(s,t=10){const e={},n=s.split(",");for(let i=0;i<n.length;i+=2){const r="&"+n[i+1]+";",o=parseInt(n[i],t);e[r]="&#"+o+";"}return e["\\xa0"]=" ",e}function Mt(s,t){const e=Object.keys(t);for(let n=0;n<e.length;n++)s=s.replace(new RegExp("{"+e[n]+"}","gi"),""+t[e[n]]);return s}function Qs(s){let t,e;if(!s)throw new Error("cannot create a random attribute name for an undefined object");const n="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=n[Math.floor(Math.random()*n.length)];while(s[t]);return t}function V1(s){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[s]||t.start}function G1(s){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[s]||t.alphabetic}const ss={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"},lineDash:{svgAttr:"stroke-dasharray",canvas:[],svg:null,apply:"stroke"},lineDashOffset:{svgAttr:"stroke-dashoffset",canvas:0,svg:0,apply:"stroke"}};class Co{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}addColorStop(t,e){const n=this.__ctx.__createElement("stop");if(n.setAttribute("offset",""+t),e.indexOf("rgba")!==-1){const r=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(e);r&&(n.setAttribute("stop-color",Mt("rgb({r},{g},{b})",{r:r[1],g:r[2],b:r[3]})),n.setAttribute("stop-opacity",r[4]))}else n.setAttribute("stop-color",e);this.__root.appendChild(n)}}class Nu{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}}class Ks{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:n=500}){t?(this.__canvas=t,this.__ctx=t.getContext("2d")):(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d")),this.width=e||t?.width||0,this.height=n||t?.height||0,this.__setDefaultStyles(),this.__styleStack=[this.__getStyleState()],this.__groupStack=[],this.__rootSVG=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__rootSVG.setAttribute("version","1.1"),this.__rootSVG.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__rootSVG.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__rootSVG.setAttribute("width",""+this.width),this.__rootSVG.setAttribute("height",""+this.height),this.__ids={},this.__SVGdefs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__rootSVG.appendChild(this.__SVGdefs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__rootSVG.appendChild(this.__currentElement)}__setDefaultStyles(){const t=Object.keys(ss);for(let e=0,n=t.length;e<n;e++){const i=t[e];this[i]=ss[i].canvas}}__getStyleState(){const t={},e=Object.keys(ss);for(let n=0,i=e.length;n<i;n++){const r=e[n];t[r]=this[r]}return t}__applyStyleState(t){const e=Object.keys(t);for(let n=0,i=e.length;n<i;n++){const r=e[n];this[r]=t[r]}}__createElement(t,e={},n=!1){const i=this.__document.createElementNS("http://www.w3.org/2000/svg",t),r=Object.keys(e);n&&(i.setAttribute("fill","none"),i.setAttribute("stroke","none"));for(let o=0;o<r.length;o++){const a=r[o];i.setAttribute(a,e[a])}return i}__applyStyleToCurrentElement(t){let e=this.__currentElement;const n=this.__currentElementsToStyle;n&&(e.setAttribute(t,""),e=n.element,n.children.forEach(r=>{r.setAttribute(t,"")}));const i=Object.keys(ss);for(let r=0;r<i.length;r++){const o=ss[i[r]],a=this[i[r]];if(o.apply){if(a instanceof Nu){if(a.__ctx)for(;a.__ctx.__SVGdefs.childNodes.length;){const h=a.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[h]=h,this.__SVGdefs.appendChild(a.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(o.apply,Mt("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof Co)e.setAttribute(o.apply,Mt("url(#{id})",{id:a.__root.getAttribute("id")}));else if(o.apply.indexOf(t)!==-1&&o.svg!==a)if((o.svgAttr==="stroke"||o.svgAttr==="fill")&&a.indexOf("rgba")!==-1){const c=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(a);if(c){e.setAttribute(o.svgAttr,Mt("rgb({r},{g},{b})",{r:c[1],g:c[2],b:c[3]}));let u=parseFloat(c[4]);const l=this.globalAlpha;l!=null&&(u*=l),e.setAttribute(o.svgAttr+"-opacity",""+u)}}else{let h=o.svgAttr;if(i[r]==="globalAlpha"&&(h=t+"-"+o.svgAttr,e.getAttribute(h)))continue;h&&e.setAttribute(h,a)}}}}__closestGroupOrSvg(t){return t=t||this.__currentElement,t.nodeName==="g"||t.nodeName==="svg"?t:this.__closestGroupOrSvg(t.parentNode)}getSerializedSvg(t){let e=new XMLSerializer().serializeToString(this.__rootSVG);if(/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi.test(e)&&(e=e.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),t){const i=Object.keys(zu);for(let r=0,o=i.length;r<o;r++){const a=i[r],h=zu[a],c=new RegExp(a,"gi");c.test(e)&&(e=e.replace(c,h))}}return e}getSvg(){return this.__rootSVG}save(){const t=this.__createElement("g"),e=this.__closestGroupOrSvg();this.__groupStack.push(e),e.appendChild(t),this.__currentElement=t,this.__styleStack.push(this.__getStyleState())}restore(){this.__currentElementsToStyle=null;const t=this.__groupStack.pop();t?this.__currentElement=t:this.__currentElement=this.__rootSVG.childNodes[1];const e=this.__styleStack.pop();e&&this.__applyStyleState(e)}__addTransform(t){const e=this.__closestGroupOrSvg();if(e.childNodes.length>0){this.__currentElement.nodeName==="path"&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());const i=this.__createElement("g");e.appendChild(i),this.__currentElement=i}let n=this.__currentElement.getAttribute("transform");n?n+=" ":n="",n+=t,this.__currentElement.setAttribute("transform",n)}scale(t,e){e===void 0&&(e=t),this.__addTransform(Mt("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(Mt("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(Mt("translate({x},{y})",{x:t,y:e}))}transform(t,e,n,i,r,o){this.__addTransform(Mt("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:n,d:i,e:r,f:o}))}beginPath(){this.__currentDefaultPath="",this.__currentPosition={};const t=this.__createElement("path",{},!0);this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t}__applyCurrentDefaultPath(){const t=this.__currentElement;t.nodeName==="path"&&t.setAttribute("d",this.__currentDefaultPath)}__addPathCommand(t){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=t}moveTo(t,e){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:t,y:e},this.__addPathCommand(Mt("M {x} {y}",this.__currentPosition))}closePath(){this.__currentDefaultPath&&this.__addPathCommand("Z")}lineTo(t,e){this.__currentPosition={x:t,y:e},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(Mt("L {x} {y}",this.__currentPosition)):this.__addPathCommand(Mt("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,n,i,r,o){this.__currentPosition={x:r,y:o},this.__addPathCommand(Mt("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:n,cp2y:i,x:r,y:o}))}quadraticCurveTo(t,e,n,i){this.__currentPosition={x:n,y:i},this.__addPathCommand(Mt("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:n,y:i}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,n,i,r){const o=this.__currentPosition&&this.__currentPosition.x,a=this.__currentPosition&&this.__currentPosition.y;if(typeof o>"u"||typeof a>"u")return;if(r<0)throw new Error("IndexSizeError: The radius provided ("+r+") is negative.");if(o===t&&a===e||t===n&&e===i||r===0){this.lineTo(t,e);return}const h=this.normalize([o-t,a-e]),c=this.normalize([n-t,i-e]);if(h[0]*c[1]===h[1]*c[0]){this.lineTo(t,e);return}const u=h[0]*c[0]+h[1]*c[1],l=Math.acos(Math.abs(u)),m=this.normalize([h[0]+c[0],h[1]+c[1]]),f=r/Math.sin(l/2),p=t+f*m[0],y=e+f*m[1],v=[-h[1],h[0]],w=[c[1],-c[0]],_=function(E){const C=E[0];return E[1]>=0?Math.acos(C):-Math.acos(C)},x=_(v),b=_(w);this.lineTo(p+v[0]*r,y+v[1]*r),this.arc(p,y,r,x,b)}stroke(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")}fill(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")}rect(t,e,n,i){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+n,e),this.lineTo(t+n,e+i),this.lineTo(t,e+i),this.lineTo(t,e),this.closePath()}fillRect(t,e,n,i){const r=this.__createElement("rect",{x:t,y:e,width:n,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,n,i){const r=this.__createElement("rect",{x:t,y:e,width:n,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),n=this.__rootSVG.childNodes[1],i=n.childNodes;for(let r=i.length-1;r>=0;r--)i[r]&&n.removeChild(i[r]);this.__currentElement=n,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,n,i){if(t===0&&e===0&&n===this.width&&i===this.height){this.__clearCanvas();return}const r=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:t,y:e,width:n,height:i,fill:"#FFFFFF"},!0);r.appendChild(o)}createLinearGradient(t,e,n,i){const r=this.__createElement("linearGradient",{id:Qs(this.__ids),x1:t+"px",x2:n+"px",y1:e+"px",y2:i+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(r),new Co(r,this)}createRadialGradient(t,e,n,i,r,o){const a=this.__createElement("radialGradient",{id:Qs(this.__ids),cx:i+"px",cy:r+"px",r:o+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(a),new Co(a,this)}__parseFont(){const e=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext]))(?:\s*\/\s*(normal|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext])))?\s*([-,'"\sa-z0-9]+?)\s*$/i.exec(this.font),n={style:e[1]||"normal",size:e[4]||"10px",family:e[6]||"sans-serif",weight:e[3]||"normal",decoration:e[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(n.decoration="underline"),this.__fontHref&&(n.href=this.__fontHref),n}__wrapTextLink(t,e){if(t.href){const n=this.__createElement("a");return n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),n.appendChild(e),n}return e}__applyText(t,e,n,i){const r=this.__parseFont(),o=this.__closestGroupOrSvg(),a=this.__createElement("text",{"font-family":r.family,"font-size":r.size,"font-style":r.style,"font-weight":r.weight,"text-decoration":r.decoration,x:e,y:n,"text-anchor":V1(this.textAlign),"dominant-baseline":G1(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(t)),this.__currentElement=a,this.__applyStyleToCurrentElement(i),o.appendChild(this.__wrapTextLink(r,a))}fillText(t,e,n){this.__applyText(t,e,n,"fill")}strokeText(t,e,n){this.__applyText(t,e,n,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,n,i,r,o){if(i===r)return;i=i%(2*Math.PI),r=r%(2*Math.PI),i===r&&(r=(r+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));const a=t+n*Math.cos(r),h=e+n*Math.sin(r),c=t+n*Math.cos(i),u=e+n*Math.sin(i),l=o?0:1;let m=0,f=r-i;f<0&&(f+=2*Math.PI),o?m=f>Math.PI?0:1:m=f>Math.PI?1:0,this.lineTo(c,u),this.__addPathCommand(Mt("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:n,ry:n,xAxisRotation:0,largeArcFlag:m,sweepFlag:l,endX:a,endY:h})),this.__currentPosition={x:a,y:h}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),n=Qs(this.__ids),i=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",n),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",Mt("url(#{id})",{id:n})),t.appendChild(i),this.__currentElement=i}drawImage(...t){let e=t[0],n,i,r,o,a=0,h=0,c,u,l,m,f,p,y,v;if(t.length===3)n=t[1],i=t[2],c=e.width,u=e.height,r=c,o=u;else if(t.length===5)n=t[1],i=t[2],r=t[3],o=t[4],c=e.width,u=e.height;else if(t.length===9)a=t[1],h=t[2],c=t[3],u=t[4],n=t[5],i=t[6],r=t[7],o=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const w=this.__closestGroupOrSvg();this.__currentElement;const _="translate("+n+", "+i+")";if(e instanceof Ks){if(l=e.getSvg().cloneNode(!0),l.childNodes&&l.childNodes.length>1){for(m=l.childNodes[0];m.childNodes.length;)v=m.childNodes[0].getAttribute("id"),this.__ids[v]=v,this.__SVGdefs.appendChild(m.childNodes[0]);if(f=l.childNodes[1],f){const x=f.getAttribute("transform");let b;x?b=x+" "+_:b=_,f.setAttribute("transform",b),w.appendChild(f)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(p=this.__createElement("image"),p.setAttribute("width",r),p.setAttribute("height",o),p.setAttribute("preserveAspectRatio","none"),(a||h||c!==e.width||u!==e.height)&&(y=this.__document.createElement("canvas"),y.width=r,y.height=o,y.getContext("2d")?.drawImage(e,a,h,c,u,0,0,r,o),e=y),p.setAttribute("transform",_),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),w.appendChild(p))}createPattern(t,e){const n=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),i=Qs(this.__ids);let r;return n.setAttribute("id",i),t.nodeName==="CANVAS"||t.nodeName==="IMG"?(r=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),r.setAttribute("width",""+t.width),r.setAttribute("height",""+t.height),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.nodeName==="CANVAS"?t.toDataURL():t.getAttribute("src")),n.appendChild(r),this.__SVGdefs.appendChild(n)):t instanceof Ks&&(n.setAttribute("width",""+t.width),n.setAttribute("height",""+t.height),n.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(n)),new Nu(n,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}}class To{canvas;context;customContext;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,n,i=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),i&&(this.customContext=new Ks({canvas:this.canvas,width:e||this.canvas.width,height:n||this.canvas.height}))}set lineWidth(t){this.hasSetCustomStrokeStyle=!0,this.context.lineWidth=t,this.customContext&&(this.customContext.lineWidth=t)}get lineWidth(){return this.context.lineWidth}set lineCap(t){this.hasSetCustomStrokeStyle=!0,this.context.lineCap=t,this.customContext&&(this.customContext.lineCap=t)}get lineCap(){return this.context.lineCap}set lineJoin(t){this.hasSetCustomStrokeStyle=!0,this.context.lineJoin=t,this.customContext&&(this.customContext.lineCap=t)}get lineJoin(){return this.context.lineJoin}set lineDashOffset(t){this.hasSetCustomStrokeStyle=!0,this.context.lineDashOffset=t,this.customContext&&(this.customContext.lineDashOffset=t)}get lineDashOffset(){return this.context.lineDashOffset}set miterLimit(t){this.hasSetCustomStrokeStyle=!0,this.context.miterLimit=t,this.customContext&&(this.customContext.miterLimit=t)}get miterLimit(){return this.context.miterLimit}set globalAlpha(t){this.context.globalAlpha=t,this.customContext&&(this.customContext.globalAlpha=t)}get globalAlpha(){return this.context.globalAlpha}set fillStyle(t){this.hasSetCustomFillStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.fillStyle=t,this.customContext&&(this.customContext.fillStyle=t)):(this.context.fillStyle=t.gradient,this.customContext&&(this.customContext.fillStyle=t.gradientCustom))}get fillStyle(){return this.context.fillStyle}set strokeStyle(t){this.hasSetCustomStrokeStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.strokeStyle=t,this.customContext&&(this.customContext.strokeStyle=t)):(this.context.strokeStyle=t.gradient,this.customContext&&(this.customContext.strokeStyle=t.gradientCustom))}get strokeStyle(){return this.context.strokeStyle}set font(t){this.context.font=t,this.customContext&&(this.customContext.font=t)}get font(){return this.context.font}set textBaseline(t){this.context.textBaseline=t,this.customContext&&(this.customContext.textBaseline=t)}get textBaseline(){return this.context.textBaseline}set textAlign(t){this.context.textAlign=t,this.customContext&&(this.customContext.textAlign=t)}get textAlign(){return this.context.textAlign}fill(t){return t?this.context.fill(t):(this.context.fill(),this.customContext&&this.customContext.fill()),this}fillRect(t,e,n,i){return this.context.fillRect(t,e,n,i),this.customContext&&this.customContext.fillRect(t,e,n,i),this}fillText(t,e,n,i){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,n,i),this.customContext&&this.customContext.fillText(t,e,n),this}setLineDash(t){return this.context.setLineDash(t),this.customContext&&this.customContext.setLineDash(t),this}stroke(t){return t?this.context.stroke(t):(this.context.stroke(),this.customContext&&this.customContext.stroke()),this}strokeText(t,e,n,i){return this.context.strokeText(t,e,n,i),this.customContext&&this.customContext.strokeText(t,e,n),this}strokeRect(t,e,n,i){return this.context.strokeRect(t,e,n,i),this.customContext&&this.customContext.strokeRect(t,e,n,i),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,n=this.canvas.width,i=this.canvas.height){return this.context.clearRect(t,e,n,i),this.customContext&&this.customContext.clearRect(t,e,n,i),this}save(){return this.context.save(),this.customContext&&this.customContext.save(),this.currentMatrix=new DOMMatrix,this.path2Ds.push(this.currentPath2D),this.currentPath2D=new Path2D,this}restore(){return this.context.restore(),this.customContext&&this.customContext.restore(),this.hasSetCustomStrokeStyle=!1,this.hasSetCustomFillStyle=!1,this.currentMatrix=new DOMMatrix,this.currentPath2D=this.path2Ds.pop()||new Path2D,this}beginPath(){return this.context.beginPath(),this.customContext&&this.customContext.beginPath(),this}closePath(){return this.context.closePath(),this.customContext&&this.customContext.closePath(),this.currentPath2D.closePath(),this}changePath2D(t=this.currentPath2D,e=this.currentMatrix){const n=new Path2D;n.addPath(t,e),this.currentPath2D=n}isPointInStroke(...t){return t[0]instanceof Path2D?this.context.isPointInStroke(t[0],t[1],t[2]):this.context.isPointInStroke(t[0],t[1])}isPointInPath(...t){return t[0]instanceof Path2D?this.context.isPointInPath(t[0],t[1],t[2]):this.context.isPointInPath(t[0],t[1])}translate(t,e){return this.context.translate(t,e),this.customContext&&this.customContext.translate(t,e),this.currentMatrix.translate(t,e),this.changePath2D(),this}rotate(t,e=0,n=0){return this.translate(e,n),this.context.rotate(t),this.customContext&&this.customContext.rotate(t),this.currentMatrix.rotate(t),this.translate(-e,-n),this.changePath2D(),this}scale(t,e=t,n=0,i=0){return this.translate(n,i),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix.scale(t,e),this.translate(-n,-i),this.changePath2D(),this}moveTo(t,e){return this.context.moveTo(t,e),this.customContext&&this.customContext.moveTo(t,e),this.currentPath2D.moveTo(t,e),this}lineTo(t,e){return this.context.lineTo(t,e),this.customContext&&this.customContext.lineTo(t,e),this.currentPath2D.lineTo(t,e),this}arc(t,e,n,i,r,o){return this.context.arc(t,e,n,i,r,o),this.customContext&&this.customContext.arc(t,e,n,i,r,o?-1:1),this.currentPath2D.arc(t,e,n,i,r,o),this}arcTo(t,e,n,i,r){return this.context.arcTo(t,e,n,i,r),this.customContext&&this.customContext.arcTo(t,e,n,i,r),this.currentPath2D.arcTo(t,e,n,i,r),this}ellipse(t,e,n,i,r,o,a,h){return this.context.ellipse(t,e,n,i,r,o,a,h),this.currentPath2D.ellipse(t,e,n,i,r,o,a,h),this}quadraticCurveTo(t,e,n,i){return this.context.quadraticCurveTo(t,e,n,i),this.customContext&&this.customContext.quadraticCurveTo(t,e,n,i),this.currentPath2D.quadraticCurveTo(t,e,n,i),this}bezierCurveTo(t,e,n,i,r,o){return this.context.bezierCurveTo(t,e,n,i,r,o),this.customContext&&this.customContext.bezierCurveTo(t,e,n,i,r,o),this.currentPath2D.bezierCurveTo(t,e,n,i,r,o),this}rect(t,e,n,i){return this.context.rect(t,e,n,i),this.customContext&&this.customContext.rect(t,e,n,i),this.currentPath2D.rect(t,e,n,i),this}createLinearGradient(t,e,n,i,r){const o=this.context.createLinearGradient(t,e,n,i);return r&&Object.entries(r).forEach(([a,h])=>{o.addColorStop(parseFloat(a),h)}),o}createRadialGradient(t,e,n,i,r,o,a){const h=this.context.createRadialGradient(t,e,n,i,r,o);return a&&Object.entries(a).forEach(([c,u])=>{h.addColorStop(parseFloat(c),u)}),h}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const n=e[0],i=e[1];this.context.drawImage(t,n,i)}else if(e.length===4){const n=e[0],i=e[1],r=e[2],o=e[3];this.context.drawImage(t,n,i,r,o)}else if(e.length===8){const n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],h=e[5],c=e[6],u=e[7];this.context.drawImage(t,n,i,r,o,a,h,c,u)}else throw new Error("Invalid number of arguments passed to drawImage: "+e.length);return this.customContext&&this.customContext.drawImage(t,...e),this}getImageData(t=0,e=0,n=this.canvas.width,i=this.canvas.height,r){return this.context.getImageData(t,e,n,i,r)}putImageData(t,e=0,n=0){return this.context.putImageData(t,e,n)}createPattern(t,e){return this.context.createPattern(t,e)}toRawSVG(){if(this.customContext){const t=this.customContext.getSerializedSvg(!0),e=this.customContext.getSvg();return{raw:t,element:e}}else return{raw:"",element:null}}}const is={1:705234,2:8108026,3:6346665,4:16630114,5:16607842,6:16158139,7:2542847,8:10640125,9:16735870,10:8978266,11:16580418,12:16754221,13:16725759,14:14436630,15:6844849,16:13744437,17:1817755,18:16744272,19:4964291,20:16750848,d:14540253,aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};class Ft{_color={r:0,g:0,b:0,a:1};constructor(t,e){t&&this.setColor(t),this.setAlpha(e)}get color(){return this._color}set color(t){const e=`Color: Unknown color(${t}) type(${typeof t})`;if(typeof t=="number")this.setHEX(t);else if(typeof t=="string"){let n;if(n=/^(\w+)\(([^)]*)\)/.exec(t)){const i=n[2];let r;switch(n[1]){case"rgb":case"rgba":(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))?(this.r=parseInt(r[1],10),this.g=parseInt(r[2],10),this.b=parseInt(r[3],10),this.a=r[4]?parseFloat(r[4]):1):(r=/^\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))?(this.r=N(parseFloat(r[1]),0,100)*255/100,this.g=N(parseFloat(r[2]),0,100)*255/100,this.b=N(parseFloat(r[3]),0,100)*255/100,this.a=r[4]?parseFloat(r[4]):1):console.warn(e);break;case"hsl":case"hsla":(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)%\s*,\s*(\d*\.?\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))?this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,r[4]?parseFloat(r[4]):1):console.warn(e);break;case"hsv":case"hsva":case"hsb":case"hsba":(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)%\s*,\s*(\d*\.?\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))?this.setHSV(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,r[4]?parseFloat(r[4]):1):console.warn(e);break;default:console.warn(e)}}else if(n=/#([A-Fa-f0-9]+)/.exec(t)){const i=n[1],r=i.length;r===3?this.setRGB(parseInt(i.charAt(0),16),parseInt(i.charAt(1),16),parseInt(i.charAt(2),16),1):r===6||r===8?this.setHEX(parseInt(i,16)):console.warn(e)}else if(t&&t.length>0)try{this.setColorName(t)}catch{console.warn(e)}else console.warn(e)}else t instanceof Ft?this.setRGB(t.r,t.g,t.b,t.a):Object.prototype.hasOwnProperty.call(t,"r")&&Object.prototype.hasOwnProperty.call(t,"g")&&Object.prototype.hasOwnProperty.call(t,"b")?this.setRGB(t.r,t.g,t.b,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"l")?this.setHSL(t.h,t.s,t.l,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"v")?this.setHSV(t.h,t.s,t.v,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"b")?this.setHSV(t.h,t.s,t.b,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):console.warn(e)}setColor(t){return this.color=t,this}set(t){return this.setColor(t)}get r(){return this._color.r}set r(t){try{this._color.r=N(Math.round(qt(t)),0,255)}catch{}}get g(){return this._color.g}set g(t){try{this._color.g=N(Math.round(qt(t)),0,255)}catch{}}get b(){return this._color.b}set b(t){try{this._color.b=N(Math.round(qt(t)),0,255)}catch{}}get a(){return this._color.a}set a(t){try{this._color.a=N(qt(t),0,1)}catch{}}setAlpha(t){return this.a=t,this}setFromVector3(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}applyMatrix3(t){const e=this.r,n=this.g,i=this.b,r=t.value;return this.r=r[0]*e+r[3]*n+r[6]*i,this.g=r[1]*e+r[4]*n+r[7]*i,this.b=r[2]*e+r[5]*n+r[8]*i,this}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),this}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this.a=t[e+3],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t[e+3]=this.a,t}toRGBString(){return this.a===1?`rgb(${this.r},${this.g},${this.b})`:`rgba(${this.r},${this.g},${this.b},${Z(this.a,6)})`}toHexString(){return this.a===1?("000000"+this.hex.toString(16)).slice(-6):("00000000"+this.hex.toString(16)).slice(-8)}toString(){return this.a===1?"#"+this.toHexString():this.toRGBString()}toColorSpaceString(t=We){Mo.fromWorkingColorSpace(we.copy(this),t);const e=we.r,n=we.g,i=we.b;return t!==We?`color(${t} ${e.toFixed(3)} ${n.toFixed(3)} ${i.toFixed(3)})`:this.toRGBString()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b,yield this.a}clone(){return new Ft(this.color)}copy(t){return this.setColor(t.color),this}copySRGBToLinear(t){return this.r=Je(t.r),this.g=Je(t.g),this.b=Je(t.b),this}copyLinearToSRGB(t){return this.r=Ze(t.r),this.g=Ze(t.g),this.b=Ze(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}add(t){return this.r=this.r+t.r,this.g=this.g+t.g,this.b=this.b+t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r=this.r+t,this.g=this.g+t,this.b=this.b+t,this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}sub(t){return this.r=this.r-t.r,this.g=this.g-t.g,this.b=this.b-t.b,this}multiply(t){return this.r=this.r*t.r,this.g=this.g*t.g,this.b=this.b*t.b,this}multiplyScalar(t){return this.r=this.r*t,this.g=this.g*t,this.b=this.b*t,this}opposite(t=!0,e="#000000",n="#ffffff"){if(t)return this.setColor(this.r*.299+this.g*.587+this.b*.114>186?e:n);{const{r:i,g:r,b:o}=this.color;return this.r=255-i,this.g=255-r,this.b=255-o,this}}lighten(t){t=N(t,0,1);const{r:e,g:n,b:i}=this.color;return this.r=e+(255-e)*t,this.g=n+(255-n)*t,this.b=i+(255-i)*t,this}darken(t){t=N(t,0,1);const{r:e,g:n,b:i}=this.color;return this.r=e*(1-t),this.g=n*(1-t),this.b=i*(1-t),this}lerp(t,e){e=N(e,0,1);const{r:n,g:i,b:r}=this.color;return this.r=n+(t.r-n)*e,this.g=i+(t.g-i)*e,this.b=r+(t.b-r)*e,this}lerpColors(t,e,n){return n=N(n,0,1),this.r=t.r+(e.r-t.r)*n,this.g=t.g+(e.g-t.g)*n,this.b=t.b+(e.b-t.b)*n,this}static gradient(t,e,n){try{return we.lerpColors(new Ft(t),new Ft(e),n).toString()}catch{return e}}static random(){return we.setHEX(Math.random()*16777215).toString()}static nextIndex=0;static next(t=Ft.nextIndex){Ft.nextIndex=t;const e=Object.keys(is),n=e.length;return we.setHEX(is[e[Ft.nextIndex++%n]]).toString()}setColorName(t){const e=is[t.toLowerCase()];return e!==void 0?this.setHEX(e):t==="none"?this.a=0:(this.a=1,console.warn("Color.setColorName: Unknown color "+t)),this}static getColors(){return Object.values(is).map(t=>we.setHEX(t).toString())}setRGB(t,e,n,i=1){return this.r=t,this.g=e,this.b=n,this.a=i,this}get rgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}setHEX(t){return t=Math.floor(t),t<16777216?(this.r=t>>16&255,this.g=t>>8&255,this.b=t&255,this.a=1):(this.r=t>>24&255,this.g=t>>16&255,this.b=t>>8&255,this.a=(t&255)/255),this}get hex(){let t=(this.r<<16)+(this.g<<8)+this.b;return this.a!==1&&(t=t<<8,t+=Math.round(this.a*255)),t}setHSL(t,e,n,i=1){const r=tf(t,1),o=N(e,0,1),a=N(n,0,1);if(o===0)this.r=a*255,this.g=a*255,this.b=a*255;else{const h=a<=.5?a*(1+o):a+o-a*o,c=2*a-h;this.r=Ao(c,h,r+1/3)*255,this.g=Ao(c,h,r)*255,this.b=Ao(c,h,r-1/3)*255}return this.a=i,this}getHSL(t){const e=this.r,n=this.g,i=this.b,r=Math.max(e,n,i)/255,o=Math.min(e,n,i)/255;let a,h;const c=(o+r)/2;if(o===r)a=0,h=0;else{const u=r-o;switch(h=c<=.5?u/(r+o):u/(2-r-o),r){case e:a=(n-i)/u+(n<i?6:0);break;case n:a=(i-e)/u+2;break;case i:default:a=(e-n)/u+4;break}a/=6}return t&&t.setHSL(a,h,c,this.a),{h:a,s:h,l:c,a:this.a}}offsetHSL(t,e,n){const i=this.getHSL();return this.setHSL(i.h+t,i.s+e,i.l+n)}lerpHSL(t,e){const n=this.getHSL(),i=t.getHSL(),r=ms(n.h,i.h,e),o=ms(n.s,i.s,e),a=ms(n.l,i.l,e);return this.setHSL(r,o,a),this}setHSV(t,e,n,i=1){const r=N(t,0,1)*360,o=N(e,0,1),a=N(n,0,1),h=Math.floor(r/60)%6,c=r/60-Math.floor(r/60),u=a*(1-o),l=a*(1-c*o),m=a*(1-(1-c)*o),f=[[a,m,u],[l,a,u],[u,a,m],[u,l,a],[m,u,a],[a,u,l]][h];return this.r=f[0]*255,this.g=f[1]*255,this.b=f[2]*255,this.a=i,this}setHSB(t,e,n,i=1){this.setHSV(t,e,n,i)}getHSV(t){const{r:e,g:n,b:i,a:r}=this.color,o=Math.max(e,n,i),a=Math.min(e,n,i),h=o-a;let c;e===o?c=(n-i)/h:n===o?c=2+(i-e)/h:c=4+(e-n)/h,c/=6,c<0&&(c+=1);const u=h==0?0:c,l=o===0?0:h/o,m=o/255;return t&&t.setHSV(u,l,m,r),{h:u,s:l,v:m,a:r}}getHSB(t){const{h:e,s:n,v:i,a:r}=this.getHSV(t);return{h:e,s:n,b:i,a:r}}}const we=new Ft,Bu="",We="srgb",Eo="srgb-linear",Po="linear",ti="srgb";function Je(s){return s<.04045?s*.0773993808:Math.pow(s*.9478672986+.0521327014,2.4)}function Ze(s){return s<.0031308?s*12.92:1.055*Math.pow(s,.41666)-.055}const Fu=new gn().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Yu=new gn().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715),$u=[.64,.33,.3,.6,.15,.06],Xu=[.2126,.7152,.0722],Uu=[.3127,.329],Mo={enabled:!0,workingColorSpace:Eo,spaces:{},convert:function(s,t,e){return this.enabled===!1||t===e||!t||!e||(this.spaces[t].transfer===ti&&(s.r=Je(s.r),s.g=Je(s.g),s.b=Je(s.b)),this.spaces[t].primaries!==this.spaces[e].primaries&&(s.applyMatrix3(this.spaces[t].toXYZ),s.applyMatrix3(this.spaces[e].fromXYZ)),this.spaces[e].transfer===ti&&(s.r=Ze(s.r),s.g=Ze(s.g),s.b=Ze(s.b))),s},fromWorkingColorSpace:function(s,t){return this.convert(s,this.workingColorSpace,t)},toWorkingColorSpace:function(s,t){return this.convert(s,t,this.workingColorSpace)},getPrimaries:function(s){return this.spaces[s].primaries},getTransfer:function(s){return s===Bu?Po:this.spaces[s].transfer},getLuminanceCoefficients:function(s,t=this.workingColorSpace){return s.fromArray(this.spaces[t].luminanceCoefficients)},define:function(s){Object.assign(this.spaces,s)},_getMatrix:function(s,t,e){return s.copy(this.spaces[t].toXYZ).multiply(this.spaces[e].fromXYZ)},_getDrawingBufferColorSpace:function(s){return this.spaces[s].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(s=this.workingColorSpace){return this.spaces[s].workingColorSpaceConfig.unpackColorSpace}};Mo.define({[Eo]:{primaries:$u,whitePoint:Uu,transfer:Po,toXYZ:Fu,fromXYZ:Yu,luminanceCoefficients:Xu,workingColorSpaceConfig:{unpackColorSpace:We},outputColorSpaceConfig:{drawingBufferColorSpace:We}},[We]:{primaries:$u,whitePoint:Uu,transfer:ti,toXYZ:Fu,fromXYZ:Yu,luminanceCoefficients:Xu,outputColorSpaceConfig:{drawingBufferColorSpace:We}}});function Ao(s,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?s+(t-s)*6*e:e<1/2?t:e<2/3?s+(t-s)*6*(2/3-e):s}class ot{id;d;parent;attrs;_centerX;_centerY;_x;_y;_degree;_scaleX;_scaleY;vx;vy;ax;ay;mass;show;followMouse;drag;transform$=new mn;isMouseIn=!1;isDragging=!1;el;constructor(t){this.id=on(),this.d=t?.d,this.attrs={stroke:"none",fill:"none"},t?.attrs&&this.setAttr(t?.attrs),this._centerX=t?.centerX,this._centerY=t?.centerY,this._x=t?.x||0,this._y=t?.y||0,this._degree=t?.degree||0,this._scaleX=1,this._scaleY=1,t?.scale!==void 0&&(this._scaleX=t.scale,this._scaleY=t.scale),t?.scaleX!==void 0&&(this._scaleX=t.scaleX),t?.scaleY!==void 0&&(this._scaleY=t.scaleY),this.vx=t?.vx||0,this.vy=t?.vy||0,this.ax=t?.ax||0,this.ay=t?.ay||0,this.mass=t?.mass||1,this.show=typeof t?.show=="boolean"?t?.show:!0,this.followMouse=typeof t?.followMouse=="boolean"?t?.followMouse:!1,this.drag=t?.drag}destroy(){}moveTo(t,e){const n=this._x,i=this._y;(n!==t||i!==e)&&(this._x=t,this._y=e,this.transform$.next({dx:t-n,dy:e-i}))}move(t,e=0){this.moveTo(this._x+t,this._y+e)}moveXTo(t){this.moveTo(t,this._y)}moveX(t){this.moveTo(this._x+t,this._y)}moveYTo(t){this.moveTo(this._x,t)}moveY(t){this.moveTo(this._x,this._y+t)}get x(){return this._x}set x(t){this._x=t}get y(){return this._y}set y(t){this._y=t}rotateTo(t){this._degree=t}rotate(t){this.rotateTo(this._degree+t)}get degree(){return this._degree}set degree(t){this._degree=t}scaleTo(t,e){this._scaleX=t,this._scaleY=e||t}scale(t,e){this.scaleTo(this._scaleX*t,this._scaleY*(e||t))}get scaleX(){return this._scaleX}set scaleX(t){this._scaleX=t}get scaleY(){return this._scaleY}set scaleY(t){this._scaleY=t}pathD(){return this.d?(this.d instanceof St||(this.d=new St(this.d)),this.d):new St(this.toSVGPathData())}forcePathD(t){this.d=t}getBaseOptions(){return{d:this.d,attrs:this.getAttrs(),centerX:this._centerX,centerY:this._centerY,x:this._x,y:this._y,degree:this._degree,scaleX:this._scaleX,scaleY:this._scaleY,vx:this.vx,vy:this.vy,ax:this.ax,ay:this.ay,mass:this.mass,followMouse:this.followMouse,drag:this.drag}}clone(){const t=this.cloneShape();return this.parent&&(t.parent={...this.parent}),t}cloneShape(){return new ot(this.getBaseOptions())}toSVGPathData(){return[]}toSVGPathD(){return this.pathD().toSVGPathD()}toCanvasContext(t){this.pathD().toCanvasContext(t)}getBoundingClientRect(t=2){return this.pathD().getBoundingClientRect(t)}getBoundingClientRectCenter(t=2){return this.pathD().getBoundingClientRectCenter(t)}transformOrigin(t=!1,e=2){let n=this._centerX||0,i=this._centerY||0;if(typeof this._centerX>"u"&&typeof this._centerY>"u"){const r=this.getBoundingClientRectCenter(e);if(t||!this.parent)n=r.x,i=r.y;else{const o=this.parent.combo.getBoundingClientRectCenter(e);n=o.x-this.parent.dx,i=o.y-this.parent.dy}}return{x:n,y:i}}isPointInPath(t,e,n){if(t instanceof To)return t.isPointInPath(new Path2D(this.toSVGPathD()),e,n);if(this.el instanceof SVGGeometryElement){const i=this.el.getCTM();if(i){const r=i.inverse();return this.el.isPointInFill({x:r.a*e+r.c*n+r.e,y:r.b*e+r.d*n+r.f})}}return!1}isPointInStroke(t,e,n){if(t instanceof To)return t.isPointInStroke(new Path2D(this.toSVGPathD()),e,n);if(this.el instanceof SVGGeometryElement){const i=this.el.getCTM();if(i){const r=i.inverse();return this.el.isPointInStroke({x:r.a*e+r.c*n+r.e,y:r.b*e+r.d*n+r.f})}}return!1}setAttr(t,e){if(typeof t!="string")for(const n in t){const i=t[n];i&&(this.attrs[xt(n)]=i)}else e&&(this.attrs[xt(t)]=e)}getAttr(t,e){return this.attrs[t]||this.attrs[xt(t)]||e}hasAttr(t){return!!this.getAttr(t)}getAttrs(){return{...this.attrs}}animate(t){this.vx+=this.ax,this.vy+=this.ay;const e=t?.gravity||0;this.vy+=e;const n=t?.friction||1;this.vx*=n,this.vy*=n,this.moveTo(this.x+this.vx,this.y+this.vy)}animateEaseTo(t,e){const n=e?.easing||.05,i=t.x-this.x,r=t.y-this.y;this.vx=i*n,this.vy=r*n,this.animate(e)}animateSpringTo(t,e){const n=e?.spring||.03;(Array.isArray(t)?t:[t]).forEach(i=>{const r=i.x-this.x,o=i.y-this.y,a=r*n,h=o*n;this.vx+=a,this.vy+=h}),this.animate({friction:.9,...e})}animateSpringMassTo(t,e){const n=e?.springLength||100,i=e?.spring||1e-4,r=t.x-this.x,o=t.y-this.y,a=Math.sqrt(r*r+o*o);if(a<n){const h=r*i,c=o*i;return this.vx+=h/this.mass,this.vy+=c/this.mass,t.vx-=h/t.mass,t.vy-=c/t.mass,1-a/n}return 0}distance(t){return Me(this.x,this.y,t.x,t.y)}rotateToTarget(t){this.rotateTo(Et(Jt(this.x,this.y,t.x,t.y)))}followTo(t,e=3){this.rotateToTarget(t);const{dx:n,dy:i}=Ae(q(this.degree),e);this.vx=n,this.vy=i,this.animate()}followAccelerationTo(t,e=.05){this.rotateToTarget(t);const{dx:n,dy:i}=Ae(q(this.degree),e);this.ax=n,this.ay=i,this.animate()}gravitateTo(t){const e=t.x-this.x,n=t.y-this.y,i=e*e+n*n,r=Math.sqrt(i),o=this.mass*t.mass/i,a=o*e/r,h=o*n/r;this.vx+=a/this.mass,this.vy+=h/this.mass,t.vx-=a/t.mass,t.vy-=h/t.mass}checkCollision(t){}checkWall(t){}getTotalLength(){return this.pathD().getTotalLength()}interpolate(t){return this.pathD().interpolate(t)}getPointAtLength(t){return this.pathD().getPointAtLength(t)}trailPath(t=0){const e=this.getTotalLength();return{subPathD:this.pathD().getSubPathD(0,t*e),point:this.getPointAtLength(t*e)}}strokeDashTween(t=1e3,e){const n=Z(this.pathD().getTotalLength(),0);this.setAttr({strokeDasharray:`${n} ${n}`,strokeDashoffset:`${n}`});const i=e?.onUpdate,r=new $n({frameDuration:t});r.addTween({offset:n},{offset:0},Object.assign(e||{},{onUpdate:(o,a)=>{this.setAttr("strokeDashoffset",""+Z(o.offset,2)),i?.(o,a)}})),r.play()}}class Lt{options;commonChildShapeOptions;shapes=[];x=0;y=0;degree=0;scaleX=1;scaleY=1;constructor(t,e){if(this.options=t,this.commonChildShapeOptions=e,t?.svg){let n=0,i=0,r=0,o=0;const a=new X1(t.svg).parse();for(let h=0,c=a.length;h<c;h++){const u=a[h];if(u.type=="viewbox"&&u.width&&u.height){if(n=parseFloat(u.width),i=parseFloat(u.height),t.forceWidth){const y=n/i;r=t.forceWidth,o=r/y}else r=n,o=i;continue}if(u.type!="path"||!Iu(u.path))continue;const l={};for(const y in u)y==="type"||y==="path"||y==="transform"||(l[y]=u[y]);const m=Lu(Du(u.path)),f=[];let p=[];for(let y=0,v=m.length;y<v;y++){const w=m[y];p.push(w),w[0].toLowerCase()=="z"&&(f.push(p),p=[])}p.length&&f.push(p),f.forEach(y=>{const v=new ot({...e,d:y,attrs:{...e?.attrs,...l}});if(u.transform){const _=Vr(u.transform).split();v.moveTo(_.x,_.y),v.rotateTo(_.degree),v.scaleTo(_.scaleX,_.scaleY)}r&&n&&o&&i&&v.scaleTo(v.scaleX*(r/n),v.scaleY*(o/i)),this.addShape(v)})}}}destroy(){this.shapes.forEach(t=>t.destroy())}clone(){const t=this.cloneShapeCombo();return t.x=this.x,t.y=this.y,t.degree=this.degree,t.scaleX=this.scaleX,t.scaleY=this.scaleY,t.shapes=this.shapes.map(e=>{const n=e.clone();return n.parent&&(n.parent.combo=t),n}),t}cloneShapeCombo(){return new Lt(this.options,this.commonChildShapeOptions)}addShape(t,e=0,n=0){t.parent={combo:this,dx:e||t.x,dy:n||t.y},this.shapes.push(t)}comboMove(t,e){this.x+=t,this.y+=e,this.shapes.forEach(n=>{n.move(t,e)})}comboRotate(t){this.degree+=t,this.shapes.forEach(e=>{e.rotate(t)})}comboScale(t,e){this.scaleX*=t,this.scaleY*=e||t,this.shapes.forEach(n=>{n.scale(t,e)})}comboTransform(t){(typeof t?.x=="number"||typeof t?.y=="number")&&this.comboMove(t?.x||0,t?.y||0),typeof t?.degree=="number"&&this.comboRotate(t?.degree||0),(typeof t?.scale=="number"||typeof t?.scaleX=="number"||typeof t?.scaleY=="number")&&this.comboScale(t?.scaleX||t?.scale||1,t?.scaleY||t?.scale||1)}getBoundingClientRect(t=2){const e=[],n=[];if(this.shapes.forEach(h=>{const c=h.getBoundingClientRect(t);e.push(c.x,c.x+c.width),n.push(c.y,c.y+c.height)}),e.length==0||n.length==0)return{x:0,y:0,width:0,height:0,center:{x:0,y:0}};const i=Math.min(...e),r=Math.min(...n),o=Math.max(...e),a=Math.max(...n);return{x:Z(i,t),y:Z(r,t),width:Z(o-i,t),height:Z(a-r,t)}}getBoundingClientRectCenter(t=2){const e=this.getBoundingClientRect(t);return{x:Z(e.x+e.width*.5,t),y:Z(e.y+e.height*.5,t)}}setAttr(t,e){typeof t!="string"?this.shapes.forEach(n=>{n.setAttr(t)}):e&&this.shapes.forEach(n=>{n.setAttr(t,e)})}sort(){this.shapes=this.shapes.map(t=>({shape:t,perimeter:t.pathD().getPolymorphPointsPerimeter()})).sort((t,e)=>e.perimeter-t.perimeter).map(t=>t.shape)}expendTo(t){const e=t.shapes.length,n=this.shapes.length;if(e<n)return t.expendTo(this);for(let i=n;i<e;i++)this.addShape(t.shapes[i].clone())}strokeDashTween(t,e){const n=this.shapes.length-1;switch(e?.type){case"sequence":this.shapes.forEach((a,h)=>{a.strokeDashTween(t,{...e,delay:h,onStart:()=>{h==0&&e?.onGroupStart?.()},onUpdate:()=>{e?.onGroupUpdate?.()},onComplete:()=>{h==n&&e?.onGroupComplete?.()}})});break;case"parallel":default:const i=new $n({frameDuration:t}),r={},o={};this.shapes.forEach((a,h)=>{const c=Z(a.getTotalLength(),0);r[`offset_${h}`]=c,o[`offset_${h}`]=0,a.setAttr({strokeDasharray:`${c} ${c}`,strokeDashoffset:`${c}`})}),i.addTween(r,o,Object.assign(e||{},{onStart:()=>{e?.onGroupStart?.()},onUpdate:(a,h)=>{for(const c in a){const u=rf(c).number;this.shapes[u].setAttr("strokeDashoffset",""+Z(a[c],2))}e?.onGroupUpdate?.()},onComplete:()=>{e?.onGroupComplete?.()}})),i.play();break}}}function q1(s,t){s.forEach(n=>{n.animate(),t?.wall&&n.checkWall({wall:t.wall,bounce:t.bounce})});const e=s.length;for(let n=0,i=e-1;n<i;n++)for(let r=n+1;r<e;r++)s[n].checkCollision(s[r])}function j1(s){const t=s.length;s.forEach((e,n)=>{e.animate();for(let i=n+1;i<t;i++)e.checkCollision(s[i]),e.gravitateTo(s[i])})}function H1(s,t){s.forEach((e,n)=>{n>0&&e.animateSpringTo(s[n-1],t)})}function W1(s,t){const e=t?.springLength||100;s.forEach(n=>{n.isDragging||s.filter(i=>i.id!==n.id).forEach(i=>{const r=Jt(n.x,n.y,i.x,i.y);n.animateSpringTo({x:i.x-Math.cos(r)*e,y:i.y-Math.sin(r)*e},t)})})}function J1(s,t,e){const n=s.length,i=[];return s.forEach((r,o)=>{r.animate(e),r.x>t.x+t.width?r.moveXTo(t.x):r.x<t.x&&r.moveXTo(t.x+t.width),r.y>t.y+t.height?r.moveYTo(t.y):r.y<t.y&&r.moveYTo(t.y+t.height);for(let a=o+1;a<n;a++)i.push([r.x,r.y,s[a].x,s[a].y,r.animateSpringMassTo(s[a],e)])}),i}function ko(s){if(s.length<2)throw new Error("shapes个数必须大于等于2");const t=s.length-1,e=new Array(t);for(let n=0;n<t;n++){const i=s[n].pathD(),r=s[n+1].pathD(),o=Math.max(i.getPolymorphPoints().length,r.getPolymorphPoints().length);e[n]=St.getInterpolator(i.getExpendedPolymorphPointsPathD(o),r.getExpendedPolymorphPointsPathD(o))}return n=>{const i=Z(t*n,6),r=Math.min(Math.floor(i),t-1),o=Z(i-r,6),a=new ot({d:e[r](o)}),h=s[r].getAttr("fill","none"),c=s[r+1].getAttr("fill","none");typeof h=="string"&&typeof c=="string"&&a.setAttr("fill",Ft.gradient(h,c,o).toString());const u=s[r].getAttr("stroke","none"),l=s[r+1].getAttr("stroke","none");return typeof u=="string"&&typeof l=="string"&&a.setAttr("stroke",Ft.gradient(u,l,o).toString()),a}}function Vu(s){if(s.length<2)throw new Error("shapeCombos个数必须大于等于2");let t=0,e;const n=[];s.forEach(o=>{let a;o instanceof Lt?(a=o,a.sort()):(a=new Lt,a.addShape(o)),n.push(a),t<a.shapes.length&&(t=a.shapes.length,e=a)}),n.forEach(o=>{o!==e&&o.expendTo(e)});const i=[];n.forEach((o,a)=>{o.shapes.forEach((h,c)=>{i[c]=i[c]||[],i[c][a]=h})});const r=[];return i.forEach(o=>{r.push(ko(o))}),o=>{const a=new Lt;return r.forEach(h=>{a.addShape(h(o))}),a}}function Z1(s,t=6e3,e){const n=s.findIndex(a=>a instanceof Lt)>=0?Vu(s):ko(s),i=n(0),r=e?.onUpdate,o=new $n({frameDuration:t});o.addTween({t:0},{t:1},Object.assign(e||{},{onUpdate:(a,h)=>{n(a.t),r?.(a,h),i instanceof ot?e?.shape?.(i):i instanceof Lt&&i.shapes.forEach(c=>{e?.shape?.(c)})}})),o.play()}function Q1(s,t,e,n,i){if(i==0)throw new Error("no dividing by zero, please");const r=[],o=360/i;for(let h=0;h<i;h+=1){const c=o*h*Math.PI/180,u=s+2*e*Math.cos(c),l=t+2*e*Math.sin(c);r.push(new go({x:s,y:t,rx:e,ry:n,xAxisRotate:o*h,largeArcFlag:1,sweepFlag:1,toX:u,toY:l})),r.push(new go({x:u,y:l,rx:e,ry:n,xAxisRotate:o*h,largeArcFlag:1,sweepFlag:1,toX:s,toY:t}))}return new ot({d:St.fromLines(r)})}class K1{PARENT_EL;SVG_EL=null;CANVAS_EL=null;ctx=null;rect={x:0,y:0,width:0,height:0};size$=new Lm(null);resizeSubscription;mpg=He();mouseSubscription;shapes=[];lastMouseInShapeId="";draggingShapeId="";prevCursor="default";constructor(t=document.documentElement,e="canvas",n=!1){this.PARENT_EL=t,(e=="svg"||e=="canvas")&&Jc(this.PARENT_EL),e=="svg"&&(this.SVG_EL=ku("svg"),Qn(this.PARENT_EL,this.SVG_EL)),e=="canvas"&&(this.CANVAS_EL=tu("canvas"),Qn(this.PARENT_EL,this.CANVAS_EL)),this.resizeSubscription=mo(this.PARENT_EL).subscribe(i=>{this.rect.x=i.x,this.rect.y=i.y,this.rect.width=i.width,this.rect.height=i.height,this.SVG_EL&&je(this.SVG_EL,{viewBox:`0 0 ${this.rect.width} ${this.rect.height}`,width:`${this.rect.width}`,height:`${this.rect.height}`}),this.CANVAS_EL&&(je(this.CANVAS_EL,{width:`${this.rect.width}`,height:`${this.rect.height}`}),this.ctx=new To(this.CANVAS_EL,this.rect.width,this.rect.height,n)),this.size$.next(i)}),this.mouseSubscription=wu(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL,{useMousePoint:this.mpg}).subscribe(()=>{})}destroy(){this.resizeSubscription.unsubscribe(),this.mouseSubscription.unsubscribe()}setCursor(t="default"){t!=this.prevCursor&&(this.PARENT_EL.style.cursor=t,this.prevCursor=t)}animateShape(t){t.followMouse&&(!_a(t.x,this.mpg.current.x,5)||!_a(t.y,this.mpg.current.y,5))&&t.followTo(this.mpg.current),t.drag&&t.drag.enable&&t.drag.targetToAfterDrop&&(t.isDragging||t.animateEaseTo(t.drag.targetToAfterDrop,{easing:t.drag.easing}))}draw(...t){const e=[];t.forEach(n=>{n instanceof Lt?e.push(...n.shapes):e.push(n)}),this.SVG_EL&&this.shapes.filter(n=>e.findIndex(i=>i.id==n.id)==-1).forEach(n=>{n.el&&(n.el.remove(),delete n.el)}),this.ctx&&this.ctx.clearRect(),Ql(this.shapes,e),this.lastMouseInShapeId="",this.mpg.current.isDown||(this.draggingShapeId="");for(const n of this.shapes){if(!n.show)continue;this.animateShape(n);const i=n.transformOrigin(),r=i.x,o=i.y;if(this.SVG_EL){const a=n.toSVGPathD();n.el||(n.el=B1(a,n.id),Qn(this.SVG_EL,n.el));const h=new _t;h.translate(n.x,n.y),h.rotate(n.degree,r,o),h.scale(n.scaleX,n.scaleY,r,o),je(n.el,{d:a,transform:h.toString(),...n.getAttrs()})}if(this.ctx&&(this.ctx.save(),this.ctx.translate(n.x,n.y),this.ctx.rotate(q(n.degree),r,o),this.ctx.scale(n.scaleX,n.scaleY,r,o),n.toCanvasContext(this.ctx),Cc(this.ctx,n.getAttrs()),this.ctx.hasSetCustomStrokeStyle&&this.ctx.stroke(),this.ctx.hasSetCustomFillStyle&&this.ctx.fill()),this.SVG_EL?n.isMouseIn=n.isPointInPath(this.SVG_EL,this.mpg.current.x,this.mpg.current.y)||n.isPointInStroke(this.SVG_EL,this.mpg.current.x,this.mpg.current.y):this.ctx?n.isMouseIn=n.isPointInPath(this.ctx,this.mpg.current.x,this.mpg.current.y)||n.isPointInStroke(this.ctx,this.mpg.current.x,this.mpg.current.y):n.isMouseIn=!1,n.isMouseIn&&(this.setCursor("pointer"),this.lastMouseInShapeId=n.id),n.isDragging=n.id==this.draggingShapeId,this.mpg.current.isDown&&(n.isDragging||!this.draggingShapeId&&n.isMouseIn&&n.drag&&n.drag.enable)){this.setCursor("grabbing"),n.isDragging=!0,this.draggingShapeId=n.id;let a=this.mpg.current.x-this.mpg.start.x,h=this.mpg.current.y-this.mpg.start.y;if(a||h){if(n.drag&&n.drag.enable&&n.drag.alongPath){const c=n.parent?n.parent.combo.x:n.x,u=n.parent?n.parent.combo.y:n.y,l=r+(n.parent?.dx||0),m=o+(n.parent?.dy||0),f=n.parent?n.parent.combo.degree:n.degree,p=n.parent?n.parent.combo.scaleX:n.scaleX,y=n.parent?n.parent.combo.scaleY:n.scaleY,w=n.drag.alongPath.transform(c,u,l,m,f,p,y).closestPoint(this.mpg.current.x,this.mpg.current.y),_=n.x,x=n.y;a=w.point.x-_,h=w.point.y-x}(a||h)&&(n.move(a,h),n.parent?.combo.shapes.forEach(c=>{c.drag?.followSibling&&c!==n&&c.move(a,h)}))}this.mpg.setStart(this.mpg.current)}else n.isMouseIn&&n.drag&&n.drag.enable&&this.setCursor("grab");this.ctx&&this.ctx.restore()}!this.lastMouseInShapeId&&!this.draggingShapeId&&this.setCursor("default")}drawMouseMoveLine(t){const e=t?.brushSize||4,n=t?.brushColor||"#000000";let i=!1;const r=Js(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL,{start:()=>{i=!1,this.ctx&&(this.ctx.save(),this.ctx.lineWidth=e,this.ctx.strokeStyle=n,this.ctx.beginPath())},end:()=>{this.ctx&&this.ctx.restore()}}).subscribe(o=>{this.ctx&&(i?this.ctx.lineTo(o.current.x,o.current.y):(i=!0,this.ctx.moveTo(o.current.x,o.current.y)),this.ctx.stroke())});return()=>{r.unsubscribe()}}drawMouseMoveBrush(t){const e=t?.brushSize||10,n=t?.brushDensity||50,i=t?.brushColor||"#000000",r=new Ft(i),o=r.r,a=r.g,h=r.b,c=Js(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL).subscribe(u=>{if(this.ctx){const l=this.ctx.getImageData(0,0,this.ctx.canvas.width,this.ctx.canvas.height),m=l.data;for(let f=0;f<n;f++){const p=Math.random()*Math.PI*2,y=Math.random()*e,v=u.current.x+Math.cos(p)*y|0,w=u.current.y+Math.sin(p)*y|0,_=(v+w*l.width)*4;m[_]=o,m[_+1]=a,m[_+2]=h,m[_+3]=255}this.ctx.putImageData(l)}});return()=>{c.unsubscribe()}}downloadSVG=()=>{this.SVG_EL&&F1(this.SVG_EL)}}class Qe extends ot{dx;dy;startColor;endColor;constructor(t){if(super(t),t?.lineLength){const e=Ae(q(t?.lineDegree||0),t.lineLength);this.dx=e.dx,this.dy=e.dy}else t?.lineDx||t?.lineDy?(this.dx=t?.lineDx||0,this.dy=t?.lineDy||0):(this.dx=0,this.dy=0);this.startColor=t?.startColor,this.endColor=t?.endColor,this.setAttr({stroke:this.startColor||"#000000"})}cloneShape(){return new Qe({...super.getBaseOptions(),lineDx:this.dx,lineDy:this.dy})}enableGradient(t,e){this.startColor=t,this.endColor=e,this.setAttr({stroke:this.startColor})}disableGradient(t){this.startColor=t,this.endColor=void 0,this.setAttr({stroke:this.startColor})}toSVGPathData(){return[["m",0,0],["l",this.dx,this.dy]]}toCanvasContext(t){this.startColor&&this.endColor&&this.setAttr({stroke:t.createLinearGradient(0,0,this.dx,this.dy,{0:this.startColor,1:this.endColor})}),t.beginPath(),t.moveTo(0,0),t.lineTo(this.dx,this.dy)}lineToAbsolutePoint(t){this.dx=t.x-this.x,this.dy=t.y-this.y}intersection(t){const e=this.transformOrigin(),i=this.pathD().transform(this.x,this.y,e.x,e.y,this.degree,this.scaleX,this.scaleY).normalizedLines[0],r=t.transformOrigin(),a=t.pathD().transform(this.x,this.y,r.x,r.y,t.degree,t.scaleX,t.scaleY).normalizedLines[0];return i.intersection(a)}}class Io extends Lt{constructor(t,e){super(t,e);const n=new Qe({...e,drag:{...e?.drag,followSibling:!0},lineLength:100,lineDegree:90});this.addShape(n);const i=new Qe({...e,drag:{...e?.drag,followSibling:!0},y:10+Math.random()*30,lineLength:10+Math.random()*30,lineDegree:Math.random()*120-150});this.addShape(i);const r=new Qe({...e,drag:{...e?.drag,followSibling:!0},y:10+Math.random()*30,lineLength:10+Math.random()*30,lineDegree:Math.random()*120-150});this.addShape(r)}cloneShapeCombo(){return new Io(this.options,this.commonChildShapeOptions)}}class bn extends ot{radius;constructor(t){super(t),this.radius=t?.ballRadius||0}cloneShape(){return new bn({...super.getBaseOptions(),ballRadius:this.radius})}getBoundingClientRect(){return{x:-this.radius,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 pn(this.x,this.y)}scalar(t){return this.moveTo(this.x*t,this.y*t),this}normalize(t=1){const e=this.length();if(e){const n=t/e;this.scalar(n)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,n=this.y;return{x:n*t.x-e*t.y,y:e*t.y-n*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,n=t.y-this.y;if(Math.sqrt(e*e+n*n)<this.radius+t.radius){const r=Math.atan2(n,e),o={x:0,y:0},a=Qt(-r,e,n),h=Qt(-r,this.vx,this.vy),c=Qt(-r,t.vx,t.vy),u=h.x-c.x;h.x=((this.mass-t.mass)*h.x+2*t.mass*c.x)/(this.mass+t.mass),c.x=u+h.x;const l=Math.abs(h.x)+Math.abs(c.x),m=this.radius+t.radius-Math.abs(o.x-a.x);o.x+=h.x/l*m,a.x+=c.x/l*m;const f=Qt(r,o.x,o.y),p=Qt(r,a.x,a.y);t.moveTo(this.x+p.x,this.y+p.y),this.moveTo(this.x+f.x,this.y+f.y);const y=Qt(r,h.x,h.y),v=Qt(r,c.x,c.y);this.vx=y.x,this.vy=y.y,t.vx=v.x,t.vy=v.y}}checkWall(t){const e=typeof t?.bounce=="number"?t.bounce:-1,n=t.wall.x,i=t.wall.y,r=t.wall.x+t.wall.width,o=t.wall.y+t.wall.height;this.x+this.radius>r?(this.moveXTo(r-this.radius),this.vx*=e):this.x-this.radius<n&&(this.moveXTo(n+this.radius),this.vx*=e),this.y+this.radius>o?(this.moveYTo(o-this.radius),this.vy*=e):this.y-this.radius<i&&(this.moveYTo(i+this.radius),this.vy*=e)}}class Do extends ot{constructor(t){super(t)}cloneShape(){return new Do({...super.getBaseOptions()})}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 Ke extends ot{width;height;borderRadius;constructor(t){super(t),this.width=t.rectWidth,this.height=t.rectHeight,this.borderRadius=t.rectBorderRadius||0}cloneShape(){return new Ke({...super.getBaseOptions(),rectWidth:this.width,rectHeight:this.height,rectBorderRadius:this.borderRadius})}static fromCubicBezier(t,e,n,i,r,o,a,h){const u=new gt({x:t,y:e,c1x:n,c1y:i,c2x:r,c2y:o,toX:a,toY:h}).getBoundingClientRect();return new Ke({x:u.x,y:u.y,rectWidth:u.width,rectHeight:u.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){return t.x>=this.x&&t.x<=this.x+this.width&&t.y>=this.y&&t.y<=this.y+this.height}}class Lo extends ot{rx;ry;constructor(t){super(t),this.rx=t?.heartRx||10,this.ry=t?.heartRy||10}cloneShape(){return new Lo({...super.getBaseOptions(),heartRx:this.rx,heartRy:this.ry})}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 Ro extends ot{rx;ry;constructor(t){super(t),this.rx=t?.heartRx??50,this.ry=t?.heartRy??50}cloneShape(){return new Ro({...super.getBaseOptions(),heartRx:this.rx,heartRy:this.ry})}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 Oo extends ot{r;constructor(t){super(t),this.r=t?.starR||20}cloneShape(){return new Oo({...super.getBaseOptions(),starR:this.r})}toSVGPathData(){const t=[["m",0,-this.r]];for(let e=0;e<6;e+=1){const n=288+e*144,i=this.r*Math.cos(q(n)),r=this.r*Math.sin(q(n));t.push(["l",i,r])}return t}}class zo extends ot{constructor(t){super(t)}cloneShape(){return new zo({...super.getBaseOptions()})}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 No extends ot{constructor(t){super(t)}cloneShape(){return new No({...super.getBaseOptions()})}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 Bo extends ot{constructor(t){super(t),this.d="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"}cloneShape(){return new Bo({...super.getBaseOptions()})}}class Fo extends ot{rx;ry;constructor(t){super(t),this.rx=t?.rx||0,this.ry=t?.ry||0}cloneShape(){return new Fo({...super.getBaseOptions(),rx:this.rx,ry:this.ry})}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 Yo extends Lt{constructor(t,e){super(t,e);const n=new ot({...e,drag:{...e?.drag,followSibling:!0},show:typeof t?.showFlame=="boolean"?t.showFlame:!1,d:[["M",-15,0],["L",-2.5,-5],["L",-2.5,5],["Z"]]});this.addShape(n);const i=new ot({...e,drag:{...e?.drag,followSibling:!0},d:[["M",10,0],["L",-10,10],["L",-5,0],["L",-10,-10],["L",10,0],["Z"]]});this.addShape(i)}cloneShapeCombo(){return new Yo({...this.options,showFlame:this.showFlame},this.commonChildShapeOptions)}set showFlame(t){this.shapes[0].show=t}get showFlame(){return this.shapes[0].show}}class $o extends Lt{width;height;cornerRadius;constructor(t,e){super(t,e),this.width=t.segmentWidth,this.height=t.segmentHeight,this.cornerRadius=typeof t.segmentCornerRadius=="number"?t.segmentCornerRadius:this.height*.5;const n=new Ke({...e,drag:{...e?.drag,followSibling:!0},x:0-this.cornerRadius,y:0-this.height*.5,rectWidth:this.width+this.cornerRadius*2,rectHeight:this.height,rectBorderRadius:this.cornerRadius});this.addShape(n);const i=new bn({...e,drag:{...e?.drag,followSibling:!0},x:0,y:0,ballRadius:2});this.addShape(i);const r=new bn({...e,drag:{...e?.drag,followSibling:!0},x:0+this.width,y:0,ballRadius:2});this.addShape(r)}cloneShapeCombo(){return new $o({...this.options,segmentWidth:this.width,segmentHeight:this.height},this.commonChildShapeOptions)}getBoundingClientRectCenter(){return{x:0,y:0}}getPin(){const t=this.shapes[1];return{x:t.x+Math.cos(q(t.degree))*this.width,y:t.y+Math.sin(q(t.degree))*this.width}}}class Xo extends Lt{value$=new mn;subscription;constructor(t,e){super(t,e);const n=t?.sliderMin||0,i=t?.sliderMax||100,r=t?.sliderStep||1,o=nf(n,i,r),a=o(typeof t?.sliderDefaultValue=="number"?N(t.sliderDefaultValue,n,i):n);this.value$.next(a);const h=a/(i-n),c=t?.sliderWidth||100,u=t?.sliderHeight||4,l=u*.5,m=u*2.5,f=t?.sliderBackgroundColor||"#f5f5f5",p=t?.sliderForegroundColor||"#5a82f0",y=new Ke({...e,rectWidth:c,rectHeight:u,rectBorderRadius:l,attrs:{...e?.attrs,fill:f},drag:{...e?.drag,enable:!1}});this.addShape(y);const v=new Ke({...e,rectWidth:c*h,rectHeight:u,rectBorderRadius:l,attrs:{...e?.attrs,fill:p},drag:{...e?.drag,enable:!1}});this.addShape(v);const w=new bn({...e,x:c*h,y:l,ballRadius:m,attrs:{...e?.attrs,fill:p},drag:{...e?.drag,enable:!0,alongPath:new St([["m",0,0],["l",c,0]])}});this.addShape(w),this.subscription=w.transform$.subscribe(({dx:_})=>{v.width=N(v.width+(_||0),0,c),this.value$.next(o((w.x-y.x)/c*(i-n)+n))})}destroy(){super.destroy(),this.subscription.unsubscribe()}cloneShapeCombo(){return new Xo({...this.options},this.commonChildShapeOptions)}}class rs extends ot{half;lineWidth;radius;startDegree;endDegree;percent=0;percentDegree=0;startColor;endColor;constructor(t){super(t),this.half=typeof t?.half=="boolean"?t?.half:!1,this.lineWidth=t.lineWidth;const e=t.width||0,n=t.height||0,i=(t.endDegree-t.startDegree-180)/2;if(t.radius)this.radius=t.radius;else if(this.half){const r=Math.min(e/2,n)-this.lineWidth;this.radius=Math.max(0,r-r*Math.sin(q(i)))}else this.radius=Math.max(0,Math.min(e/2,n/2)-this.lineWidth);t.x||(this.x=e/2),t.y||(this.half?this.y=n-this.lineWidth-this.radius*Math.sin(q(i)):this.y=n/2),t.forceCoordinate?(this.startDegree=t.startDegree,this.endDegree=t.endDegree):(this.startDegree=-90+t.startDegree,this.endDegree=-90+t.endDegree),this.startColor=t?.startColor,this.endColor=t?.endColor,this.setAttr({"stroke-linecap":"round","stroke-width":String(this.lineWidth),stroke:this.startColor||"#000000"}),this.setPercent(t.percent||1)}cloneShape(){return new rs({...super.getBaseOptions(),half:this.half,lineWidth:this.lineWidth,radius:this.radius,forceCoordinate:!0,startDegree:this.startDegree,endDegree:this.endDegree,startColor:this.startColor,endColor:this.endColor,percent:this.percent})}setPercent(t){this.percent=Math.max(0,t),this.percentDegree=this.startDegree+(this.endDegree-this.startDegree)*t}enableGradient(t,e){this.startColor=t,this.endColor=e,this.setAttr({stroke:this.startColor})}disableGradient(t){this.startColor=t,this.endColor=void 0,this.setAttr({stroke:this.startColor})}toSVGPathData(){const{dx:t,dy:e}=Ae(q(this.startDegree),this.radius),{dx:n,dy:i}=Ae(q(this.percentDegree),this.radius);return[["m",t,e],["a",this.radius,this.radius,0,Math.abs(this.percentDegree-this.startDegree)>=180?1:0,1,n-t,i-e]]}toCanvasContext(t){if(this.startColor&&this.endColor){let e;if(this.half){const n=this.radius-this.radius*Math.cos(Math.PI*this.percent),i=this.radius*Math.sin(Math.PI*this.percent);e=t.createLinearGradient(-this.radius,0,-this.radius+n,-i,{0:this.startColor,1:this.endColor})}else{const n=this.radius*Math.sin(2*Math.PI*this.percent),i=this.radius*Math.cos(2*Math.PI*this.percent);e=t.createLinearGradient(0,-this.radius,n,-i,{0:this.startColor,1:this.endColor})}this.setAttr({stroke:e})}t.beginPath(),t.arc(0,0,this.radius,q(this.startDegree),q(this.percentDegree),!1)}}class Uo extends Lt{half;lineWidth;width;height;bgColor;startColor;endColor;startDegree;endDegree;percent=0;ringBg;ring;lines=[];indicatorLineCount;constructor(t,e){if(super(t,e),this.half=typeof t?.half=="boolean"?t?.half:!1,this.lineWidth=t?.lineWidth||12,this.width=t.width,this.height=t.height,this.bgColor=t?.bgColor,this.startColor=t?.startColor,this.endColor=t?.endColor,this.half?(this.startDegree=t?.startDegree||-90-15,this.endDegree=t?.endDegree||90+15):(this.startDegree=t?.startDegree||0,this.endDegree=t?.endDegree||360),this.percent=t?.percent||0,this.ringBg=new rs({half:this.half,lineWidth:this.lineWidth,width:t.width,height:t.height,startDegree:this.startDegree,endDegree:this.endDegree,startColor:this.bgColor,percent:1}),this.addShape(this.ringBg),this.ring=new rs({half:this.half,lineWidth:this.lineWidth,width:t.width,height:t.height,startDegree:this.startDegree,endDegree:this.endDegree,startColor:this.startColor,endColor:this.endColor,percent:0}),this.addShape(this.ring),this.indicatorLineCount=22+1,this.half){const o=this.ringBg.radius-20-17;for(let a=0;a<this.indicatorLineCount;a++){const h=-90+this.startDegree+(this.endDegree-this.startDegree)/(this.indicatorLineCount-1)*a,c=new Qe({x:this.ringBg.x+Math.cos(q(h))*o,y:this.ringBg.y+Math.sin(q(h))*o,lineLength:17,lineDegree:h,attrs:{"stroke-linecap":"round","stroke-width":String(2),stroke:this.bgColor}});this.lines.push(c),this.addShape(c)}}this.setPercent(t.percent||0)}cloneShapeCombo(){return new Uo({half:this.half,lineWidth:this.lineWidth,width:this.width,height:this.height,bgColor:this.bgColor,startColor:this.startColor,endColor:this.endColor,startDegree:this.startDegree,endDegree:this.endDegree,percent:this.percent},this.commonChildShapeOptions)}setPercent(t){if(this.percent=Math.max(0,t),this.ring.setPercent(t),this.half)for(let e=0;e<this.indicatorLineCount;e++)e/(this.indicatorLineCount-1)<=this.percent?this.lines[e].enableGradient(this.startColor,this.endColor):this.lines[e].disableGradient(this.bgColor)}}function Gu(s,t={attributes:!0,childList:!0,subtree:!0}){return new et(e=>{const n=new MutationObserver((i,r)=>{e.next(i)});return n.observe(s,t),()=>{n.disconnect()}})}function qu(s,t={root:null}){return new et(e=>{const n=new IntersectionObserver((i,r)=>{if(i.length){const o=i[i.length-1];o&&e.next(o)}},t);return n.observe(s),()=>{n.unobserve(s),n.disconnect()}})}function tw(s,t){return xu().pipe(Te(null),rt(()=>{const{width:e,height:n}=t?.root?.getBoundingClientRect()||bu(),{top:i,left:r,right:o,bottom:a}=s.getBoundingClientRect();return(i>=0&&i<=n||a>=0&&a<=n)&&(r>=0&&r<=e||o>=0&&o<=e)}),Ce())}function ew(s,t){const e=typeof t?.threshold=="number"?t.threshold:.5;return qu(s,{threshold:e,root:t?.root}).pipe(rt(n=>n.isIntersecting&&n.intersectionRatio>=e),Ce())}let ju=!1;function nw(){ju||(ju=!0,_c(`
|
|
27
|
+
`);n=~$?R.length-$:n+R.length}function r(){var R={line:e,column:n};return function(D){return D.position=new o(R),p(),D}}function o(R){this.start=R,this.end={line:e,column:n},this.source=t.source}o.prototype.content=s;var a=[];function h(R){var D=new Error(t.source+":"+e+":"+n+": "+R);if(D.reason=R,D.filename=t.source,D.line=e,D.column=n,D.source=s,t.silent)a.push(D);else throw D}function c(){var R=m();return{type:"stylesheet",stylesheet:{source:t.source,rules:R,parsingErrors:a}}}function u(){return f(/^{\s*/)}function l(){return f(/^}/)}function m(){var R,D=[];for(p(),y(D);s.length&&s.charAt(0)!="}"&&(R=Ut()||te());)R!==!1&&(D.push(R),y(D));return D}function f(R){var D=R.exec(s);if(D){var $=D[0];return i($),s=s.slice($.length),D}}function p(){f(/^\s*/)}function y(R){var D;for(R=R||[];D=v();)D!==!1&&R.push(D);return R}function v(){var R=r();if(!(s.charAt(0)!="/"||s.charAt(1)!="*")){for(var D=2;s.charAt(D)!=""&&(s.charAt(D)!="*"||s.charAt(D+1)!="/");)++D;if(D+=2,s.charAt(D-1)==="")return h("End of comment missing");var $=s.slice(2,D-2);return n+=2,i($),s=s.slice(D),n+=2,R({type:"comment",comment:$})}}function w(){var R=f(/^([^{]+)/);if(R)return ye(R[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(D){return D.replace(/,/g,"")}).split(/\s*(?![^(]*\)),\s*/).map(function(D){return D.replace(/\u200C/g,",")})}function _(){var R=r(),D=f(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(D){if(D=ye(D[0]),!f(/^:\s*/))return h("property missing ':'");var $=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/),H=R({type:"declaration",property:D.replace(Ou,""),value:$?ye($[0]).replace(Ou,""):""});return f(/^[;\s]*/),H}}function x(){var R=[];if(!u())return h("missing '{'");y(R);for(var D;D=_();)D!==!1&&(R.push(D),y(R));return l()?R:h("missing '}'")}function b(){for(var R,D=[],$=r();R=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)D.push(R[1]),f(/^,\s*/);if(D.length)return $({type:"keyframe",values:D,declarations:x()})}function E(){var R=r(),D=f(/^@([-\w]+)?keyframes\s*/);if(D){var $=D[1];if(D=f(/^([-\w]+)\s*/),!D)return h("@keyframes missing name");var H=D[1];if(!u())return h("@keyframes missing '{'");for(var At,ee=y();At=b();)ee.push(At),ee=ee.concat(y());return l()?R({type:"keyframes",name:H,vendor:$,keyframes:ee}):h("@keyframes missing '}'")}}function C(){var R=r(),D=f(/^@supports *([^{]+)/);if(D){var $=ye(D[1]);if(!u())return h("@supports missing '{'");var H=y().concat(m());return l()?R({type:"supports",supports:$,rules:H}):h("@supports missing '}'")}}function L(){var R=r(),D=f(/^@host\s*/);if(D){if(!u())return h("@host missing '{'");var $=y().concat(m());return l()?R({type:"host",rules:$}):h("@host missing '}'")}}function B(){var R=r(),D=f(/^@media *([^{]+)/);if(D){var $=ye(D[1]);if(!u())return h("@media missing '{'");var H=y().concat(m());return l()?R({type:"media",media:$,rules:H}):h("@media missing '}'")}}function F(){var R=r(),D=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(D)return R({type:"custom-media",name:ye(D[1]),media:ye(D[2])})}function U(){var R=r(),D=f(/^@page */);if(D){var $=w()||[];if(!u())return h("@page missing '{'");for(var H=y(),At;At=_();)H.push(At),H=H.concat(y());return l()?R({type:"page",selectors:$,declarations:H}):h("@page missing '}'")}}function G(){var R=r(),D=f(/^@([-\w]+)?document *([^{]+)/);if(D){var $=ye(D[1]),H=ye(D[2]);if(!u())return h("@document missing '{'");var At=y().concat(m());return l()?R({type:"document",document:H,vendor:$,rules:At}):h("@document missing '}'")}}function J(){var R=r(),D=f(/^@font-face\s*/);if(D){if(!u())return h("@font-face missing '{'");for(var $=y(),H;H=_();)$.push(H),$=$.concat(y());return l()?R({type:"font-face",declarations:$}):h("@font-face missing '}'")}}var st=Yt("import"),K=Yt("charset"),Kt=Yt("namespace");function Yt(R){var D=new RegExp("^@"+R+"\\s*([^;]+);");return function(){var $=r(),H=f(D);if(H){var At={type:R};return At[R]=H[1].trim(),$(At)}}}function Ut(){if(s[0]=="@")return E()||B()||F()||C()||st()||K()||Kt()||G()||U()||L()||J()}function te(){var R=r(),D=w();return D?(y(),R({type:"rule",selectors:D,declarations:x()})):h("selector missing")}return bo(c())}function ye(s){return s?s.replace(/^\s+|\s+$/g,""):""}function bo(s,t){var e=s&&typeof s.type=="string",n=e?s:t;for(var i in s){var r=s[i];Array.isArray(r)?r.forEach(function(o){bo(o,n)}):r&&typeof r=="object"&&bo(r,n)}return e&&Object.defineProperty(s,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),s}let X1=class extends wo{currentItem={};items=[];groups=[];globalStyles={};grad={};idtops={};text="";constructor(t){super(t),this.on("tag",(e,n)=>{switch(this.text="",this.currentItem={type:e},e){case"g":this.groups.push(this.currentItem);break}this.processAttrs(e,n)}),this.on("text",e=>{if(this.currentItem.type=="style"){try{const n=xo(e);for(const i of n.stylesheet.rules)for(const r of i.declarations)for(const o of i.selectors)this.globalStyles[o]=this.globalStyles[o]||[],this.globalStyles[o].push(`${r.property}:${r.value}`)}catch{console.error("CAN'T parse css text: "+e)}return}this.text+=e}),this.on("/tag",(e,n)=>{let i=this.groups.length;for(;i--;)if(this.groups[i]!=this.currentItem){let r="",o="";for(const a in this.groups[i])a=="transform"?r=this.groups[i].transform:a=="class"&&this.globalStyles["."+this.groups[i][a]]?o=this.globalStyles["."+this.groups[i][a]].join(";")+";"+o:a=="id"&&this.globalStyles["#"+this.groups[i][a]]?o=this.globalStyles["#"+this.groups[i][a]].join(";")+";"+o:typeof this.currentItem[a]>"u"&&(this.currentItem[a]=this.groups[i][a]);typeof this.currentItem.transform>"u"?this.currentItem.transform=r:this.currentItem.transform+=" "+r,typeof this.currentItem.style>"u"?this.currentItem.style=o:this.currentItem.style=o+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),_o(this.currentItem.style,this.currentItem,So)}switch(this.processAttrs(e,n),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 n=[],i;switch(t){case"svg":let r="",o="";if(e.width&&e.height)r=e.width,o=e.height;else if(e.viewBox){const a=e.viewBox.split(/\s+/gi);a.length==4&&(r=String(parseFloat(a[2])-parseFloat(a[0])),o=String(parseFloat(a[3])-parseFloat(a[1])))}r&&o&&this.items.push({type:"viewbox",width:r,height:o});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&&_o(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+vo(parseFloat(e.x1),parseFloat(e.y1),parseFloat(e.x2),parseFloat(e.y2),parseFloat(e.x1)+100,parseFloat(e.y1))).toFixed(2),n=[this.grad.angle];for(let a=0,h=this.grad.stops.length;a<h;a++)i=this.grad.stops[a],a&&a!=h-1?n.push(i.color+":"+i.offset):n.push(i.color);this.idtops[this.grad.id]=n.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break;case"radialGradient":n=[];for(let a=0,h=this.grad.stops.length;a<h;a++)i=this.grad.stops[a],a&&a!=h-1?n.push(i.color+":"+i.offset):n.push(i.color);this.idtops[this.grad.id]=n.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break}for(const r in e){const o=e[r];if(So.includes(r)&&(this.currentItem[r]=o),r==="id"&&(this.currentItem.type==="linearGradient"&&(this.grad={id:r,stops:[]}),this.currentItem.type==="radialGradient"&&(this.grad={id:r,stops:[]})),r==="style"&&_o(o,this.currentItem,So),r==="transform"&&(this.currentItem.transform=o+(this.currentItem.transform||" ")),r==="fill"){const a=o.match(/url\(#([^)]+)\)/);if(a){const h=a[1];this.currentItem.fillid=h,this.idtops[h]&&(this.currentItem.fill=this.idtops[h])}}r==="points"&&this.currentItem.type=="polygon"&&(this.currentItem.path="M"+o+"z"),r==="d"&&this.currentItem.type=="path"&&(this.currentItem.path=o),r==="xlink:href"&&this.currentItem.type=="image"&&(this.currentItem.src=o)}}addToItems(){this.items.push(this.currentItem)}};function vo(s,t,e,n,i,r){if(typeof i>"u"||typeof r>"u"){const o=s-e,a=t-n;return!o&&!a?0:(180+Math.atan2(-a,-o)*180/Math.PI+360)%360}else return vo(s,t,i,r)-vo(e,n,i,r)}function _o(s,t,e){const n=(s+"").split(";"),i=/^\s+|\s+$/g;for(let r=0,o=n.length;r<o;r++){const a=n[r].split(":"),h=a[0].replace(i,"").replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()});(!e||e.includes(h))&&(t[h]=a[1].replace(i,""))}}const So=["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 St{startPathX=0;startPathY=0;prevPathX=0;prevPathY=0;normalizedLines=[];constructor(t){const e=typeof t=="string"?Du(t):t||[],n=$1(Lu(e));let i=!1;for(let r=0,o=n.length;r<o;r++){const a=n[r];a[0]=="M"?(i||(i=!0,this.startPathX=a[1],this.startPathY=a[2]),this.prevPathX=a[1],this.prevPathY=a[2]):this._appendLine(new gt({c1x:a[1],c1y:a[2],c2x:a[3],c2y:a[4],toX:a[5],toY:a[6]}))}}_appendLine(t){if(t instanceof go){Au(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(c=>{const[u,l,m,f,p,y,v,w]=c;this.normalizedLines.push(new gt({x:this.prevPathX,y:this.prevPathY,c1x:m,c1y:f,c2x:p,c2y:y,toX:v,toY:w})),this.prevPathX=v,this.prevPathY=w});return}if(t instanceof gt){this.normalizedLines.push(t.clone()),this.prevPathX=t.toX,this.prevPathY=t.toY;return}let e,n,i,r,o,a;t instanceof O1?[e,n,i,r,o,a]=yo(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,n,i,r,o,a]=ts(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new gt({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:n,c2x:i,c2y:r,toX:o,toY:a})),this.prevPathX=o,this.prevPathY=a}static fromPolymorphPoints(t){const e=new St;e.prevPathX=e.startPathX=t[0]||0,e.prevPathY=e.startPathY=t[1]||0;for(let n=2,i=t.length;n+5<i;n+=6)e._appendLine(new gt({c1x:t[n],c1y:t[n+1],c2x:t[n+2],c2y:t[n+3],toX:t[n+4],toY:t[n+5]}));return e}static fromLines(t){const e=new St;e.prevPathX=e.startPathX=t[0].x||0,e.prevPathY=e.startPathY=t[0].y||0;for(let n=0,i=t.length;n<i;n++)e._appendLine(t[n]);return e}clone(){return St.fromLines(this.normalizedLines)}toSVGPathData(){const t=[];t.push(["M",this.startPathX,this.startPathY]);for(let e=0,n=this.normalizedLines.length;e<n;e++)t.push(...this.normalizedLines[e].toSVGPathData());return t}toSVGPathD(){return Y1(this.toSVGPathData())}toCanvasContext(t){t.beginPath(),t.moveTo(this.startPathX,this.startPathY),this.normalizedLines.forEach(e=>{e.toCanvasContext(t)})}getBoundingClientRect(t=2){const e=[],n=[];if(this.normalizedLines.forEach(h=>{const c=h.getBoundingClientRect();e.push(c.x,c.x+c.width),n.push(c.y,c.y+c.height)}),e.length==0||n.length==0)return{x:0,y:0,width:0,height:0,center:{x:0,y:0}};const i=Math.min(...e),r=Math.min(...n),o=Math.max(...e),a=Math.max(...n);return{x:Z(i,t),y:Z(r,t),width:Z(o-i,t),height:Z(a-r,t)}}getBoundingClientRectCenter(t=2){const e=this.getBoundingClientRect(t);return{x:Z(e.x+e.width*.5,t),y:Z(e.y+e.height*.5,t)}}transform(t,e,n,i,r,o,a){const h=new _t;return h.translate(t,e),h.rotate(r,n,i),h.scale(o,a,n,i),h.isIdentity?this.clone():St.fromLines(this.normalizedLines.map(c=>{let u=c.x,l=c.y,m=c.c1x,f=c.c1y,p=c.c2x,y=c.c2y,v=c.toX,w=c.toY;return{x:u,y:l}=h.transformPoint({x:u,y:l}),{x:m,y:f}=h.transformPoint({x:m,y:f}),{x:p,y}=h.transformPoint({x:p,y}),{x:v,y:w}=h.transformPoint({x:v,y:w}),new gt({x:u,y:l,c1x:m,c1y:f,c2x:p,c2y:y,toX:v,toY:w})}))}getTotalLength(){return this.normalizedLines.reduce((t,e)=>t+=e.length(),0)}getPointAtLength(t){let e=0,n=0;const i=this.normalizedLines.length;for(let r=0;r<i;r++){const o=this.normalizedLines[r];if(n=o.length(),e+n>=t)return o.getPointAtSegmentLength(t-e);e+=n}return this.normalizedLines[i-1].getPointAtSegmentLength(n)}interpolate(t){const e=this.normalizedLines.length;if(e===0)return{x:0,y:0};if(e===1)return this.normalizedLines[0].interpolate(t);{let n=t*e,i=this.normalizedLines[0];if(n--,n>1)for(let r=1;r<e&&(i=this.normalizedLines[r],n>1);r++)n-=1;return i.interpolate(n)}}getSubPathD(t,e){if(this.getTotalLength()-e<1e-6)return this.getSubPathDAtLength(this,t);{const n=this.getSubPathDAtLength(this,e,1);return t?this.getSubPathDAtLength(n,t):n}}getSubPathDAtLength(t,e,n){let i=null,r=0;const o=new St;o.prevPathX=o.startPathX=t.startPathX,o.prevPathY=o.startPathY=t.startPathY;for(let a=0,h=this.normalizedLines.length;a<h;a++){const c=this.normalizedLines[a],u=c.length();if(r+u>e&&!i){const l=c.getPointAtSegmentLength(e-r);if(o._appendLine(new gt({c1x:l.start.x,c1y:l.start.y,c2x:l.m.x,c2y:l.m.y,toX:l.x,toY:l.y})),n)return o;i=o,o._appendLine(new gt({c1x:l.n.x,c1y:l.n.y,c2x:l.end.x,c2y:l.end.y,toX:c.x,toY:c.y})),r+=u;continue}r+=u,o._appendLine(c)}return o}closestPoint(t,e){const n=this.getTotalLength();let i={x:t,y:e},r=0,o=1/0,a=8;for(let c=0;c<=n;c+=a){const u=this.getPointAtLength(c),l=(t-u.x)*(t-u.x)+(e-u.y)*(e-u.y);l<o&&(i=u,r=c,o=l)}for(a/=2;a>.5;){const c=r-a,u=this.getPointAtLength(c),l=(t-u.x)*(t-u.x)+(e-u.y)*(e-u.y),m=r+a,f=this.getPointAtLength(m),p=(t-f.x)*(t-f.x)+(e-f.y)*(e-f.y);c>=0&&l<o?(i=u,r=c,o=l):m<=n&&p<o?(i=f,r=m,o=p):a/=2}const h=this.getPointAtLength(r+(r===n?-.1:.1));return{point:i,rotation:r>=n?Jt(h.x,h.y,i.x,i.y):Jt(i.x,i.y,h.x,h.y),distance:Math.sqrt(o)}}getPolymorphPoints(){return[this.startPathX,this.startPathY].concat(this.normalizedLines.reduce((t,e)=>t.concat([e.c1x,e.c1y,e.c2x,e.c2y,e.toX,e.toY]),[]))}getPolymorphPointsPerimeter(){const t=this.getPolymorphPoints(),e=t.length;let n=t[e-2],i=t[e-1],r=0;for(let o=0;o<e;o+=6)r+=Me(t[o],t[o+1],n,i),n=t[o],i=t[o+1];return Math.floor(r)}getExpendedPolymorphPointsPathD(t){const e=this.getPolymorphPoints(),n=e.length;let i=t-n;const r=Math.ceil(t/n),o=[];o.push(["M",e[0],e[1]]);let a=2;for(;a+5<=n-1;){const h=e[a++],c=e[a++],u=e[a++],l=e[a++],m=e[a++],f=e[a++];o.push(["C",h,c,u,l,m,f]);let p=0;for(;p<r&&i>0;)o.push(["C",m,f,m,f,m,f]),i-=6,p++}return new St(o)}static getInterpolator(t,e){return n=>Math.abs(n-0)<Number.EPSILON?new St(t.toSVGPathD()):Math.abs(n-1)<Number.EPSILON?new St(e.toSVGPathD()):St.fromPolymorphPoints(ef(t.getPolymorphPoints(),e.getPolymorphPoints(),n))}}const zu=U1("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);function U1(s,t=10){const e={},n=s.split(",");for(let i=0;i<n.length;i+=2){const r="&"+n[i+1]+";",o=parseInt(n[i],t);e[r]="&#"+o+";"}return e["\\xa0"]=" ",e}function Mt(s,t){const e=Object.keys(t);for(let n=0;n<e.length;n++)s=s.replace(new RegExp("{"+e[n]+"}","gi"),""+t[e[n]]);return s}function Qs(s){let t,e;if(!s)throw new Error("cannot create a random attribute name for an undefined object");const n="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=n[Math.floor(Math.random()*n.length)];while(s[t]);return t}function V1(s){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[s]||t.start}function G1(s){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[s]||t.alphabetic}const ns={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"},lineDash:{svgAttr:"stroke-dasharray",canvas:[],svg:null,apply:"stroke"},lineDashOffset:{svgAttr:"stroke-dashoffset",canvas:0,svg:0,apply:"stroke"}};class Co{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}addColorStop(t,e){const n=this.__ctx.__createElement("stop");if(n.setAttribute("offset",""+t),e.indexOf("rgba")!==-1){const r=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(e);r&&(n.setAttribute("stop-color",Mt("rgb({r},{g},{b})",{r:r[1],g:r[2],b:r[3]})),n.setAttribute("stop-opacity",r[4]))}else n.setAttribute("stop-color",e);this.__root.appendChild(n)}}class Nu{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}}class Ks{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:n=500}){t?(this.__canvas=t,this.__ctx=t.getContext("2d")):(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d")),this.width=e||t?.width||0,this.height=n||t?.height||0,this.__setDefaultStyles(),this.__styleStack=[this.__getStyleState()],this.__groupStack=[],this.__rootSVG=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__rootSVG.setAttribute("version","1.1"),this.__rootSVG.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__rootSVG.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__rootSVG.setAttribute("width",""+this.width),this.__rootSVG.setAttribute("height",""+this.height),this.__ids={},this.__SVGdefs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__rootSVG.appendChild(this.__SVGdefs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__rootSVG.appendChild(this.__currentElement)}__setDefaultStyles(){const t=Object.keys(ns);for(let e=0,n=t.length;e<n;e++){const i=t[e];this[i]=ns[i].canvas}}__getStyleState(){const t={},e=Object.keys(ns);for(let n=0,i=e.length;n<i;n++){const r=e[n];t[r]=this[r]}return t}__applyStyleState(t){const e=Object.keys(t);for(let n=0,i=e.length;n<i;n++){const r=e[n];this[r]=t[r]}}__createElement(t,e={},n=!1){const i=this.__document.createElementNS("http://www.w3.org/2000/svg",t),r=Object.keys(e);n&&(i.setAttribute("fill","none"),i.setAttribute("stroke","none"));for(let o=0;o<r.length;o++){const a=r[o];i.setAttribute(a,e[a])}return i}__applyStyleToCurrentElement(t){let e=this.__currentElement;const n=this.__currentElementsToStyle;n&&(e.setAttribute(t,""),e=n.element,n.children.forEach(r=>{r.setAttribute(t,"")}));const i=Object.keys(ns);for(let r=0;r<i.length;r++){const o=ns[i[r]],a=this[i[r]];if(o.apply){if(a instanceof Nu){if(a.__ctx)for(;a.__ctx.__SVGdefs.childNodes.length;){const h=a.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[h]=h,this.__SVGdefs.appendChild(a.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(o.apply,Mt("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof Co)e.setAttribute(o.apply,Mt("url(#{id})",{id:a.__root.getAttribute("id")}));else if(o.apply.indexOf(t)!==-1&&o.svg!==a)if((o.svgAttr==="stroke"||o.svgAttr==="fill")&&a.indexOf("rgba")!==-1){const c=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(a);if(c){e.setAttribute(o.svgAttr,Mt("rgb({r},{g},{b})",{r:c[1],g:c[2],b:c[3]}));let u=parseFloat(c[4]);const l=this.globalAlpha;l!=null&&(u*=l),e.setAttribute(o.svgAttr+"-opacity",""+u)}}else{let h=o.svgAttr;if(i[r]==="globalAlpha"&&(h=t+"-"+o.svgAttr,e.getAttribute(h)))continue;h&&e.setAttribute(h,a)}}}}__closestGroupOrSvg(t){return t=t||this.__currentElement,t.nodeName==="g"||t.nodeName==="svg"?t:this.__closestGroupOrSvg(t.parentNode)}getSerializedSvg(t){let e=new XMLSerializer().serializeToString(this.__rootSVG);if(/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi.test(e)&&(e=e.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),t){const i=Object.keys(zu);for(let r=0,o=i.length;r<o;r++){const a=i[r],h=zu[a],c=new RegExp(a,"gi");c.test(e)&&(e=e.replace(c,h))}}return e}getSvg(){return this.__rootSVG}save(){const t=this.__createElement("g"),e=this.__closestGroupOrSvg();this.__groupStack.push(e),e.appendChild(t),this.__currentElement=t,this.__styleStack.push(this.__getStyleState())}restore(){this.__currentElementsToStyle=null;const t=this.__groupStack.pop();t?this.__currentElement=t:this.__currentElement=this.__rootSVG.childNodes[1];const e=this.__styleStack.pop();e&&this.__applyStyleState(e)}__addTransform(t){const e=this.__closestGroupOrSvg();if(e.childNodes.length>0){this.__currentElement.nodeName==="path"&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());const i=this.__createElement("g");e.appendChild(i),this.__currentElement=i}let n=this.__currentElement.getAttribute("transform");n?n+=" ":n="",n+=t,this.__currentElement.setAttribute("transform",n)}scale(t,e){e===void 0&&(e=t),this.__addTransform(Mt("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(Mt("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(Mt("translate({x},{y})",{x:t,y:e}))}transform(t,e,n,i,r,o){this.__addTransform(Mt("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:n,d:i,e:r,f:o}))}beginPath(){this.__currentDefaultPath="",this.__currentPosition={};const t=this.__createElement("path",{},!0);this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t}__applyCurrentDefaultPath(){const t=this.__currentElement;t.nodeName==="path"&&t.setAttribute("d",this.__currentDefaultPath)}__addPathCommand(t){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=t}moveTo(t,e){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:t,y:e},this.__addPathCommand(Mt("M {x} {y}",this.__currentPosition))}closePath(){this.__currentDefaultPath&&this.__addPathCommand("Z")}lineTo(t,e){this.__currentPosition={x:t,y:e},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(Mt("L {x} {y}",this.__currentPosition)):this.__addPathCommand(Mt("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,n,i,r,o){this.__currentPosition={x:r,y:o},this.__addPathCommand(Mt("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:n,cp2y:i,x:r,y:o}))}quadraticCurveTo(t,e,n,i){this.__currentPosition={x:n,y:i},this.__addPathCommand(Mt("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:n,y:i}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,n,i,r){const o=this.__currentPosition&&this.__currentPosition.x,a=this.__currentPosition&&this.__currentPosition.y;if(typeof o>"u"||typeof a>"u")return;if(r<0)throw new Error("IndexSizeError: The radius provided ("+r+") is negative.");if(o===t&&a===e||t===n&&e===i||r===0){this.lineTo(t,e);return}const h=this.normalize([o-t,a-e]),c=this.normalize([n-t,i-e]);if(h[0]*c[1]===h[1]*c[0]){this.lineTo(t,e);return}const u=h[0]*c[0]+h[1]*c[1],l=Math.acos(Math.abs(u)),m=this.normalize([h[0]+c[0],h[1]+c[1]]),f=r/Math.sin(l/2),p=t+f*m[0],y=e+f*m[1],v=[-h[1],h[0]],w=[c[1],-c[0]],_=function(E){const C=E[0];return E[1]>=0?Math.acos(C):-Math.acos(C)},x=_(v),b=_(w);this.lineTo(p+v[0]*r,y+v[1]*r),this.arc(p,y,r,x,b)}stroke(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")}fill(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")}rect(t,e,n,i){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+n,e),this.lineTo(t+n,e+i),this.lineTo(t,e+i),this.lineTo(t,e),this.closePath()}fillRect(t,e,n,i){const r=this.__createElement("rect",{x:t,y:e,width:n,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,n,i){const r=this.__createElement("rect",{x:t,y:e,width:n,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),n=this.__rootSVG.childNodes[1],i=n.childNodes;for(let r=i.length-1;r>=0;r--)i[r]&&n.removeChild(i[r]);this.__currentElement=n,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,n,i){if(t===0&&e===0&&n===this.width&&i===this.height){this.__clearCanvas();return}const r=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:t,y:e,width:n,height:i,fill:"#FFFFFF"},!0);r.appendChild(o)}createLinearGradient(t,e,n,i){const r=this.__createElement("linearGradient",{id:Qs(this.__ids),x1:t+"px",x2:n+"px",y1:e+"px",y2:i+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(r),new Co(r,this)}createRadialGradient(t,e,n,i,r,o){const a=this.__createElement("radialGradient",{id:Qs(this.__ids),cx:i+"px",cy:r+"px",r:o+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(a),new Co(a,this)}__parseFont(){const e=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext]))(?:\s*\/\s*(normal|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext])))?\s*([-,'"\sa-z0-9]+?)\s*$/i.exec(this.font),n={style:e[1]||"normal",size:e[4]||"10px",family:e[6]||"sans-serif",weight:e[3]||"normal",decoration:e[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(n.decoration="underline"),this.__fontHref&&(n.href=this.__fontHref),n}__wrapTextLink(t,e){if(t.href){const n=this.__createElement("a");return n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),n.appendChild(e),n}return e}__applyText(t,e,n,i){const r=this.__parseFont(),o=this.__closestGroupOrSvg(),a=this.__createElement("text",{"font-family":r.family,"font-size":r.size,"font-style":r.style,"font-weight":r.weight,"text-decoration":r.decoration,x:e,y:n,"text-anchor":V1(this.textAlign),"dominant-baseline":G1(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(t)),this.__currentElement=a,this.__applyStyleToCurrentElement(i),o.appendChild(this.__wrapTextLink(r,a))}fillText(t,e,n){this.__applyText(t,e,n,"fill")}strokeText(t,e,n){this.__applyText(t,e,n,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,n,i,r,o){if(i===r)return;i=i%(2*Math.PI),r=r%(2*Math.PI),i===r&&(r=(r+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));const a=t+n*Math.cos(r),h=e+n*Math.sin(r),c=t+n*Math.cos(i),u=e+n*Math.sin(i),l=o?0:1;let m=0,f=r-i;f<0&&(f+=2*Math.PI),o?m=f>Math.PI?0:1:m=f>Math.PI?1:0,this.lineTo(c,u),this.__addPathCommand(Mt("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:n,ry:n,xAxisRotation:0,largeArcFlag:m,sweepFlag:l,endX:a,endY:h})),this.__currentPosition={x:a,y:h}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),n=Qs(this.__ids),i=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",n),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",Mt("url(#{id})",{id:n})),t.appendChild(i),this.__currentElement=i}drawImage(...t){let e=t[0],n,i,r,o,a=0,h=0,c,u,l,m,f,p,y,v;if(t.length===3)n=t[1],i=t[2],c=e.width,u=e.height,r=c,o=u;else if(t.length===5)n=t[1],i=t[2],r=t[3],o=t[4],c=e.width,u=e.height;else if(t.length===9)a=t[1],h=t[2],c=t[3],u=t[4],n=t[5],i=t[6],r=t[7],o=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const w=this.__closestGroupOrSvg();this.__currentElement;const _="translate("+n+", "+i+")";if(e instanceof Ks){if(l=e.getSvg().cloneNode(!0),l.childNodes&&l.childNodes.length>1){for(m=l.childNodes[0];m.childNodes.length;)v=m.childNodes[0].getAttribute("id"),this.__ids[v]=v,this.__SVGdefs.appendChild(m.childNodes[0]);if(f=l.childNodes[1],f){const x=f.getAttribute("transform");let b;x?b=x+" "+_:b=_,f.setAttribute("transform",b),w.appendChild(f)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(p=this.__createElement("image"),p.setAttribute("width",r),p.setAttribute("height",o),p.setAttribute("preserveAspectRatio","none"),(a||h||c!==e.width||u!==e.height)&&(y=this.__document.createElement("canvas"),y.width=r,y.height=o,y.getContext("2d")?.drawImage(e,a,h,c,u,0,0,r,o),e=y),p.setAttribute("transform",_),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),w.appendChild(p))}createPattern(t,e){const n=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),i=Qs(this.__ids);let r;return n.setAttribute("id",i),t.nodeName==="CANVAS"||t.nodeName==="IMG"?(r=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),r.setAttribute("width",""+t.width),r.setAttribute("height",""+t.height),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.nodeName==="CANVAS"?t.toDataURL():t.getAttribute("src")),n.appendChild(r),this.__SVGdefs.appendChild(n)):t instanceof Ks&&(n.setAttribute("width",""+t.width),n.setAttribute("height",""+t.height),n.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(n)),new Nu(n,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}}class To{canvas;context;customContext;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,n,i=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),i&&(this.customContext=new Ks({canvas:this.canvas,width:e||this.canvas.width,height:n||this.canvas.height}))}set lineWidth(t){this.hasSetCustomStrokeStyle=!0,this.context.lineWidth=t,this.customContext&&(this.customContext.lineWidth=t)}get lineWidth(){return this.context.lineWidth}set lineCap(t){this.hasSetCustomStrokeStyle=!0,this.context.lineCap=t,this.customContext&&(this.customContext.lineCap=t)}get lineCap(){return this.context.lineCap}set lineJoin(t){this.hasSetCustomStrokeStyle=!0,this.context.lineJoin=t,this.customContext&&(this.customContext.lineCap=t)}get lineJoin(){return this.context.lineJoin}set lineDashOffset(t){this.hasSetCustomStrokeStyle=!0,this.context.lineDashOffset=t,this.customContext&&(this.customContext.lineDashOffset=t)}get lineDashOffset(){return this.context.lineDashOffset}set miterLimit(t){this.hasSetCustomStrokeStyle=!0,this.context.miterLimit=t,this.customContext&&(this.customContext.miterLimit=t)}get miterLimit(){return this.context.miterLimit}set globalAlpha(t){this.context.globalAlpha=t,this.customContext&&(this.customContext.globalAlpha=t)}get globalAlpha(){return this.context.globalAlpha}set fillStyle(t){this.hasSetCustomFillStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.fillStyle=t,this.customContext&&(this.customContext.fillStyle=t)):(this.context.fillStyle=t.gradient,this.customContext&&(this.customContext.fillStyle=t.gradientCustom))}get fillStyle(){return this.context.fillStyle}set strokeStyle(t){this.hasSetCustomStrokeStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.strokeStyle=t,this.customContext&&(this.customContext.strokeStyle=t)):(this.context.strokeStyle=t.gradient,this.customContext&&(this.customContext.strokeStyle=t.gradientCustom))}get strokeStyle(){return this.context.strokeStyle}set font(t){this.context.font=t,this.customContext&&(this.customContext.font=t)}get font(){return this.context.font}set textBaseline(t){this.context.textBaseline=t,this.customContext&&(this.customContext.textBaseline=t)}get textBaseline(){return this.context.textBaseline}set textAlign(t){this.context.textAlign=t,this.customContext&&(this.customContext.textAlign=t)}get textAlign(){return this.context.textAlign}fill(t){return t?this.context.fill(t):(this.context.fill(),this.customContext&&this.customContext.fill()),this}fillRect(t,e,n,i){return this.context.fillRect(t,e,n,i),this.customContext&&this.customContext.fillRect(t,e,n,i),this}fillText(t,e,n,i){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,n,i),this.customContext&&this.customContext.fillText(t,e,n),this}setLineDash(t){return this.context.setLineDash(t),this.customContext&&this.customContext.setLineDash(t),this}stroke(t){return t?this.context.stroke(t):(this.context.stroke(),this.customContext&&this.customContext.stroke()),this}strokeText(t,e,n,i){return this.context.strokeText(t,e,n,i),this.customContext&&this.customContext.strokeText(t,e,n),this}strokeRect(t,e,n,i){return this.context.strokeRect(t,e,n,i),this.customContext&&this.customContext.strokeRect(t,e,n,i),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,n=this.canvas.width,i=this.canvas.height){return this.context.clearRect(t,e,n,i),this.customContext&&this.customContext.clearRect(t,e,n,i),this}save(){return this.context.save(),this.customContext&&this.customContext.save(),this.currentMatrix=new DOMMatrix,this.path2Ds.push(this.currentPath2D),this.currentPath2D=new Path2D,this}restore(){return this.context.restore(),this.customContext&&this.customContext.restore(),this.hasSetCustomStrokeStyle=!1,this.hasSetCustomFillStyle=!1,this.currentMatrix=new DOMMatrix,this.currentPath2D=this.path2Ds.pop()||new Path2D,this}beginPath(){return this.context.beginPath(),this.customContext&&this.customContext.beginPath(),this}closePath(){return this.context.closePath(),this.customContext&&this.customContext.closePath(),this.currentPath2D.closePath(),this}changePath2D(t=this.currentPath2D,e=this.currentMatrix){const n=new Path2D;n.addPath(t,e),this.currentPath2D=n}isPointInStroke(...t){return t[0]instanceof Path2D?this.context.isPointInStroke(t[0],t[1],t[2]):this.context.isPointInStroke(t[0],t[1])}isPointInPath(...t){return t[0]instanceof Path2D?this.context.isPointInPath(t[0],t[1],t[2]):this.context.isPointInPath(t[0],t[1])}translate(t,e){return this.context.translate(t,e),this.customContext&&this.customContext.translate(t,e),this.currentMatrix.translate(t,e),this.changePath2D(),this}rotate(t,e=0,n=0){return this.translate(e,n),this.context.rotate(t),this.customContext&&this.customContext.rotate(t),this.currentMatrix.rotate(t),this.translate(-e,-n),this.changePath2D(),this}scale(t,e=t,n=0,i=0){return this.translate(n,i),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix.scale(t,e),this.translate(-n,-i),this.changePath2D(),this}moveTo(t,e){return this.context.moveTo(t,e),this.customContext&&this.customContext.moveTo(t,e),this.currentPath2D.moveTo(t,e),this}lineTo(t,e){return this.context.lineTo(t,e),this.customContext&&this.customContext.lineTo(t,e),this.currentPath2D.lineTo(t,e),this}arc(t,e,n,i,r,o){return this.context.arc(t,e,n,i,r,o),this.customContext&&this.customContext.arc(t,e,n,i,r,o?-1:1),this.currentPath2D.arc(t,e,n,i,r,o),this}arcTo(t,e,n,i,r){return this.context.arcTo(t,e,n,i,r),this.customContext&&this.customContext.arcTo(t,e,n,i,r),this.currentPath2D.arcTo(t,e,n,i,r),this}ellipse(t,e,n,i,r,o,a,h){return this.context.ellipse(t,e,n,i,r,o,a,h),this.currentPath2D.ellipse(t,e,n,i,r,o,a,h),this}quadraticCurveTo(t,e,n,i){return this.context.quadraticCurveTo(t,e,n,i),this.customContext&&this.customContext.quadraticCurveTo(t,e,n,i),this.currentPath2D.quadraticCurveTo(t,e,n,i),this}bezierCurveTo(t,e,n,i,r,o){return this.context.bezierCurveTo(t,e,n,i,r,o),this.customContext&&this.customContext.bezierCurveTo(t,e,n,i,r,o),this.currentPath2D.bezierCurveTo(t,e,n,i,r,o),this}rect(t,e,n,i){return this.context.rect(t,e,n,i),this.customContext&&this.customContext.rect(t,e,n,i),this.currentPath2D.rect(t,e,n,i),this}createLinearGradient(t,e,n,i,r){const o=this.context.createLinearGradient(t,e,n,i);return r&&Object.entries(r).forEach(([a,h])=>{o.addColorStop(parseFloat(a),h)}),o}createRadialGradient(t,e,n,i,r,o,a){const h=this.context.createRadialGradient(t,e,n,i,r,o);return a&&Object.entries(a).forEach(([c,u])=>{h.addColorStop(parseFloat(c),u)}),h}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const n=e[0],i=e[1];this.context.drawImage(t,n,i)}else if(e.length===4){const n=e[0],i=e[1],r=e[2],o=e[3];this.context.drawImage(t,n,i,r,o)}else if(e.length===8){const n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],h=e[5],c=e[6],u=e[7];this.context.drawImage(t,n,i,r,o,a,h,c,u)}else throw new Error("Invalid number of arguments passed to drawImage: "+e.length);return this.customContext&&this.customContext.drawImage(t,...e),this}getImageData(t=0,e=0,n=this.canvas.width,i=this.canvas.height,r){return this.context.getImageData(t,e,n,i,r)}putImageData(t,e=0,n=0){return this.context.putImageData(t,e,n)}createPattern(t,e){return this.context.createPattern(t,e)}toRawSVG(){if(this.customContext){const t=this.customContext.getSerializedSvg(!0),e=this.customContext.getSvg();return{raw:t,element:e}}else return{raw:"",element:null}}}const ss={1:705234,2:8108026,3:6346665,4:16630114,5:16607842,6:16158139,7:2542847,8:10640125,9:16735870,10:8978266,11:16580418,12:16754221,13:16725759,14:14436630,15:6844849,16:13744437,17:1817755,18:16744272,19:4964291,20:16750848,d:14540253,aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};class Ft{_color={r:0,g:0,b:0,a:1};constructor(t,e){t&&this.setColor(t),this.setAlpha(e)}get color(){return this._color}set color(t){const e=`Color: Unknown color(${t}) type(${typeof t})`;if(typeof t=="number")this.setHEX(t);else if(typeof t=="string"){let n;if(n=/^(\w+)\(([^)]*)\)/.exec(t)){const i=n[2];let r;switch(n[1]){case"rgb":case"rgba":(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))?(this.r=parseInt(r[1],10),this.g=parseInt(r[2],10),this.b=parseInt(r[3],10),this.a=r[4]?parseFloat(r[4]):1):(r=/^\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))?(this.r=N(parseFloat(r[1]),0,100)*255/100,this.g=N(parseFloat(r[2]),0,100)*255/100,this.b=N(parseFloat(r[3]),0,100)*255/100,this.a=r[4]?parseFloat(r[4]):1):console.warn(e);break;case"hsl":case"hsla":(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)%\s*,\s*(\d*\.?\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))?this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,r[4]?parseFloat(r[4]):1):console.warn(e);break;case"hsv":case"hsva":case"hsb":case"hsba":(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)%\s*,\s*(\d*\.?\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))?this.setHSV(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,r[4]?parseFloat(r[4]):1):console.warn(e);break;default:console.warn(e)}}else if(n=/#([A-Fa-f0-9]+)/.exec(t)){const i=n[1],r=i.length;r===3?this.setRGB(parseInt(i.charAt(0),16),parseInt(i.charAt(1),16),parseInt(i.charAt(2),16),1):r===6||r===8?this.setHEX(parseInt(i,16)):console.warn(e)}else if(t&&t.length>0)try{this.setColorName(t)}catch{console.warn(e)}else console.warn(e)}else t instanceof Ft?this.setRGB(t.r,t.g,t.b,t.a):Object.prototype.hasOwnProperty.call(t,"r")&&Object.prototype.hasOwnProperty.call(t,"g")&&Object.prototype.hasOwnProperty.call(t,"b")?this.setRGB(t.r,t.g,t.b,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"l")?this.setHSL(t.h,t.s,t.l,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"v")?this.setHSV(t.h,t.s,t.v,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"b")?this.setHSV(t.h,t.s,t.b,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):console.warn(e)}setColor(t){return this.color=t,this}set(t){return this.setColor(t)}get r(){return this._color.r}set r(t){try{this._color.r=N(Math.round(qt(t)),0,255)}catch{}}get g(){return this._color.g}set g(t){try{this._color.g=N(Math.round(qt(t)),0,255)}catch{}}get b(){return this._color.b}set b(t){try{this._color.b=N(Math.round(qt(t)),0,255)}catch{}}get a(){return this._color.a}set a(t){try{this._color.a=N(qt(t),0,1)}catch{}}setAlpha(t){return this.a=t,this}setFromVector3(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}applyMatrix3(t){const e=this.r,n=this.g,i=this.b,r=t.value;return this.r=r[0]*e+r[3]*n+r[6]*i,this.g=r[1]*e+r[4]*n+r[7]*i,this.b=r[2]*e+r[5]*n+r[8]*i,this}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),this}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this.a=t[e+3],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t[e+3]=this.a,t}toRGBString(){return this.a===1?`rgb(${this.r},${this.g},${this.b})`:`rgba(${this.r},${this.g},${this.b},${Z(this.a,6)})`}toHexString(){return this.a===1?("000000"+this.hex.toString(16)).slice(-6):("00000000"+this.hex.toString(16)).slice(-8)}toString(){return this.a===1?"#"+this.toHexString():this.toRGBString()}toColorSpaceString(t=We){Mo.fromWorkingColorSpace(we.copy(this),t);const e=we.r,n=we.g,i=we.b;return t!==We?`color(${t} ${e.toFixed(3)} ${n.toFixed(3)} ${i.toFixed(3)})`:this.toRGBString()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b,yield this.a}clone(){return new Ft(this.color)}copy(t){return this.setColor(t.color),this}copySRGBToLinear(t){return this.r=Je(t.r),this.g=Je(t.g),this.b=Je(t.b),this}copyLinearToSRGB(t){return this.r=Ze(t.r),this.g=Ze(t.g),this.b=Ze(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}add(t){return this.r=this.r+t.r,this.g=this.g+t.g,this.b=this.b+t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r=this.r+t,this.g=this.g+t,this.b=this.b+t,this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}sub(t){return this.r=this.r-t.r,this.g=this.g-t.g,this.b=this.b-t.b,this}multiply(t){return this.r=this.r*t.r,this.g=this.g*t.g,this.b=this.b*t.b,this}multiplyScalar(t){return this.r=this.r*t,this.g=this.g*t,this.b=this.b*t,this}opposite(t=!0,e="#000000",n="#ffffff"){if(t)return this.setColor(this.r*.299+this.g*.587+this.b*.114>186?e:n);{const{r:i,g:r,b:o}=this.color;return this.r=255-i,this.g=255-r,this.b=255-o,this}}lighten(t){t=N(t,0,1);const{r:e,g:n,b:i}=this.color;return this.r=e+(255-e)*t,this.g=n+(255-n)*t,this.b=i+(255-i)*t,this}darken(t){t=N(t,0,1);const{r:e,g:n,b:i}=this.color;return this.r=e*(1-t),this.g=n*(1-t),this.b=i*(1-t),this}lerp(t,e){e=N(e,0,1);const{r:n,g:i,b:r}=this.color;return this.r=n+(t.r-n)*e,this.g=i+(t.g-i)*e,this.b=r+(t.b-r)*e,this}lerpColors(t,e,n){return n=N(n,0,1),this.r=t.r+(e.r-t.r)*n,this.g=t.g+(e.g-t.g)*n,this.b=t.b+(e.b-t.b)*n,this}static gradient(t,e,n){try{return we.lerpColors(new Ft(t),new Ft(e),n).toString()}catch{return e}}static random(){return we.setHEX(Math.random()*16777215).toString()}static nextIndex=0;static next(t=Ft.nextIndex){Ft.nextIndex=t;const e=Object.keys(ss),n=e.length;return we.setHEX(ss[e[Ft.nextIndex++%n]]).toString()}setColorName(t){const e=ss[t.toLowerCase()];return e!==void 0?this.setHEX(e):t==="none"?this.a=0:(this.a=1,console.warn("Color.setColorName: Unknown color "+t)),this}static getColors(){return Object.values(ss).map(t=>we.setHEX(t).toString())}setRGB(t,e,n,i=1){return this.r=t,this.g=e,this.b=n,this.a=i,this}get rgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}setHEX(t){return t=Math.floor(t),t<16777216?(this.r=t>>16&255,this.g=t>>8&255,this.b=t&255,this.a=1):(this.r=t>>24&255,this.g=t>>16&255,this.b=t>>8&255,this.a=(t&255)/255),this}get hex(){let t=(this.r<<16)+(this.g<<8)+this.b;return this.a!==1&&(t=t<<8,t+=Math.round(this.a*255)),t}setHSL(t,e,n,i=1){const r=tf(t,1),o=N(e,0,1),a=N(n,0,1);if(o===0)this.r=a*255,this.g=a*255,this.b=a*255;else{const h=a<=.5?a*(1+o):a+o-a*o,c=2*a-h;this.r=Ao(c,h,r+1/3)*255,this.g=Ao(c,h,r)*255,this.b=Ao(c,h,r-1/3)*255}return this.a=i,this}getHSL(t){const e=this.r,n=this.g,i=this.b,r=Math.max(e,n,i)/255,o=Math.min(e,n,i)/255;let a,h;const c=(o+r)/2;if(o===r)a=0,h=0;else{const u=r-o;switch(h=c<=.5?u/(r+o):u/(2-r-o),r){case e:a=(n-i)/u+(n<i?6:0);break;case n:a=(i-e)/u+2;break;case i:default:a=(e-n)/u+4;break}a/=6}return t&&t.setHSL(a,h,c,this.a),{h:a,s:h,l:c,a:this.a}}offsetHSL(t,e,n){const i=this.getHSL();return this.setHSL(i.h+t,i.s+e,i.l+n)}lerpHSL(t,e){const n=this.getHSL(),i=t.getHSL(),r=ds(n.h,i.h,e),o=ds(n.s,i.s,e),a=ds(n.l,i.l,e);return this.setHSL(r,o,a),this}setHSV(t,e,n,i=1){const r=N(t,0,1)*360,o=N(e,0,1),a=N(n,0,1),h=Math.floor(r/60)%6,c=r/60-Math.floor(r/60),u=a*(1-o),l=a*(1-c*o),m=a*(1-(1-c)*o),f=[[a,m,u],[l,a,u],[u,a,m],[u,l,a],[m,u,a],[a,u,l]][h];return this.r=f[0]*255,this.g=f[1]*255,this.b=f[2]*255,this.a=i,this}setHSB(t,e,n,i=1){this.setHSV(t,e,n,i)}getHSV(t){const{r:e,g:n,b:i,a:r}=this.color,o=Math.max(e,n,i),a=Math.min(e,n,i),h=o-a;let c;e===o?c=(n-i)/h:n===o?c=2+(i-e)/h:c=4+(e-n)/h,c/=6,c<0&&(c+=1);const u=h==0?0:c,l=o===0?0:h/o,m=o/255;return t&&t.setHSV(u,l,m,r),{h:u,s:l,v:m,a:r}}getHSB(t){const{h:e,s:n,v:i,a:r}=this.getHSV(t);return{h:e,s:n,b:i,a:r}}}const we=new Ft,Bu="",We="srgb",Eo="srgb-linear",Po="linear",ti="srgb";function Je(s){return s<.04045?s*.0773993808:Math.pow(s*.9478672986+.0521327014,2.4)}function Ze(s){return s<.0031308?s*12.92:1.055*Math.pow(s,.41666)-.055}const Fu=new gn().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Yu=new gn().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715),$u=[.64,.33,.3,.6,.15,.06],Xu=[.2126,.7152,.0722],Uu=[.3127,.329],Mo={enabled:!0,workingColorSpace:Eo,spaces:{},convert:function(s,t,e){return this.enabled===!1||t===e||!t||!e||(this.spaces[t].transfer===ti&&(s.r=Je(s.r),s.g=Je(s.g),s.b=Je(s.b)),this.spaces[t].primaries!==this.spaces[e].primaries&&(s.applyMatrix3(this.spaces[t].toXYZ),s.applyMatrix3(this.spaces[e].fromXYZ)),this.spaces[e].transfer===ti&&(s.r=Ze(s.r),s.g=Ze(s.g),s.b=Ze(s.b))),s},fromWorkingColorSpace:function(s,t){return this.convert(s,this.workingColorSpace,t)},toWorkingColorSpace:function(s,t){return this.convert(s,t,this.workingColorSpace)},getPrimaries:function(s){return this.spaces[s].primaries},getTransfer:function(s){return s===Bu?Po:this.spaces[s].transfer},getLuminanceCoefficients:function(s,t=this.workingColorSpace){return s.fromArray(this.spaces[t].luminanceCoefficients)},define:function(s){Object.assign(this.spaces,s)},_getMatrix:function(s,t,e){return s.copy(this.spaces[t].toXYZ).multiply(this.spaces[e].fromXYZ)},_getDrawingBufferColorSpace:function(s){return this.spaces[s].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(s=this.workingColorSpace){return this.spaces[s].workingColorSpaceConfig.unpackColorSpace}};Mo.define({[Eo]:{primaries:$u,whitePoint:Uu,transfer:Po,toXYZ:Fu,fromXYZ:Yu,luminanceCoefficients:Xu,workingColorSpaceConfig:{unpackColorSpace:We},outputColorSpaceConfig:{drawingBufferColorSpace:We}},[We]:{primaries:$u,whitePoint:Uu,transfer:ti,toXYZ:Fu,fromXYZ:Yu,luminanceCoefficients:Xu,outputColorSpaceConfig:{drawingBufferColorSpace:We}}});function Ao(s,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?s+(t-s)*6*e:e<1/2?t:e<2/3?s+(t-s)*6*(2/3-e):s}class ot{id;d;parent;attrs;_centerX;_centerY;_x;_y;_degree;_scaleX;_scaleY;vx;vy;ax;ay;mass;show;followMouse;drag;transform$=new mn;isMouseIn=!1;isDragging=!1;el;constructor(t){this.id=on(),this.d=t?.d,this.attrs={stroke:"none",fill:"none"},t?.attrs&&this.setAttr(t?.attrs),this._centerX=t?.centerX,this._centerY=t?.centerY,this._x=t?.x||0,this._y=t?.y||0,this._degree=t?.degree||0,this._scaleX=1,this._scaleY=1,t?.scale!==void 0&&(this._scaleX=t.scale,this._scaleY=t.scale),t?.scaleX!==void 0&&(this._scaleX=t.scaleX),t?.scaleY!==void 0&&(this._scaleY=t.scaleY),this.vx=t?.vx||0,this.vy=t?.vy||0,this.ax=t?.ax||0,this.ay=t?.ay||0,this.mass=t?.mass||1,this.show=typeof t?.show=="boolean"?t?.show:!0,this.followMouse=typeof t?.followMouse=="boolean"?t?.followMouse:!1,this.drag=t?.drag}destroy(){}moveTo(t,e){const n=this._x,i=this._y;(n!==t||i!==e)&&(this._x=t,this._y=e,this.transform$.next({dx:t-n,dy:e-i}))}move(t,e=0){this.moveTo(this._x+t,this._y+e)}moveXTo(t){this.moveTo(t,this._y)}moveX(t){this.moveTo(this._x+t,this._y)}moveYTo(t){this.moveTo(this._x,t)}moveY(t){this.moveTo(this._x,this._y+t)}get x(){return this._x}set x(t){this._x=t}get y(){return this._y}set y(t){this._y=t}rotateTo(t){this._degree=t}rotate(t){this.rotateTo(this._degree+t)}get degree(){return this._degree}set degree(t){this._degree=t}scaleTo(t,e){this._scaleX=t,this._scaleY=e||t}scale(t,e){this.scaleTo(this._scaleX*t,this._scaleY*(e||t))}get scaleX(){return this._scaleX}set scaleX(t){this._scaleX=t}get scaleY(){return this._scaleY}set scaleY(t){this._scaleY=t}pathD(){return this.d?(this.d instanceof St||(this.d=new St(this.d)),this.d):new St(this.toSVGPathData())}forcePathD(t){this.d=t}getBaseOptions(){return{d:this.d,attrs:this.getAttrs(),centerX:this._centerX,centerY:this._centerY,x:this._x,y:this._y,degree:this._degree,scaleX:this._scaleX,scaleY:this._scaleY,vx:this.vx,vy:this.vy,ax:this.ax,ay:this.ay,mass:this.mass,followMouse:this.followMouse,drag:this.drag}}clone(){const t=this.cloneShape();return this.parent&&(t.parent={...this.parent}),t}cloneShape(){return new ot(this.getBaseOptions())}toSVGPathData(){return[]}toSVGPathD(){return this.pathD().toSVGPathD()}toCanvasContext(t){this.pathD().toCanvasContext(t)}getBoundingClientRect(t=2){return this.pathD().getBoundingClientRect(t)}getBoundingClientRectCenter(t=2){return this.pathD().getBoundingClientRectCenter(t)}transformOrigin(t=!1,e=2){let n=this._centerX||0,i=this._centerY||0;if(typeof this._centerX>"u"&&typeof this._centerY>"u"){const r=this.getBoundingClientRectCenter(e);if(t||!this.parent)n=r.x,i=r.y;else{const o=this.parent.combo.getBoundingClientRectCenter(e);n=o.x-this.parent.dx,i=o.y-this.parent.dy}}return{x:n,y:i}}isPointInPath(t,e,n){if(t instanceof To)return t.isPointInPath(new Path2D(this.toSVGPathD()),e,n);if(this.el instanceof SVGGeometryElement){const i=this.el.getCTM();if(i){const r=i.inverse();return this.el.isPointInFill({x:r.a*e+r.c*n+r.e,y:r.b*e+r.d*n+r.f})}}return!1}isPointInStroke(t,e,n){if(t instanceof To)return t.isPointInStroke(new Path2D(this.toSVGPathD()),e,n);if(this.el instanceof SVGGeometryElement){const i=this.el.getCTM();if(i){const r=i.inverse();return this.el.isPointInStroke({x:r.a*e+r.c*n+r.e,y:r.b*e+r.d*n+r.f})}}return!1}setAttr(t,e){if(typeof t!="string")for(const n in t){const i=t[n];i&&(this.attrs[xt(n)]=i)}else e&&(this.attrs[xt(t)]=e)}getAttr(t,e){return this.attrs[t]||this.attrs[xt(t)]||e}hasAttr(t){return!!this.getAttr(t)}getAttrs(){return{...this.attrs}}animate(t){this.vx+=this.ax,this.vy+=this.ay;const e=t?.gravity||0;this.vy+=e;const n=t?.friction||1;this.vx*=n,this.vy*=n,this.moveTo(this.x+this.vx,this.y+this.vy)}animateEaseTo(t,e){const n=e?.easing||.05,i=t.x-this.x,r=t.y-this.y;this.vx=i*n,this.vy=r*n,this.animate(e)}animateSpringTo(t,e){const n=e?.spring||.03;(Array.isArray(t)?t:[t]).forEach(i=>{const r=i.x-this.x,o=i.y-this.y,a=r*n,h=o*n;this.vx+=a,this.vy+=h}),this.animate({friction:.9,...e})}animateSpringMassTo(t,e){const n=e?.springLength||100,i=e?.spring||1e-4,r=t.x-this.x,o=t.y-this.y,a=Math.sqrt(r*r+o*o);if(a<n){const h=r*i,c=o*i;return this.vx+=h/this.mass,this.vy+=c/this.mass,t.vx-=h/t.mass,t.vy-=c/t.mass,1-a/n}return 0}distance(t){return Me(this.x,this.y,t.x,t.y)}rotateToTarget(t){this.rotateTo(Et(Jt(this.x,this.y,t.x,t.y)))}followTo(t,e=3){this.rotateToTarget(t);const{dx:n,dy:i}=Ae(q(this.degree),e);this.vx=n,this.vy=i,this.animate()}followAccelerationTo(t,e=.05){this.rotateToTarget(t);const{dx:n,dy:i}=Ae(q(this.degree),e);this.ax=n,this.ay=i,this.animate()}gravitateTo(t){const e=t.x-this.x,n=t.y-this.y,i=e*e+n*n,r=Math.sqrt(i),o=this.mass*t.mass/i,a=o*e/r,h=o*n/r;this.vx+=a/this.mass,this.vy+=h/this.mass,t.vx-=a/t.mass,t.vy-=h/t.mass}checkCollision(t){}checkWall(t){}getTotalLength(){return this.pathD().getTotalLength()}interpolate(t){return this.pathD().interpolate(t)}getPointAtLength(t){return this.pathD().getPointAtLength(t)}trailPath(t=0){const e=this.getTotalLength();return{subPathD:this.pathD().getSubPathD(0,t*e),point:this.getPointAtLength(t*e)}}strokeDashTween(t=1e3,e){const n=Z(this.pathD().getTotalLength(),0);this.setAttr({strokeDasharray:`${n} ${n}`,strokeDashoffset:`${n}`});const i=e?.onUpdate,r=new Yn({frameDuration:t});r.addTween({offset:n},{offset:0},Object.assign(e||{},{onUpdate:(o,a)=>{this.setAttr("strokeDashoffset",""+Z(o.offset,2)),i?.(o,a)}})),r.play()}}class Lt{options;commonChildShapeOptions;shapes=[];x=0;y=0;degree=0;scaleX=1;scaleY=1;constructor(t,e){if(this.options=t,this.commonChildShapeOptions=e,t?.svg){let n=0,i=0,r=0,o=0;const a=new X1(t.svg).parse();for(let h=0,c=a.length;h<c;h++){const u=a[h];if(u.type=="viewbox"&&u.width&&u.height){if(n=parseFloat(u.width),i=parseFloat(u.height),t.forceWidth){const y=n/i;r=t.forceWidth,o=r/y}else r=n,o=i;continue}if(u.type!="path"||!Iu(u.path))continue;const l={};for(const y in u)y==="type"||y==="path"||y==="transform"||(l[y]=u[y]);const m=Lu(Du(u.path)),f=[];let p=[];for(let y=0,v=m.length;y<v;y++){const w=m[y];p.push(w),w[0].toLowerCase()=="z"&&(f.push(p),p=[])}p.length&&f.push(p),f.forEach(y=>{const v=new ot({...e,d:y,attrs:{...e?.attrs,...l}});if(u.transform){const _=Vr(u.transform).split();v.moveTo(_.x,_.y),v.rotateTo(_.degree),v.scaleTo(_.scaleX,_.scaleY)}r&&n&&o&&i&&v.scaleTo(v.scaleX*(r/n),v.scaleY*(o/i)),this.addShape(v)})}}}destroy(){this.shapes.forEach(t=>t.destroy())}clone(){const t=this.cloneShapeCombo();return t.x=this.x,t.y=this.y,t.degree=this.degree,t.scaleX=this.scaleX,t.scaleY=this.scaleY,t.shapes=this.shapes.map(e=>{const n=e.clone();return n.parent&&(n.parent.combo=t),n}),t}cloneShapeCombo(){return new Lt(this.options,this.commonChildShapeOptions)}addShape(t,e=0,n=0){t.parent={combo:this,dx:e||t.x,dy:n||t.y},this.shapes.push(t)}comboMove(t,e){this.x+=t,this.y+=e,this.shapes.forEach(n=>{n.move(t,e)})}comboRotate(t){this.degree+=t,this.shapes.forEach(e=>{e.rotate(t)})}comboScale(t,e){this.scaleX*=t,this.scaleY*=e||t,this.shapes.forEach(n=>{n.scale(t,e)})}comboTransform(t){(typeof t?.x=="number"||typeof t?.y=="number")&&this.comboMove(t?.x||0,t?.y||0),typeof t?.degree=="number"&&this.comboRotate(t?.degree||0),(typeof t?.scale=="number"||typeof t?.scaleX=="number"||typeof t?.scaleY=="number")&&this.comboScale(t?.scaleX||t?.scale||1,t?.scaleY||t?.scale||1)}getBoundingClientRect(t=2){const e=[],n=[];if(this.shapes.forEach(h=>{const c=h.getBoundingClientRect(t);e.push(c.x,c.x+c.width),n.push(c.y,c.y+c.height)}),e.length==0||n.length==0)return{x:0,y:0,width:0,height:0,center:{x:0,y:0}};const i=Math.min(...e),r=Math.min(...n),o=Math.max(...e),a=Math.max(...n);return{x:Z(i,t),y:Z(r,t),width:Z(o-i,t),height:Z(a-r,t)}}getBoundingClientRectCenter(t=2){const e=this.getBoundingClientRect(t);return{x:Z(e.x+e.width*.5,t),y:Z(e.y+e.height*.5,t)}}setAttr(t,e){typeof t!="string"?this.shapes.forEach(n=>{n.setAttr(t)}):e&&this.shapes.forEach(n=>{n.setAttr(t,e)})}sort(){this.shapes=this.shapes.map(t=>({shape:t,perimeter:t.pathD().getPolymorphPointsPerimeter()})).sort((t,e)=>e.perimeter-t.perimeter).map(t=>t.shape)}expendTo(t){const e=t.shapes.length,n=this.shapes.length;if(e<n)return t.expendTo(this);for(let i=n;i<e;i++)this.addShape(t.shapes[i].clone())}strokeDashTween(t,e){const n=this.shapes.length-1;switch(e?.type){case"sequence":this.shapes.forEach((a,h)=>{a.strokeDashTween(t,{...e,delay:h,onStart:()=>{h==0&&e?.onGroupStart?.()},onUpdate:()=>{e?.onGroupUpdate?.()},onComplete:()=>{h==n&&e?.onGroupComplete?.()}})});break;case"parallel":default:const i=new Yn({frameDuration:t}),r={},o={};this.shapes.forEach((a,h)=>{const c=Z(a.getTotalLength(),0);r[`offset_${h}`]=c,o[`offset_${h}`]=0,a.setAttr({strokeDasharray:`${c} ${c}`,strokeDashoffset:`${c}`})}),i.addTween(r,o,Object.assign(e||{},{onStart:()=>{e?.onGroupStart?.()},onUpdate:(a,h)=>{for(const c in a){const u=rf(c).number;this.shapes[u].setAttr("strokeDashoffset",""+Z(a[c],2))}e?.onGroupUpdate?.()},onComplete:()=>{e?.onGroupComplete?.()}})),i.play();break}}}function q1(s,t){s.forEach(n=>{n.animate(),t?.wall&&n.checkWall({wall:t.wall,bounce:t.bounce})});const e=s.length;for(let n=0,i=e-1;n<i;n++)for(let r=n+1;r<e;r++)s[n].checkCollision(s[r])}function j1(s){const t=s.length;s.forEach((e,n)=>{e.animate();for(let i=n+1;i<t;i++)e.checkCollision(s[i]),e.gravitateTo(s[i])})}function H1(s,t){s.forEach((e,n)=>{n>0&&e.animateSpringTo(s[n-1],t)})}function W1(s,t){const e=t?.springLength||100;s.forEach(n=>{n.isDragging||s.filter(i=>i.id!==n.id).forEach(i=>{const r=Jt(n.x,n.y,i.x,i.y);n.animateSpringTo({x:i.x-Math.cos(r)*e,y:i.y-Math.sin(r)*e},t)})})}function J1(s,t,e){const n=s.length,i=[];return s.forEach((r,o)=>{r.animate(e),r.x>t.x+t.width?r.moveXTo(t.x):r.x<t.x&&r.moveXTo(t.x+t.width),r.y>t.y+t.height?r.moveYTo(t.y):r.y<t.y&&r.moveYTo(t.y+t.height);for(let a=o+1;a<n;a++)i.push([r.x,r.y,s[a].x,s[a].y,r.animateSpringMassTo(s[a],e)])}),i}function ko(s){if(s.length<2)throw new Error("shapes个数必须大于等于2");const t=s.length-1,e=new Array(t);for(let n=0;n<t;n++){const i=s[n].pathD(),r=s[n+1].pathD(),o=Math.max(i.getPolymorphPoints().length,r.getPolymorphPoints().length);e[n]=St.getInterpolator(i.getExpendedPolymorphPointsPathD(o),r.getExpendedPolymorphPointsPathD(o))}return n=>{const i=Z(t*n,6),r=Math.min(Math.floor(i),t-1),o=Z(i-r,6),a=new ot({d:e[r](o)}),h=s[r].getAttr("fill","none"),c=s[r+1].getAttr("fill","none");typeof h=="string"&&typeof c=="string"&&a.setAttr("fill",Ft.gradient(h,c,o).toString());const u=s[r].getAttr("stroke","none"),l=s[r+1].getAttr("stroke","none");return typeof u=="string"&&typeof l=="string"&&a.setAttr("stroke",Ft.gradient(u,l,o).toString()),a}}function Vu(s){if(s.length<2)throw new Error("shapeCombos个数必须大于等于2");let t=0,e;const n=[];s.forEach(o=>{let a;o instanceof Lt?(a=o,a.sort()):(a=new Lt,a.addShape(o)),n.push(a),t<a.shapes.length&&(t=a.shapes.length,e=a)}),n.forEach(o=>{o!==e&&o.expendTo(e)});const i=[];n.forEach((o,a)=>{o.shapes.forEach((h,c)=>{i[c]=i[c]||[],i[c][a]=h})});const r=[];return i.forEach(o=>{r.push(ko(o))}),o=>{const a=new Lt;return r.forEach(h=>{a.addShape(h(o))}),a}}function Z1(s,t=6e3,e){const n=s.findIndex(a=>a instanceof Lt)>=0?Vu(s):ko(s),i=n(0),r=e?.onUpdate,o=new Yn({frameDuration:t});o.addTween({t:0},{t:1},Object.assign(e||{},{onUpdate:(a,h)=>{n(a.t),r?.(a,h),i instanceof ot?e?.shape?.(i):i instanceof Lt&&i.shapes.forEach(c=>{e?.shape?.(c)})}})),o.play()}function Q1(s,t,e,n,i){if(i==0)throw new Error("no dividing by zero, please");const r=[],o=360/i;for(let h=0;h<i;h+=1){const c=o*h*Math.PI/180,u=s+2*e*Math.cos(c),l=t+2*e*Math.sin(c);r.push(new go({x:s,y:t,rx:e,ry:n,xAxisRotate:o*h,largeArcFlag:1,sweepFlag:1,toX:u,toY:l})),r.push(new go({x:u,y:l,rx:e,ry:n,xAxisRotate:o*h,largeArcFlag:1,sweepFlag:1,toX:s,toY:t}))}return new ot({d:St.fromLines(r)})}class K1{PARENT_EL;SVG_EL=null;CANVAS_EL=null;ctx=null;rect={x:0,y:0,width:0,height:0};size$=new Lm(null);resizeSubscription;mpg=He();mouseSubscription;shapes=[];lastMouseInShapeId="";draggingShapeId="";prevCursor="default";constructor(t=document.documentElement,e="canvas",n=!1){this.PARENT_EL=t,(e=="svg"||e=="canvas")&&Jc(this.PARENT_EL),e=="svg"&&(this.SVG_EL=ku("svg"),Zn(this.PARENT_EL,this.SVG_EL)),e=="canvas"&&(this.CANVAS_EL=tu("canvas"),Zn(this.PARENT_EL,this.CANVAS_EL)),this.resizeSubscription=mo(this.PARENT_EL).subscribe(i=>{this.rect.x=i.x,this.rect.y=i.y,this.rect.width=i.width,this.rect.height=i.height,this.SVG_EL&&je(this.SVG_EL,{viewBox:`0 0 ${this.rect.width} ${this.rect.height}`,width:`${this.rect.width}`,height:`${this.rect.height}`}),this.CANVAS_EL&&(je(this.CANVAS_EL,{width:`${this.rect.width}`,height:`${this.rect.height}`}),this.ctx=new To(this.CANVAS_EL,this.rect.width,this.rect.height,n)),this.size$.next(i)}),this.mouseSubscription=wu(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL,{useMousePoint:this.mpg}).subscribe(()=>{})}destroy(){this.resizeSubscription.unsubscribe(),this.mouseSubscription.unsubscribe()}setCursor(t="default"){t!=this.prevCursor&&(this.PARENT_EL.style.cursor=t,this.prevCursor=t)}animateShape(t){t.followMouse&&(!_a(t.x,this.mpg.current.x,5)||!_a(t.y,this.mpg.current.y,5))&&t.followTo(this.mpg.current),t.drag&&t.drag.enable&&t.drag.targetToAfterDrop&&(t.isDragging||t.animateEaseTo(t.drag.targetToAfterDrop,{easing:t.drag.easing}))}draw(...t){const e=[];t.forEach(n=>{n instanceof Lt?e.push(...n.shapes):e.push(n)}),this.SVG_EL&&this.shapes.filter(n=>e.findIndex(i=>i.id==n.id)==-1).forEach(n=>{n.el&&(n.el.remove(),delete n.el)}),this.ctx&&this.ctx.clearRect(),Ql(this.shapes,e),this.lastMouseInShapeId="",this.mpg.current.isDown||(this.draggingShapeId="");for(const n of this.shapes){if(!n.show)continue;this.animateShape(n);const i=n.transformOrigin(),r=i.x,o=i.y;if(this.SVG_EL){const a=n.toSVGPathD();n.el||(n.el=B1(a,n.id),Zn(this.SVG_EL,n.el));const h=new _t;h.translate(n.x,n.y),h.rotate(n.degree,r,o),h.scale(n.scaleX,n.scaleY,r,o),je(n.el,{d:a,transform:h.toString(),...n.getAttrs()})}if(this.ctx&&(this.ctx.save(),this.ctx.translate(n.x,n.y),this.ctx.rotate(q(n.degree),r,o),this.ctx.scale(n.scaleX,n.scaleY,r,o),n.toCanvasContext(this.ctx),Cc(this.ctx,n.getAttrs()),this.ctx.hasSetCustomStrokeStyle&&this.ctx.stroke(),this.ctx.hasSetCustomFillStyle&&this.ctx.fill()),this.SVG_EL?n.isMouseIn=n.isPointInPath(this.SVG_EL,this.mpg.current.x,this.mpg.current.y)||n.isPointInStroke(this.SVG_EL,this.mpg.current.x,this.mpg.current.y):this.ctx?n.isMouseIn=n.isPointInPath(this.ctx,this.mpg.current.x,this.mpg.current.y)||n.isPointInStroke(this.ctx,this.mpg.current.x,this.mpg.current.y):n.isMouseIn=!1,n.isMouseIn&&(this.setCursor("pointer"),this.lastMouseInShapeId=n.id),n.isDragging=n.id==this.draggingShapeId,this.mpg.current.isDown&&(n.isDragging||!this.draggingShapeId&&n.isMouseIn&&n.drag&&n.drag.enable)){this.setCursor("grabbing"),n.isDragging=!0,this.draggingShapeId=n.id;let a=this.mpg.current.x-this.mpg.start.x,h=this.mpg.current.y-this.mpg.start.y;if(a||h){if(n.drag&&n.drag.enable&&n.drag.alongPath){const c=n.parent?n.parent.combo.x:n.x,u=n.parent?n.parent.combo.y:n.y,l=r+(n.parent?.dx||0),m=o+(n.parent?.dy||0),f=n.parent?n.parent.combo.degree:n.degree,p=n.parent?n.parent.combo.scaleX:n.scaleX,y=n.parent?n.parent.combo.scaleY:n.scaleY,w=n.drag.alongPath.transform(c,u,l,m,f,p,y).closestPoint(this.mpg.current.x,this.mpg.current.y),_=n.x,x=n.y;a=w.point.x-_,h=w.point.y-x}(a||h)&&(n.move(a,h),n.parent?.combo.shapes.forEach(c=>{c.drag?.followSibling&&c!==n&&c.move(a,h)}))}this.mpg.setStart(this.mpg.current)}else n.isMouseIn&&n.drag&&n.drag.enable&&this.setCursor("grab");this.ctx&&this.ctx.restore()}!this.lastMouseInShapeId&&!this.draggingShapeId&&this.setCursor("default")}drawMouseMoveLine(t){const e=t?.brushSize||4,n=t?.brushColor||"#000000";let i=!1;const r=Js(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL,{start:()=>{i=!1,this.ctx&&(this.ctx.save(),this.ctx.lineWidth=e,this.ctx.strokeStyle=n,this.ctx.beginPath())},end:()=>{this.ctx&&this.ctx.restore()}}).subscribe(o=>{this.ctx&&(i?this.ctx.lineTo(o.current.x,o.current.y):(i=!0,this.ctx.moveTo(o.current.x,o.current.y)),this.ctx.stroke())});return()=>{r.unsubscribe()}}drawMouseMoveBrush(t){const e=t?.brushSize||10,n=t?.brushDensity||50,i=t?.brushColor||"#000000",r=new Ft(i),o=r.r,a=r.g,h=r.b,c=Js(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL).subscribe(u=>{if(this.ctx){const l=this.ctx.getImageData(0,0,this.ctx.canvas.width,this.ctx.canvas.height),m=l.data;for(let f=0;f<n;f++){const p=Math.random()*Math.PI*2,y=Math.random()*e,v=u.current.x+Math.cos(p)*y|0,w=u.current.y+Math.sin(p)*y|0,_=(v+w*l.width)*4;m[_]=o,m[_+1]=a,m[_+2]=h,m[_+3]=255}this.ctx.putImageData(l)}});return()=>{c.unsubscribe()}}downloadSVG=()=>{this.SVG_EL&&F1(this.SVG_EL)}}class Qe extends ot{dx;dy;startColor;endColor;constructor(t){if(super(t),t?.lineLength){const e=Ae(q(t?.lineDegree||0),t.lineLength);this.dx=e.dx,this.dy=e.dy}else t?.lineDx||t?.lineDy?(this.dx=t?.lineDx||0,this.dy=t?.lineDy||0):(this.dx=0,this.dy=0);this.startColor=t?.startColor,this.endColor=t?.endColor,this.setAttr({stroke:this.startColor||"#000000"})}cloneShape(){return new Qe({...super.getBaseOptions(),lineDx:this.dx,lineDy:this.dy})}enableGradient(t,e){this.startColor=t,this.endColor=e,this.setAttr({stroke:this.startColor})}disableGradient(t){this.startColor=t,this.endColor=void 0,this.setAttr({stroke:this.startColor})}toSVGPathData(){return[["m",0,0],["l",this.dx,this.dy]]}toCanvasContext(t){this.startColor&&this.endColor&&this.setAttr({stroke:t.createLinearGradient(0,0,this.dx,this.dy,{0:this.startColor,1:this.endColor})}),t.beginPath(),t.moveTo(0,0),t.lineTo(this.dx,this.dy)}lineToAbsolutePoint(t){this.dx=t.x-this.x,this.dy=t.y-this.y}intersection(t){const e=this.transformOrigin(),i=this.pathD().transform(this.x,this.y,e.x,e.y,this.degree,this.scaleX,this.scaleY).normalizedLines[0],r=t.transformOrigin(),a=t.pathD().transform(this.x,this.y,r.x,r.y,t.degree,t.scaleX,t.scaleY).normalizedLines[0];return i.intersection(a)}}class Io extends Lt{constructor(t,e){super(t,e);const n=new Qe({...e,drag:{...e?.drag,followSibling:!0},lineLength:100,lineDegree:90});this.addShape(n);const i=new Qe({...e,drag:{...e?.drag,followSibling:!0},y:10+Math.random()*30,lineLength:10+Math.random()*30,lineDegree:Math.random()*120-150});this.addShape(i);const r=new Qe({...e,drag:{...e?.drag,followSibling:!0},y:10+Math.random()*30,lineLength:10+Math.random()*30,lineDegree:Math.random()*120-150});this.addShape(r)}cloneShapeCombo(){return new Io(this.options,this.commonChildShapeOptions)}}class bn extends ot{radius;constructor(t){super(t),this.radius=t?.ballRadius||0}cloneShape(){return new bn({...super.getBaseOptions(),ballRadius:this.radius})}getBoundingClientRect(){return{x:-this.radius,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 pn(this.x,this.y)}scalar(t){return this.moveTo(this.x*t,this.y*t),this}normalize(t=1){const e=this.length();if(e){const n=t/e;this.scalar(n)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,n=this.y;return{x:n*t.x-e*t.y,y:e*t.y-n*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,n=t.y-this.y;if(Math.sqrt(e*e+n*n)<this.radius+t.radius){const r=Math.atan2(n,e),o={x:0,y:0},a=Qt(-r,e,n),h=Qt(-r,this.vx,this.vy),c=Qt(-r,t.vx,t.vy),u=h.x-c.x;h.x=((this.mass-t.mass)*h.x+2*t.mass*c.x)/(this.mass+t.mass),c.x=u+h.x;const l=Math.abs(h.x)+Math.abs(c.x),m=this.radius+t.radius-Math.abs(o.x-a.x);o.x+=h.x/l*m,a.x+=c.x/l*m;const f=Qt(r,o.x,o.y),p=Qt(r,a.x,a.y);t.moveTo(this.x+p.x,this.y+p.y),this.moveTo(this.x+f.x,this.y+f.y);const y=Qt(r,h.x,h.y),v=Qt(r,c.x,c.y);this.vx=y.x,this.vy=y.y,t.vx=v.x,t.vy=v.y}}checkWall(t){const e=typeof t?.bounce=="number"?t.bounce:-1,n=t.wall.x,i=t.wall.y,r=t.wall.x+t.wall.width,o=t.wall.y+t.wall.height;this.x+this.radius>r?(this.moveXTo(r-this.radius),this.vx*=e):this.x-this.radius<n&&(this.moveXTo(n+this.radius),this.vx*=e),this.y+this.radius>o?(this.moveYTo(o-this.radius),this.vy*=e):this.y-this.radius<i&&(this.moveYTo(i+this.radius),this.vy*=e)}}class Do extends ot{constructor(t){super(t)}cloneShape(){return new Do({...super.getBaseOptions()})}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 Ke extends ot{width;height;borderRadius;constructor(t){super(t),this.width=t.rectWidth,this.height=t.rectHeight,this.borderRadius=t.rectBorderRadius||0}cloneShape(){return new Ke({...super.getBaseOptions(),rectWidth:this.width,rectHeight:this.height,rectBorderRadius:this.borderRadius})}static fromCubicBezier(t,e,n,i,r,o,a,h){const u=new gt({x:t,y:e,c1x:n,c1y:i,c2x:r,c2y:o,toX:a,toY:h}).getBoundingClientRect();return new Ke({x:u.x,y:u.y,rectWidth:u.width,rectHeight:u.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){return t.x>=this.x&&t.x<=this.x+this.width&&t.y>=this.y&&t.y<=this.y+this.height}}class Lo extends ot{rx;ry;constructor(t){super(t),this.rx=t?.heartRx||10,this.ry=t?.heartRy||10}cloneShape(){return new Lo({...super.getBaseOptions(),heartRx:this.rx,heartRy:this.ry})}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 Ro extends ot{rx;ry;constructor(t){super(t),this.rx=t?.heartRx??50,this.ry=t?.heartRy??50}cloneShape(){return new Ro({...super.getBaseOptions(),heartRx:this.rx,heartRy:this.ry})}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 Oo extends ot{r;constructor(t){super(t),this.r=t?.starR||20}cloneShape(){return new Oo({...super.getBaseOptions(),starR:this.r})}toSVGPathData(){const t=[["m",0,-this.r]];for(let e=0;e<6;e+=1){const n=288+e*144,i=this.r*Math.cos(q(n)),r=this.r*Math.sin(q(n));t.push(["l",i,r])}return t}}class zo extends ot{constructor(t){super(t)}cloneShape(){return new zo({...super.getBaseOptions()})}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 No extends ot{constructor(t){super(t)}cloneShape(){return new No({...super.getBaseOptions()})}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 Bo extends ot{constructor(t){super(t),this.d="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"}cloneShape(){return new Bo({...super.getBaseOptions()})}}class Fo extends ot{rx;ry;constructor(t){super(t),this.rx=t?.rx||0,this.ry=t?.ry||0}cloneShape(){return new Fo({...super.getBaseOptions(),rx:this.rx,ry:this.ry})}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 Yo extends Lt{constructor(t,e){super(t,e);const n=new ot({...e,drag:{...e?.drag,followSibling:!0},show:typeof t?.showFlame=="boolean"?t.showFlame:!1,d:[["M",-15,0],["L",-2.5,-5],["L",-2.5,5],["Z"]]});this.addShape(n);const i=new ot({...e,drag:{...e?.drag,followSibling:!0},d:[["M",10,0],["L",-10,10],["L",-5,0],["L",-10,-10],["L",10,0],["Z"]]});this.addShape(i)}cloneShapeCombo(){return new Yo({...this.options,showFlame:this.showFlame},this.commonChildShapeOptions)}set showFlame(t){this.shapes[0].show=t}get showFlame(){return this.shapes[0].show}}class $o extends Lt{width;height;cornerRadius;constructor(t,e){super(t,e),this.width=t.segmentWidth,this.height=t.segmentHeight,this.cornerRadius=typeof t.segmentCornerRadius=="number"?t.segmentCornerRadius:this.height*.5;const n=new Ke({...e,drag:{...e?.drag,followSibling:!0},x:0-this.cornerRadius,y:0-this.height*.5,rectWidth:this.width+this.cornerRadius*2,rectHeight:this.height,rectBorderRadius:this.cornerRadius});this.addShape(n);const i=new bn({...e,drag:{...e?.drag,followSibling:!0},x:0,y:0,ballRadius:2});this.addShape(i);const r=new bn({...e,drag:{...e?.drag,followSibling:!0},x:0+this.width,y:0,ballRadius:2});this.addShape(r)}cloneShapeCombo(){return new $o({...this.options,segmentWidth:this.width,segmentHeight:this.height},this.commonChildShapeOptions)}getBoundingClientRectCenter(){return{x:0,y:0}}getPin(){const t=this.shapes[1];return{x:t.x+Math.cos(q(t.degree))*this.width,y:t.y+Math.sin(q(t.degree))*this.width}}}class Xo extends Lt{value$=new mn;subscription;constructor(t,e){super(t,e);const n=t?.sliderMin||0,i=t?.sliderMax||100,r=t?.sliderStep||1,o=nf(n,i,r),a=o(typeof t?.sliderDefaultValue=="number"?N(t.sliderDefaultValue,n,i):n);this.value$.next(a);const h=a/(i-n),c=t?.sliderWidth||100,u=t?.sliderHeight||4,l=u*.5,m=u*2.5,f=t?.sliderBackgroundColor||"#f5f5f5",p=t?.sliderForegroundColor||"#5a82f0",y=new Ke({...e,rectWidth:c,rectHeight:u,rectBorderRadius:l,attrs:{...e?.attrs,fill:f},drag:{...e?.drag,enable:!1}});this.addShape(y);const v=new Ke({...e,rectWidth:c*h,rectHeight:u,rectBorderRadius:l,attrs:{...e?.attrs,fill:p},drag:{...e?.drag,enable:!1}});this.addShape(v);const w=new bn({...e,x:c*h,y:l,ballRadius:m,attrs:{...e?.attrs,fill:p},drag:{...e?.drag,enable:!0,alongPath:new St([["m",0,0],["l",c,0]])}});this.addShape(w),this.subscription=w.transform$.subscribe(({dx:_})=>{v.width=N(v.width+(_||0),0,c),this.value$.next(o((w.x-y.x)/c*(i-n)+n))})}destroy(){super.destroy(),this.subscription.unsubscribe()}cloneShapeCombo(){return new Xo({...this.options},this.commonChildShapeOptions)}}class is extends ot{half;lineWidth;radius;startDegree;endDegree;percent=0;percentDegree=0;startColor;endColor;constructor(t){super(t),this.half=typeof t?.half=="boolean"?t?.half:!1,this.lineWidth=t.lineWidth;const e=t.width||0,n=t.height||0,i=(t.endDegree-t.startDegree-180)/2;if(t.radius)this.radius=t.radius;else if(this.half){const r=Math.min(e/2,n)-this.lineWidth;this.radius=Math.max(0,r-r*Math.sin(q(i)))}else this.radius=Math.max(0,Math.min(e/2,n/2)-this.lineWidth);t.x||(this.x=e/2),t.y||(this.half?this.y=n-this.lineWidth-this.radius*Math.sin(q(i)):this.y=n/2),t.forceCoordinate?(this.startDegree=t.startDegree,this.endDegree=t.endDegree):(this.startDegree=-90+t.startDegree,this.endDegree=-90+t.endDegree),this.startColor=t?.startColor,this.endColor=t?.endColor,this.setAttr({"stroke-linecap":"round","stroke-width":String(this.lineWidth),stroke:this.startColor||"#000000"}),this.setPercent(t.percent||1)}cloneShape(){return new is({...super.getBaseOptions(),half:this.half,lineWidth:this.lineWidth,radius:this.radius,forceCoordinate:!0,startDegree:this.startDegree,endDegree:this.endDegree,startColor:this.startColor,endColor:this.endColor,percent:this.percent})}setPercent(t){this.percent=Math.max(0,t),this.percentDegree=this.startDegree+(this.endDegree-this.startDegree)*t}enableGradient(t,e){this.startColor=t,this.endColor=e,this.setAttr({stroke:this.startColor})}disableGradient(t){this.startColor=t,this.endColor=void 0,this.setAttr({stroke:this.startColor})}toSVGPathData(){const{dx:t,dy:e}=Ae(q(this.startDegree),this.radius),{dx:n,dy:i}=Ae(q(this.percentDegree),this.radius);return[["m",t,e],["a",this.radius,this.radius,0,Math.abs(this.percentDegree-this.startDegree)>=180?1:0,1,n-t,i-e]]}toCanvasContext(t){if(this.startColor&&this.endColor){let e;if(this.half){const n=this.radius-this.radius*Math.cos(Math.PI*this.percent),i=this.radius*Math.sin(Math.PI*this.percent);e=t.createLinearGradient(-this.radius,0,-this.radius+n,-i,{0:this.startColor,1:this.endColor})}else{const n=this.radius*Math.sin(2*Math.PI*this.percent),i=this.radius*Math.cos(2*Math.PI*this.percent);e=t.createLinearGradient(0,-this.radius,n,-i,{0:this.startColor,1:this.endColor})}this.setAttr({stroke:e})}t.beginPath(),t.arc(0,0,this.radius,q(this.startDegree),q(this.percentDegree),!1)}}class Uo extends Lt{half;lineWidth;width;height;bgColor;startColor;endColor;startDegree;endDegree;percent=0;ringBg;ring;lines=[];indicatorLineCount;constructor(t,e){if(super(t,e),this.half=typeof t?.half=="boolean"?t?.half:!1,this.lineWidth=t?.lineWidth||12,this.width=t.width,this.height=t.height,this.bgColor=t?.bgColor,this.startColor=t?.startColor,this.endColor=t?.endColor,this.half?(this.startDegree=t?.startDegree||-90-15,this.endDegree=t?.endDegree||90+15):(this.startDegree=t?.startDegree||0,this.endDegree=t?.endDegree||360),this.percent=t?.percent||0,this.ringBg=new is({half:this.half,lineWidth:this.lineWidth,width:t.width,height:t.height,startDegree:this.startDegree,endDegree:this.endDegree,startColor:this.bgColor,percent:1}),this.addShape(this.ringBg),this.ring=new is({half:this.half,lineWidth:this.lineWidth,width:t.width,height:t.height,startDegree:this.startDegree,endDegree:this.endDegree,startColor:this.startColor,endColor:this.endColor,percent:0}),this.addShape(this.ring),this.indicatorLineCount=22+1,this.half){const o=this.ringBg.radius-20-17;for(let a=0;a<this.indicatorLineCount;a++){const h=-90+this.startDegree+(this.endDegree-this.startDegree)/(this.indicatorLineCount-1)*a,c=new Qe({x:this.ringBg.x+Math.cos(q(h))*o,y:this.ringBg.y+Math.sin(q(h))*o,lineLength:17,lineDegree:h,attrs:{"stroke-linecap":"round","stroke-width":String(2),stroke:this.bgColor}});this.lines.push(c),this.addShape(c)}}this.setPercent(t.percent||0)}cloneShapeCombo(){return new Uo({half:this.half,lineWidth:this.lineWidth,width:this.width,height:this.height,bgColor:this.bgColor,startColor:this.startColor,endColor:this.endColor,startDegree:this.startDegree,endDegree:this.endDegree,percent:this.percent},this.commonChildShapeOptions)}setPercent(t){if(this.percent=Math.max(0,t),this.ring.setPercent(t),this.half)for(let e=0;e<this.indicatorLineCount;e++)e/(this.indicatorLineCount-1)<=this.percent?this.lines[e].enableGradient(this.startColor,this.endColor):this.lines[e].disableGradient(this.bgColor)}}function Gu(s,t={attributes:!0,childList:!0,subtree:!0}){return new et(e=>{const n=new MutationObserver((i,r)=>{e.next(i)});return n.observe(s,t),()=>{n.disconnect()}})}function qu(s,t={root:null}){return new et(e=>{const n=new IntersectionObserver((i,r)=>{if(i.length){const o=i[i.length-1];o&&e.next(o)}},t);return n.observe(s),()=>{n.unobserve(s),n.disconnect()}})}function tw(s,t){return xu().pipe(Te(null),rt(()=>{const{width:e,height:n}=t?.root?.getBoundingClientRect()||bu(),{top:i,left:r,right:o,bottom:a}=s.getBoundingClientRect();return(i>=0&&i<=n||a>=0&&a<=n)&&(r>=0&&r<=e||o>=0&&o<=e)}),Ce())}function ew(s,t){const e=typeof t?.threshold=="number"?t.threshold:.5;return qu(s,{threshold:e,root:t?.root}).pipe(rt(n=>n.isIntersecting&&n.intersectionRatio>=e),Ce())}let ju=!1;function nw(){ju||(ju=!0,_c(`
|
|
28
28
|
:root {
|
|
29
29
|
--sat:env(safe-area-inset-top, 0px);
|
|
30
30
|
--sar:env(safe-area-inset-right, 0px);
|
|
@@ -37,15 +37,15 @@
|
|
|
37
37
|
--sab:env(safe-area-inset-bottom, 0px);
|
|
38
38
|
--sal:env(safe-area-inset-left, 0px);
|
|
39
39
|
}
|
|
40
|
-
`))}nw();function sw(){return mo(document.documentElement).pipe(pr(fr),rt(()=>{const s=getComputedStyle(document.documentElement);return{bottom:s.getPropertyValue("--sab"),top:s.getPropertyValue("--sat"),right:s.getPropertyValue("--sar"),left:s.getPropertyValue("--sal")}}))}function iw(s={enableHighAccuracy:!0,timeout:5e3,maximumAge:0}){return new et(t=>{if(!("geolocation"in navigator))return t.error("navigator.geolocation is not available.");let e;return new Promise((n,i)=>{navigator.geolocation.getCurrentPosition(r=>{t.next({longitude:r.coords.longitude,latitude:r.coords.latitude}),n()},r=>{i(r)})}).then(()=>{e=navigator.geolocation.watchPosition(n=>{t.next({longitude:n.coords.longitude,latitude:n.coords.latitude})},n=>{t.error(n)},s)}).catch(n=>{t.error(n)}),()=>{typeof e=="number"&&navigator.geolocation.clearWatch(e)}})}function Hu(s="(prefers-color-scheme: dark)"){const t=window.matchMedia(s);return X(t,"change").pipe(rt(e=>e.matches),Te(t.matches),Ce())}function Wu(){return Gu(document).pipe(rt(()=>location),Te(location))}function rw(){return Wu().pipe(rt(s=>s.href),Te(location.href),Ce())}function ow(){return X(window,"hashchange").pipe(rt(s=>s.target.location.hash.replace("#","")),Te(window.location.hash.replace("#","")),Ce())}function aw(){return X(window,"popstate").pipe(rt(s=>s.state),Te(null),Ce())}function hw(s,t,e){if(typeof t=="string"&&(t=pa(t)),(typeof t=="string"||t===void 0)&&e===void 0){const n=Object.assign({},s.dataset);return Object.keys(n).forEach(i=>{if(n[i]?.startsWith("[")||n[i]?.startsWith("{"))try{n[i]=JSON.parse(n[i]||"")}catch{}}),typeof t=="string"?n[t]:n}else{let n={};typeof t=="object"?n=t:typeof t=="string"&&(n[t]=e),Object.entries(n).forEach(([i,r])=>{r?s.dataset[i]=r instanceof Object?JSON.stringify(r):r:delete s.dataset[i]})}}function cw(s,t){t.split(/[,\s]+/).forEach(e=>{e.trim()!=""&&delete s.dataset[e.trim()]})}function Vo(s,t){const e=typeof t?.aliveInSeconds=="number"?Math.max(t.aliveInSeconds,0):-1,n=typeof t?.aliveUntilTimestamp=="number"?Math.max(t.aliveUntilTimestamp,0):-1;function i(o,a=!1){return jl(o)||!Il(o,Tn)?{v:o,[Tn]:se()}:a?o:{...o,[Tn]:se()}}let r=i(s,!0);return{get:()=>{let o=r.v;return(e>=0&&se()>r[Tn]+e*1e3||n>=0&&se()>n)&&(o=void 0),{value:typeof o<"u"?r:void 0,rawValue:o}},set:o=>r=i(o)}}function Ju(s,t){const e=typeof s=="string"?s:s.toString();let n=t?.initValue;if(typeof n>"u")try{const a=window.localStorage.getItem(e);a&&(n=la(a))}catch{}const{get:i,set:r}=Vo(n,{aliveInSeconds:t?.aliveInSeconds,aliveUntilTimestamp:t?.aliveUntilTimestamp}),o=Bi(i().value);return jt(()=>{if(typeof o.value<"u")try{window.localStorage.setItem(e,Si(o.value))}catch{}else window.localStorage.removeItem(e)}),{get:()=>{const a=i();return o.value=a.value,a.rawValue},set:a=>o.value=r(a)}}function uw(){window.localStorage.clear()}const{get:Zu,set:lw}=Ju(ls("theme")),Qu=new mn,fw=Qu.pipe(Te(void 0));function Ku(s){switch(lw(s),s){case"dark":document.documentElement.classList.add("dark"),wn(document.documentElement,"data-theme","dark");break;case"light":default:document.documentElement.classList.remove("dark"),wn(document.documentElement,"data-theme","light");break}return Qu.next(s),s}function dw(){return Ku(Zu()=="dark"?"light":"dark")}function mw(){return dp([fw,Hu("(prefers-color-scheme: dark)")]).pipe(rt(([s,t])=>{if(s)return s;const e=Zu();return e||(t?"dark":"light")}))}function pw(s,t=""){return getComputedStyle(document.documentElement).getPropertyValue(s)||t}function gw(s,t){document.documentElement.style.setProperty(s,t)}function yw(s,t){const e=typeof s=="string"?s:s.toString();let n=t?.initValue;if(typeof n>"u")try{const a=window.sessionStorage.getItem(e);a&&(n=la(a))}catch{}const{get:i,set:r}=Vo(n,{aliveInSeconds:t?.aliveInSeconds,aliveUntilTimestamp:t?.aliveUntilTimestamp}),o=Bi(i().value);return jt(()=>{if(typeof o.value<"u")try{window.sessionStorage.setItem(e,Si(o.value))}catch{}else window.sessionStorage.removeItem(e)}),{get:()=>{const a=i();return o.value=a.value,a.rawValue},set:a=>o.value=r(a)}}function ww(){window.sessionStorage.clear()}function xw(s,t){const e=Bi(t?.value||"");if(!e.value){const n=`; ${document.cookie}`.split(`; ${s}=`).pop()?.split(";").shift();n&&(e.value=decodeURIComponent(n))}return jt(()=>{if(e.value&&t?.days){const n="; expires="+new Date(Date.now()+t.days*864e5).toUTCString(),i=t?.domain?"; domain="+t?.domain:"",r=t?.path?"; path="+t?.path:"",o=t?.secure==!0?"; secure":"";document.cookie=s+"="+encodeURIComponent(e.value)+n+i+r+o}}),{get:()=>e.value,set:n=>e.value=n}}function bw(){const s=document.cookie.split("; ");for(let t=0;t<s.length;t++){const e=window.location.hostname.split(".");for(;e.length>0;){const n=encodeURIComponent(s[t].split(";")[0].split("=")[0])+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain="+e.join(".")+" ;path=",i=location.pathname.split("/");for(document.cookie=n+"/";i.length>0;)document.cookie=n+i.join("/"),i.pop();e.shift()}}}function vw(s,t){let e;return s.objectStoreNames.contains(t)||(e=s.createObjectStore(t,{keyPath:"id"})),e}function _w(s,t=1,e){return new Promise((n,i)=>{let r;const o=window.indexedDB.open(s,t);o.onerror=()=>{i("无法使用IndexDB!")},o.onsuccess=a=>{r=a.target.result,vw(r,e),n(r)}})}function Sw(s,t,e={id:1,name:"xxx"}){return new Promise((n,i)=>{const r=s.transaction([t],"readwrite");r.objectStore(t).add(e),r.oncomplete=a=>{n(a)},r.onerror=a=>{i(a)}})}const Go=new cn;function qo(s,t){return Ci({url:s,...t})}async function ei(s,t){if(typeof fetch>"u")throw new Error("fetch() not supported!");if(typeof AbortController>"u")throw new Error("AbortController not supported!");const e=qo(s,t),n=new AbortController;Go.set(e,n);const{responseType:i,onProgress:r,timeout:o}={responseType:"json",timeout:6e4,...t},a=setTimeout(()=>{throw n.abort(),new Error(`${o} ms Timeout!`)},o);let h=await fetch(new Request(s,{...t,signal:n.signal}));if(Go.delete(e),clearTimeout(a),h.status===200||h.status===0){if(h.status===0&&An("useFetch: HTTP Status 0 received."),typeof ReadableStream<"u"&&h.body&&h.body.getReader&&r){const c=h.body.getReader(),u=h.headers.get("X-File-Size")||h.headers.get("Content-Length"),l=u?parseInt(u):0,m=l!==0;let f=0;const p=new ReadableStream({start(y){function v(){c.read().then(({done:w,value:_})=>{w?y.close():(f+=_.byteLength,r?.(new ProgressEvent("progress",{lengthComputable:m,loaded:f,total:l})),y.enqueue(_),v())}).catch(w=>{y.error(w)})}v()}});h=new Response(p)}switch(i){case"arraybuffer":return await h.arrayBuffer();case"blob":return await h.blob();case"json":return await h.json();case"text":default:return await h.text()}}else return Promise.reject(h)}function Cw(s,t){const e=Go.get(qo(s,t));e&&e.abort()}function Tw(s=3,t){return Pi(ei,s,t)}function Ew(s=6e4){return Mi(ei,s)}function Pw(s=6e4,t=3,e){return Mi(Pi(ei,t,e),s)}const Mw={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:(s,t)=>{switch(t){case"W":return`${s}周`;default:return`${s}日`}},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:(s,t)=>{const e=s*100+t;return e<600?"凌晨":e<900?"早上":e<1100?"上午":e<1300?"中午":e<1800?"下午":"晚上"}},Aw={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:s=>{const t=["th","st","nd","rd"],e=s%100;return`[${s}${t[(e-20)%10]||t[e]||t[0]}]`}},Re=new cn;let ni="zh-cn";jo(Aw),jo(Mw);function jo(s,t){if(!s)return Re.get(ni);let e;if(typeof s=="string"){const n=s.toLowerCase();if(Re.get(n))e=n;else if(t)Re.set(n,t),e=n;else return Re.get(ni)}else{const{name:n}=s;Re.set(n,s),e=n}return e&&(ni=e),Re.get(e)||Re.get(ni)}let kw=0;function tn(s,t={},e=[],n){return{name:String(++kw),tag:s,props:t,children:e,el:n}}function si(s){return tn(s.tagName,Wr(s),Array.from(s.children).map(t=>si(t)),s)}function vn(s,t=document.documentElement){if(s.el)return s.el;if(s.el=document.createElement(s.tag),s.props)for(const e in s.props){const n=s.props[e];e.startsWith("on")?s.el.addEventListener(e.slice(2).toLowerCase(),n):e==="style"?Gs(s.el,s.props[e]):wn(s.el,e,n)}return s.children&&(typeof s.children=="string"?s.el.appendChild(document.createTextNode(s.children)):s.children.forEach(e=>{vn(e,s.el)})),t.appendChild(s.el),s.el}function ii(s,t){if(!s.el)return;if(s.tag!==t.tag){(s.el.parentElement||document.body).replaceChild(vn(t),s.el);return}const e=t.el=s.el,n=s.props,i=t.props;for(const a in n)a in i||(a.startsWith("on")?e.removeEventListener(a.slice(2).toLowerCase(),n[a]):e.removeAttribute(a));for(const a in i){const h=n[a],c=i[a];if(c!=h)if(a.startsWith("on")){const u=a.slice(2).toLowerCase();e.removeEventListener(u,h),e.addEventListener(u,c)}else if(a==="style"){for(const u in h)u in c||Hr(e,u);Gs(e,c)}else wn(e,a,c)}const r=s.children||[],o=t.children||[];if(typeof o=="string")e.innerHTML=o;else if(typeof r=="string")e.innerHTML="",o.forEach(a=>{vn(a,e)});else{const a=Math.min(r.length,o.length);for(let h=0;h<a;h++)ii(r[h],o[h]);o.length>r.length&&o.slice(r.length).forEach(h=>{vn(h,e)}),o.length<r.length&&r.slice(o.length).forEach(h=>{h.el&&e.removeChild(h.el)})}}class Iw{state;el;constructor(t,e){this.state=Oa(t,!0),this.el=e,this.compile(this.el)}compile(t){t.childNodes.forEach(e=>{switch(e.nodeType){case 1:const n=e;[...n.attributes].forEach(a=>{const h=a.name,c=a.value;if(h==="v-model")if(io(n)){const u=n;jt(()=>{u.checked=this.getStateValue(c)==u.value}),u.addEventListener("change",l=>{this.setStateValue(c,l.target.value)})}else if(so(n)){const u=n;jt(()=>{u.checked=xa(this.getStateValue(c),u.value)}),u.addEventListener("change",l=>{const m=l.target,f=m.value;m.checked?Kl(this.getStateValue(c),f):Ne(this.getStateValue(c),f)})}else if(no(n)){const u=n;jt(()=>{u.value=this.getStateValue(c)}),u.addEventListener("change",l=>{this.setStateValue(c,l.target.value)})}else{const u=n;jt(()=>{u.value=this.getStateValue(c)});const l=m=>{this.setStateValue(c,m.target.value)};u.addEventListener("input",l)}else h==="v-text"?jt(()=>{n.innerText=this.getStateValue(c)}):h==="v-html"&&jt(()=>{n.innerHTML=this.getStateValue(c)})}),n.childNodes.length>0&&this.compile(n);break;case 3:const i=e.textContent||"",r=/\{\{\s*([^{}\s]+)\s*\}\}/g,o=r.exec(i);o&&o[1]&&jt(()=>{e.textContent=i.replace(r,this.getStateValue(o[1]))});break}})}getStateValue(t){let e=this.state;return t.split(".").forEach(n=>{e=e[n]}),e}setStateValue(t,e){let n=this.state;const i=t.split("."),r=i.length;for(let o=0;o<r-1;o++)n=n[i[o]];n[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
|
+
`))}nw();function sw(){return mo(document.documentElement).pipe(pr(fr),rt(()=>{const s=getComputedStyle(document.documentElement);return{bottom:s.getPropertyValue("--sab"),top:s.getPropertyValue("--sat"),right:s.getPropertyValue("--sar"),left:s.getPropertyValue("--sal")}}))}function iw(s={enableHighAccuracy:!0,timeout:5e3,maximumAge:0}){return new et(t=>{if(!("geolocation"in navigator))return t.error("navigator.geolocation is not available.");let e;return new Promise((n,i)=>{navigator.geolocation.getCurrentPosition(r=>{t.next({longitude:r.coords.longitude,latitude:r.coords.latitude}),n()},r=>{i(r)})}).then(()=>{e=navigator.geolocation.watchPosition(n=>{t.next({longitude:n.coords.longitude,latitude:n.coords.latitude})},n=>{t.error(n)},s)}).catch(n=>{t.error(n)}),()=>{typeof e=="number"&&navigator.geolocation.clearWatch(e)}})}function Hu(s="(prefers-color-scheme: dark)"){const t=window.matchMedia(s);return X(t,"change").pipe(rt(e=>e.matches),Te(t.matches),Ce())}function Wu(){return Gu(document).pipe(rt(()=>location),Te(location))}function rw(){return Wu().pipe(rt(s=>s.href),Te(location.href),Ce())}function ow(){return X(window,"hashchange").pipe(rt(s=>s.target.location.hash.replace("#","")),Te(window.location.hash.replace("#","")),Ce())}function aw(){return X(window,"popstate").pipe(rt(s=>s.state),Te(null),Ce())}function hw(s,t,e){if(typeof t=="string"&&(t=pa(t)),(typeof t=="string"||t===void 0)&&e===void 0){const n=Object.assign({},s.dataset);return Object.keys(n).forEach(i=>{if(n[i]?.startsWith("[")||n[i]?.startsWith("{"))try{n[i]=JSON.parse(n[i]||"")}catch{}}),typeof t=="string"?n[t]:n}else{let n={};typeof t=="object"?n=t:typeof t=="string"&&(n[t]=e),Object.entries(n).forEach(([i,r])=>{r?s.dataset[i]=r instanceof Object?JSON.stringify(r):r:delete s.dataset[i]})}}function cw(s,t){t.split(/[,\s]+/).forEach(e=>{e.trim()!=""&&delete s.dataset[e.trim()]})}function Vo(s,t){const e=typeof t?.aliveInSeconds=="number"?Math.max(t.aliveInSeconds,0):-1,n=typeof t?.aliveUntilTimestamp=="number"?Math.max(t.aliveUntilTimestamp,0):-1;function i(o,a=!1){return jl(o)||!Il(o,Tn)?{v:o,[Tn]:se()}:a?o:{...o,[Tn]:se()}}let r=i(s,!0);return{get:()=>{let o=r.v;return(e>=0&&se()>r[Tn]+e*1e3||n>=0&&se()>n)&&(o=void 0),{value:typeof o<"u"?r:void 0,rawValue:o}},set:o=>r=i(o)}}function Ju(s,t){const e=typeof s=="string"?s:s.toString();let n=t?.initValue;if(typeof n>"u")try{const a=window.localStorage.getItem(e);a&&(n=la(a))}catch{}const{get:i,set:r}=Vo(n,{aliveInSeconds:t?.aliveInSeconds,aliveUntilTimestamp:t?.aliveUntilTimestamp}),o=Bi(i().value);return jt(()=>{if(typeof o.value<"u")try{window.localStorage.setItem(e,Si(o.value))}catch{}else window.localStorage.removeItem(e)}),{get:()=>{const a=i();return o.value=a.value,a.rawValue},set:a=>o.value=r(a)}}function uw(){window.localStorage.clear()}const{get:Zu,set:lw}=Ju(us("theme")),Qu=new mn,fw=Qu.pipe(Te(void 0));function Ku(s){switch(lw(s),s){case"dark":document.documentElement.classList.add("dark"),wn(document.documentElement,"data-theme","dark");break;case"light":default:document.documentElement.classList.remove("dark"),wn(document.documentElement,"data-theme","light");break}return Qu.next(s),s}function dw(){return Ku(Zu()=="dark"?"light":"dark")}function mw(){return dp([fw,Hu("(prefers-color-scheme: dark)")]).pipe(rt(([s,t])=>{if(s)return s;const e=Zu();return e||(t?"dark":"light")}))}function pw(s,t=""){return getComputedStyle(document.documentElement).getPropertyValue(s)||t}function gw(s,t){document.documentElement.style.setProperty(s,t)}function yw(s,t){const e=typeof s=="string"?s:s.toString();let n=t?.initValue;if(typeof n>"u")try{const a=window.sessionStorage.getItem(e);a&&(n=la(a))}catch{}const{get:i,set:r}=Vo(n,{aliveInSeconds:t?.aliveInSeconds,aliveUntilTimestamp:t?.aliveUntilTimestamp}),o=Bi(i().value);return jt(()=>{if(typeof o.value<"u")try{window.sessionStorage.setItem(e,Si(o.value))}catch{}else window.sessionStorage.removeItem(e)}),{get:()=>{const a=i();return o.value=a.value,a.rawValue},set:a=>o.value=r(a)}}function ww(){window.sessionStorage.clear()}function xw(s,t){const e=Bi(t?.value||"");if(!e.value){const n=`; ${document.cookie}`.split(`; ${s}=`).pop()?.split(";").shift();n&&(e.value=decodeURIComponent(n))}return jt(()=>{if(e.value&&t?.days){const n="; expires="+new Date(Date.now()+t.days*864e5).toUTCString(),i=t?.domain?"; domain="+t?.domain:"",r=t?.path?"; path="+t?.path:"",o=t?.secure==!0?"; secure":"";document.cookie=s+"="+encodeURIComponent(e.value)+n+i+r+o}}),{get:()=>e.value,set:n=>e.value=n}}function bw(){const s=document.cookie.split("; ");for(let t=0;t<s.length;t++){const e=window.location.hostname.split(".");for(;e.length>0;){const n=encodeURIComponent(s[t].split(";")[0].split("=")[0])+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain="+e.join(".")+" ;path=",i=location.pathname.split("/");for(document.cookie=n+"/";i.length>0;)document.cookie=n+i.join("/"),i.pop();e.shift()}}}function vw(s,t){let e;return s.objectStoreNames.contains(t)||(e=s.createObjectStore(t,{keyPath:"id"})),e}function _w(s,t=1,e){return new Promise((n,i)=>{let r;const o=window.indexedDB.open(s,t);o.onerror=()=>{i("无法使用IndexDB!")},o.onsuccess=a=>{r=a.target.result,vw(r,e),n(r)}})}function Sw(s,t,e={id:1,name:"xxx"}){return new Promise((n,i)=>{const r=s.transaction([t],"readwrite");r.objectStore(t).add(e),r.oncomplete=a=>{n(a)},r.onerror=a=>{i(a)}})}const Go=new cn;function qo(s,t){return Ci({url:s,...t})}async function ei(s,t){if(typeof fetch>"u")throw new Error("fetch() not supported!");if(typeof AbortController>"u")throw new Error("AbortController not supported!");const e=qo(s,t),n=new AbortController;Go.set(e,n);const{responseType:i,onProgress:r,timeout:o}={responseType:"json",timeout:6e4,...t},a=setTimeout(()=>{throw n.abort(),new Error(`${o} ms Timeout!`)},o);let h=await fetch(new Request(s,{...t,signal:n.signal}));if(Go.delete(e),clearTimeout(a),h.status===200||h.status===0){if(h.status===0&&ms("useFetch: HTTP Status 0 received."),typeof ReadableStream<"u"&&h.body&&h.body.getReader&&r){const c=h.body.getReader(),u=h.headers.get("X-File-Size")||h.headers.get("Content-Length"),l=u?parseInt(u):0,m=l!==0;let f=0;const p=new ReadableStream({start(y){function v(){c.read().then(({done:w,value:_})=>{w?y.close():(f+=_.byteLength,r?.(new ProgressEvent("progress",{lengthComputable:m,loaded:f,total:l})),y.enqueue(_),v())}).catch(w=>{y.error(w)})}v()}});h=new Response(p)}switch(i){case"arraybuffer":return await h.arrayBuffer();case"blob":return await h.blob();case"json":return await h.json();case"text":default:return await h.text()}}else return Promise.reject(h)}function Cw(s,t){const e=Go.get(qo(s,t));e&&e.abort()}function Tw(s=3,t){return Pi(ei,s,t)}function Ew(s=6e4){return Mi(ei,s)}function Pw(s=6e4,t=3,e){return Mi(Pi(ei,t,e),s)}const Mw={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:(s,t)=>{switch(t){case"W":return`${s}周`;default:return`${s}日`}},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:(s,t)=>{const e=s*100+t;return e<600?"凌晨":e<900?"早上":e<1100?"上午":e<1300?"中午":e<1800?"下午":"晚上"}},Aw={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:s=>{const t=["th","st","nd","rd"],e=s%100;return`[${s}${t[(e-20)%10]||t[e]||t[0]}]`}},Re=new cn;let ni="zh-cn";jo(Aw),jo(Mw);function jo(s,t){if(!s)return Re.get(ni);let e;if(typeof s=="string"){const n=s.toLowerCase();if(Re.get(n))e=n;else if(t)Re.set(n,t),e=n;else return Re.get(ni)}else{const{name:n}=s;Re.set(n,s),e=n}return e&&(ni=e),Re.get(e)||Re.get(ni)}let kw=0;function tn(s,t={},e=[],n){return{name:String(++kw),tag:s,props:t,children:e,el:n}}function si(s){return tn(s.tagName,Wr(s),Array.from(s.children).map(t=>si(t)),s)}function vn(s,t=document.documentElement){if(s.el)return s.el;if(s.el=document.createElement(s.tag),s.props)for(const e in s.props){const n=s.props[e];e.startsWith("on")?s.el.addEventListener(e.slice(2).toLowerCase(),n):e==="style"?Gs(s.el,s.props[e]):wn(s.el,e,n)}return s.children&&(typeof s.children=="string"?s.el.appendChild(document.createTextNode(s.children)):s.children.forEach(e=>{vn(e,s.el)})),t.appendChild(s.el),s.el}function ii(s,t){if(!s.el)return;if(s.tag!==t.tag){(s.el.parentElement||document.body).replaceChild(vn(t),s.el);return}const e=t.el=s.el,n=s.props,i=t.props;for(const a in n)a in i||(a.startsWith("on")?e.removeEventListener(a.slice(2).toLowerCase(),n[a]):e.removeAttribute(a));for(const a in i){const h=n[a],c=i[a];if(c!=h)if(a.startsWith("on")){const u=a.slice(2).toLowerCase();e.removeEventListener(u,h),e.addEventListener(u,c)}else if(a==="style"){for(const u in h)u in c||Hr(e,u);Gs(e,c)}else wn(e,a,c)}const r=s.children||[],o=t.children||[];if(typeof o=="string")e.innerHTML=o;else if(typeof r=="string")e.innerHTML="",o.forEach(a=>{vn(a,e)});else{const a=Math.min(r.length,o.length);for(let h=0;h<a;h++)ii(r[h],o[h]);o.length>r.length&&o.slice(r.length).forEach(h=>{vn(h,e)}),o.length<r.length&&r.slice(o.length).forEach(h=>{h.el&&e.removeChild(h.el)})}}class Iw{state;el;constructor(t,e){this.state=Oa(t,!0),this.el=e,this.compile(this.el)}compile(t){t.childNodes.forEach(e=>{switch(e.nodeType){case 1:const n=e;[...n.attributes].forEach(a=>{const h=a.name,c=a.value;if(h==="v-model")if(io(n)){const u=n;jt(()=>{u.checked=this.getStateValue(c)==u.value}),u.addEventListener("change",l=>{this.setStateValue(c,l.target.value)})}else if(so(n)){const u=n;jt(()=>{u.checked=xa(this.getStateValue(c),u.value)}),u.addEventListener("change",l=>{const m=l.target,f=m.value;m.checked?Kl(this.getStateValue(c),f):Ne(this.getStateValue(c),f)})}else if(no(n)){const u=n;jt(()=>{u.value=this.getStateValue(c)}),u.addEventListener("change",l=>{this.setStateValue(c,l.target.value)})}else{const u=n;jt(()=>{u.value=this.getStateValue(c)});const l=m=>{this.setStateValue(c,m.target.value)};u.addEventListener("input",l)}else h==="v-text"?jt(()=>{n.innerText=this.getStateValue(c)}):h==="v-html"&&jt(()=>{n.innerHTML=this.getStateValue(c)})}),n.childNodes.length>0&&this.compile(n);break;case 3:const i=e.textContent||"",r=/\{\{\s*([^{}\s]+)\s*\}\}/g,o=r.exec(i);o&&o[1]&&jt(()=>{e.textContent=i.replace(r,this.getStateValue(o[1]))});break}})}getStateValue(t){let e=this.state;return t.split(".").forEach(n=>{e=e[n]}),e}setStateValue(t,e){let n=this.state;const i=t.split("."),r=i.length;for(let o=0;o<r-1;o++)n=n[i[o]];n[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){
|
|
41
41
|
let output = "";
|
|
42
42
|
function echo(html){
|
|
43
43
|
output += html;
|
|
44
44
|
}
|
|
45
45
|
${t}
|
|
46
46
|
return output;
|
|
47
|
-
})`}}function tl(s,t,e){return new WebSocket(s)}function Dw(s){return`${s}eventbus/${on(3,"number")}/${on(8)}/websocket`}class oe{static CONNECTING=WebSocket.CONNECTING;static OPEN=WebSocket.OPEN;static CLOSING=WebSocket.CLOSING;static CLOSED=WebSocket.CLOSED;url;socketCreatorProtocols;socketCreatorOptions;socketCreator;socket;state=oe.CONNECTING;messageQueue=[];pingInterval;pingTimerID;reconnect;reconnectAttempts=0;maxReconnectAttempts;reconnectTimerID;onopen;onclose;onerror;requestid=0;waitings={};listeners={};constructor(t="",e){this.url=t,this.socketCreatorProtocols=e?.socketCreatorProtocols,this.socketCreatorOptions=e?.socketCreatorOptions||{},this.socketCreator=e?.socketCreator||tl,this.pingInterval=e?.pingInterval||5e3,this.onopen=e?.onopen,this.onclose=e?.onclose,this.onerror=e?.onerror,this.reconnect=typeof e?.reconnect=="boolean"?e.reconnect:!0,this.maxReconnectAttempts=typeof e?.maxReconnectAttempts=="number"?e.maxReconnectAttempts:1/0,this._connect()}open(){this.reconnectAttempts=0,this._connect()}close(){this.state=oe.CLOSING,this.socket?.close()}_connect(){this.socket?.readyState===oe.CONNECTING||this.socket?.readyState===oe.OPEN||(this.state=oe.CONNECTING,this.socket=this.socketCreator(this.url,this.socketCreatorProtocols,this.socketCreatorOptions),this.socket.onopen=()=>{ie(`ws(${this.url}) onopen`),this.state=oe.OPEN,this.ping(),this.pingTimerID=setInterval(this.ping.bind(this),this.pingInterval),this.reconnectTimerID&&(clearTimeout(this.reconnectTimerID),this.reconnectTimerID=void 0);const t=this.messageQueue.slice();this.messageQueue=[],t.forEach(this._send.bind(this)),this.onopen?.()},this.socket.onclose=t=>{const{code:e,reason:n,wasClean:i}=t;ie(`ws(${this.url}) onclose: code(${e}) reason(${n}) wasClean(${i})`),this.state=oe.CLOSED,this.pingTimerID&&(clearInterval(this.pingTimerID),this.pingTimerID=void 0),this.onclose?.(t),this.reconnect&&this.reconnectAttempts<this.maxReconnectAttempts&&(this.socket=void 0,this.reconnectTimerID=setTimeout(this._connect.bind(this),Ea(this.reconnectAttempts++)))},this.socket.onerror=t=>{ie(`ws(${this.url}) onerror: ${t.type} ${t}`),this.onerror?.(t)},this.socket.onmessage=t=>{if(ie(`ws(${this.url}) onmessage: { type: ${t.type}, data: ${t.data}}`),typeof t.data=="string"){let e;try{e=JSON.parse(t.data.substring(1))}catch(n){e=[JSON.stringify({type:"err",failureType:n.toString(),message:t.data})]}e.forEach(n=>{const i=JSON.parse(n);if(i.body&&Object.prototype.hasOwnProperty.call(i.body,"requestid")){const r=this.waitings[i.body.requestid];r?r.resolve?.(i.body):An(`ws(${this.url}) onmessage: found no associated request, already timed out`)}else if(this.listeners[i.address]){const r=this.listeners[i.address];for(let o=0;o<r.length;o++)i.type==="err"?r[o]({failureCode:i.failureCode,failureType:i.failureType,message:i.message}):r[o](null,i.body)}else An(`ws(${this.url}) onmessage: unhandle string`),this.onunhandled(i)})}else t.data instanceof ArrayBuffer?An(`ws(${this.url}) onmessage: unhandle ArrayBuffer`):t.data instanceof Blob&&An(`ws(${this.url}) onmessage: unhandle Blob`)})}onunhandled(t){try{t.type==="err"?this.onerror?.(t):t.event?console.warn("No handler found for event: %o. Message: %O",t.event,t):console.warn("No handler found for message: ",t)}catch{}}_send(t){this.socket?.readyState===oe.OPEN?this.socket.send(JSON.stringify([JSON.stringify(t)])):(this.messageQueue.push(t),this._connect())}ping(){this._send({type:"ping"})}register(t,e,n={}){this.listeners[t]||(this.listeners[t]=[],this._send({type:"register",address:t,headers:Pn(n,this.socketCreatorOptions.headers)})),this.listeners[t].push(e)}unregister(t,e,n={}){const i=this.listeners[t];if(i){const r=i.indexOf(e);r!=-1&&(i.splice(r,1),i.length===0&&(this._send({type:"unregister",address:t,headers:Pn(n,this.socketCreatorOptions.headers)}),delete this.listeners[t]))}}publish(t,e,n={}){this._send({type:"publish",address:t,headers:Pn(n,this.socketCreatorOptions.headers),body:e})}async send(t,e,n={},i=3e4){this.requestid++;const r=this.waitings[this.requestid]={requestid:this.requestid},o=await new Promise((a,h)=>{r.resolve=a,this._send({type:"send",address:t,headers:Pn(n,this.socketCreatorOptions.headers),body:{requestid:r.requestid,...e}}),setTimeout(()=>{h(`ws(${this.url}) send(${r.requestid}: ${an(e)}) Timeout!`)},i)});return delete this.waitings[r.requestid],o}}function Lw(s){const t=document.documentElement,e=window.top===window.self?window.devicePixelRatio:1;t.dataset.dpr=e;let n=100;const i=function(){const r=Math.min(t.clientWidth,s);t.dataset.width=r,t.dataset.rem=n=Math.round(100*(r/s)),t.style.fontSize=n+"px"};i(),window.rem2px=function(r){return r=parseFloat(r),r*n},window.px2rem=function(r){return r=parseFloat(r),r/n},window.addEventListener&&window.addEventListener("orientationchange"in window?"orientationchange":"resize",i,!1)}function ri(s=window.location.href){try{return new URL(s)}catch{const e="(?<protocol>https?:)",n="(?<host>(?<hostname>[^/#?:]+)(?::(?<port>\\d+))?)",i="(?<pathname>(?:\\/[^/#?]+)*\\/?)",r="(?<search>(?:\\?[^#]*)?)",o="(?<hash>(?:#.*)?)",h=new RegExp(`^${e}//${n}${i}${r}${o}$`).exec(s);return{href:s,protocol:h?.groups?.protocol??"",host:h?.groups?.host??"",hostname:h?.groups?.hostname??"",port:h?.groups?.port??"",pathname:h?.groups?.pathname??"",search:h?.groups?.search??"",hash:h?.groups?.hash??""}}}function Rw(s){const t=ri(s);return t.protocol==="http:"||t.protocol==="https:"}function el(s=window.location.href){const t=ri(s),e=t.href.indexOf(t.hash);return t.hash&&e>=0?t.href.substring(0,e):t.href}function Ow(s=ri().search){s=decodeURIComponent(s).replace(/^[#?&]/,"");const t={};if(!s)return t;const e=/(?:^|&)([^&=]*)=?([^&]*?)(?=&|$)/y;let n=e.exec(s);for(;n;)t[n[1]]=n[2],n=e.exec(s);return t}const zw=(s=window.location.href)=>JSON.parse('{"'+decodeURI(s.split("?")[1]).replace(/"/g,'\\"').replace(/&/g,'","').replace(/=/g,'":"')+'"}');function oi(s){return"?"+Object.entries(s).map(([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`).join("&")}function nl(s){return"?"+[...s.entries()].map(t=>encodeURIComponent(t[0])+"="+encodeURIComponent(t[1]instanceof File?t[1].name:t[1])).join("&")}function sl(s,t){return s.replace(/(?:\?.*)?$/,t.replace(/^[&?]/,"?"))}function Nw(s,t){return sl(s,oi(t))}function Ho(s,t){return s+t.replace(/^[&?]/,s.indexOf("?")>=0?"&":"?")}function Bw(s,t){return Ho(s,oi(t))}class Fw{worker;cbs={};constructor(t){if(Yc)try{this.worker=new Worker(URL.createObjectURL(new Blob([t])))}catch(e){throw typeof console!==void 0&&typeof console.warn=="function"&&console.warn("🎊 Could not load worker",e),e}else throw new Error("Your environment do not support Worker !")}postMessage(t,e=[]){this.worker.postMessage(t,e)}onmessage(t){this.worker.addEventListener("message",t)}offmessage(t){this.worker.removeEventListener("message",t)}onmessageerror(t){this.worker.addEventListener("messageerror",t)}offmessageerror(t){this.worker.removeEventListener("messageerror",t)}postCanvas(t){const e=t.transferControlToOffscreen();this.worker.postMessage({canvas:e},[e])}postPort(t){this.worker.postMessage({port:t},[t])}postReset(){this.worker.postMessage({reset:!0});for(const t in this.cbs)this.cbs[t](),delete this.cbs[t]}fire(t,e){return new Promise(n=>{if(e){const i=Math.random().toString(36).slice(2),r=o=>{o.data.id===i&&(this.worker.removeEventListener("message",r),delete this.cbs[i],e(),n())};this.cbs[i]=r.bind(this,{data:{id:i}}),this.worker.addEventListener("message",r),this.worker.postMessage({...t,id:i})}else this.worker.postMessage(t),n()})}}class Yw{port1;port2;port1MessageCbs=[];port2MessageCbs=[];port1MessageErrorCbs=[];port2MessageErrorCbs=[];constructor(){const{port1:t,port2:e}=new MessageChannel;this.port1=t,this.port2=e,this.port1.addEventListener("message",n=>{this.port1MessageCbs.forEach(i=>i(this.port1,n))}),this.port1.addEventListener("messageerror",n=>{this.port1MessageErrorCbs.forEach(i=>i(this.port1,n))}),this.port1.start(),this.port2.addEventListener("message",n=>{this.port2MessageCbs.forEach(i=>i(this.port2,n))}),this.port2.addEventListener("messageerror",n=>{this.port2MessageErrorCbs.forEach(i=>i(this.port2,n))}),this.port2.start()}close(){this.port1.close(),this.port2.close()}onPort1Message(t){this.port1MessageCbs.push(t)}onPort1MessageError(t){this.port1MessageErrorCbs.push(t)}offPort1Message(t){Ne(this.port1MessageCbs,t)}offPort1MessageError(t){Ne(this.port1MessageErrorCbs,t)}onPort2Message(t){this.port2MessageCbs.push(t)}onPort2MessageError(t){this.port2MessageErrorCbs.push(t)}offPort2Message(t){Ne(this.port2MessageCbs,t)}offPort2MessageError(t){Ne(this.port2MessageErrorCbs,t)}}function il(){let s=null;if(window.ActiveXObject){const t=["Microsoft.XMLHTTP","MSXML6.XMLHTTP","MSXML5.XMLHTTP","MSXML4.XMLHTTP","MSXML3.XMLHTTP","MSXML2.XMLHTTP","MSXML.XMLHTTP"];for(let e=0,n=t.length;e<n;e++)try{s=new window.ActiveXObject(t[e]);break}catch{continue}}else s=new XMLHttpRequest;return s}function $w(s,t){return new Promise((e,n)=>{const{method:i="GET",data:r={},multipartFormDataString:o="",boundary:a="",headers:h={},withCredentials:c=!1,responseType:u="json",timeout:l=3e4}=t||{},m=il();m.timeout=l,m.responseType=u,m.onreadystatechange=function(_){m.readyState===4&&(m.status===200?e(m.response):n(m.statusText))},m.ontimeout=()=>{n(`${s} is timed out for ${l}ms.`)},m.addEventListener("load",_=>t?.load?.(_,m),!1),m.addEventListener("loadstart",_=>t?.loadstart?.(_,m),!1),m.addEventListener("loadend",_=>t?.loadend?.(_,m),!1),m.addEventListener("progress",_=>{if(_.lengthComputable){const x=Math.round(_.loaded*100/_.total);t?.progress?.(_,m,x)}},!1),m.addEventListener("error",_=>t?.error?.(_,m),!1),m.addEventListener("abort",_=>t?.abort?.(_,m),!1);const f=i.toUpperCase();Object.assign(h,{Accept:"*/*"});let p=!1,y=!1,v=!1;function w(){c&&(m.withCredentials=!0);for(const _ in h)xt(_).toLowerCase()=="content-type"&&h[_].toLowerCase()=="multipart/form-data"?(p=!0,m.setRequestHeader("Content-Type","multipart/form-data; boundary="+a)):(xt(_).toLowerCase()=="content-type"&&(h[_].toLowerCase().indexOf("text/plain")>=0?y=!0:h[_].toLowerCase().indexOf("application/json")>=0&&(v=!0)),m.setRequestHeader(_,h[_]))}switch(f){case"GET":let _="";r instanceof FormData?_=nl(r):_=oi(r),m.open("GET",Ho(s,_),!0),w(),m.send(null);break;default:m.open(f,s,!0),w(),p?m.sendAsBinary(o):v?m.send(JSON.stringify(r)):y?m.send(Object.entries(r).map(([x,b])=>`${x}=${b}`).join(`\r
|
|
48
|
-
`)):m.send(Object.entries(r).map(([x,b])=>`${encodeURIComponent(x)}=${encodeURIComponent(b)}`).join("&"));break}})}async function Xw(s){const t={url:s.action||"",data:{},contentType:s.method.toLowerCase()==="post"&&s.enctype?s.enctype:"application/x-www-form-urlencoded",multipartFormDataString:"",boundary:"---------------------------"+Date.now().toString(16)},e=[],n=t.contentType=="multipart/form-data";for(let i=0;i<s.elements.length;i++){const r=s.elements[i];if(!r.hasAttribute("name"))continue;const o=r.getAttribute("type");switch(r.nodeName.toUpperCase()==="INPUT"&&o?o.toUpperCase():""){case"FILE":const h=r;if(n)for(let l=0,m=h.files?.length||0;l<m;l++){const f=h.files?.[l];if(f){const p=await
|
|
47
|
+
})`}}function tl(s,t,e){return new WebSocket(s)}function Dw(s){return`${s}eventbus/${on(3,"number")}/${on(8)}/websocket`}class oe{static CONNECTING=WebSocket.CONNECTING;static OPEN=WebSocket.OPEN;static CLOSING=WebSocket.CLOSING;static CLOSED=WebSocket.CLOSED;url;socketCreatorProtocols;socketCreatorOptions;socketCreator;socket;state=oe.CONNECTING;messageQueue=[];pingInterval;pingTimerID;reconnect;reconnectAttempts=0;maxReconnectAttempts;reconnectTimerID;onopen;onclose;onerror;requestid=0;waitings={};listeners={};constructor(t="",e){this.url=t,this.socketCreatorProtocols=e?.socketCreatorProtocols,this.socketCreatorOptions=e?.socketCreatorOptions||{},this.socketCreator=e?.socketCreator||tl,this.pingInterval=e?.pingInterval||5e3,this.onopen=e?.onopen,this.onclose=e?.onclose,this.onerror=e?.onerror,this.reconnect=typeof e?.reconnect=="boolean"?e.reconnect:!0,this.maxReconnectAttempts=typeof e?.maxReconnectAttempts=="number"?e.maxReconnectAttempts:1/0,this._connect()}open(){this.reconnectAttempts=0,this._connect()}close(){this.state=oe.CLOSING,this.socket?.close()}_connect(){this.socket?.readyState===oe.CONNECTING||this.socket?.readyState===oe.OPEN||(this.state=oe.CONNECTING,this.socket=this.socketCreator(this.url,this.socketCreatorProtocols,this.socketCreatorOptions),this.socket.onopen=()=>{ie(`ws(${this.url}) onopen`),this.state=oe.OPEN,this.ping(),this.pingTimerID=setInterval(this.ping.bind(this),this.pingInterval),this.reconnectTimerID&&(clearTimeout(this.reconnectTimerID),this.reconnectTimerID=void 0);const t=this.messageQueue.slice();this.messageQueue=[],t.forEach(this._send.bind(this)),this.onopen?.()},this.socket.onclose=t=>{const{code:e,reason:n,wasClean:i}=t;ie(`ws(${this.url}) onclose: code(${e}) reason(${n}) wasClean(${i})`),this.state=oe.CLOSED,this.pingTimerID&&(clearInterval(this.pingTimerID),this.pingTimerID=void 0),this.onclose?.(t),this.reconnect&&this.reconnectAttempts<this.maxReconnectAttempts&&(this.socket=void 0,this.reconnectTimerID=setTimeout(this._connect.bind(this),Ea(this.reconnectAttempts++)))},this.socket.onerror=t=>{ie(`ws(${this.url}) onerror: ${t.type} ${t}`),this.onerror?.(t)},this.socket.onmessage=t=>{if(ie(`ws(${this.url}) onmessage: { type: ${t.type}, data: ${t.data} }`),typeof t.data=="string"){let e;try{e=JSON.parse(t.data.substring(1))}catch(n){e=[JSON.stringify({type:"err",failureType:n.toString(),message:t.data})]}e.forEach(n=>{const i=JSON.parse(n);if(i.body&&Object.prototype.hasOwnProperty.call(i.body,"requestid")){const r=this.waitings[i.body.requestid];r?r.resolve?.(i.body):ms(`ws(${this.url}) onmessage: found no associated request, already timed out`)}else if(this.listeners[i.address]){const r=this.listeners[i.address];for(let o=0;o<r.length;o++)i.type==="err"?r[o]({failureCode:i.failureCode,failureType:i.failureType,message:i.message}):r[o](null,i.body)}else this.onunhandled(i)})}else t.data instanceof ArrayBuffer?ms(`ws(${this.url}) onmessage: unhandle ArrayBuffer`):t.data instanceof Blob&&ms(`ws(${this.url}) onmessage: unhandle Blob`)})}onunhandled(t){try{t.type==="err"?this.onerror?.(t):t.event?console.warn("No handler found for event: %o. Message: %O",t.event,t):console.warn("No handler found for message: ",t)}catch{}}_send(t){this.socket?.readyState===oe.OPEN?this.socket.send(JSON.stringify([JSON.stringify(t)])):(this.messageQueue.push(t),this._connect())}ping(){this._send({type:"ping"})}register(t,e,n={}){this.listeners[t]||(this.listeners[t]=[],this._send({type:"register",address:t,headers:Pn(n,this.socketCreatorOptions.headers)})),this.listeners[t].push(e)}unregister(t,e,n={}){const i=this.listeners[t];if(i){const r=i.indexOf(e);r!=-1&&(i.splice(r,1),i.length===0&&(this._send({type:"unregister",address:t,headers:Pn(n,this.socketCreatorOptions.headers)}),delete this.listeners[t]))}}publish(t,e,n={}){this._send({type:"publish",address:t,headers:Pn(n,this.socketCreatorOptions.headers),body:e})}async send(t,e,n={},i=3e4){this.requestid++;const r=this.waitings[this.requestid]={requestid:this.requestid},o=await new Promise((a,h)=>{r.resolve=a,this._send({type:"send",address:t,headers:Pn(n,this.socketCreatorOptions.headers),body:{requestid:r.requestid,...e}}),setTimeout(()=>{h(`ws(${this.url}) send(${r.requestid}: ${an(e)}) Timeout!`)},i)});return delete this.waitings[r.requestid],o}}function Lw(s){const t=document.documentElement,e=window.top===window.self?window.devicePixelRatio:1;t.dataset.dpr=e;let n=100;const i=function(){const r=Math.min(t.clientWidth,s);t.dataset.width=r,t.dataset.rem=n=Math.round(100*(r/s)),t.style.fontSize=n+"px"};i(),window.rem2px=function(r){return r=parseFloat(r),r*n},window.px2rem=function(r){return r=parseFloat(r),r/n},window.addEventListener&&window.addEventListener("orientationchange"in window?"orientationchange":"resize",i,!1)}function ri(s=window.location.href){try{return new URL(s)}catch{const e="(?<protocol>https?:)",n="(?<host>(?<hostname>[^/#?:]+)(?::(?<port>\\d+))?)",i="(?<pathname>(?:\\/[^/#?]+)*\\/?)",r="(?<search>(?:\\?[^#]*)?)",o="(?<hash>(?:#.*)?)",h=new RegExp(`^${e}//${n}${i}${r}${o}$`).exec(s);return{href:s,protocol:h?.groups?.protocol??"",host:h?.groups?.host??"",hostname:h?.groups?.hostname??"",port:h?.groups?.port??"",pathname:h?.groups?.pathname??"",search:h?.groups?.search??"",hash:h?.groups?.hash??""}}}function Rw(s){const t=ri(s);return t.protocol==="http:"||t.protocol==="https:"}function el(s=window.location.href){const t=ri(s),e=t.href.indexOf(t.hash);return t.hash&&e>=0?t.href.substring(0,e):t.href}function Ow(s=ri().search){s=decodeURIComponent(s).replace(/^[#?&]/,"");const t={};if(!s)return t;const e=/(?:^|&)([^&=]*)=?([^&]*?)(?=&|$)/y;let n=e.exec(s);for(;n;)t[n[1]]=n[2],n=e.exec(s);return t}const zw=(s=window.location.href)=>JSON.parse('{"'+decodeURI(s.split("?")[1]).replace(/"/g,'\\"').replace(/&/g,'","').replace(/=/g,'":"')+'"}');function oi(s){return"?"+Object.entries(s).map(([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`).join("&")}function nl(s){return"?"+[...s.entries()].map(t=>encodeURIComponent(t[0])+"="+encodeURIComponent(t[1]instanceof File?t[1].name:t[1])).join("&")}function sl(s,t){return s.replace(/(?:\?.*)?$/,t.replace(/^[&?]/,"?"))}function Nw(s,t){return sl(s,oi(t))}function Ho(s,t){return s+t.replace(/^[&?]/,s.indexOf("?")>=0?"&":"?")}function Bw(s,t){return Ho(s,oi(t))}class Fw{worker;cbs={};constructor(t){if(Yc)try{this.worker=new Worker(URL.createObjectURL(new Blob([t])))}catch(e){throw typeof console!==void 0&&typeof console.warn=="function"&&console.warn("🎊 Could not load worker",e),e}else throw new Error("Your environment do not support Worker !")}postMessage(t,e=[]){this.worker.postMessage(t,e)}onmessage(t){this.worker.addEventListener("message",t)}offmessage(t){this.worker.removeEventListener("message",t)}onmessageerror(t){this.worker.addEventListener("messageerror",t)}offmessageerror(t){this.worker.removeEventListener("messageerror",t)}postCanvas(t){const e=t.transferControlToOffscreen();this.worker.postMessage({canvas:e},[e])}postPort(t){this.worker.postMessage({port:t},[t])}postReset(){this.worker.postMessage({reset:!0});for(const t in this.cbs)this.cbs[t](),delete this.cbs[t]}fire(t,e){return new Promise(n=>{if(e){const i=Math.random().toString(36).slice(2),r=o=>{o.data.id===i&&(this.worker.removeEventListener("message",r),delete this.cbs[i],e(),n())};this.cbs[i]=r.bind(this,{data:{id:i}}),this.worker.addEventListener("message",r),this.worker.postMessage({...t,id:i})}else this.worker.postMessage(t),n()})}}class Yw{port1;port2;port1MessageCbs=[];port2MessageCbs=[];port1MessageErrorCbs=[];port2MessageErrorCbs=[];constructor(){const{port1:t,port2:e}=new MessageChannel;this.port1=t,this.port2=e,this.port1.addEventListener("message",n=>{this.port1MessageCbs.forEach(i=>i(this.port1,n))}),this.port1.addEventListener("messageerror",n=>{this.port1MessageErrorCbs.forEach(i=>i(this.port1,n))}),this.port1.start(),this.port2.addEventListener("message",n=>{this.port2MessageCbs.forEach(i=>i(this.port2,n))}),this.port2.addEventListener("messageerror",n=>{this.port2MessageErrorCbs.forEach(i=>i(this.port2,n))}),this.port2.start()}close(){this.port1.close(),this.port2.close()}onPort1Message(t){this.port1MessageCbs.push(t)}onPort1MessageError(t){this.port1MessageErrorCbs.push(t)}offPort1Message(t){Ne(this.port1MessageCbs,t)}offPort1MessageError(t){Ne(this.port1MessageErrorCbs,t)}onPort2Message(t){this.port2MessageCbs.push(t)}onPort2MessageError(t){this.port2MessageErrorCbs.push(t)}offPort2Message(t){Ne(this.port2MessageCbs,t)}offPort2MessageError(t){Ne(this.port2MessageErrorCbs,t)}}function il(){let s=null;if(window.ActiveXObject){const t=["Microsoft.XMLHTTP","MSXML6.XMLHTTP","MSXML5.XMLHTTP","MSXML4.XMLHTTP","MSXML3.XMLHTTP","MSXML2.XMLHTTP","MSXML.XMLHTTP"];for(let e=0,n=t.length;e<n;e++)try{s=new window.ActiveXObject(t[e]);break}catch{continue}}else s=new XMLHttpRequest;return s}function $w(s,t){return new Promise((e,n)=>{const{method:i="GET",data:r={},multipartFormDataString:o="",boundary:a="",headers:h={},withCredentials:c=!1,responseType:u="json",timeout:l=3e4}=t||{},m=il();m.timeout=l,m.responseType=u,m.onreadystatechange=function(_){m.readyState===4&&(m.status===200?e(m.response):n(m.statusText))},m.ontimeout=()=>{n(`${s} is timed out for ${l}ms.`)},m.addEventListener("load",_=>t?.load?.(_,m),!1),m.addEventListener("loadstart",_=>t?.loadstart?.(_,m),!1),m.addEventListener("loadend",_=>t?.loadend?.(_,m),!1),m.addEventListener("progress",_=>{if(_.lengthComputable){const x=Math.round(_.loaded*100/_.total);t?.progress?.(_,m,x)}},!1),m.addEventListener("error",_=>t?.error?.(_,m),!1),m.addEventListener("abort",_=>t?.abort?.(_,m),!1);const f=i.toUpperCase();Object.assign(h,{Accept:"*/*"});let p=!1,y=!1,v=!1;function w(){c&&(m.withCredentials=!0);for(const _ in h)xt(_).toLowerCase()=="content-type"&&h[_].toLowerCase()=="multipart/form-data"?(p=!0,m.setRequestHeader("Content-Type","multipart/form-data; boundary="+a)):(xt(_).toLowerCase()=="content-type"&&(h[_].toLowerCase().indexOf("text/plain")>=0?y=!0:h[_].toLowerCase().indexOf("application/json")>=0&&(v=!0)),m.setRequestHeader(_,h[_]))}switch(f){case"GET":let _="";r instanceof FormData?_=nl(r):_=oi(r),m.open("GET",Ho(s,_),!0),w(),m.send(null);break;default:m.open(f,s,!0),w(),p?m.sendAsBinary(o):v?m.send(JSON.stringify(r)):y?m.send(Object.entries(r).map(([x,b])=>`${x}=${b}`).join(`\r
|
|
48
|
+
`)):m.send(Object.entries(r).map(([x,b])=>`${encodeURIComponent(x)}=${encodeURIComponent(b)}`).join("&"));break}})}async function Xw(s){const t={url:s.action||"",data:{},contentType:s.method.toLowerCase()==="post"&&s.enctype?s.enctype:"application/x-www-form-urlencoded",multipartFormDataString:"",boundary:"---------------------------"+Date.now().toString(16)},e=[],n=t.contentType=="multipart/form-data";for(let i=0;i<s.elements.length;i++){const r=s.elements[i];if(!r.hasAttribute("name"))continue;const o=r.getAttribute("type");switch(r.nodeName.toUpperCase()==="INPUT"&&o?o.toUpperCase():""){case"FILE":const h=r;if(n)for(let l=0,m=h.files?.length||0;l<m;l++){const f=h.files?.[l];if(f){const p=await Ln(f,$t.binaryString);e.push('Content-Disposition: form-data; name="'+h.name+'"; filename="'+f.name+`"\r
|
|
49
49
|
Content-Type: `+f.type+`\r
|
|
50
50
|
\r
|
|
51
51
|
`+p+`\r
|
|
@@ -55,9 +55,9 @@ Content-Type: `+f.type+`\r
|
|
|
55
55
|
`):t.data[u.name]=u.value;break}}return t.multipartFormDataString="--"+t.boundary+`\r
|
|
56
56
|
`+e.join("--"+t.boundary+`\r
|
|
57
57
|
`)+"--"+t.boundary+`--\r
|
|
58
|
-
`,t}class Uw extends wo{currentItem={};items=[];groups=[];globalStyles={};grad={};idtops={};text="";constructor(t){super(t),this.on("tag",(e,n)=>{switch(this.text="",this.currentItem={type:e},e){case"g":this.groups.push(this.currentItem);break}this.processAttrs(e,n)}),this.on("text",e=>{if(this.currentItem.type=="style"){try{const n=xo(e);for(const i of n.stylesheet.rules)for(const r of i.declarations)for(const o of i.selectors)this.globalStyles[o]=this.globalStyles[o]||[],this.globalStyles[o].push(`${r.property}:${r.value}`)}catch{console.error("CAN'T parse css text: "+e)}return}this.text+=e}),this.on("/tag",(e,n)=>{let i=this.groups.length;for(;i--;)if(this.groups[i]!=this.currentItem){let r="",o="";for(const a in this.groups[i])a=="transform"?r=this.groups[i].transform:a=="class"&&this.globalStyles["."+this.groups[i][a]]?o=this.globalStyles["."+this.groups[i][a]].join(";")+";"+o:a=="id"&&this.globalStyles["#"+this.groups[i][a]]?o=this.globalStyles["#"+this.groups[i][a]].join(";")+";"+o:typeof this.currentItem[a]>"u"&&(this.currentItem[a]=this.groups[i][a]);typeof this.currentItem.transform>"u"?this.currentItem.transform=r:this.currentItem.transform+=" "+r,typeof this.currentItem.style>"u"?this.currentItem.style=o:this.currentItem.style=o+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),Jo(this.currentItem.style,this.currentItem,Zo)}switch(this.processAttrs(e,n),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 n=[],i;switch(t){case"svg":let r="",o="";if(e.width&&e.height)r=e.width,o=e.height;else if(e.viewBox){const a=e.viewBox.split(/\s+/gi);a.length==4&&(r=String(parseFloat(a[2])-parseFloat(a[0])),o=String(parseFloat(a[3])-parseFloat(a[1])))}r&&o&&this.items.push({type:"viewbox",width:r,height:o});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&&Jo(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+Wo(parseFloat(e.x1),parseFloat(e.y1),parseFloat(e.x2),parseFloat(e.y2),parseFloat(e.x1)+100,parseFloat(e.y1))).toFixed(2),n=[this.grad.angle];for(let a=0,h=this.grad.stops.length;a<h;a++)i=this.grad.stops[a],a&&a!=h-1?n.push(i.color+":"+i.offset):n.push(i.color);this.idtops[this.grad.id]=n.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break;case"radialGradient":n=[];for(let a=0,h=this.grad.stops.length;a<h;a++)i=this.grad.stops[a],a&&a!=h-1?n.push(i.color+":"+i.offset):n.push(i.color);this.idtops[this.grad.id]=n.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break}for(const r in e){const o=e[r];if(Zo.includes(r)&&(this.currentItem[r]=o),r==="id"&&(this.currentItem.type==="linearGradient"&&(this.grad={id:r,stops:[]}),this.currentItem.type==="radialGradient"&&(this.grad={id:r,stops:[]})),r==="style"&&Jo(o,this.currentItem,Zo),r==="transform"&&(this.currentItem.transform=o+(this.currentItem.transform||" ")),r==="fill"){const a=o.match(/url\(#([^)]+)\)/);if(a){const h=a[1];this.currentItem.fillid=h,this.idtops[h]&&(this.currentItem.fill=this.idtops[h])}}r==="points"&&this.currentItem.type=="polygon"&&(this.currentItem.path="M"+o+"z"),r==="d"&&this.currentItem.type=="path"&&(this.currentItem.path=o),r==="xlink:href"&&this.currentItem.type=="image"&&(this.currentItem.src=o)}}addToItems(){this.items.push(this.currentItem)}}function Wo(s,t,e,n,i,r){if(typeof i>"u"||typeof r>"u"){const o=s-e,a=t-n;return!o&&!a?0:(180+Math.atan2(-a,-o)*180/Math.PI+360)%360}else return Wo(s,t,i,r)-Wo(e,n,i,r)}function Jo(s,t,e){const n=(s+"").split(";"),i=/^\s+|\s+$/g;for(let r=0,o=n.length;r<o;r++){const a=n[r].split(":"),h=a[0].replace(i,"").replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()});(!e||e.includes(h))&&(t[h]=a[1].replace(i,""))}}const Zo=["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 Vw{localVideoUtil;remoteVideoUtil;localPeerConnection=null;remotePeerConnection=null;constructor(t,e){this.localVideoUtil=new
|
|
58
|
+
`,t}class Uw extends wo{currentItem={};items=[];groups=[];globalStyles={};grad={};idtops={};text="";constructor(t){super(t),this.on("tag",(e,n)=>{switch(this.text="",this.currentItem={type:e},e){case"g":this.groups.push(this.currentItem);break}this.processAttrs(e,n)}),this.on("text",e=>{if(this.currentItem.type=="style"){try{const n=xo(e);for(const i of n.stylesheet.rules)for(const r of i.declarations)for(const o of i.selectors)this.globalStyles[o]=this.globalStyles[o]||[],this.globalStyles[o].push(`${r.property}:${r.value}`)}catch{console.error("CAN'T parse css text: "+e)}return}this.text+=e}),this.on("/tag",(e,n)=>{let i=this.groups.length;for(;i--;)if(this.groups[i]!=this.currentItem){let r="",o="";for(const a in this.groups[i])a=="transform"?r=this.groups[i].transform:a=="class"&&this.globalStyles["."+this.groups[i][a]]?o=this.globalStyles["."+this.groups[i][a]].join(";")+";"+o:a=="id"&&this.globalStyles["#"+this.groups[i][a]]?o=this.globalStyles["#"+this.groups[i][a]].join(";")+";"+o:typeof this.currentItem[a]>"u"&&(this.currentItem[a]=this.groups[i][a]);typeof this.currentItem.transform>"u"?this.currentItem.transform=r:this.currentItem.transform+=" "+r,typeof this.currentItem.style>"u"?this.currentItem.style=o:this.currentItem.style=o+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),Jo(this.currentItem.style,this.currentItem,Zo)}switch(this.processAttrs(e,n),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 n=[],i;switch(t){case"svg":let r="",o="";if(e.width&&e.height)r=e.width,o=e.height;else if(e.viewBox){const a=e.viewBox.split(/\s+/gi);a.length==4&&(r=String(parseFloat(a[2])-parseFloat(a[0])),o=String(parseFloat(a[3])-parseFloat(a[1])))}r&&o&&this.items.push({type:"viewbox",width:r,height:o});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&&Jo(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+Wo(parseFloat(e.x1),parseFloat(e.y1),parseFloat(e.x2),parseFloat(e.y2),parseFloat(e.x1)+100,parseFloat(e.y1))).toFixed(2),n=[this.grad.angle];for(let a=0,h=this.grad.stops.length;a<h;a++)i=this.grad.stops[a],a&&a!=h-1?n.push(i.color+":"+i.offset):n.push(i.color);this.idtops[this.grad.id]=n.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break;case"radialGradient":n=[];for(let a=0,h=this.grad.stops.length;a<h;a++)i=this.grad.stops[a],a&&a!=h-1?n.push(i.color+":"+i.offset):n.push(i.color);this.idtops[this.grad.id]=n.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break}for(const r in e){const o=e[r];if(Zo.includes(r)&&(this.currentItem[r]=o),r==="id"&&(this.currentItem.type==="linearGradient"&&(this.grad={id:r,stops:[]}),this.currentItem.type==="radialGradient"&&(this.grad={id:r,stops:[]})),r==="style"&&Jo(o,this.currentItem,Zo),r==="transform"&&(this.currentItem.transform=o+(this.currentItem.transform||" ")),r==="fill"){const a=o.match(/url\(#([^)]+)\)/);if(a){const h=a[1];this.currentItem.fillid=h,this.idtops[h]&&(this.currentItem.fill=this.idtops[h])}}r==="points"&&this.currentItem.type=="polygon"&&(this.currentItem.path="M"+o+"z"),r==="d"&&this.currentItem.type=="path"&&(this.currentItem.path=o),r==="xlink:href"&&this.currentItem.type=="image"&&(this.currentItem.src=o)}}addToItems(){this.items.push(this.currentItem)}}function Wo(s,t,e,n,i,r){if(typeof i>"u"||typeof r>"u"){const o=s-e,a=t-n;return!o&&!a?0:(180+Math.atan2(-a,-o)*180/Math.PI+360)%360}else return Wo(s,t,i,r)-Wo(e,n,i,r)}function Jo(s,t,e){const n=(s+"").split(";"),i=/^\s+|\s+$/g;for(let r=0,o=n.length;r<o;r++){const a=n[r].split(":"),h=a[0].replace(i,"").replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()});(!e||e.includes(h))&&(t[h]=a[1].replace(i,""))}}const Zo=["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 Vw{localVideoUtil;remoteVideoUtil;localPeerConnection=null;remotePeerConnection=null;constructor(t,e){this.localVideoUtil=new es(t),this.remoteVideoUtil=new es(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(n=>{this.localVideoUtil.setSrcObject(n),t(n)}).catch(n=>{this.trace(`navigator.getUserMedia error: ${n}.`),e(n)})})}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(),n=t.getAudioTracks();e.length>0&&this.trace(`Using video device: ${e[0].label}.`),n.length>0&&this.trace(`Using audio device: ${n[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 o=new RTCPeerConnection(i);this.remotePeerConnection=o,this.trace("Created remote peer connection object remotePeerConnection."),o.addEventListener("icecandidate",this.handleConnection),o.addEventListener("iceconnectionstatechange",this.handleConnectionChange),o.addEventListener("track",this.gotRemoteMediaStream),this.trace("Add local localStream to localPeerConnection."),r.addTrack(e[0],t),r.addTrack(n[0],t),this.trace("localPeerConnection createOffer start."),r.createOffer({offerToReceiveVideo:!0}).then(a=>this.createdOffer(a)).catch(a=>this.setSessionDescriptionError(a))}handleConnection(t){const e=t.target,n=t.candidate;if(e&&n){const i=new RTCIceCandidate(n),r=this.getOtherPeer(e);r&&(r.addIceCandidate(i).then(()=>{this.handleConnectionSuccess(e)}).catch(o=>{this.handleConnectionFailure(e,o)}),this.trace(`${this.getPeerName(e)} ICE candidate:
|
|
59
59
|
${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:
|
|
60
60
|
${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:
|
|
61
61
|
${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:
|
|
62
|
-
${t.sdp}.`),this.remotePeerConnection&&(this.trace("remotePeerConnection setLocalDescription start."),this.remotePeerConnection.setLocalDescription(t).then(()=>{this.setLocalDescriptionSuccess(this.remotePeerConnection)}).catch(e=>this.setSessionDescriptionError(e))),this.localPeerConnection&&(this.trace("localPeerConnection setRemoteDescription start."),this.localPeerConnection.setRemoteDescription(t).then(()=>{this.setRemoteDescriptionSuccess(this.localPeerConnection)}).catch(e=>this.setSessionDescriptionError(e)))}setSessionDescriptionError(t){this.trace(`Failed to create session description: ${t.toString()}.`)}setDescriptionSuccess(t,e){const n=this.getPeerName(t);this.trace(`${n} ${e} complete.`)}setLocalDescriptionSuccess(t){this.setDescriptionSuccess(t,"setLocalDescription")}setRemoteDescriptionSuccess(t){this.setDescriptionSuccess(t,"setRemoteDescription")}trace(t){t=t.trim();const e=(window.performance.now()/1e3).toFixed(3);console.log(e,t);const n=document.createElement("div");n.innerHTML=`<div>${e}, ${t}</div>`,document.getElementById("trace")?.appendChild(n)}getOtherPeer(t){return t===this.localPeerConnection?this.remotePeerConnection:this.localPeerConnection}getPeerName(t){return t===this.localPeerConnection?"localPeerConnection":"remotePeerConnection"}}class Gw{canvas;gl;constructor(t){this.canvas=t;const e={alpha:!0,premultipliedAlpha:!1};if(this.gl=this.canvas.getContext("webgl",e),!this.gl)throw new Error("WebGL failed to initialize.")}}const rl=[],ol={};function Qo(s){rl.push(s)}function qw(s,t=!1){const e=el();if(ol[e])return;wx.error(r=>{console.log(r.errMsg||JSON.stringify(r))}),wx.ready(()=>{rl.forEach(r=>r())});const n=["updateAppMessageShareData","updateTimelineShareData","onMenuShareWeibo","onMenuShareQZone","startRecord","stopRecord","onVoiceRecordEnd","playVoice","pauseVoice","stopVoice","onVoicePlayEnd","uploadVoice","downloadVoice","chooseImage","previewImage","uploadImage","downloadImage","getLocalImgData","translateVoice","getNetworkType","openLocation","getLocation","hideOptionMenu","showOptionMenu","hideMenuItems","showMenuItems","hideAllNonBaseMenuItem","showAllNonBaseMenuItem","closeWindow","scanQRCode","openProductSpecificView","addCard","chooseCard","openCard"],i=["wx-open-launch-app","wx-open-launch-app","wx-open-subscribe","wx-open-audio"];wx.config(Object.assign(s,{debug:t,jsApiList:n,openTagList:i})),ol[e]=!0}function jw(s){return new Promise((t,e)=>{wx.checkJsApi({jsApiList:[s],success:function(n){n.checkResult[s]?t(!0):e(!1)},fail:function(){e(!1)}})})}function Hw(s){Qo(function(){wx.updateAppMessageShareData(s)})}function Ww(s){Qo(function(){wx.updateTimelineShareData(s)})}function Jw(s){wx.chooseImage(s)}function Zw(s){wx.previewImage(s)}function Qw(s){wx.uploadImage(s)}function Kw(s){wx.downloadImage(s)}function t2(s){wx.getLocalImgData(s)}function e2(){wx.startRecord()}function n2(s){wx.stopRecord(s)}function s2(s){wx.onVoiceRecordEnd(s)}function i2(s){wx.playVoice(s)}function r2(s){wx.pauseVoice(s)}function o2(s){wx.stopVoice(s)}function a2(s){wx.onVoicePlayEnd(s)}function h2(s){wx.uploadVoice(s)}function c2(s){wx.downloadVoice(s)}function u2(s){wx.translateVoice(s)}function l2(s){wx.getNetworkType(s)}function f2(s){wx.openLocation(s)}function d2(s){wx.getLocation(s)}function m2(s){wx.scanQRCode(s)}function p2(s,t,e){function n(){WeixinJSBridge.invoke("getBrandWCPayRequest",s,function(i){i.err_msg=="get_brand_wcpay_request:ok"?t():e(i.err_msg)})}typeof WeixinJSBridge>"u"?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",n,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",n),document.attachEvent("onWeixinJSBridgeReady",n)):n()}function g2(s,t,e="snsapi_userinfo",n=""){return`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${s}&redirect_uri=${encodeURIComponent(t)}&response_type=code&scope=${e}&state=${n}#wechat_redirect`}function y2(s){window.AlipayJSBridge?s&&s():document.addEventListener("AlipayJSBridgeReady",s,!1)}function os(s,t){let e="未知错误";switch(s.error){case 1:e="接口不存在";break;case 2:e="参数无效";break;case 3:e="发生未知错误";break;case 4:e="接口无权限";break;case 10:e="用户取消";break;case 11:e="操作失败",t==="chooseImage"&&(e="操作失败(权限不够)");break;case 12:e="GPS打开,但定位失败";break;case 13:e="获取地理位置信息失败";break;case 14:e="定位超时";break;case 15:e="网络错误";break;case 16:e="GPS未打开或用户未授权";break}return`${s.error}(${e}): ${s.errorMessage}`}function w2(s,t,e){ap.tradePay(Object.assign(s,{}),function(n){let i="未知错误";switch(n.resultCode){case 9e3:return i="订单支付成功",t?.(i);case 8e3:i="正在处理中";break;case 4e3:i="订单支付失败";break;case 6001:i="用户中途取消";break;case 6002:i="网络连接出错";break;case 99:i="用户点击忘记密码导致快捷界面退出(only iOS)";break}e?.(i)})}function x2(s,t,e){ap.scan(Object.assign(s,{fail:n=>{e?.(os(n))}}),function(n){t?.(n.code)})}function b2(s,t,e){ap.getLocation(Object.assign(s,{fail:n=>{e?.(os(n))}}),function(n){t?.(n)})}function v2(s,t,e){ap.openLocation(Object.assign(s,{fail:n=>{e?.(os(n))}}),function(){t?.()})}function _2(s,t,e){ap.chooseImage(Object.assign(s,{fail:n=>{e?.(os(n,"chooseImage"))}}),function(n){t?.(n)})}function S2(s,t,e){ap.previewImage(Object.assign(s,{fail:n=>{e?.(os(n))}}),function(){t?.()})}class C2{map;constructor(t,e=120.619585,n=31.299379,i=18){this.map=new T.Map(t),this.map.centerAndZoom(new T.LngLat(e,n),i)}}const al=window.crypto.subtle;al||console.warn("Crypto API not supported");async function hl(s,t="SHA-256"){const e=await al.digest(t,of(s));return af(e)}async function T2(s,t="SHA-256"){const e=JSON.stringify(Zl(s));return hl(e,t)}class E2{currentPage;itemsPerPage;entriesInterval;entriesEdge;linkTo;prevText;nextText;ellipseText;prevShowAlways;nextShowAlways;callback;totalPages;parentVNode;constructor(t,e,n){this.currentPage=n?.currentPage||0,this.itemsPerPage=n?.itemsPerPage||10,this.entriesInterval=n?.entriesInterval||5,this.entriesEdge=n?.entriesEdge||1,this.linkTo=n?.linkTo||"javascript:;",this.prevText=n?.prevText||"上一页",this.nextText=n?.nextText||"下一页",this.ellipseText=n?.ellipseText||"...",this.prevShowAlways=typeof n?.prevShowAlways=="boolean"?n?.prevShowAlways:!0,this.nextShowAlways=typeof n?.nextShowAlways=="boolean"?n?.nextShowAlways:!0,this.callback=n?.callback||(i=>!1),this.totalPages=Math.ceil(e/this.itemsPerPage),this.parentVNode=this.createParentVNode(),vn(this.parentVNode,t),this.selectPage(this.currentPage)}createParentVNode(){return tn("div",{class:"pagination"},[])}appendVNode(t,e,n){e=e<0?0:e<this.totalPages?e:this.totalPages-1;const i=n?.text||String(e+1),r=n?.classes||"";t.children.push(e==this.currentPage&&r.indexOf("prev")==-1&&r.indexOf("next")==-1?tn("span",{class:`current ${r}`},i):tn("a",{class:r,href:this.linkTo.replace(/__id__/,String(e)),onClick:o=>this.selectPage(e,o)},i))}drawLinks(){const t=this.createParentVNode(),e=Math.ceil(this.entriesInterval/2),n=this.currentPage>e?Math.max(Math.min(this.currentPage-e,this.totalPages-this.entriesInterval),0):0,i=this.currentPage>e?Math.min(this.currentPage+e,this.totalPages):Math.min(this.entriesInterval,this.totalPages);if(this.prevText&&(this.currentPage>0||this.prevShowAlways)&&this.appendVNode(t,this.currentPage-1,{text:this.prevText,classes:"prev"}),n>0&&this.entriesEdge>0){const r=Math.min(this.entriesEdge,n);for(let o=0;o<r;o++)this.appendVNode(t,o);this.entriesEdge<n&&this.ellipseText&&t.children.push(tn("span",{},this.ellipseText))}for(let r=n;r<i;r++)this.appendVNode(t,r);if(i<this.totalPages&&this.entriesEdge>0){this.totalPages-this.entriesEdge>i&&this.ellipseText&&t.children.push(tn("span",{},this.ellipseText));const r=Math.max(this.totalPages-this.entriesEdge,i);for(let o=r;o<this.totalPages;o++)this.appendVNode(t,o)}this.nextText&&(this.currentPage<this.totalPages-1||this.nextShowAlways)&&this.appendVNode(t,this.currentPage+1,{text:this.nextText,classes:"next"}),ii(this.parentVNode,t),this.parentVNode=t}selectPage(t,e){this.currentPage=t=t<0?0:t<this.totalPages?t:this.totalPages-1,this.drawLinks();const n=this.callback(t);return e&&(n||(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)),n}prevPage(){return this.selectPage(this.currentPage-1)}nextPage(){return this.selectPage(this.currentPage+1)}}class P2{config;store;eb;axios;constructor(t={}){this.config=t,this.config.static=this.config.static||{};const e=this.config.store?.state||{};this.store=za(this.config.store?.reducer||(()=>e),e,this.config.store?.enhancer),this.eb=new ys,this.axios=new er({baseURL:this.config.axios?.baseURL,timeout:this.config.axios?.timeout,headers:this.config.axios?.headers,responseType:this.config.axios?.responseType,responseEncoding:this.config.axios?.responseEncoding,interceptor:this.config.axios?.interceptor,retry:this.config.axios?.retry,cache:this.config.axios?.cache})}}d.ArrowShape=Do,d.BallShape=bn,d.BezierEasing=Pr,d.BufferAttribute=ge,d.COLOR_NAMES=is,d.CSSToJSEasing=tg,d.Clock=kr,d.Color=Ft,d.ColorManagement=Mo,d.CommonKeyCode=T1,d.Context=P2,d.CrossShape=Bo,d.CustomCanvasContext=dc,d.CustomCanvasGradient=Xs,d.CustomCanvasPattern=Rr,d.DOMParse=wo,d.DOMSVGUtil=Ge,d.DOMToBlob=sr,d.DOMToString=nr,d.DOMVideo=ns,d.DrawContext=K1,d.Easing=O,d.EllipseShape=Fo,d.FetchWithAxios=er,d.FileUpload=wm,d.Float32BufferAttribute=Y0,d.FoxShape=zo,d.HeartShape=Lo,d.HeartVariantShape=Ro,d.Int16BufferAttribute=z0,d.Int32BufferAttribute=B0,d.Int8BufferAttribute=L0,d.Interpolation=me,d.LineShape=Qe,d.LinearSRGBColorSpace=Eo,d.LinearToSRGB=Ze,d.LinearTransfer=Po,d.Ls=Re,d.MVVM=Iw,d.Matrix=_t,d.Matrix2=Xr,d.Matrix3=gn,d.Matrix4=It,d.NoColorSpace=Bu,d.Pagination=E2,d.QRCode=Le,d.RabbitShape=No,d.RectShape=Ke,d.RingIndicatorShapeCombo=Uo,d.RingShape=rs,d.SRGBColorSpace=We,d.SRGBToLinear=Je,d.SRGBTransfer=ti,d.SVGParse=Uw,d.SVGParsedPathArgsLength=Gn,d.SegmentShapeCombo=$o,d.Shape=ot,d.ShapeCombo=Lt,d.ShipShapeCombo=Yo,d.SliderShapeCombo=Xo,d.StarShape=Oo,d.TWEEN=hg,d.Timeline=$n,d.TreeShapeCombo=Io,d.Tween=Ar,d.Uint16BufferAttribute=N0,d.Uint32BufferAttribute=F0,d.Uint8BufferAttribute=R0,d.Uint8ClampedBufferAttribute=O0,d.Vector2=qn,d.Vector3=zt,d.Vector4=Fr,d.WebGLCoordinateSystem=jn,d.WebGLRenderer=Gw,d.WebGPUCoordinateSystem=$r,d.WebRTCClient=Vw,d.WebSocketClient=oe,d.YZCanvasContext=Or,d.YZMessageChannel=Yw,d.YZWorker=Fw,d.__color=we,d.addClass=Sy,d.addWatermark=a0,d.addWxJsReadyFnBeforeConfig=Qo,d.ajax=$w,d.aliJsChooseImage=_2,d.aliJsGetLocation=b2,d.aliJsOpenLocation=v2,d.aliJsPreviewImage=S2,d.aliJsReady=y2,d.aliJsScan=x2,d.aliJsTradePay=w2,d.angle=Jt,d.animateShapes=q1,d.animateSpringChainShapes=H1,d.animateSpringConnectShapes=W1,d.animateSpringMassShapes=J1,d.animationEnd$=h1,d.animationStart$=a1,d.appendURL=Ho,d.appendURLRecord=Bw,d.atomReadAttribute=Sc,d.atomReadAttributes=Wr,d.atomReadStyle=Tg,d.atomReadStyles=jr,d.atomRemoveAttribute=Mg,d.atomRemoveDataset=cw,d.atomRemoveStyle=Hr,d.atomWriteAttribute=wn,d.atomWriteStyle=Gs,d.base64EncodeOutputStream=Mc,d.bitmapMapper=Xc,d.blobToImageData=Lg,d.byteArrayOutputStream=Zr,d.canDrawBitmap=$c,d.canUsePaths=A0,d.canUseWorker=Yc,d.cancelBubble=Kh,d.cancelFetch=Cw,d.changeBrightness=r0,d.changeCheckboxChecked=wy,d.changeDiaphaneity=o0,d.changeRadioChecked=yy,d.changeSelected=gy,d.changeSize=i0,d.checkWxJsApi=jw,d.clearCookies=bw,d.clearLocalStorage=uw,d.clearSessionStorage=ww,d.closeLog=yf,d.closest=ly,d.combineTransformToMatrix=Eg,d.compareVersion=m0,d.computeImageDisplayRect=Ag,d.containsChild=ay,d.createDefaultMousePoint=oo,d.createElement=tu,d.createElementNS=Ey,d.createFragment=Kc,d.createIndexDB=_w,d.createObjectURL=Uc,d.createRunCycleInMaxRate=Up,d.createTextNode=Py,d.createWebSocket=tl,d.createXMLHttpRequest=il,d.cssAttrsToCanvasAttrs=Cc,d.distance=Me,d.domPrefixes=Pg,d.drag$=cu,d.dragEnd$=lu,d.dragEnter$=du,d.dragLeave$=mu,d.dragOver$=pu,d.dragStart$=uu,d.drawBitmapInCanvas=X0,d.drawQRCodeToCanvas=f0,d.drop$=fu,d.easeNameToCubicBezier=Mr,d.empty=Jc,d.fireEvent=Fp,d.flipSideToSide=Og,d.flipUpsideDown=zg,d.flushURL=sl,d.flushURLRecord=Nw,d.formDataToSearch=nl,d.generateRosettaShape=Q1,d.getBitmapFromCanvas=$0,d.getBodyPosition=w1,d.getBrowserClient=Qr,d.getBrowserClientVersion=p0,d.getBrowserLanguage=g0,d.getCSSVar=pw,d.getDOMMatrix=Gr,d.getDirection=lg,d.getDocumentElementPosition=Kn,d.getElementPositionInPage=lo,d.getElementPositionInPage2=b1,d.getElementPositionInViewport=vu,d.getEmSize=sy,d.getFetchId=qo,d.getFileExtension=gm,d.getFileMD5Hash=_h,d.getFileTypeFromFile=pm,d.getFormSubmitData=Xw,d.getImageData=Tc,d.getImageDataByAIData=c0,d.getImageMainColor=Rg,d.getInnerText=by,d.getInternetExplorerVersion=zc,d.getKeyCode=E1,d.getMIME=ym,d.getMouseButton=C1,d.getMousePositionInElement=ft,d.getMousePositionInPage=fo,d.getMousePositionInViewport=S1,d.getOperatingSystem=qs,d.getOperatingSystemVersion=d0,d.getPageSize=x1,d.getParameters=zw,d.getPolymorphShapeCombosInterpolator=Vu,d.getPolymorphShapesInterpolator=ko,d.getRelativeBoundingClientRect=v1,d.getRemSize=to,d.getScreenPosition=y1,d.getSelectedText=H0,d.getStyle=qe,d.getTheme$=mw,d.getTimeZone=y0,d.getURL=ri,d.getVerticalScrollTopPercentInPage=_1,d.getVertxRegisterBaseUrl=Dw,d.getViewportSize=bu,d.getVnode=Ir,d.gifImage=Ac,d.gravitateShapes=j1,d.h=tn,d.hFromEl=si,d.hasClass=Ty,d.hasDocument=E0,d.hasHistory=P0,d.hasWindow=Fc,d.hideEl=Qc,d.html=Wc,d.iframePostMessage=My,d.imageDataToBitmap=kg,d.imageDataToBlob=Dg,d.imageDataToDataURL=Ig,d.injectStyle=_c,d.injectWxJsConfig=qw,d.insert=Qn,d.isActiveEl=ey,d.isAliBrowser=Bc,d.isAliMiniProgram=T0,d.isAndroid=Oc,d.isAppleDevice=w0,d.isBrowserSupportFileAPI=M0,d.isElement=k0,d.isEventSupported=$p,d.isIE=b0,d.isIE10=_0,d.isIE11=S0,d.isIE9=v0,d.isIOS=Kr,d.isInput=Zn,d.isInputCheckbox=so,d.isInputNumber=py,d.isInputRadio=io,d.isInputText=my,d.isMacOS=Rc,d.isMobile=x0,d.isRootEl=ty,d.isSelect=no,d.isTextArea=dy,d.isTouchSupport=D0,d.isURL=Rw,d.isWxBrowser=Nc,d.isWxMiniProgram=C0,d.jpgToPng=t0,d.keyDown$=gu,d.keyPress$=c1,d.keyUp$=yu,d.leftRotate=Ng,d.length=pn,d.mapTDTJSSDK=C2,d.marginSharpen=Kg,d.mosaic=h0,d.mount=vn,d.mouseClick$=Ry,d.mouseContextMenu$=Ny,d.mouseDoubleClick$=Oy,d.mouseDown$=su,d.mouseEnter$=Dy,d.mouseLeave$=Ly,d.mouseMove$=Ws,d.mouseOut$=Iy,d.mouseOver$=ky,d.mouseUp$=iu,d.mouseWheel$=zy,d.nearestElement=iy,d.nextElementSibling=cy,d.normalizePoint=ug,d.objectSignature=T2,d.onBeforeUnload=Gc,d.onDocumentReady=Vc,d.openLog=gf,d.outputGifBase64=kc,d.outputQRCodeBase64=l0,d.pan$=By,d.panCancel$=Xy,d.panDown$=qy,d.panEnd$=$y,d.panLeft$=Uy,d.panMove$=Fy,d.panRight$=Vy,d.panStart$=Yy,d.panUp$=Gy,d.parent=ry,d.parents=eo,d.parseCSS=xo,d.parseTransformToMatrix=Vr,d.patch=ii,d.pinch$=jy,d.pinchIn$=Hy,d.pinchOut$=Wy,d.pngToJpg=e0,d.pointerCancel$=uo,d.pointerDown$=ho,d.pointerMove$=ao,d.pointerUp$=co,d.polar=Ae,d.polymorphShapesTween=Z1,d.prefixes=I0,d.press$=Jy,d.preventDefault=Ee,d.previousElementSibling=uy,d.radiusClip=s0,d.readFileInBrowser=Rn,d.recordToSearch=oi,d.rectClip=n0,d.rem2px=ny,d.remove=vy,d.removeClass=Cy,d.requestAnimationFrameCycle=vr,d.reverseCSSToJSEasing=eg,d.reverseEaseNameToCubicBezier=cc,d.reverseEasing=ic,d.revokeObjectURL=U0,d.rightRotate=Bg,d.rotate$=Zy,d.rotatePoint=Qt,d.scheduleIdle=tc,d.scheduleIdleAsap=sc,d.scheduleVnodeAsap=Lr,d.scheduleVnodeImmediately=cg,d.scrollParent=oy,d.scrollTo=Q0,d.searchToRecord=Ow,d.selectFileInBrowser=ir,d.setCSSVar=gw,d.setIntervalAccurate=Xp,d.setLogUploadFn=wf,d.setManualScroll=K0,d.setRem=Lw,d.setStyle=qr,d.setTheme=Ku,d.setTimeoutAccurate=_r,d.setWindowTitle=W0,d.shadowRoot=fy,d.sharpen=Qg,d.showEl=Zc,d.siblings=hy,d.signature=hl,d.simulateMouseEventFromTouch=Yp,d.stringToDOM=mm,d.swipe$=Qy,d.swipeDown$=n1,d.swipeLeft$=Ky,d.swipeRight$=t1,d.swipeUp$=e1,d.tap$=s1,d.tapOutSide$=i1,d.text=xy,d.toBlackAndWhite=$g,d.toBlue=Gg,d.toBlueAndGreen=Hg,d.toBlueAndGrey=Zg,d.toDegree=Et,d.toGreen=Vg,d.toGreenAndGrey=Jg,d.toGrey=Fg,d.toGrey2=Yg,d.toOpposite=Xg,d.toRadian=q,d.toRed=Ug,d.toRedAndBlue=jg,d.toRedAndGreen=qg,d.toRedAndGrey=Wg,d.toggleClass=ro,d.toggleElDisplay=_y,d.toggleTheme=dw,d.touchCancel$=hu,d.touchEnd$=au,d.touchMove$=ru,d.touchStart$=ou,d.transformPath2D=Cg,d.transitionEnd$=o1,d.transitionStart$=r1,d.trimHash=el,d.updateVnode=Dr,d.useAttribute=je,d.useClickA=Hs,d.useClipboard=Z0,d.useCookie=xw,d.useCoords$=iw,d.useDataset=hw,d.useDocumentVisible$=g1,d.useDraggable=m1,d.useDrop=p1,d.useElementEventBus=I1,d.useEvent$=X,d.useEventListener=W,d.useFetch=ei,d.useFetchCache=Ew,d.useFetchRetry=Tw,d.useFetchRetryCache=Pw,d.useHashChange$=ow,d.useHotKeyDown$=Su,d.useHotKeyFile=M1,d.useHotKeyFile$=Cu,d.useHotKeyUp$=P1,d.useIntersection$=qu,d.useLoadImage=jc,d.useLoadLink=G0,d.useLoadScript=V0,d.useLocalStorage=Ju,d.useLocale=jo,d.useLocation$=Wu,d.useMatchMedia$=Hu,d.useMouseAndPointerDownMovePoint$=wu,d.useMouseDownMovePoint$=l1,d.useMouseMovePoint$=u1,d.useMousePoint=He,d.useMutation$=Gu,d.usePointerDownMovePoint$=Js,d.usePopStateChange$=aw,d.usePressDownMove=Eu,d.usePressDownMoveWithMouse=D1,d.usePressDownMoveWithPointer=Pu,d.usePressDownMoveWithTouch=L1,d.usePull$=d1,d.useResize=Tu,d.useResize$=mo,d.useRunInSandbox=Ay,d.useSafeArea$=sw,d.useScroll$=xu,d.useSelectFile=Hc,d.useSelectFileImage=j0,d.useSessionStorage=yw,d.useTimestampValue=Vo,d.useTouchDownMovePoint$=f1,d.useUrlChange$=rw,d.useVisible$=ew,d.useVisibleSimple$=tw,d.useWindowResize$=A1,d.vibrate=J0,d.waitForStyleSheetsLoaded=q0,d.writeToIndexDB=Sw,d.wxJsChooseImage=Jw,d.wxJsDownloadImage=Kw,d.wxJsDownloadVoice=c2,d.wxJsGetLocalImgData=t2,d.wxJsGetLocation=d2,d.wxJsGetNetworkType=l2,d.wxJsLogin=g2,d.wxJsOnVoicePlayEnd=a2,d.wxJsOnVoiceRecordEnd=s2,d.wxJsOpenLocation=f2,d.wxJsPauseVoice=r2,d.wxJsPay=p2,d.wxJsPlayVoice=i2,d.wxJsPreviewImage=Zw,d.wxJsScanQRCode=m2,d.wxJsStartRecord=e2,d.wxJsStopRecord=n2,d.wxJsStopVoice=o2,d.wxJsTranslateVoice=u2,d.wxJsUpdateAppMessageShareData=Hw,d.wxJsUpdateTimelineShareData=Ww,d.wxJsUploadImage=Qw,d.wxJsUploadVoice=h2,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
|
|
62
|
+
${t.sdp}.`),this.remotePeerConnection&&(this.trace("remotePeerConnection setLocalDescription start."),this.remotePeerConnection.setLocalDescription(t).then(()=>{this.setLocalDescriptionSuccess(this.remotePeerConnection)}).catch(e=>this.setSessionDescriptionError(e))),this.localPeerConnection&&(this.trace("localPeerConnection setRemoteDescription start."),this.localPeerConnection.setRemoteDescription(t).then(()=>{this.setRemoteDescriptionSuccess(this.localPeerConnection)}).catch(e=>this.setSessionDescriptionError(e)))}setSessionDescriptionError(t){this.trace(`Failed to create session description: ${t.toString()}.`)}setDescriptionSuccess(t,e){const n=this.getPeerName(t);this.trace(`${n} ${e} complete.`)}setLocalDescriptionSuccess(t){this.setDescriptionSuccess(t,"setLocalDescription")}setRemoteDescriptionSuccess(t){this.setDescriptionSuccess(t,"setRemoteDescription")}trace(t){t=t.trim();const e=(window.performance.now()/1e3).toFixed(3);console.log(e,t);const n=document.createElement("div");n.innerHTML=`<div>${e}, ${t}</div>`,document.getElementById("trace")?.appendChild(n)}getOtherPeer(t){return t===this.localPeerConnection?this.remotePeerConnection:this.localPeerConnection}getPeerName(t){return t===this.localPeerConnection?"localPeerConnection":"remotePeerConnection"}}class Gw{canvas;gl;constructor(t){this.canvas=t;const e={alpha:!0,premultipliedAlpha:!1};if(this.gl=this.canvas.getContext("webgl",e),!this.gl)throw new Error("WebGL failed to initialize.")}}const rl=[],ol={};function Qo(s){rl.push(s)}function qw(s,t=!1){const e=el();if(ol[e])return;wx.error(r=>{console.log(r.errMsg||JSON.stringify(r))}),wx.ready(()=>{rl.forEach(r=>r())});const n=["updateAppMessageShareData","updateTimelineShareData","onMenuShareWeibo","onMenuShareQZone","startRecord","stopRecord","onVoiceRecordEnd","playVoice","pauseVoice","stopVoice","onVoicePlayEnd","uploadVoice","downloadVoice","chooseImage","previewImage","uploadImage","downloadImage","getLocalImgData","translateVoice","getNetworkType","openLocation","getLocation","hideOptionMenu","showOptionMenu","hideMenuItems","showMenuItems","hideAllNonBaseMenuItem","showAllNonBaseMenuItem","closeWindow","scanQRCode","openProductSpecificView","addCard","chooseCard","openCard"],i=["wx-open-launch-app","wx-open-launch-app","wx-open-subscribe","wx-open-audio"];wx.config(Object.assign(s,{debug:t,jsApiList:n,openTagList:i})),ol[e]=!0}function jw(s){return new Promise((t,e)=>{wx.checkJsApi({jsApiList:[s],success:function(n){n.checkResult[s]?t(!0):e(!1)},fail:function(){e(!1)}})})}function Hw(s){Qo(function(){wx.updateAppMessageShareData(s)})}function Ww(s){Qo(function(){wx.updateTimelineShareData(s)})}function Jw(s){wx.chooseImage(s)}function Zw(s){wx.previewImage(s)}function Qw(s){wx.uploadImage(s)}function Kw(s){wx.downloadImage(s)}function t2(s){wx.getLocalImgData(s)}function e2(){wx.startRecord()}function n2(s){wx.stopRecord(s)}function s2(s){wx.onVoiceRecordEnd(s)}function i2(s){wx.playVoice(s)}function r2(s){wx.pauseVoice(s)}function o2(s){wx.stopVoice(s)}function a2(s){wx.onVoicePlayEnd(s)}function h2(s){wx.uploadVoice(s)}function c2(s){wx.downloadVoice(s)}function u2(s){wx.translateVoice(s)}function l2(s){wx.getNetworkType(s)}function f2(s){wx.openLocation(s)}function d2(s){wx.getLocation(s)}function m2(s){wx.scanQRCode(s)}function p2(s,t,e){function n(){WeixinJSBridge.invoke("getBrandWCPayRequest",s,function(i){i.err_msg=="get_brand_wcpay_request:ok"?t():e(i.err_msg)})}typeof WeixinJSBridge>"u"?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",n,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",n),document.attachEvent("onWeixinJSBridgeReady",n)):n()}function g2(s,t,e="snsapi_userinfo",n=""){return`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${s}&redirect_uri=${encodeURIComponent(t)}&response_type=code&scope=${e}&state=${n}#wechat_redirect`}function y2(s){window.AlipayJSBridge?s&&s():document.addEventListener("AlipayJSBridgeReady",s,!1)}function rs(s,t){let e="未知错误";switch(s.error){case 1:e="接口不存在";break;case 2:e="参数无效";break;case 3:e="发生未知错误";break;case 4:e="接口无权限";break;case 10:e="用户取消";break;case 11:e="操作失败",t==="chooseImage"&&(e="操作失败(权限不够)");break;case 12:e="GPS打开,但定位失败";break;case 13:e="获取地理位置信息失败";break;case 14:e="定位超时";break;case 15:e="网络错误";break;case 16:e="GPS未打开或用户未授权";break}return`${s.error}(${e}): ${s.errorMessage}`}function w2(s,t,e){ap.tradePay(Object.assign(s,{}),function(n){let i="未知错误";switch(n.resultCode){case 9e3:return i="订单支付成功",t?.(i);case 8e3:i="正在处理中";break;case 4e3:i="订单支付失败";break;case 6001:i="用户中途取消";break;case 6002:i="网络连接出错";break;case 99:i="用户点击忘记密码导致快捷界面退出(only iOS)";break}e?.(i)})}function x2(s,t,e){ap.scan(Object.assign(s,{fail:n=>{e?.(rs(n))}}),function(n){t?.(n.code)})}function b2(s,t,e){ap.getLocation(Object.assign(s,{fail:n=>{e?.(rs(n))}}),function(n){t?.(n)})}function v2(s,t,e){ap.openLocation(Object.assign(s,{fail:n=>{e?.(rs(n))}}),function(){t?.()})}function _2(s,t,e){ap.chooseImage(Object.assign(s,{fail:n=>{e?.(rs(n,"chooseImage"))}}),function(n){t?.(n)})}function S2(s,t,e){ap.previewImage(Object.assign(s,{fail:n=>{e?.(rs(n))}}),function(){t?.()})}class C2{map;constructor(t,e=120.619585,n=31.299379,i=18){this.map=new T.Map(t),this.map.centerAndZoom(new T.LngLat(e,n),i)}}const al=window.crypto.subtle;al||console.warn("Crypto API not supported");async function hl(s,t="SHA-256"){const e=await al.digest(t,of(s));return af(e)}async function T2(s,t="SHA-256"){const e=JSON.stringify(Zl(s));return hl(e,t)}class E2{currentPage;itemsPerPage;entriesInterval;entriesEdge;linkTo;prevText;nextText;ellipseText;prevShowAlways;nextShowAlways;callback;totalPages;parentVNode;constructor(t,e,n){this.currentPage=n?.currentPage||0,this.itemsPerPage=n?.itemsPerPage||10,this.entriesInterval=n?.entriesInterval||5,this.entriesEdge=n?.entriesEdge||1,this.linkTo=n?.linkTo||"javascript:;",this.prevText=n?.prevText||"上一页",this.nextText=n?.nextText||"下一页",this.ellipseText=n?.ellipseText||"...",this.prevShowAlways=typeof n?.prevShowAlways=="boolean"?n?.prevShowAlways:!0,this.nextShowAlways=typeof n?.nextShowAlways=="boolean"?n?.nextShowAlways:!0,this.callback=n?.callback||(i=>!1),this.totalPages=Math.ceil(e/this.itemsPerPage),this.parentVNode=this.createParentVNode(),vn(this.parentVNode,t),this.selectPage(this.currentPage)}createParentVNode(){return tn("div",{class:"pagination"},[])}appendVNode(t,e,n){e=e<0?0:e<this.totalPages?e:this.totalPages-1;const i=n?.text||String(e+1),r=n?.classes||"";t.children.push(e==this.currentPage&&r.indexOf("prev")==-1&&r.indexOf("next")==-1?tn("span",{class:`current ${r}`},i):tn("a",{class:r,href:this.linkTo.replace(/__id__/,String(e)),onClick:o=>this.selectPage(e,o)},i))}drawLinks(){const t=this.createParentVNode(),e=Math.ceil(this.entriesInterval/2),n=this.currentPage>e?Math.max(Math.min(this.currentPage-e,this.totalPages-this.entriesInterval),0):0,i=this.currentPage>e?Math.min(this.currentPage+e,this.totalPages):Math.min(this.entriesInterval,this.totalPages);if(this.prevText&&(this.currentPage>0||this.prevShowAlways)&&this.appendVNode(t,this.currentPage-1,{text:this.prevText,classes:"prev"}),n>0&&this.entriesEdge>0){const r=Math.min(this.entriesEdge,n);for(let o=0;o<r;o++)this.appendVNode(t,o);this.entriesEdge<n&&this.ellipseText&&t.children.push(tn("span",{},this.ellipseText))}for(let r=n;r<i;r++)this.appendVNode(t,r);if(i<this.totalPages&&this.entriesEdge>0){this.totalPages-this.entriesEdge>i&&this.ellipseText&&t.children.push(tn("span",{},this.ellipseText));const r=Math.max(this.totalPages-this.entriesEdge,i);for(let o=r;o<this.totalPages;o++)this.appendVNode(t,o)}this.nextText&&(this.currentPage<this.totalPages-1||this.nextShowAlways)&&this.appendVNode(t,this.currentPage+1,{text:this.nextText,classes:"next"}),ii(this.parentVNode,t),this.parentVNode=t}selectPage(t,e){this.currentPage=t=t<0?0:t<this.totalPages?t:this.totalPages-1,this.drawLinks();const n=this.callback(t);return e&&(n||(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)),n}prevPage(){return this.selectPage(this.currentPage-1)}nextPage(){return this.selectPage(this.currentPage+1)}}class P2{config;store;eb;axios;constructor(t={}){this.config=t,this.config.static=this.config.static||{};const e=this.config.store?.state||{};this.store=za(this.config.store?.reducer||(()=>e),e,this.config.store?.enhancer),this.eb=new ys,this.axios=new er({baseURL:this.config.axios?.baseURL,timeout:this.config.axios?.timeout,headers:this.config.axios?.headers,responseType:this.config.axios?.responseType,responseEncoding:this.config.axios?.responseEncoding,interceptor:this.config.axios?.interceptor,retry:this.config.axios?.retry,cache:this.config.axios?.cache})}}d.ArrowShape=Do,d.BallShape=bn,d.BezierEasing=Pr,d.BufferAttribute=ge,d.COLOR_NAMES=ss,d.CSSToJSEasing=tg,d.Clock=kr,d.Color=Ft,d.ColorManagement=Mo,d.CommonKeyCode=T1,d.Context=P2,d.CrossShape=Bo,d.CustomCanvasContext=dc,d.CustomCanvasGradient=Xs,d.CustomCanvasPattern=Rr,d.DOMParse=wo,d.DOMSVGUtil=Ge,d.DOMToBlob=sr,d.DOMToString=nr,d.DOMVideo=es,d.DrawContext=K1,d.Easing=O,d.EllipseShape=Fo,d.FetchWithAxios=er,d.FileUpload=wm,d.Float32BufferAttribute=Y0,d.FoxShape=zo,d.HeartShape=Lo,d.HeartVariantShape=Ro,d.Int16BufferAttribute=z0,d.Int32BufferAttribute=B0,d.Int8BufferAttribute=L0,d.Interpolation=me,d.LineShape=Qe,d.LinearSRGBColorSpace=Eo,d.LinearToSRGB=Ze,d.LinearTransfer=Po,d.Ls=Re,d.MVVM=Iw,d.Matrix=_t,d.Matrix2=Xr,d.Matrix3=gn,d.Matrix4=It,d.NoColorSpace=Bu,d.Pagination=E2,d.QRCode=Le,d.RabbitShape=No,d.RectShape=Ke,d.RingIndicatorShapeCombo=Uo,d.RingShape=is,d.SRGBColorSpace=We,d.SRGBToLinear=Je,d.SRGBTransfer=ti,d.SVGParse=Uw,d.SVGParsedPathArgsLength=Vn,d.SegmentShapeCombo=$o,d.Shape=ot,d.ShapeCombo=Lt,d.ShipShapeCombo=Yo,d.SliderShapeCombo=Xo,d.StarShape=Oo,d.TWEEN=hg,d.Timeline=Yn,d.TreeShapeCombo=Io,d.Tween=Ar,d.Uint16BufferAttribute=N0,d.Uint32BufferAttribute=F0,d.Uint8BufferAttribute=R0,d.Uint8ClampedBufferAttribute=O0,d.Vector2=Gn,d.Vector3=zt,d.Vector4=Fr,d.WebGLCoordinateSystem=qn,d.WebGLRenderer=Gw,d.WebGPUCoordinateSystem=$r,d.WebRTCClient=Vw,d.WebSocketClient=oe,d.YZCanvasContext=Or,d.YZMessageChannel=Yw,d.YZWorker=Fw,d.__color=we,d.addClass=Sy,d.addWatermark=a0,d.addWxJsReadyFnBeforeConfig=Qo,d.ajax=$w,d.aliJsChooseImage=_2,d.aliJsGetLocation=b2,d.aliJsOpenLocation=v2,d.aliJsPreviewImage=S2,d.aliJsReady=y2,d.aliJsScan=x2,d.aliJsTradePay=w2,d.angle=Jt,d.animateShapes=q1,d.animateSpringChainShapes=H1,d.animateSpringConnectShapes=W1,d.animateSpringMassShapes=J1,d.animationEnd$=h1,d.animationStart$=a1,d.appendURL=Ho,d.appendURLRecord=Bw,d.atomReadAttribute=Sc,d.atomReadAttributes=Wr,d.atomReadStyle=Tg,d.atomReadStyles=jr,d.atomRemoveAttribute=Mg,d.atomRemoveDataset=cw,d.atomRemoveStyle=Hr,d.atomWriteAttribute=wn,d.atomWriteStyle=Gs,d.base64EncodeOutputStream=Mc,d.bitmapMapper=Xc,d.blobToImageData=Lg,d.byteArrayOutputStream=Zr,d.canDrawBitmap=$c,d.canUsePaths=A0,d.canUseWorker=Yc,d.cancelBubble=Kh,d.cancelFetch=Cw,d.changeBrightness=r0,d.changeCheckboxChecked=wy,d.changeDiaphaneity=o0,d.changeRadioChecked=yy,d.changeSelected=gy,d.changeSize=i0,d.checkWxJsApi=jw,d.clearCookies=bw,d.clearLocalStorage=uw,d.clearSessionStorage=ww,d.closeLog=yf,d.closest=ly,d.combineTransformToMatrix=Eg,d.compareVersion=m0,d.computeImageDisplayRect=Ag,d.containsChild=ay,d.createDefaultMousePoint=oo,d.createElement=tu,d.createElementNS=Ey,d.createFragment=Kc,d.createIndexDB=_w,d.createObjectURL=Uc,d.createRunCycleInMaxRate=Up,d.createTextNode=Py,d.createWebSocket=tl,d.createXMLHttpRequest=il,d.cssAttrsToCanvasAttrs=Cc,d.distance=Me,d.domPrefixes=Pg,d.drag$=cu,d.dragEnd$=lu,d.dragEnter$=du,d.dragLeave$=mu,d.dragOver$=pu,d.dragStart$=uu,d.drawBitmapInCanvas=X0,d.drawQRCodeToCanvas=f0,d.drop$=fu,d.easeNameToCubicBezier=Mr,d.empty=Jc,d.fireEvent=Fp,d.flipSideToSide=Og,d.flipUpsideDown=zg,d.flushURL=sl,d.flushURLRecord=Nw,d.formDataToSearch=nl,d.generateRosettaShape=Q1,d.getBitmapFromCanvas=$0,d.getBodyPosition=w1,d.getBrowserClient=Qr,d.getBrowserClientVersion=p0,d.getBrowserLanguage=g0,d.getCSSVar=pw,d.getDOMMatrix=Gr,d.getDirection=lg,d.getDocumentElementPosition=Qn,d.getElementPositionInPage=lo,d.getElementPositionInPage2=b1,d.getElementPositionInViewport=vu,d.getEmSize=sy,d.getFetchId=qo,d.getFileExtension=gm,d.getFileMD5Hash=_h,d.getFileTypeFromFile=pm,d.getFormSubmitData=Xw,d.getImageData=Tc,d.getImageDataByAIData=c0,d.getImageMainColor=Rg,d.getInnerText=by,d.getInternetExplorerVersion=zc,d.getKeyCode=E1,d.getMIME=ym,d.getMouseButton=C1,d.getMousePositionInElement=ft,d.getMousePositionInPage=fo,d.getMousePositionInViewport=S1,d.getOperatingSystem=qs,d.getOperatingSystemVersion=d0,d.getPageSize=x1,d.getParameters=zw,d.getPolymorphShapeCombosInterpolator=Vu,d.getPolymorphShapesInterpolator=ko,d.getRelativeBoundingClientRect=v1,d.getRemSize=to,d.getScreenPosition=y1,d.getSelectedText=H0,d.getStyle=qe,d.getTheme$=mw,d.getTimeZone=y0,d.getURL=ri,d.getVerticalScrollTopPercentInPage=_1,d.getVertxRegisterBaseUrl=Dw,d.getViewportSize=bu,d.getVnode=Ir,d.gifImage=Ac,d.gravitateShapes=j1,d.h=tn,d.hFromEl=si,d.hasClass=Ty,d.hasDocument=E0,d.hasHistory=P0,d.hasWindow=Fc,d.hideEl=Qc,d.html=Wc,d.iframePostMessage=My,d.imageDataToBitmap=kg,d.imageDataToBlob=Dg,d.imageDataToDataURL=Ig,d.injectStyle=_c,d.injectWxJsConfig=qw,d.insert=Zn,d.isActiveEl=ey,d.isAliBrowser=Bc,d.isAliMiniProgram=T0,d.isAndroid=Oc,d.isAppleDevice=w0,d.isBrowserSupportFileAPI=M0,d.isElement=k0,d.isEventSupported=$p,d.isIE=b0,d.isIE10=_0,d.isIE11=S0,d.isIE9=v0,d.isIOS=Kr,d.isInput=Jn,d.isInputCheckbox=so,d.isInputNumber=py,d.isInputRadio=io,d.isInputText=my,d.isMacOS=Rc,d.isMobile=x0,d.isRootEl=ty,d.isSelect=no,d.isTextArea=dy,d.isTouchSupport=D0,d.isURL=Rw,d.isWxBrowser=Nc,d.isWxMiniProgram=C0,d.jpgToPng=t0,d.keyDown$=gu,d.keyPress$=c1,d.keyUp$=yu,d.leftRotate=Ng,d.length=pn,d.mapTDTJSSDK=C2,d.marginSharpen=Kg,d.mosaic=h0,d.mount=vn,d.mouseClick$=Ry,d.mouseContextMenu$=Ny,d.mouseDoubleClick$=Oy,d.mouseDown$=su,d.mouseEnter$=Dy,d.mouseLeave$=Ly,d.mouseMove$=Ws,d.mouseOut$=Iy,d.mouseOver$=ky,d.mouseUp$=iu,d.mouseWheel$=zy,d.nearestElement=iy,d.nextElementSibling=cy,d.normalizePoint=ug,d.objectSignature=T2,d.onBeforeUnload=Gc,d.onDocumentReady=Vc,d.openLog=gf,d.outputGifBase64=kc,d.outputQRCodeBase64=l0,d.pan$=By,d.panCancel$=Xy,d.panDown$=qy,d.panEnd$=$y,d.panLeft$=Uy,d.panMove$=Fy,d.panRight$=Vy,d.panStart$=Yy,d.panUp$=Gy,d.parent=ry,d.parents=eo,d.parseCSS=xo,d.parseTransformToMatrix=Vr,d.patch=ii,d.pinch$=jy,d.pinchIn$=Hy,d.pinchOut$=Wy,d.pngToJpg=e0,d.pointerCancel$=uo,d.pointerDown$=ho,d.pointerMove$=ao,d.pointerUp$=co,d.polar=Ae,d.polymorphShapesTween=Z1,d.prefixes=I0,d.press$=Jy,d.preventDefault=Ee,d.previousElementSibling=uy,d.radiusClip=s0,d.readFileInBrowser=Ln,d.recordToSearch=oi,d.rectClip=n0,d.rem2px=ny,d.remove=vy,d.removeClass=Cy,d.requestAnimationFrameCycle=vr,d.reverseCSSToJSEasing=eg,d.reverseEaseNameToCubicBezier=cc,d.reverseEasing=ic,d.revokeObjectURL=U0,d.rightRotate=Bg,d.rotate$=Zy,d.rotatePoint=Qt,d.scheduleIdle=tc,d.scheduleIdleAsap=sc,d.scheduleVnodeAsap=Lr,d.scheduleVnodeImmediately=cg,d.scrollParent=oy,d.scrollTo=Q0,d.searchToRecord=Ow,d.selectFileInBrowser=ir,d.setCSSVar=gw,d.setIntervalAccurate=Xp,d.setLogUploadFn=wf,d.setManualScroll=K0,d.setRem=Lw,d.setStyle=qr,d.setTheme=Ku,d.setTimeoutAccurate=_r,d.setWindowTitle=W0,d.shadowRoot=fy,d.sharpen=Qg,d.showEl=Zc,d.siblings=hy,d.signature=hl,d.simulateMouseEventFromTouch=Yp,d.stringToDOM=mm,d.swipe$=Qy,d.swipeDown$=n1,d.swipeLeft$=Ky,d.swipeRight$=t1,d.swipeUp$=e1,d.tap$=s1,d.tapOutSide$=i1,d.text=xy,d.toBlackAndWhite=$g,d.toBlue=Gg,d.toBlueAndGreen=Hg,d.toBlueAndGrey=Zg,d.toDegree=Et,d.toGreen=Vg,d.toGreenAndGrey=Jg,d.toGrey=Fg,d.toGrey2=Yg,d.toOpposite=Xg,d.toRadian=q,d.toRed=Ug,d.toRedAndBlue=jg,d.toRedAndGreen=qg,d.toRedAndGrey=Wg,d.toggleClass=ro,d.toggleElDisplay=_y,d.toggleTheme=dw,d.touchCancel$=hu,d.touchEnd$=au,d.touchMove$=ru,d.touchStart$=ou,d.transformPath2D=Cg,d.transitionEnd$=o1,d.transitionStart$=r1,d.trimHash=el,d.updateVnode=Dr,d.useAttribute=je,d.useClickA=Hs,d.useClipboard=Z0,d.useCookie=xw,d.useCoords$=iw,d.useDataset=hw,d.useDocumentVisible$=g1,d.useDraggable=m1,d.useDrop=p1,d.useElementEventBus=I1,d.useEvent$=X,d.useEventListener=W,d.useFetch=ei,d.useFetchCache=Ew,d.useFetchRetry=Tw,d.useFetchRetryCache=Pw,d.useHashChange$=ow,d.useHotKeyDown$=Su,d.useHotKeyFile=M1,d.useHotKeyFile$=Cu,d.useHotKeyUp$=P1,d.useIntersection$=qu,d.useLoadImage=jc,d.useLoadLink=G0,d.useLoadScript=V0,d.useLocalStorage=Ju,d.useLocale=jo,d.useLocation$=Wu,d.useMatchMedia$=Hu,d.useMouseAndPointerDownMovePoint$=wu,d.useMouseDownMovePoint$=l1,d.useMouseMovePoint$=u1,d.useMousePoint=He,d.useMutation$=Gu,d.usePointerDownMovePoint$=Js,d.usePopStateChange$=aw,d.usePressDownMove=Eu,d.usePressDownMoveWithMouse=D1,d.usePressDownMoveWithPointer=Pu,d.usePressDownMoveWithTouch=L1,d.usePull$=d1,d.useResize=Tu,d.useResize$=mo,d.useRunInSandbox=Ay,d.useSafeArea$=sw,d.useScroll$=xu,d.useSelectFile=Hc,d.useSelectFileImage=j0,d.useSessionStorage=yw,d.useTimestampValue=Vo,d.useTouchDownMovePoint$=f1,d.useUrlChange$=rw,d.useVisible$=ew,d.useVisibleSimple$=tw,d.useWindowResize$=A1,d.vibrate=J0,d.waitForStyleSheetsLoaded=q0,d.writeToIndexDB=Sw,d.wxJsChooseImage=Jw,d.wxJsDownloadImage=Kw,d.wxJsDownloadVoice=c2,d.wxJsGetLocalImgData=t2,d.wxJsGetLocation=d2,d.wxJsGetNetworkType=l2,d.wxJsLogin=g2,d.wxJsOnVoicePlayEnd=a2,d.wxJsOnVoiceRecordEnd=s2,d.wxJsOpenLocation=f2,d.wxJsPauseVoice=r2,d.wxJsPay=p2,d.wxJsPlayVoice=i2,d.wxJsPreviewImage=Zw,d.wxJsScanQRCode=m2,d.wxJsStartRecord=e2,d.wxJsStopRecord=n2,d.wxJsStopVoice=o2,d.wxJsTranslateVoice=u2,d.wxJsUpdateAppMessageShareData=Hw,d.wxJsUpdateTimelineShareData=Ww,d.wxJsUploadImage=Qw,d.wxJsUploadVoice=h2,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
|
|
63
63
|
//# sourceMappingURL=zyzgroup_core_web.umd.cjs.map
|