@zyzgroup/core-web 0.1.96 → 0.1.98
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/hammer-8f91269e.js +1205 -0
- package/dist/hammer-8f91269e.js.map +1 -0
- package/dist/index-baab6dfe.js +26838 -0
- package/dist/index-baab6dfe.js.map +1 -0
- package/dist/zyzgroup_core_web.iife.js +34 -34
- package/dist/zyzgroup_core_web.iife.js.map +1 -1
- package/dist/zyzgroup_core_web.js +463 -27984
- package/dist/zyzgroup_core_web.js.map +1 -1
- package/dist/zyzgroup_core_web.umd.cjs +34 -34
- package/dist/zyzgroup_core_web.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/types/dom/createElementEventBus.d.ts.map +1 -1
- package/types/dom/elementEvents.d.ts.map +1 -1
- package/types/dom/loadHammer.d.ts +13 -0
- package/types/dom/loadHammer.d.ts.map +1 -0
- package/types/dom/safeArea.d.ts.map +1 -1
- package/types/dom/style.d.ts.map +1 -1
- package/types/hooks/useDraw/DrawContext.d.ts.map +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(g,tt){typeof exports=="object"&&typeof module<"u"?tt(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],tt):(g=typeof globalThis<"u"?globalThis:g||self,tt(g.ZYZGroupCoreWeb={},g.require$$0))})(this,function(g,tt){"use strict";const
|
|
1
|
+
(function(g,tt){typeof exports=="object"&&typeof module<"u"?tt(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],tt):(g=typeof globalThis<"u"?globalThis:g||self,tt(g.ZYZGroupCoreWeb={},g.require$$0))})(this,function(g,tt){"use strict";function up(n,t){for(var e=0;e<t.length;e++){const i=t[e];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in n)){const r=Object.getOwnPropertyDescriptor(i,s);r&&Object.defineProperty(n,s,r.get?r:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}const fp=Function("return this")();function dp(){const n=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,t=typeof window=="object"&&window&&window.Object===Object&&window,e=typeof global=="object"&&global&&global.Object===Object&&global,i=typeof self=="object"&&self&&self.Object===Object&&self;return n||t||e||i||this||fp}const V=dp(),no={env:{NODE_ENV:"",terminal:""},argv:[],execPath:"",platform:"",versions:{node:void 0,bun:void 0},...typeof process=="object"&&process?process:{}};({...no.env});const Ih="@YZ/";function mp(n,t=Ih){return n.startsWith(t)}function pp(n,t=Ih){return mp(n,t)?n:`${t}${n}`}function gp(n){return typeof n=="string"&&n.startsWith("Symbol(")&&n.endsWith(")")}function yp(n){return gp(n)&&(n=n.slice(7,-1)),n}function bp(n){return n=yp(n),n=pp(n),typeof Symbol=="function"?Symbol(n):`Symbol(${n})`}bp("META");const io=NaN,wp=Symbol("NO_VALUE"),as={immediate:0,high:100,normal:200,low:300,idle:400};function cs(n){return"dispatch"in n}var we=(n=>(n[n["text/plain"]=0]="text/plain",n[n["text/html"]=1]="text/html",n[n["text/xml"]=2]="text/xml",n[n["text/css"]=3]="text/css",n[n["image/jpeg"]=4]="image/jpeg",n[n["image/png"]=5]="image/png",n[n["image/gif"]=6]="image/gif",n[n["image/bmp"]=7]="image/bmp",n[n["image/webp"]=8]="image/webp",n[n["image/svg+xml"]=9]="image/svg+xml",n[n["image/x-icon"]=10]="image/x-icon",n[n["image/vnd.microsoft.icon"]=11]="image/vnd.microsoft.icon",n[n["image/octet-stream"]=12]="image/octet-stream",n[n["audio/mpeg"]=13]="audio/mpeg",n[n["video/mp4"]=14]="video/mp4",n[n["audio/ogg"]=15]="audio/ogg",n[n["audio/wav"]=16]="audio/wav",n[n["audio/midi"]=17]="audio/midi",n[n["video/webm"]=18]="video/webm",n[n["video/ogg"]=19]="video/ogg",n[n["application/octet-stream"]=20]="application/octet-stream",n[n["application/javascript"]=21]="application/javascript",n[n["application/ecmascript"]=22]="application/ecmascript",n[n["application/json"]=23]="application/json",n[n["application/xml"]=24]="application/xml",n[n["application/xhtml+xml"]=25]="application/xhtml+xml",n[n["application/x-www-form-urlencoded"]=26]="application/x-www-form-urlencoded",n[n["application/msword"]=27]="application/msword",n[n["application/x-csv"]=28]="application/x-csv",n[n["application/vnb.ms-excel"]=29]="application/vnb.ms-excel",n[n["application/vnb.mspowerpoint"]=30]="application/vnb.mspowerpoint",n[n["application/pdf"]=31]="application/pdf",n[n["application/zip"]=32]="application/zip",n[n["application/x-gtar"]=33]="application/x-gtar",n[n["application/x-gzip"]=34]="application/x-gzip",n[n["appliaction/vnd.ms-fontobject"]=35]="appliaction/vnd.ms-fontobject",n[n["aplication/font-sfnt"]=36]="aplication/font-sfnt",n[n["aplication/pkcs12"]=37]="aplication/pkcs12",n))(we||{}),ie=(n=>(n[n.text=0]="text",n[n.dataURL=1]="dataURL",n[n.binaryString=2]="binaryString",n[n.arraybuffer=3]="arraybuffer",n))(ie||{});const hs={ascii:"ascii",utf8:"utf8","utf-8":"utf-8",utf16le:"utf16le","utf-16le":"utf-16le",ucs2:"ucs2","ucs-2":"ucs-2",base64:"base64",base64url:"base64url",latin1:"latin1",binary:"binary",hex:"hex"},ls=n=>{let t=null;switch(n){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(ls("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,16 +7,16 @@
|
|
|
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},Ae=(n,t)=>(typeof n=="string"&&(n=ls(n)||new RegExp(n)),n.test(t)),Dh=(n,t)=>{typeof n=="string"&&(n=ls(n)||new RegExp(n));const e=t.match(n);return e?n.flags.toLowerCase().indexOf("g")>=0?e.map(i=>({matchIndex:-1,fullMatch:i,groupMatchs:[]})):{matchIndex:typeof e.index=="number"?e.index:-1,fullMatch:e[0],groupMatchs:e.slice(1)}:null},Ih=(n,t)=>{typeof n=="string"&&(n=ls(n)||new RegExp(n));const e=[],i=t.matchAll(n);for(const s of i)e.push({matchIndex:typeof s.index=="number"?s.index:-1,fullMatch:s[0],groupMatchs:s.slice(1)});return e};function gp(n){const t=n.match(/[\s\S]/gu);return t?t.length:0}function Oh(n,t){const e=n.codePointAt(t);return e?String.fromCodePoint(e):void 0}const yp="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghijklmnopqrstuvwxyz0123456789",bp="0123456789";function kh(n=12,t=yp){let e="";for(let i=0;i<n;i++)e+=t[Math.floor(Math.random()*t.length)];return e}function wp(n=12){return kh(n,bp)}function vp(n){return n.replace(/(^\w)/g,t=>t.toLowerCase())}const Ct=(n,t="-")=>{let e=n.replace(new RegExp("[_-]?([A-Z])","g"),t+"$1").toLowerCase();const i=new RegExp(`^${t}`);return i.test(n)||(e=e.replace(i,"")),e};function xp(n){return n.replace(/(^\w|[_-]\w)/g,t=>t.slice(-1).toUpperCase())}function Rh(n){return vp(xp(n))}function Lh(n){let t="";for(let e=0,i=n.length;e<i;e++){const s=n.charCodeAt(e);s>=1&&s<=127?t+=n.charAt(e):s>2047?(t+=String.fromCharCode(224|s>>12&15),t+=String.fromCharCode(128|s>>6&63),t+=String.fromCharCode(128|s>>0&63)):(t+=String.fromCharCode(192|s>>6&31),t+=String.fromCharCode(128|s>>0&63))}return t}function _p(){const n=Uint32Array.of(305419896),t=new Uint8Array(n.buffer);switch(t[0]*16777216+t[1]*65536+t[2]*256+t[3]){case 305419896:return!1;case 2018915346:default:return!0}}const Un=(n,t=16)=>{let e=n.toLowerCase();const i=e.indexOf("0b")==0,s=e.indexOf("0o")==0,r=e.indexOf("0x")==0;(i||s||r)&&(e=e.slice(2)),i&&(t=2),s&&(t=8),r&&(t=16);const o=parseInt(e,t);if(Number.isNaN(o)||e.length==0)throw new Error(`radixStringToNumber(${n}, ${t}) 无法解析!`);return o};function io(n,t){let e=t?.type;const i=t?.mime,s=t?.encode;if(!e&&i)switch(s){case hs.utf8:case hs["utf-8"]:e=`${i};charset=${s}`;break;case hs.base64:e=`${i};${s}`;break;default:e=`${i}`;break}return new Blob([n],{type:e})}function Sp(n){let t=we["text/plain"];switch(new DataView(n).getUint32(0,_p()).toString(16).toUpperCase()){case"FFD8FFDB":t=we["image/jpeg"];break;case"FFD8FFE0":case"FFD8FFE1":case"FFD8FFE2":case"FFD8FFE3":t=we["image/jpeg"];break;case"89504E47":t=we["image/png"];break;case"47494638":t=we["image/gif"];break;case"52494646":t=we["image/webp"];break;case"25504446":t=we["application/pdf"];break;case"504B0304":t=we["application/zip"];break}return t}const Cp="[object Undefined]",Ep="[object Null]",Tp="[object Boolean]",Pp="[object Number]",Ap="[object BigInt]",Mp="[object String]",Dp="[object Symbol]",Ip="[object Function]",Op="[object GeneratorFunction]",kp="[object Array]";function so(n){return Object.prototype.toString.call(n)}function Rp(n){const t=so(n);return t===Cp||t===Ep||t===Tp||t===Pp||t===Mp||t===Dp||t===Ap}function zh(n){const t=so(n);return t==Ip||t==Op}function Nh(n){if(!Uh(n))return!1;const t=/[\\^$.*+?()[\]{}|]/g,e=/^\[object .+?Constructor\]$/,i=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(t,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return(zh(n)?i:e).test(Up(n))}function Lp(n,t){return n?.[t]}function Fh(n,t){const e=Lp(n,t);return Nh(e)?e:void 0}Fh(V,"Map"),Fh(V,"WeakMap");function Bh(n){return so(n)===kp}function Uh(n){const t=typeof n;return!!n&&(t=="object"||t=="function")}function bn(n){return!!n&&typeof n=="object"}function us(n){return bn(n)&&!Bh(n)}const Vh=n=>{for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t))return!1;return!0};function zp(n){return typeof Promise<"u"&&n instanceof Promise||Uh(n)&&typeof n.then=="function"&&typeof n.catch=="function"}function Np(n){const t=[];for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&t.push(e);return t}function Vn(n,t,e=!0){if(us(n)&&us(t))for(const i of Np(t))(e||typeof n[i]>"u")&&(us(n[i])&&us(t[i])?Vn(n[i],t[i],e):n[i]=t[i]);return n}function Fp(n,...t){return new n.constructor(...t)}function Bp(n,t){return n===t||n!==n&&t!==t}function Up(n){if(n!=null){try{return Function.prototype.toString.call(n)}catch{}try{return""+n}catch{}}return""}function Vp(n,t){let e;return typeof t=="string"?e=t.split("."):e=t,e.reduce((i,s)=>i!=null&&i!=null?i[s]:i,n)}function Me(n,t){try{return Vp(n,t)}catch{return}}function ro(n,t,e){if(!n||!t)return n;let i;typeof t=="string"?i=t.split("."):i=t;let s=n;for(let r=0,o=i.length-1;r<o;r++){const a=i[r];(!(a in s)||typeof s[a]!="object"||s[a]===null)&&(s[a]=Number.isNaN(Number(i[r+1]))?{}:[]),s=s[a]}return s[i[i.length-1]]=e,n}function li(n){return n!=null}function Yp(n){return li(n)&&n!==pp&&n!==no}function $p(n){return typeof n=="number"&&!Number.isNaN(n)}const Gp=2**31-1;function se(n,t){const e=parseFloat(n);return Number.isNaN(e)?typeof t=="number"?t:NaN:e}const Xp=n=>typeof n=="number"&&n>=0&&Number.isFinite(n),jp=n=>Xp(n)&&n>0,De=n=>jp(n)&&n===Math.floor(n),oo=n=>n===1/0||De(n);function ao(n=1e-6){return function(t,e){return Math.abs(t-e)<n}}function Y(n,t,e){const i=Math.min(t,e),s=Math.max(t,e);return n<i?i:n>s?s:n}function Wp(n,t){return(n%t+t)%t}function fs(n,t,e){return typeof n=="number"&&typeof t=="number"?(1-e)*n+e*t:typeof n=="number"?n:typeof t=="number"?t:0}function Hp(n,t,e){const i=Math.max(n.length,t.length),s=new Array(i);for(let r=0;r<i;r++)s[r]=fs(n[r],t[r],e);return s}function qp(n,t,e){return i=>{const s=Y(i,n,t);return e==0?s:t-s<e?t:Math.round(s/e)*e}}function Jp(n,t=2){return se(n,0).toFixed(t)}function G(n,t=2){return+Jp(n,t)}function co(n,t){const e=Dh("number-single",String(n));return{hasNumber:!!e,number:e&&!Array.isArray(e)&&e.fullMatch?parseFloat(e.fullMatch):Yp(t)?t:NaN,prefix:e&&!Array.isArray(e)&&e.fullMatch?n.substring(0,e.matchIndex):"",suffix:e&&!Array.isArray(e)&&e.fullMatch?n.substring(e.matchIndex+e.fullMatch.length):""}}function Yh(n){const t=Dh("number",n);return t?Array.isArray(t)?t.map(e=>Number(e.fullMatch)):[Number(t.fullMatch)]:[]}function $h(n,t){for(let e=0,i=n.length;e<i;e++)if(n[e]==t)return!0;return!1}function Kp(n=[],t=[]){const e=n.length,i=t.length;for(let r=0;r<i;r++)n[r]=t[r];let s=Math.max(0,e-i);for(;s>0;)n.pop(),s--;return n}function Gh(n,t){const e=n.findIndex(i=>i===t);return e>=0&&n.splice(e,1),n}function Zp(n,...t){return t.forEach(e=>{$h(n,e)||n.push(e)}),n}class ds extends Array{constructor(t){super(t),this.fill(0)}}const Xh=n=>De(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?ds:null:null;function ms(n,t){let e=n.length;for(;e--;)if(Bp(n[e][0],t))return e;return-1}function lt(){return(typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date).now()}function Yn(n=new Date){return n.getTime()}function Qp(n=new Date,t="yyyy-mm-dd hh:ii:ss.SSS"){return rg(n,t)}function tg(n){const t=n.valueOf();return!Number.isNaN(t)}function eg(n,t=3,e=":"){const i=Math.max(n.length,6);let s="";for(let o=0;o<i-4;o++)s+=n[o]||"0";const r=[s,""+(n[i-4]||"0")+(n[i-3]||"0"),""+(n[i-2]||"0")+(n[i-1]||"0")];switch(t){case 1:return r[0];case 2:return r[0]+e+r[1];case 3:return r[0]+e+r[1]+e+r[2]}}function ng(n){const t=Math.max(n.length,6);let e=0;e+=(n[t-2]||0)*10+(n[t-1]||0),e+=((n[t-4]||0)*10+(n[t-3]||0))*60;let i=0;for(let s=0;s<t-4;s++)i=i*10+(n[s]||0);return e+=i*60*60,Math.floor(Math.max(0,e))}function ig(n,t=!1){let e=0;if(typeof n=="number"?e=n:e=ng(n),e<=0)return[0,0,0,0,0,0];const i=[],s=e%60;i.unshift(s%10),i.unshift(Math.floor(s/10)),e=Math.floor(e/60);const r=e%60;if(i.unshift(r%10),i.unshift(Math.floor(r/10)),e=Math.floor(e/60),t){const o=e%100;for(i.unshift(o%10),i.unshift(Math.floor(o/10)),e=Math.floor(e/100);e;)i.unshift(e%10),e=Math.floor(e/10)}else{const o=e%24;i.unshift(o%10),i.unshift(Math.floor(o/10))}return i}function sg(n,t=1,e=!1){return n[n.length-1]+=t,ig(n,e)}function rg(n,t="yyyy-mm-dd hh:ii:ss"){if(!tg(n))return"";const e=/(y+)/.exec(t);if(e&&e[1]){const s=e[1];t=t.replace(s,(n.getFullYear()+"").substring(4-s.length))}const i={"m+":n.getMonth()+1,"d+":n.getDate(),"h+":n.getHours(),"i+":n.getMinutes(),"s+":n.getSeconds(),"q+":Math.floor((n.getMonth()+3)/3),"S+":n.getMilliseconds()};for(const s in i){const r=new RegExp("("+s+")").exec(t);if(r&&r[1]){const o=r[1];t=t.replace(o,o.length===1?""+i[s]:("00"+i[s]).slice(-o.length))}}return t}const jh=()=>{};function og(...n){return n.length===0?(...t)=>t:n.length===1?n[0]:n.reduce((t,e)=>(...i)=>t(e(...i)))}function ag(n=0,t){const e=t?.min??300,i=t?.max??6e4,s=t?.exponent??2,r=t?.factor??.5;let o=e*Math.pow(s,n);if(r){const a=Math.random(),c=Math.floor(a*r*o);o=Math.floor(a*10)&1?o+c:o-c}return Math.min(o,i)|0}function cg(n,t={}){if(typeof n!="function")throw new TypeError("Expected a function");const e=function(...i){const s=t?.thisArg||this,r=t?.cacheKeyResolver?t.cacheKeyResolver.apply(s,i):i[0],o=e.cache;if(o.has(r))return o.get(r);const a=n.apply(s,i);return a instanceof Promise&&a.catch(()=>o.delete(r)),e.cache=o.set(r,a)||o,a};return e.cache=t?.createCache?t.createCache():new Map,e}Array.prototype.ap=function(n){return this.reduce((t,e)=>t.concat(n.map(e)),[])};function hg(){let n,t;return{promise:new Promise((e,i)=>{n=e,t=i}),resolve:n,reject:t}}function wn(n,t=e=>console.error(e)){try{const e=n();return zp(e)?Promise.resolve(e).catch(i=>{t(i)}):e}catch(e){t(e)}}const lg=2147483647;function Wh(n,t,e){if(typeof t!="number"||t<=0)return n;let i;const s=new Promise((r,o)=>{i=setTimeout((a,c)=>{a(new Error(c||`Timeout of ${t}ms!`))},Math.min(t,lg),o,e)});return Promise.race([n,s]).finally(()=>{i!==void 0&&(clearTimeout(i),i=void 0)})}function ug(n,t,e){if(!t)return n;const i=e||"Aborted!";return t.aborted?Promise.reject(new Error(i)):new Promise((s,r)=>{const o=()=>{r(new Error(i))};t.addEventListener("abort",o,{once:!0}),n.finally(()=>{t.removeEventListener("abort",o)}),n.then(s,r)})}class fg{__data__=[];size=0;constructor(t){t=t||[];const e=t.length;let i=-1;for(;++i<e;){const s=t[i];this.set(s[0],s[1])}}set(t,e){const i=this.__data__,s=ms(i,t);return s<0?(++this.size,i.push([t,e])):i[s][1]=e,this}get(t){const e=this.__data__,i=ms(e,t);return i<0?void 0:e[i][1]}has(t){return ms(this.__data__,t)>-1}delete(t){const e=this.__data__,i=ms(e,t);if(i<0)return!1;const s=e.length-1;return i==s?e.pop():Array.prototype.splice.call(e,i,1),--this.size,!0}clear(){this.__data__=[],this.size=0}*entries(){for(const t of this.__data__)yield t}*keys(){for(const t of this.__data__)yield t[0]}*values(){for(const t of this.__data__)yield t[1]}[Symbol.iterator](){return this.entries()}}const dg=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Hh=new Set,mg=(n,t,e,i)=>{typeof eo.emitWarning=="function"?eo.emitWarning(n,t,e,i):console.error(`[${e}] ${t}: ${n}`)},pg=n=>!Hh.has(n);class $n{heap;length;static#a=!1;static create(t){const e=Xh(t);if(!e)return[];$n.#a=!0;const i=new $n(t,e);return $n.#a=!1,i}constructor(t,e){if(!$n.#a)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class ho{#a;#u;#g;#D;#y;#L;#z;#b;get perf(){return this.#b}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#s;#w;#i;#n;#t;#h;#f;#c;#r;#v;#o;#x;#_;#d;#m;#S;#A;#l;#N;static unsafeExposeInternals(t){return{starts:t.#_,ttls:t.#d,autopurgeTimers:t.#m,sizes:t.#x,keyMap:t.#i,keyList:t.#n,valList:t.#t,next:t.#h,prev:t.#f,get head(){return t.#c},get tail(){return t.#r},free:t.#v,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,r)=>t.#U(e,i,s,r),moveToTail:e=>t.#R(e),indexes:e=>t.#C(e),rindexes:e=>t.#E(e),isStale:e=>t.#p(e)}}get max(){return this.#a}get maxSize(){return this.#u}get calculatedSize(){return this.#w}get size(){return this.#s}get fetchMethod(){return this.#L}get memoMethod(){return this.#z}get dispose(){return this.#g}get onInsert(){return this.#D}get disposeAfter(){return this.#y}constructor(t){const{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:c,dispose:h,onInsert:l,disposeAfter:u,noDisposeOnSet:d,noUpdateTTL:f,maxSize:p=0,maxEntrySize:m=0,sizeCalculation:v,fetchMethod:y,memoMethod:b,noDeleteOnFetchRejection:x,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:C,allowStaleOnFetchAbort:S,ignoreFetchAbort:D,perf:L}=t;if(L!==void 0&&typeof L?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#b=L??dg,e!==0&&!De(e))throw new TypeError("max option must be a nonnegative integer");const I=e?Xh(e):Array;if(!I)throw new Error("invalid max value: "+e);if(this.#a=e,this.#u=p,this.maxEntrySize=m||this.#u,this.sizeCalculation=v,this.sizeCalculation){if(!this.#u&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(b!==void 0&&typeof b!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#z=b,y!==void 0&&typeof y!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#L=y,this.#A=!!y,this.#i=new Map,this.#n=Array.from({length:e}).fill(void 0),this.#t=Array.from({length:e}).fill(void 0),this.#h=new I(e),this.#f=new I(e),this.#c=0,this.#r=0,this.#v=$n.create(e),this.#s=0,this.#w=0,typeof h=="function"&&(this.#g=h),typeof l=="function"&&(this.#D=l),typeof u=="function"?(this.#y=u,this.#o=[]):(this.#y=void 0,this.#o=void 0),this.#S=!!this.#g,this.#N=!!this.#D,this.#l=!!this.#y,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!x,this.allowStaleOnFetchRejection=!!C,this.allowStaleOnFetchAbort=!!S,this.ignoreFetchAbort=!!D,this.maxEntrySize!==0){if(this.#u!==0&&!De(this.#u))throw new TypeError("maxSize must be a positive integer if specified");if(!De(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#H()}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!w,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=De(s)||s===0?s:1,this.ttlAutopurge=!!r,this.ttl=i||0,this.ttl){if(!De(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#V()}if(this.#a===0&&this.ttl===0&&this.#u===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#a&&!this.#u){const F="LRU_CACHE_UNBOUNDED";pg(F)&&(Hh.add(F),mg("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",F,ho))}}getRemainingTTL(t){return this.#i.has(t)?1/0:0}#V(){const t=new ds(this.#a),e=new ds(this.#a);this.#d=t,this.#_=e;const i=this.ttlAutopurge?Array.from({length:this.#a}):void 0;this.#m=i,this.#Y=(a,c,h=this.#b.now())=>{e[a]=c!==0?h:0,t[a]=c,s(a,c)},this.#I=a=>{e[a]=t[a]!==0?this.#b.now():0,s(a,t[a])};const s=this.ttlAutopurge?(a,c)=>{if(i?.[a]&&(clearTimeout(i[a]),i[a]=void 0),c&&c!==0&&i){const h=setTimeout(()=>{this.#p(a)&&this.#T(this.#n[a],"expire")},c+1);h.unref&&h.unref(),i[a]=h}}:()=>{};this.#P=(a,c)=>{if(t[c]){const h=t[c],l=e[c];if(!h||!l)return;a.ttl=h,a.start=l,a.now=r||o();const u=a.now-l;a.remainingTTL=h-u}};let r=0;const o=()=>{const a=this.#b.now();if(this.ttlResolution>0){r=a;const c=setTimeout(()=>r=0,this.ttlResolution);c.unref&&c.unref()}return a};this.getRemainingTTL=a=>{const c=this.#i.get(a);if(c===void 0)return 0;const h=t[c],l=e[c];if(!h||!l)return 1/0;const u=(r||o())-l;return h-u},this.#p=a=>{const c=e[a],h=t[a];return!!h&&!!c&&(r||o())-c>h}}#I=()=>{};#P=()=>{};#Y=()=>{};#p=()=>!1;#H(){const t=new ds(this.#a);this.#w=0,this.#x=t,this.#O=e=>{this.#w-=t[e],t[e]=0},this.#$=(e,i,s,r)=>{if(this.#e(i))return 0;if(!De(s))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(s=r(i,e),!De(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s||0},this.#F=(e,i,s)=>{if(t[e]=i,this.#u){const r=this.#u-t[e];for(;this.#w>r;)this.#B(!0)}this.#w+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#w)}}#O=t=>{};#F=(t,e,i)=>{};#$=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#C({allowStale:t=this.allowStale}={}){if(this.#s)for(let e=this.#r;this.#G(e)&&((t||!this.#p(e))&&(yield e),e!==this.#c);)e=this.#f[e]}*#E({allowStale:t=this.allowStale}={}){if(this.#s)for(let e=this.#c;this.#G(e)&&((t||!this.#p(e))&&(yield e),e!==this.#r);)e=this.#h[e]}#G(t){return t!==void 0&&this.#i.get(this.#n[t])===t}*entries(){for(const t of this.#C())this.#t[t]!==void 0&&this.#n[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#n[t],this.#t[t]])}*rentries(){for(const t of this.#E())this.#t[t]!==void 0&&this.#n[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#n[t],this.#t[t]])}*keys(){for(const t of this.#C()){const e=this.#n[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*rkeys(){for(const t of this.#E()){const e=this.#n[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*values(){for(const t of this.#C())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}*rvalues(){for(const t of this.#E())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(const i of this.#C()){const s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;if(r!==void 0&&t(r,this.#n[i],this))return this.#k(this.#n[i],e)}}forEach(t,e=this){for(const i of this.#C()){const s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;r!==void 0&&t.call(e,r,this.#n[i],this)}}rforEach(t,e=this){for(const i of this.#E()){const s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;r!==void 0&&t.call(e,r,this.#n[i],this)}}purgeStale(){let t=!1;for(const e of this.#E({allowStale:!0}))this.#p(e)&&(this.#T(this.#n[e],"expire"),t=!0);return t}info(t){const e=this.#i.get(t);if(e===void 0)return;const i=this.#t[e],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;const r={value:s};if(this.#d&&this.#_){const o=this.#d[e],a=this.#_[e];if(o&&a){const c=o-(this.#b.now()-a);r.ttl=c,r.start=Date.now()}}return this.#x&&(r.size=this.#x[e]),r}dump(){const t=[];for(const e of this.#C({allowStale:!0})){const i=this.#n[e],s=this.#t[e],r=this.#e(s)?s.__staleWhileFetching:s;if(r===void 0||i===void 0)continue;const o={value:r};if(this.#d&&this.#_){o.ttl=this.#d[e];const a=this.#b.now()-this.#_[e];o.start=Math.floor(Date.now()-a)}this.#x&&(o.size=this.#x[e]),t.unshift([i,o])}return t}load(t){this.clear();for(const[e,i]of t){if(i.start){const s=Date.now()-i.start;i.start=this.#b.now()-s}this.#M(e,i.value,i)}}set(t,e,i={}){const{status:s=void 0}=i;return i.status=s,s&&(s.op="set",s.key=t,e!==void 0&&(s.value=e)),this.#M(t,e,i)}#M(t,e,i={}){const{ttl:s=this.ttl,start:r,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:c}=i;if(e===void 0)return c&&(c.set="deleted"),this.delete(t),this;let{noUpdateTTL:h=this.noUpdateTTL}=i;c&&!this.#e(e)&&(c.value=e);const l=this.#$(t,e,i.size||0,a,c);if(this.maxEntrySize&&l>this.maxEntrySize)return this.#T(t,"set"),c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this;let u=this.#s===0?void 0:this.#i.get(t);if(u===void 0)u=this.#s===0?this.#r:this.#v.length!==0?this.#v.pop():this.#s===this.#a?this.#B(!1):this.#s,this.#n[u]=t,this.#t[u]=e,this.#i.set(t,u),this.#h[this.#r]=u,this.#f[u]=this.#r,this.#r=u,this.#s++,this.#F(u,l,c),c&&(c.set="add"),h=!1,this.#N&&this.#D?.(e,t,"add");else{this.#R(u);const d=this.#t[u];if(e!==d){if(this.#A&&this.#e(d)){d.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:f}=d;f!==void 0&&!o&&(this.#S&&this.#g?.(f,t,"set"),this.#l&&this.#o?.push([f,t,"set"]))}else o||(this.#S&&this.#g?.(d,t,"set"),this.#l&&this.#o?.push([d,t,"set"]));if(this.#O(u),this.#F(u,l,c),this.#t[u]=e,c){c.set="replace";const f=d&&this.#e(d)?d.__staleWhileFetching:d;f!==void 0&&(c.oldValue=f)}}else c&&(c.set="update");this.#N&&this.onInsert?.(e,t,e===d?"update":"replace")}if(s!==0&&!this.#d&&this.#V(),this.#d&&(h||this.#Y(u,s,r),c&&this.#P(c,u)),!o&&this.#l&&this.#o){const d=this.#o;let f;for(;f=d?.shift();)this.#y?.(...f)}return this}pop(){try{for(;this.#s;){const t=this.#t[this.#c];if(this.#B(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#l&&this.#o){const t=this.#o;let e;for(;e=t?.shift();)this.#y?.(...e)}}}#B(t){const e=this.#c,i=this.#n[e],s=this.#t[e];return this.#A&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#S||this.#l)&&(this.#S&&this.#g?.(s,i,"evict"),this.#l&&this.#o?.push([s,i,"evict"])),this.#O(e),this.#m?.[e]&&(clearTimeout(this.#m[e]),this.#m[e]=void 0),t&&(this.#n[e]=void 0,this.#t[e]=void 0,this.#v.push(e)),this.#s===1?(this.#c=this.#r=0,this.#v.length=0):this.#c=this.#h[e],this.#i.delete(i),this.#s--,e}has(t,e={}){const{status:i=void 0}=e;return e.status=i,i&&(i.op="has",i.key=t),this.#q(t,e)}#q(t,e={}){const{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,r=this.#i.get(t);if(r!==void 0){const o=this.#t[r];if(this.#e(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#p(r))s&&(s.has="stale",this.#P(s,r));else return i&&this.#I(r),s&&(s.has="hit",this.#P(s,r)),!0}else s&&(s.has="miss");return!1}peek(t,e={}){const{status:i=void 0}=e;return i&&(i.op="peek",i.key=t),e.status=i,this.#J(t,e)}#J(t,e){const{status:i,allowStale:s=this.allowStale}=e,r=this.#i.get(t);if(r===void 0||!s&&this.#p(r)){i&&(i.peek=r===void 0?"miss":"stale");return}const o=this.#t[r],a=this.#e(o)?o.__staleWhileFetching:o;return i&&(a!==void 0?(i.peek="hit",i.value=a):i.peek="miss"),a}#U(t,e,i,s){const r=e===void 0?void 0:this.#t[e];if(this.#e(r))return r;const o=new AbortController,{signal:a}=i;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});const c={signal:o.signal,options:i,context:s},h=(m,v=!1)=>{const{aborted:y}=o.signal,b=i.ignoreFetchAbort&&m!==void 0,x=i.ignoreFetchAbort||!!(i.allowStaleOnFetchAbort&&m!==void 0);if(i.status&&(y&&!v?(i.status.fetchAborted=!0,i.status.fetchError=o.signal.reason,b&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),y&&!b&&!v)return u(o.signal.reason,x);const w=f,C=this.#t[e];return(C===f||C===void 0&&b&&v)&&(m===void 0?w.__staleWhileFetching!==void 0?this.#t[e]=w.__staleWhileFetching:this.#T(t,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.#M(t,m,c.options))),m},l=m=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=m),u(m,!1)),u=(m,v)=>{const{aborted:y}=o.signal,b=y&&i.allowStaleOnFetchAbort,x=b||i.allowStaleOnFetchRejection,w=x||i.noDeleteOnFetchRejection,C=f;if(this.#t[e]===f&&(!w||!v&&C.__staleWhileFetching===void 0?this.#T(t,"fetch"):b||(this.#t[e]=C.__staleWhileFetching)),x)return i.status&&C.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),C.__staleWhileFetching;if(C.__returned===C)throw m},d=(m,v)=>{const y=this.#L?.(t,r,c);y&&y instanceof Promise&&y.then(b=>m(b===void 0?void 0:b),v),o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(m(void 0),i.allowStaleOnFetchAbort&&(m=b=>h(b,!0)))})};i.status&&(i.status.fetchDispatched=!0);const f=new Promise(d).then(h,l),p=Object.assign(f,{__abortController:o,__staleWhileFetching:r,__returned:void 0});return e===void 0?(this.#M(t,p,{...c.options,status:void 0}),e=this.#i.get(t)):this.#t[e]=p,p}#e(t){if(!this.#A)return!1;const e=t;return!!e&&e instanceof Promise&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&e.__abortController instanceof AbortController}fetch(t,e={}){const{status:i=void 0}=e;return e.status=i,i&&e.context&&(i.context=e.context),this.#X(t,e)}async#X(t,e={}){const{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:c=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:m,forceRefresh:v=!1,status:y,signal:b}=e;if(y&&(y.op="fetch",y.key=t,v&&(y.forceRefresh=!0)),!this.#A)return y&&(y.fetch="get"),this.#k(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,status:y});const x={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:a,size:c,sizeCalculation:h,noUpdateTTL:l,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:p,ignoreFetchAbort:f,status:y,signal:b},w=this.#i.get(t);if(w===void 0){y&&(y.fetch="miss");const C=this.#U(t,w,x,m);return C.__returned=C}else{const C=this.#t[w];if(this.#e(C)){const I=i&&C.__staleWhileFetching!==void 0;return y&&(y.fetch="inflight",I&&(y.returnedStale=!0)),I?C.__staleWhileFetching:C.__returned=C}const S=this.#p(w);if(!v&&!S)return y&&(y.fetch="hit"),this.#R(w),s&&this.#I(w),y&&this.#P(y,w),C;const D=this.#U(t,w,x,m),L=D.__staleWhileFetching!==void 0&&i;return y&&(y.fetch=S?"stale":"refresh",L&&S&&(y.returnedStale=!0)),L?D.__staleWhileFetching:D.__returned=D}}forceFetch(t,e={}){const{status:i=void 0}=e;return e.status=i,i&&e.context&&(i.context=e.context),this.#K(t,e)}async#K(t,e={}){const i=await this.#X(t,e);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,e={}){const{status:i=void 0}=e;e.status=i,i&&(i.op="memo",i.key=t,e.context&&(i.context=e.context));const s=this.#Z(t,e);return i&&(i.value=s),s}#Z(t,e={}){const i=this.#z;if(!i)throw new Error("no memoMethod provided to constructor");const{context:s,status:r,forceRefresh:o,...a}=e;r&&o&&(r.forceRefresh=!0);const c=this.#k(t,a),h=o||c===void 0;if(r&&(r.memo=h?"miss":"hit",h||(r.value=c)),!h)return c;const l=i(t,c,{options:a,context:s});return r&&(r.value=l),this.#M(t,l,a),l}get(t,e={}){const{status:i=void 0}=e;e.status=i,i&&(i.op="get",i.key=t);const s=this.#k(t,e);return i&&s!==void 0&&(i.value=s),s}#k(t,e={}){const{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=e,a=this.#i.get(t);if(a===void 0){o&&(o.get="miss");return}const c=this.#t[a],h=this.#e(c);return o&&this.#P(o,a),this.#p(a)?h?(o&&(o.get="stale-fetching"),i&&c.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),c.__staleWhileFetching):void 0):(r||this.#T(t,"expire"),o&&(o.get="stale"),i?(o&&(o.returnedStale=!0),c):void 0):(o&&(o.get=h?"fetching":"hit"),this.#R(a),s&&this.#I(a),h?c.__staleWhileFetching:c)}#j(t,e){this.#f[e]=t,this.#h[t]=e}#R(t){t!==this.#r&&(t===this.#c?this.#c=this.#h[t]:this.#j(this.#f[t],this.#h[t]),this.#j(this.#r,t),this.#r=t)}delete(t){return this.#T(t,"delete")}#T(t,e){let i=!1;if(this.#s!==0){const s=this.#i.get(t);if(s!==void 0)if(this.#m?.[s]&&(clearTimeout(this.#m?.[s]),this.#m[s]=void 0),i=!0,this.#s===1)this.#W(e);else{this.#O(s);const r=this.#t[s];if(this.#e(r)?r.__abortController.abort(new Error("deleted")):(this.#S||this.#l)&&(this.#S&&this.#g?.(r,t,e),this.#l&&this.#o?.push([r,t,e])),this.#i.delete(t),this.#n[s]=void 0,this.#t[s]=void 0,s===this.#r)this.#r=this.#f[s];else if(s===this.#c)this.#c=this.#h[s];else{const o=this.#f[s];this.#h[o]=this.#h[s];const a=this.#h[s];this.#f[a]=this.#f[s]}this.#s--,this.#v.push(s)}}if(this.#l&&this.#o?.length){const s=this.#o;let r;for(;r=s?.shift();)this.#y?.(...r)}return i}clear(){return this.#W("delete")}#W(t){for(const e of this.#E({allowStale:!0})){const i=this.#t[e];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else{const s=this.#n[e];this.#S&&this.#g?.(i,s,t),this.#l&&this.#o?.push([i,s,t])}}if(this.#i.clear(),this.#t.fill(void 0),this.#n.fill(void 0),this.#d&&this.#_){this.#d.fill(0),this.#_.fill(0);for(const e of this.#m??[])e!==void 0&&clearTimeout(e);this.#m?.fill(void 0)}if(this.#x&&this.#x.fill(0),this.#c=0,this.#r=0,this.#v.length=0,this.#w=0,this.#s=0,this.#l&&this.#o){const e=this.#o;let i;for(;i=e?.shift();)this.#y?.(...i)}}}class lo{data;expirationMap=new Map;immortalKeys=new Set;expirations=Object.create(null);ttl;max;updateAgeOnGet;checkAgeOnGet;updateAgeOnHas;checkAgeOnHas;noUpdateTTL;dispose;noDisposeOnSet;timer;timerExpiration;constructor({ttl:t=1/0,max:e=1/0,updateAgeOnGet:i=!1,checkAgeOnGet:s=!1,updateAgeOnHas:r=!1,checkAgeOnHas:o=!1,noUpdateTTL:a=!1,dispose:c,noDisposeOnSet:h=!1}={},l=new Map){if(t!==void 0&&!oo(t))throw new TypeError("ttl must be positive integer or Infinity if set");if(!oo(e))throw new TypeError("max must be positive integer or Infinity");if(this.data=l,this.ttl=t,this.max=e,this.updateAgeOnGet=!!i,this.checkAgeOnGet=!!s,this.updateAgeOnHas=!!r,this.checkAgeOnHas=!!o,this.noUpdateTTL=!!a,this.noDisposeOnSet=!!h,c!==void 0){if(typeof c!="function")throw new TypeError("dispose must be function if set");this.dispose=c}else this.dispose=(u,d,f)=>{};this.timer=void 0,this.timerExpiration=void 0}get size(){return this.data.size}setTimer(t,e){if(this.timerExpiration&&this.timerExpiration<t)return;this.timer&&clearTimeout(this.timer);const i=setTimeout(()=>{this.timer=void 0,this.timerExpiration=void 0,this.purgeStale();for(const s in this.expirations){const r=Number(s);this.setTimer(r,r-lt());break}},Math.min(Gp,Math.max(0,e)));i.unref&&i.unref(),this.timerExpiration=t,this.timer=i}cancelTimer(){this.timer&&(clearTimeout(this.timer),this.timerExpiration=void 0,this.timer=void 0)}clear(){const t=this.dispose!==lo.prototype.dispose?[...this]:[];this.data.clear(),this.expirationMap.clear(),this.cancelTimer(),this.expirations=Object.create(null);for(const[e,i]of t)this.dispose(i,e,"delete")}setTTL(t,e=this.ttl){const i=this.expirationMap.get(t);if(i!==void 0){const s=this.expirations[i];!s||s.length<=1?delete this.expirations[i]:this.expirations[i]=s.filter(r=>r!==t)}if(e&&e!==1/0){this.immortalKeys.delete(t);const s=Math.floor(lt()+e);this.expirationMap.set(t,s),this.expirations[s]||(this.expirations[s]=[],this.setTimer(s,e)),this.expirations[s].push(t)}else this.immortalKeys.add(t),this.expirationMap.set(t,1/0)}set(t,e,{ttl:i=this.ttl,noUpdateTTL:s=this.noUpdateTTL,noDisposeOnSet:r=this.noDisposeOnSet}={}){if(!oo(i))throw new TypeError("ttl must be positive integer or Infinity");if(this.expirationMap.has(t)){s||this.setTTL(t,i);const o=this.data.get(t),a=!r&&this.data.has(t);o!==e&&(this.data.set(t,e),a&&this.dispose(o,t,"set"))}else this.setTTL(t,i),this.data.set(t,e);for(;this.size>this.max;)this.purgeToCapacity();return this}has(t,{checkAgeOnHas:e=this.checkAgeOnHas,ttl:i=this.ttl,updateAgeOnHas:s=this.updateAgeOnHas}={}){return this.data.has(t)?e&&this.getRemainingTTL(t)===0?(this.delete(t),!1):(s&&this.setTTL(t,i),!0):!1}getRemainingTTL(t){const e=this.expirationMap.get(t);return e===1/0?1/0:e!==void 0?Math.max(0,Math.ceil(e-lt())):0}get(t,{updateAgeOnGet:e=this.updateAgeOnGet,ttl:i=this.ttl,checkAgeOnGet:s=this.checkAgeOnGet}={}){const r=this.data.get(t);if(s&&this.getRemainingTTL(t)===0){this.delete(t);return}return e&&this.setTTL(t,i),r}delete(t){const e=this.expirationMap.get(t);if(e!==void 0){const i=this.data.get(t);this.data.delete(t),this.expirationMap.delete(t),this.immortalKeys.delete(t);const s=this.expirations[e];return s&&(s.length<=1?delete this.expirations[e]:this.expirations[e]=s.filter(r=>r!==t)),this.dispose(i,t,"delete"),this.size===0&&this.cancelTimer(),!0}return!1}purgeToCapacity(){if(!(this.size<=this.max))for(const t in this.expirations){const e=this.expirations[t];if(this.size-e.length>=this.max){delete this.expirations[t];const i=[];for(const s of e)i.push([s,this.data.get(s)]),this.data.delete(s),this.expirationMap.delete(s);for(const[s,r]of i)this.dispose(r,s,"evict")}else{const i=this.size-this.max,s=[];for(const r of e.splice(0,i))s.push([r,this.data.get(r)]),this.data.delete(r),this.expirationMap.delete(r);for(const[r,o]of s)this.dispose(o,r,"evict")}}}purgeStale(){const t=Math.ceil(lt());for(const e in this.expirations){if(e==="Infinity"||Number(e)>t)return;const i=[...this.expirations[e]||[]],s=[];delete this.expirations[e];for(const r of i)s.push([r,this.data.get(r)]),this.data.delete(r),this.expirationMap.delete(r);for(const[r,o]of s)this.dispose(o,r,"expire")}this.size===0&&this.cancelTimer()}*entries(){for(const t in this.expirations)for(const e of this.expirations[t])yield[e,this.data.get(e)];for(const t of this.immortalKeys)yield[t,this.data.get(t)]}*keys(){for(const t in this.expirations)for(const e of this.expirations[t])yield e;for(const t of this.immortalKeys)yield t}*values(){for(const t in this.expirations)for(const e of this.expirations[t])yield this.data.get(e);for(const t of this.immortalKeys)yield this.data.get(t)}[Symbol.iterator](){return this.entries()}firstKey(){return this.keys().next().value}}const vn={branch:"├",lastBranch:"└",line:"│",empty:" "};function ps(n,t={}){const{showValues:e=!0,hideFunctions:i=!1,lineBreak:s=`\r
|
|
11
|
-
`,maxDeep:r}=t,o=[],a=new WeakSet;function c(l,u="",d=0){if(typeof l=="string"){o.push(u+'"'+l+'"');return}if(typeof l!="object"||l===null){e&&o.push(u+String(l));return}if(r&&d>=r){Array.isArray(n)?o.push("[...OverMaxDeep]"):o.push("{...OverMaxDeep}");return}if(a.has(l)){o.push(u+"[Circular]");return}a.add(l);const f=Object.keys(l).filter(p=>!(i&&typeof l[p]=="function"));f.forEach((p,m)=>{const v=l[p],y=m===f.length-1,b=d===0&&m===0?"":u,x=y?vn.lastBranch:vn.branch,w=p.trim()===""?"":p;let C=b+x+(w?" "+w:"");const S=p.trim()!=="";if(v&&typeof v=="object"&&a.has(v))o.push(C+(S?": ":C?" ":"")+"[Circular]");else if(v&&typeof v=="object"&&!Array.isArray(v)){o.push(C);const D=y?vn.empty:vn.line,L=b+D+" ";c(v,L,d+1)}else if(Array.isArray(v)){o.push(C+(S?": ":C?" ":"")+"[Array("+v.length+")]");const D=y?vn.empty:vn.line,L=b+D+" ";c(v,L,d+1)}else if(e){const D=typeof v=="function"?"[Function]":typeof v=="string"?'"'+String(v)+'"':String(v);C+=(S?": ":C?" ":"")+D,o.push(C)}else o.push(C)})}const h=Object.keys(n);if(h.length===0)return"(empty)";if(h.length===1&&h[0]!==void 0&&h[0].trim()===""&&typeof n[h[0]]=="string"){const l=h[0],u=vn.lastBranch,d=n[l],f=typeof d=="function"?"[Function]":typeof d=="string"?'"'+d+'"':String(d);return u+" "+f}return c(n),s+o.join(s)}function qh(n="verbose"){let t=-1;switch(n){case"verbose":t=0;break;case"debug":t=1;break;case"info":t=2;break;case"warn":t=3;break;case"error":t=4;break}return t}function gg(n="verbose"){V.OPEN_LOG_LEVEL=qh(n)}function Jh(){V.OPEN_LOG_LEVEL=-1}function yg(n){V.LOG_UPLOAD_FN=n}Jh();function ui(n="verbose"){return V.OPEN_LOG_LEVEL<=qh(n)}function uo(n){V.LOG_UPLOAD_FN&&V.LOG_UPLOAD_FN(n)}function Je(n,t=""){try{if(uo({level:"info",msg:n,type:t}),!ui("info"))return;console.log(n)}catch{}}function re(n,t=""){try{if(uo({level:"warn",msg:n,type:t}),!ui("warn"))return;console.warn(n)}catch{}}function bg(n,t=""){try{if(uo({level:"error",msg:n,type:t}),!ui("error"))return;console.error(n)}catch{}}const Kh={start:n=>{ui("verbose")&&(!console||typeof console!="object"||typeof console.groupCollapsed!="function"||console.groupCollapsed(n))},end:()=>{!console||typeof console!="object"||typeof console.groupEnd!="function"||console.groupEnd()}},Zh={start:n=>{ui("verbose")&&(!console||typeof console!="object"||typeof console.time!="function"||console.time(n))},end:n=>{!console||typeof console!="object"||typeof console.timeEnd!="function"||console.timeEnd(n)}};function gs(n){if(typeof MessageChannel<"u"&&(Nh(MessageChannel)||MessageChannel.toString()==="[object MessageChannelConstructor]")){const{port1:t,port2:e}=new MessageChannel;t.onmessage=()=>{t.onmessage=null,n()},e.postMessage(null)}else setTimeout(n,0)}async function wg(){return new Promise(n=>{gs(n)})}if(V.requestAnimationFrame=V.requestAnimationFrame||V.webkitRequestAnimationFrame||V.mozRequestAnimationFrame||V.oRequestAnimationFrame||V.msRequestAnimationFrame,V.cancelAnimationFrame=V.cancelAnimationFrame||V.webkitCancelAnimationFrame||V.mozCancelAnimationFrame||V.oCancelAnimationFrame||V.msCancelAnimationFrame,!V.requestAnimationFrame){let n=lt();V.requestAnimationFrame=t=>{const e=lt(),i=Math.max(0,16-(e-n)),s=V.setTimeout(()=>{t(e+i)},i);return n=e+i,s}}V.cancelAnimationFrame||(V.cancelAnimationFrame=n=>{V.clearTimeout(n)});const ys=V.requestAnimationFrame,vg=V.cancelAnimationFrame;function xg(n){let t=!0,e=ys(function i(s){t&&n(s)&&(e=ys(i))});return()=>{t=!1,vg(e)}}V.requestIdleCallback=V.requestIdleCallback||function(n,t){const e=lt();return setTimeout(()=>{const i=lt()-e,s={didTimeout:typeof t?.timeout!="number"?!1:i>t.timeout,timeRemaining:()=>Math.max(0,50-i)};n(s)},t?.timeout)},V.cancelIdleCallback=V.cancelIdleCallback||function(n){clearTimeout(n)},V.requestIdleCallback,V.cancelIdleCallback;let fi=33,Ie=33,bs=0,di=0,fo=!1;function Qh(n){fo||(fo=!0,ys(t=>{fo=!1,bs=t,di===0&&(di=bs+Ie);let e=Ie+bs-di;e<Ie&&fi<Ie?(e<8&&(e=8),Ie=Math.max(e,fi)):e>Ie&&fi>Ie&&(Ie=Math.min(e,fi)),fi=e,di=bs+Ie,gs(()=>{n(di),Qh(n)})}))}function mo(n){const t=n?.maxIterations||1e4,e=!!n?.tracing,i=n?.onTrace||(f=>{const p=" ".repeat(f.depth);console.log(`${p}emit#${f.id} parent=${f.parentId} source=${f.source}`)}),s=[];let r=0,o=0;const a=new Set,c=f=>(a.add(f),()=>{a.delete(f)});let h;function l(f,p){const m=h,v={id:String(++r),dataset:f,source:p,createdAt:lt(),parentId:m?.id,depth:m?m.depth+1:0};s.push(v)}let u=!1;function d(){if(u)return;u=!0;let f=0;try{for(;o<s.length;){if(++f>t)throw new Error("Possible infinite signal loop detected");const p=s[o],m=h;h=p,e&&i(p);const v=Array.from(a);for(const y of v)try{y(...p.dataset)}catch(b){gs(()=>{throw b})}h=m,o++}}finally{u=!1,o>=s.length&&(s.length=0,o=0)}}return{subscribe:c,once(f){const p=c((...m)=>{p(),f(...m)});return p},emit(...f){l(f),d()},emitFrom(f,...p){l(p,f),d()},clear(){a.clear()}}}function _g(n={}){const{concurrency:t=1/0,maxWorkerRunTime:e=6e4}=n;let i=1/0;const s=()=>i===1/0||lt()<i,r=I=>{i=lt()+I,h()};let o=s()?0:1;const a=()=>o>0,c=()=>{o++},h=()=>{o>0&&o--,D()},l=()=>!a()&&!s(),u=async()=>{l()&&await wg()};let d=0,f=[];const p=new Set,m=new Set;let v=0,y=[],b=[];const x=()=>{v===0&&(y.forEach(I=>I()),y=[],f.length===0&&(b.forEach(I=>I()),b=[]))},w=I=>{if(I.signal){if(I.signal.aborted)return I.resultReject("Cancel by Aborted!"),I;I.abortHandler=()=>{I.resultReject("Cancel by Abort!"),f=f.filter(F=>F.id!==I.id),x()},I.signal.addEventListener("abort",I.abortHandler,{once:!0})}if(f.filter(F=>I.invalidates?.includes(F.id)).forEach(F=>{F.resultReject("Cancel by invalidates!")}),f=f.filter(F=>!I.invalidates?.includes(F.id)),I.fold){const F=f.findIndex(U=>U.id===I.id);if(F!==-1){const U=f[F],X=I.fold(U,I);return U.dataset=X.dataset,U}else return f.push(I),I}else return f.push(I),I},C=()=>{if(f.length===0)return;let I=-1,F;for(let U=0,X=f.length;U<X;U++){const Z=f[U];(!F||Z.niceness<F.niceness)&&(I=U,F=Z)}return f.splice(I,1),F};let S=!1;const D=()=>{S||a()||(S=!0,gs(()=>{for(S=!1;f.length>0&&m.size>0&&v<t&&!a();){const I=C(),F=$p(I.deadline)&<()>=I.deadline,U=I.niceness==as.immediate;if(!s()&&!F&&!U){w(I),D();break}if(I.signal?.aborted){I.resultReject("Cancel by Aborted!"),x();continue}v++;const X=m.values().next().value;m.delete(X),ug(Wh(Promise.resolve(X(...I.dataset)),e),I.signal).then(Z=>{I.resultResolve(Z)}).catch(Z=>{I.retry>0?(I.retry--,w(I)):I.resultReject(Z)}).finally(async()=>{p.has(X)&&m.add(X),I.signal&&I.abortHandler&&I.signal.removeEventListener("abort",I.abortHandler),v--,x(),D()})}}))},L=I=>(p.add(I),m.add(I),D(),()=>{p.delete(I),m.delete(I)});return{put(...I){const F=I[I.length-1]||{};let U={};("niceness"in F||"deadline"in F||"retry"in F||"signal"in F||"invalidates"in F||"fold"in F)&&(U=I.pop());const X=hg(),Z=w({id:String(++d),dataset:I,createdAt:lt(),result:X.promise,resultResolve:X.resolve,resultReject:X.reject,niceness:U.niceness??as.normal,deadline:U.deadline??no,retry:U.retry??0,signal:U.signal});return D(),Z},cancel(I){f=f.filter(F=>F.id!==I.id),I.signal&&I.abortHandler&&I.signal.removeEventListener("abort",I.abortHandler),x()},clear(){for(const I of f)I.signal&&I.abortHandler&&I.signal.removeEventListener("abort",I.abortHandler),I.resultReject(new Error("Cleared"));f.length=0,x()},run:L,once(I){const F=L((...U)=>{try{return I(...U)}finally{F()}});return F},async onDrain(){if(!(v===0&&f.length===0))return new Promise(I=>{b.push(I)})},async onIdle(){if(v!==0)return new Promise(I=>{y.push(I)})},pause:c,resume:h,get paused(){return a()},startFrame:r,yieldIfNeeded:u}}class Sg{pool;concurrency;maxWorkerRunTime;constructor(t={concurrency:1}){this.concurrency=t.concurrency??1,this.maxWorkerRunTime=t.maxWorkerRunTime??6e4,this.pool=_g({concurrency:this.concurrency,maxWorkerRunTime:this.maxWorkerRunTime});for(let e=0;e<this.concurrency;e++)this.pool.run(async function(i){return await i()})}cancel(t){this.pool.cancel(t)}clear(){this.pool.clear()}get paused(){return this.pool.paused}startFrame(t){this.pool.startFrame(t)}async immediate(t){try{return this.pool.pause(),await this.pool.onIdle(),await Wh(Promise.resolve(t()),this.maxWorkerRunTime)}finally{this.pool.resume()}}asap(t,e){return this.pool.put(t,{niceness:e?.niceness??as.normal,deadline:typeof e?.timeout=="number"?lt()+e?.timeout:no})}}class Cg{pool;started=!1;constructor(t={concurrency:1}){this.pool=new Sg(t),this.pool.startFrame(0)}clear(){this.pool.clear()}start(){this.started||(this.started=!0,Qh(t=>{this.pool.startFrame(t-lt())}))}async idle(t,e){return this.start(),await this.pool.asap(t,{niceness:as.idle,timeout:e}).result}}const tl=new Cg,Eg=tl.idle.bind(tl);class po{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,i){return this.events[t]||(this.events[t]=[]),this.events[t].unshift(i?e.bind(i):e),this}addListener(t,e,i){return this.events[t]||(this.events[t]=[]),this.events[t].push(i?e.bind(i):e),this}on(t,e,i){return this.addListener(t,e,i),this}removeListener(t,e){return this.events[t]&&(this.events[t]=this.events[t].filter(i=>i!==e)),this}off(t,e){return this.removeListener(t,e),this}removeAllListeners(t){return t?this.events[t]=[]:this.events={},this}emit(t,...e){return this.events[t]&&this.events[t].slice(0).forEach(i=>{i(...e)}),this}once(t,e,i){const s=(...r)=>{i?e.apply(i,r):e(...r),this.off(t,s)};return this.on(t,s),this}}var go=function(n,t){return go=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])},go(n,t)};function yo(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");go(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function el(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],i=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&i>=n.length&&(n=void 0),{value:n&&n[i++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function bo(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var i=e.call(n),s,r=[],o;try{for(;(t===void 0||t-- >0)&&!(s=i.next()).done;)r.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return r}function wo(n,t,e){if(e||arguments.length===2)for(var i=0,s=t.length,r;i<s;i++)(r||!(i in t))&&(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return n.concat(r||Array.prototype.slice.call(t))}function Oe(n){return typeof n=="function"}function Tg(n){var t=function(i){Error.call(i),i.stack=new Error().stack},e=n(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var vo=Tg(function(n){return function(t){n(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},Ae=(n,t)=>(typeof n=="string"&&(n=ls(n)||new RegExp(n)),n.test(t)),Oh=(n,t)=>{typeof n=="string"&&(n=ls(n)||new RegExp(n));const e=t.match(n);return e?n.flags.toLowerCase().indexOf("g")>=0?e.map(i=>({matchIndex:-1,fullMatch:i,groupMatchs:[]})):{matchIndex:typeof e.index=="number"?e.index:-1,fullMatch:e[0],groupMatchs:e.slice(1)}:null},kh=(n,t)=>{typeof n=="string"&&(n=ls(n)||new RegExp(n));const e=[],i=t.matchAll(n);for(const s of i)e.push({matchIndex:typeof s.index=="number"?s.index:-1,fullMatch:s[0],groupMatchs:s.slice(1)});return e};function vp(n){const t=n.match(/[\s\S]/gu);return t?t.length:0}function Rh(n,t){const e=n.codePointAt(t);return e?String.fromCodePoint(e):void 0}const xp="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghijklmnopqrstuvwxyz0123456789",_p="0123456789";function Lh(n=12,t=xp){let e="";for(let i=0;i<n;i++)e+=t[Math.floor(Math.random()*t.length)];return e}function Sp(n=12){return Lh(n,_p)}function Cp(n){return n.replace(/(^\w)/g,t=>t.toLowerCase())}const Ct=(n,t="-")=>{let e=n.replace(new RegExp("[_-]?([A-Z])","g"),t+"$1").toLowerCase();const i=new RegExp(`^${t}`);return i.test(n)||(e=e.replace(i,"")),e};function Ep(n){return n.replace(/(^\w|[_-]\w)/g,t=>t.slice(-1).toUpperCase())}function zh(n){return Cp(Ep(n))}function Nh(n){let t="";for(let e=0,i=n.length;e<i;e++){const s=n.charCodeAt(e);s>=1&&s<=127?t+=n.charAt(e):s>2047?(t+=String.fromCharCode(224|s>>12&15),t+=String.fromCharCode(128|s>>6&63),t+=String.fromCharCode(128|s>>0&63)):(t+=String.fromCharCode(192|s>>6&31),t+=String.fromCharCode(128|s>>0&63))}return t}function Tp(){const n=Uint32Array.of(305419896),t=new Uint8Array(n.buffer);switch(t[0]*16777216+t[1]*65536+t[2]*256+t[3]){case 305419896:return!1;case 2018915346:default:return!0}}const Un=(n,t=16)=>{let e=n.toLowerCase();const i=e.indexOf("0b")==0,s=e.indexOf("0o")==0,r=e.indexOf("0x")==0;(i||s||r)&&(e=e.slice(2)),i&&(t=2),s&&(t=8),r&&(t=16);const o=parseInt(e,t);if(Number.isNaN(o)||e.length==0)throw new Error(`radixStringToNumber(${n}, ${t}) 无法解析!`);return o};function so(n,t){let e=t?.type;const i=t?.mime,s=t?.encode;if(!e&&i)switch(s){case hs.utf8:case hs["utf-8"]:e=`${i};charset=${s}`;break;case hs.base64:e=`${i};${s}`;break;default:e=`${i}`;break}return new Blob([n],{type:e})}function Pp(n){let t=we["text/plain"];switch(new DataView(n).getUint32(0,Tp()).toString(16).toUpperCase()){case"FFD8FFDB":t=we["image/jpeg"];break;case"FFD8FFE0":case"FFD8FFE1":case"FFD8FFE2":case"FFD8FFE3":t=we["image/jpeg"];break;case"89504E47":t=we["image/png"];break;case"47494638":t=we["image/gif"];break;case"52494646":t=we["image/webp"];break;case"25504446":t=we["application/pdf"];break;case"504B0304":t=we["application/zip"];break}return t}const Ap="[object Undefined]",Mp="[object Null]",Dp="[object Boolean]",Ip="[object Number]",Op="[object BigInt]",kp="[object String]",Rp="[object Symbol]",Lp="[object Function]",zp="[object GeneratorFunction]",Np="[object Array]";function ro(n){return Object.prototype.toString.call(n)}function Fp(n){const t=ro(n);return t===Ap||t===Mp||t===Dp||t===Ip||t===kp||t===Rp||t===Op}function Fh(n){const t=ro(n);return t==Lp||t==zp}function Bh(n){if(!Yh(n))return!1;const t=/[\\^$.*+?()[\]{}|]/g,e=/^\[object .+?Constructor\]$/,i=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(t,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return(Fh(n)?i:e).test(Gp(n))}function Bp(n,t){return n?.[t]}function Uh(n,t){const e=Bp(n,t);return Bh(e)?e:void 0}Uh(V,"Map"),Uh(V,"WeakMap");function Vh(n){return ro(n)===Np}function Yh(n){const t=typeof n;return!!n&&(t=="object"||t=="function")}function bn(n){return!!n&&typeof n=="object"}function us(n){return bn(n)&&!Vh(n)}const $h=n=>{for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t))return!1;return!0};function Up(n){return typeof Promise<"u"&&n instanceof Promise||Yh(n)&&typeof n.then=="function"&&typeof n.catch=="function"}function Vp(n){const t=[];for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&t.push(e);return t}function Vn(n,t,e=!0){if(us(n)&&us(t))for(const i of Vp(t))(e||typeof n[i]>"u")&&(us(n[i])&&us(t[i])?Vn(n[i],t[i],e):n[i]=t[i]);return n}function Yp(n,...t){return new n.constructor(...t)}function $p(n,t){return n===t||n!==n&&t!==t}function Gp(n){if(n!=null){try{return Function.prototype.toString.call(n)}catch{}try{return""+n}catch{}}return""}function Xp(n,t){let e;return typeof t=="string"?e=t.split("."):e=t,e.reduce((i,s)=>i!=null&&i!=null?i[s]:i,n)}function Me(n,t){try{return Xp(n,t)}catch{return}}function oo(n,t,e){if(!n||!t)return n;let i;typeof t=="string"?i=t.split("."):i=t;let s=n;for(let r=0,o=i.length-1;r<o;r++){const a=i[r];(!(a in s)||typeof s[a]!="object"||s[a]===null)&&(s[a]=Number.isNaN(Number(i[r+1]))?{}:[]),s=s[a]}return s[i[i.length-1]]=e,n}function li(n){return n!=null}function jp(n){return li(n)&&n!==wp&&n!==io}function Wp(n){return typeof n=="number"&&!Number.isNaN(n)}const Hp=2**31-1;function se(n,t){const e=parseFloat(n);return Number.isNaN(e)?typeof t=="number"?t:NaN:e}const qp=n=>typeof n=="number"&&n>=0&&Number.isFinite(n),Jp=n=>qp(n)&&n>0,De=n=>Jp(n)&&n===Math.floor(n),ao=n=>n===1/0||De(n);function co(n=1e-6){return function(t,e){return Math.abs(t-e)<n}}function Y(n,t,e){const i=Math.min(t,e),s=Math.max(t,e);return n<i?i:n>s?s:n}function Kp(n,t){return(n%t+t)%t}function fs(n,t,e){return typeof n=="number"&&typeof t=="number"?(1-e)*n+e*t:typeof n=="number"?n:typeof t=="number"?t:0}function Zp(n,t,e){const i=Math.max(n.length,t.length),s=new Array(i);for(let r=0;r<i;r++)s[r]=fs(n[r],t[r],e);return s}function Qp(n,t,e){return i=>{const s=Y(i,n,t);return e==0?s:t-s<e?t:Math.round(s/e)*e}}function tg(n,t=2){return se(n,0).toFixed(t)}function G(n,t=2){return+tg(n,t)}function ho(n,t){const e=Oh("number-single",String(n));return{hasNumber:!!e,number:e&&!Array.isArray(e)&&e.fullMatch?parseFloat(e.fullMatch):jp(t)?t:NaN,prefix:e&&!Array.isArray(e)&&e.fullMatch?n.substring(0,e.matchIndex):"",suffix:e&&!Array.isArray(e)&&e.fullMatch?n.substring(e.matchIndex+e.fullMatch.length):""}}function Gh(n){const t=Oh("number",n);return t?Array.isArray(t)?t.map(e=>Number(e.fullMatch)):[Number(t.fullMatch)]:[]}function Xh(n,t){for(let e=0,i=n.length;e<i;e++)if(n[e]==t)return!0;return!1}function eg(n=[],t=[]){const e=n.length,i=t.length;for(let r=0;r<i;r++)n[r]=t[r];let s=Math.max(0,e-i);for(;s>0;)n.pop(),s--;return n}function jh(n,t){const e=n.findIndex(i=>i===t);return e>=0&&n.splice(e,1),n}function ng(n,...t){return t.forEach(e=>{Xh(n,e)||n.push(e)}),n}class ds extends Array{constructor(t){super(t),this.fill(0)}}const Wh=n=>De(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?ds:null:null;function ms(n,t){let e=n.length;for(;e--;)if($p(n[e][0],t))return e;return-1}function lt(){return(typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date).now()}function Yn(n=new Date){return n.getTime()}function ig(n=new Date,t="yyyy-mm-dd hh:ii:ss.SSS"){return hg(n,t)}function sg(n){const t=n.valueOf();return!Number.isNaN(t)}function rg(n,t=3,e=":"){const i=Math.max(n.length,6);let s="";for(let o=0;o<i-4;o++)s+=n[o]||"0";const r=[s,""+(n[i-4]||"0")+(n[i-3]||"0"),""+(n[i-2]||"0")+(n[i-1]||"0")];switch(t){case 1:return r[0];case 2:return r[0]+e+r[1];case 3:return r[0]+e+r[1]+e+r[2]}}function og(n){const t=Math.max(n.length,6);let e=0;e+=(n[t-2]||0)*10+(n[t-1]||0),e+=((n[t-4]||0)*10+(n[t-3]||0))*60;let i=0;for(let s=0;s<t-4;s++)i=i*10+(n[s]||0);return e+=i*60*60,Math.floor(Math.max(0,e))}function ag(n,t=!1){let e=0;if(typeof n=="number"?e=n:e=og(n),e<=0)return[0,0,0,0,0,0];const i=[],s=e%60;i.unshift(s%10),i.unshift(Math.floor(s/10)),e=Math.floor(e/60);const r=e%60;if(i.unshift(r%10),i.unshift(Math.floor(r/10)),e=Math.floor(e/60),t){const o=e%100;for(i.unshift(o%10),i.unshift(Math.floor(o/10)),e=Math.floor(e/100);e;)i.unshift(e%10),e=Math.floor(e/10)}else{const o=e%24;i.unshift(o%10),i.unshift(Math.floor(o/10))}return i}function cg(n,t=1,e=!1){return n[n.length-1]+=t,ag(n,e)}function hg(n,t="yyyy-mm-dd hh:ii:ss"){if(!sg(n))return"";const e=/(y+)/.exec(t);if(e&&e[1]){const s=e[1];t=t.replace(s,(n.getFullYear()+"").substring(4-s.length))}const i={"m+":n.getMonth()+1,"d+":n.getDate(),"h+":n.getHours(),"i+":n.getMinutes(),"s+":n.getSeconds(),"q+":Math.floor((n.getMonth()+3)/3),"S+":n.getMilliseconds()};for(const s in i){const r=new RegExp("("+s+")").exec(t);if(r&&r[1]){const o=r[1];t=t.replace(o,o.length===1?""+i[s]:("00"+i[s]).slice(-o.length))}}return t}const Hh=()=>{};function lg(...n){return n.length===0?(...t)=>t:n.length===1?n[0]:n.reduce((t,e)=>(...i)=>t(e(...i)))}function ug(n=0,t){const e=t?.min??300,i=t?.max??6e4,s=t?.exponent??2,r=t?.factor??.5;let o=e*Math.pow(s,n);if(r){const a=Math.random(),c=Math.floor(a*r*o);o=Math.floor(a*10)&1?o+c:o-c}return Math.min(o,i)|0}function fg(n,t={}){if(typeof n!="function")throw new TypeError("Expected a function");const e=function(...i){const s=t?.thisArg||this,r=t?.cacheKeyResolver?t.cacheKeyResolver.apply(s,i):i[0],o=e.cache;if(o.has(r))return o.get(r);const a=n.apply(s,i);return a instanceof Promise&&a.catch(()=>o.delete(r)),e.cache=o.set(r,a)||o,a};return e.cache=t?.createCache?t.createCache():new Map,e}Array.prototype.ap=function(n){return this.reduce((t,e)=>t.concat(n.map(e)),[])};function dg(){let n,t;return{promise:new Promise((e,i)=>{n=e,t=i}),resolve:n,reject:t}}function wn(n,t=e=>console.error(e)){try{const e=n();return Up(e)?Promise.resolve(e).catch(i=>{t(i)}):e}catch(e){t(e)}}const mg=2147483647;function qh(n,t,e){if(typeof t!="number"||t<=0)return n;let i;const s=new Promise((r,o)=>{i=setTimeout((a,c)=>{a(new Error(c||`Timeout of ${t}ms!`))},Math.min(t,mg),o,e)});return Promise.race([n,s]).finally(()=>{i!==void 0&&(clearTimeout(i),i=void 0)})}function pg(n,t,e){if(!t)return n;const i=e||"Aborted!";return t.aborted?Promise.reject(new Error(i)):new Promise((s,r)=>{const o=()=>{r(new Error(i))};t.addEventListener("abort",o,{once:!0}),n.finally(()=>{t.removeEventListener("abort",o)}),n.then(s,r)})}class gg{__data__=[];size=0;constructor(t){t=t||[];const e=t.length;let i=-1;for(;++i<e;){const s=t[i];this.set(s[0],s[1])}}set(t,e){const i=this.__data__,s=ms(i,t);return s<0?(++this.size,i.push([t,e])):i[s][1]=e,this}get(t){const e=this.__data__,i=ms(e,t);return i<0?void 0:e[i][1]}has(t){return ms(this.__data__,t)>-1}delete(t){const e=this.__data__,i=ms(e,t);if(i<0)return!1;const s=e.length-1;return i==s?e.pop():Array.prototype.splice.call(e,i,1),--this.size,!0}clear(){this.__data__=[],this.size=0}*entries(){for(const t of this.__data__)yield t}*keys(){for(const t of this.__data__)yield t[0]}*values(){for(const t of this.__data__)yield t[1]}[Symbol.iterator](){return this.entries()}}const yg=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Jh=new Set,bg=(n,t,e,i)=>{typeof no.emitWarning=="function"?no.emitWarning(n,t,e,i):console.error(`[${e}] ${t}: ${n}`)},wg=n=>!Jh.has(n);class $n{heap;length;static#a=!1;static create(t){const e=Wh(t);if(!e)return[];$n.#a=!0;const i=new $n(t,e);return $n.#a=!1,i}constructor(t,e){if(!$n.#a)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class lo{#a;#u;#g;#D;#y;#L;#z;#b;get perf(){return this.#b}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#s;#w;#i;#n;#t;#h;#f;#c;#r;#v;#o;#x;#_;#d;#m;#S;#A;#l;#N;static unsafeExposeInternals(t){return{starts:t.#_,ttls:t.#d,autopurgeTimers:t.#m,sizes:t.#x,keyMap:t.#i,keyList:t.#n,valList:t.#t,next:t.#h,prev:t.#f,get head(){return t.#c},get tail(){return t.#r},free:t.#v,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,r)=>t.#U(e,i,s,r),moveToTail:e=>t.#R(e),indexes:e=>t.#C(e),rindexes:e=>t.#E(e),isStale:e=>t.#p(e)}}get max(){return this.#a}get maxSize(){return this.#u}get calculatedSize(){return this.#w}get size(){return this.#s}get fetchMethod(){return this.#L}get memoMethod(){return this.#z}get dispose(){return this.#g}get onInsert(){return this.#D}get disposeAfter(){return this.#y}constructor(t){const{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:c,dispose:h,onInsert:l,disposeAfter:u,noDisposeOnSet:d,noUpdateTTL:f,maxSize:p=0,maxEntrySize:m=0,sizeCalculation:v,fetchMethod:y,memoMethod:b,noDeleteOnFetchRejection:x,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:C,allowStaleOnFetchAbort:S,ignoreFetchAbort:D,perf:L}=t;if(L!==void 0&&typeof L?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#b=L??yg,e!==0&&!De(e))throw new TypeError("max option must be a nonnegative integer");const I=e?Wh(e):Array;if(!I)throw new Error("invalid max value: "+e);if(this.#a=e,this.#u=p,this.maxEntrySize=m||this.#u,this.sizeCalculation=v,this.sizeCalculation){if(!this.#u&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(b!==void 0&&typeof b!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#z=b,y!==void 0&&typeof y!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#L=y,this.#A=!!y,this.#i=new Map,this.#n=Array.from({length:e}).fill(void 0),this.#t=Array.from({length:e}).fill(void 0),this.#h=new I(e),this.#f=new I(e),this.#c=0,this.#r=0,this.#v=$n.create(e),this.#s=0,this.#w=0,typeof h=="function"&&(this.#g=h),typeof l=="function"&&(this.#D=l),typeof u=="function"?(this.#y=u,this.#o=[]):(this.#y=void 0,this.#o=void 0),this.#S=!!this.#g,this.#N=!!this.#D,this.#l=!!this.#y,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!x,this.allowStaleOnFetchRejection=!!C,this.allowStaleOnFetchAbort=!!S,this.ignoreFetchAbort=!!D,this.maxEntrySize!==0){if(this.#u!==0&&!De(this.#u))throw new TypeError("maxSize must be a positive integer if specified");if(!De(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#H()}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!w,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=De(s)||s===0?s:1,this.ttlAutopurge=!!r,this.ttl=i||0,this.ttl){if(!De(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#V()}if(this.#a===0&&this.ttl===0&&this.#u===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#a&&!this.#u){const F="LRU_CACHE_UNBOUNDED";wg(F)&&(Jh.add(F),bg("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",F,lo))}}getRemainingTTL(t){return this.#i.has(t)?1/0:0}#V(){const t=new ds(this.#a),e=new ds(this.#a);this.#d=t,this.#_=e;const i=this.ttlAutopurge?Array.from({length:this.#a}):void 0;this.#m=i,this.#Y=(a,c,h=this.#b.now())=>{e[a]=c!==0?h:0,t[a]=c,s(a,c)},this.#I=a=>{e[a]=t[a]!==0?this.#b.now():0,s(a,t[a])};const s=this.ttlAutopurge?(a,c)=>{if(i?.[a]&&(clearTimeout(i[a]),i[a]=void 0),c&&c!==0&&i){const h=setTimeout(()=>{this.#p(a)&&this.#T(this.#n[a],"expire")},c+1);h.unref&&h.unref(),i[a]=h}}:()=>{};this.#P=(a,c)=>{if(t[c]){const h=t[c],l=e[c];if(!h||!l)return;a.ttl=h,a.start=l,a.now=r||o();const u=a.now-l;a.remainingTTL=h-u}};let r=0;const o=()=>{const a=this.#b.now();if(this.ttlResolution>0){r=a;const c=setTimeout(()=>r=0,this.ttlResolution);c.unref&&c.unref()}return a};this.getRemainingTTL=a=>{const c=this.#i.get(a);if(c===void 0)return 0;const h=t[c],l=e[c];if(!h||!l)return 1/0;const u=(r||o())-l;return h-u},this.#p=a=>{const c=e[a],h=t[a];return!!h&&!!c&&(r||o())-c>h}}#I=()=>{};#P=()=>{};#Y=()=>{};#p=()=>!1;#H(){const t=new ds(this.#a);this.#w=0,this.#x=t,this.#O=e=>{this.#w-=t[e],t[e]=0},this.#$=(e,i,s,r)=>{if(this.#e(i))return 0;if(!De(s))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(s=r(i,e),!De(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s||0},this.#F=(e,i,s)=>{if(t[e]=i,this.#u){const r=this.#u-t[e];for(;this.#w>r;)this.#B(!0)}this.#w+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#w)}}#O=t=>{};#F=(t,e,i)=>{};#$=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#C({allowStale:t=this.allowStale}={}){if(this.#s)for(let e=this.#r;this.#G(e)&&((t||!this.#p(e))&&(yield e),e!==this.#c);)e=this.#f[e]}*#E({allowStale:t=this.allowStale}={}){if(this.#s)for(let e=this.#c;this.#G(e)&&((t||!this.#p(e))&&(yield e),e!==this.#r);)e=this.#h[e]}#G(t){return t!==void 0&&this.#i.get(this.#n[t])===t}*entries(){for(const t of this.#C())this.#t[t]!==void 0&&this.#n[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#n[t],this.#t[t]])}*rentries(){for(const t of this.#E())this.#t[t]!==void 0&&this.#n[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#n[t],this.#t[t]])}*keys(){for(const t of this.#C()){const e=this.#n[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*rkeys(){for(const t of this.#E()){const e=this.#n[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*values(){for(const t of this.#C())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}*rvalues(){for(const t of this.#E())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(const i of this.#C()){const s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;if(r!==void 0&&t(r,this.#n[i],this))return this.#k(this.#n[i],e)}}forEach(t,e=this){for(const i of this.#C()){const s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;r!==void 0&&t.call(e,r,this.#n[i],this)}}rforEach(t,e=this){for(const i of this.#E()){const s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;r!==void 0&&t.call(e,r,this.#n[i],this)}}purgeStale(){let t=!1;for(const e of this.#E({allowStale:!0}))this.#p(e)&&(this.#T(this.#n[e],"expire"),t=!0);return t}info(t){const e=this.#i.get(t);if(e===void 0)return;const i=this.#t[e],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;const r={value:s};if(this.#d&&this.#_){const o=this.#d[e],a=this.#_[e];if(o&&a){const c=o-(this.#b.now()-a);r.ttl=c,r.start=Date.now()}}return this.#x&&(r.size=this.#x[e]),r}dump(){const t=[];for(const e of this.#C({allowStale:!0})){const i=this.#n[e],s=this.#t[e],r=this.#e(s)?s.__staleWhileFetching:s;if(r===void 0||i===void 0)continue;const o={value:r};if(this.#d&&this.#_){o.ttl=this.#d[e];const a=this.#b.now()-this.#_[e];o.start=Math.floor(Date.now()-a)}this.#x&&(o.size=this.#x[e]),t.unshift([i,o])}return t}load(t){this.clear();for(const[e,i]of t){if(i.start){const s=Date.now()-i.start;i.start=this.#b.now()-s}this.#M(e,i.value,i)}}set(t,e,i={}){const{status:s=void 0}=i;return i.status=s,s&&(s.op="set",s.key=t,e!==void 0&&(s.value=e)),this.#M(t,e,i)}#M(t,e,i={}){const{ttl:s=this.ttl,start:r,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:c}=i;if(e===void 0)return c&&(c.set="deleted"),this.delete(t),this;let{noUpdateTTL:h=this.noUpdateTTL}=i;c&&!this.#e(e)&&(c.value=e);const l=this.#$(t,e,i.size||0,a,c);if(this.maxEntrySize&&l>this.maxEntrySize)return this.#T(t,"set"),c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this;let u=this.#s===0?void 0:this.#i.get(t);if(u===void 0)u=this.#s===0?this.#r:this.#v.length!==0?this.#v.pop():this.#s===this.#a?this.#B(!1):this.#s,this.#n[u]=t,this.#t[u]=e,this.#i.set(t,u),this.#h[this.#r]=u,this.#f[u]=this.#r,this.#r=u,this.#s++,this.#F(u,l,c),c&&(c.set="add"),h=!1,this.#N&&this.#D?.(e,t,"add");else{this.#R(u);const d=this.#t[u];if(e!==d){if(this.#A&&this.#e(d)){d.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:f}=d;f!==void 0&&!o&&(this.#S&&this.#g?.(f,t,"set"),this.#l&&this.#o?.push([f,t,"set"]))}else o||(this.#S&&this.#g?.(d,t,"set"),this.#l&&this.#o?.push([d,t,"set"]));if(this.#O(u),this.#F(u,l,c),this.#t[u]=e,c){c.set="replace";const f=d&&this.#e(d)?d.__staleWhileFetching:d;f!==void 0&&(c.oldValue=f)}}else c&&(c.set="update");this.#N&&this.onInsert?.(e,t,e===d?"update":"replace")}if(s!==0&&!this.#d&&this.#V(),this.#d&&(h||this.#Y(u,s,r),c&&this.#P(c,u)),!o&&this.#l&&this.#o){const d=this.#o;let f;for(;f=d?.shift();)this.#y?.(...f)}return this}pop(){try{for(;this.#s;){const t=this.#t[this.#c];if(this.#B(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#l&&this.#o){const t=this.#o;let e;for(;e=t?.shift();)this.#y?.(...e)}}}#B(t){const e=this.#c,i=this.#n[e],s=this.#t[e];return this.#A&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#S||this.#l)&&(this.#S&&this.#g?.(s,i,"evict"),this.#l&&this.#o?.push([s,i,"evict"])),this.#O(e),this.#m?.[e]&&(clearTimeout(this.#m[e]),this.#m[e]=void 0),t&&(this.#n[e]=void 0,this.#t[e]=void 0,this.#v.push(e)),this.#s===1?(this.#c=this.#r=0,this.#v.length=0):this.#c=this.#h[e],this.#i.delete(i),this.#s--,e}has(t,e={}){const{status:i=void 0}=e;return e.status=i,i&&(i.op="has",i.key=t),this.#q(t,e)}#q(t,e={}){const{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,r=this.#i.get(t);if(r!==void 0){const o=this.#t[r];if(this.#e(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#p(r))s&&(s.has="stale",this.#P(s,r));else return i&&this.#I(r),s&&(s.has="hit",this.#P(s,r)),!0}else s&&(s.has="miss");return!1}peek(t,e={}){const{status:i=void 0}=e;return i&&(i.op="peek",i.key=t),e.status=i,this.#J(t,e)}#J(t,e){const{status:i,allowStale:s=this.allowStale}=e,r=this.#i.get(t);if(r===void 0||!s&&this.#p(r)){i&&(i.peek=r===void 0?"miss":"stale");return}const o=this.#t[r],a=this.#e(o)?o.__staleWhileFetching:o;return i&&(a!==void 0?(i.peek="hit",i.value=a):i.peek="miss"),a}#U(t,e,i,s){const r=e===void 0?void 0:this.#t[e];if(this.#e(r))return r;const o=new AbortController,{signal:a}=i;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});const c={signal:o.signal,options:i,context:s},h=(m,v=!1)=>{const{aborted:y}=o.signal,b=i.ignoreFetchAbort&&m!==void 0,x=i.ignoreFetchAbort||!!(i.allowStaleOnFetchAbort&&m!==void 0);if(i.status&&(y&&!v?(i.status.fetchAborted=!0,i.status.fetchError=o.signal.reason,b&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),y&&!b&&!v)return u(o.signal.reason,x);const w=f,C=this.#t[e];return(C===f||C===void 0&&b&&v)&&(m===void 0?w.__staleWhileFetching!==void 0?this.#t[e]=w.__staleWhileFetching:this.#T(t,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.#M(t,m,c.options))),m},l=m=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=m),u(m,!1)),u=(m,v)=>{const{aborted:y}=o.signal,b=y&&i.allowStaleOnFetchAbort,x=b||i.allowStaleOnFetchRejection,w=x||i.noDeleteOnFetchRejection,C=f;if(this.#t[e]===f&&(!w||!v&&C.__staleWhileFetching===void 0?this.#T(t,"fetch"):b||(this.#t[e]=C.__staleWhileFetching)),x)return i.status&&C.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),C.__staleWhileFetching;if(C.__returned===C)throw m},d=(m,v)=>{const y=this.#L?.(t,r,c);y&&y instanceof Promise&&y.then(b=>m(b===void 0?void 0:b),v),o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(m(void 0),i.allowStaleOnFetchAbort&&(m=b=>h(b,!0)))})};i.status&&(i.status.fetchDispatched=!0);const f=new Promise(d).then(h,l),p=Object.assign(f,{__abortController:o,__staleWhileFetching:r,__returned:void 0});return e===void 0?(this.#M(t,p,{...c.options,status:void 0}),e=this.#i.get(t)):this.#t[e]=p,p}#e(t){if(!this.#A)return!1;const e=t;return!!e&&e instanceof Promise&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&e.__abortController instanceof AbortController}fetch(t,e={}){const{status:i=void 0}=e;return e.status=i,i&&e.context&&(i.context=e.context),this.#X(t,e)}async#X(t,e={}){const{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:c=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:m,forceRefresh:v=!1,status:y,signal:b}=e;if(y&&(y.op="fetch",y.key=t,v&&(y.forceRefresh=!0)),!this.#A)return y&&(y.fetch="get"),this.#k(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,status:y});const x={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:a,size:c,sizeCalculation:h,noUpdateTTL:l,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:p,ignoreFetchAbort:f,status:y,signal:b},w=this.#i.get(t);if(w===void 0){y&&(y.fetch="miss");const C=this.#U(t,w,x,m);return C.__returned=C}else{const C=this.#t[w];if(this.#e(C)){const I=i&&C.__staleWhileFetching!==void 0;return y&&(y.fetch="inflight",I&&(y.returnedStale=!0)),I?C.__staleWhileFetching:C.__returned=C}const S=this.#p(w);if(!v&&!S)return y&&(y.fetch="hit"),this.#R(w),s&&this.#I(w),y&&this.#P(y,w),C;const D=this.#U(t,w,x,m),L=D.__staleWhileFetching!==void 0&&i;return y&&(y.fetch=S?"stale":"refresh",L&&S&&(y.returnedStale=!0)),L?D.__staleWhileFetching:D.__returned=D}}forceFetch(t,e={}){const{status:i=void 0}=e;return e.status=i,i&&e.context&&(i.context=e.context),this.#K(t,e)}async#K(t,e={}){const i=await this.#X(t,e);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,e={}){const{status:i=void 0}=e;e.status=i,i&&(i.op="memo",i.key=t,e.context&&(i.context=e.context));const s=this.#Z(t,e);return i&&(i.value=s),s}#Z(t,e={}){const i=this.#z;if(!i)throw new Error("no memoMethod provided to constructor");const{context:s,status:r,forceRefresh:o,...a}=e;r&&o&&(r.forceRefresh=!0);const c=this.#k(t,a),h=o||c===void 0;if(r&&(r.memo=h?"miss":"hit",h||(r.value=c)),!h)return c;const l=i(t,c,{options:a,context:s});return r&&(r.value=l),this.#M(t,l,a),l}get(t,e={}){const{status:i=void 0}=e;e.status=i,i&&(i.op="get",i.key=t);const s=this.#k(t,e);return i&&s!==void 0&&(i.value=s),s}#k(t,e={}){const{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=e,a=this.#i.get(t);if(a===void 0){o&&(o.get="miss");return}const c=this.#t[a],h=this.#e(c);return o&&this.#P(o,a),this.#p(a)?h?(o&&(o.get="stale-fetching"),i&&c.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),c.__staleWhileFetching):void 0):(r||this.#T(t,"expire"),o&&(o.get="stale"),i?(o&&(o.returnedStale=!0),c):void 0):(o&&(o.get=h?"fetching":"hit"),this.#R(a),s&&this.#I(a),h?c.__staleWhileFetching:c)}#j(t,e){this.#f[e]=t,this.#h[t]=e}#R(t){t!==this.#r&&(t===this.#c?this.#c=this.#h[t]:this.#j(this.#f[t],this.#h[t]),this.#j(this.#r,t),this.#r=t)}delete(t){return this.#T(t,"delete")}#T(t,e){let i=!1;if(this.#s!==0){const s=this.#i.get(t);if(s!==void 0)if(this.#m?.[s]&&(clearTimeout(this.#m?.[s]),this.#m[s]=void 0),i=!0,this.#s===1)this.#W(e);else{this.#O(s);const r=this.#t[s];if(this.#e(r)?r.__abortController.abort(new Error("deleted")):(this.#S||this.#l)&&(this.#S&&this.#g?.(r,t,e),this.#l&&this.#o?.push([r,t,e])),this.#i.delete(t),this.#n[s]=void 0,this.#t[s]=void 0,s===this.#r)this.#r=this.#f[s];else if(s===this.#c)this.#c=this.#h[s];else{const o=this.#f[s];this.#h[o]=this.#h[s];const a=this.#h[s];this.#f[a]=this.#f[s]}this.#s--,this.#v.push(s)}}if(this.#l&&this.#o?.length){const s=this.#o;let r;for(;r=s?.shift();)this.#y?.(...r)}return i}clear(){return this.#W("delete")}#W(t){for(const e of this.#E({allowStale:!0})){const i=this.#t[e];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else{const s=this.#n[e];this.#S&&this.#g?.(i,s,t),this.#l&&this.#o?.push([i,s,t])}}if(this.#i.clear(),this.#t.fill(void 0),this.#n.fill(void 0),this.#d&&this.#_){this.#d.fill(0),this.#_.fill(0);for(const e of this.#m??[])e!==void 0&&clearTimeout(e);this.#m?.fill(void 0)}if(this.#x&&this.#x.fill(0),this.#c=0,this.#r=0,this.#v.length=0,this.#w=0,this.#s=0,this.#l&&this.#o){const e=this.#o;let i;for(;i=e?.shift();)this.#y?.(...i)}}}class uo{data;expirationMap=new Map;immortalKeys=new Set;expirations=Object.create(null);ttl;max;updateAgeOnGet;checkAgeOnGet;updateAgeOnHas;checkAgeOnHas;noUpdateTTL;dispose;noDisposeOnSet;timer;timerExpiration;constructor({ttl:t=1/0,max:e=1/0,updateAgeOnGet:i=!1,checkAgeOnGet:s=!1,updateAgeOnHas:r=!1,checkAgeOnHas:o=!1,noUpdateTTL:a=!1,dispose:c,noDisposeOnSet:h=!1}={},l=new Map){if(t!==void 0&&!ao(t))throw new TypeError("ttl must be positive integer or Infinity if set");if(!ao(e))throw new TypeError("max must be positive integer or Infinity");if(this.data=l,this.ttl=t,this.max=e,this.updateAgeOnGet=!!i,this.checkAgeOnGet=!!s,this.updateAgeOnHas=!!r,this.checkAgeOnHas=!!o,this.noUpdateTTL=!!a,this.noDisposeOnSet=!!h,c!==void 0){if(typeof c!="function")throw new TypeError("dispose must be function if set");this.dispose=c}else this.dispose=(u,d,f)=>{};this.timer=void 0,this.timerExpiration=void 0}get size(){return this.data.size}setTimer(t,e){if(this.timerExpiration&&this.timerExpiration<t)return;this.timer&&clearTimeout(this.timer);const i=setTimeout(()=>{this.timer=void 0,this.timerExpiration=void 0,this.purgeStale();for(const s in this.expirations){const r=Number(s);this.setTimer(r,r-lt());break}},Math.min(Hp,Math.max(0,e)));i.unref&&i.unref(),this.timerExpiration=t,this.timer=i}cancelTimer(){this.timer&&(clearTimeout(this.timer),this.timerExpiration=void 0,this.timer=void 0)}clear(){const t=this.dispose!==uo.prototype.dispose?[...this]:[];this.data.clear(),this.expirationMap.clear(),this.cancelTimer(),this.expirations=Object.create(null);for(const[e,i]of t)this.dispose(i,e,"delete")}setTTL(t,e=this.ttl){const i=this.expirationMap.get(t);if(i!==void 0){const s=this.expirations[i];!s||s.length<=1?delete this.expirations[i]:this.expirations[i]=s.filter(r=>r!==t)}if(e&&e!==1/0){this.immortalKeys.delete(t);const s=Math.floor(lt()+e);this.expirationMap.set(t,s),this.expirations[s]||(this.expirations[s]=[],this.setTimer(s,e)),this.expirations[s].push(t)}else this.immortalKeys.add(t),this.expirationMap.set(t,1/0)}set(t,e,{ttl:i=this.ttl,noUpdateTTL:s=this.noUpdateTTL,noDisposeOnSet:r=this.noDisposeOnSet}={}){if(!ao(i))throw new TypeError("ttl must be positive integer or Infinity");if(this.expirationMap.has(t)){s||this.setTTL(t,i);const o=this.data.get(t),a=!r&&this.data.has(t);o!==e&&(this.data.set(t,e),a&&this.dispose(o,t,"set"))}else this.setTTL(t,i),this.data.set(t,e);for(;this.size>this.max;)this.purgeToCapacity();return this}has(t,{checkAgeOnHas:e=this.checkAgeOnHas,ttl:i=this.ttl,updateAgeOnHas:s=this.updateAgeOnHas}={}){return this.data.has(t)?e&&this.getRemainingTTL(t)===0?(this.delete(t),!1):(s&&this.setTTL(t,i),!0):!1}getRemainingTTL(t){const e=this.expirationMap.get(t);return e===1/0?1/0:e!==void 0?Math.max(0,Math.ceil(e-lt())):0}get(t,{updateAgeOnGet:e=this.updateAgeOnGet,ttl:i=this.ttl,checkAgeOnGet:s=this.checkAgeOnGet}={}){const r=this.data.get(t);if(s&&this.getRemainingTTL(t)===0){this.delete(t);return}return e&&this.setTTL(t,i),r}delete(t){const e=this.expirationMap.get(t);if(e!==void 0){const i=this.data.get(t);this.data.delete(t),this.expirationMap.delete(t),this.immortalKeys.delete(t);const s=this.expirations[e];return s&&(s.length<=1?delete this.expirations[e]:this.expirations[e]=s.filter(r=>r!==t)),this.dispose(i,t,"delete"),this.size===0&&this.cancelTimer(),!0}return!1}purgeToCapacity(){if(!(this.size<=this.max))for(const t in this.expirations){const e=this.expirations[t];if(this.size-e.length>=this.max){delete this.expirations[t];const i=[];for(const s of e)i.push([s,this.data.get(s)]),this.data.delete(s),this.expirationMap.delete(s);for(const[s,r]of i)this.dispose(r,s,"evict")}else{const i=this.size-this.max,s=[];for(const r of e.splice(0,i))s.push([r,this.data.get(r)]),this.data.delete(r),this.expirationMap.delete(r);for(const[r,o]of s)this.dispose(o,r,"evict")}}}purgeStale(){const t=Math.ceil(lt());for(const e in this.expirations){if(e==="Infinity"||Number(e)>t)return;const i=[...this.expirations[e]||[]],s=[];delete this.expirations[e];for(const r of i)s.push([r,this.data.get(r)]),this.data.delete(r),this.expirationMap.delete(r);for(const[r,o]of s)this.dispose(o,r,"expire")}this.size===0&&this.cancelTimer()}*entries(){for(const t in this.expirations)for(const e of this.expirations[t])yield[e,this.data.get(e)];for(const t of this.immortalKeys)yield[t,this.data.get(t)]}*keys(){for(const t in this.expirations)for(const e of this.expirations[t])yield e;for(const t of this.immortalKeys)yield t}*values(){for(const t in this.expirations)for(const e of this.expirations[t])yield this.data.get(e);for(const t of this.immortalKeys)yield this.data.get(t)}[Symbol.iterator](){return this.entries()}firstKey(){return this.keys().next().value}}const vn={branch:"├",lastBranch:"└",line:"│",empty:" "};function ps(n,t={}){const{showValues:e=!0,hideFunctions:i=!1,lineBreak:s=`\r
|
|
11
|
+
`,maxDeep:r}=t,o=[],a=new WeakSet;function c(l,u="",d=0){if(typeof l=="string"){o.push(u+'"'+l+'"');return}if(typeof l!="object"||l===null){e&&o.push(u+String(l));return}if(r&&d>=r){Array.isArray(n)?o.push("[...OverMaxDeep]"):o.push("{...OverMaxDeep}");return}if(a.has(l)){o.push(u+"[Circular]");return}a.add(l);const f=Object.keys(l).filter(p=>!(i&&typeof l[p]=="function"));f.forEach((p,m)=>{const v=l[p],y=m===f.length-1,b=d===0&&m===0?"":u,x=y?vn.lastBranch:vn.branch,w=p.trim()===""?"":p;let C=b+x+(w?" "+w:"");const S=p.trim()!=="";if(v&&typeof v=="object"&&a.has(v))o.push(C+(S?": ":C?" ":"")+"[Circular]");else if(v&&typeof v=="object"&&!Array.isArray(v)){o.push(C);const D=y?vn.empty:vn.line,L=b+D+" ";c(v,L,d+1)}else if(Array.isArray(v)){o.push(C+(S?": ":C?" ":"")+"[Array("+v.length+")]");const D=y?vn.empty:vn.line,L=b+D+" ";c(v,L,d+1)}else if(e){const D=typeof v=="function"?"[Function]":typeof v=="string"?'"'+String(v)+'"':String(v);C+=(S?": ":C?" ":"")+D,o.push(C)}else o.push(C)})}const h=Object.keys(n);if(h.length===0)return"(empty)";if(h.length===1&&h[0]!==void 0&&h[0].trim()===""&&typeof n[h[0]]=="string"){const l=h[0],u=vn.lastBranch,d=n[l],f=typeof d=="function"?"[Function]":typeof d=="string"?'"'+d+'"':String(d);return u+" "+f}return c(n),s+o.join(s)}function Kh(n="verbose"){let t=-1;switch(n){case"verbose":t=0;break;case"debug":t=1;break;case"info":t=2;break;case"warn":t=3;break;case"error":t=4;break}return t}function vg(n="verbose"){V.OPEN_LOG_LEVEL=Kh(n)}function Zh(){V.OPEN_LOG_LEVEL=-1}function xg(n){V.LOG_UPLOAD_FN=n}Zh();function ui(n="verbose"){return V.OPEN_LOG_LEVEL<=Kh(n)}function fo(n){V.LOG_UPLOAD_FN&&V.LOG_UPLOAD_FN(n)}function Je(n,t=""){try{if(fo({level:"info",msg:n,type:t}),!ui("info"))return;console.log(n)}catch{}}function re(n,t=""){try{if(fo({level:"warn",msg:n,type:t}),!ui("warn"))return;console.warn(n)}catch{}}function _g(n,t=""){try{if(fo({level:"error",msg:n,type:t}),!ui("error"))return;console.error(n)}catch{}}const Qh={start:n=>{ui("verbose")&&(!console||typeof console!="object"||typeof console.groupCollapsed!="function"||console.groupCollapsed(n))},end:()=>{!console||typeof console!="object"||typeof console.groupEnd!="function"||console.groupEnd()}},tl={start:n=>{ui("verbose")&&(!console||typeof console!="object"||typeof console.time!="function"||console.time(n))},end:n=>{!console||typeof console!="object"||typeof console.timeEnd!="function"||console.timeEnd(n)}};function gs(n){if(typeof MessageChannel<"u"&&(Bh(MessageChannel)||MessageChannel.toString()==="[object MessageChannelConstructor]")){const{port1:t,port2:e}=new MessageChannel;t.onmessage=()=>{t.onmessage=null,n()},e.postMessage(null)}else setTimeout(n,0)}async function Sg(){return new Promise(n=>{gs(n)})}if(V.requestAnimationFrame=V.requestAnimationFrame||V.webkitRequestAnimationFrame||V.mozRequestAnimationFrame||V.oRequestAnimationFrame||V.msRequestAnimationFrame,V.cancelAnimationFrame=V.cancelAnimationFrame||V.webkitCancelAnimationFrame||V.mozCancelAnimationFrame||V.oCancelAnimationFrame||V.msCancelAnimationFrame,!V.requestAnimationFrame){let n=lt();V.requestAnimationFrame=t=>{const e=lt(),i=Math.max(0,16-(e-n)),s=V.setTimeout(()=>{t(e+i)},i);return n=e+i,s}}V.cancelAnimationFrame||(V.cancelAnimationFrame=n=>{V.clearTimeout(n)});const ys=V.requestAnimationFrame,Cg=V.cancelAnimationFrame;function Eg(n){let t=!0,e=ys(function i(s){t&&n(s)&&(e=ys(i))});return()=>{t=!1,Cg(e)}}V.requestIdleCallback=V.requestIdleCallback||function(n,t){const e=lt();return setTimeout(()=>{const i=lt()-e,s={didTimeout:typeof t?.timeout!="number"?!1:i>t.timeout,timeRemaining:()=>Math.max(0,50-i)};n(s)},t?.timeout)},V.cancelIdleCallback=V.cancelIdleCallback||function(n){clearTimeout(n)},V.requestIdleCallback,V.cancelIdleCallback;let fi=33,Ie=33,bs=0,di=0,mo=!1;function el(n){mo||(mo=!0,ys(t=>{mo=!1,bs=t,di===0&&(di=bs+Ie);let e=Ie+bs-di;e<Ie&&fi<Ie?(e<8&&(e=8),Ie=Math.max(e,fi)):e>Ie&&fi>Ie&&(Ie=Math.min(e,fi)),fi=e,di=bs+Ie,gs(()=>{n(di),el(n)})}))}function po(n){const t=n?.maxIterations||1e4,e=!!n?.tracing,i=n?.onTrace||(f=>{const p=" ".repeat(f.depth);console.log(`${p}emit#${f.id} parent=${f.parentId} source=${f.source}`)}),s=[];let r=0,o=0;const a=new Set,c=f=>(a.add(f),()=>{a.delete(f)});let h;function l(f,p){const m=h,v={id:String(++r),dataset:f,source:p,createdAt:lt(),parentId:m?.id,depth:m?m.depth+1:0};s.push(v)}let u=!1;function d(){if(u)return;u=!0;let f=0;try{for(;o<s.length;){if(++f>t)throw new Error("Possible infinite signal loop detected");const p=s[o],m=h;h=p,e&&i(p);const v=Array.from(a);for(const y of v)try{y(...p.dataset)}catch(b){gs(()=>{throw b})}h=m,o++}}finally{u=!1,o>=s.length&&(s.length=0,o=0)}}return{subscribe:c,once(f){const p=c((...m)=>{p(),f(...m)});return p},emit(...f){l(f),d()},emitFrom(f,...p){l(p,f),d()},clear(){a.clear()}}}function Tg(n={}){const{concurrency:t=1/0,maxWorkerRunTime:e=6e4}=n;let i=1/0;const s=()=>i===1/0||lt()<i,r=I=>{i=lt()+I,h()};let o=s()?0:1;const a=()=>o>0,c=()=>{o++},h=()=>{o>0&&o--,D()},l=()=>!a()&&!s(),u=async()=>{l()&&await Sg()};let d=0,f=[];const p=new Set,m=new Set;let v=0,y=[],b=[];const x=()=>{v===0&&(y.forEach(I=>I()),y=[],f.length===0&&(b.forEach(I=>I()),b=[]))},w=I=>{if(I.signal){if(I.signal.aborted)return I.resultReject("Cancel by Aborted!"),I;I.abortHandler=()=>{I.resultReject("Cancel by Abort!"),f=f.filter(F=>F.id!==I.id),x()},I.signal.addEventListener("abort",I.abortHandler,{once:!0})}if(f.filter(F=>I.invalidates?.includes(F.id)).forEach(F=>{F.resultReject("Cancel by invalidates!")}),f=f.filter(F=>!I.invalidates?.includes(F.id)),I.fold){const F=f.findIndex(U=>U.id===I.id);if(F!==-1){const U=f[F],X=I.fold(U,I);return U.dataset=X.dataset,U}else return f.push(I),I}else return f.push(I),I},C=()=>{if(f.length===0)return;let I=-1,F;for(let U=0,X=f.length;U<X;U++){const Z=f[U];(!F||Z.niceness<F.niceness)&&(I=U,F=Z)}return f.splice(I,1),F};let S=!1;const D=()=>{S||a()||(S=!0,gs(()=>{for(S=!1;f.length>0&&m.size>0&&v<t&&!a();){const I=C(),F=Wp(I.deadline)&<()>=I.deadline,U=I.niceness==as.immediate;if(!s()&&!F&&!U){w(I),D();break}if(I.signal?.aborted){I.resultReject("Cancel by Aborted!"),x();continue}v++;const X=m.values().next().value;m.delete(X),pg(qh(Promise.resolve(X(...I.dataset)),e),I.signal).then(Z=>{I.resultResolve(Z)}).catch(Z=>{I.retry>0?(I.retry--,w(I)):I.resultReject(Z)}).finally(async()=>{p.has(X)&&m.add(X),I.signal&&I.abortHandler&&I.signal.removeEventListener("abort",I.abortHandler),v--,x(),D()})}}))},L=I=>(p.add(I),m.add(I),D(),()=>{p.delete(I),m.delete(I)});return{put(...I){const F=I[I.length-1]||{};let U={};("niceness"in F||"deadline"in F||"retry"in F||"signal"in F||"invalidates"in F||"fold"in F)&&(U=I.pop());const X=dg(),Z=w({id:String(++d),dataset:I,createdAt:lt(),result:X.promise,resultResolve:X.resolve,resultReject:X.reject,niceness:U.niceness??as.normal,deadline:U.deadline??io,retry:U.retry??0,signal:U.signal});return D(),Z},cancel(I){f=f.filter(F=>F.id!==I.id),I.signal&&I.abortHandler&&I.signal.removeEventListener("abort",I.abortHandler),x()},clear(){for(const I of f)I.signal&&I.abortHandler&&I.signal.removeEventListener("abort",I.abortHandler),I.resultReject(new Error("Cleared"));f.length=0,x()},run:L,once(I){const F=L((...U)=>{try{return I(...U)}finally{F()}});return F},async onDrain(){if(!(v===0&&f.length===0))return new Promise(I=>{b.push(I)})},async onIdle(){if(v!==0)return new Promise(I=>{y.push(I)})},pause:c,resume:h,get paused(){return a()},startFrame:r,yieldIfNeeded:u}}class Pg{pool;concurrency;maxWorkerRunTime;constructor(t={concurrency:1}){this.concurrency=t.concurrency??1,this.maxWorkerRunTime=t.maxWorkerRunTime??6e4,this.pool=Tg({concurrency:this.concurrency,maxWorkerRunTime:this.maxWorkerRunTime});for(let e=0;e<this.concurrency;e++)this.pool.run(async function(i){return await i()})}cancel(t){this.pool.cancel(t)}clear(){this.pool.clear()}get paused(){return this.pool.paused}startFrame(t){this.pool.startFrame(t)}async immediate(t){try{return this.pool.pause(),await this.pool.onIdle(),await qh(Promise.resolve(t()),this.maxWorkerRunTime)}finally{this.pool.resume()}}asap(t,e){return this.pool.put(t,{niceness:e?.niceness??as.normal,deadline:typeof e?.timeout=="number"?lt()+e?.timeout:io})}}class Ag{pool;started=!1;constructor(t={concurrency:1}){this.pool=new Pg(t),this.pool.startFrame(0)}clear(){this.pool.clear()}start(){this.started||(this.started=!0,el(t=>{this.pool.startFrame(t-lt())}))}async idle(t,e){return this.start(),await this.pool.asap(t,{niceness:as.idle,timeout:e}).result}}const nl=new Ag,Mg=nl.idle.bind(nl);class go{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,i){return this.events[t]||(this.events[t]=[]),this.events[t].unshift(i?e.bind(i):e),this}addListener(t,e,i){return this.events[t]||(this.events[t]=[]),this.events[t].push(i?e.bind(i):e),this}on(t,e,i){return this.addListener(t,e,i),this}removeListener(t,e){return this.events[t]&&(this.events[t]=this.events[t].filter(i=>i!==e)),this}off(t,e){return this.removeListener(t,e),this}removeAllListeners(t){return t?this.events[t]=[]:this.events={},this}emit(t,...e){return this.events[t]&&this.events[t].slice(0).forEach(i=>{i(...e)}),this}once(t,e,i){const s=(...r)=>{i?e.apply(i,r):e(...r),this.off(t,s)};return this.on(t,s),this}}var yo=function(n,t){return yo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])},yo(n,t)};function bo(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");yo(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function il(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],i=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&i>=n.length&&(n=void 0),{value:n&&n[i++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function wo(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var i=e.call(n),s,r=[],o;try{for(;(t===void 0||t-- >0)&&!(s=i.next()).done;)r.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return r}function vo(n,t,e){if(e||arguments.length===2)for(var i=0,s=t.length,r;i<s;i++)(r||!(i in t))&&(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return n.concat(r||Array.prototype.slice.call(t))}function Oe(n){return typeof n=="function"}function Dg(n){var t=function(i){Error.call(i),i.stack=new Error().stack},e=n(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var xo=Dg(function(n){return function(t){n(this),this.message=t?t.length+` errors occurred during unsubscription:
|
|
12
12
|
`+t.map(function(e,i){return i+1+") "+e.toString()}).join(`
|
|
13
|
-
`):"",this.name="UnsubscriptionError",this.errors=t}});function nl(n,t){if(n){var e=n.indexOf(t);0<=e&&n.splice(e,1)}}var xo=function(){function n(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var t,e,i,s,r;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=el(o),c=a.next();!c.done;c=a.next()){var h=c.value;h.remove(this)}}catch(m){t={error:m}}finally{try{c&&!c.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var l=this.initialTeardown;if(Oe(l))try{l()}catch(m){r=m instanceof vo?m.errors:[m]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var d=el(u),f=d.next();!f.done;f=d.next()){var p=f.value;try{sl(p)}catch(m){r=r??[],m instanceof vo?r=wo(wo([],bo(r)),bo(m.errors)):r.push(m)}}}catch(m){i={error:m}}finally{try{f&&!f.done&&(s=d.return)&&s.call(d)}finally{if(i)throw i.error}}}if(r)throw new vo(r)}},n.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)sl(t);else{if(t instanceof n){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},n.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},n.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},n.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&nl(e,t)},n.prototype.remove=function(t){var e=this._finalizers;e&&nl(e,t),t instanceof n&&t._removeParent(this)},n.EMPTY=function(){var t=new n;return t.closed=!0,t}(),n}();xo.EMPTY;function il(n){return n instanceof xo||n&&"closed"in n&&Oe(n.remove)&&Oe(n.add)&&Oe(n.unsubscribe)}function sl(n){Oe(n)?n():n.unsubscribe()}var rl={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Pg={setTimeout:function(n,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];return setTimeout.apply(void 0,wo([n,t],bo(e)))},clearTimeout:function(n){return clearTimeout(n)},delegate:void 0};function Ag(n){Pg.setTimeout(function(){throw n})}function ol(){}function Mg(n){n()}var _o=function(n){yo(t,n);function t(e){var i=n.call(this)||this;return i.isStopped=!1,e?(i.destination=e,il(e)&&e.add(i)):i.destination=kg,i}return t.create=function(e,i,s){return new Co(e,i,s)},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,n.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}(xo),Dg=Function.prototype.bind;function So(n,t){return Dg.call(n,t)}var Ig=function(){function n(t){this.partialObserver=t}return n.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(i){ws(i)}},n.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(i){ws(i)}else ws(t)},n.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){ws(e)}},n}(),Co=function(n){yo(t,n);function t(e,i,s){var r=n.call(this)||this,o;if(Oe(e)||!e)o={next:e??void 0,error:i??void 0,complete:s??void 0};else{var a;r&&rl.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return r.unsubscribe()},o={next:e.next&&So(e.next,a),error:e.error&&So(e.error,a),complete:e.complete&&So(e.complete,a)}):o=e}return r.destination=new Ig(o),r}return t}(_o);function ws(n){Ag(n)}function Og(n){throw n}var kg={closed:!0,next:ol,error:Og,complete:ol},Rg=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Lg(n){return n}function zg(n){return n.length===0?Lg:n.length===1?n[0]:function(t){return n.reduce(function(e,i){return i(e)},t)}}(function(){function n(t){t&&(this._subscribe=t)}return n.prototype.lift=function(t){var e=new n;return e.source=this,e.operator=t,e},n.prototype.subscribe=function(t,e,i){var s=this,r=Fg(t)?t:new Co(t,e,i);return Mg(function(){var o=s,a=o.operator,c=o.source;r.add(a?a.call(r,c):c?s._subscribe(r):s._trySubscribe(r))}),r},n.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},n.prototype.forEach=function(t,e){var i=this;return e=al(e),new e(function(s,r){var o=new Co({next:function(a){try{t(a)}catch(c){r(c),o.unsubscribe()}},error:r,complete:s});i.subscribe(o)})},n.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},n.prototype[Rg]=function(){return this},n.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return zg(t)(this)},n.prototype.toPromise=function(t){var e=this;return t=al(t),new t(function(i,s){var r;e.subscribe(function(o){return r=o},function(o){return s(o)},function(){return i(r)})})},n.create=function(t){return new n(t)},n})();function al(n){var t;return(t=n??rl.Promise)!==null&&t!==void 0?t:Promise}function Ng(n){return n&&Oe(n.next)&&Oe(n.error)&&Oe(n.complete)}function Fg(n){return n&&n instanceof _o||Ng(n)&&il(n)}(function(n){yo(t,n);function t(e,i,s,r,o,a){var c=n.call(this,e)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=i?function(h){try{i(h)}catch(l){e.error(l)}}:n.prototype._next,c._error=r?function(h){try{r(h)}catch(l){e.error(l)}finally{this.unsubscribe()}}:n.prototype._error,c._complete=s?function(){try{s()}catch(h){e.error(h)}finally{this.unsubscribe()}}:n.prototype._complete,c}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var i=this.closed;n.prototype.unsubscribe.call(this),!i&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t})(_o);function Bg(){const n=V.navigator?.userAgent,t=n.indexOf("MSIE ");if(t>0)return parseInt(n.substring(t+5,n.indexOf(".",t)),10);if(n.indexOf("Trident/")>0){const i=n.indexOf("rv:");return parseInt(n.substring(i+3,n.indexOf(".",i)),10)}const e=n.indexOf("Edge/");return e>0?parseInt(n.substring(e+5,n.indexOf(".",e)),10):-1}Bg(),V.document&&V.document.documentMode&&V.document.documentMode,V.document&&V.document.documentMode&&V.document.documentMode,V.document&&V.document.documentMode&&V.document.documentMode,!!(V.Worker&&V.Blob&&V.Promise&&V.OffscreenCanvas&&V.OffscreenCanvasRenderingContext2D&&V.HTMLCanvasElement&&V.HTMLCanvasElement.prototype.transferControlToOffscreen&&V.URL&&V.URL.createObjectURL);const Ug=(()=>{if(!V.OffscreenCanvas)return!1;const n=new OffscreenCanvas(1,1),t=n.getContext("2d");if(!t)return!1;t.fillRect(0,0,1,1);const e=n.transferToImageBitmap();try{t.createPattern(e,"no-repeat")}catch{return!1}return!0})(),cl=V.crypto;cl?.subtle;function hl(){try{return cl.randomUUID()}catch{let n=new Date().getTime();return"xxxxxxxx-xxxx-xxxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=(n+Math.random()*16)%16|0;return n=Math.floor(n/16),(t=="x"?e:e&3|8).toString(16)})}}const Vg="\uFEFF";function Yg(n){return n.startsWith(Vg)?n.slice(1):n}function $g(n){try{return{ok:!0,value:JSON.parse(Yg(n))}}catch{return{ok:!1}}}cg($g,{createCache:()=>new ho({max:50}),cacheKeyResolver:n=>n});const Eo=10,ll=(n=0)=>t=>`\x1B[${t+n}m`,ul=(n=0)=>t=>`\x1B[${38+n};5;${t}m`,fl=(n=0)=>(t,e,i)=>`\x1B[${38+n};2;${t};${e};${i}m`,ct={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(ct.modifier);const Gg=Object.keys(ct.color),Xg=Object.keys(ct.bgColor);[...Gg,...Xg];function jg(){const n=new Map;for(const[t,e]of Object.entries(ct)){for(const[i,s]of Object.entries(e))ct[i]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},e[i]=ct[i],n.set(s[0],s[1]);Object.defineProperty(ct,t,{value:e,enumerable:!1})}return Object.defineProperty(ct,"codes",{value:n,enumerable:!1}),ct.color.close="\x1B[39m",ct.bgColor.close="\x1B[49m",ct.color.ansi=ll(),ct.color.ansi256=ul(),ct.color.ansi16m=fl(),ct.bgColor.ansi=ll(Eo),ct.bgColor.ansi256=ul(Eo),ct.bgColor.ansi16m=fl(Eo),Object.defineProperties(ct,{rgbToAnsi256:{value(t,e,i){return t===e&&e===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(e/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(t){const e=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!e)return[0,0,0];let[i]=e;i.length===3&&(i=[...i].map(r=>r+r).join(""));const s=Number.parseInt(i,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:t=>ct.rgbToAnsi256(...ct.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let e,i,s;if(t>=232)e=((t-232)*10+8)/255,i=e,s=e;else{t-=16;const a=t%36;e=Math.floor(t/36)/5,i=Math.floor(a/6)/5,s=a%6/5}const r=Math.max(e,i,s)*2;if(r===0)return 30;let o=30+(Math.round(s)<<2|Math.round(i)<<1|Math.round(e));return r===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,e,i)=>ct.ansi256ToAnsi(ct.rgbToAnsi256(t,e,i)),enumerable:!1},hexToAnsi:{value:t=>ct.ansi256ToAnsi(ct.hexToAnsi256(t)),enumerable:!1}}),ct}const Wg=jg(),Hg=0;new Set(Wg.codes.values()).delete(Hg);const mi={1:"rgb(10,194,210)",2:"rgb(123,183,250)",3:"rgb(96,215,169)",4:"rgb(253,193,98)",5:"rgb(253,106,98)",6:"rgb(246,141,187)",7:"rgb(38,204,255)",8:"rgb(162,90,253)",9:"rgb(255,94,126)",10:"rgb(136,255,90)",11:"rgb(252,255,66)",12:"rgb(255,166,45)",13:"rgb(255,54,255)",14:"rgb(220,73,22)",15:"rgb(104,113,177)",16:"rgb(209,185,53)",17:"rgb(27,188,155)",18:"rgb(255,127,80)",19:"rgb(75,191,195)",20:"rgb(255,153,0)",black:"rgb(0,0,0)",blue:"rgb(0,0,255)",brightblue:"rgb(59,142,234)",terminalblue:"rgb(36,114,200)",red:"rgb(255,0,0)",brightred:"rgb(241,76,76)",terminalred:"rgb(205,49,49)",white:"rgb(255,255,255)",terminalwhite:"rgb(229,229,229)",yellow:"rgb(255,255,0)",brightyellow:"rgb(245,245,67)",terminalyellow:"rgb(229,229,16)",yellowgreen:"rgb(154,205,50)",aliceblue:"rgb(240,248,255)",antiquewhite:"rgb(250,235,215)",aqua:"rgb(0,255,255)",aquamarine:"rgb(127,255,212)",azure:"rgb(240,255,255)",beige:"rgb(245,245,220)",bisque:"rgb(255,228,196)",blanchedalmond:"rgb(255,235,205)",blueviolet:"rgb(138,43,226)",brown:"rgb(165,42,42)",burlywood:"rgb(222,184,135)",cadetblue:"rgb(95,158,160)",chartreuse:"rgb(127,255,0)",chocolate:"rgb(210,105,30)",coral:"rgb(255,127,80)",cornflowerblue:"rgb(100,149,237)",cornsilk:"rgb(255,248,220)",crimson:"rgb(220,20,60)",cyan:"rgb(0,255,255)",brightcyan:"rgb(41,184,219)",terminalcyan:"rgb(17,168,205)",darkblue:"rgb(0,0,139)",darkcyan:"rgb(0,139,139)",darkgoldenrod:"rgb(184,134,11)",darkgray:"rgb(169,169,169)",darkgreen:"rgb(0,100,0)",darkgrey:"rgb(30,30,30)",darkkhaki:"rgb(189,183,107)",darkmagenta:"rgb(139,0,139)",darkolivegreen:"rgb(85,107,47)",darkorange:"rgb(255,140,0)",darkorchid:"rgb(153,50,204)",darkred:"rgb(139,0,0)",darksalmon:"rgb(233,150,122)",darkseagreen:"rgb(143,188,143)",darkslateblue:"rgb(72,61,139)",darkslategray:"rgb(47,79,79)",darkslategrey:"rgb(47,79,79)",darkturquoise:"rgb(0,206,209)",darkviolet:"rgb(148,0,211)",deeppink:"rgb(255,20,147)",deepskyblue:"rgb(0,191,255)",dimgray:"rgb(105,105,105)",dodgerblue:"rgb(30,144,255)",firebrick:"rgb(178,34,34)",floralwhite:"rgb(255,250,240)",forestgreen:"rgb(34,139,34)",fuchsia:"rgb(255,0,255)",gainsboro:"rgb(220,220,220)",ghostwhite:"rgb(248,248,255)",gold:"rgb(255,215,0)",goldenrod:"rgb(218,165,32)",grey:"rgb(128,128,128)",green:"rgb(0,128,0)",brightgreen:"rgb(35,209,139)",terminalgreen:"rgb(13,188,121)",greenyellow:"rgb(173,255,47)",honeydew:"rgb(240,255,240)",hotpink:"rgb(255,105,180)",indianred:"rgb(205,92,92)",indigo:"rgb(75,0,130)",ivory:"rgb(255,255,240)",khaki:"rgb(240,230,140)",lavender:"rgb(230,230,250)",lavenderblush:"rgb(255,240,245)",lawngreen:"rgb(124,252,0)",lemonchiffon:"rgb(255,250,205)",lightblue:"rgb(173,216,230)",lightcoral:"rgb(240,128,128)",lightcyan:"rgb(224,255,255)",lightgoldenrodyellow:"rgb(250,250,210)",lightgreen:"rgb(144,238,144)",lightgrey:"rgb(229,229,229)",lightpink:"rgb(255,182,193)",lightsalmon:"rgb(255,160,122)",lightseagreen:"rgb(32,178,170)",lightskyblue:"rgb(135,206,250)",lightslategray:"rgb(119,136,153)",lightslategrey:"rgb(119,136,153)",lightsteelblue:"rgb(176,196,222)",lightyellow:"rgb(255,255,224)",lime:"rgb(0,255,0)",limegreen:"rgb(50,205,50)",linen:"rgb(250,240,230)",magenta:"rgb(255,0,255)",brightmagenta:"rgb(214,112,214)",terminalmagenta:"rgb(188,63,188)",maroon:"rgb(128,0,0)",mediumaquamarine:"rgb(102,205,170)",mediumblue:"rgb(0,0,205)",mediumorchid:"rgb(186,85,211)",mediumpurple:"rgb(147,112,219)",mediumseagreen:"rgb(60,179,113)",mediumslateblue:"rgb(123,104,238)",mediumspringgreen:"rgb(0,250,154)",mediumturquoise:"rgb(72,209,204)",mediumvioletred:"rgb(199,21,133)",midnightblue:"rgb(25,25,112)",mintcream:"rgb(245,255,250)",mistyrose:"rgb(255,228,225)",moccasin:"rgb(255,228,181)",navajowhite:"rgb(255,222,173)",navy:"rgb(0,0,128)",oldlace:"rgb(253,245,230)",olive:"rgb(128,128,0)",olivedrab:"rgb(107,142,35)",orange:"rgb(255,165,0)",orangered:"rgb(255,69,0)",orchid:"rgb(218,112,214)",palegoldenrod:"rgb(238,232,170)",palegreen:"rgb(152,251,152)",paleturquoise:"rgb(175,238,238)",palevioletred:"rgb(219,112,147)",papayawhip:"rgb(255,239,213)",peachpuff:"rgb(255,218,185)",peru:"rgb(205,133,63)",pink:"rgb(255,192,203)",plum:"rgb(221,160,221)",powderblue:"rgb(176,224,230)",purple:"rgb(128,0,128)",rebeccapurple:"rgb(102,51,153)",rosybrown:"rgb(188,143,143)",royalblue:"rgb(65,105,225)",saddlebrown:"rgb(139,69,19)",salmon:"rgb(250,128,114)",sandybrown:"rgb(244,164,96)",seagreen:"rgb(46,139,87)",seashell:"rgb(255,245,238)",sienna:"rgb(160,82,45)",silver:"rgb(192,192,192)",skyblue:"rgb(135,206,235)",slateblue:"rgb(106,90,205)",slategray:"rgb(112,128,144)",slategrey:"rgb(112,128,144)",snow:"rgb(255,250,250)",springgreen:"rgb(0,255,127)",steelblue:"rgb(70,130,180)",tan:"rgb(210,180,140)",teal:"rgb(0,128,128)",thistle:"rgb(216,191,216)",tomato:"rgb(255,99,71)",turquoise:"rgb(64,224,208)",violet:"rgb(238,130,238)",wheat:"rgb(245,222,179)"},qg=Array.from(Object.values(mi));Object.entries(mi).map(([n,t])=>{const e=t;return{name:n,rgb:e,brightness:Jg(e)}}).sort((n,t)=>n.brightness-t.brightness);function Jg(n){const[t,e,i]=n.replace("rgb(","").replace(")","").split(",").map(Number);return .2126*t+.7152*e+.0722*i}class ue{_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 Set Unknown Error: color(${t}) type(${typeof t})`;if(t instanceof ue)this.setRGB(t.r,t.g,t.b,t.a);else if(typeof t=="number")this.setHEX(t);else if(typeof t=="string"){let i;if(i=/^(\w+)\(([^)]*)\)/.exec(t)){const s=i[2];let r;switch(i[1]){case"rgb":case"rgba":(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))?(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(s))?(this.r=Y(parseFloat(r[1]),0,100)*255/100,this.g=Y(parseFloat(r[2]),0,100)*255/100,this.b=Y(parseFloat(r[3]),0,100)*255/100,this.a=r[4]?parseFloat(r[4]):1):re(e);break;case"hsl":case"hsla":(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)%\s*,\s*(\d*\.?\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))?this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,r[4]?parseFloat(r[4]):1):re(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(s))?this.setHSV(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,r[4]?parseFloat(r[4]):1):re(e);break;default:re(e)}}else if(i=/#([A-Fa-f0-9]+)/.exec(t)){const s=i[1],r=s.length;r===3?this.setRGB(parseInt(s.charAt(0),16),parseInt(s.charAt(1),16),parseInt(s.charAt(2),16),1):r===4?this.setRGB(parseInt(s.charAt(0),16),parseInt(s.charAt(1),16),parseInt(s.charAt(2),16),Y(parseInt(s.charAt(3),16)/16,0,1)):r===6||r===8?this.setHEX(parseInt(s,16)):re(e)}else if(t&&t.length>0)try{this.setColorName(t)}catch{re(e)}else re(e)}else 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):re(e)}setColor(t){return this.color=t,this}set(t){return this.setColor(t)}get r(){return this._color.r}set r(t){this._color.r=Y(Math.round(se(t,this.r)),0,255)}get g(){return this._color.g}set g(t){this._color.g=Y(Math.round(se(t,this.g)),0,255)}get b(){return this._color.b}set b(t){this._color.b=Y(Math.round(se(t,this.b)),0,255)}get a(){return this._color.a}set a(t){this._color.a=Y(se(t,this.a),0,1)}setAlpha(t){return this.a=t,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},${G(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()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b,yield this.a}clone(){return new ue(this.color)}copy(t){return this.setColor(t.color),this}copySRGBToLinear(t){return this.r=Po(t.r),this.g=Po(t.g),this.b=Po(t.b),this}copyLinearToSRGB(t){return this.r=Ao(t.r),this.g=Ao(t.g),this.b=Ao(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",i="#ffffff"){if(t)return this.setColor(this.r*.299+this.g*.587+this.b*.114>186?e:i);{const{r:s,g:r,b:o}=this.color;return this.r=255-s,this.g=255-r,this.b=255-o,this}}closet(t="#000000",e="#ffffff"){return this.opposite(!0,t,e).opposite(!0,t,e)}lighten(t){t=Y(t,0,1);const{r:e,g:i,b:s,a:r}=this.color;return r==0?this.a=t:(this.r=e+(255-e)*t,this.g=i+(255-i)*t,this.b=s+(255-s)*t),this}darken(t){t=Y(t,0,1);const{r:e,g:i,b:s,a:r}=this.color;return r==0?this.a=t:(this.r=e*(1-t),this.g=i*(1-t),this.b=s*(1-t)),this}lerp(t,e){e=Y(e,0,1);const{r:i,g:s,b:r}=this.color;return this.r=i+(t.r-i)*e,this.g=s+(t.g-s)*e,this.b=r+(t.b-r)*e,this}lerpColors(t,e,i){return i=Y(i,0,1),this.r=t.r+(e.r-t.r)*i,this.g=t.g+(e.g-t.g)*i,this.b=t.b+(e.b-t.b)*i,this}static gradient(t,e,i){try{return To.lerpColors(new ue(t),new ue(e),i).toString()}catch{return e}}static random(){return To.setHEX(Math.random()*16777215).toString()}static nextIndex=0;static next(t=ue.nextIndex){ue.nextIndex=t;const e=Object.keys(mi),i=e.length;return To.set(mi[e[ue.nextIndex++%i]]).toString()}setColorName(t){const e=mi[t.toLowerCase()];return e!==void 0?this.set(e):t==="none"?this.a=0:(this.a=1,re("Color.setColorName: Unknown color "+t)),this}setRGB(t,e,i,s=1){return this.r=t,this.g=e,this.b=i,this.a=s,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,i,s=1){const r=Wp(t,1),o=Y(e,0,1),a=Y(i,0,1);if(o===0)this.r=a*255,this.g=a*255,this.b=a*255;else{const c=a<=.5?a*(1+o):a+o-a*o,h=2*a-c;this.r=Mo(h,c,r+1/3)*255,this.g=Mo(h,c,r)*255,this.b=Mo(h,c,r-1/3)*255}return this.a=s,this}getHSL(t){const e=this.r,i=this.g,s=this.b,r=Math.max(e,i,s)/255,o=Math.min(e,i,s)/255;let a,c;const h=(o+r)/2;if(o===r)a=0,c=0;else{const l=r-o;switch(c=h<=.5?l/(r+o):l/(2-r-o),r){case e:a=(i-s)/l+(i<s?6:0);break;case i:a=(s-e)/l+2;break;case s:default:a=(e-i)/l+4;break}a/=6}return t&&t.setHSL(a,c,h,this.a),{h:a,s:c,l:h,a:this.a}}offsetHSL(t,e,i){const s=this.getHSL();return this.setHSL(s.h+t,s.s+e,s.l+i)}lerpHSL(t,e){const i=this.getHSL(),s=t.getHSL(),r=fs(i.h,s.h,e),o=fs(i.s,s.s,e),a=fs(i.l,s.l,e);return this.setHSL(r,o,a),this}setHSV(t,e,i,s=1){const r=Y(t,0,1)*360,o=Y(e,0,1),a=Y(i,0,1),c=Math.floor(r/60)%6,h=r/60-Math.floor(r/60),l=a*(1-o),u=a*(1-h*o),d=a*(1-(1-h)*o),f=[[a,d,l],[u,a,l],[l,a,d],[l,u,a],[d,l,a],[a,l,u]][c];return this.r=f[0]*255,this.g=f[1]*255,this.b=f[2]*255,this.a=s,this}setHSB(t,e,i,s=1){this.setHSV(t,e,i,s)}getHSV(t){const{r:e,g:i,b:s,a:r}=this.color,o=Math.max(e,i,s),a=Math.min(e,i,s),c=o-a;let h;e===o?h=(i-s)/c:i===o?h=2+(s-e)/c:h=4+(e-i)/c,h/=6,h<0&&(h+=1);const l=c==0?0:h,u=o===0?0:c/o,d=o/255;return t&&t.setHSV(l,u,d,r),{h:l,s:u,v:d,a:r}}getHSB(t){const{h:e,s:i,v:s,a:r}=this.getHSV(t);return{h:e,s:i,b:s,a:r}}}const To=new ue;function Po(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Ao(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}function Mo(n,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?n+(t-n)*6*e:e<1/2?t:e<2/3?n+(t-n)*6*(2/3-e):n}function Kg(n=window.location.href,t){try{return new URL(n,t)}catch{const e="(?<protocol>https?:)",i="(?<host>(?<hostname>[^/#?:]+)(?::(?<port>\\d+))?)",s="(?<pathname>(?:\\/[^/#?]+)*\\/?)",r="(?<search>(?:\\?[^#]*)?)",o="(?<hash>(?:#.*)?)",a=new RegExp(`^${e}//${i}${s}${r}${o}$`).exec(n);return{href:n,protocol:a?.groups?.protocol||"",host:a?.groups?.host||"",hostname:a?.groups?.hostname||"",port:a?.groups?.port||"",pathname:a?.groups?.pathname||"",search:a?.groups?.search||"",hash:a?.groups?.hash||""}}}function Zg(n=window.location.href){const t=Kg(n),e=t.href.indexOf(t.hash);return t.hash&&e>=0?t.href.substring(0,e):t.href}function Qg(n,t){return n+t.replace(/^[&?]/,n.indexOf("?")>=0?"&":"?")}function t0(n){return"?"+Object.entries(n).map(([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`).join("&")}function e0(n){return"?"+[...n.entries()].map(t=>encodeURIComponent(t[0])+"="+encodeURIComponent(t[1]instanceof File?t[1].name:t[1])).join("&")}function dl(n,t){return function(){return n.apply(t,arguments)}}const{toString:n0}=Object.prototype,{getPrototypeOf:Do}=Object,vs=(n=>t=>{const e=n0.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),fe=n=>(n=n.toLowerCase(),t=>vs(t)===n),xs=n=>t=>typeof t===n,{isArray:Gn}=Array,pi=xs("undefined");function i0(n){return n!==null&&!pi(n)&&n.constructor!==null&&!pi(n.constructor)&&Kt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const ml=fe("ArrayBuffer");function s0(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&ml(n.buffer),t}const r0=xs("string"),Kt=xs("function"),pl=xs("number"),_s=n=>n!==null&&typeof n=="object",o0=n=>n===!0||n===!1,Ss=n=>{if(vs(n)!=="object")return!1;const t=Do(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},a0=fe("Date"),c0=fe("File"),h0=fe("Blob"),l0=fe("FileList"),u0=n=>_s(n)&&Kt(n.pipe),f0=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||Kt(n.append)&&((t=vs(n))==="formdata"||t==="object"&&Kt(n.toString)&&n.toString()==="[object FormData]"))},d0=fe("URLSearchParams"),[m0,p0,g0,y0]=["ReadableStream","Request","Response","Headers"].map(fe),b0=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function gi(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let i,s;if(typeof n!="object"&&(n=[n]),Gn(n))for(i=0,s=n.length;i<s;i++)t.call(null,n[i],i,n);else{const r=e?Object.getOwnPropertyNames(n):Object.keys(n),o=r.length;let a;for(i=0;i<o;i++)a=r[i],t.call(null,n[a],a,n)}}function gl(n,t){t=t.toLowerCase();const e=Object.keys(n);let i=e.length,s;for(;i-- >0;)if(s=e[i],t===s.toLowerCase())return s;return null}const xn=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),yl=n=>!pi(n)&&n!==xn;function Io(){const{caseless:n}=yl(this)&&this||{},t={},e=(i,s)=>{const r=n&&gl(t,s)||s;Ss(t[r])&&Ss(i)?t[r]=Io(t[r],i):Ss(i)?t[r]=Io({},i):Gn(i)?t[r]=i.slice():t[r]=i};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&gi(arguments[i],e);return t}const w0=(n,t,e,{allOwnKeys:i}={})=>(gi(t,(s,r)=>{e&&Kt(s)?n[r]=dl(s,e):n[r]=s},{allOwnKeys:i}),n),v0=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),x0=(n,t,e,i)=>{n.prototype=Object.create(t.prototype,i),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},_0=(n,t,e,i)=>{let s,r,o;const a={};if(t=t||{},n==null)return t;do{for(s=Object.getOwnPropertyNames(n),r=s.length;r-- >0;)o=s[r],(!i||i(o,n,t))&&!a[o]&&(t[o]=n[o],a[o]=!0);n=e!==!1&&Do(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},S0=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const i=n.indexOf(t,e);return i!==-1&&i===e},C0=n=>{if(!n)return null;if(Gn(n))return n;let t=n.length;if(!pl(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},E0=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Do(Uint8Array)),T0=(n,t)=>{const e=(n&&n[Symbol.iterator]).call(n);let i;for(;(i=e.next())&&!i.done;){const s=i.value;t.call(n,s[0],s[1])}},P0=(n,t)=>{let e;const i=[];for(;(e=n.exec(t))!==null;)i.push(e);return i},A0=fe("HTMLFormElement"),M0=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,i){return e.toUpperCase()+i}),bl=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),D0=fe("RegExp"),wl=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),i={};gi(e,(s,r)=>{let o;(o=t(s,r,n))!==!1&&(i[r]=o||s)}),Object.defineProperties(n,i)},I0=n=>{wl(n,(t,e)=>{if(Kt(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const i=n[e];if(Kt(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},O0=(n,t)=>{const e={},i=s=>{s.forEach(r=>{e[r]=!0})};return Gn(n)?i(n):i(String(n).split(t)),e},k0=()=>{},R0=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function L0(n){return!!(n&&Kt(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const z0=n=>{const t=new Array(10),e=(i,s)=>{if(_s(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[s]=i;const r=Gn(i)?[]:{};return gi(i,(o,a)=>{const c=e(o,s+1);!pi(c)&&(r[a]=c)}),t[s]=void 0,r}}return i};return e(n,0)},N0=fe("AsyncFunction"),F0=n=>n&&(_s(n)||Kt(n))&&Kt(n.then)&&Kt(n.catch),vl=((n,t)=>n?setImmediate:t?((e,i)=>(xn.addEventListener("message",({source:s,data:r})=>{s===xn&&r===e&&i.length&&i.shift()()},!1),s=>{i.push(s),xn.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",Kt(xn.postMessage)),B0=typeof queueMicrotask<"u"?queueMicrotask.bind(xn):typeof process<"u"&&process.nextTick||vl,M={isArray:Gn,isArrayBuffer:ml,isBuffer:i0,isFormData:f0,isArrayBufferView:s0,isString:r0,isNumber:pl,isBoolean:o0,isObject:_s,isPlainObject:Ss,isReadableStream:m0,isRequest:p0,isResponse:g0,isHeaders:y0,isUndefined:pi,isDate:a0,isFile:c0,isBlob:h0,isRegExp:D0,isFunction:Kt,isStream:u0,isURLSearchParams:d0,isTypedArray:E0,isFileList:l0,forEach:gi,merge:Io,extend:w0,trim:b0,stripBOM:v0,inherits:x0,toFlatObject:_0,kindOf:vs,kindOfTest:fe,endsWith:S0,toArray:C0,forEachEntry:T0,matchAll:P0,isHTMLForm:A0,hasOwnProperty:bl,hasOwnProp:bl,reduceDescriptors:wl,freezeMethods:I0,toObjectSet:O0,toCamelCase:M0,noop:k0,toFiniteNumber:R0,findKey:gl,global:xn,isContextDefined:yl,isSpecCompliantForm:L0,toJSONObject:z0,isAsyncFn:N0,isThenable:F0,setImmediate:vl,asap:B0};function W(n,t,e,i,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),i&&(this.request=i),s&&(this.response=s,this.status=s.status?s.status:null)}M.inherits(W,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:M.toJSONObject(this.config),code:this.code,status:this.status}}});const xl=W.prototype,_l={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{_l[n]={value:n}}),Object.defineProperties(W,_l),Object.defineProperty(xl,"isAxiosError",{value:!0}),W.from=(n,t,e,i,s,r)=>{const o=Object.create(xl);return M.toFlatObject(n,o,function(a){return a!==Error.prototype},a=>a!=="isAxiosError"),W.call(o,n.message,t,e,i,s),o.cause=n,o.name=n.name,r&&Object.assign(o,r),o};const U0=null;function Oo(n){return M.isPlainObject(n)||M.isArray(n)}function Sl(n){return M.endsWith(n,"[]")?n.slice(0,-2):n}function Cl(n,t,e){return n?n.concat(t).map(function(i,s){return i=Sl(i),!e&&s?"["+i+"]":i}).join(e?".":""):t}function V0(n){return M.isArray(n)&&!n.some(Oo)}const Y0=M.toFlatObject(M,{},null,function(n){return/^is[A-Z]/.test(n)});function Cs(n,t,e){if(!M.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=M.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,p){return!M.isUndefined(p[f])});const i=e.metaTokens,s=e.visitor||h,r=e.dots,o=e.indexes,a=(e.Blob||typeof Blob<"u"&&Blob)&&M.isSpecCompliantForm(t);if(!M.isFunction(s))throw new TypeError("visitor must be a function");function c(f){if(f===null)return"";if(M.isDate(f))return f.toISOString();if(!a&&M.isBlob(f))throw new W("Blob is not supported. Use a Buffer instead.");return M.isArrayBuffer(f)||M.isTypedArray(f)?a&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function h(f,p,m){let v=f;if(f&&!m&&typeof f=="object"){if(M.endsWith(p,"{}"))p=i?p:p.slice(0,-2),f=JSON.stringify(f);else if(M.isArray(f)&&V0(f)||(M.isFileList(f)||M.endsWith(p,"[]"))&&(v=M.toArray(f)))return p=Sl(p),v.forEach(function(y,b){!(M.isUndefined(y)||y===null)&&t.append(o===!0?Cl([p],b,r):o===null?p:p+"[]",c(y))}),!1}return Oo(f)?!0:(t.append(Cl(m,p,r),c(f)),!1)}const l=[],u=Object.assign(Y0,{defaultVisitor:h,convertValue:c,isVisitable:Oo});function d(f,p){if(!M.isUndefined(f)){if(l.indexOf(f)!==-1)throw Error("Circular reference detected in "+p.join("."));l.push(f),M.forEach(f,function(m,v){(!(M.isUndefined(m)||m===null)&&s.call(t,m,M.isString(v)?v.trim():v,p,u))===!0&&d(m,p?p.concat(v):[v])}),l.pop()}}if(!M.isObject(n))throw new TypeError("data must be an object");return d(n),t}function El(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function ko(n,t){this._pairs=[],n&&Cs(n,this,t)}const Tl=ko.prototype;Tl.append=function(n,t){this._pairs.push([n,t])},Tl.toString=function(n){const t=n?function(e){return n.call(this,e,El)}:El;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function $0(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Pl(n,t,e){if(!t)return n;const i=e&&e.encode||$0;M.isFunction(e)&&(e={serialize:e});const s=e&&e.serialize;let r;if(s?r=s(t,e):r=M.isURLSearchParams(t)?t.toString():new ko(t,e).toString(i),r){const o=n.indexOf("#");o!==-1&&(n=n.slice(0,o)),n+=(n.indexOf("?")===-1?"?":"&")+r}return n}class G0{constructor(){this.handlers=[]}use(t,e,i){return this.handlers.push({fulfilled:t,rejected:e,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){M.forEach(this.handlers,function(e){e!==null&&t(e)})}}const Al=G0,Ml={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},X0=typeof URLSearchParams<"u"?URLSearchParams:ko,j0=typeof FormData<"u"?FormData:null,W0=typeof Blob<"u"?Blob:null,H0={isBrowser:!0,classes:{URLSearchParams:X0,FormData:j0,Blob:W0},protocols:["http","https","file","blob","url","data"]},Ro=typeof window<"u"&&typeof document<"u",Lo=typeof navigator=="object"&&navigator||void 0,q0=Ro&&(!Lo||["ReactNative","NativeScript","NS"].indexOf(Lo.product)<0),J0=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),K0=Ro&&window.location.href||"http://localhost",Z0=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ro,hasStandardBrowserEnv:q0,hasStandardBrowserWebWorkerEnv:J0,navigator:Lo,origin:K0},Symbol.toStringTag,{value:"Module"})),kt={...Z0,...H0};function Q0(n,t){return Cs(n,new kt.classes.URLSearchParams,Object.assign({visitor:function(e,i,s,r){return kt.isNode&&M.isBuffer(e)?(this.append(i,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}function ty(n){return M.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function ey(n){const t={},e=Object.keys(n);let i;const s=e.length;let r;for(i=0;i<s;i++)r=e[i],t[r]=n[r];return t}function Dl(n){function t(e,i,s,r){let o=e[r++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),c=r>=e.length;return o=!o&&M.isArray(s)?s.length:o,c?(M.hasOwnProp(s,o)?s[o]=[s[o],i]:s[o]=i,!a):((!s[o]||!M.isObject(s[o]))&&(s[o]=[]),t(e,i,s[o],r)&&M.isArray(s[o])&&(s[o]=ey(s[o])),!a)}if(M.isFormData(n)&&M.isFunction(n.entries)){const e={};return M.forEachEntry(n,(i,s)=>{t(ty(i),s,e,0)}),e}return null}function ny(n,t,e){if(M.isString(n))try{return(t||JSON.parse)(n),M.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(e||JSON.stringify)(n)}const zo={transitional:Ml,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",i=e.indexOf("application/json")>-1,s=M.isObject(n);if(s&&M.isHTMLForm(n)&&(n=new FormData(n)),M.isFormData(n))return i?JSON.stringify(Dl(n)):n;if(M.isArrayBuffer(n)||M.isBuffer(n)||M.isStream(n)||M.isFile(n)||M.isBlob(n)||M.isReadableStream(n))return n;if(M.isArrayBufferView(n))return n.buffer;if(M.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let r;if(s){if(e.indexOf("application/x-www-form-urlencoded")>-1)return Q0(n,this.formSerializer).toString();if((r=M.isFileList(n))||e.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return Cs(r?{"files[]":n}:n,o&&new o,this.formSerializer)}}return s||i?(t.setContentType("application/json",!1),ny(n)):n}],transformResponse:[function(n){const t=this.transitional||zo.transitional,e=t&&t.forcedJSONParsing,i=this.responseType==="json";if(M.isResponse(n)||M.isReadableStream(n))return n;if(n&&M.isString(n)&&(e&&!this.responseType||i)){const s=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(n)}catch(r){if(s)throw r.name==="SyntaxError"?W.from(r,W.ERR_BAD_RESPONSE,this,null,this.response):r}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:kt.classes.FormData,Blob:kt.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};M.forEach(["delete","get","head","post","put","patch"],n=>{zo.headers[n]={}});const No=zo,iy=M.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"]),sy=n=>{const t={};let e,i,s;return n&&n.split(`
|
|
14
|
-
`).forEach(function(r){s=r.indexOf(":"),e=r.substring(0,s).trim().toLowerCase(),i=r.substring(s+1).trim(),!(!e||t[e]&&
|
|
15
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const i=new this(t);return e.forEach(s=>i.set(s)),i}static accessor(t){const e=(this[Il]=this[Il]={accessors:{}}).accessors,i=this.prototype;function s(r){const o=yi(r);e[o]||(cy(i,r),e[o]=!0)}return M.isArray(t)?t.forEach(s):s(t),this}}Ts.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),M.reduceDescriptors(Ts.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(i){this[e]=i}}}),M.freezeMethods(Ts);const de=Ts;function Bo(n,t){const e=this||No,i=t||e,s=de.from(i.headers);let r=i.data;return M.forEach(n,function(o){r=o.call(e,r,s.normalize(),t?t.status:void 0)}),s.normalize(),r}function Ol(n){return!!(n&&n.__CANCEL__)}function Xn(n,t,e){W.call(this,n??"canceled",W.ERR_CANCELED,t,e),this.name="CanceledError"}M.inherits(Xn,W,{__CANCEL__:!0});function kl(n,t,e){const i=e.config.validateStatus;!e.status||!i||i(e.status)?n(e):t(new W("Request failed with status code "+e.status,[W.ERR_BAD_REQUEST,W.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function hy(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function ly(n,t){n=n||10;const e=new Array(n),i=new Array(n);let s=0,r=0,o;return t=t!==void 0?t:1e3,function(a){const c=Date.now(),h=i[r];o||(o=c),e[s]=a,i[s]=c;let l=r,u=0;for(;l!==s;)u+=e[l++],l=l%n;if(s=(s+1)%n,s===r&&(r=(r+1)%n),c-o<t)return;const d=h&&c-h;return d?Math.round(u*1e3/d):void 0}}function uy(n,t){let e=0,i=1e3/t,s,r;const o=(a,c=Date.now())=>{e=c,s=null,r&&(clearTimeout(r),r=null),n.apply(null,a)};return[(...a)=>{const c=Date.now(),h=c-e;h>=i?o(a,c):(s=a,r||(r=setTimeout(()=>{r=null,o(s)},i-h)))},()=>s&&o(s)]}const Ps=(n,t,e=3)=>{let i=0;const s=ly(50,250);return uy(r=>{const o=r.loaded,a=r.lengthComputable?r.total:void 0,c=o-i,h=s(c),l=o<=a;i=o;const u={loaded:o,total:a,progress:a?o/a:void 0,bytes:c,rate:h||void 0,estimated:h&&a&&l?(a-o)/h:void 0,event:r,lengthComputable:a!=null,[t?"download":"upload"]:!0};n(u)},e)},Rl=(n,t)=>{const e=n!=null;return[i=>t[0]({lengthComputable:e,total:n,loaded:i}),t[1]]},Ll=n=>(...t)=>M.asap(()=>n(...t)),fy=kt.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,kt.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(kt.origin),kt.navigator&&/(msie|trident)/i.test(kt.navigator.userAgent)):()=>!0,dy=kt.hasStandardBrowserEnv?{write(n,t,e,i,s,r){const o=[n+"="+encodeURIComponent(t)];M.isNumber(e)&&o.push("expires="+new Date(e).toGMTString()),M.isString(i)&&o.push("path="+i),M.isString(s)&&o.push("domain="+s),r===!0&&o.push("secure"),document.cookie=o.join("; ")},read(n){const t=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function my(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function py(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function zl(n,t,e){let i=!my(t);return n&&(i||e==!1)?py(n,t):t}const Nl=n=>n instanceof de?{...n}:n;function _n(n,t){t=t||{};const e={};function i(h,l,u,d){return M.isPlainObject(h)&&M.isPlainObject(l)?M.merge.call({caseless:d},h,l):M.isPlainObject(l)?M.merge({},l):M.isArray(l)?l.slice():l}function s(h,l,u,d){if(M.isUndefined(l)){if(!M.isUndefined(h))return i(void 0,h,u,d)}else return i(h,l,u,d)}function r(h,l){if(!M.isUndefined(l))return i(void 0,l)}function o(h,l){if(M.isUndefined(l)){if(!M.isUndefined(h))return i(void 0,h)}else return i(void 0,l)}function a(h,l,u){if(u in t)return i(h,l);if(u in n)return i(void 0,h)}const c={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:(h,l,u)=>s(Nl(h),Nl(l),u,!0)};return M.forEach(Object.keys(Object.assign({},n,t)),function(h){const l=c[h]||s,u=l(n[h],t[h],h);M.isUndefined(u)&&l!==a||(e[h]=u)}),e}const Fl=n=>{const t=_n({},n);let{data:e,withXSRFToken:i,xsrfHeaderName:s,xsrfCookieName:r,headers:o,auth:a}=t;t.headers=o=de.from(o),t.url=Pl(zl(t.baseURL,t.url,t.allowAbsoluteUrls),n.params,n.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(M.isFormData(e)){if(kt.hasStandardBrowserEnv||kt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){const[h,...l]=c?c.split(";").map(u=>u.trim()).filter(Boolean):[];o.setContentType([h||"multipart/form-data",...l].join("; "))}}if(kt.hasStandardBrowserEnv&&(i&&M.isFunction(i)&&(i=i(t)),i||i!==!1&&fy(t.url))){const h=s&&r&&dy.read(r);h&&o.set(s,h)}return t},gy=typeof XMLHttpRequest<"u",yy=gy&&function(n){return new Promise(function(t,e){const i=Fl(n);let s=i.data;const r=de.from(i.headers).normalize();let{responseType:o,onUploadProgress:a,onDownloadProgress:c}=i,h,l,u,d,f;function p(){d&&d(),f&&f(),i.cancelToken&&i.cancelToken.unsubscribe(h),i.signal&&i.signal.removeEventListener("abort",h)}let m=new XMLHttpRequest;m.open(i.method.toUpperCase(),i.url,!0),m.timeout=i.timeout;function v(){if(!m)return;const b=de.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),x={data:!o||o==="text"||o==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:b,config:n,request:m};kl(function(w){t(w),p()},function(w){e(w),p()},x),m=null}"onloadend"in m?m.onloadend=v:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(v)},m.onabort=function(){m&&(e(new W("Request aborted",W.ECONNABORTED,n,m)),m=null)},m.onerror=function(){e(new W("Network Error",W.ERR_NETWORK,n,m)),m=null},m.ontimeout=function(){let b=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const x=i.transitional||Ml;i.timeoutErrorMessage&&(b=i.timeoutErrorMessage),e(new W(b,x.clarifyTimeoutError?W.ETIMEDOUT:W.ECONNABORTED,n,m)),m=null},s===void 0&&r.setContentType(null),"setRequestHeader"in m&&M.forEach(r.toJSON(),function(b,x){m.setRequestHeader(x,b)}),M.isUndefined(i.withCredentials)||(m.withCredentials=!!i.withCredentials),o&&o!=="json"&&(m.responseType=i.responseType),c&&([u,f]=Ps(c,!0),m.addEventListener("progress",u)),a&&m.upload&&([l,d]=Ps(a),m.upload.addEventListener("progress",l),m.upload.addEventListener("loadend",d)),(i.cancelToken||i.signal)&&(h=b=>{m&&(e(!b||b.type?new Xn(null,n,m):b),m.abort(),m=null)},i.cancelToken&&i.cancelToken.subscribe(h),i.signal&&(i.signal.aborted?h():i.signal.addEventListener("abort",h)));const y=hy(i.url);if(y&&kt.protocols.indexOf(y)===-1){e(new W("Unsupported protocol "+y+":",W.ERR_BAD_REQUEST,n));return}m.send(s||null)})},by=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let i=new AbortController,s;const r=function(h){if(!s){s=!0,a();const l=h instanceof Error?h:this.reason;i.abort(l instanceof W?l:new Xn(l instanceof Error?l.message:l))}};let o=t&&setTimeout(()=>{o=null,r(new W(`timeout ${t} of ms exceeded`,W.ETIMEDOUT))},t);const a=()=>{n&&(o&&clearTimeout(o),o=null,n.forEach(h=>{h.unsubscribe?h.unsubscribe(r):h.removeEventListener("abort",r)}),n=null)};n.forEach(h=>h.addEventListener("abort",r));const{signal:c}=i;return c.unsubscribe=()=>M.asap(a),c}},wy=by,vy=function*(n,t){let e=n.byteLength;if(!t||e<t){yield n;return}let i=0,s;for(;i<e;)s=i+t,yield n.slice(i,s),i=s},xy=async function*(n,t){for await(const e of _y(n))yield*vy(e,t)},_y=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:i}=await t.read();if(e)break;yield i}}finally{await t.cancel()}},Bl=(n,t,e,i)=>{const s=xy(n,t);let r=0,o,a=c=>{o||(o=!0,i&&i(c))};return new ReadableStream({async pull(c){try{const{done:h,value:l}=await s.next();if(h){a(),c.close();return}let u=l.byteLength;if(e){let d=r+=u;e(d)}c.enqueue(new Uint8Array(l))}catch(h){throw a(h),h}},cancel(c){return a(c),s.return()}},{highWaterMark:2})},As=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ul=As&&typeof ReadableStream=="function",Sy=As&&(typeof TextEncoder=="function"?(n=>t=>n.encode(t))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),Vl=(n,...t)=>{try{return!!n(...t)}catch{return!1}},Cy=Ul&&Vl(()=>{let n=!1;const t=new Request(kt.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!t}),Yl=64*1024,Uo=Ul&&Vl(()=>M.isReadableStream(new Response("").body)),Ms={stream:Uo&&(n=>n.body)};As&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ms[t]&&(Ms[t]=M.isFunction(n[t])?e=>e[t]():(e,i)=>{throw new W(`Response type '${t}' is not supported`,W.ERR_NOT_SUPPORT,i)})})})(new Response);const Ey=async n=>{if(n==null)return 0;if(M.isBlob(n))return n.size;if(M.isSpecCompliantForm(n))return(await new Request(kt.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(M.isArrayBufferView(n)||M.isArrayBuffer(n))return n.byteLength;if(M.isURLSearchParams(n)&&(n=n+""),M.isString(n))return(await Sy(n)).byteLength},Ty=async(n,t)=>M.toFiniteNumber(n.getContentLength())??Ey(t),Py=As&&(async n=>{let{url:t,method:e,data:i,signal:s,cancelToken:r,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:h,headers:l,withCredentials:u="same-origin",fetchOptions:d}=Fl(n);h=h?(h+"").toLowerCase():"text";let f=wy([s,r&&r.toAbortSignal()],o),p;const m=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let v;try{if(c&&Cy&&e!=="get"&&e!=="head"&&(v=await Ty(l,i))!==0){let C=new Request(t,{method:"POST",body:i,duplex:"half"}),S;if(M.isFormData(i)&&(S=C.headers.get("content-type"))&&l.setContentType(S),C.body){const[D,L]=Rl(v,Ps(Ll(c)));i=Bl(C.body,Yl,D,L)}}M.isString(u)||(u=u?"include":"omit");const y="credentials"in Request.prototype;p=new Request(t,{...d,signal:f,method:e.toUpperCase(),headers:l.normalize().toJSON(),body:i,duplex:"half",credentials:y?u:void 0});let b=await fetch(p);const x=Uo&&(h==="stream"||h==="response");if(Uo&&(a||x&&m)){const C={};["status","statusText","headers"].forEach(I=>{C[I]=b[I]});const S=M.toFiniteNumber(b.headers.get("content-length")),[D,L]=a&&Rl(S,Ps(Ll(a),!0))||[];b=new Response(Bl(b.body,Yl,D,()=>{L&&L(),m&&m()}),C)}h=h||"text";let w=await Ms[M.findKey(Ms,h)||"text"](b,n);return!x&&m&&m(),await new Promise((C,S)=>{kl(C,S,{data:w,headers:de.from(b.headers),status:b.status,statusText:b.statusText,config:n,request:p})})}catch(y){throw m&&m(),y&&y.name==="TypeError"&&/fetch/i.test(y.message)?Object.assign(new W("Network Error",W.ERR_NETWORK,n,p),{cause:y.cause||y}):W.from(y,y&&y.code,n,p)}}),Vo={http:U0,xhr:yy,fetch:Py};M.forEach(Vo,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const $l=n=>`- ${n}`,Ay=n=>M.isFunction(n)||n===null||n===!1,Gl={getAdapter:n=>{n=M.isArray(n)?n:[n];const{length:t}=n;let e,i;const s={};for(let r=0;r<t;r++){e=n[r];let o;if(i=e,!Ay(e)&&(i=Vo[(o=String(e)).toLowerCase()],i===void 0))throw new W(`Unknown adapter '${o}'`);if(i)break;s[o||"#"+r]=i}if(!i){const r=Object.entries(s).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=t?r.length>1?`since :
|
|
16
|
-
`+r.map(
|
|
17
|
-
`):" "
|
|
18
|
-
`+r):i.stack=r}catch{}}throw i}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=_n(this.defaults,e);const{transitional:i,paramsSerializer:s,headers:r}=e;i!==void 0&&Is.assertOptions(i,{silentJSONParsing:ve.transitional(ve.boolean),forcedJSONParsing:ve.transitional(ve.boolean),clarifyTimeoutError:ve.transitional(ve.boolean)},!1),s!=null&&(M.isFunction(s)?e.paramsSerializer={serialize:s}:Is.assertOptions(s,{encode:ve.function,serialize:ve.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Is.assertOptions(e,{baseUrl:ve.spelling("baseURL"),withXsrfToken:ve.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=r&&M.merge(r.common,r[e.method]);r&&M.forEach(["delete","get","head","post","put","patch","common"],p=>{delete r[p]}),e.headers=de.concat(o,r);const a=[];let c=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(e)===!1||(c=c&&p.synchronous,a.unshift(p.fulfilled,p.rejected))});const h=[];this.interceptors.response.forEach(function(p){h.push(p.fulfilled,p.rejected)});let l,u=0,d;if(!c){const p=[Xl.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,h),d=p.length,l=Promise.resolve(e);u<d;)l=l.then(p[u++],p[u++]);return l}d=a.length;let f=e;for(u=0;u<d;){const p=a[u++],m=a[u++];try{f=p(f)}catch(v){m.call(this,v);break}}try{l=Xl.call(this,f)}catch(p){return Promise.reject(p)}for(u=0,d=h.length;u<d;)l=l.then(h[u++],h[u++]);return l}getUri(t){t=_n(this.defaults,t);const e=zl(t.baseURL,t.url,t.allowAbsoluteUrls);return Pl(e,t.params,t.paramsSerializer)}}M.forEach(["delete","get","head","options"],function(n){Os.prototype[n]=function(t,e){return this.request(_n(e||{},{method:n,url:t,data:(e||{}).data}))}}),M.forEach(["post","put","patch"],function(n){function t(e){return function(i,s,r){return this.request(_n(r||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}Os.prototype[n]=t(),Os.prototype[n+"Form"]=t(!0)});const ks=Os;class $o{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(s){e=s});const i=this;this.promise.then(s=>{if(!i._listeners)return;let r=i._listeners.length;for(;r-- >0;)i._listeners[r](s);i._listeners=null}),this.promise.then=s=>{let r;const o=new Promise(a=>{i.subscribe(a),r=a}).then(s);return o.cancel=function(){i.unsubscribe(r)},o},t(function(s,r,o){i.reason||(i.reason=new Xn(s,r,o),e(i.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=i=>{t.abort(i)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new $o(function(e){t=e}),cancel:t}}}const Dy=$o;function Iy(n){return function(t){return n.apply(null,t)}}function Oy(n){return M.isObject(n)&&n.isAxiosError===!0}const Go={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(Go).forEach(([n,t])=>{Go[t]=n});const ky=Go;function Hl(n){const t=new ks(n),e=dl(ks.prototype.request,t);return M.extend(e,ks.prototype,t,{allOwnKeys:!0}),M.extend(e,t,null,{allOwnKeys:!0}),e.create=function(i){return Hl(_n(n,i))},e}const bt=Hl(No);bt.Axios=ks,bt.CanceledError=Xn,bt.CancelToken=Dy,bt.isCancel=Ol,bt.VERSION=jl,bt.toFormData=Cs,bt.AxiosError=W,bt.Cancel=bt.CanceledError,bt.all=function(n){return Promise.all(n)},bt.spread=Iy,bt.isAxiosError=Oy,bt.mergeConfig=_n,bt.AxiosHeaders=de,bt.formToJSON=n=>Dl(M.isHTMLForm(n)?new FormData(n):n),bt.getAdapter=Gl.getAdapter,bt.HttpStatusCode=ky,bt.default=bt;const Ry=bt;class Ly{instance;constructor(t){this.instance=Ry.create(t),this.instance.interceptors.request.use(e=>(t?.interceptors?.request?.(e),e),e=>(t?.interceptors?.requestError?.(e),Promise.reject(e))),this.instance.interceptors.response.use(e=>(t?.interceptors?.response?.(e),e.status==200,Promise.resolve(e)),e=>(t?.interceptors?.responseError?.(e),Promise.reject(e)))}request(t){let e=!1;const i=this.instance.request;return i.cancel=()=>{e=!0},i(t).then(s=>{if(e)throw new Error("Canceled!");return s})}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,i){return this.request({...i,method:"post",url:t,data:e})}postFormData(t,e,i){return i={...i,headers:{...i?.headers,"Content-Type":"multipart/form-data"}},this.request({...i,method:"post",url:t,data:e})}postForm(t,e,i){return this.instance.postForm(t,e,{...i})}put(t,e,i){return this.request({...i,method:"put",url:t,data:e})}patch(t,e,i){return this.request({...i,method:"patch",url:t,data:e})}getUri(t){return this.instance.getUri(t)}}function zy(n,t=(e,i)=>e<=i){const e=n.length;let i=Math.floor(e/2);for(;i>0;){for(let s=i;s<e;s++){const r=n[s];let o=s;for(;o>=i&&!t(n[o-i],r);)n[o]=n[o-i],o-=i;n[o]=r}i=Math.floor(i/2)}}function Rs(n,t){const e=typeof t?.aliveInSeconds=="number"?Math.max(t.aliveInSeconds,0):-1,i=typeof t?.aliveUntilTimestamp=="number"?Math.max(t.aliveUntilTimestamp,0):-1;function s(o,a=!1){return Rp(o)||Bh(o)||zh(o)?{value:o,timestamp:Yn()}:a&&Object.prototype.hasOwnProperty.call(o,"timestamp")?o:{...o,timestamp:Yn()}}let r=s(n,!0);return{get:()=>{let o=!1;return(e>=0&&Yn()>se(r.timestamp,0)+e*1e3||i>=0&&Yn()>i)&&(o=!0),o&&(r.value=void 0),r},set:o=>r=s(o,!1)}}function ql(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Jl={exports:{}};(function(n,t){(function(e){n.exports=e()})(function(e){var i=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function s(y,b){var x=y[0],w=y[1],C=y[2],S=y[3];x+=(w&C|~w&S)+b[0]-680876936|0,x=(x<<7|x>>>25)+w|0,S+=(x&w|~x&C)+b[1]-389564586|0,S=(S<<12|S>>>20)+x|0,C+=(S&x|~S&w)+b[2]+606105819|0,C=(C<<17|C>>>15)+S|0,w+=(C&S|~C&x)+b[3]-1044525330|0,w=(w<<22|w>>>10)+C|0,x+=(w&C|~w&S)+b[4]-176418897|0,x=(x<<7|x>>>25)+w|0,S+=(x&w|~x&C)+b[5]+1200080426|0,S=(S<<12|S>>>20)+x|0,C+=(S&x|~S&w)+b[6]-1473231341|0,C=(C<<17|C>>>15)+S|0,w+=(C&S|~C&x)+b[7]-45705983|0,w=(w<<22|w>>>10)+C|0,x+=(w&C|~w&S)+b[8]+1770035416|0,x=(x<<7|x>>>25)+w|0,S+=(x&w|~x&C)+b[9]-1958414417|0,S=(S<<12|S>>>20)+x|0,C+=(S&x|~S&w)+b[10]-42063|0,C=(C<<17|C>>>15)+S|0,w+=(C&S|~C&x)+b[11]-1990404162|0,w=(w<<22|w>>>10)+C|0,x+=(w&C|~w&S)+b[12]+1804603682|0,x=(x<<7|x>>>25)+w|0,S+=(x&w|~x&C)+b[13]-40341101|0,S=(S<<12|S>>>20)+x|0,C+=(S&x|~S&w)+b[14]-1502002290|0,C=(C<<17|C>>>15)+S|0,w+=(C&S|~C&x)+b[15]+1236535329|0,w=(w<<22|w>>>10)+C|0,x+=(w&S|C&~S)+b[1]-165796510|0,x=(x<<5|x>>>27)+w|0,S+=(x&C|w&~C)+b[6]-1069501632|0,S=(S<<9|S>>>23)+x|0,C+=(S&w|x&~w)+b[11]+643717713|0,C=(C<<14|C>>>18)+S|0,w+=(C&x|S&~x)+b[0]-373897302|0,w=(w<<20|w>>>12)+C|0,x+=(w&S|C&~S)+b[5]-701558691|0,x=(x<<5|x>>>27)+w|0,S+=(x&C|w&~C)+b[10]+38016083|0,S=(S<<9|S>>>23)+x|0,C+=(S&w|x&~w)+b[15]-660478335|0,C=(C<<14|C>>>18)+S|0,w+=(C&x|S&~x)+b[4]-405537848|0,w=(w<<20|w>>>12)+C|0,x+=(w&S|C&~S)+b[9]+568446438|0,x=(x<<5|x>>>27)+w|0,S+=(x&C|w&~C)+b[14]-1019803690|0,S=(S<<9|S>>>23)+x|0,C+=(S&w|x&~w)+b[3]-187363961|0,C=(C<<14|C>>>18)+S|0,w+=(C&x|S&~x)+b[8]+1163531501|0,w=(w<<20|w>>>12)+C|0,x+=(w&S|C&~S)+b[13]-1444681467|0,x=(x<<5|x>>>27)+w|0,S+=(x&C|w&~C)+b[2]-51403784|0,S=(S<<9|S>>>23)+x|0,C+=(S&w|x&~w)+b[7]+1735328473|0,C=(C<<14|C>>>18)+S|0,w+=(C&x|S&~x)+b[12]-1926607734|0,w=(w<<20|w>>>12)+C|0,x+=(w^C^S)+b[5]-378558|0,x=(x<<4|x>>>28)+w|0,S+=(x^w^C)+b[8]-2022574463|0,S=(S<<11|S>>>21)+x|0,C+=(S^x^w)+b[11]+1839030562|0,C=(C<<16|C>>>16)+S|0,w+=(C^S^x)+b[14]-35309556|0,w=(w<<23|w>>>9)+C|0,x+=(w^C^S)+b[1]-1530992060|0,x=(x<<4|x>>>28)+w|0,S+=(x^w^C)+b[4]+1272893353|0,S=(S<<11|S>>>21)+x|0,C+=(S^x^w)+b[7]-155497632|0,C=(C<<16|C>>>16)+S|0,w+=(C^S^x)+b[10]-1094730640|0,w=(w<<23|w>>>9)+C|0,x+=(w^C^S)+b[13]+681279174|0,x=(x<<4|x>>>28)+w|0,S+=(x^w^C)+b[0]-358537222|0,S=(S<<11|S>>>21)+x|0,C+=(S^x^w)+b[3]-722521979|0,C=(C<<16|C>>>16)+S|0,w+=(C^S^x)+b[6]+76029189|0,w=(w<<23|w>>>9)+C|0,x+=(w^C^S)+b[9]-640364487|0,x=(x<<4|x>>>28)+w|0,S+=(x^w^C)+b[12]-421815835|0,S=(S<<11|S>>>21)+x|0,C+=(S^x^w)+b[15]+530742520|0,C=(C<<16|C>>>16)+S|0,w+=(C^S^x)+b[2]-995338651|0,w=(w<<23|w>>>9)+C|0,x+=(C^(w|~S))+b[0]-198630844|0,x=(x<<6|x>>>26)+w|0,S+=(w^(x|~C))+b[7]+1126891415|0,S=(S<<10|S>>>22)+x|0,C+=(x^(S|~w))+b[14]-1416354905|0,C=(C<<15|C>>>17)+S|0,w+=(S^(C|~x))+b[5]-57434055|0,w=(w<<21|w>>>11)+C|0,x+=(C^(w|~S))+b[12]+1700485571|0,x=(x<<6|x>>>26)+w|0,S+=(w^(x|~C))+b[3]-1894986606|0,S=(S<<10|S>>>22)+x|0,C+=(x^(S|~w))+b[10]-1051523|0,C=(C<<15|C>>>17)+S|0,w+=(S^(C|~x))+b[1]-2054922799|0,w=(w<<21|w>>>11)+C|0,x+=(C^(w|~S))+b[8]+1873313359|0,x=(x<<6|x>>>26)+w|0,S+=(w^(x|~C))+b[15]-30611744|0,S=(S<<10|S>>>22)+x|0,C+=(x^(S|~w))+b[6]-1560198380|0,C=(C<<15|C>>>17)+S|0,w+=(S^(C|~x))+b[13]+1309151649|0,w=(w<<21|w>>>11)+C|0,x+=(C^(w|~S))+b[4]-145523070|0,x=(x<<6|x>>>26)+w|0,S+=(w^(x|~C))+b[11]-1120210379|0,S=(S<<10|S>>>22)+x|0,C+=(x^(S|~w))+b[2]+718787259|0,C=(C<<15|C>>>17)+S|0,w+=(S^(C|~x))+b[9]-343485551|0,w=(w<<21|w>>>11)+C|0,y[0]=x+y[0]|0,y[1]=w+y[1]|0,y[2]=C+y[2]|0,y[3]=S+y[3]|0}function r(y){var b=[],x;for(x=0;x<64;x+=4)b[x>>2]=y.charCodeAt(x)+(y.charCodeAt(x+1)<<8)+(y.charCodeAt(x+2)<<16)+(y.charCodeAt(x+3)<<24);return b}function o(y){var b=[],x;for(x=0;x<64;x+=4)b[x>>2]=y[x]+(y[x+1]<<8)+(y[x+2]<<16)+(y[x+3]<<24);return b}function a(y){var b=y.length,x=[1732584193,-271733879,-1732584194,271733878],w,C,S,D,L,I;for(w=64;w<=b;w+=64)s(x,r(y.substring(w-64,w)));for(y=y.substring(w-64),C=y.length,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=0;w<C;w+=1)S[w>>2]|=y.charCodeAt(w)<<(w%4<<3);if(S[w>>2]|=128<<(w%4<<3),w>55)for(s(x,S),w=0;w<16;w+=1)S[w]=0;return D=b*8,D=D.toString(16).match(/(.*?)(.{0,8})$/),L=parseInt(D[2],16),I=parseInt(D[1],16)||0,S[14]=L,S[15]=I,s(x,S),x}function c(y){var b=y.length,x=[1732584193,-271733879,-1732584194,271733878],w,C,S,D,L,I;for(w=64;w<=b;w+=64)s(x,o(y.subarray(w-64,w)));for(y=w-64<b?y.subarray(w-64):new Uint8Array(0),C=y.length,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=0;w<C;w+=1)S[w>>2]|=y[w]<<(w%4<<3);if(S[w>>2]|=128<<(w%4<<3),w>55)for(s(x,S),w=0;w<16;w+=1)S[w]=0;return D=b*8,D=D.toString(16).match(/(.*?)(.{0,8})$/),L=parseInt(D[2],16),I=parseInt(D[1],16)||0,S[14]=L,S[15]=I,s(x,S),x}function h(y){var b="",x;for(x=0;x<4;x+=1)b+=i[y>>x*8+4&15]+i[y>>x*8&15];return b}function l(y){var b;for(b=0;b<y.length;b+=1)y[b]=h(y[b]);return y.join("")}l(a("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function y(b,x){return b=b|0||0,b<0?Math.max(b+x,0):Math.min(b,x)}ArrayBuffer.prototype.slice=function(b,x){var w=this.byteLength,C=y(b,w),S=w,D,L,I,F;return x!==e&&(S=y(x,w)),C>S?new ArrayBuffer(0):(D=S-C,L=new ArrayBuffer(D),I=new Uint8Array(L),F=new Uint8Array(this,C,D),I.set(F),L)}}();function u(y){return/[\u0080-\uFFFF]/.test(y)&&(y=unescape(encodeURIComponent(y))),y}function d(y,b){var x=y.length,w=new ArrayBuffer(x),C=new Uint8Array(w),S;for(S=0;S<x;S+=1)C[S]=y.charCodeAt(S);return b?C:w}function f(y){return String.fromCharCode.apply(null,new Uint8Array(y))}function p(y,b,x){var w=new Uint8Array(y.byteLength+b.byteLength);return w.set(new Uint8Array(y)),w.set(new Uint8Array(b),y.byteLength),x?w:w.buffer}function m(y){var b=[],x=y.length,w;for(w=0;w<x-1;w+=2)b.push(parseInt(y.substr(w,2),16));return String.fromCharCode.apply(String,b)}function v(){this.reset()}return v.prototype.append=function(y){return this.appendBinary(u(y)),this},v.prototype.appendBinary=function(y){this._buff+=y,this._length+=y.length;var b=this._buff.length,x;for(x=64;x<=b;x+=64)s(this._hash,r(this._buff.substring(x-64,x)));return this._buff=this._buff.substring(x-64),this},v.prototype.end=function(y){var b=this._buff,x=b.length,w,C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],S;for(w=0;w<x;w+=1)C[w>>2]|=b.charCodeAt(w)<<(w%4<<3);return this._finish(C,x),S=l(this._hash),y&&(S=m(S)),this.reset(),S},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(y){return this._buff=y.buff,this._length=y.length,this._hash=y.hash,this},v.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},v.prototype._finish=function(y,b){var x=b,w,C,S;if(y[x>>2]|=128<<(x%4<<3),x>55)for(s(this._hash,y),x=0;x<16;x+=1)y[x]=0;w=this._length*8,w=w.toString(16).match(/(.*?)(.{0,8})$/),C=parseInt(w[2],16),S=parseInt(w[1],16)||0,y[14]=C,y[15]=S,s(this._hash,y)},v.hash=function(y,b){return v.hashBinary(u(y),b)},v.hashBinary=function(y,b){var x=a(y),w=l(x);return b?m(w):w},v.ArrayBuffer=function(){this.reset()},v.ArrayBuffer.prototype.append=function(y){var b=p(this._buff.buffer,y,!0),x=b.length,w;for(this._length+=y.byteLength,w=64;w<=x;w+=64)s(this._hash,o(b.subarray(w-64,w)));return this._buff=w-64<x?new Uint8Array(b.buffer.slice(w-64)):new Uint8Array(0),this},v.ArrayBuffer.prototype.end=function(y){var b=this._buff,x=b.length,w=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],C,S;for(C=0;C<x;C+=1)w[C>>2]|=b[C]<<(C%4<<3);return this._finish(w,x),S=l(this._hash),y&&(S=m(S)),this.reset(),S},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 y=v.prototype.getState.call(this);return y.buff=f(y.buff),y},v.ArrayBuffer.prototype.setState=function(y){return y.buff=d(y.buff,!0),v.prototype.setState.call(this,y)},v.ArrayBuffer.prototype.destroy=v.prototype.destroy,v.ArrayBuffer.prototype._finish=v.prototype._finish,v.ArrayBuffer.hash=function(y,b){var x=c(new Uint8Array(y)),w=l(x);return b?m(w):w},v})})(Jl);var Ny=Jl.exports;const Fy=ql(Ny);function By(n='script[type="text/js-worker"]'){return Array.prototype.map.call(document.querySelectorAll(n),t=>t.textContent)}const Xo=n=>new XMLSerializer().serializeToString(n),Uy=(n,t="text/html")=>new DOMParser().parseFromString(n,t),Kl=(n,t={mime:we["image/svg+xml"],encode:hs.utf8})=>io(Xo(n),t);async function jo(n=["*"],t){let e=[];const i=document.createElement("input");return i.setAttribute("type","file"),i.setAttribute("visibility","hidden"),i.setAttribute("accept",n.join(",")),t&&i.setAttribute("multiple","true"),i.addEventListener("click",s=>{i.value=""},!1),new Promise((s,r)=>{i.addEventListener("change",o=>{e=Array.from(o.target.files||[]),e.length===0?r(new Error("Cancel")):s(e)},!1),window.addEventListener("focus",()=>{setTimeout(()=>{e.length===0&&r(new Error("Cancel"))},1e3)},{once:!0}),i.click()}).then(s=>(i.remove(),s)).catch(s=>{throw i.remove(),s})}function bi(n,t=ie.text,e){return new Promise((i,s)=>{const r=new FileReader;switch(r.addEventListener("progress",o=>{e?.(o.loaded,o.total)}),r.addEventListener("load",o=>{i(o.target?.result)}),r.addEventListener("error",o=>{s(o)}),t){case ie.dataURL:r.readAsDataURL(n);break;case ie.binaryString:r.readAsBinaryString(n);break;case ie.arraybuffer:r.readAsArrayBuffer(n);break;case ie.text:default:r.readAsText(n)}})}async function Vy(n){const t=await bi(n,ie.arraybuffer);return Sp(t)}function Zl(n,t,e,i,s,r,o){const a=new FileReader;a.addEventListener("load",c=>{if(!c.target||!c.target.result)return t(c);if(e.append(c.target.result),o<i.size)Zl(n,t,e,i,s,o,Math.min(o+s,i.size));else return n(e.end())}),a.addEventListener("error",c=>t(c)),a.readAsArrayBuffer(i.slice(r,o))}async function Ql(n,t=1*1024*1024){return await new Promise((e,i)=>Zl(e,i,new Fy.ArrayBuffer,n,t,0,Math.min(t,n.size)))}class Yy{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 Ly({baseURL:t.baseURL,interceptors:{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 Ql(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.postFormData(this.uploadURL,e)}startTimeCount(){this.stopTimeCount(),this.timer=setInterval(()=>{sg(this.time,1),this.onTime?.(eg(this.time))},1e3)}stopTimeCount(){this.timer&&(clearInterval(this.timer),this.timer=void 0)}}function tu(){let n=null;if(window.ActiveXObject){const t=["Microsoft.XMLHTTP","MSXML6.XMLHTTP","MSXML5.XMLHTTP","MSXML4.XMLHTTP","MSXML3.XMLHTTP","MSXML2.XMLHTTP","MSXML.XMLHTTP"];for(let e=0,i=t.length;e<i;e++)try{n=new window.ActiveXObject(t[e]);break}catch{continue}}else n=new XMLHttpRequest;return n}function eu(n,t){return new Promise((e,i)=>{const{method:s="GET",data:r={},multipartFormDataString:o="",boundary:a="",headers:c={},withCredentials:h=!1,responseType:l="json",timeout:u=3e4}=t||{},d=tu();d.timeout=u,d.responseType=l,d.onreadystatechange=function(b){d.readyState===4&&(d.status===200?e(d.response):i(d.statusText))},d.ontimeout=()=>{i(`${n} is timed out for ${u}ms.`)},d.addEventListener("load",b=>t?.load?.(b,d),!1),d.addEventListener("loadstart",b=>t?.loadstart?.(b,d),!1),d.addEventListener("loadend",b=>t?.loadend?.(b,d),!1),d.addEventListener("progress",b=>{if(b.lengthComputable){const x=Math.round(b.loaded*100/b.total);t?.progress?.(b,d,x)}},!1),d.addEventListener("error",b=>t?.error?.(b,d),!1),d.addEventListener("abort",b=>t?.abort?.(b,d),!1);const f=s.toUpperCase();Object.assign(c,{Accept:"*/*"});let p=!1,m=!1,v=!1;function y(){d.setRequestHeader("If-Modified-Since","Sat, 1 Jan 2000 00:00:00 GMT"),h&&(d.withCredentials=!0);for(const b in c)Ct(b).toLowerCase()=="content-type"&&c[b].toLowerCase()=="multipart/form-data"?(p=!0,d.setRequestHeader("Content-Type","multipart/form-data; boundary="+a)):(Ct(b).toLowerCase()=="content-type"&&(c[b].toLowerCase().indexOf("text/plain")>=0?m=!0:c[b].toLowerCase().indexOf("application/json")>=0&&(v=!0)),d.setRequestHeader(b,c[b]))}switch(f){case"GET":let b="";r instanceof FormData?b=e0(r):b=t0(r),d.open("GET",Qg(n,b),!0),y(),d.send(null);break;default:d.open(f,n,!0),y(),p?d.sendAsBinary(o):v?d.send(JSON.stringify(r)):m?d.send(Object.entries(r).map(([x,w])=>`${x}=${w}`).join(`\r
|
|
19
|
-
`)):d.send(Object.entries(r).map(([x,w])=>`${encodeURIComponent(x)}=${encodeURIComponent(w)}`).join("&"));break}})}async function
|
|
13
|
+
`):"",this.name="UnsubscriptionError",this.errors=t}});function sl(n,t){if(n){var e=n.indexOf(t);0<=e&&n.splice(e,1)}}var _o=function(){function n(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var t,e,i,s,r;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=il(o),c=a.next();!c.done;c=a.next()){var h=c.value;h.remove(this)}}catch(m){t={error:m}}finally{try{c&&!c.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var l=this.initialTeardown;if(Oe(l))try{l()}catch(m){r=m instanceof xo?m.errors:[m]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var d=il(u),f=d.next();!f.done;f=d.next()){var p=f.value;try{ol(p)}catch(m){r=r??[],m instanceof xo?r=vo(vo([],wo(r)),wo(m.errors)):r.push(m)}}}catch(m){i={error:m}}finally{try{f&&!f.done&&(s=d.return)&&s.call(d)}finally{if(i)throw i.error}}}if(r)throw new xo(r)}},n.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)ol(t);else{if(t instanceof n){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},n.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},n.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},n.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&sl(e,t)},n.prototype.remove=function(t){var e=this._finalizers;e&&sl(e,t),t instanceof n&&t._removeParent(this)},n.EMPTY=function(){var t=new n;return t.closed=!0,t}(),n}();_o.EMPTY;function rl(n){return n instanceof _o||n&&"closed"in n&&Oe(n.remove)&&Oe(n.add)&&Oe(n.unsubscribe)}function ol(n){Oe(n)?n():n.unsubscribe()}var al={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Ig={setTimeout:function(n,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];return setTimeout.apply(void 0,vo([n,t],wo(e)))},clearTimeout:function(n){return clearTimeout(n)},delegate:void 0};function Og(n){Ig.setTimeout(function(){throw n})}function cl(){}function kg(n){n()}var So=function(n){bo(t,n);function t(e){var i=n.call(this)||this;return i.isStopped=!1,e?(i.destination=e,rl(e)&&e.add(i)):i.destination=Ng,i}return t.create=function(e,i,s){return new Eo(e,i,s)},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,n.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}(_o),Rg=Function.prototype.bind;function Co(n,t){return Rg.call(n,t)}var Lg=function(){function n(t){this.partialObserver=t}return n.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(i){ws(i)}},n.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(i){ws(i)}else ws(t)},n.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){ws(e)}},n}(),Eo=function(n){bo(t,n);function t(e,i,s){var r=n.call(this)||this,o;if(Oe(e)||!e)o={next:e??void 0,error:i??void 0,complete:s??void 0};else{var a;r&&al.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return r.unsubscribe()},o={next:e.next&&Co(e.next,a),error:e.error&&Co(e.error,a),complete:e.complete&&Co(e.complete,a)}):o=e}return r.destination=new Lg(o),r}return t}(So);function ws(n){Og(n)}function zg(n){throw n}var Ng={closed:!0,next:cl,error:zg,complete:cl},Fg=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Bg(n){return n}function Ug(n){return n.length===0?Bg:n.length===1?n[0]:function(t){return n.reduce(function(e,i){return i(e)},t)}}(function(){function n(t){t&&(this._subscribe=t)}return n.prototype.lift=function(t){var e=new n;return e.source=this,e.operator=t,e},n.prototype.subscribe=function(t,e,i){var s=this,r=Yg(t)?t:new Eo(t,e,i);return kg(function(){var o=s,a=o.operator,c=o.source;r.add(a?a.call(r,c):c?s._subscribe(r):s._trySubscribe(r))}),r},n.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},n.prototype.forEach=function(t,e){var i=this;return e=hl(e),new e(function(s,r){var o=new Eo({next:function(a){try{t(a)}catch(c){r(c),o.unsubscribe()}},error:r,complete:s});i.subscribe(o)})},n.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},n.prototype[Fg]=function(){return this},n.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Ug(t)(this)},n.prototype.toPromise=function(t){var e=this;return t=hl(t),new t(function(i,s){var r;e.subscribe(function(o){return r=o},function(o){return s(o)},function(){return i(r)})})},n.create=function(t){return new n(t)},n})();function hl(n){var t;return(t=n??al.Promise)!==null&&t!==void 0?t:Promise}function Vg(n){return n&&Oe(n.next)&&Oe(n.error)&&Oe(n.complete)}function Yg(n){return n&&n instanceof So||Vg(n)&&rl(n)}(function(n){bo(t,n);function t(e,i,s,r,o,a){var c=n.call(this,e)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=i?function(h){try{i(h)}catch(l){e.error(l)}}:n.prototype._next,c._error=r?function(h){try{r(h)}catch(l){e.error(l)}finally{this.unsubscribe()}}:n.prototype._error,c._complete=s?function(){try{s()}catch(h){e.error(h)}finally{this.unsubscribe()}}:n.prototype._complete,c}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var i=this.closed;n.prototype.unsubscribe.call(this),!i&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t})(So);function $g(){const n=V.navigator?.userAgent,t=n.indexOf("MSIE ");if(t>0)return parseInt(n.substring(t+5,n.indexOf(".",t)),10);if(n.indexOf("Trident/")>0){const i=n.indexOf("rv:");return parseInt(n.substring(i+3,n.indexOf(".",i)),10)}const e=n.indexOf("Edge/");return e>0?parseInt(n.substring(e+5,n.indexOf(".",e)),10):-1}$g(),V.document&&V.document.documentMode&&V.document.documentMode,V.document&&V.document.documentMode&&V.document.documentMode,V.document&&V.document.documentMode&&V.document.documentMode,!!(V.Worker&&V.Blob&&V.Promise&&V.OffscreenCanvas&&V.OffscreenCanvasRenderingContext2D&&V.HTMLCanvasElement&&V.HTMLCanvasElement.prototype.transferControlToOffscreen&&V.URL&&V.URL.createObjectURL);const Gg=(()=>{if(!V.OffscreenCanvas)return!1;const n=new OffscreenCanvas(1,1),t=n.getContext("2d");if(!t)return!1;t.fillRect(0,0,1,1);const e=n.transferToImageBitmap();try{t.createPattern(e,"no-repeat")}catch{return!1}return!0})(),ll=V.crypto;ll?.subtle;function ul(){try{return ll.randomUUID()}catch{let n=new Date().getTime();return"xxxxxxxx-xxxx-xxxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=(n+Math.random()*16)%16|0;return n=Math.floor(n/16),(t=="x"?e:e&3|8).toString(16)})}}const Xg="\uFEFF";function jg(n){return n.startsWith(Xg)?n.slice(1):n}function Wg(n){try{return{ok:!0,value:JSON.parse(jg(n))}}catch{return{ok:!1}}}fg(Wg,{createCache:()=>new lo({max:50}),cacheKeyResolver:n=>n});const To=10,fl=(n=0)=>t=>`\x1B[${t+n}m`,dl=(n=0)=>t=>`\x1B[${38+n};5;${t}m`,ml=(n=0)=>(t,e,i)=>`\x1B[${38+n};2;${t};${e};${i}m`,ct={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(ct.modifier);const Hg=Object.keys(ct.color),qg=Object.keys(ct.bgColor);[...Hg,...qg];function Jg(){const n=new Map;for(const[t,e]of Object.entries(ct)){for(const[i,s]of Object.entries(e))ct[i]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},e[i]=ct[i],n.set(s[0],s[1]);Object.defineProperty(ct,t,{value:e,enumerable:!1})}return Object.defineProperty(ct,"codes",{value:n,enumerable:!1}),ct.color.close="\x1B[39m",ct.bgColor.close="\x1B[49m",ct.color.ansi=fl(),ct.color.ansi256=dl(),ct.color.ansi16m=ml(),ct.bgColor.ansi=fl(To),ct.bgColor.ansi256=dl(To),ct.bgColor.ansi16m=ml(To),Object.defineProperties(ct,{rgbToAnsi256:{value(t,e,i){return t===e&&e===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(e/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(t){const e=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!e)return[0,0,0];let[i]=e;i.length===3&&(i=[...i].map(r=>r+r).join(""));const s=Number.parseInt(i,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:t=>ct.rgbToAnsi256(...ct.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let e,i,s;if(t>=232)e=((t-232)*10+8)/255,i=e,s=e;else{t-=16;const a=t%36;e=Math.floor(t/36)/5,i=Math.floor(a/6)/5,s=a%6/5}const r=Math.max(e,i,s)*2;if(r===0)return 30;let o=30+(Math.round(s)<<2|Math.round(i)<<1|Math.round(e));return r===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,e,i)=>ct.ansi256ToAnsi(ct.rgbToAnsi256(t,e,i)),enumerable:!1},hexToAnsi:{value:t=>ct.ansi256ToAnsi(ct.hexToAnsi256(t)),enumerable:!1}}),ct}const Kg=Jg(),Zg=0;new Set(Kg.codes.values()).delete(Zg);const mi={1:"rgb(10,194,210)",2:"rgb(123,183,250)",3:"rgb(96,215,169)",4:"rgb(253,193,98)",5:"rgb(253,106,98)",6:"rgb(246,141,187)",7:"rgb(38,204,255)",8:"rgb(162,90,253)",9:"rgb(255,94,126)",10:"rgb(136,255,90)",11:"rgb(252,255,66)",12:"rgb(255,166,45)",13:"rgb(255,54,255)",14:"rgb(220,73,22)",15:"rgb(104,113,177)",16:"rgb(209,185,53)",17:"rgb(27,188,155)",18:"rgb(255,127,80)",19:"rgb(75,191,195)",20:"rgb(255,153,0)",black:"rgb(0,0,0)",blue:"rgb(0,0,255)",brightblue:"rgb(59,142,234)",terminalblue:"rgb(36,114,200)",red:"rgb(255,0,0)",brightred:"rgb(241,76,76)",terminalred:"rgb(205,49,49)",white:"rgb(255,255,255)",terminalwhite:"rgb(229,229,229)",yellow:"rgb(255,255,0)",brightyellow:"rgb(245,245,67)",terminalyellow:"rgb(229,229,16)",yellowgreen:"rgb(154,205,50)",aliceblue:"rgb(240,248,255)",antiquewhite:"rgb(250,235,215)",aqua:"rgb(0,255,255)",aquamarine:"rgb(127,255,212)",azure:"rgb(240,255,255)",beige:"rgb(245,245,220)",bisque:"rgb(255,228,196)",blanchedalmond:"rgb(255,235,205)",blueviolet:"rgb(138,43,226)",brown:"rgb(165,42,42)",burlywood:"rgb(222,184,135)",cadetblue:"rgb(95,158,160)",chartreuse:"rgb(127,255,0)",chocolate:"rgb(210,105,30)",coral:"rgb(255,127,80)",cornflowerblue:"rgb(100,149,237)",cornsilk:"rgb(255,248,220)",crimson:"rgb(220,20,60)",cyan:"rgb(0,255,255)",brightcyan:"rgb(41,184,219)",terminalcyan:"rgb(17,168,205)",darkblue:"rgb(0,0,139)",darkcyan:"rgb(0,139,139)",darkgoldenrod:"rgb(184,134,11)",darkgray:"rgb(169,169,169)",darkgreen:"rgb(0,100,0)",darkgrey:"rgb(30,30,30)",darkkhaki:"rgb(189,183,107)",darkmagenta:"rgb(139,0,139)",darkolivegreen:"rgb(85,107,47)",darkorange:"rgb(255,140,0)",darkorchid:"rgb(153,50,204)",darkred:"rgb(139,0,0)",darksalmon:"rgb(233,150,122)",darkseagreen:"rgb(143,188,143)",darkslateblue:"rgb(72,61,139)",darkslategray:"rgb(47,79,79)",darkslategrey:"rgb(47,79,79)",darkturquoise:"rgb(0,206,209)",darkviolet:"rgb(148,0,211)",deeppink:"rgb(255,20,147)",deepskyblue:"rgb(0,191,255)",dimgray:"rgb(105,105,105)",dodgerblue:"rgb(30,144,255)",firebrick:"rgb(178,34,34)",floralwhite:"rgb(255,250,240)",forestgreen:"rgb(34,139,34)",fuchsia:"rgb(255,0,255)",gainsboro:"rgb(220,220,220)",ghostwhite:"rgb(248,248,255)",gold:"rgb(255,215,0)",goldenrod:"rgb(218,165,32)",grey:"rgb(128,128,128)",green:"rgb(0,128,0)",brightgreen:"rgb(35,209,139)",terminalgreen:"rgb(13,188,121)",greenyellow:"rgb(173,255,47)",honeydew:"rgb(240,255,240)",hotpink:"rgb(255,105,180)",indianred:"rgb(205,92,92)",indigo:"rgb(75,0,130)",ivory:"rgb(255,255,240)",khaki:"rgb(240,230,140)",lavender:"rgb(230,230,250)",lavenderblush:"rgb(255,240,245)",lawngreen:"rgb(124,252,0)",lemonchiffon:"rgb(255,250,205)",lightblue:"rgb(173,216,230)",lightcoral:"rgb(240,128,128)",lightcyan:"rgb(224,255,255)",lightgoldenrodyellow:"rgb(250,250,210)",lightgreen:"rgb(144,238,144)",lightgrey:"rgb(229,229,229)",lightpink:"rgb(255,182,193)",lightsalmon:"rgb(255,160,122)",lightseagreen:"rgb(32,178,170)",lightskyblue:"rgb(135,206,250)",lightslategray:"rgb(119,136,153)",lightslategrey:"rgb(119,136,153)",lightsteelblue:"rgb(176,196,222)",lightyellow:"rgb(255,255,224)",lime:"rgb(0,255,0)",limegreen:"rgb(50,205,50)",linen:"rgb(250,240,230)",magenta:"rgb(255,0,255)",brightmagenta:"rgb(214,112,214)",terminalmagenta:"rgb(188,63,188)",maroon:"rgb(128,0,0)",mediumaquamarine:"rgb(102,205,170)",mediumblue:"rgb(0,0,205)",mediumorchid:"rgb(186,85,211)",mediumpurple:"rgb(147,112,219)",mediumseagreen:"rgb(60,179,113)",mediumslateblue:"rgb(123,104,238)",mediumspringgreen:"rgb(0,250,154)",mediumturquoise:"rgb(72,209,204)",mediumvioletred:"rgb(199,21,133)",midnightblue:"rgb(25,25,112)",mintcream:"rgb(245,255,250)",mistyrose:"rgb(255,228,225)",moccasin:"rgb(255,228,181)",navajowhite:"rgb(255,222,173)",navy:"rgb(0,0,128)",oldlace:"rgb(253,245,230)",olive:"rgb(128,128,0)",olivedrab:"rgb(107,142,35)",orange:"rgb(255,165,0)",orangered:"rgb(255,69,0)",orchid:"rgb(218,112,214)",palegoldenrod:"rgb(238,232,170)",palegreen:"rgb(152,251,152)",paleturquoise:"rgb(175,238,238)",palevioletred:"rgb(219,112,147)",papayawhip:"rgb(255,239,213)",peachpuff:"rgb(255,218,185)",peru:"rgb(205,133,63)",pink:"rgb(255,192,203)",plum:"rgb(221,160,221)",powderblue:"rgb(176,224,230)",purple:"rgb(128,0,128)",rebeccapurple:"rgb(102,51,153)",rosybrown:"rgb(188,143,143)",royalblue:"rgb(65,105,225)",saddlebrown:"rgb(139,69,19)",salmon:"rgb(250,128,114)",sandybrown:"rgb(244,164,96)",seagreen:"rgb(46,139,87)",seashell:"rgb(255,245,238)",sienna:"rgb(160,82,45)",silver:"rgb(192,192,192)",skyblue:"rgb(135,206,235)",slateblue:"rgb(106,90,205)",slategray:"rgb(112,128,144)",slategrey:"rgb(112,128,144)",snow:"rgb(255,250,250)",springgreen:"rgb(0,255,127)",steelblue:"rgb(70,130,180)",tan:"rgb(210,180,140)",teal:"rgb(0,128,128)",thistle:"rgb(216,191,216)",tomato:"rgb(255,99,71)",turquoise:"rgb(64,224,208)",violet:"rgb(238,130,238)",wheat:"rgb(245,222,179)"},Qg=Array.from(Object.values(mi));Object.entries(mi).map(([n,t])=>{const e=t;return{name:n,rgb:e,brightness:t0(e)}}).sort((n,t)=>n.brightness-t.brightness);function t0(n){const[t,e,i]=n.replace("rgb(","").replace(")","").split(",").map(Number);return .2126*t+.7152*e+.0722*i}class ue{_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 Set Unknown Error: color(${t}) type(${typeof t})`;if(t instanceof ue)this.setRGB(t.r,t.g,t.b,t.a);else if(typeof t=="number")this.setHEX(t);else if(typeof t=="string"){let i;if(i=/^(\w+)\(([^)]*)\)/.exec(t)){const s=i[2];let r;switch(i[1]){case"rgb":case"rgba":(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))?(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(s))?(this.r=Y(parseFloat(r[1]),0,100)*255/100,this.g=Y(parseFloat(r[2]),0,100)*255/100,this.b=Y(parseFloat(r[3]),0,100)*255/100,this.a=r[4]?parseFloat(r[4]):1):re(e);break;case"hsl":case"hsla":(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)%\s*,\s*(\d*\.?\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))?this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,r[4]?parseFloat(r[4]):1):re(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(s))?this.setHSV(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,r[4]?parseFloat(r[4]):1):re(e);break;default:re(e)}}else if(i=/#([A-Fa-f0-9]+)/.exec(t)){const s=i[1],r=s.length;r===3?this.setRGB(parseInt(s.charAt(0),16),parseInt(s.charAt(1),16),parseInt(s.charAt(2),16),1):r===4?this.setRGB(parseInt(s.charAt(0),16),parseInt(s.charAt(1),16),parseInt(s.charAt(2),16),Y(parseInt(s.charAt(3),16)/16,0,1)):r===6||r===8?this.setHEX(parseInt(s,16)):re(e)}else if(t&&t.length>0)try{this.setColorName(t)}catch{re(e)}else re(e)}else 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):re(e)}setColor(t){return this.color=t,this}set(t){return this.setColor(t)}get r(){return this._color.r}set r(t){this._color.r=Y(Math.round(se(t,this.r)),0,255)}get g(){return this._color.g}set g(t){this._color.g=Y(Math.round(se(t,this.g)),0,255)}get b(){return this._color.b}set b(t){this._color.b=Y(Math.round(se(t,this.b)),0,255)}get a(){return this._color.a}set a(t){this._color.a=Y(se(t,this.a),0,1)}setAlpha(t){return this.a=t,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},${G(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()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b,yield this.a}clone(){return new ue(this.color)}copy(t){return this.setColor(t.color),this}copySRGBToLinear(t){return this.r=Ao(t.r),this.g=Ao(t.g),this.b=Ao(t.b),this}copyLinearToSRGB(t){return this.r=Mo(t.r),this.g=Mo(t.g),this.b=Mo(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",i="#ffffff"){if(t)return this.setColor(this.r*.299+this.g*.587+this.b*.114>186?e:i);{const{r:s,g:r,b:o}=this.color;return this.r=255-s,this.g=255-r,this.b=255-o,this}}closet(t="#000000",e="#ffffff"){return this.opposite(!0,t,e).opposite(!0,t,e)}lighten(t){t=Y(t,0,1);const{r:e,g:i,b:s,a:r}=this.color;return r==0?this.a=t:(this.r=e+(255-e)*t,this.g=i+(255-i)*t,this.b=s+(255-s)*t),this}darken(t){t=Y(t,0,1);const{r:e,g:i,b:s,a:r}=this.color;return r==0?this.a=t:(this.r=e*(1-t),this.g=i*(1-t),this.b=s*(1-t)),this}lerp(t,e){e=Y(e,0,1);const{r:i,g:s,b:r}=this.color;return this.r=i+(t.r-i)*e,this.g=s+(t.g-s)*e,this.b=r+(t.b-r)*e,this}lerpColors(t,e,i){return i=Y(i,0,1),this.r=t.r+(e.r-t.r)*i,this.g=t.g+(e.g-t.g)*i,this.b=t.b+(e.b-t.b)*i,this}static gradient(t,e,i){try{return Po.lerpColors(new ue(t),new ue(e),i).toString()}catch{return e}}static random(){return Po.setHEX(Math.random()*16777215).toString()}static nextIndex=0;static next(t=ue.nextIndex){ue.nextIndex=t;const e=Object.keys(mi),i=e.length;return Po.set(mi[e[ue.nextIndex++%i]]).toString()}setColorName(t){const e=mi[t.toLowerCase()];return e!==void 0?this.set(e):t==="none"?this.a=0:(this.a=1,re("Color.setColorName: Unknown color "+t)),this}setRGB(t,e,i,s=1){return this.r=t,this.g=e,this.b=i,this.a=s,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,i,s=1){const r=Kp(t,1),o=Y(e,0,1),a=Y(i,0,1);if(o===0)this.r=a*255,this.g=a*255,this.b=a*255;else{const c=a<=.5?a*(1+o):a+o-a*o,h=2*a-c;this.r=Do(h,c,r+1/3)*255,this.g=Do(h,c,r)*255,this.b=Do(h,c,r-1/3)*255}return this.a=s,this}getHSL(t){const e=this.r,i=this.g,s=this.b,r=Math.max(e,i,s)/255,o=Math.min(e,i,s)/255;let a,c;const h=(o+r)/2;if(o===r)a=0,c=0;else{const l=r-o;switch(c=h<=.5?l/(r+o):l/(2-r-o),r){case e:a=(i-s)/l+(i<s?6:0);break;case i:a=(s-e)/l+2;break;case s:default:a=(e-i)/l+4;break}a/=6}return t&&t.setHSL(a,c,h,this.a),{h:a,s:c,l:h,a:this.a}}offsetHSL(t,e,i){const s=this.getHSL();return this.setHSL(s.h+t,s.s+e,s.l+i)}lerpHSL(t,e){const i=this.getHSL(),s=t.getHSL(),r=fs(i.h,s.h,e),o=fs(i.s,s.s,e),a=fs(i.l,s.l,e);return this.setHSL(r,o,a),this}setHSV(t,e,i,s=1){const r=Y(t,0,1)*360,o=Y(e,0,1),a=Y(i,0,1),c=Math.floor(r/60)%6,h=r/60-Math.floor(r/60),l=a*(1-o),u=a*(1-h*o),d=a*(1-(1-h)*o),f=[[a,d,l],[u,a,l],[l,a,d],[l,u,a],[d,l,a],[a,l,u]][c];return this.r=f[0]*255,this.g=f[1]*255,this.b=f[2]*255,this.a=s,this}setHSB(t,e,i,s=1){this.setHSV(t,e,i,s)}getHSV(t){const{r:e,g:i,b:s,a:r}=this.color,o=Math.max(e,i,s),a=Math.min(e,i,s),c=o-a;let h;e===o?h=(i-s)/c:i===o?h=2+(s-e)/c:h=4+(e-i)/c,h/=6,h<0&&(h+=1);const l=c==0?0:h,u=o===0?0:c/o,d=o/255;return t&&t.setHSV(l,u,d,r),{h:l,s:u,v:d,a:r}}getHSB(t){const{h:e,s:i,v:s,a:r}=this.getHSV(t);return{h:e,s:i,b:s,a:r}}}const Po=new ue;function Ao(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Mo(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}function Do(n,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?n+(t-n)*6*e:e<1/2?t:e<2/3?n+(t-n)*6*(2/3-e):n}function e0(n=window.location.href,t){try{return new URL(n,t)}catch{const e="(?<protocol>https?:)",i="(?<host>(?<hostname>[^/#?:]+)(?::(?<port>\\d+))?)",s="(?<pathname>(?:\\/[^/#?]+)*\\/?)",r="(?<search>(?:\\?[^#]*)?)",o="(?<hash>(?:#.*)?)",a=new RegExp(`^${e}//${i}${s}${r}${o}$`).exec(n);return{href:n,protocol:a?.groups?.protocol||"",host:a?.groups?.host||"",hostname:a?.groups?.hostname||"",port:a?.groups?.port||"",pathname:a?.groups?.pathname||"",search:a?.groups?.search||"",hash:a?.groups?.hash||""}}}function n0(n=window.location.href){const t=e0(n),e=t.href.indexOf(t.hash);return t.hash&&e>=0?t.href.substring(0,e):t.href}function i0(n,t){return n+t.replace(/^[&?]/,n.indexOf("?")>=0?"&":"?")}function s0(n){return"?"+Object.entries(n).map(([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`).join("&")}function r0(n){return"?"+[...n.entries()].map(t=>encodeURIComponent(t[0])+"="+encodeURIComponent(t[1]instanceof File?t[1].name:t[1])).join("&")}function pl(n,t){return function(){return n.apply(t,arguments)}}const{toString:o0}=Object.prototype,{getPrototypeOf:Io}=Object,vs=(n=>t=>{const e=o0.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),fe=n=>(n=n.toLowerCase(),t=>vs(t)===n),xs=n=>t=>typeof t===n,{isArray:Gn}=Array,pi=xs("undefined");function a0(n){return n!==null&&!pi(n)&&n.constructor!==null&&!pi(n.constructor)&&Kt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const gl=fe("ArrayBuffer");function c0(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&gl(n.buffer),t}const h0=xs("string"),Kt=xs("function"),yl=xs("number"),_s=n=>n!==null&&typeof n=="object",l0=n=>n===!0||n===!1,Ss=n=>{if(vs(n)!=="object")return!1;const t=Io(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},u0=fe("Date"),f0=fe("File"),d0=fe("Blob"),m0=fe("FileList"),p0=n=>_s(n)&&Kt(n.pipe),g0=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||Kt(n.append)&&((t=vs(n))==="formdata"||t==="object"&&Kt(n.toString)&&n.toString()==="[object FormData]"))},y0=fe("URLSearchParams"),[b0,w0,v0,x0]=["ReadableStream","Request","Response","Headers"].map(fe),_0=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function gi(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let i,s;if(typeof n!="object"&&(n=[n]),Gn(n))for(i=0,s=n.length;i<s;i++)t.call(null,n[i],i,n);else{const r=e?Object.getOwnPropertyNames(n):Object.keys(n),o=r.length;let a;for(i=0;i<o;i++)a=r[i],t.call(null,n[a],a,n)}}function bl(n,t){t=t.toLowerCase();const e=Object.keys(n);let i=e.length,s;for(;i-- >0;)if(s=e[i],t===s.toLowerCase())return s;return null}const xn=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),wl=n=>!pi(n)&&n!==xn;function Oo(){const{caseless:n}=wl(this)&&this||{},t={},e=(i,s)=>{const r=n&&bl(t,s)||s;Ss(t[r])&&Ss(i)?t[r]=Oo(t[r],i):Ss(i)?t[r]=Oo({},i):Gn(i)?t[r]=i.slice():t[r]=i};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&gi(arguments[i],e);return t}const S0=(n,t,e,{allOwnKeys:i}={})=>(gi(t,(s,r)=>{e&&Kt(s)?n[r]=pl(s,e):n[r]=s},{allOwnKeys:i}),n),C0=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),E0=(n,t,e,i)=>{n.prototype=Object.create(t.prototype,i),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},T0=(n,t,e,i)=>{let s,r,o;const a={};if(t=t||{},n==null)return t;do{for(s=Object.getOwnPropertyNames(n),r=s.length;r-- >0;)o=s[r],(!i||i(o,n,t))&&!a[o]&&(t[o]=n[o],a[o]=!0);n=e!==!1&&Io(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},P0=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const i=n.indexOf(t,e);return i!==-1&&i===e},A0=n=>{if(!n)return null;if(Gn(n))return n;let t=n.length;if(!yl(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},M0=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Io(Uint8Array)),D0=(n,t)=>{const e=(n&&n[Symbol.iterator]).call(n);let i;for(;(i=e.next())&&!i.done;){const s=i.value;t.call(n,s[0],s[1])}},I0=(n,t)=>{let e;const i=[];for(;(e=n.exec(t))!==null;)i.push(e);return i},O0=fe("HTMLFormElement"),k0=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,i){return e.toUpperCase()+i}),vl=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),R0=fe("RegExp"),xl=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),i={};gi(e,(s,r)=>{let o;(o=t(s,r,n))!==!1&&(i[r]=o||s)}),Object.defineProperties(n,i)},L0=n=>{xl(n,(t,e)=>{if(Kt(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const i=n[e];if(Kt(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},z0=(n,t)=>{const e={},i=s=>{s.forEach(r=>{e[r]=!0})};return Gn(n)?i(n):i(String(n).split(t)),e},N0=()=>{},F0=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function B0(n){return!!(n&&Kt(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const U0=n=>{const t=new Array(10),e=(i,s)=>{if(_s(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[s]=i;const r=Gn(i)?[]:{};return gi(i,(o,a)=>{const c=e(o,s+1);!pi(c)&&(r[a]=c)}),t[s]=void 0,r}}return i};return e(n,0)},V0=fe("AsyncFunction"),Y0=n=>n&&(_s(n)||Kt(n))&&Kt(n.then)&&Kt(n.catch),_l=((n,t)=>n?setImmediate:t?((e,i)=>(xn.addEventListener("message",({source:s,data:r})=>{s===xn&&r===e&&i.length&&i.shift()()},!1),s=>{i.push(s),xn.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",Kt(xn.postMessage)),$0=typeof queueMicrotask<"u"?queueMicrotask.bind(xn):typeof process<"u"&&process.nextTick||_l,M={isArray:Gn,isArrayBuffer:gl,isBuffer:a0,isFormData:g0,isArrayBufferView:c0,isString:h0,isNumber:yl,isBoolean:l0,isObject:_s,isPlainObject:Ss,isReadableStream:b0,isRequest:w0,isResponse:v0,isHeaders:x0,isUndefined:pi,isDate:u0,isFile:f0,isBlob:d0,isRegExp:R0,isFunction:Kt,isStream:p0,isURLSearchParams:y0,isTypedArray:M0,isFileList:m0,forEach:gi,merge:Oo,extend:S0,trim:_0,stripBOM:C0,inherits:E0,toFlatObject:T0,kindOf:vs,kindOfTest:fe,endsWith:P0,toArray:A0,forEachEntry:D0,matchAll:I0,isHTMLForm:O0,hasOwnProperty:vl,hasOwnProp:vl,reduceDescriptors:xl,freezeMethods:L0,toObjectSet:z0,toCamelCase:k0,noop:N0,toFiniteNumber:F0,findKey:bl,global:xn,isContextDefined:wl,isSpecCompliantForm:B0,toJSONObject:U0,isAsyncFn:V0,isThenable:Y0,setImmediate:_l,asap:$0};function W(n,t,e,i,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),i&&(this.request=i),s&&(this.response=s,this.status=s.status?s.status:null)}M.inherits(W,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:M.toJSONObject(this.config),code:this.code,status:this.status}}});const Sl=W.prototype,Cl={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{Cl[n]={value:n}}),Object.defineProperties(W,Cl),Object.defineProperty(Sl,"isAxiosError",{value:!0}),W.from=(n,t,e,i,s,r)=>{const o=Object.create(Sl);return M.toFlatObject(n,o,function(a){return a!==Error.prototype},a=>a!=="isAxiosError"),W.call(o,n.message,t,e,i,s),o.cause=n,o.name=n.name,r&&Object.assign(o,r),o};const G0=null;function ko(n){return M.isPlainObject(n)||M.isArray(n)}function El(n){return M.endsWith(n,"[]")?n.slice(0,-2):n}function Tl(n,t,e){return n?n.concat(t).map(function(i,s){return i=El(i),!e&&s?"["+i+"]":i}).join(e?".":""):t}function X0(n){return M.isArray(n)&&!n.some(ko)}const j0=M.toFlatObject(M,{},null,function(n){return/^is[A-Z]/.test(n)});function Cs(n,t,e){if(!M.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=M.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,p){return!M.isUndefined(p[f])});const i=e.metaTokens,s=e.visitor||h,r=e.dots,o=e.indexes,a=(e.Blob||typeof Blob<"u"&&Blob)&&M.isSpecCompliantForm(t);if(!M.isFunction(s))throw new TypeError("visitor must be a function");function c(f){if(f===null)return"";if(M.isDate(f))return f.toISOString();if(!a&&M.isBlob(f))throw new W("Blob is not supported. Use a Buffer instead.");return M.isArrayBuffer(f)||M.isTypedArray(f)?a&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function h(f,p,m){let v=f;if(f&&!m&&typeof f=="object"){if(M.endsWith(p,"{}"))p=i?p:p.slice(0,-2),f=JSON.stringify(f);else if(M.isArray(f)&&X0(f)||(M.isFileList(f)||M.endsWith(p,"[]"))&&(v=M.toArray(f)))return p=El(p),v.forEach(function(y,b){!(M.isUndefined(y)||y===null)&&t.append(o===!0?Tl([p],b,r):o===null?p:p+"[]",c(y))}),!1}return ko(f)?!0:(t.append(Tl(m,p,r),c(f)),!1)}const l=[],u=Object.assign(j0,{defaultVisitor:h,convertValue:c,isVisitable:ko});function d(f,p){if(!M.isUndefined(f)){if(l.indexOf(f)!==-1)throw Error("Circular reference detected in "+p.join("."));l.push(f),M.forEach(f,function(m,v){(!(M.isUndefined(m)||m===null)&&s.call(t,m,M.isString(v)?v.trim():v,p,u))===!0&&d(m,p?p.concat(v):[v])}),l.pop()}}if(!M.isObject(n))throw new TypeError("data must be an object");return d(n),t}function Pl(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Ro(n,t){this._pairs=[],n&&Cs(n,this,t)}const Al=Ro.prototype;Al.append=function(n,t){this._pairs.push([n,t])},Al.toString=function(n){const t=n?function(e){return n.call(this,e,Pl)}:Pl;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function W0(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ml(n,t,e){if(!t)return n;const i=e&&e.encode||W0;M.isFunction(e)&&(e={serialize:e});const s=e&&e.serialize;let r;if(s?r=s(t,e):r=M.isURLSearchParams(t)?t.toString():new Ro(t,e).toString(i),r){const o=n.indexOf("#");o!==-1&&(n=n.slice(0,o)),n+=(n.indexOf("?")===-1?"?":"&")+r}return n}class H0{constructor(){this.handlers=[]}use(t,e,i){return this.handlers.push({fulfilled:t,rejected:e,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){M.forEach(this.handlers,function(e){e!==null&&t(e)})}}const Dl=H0,Il={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},q0=typeof URLSearchParams<"u"?URLSearchParams:Ro,J0=typeof FormData<"u"?FormData:null,K0=typeof Blob<"u"?Blob:null,Z0={isBrowser:!0,classes:{URLSearchParams:q0,FormData:J0,Blob:K0},protocols:["http","https","file","blob","url","data"]},Lo=typeof window<"u"&&typeof document<"u",zo=typeof navigator=="object"&&navigator||void 0,Q0=Lo&&(!zo||["ReactNative","NativeScript","NS"].indexOf(zo.product)<0),ty=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),ey=Lo&&window.location.href||"http://localhost",ny=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Lo,hasStandardBrowserEnv:Q0,hasStandardBrowserWebWorkerEnv:ty,navigator:zo,origin:ey},Symbol.toStringTag,{value:"Module"})),kt={...ny,...Z0};function iy(n,t){return Cs(n,new kt.classes.URLSearchParams,Object.assign({visitor:function(e,i,s,r){return kt.isNode&&M.isBuffer(e)?(this.append(i,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}function sy(n){return M.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function ry(n){const t={},e=Object.keys(n);let i;const s=e.length;let r;for(i=0;i<s;i++)r=e[i],t[r]=n[r];return t}function Ol(n){function t(e,i,s,r){let o=e[r++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),c=r>=e.length;return o=!o&&M.isArray(s)?s.length:o,c?(M.hasOwnProp(s,o)?s[o]=[s[o],i]:s[o]=i,!a):((!s[o]||!M.isObject(s[o]))&&(s[o]=[]),t(e,i,s[o],r)&&M.isArray(s[o])&&(s[o]=ry(s[o])),!a)}if(M.isFormData(n)&&M.isFunction(n.entries)){const e={};return M.forEachEntry(n,(i,s)=>{t(sy(i),s,e,0)}),e}return null}function oy(n,t,e){if(M.isString(n))try{return(t||JSON.parse)(n),M.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(e||JSON.stringify)(n)}const No={transitional:Il,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",i=e.indexOf("application/json")>-1,s=M.isObject(n);if(s&&M.isHTMLForm(n)&&(n=new FormData(n)),M.isFormData(n))return i?JSON.stringify(Ol(n)):n;if(M.isArrayBuffer(n)||M.isBuffer(n)||M.isStream(n)||M.isFile(n)||M.isBlob(n)||M.isReadableStream(n))return n;if(M.isArrayBufferView(n))return n.buffer;if(M.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let r;if(s){if(e.indexOf("application/x-www-form-urlencoded")>-1)return iy(n,this.formSerializer).toString();if((r=M.isFileList(n))||e.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return Cs(r?{"files[]":n}:n,o&&new o,this.formSerializer)}}return s||i?(t.setContentType("application/json",!1),oy(n)):n}],transformResponse:[function(n){const t=this.transitional||No.transitional,e=t&&t.forcedJSONParsing,i=this.responseType==="json";if(M.isResponse(n)||M.isReadableStream(n))return n;if(n&&M.isString(n)&&(e&&!this.responseType||i)){const s=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(n)}catch(r){if(s)throw r.name==="SyntaxError"?W.from(r,W.ERR_BAD_RESPONSE,this,null,this.response):r}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:kt.classes.FormData,Blob:kt.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};M.forEach(["delete","get","head","post","put","patch"],n=>{No.headers[n]={}});const Fo=No,ay=M.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"]),cy=n=>{const t={};let e,i,s;return n&&n.split(`
|
|
14
|
+
`).forEach(function(r){s=r.indexOf(":"),e=r.substring(0,s).trim().toLowerCase(),i=r.substring(s+1).trim(),!(!e||t[e]&&ay[e])&&(e==="set-cookie"?t[e]?t[e].push(i):t[e]=[i]:t[e]=t[e]?t[e]+", "+i:i)}),t},kl=Symbol("internals");function yi(n){return n&&String(n).trim().toLowerCase()}function Es(n){return n===!1||n==null?n:M.isArray(n)?n.map(Es):String(n)}function hy(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=e.exec(n);)t[i[1]]=i[2];return t}const ly=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Bo(n,t,e,i,s){if(M.isFunction(i))return i.call(this,t,e);if(s&&(t=e),!!M.isString(t)){if(M.isString(i))return t.indexOf(i)!==-1;if(M.isRegExp(i))return i.test(t)}}function uy(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,i)=>e.toUpperCase()+i)}function fy(n,t){const e=M.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(n,i+e,{value:function(s,r,o){return this[i].call(this,t,s,r,o)},configurable:!0})})}class Ts{constructor(t){t&&this.set(t)}set(t,e,i){const s=this;function r(a,c,h){const l=yi(c);if(!l)throw new Error("header name must be a non-empty string");const u=M.findKey(s,l);(!u||s[u]===void 0||h===!0||h===void 0&&s[u]!==!1)&&(s[u||c]=Es(a))}const o=(a,c)=>M.forEach(a,(h,l)=>r(h,l,c));if(M.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(M.isString(t)&&(t=t.trim())&&!ly(t))o(cy(t),e);else if(M.isHeaders(t))for(const[a,c]of t.entries())r(c,a,i);else t!=null&&r(e,t,i);return this}get(t,e){if(t=yi(t),t){const i=M.findKey(this,t);if(i){const s=this[i];if(!e)return s;if(e===!0)return hy(s);if(M.isFunction(e))return e.call(this,s,i);if(M.isRegExp(e))return e.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=yi(t),t){const i=M.findKey(this,t);return!!(i&&this[i]!==void 0&&(!e||Bo(this,this[i],i,e)))}return!1}delete(t,e){const i=this;let s=!1;function r(o){if(o=yi(o),o){const a=M.findKey(i,o);a&&(!e||Bo(i,i[a],a,e))&&(delete i[a],s=!0)}}return M.isArray(t)?t.forEach(r):r(t),s}clear(t){const e=Object.keys(this);let i=e.length,s=!1;for(;i--;){const r=e[i];(!t||Bo(this,this[r],r,t,!0))&&(delete this[r],s=!0)}return s}normalize(t){const e=this,i={};return M.forEach(this,(s,r)=>{const o=M.findKey(i,r);if(o){e[o]=Es(s),delete e[r];return}const a=t?uy(r):String(r).trim();a!==r&&delete e[r],e[a]=Es(s),i[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return M.forEach(this,(i,s)=>{i!=null&&i!==!1&&(e[s]=t&&M.isArray(i)?i.join(", "):i)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
|
15
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const i=new this(t);return e.forEach(s=>i.set(s)),i}static accessor(t){const e=(this[kl]=this[kl]={accessors:{}}).accessors,i=this.prototype;function s(r){const o=yi(r);e[o]||(fy(i,r),e[o]=!0)}return M.isArray(t)?t.forEach(s):s(t),this}}Ts.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),M.reduceDescriptors(Ts.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(i){this[e]=i}}}),M.freezeMethods(Ts);const de=Ts;function Uo(n,t){const e=this||Fo,i=t||e,s=de.from(i.headers);let r=i.data;return M.forEach(n,function(o){r=o.call(e,r,s.normalize(),t?t.status:void 0)}),s.normalize(),r}function Rl(n){return!!(n&&n.__CANCEL__)}function Xn(n,t,e){W.call(this,n??"canceled",W.ERR_CANCELED,t,e),this.name="CanceledError"}M.inherits(Xn,W,{__CANCEL__:!0});function Ll(n,t,e){const i=e.config.validateStatus;!e.status||!i||i(e.status)?n(e):t(new W("Request failed with status code "+e.status,[W.ERR_BAD_REQUEST,W.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function dy(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function my(n,t){n=n||10;const e=new Array(n),i=new Array(n);let s=0,r=0,o;return t=t!==void 0?t:1e3,function(a){const c=Date.now(),h=i[r];o||(o=c),e[s]=a,i[s]=c;let l=r,u=0;for(;l!==s;)u+=e[l++],l=l%n;if(s=(s+1)%n,s===r&&(r=(r+1)%n),c-o<t)return;const d=h&&c-h;return d?Math.round(u*1e3/d):void 0}}function py(n,t){let e=0,i=1e3/t,s,r;const o=(a,c=Date.now())=>{e=c,s=null,r&&(clearTimeout(r),r=null),n.apply(null,a)};return[(...a)=>{const c=Date.now(),h=c-e;h>=i?o(a,c):(s=a,r||(r=setTimeout(()=>{r=null,o(s)},i-h)))},()=>s&&o(s)]}const Ps=(n,t,e=3)=>{let i=0;const s=my(50,250);return py(r=>{const o=r.loaded,a=r.lengthComputable?r.total:void 0,c=o-i,h=s(c),l=o<=a;i=o;const u={loaded:o,total:a,progress:a?o/a:void 0,bytes:c,rate:h||void 0,estimated:h&&a&&l?(a-o)/h:void 0,event:r,lengthComputable:a!=null,[t?"download":"upload"]:!0};n(u)},e)},zl=(n,t)=>{const e=n!=null;return[i=>t[0]({lengthComputable:e,total:n,loaded:i}),t[1]]},Nl=n=>(...t)=>M.asap(()=>n(...t)),gy=kt.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,kt.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(kt.origin),kt.navigator&&/(msie|trident)/i.test(kt.navigator.userAgent)):()=>!0,yy=kt.hasStandardBrowserEnv?{write(n,t,e,i,s,r){const o=[n+"="+encodeURIComponent(t)];M.isNumber(e)&&o.push("expires="+new Date(e).toGMTString()),M.isString(i)&&o.push("path="+i),M.isString(s)&&o.push("domain="+s),r===!0&&o.push("secure"),document.cookie=o.join("; ")},read(n){const t=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function by(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function wy(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function Fl(n,t,e){let i=!by(t);return n&&(i||e==!1)?wy(n,t):t}const Bl=n=>n instanceof de?{...n}:n;function _n(n,t){t=t||{};const e={};function i(h,l,u,d){return M.isPlainObject(h)&&M.isPlainObject(l)?M.merge.call({caseless:d},h,l):M.isPlainObject(l)?M.merge({},l):M.isArray(l)?l.slice():l}function s(h,l,u,d){if(M.isUndefined(l)){if(!M.isUndefined(h))return i(void 0,h,u,d)}else return i(h,l,u,d)}function r(h,l){if(!M.isUndefined(l))return i(void 0,l)}function o(h,l){if(M.isUndefined(l)){if(!M.isUndefined(h))return i(void 0,h)}else return i(void 0,l)}function a(h,l,u){if(u in t)return i(h,l);if(u in n)return i(void 0,h)}const c={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:(h,l,u)=>s(Bl(h),Bl(l),u,!0)};return M.forEach(Object.keys(Object.assign({},n,t)),function(h){const l=c[h]||s,u=l(n[h],t[h],h);M.isUndefined(u)&&l!==a||(e[h]=u)}),e}const Ul=n=>{const t=_n({},n);let{data:e,withXSRFToken:i,xsrfHeaderName:s,xsrfCookieName:r,headers:o,auth:a}=t;t.headers=o=de.from(o),t.url=Ml(Fl(t.baseURL,t.url,t.allowAbsoluteUrls),n.params,n.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(M.isFormData(e)){if(kt.hasStandardBrowserEnv||kt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){const[h,...l]=c?c.split(";").map(u=>u.trim()).filter(Boolean):[];o.setContentType([h||"multipart/form-data",...l].join("; "))}}if(kt.hasStandardBrowserEnv&&(i&&M.isFunction(i)&&(i=i(t)),i||i!==!1&&gy(t.url))){const h=s&&r&&yy.read(r);h&&o.set(s,h)}return t},vy=typeof XMLHttpRequest<"u",xy=vy&&function(n){return new Promise(function(t,e){const i=Ul(n);let s=i.data;const r=de.from(i.headers).normalize();let{responseType:o,onUploadProgress:a,onDownloadProgress:c}=i,h,l,u,d,f;function p(){d&&d(),f&&f(),i.cancelToken&&i.cancelToken.unsubscribe(h),i.signal&&i.signal.removeEventListener("abort",h)}let m=new XMLHttpRequest;m.open(i.method.toUpperCase(),i.url,!0),m.timeout=i.timeout;function v(){if(!m)return;const b=de.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),x={data:!o||o==="text"||o==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:b,config:n,request:m};Ll(function(w){t(w),p()},function(w){e(w),p()},x),m=null}"onloadend"in m?m.onloadend=v:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(v)},m.onabort=function(){m&&(e(new W("Request aborted",W.ECONNABORTED,n,m)),m=null)},m.onerror=function(){e(new W("Network Error",W.ERR_NETWORK,n,m)),m=null},m.ontimeout=function(){let b=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const x=i.transitional||Il;i.timeoutErrorMessage&&(b=i.timeoutErrorMessage),e(new W(b,x.clarifyTimeoutError?W.ETIMEDOUT:W.ECONNABORTED,n,m)),m=null},s===void 0&&r.setContentType(null),"setRequestHeader"in m&&M.forEach(r.toJSON(),function(b,x){m.setRequestHeader(x,b)}),M.isUndefined(i.withCredentials)||(m.withCredentials=!!i.withCredentials),o&&o!=="json"&&(m.responseType=i.responseType),c&&([u,f]=Ps(c,!0),m.addEventListener("progress",u)),a&&m.upload&&([l,d]=Ps(a),m.upload.addEventListener("progress",l),m.upload.addEventListener("loadend",d)),(i.cancelToken||i.signal)&&(h=b=>{m&&(e(!b||b.type?new Xn(null,n,m):b),m.abort(),m=null)},i.cancelToken&&i.cancelToken.subscribe(h),i.signal&&(i.signal.aborted?h():i.signal.addEventListener("abort",h)));const y=dy(i.url);if(y&&kt.protocols.indexOf(y)===-1){e(new W("Unsupported protocol "+y+":",W.ERR_BAD_REQUEST,n));return}m.send(s||null)})},_y=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let i=new AbortController,s;const r=function(h){if(!s){s=!0,a();const l=h instanceof Error?h:this.reason;i.abort(l instanceof W?l:new Xn(l instanceof Error?l.message:l))}};let o=t&&setTimeout(()=>{o=null,r(new W(`timeout ${t} of ms exceeded`,W.ETIMEDOUT))},t);const a=()=>{n&&(o&&clearTimeout(o),o=null,n.forEach(h=>{h.unsubscribe?h.unsubscribe(r):h.removeEventListener("abort",r)}),n=null)};n.forEach(h=>h.addEventListener("abort",r));const{signal:c}=i;return c.unsubscribe=()=>M.asap(a),c}},Sy=_y,Cy=function*(n,t){let e=n.byteLength;if(!t||e<t){yield n;return}let i=0,s;for(;i<e;)s=i+t,yield n.slice(i,s),i=s},Ey=async function*(n,t){for await(const e of Ty(n))yield*Cy(e,t)},Ty=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:i}=await t.read();if(e)break;yield i}}finally{await t.cancel()}},Vl=(n,t,e,i)=>{const s=Ey(n,t);let r=0,o,a=c=>{o||(o=!0,i&&i(c))};return new ReadableStream({async pull(c){try{const{done:h,value:l}=await s.next();if(h){a(),c.close();return}let u=l.byteLength;if(e){let d=r+=u;e(d)}c.enqueue(new Uint8Array(l))}catch(h){throw a(h),h}},cancel(c){return a(c),s.return()}},{highWaterMark:2})},As=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Yl=As&&typeof ReadableStream=="function",Py=As&&(typeof TextEncoder=="function"?(n=>t=>n.encode(t))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),$l=(n,...t)=>{try{return!!n(...t)}catch{return!1}},Ay=Yl&&$l(()=>{let n=!1;const t=new Request(kt.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!t}),Gl=64*1024,Vo=Yl&&$l(()=>M.isReadableStream(new Response("").body)),Ms={stream:Vo&&(n=>n.body)};As&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ms[t]&&(Ms[t]=M.isFunction(n[t])?e=>e[t]():(e,i)=>{throw new W(`Response type '${t}' is not supported`,W.ERR_NOT_SUPPORT,i)})})})(new Response);const My=async n=>{if(n==null)return 0;if(M.isBlob(n))return n.size;if(M.isSpecCompliantForm(n))return(await new Request(kt.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(M.isArrayBufferView(n)||M.isArrayBuffer(n))return n.byteLength;if(M.isURLSearchParams(n)&&(n=n+""),M.isString(n))return(await Py(n)).byteLength},Dy=async(n,t)=>M.toFiniteNumber(n.getContentLength())??My(t),Iy=As&&(async n=>{let{url:t,method:e,data:i,signal:s,cancelToken:r,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:h,headers:l,withCredentials:u="same-origin",fetchOptions:d}=Ul(n);h=h?(h+"").toLowerCase():"text";let f=Sy([s,r&&r.toAbortSignal()],o),p;const m=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let v;try{if(c&&Ay&&e!=="get"&&e!=="head"&&(v=await Dy(l,i))!==0){let C=new Request(t,{method:"POST",body:i,duplex:"half"}),S;if(M.isFormData(i)&&(S=C.headers.get("content-type"))&&l.setContentType(S),C.body){const[D,L]=zl(v,Ps(Nl(c)));i=Vl(C.body,Gl,D,L)}}M.isString(u)||(u=u?"include":"omit");const y="credentials"in Request.prototype;p=new Request(t,{...d,signal:f,method:e.toUpperCase(),headers:l.normalize().toJSON(),body:i,duplex:"half",credentials:y?u:void 0});let b=await fetch(p);const x=Vo&&(h==="stream"||h==="response");if(Vo&&(a||x&&m)){const C={};["status","statusText","headers"].forEach(I=>{C[I]=b[I]});const S=M.toFiniteNumber(b.headers.get("content-length")),[D,L]=a&&zl(S,Ps(Nl(a),!0))||[];b=new Response(Vl(b.body,Gl,D,()=>{L&&L(),m&&m()}),C)}h=h||"text";let w=await Ms[M.findKey(Ms,h)||"text"](b,n);return!x&&m&&m(),await new Promise((C,S)=>{Ll(C,S,{data:w,headers:de.from(b.headers),status:b.status,statusText:b.statusText,config:n,request:p})})}catch(y){throw m&&m(),y&&y.name==="TypeError"&&/fetch/i.test(y.message)?Object.assign(new W("Network Error",W.ERR_NETWORK,n,p),{cause:y.cause||y}):W.from(y,y&&y.code,n,p)}}),Yo={http:G0,xhr:xy,fetch:Iy};M.forEach(Yo,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const Xl=n=>`- ${n}`,Oy=n=>M.isFunction(n)||n===null||n===!1,jl={getAdapter:n=>{n=M.isArray(n)?n:[n];const{length:t}=n;let e,i;const s={};for(let r=0;r<t;r++){e=n[r];let o;if(i=e,!Oy(e)&&(i=Yo[(o=String(e)).toLowerCase()],i===void 0))throw new W(`Unknown adapter '${o}'`);if(i)break;s[o||"#"+r]=i}if(!i){const r=Object.entries(s).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=t?r.length>1?`since :
|
|
16
|
+
`+r.map(Xl).join(`
|
|
17
|
+
`):" "+Xl(r[0]):"as no adapter specified";throw new W("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return i},adapters:Yo};function $o(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Xn(null,n)}function Wl(n){return $o(n),n.headers=de.from(n.headers),n.data=Uo.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),jl.getAdapter(n.adapter||Fo.adapter)(n).then(function(t){return $o(n),t.data=Uo.call(n,n.transformResponse,t),t.headers=de.from(t.headers),t},function(t){return Rl(t)||($o(n),t&&t.response&&(t.response.data=Uo.call(n,n.transformResponse,t.response),t.response.headers=de.from(t.response.headers))),Promise.reject(t)})}const Hl="1.8.4",Ds={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Ds[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const ql={};Ds.transitional=function(n,t,e){function i(s,r){return"[Axios v"+Hl+"] Transitional option '"+s+"'"+r+(e?". "+e:"")}return(s,r,o)=>{if(n===!1)throw new W(i(r," has been removed"+(t?" in "+t:"")),W.ERR_DEPRECATED);return t&&!ql[r]&&(ql[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(s,r,o):!0}},Ds.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function ky(n,t,e){if(typeof n!="object")throw new W("options must be an object",W.ERR_BAD_OPTION_VALUE);const i=Object.keys(n);let s=i.length;for(;s-- >0;){const r=i[s],o=t[r];if(o){const a=n[r],c=a===void 0||o(a,r,n);if(c!==!0)throw new W("option "+r+" must be "+c,W.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new W("Unknown option "+r,W.ERR_BAD_OPTION)}}const Is={assertOptions:ky,validators:Ds},ve=Is.validators;class Os{constructor(t){this.defaults=t,this.interceptors={request:new Dl,response:new Dl}}async request(t,e){try{return await this._request(t,e)}catch(i){if(i instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const r=s.stack?s.stack.replace(/^.+\n/,""):"";try{i.stack?r&&!String(i.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(i.stack+=`
|
|
18
|
+
`+r):i.stack=r}catch{}}throw i}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=_n(this.defaults,e);const{transitional:i,paramsSerializer:s,headers:r}=e;i!==void 0&&Is.assertOptions(i,{silentJSONParsing:ve.transitional(ve.boolean),forcedJSONParsing:ve.transitional(ve.boolean),clarifyTimeoutError:ve.transitional(ve.boolean)},!1),s!=null&&(M.isFunction(s)?e.paramsSerializer={serialize:s}:Is.assertOptions(s,{encode:ve.function,serialize:ve.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Is.assertOptions(e,{baseUrl:ve.spelling("baseURL"),withXsrfToken:ve.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=r&&M.merge(r.common,r[e.method]);r&&M.forEach(["delete","get","head","post","put","patch","common"],p=>{delete r[p]}),e.headers=de.concat(o,r);const a=[];let c=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(e)===!1||(c=c&&p.synchronous,a.unshift(p.fulfilled,p.rejected))});const h=[];this.interceptors.response.forEach(function(p){h.push(p.fulfilled,p.rejected)});let l,u=0,d;if(!c){const p=[Wl.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,h),d=p.length,l=Promise.resolve(e);u<d;)l=l.then(p[u++],p[u++]);return l}d=a.length;let f=e;for(u=0;u<d;){const p=a[u++],m=a[u++];try{f=p(f)}catch(v){m.call(this,v);break}}try{l=Wl.call(this,f)}catch(p){return Promise.reject(p)}for(u=0,d=h.length;u<d;)l=l.then(h[u++],h[u++]);return l}getUri(t){t=_n(this.defaults,t);const e=Fl(t.baseURL,t.url,t.allowAbsoluteUrls);return Ml(e,t.params,t.paramsSerializer)}}M.forEach(["delete","get","head","options"],function(n){Os.prototype[n]=function(t,e){return this.request(_n(e||{},{method:n,url:t,data:(e||{}).data}))}}),M.forEach(["post","put","patch"],function(n){function t(e){return function(i,s,r){return this.request(_n(r||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}Os.prototype[n]=t(),Os.prototype[n+"Form"]=t(!0)});const ks=Os;class Go{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(s){e=s});const i=this;this.promise.then(s=>{if(!i._listeners)return;let r=i._listeners.length;for(;r-- >0;)i._listeners[r](s);i._listeners=null}),this.promise.then=s=>{let r;const o=new Promise(a=>{i.subscribe(a),r=a}).then(s);return o.cancel=function(){i.unsubscribe(r)},o},t(function(s,r,o){i.reason||(i.reason=new Xn(s,r,o),e(i.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=i=>{t.abort(i)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new Go(function(e){t=e}),cancel:t}}}const Ry=Go;function Ly(n){return function(t){return n.apply(null,t)}}function zy(n){return M.isObject(n)&&n.isAxiosError===!0}const Xo={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(Xo).forEach(([n,t])=>{Xo[t]=n});const Ny=Xo;function Jl(n){const t=new ks(n),e=pl(ks.prototype.request,t);return M.extend(e,ks.prototype,t,{allOwnKeys:!0}),M.extend(e,t,null,{allOwnKeys:!0}),e.create=function(i){return Jl(_n(n,i))},e}const bt=Jl(Fo);bt.Axios=ks,bt.CanceledError=Xn,bt.CancelToken=Ry,bt.isCancel=Rl,bt.VERSION=Hl,bt.toFormData=Cs,bt.AxiosError=W,bt.Cancel=bt.CanceledError,bt.all=function(n){return Promise.all(n)},bt.spread=Ly,bt.isAxiosError=zy,bt.mergeConfig=_n,bt.AxiosHeaders=de,bt.formToJSON=n=>Ol(M.isHTMLForm(n)?new FormData(n):n),bt.getAdapter=jl.getAdapter,bt.HttpStatusCode=Ny,bt.default=bt;const Fy=bt;class By{instance;constructor(t){this.instance=Fy.create(t),this.instance.interceptors.request.use(e=>(t?.interceptors?.request?.(e),e),e=>(t?.interceptors?.requestError?.(e),Promise.reject(e))),this.instance.interceptors.response.use(e=>(t?.interceptors?.response?.(e),e.status==200,Promise.resolve(e)),e=>(t?.interceptors?.responseError?.(e),Promise.reject(e)))}request(t){let e=!1;const i=this.instance.request;return i.cancel=()=>{e=!0},i(t).then(s=>{if(e)throw new Error("Canceled!");return s})}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,i){return this.request({...i,method:"post",url:t,data:e})}postFormData(t,e,i){return i={...i,headers:{...i?.headers,"Content-Type":"multipart/form-data"}},this.request({...i,method:"post",url:t,data:e})}postForm(t,e,i){return this.instance.postForm(t,e,{...i})}put(t,e,i){return this.request({...i,method:"put",url:t,data:e})}patch(t,e,i){return this.request({...i,method:"patch",url:t,data:e})}getUri(t){return this.instance.getUri(t)}}function Uy(n,t=(e,i)=>e<=i){const e=n.length;let i=Math.floor(e/2);for(;i>0;){for(let s=i;s<e;s++){const r=n[s];let o=s;for(;o>=i&&!t(n[o-i],r);)n[o]=n[o-i],o-=i;n[o]=r}i=Math.floor(i/2)}}function Rs(n,t){const e=typeof t?.aliveInSeconds=="number"?Math.max(t.aliveInSeconds,0):-1,i=typeof t?.aliveUntilTimestamp=="number"?Math.max(t.aliveUntilTimestamp,0):-1;function s(o,a=!1){return Fp(o)||Vh(o)||Fh(o)?{value:o,timestamp:Yn()}:a&&Object.prototype.hasOwnProperty.call(o,"timestamp")?o:{...o,timestamp:Yn()}}let r=s(n,!0);return{get:()=>{let o=!1;return(e>=0&&Yn()>se(r.timestamp,0)+e*1e3||i>=0&&Yn()>i)&&(o=!0),o&&(r.value=void 0),r},set:o=>r=s(o,!1)}}function Kl(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Zl={exports:{}};(function(n,t){(function(e){n.exports=e()})(function(e){var i=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function s(y,b){var x=y[0],w=y[1],C=y[2],S=y[3];x+=(w&C|~w&S)+b[0]-680876936|0,x=(x<<7|x>>>25)+w|0,S+=(x&w|~x&C)+b[1]-389564586|0,S=(S<<12|S>>>20)+x|0,C+=(S&x|~S&w)+b[2]+606105819|0,C=(C<<17|C>>>15)+S|0,w+=(C&S|~C&x)+b[3]-1044525330|0,w=(w<<22|w>>>10)+C|0,x+=(w&C|~w&S)+b[4]-176418897|0,x=(x<<7|x>>>25)+w|0,S+=(x&w|~x&C)+b[5]+1200080426|0,S=(S<<12|S>>>20)+x|0,C+=(S&x|~S&w)+b[6]-1473231341|0,C=(C<<17|C>>>15)+S|0,w+=(C&S|~C&x)+b[7]-45705983|0,w=(w<<22|w>>>10)+C|0,x+=(w&C|~w&S)+b[8]+1770035416|0,x=(x<<7|x>>>25)+w|0,S+=(x&w|~x&C)+b[9]-1958414417|0,S=(S<<12|S>>>20)+x|0,C+=(S&x|~S&w)+b[10]-42063|0,C=(C<<17|C>>>15)+S|0,w+=(C&S|~C&x)+b[11]-1990404162|0,w=(w<<22|w>>>10)+C|0,x+=(w&C|~w&S)+b[12]+1804603682|0,x=(x<<7|x>>>25)+w|0,S+=(x&w|~x&C)+b[13]-40341101|0,S=(S<<12|S>>>20)+x|0,C+=(S&x|~S&w)+b[14]-1502002290|0,C=(C<<17|C>>>15)+S|0,w+=(C&S|~C&x)+b[15]+1236535329|0,w=(w<<22|w>>>10)+C|0,x+=(w&S|C&~S)+b[1]-165796510|0,x=(x<<5|x>>>27)+w|0,S+=(x&C|w&~C)+b[6]-1069501632|0,S=(S<<9|S>>>23)+x|0,C+=(S&w|x&~w)+b[11]+643717713|0,C=(C<<14|C>>>18)+S|0,w+=(C&x|S&~x)+b[0]-373897302|0,w=(w<<20|w>>>12)+C|0,x+=(w&S|C&~S)+b[5]-701558691|0,x=(x<<5|x>>>27)+w|0,S+=(x&C|w&~C)+b[10]+38016083|0,S=(S<<9|S>>>23)+x|0,C+=(S&w|x&~w)+b[15]-660478335|0,C=(C<<14|C>>>18)+S|0,w+=(C&x|S&~x)+b[4]-405537848|0,w=(w<<20|w>>>12)+C|0,x+=(w&S|C&~S)+b[9]+568446438|0,x=(x<<5|x>>>27)+w|0,S+=(x&C|w&~C)+b[14]-1019803690|0,S=(S<<9|S>>>23)+x|0,C+=(S&w|x&~w)+b[3]-187363961|0,C=(C<<14|C>>>18)+S|0,w+=(C&x|S&~x)+b[8]+1163531501|0,w=(w<<20|w>>>12)+C|0,x+=(w&S|C&~S)+b[13]-1444681467|0,x=(x<<5|x>>>27)+w|0,S+=(x&C|w&~C)+b[2]-51403784|0,S=(S<<9|S>>>23)+x|0,C+=(S&w|x&~w)+b[7]+1735328473|0,C=(C<<14|C>>>18)+S|0,w+=(C&x|S&~x)+b[12]-1926607734|0,w=(w<<20|w>>>12)+C|0,x+=(w^C^S)+b[5]-378558|0,x=(x<<4|x>>>28)+w|0,S+=(x^w^C)+b[8]-2022574463|0,S=(S<<11|S>>>21)+x|0,C+=(S^x^w)+b[11]+1839030562|0,C=(C<<16|C>>>16)+S|0,w+=(C^S^x)+b[14]-35309556|0,w=(w<<23|w>>>9)+C|0,x+=(w^C^S)+b[1]-1530992060|0,x=(x<<4|x>>>28)+w|0,S+=(x^w^C)+b[4]+1272893353|0,S=(S<<11|S>>>21)+x|0,C+=(S^x^w)+b[7]-155497632|0,C=(C<<16|C>>>16)+S|0,w+=(C^S^x)+b[10]-1094730640|0,w=(w<<23|w>>>9)+C|0,x+=(w^C^S)+b[13]+681279174|0,x=(x<<4|x>>>28)+w|0,S+=(x^w^C)+b[0]-358537222|0,S=(S<<11|S>>>21)+x|0,C+=(S^x^w)+b[3]-722521979|0,C=(C<<16|C>>>16)+S|0,w+=(C^S^x)+b[6]+76029189|0,w=(w<<23|w>>>9)+C|0,x+=(w^C^S)+b[9]-640364487|0,x=(x<<4|x>>>28)+w|0,S+=(x^w^C)+b[12]-421815835|0,S=(S<<11|S>>>21)+x|0,C+=(S^x^w)+b[15]+530742520|0,C=(C<<16|C>>>16)+S|0,w+=(C^S^x)+b[2]-995338651|0,w=(w<<23|w>>>9)+C|0,x+=(C^(w|~S))+b[0]-198630844|0,x=(x<<6|x>>>26)+w|0,S+=(w^(x|~C))+b[7]+1126891415|0,S=(S<<10|S>>>22)+x|0,C+=(x^(S|~w))+b[14]-1416354905|0,C=(C<<15|C>>>17)+S|0,w+=(S^(C|~x))+b[5]-57434055|0,w=(w<<21|w>>>11)+C|0,x+=(C^(w|~S))+b[12]+1700485571|0,x=(x<<6|x>>>26)+w|0,S+=(w^(x|~C))+b[3]-1894986606|0,S=(S<<10|S>>>22)+x|0,C+=(x^(S|~w))+b[10]-1051523|0,C=(C<<15|C>>>17)+S|0,w+=(S^(C|~x))+b[1]-2054922799|0,w=(w<<21|w>>>11)+C|0,x+=(C^(w|~S))+b[8]+1873313359|0,x=(x<<6|x>>>26)+w|0,S+=(w^(x|~C))+b[15]-30611744|0,S=(S<<10|S>>>22)+x|0,C+=(x^(S|~w))+b[6]-1560198380|0,C=(C<<15|C>>>17)+S|0,w+=(S^(C|~x))+b[13]+1309151649|0,w=(w<<21|w>>>11)+C|0,x+=(C^(w|~S))+b[4]-145523070|0,x=(x<<6|x>>>26)+w|0,S+=(w^(x|~C))+b[11]-1120210379|0,S=(S<<10|S>>>22)+x|0,C+=(x^(S|~w))+b[2]+718787259|0,C=(C<<15|C>>>17)+S|0,w+=(S^(C|~x))+b[9]-343485551|0,w=(w<<21|w>>>11)+C|0,y[0]=x+y[0]|0,y[1]=w+y[1]|0,y[2]=C+y[2]|0,y[3]=S+y[3]|0}function r(y){var b=[],x;for(x=0;x<64;x+=4)b[x>>2]=y.charCodeAt(x)+(y.charCodeAt(x+1)<<8)+(y.charCodeAt(x+2)<<16)+(y.charCodeAt(x+3)<<24);return b}function o(y){var b=[],x;for(x=0;x<64;x+=4)b[x>>2]=y[x]+(y[x+1]<<8)+(y[x+2]<<16)+(y[x+3]<<24);return b}function a(y){var b=y.length,x=[1732584193,-271733879,-1732584194,271733878],w,C,S,D,L,I;for(w=64;w<=b;w+=64)s(x,r(y.substring(w-64,w)));for(y=y.substring(w-64),C=y.length,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=0;w<C;w+=1)S[w>>2]|=y.charCodeAt(w)<<(w%4<<3);if(S[w>>2]|=128<<(w%4<<3),w>55)for(s(x,S),w=0;w<16;w+=1)S[w]=0;return D=b*8,D=D.toString(16).match(/(.*?)(.{0,8})$/),L=parseInt(D[2],16),I=parseInt(D[1],16)||0,S[14]=L,S[15]=I,s(x,S),x}function c(y){var b=y.length,x=[1732584193,-271733879,-1732584194,271733878],w,C,S,D,L,I;for(w=64;w<=b;w+=64)s(x,o(y.subarray(w-64,w)));for(y=w-64<b?y.subarray(w-64):new Uint8Array(0),C=y.length,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=0;w<C;w+=1)S[w>>2]|=y[w]<<(w%4<<3);if(S[w>>2]|=128<<(w%4<<3),w>55)for(s(x,S),w=0;w<16;w+=1)S[w]=0;return D=b*8,D=D.toString(16).match(/(.*?)(.{0,8})$/),L=parseInt(D[2],16),I=parseInt(D[1],16)||0,S[14]=L,S[15]=I,s(x,S),x}function h(y){var b="",x;for(x=0;x<4;x+=1)b+=i[y>>x*8+4&15]+i[y>>x*8&15];return b}function l(y){var b;for(b=0;b<y.length;b+=1)y[b]=h(y[b]);return y.join("")}l(a("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function y(b,x){return b=b|0||0,b<0?Math.max(b+x,0):Math.min(b,x)}ArrayBuffer.prototype.slice=function(b,x){var w=this.byteLength,C=y(b,w),S=w,D,L,I,F;return x!==e&&(S=y(x,w)),C>S?new ArrayBuffer(0):(D=S-C,L=new ArrayBuffer(D),I=new Uint8Array(L),F=new Uint8Array(this,C,D),I.set(F),L)}}();function u(y){return/[\u0080-\uFFFF]/.test(y)&&(y=unescape(encodeURIComponent(y))),y}function d(y,b){var x=y.length,w=new ArrayBuffer(x),C=new Uint8Array(w),S;for(S=0;S<x;S+=1)C[S]=y.charCodeAt(S);return b?C:w}function f(y){return String.fromCharCode.apply(null,new Uint8Array(y))}function p(y,b,x){var w=new Uint8Array(y.byteLength+b.byteLength);return w.set(new Uint8Array(y)),w.set(new Uint8Array(b),y.byteLength),x?w:w.buffer}function m(y){var b=[],x=y.length,w;for(w=0;w<x-1;w+=2)b.push(parseInt(y.substr(w,2),16));return String.fromCharCode.apply(String,b)}function v(){this.reset()}return v.prototype.append=function(y){return this.appendBinary(u(y)),this},v.prototype.appendBinary=function(y){this._buff+=y,this._length+=y.length;var b=this._buff.length,x;for(x=64;x<=b;x+=64)s(this._hash,r(this._buff.substring(x-64,x)));return this._buff=this._buff.substring(x-64),this},v.prototype.end=function(y){var b=this._buff,x=b.length,w,C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],S;for(w=0;w<x;w+=1)C[w>>2]|=b.charCodeAt(w)<<(w%4<<3);return this._finish(C,x),S=l(this._hash),y&&(S=m(S)),this.reset(),S},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(y){return this._buff=y.buff,this._length=y.length,this._hash=y.hash,this},v.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},v.prototype._finish=function(y,b){var x=b,w,C,S;if(y[x>>2]|=128<<(x%4<<3),x>55)for(s(this._hash,y),x=0;x<16;x+=1)y[x]=0;w=this._length*8,w=w.toString(16).match(/(.*?)(.{0,8})$/),C=parseInt(w[2],16),S=parseInt(w[1],16)||0,y[14]=C,y[15]=S,s(this._hash,y)},v.hash=function(y,b){return v.hashBinary(u(y),b)},v.hashBinary=function(y,b){var x=a(y),w=l(x);return b?m(w):w},v.ArrayBuffer=function(){this.reset()},v.ArrayBuffer.prototype.append=function(y){var b=p(this._buff.buffer,y,!0),x=b.length,w;for(this._length+=y.byteLength,w=64;w<=x;w+=64)s(this._hash,o(b.subarray(w-64,w)));return this._buff=w-64<x?new Uint8Array(b.buffer.slice(w-64)):new Uint8Array(0),this},v.ArrayBuffer.prototype.end=function(y){var b=this._buff,x=b.length,w=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],C,S;for(C=0;C<x;C+=1)w[C>>2]|=b[C]<<(C%4<<3);return this._finish(w,x),S=l(this._hash),y&&(S=m(S)),this.reset(),S},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 y=v.prototype.getState.call(this);return y.buff=f(y.buff),y},v.ArrayBuffer.prototype.setState=function(y){return y.buff=d(y.buff,!0),v.prototype.setState.call(this,y)},v.ArrayBuffer.prototype.destroy=v.prototype.destroy,v.ArrayBuffer.prototype._finish=v.prototype._finish,v.ArrayBuffer.hash=function(y,b){var x=c(new Uint8Array(y)),w=l(x);return b?m(w):w},v})})(Zl);var Vy=Zl.exports;const Yy=Kl(Vy);function $y(n='script[type="text/js-worker"]'){return Array.prototype.map.call(document.querySelectorAll(n),t=>t.textContent)}const jo=n=>new XMLSerializer().serializeToString(n),Gy=(n,t="text/html")=>new DOMParser().parseFromString(n,t),Ql=(n,t={mime:we["image/svg+xml"],encode:hs.utf8})=>so(jo(n),t);async function Wo(n=["*"],t){let e=[];const i=document.createElement("input");return i.setAttribute("type","file"),i.setAttribute("visibility","hidden"),i.setAttribute("accept",n.join(",")),t&&i.setAttribute("multiple","true"),i.addEventListener("click",s=>{i.value=""},!1),new Promise((s,r)=>{i.addEventListener("change",o=>{e=Array.from(o.target.files||[]),e.length===0?r(new Error("Cancel")):s(e)},!1),window.addEventListener("focus",()=>{setTimeout(()=>{e.length===0&&r(new Error("Cancel"))},1e3)},{once:!0}),i.click()}).then(s=>(i.remove(),s)).catch(s=>{throw i.remove(),s})}function bi(n,t=ie.text,e){return new Promise((i,s)=>{const r=new FileReader;switch(r.addEventListener("progress",o=>{e?.(o.loaded,o.total)}),r.addEventListener("load",o=>{i(o.target?.result)}),r.addEventListener("error",o=>{s(o)}),t){case ie.dataURL:r.readAsDataURL(n);break;case ie.binaryString:r.readAsBinaryString(n);break;case ie.arraybuffer:r.readAsArrayBuffer(n);break;case ie.text:default:r.readAsText(n)}})}async function Xy(n){const t=await bi(n,ie.arraybuffer);return Pp(t)}function tu(n,t,e,i,s,r,o){const a=new FileReader;a.addEventListener("load",c=>{if(!c.target||!c.target.result)return t(c);if(e.append(c.target.result),o<i.size)tu(n,t,e,i,s,o,Math.min(o+s,i.size));else return n(e.end())}),a.addEventListener("error",c=>t(c)),a.readAsArrayBuffer(i.slice(r,o))}async function eu(n,t=1*1024*1024){return await new Promise((e,i)=>tu(e,i,new Yy.ArrayBuffer,n,t,0,Math.min(t,n.size)))}class jy{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 By({baseURL:t.baseURL,interceptors:{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 eu(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.postFormData(this.uploadURL,e)}startTimeCount(){this.stopTimeCount(),this.timer=setInterval(()=>{cg(this.time,1),this.onTime?.(rg(this.time))},1e3)}stopTimeCount(){this.timer&&(clearInterval(this.timer),this.timer=void 0)}}function nu(){let n=null;if(window.ActiveXObject){const t=["Microsoft.XMLHTTP","MSXML6.XMLHTTP","MSXML5.XMLHTTP","MSXML4.XMLHTTP","MSXML3.XMLHTTP","MSXML2.XMLHTTP","MSXML.XMLHTTP"];for(let e=0,i=t.length;e<i;e++)try{n=new window.ActiveXObject(t[e]);break}catch{continue}}else n=new XMLHttpRequest;return n}function iu(n,t){return new Promise((e,i)=>{const{method:s="GET",data:r={},multipartFormDataString:o="",boundary:a="",headers:c={},withCredentials:h=!1,responseType:l="json",timeout:u=3e4}=t||{},d=nu();d.timeout=u,d.responseType=l,d.onreadystatechange=function(b){d.readyState===4&&(d.status===200?e(d.response):i(d.statusText))},d.ontimeout=()=>{i(`${n} is timed out for ${u}ms.`)},d.addEventListener("load",b=>t?.load?.(b,d),!1),d.addEventListener("loadstart",b=>t?.loadstart?.(b,d),!1),d.addEventListener("loadend",b=>t?.loadend?.(b,d),!1),d.addEventListener("progress",b=>{if(b.lengthComputable){const x=Math.round(b.loaded*100/b.total);t?.progress?.(b,d,x)}},!1),d.addEventListener("error",b=>t?.error?.(b,d),!1),d.addEventListener("abort",b=>t?.abort?.(b,d),!1);const f=s.toUpperCase();Object.assign(c,{Accept:"*/*"});let p=!1,m=!1,v=!1;function y(){d.setRequestHeader("If-Modified-Since","Sat, 1 Jan 2000 00:00:00 GMT"),h&&(d.withCredentials=!0);for(const b in c)Ct(b).toLowerCase()=="content-type"&&c[b].toLowerCase()=="multipart/form-data"?(p=!0,d.setRequestHeader("Content-Type","multipart/form-data; boundary="+a)):(Ct(b).toLowerCase()=="content-type"&&(c[b].toLowerCase().indexOf("text/plain")>=0?m=!0:c[b].toLowerCase().indexOf("application/json")>=0&&(v=!0)),d.setRequestHeader(b,c[b]))}switch(f){case"GET":let b="";r instanceof FormData?b=r0(r):b=s0(r),d.open("GET",i0(n,b),!0),y(),d.send(null);break;default:d.open(f,n,!0),y(),p?d.sendAsBinary(o):v?d.send(JSON.stringify(r)):m?d.send(Object.entries(r).map(([x,w])=>`${x}=${w}`).join(`\r
|
|
19
|
+
`)):d.send(Object.entries(r).map(([x,w])=>`${encodeURIComponent(x)}=${encodeURIComponent(w)}`).join("&"));break}})}async function Wy(n){const t={url:n.action||"",data:{},contentType:n.method.toLowerCase()==="post"&&n.enctype?n.enctype:"application/x-www-form-urlencoded",multipartFormDataString:"",boundary:"---------------------------"+Date.now().toString(16)},e=[],i=t.contentType=="multipart/form-data";for(let s=0;s<n.elements.length;s++){const r=n.elements[s];if(!r.hasAttribute("name"))continue;const o=r.getAttribute("type");switch(r.nodeName.toUpperCase()==="INPUT"&&o?o.toUpperCase():""){case"FILE":const c=r;if(i)for(let u=0,d=c.files?.length||0;u<d;u++){const f=c.files?.[u];if(f){const p=await bi(f,ie.binaryString);e.push('Content-Disposition: form-data; name="'+c.name+'"; filename="'+f.name+`"\r
|
|
20
20
|
Content-Type: `+f.type+`\r
|
|
21
21
|
\r
|
|
22
22
|
`+p+`\r
|
|
@@ -26,28 +26,28 @@ Content-Type: `+f.type+`\r
|
|
|
26
26
|
`):t.data[l.name]=l.value;break}}return t.multipartFormDataString="--"+t.boundary+`\r
|
|
27
27
|
`+e.join("--"+t.boundary+`\r
|
|
28
28
|
`)+"--"+t.boundary+`--\r
|
|
29
|
-
`,t}function
|
|
29
|
+
`,t}function su(n){const t=[];for(let e=0,i=qc.length;e<i;e++){const s=Ct(qc[e]+n);t.push(s)}return t}function wi(n,t,e){const i=gh(n);return i.props.style=i.props.style||{},t?i.props.style[t]||i.props.style[zh(t)]||i.props.style[Ct(t)]||"":i.props.style}function jn(n,t,e){Gr(n,i=>{i.props.style=i.props.style||{},typeof t=="string"&&e?i.props.style[t]=e:t instanceof Object&&Object.keys(t).forEach(s=>{i.props.style[s]=t[s]})}),yh()}function Ho(n,t=!1){const e={};if(!t)if(getComputedStyle){const i=getComputedStyle(n);for(let s=0,r=i.length;s<r;s++){const o=i[s];e[o]=i.getPropertyValue(o)}}else{const i=n.style||n.currentStyle;for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return n.style.cssText&&n.style.cssText.split(";").filter(i=>!!i).forEach(i=>{const[s,r]=i.split(":").map(o=>o.trim());s&&r&&(e[s]=r)}),e}function Hy(n,t){const e=su(t),i=e.length;let s="";for(let r=0;r<i;r++){const o=e[r];if(s=n[o]||"",s)return s}return s}function qy(n,t,e){const i=su(t),s=i.length;let r="";for(let o=0;o<s;o++){const a=i[o];if(r="style"in n&&n.style[a]||"currentStyle"in n&&n.currentStyle[a]||"",r)return r}if(getComputedStyle){const o=getComputedStyle(n,e);for(let a=0;a<s;a++){const c=i[a];if(r=o.getPropertyValue(c).trim(),r)return r}}return r}function vi(n,t,e){if(t)if(typeof t=="string"&&e)try{n.style.setProperty(t,e.replace(/!important/i,""),e.toLowerCase().includes("!important")?"important":"")}catch{n.style[t]=e}else t instanceof Object&&Object.keys(t).forEach(i=>{vi(n,i,t[i])})}function qo(n,t){typeof t=="string"?n.style.removeProperty(Ct(t)):Object.keys(t).forEach(e=>{qo(n,e)})}function ru(n,t){if(!document)return()=>{};let e;if(typeof t=="string"){const i=document.querySelector(t)?.shadowRoot;i?e=i:e=document.querySelector(t)}else e=t||document.getElementsByTagName("head")[0];if(e){const i=document.createElement("style");return i.innerHTML=n,e.appendChild(i),()=>{(e instanceof HTMLElement||e instanceof ShadowRoot)&&e.removeChild(i)}}else{const i=document.styleSheets[0].insertRule(n);return()=>{document.styleSheets[0].deleteRule(i)}}}class Jy{selector;name;value;constructor(t,e,i){this.selector=t,this.name=e,this.value=i}toString(){return`${this.selector} { ${this.name}: ${this.value} }`}}class Ky{propertyName;values=[];constructor(t){this.propertyName=t}add(t,e){this.values.push(new Jy(t,this.propertyName,e))}}async function ou(){const n=[],t=document.querySelectorAll("style, link");for(let e=0,i=t.length;e<i;e++){const s=t[e];let r=s.innerHTML;switch(s.nodeName.toLowerCase()){case"style":break;case"link":r=await iu(s.href,{method:"GET",responseType:"text"});break}r=r.replace(/\/\/.+?(?=\n|\r|$)|\/\*[\s\S]+?\*\//g,"").replace(/@[^{};]*;|@[^{};]*\{[^}]*\}/g,"").replace(/[\\n\n]+(?<=[\\n\n]+)\s+/g,""),n.push(r)}return n}async function Zy(){const n={},t=await ou();for(let e=0,i=t.length;e<i;e++){const r=t[e].match(/[^{]*{[^}]*}/g);if(r)for(let o=0,a=r.length;o<a;o++){const c=r[o].split(/[{}]/g),h=c[0].trim(),u=c[1].split(";");for(let d=0;d<u.length;d++)if(u[d].trim()!=""){const f=u[d].split(":"),p=f[0].trim().toLowerCase(),m=f[1];n[p]||(n[p]=new Ky(p)),m&&n[p].add(h,m.trim())}}}return n}function Ke(n,t,e){if(t===void 0&&e===void 0)return Jo(n);if(typeof t=="string"&&e===void 0)return au(n,t);typeof t=="object"?Gr(n,i=>{for(const s in t)s=="style"?jn(n,s,t[s]):Object.prototype.hasOwnProperty.call(t,s)&&(i.props[s]=""+t[s])}):typeof t=="string"&&typeof e=="string"&&(t=="style"?jn(n,t,e):Gr(n,i=>{i.props[t]=""+e})),yh()}function Jo(n){const t={};for(let e=0,i=n.attributes,s=i.length;e<s;e++){const r=i[e];r.nodeName&&r.nodeValue&&(r.nodeName==="style"?t[r.nodeName]=Ho(n,!0):t[r.nodeName]=r.nodeValue)}return t}function au(n,t){return t==="style"?Ho(n,!0):n.getAttribute(Ct(t))}function Sn(n,t,e){return n.setAttribute(Ct(t),""+e)}function Qy(n,t){t.split(/[,\s]+/i).forEach(e=>{const i=Ct(e.trim());i!=""&&n.removeAttribute(i)})}function cu(n,t){for(const e in t){const i=t[e];switch(e){case"fill":i!=="none"&&(n.fillStyle=i);break;case"stroke":i!=="none"&&(n.strokeStyle=i);break;case"stroke-width":case"strokeWidth":n.lineWidth=Number(i);break;case"stroke-linecap":case"strokeLinecap":n.lineCap=i;break;case"stroke-linejoin":case"strokeLinejoin":switch(i){case"round":case"bevel":case"miter":n.lineJoin=i;break;default:n.lineJoin="miter";break}break;case"stroke-miterlimit":case"strokeMiterlimit":n.miterLimit=Number(i);break;case"stroke-opacity":case"strokeOpacity":break;case"stroke-dashoffset":case"strokeDashoffset":n.lineDashOffset=Number(i);break;case"stroke-dasharray":case"strokeDasharray":typeof i=="string"&&n.setLineDash(i.split(/\s+/).map(s=>Number(s)));break;case"cursor":break;case"font":typeof i=="string"&&(n.font=i);break;case"font-size":case"fontSize":n.font+=` ${i}`;break;case"font-family":case"fontFamily":n.font+=` ${i}`;break;case"font-weight":case"fontWeight":break;case"font-style":case"fontStyle":break;case"text-anchor":case"textAnchor":switch(i){case"middle":n.textAlign="center";break;case"end":n.textAlign="end";break;case"start":n.textAlign="start";break}break;case"alignment-baseline":case"alignmentBaseline":switch(i){case"middle":case"bottom":case"top":case"alphabetic":case"hanging":case"ideographic":n.textBaseline=i;break;default:n.textBaseline="alphabetic";break}break}}}var Ko=function(n,t){return Ko=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])},Ko(n,t)};function xe(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ko(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function t1(n,t,e,i){function s(r){return r instanceof e?r:new e(function(o){o(r)})}return new(e||(e=Promise))(function(r,o){function a(l){try{h(i.next(l))}catch(u){o(u)}}function c(l){try{h(i.throw(l))}catch(u){o(u)}}function h(l){l.done?r(l.value):s(l.value).then(a,c)}h((i=i.apply(n,t||[])).next())})}function hu(n,t){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,s,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(h){return function(l){return c([h,l])}}function c(h){if(i)throw new TypeError("Generator is already executing.");for(;o&&(o=0,h[0]&&(e=0)),e;)try{if(i=1,s&&(r=h[0]&2?s.return:h[0]?s.throw||((r=s.return)&&r.call(s),0):s.next)&&!(r=r.call(s,h[1])).done)return r;switch(s=0,r&&(h=[h[0]&2,r.value]),h[0]){case 0:case 1:r=h;break;case 4:return e.label++,{value:h[1],done:!1};case 5:e.label++,s=h[1],h=[0];continue;case 7:h=e.ops.pop(),e.trys.pop();continue;default:if(r=e.trys,!(r=r.length>0&&r[r.length-1])&&(h[0]===6||h[0]===2)){e=0;continue}if(h[0]===3&&(!r||h[1]>r[0]&&h[1]<r[3])){e.label=h[1];break}if(h[0]===6&&e.label<r[1]){e.label=r[1],r=h;break}if(r&&e.label<r[2]){e.label=r[2],e.ops.push(h);break}r[2]&&e.ops.pop(),e.trys.pop();continue}h=t.call(n,e)}catch(l){h=[6,l],s=0}finally{i=r=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}}function Cn(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],i=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&i>=n.length&&(n=void 0),{value:n&&n[i++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ke(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var i=e.call(n),s,r=[],o;try{for(;(t===void 0||t-- >0)&&!(s=i.next()).done;)r.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return r}function Ze(n,t,e){if(e||arguments.length===2)for(var i=0,s=t.length,r;i<s;i++)(r||!(i in t))&&(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return n.concat(r||Array.prototype.slice.call(t))}function Wn(n){return this instanceof Wn?(this.v=n,this):new Wn(n)}function e1(n,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=e.apply(n,t||[]),s,r=[];return s=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),s[Symbol.asyncIterator]=function(){return this},s;function o(f){return function(p){return Promise.resolve(p).then(f,u)}}function a(f,p){i[f]&&(s[f]=function(m){return new Promise(function(v,y){r.push([f,m,v,y])>1||c(f,m)})},p&&(s[f]=p(s[f])))}function c(f,p){try{h(i[f](p))}catch(m){d(r[0][3],m)}}function h(f){f.value instanceof Wn?Promise.resolve(f.value.v).then(l,u):d(r[0][2],f)}function l(f){c("next",f)}function u(f){c("throw",f)}function d(f,p){f(p),r.shift(),r.length&&c(r[0][0],r[0][1])}}function n1(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n[Symbol.asyncIterator],e;return t?t.call(n):(n=typeof Cn=="function"?Cn(n):n[Symbol.iterator](),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(r){e[r]=n[r]&&function(o){return new Promise(function(a,c){o=n[r](o),s(a,c,o.done,o.value)})}}function s(r,o,a,c){Promise.resolve(c).then(function(h){r({value:h,done:a})},o)}}typeof SuppressedError=="function"&&SuppressedError;function it(n){return typeof n=="function"}function Zo(n){var t=function(i){Error.call(i),i.stack=new Error().stack},e=n(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var Qo=Zo(function(n){return function(e){n(this),this.message=e?e.length+` errors occurred during unsubscription:
|
|
30
30
|
`+e.map(function(i,s){return s+1+") "+i.toString()}).join(`
|
|
31
|
-
`):"",this.name="UnsubscriptionError",this.errors=e}});function xi(n,t){if(n){var e=n.indexOf(t);0<=e&&n.splice(e,1)}}var Hn=function(){function n(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var t,e,i,s,r;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=Cn(o),c=a.next();!c.done;c=a.next()){var h=c.value;h.remove(this)}}catch(m){t={error:m}}finally{try{c&&!c.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var l=this.initialTeardown;if(it(l))try{l()}catch(m){r=m instanceof Zo?m.errors:[m]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var d=Cn(u),f=d.next();!f.done;f=d.next()){var p=f.value;try{lu(p)}catch(m){r=r??[],m instanceof Zo?r=Ze(Ze([],ke(r)),ke(m.errors)):r.push(m)}}}catch(m){i={error:m}}finally{try{f&&!f.done&&(s=d.return)&&s.call(d)}finally{if(i)throw i.error}}}if(r)throw new Zo(r)}},n.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)lu(t);else{if(t instanceof n){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},n.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},n.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},n.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&xi(e,t)},n.prototype.remove=function(t){var e=this._finalizers;e&&xi(e,t),t instanceof n&&t._removeParent(this)},n.EMPTY=function(){var t=new n;return t.closed=!0,t}(),n}(),cu=Hn.EMPTY;function hu(n){return n instanceof Hn||n&&"closed"in n&&it(n.remove)&&it(n.add)&&it(n.unsubscribe)}function lu(n){it(n)?n():n.unsubscribe()}var uu={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Qo={setTimeout:function(n,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];var s=Qo.delegate;return s?.setTimeout?s.setTimeout.apply(s,Ze([n,t],ke(e))):setTimeout.apply(void 0,Ze([n,t],ke(e)))},clearTimeout:function(n){var t=Qo.delegate;return(t?.clearTimeout||clearTimeout)(n)},delegate:void 0};function fu(n){Qo.setTimeout(function(){throw n})}function _i(){}function Ls(n){n()}var ta=function(n){xe(t,n);function t(e){var i=n.call(this)||this;return i.isStopped=!1,e?(i.destination=e,hu(e)&&e.add(i)):i.destination=n1,i}return t.create=function(e,i,s){return new qn(e,i,s)},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,n.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}(Hn),Qy=Function.prototype.bind;function ea(n,t){return Qy.call(n,t)}var t1=function(){function n(t){this.partialObserver=t}return n.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(i){zs(i)}},n.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(i){zs(i)}else zs(t)},n.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){zs(e)}},n}(),qn=function(n){xe(t,n);function t(e,i,s){var r=n.call(this)||this,o;if(it(e)||!e)o={next:e??void 0,error:i??void 0,complete:s??void 0};else{var a;r&&uu.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return r.unsubscribe()},o={next:e.next&&ea(e.next,a),error:e.error&&ea(e.error,a),complete:e.complete&&ea(e.complete,a)}):o=e}return r.destination=new t1(o),r}return t}(ta);function zs(n){fu(n)}function e1(n){throw n}var n1={closed:!0,next:_i,error:e1,complete:_i},na=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function En(n){return n}function i1(n){return n.length===0?En:n.length===1?n[0]:function(e){return n.reduce(function(i,s){return s(i)},e)}}var ft=function(){function n(t){t&&(this._subscribe=t)}return n.prototype.lift=function(t){var e=new n;return e.source=this,e.operator=t,e},n.prototype.subscribe=function(t,e,i){var s=this,r=r1(t)?t:new qn(t,e,i);return Ls(function(){var o=s,a=o.operator,c=o.source;r.add(a?a.call(r,c):c?s._subscribe(r):s._trySubscribe(r))}),r},n.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},n.prototype.forEach=function(t,e){var i=this;return e=du(e),new e(function(s,r){var o=new qn({next:function(a){try{t(a)}catch(c){r(c),o.unsubscribe()}},error:r,complete:s});i.subscribe(o)})},n.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},n.prototype[na]=function(){return this},n.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i1(t)(this)},n.prototype.toPromise=function(t){var e=this;return t=du(t),new t(function(i,s){var r;e.subscribe(function(o){return r=o},function(o){return s(o)},function(){return i(r)})})},n.create=function(t){return new n(t)},n}();function du(n){var t;return(t=n??uu.Promise)!==null&&t!==void 0?t:Promise}function s1(n){return n&&it(n.next)&&it(n.error)&&it(n.complete)}function r1(n){return n&&n instanceof ta||s1(n)&&hu(n)}function o1(n){return it(n?.lift)}function Ft(n){return function(t){if(o1(t))return t.lift(function(e){try{return n(e,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function wt(n,t,e,i,s){return new a1(n,t,e,i,s)}var a1=function(n){xe(t,n);function t(e,i,s,r,o,a){var c=n.call(this,e)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=i?function(h){try{i(h)}catch(l){e.error(l)}}:n.prototype._next,c._error=r?function(h){try{r(h)}catch(l){e.error(l)}finally{this.unsubscribe()}}:n.prototype._error,c._complete=s?function(){try{s()}catch(h){e.error(h)}finally{this.unsubscribe()}}:n.prototype._complete,c}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var i=this.closed;n.prototype.unsubscribe.call(this),!i&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t}(ta),c1=Ko(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Re=function(n){xe(t,n);function t(){var e=n.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 i=new mu(this,this);return i.operator=e,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new c1},t.prototype.next=function(e){var i=this;Ls(function(){var s,r;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var o=Cn(i.currentObservers),a=o.next();!a.done;a=o.next()){var c=a.value;c.next(e)}}catch(h){s={error:h}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(s)throw s.error}}}})},t.prototype.error=function(e){var i=this;Ls(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=e;for(var s=i.observers;s.length;)s.shift().error(e)}})},t.prototype.complete=function(){var e=this;Ls(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var i=e.observers;i.length;)i.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(),n.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 i=this,s=this,r=s.hasError,o=s.isStopped,a=s.observers;return r||o?cu:(this.currentObservers=null,a.push(e),new Hn(function(){i.currentObservers=null,xi(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var i=this,s=i.hasError,r=i.thrownError,o=i.isStopped;s?e.error(r):o&&e.complete()},t.prototype.asObservable=function(){var e=new ft;return e.source=this,e},t.create=function(e,i){return new mu(e,i)},t}(ft),mu=function(n){xe(t,n);function t(e,i){var s=n.call(this)||this;return s.destination=e,s.source=i,s}return t.prototype.next=function(e){var i,s;(s=(i=this.destination)===null||i===void 0?void 0:i.next)===null||s===void 0||s.call(i,e)},t.prototype.error=function(e){var i,s;(s=(i=this.destination)===null||i===void 0?void 0:i.error)===null||s===void 0||s.call(i,e)},t.prototype.complete=function(){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||i===void 0||i.call(e)},t.prototype._subscribe=function(e){var i,s;return(s=(i=this.source)===null||i===void 0?void 0:i.subscribe(e))!==null&&s!==void 0?s:cu},t}(Re),Ns=function(n){xe(t,n);function t(e){var i=n.call(this)||this;return i._value=e,i}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(e){var i=n.prototype._subscribe.call(this,e);return!i.closed&&e.next(this._value),i},t.prototype.getValue=function(){var e=this,i=e.hasError,s=e.thrownError,r=e._value;if(i)throw s;return this._throwIfClosed(),r},t.prototype.next=function(e){n.prototype.next.call(this,this._value=e)},t}(Re),ia={now:function(){return(ia.delegate||Date).now()},delegate:void 0},h1=function(n){xe(t,n);function t(e,i,s){e===void 0&&(e=1/0),i===void 0&&(i=1/0),s===void 0&&(s=ia);var r=n.call(this)||this;return r._bufferSize=e,r._windowTime=i,r._timestampProvider=s,r._buffer=[],r._infiniteTimeWindow=!0,r._infiniteTimeWindow=i===1/0,r._bufferSize=Math.max(1,e),r._windowTime=Math.max(1,i),r}return t.prototype.next=function(e){var i=this,s=i.isStopped,r=i._buffer,o=i._infiniteTimeWindow,a=i._timestampProvider,c=i._windowTime;s||(r.push(e),!o&&r.push(a.now()+c)),this._trimBuffer(),n.prototype.next.call(this,e)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var i=this._innerSubscribe(e),s=this,r=s._infiniteTimeWindow,o=s._buffer,a=o.slice(),c=0;c<a.length&&!e.closed;c+=r?1:2)e.next(a[c]);return this._checkFinalizedStatuses(e),i},t.prototype._trimBuffer=function(){var e=this,i=e._bufferSize,s=e._timestampProvider,r=e._buffer,o=e._infiniteTimeWindow,a=(o?1:2)*i;if(i<1/0&&a<r.length&&r.splice(0,r.length-a),!o){for(var c=s.now(),h=0,l=1;l<r.length&&r[l]<=c;l+=2)h=l;h&&r.splice(0,h+1)}},t}(Re),l1=function(n){xe(t,n);function t(e,i){return n.call(this)||this}return t.prototype.schedule=function(e,i){return this},t}(Hn),Fs={setInterval:function(n,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];var s=Fs.delegate;return s?.setInterval?s.setInterval.apply(s,Ze([n,t],ke(e))):setInterval.apply(void 0,Ze([n,t],ke(e)))},clearInterval:function(n){var t=Fs.delegate;return(t?.clearInterval||clearInterval)(n)},delegate:void 0},u1=function(n){xe(t,n);function t(e,i){var s=n.call(this,e,i)||this;return s.scheduler=e,s.work=i,s.pending=!1,s}return t.prototype.schedule=function(e,i){var s;if(i===void 0&&(i=0),this.closed)return this;this.state=e;var r=this.id,o=this.scheduler;return r!=null&&(this.id=this.recycleAsyncId(o,r,i)),this.pending=!0,this.delay=i,this.id=(s=this.id)!==null&&s!==void 0?s:this.requestAsyncId(o,this.id,i),this},t.prototype.requestAsyncId=function(e,i,s){return s===void 0&&(s=0),Fs.setInterval(e.flush.bind(e,this),s)},t.prototype.recycleAsyncId=function(e,i,s){if(s===void 0&&(s=0),s!=null&&this.delay===s&&this.pending===!1)return i;i!=null&&Fs.clearInterval(i)},t.prototype.execute=function(e,i){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var s=this._execute(e,i);if(s)return s;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,i){var s=!1,r;try{this.work(e)}catch(o){s=!0,r=o||new Error("Scheduled action threw falsy error")}if(s)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var e=this,i=e.id,s=e.scheduler,r=s.actions;this.work=this.state=this.scheduler=null,this.pending=!1,xi(r,this),i!=null&&(this.id=this.recycleAsyncId(s,i,null)),this.delay=null,n.prototype.unsubscribe.call(this)}},t}(l1),pu=function(){function n(t,e){e===void 0&&(e=n.now),this.schedulerActionCtor=t,this.now=e}return n.prototype.schedule=function(t,e,i){return e===void 0&&(e=0),new this.schedulerActionCtor(this,t).schedule(i,e)},n.now=ia.now,n}(),f1=function(n){xe(t,n);function t(e,i){i===void 0&&(i=pu.now);var s=n.call(this,e,i)||this;return s.actions=[],s._active=!1,s}return t.prototype.flush=function(e){var i=this.actions;if(this._active){i.push(e);return}var s;this._active=!0;do if(s=e.execute(e.state,e.delay))break;while(e=i.shift());if(this._active=!1,s){for(;e=i.shift();)e.unsubscribe();throw s}},t}(pu),sa=new f1(u1),d1=sa,gu=new ft(function(n){return n.complete()});function yu(n){return n&&it(n.schedule)}function ra(n){return n[n.length-1]}function m1(n){return it(ra(n))?n.pop():void 0}function Si(n){return yu(ra(n))?n.pop():void 0}function p1(n,t){return typeof ra(n)=="number"?n.pop():t}var oa=function(n){return n&&typeof n.length=="number"&&typeof n!="function"};function bu(n){return it(n?.then)}function wu(n){return it(n[na])}function vu(n){return Symbol.asyncIterator&&it(n?.[Symbol.asyncIterator])}function xu(n){return new TypeError("You provided "+(n!==null&&typeof n=="object"?"an invalid object":"'"+n+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function g1(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var _u=g1();function Su(n){return it(n?.[_u])}function Cu(n){return Ky(this,arguments,function(){var e,i,s,r;return au(this,function(o){switch(o.label){case 0:e=n.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,Wn(e.read())];case 3:return i=o.sent(),s=i.value,r=i.done,r?[4,Wn(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,Wn(s)];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 Eu(n){return it(n?.getReader)}function xt(n){if(n instanceof ft)return n;if(n!=null){if(wu(n))return y1(n);if(oa(n))return b1(n);if(bu(n))return w1(n);if(vu(n))return Tu(n);if(Su(n))return v1(n);if(Eu(n))return x1(n)}throw xu(n)}function y1(n){return new ft(function(t){var e=n[na]();if(it(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function b1(n){return new ft(function(t){for(var e=0;e<n.length&&!t.closed;e++)t.next(n[e]);t.complete()})}function w1(n){return new ft(function(t){n.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,fu)})}function v1(n){return new ft(function(t){var e,i;try{for(var s=Cn(n),r=s.next();!r.done;r=s.next()){var o=r.value;if(t.next(o),t.closed)return}}catch(a){e={error:a}}finally{try{r&&!r.done&&(i=s.return)&&i.call(s)}finally{if(e)throw e.error}}t.complete()})}function Tu(n){return new ft(function(t){_1(n,t).catch(function(e){return t.error(e)})})}function x1(n){return Tu(Cu(n))}function _1(n,t){var e,i,s,r;return Jy(this,void 0,void 0,function(){var o,a;return au(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),e=Zy(n),c.label=1;case 1:return[4,e.next()];case 2:if(i=c.sent(),!!i.done)return[3,4];if(o=i.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),s={error:a},[3,11];case 6:return c.trys.push([6,,9,10]),i&&!i.done&&(r=e.return)?[4,r.call(e)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function Le(n,t,e,i,s){i===void 0&&(i=0),s===void 0&&(s=!1);var r=t.schedule(function(){e(),s?n.add(this.schedule(null,i)):this.unsubscribe()},i);if(n.add(r),!s)return r}function Pu(n,t){return t===void 0&&(t=0),Ft(function(e,i){e.subscribe(wt(i,function(s){return Le(i,n,function(){return i.next(s)},t)},function(){return Le(i,n,function(){return i.complete()},t)},function(s){return Le(i,n,function(){return i.error(s)},t)}))})}function aa(n,t){return t===void 0&&(t=0),Ft(function(e,i){i.add(n.schedule(function(){return e.subscribe(i)},t))})}function S1(n,t){return xt(n).pipe(aa(t),Pu(t))}function C1(n,t){return xt(n).pipe(aa(t),Pu(t))}function E1(n,t){return new ft(function(e){var i=0;return t.schedule(function(){i===n.length?e.complete():(e.next(n[i++]),e.closed||this.schedule())})})}function T1(n,t){return new ft(function(e){var i;return Le(e,t,function(){i=n[_u](),Le(e,t,function(){var s,r,o;try{s=i.next(),r=s.value,o=s.done}catch(a){e.error(a);return}o?e.complete():e.next(r)},0,!0)}),function(){return it(i?.return)&&i.return()}})}function Au(n,t){if(!n)throw new Error("Iterable cannot be null");return new ft(function(e){Le(e,t,function(){var i=n[Symbol.asyncIterator]();Le(e,t,function(){i.next().then(function(s){s.done?e.complete():e.next(s.value)})},0,!0)})})}function P1(n,t){return Au(Cu(n),t)}function A1(n,t){if(n!=null){if(wu(n))return S1(n,t);if(oa(n))return E1(n,t);if(bu(n))return C1(n,t);if(vu(n))return Au(n,t);if(Su(n))return T1(n,t);if(Eu(n))return P1(n,t)}throw xu(n)}function Ci(n,t){return t?A1(n,t):xt(n)}function M1(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=Si(n);return Ci(n,e)}var D1=Ko(function(n){return function(){n(this),this.name="EmptyError",this.message="no elements in sequence"}});function I1(n,t){var e=typeof t=="object";return new Promise(function(i,s){var r=new qn({next:function(o){i(o),r.unsubscribe()},error:s,complete:function(){e?i(t.defaultValue):s(new D1)}});n.subscribe(r)})}function O1(n){return n instanceof Date&&!isNaN(n)}function dt(n,t){return Ft(function(e,i){var s=0;e.subscribe(wt(i,function(r){i.next(n.call(t,r,s++))}))})}var k1=Array.isArray;function R1(n,t){return k1(t)?n.apply(void 0,Ze([],ke(t))):n(t)}function ca(n){return dt(function(t){return R1(n,t)})}var L1=Array.isArray,z1=Object.getPrototypeOf,N1=Object.prototype,F1=Object.keys;function B1(n){if(n.length===1){var t=n[0];if(L1(t))return{args:t,keys:null};if(U1(t)){var e=F1(t);return{args:e.map(function(i){return t[i]}),keys:e}}}return{args:n,keys:null}}function U1(n){return n&&typeof n=="object"&&z1(n)===N1}function V1(n,t){return n.reduce(function(e,i,s){return e[i]=t[s],e},{})}function Y1(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=Si(n),i=m1(n),s=B1(n),r=s.args,o=s.keys;if(r.length===0)return Ci([],e);var a=new ft($1(r,e,o?function(c){return V1(o,c)}:En));return i?a.pipe(ca(i)):a}function $1(n,t,e){return e===void 0&&(e=En),function(i){Mu(t,function(){for(var s=n.length,r=new Array(s),o=s,a=s,c=function(l){Mu(t,function(){var u=Ci(n[l],t),d=!1;u.subscribe(wt(i,function(f){r[l]=f,d||(d=!0,a--),a||i.next(e(r.slice()))},function(){--o||i.complete()}))},i)},h=0;h<s;h++)c(h)},i)}}function Mu(n,t,e){n?Le(e,n,t):t()}function G1(n,t,e,i,s,r,o,a){var c=[],h=0,l=0,u=!1,d=function(){u&&!c.length&&!h&&t.complete()},f=function(m){return h<i?p(m):c.push(m)},p=function(m){r&&t.next(m),h++;var v=!1;xt(e(m,l++)).subscribe(wt(t,function(y){s?.(y),r?f(y):t.next(y)},function(){v=!0},void 0,function(){if(v)try{h--;for(var y=function(){var b=c.shift();o?Le(t,o,function(){return p(b)}):p(b)};c.length&&h<i;)y();d()}catch(b){t.error(b)}}))};return n.subscribe(wt(t,f,function(){u=!0,d()})),function(){a?.()}}function ha(n,t,e){return e===void 0&&(e=1/0),it(t)?ha(function(i,s){return dt(function(r,o){return t(i,r,s,o)})(xt(n(i,s)))},e):(typeof t=="number"&&(e=t),Ft(function(i,s){return G1(i,s,n,e)}))}function Du(n){return n===void 0&&(n=1/0),ha(En,n)}function X1(){return Du(1)}function Iu(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return X1()(Ci(n,Si(n)))}var j1=["addListener","removeListener"],W1=["addEventListener","removeEventListener"],H1=["on","off"];function la(n,t,e,i){if(it(e)&&(i=e,e=void 0),i)return la(n,t,e).pipe(ca(i));var s=ke(K1(n)?W1.map(function(a){return function(c){return n[a](t,c,e)}}):q1(n)?j1.map(Ou(n,t)):J1(n)?H1.map(Ou(n,t)):[],2),r=s[0],o=s[1];if(!r&&oa(n))return ha(function(a){return la(a,t,e)})(xt(n));if(!r)throw new TypeError("Invalid event target");return new ft(function(a){var c=function(){for(var h=[],l=0;l<arguments.length;l++)h[l]=arguments[l];return a.next(1<h.length?h:h[0])};return r(c),function(){return o(c)}})}function Ou(n,t){return function(e){return function(i){return n[e](t,i)}}}function q1(n){return it(n.addListener)&&it(n.removeListener)}function J1(n){return it(n.on)&&it(n.off)}function K1(n){return it(n.addEventListener)&&it(n.removeEventListener)}function ut(n,t,e){return e?ut(n,t).pipe(ca(e)):new ft(function(i){var s=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return i.next(o.length===1?o[0]:o)},r=n(s);return it(t)?function(){return t(s,r)}:void 0})}function Z1(n,t,e){n===void 0&&(n=0),e===void 0&&(e=d1);var i=-1;return t!=null&&(yu(t)?e=t:i=t),new ft(function(s){var r=O1(n)?+n-e.now():n;r<0&&(r=0);var o=0;return e.schedule(function(){s.closed||(s.next(o++),0<=i?this.schedule(void 0,i):s.complete())},r)})}function Bs(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=Si(n),i=p1(n,1/0),s=n;return s.length?s.length===1?xt(s[0]):Du(i)(Ci(s,e)):gu}var Q1=Array.isArray;function tb(n){return n.length===1&&Q1(n[0])?n[0]:n}function ua(n,t){return Ft(function(e,i){var s=0;e.subscribe(wt(i,function(r){return n.call(t,r,s++)&&i.next(r)}))})}function Us(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n=tb(n),n.length===1?xt(n[0]):new ft(eb(n))}function eb(n){return function(t){for(var e=[],i=function(r){e.push(xt(n[r]).subscribe(wt(t,function(o){if(e){for(var a=0;a<e.length;a++)a!==r&&e[a].unsubscribe();e=null}t.next(o)})))},s=0;e&&!t.closed&&s<n.length;s++)i(s)}}function ku(n){return Ft(function(t,e){var i=null,s=!1,r;i=t.subscribe(wt(e,void 0,void 0,function(o){r=xt(n(o,ku(n)(t))),i?(i.unsubscribe(),i=null,r.subscribe(e)):s=!0})),s&&(i.unsubscribe(),i=null,r.subscribe(e))})}function Qe(n,t){return t===void 0&&(t=En),n=n??nb,Ft(function(e,i){var s,r=!0;e.subscribe(wt(i,function(o){var a=t(o);(r||!n(s,a))&&(r=!1,s=a,i.next(o))}))})}function nb(n,t){return n===t}function Ru(n,t){return t?function(e){return e.pipe(Ru(function(i,s){return xt(n(i,s)).pipe(dt(function(r,o){return t(i,r,s,o)}))}))}:Ft(function(e,i){var s=0,r=null,o=!1;e.subscribe(wt(i,function(a){r||(r=wt(i,void 0,function(){r=null,o&&i.complete()}),xt(n(a,s++)).subscribe(r))},function(){o=!0,!r&&i.complete()}))})}function ib(n){n===void 0&&(n={});var t=n.connector,e=t===void 0?function(){return new Re}:t,i=n.resetOnError,s=i===void 0?!0:i,r=n.resetOnComplete,o=r===void 0?!0:r,a=n.resetOnRefCountZero,c=a===void 0?!0:a;return function(h){var l,u,d,f=0,p=!1,m=!1,v=function(){u?.unsubscribe(),u=void 0},y=function(){v(),l=d=void 0,p=m=!1},b=function(){var x=l;y(),x?.unsubscribe()};return Ft(function(x,w){f++,!m&&!p&&v();var C=d=d??e();w.add(function(){f--,f===0&&!m&&!p&&(u=fa(b,c))}),C.subscribe(w),!l&&f>0&&(l=new qn({next:function(S){return C.next(S)},error:function(S){m=!0,v(),u=fa(y,s,S),C.error(S)},complete:function(){p=!0,v(),u=fa(y,o),C.complete()}}),xt(x).subscribe(l))})(h)}}function fa(n,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];if(t===!0){n();return}if(t!==!1){var s=new qn({next:function(){s.unsubscribe(),n()}});return xt(t.apply(void 0,Ze([],ke(e)))).subscribe(s)}}function Lu(n,t,e){var i,s,r,o,a=!1;return n&&typeof n=="object"?(i=n.bufferSize,o=i===void 0?1/0:i,s=n.windowTime,t=s===void 0?1/0:s,r=n.refCount,a=r===void 0?!1:r,e=n.scheduler):o=n??1/0,ib({connector:function(){return new h1(o,t,e)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:a})}function Tn(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=Si(n);return Ft(function(i,s){(e?Iu(n,i,e):Iu(n,i)).subscribe(s)})}function Vs(n,t){return Ft(function(e,i){var s=null,r=0,o=!1,a=function(){return o&&!s&&i.complete()};e.subscribe(wt(i,function(c){s?.unsubscribe();var h=0,l=r++;xt(n(c,l)).subscribe(s=wt(i,function(u){return i.next(t?t(c,u,l,h++):u)},function(){s=null,a()}))},function(){o=!0,a()}))})}function sb(){return Vs(En)}function da(n){return Ft(function(t,e){xt(n).subscribe(wt(e,function(){return e.complete()},_i)),!e.closed&&t.subscribe(e)})}function Pn(n,t,e){var i=it(n)||t||e?{next:n,error:t,complete:e}:n;return i?Ft(function(s,r){var o;(o=i.subscribe)===null||o===void 0||o.call(i);var a=!0;s.subscribe(wt(r,function(c){var h;(h=i.next)===null||h===void 0||h.call(i,c),r.next(c)},function(){var c;a=!1,(c=i.complete)===null||c===void 0||c.call(i),r.complete()},function(c){var h;a=!1,(h=i.error)===null||h===void 0||h.call(i,c),r.error(c)},function(){var c,h;a&&((c=i.unsubscribe)===null||c===void 0||c.call(i)),(h=i.finalize)===null||h===void 0||h.call(i)}))}):En}function rb(n,t){return Ft(function(e,i){var s=t??{},r=s.leading,o=r===void 0?!0:r,a=s.trailing,c=a===void 0?!1:a,h=!1,l=null,u=null,d=!1,f=function(){u?.unsubscribe(),u=null,c&&(v(),d&&i.complete())},p=function(){u=null,d&&i.complete()},m=function(y){return u=xt(n(y)).subscribe(wt(i,f,p))},v=function(){if(h){h=!1;var y=l;l=null,i.next(y),!d&&m(y)}};e.subscribe(wt(i,function(y){h=!0,l=y,!(u&&!u.closed)&&(o?v():m(y))},function(){d=!0,!(c&&h&&u&&!u.closed)&&i.complete()}))})}function ob(n,t,e){t===void 0&&(t=sa);var i=Z1(n,t);return rb(function(){return i},e)}function ab(n,t){return Ft(function(e,i){var s=[],r=function(o){for(;0<s.length;)s.shift().error(o);i.error(o)};xt(n).subscribe(wt(i,function(o){var a=new Re;s.push(a);var c=new Hn,h=function(){xi(s,a),a.complete(),c.unsubscribe()},l;try{l=xt(t(o))}catch(u){r(u);return}i.next(a.asObservable()),c.add(l.subscribe(wt(i,h,_i,r)))},_i)),e.subscribe(wt(i,function(o){var a,c,h=s.slice();try{for(var l=Cn(h),u=l.next();!u.done;u=l.next()){var d=u.value;d.next(o)}}catch(f){a={error:f}}finally{try{u&&!u.done&&(c=l.return)&&c.call(l)}finally{if(a)throw a.error}}},function(){for(;0<s.length;)s.shift().complete();i.complete()},r,function(){for(;0<s.length;)s.shift().unsubscribe()}))})}function cb(n){return n.toElement?n.toElement:n.currentTarget?n.currentTarget:n.srcElement?n.srcElement:null}function st(n,t,e,i=!1){const s=async r=>{await e(r)};try{n.addEventListener(t,s,i)}catch{n.attachEvent("on"+t,s)}return()=>{try{n.removeEventListener(t,s,i)}catch{n.detachEvent("on"+t,s)}}}function hb(n,t,e,i,s=!1){return st(n||document.body,e,r=>{r.target===t&&i(r)},s)}function lb(n){n.replaceWith(n.cloneNode(!0))}function $(n,t,e=!1){return la(n,t,{capture:e})}function ub(n){const t=ut(e=>n.register(e),(e,i)=>{n.unregister?.(e,...i||[])},(...e)=>[...e]);return n.share?t.pipe(Lu({bufferSize:n.bufferSize||1,refCount:!0})):t}function zu(n){if(n.stopPropagation){n.stopPropagation();return}try{n.cancelBubble=!0}catch{}}function tn(n){if(n.preventDefault){n.preventDefault();return}try{n.returnValue=!1}catch{}}const fb=["click","dblclick","wheel","contextmenu","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave"],db=["keydown","keyup","keypress"],mb=["touchstart","touchend","touchcancel","touchmove"],pb=["pointerdown","pointerup","pointercancel","pointermove"],gb=["dragstart","drag","dragend","dragenter","dragover","dragleave","drop"],yb=["change"];function Ys(n,t={bubbles:!0,detail:{}}){let e;try{const i=Object.assign({bubbles:!0,cancelable:!0,view:window,detail:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null},t);fb.includes(n)?e=new MouseEvent(n,i):db.includes(n)?e=new KeyboardEvent(n,i):mb.includes(n)?e=new TouchEvent(n,i):pb.includes(n)?e=new PointerEvent(n,i):gb.includes(n)?e=new DragEvent(n,i):yb.includes(n)?e=new Event(n,i):e=new CustomEvent(n,i)}catch{document.createEvent?e=document.createEvent("Event").initEvent(n,!0,!0):document.createEventObject&&(e=document.createEventObject())}return e}function ma(n,t,e){if(n)if(n.dispatchEvent)n.dispatchEvent(e);else if(n.fireEvent&&document.createEventObject)n.fireEvent("on"+t,e);else throw new Error(`Can't dispatch event : ${t}`)}function bb(n,t){const e=n.target,i=Ys(t);ma(e,t,i)}function wb(n){const t=n.target,e="click";if(!/(SELECT|INPUT|TEXTAREA)/i.test(t.tagName)){const i=Ys(e);i.view=n.view||window,i.detail=1,i.screenX=t.screenX||0,i.screenY=t.screenY||0,i.clientX=t.clientX||0,i.clientY=t.clientY||0,i.pageX=n.pageX,i.pageY=n.pageY,i.ctrlKey=!!n.ctrlKey,i.altKey=!!n.altKey,i.shiftKey=!!n.shiftKey,i.metaKey=!!n.metaKey,i.button=0,i.relatedTarget=null,i._constructed=!0,ma(t,e,i)}}function vb(n,t){const e=n.changedTouches[0];return Ys(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 xb(n,t,e,i,s){const r=t/e;let o=0,a=0;switch(n){case"aspectFit":r>=1?(o=i,a=o/r,a>s&&(a=s,o=a*r)):(a=s,o=a*r,o>i&&(o=i,a=o/r));break;case"aspectFill":r>=1?(a=s,o=a*r):(o=i,a=o/r);break;case"widthFix":o=i,a=o/r;break;case"heightFix":a=s,o=a*r;break;case"scaleToFill":default:o=i,a=s;break}return{width:o,height:a}}function Nu(n){try{const t=document.createElement("canvas"),e=t.getContext("2d");return t.width=n.width,t.height=n.height,e.drawImage(n,0,0,t.width,t.height),e.getImageData(0,0,t.width,t.height)}catch{return new ImageData(n.width,n.height)}}const _b=n=>{const t=n.width,e=n.height,i=t*e*3,s=i+54,r=[66,77,s&255,s>>8&255,s>>16&255,s>>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,i&255,i>>8&255,i>>16&255,i>>24&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=(4-t*3%4)%4,c=n.data;let h="";const l=t<<2;let u=e;const d=String.fromCharCode;do{const p=l*(u-1);let m="";for(let v=0;v<t;v++){const y=v<<2;m+=d(c[p+y+2])+d(c[p+y+1])+d(c[p+y])}for(let v=0;v<a;v++)m+=String.fromCharCode(0);h+=m}while(--u);function f(p){if(!window.btoa)throw"btoa undefined";let m="";if(typeof p=="string")m=p;else for(let v=0;v<p.length;v++)m+=String.fromCharCode(p[v]);return btoa(m)}return f(r.concat(o))+f(h)};function Sb(n){const{width:t,height:e}=n,i=document.createElement("canvas"),s=i.getContext("2d");return i.width=t,i.height=e,s.putImageData(n,0,0,0,0,t,e),i.toDataURL("image/png")}const Cb=(n,t,e)=>{const{width:i,height:s}=n,r=document.createElement("canvas"),o=r.getContext("2d");r.width=i,r.height=s,o.putImageData(n,0,0,0,0,i,s);const a=`image/${t?t.toLowerCase():"png"}`;r.toBlob(c=>{e?.(null,c)},a,1)};function Eb(n,t){return createImageBitmap(n,t)}function Tb(n){const t=[],e=[],i=[];let s=0;for(let c=0,h=n.data.length;c<h;c+=4)t[s]=n.data[c],e[s]=n.data[c+1],i[s]=n.data[c+2],s+=1;const r=pa(t),o=pa(e),a=pa(i);return"rgb("+r+","+o+","+a+")"}function pa(n){const t={},e=[],i=[];for(let a=0;a<n.length;a++)t[n[a]]?e.push(n[a]):t[n[a]]=1;let s=0;for(let a=0;a<e.length;a++){s=0;for(let c=0;c<e.length;c++)e[a]===e[c]&&(s+=1),i[a]=s}const r=Math.max.apply(null,i);let o=0;for(;o<i.length;o++)if(i[o]===r)return;return e[o]}const Pb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[(o*e+e-a-1)*4],s[c+1]=t[(o*e+e-a-1)*4+1],s[c+2]=t[(o*e+e-a-1)*4+2],s[c+3]=t[(o*e+e-a-1)*4+3]}return new ImageData(s,e,i)},Ab=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[((i-o-1)*e+a)*4],s[c+1]=t[((i-o-1)*e+a)*4+1],s[c+2]=t[((i-o-1)*e+a)*4+2],s[c+3]=t[((i-o-1)*e+a)*4+3]}return new ImageData(s,e,i)},Mb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<e;o++)for(let a=0;a<i;a++){const c=(o*i+a)*4;s[c]=t[(a*e+e-o-1)*4],s[c+1]=t[(a*e+e-o-1)*4+1],s[c+2]=t[(a*e+e-o-1)*4+2],s[c+3]=t[(a*e+e-o-1)*4+3]}return new ImageData(s,i,e)},Db=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<e;o++)for(let a=0;a<i;a++){const c=(o*i+a)*4;s[c]=t[((i-a-1)*e+o)*4],s[c+1]=t[((i-a-1)*e+o)*4+1],s[c+2]=t[((i-a-1)*e+o)*4+2],s[c+3]=t[((i-a-1)*e+o)*4+3]}return new ImageData(s,i,e)},Ib=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+1]+t[c+2])/3;s[c]=h,s[c+1]=h,s[c+2]=h,s[c+3]=t[c+3]}return new ImageData(s,e,i)},Ob=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=.2126*t[c]+.7152*t[c+1]+.0722*t[c+2];s[c]=h,s[c+1]=h,s[c+2]=h,s[c+3]=t[c+3]}return new ImageData(s,e,i)},kb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,l=(t[c]+t[c+1]+t[c+2])/3>127?255:0;s[c]=l,s[c+1]=l,s[c+2]=l,s[c+3]=t[c+3]}return new ImageData(s,e,i)},Rb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=255-t[c],s[c+1]=255-t[c+1],s[c+2]=255-t[c+2],s[c+3]=t[c+3]}return new ImageData(s,e,i)},Lb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[c],s[c+1]=0,s[c+2]=0,s[c+3]=t[c+3]}return new ImageData(s,e,i)},zb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=0,s[c+1]=t[c+1],s[c+2]=0,s[c+3]=t[c+3]}return new ImageData(s,e,i)},Nb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=0,s[c+1]=0,s[c+2]=t[c+2],s[c+3]=t[c+3]}return new ImageData(s,e,i)},Fb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[c],s[c+1]=t[c+1],s[c+2]=0,s[c+3]=t[c+3]}return new ImageData(s,e,i)},Bb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[c],s[c+1]=0,s[c+2]=t[c+1],s[c+3]=t[c+3]}return new ImageData(s,e,i)},Ub=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=0,s[c+1]=t[c+1],s[c+2]=t[c+1],s[c+3]=t[c+3]}return new ImageData(s,e,i)},Vb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c+1]+t[c+2])/2;s[c]=t[c],s[c+1]=h,s[c+2]=h,s[c+3]=t[c+3]}return new ImageData(s,e,i)},Yb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+2])/2;s[c]=h,s[c+1]=t[c+1],s[c+2]=h,s[c+3]=t[c+3]}return new ImageData(s,e,i)},$b=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+1])/2;s[c]=h,s[c+1]=h,s[c+2]=t[c+2],s[c+3]=t[c+3]}return new ImageData(s,e,i)},Gb=n=>Fu(n,[-1,-1,-1,-1,9,-1,-1,-1,-1]),Xb=n=>Fu(n,[-1,-1,-1,-1,8,-1,-1,-1,-1]),jb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[c],s[c+1]=t[c+1],s[c+2]=t[c+2],s[c+3]=255}return new ImageData(s,e,i)},Wb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;if(t[c+3]===0)s[c]=255,s[c+1]=255,s[c+2]=255,s[c+3]=255;else{const h=Bu([t[c],t[c+1],t[c+2],t[c+3]],[255,255,255,255]);s[c]=h[0],s[c+1]=h[1],s[c+2]=h[2],s[c+3]=h[3]}}return new ImageData(s,e,i)};function Hb(n,t,e,i,s,r=!1,o){const{data:a,width:c,height:h}=n;let l=s,u=i,d=t,f=e;if(l<0?l=0:l>c&&(l=c),u<0?u=0:u>h&&(u=h),d<1?d=1:d>c&&(d=c),f<1?f=1:f>h&&(f=h),l+d>c&&(d=c-l),u+f>h&&(f=h-u),r){const p=new Uint8ClampedArray(a.length);for(let v=0;v<h;v++)for(let y=0;y<c;y++){const b=(v*c+y)*4;y>=l&&y<=l+d&&v>=u&&v<=u+f?(p[b]=a[b],p[b+1]=a[b+1],p[b+2]=a[b+2],p[b+3]=a[b+3]):(p[b]=255,p[b+1]=255,p[b+2]=255,p[b+3]=o&&["JPG","JPEG"].includes(o.toUpperCase())?255:0)}return new ImageData(p,c,h)}else{const p=new Uint8ClampedArray(d*f*4);for(let v=u;v<=u+f;v++)for(let y=l;y<=l+d;y++){const b=((v-u)*d+y-l)*4,x=(v*c+y)*4;p[b]=a[x],p[b+1]=a[x+1],p[b+2]=a[x+2],p[b+3]=a[x+3]}return new ImageData(p,d,f)}}function qb(n,t,e,i){const{data:s,width:r,height:o}=n;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 c=new Uint8ClampedArray(s.length);for(let l=0;l<o;l++)for(let u=0;u<r;u++){const d=(l*r+u)*4;let f=-1;u<a?l<a?f=Math.sqrt(Math.pow(a-u-1,2)+Math.pow(a-l-1,2)):l>o-a-1&&(f=Math.sqrt(Math.pow(a-u-1,2)+Math.pow(l-(o-a),2))):u>r-a-1&&(l<a?f=Math.sqrt(Math.pow(u-(r-a),2)+Math.pow(a-l-1,2)):l>o-a-1&&(f=Math.sqrt(Math.pow(u-(r-a),2)+Math.pow(l-(o-a),2)))),Math.round(f)>a?(c[d]=255,c[d+1]=255,c[d+2]=255,c[d+3]=i||e.toUpperCase()==="PNG"?0:255):(c[d]=s[d],c[d+1]=s[d+1],c[d+2]=s[d+2],c[d+3]=i||e.toUpperCase()==="PNG"?s[d+3]:255)}return new ImageData(c,r,o)}function Jb(n,t,e,i,s,r=1e4){const o=new Image;o.src=n;const a=document.createElement("canvas"),c=a.getContext("2d");return a.width=r,a.height=r,c.drawImage(o,0,0,t,e,0,0,i,s),c.getImageData(0,0,i,s)}function Kb(n,t){const{data:e,width:i,height:s}=n,r=new Uint8ClampedArray(e.length);for(let a=0;a<s;a++)for(let c=0;c<i;c++){const h=(a*i+c)*4;r[h]=Math.max(Math.min(e[h]+t,255),0),r[h+1]=Math.max(Math.min(e[h+1]+t,255),0),r[h+2]=Math.max(Math.min(e[h+2]+t,255),0),r[h+3]=e[h+3]}return new ImageData(r,i,s)}function Zb(n,t,e=!1){const{data:i,width:s,height:r}=n,o=new Uint8ClampedArray(i.length);for(let c=0;c<r;c++)for(let h=0;h<s;h++){const l=(c*s+h)*4;i[l+3]===0?(o[l]=255,o[l+1]=255,o[l+2]=255):(o[l]=i[l],o[l+1]=i[l+1],o[l+2]=i[l+2]);let u=i[l+3];e?u=Math.max(Math.min(Math.floor(255*t),255),0):u=Math.max(Math.min(Math.floor(u+255*t),255),0),o[l+3]=u}return new ImageData(o,s,r)}function Qb(n,t,e,i){const{data:s,width:r,height:o}=n,{data:a,width:c,height:h}=t;let l=e,u=i;e+h>o&&(l=o-h),i+c>r&&(u=r-c);const d=new Uint8ClampedArray(s.length);for(let p=0;p<o;p++)for(let m=0;m<r;m++){const v=(p*r+m)*4;if(m<u||m>u+c||p<=l||p>=l+h)d[v]=s[v],d[v+1]=s[v+1],d[v+2]=s[v+2],d[v+3]=s[v+3];else{const y=(p*r+m-((l+1)*r+(p-(l+1))*(r-c))+c-u-1)*4,b=[a[y],a[y+1],a[y+2],a[y+3]],x=[s[v],s[v+1],s[v+2],s[v+3]],w=Bu(b,x);d[v]=w[0],d[v+1]=w[1],d[v+2]=w[2],d[v+3]=w[3]}}return new ImageData(d,r,o)}function tw(n,t,e,i,s,r=10){const{data:o,width:a,height:c}=n;let h=s,l=i,u=t,d=e;h<0?h=0:h>a&&(h=a),l<0?l=0:l>c&&(l=c),u<1?u=1:u>a&&(u=a),d<1?d=1:d>c&&(d=c),h+u>a&&(u=a-h),l+d>c&&(d=c-l);const f=new Uint8ClampedArray(o.length);for(let m=0;m<c;m++)for(let v=0;v<a;v++){const y=(m*a+v)*4;if(v>=h&&v<=h+u&&m>=l&&m<=l+d){const b=Math.floor((v-h)/r),x=Math.floor((m-l)/r);let w=Math.floor(r*(b+1)-r/2+h),C=Math.floor(r*(x+1)-r/2+l);w>a-1&&(w=a-1),C>c-1&&(C=c-1);const S=(C*a+w)*4;f[y]=o[S],f[y+1]=o[S+1],f[y+2]=o[S+2],f[y+3]=o[S+3]}else f[y]=o[y],f[y+1]=o[y+1],f[y+2]=o[y+2],f[y+3]=o[y+3]}return new ImageData(f,a,c)}function ew(n,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:i,width:s,height:r}=n,{data:o}=t,a=new Uint8ClampedArray(i.length),{backgroundColor:c,changeIntoColor:h}=e;for(let u=0;u<r;u++)for(let d=0;d<s;d++){const f=(u*s+d)*4,p=o[f],m=o[f+1],v=o[f+2],y=o[f+3];p===c.r&&m===c.g&&v===c.b&&y===c.a&&h.a!==0?(a[f]=h.r,a[f+1]=h.g,a[f+2]=h.b,a[f+3]=h.a):(a[f]=i[f],a[f+1]=i[f+1],a[f+2]=i[f+2],a[f+3]=i[f+3])}return new ImageData(a,s,r)}return n}function Fu(n,t){const{data:e,width:i,height:s}=n,r=new Uint8ClampedArray(e.length);for(let a=0;a<s;a++)for(let c=0;c<i;c++){const h=(a*i+c)*4;for(let l=0;l<3;l++){const u=h+l;c===0||c===i-1||a===0||a===s-1?r[u]=e[u]:r[u]=t[0]*e[u-i*4-4]+t[1]*e[u-i*4]+t[2]*e[u-i*4+4]+t[3]*e[u-4]+t[4]*e[u]+t[5]*e[u+4]+t[6]*e[u+i*4-4]+t[7]*e[u+i*4]+t[8]*e[u+i*4+4]}r[h+3]=e[h+3]}return new ImageData(r,i,s)}function Bu(n,t){if(n&&n.length===4&&t&&t.length===4){const e=n[3],i=t[3];if(e===255||i===0)return n;if(e===0)return t;{const s=e/255,r=i/255,o=Math.max(Math.min(Math.floor(n[0]*s+t[0]*r*(1-s)),255),0),a=Math.max(Math.min(Math.floor(n[1]*s+t[1]*r*(1-s)),255),0),c=Math.max(Math.min(Math.floor(n[2]*s+t[2]*r*(1-s)),255),0),h=Math.max(Math.min(Math.floor((s+r*(1-s))*255),255),0);return[o,a,c,h]}}return[255,255,255,255]}const ga=function(){const n=[];return{writeByte(t){n.push(t&255)},writeShort(t){this.writeByte(t),this.writeByte(t>>>8)},writeBytes(t,e=0,i=t.length){for(let s=0;s<i;s++)this.writeByte(t[s+e])},writeString(t){for(let e=0,i=t.length;e<i;e++)this.writeByte(t.charCodeAt(e))},toByteArray(){return n},toString(){let t="[";for(let e=0,i=n.length;e<i;e++)e>0&&(t+=","),t+=n[e];return t+="]",t}}},Uu=function(){let n=0,t=0,e=0,i="";const s=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){i+=String.fromCharCode(s(o&63))};return{writeByte(o){for(n=n<<8|o&255,t+=8,e+=1;t>=6;)r(n>>>t-6),t-=6},flush(){if(t>0&&(r(n<<6-t),n=0,t=0),e%3!=0){const o=3-e%3;for(let a=0;a<o;a++)i+="="}},toString(){return i}}},Vu=function(n,t,e){const i=new Array(n*n),s=function(a){const c=a;let h=0,l=0;return{write(u,d){if(u>>>d)throw new Error("length over");for(;h+d>=8;)c.writeByte(255&(u<<h|l)),d-=8-h,u>>>=8-h,l=0,h=0;l=u<<h|l,h=h+d},flush(){h>0&&c.writeByte(l)}}},r=function(a){const c=1<<a,h=(1<<a)+1;let l=a+1;const u=o();for(let v=0;v<c;v++)u.add(String.fromCharCode(v));u.add(String.fromCharCode(c)),u.add(String.fromCharCode(h));const d=ga(),f=s(d);f.write(c,l);let p=0,m=String.fromCharCode(i[p]);for(p+=1;p<i.length;){const v=String.fromCharCode(i[p]);p+=1,u.contains(m+v)?m=m+v:(f.write(u.indexOf(m),l),u.size()<4095&&(u.size()==1<<l&&(l+=1),u.add(m+v)),m=v)}return f.write(u.indexOf(m),l),f.write(h,l),f.flush(),d.toByteArray()},o=function(){const a={};let c=0;return{add(h){if(this.contains(h))throw new Error("dup key:"+h);a[h]=c,c+=1},size(){return c},indexOf(h){return a[h]},contains(h){return typeof a[h]<"u"}}};return{setPixel(a,c,h){i[c*n+a]=h},write(a){a.writeString("GIF87a"),a.writeShort(n),a.writeShort(n),a.writeByte(128),a.writeByte(0),a.writeByte(0),a.writeByte(Un("0x"+t[1]+t[2])),a.writeByte(Un("0x"+t[3]+t[4])),a.writeByte(Un("0x"+t[5]+t[6])),a.writeByte(Un("0x"+e[1]+e[2])),a.writeByte(Un("0x"+e[3]+e[4])),a.writeByte(Un("0x"+e[5]+e[6])),a.writeString(","),a.writeShort(0),a.writeShort(0),a.writeShort(n),a.writeShort(n),a.writeByte(0);const c=2,h=r(c);a.writeByte(c);let l=0;for(;h.length-l>255;)a.writeByte(255),a.writeBytes(h,l,255),l+=255;a.writeByte(h.length-l),a.writeBytes(h,l,h.length-l),a.writeByte(0),a.writeString(";")}}},Yu=function(n,t,e,i){const s=Vu(n,t,e);for(let h=0;h<n;h++)for(let l=0;l<n;l++)s.setPixel(l,h,i(l,h));const r=ga();s.write(r);const o=Uu(),a=r.toByteArray();for(let h=0,l=a.length;h<l;h++)o.writeByte(a[h]);o.flush();let c="";return c+="data:image/gif;base64,",c+=o,c},Zt={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Ei={M:0,L:1,H:2,Q:3},en={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},Et={glog:function(n){if(n<1)throw new Error("glog("+n+")");return Et.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return Et.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(let n=0;n<8;n++)Et.EXP_TABLE[n]=1<<n;for(let n=8;n<256;n++)Et.EXP_TABLE[n]=Et.EXP_TABLE[n-4]^Et.EXP_TABLE[n-5]^Et.EXP_TABLE[n-6]^Et.EXP_TABLE[n-8];for(let n=0;n<255;n++)Et.LOG_TABLE[Et.EXP_TABLE[n]]=n;const ht={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(n){let t=n<<10;for(;ht.getBCHDigit(t)-ht.getBCHDigit(ht.G15)>=0;)t^=ht.G15<<ht.getBCHDigit(t)-ht.getBCHDigit(ht.G15);return(n<<10|t)^ht.G15_MASK},getBCHTypeNumber:function(n){let t=n<<12;for(;ht.getBCHDigit(t)-ht.getBCHDigit(ht.G18)>=0;)t^=ht.G18<<ht.getBCHDigit(t)-ht.getBCHDigit(ht.G18);return n<<12|t},getBCHDigit:function(n){let t=0;for(;n!=0;)t++,n>>>=1;return t},getPatternPosition:function(n){return ht.PATTERN_POSITION_TABLE[n-1]},getMask:function(n,t,e){switch(n){case en.PATTERN000:return(t+e)%2==0;case en.PATTERN001:return t%2==0;case en.PATTERN010:return e%3==0;case en.PATTERN011:return(t+e)%3==0;case en.PATTERN100:return(Math.floor(t/2)+Math.floor(e/3))%2==0;case en.PATTERN101:return t*e%2+t*e%3==0;case en.PATTERN110:return(t*e%2+t*e%3)%2==0;case en.PATTERN111:return(t*e%3+(t+e)%2)%2==0;default:throw new Error("bad maskPattern:"+n)}},getErrorCorrectPolynomial:function(n){let t=new Jn([1],0);for(let e=0;e<n;e++)t=t.multiply(new Jn([1,Et.gexp(e)],0));return t},getLengthInBits:function(n,t){if(1<=t&&t<10)switch(n){case Zt.MODE_NUMBER:return 10;case Zt.MODE_ALPHA_NUM:return 9;case Zt.MODE_8BIT_BYTE:return 8;case Zt.MODE_KANJI:return 8;default:throw new Error("mode:"+n)}else if(t<27)switch(n){case Zt.MODE_NUMBER:return 12;case Zt.MODE_ALPHA_NUM:return 11;case Zt.MODE_8BIT_BYTE:return 16;case Zt.MODE_KANJI:return 10;default:throw new Error("mode:"+n)}else if(t<41)switch(n){case Zt.MODE_NUMBER:return 14;case Zt.MODE_ALPHA_NUM:return 13;case Zt.MODE_8BIT_BYTE:return 16;case Zt.MODE_KANJI:return 12;default:throw new Error("mode:"+n)}else throw new Error("type:"+t)},getLostPoint:function(n){const t=n.getModuleCount();let e=0;for(let r=0;r<t;r++)for(let o=0;o<t;o++){let a=0;const c=n.isDark(r,o);for(let h=-1;h<=1;h++)if(!(r+h<0||t<=r+h))for(let l=-1;l<=1;l++)o+l<0||t<=o+l||h==0&&l==0||c==n.isDark(r+h,o+l)&&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;n.isDark(r,o)&&a++,n.isDark(r+1,o)&&a++,n.isDark(r,o+1)&&a++,n.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++)n.isDark(r,o)&&!n.isDark(r,o+1)&&n.isDark(r,o+2)&&n.isDark(r,o+3)&&n.isDark(r,o+4)&&!n.isDark(r,o+5)&&n.isDark(r,o+6)&&(e+=40);for(let r=0;r<t;r++)for(let o=0;o<t-6;o++)n.isDark(o,r)&&!n.isDark(o+1,r)&&n.isDark(o+2,r)&&n.isDark(o+3,r)&&n.isDark(o+4,r)&&!n.isDark(o+5,r)&&n.isDark(o+6,r)&&(e+=40);let i=0;for(let r=0;r<t;r++)for(let o=0;o<t;o++)n.isDark(o,r)&&i++;const s=Math.abs(100*i/t/t-50)/5;return e+=s*10,e}};class Jn{num;constructor(t,e){if(t.length==null)throw new Error(t.length+"/"+e);let i=0;for(;i<t.length&&t[i]==0;)i++;this.num=new Array(t.length-i+e);for(let s=0;s<t.length-i;s++)this.num[s]=t[s+i]}get(t){return this.num[t]}getLength(){return this.num.length}multiply(t){const e=new Array(this.getLength()+t.getLength()-1);for(let i=0;i<this.getLength();i++)for(let s=0;s<t.getLength();s++)e[i+s]^=Et.gexp(Et.glog(this.get(i))+Et.glog(t.get(s)));return new Jn(e,0)}mod(t){if(this.getLength()-t.getLength()<0)return this;const e=Et.glog(this.get(0))-Et.glog(t.get(0)),i=new Array(this.getLength());for(let s=0;s<this.getLength();s++)i[s]=this.get(s);for(let s=0;s<t.getLength();s++)i[s]^=Et.gexp(Et.glog(t.get(s))+e);return new Jn(i,0).mod(t)}}class ze{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 i=ze.getRsBlockTable(t,e);if(i==null)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);const s=i.length/3,r=[];for(let o=0;o<s;o++){const a=i[o*3+0],c=i[o*3+1],h=i[o*3+2];for(let l=0;l<a;l++)r.push(new ze(c,h))}return r}static getRsBlockTable(t,e){switch(e){case Ei.L:return ze.RS_BLOCK_TABLE[(t-1)*4+0];case Ei.M:return ze.RS_BLOCK_TABLE[(t-1)*4+1];case Ei.Q:return ze.RS_BLOCK_TABLE[(t-1)*4+2];case Ei.H:return ze.RS_BLOCK_TABLE[(t-1)*4+3];default:return}}}class $u{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 i=0;i<e;i++)this.putBit((t>>>e-i-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 nw{mode;data;constructor(t){this.mode=Zt.MODE_8BIT_BYTE,this.data=t}getLength(){return this.data.length}write(t){for(let e=0,i=this.data.length;e<i;e++)t.put(this.data.charCodeAt(e),8)}}class nn{static PAD0=236;static PAD1=17;typeNumber;errorCorrectLevel;modules;moduleCount;dataCache;dataList;constructor(t,e){this.typeNumber=t,this.errorCorrectLevel=Ei[e],this.modules=[],this.moduleCount=0,this.dataCache=null,this.dataList=[]}addData(t){const e=new nw(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=ze.getRSBlocks(t,this.errorCorrectLevel),i=new $u;let s=0;for(let r=0;r<e.length;r++)s+=e[r].dataCount;for(let r=0;r<this.dataList.length;r++){const o=this.dataList[r];i.put(o.mode,4),i.put(o.getLength(),ht.getLengthInBits(o.mode,t)),o.write(i)}if(i.getLengthInBits()<=s*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 i=0;i<this.moduleCount;i++){this.modules[i]=new Array(this.moduleCount);for(let s=0;s<this.moduleCount;s++)this.modules[i][s]=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=nn.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)}setupPositionProbePattern(t,e){for(let i=-1;i<=7;i++)if(!(t+i<=-1||this.moduleCount<=t+i))for(let s=-1;s<=7;s++)e+s<=-1||this.moduleCount<=e+s||(0<=i&&i<=6&&(s==0||s==6)||0<=s&&s<=6&&(i==0||i==6)||2<=i&&i<=4&&2<=s&&s<=4?this.modules[t+i][e+s]=!0:this.modules[t+i][e+s]=!1)}getBestMaskPattern(){let t=0,e=0;for(let i=0;i<8;i++){this.makeImpl(!0,i);const s=ht.getLostPoint(this);(i==0||t>s)&&(t=s,e=i)}return e}createMovieClip(t,e,i){const s=t.createEmptyMovieClip(e,i),r=1;this.make();for(let o=0;o<this.modules.length;o++){const a=o*r;for(let c=0;c<this.modules[o].length;c++){const h=c*r;this.modules[o][c]&&(s.beginFill(0,100),s.moveTo(h,a),s.lineTo(h+r,a),s.lineTo(h+r,a+r),s.lineTo(h,a+r),s.endFill())}}return s}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=ht.getPatternPosition(this.typeNumber);for(let e=0;e<t.length;e++)for(let i=0;i<t.length;i++){const s=t[e],r=t[i];if(this.modules[s][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[s+o][r+a]=!0:this.modules[s+o][r+a]=!1}}setupTypeNumber(t){const e=ht.getBCHTypeNumber(this.typeNumber);for(let i=0;i<18;i++){const s=!t&&(e>>i&1)==1;this.modules[Math.floor(i/3)][i%3+this.moduleCount-8-3]=s}for(let i=0;i<18;i++){const s=!t&&(e>>i&1)==1;this.modules[i%3+this.moduleCount-8-3][Math.floor(i/3)]=s}}setupTypeInfo(t,e){const i=this.errorCorrectLevel<<3|e,s=ht.getBCHTypeInfo(i);for(let r=0;r<15;r++){const o=!t&&(s>>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&&(s>>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 i=-1,s=this.moduleCount-1,r=7,o=0;for(let a=this.moduleCount-1;a>0;a-=2)for(a==6&&a--;;){for(let c=0;c<2;c++)if(this.modules[s][a-c]==null){let h=!1;o<t.length&&(h=(t[o]>>>r&1)==1),ht.getMask(e,s,a-c)&&(h=!h),this.modules[s][a-c]=h,r--,r==-1&&(o++,r=7)}if(s+=i,s<0||this.moduleCount<=s){s-=i,i=-i;break}}}static createData(t,e,i){const s=ze.getRSBlocks(t,e),r=new $u;for(let a=0;a<i.length;a++){const c=i[a];r.put(c.mode,4),r.put(c.getLength(),ht.getLengthInBits(c.mode,t)),c.write(r)}let o=0;for(let a=0;a<s.length;a++)o+=s[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(nn.PAD0,8),r.getLengthInBits()>=o*8));)r.put(nn.PAD1,8);return nn.createBytes(r,s)}static createBytes(t,e){let i=0,s=0,r=0;const o=new Array(e.length),a=new Array(e.length);for(let u=0;u<e.length;u++){const d=e[u].dataCount,f=e[u].totalCount-d;s=Math.max(s,d),r=Math.max(r,f),o[u]=new Array(d);for(let y=0;y<o[u].length;y++)o[u][y]=255&t.buffer[y+i];i+=d;const p=ht.getErrorCorrectPolynomial(f),v=new Jn(o[u],p.getLength()-1).mod(p);a[u]=new Array(p.getLength()-1);for(let y=0;y<a[u].length;y++){const b=y+v.getLength()-a[u].length;a[u][y]=b>=0?v.get(b):0}}let c=0;for(let u=0;u<e.length;u++)c+=e[u].totalCount;const h=new Array(c);let l=0;for(let u=0;u<s;u++)for(let d=0;d<e.length;d++)u<o[d].length&&(h[l++]=o[d][u]);for(let u=0;u<r;u++)for(let d=0;d<e.length;d++)u<a[d].length&&(h[l++]=a[d][u]);return h}}const Gu=Math.ceil,Ti=Math.floor,Xu=Math.round;function iw(n,t){const e=Lh(n),i=t?.ecc||"H",s=t?.size||256,r=-1,o=t?.padding||0,a=t?.color||"#000000",c=t?.background||"#ffffff",h=new nn(r,i);h.addData(e),h.make();const l=h.getModuleCount(),u=(s-o*2)/l,d=o,f=s-o;return Yu(s,a,c,function(p,m){if(d<=p&&p<f&&d<=m&&m<f){const v=Ti((p-d)/u),y=Ti((m-d)/u);return h.isDark(y,v)?0:1}else return 1})}function sw(n,t){const e=t.x||0,i=t.y||0,s=Lh(n),r=t.ctx,o=t.ecc||"H",a=typeof t.size=="number"?Ti(t.size):256,c=t.padding||0,h=-1,l=t.color||"#000000",u=t.background||"#ffffff",d=new nn(h,o);d.addData(s),d.make();const f=d.getModuleCount(),p=(a-c*2)/f;r.fillStyle=u,r.fillRect(e,i,a,a);for(let m=0;m<f;m++)for(let v=0;v<f;v++){const y=Gu((v+1)*p)-Ti(v*p),b=Gu((m+1)*p)-Ti(m*p);r.fillStyle=d.isDark(m,v)?l:u,r.fillRect(e+Xu(v*p)+c,i+Xu(m*p)+c,y,b)}}function q(n){return n*Math.PI/180}function Tt(n){return n*180/Math.PI}function Kn(n,t,e=0){return Math.sqrt(n*n+t*t+e*e)}function sn(n,t,e,i){return Kn(e-n,i-t)}function Qt(n,t,e,i){let s=Math.atan2(i-t,e-n);return s<0&&(s+=Math.PI*2),s}function rn(n,t){return{dx:Math.cos(n)*t,dy:Math.sin(n)*t}}function rw(n,t,e){if(typeof e=="number"){const i=Kn(n,t,e);return{x:n/=i,y:t/=i,z:e/=i}}else{const i=Kn(n,t);return{x:n/=i,y:t/=i}}}function ow(n,t,e,i,s=10){if(Math.abs(e-n)<s&&Math.abs(i-t)<s)return"no";const r=Tt(Qt(n,t,e,i));return r>=-135&&r<=-45?"up":r>45&&r<135?"down":r>=135&&r<=180||r>=-180&&r<-135?"left":"right"}class $s{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 $s(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,i=this.y;return this.x=t.m11*e+t.m21*i+t.m31,this.y=t.m12*e+t.m22*i+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=Y(this.x,t.x,e.x),this.y=Y(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=Y(this.x,t,e),this.y=Y(this.y,t,e),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Y(i,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 i=t.dot(this)/e;return this.copy(t).multiplyScalar(i)}perpendOnVector(t){return ju.copy(this).projectOnVector(t),this.sub(ju)}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 i=this.dot(t)/e;return Math.acos(Y(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,i=this.y-t.y;return e*e+i*i}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,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,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}rotateAround(t,e){const i=Math.cos(e),s=Math.sin(e),r=this.x-t.x,o=this.y-t.y;return this.x=r*i-o*s+t.x,this.y=r*s+o*i+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class _e{x=0;y=0;z=0;constructor(t=0,e=0,i=0){this.x=t,this.y=e,this.z=i}set(t=0,e=0,i=0){return this.x=t,this.y=e,this.z=i,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 _e(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}applyMatrix3(t){const e=this.x,i=this.y,s=this.z,r=t.value;return this.x=r[0]*e+r[3]*i+r[6]*s,this.y=r[1]*e+r[4]*i+r[7]*s,this.z=r[2]*e+r[5]*i+r[8]*s,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,i=this.y,s=this.z,r=t.value,o=1/(r[3]*e+r[7]*i+r[11]*s+r[15]);return this.x=(r[0]*e+r[4]*i+r[8]*s+r[12])*o,this.y=(r[1]*e+r[5]*i+r[9]*s+r[13])*o,this.z=(r[2]*e+r[6]*i+r[10]*s+r[14])*o,this}transformDirection(t){const e=this.x,i=this.y,s=this.z,r=t.value;return this.x=r[0]*e+r[4]*i+r[8]*s,this.y=r[1]*e+r[5]*i+r[9]*s,this.z=r[2]*e+r[6]*i+r[10]*s,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=Y(this.x,t.x,e.x),this.y=Y(this.y,t.y,e.y),this.z=Y(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=Y(this.x,t,e),this.y=Y(this.y,t,e),this.z=Y(this.z,t,e),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Y(i,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,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this.z=t.z+(e.z-t.z)*i,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const i=t.x,s=t.y,r=t.z,o=e.x,a=e.y,c=e.z;return this.x=s*c-r*a,this.y=r*o-i*c,this.z=i*a-s*o,this}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0);const i=t.dot(this)/e;return this.copy(t).multiplyScalar(i)}perpendOnVector(t){return ba.copy(this).projectOnVector(t),this.sub(ba)}projectOnPlane(t){return this.perpendOnVector(t)}reflect(t){return this.sub(ba.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 i=this.dot(t)/e;return Math.acos(Y(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,i=this.y-t.y,s=this.z-t.z;return e*e+i*i+s*s}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(),i=this.setFromMatrix4Column(t,1).length(),s=this.setFromMatrix4Column(t,2).length();return this.x=e,this.y=i,this.z=s,this}setFromMatrix4Column(t,e){return this.fromArray(t.value,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.value,e*3)}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}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,i=Math.sqrt(1-e*e);return this.x=i*Math.cos(t),this.y=e,this.z=i*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}class ya{x=0;y=0;z=0;w=1;constructor(t=0,e=0,i=0,s=1){this.x=t,this.y=e,this.z=i,this.w=s}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,i=0,s=1){return this.x=t,this.y=e,this.z=i,this.w=s,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 ya(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,i=this.y,s=this.z,r=this.w,o=t.value;return this.x=o[0]*e+o[4]*i+o[8]*s+o[12]*r,this.y=o[1]*e+o[5]*i+o[9]*s+o[13]*r,this.z=o[2]*e+o[6]*i+o[10]*s+o[14]*r,this.w=o[3]*e+o[7]*i+o[11]*s+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)}setAxisAngleFromRotationMatrix4(t){let e,i,s,r;const c=t.value,h=c[0],l=c[4],u=c[8],d=c[1],f=c[5],p=c[9],m=c[2],v=c[6],y=c[10];if(Math.abs(l-d)<.01&&Math.abs(u-m)<.01&&Math.abs(p-v)<.01){if(Math.abs(l+d)<.1&&Math.abs(u+m)<.1&&Math.abs(p+v)<.1&&Math.abs(h+f+y-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;const x=(h+1)/2,w=(f+1)/2,C=(y+1)/2,S=(l+d)/4,D=(u+m)/4,L=(p+v)/4;return x>w&&x>C?x<.01?(i=0,s=.707106781,r=.707106781):(i=Math.sqrt(x),s=S/i,r=D/i):w>C?w<.01?(i=.707106781,s=0,r=.707106781):(s=Math.sqrt(w),i=S/s,r=L/s):C<.01?(i=.707106781,s=.707106781,r=0):(r=Math.sqrt(C),i=D/r,s=L/r),this.set(i,s,r,e),this}let b=Math.sqrt((v-p)*(v-p)+(u-m)*(u-m)+(d-l)*(d-l));return Math.abs(b)<.001&&(b=1),this.x=(v-p)/b,this.y=(u-m)/b,this.z=(d-l)/b,this.w=Math.acos((h+f+y-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=Y(this.x,t.x,e.x),this.y=Y(this.y,t.y,e.y),this.z=Y(this.z,t.z,e.z),this.w=Y(this.w,t.w,e.w),this}clampScalar(t,e){return this.x=Y(this.x,t,e),this.y=Y(this.y,t,e),this.z=Y(this.z,t,e),this.w=Y(this.w,t,e),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Y(i,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 i=t.dot(this)/e;return this.copy(t).multiplyScalar(i)}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,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this.z=t.z+(e.z-t.z)*i,this.w=t.w+(e.w-t.w)*i,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}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 ju=new $s,ba=new _e,Wu=aw("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 aw(n,t=10){const e={},i=n.split(",");for(let s=0;s<i.length;s+=2){const r="&"+i[s+1]+";",o=parseInt(i[s],t);e[r]="&#"+o+";"}return e["\\xa0"]=" ",e}function Bt(n,t){const e=Object.keys(t);for(let i=0;i<e.length;i++)n=n.replace(new RegExp("{"+e[i]+"}","gi"),""+t[e[i]]);return n}function Gs(n){let t,e;if(!n)throw new Error("cannot create a random attribute name for an undefined object");const i="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=i[Math.floor(Math.random()*i.length)];while(n[t]);return t}function cw(n){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[n]||t.start}function hw(n){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[n]||t.alphabetic}const Pi={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 i=this.__ctx.__createElement("stop");if(i.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&&(i.setAttribute("stop-color",Bt("rgb({r},{g},{b})",{r:r[1],g:r[2],b:r[3]})),i.setAttribute("stop-opacity",r[4]))}else i.setAttribute("stop-color",e);this.__root.appendChild(i)}},wa=class{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}},Hu=class Ph{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:i=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=i),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(Pi);for(let e=0,i=t.length;e<i;e++){const s=t[e];this[s]=Pi[s].canvas}}__getStyleState(){const t={},e=Object.keys(Pi);for(let i=0,s=e.length;i<s;i++){const r=e[i];t[r]=this[r]}return t}__applyStyleState(t){const e=Object.keys(t);for(let i=0,s=e.length;i<s;i++){const r=e[i];this[r]=t[r]}}__createElement(t,e={},i=!1){const s=this.__document.createElementNS("http://www.w3.org/2000/svg",t),r=Object.keys(e);i&&(s.setAttribute("fill","none"),s.setAttribute("stroke","none"));for(let o=0;o<r.length;o++){const a=r[o];s.setAttribute(a,e[a])}return s}__applyStyleToCurrentElement(t){let e=this.__currentElement;const i=this.__currentElementsToStyle;i&&(e.setAttribute(t,""),e=i.element,i.children.forEach(r=>{r.setAttribute(t,"")}));const s=Object.keys(Pi);for(let r=0;r<s.length;r++){const o=Pi[s[r]],a=this[s[r]];if(o.apply){if(a instanceof wa){if(a.__ctx)for(;a.__ctx.__SVGdefs.childNodes.length;){const c=a.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[c]=c,this.__SVGdefs.appendChild(a.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(o.apply,Bt("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof Xs)e.setAttribute(o.apply,Bt("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 h=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(a);if(h){e.setAttribute(o.svgAttr,Bt("rgb({r},{g},{b})",{r:h[1],g:h[2],b:h[3]}));let l=parseFloat(h[4]);const u=this.globalAlpha;u!=null&&(l*=u),e.setAttribute(o.svgAttr+"-opacity",""+l)}}else{let c=o.svgAttr;if(s[r]==="globalAlpha"&&(c=t+"-"+o.svgAttr,e.getAttribute(c)))continue;c&&e.setAttribute(c,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 s=Object.keys(Wu);for(let r=0,o=s.length;r<o;r++){const a=s[r],c=Wu[a],h=new RegExp(a,"gi");h.test(e)&&(e=e.replace(h,c))}}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 s=this.__createElement("g");e.appendChild(s),this.__currentElement=s}let i=this.__currentElement.getAttribute("transform");i?i+=" ":i="",i+=t,this.__currentElement.setAttribute("transform",i)}scale(t,e){e===void 0&&(e=t),this.__addTransform(Bt("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(Bt("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(Bt("translate({x},{y})",{x:t,y:e}))}transform(t,e,i,s,r,o){this.__addTransform(Bt("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:i,d:s,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(Bt("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(Bt("L {x} {y}",this.__currentPosition)):this.__addPathCommand(Bt("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,i,s,r,o){this.__currentPosition={x:r,y:o},this.__addPathCommand(Bt("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:i,cp2y:s,x:r,y:o}))}quadraticCurveTo(t,e,i,s){this.__currentPosition={x:i,y:s},this.__addPathCommand(Bt("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:i,y:s}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,i,s,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===i&&e===s||r===0){this.lineTo(t,e);return}const c=this.normalize([o-t,a-e]),h=this.normalize([i-t,s-e]);if(c[0]*h[1]===c[1]*h[0]){this.lineTo(t,e);return}const l=c[0]*h[0]+c[1]*h[1],u=Math.acos(Math.abs(l)),d=this.normalize([c[0]+h[0],c[1]+h[1]]),f=r/Math.sin(u/2),p=t+f*d[0],m=e+f*d[1],v=[-c[1],c[0]],y=[h[1],-h[0]],b=function(C){const S=C[0];return C[1]>=0?Math.acos(S):-Math.acos(S)},x=b(v),w=b(y);this.lineTo(p+v[0]*r,m+v[1]*r),this.arc(p,m,r,x,w)}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,i,s){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+s),this.lineTo(t,e+s),this.lineTo(t,e),this.closePath()}fillRect(t,e,i,s){const r=this.__createElement("rect",{x:t,y:e,width:i,height:s},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,i,s){const r=this.__createElement("rect",{x:t,y:e,width:i,height:s},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),i=this.__rootSVG.childNodes[1],s=i.childNodes;for(let r=s.length-1;r>=0;r--)s[r]&&i.removeChild(s[r]);this.__currentElement=i,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,i,s){if(t===0&&e===0&&i===this.width&&s===this.height){this.__clearCanvas();return}const r=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:t,y:e,width:i,height:s,fill:"#FFFFFF"},!0);r.appendChild(o)}createLinearGradient(t,e,i,s){const r=this.__createElement("linearGradient",{id:Gs(this.__ids),x1:t+"px",x2:i+"px",y1:e+"px",y2:s+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(r),new Xs(r,this)}createRadialGradient(t,e,i,s,r,o){const a=this.__createElement("radialGradient",{id:Gs(this.__ids),cx:s+"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),i={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"&&(i.decoration="underline"),this.__fontHref&&(i.href=this.__fontHref),i}__wrapTextLink(t,e){if(t.href){const i=this.__createElement("a");return i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),i.appendChild(e),i}return e}__applyText(t,e,i,s){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:i,"text-anchor":cw(this.textAlign),"dominant-baseline":hw(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(t)),this.__currentElement=a,this.__applyStyleToCurrentElement(s),o.appendChild(this.__wrapTextLink(r,a))}fillText(t,e,i){this.__applyText(t,e,i,"fill")}strokeText(t,e,i){this.__applyText(t,e,i,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,i,s,r,o){if(s===r)return;s=s%(2*Math.PI),r=r%(2*Math.PI),s===r&&(r=(r+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));const a=t+i*Math.cos(r),c=e+i*Math.sin(r),h=t+i*Math.cos(s),l=e+i*Math.sin(s),u=o?0:1;let d=0,f=r-s;f<0&&(f+=2*Math.PI),o?d=f>Math.PI?0:1:d=f>Math.PI?1:0,this.lineTo(h,l),this.__addPathCommand(Bt("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:i,ry:i,xAxisRotation:0,largeArcFlag:d,sweepFlag:u,endX:a,endY:c})),this.__currentPosition={x:a,y:c}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),i=Gs(this.__ids),s=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",i),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",Bt("url(#{id})",{id:i})),t.appendChild(s),this.__currentElement=s}drawImage(...t){let e=t[0],i,s,r,o,a=0,c=0,h,l,u,d,f,p,m,v;if(t.length===3)i=t[1],s=t[2],h=e.width,l=e.height,r=h,o=l;else if(t.length===5)i=t[1],s=t[2],r=t[3],o=t[4],h=e.width,l=e.height;else if(t.length===9)a=t[1],c=t[2],h=t[3],l=t[4],i=t[5],s=t[6],r=t[7],o=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const y=this.__closestGroupOrSvg();this.__currentElement;const b="translate("+i+", "+s+")";if(e instanceof Ph){if(u=e.getSvg().cloneNode(!0),u.childNodes&&u.childNodes.length>1){for(d=u.childNodes[0];d.childNodes.length;)v=d.childNodes[0].getAttribute("id"),this.__ids[v]=v,this.__SVGdefs.appendChild(d.childNodes[0]);if(f=u.childNodes[1],f){const x=f.getAttribute("transform");let w;x?w=x+" "+b:w=b,f.setAttribute("transform",w),y.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||c||h!==e.width||l!==e.height)&&(m=this.__document.createElement("canvas"),m.width=r,m.height=o,m.getContext("2d")?.drawImage(e,a,c,h,l,0,0,r,o),e=m),p.setAttribute("transform",b),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),y.appendChild(p))}createPattern(t,e){const i=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),s=Gs(this.__ids);let r;return i.setAttribute("id",s),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")),i.appendChild(r),this.__SVGdefs.appendChild(i)):t instanceof Ph&&(i.setAttribute("width",""+t.width),i.setAttribute("height",""+t.height),i.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(i)),new wa(i,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}},va=class{canvas;context;customContext;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,i,s=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),s&&(this.customContext=new Hu({canvas:this.canvas,width:e||this.canvas.width,height:i||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,i,s){return this.context.fillRect(t,e,i,s),this.customContext&&this.customContext.fillRect(t,e,i,s),this}fillText(t,e,i,s){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,i,s),this.customContext&&this.customContext.fillText(t,e,i),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,i,s){return this.context.strokeText(t,e,i,s),this.customContext&&this.customContext.strokeText(t,e,i),this}strokeRect(t,e,i,s){return this.context.strokeRect(t,e,i,s),this.customContext&&this.customContext.strokeRect(t,e,i,s),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,i=this.canvas.width,s=this.canvas.height){return this.context.clearRect(t,e,i,s),this.customContext&&this.customContext.clearRect(t,e,i,s),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 i=new Path2D;i.addPath(t,e),this.currentPath2D=i}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,i=0){return this.translate(e,i),this.context.rotate(t),this.customContext&&this.customContext.rotate(t),this.currentMatrix.rotate(t),this.translate(-e,-i),this.changePath2D(),this}scale(t,e=t,i=0,s=0){return this.translate(i,s),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix.scale(t,e),this.translate(-i,-s),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,i,s,r,o){return this.context.arc(t,e,i,s,r,o),this.customContext&&this.customContext.arc(t,e,i,s,r,o?-1:1),this.currentPath2D.arc(t,e,i,s,r,o),this}arcTo(t,e,i,s,r){return this.context.arcTo(t,e,i,s,r),this.customContext&&this.customContext.arcTo(t,e,i,s,r),this.currentPath2D.arcTo(t,e,i,s,r),this}ellipse(t,e,i,s,r,o,a,c){return this.context.ellipse(t,e,i,s,r,o,a,c),this.currentPath2D.ellipse(t,e,i,s,r,o,a,c),this}quadraticCurveTo(t,e,i,s){return this.context.quadraticCurveTo(t,e,i,s),this.customContext&&this.customContext.quadraticCurveTo(t,e,i,s),this.currentPath2D.quadraticCurveTo(t,e,i,s),this}bezierCurveTo(t,e,i,s,r,o){return this.context.bezierCurveTo(t,e,i,s,r,o),this.customContext&&this.customContext.bezierCurveTo(t,e,i,s,r,o),this.currentPath2D.bezierCurveTo(t,e,i,s,r,o),this}rect(t,e,i,s){return this.context.rect(t,e,i,s),this.customContext&&this.customContext.rect(t,e,i,s),this.currentPath2D.rect(t,e,i,s),this}createLinearGradient(t,e,i,s,r){const o=this.context.createLinearGradient(t,e,i,s);return r&&Object.entries(r).forEach(([a,c])=>{o.addColorStop(parseFloat(a),c)}),o}createRadialGradient(t,e,i,s,r,o,a){const c=this.context.createRadialGradient(t,e,i,s,r,o);return a&&Object.entries(a).forEach(([h,l])=>{c.addColorStop(parseFloat(h),l)}),c}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const i=e[0],s=e[1];this.context.drawImage(t,i,s)}else if(e.length===4){const i=e[0],s=e[1],r=e[2],o=e[3];this.context.drawImage(t,i,s,r,o)}else if(e.length===8){const i=e[0],s=e[1],r=e[2],o=e[3],a=e[4],c=e[5],h=e[6],l=e[7];this.context.drawImage(t,i,s,r,o,a,c,h,l)}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,i=this.canvas.width,s=this.canvas.height,r){return this.context.getImageData(t,e,i,s,r)}putImageData(t,e=0,i=0){return this.context.putImageData(t,e,i)}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}}},xa=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=Qt(this.x,this.y,this.toX,this.toY);if(t===0){const e=Math.min(this.x,this.toX),i=Math.min(this.y,this.toY),s=Math.max(this.x,this.toX),r=Math.max(this.y,this.toY);return{x:e,y:i,width:s-e,height:r-i}}else{const e=Math.sin(t),i=Math.cos(t),s=i*this.x-e*this.y,r=i*this.toX-e*this.toY,o=i*this.y+e*this.x,a=i*this.toY+e*this.toX;return{x:Math.min(s,r),y:Math.min(o,a),width:Math.max(s,r)-Math.min(s,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,i=this.y,s=t.toX,r=t.toY,o=this.toX-e,a=t.x-s;if(!o&&!a)return null;const c=(this.toY-i)/o,h=(t.y-r)/a;if(o){if(!a)return{x:s,y:c*(s-e)+i}}else return{x:e,y:h*(e-s)+r};const l=(-h*s+r+c*e-i)/(c-h),u=c*(l-e)+i;return isNaN(l)||isNaN(u)?null:{x:l,y:u}}};const lw=class extends xa{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,i,s,r,o,a,c]=this.convert(this.x,this.y,this.toX,this.toY,this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag);t.ellipse(e,i,s,r,o,a,c,!this.sweepFlag)}convert(t,e,i,s,r,o,a,c,h){const l=a/180*Math.PI,u=(t-i)/2,d=(e-s)/2,f=Math.cos(l)*u+Math.sin(l)*d,p=-Math.sin(l)*u+Math.cos(l)*d,m=f*f/(r*r)+p*p/(o*o);if(m>1){const U=Math.sqrt(m);throw r=U*r,o=U*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)),y=c!=h?1:-1,b=y*v*r*p/o,x=y*v*-o*f/r,w=(t+i)/2,C=(e+s)/2,S=Math.cos(l)*b-Math.sin(l)*x+w,D=Math.sin(l)*b+Math.cos(l)*x+C,L=(U,X,Z,at)=>(U*at>=X*Z?1:-1)*Math.acos((U*Z+X*at)/(Math.sqrt(U*U+X*X)*Math.sqrt(Z*Z+at*at))),I=L(1,0,t-S,e-D)-l,F=L(t-S,e-D,i-S,s-D);return[S,D,r,o,l,I,I+F]}},uw=class extends xa{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,i=this.cy*2-(this.y+this.toY)/2;t.quadraticCurveTo(e,i,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 i,s,r,o;for(let h=0;h<2;++h)i=h==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,s=h==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,r=h==0?this.x:this.y,Math.abs(i)>1e-12&&(o=-s/(2*i),0<o&&o<1&&[t,e][h].push(i*o*o+s*o+r));const a={x:Math.min.apply(0,t),y:Math.min.apply(0,e)},c={x:Math.max.apply(0,t),y:Math.max.apply(0,e)};return{x:a.x,y:a.y,width:c.x-a.x,height:c.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}}},on=class os extends xa{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),i=this.x-this.c1x,s=(-e+Math.sqrt(e*e-4*t*i))/2/t,r=(-e-Math.sqrt(e*e-4*t*i))/2/t;const o=[this.y,this.toY],a=[this.x,this.toX];let c;const h=[];Math.abs(s)>1e12&&(s=.5),Math.abs(r)>1e12&&(r=.5),s>=0&&s<=1&&(c=this.interpolate(s),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),r>=0&&r<=1&&(c=this.interpolate(r),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.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),i=this.y-this.c1y,s=(-e+Math.sqrt(e*e-4*t*i))/2/t,r=(-e-Math.sqrt(e*e-4*t*i))/2/t,Math.abs(s)>1e12&&(s=.5),Math.abs(r)>1e12&&(r=.5),s>=0&&s<=1&&(c=this.interpolate(s),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),r>=0&&r<=1&&(c=this.interpolate(r),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y}));const l=[],u=h.length;for(let p=0;p<u;p++){for(let m=p+1;m<u;m++)h[p].X===h[m].X&&h[p].Y===h[m].Y&&(m=++p);l.push({X:h[p].X,Y:h[p].Y})}const d={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:d.x,y:d.y,width:f.x-d.x,height:f.y-d.y,dots:l}}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,i,s,r){const o=-3*e+9*i-9*s+3*r,a=t*o+6*e-12*i+6*s;return t*a-3*e+3*i}static bezlen(t,e,i,s,r,o,a,c,h=1){h=Math.max(0,Math.min(h,1));const l=h/2,u=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let f=0;for(let p=0;p<12;p++){const m=l*u[p]+l,v=this.base3(m,t,i,r,a),y=this.base3(m,e,s,o,c);f+=d[p]*Math.sqrt(v*v+y*y)}return l*f}length(t=1){return os.bezlen(this.x,this.y,this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY,t)}getTatLen(t){const e=this.x,i=this.y,s=this.c1x,r=this.c1y,o=this.c2x,a=this.c2y,c=this.toX,h=this.toY;if(t<0||os.bezlen(e,i,s,r,o,a,c,h)<t)return 0;const l=1;let u=l/2,d=l-u,f=os.bezlen(e,i,s,r,o,a,c,h,d);for(;Math.abs(f-t)>.01;)u/=2,d+=(f<t?1:-1)*u,f=os.bezlen(e,i,s,r,o,a,c,h,d);return d}getPointAtSegmentLength(t){const e=this.getTatLen(t),i=1-e,s=Math.pow(i,3),r=Math.pow(i,2),o=e*e,a=o*e,c=s*this.x+r*3*e*this.c1x+i*3*e*e*this.c2x+a*this.toX,h=s*this.y+r*3*e*this.c1y+i*3*e*e*this.c2y+a*this.toY,l=this.x+2*e*(this.c1x-this.x)+o*(this.c2x-2*this.c1x+this.x),u=this.y+2*e*(this.c1y-this.y)+o*(this.c2y-2*this.c1y+this.y),d=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=i*this.x+e*this.c1x,m=i*this.y+e*this.c1y,v=i*this.c2x+e*this.toX,y=i*this.c2y+e*this.toY,b=90-Math.atan2(l-d,u-f)*180/Math.PI;return{x:c,y:h,m:{x:l,y:u},n:{x:d,y:f},start:{x:p,y:m},end:{x:v,y},alpha:b}}},Ai=Math.PI*2;function qu(n,t,e,i){const s=n*i-t*e<0?-1:1;let r=n*e+t*i;return r>1&&(r=1),r<-1&&(r=-1),s*Math.acos(r)}function fw(n,t,e,i,s,r,o,a,c,h){const l=h*(n-e)/2+c*(t-i)/2,u=-c*(n-e)/2+h*(t-i)/2,d=o*o,f=a*a,p=l*l,m=u*u;let v=d*f-d*m-f*p;v<0&&(v=0),v/=d*m+f*p,v=Math.sqrt(v)*(s===r?-1:1);const y=v*o/a*u,b=v*-a/o*l,x=h*y-c*b+(n+e)/2,w=c*y+h*b+(t+i)/2,C=(l-y)/o,S=(u-b)/a,D=(-l-y)/o,L=(-u-b)/a,I=qu(1,0,C,S);let F=qu(C,S,D,L);return r===0&&F>0&&(F-=Ai),r===1&&F<0&&(F+=Ai),[x,w,I,F]}function dw(n,t){const e=1.3333333333333333*Math.tan(t/4),i=Math.cos(n),s=Math.sin(n),r=Math.cos(n+t),o=Math.sin(n+t);return[i,s,i-s*e,s+i*e,r+o*e,o-r*e,r,o]}function js(n,t,e,i,s,r,o,a,c){const h=Math.sin(c*Ai/360),l=Math.cos(c*Ai/360),u=l*(n-e)/2+h*(t-i)/2,d=-h*(n-e)/2+l*(t-i)/2;if(u===0&&d===0)return[];if(o===0||a===0)return[];o=Math.abs(o),a=Math.abs(a);const f=u*u/(o*o)+d*d/(a*a);f>1&&(o*=Math.sqrt(f),a*=Math.sqrt(f));const p=fw(n,t,e,i,s,r,o,a,h,l),m=[];let v=p[2],y=p[3];const b=Math.max(Math.ceil(Math.abs(y)/(Ai/4)),1);y/=b;for(let x=0;x<b;x++)m.push(dw(v,y)),v+=y;return m.map(x=>{for(let w=0;w<x.length;w+=2){let C=x[w+0],S=x[w+1];C*=o,S*=a;const D=l*C-h*S,L=h*C+l*S;x[w+0]=D+p[0],x[w+1]=L+p[1]}return x})}function Ju(n,t,e,i,s,r,o,a,c,h){const l=Math.PI*120/180,u=Math.PI/180*(+s||0);let d=[],f;const p=function(nt,rt,Q){const St=nt*Math.cos(Q)-rt*Math.sin(Q),z=nt*Math.sin(Q)+rt*Math.cos(Q);return{x:St,y:z}};let m,v,y,b;if(h)m=h[0],v=h[1],y=h[2],b=h[3];else{f=p(n,t,-u),n=f.x,t=f.y,f=p(a,c,-u),a=f.x,c=f.y;const nt=(n-a)/2,rt=(t-c)/2;let Q=nt*nt/(e*e)+rt*rt/(i*i);Q>1&&(Q=Math.sqrt(Q),e=Q*e,i=Q*i);const St=e*e,z=i*i,R=(r==o?-1:1)*Math.sqrt(Math.abs((St*z-St*rt*rt-z*nt*nt)/(St*rt*rt+z*nt*nt)));y=R*e*rt/i+(n+a)/2,b=R*-i*nt/e+(t+c)/2,m=Math.asin(Number(((t-b)/i).toFixed(9))),v=Math.asin(Number(((c-b)/i).toFixed(9))),m=n<y?Math.PI-m:m,v=a<y?Math.PI-v:v,m<0&&(m=Math.PI*2+m),v<0&&(v=Math.PI*2+v),o&&m>v&&(m=m-Math.PI*2),!o&&v>m&&(v=v-Math.PI*2)}let x=v-m;if(Math.abs(x)>l){const nt=v,rt=a,Q=c;v=m+l*(o&&v>m?1:-1),a=y+e*Math.cos(v),c=b+i*Math.sin(v),d=Ju(a,c,e,i,s,0,o,rt,Q,[v,nt,y,b])}x=v-m;const w=Math.cos(m),C=Math.sin(m),S=Math.cos(v),D=Math.sin(v),L=Math.tan(x/4),I=4/3*e*L,F=4/3*i*L,U=[n,t],X=[n+I*C,t-F*w],Z=[a+I*D,c-F*S],at=[a,c];return X[0]=2*U[0]-X[0],X[1]=2*U[1]-X[1],h?[[...X,...Z,...at]].concat(d):[[...X,...Z,...at]].concat(d).map(nt=>{const rt=[];for(let Q=0,St=nt.length;Q<St;Q++)rt[Q]=Q%2?p(nt[Q-1],nt[Q],u).y:p(nt[Q],nt[Q+1],u).x;return rt})}function Mi(n,t,e,i,s,r){return[n/3+2/3*e,t/3+2/3*i,s/3+2/3*e,r/3+2/3*i,s,r]}function An(n,t,e,i){return[n,t,e,i,e,i]}const Di={a:7,c:6,s:4,q:4,t:2,m:2,l:2,h:1,v:1,z:0};function an(n="path"){return document.createElementNS.call(document,"http://www.w3.org/2000/svg",n)}function _a(){return an("path")}const Ku=n=>n instanceof SVGElement&&n.tagName==="path";function Zu(n,t="shape"){return Kc(Kl(n),`${t}.svg`)}function mw(n,t="shape"){return Kc(io(n),`${t}.svg`)}function pw(n){return Xo(n)}function Sa(n){return typeof n!="string"?!1:(n=n.trim(),/^[mlhvzaqtcs]\s*[-+.0-9][^mlhvzaqtcs]+/i.test(n)&&/[\dz]$/i.test(n))}function Ca(n){return n.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 Ws(n){const t=[];return Sa(n)&&n.replace(/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi,(e,i,s)=>{let r=i.toLowerCase();const o=Yh(s);for(r=="m"&&o.length>Di[r]&&(t.push([i,...o.splice(0,Di[r])]),r="l",i=i=="m"?"l":"L");o.length;){if(o.length<Di[r])throw new Error(`parseSVGPath substring:{ ${e} } command:{ ${i} } args:{ ${o} }`);t.push([i,...o.splice(0,Di[r])])}return r=="z"&&t.push([i]),""}),t}function Hs(n){let t=0,e=0,i=0,s=0;return n.map(function(r){const o=r[0],a=o.toUpperCase();if(o!=a)switch(r[0]=a,o){case"a":r[6]+=i,r[7]+=s;break;case"v":r[1]+=s;break;case"h":r[1]+=i;break;default:for(let c=1;c<r.length;)r[c++]+=i,r[c++]+=s}switch(a){case"Z":i=t,s=e;break;case"H":i=r[1];break;case"V":s=r[1];break;case"M":i=t=r[1],s=e=r[2];break;default:i=r[r.length-2],s=r[r.length-1]}return r})}function gw(n){let t=0,e=0,i=0,s=0;return n.map(function(r){const o=r[0],a=o.toLowerCase();if(o!=a)switch(r[0]=a,o){case"A":r[6]-=i,r[7]-=s;break;case"V":r[1]-=s;break;case"H":r[1]-=i;break;default:for(let c=1;c<r.length;)r[c++]-=i,r[c++]-=s}switch(a){case"z":i=t,s=e;break;case"h":i+=r[1];break;case"v":s+=r[1];break;case"m":i+=r[1],s+=r[2],t+=r[1],e+=r[2];break;default:i+=r[r.length-2],s+=r[r.length-1]}return r})}function Ea(n){const t=[];let e=0,i=0,s=0,r=0,o=0,a=0,c=0,h=0,l;for(let u=0,d=n.length;u<d;u++){let f=n[u];const p=f[0];switch(p){case"M":e=f[1],i=f[2];break;case"A":const m=js(s,r,f[6],f[7],f[4],f[5],f[1],f[2],f[3]);if(!m.length)continue;m.forEach((b,x)=>{const[w,C,S,D,L,I,F,U]=b;f=["C",S,D,L,I,F,U],x<m.length-1&&t.push(f)});break;case"S":let v=s,y=r;(l=="C"||l=="S")&&(v+=v-c,y+=y-h),f=["C",v,y,f[1],f[2],f[3],f[4]];break;case"T":l=="Q"||l=="T"?(o=s*2-o,a=r*2-a):(o=s,a=r),f=["C",...Mi(s,r,o,a,f[1],f[2])];break;case"Q":o=f[1],a=f[2],f=["C",...Mi(s,r,f[1],f[2],f[3],f[4])];break;case"L":f=["C",...An(s,r,f[1],f[2])];break;case"H":f=["C",...An(s,r,f[1],r)];break;case"V":f=["C",...An(s,r,s,f[1])];break;case"Z":f=["C",...An(s,r,e,i)];break}l=p,s=f[f.length-2],r=f[f.length-1],f.length>4?(c=f[f.length-4],h=f[f.length-3]):(c=s,h=r),t.push(f)}return t}function yw(n){const t=[];for(let e=0,i=n.length;i-2>e;e+=2){let s;e==0?s=[{x:n[e],y:n[e+1]},{x:n[e],y:n[e+1]},{x:n[e+2],y:n[e+3]},{x:n[e+4],y:n[e+5]}]:i-4==e?s=[{x:n[e-2],y:n[e-1]},{x:n[e],y:n[e+1]},{x:n[e+2],y:n[e+3]},{x:n[e+2],y:n[e+3]}]:s=[{x:n[e-2],y:n[e-1]},{x:n[e],y:n[e+1]},{x:n[e+2],y:n[e+3]},{x:n[e+4],y:n[e+5]}];const r=[{x:s[1].x,y:s[1].y},{x:(-s[0].x+6*s[1].x+s[2].x)/6,y:(-s[0].y+6*s[1].y+s[2].y)/6},{x:(s[1].x+6*s[2].x-s[3].x)/6,y:(s[1].y+6*s[2].y-s[3].y)/6},{x:s[2].x,y:s[2].y}];t.push(["C",r[1].x,r[1].y,r[2].x,r[2].y,r[3].x,r[3].y])}return t}function bw(n){const t=[];let e=["L",0,0],i;for(let s=0,r=n.length;s<r;s++){const o=n[s];switch(o[0]){case"M":e=["L",o[1],o[2]],t.push(o);break;case"Z":t.push(e);break;case"H":i=t[t.length-1]||["L",0,0],t.push(["L",o[1],i[i.length-1]]);break;case"V":i=t[t.length-1]||["L",0,0],t.push(["L",i[i.length-2],o[1]]);break;default:t.push(o)}}return t}function ww(n){const t={S:{to:"C",x:3},T:{to:"Q",x:1}};let e,i=0,s=0;for(let r=0,o=n.length;r<o;r++){const a=n[r],c=t[a[0]];c&&(a[0]=c.to,e&&(e[0]===c.to?(i=2*Number(e[c.x+2])-Number(e[c.x]),s=2*Number(e[c.x+3])-Number(e[c.x+1])):(i=Number(e[e.length-2]),s=Number(e[e.length-1]))),a.splice(1,0,i,s)),e=a}return n}let vw=class qe{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(Ws(t),e):t instanceof qe?this.resetFromSVGPathData(t.toSVGPathData(),e):this.resetFromSVGPathData(t||[],e)}resetFromSVGPathData(t,e){this.normalizedLines=[];const i=Ea(Hs(t));this.prevPathX=this.startPathX=0,this.prevPathY=this.startPathY=0;let s=!1;for(let r=0,o=i.length;r<o;r++){const a=i[r];if(a[0]=="M"){s||(s=!0,this.startPathX=a[1],this.startPathY=a[2]),this.prevPathX=a[1],this.prevPathY=a[2];continue}this.appendLine(new on({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 qe;e.prevPathX=e.startPathX=t[0]||0,e.prevPathY=e.startPathY=t[1]||0;for(let i=2,s=t.length;i+5<s;i+=6)e.appendLine(new on({c1x:t[i],c1y:t[i+1],c2x:t[i+2],c2y:t[i+3],toX:t[i+4],toY:t[i+5]}));return e}static fromLines(t){const e=new qe;e.prevPathX=e.startPathX=t[0].x||0,e.prevPathY=e.startPathY=t[0].y||0;for(let i=0,s=t.length;i<s;i++)e.appendLine(t[i]);return e}appendLine(t){if(t instanceof lw){js(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(h=>{const[l,u,d,f,p,m,v,y]=h;this.normalizedLines.push(new on({x:this.prevPathX,y:this.prevPathY,c1x:d,c1y:f,c2x:p,c2y:m,toX:v,toY:y})),this.prevPathX=v,this.prevPathY=y});return}let e,i,s,r,o,a;t instanceof on?(e=t.c1x,i=t.c1y,s=t.c2x,r=t.c2y,o=t.toX,a=t.toY):t instanceof uw?[e,i,s,r,o,a]=Mi(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,i,s,r,o,a]=An(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new on({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:i,c2x:s,c2y:r,toX:o,toY:a})),this.prevPathX=o,this.prevPathY=a}toSVGPathData(){const{startPathX:t,startPathY:e,normalizedLines:i}=this.updateTransform(),s=[];s.push(["M",t,e]);for(let r=0,o=i.length;r<o;r++)s.push(...i[r].toSVGPathData());return s}toSVGPathD(){return Ca(this.toSVGPathData())}toCanvasContext(t){const{startPathX:e,startPathY:i,normalizedLines:s}=this.updateTransform();t.beginPath(),t.moveTo(e,i),s.forEach(r=>{r.toCanvasContext(t)})}getBoundingClientRect(){const{normalizedLines:t}=this.updateTransform(),e=[],i=[];if(t.forEach(c=>{const h=c.getBoundingClientRect();e.push(h.x,h.x+h.width),i.push(h.y,h.y+h.height)}),e.length==0||i.length==0)return{x:0,y:0,width:0,height:0};const s=Math.min.apply(0,e),r=Math.min.apply(0,i),o=Math.max.apply(0,e),a=Math.max.apply(0,i);return{x:s,y:r,width:o-s,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 It;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,i=this.startPathY;({x:e,y:i}=t.transformPoint({x:e,y:i}));const s=[];return this.normalizedLines.forEach(r=>{let o=r.x,a=r.y,c=r.c1x,h=r.c1y,l=r.c2x,u=r.c2y,d=r.toX,f=r.toY;({x:o,y:a}=t.transformPoint({x:o,y:a})),{x:c,y:h}=t.transformPoint({x:c,y:h}),{x:l,y:u}=t.transformPoint({x:l,y:u}),{x:d,y:f}=t.transformPoint({x:d,y:f}),s.push(new on({x:o,y:a,c1x:c,c1y:h,c2x:l,c2y:u,toX:d,toY:f}))}),{startPathX:e,startPathY:i,normalizedLines:s}}}getTotalLength(){const{normalizedLines:t}=this.updateTransform();return t.reduce((e,i)=>e+=i.length(),0)}getPointAtLength(t){const{normalizedLines:e}=this.updateTransform();let i=0;const s=e.length;for(let r=0;r<s;r++){const o=e[r],a=o.length();if(i+a>=t)return o.getPointAtSegmentLength(t-i);i+=a}return e[s-1].getPointAtSegmentLength(1)}interpolate(t){const{startPathX:e,startPathY:i,normalizedLines:s}=this.updateTransform(),r=s.length;if(r===0)return{x:e,y:i};if(r===1)return s[0].interpolate(t);{let o=t*r,a=s[0];if(o--,o>1)for(let c=1;c<r&&(a=s[c],o>1);c++)o-=1;return a.interpolate(o)}}getSubpath(t,e){if(this.getTotalLength()-e<1e-6)return this.getSubpathsAtLength(this,t);{const i=this.getSubpathsAtLength(this,e,1);return t?this.getSubpathsAtLength(i,t):i}}getSubpathsAtLength(t,e,i){const{startPathX:s,startPathY:r,normalizedLines:o}=t.updateTransform();let a=null,c=0;const h=new qe;h.prevPathX=h.startPathX=s,h.prevPathY=h.startPathY=r;for(let l=0,u=o.length;l<u;l++){const d=o[l],f=d.length();if(c+f>e&&!a){const p=d.getPointAtSegmentLength(e-c);if(h.appendLine(new on({c1x:p.start.x,c1y:p.start.y,c2x:p.m.x,c2y:p.m.y,toX:p.x,toY:p.y})),i)return h;a=h,h.appendLine(new on({c1x:p.n.x,c1y:p.n.y,c2x:p.end.x,c2y:p.end.y,toX:d.x,toY:d.y})),c+=f;continue}c+=f,h.appendLine(d)}return h}closestPoint(t,e){const i=this.getTotalLength();let s={x:t,y:e},r=0,o=1/0,a=8;for(let h=0;h<=i;h+=a){const l=this.getPointAtLength(h),u=Math.pow(sn(l.x,l.y,t,e),2);u<o&&(s=l,r=h,o=u)}for(a/=2;a>.5;){const h=r-a,l=this.getPointAtLength(h),u=Math.pow(sn(l.x,l.y,t,e),2),d=r+a,f=this.getPointAtLength(d),p=Math.pow(sn(f.x,f.y,t,e),2);h>=0&&u<o?(s=l,r=h,o=u):d<=i&&p<o?(s=f,r=d,o=p):a/=2}const c=this.getPointAtLength(r+(r===i?-.1:.1));return{point:s,rotation:r>=i?Qt(c.x,c.y,s.x,s.y):Qt(s.x,s.y,c.x,c.y),distance:Math.sqrt(o)}}get polymorphPoints(){const{startPathX:t,startPathY:e,normalizedLines:i}=this.updateTransform();return[t,e].concat(i.reduce((s,r)=>s.concat([r.c1x,r.c1y,r.c2x,r.c2y,r.toX,r.toY]),[]))}perimeterPoints(){const t=this.polymorphPoints,e=t.length;let i=t[e-2],s=t[e-1],r=0;for(let o=0;o<e;o+=6)r+=sn(t[o],t[o+1],i,s),i=t[o],s=t[o+1];return Math.floor(r)}expendFill(t){const e=this.polymorphPoints,i=e.length;let s=t-i;const r=Math.ceil(t/i),o=[];o.push(["M",e[0],e[1]]);let a=2;for(;a+5<=i-1;){const c=e[a++],h=e[a++],l=e[a++],u=e[a++],d=e[a++],f=e[a++];o.push(["C",c,h,l,u,d,f]);let p=0;for(;p<r&&s>0;)o.push(["C",d,f,d,f,d,f]),s-=6,p++}return o}static mixPoints(t,e,i){const s=t.length,r=new Array(s);for(let o=0;o<s;o++)r[o]=G(t[o]+(e[o]-t[o])*i,6);return r}static getPathInterpolator(t,e){return i=>Math.abs(i-0)<Number.EPSILON?t:Math.abs(i-1)<Number.EPSILON?e:qe.fromPolymorphPoints(qe.mixPoints(new qe({d:t}).polymorphPoints,new qe({d:e}).polymorphPoints,i)).toSVGPathData()}};class Ii{static _nextId=0;static nextId(){return Ii._nextId++}}const N={Linear:{None:function(n){return n}},Ease:{In:function(n){return Math.pow(n,1.7)}},Quadratic:{In:function(n){return n*n},Out:function(n){return n*(2-n)},InOut:function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)},style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)"},Cubic:{In:function(n){return n*n*n},Out:function(n){return--n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)}},Quartic:{In:function(n){return n*n*n*n},Out:function(n){return 1- --n*n*n*n},InOut:function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)}},Quintic:{In:function(n){return n*n*n*n*n},Out:function(n){return--n*n*n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)}},Sinusoidal:{In:function(n){return 1-Math.sin((1-n)*Math.PI/2)},Out:function(n){return Math.sin(n*Math.PI/2)},InOut:function(n){return .5*(1-Math.sin(Math.PI*(.5-n)))}},Exponential:{In:function(n){return n===0?0:Math.pow(1024,n-1)},Out:function(n){return n===1?1:1-Math.pow(2,-10*n)},InOut:function(n){return n===0?0:n===1?1:(n*=2)<1?.5*Math.pow(1024,n-1):.5*(-Math.pow(2,-10*(n-1))+2)}},Circular:{In:function(n){return 1-Math.sqrt(1-n*n)},Out:function(n){return Math.sqrt(1- --n*n)},InOut:function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)},style:"cubic-bezier(0.1, 0.57, 0.1, 1)"},Elastic:{In:function(n){return n===0?0:n===1?1:-Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI)},Out:function(n){return n===0?0:n===1?1:Math.pow(2,-10*n)*Math.sin((n-.1)*5*Math.PI)+1},InOut:function(n){return n===0?0:n===1?1:(n*=2,n<1?-.5*Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI):.5*Math.pow(2,-10*(n-1))*Math.sin((n-1.1)*5*Math.PI)+1)}},Back:{In:function(n){return n===1?1:n*n*((1.70158+1)*n-1.70158)},Out:function(n){return n===0?0:--n*n*((1.70158+1)*n+1.70158)+1},InOut:function(n){const t=2.5949095;return(n*=2)<1?.5*(n*n*((t+1)*n-t)):.5*((n-=2)*n*((t+1)*n+t)+2)},style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)"},Bounce:{In:function(n){return 1-N.Bounce.Out(1-n)},Out:function(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},InOut:function(n){return n<.5?N.Bounce.In(n*2)*.5:N.Bounce.Out(n*2-1)*.5+.5}},generatePow:function(n=4){return n=n<Number.EPSILON?Number.EPSILON:n,n=n>1e4?1e4:n,{In:function(t){return t**n},Out:function(t){return 1-(1-t)**n},InOut:function(t){return t<.5?(t*2)**n/2:(1-(2-t*2)**n)/2+.5}}},random:function(n){return Math.random()},createStep:function(n){return function(t){return Math.floor(t*n)/n}},createNoisyEasing:function(n,t=.1){const e=1-t;return function(i){return t*Math.random()+e*n(i)}},swing:function(n){return n+Math.sin(n*Math.PI*2)/2},causeSeizures:function(n){return n+.2*Math.random()-.1}};function Qu(n){switch(n){case N.Quadratic.In:return N.Quadratic.Out;case N.Quadratic.Out:return N.Quadratic.In;case N.Quadratic.InOut:return N.Quadratic.InOut;case N.Cubic.In:return N.Cubic.Out;case N.Cubic.Out:return N.Cubic.In;case N.Cubic.InOut:return N.Cubic.InOut;case N.Quartic.In:return N.Quartic.Out;case N.Quartic.Out:return N.Quartic.In;case N.Quartic.InOut:return N.Quartic.InOut;case N.Quintic.In:return N.Quintic.Out;case N.Quintic.Out:return N.Quintic.In;case N.Quintic.InOut:return N.Quintic.InOut;case N.Sinusoidal.In:return N.Sinusoidal.Out;case N.Sinusoidal.Out:return N.Sinusoidal.In;case N.Sinusoidal.InOut:return N.Sinusoidal.InOut;case N.Exponential.In:return N.Exponential.Out;case N.Exponential.Out:return N.Exponential.In;case N.Exponential.InOut:return N.Exponential.InOut;case N.Circular.In:return N.Circular.Out;case N.Circular.Out:return N.Circular.In;case N.Circular.InOut:return N.Circular.InOut;case N.Elastic.In:return N.Elastic.Out;case N.Elastic.Out:return N.Elastic.In;case N.Elastic.InOut:return N.Elastic.InOut;case N.Back.In:return N.Back.Out;case N.Back.Out:return N.Back.In;case N.Back.InOut:return N.Back.InOut;case N.Bounce.In:return N.Bounce.Out;case N.Bounce.Out:return N.Bounce.In;case N.Bounce.InOut:return N.Bounce.InOut;default:return n}}const xw=4,_w=.001,Sw=1e-7,Cw=10,Oi=11,qs=1/(Oi-1),Ew=typeof Float32Array=="function";function tf(n,t){return 1-3*t+3*n}function ef(n,t){return 3*t-6*n}function nf(n){return 3*n}function Js(n,t,e){return((tf(t,e)*n+ef(t,e))*n+nf(t))*n}function sf(n,t,e){return 3*tf(t,e)*n*n+2*ef(t,e)*n+nf(t)}function Tw(n,t,e,i,s){let r,o,a=0;do o=t+(e-t)/2,r=Js(o,i,s)-n,r>0?e=o:t=o;while(Math.abs(r)>Sw&&++a<Cw);return o}function Pw(n,t,e,i){for(let s=0;s<xw;++s){const r=sf(t,e,i);if(r===0)return t;const o=Js(t,e,i)-n;t-=o/r}return t}function Aw(n){return n}function Ta(n,t,e,i){if(!(0<=n&&n<=1&&0<=e&&e<=1))throw new Error("bezier x values must be in [0, 1] range");if(n===t&&e===i)return Aw;const s=Ew?new Float32Array(Oi):new Array(Oi);for(let o=0;o<Oi;++o)s[o]=Js(o*qs,n,e);function r(o){let a=0,c=1;const h=Oi-1;for(;c!==h&&s[c]<=o;++c)a+=qs;--c;const l=(o-s[c])/(s[c+1]-s[c]),u=a+l*qs,d=sf(u,n,e);return d>=_w?Pw(o,u,n,e):d===0?u:Tw(o,a,a+qs,n,e)}return o=>o===0||o===1?o:Js(r(o),t,i)}function Pa(n){switch(n){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 rf(n){const[t,e,i,s]=Pa(n);return[1-i,1-s,1-t,1-e]}function Mw(n){return Ta(...Pa(n))}function Dw(n){return Ta(...rf(n))}const Ne={Utils:{Linear:function(n,t,e){return(t-n)*e+n},Factorial:function(){const n=[1];return function(t){let e=1;if(n[t])return n[t];for(let i=t;i>1;i--)e*=i;return n[t]=e,e}}(),Bernstein:function(n,t){const e=Ne.Utils.Factorial;return e(n)/e(t)/e(n-t)},CatmullRom:function(n,t,e,i,s){const r=(e-n)*.5,o=(i-t)*.5,a=s*s,c=s*a;return(2*t-2*e+r+o)*c+(-3*t+3*e-2*r-o)*a+r*s+t},QuadraticBezier:(n,t,e,i)=>{const s=1-i;return s*s*n+2*s*i*t+i*i*e},CubicBezier:(n,t,e,i,s)=>{const r=1-s;return r*r*r*n+3*r*r*s*t+3*r*s*s*e+s*s*s*i}},Linear:function(n,t){const e=n.length-1,i=e*t,s=Math.floor(i),r=Ne.Utils.Linear;return t<0?r(n[0],n[1],i):t>1?r(n[e],n[e-1],e-i):r(n[s],n[s+1>e?e:s+1],i-s)},Bezier:function(n,t){let e=0;const i=n.length-1,s=Math.pow,r=Ne.Utils.Bernstein;for(let o=0;o<=i;o++)e+=s(1-t,i-o)*s(t,o)*n[o]*r(i,o);return e},CatmullRom:function(n,t){const e=n.length-1;let i=e*t,s=Math.floor(i);const r=Ne.Utils.CatmullRom;return n[0]===n[e]?(t<0&&(s=Math.floor(i=e*(1+t))),r(n[(s-1+e)%e],n[s],n[(s+1)%e],n[(s+2)%e],i-s)):t<0?n[0]-(r(n[0],n[0],n[1],n[1],-i)-n[0]):t>1?n[e]-(r(n[e],n[e],n[e-1],n[e-1],i-e)-n[e]):r(n[s?s-1:0],n[s],n[e<s+1?e:s+1],n[e<s+2?e:s+2],i-s)}};class of{_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=lt(),e=!1){const i=Object.keys(this._tweens);for(let s=0;s<i.length;s++){const r=this._tweens[i[s]],o=!e;r&&r.update(t,o)===!1&&!e&&delete this._tweens[i[s]]}return!!Object.keys(this._tweens).length}}const oe=new of;class Aa{constructor(t,e=oe){this._object=t,this._group=e}_id=Ii.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=N.Linear.None;_interpolationFunction=Ne.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=lt()){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,i,s){for(const r in i){const o=t[r],a=Array.isArray(o),c=a?"array":typeof o,h=!a&&Array.isArray(i[r]);if(!(c==="undefined"||c==="function")){if(h){let l=i[r];if(l.length===0)continue;l=l.map(this._handleRelativeValue.bind(this,o)),i[r]=[o].concat(l)}if((c==="object"||a)&&o&&!h){e[r]=a?[]:{};for(const l in o)e[r][l]=o[l];s[r]=a?[]:{},this._setupProperties(o,e[r],i[r],s[r])}else typeof e[r]>"u"&&(e[r]=o),a||(e[r]*=1),h?s[r]=i[r].slice().reverse():s[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=lt()){return this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStartTime=t,this._group&&this._group.remove(this),this)}resume(t=lt()){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=oe){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=N.Linear.None){return this._easingFunction=t,this}interpolation(t=Ne.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=lt(),e=!0){if(this._isPaused)return!0;let i,s;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),s=(t-this._startTime)/this._durationTime,s=this._durationTime===0||s>1?1:s;const o=this._easingFunction(s);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,o),this._onUpdateCallback&&this._onUpdateCallback(this._object,s),s===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(i in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[i]=="string"&&(this._valuesStartRepeat[i]=this._valuesStartRepeat[i]+parseFloat(this._valuesEnd[i])),this._yoyo&&this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i];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,c=this._chainedTweens.length;a<c;a++)this._chainedTweens[a].start(this._startTime+this._durationTime);return this._isPlaying=!1,!1}return!0}_updateProperties(t,e,i,s){for(const r in i){if(e[r]===void 0)continue;const o=e[r]||0;let a=i[r];const c=Array.isArray(t[r]),h=Array.isArray(a);!c&&h?t[r]=this._interpolationFunction(a,s):typeof a=="object"&&a?this._updateProperties(t[r],o,a,s):(a=this._handleRelativeValue(o,a),typeof a=="number"&&(t[r]=o+(a-o)*s))}}_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],i=this._valuesEnd[t];typeof i=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(i):this._valuesStartRepeat[t]=i,this._valuesEnd[t]=e}}const Iw=Ii.nextId,Ow=oe.getAll.bind(oe),kw=oe.removeAll.bind(oe),Rw=oe.add.bind(oe),Lw=oe.remove.bind(oe),zw=oe.update.bind(oe),Nw={now:lt,Sequence:Ii,Easing:N,Interpolation:Ne,Group:of,Tween:Aa,nextId:Iw,getAll:Ow,removeAll:kw,add:Rw,remove:Lw,update:zw};class Ma{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=lt(),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=lt();t=e-this.oldTime,this.oldTime=e,this.elapsedTime+=t}return t}}class ki{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){zy(this.tweens,(e,i)=>t?e.delay>i.delay:e.delay<=i.delay)}cloneTweens(t=this.tweens){const e=[];return t.forEach(i=>{const s={...i};delete s.tween,s.fromValues={...s.fromValues},s.toValues={...s.toValues},e.push(s)}),e}addTween(t,e,i){const s={fromValues:t,toValues:e,frames:typeof i?.frames=="number"?i.frames:1,delay:typeof i?.delay=="number"?i.delay:this.tweens.length,easeFunction:i?.easeFunction||N.Linear.None,interpolationFunction:i?.interpolationFunction||Ne.Linear,repeat:typeof i?.repeat=="number"?i.repeat:0,yoyo:i?.yoyo||!1,onStart:i?.onStart||(()=>{}),onUpdate:i?.onUpdate||(()=>{}),onComplete:i?.onComplete||(()=>{})};return this.tweens.push(s),this}cancelRequestAnimationCycle=()=>{};runTweens(t){this.cancelRequestAnimationCycle();const e=new Ma,i=this.frameDuration;return new Promise(s=>{this.onGroupStart?.(),this.cancelRequestAnimationCycle=xg(r=>{if(!this.isPaused){const a=Math.max(0,r-this.pausedDuration),c=Math.max(0,e.getElapsedTime()-this.pausedDuration);t.filter(h=>h.delay*i<=c).forEach(h=>{h.tween||(h.tween=new Aa({...h.fromValues}).to({...h.toValues},h.frames*i).easing(h.easeFunction).interpolation(h.interpolationFunction).repeat(h.repeat).yoyo(h.yoyo).onStart(h.onStart).onUpdate(h.onUpdate).onComplete(h.onComplete),h.tween.start(a)),(h.delay+h.frames*(h.repeat+1))*i>c?h.tween.update(a):(h.tween.isPlaying()&&h.tween.end(),Gh(t,h))})}const o=!!t.length;return o||(this.onGroupComplete?.(),s()),o})})}isPaused=!1;pausedClock=new Ma;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(i=>{e=Math.max(e,i.delay+i.frames),i.easeFunction=Qu(i.easeFunction);const s={...i.toValues};i.toValues={...i.fromValues},i.fromValues={...s}}),t.forEach(i=>{i.delay=e-i.frames}),this.play(t)}pause(){this.pausedClock.start(),this.isPaused=!0}resume(){this.pausedDuration+=this.pausedClock.getElapsedTime(),this.pausedClock.stop(),this.isPaused=!1}}/**
|
|
31
|
+
`):"",this.name="UnsubscriptionError",this.errors=e}});function xi(n,t){if(n){var e=n.indexOf(t);0<=e&&n.splice(e,1)}}var Hn=function(){function n(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var t,e,i,s,r;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=Cn(o),c=a.next();!c.done;c=a.next()){var h=c.value;h.remove(this)}}catch(m){t={error:m}}finally{try{c&&!c.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var l=this.initialTeardown;if(it(l))try{l()}catch(m){r=m instanceof Qo?m.errors:[m]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var d=Cn(u),f=d.next();!f.done;f=d.next()){var p=f.value;try{fu(p)}catch(m){r=r??[],m instanceof Qo?r=Ze(Ze([],ke(r)),ke(m.errors)):r.push(m)}}}catch(m){i={error:m}}finally{try{f&&!f.done&&(s=d.return)&&s.call(d)}finally{if(i)throw i.error}}}if(r)throw new Qo(r)}},n.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)fu(t);else{if(t instanceof n){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},n.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},n.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},n.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&xi(e,t)},n.prototype.remove=function(t){var e=this._finalizers;e&&xi(e,t),t instanceof n&&t._removeParent(this)},n.EMPTY=function(){var t=new n;return t.closed=!0,t}(),n}(),lu=Hn.EMPTY;function uu(n){return n instanceof Hn||n&&"closed"in n&&it(n.remove)&&it(n.add)&&it(n.unsubscribe)}function fu(n){it(n)?n():n.unsubscribe()}var du={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ta={setTimeout:function(n,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];var s=ta.delegate;return s?.setTimeout?s.setTimeout.apply(s,Ze([n,t],ke(e))):setTimeout.apply(void 0,Ze([n,t],ke(e)))},clearTimeout:function(n){var t=ta.delegate;return(t?.clearTimeout||clearTimeout)(n)},delegate:void 0};function mu(n){ta.setTimeout(function(){throw n})}function _i(){}function Ls(n){n()}var ea=function(n){xe(t,n);function t(e){var i=n.call(this)||this;return i.isStopped=!1,e?(i.destination=e,uu(e)&&e.add(i)):i.destination=o1,i}return t.create=function(e,i,s){return new qn(e,i,s)},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,n.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}(Hn),i1=Function.prototype.bind;function na(n,t){return i1.call(n,t)}var s1=function(){function n(t){this.partialObserver=t}return n.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(i){zs(i)}},n.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(i){zs(i)}else zs(t)},n.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){zs(e)}},n}(),qn=function(n){xe(t,n);function t(e,i,s){var r=n.call(this)||this,o;if(it(e)||!e)o={next:e??void 0,error:i??void 0,complete:s??void 0};else{var a;r&&du.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return r.unsubscribe()},o={next:e.next&&na(e.next,a),error:e.error&&na(e.error,a),complete:e.complete&&na(e.complete,a)}):o=e}return r.destination=new s1(o),r}return t}(ea);function zs(n){mu(n)}function r1(n){throw n}var o1={closed:!0,next:_i,error:r1,complete:_i},ia=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function En(n){return n}function a1(n){return n.length===0?En:n.length===1?n[0]:function(e){return n.reduce(function(i,s){return s(i)},e)}}var ft=function(){function n(t){t&&(this._subscribe=t)}return n.prototype.lift=function(t){var e=new n;return e.source=this,e.operator=t,e},n.prototype.subscribe=function(t,e,i){var s=this,r=h1(t)?t:new qn(t,e,i);return Ls(function(){var o=s,a=o.operator,c=o.source;r.add(a?a.call(r,c):c?s._subscribe(r):s._trySubscribe(r))}),r},n.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},n.prototype.forEach=function(t,e){var i=this;return e=pu(e),new e(function(s,r){var o=new qn({next:function(a){try{t(a)}catch(c){r(c),o.unsubscribe()}},error:r,complete:s});i.subscribe(o)})},n.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},n.prototype[ia]=function(){return this},n.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return a1(t)(this)},n.prototype.toPromise=function(t){var e=this;return t=pu(t),new t(function(i,s){var r;e.subscribe(function(o){return r=o},function(o){return s(o)},function(){return i(r)})})},n.create=function(t){return new n(t)},n}();function pu(n){var t;return(t=n??du.Promise)!==null&&t!==void 0?t:Promise}function c1(n){return n&&it(n.next)&&it(n.error)&&it(n.complete)}function h1(n){return n&&n instanceof ea||c1(n)&&uu(n)}function l1(n){return it(n?.lift)}function Ft(n){return function(t){if(l1(t))return t.lift(function(e){try{return n(e,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function wt(n,t,e,i,s){return new u1(n,t,e,i,s)}var u1=function(n){xe(t,n);function t(e,i,s,r,o,a){var c=n.call(this,e)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=i?function(h){try{i(h)}catch(l){e.error(l)}}:n.prototype._next,c._error=r?function(h){try{r(h)}catch(l){e.error(l)}finally{this.unsubscribe()}}:n.prototype._error,c._complete=s?function(){try{s()}catch(h){e.error(h)}finally{this.unsubscribe()}}:n.prototype._complete,c}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var i=this.closed;n.prototype.unsubscribe.call(this),!i&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t}(ea),f1=Zo(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Re=function(n){xe(t,n);function t(){var e=n.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 i=new gu(this,this);return i.operator=e,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new f1},t.prototype.next=function(e){var i=this;Ls(function(){var s,r;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var o=Cn(i.currentObservers),a=o.next();!a.done;a=o.next()){var c=a.value;c.next(e)}}catch(h){s={error:h}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(s)throw s.error}}}})},t.prototype.error=function(e){var i=this;Ls(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=e;for(var s=i.observers;s.length;)s.shift().error(e)}})},t.prototype.complete=function(){var e=this;Ls(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var i=e.observers;i.length;)i.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(),n.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 i=this,s=this,r=s.hasError,o=s.isStopped,a=s.observers;return r||o?lu:(this.currentObservers=null,a.push(e),new Hn(function(){i.currentObservers=null,xi(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var i=this,s=i.hasError,r=i.thrownError,o=i.isStopped;s?e.error(r):o&&e.complete()},t.prototype.asObservable=function(){var e=new ft;return e.source=this,e},t.create=function(e,i){return new gu(e,i)},t}(ft),gu=function(n){xe(t,n);function t(e,i){var s=n.call(this)||this;return s.destination=e,s.source=i,s}return t.prototype.next=function(e){var i,s;(s=(i=this.destination)===null||i===void 0?void 0:i.next)===null||s===void 0||s.call(i,e)},t.prototype.error=function(e){var i,s;(s=(i=this.destination)===null||i===void 0?void 0:i.error)===null||s===void 0||s.call(i,e)},t.prototype.complete=function(){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||i===void 0||i.call(e)},t.prototype._subscribe=function(e){var i,s;return(s=(i=this.source)===null||i===void 0?void 0:i.subscribe(e))!==null&&s!==void 0?s:lu},t}(Re),Ns=function(n){xe(t,n);function t(e){var i=n.call(this)||this;return i._value=e,i}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(e){var i=n.prototype._subscribe.call(this,e);return!i.closed&&e.next(this._value),i},t.prototype.getValue=function(){var e=this,i=e.hasError,s=e.thrownError,r=e._value;if(i)throw s;return this._throwIfClosed(),r},t.prototype.next=function(e){n.prototype.next.call(this,this._value=e)},t}(Re),sa={now:function(){return(sa.delegate||Date).now()},delegate:void 0},d1=function(n){xe(t,n);function t(e,i,s){e===void 0&&(e=1/0),i===void 0&&(i=1/0),s===void 0&&(s=sa);var r=n.call(this)||this;return r._bufferSize=e,r._windowTime=i,r._timestampProvider=s,r._buffer=[],r._infiniteTimeWindow=!0,r._infiniteTimeWindow=i===1/0,r._bufferSize=Math.max(1,e),r._windowTime=Math.max(1,i),r}return t.prototype.next=function(e){var i=this,s=i.isStopped,r=i._buffer,o=i._infiniteTimeWindow,a=i._timestampProvider,c=i._windowTime;s||(r.push(e),!o&&r.push(a.now()+c)),this._trimBuffer(),n.prototype.next.call(this,e)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var i=this._innerSubscribe(e),s=this,r=s._infiniteTimeWindow,o=s._buffer,a=o.slice(),c=0;c<a.length&&!e.closed;c+=r?1:2)e.next(a[c]);return this._checkFinalizedStatuses(e),i},t.prototype._trimBuffer=function(){var e=this,i=e._bufferSize,s=e._timestampProvider,r=e._buffer,o=e._infiniteTimeWindow,a=(o?1:2)*i;if(i<1/0&&a<r.length&&r.splice(0,r.length-a),!o){for(var c=s.now(),h=0,l=1;l<r.length&&r[l]<=c;l+=2)h=l;h&&r.splice(0,h+1)}},t}(Re),m1=function(n){xe(t,n);function t(e,i){return n.call(this)||this}return t.prototype.schedule=function(e,i){return this},t}(Hn),Fs={setInterval:function(n,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];var s=Fs.delegate;return s?.setInterval?s.setInterval.apply(s,Ze([n,t],ke(e))):setInterval.apply(void 0,Ze([n,t],ke(e)))},clearInterval:function(n){var t=Fs.delegate;return(t?.clearInterval||clearInterval)(n)},delegate:void 0},p1=function(n){xe(t,n);function t(e,i){var s=n.call(this,e,i)||this;return s.scheduler=e,s.work=i,s.pending=!1,s}return t.prototype.schedule=function(e,i){var s;if(i===void 0&&(i=0),this.closed)return this;this.state=e;var r=this.id,o=this.scheduler;return r!=null&&(this.id=this.recycleAsyncId(o,r,i)),this.pending=!0,this.delay=i,this.id=(s=this.id)!==null&&s!==void 0?s:this.requestAsyncId(o,this.id,i),this},t.prototype.requestAsyncId=function(e,i,s){return s===void 0&&(s=0),Fs.setInterval(e.flush.bind(e,this),s)},t.prototype.recycleAsyncId=function(e,i,s){if(s===void 0&&(s=0),s!=null&&this.delay===s&&this.pending===!1)return i;i!=null&&Fs.clearInterval(i)},t.prototype.execute=function(e,i){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var s=this._execute(e,i);if(s)return s;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,i){var s=!1,r;try{this.work(e)}catch(o){s=!0,r=o||new Error("Scheduled action threw falsy error")}if(s)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var e=this,i=e.id,s=e.scheduler,r=s.actions;this.work=this.state=this.scheduler=null,this.pending=!1,xi(r,this),i!=null&&(this.id=this.recycleAsyncId(s,i,null)),this.delay=null,n.prototype.unsubscribe.call(this)}},t}(m1),yu=function(){function n(t,e){e===void 0&&(e=n.now),this.schedulerActionCtor=t,this.now=e}return n.prototype.schedule=function(t,e,i){return e===void 0&&(e=0),new this.schedulerActionCtor(this,t).schedule(i,e)},n.now=sa.now,n}(),g1=function(n){xe(t,n);function t(e,i){i===void 0&&(i=yu.now);var s=n.call(this,e,i)||this;return s.actions=[],s._active=!1,s}return t.prototype.flush=function(e){var i=this.actions;if(this._active){i.push(e);return}var s;this._active=!0;do if(s=e.execute(e.state,e.delay))break;while(e=i.shift());if(this._active=!1,s){for(;e=i.shift();)e.unsubscribe();throw s}},t}(yu),ra=new g1(p1),y1=ra,bu=new ft(function(n){return n.complete()});function wu(n){return n&&it(n.schedule)}function oa(n){return n[n.length-1]}function b1(n){return it(oa(n))?n.pop():void 0}function Si(n){return wu(oa(n))?n.pop():void 0}function w1(n,t){return typeof oa(n)=="number"?n.pop():t}var aa=function(n){return n&&typeof n.length=="number"&&typeof n!="function"};function vu(n){return it(n?.then)}function xu(n){return it(n[ia])}function _u(n){return Symbol.asyncIterator&&it(n?.[Symbol.asyncIterator])}function Su(n){return new TypeError("You provided "+(n!==null&&typeof n=="object"?"an invalid object":"'"+n+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function v1(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Cu=v1();function Eu(n){return it(n?.[Cu])}function Tu(n){return e1(this,arguments,function(){var e,i,s,r;return hu(this,function(o){switch(o.label){case 0:e=n.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,Wn(e.read())];case 3:return i=o.sent(),s=i.value,r=i.done,r?[4,Wn(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,Wn(s)];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 Pu(n){return it(n?.getReader)}function xt(n){if(n instanceof ft)return n;if(n!=null){if(xu(n))return x1(n);if(aa(n))return _1(n);if(vu(n))return S1(n);if(_u(n))return Au(n);if(Eu(n))return C1(n);if(Pu(n))return E1(n)}throw Su(n)}function x1(n){return new ft(function(t){var e=n[ia]();if(it(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function _1(n){return new ft(function(t){for(var e=0;e<n.length&&!t.closed;e++)t.next(n[e]);t.complete()})}function S1(n){return new ft(function(t){n.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,mu)})}function C1(n){return new ft(function(t){var e,i;try{for(var s=Cn(n),r=s.next();!r.done;r=s.next()){var o=r.value;if(t.next(o),t.closed)return}}catch(a){e={error:a}}finally{try{r&&!r.done&&(i=s.return)&&i.call(s)}finally{if(e)throw e.error}}t.complete()})}function Au(n){return new ft(function(t){T1(n,t).catch(function(e){return t.error(e)})})}function E1(n){return Au(Tu(n))}function T1(n,t){var e,i,s,r;return t1(this,void 0,void 0,function(){var o,a;return hu(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),e=n1(n),c.label=1;case 1:return[4,e.next()];case 2:if(i=c.sent(),!!i.done)return[3,4];if(o=i.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),s={error:a},[3,11];case 6:return c.trys.push([6,,9,10]),i&&!i.done&&(r=e.return)?[4,r.call(e)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function Le(n,t,e,i,s){i===void 0&&(i=0),s===void 0&&(s=!1);var r=t.schedule(function(){e(),s?n.add(this.schedule(null,i)):this.unsubscribe()},i);if(n.add(r),!s)return r}function Mu(n,t){return t===void 0&&(t=0),Ft(function(e,i){e.subscribe(wt(i,function(s){return Le(i,n,function(){return i.next(s)},t)},function(){return Le(i,n,function(){return i.complete()},t)},function(s){return Le(i,n,function(){return i.error(s)},t)}))})}function ca(n,t){return t===void 0&&(t=0),Ft(function(e,i){i.add(n.schedule(function(){return e.subscribe(i)},t))})}function P1(n,t){return xt(n).pipe(ca(t),Mu(t))}function A1(n,t){return xt(n).pipe(ca(t),Mu(t))}function M1(n,t){return new ft(function(e){var i=0;return t.schedule(function(){i===n.length?e.complete():(e.next(n[i++]),e.closed||this.schedule())})})}function D1(n,t){return new ft(function(e){var i;return Le(e,t,function(){i=n[Cu](),Le(e,t,function(){var s,r,o;try{s=i.next(),r=s.value,o=s.done}catch(a){e.error(a);return}o?e.complete():e.next(r)},0,!0)}),function(){return it(i?.return)&&i.return()}})}function Du(n,t){if(!n)throw new Error("Iterable cannot be null");return new ft(function(e){Le(e,t,function(){var i=n[Symbol.asyncIterator]();Le(e,t,function(){i.next().then(function(s){s.done?e.complete():e.next(s.value)})},0,!0)})})}function I1(n,t){return Du(Tu(n),t)}function O1(n,t){if(n!=null){if(xu(n))return P1(n,t);if(aa(n))return M1(n,t);if(vu(n))return A1(n,t);if(_u(n))return Du(n,t);if(Eu(n))return D1(n,t);if(Pu(n))return I1(n,t)}throw Su(n)}function Ci(n,t){return t?O1(n,t):xt(n)}function k1(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=Si(n);return Ci(n,e)}var R1=Zo(function(n){return function(){n(this),this.name="EmptyError",this.message="no elements in sequence"}});function L1(n,t){var e=typeof t=="object";return new Promise(function(i,s){var r=new qn({next:function(o){i(o),r.unsubscribe()},error:s,complete:function(){e?i(t.defaultValue):s(new R1)}});n.subscribe(r)})}function z1(n){return n instanceof Date&&!isNaN(n)}function dt(n,t){return Ft(function(e,i){var s=0;e.subscribe(wt(i,function(r){i.next(n.call(t,r,s++))}))})}var N1=Array.isArray;function F1(n,t){return N1(t)?n.apply(void 0,Ze([],ke(t))):n(t)}function ha(n){return dt(function(t){return F1(n,t)})}var B1=Array.isArray,U1=Object.getPrototypeOf,V1=Object.prototype,Y1=Object.keys;function $1(n){if(n.length===1){var t=n[0];if(B1(t))return{args:t,keys:null};if(G1(t)){var e=Y1(t);return{args:e.map(function(i){return t[i]}),keys:e}}}return{args:n,keys:null}}function G1(n){return n&&typeof n=="object"&&U1(n)===V1}function X1(n,t){return n.reduce(function(e,i,s){return e[i]=t[s],e},{})}function j1(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=Si(n),i=b1(n),s=$1(n),r=s.args,o=s.keys;if(r.length===0)return Ci([],e);var a=new ft(W1(r,e,o?function(c){return X1(o,c)}:En));return i?a.pipe(ha(i)):a}function W1(n,t,e){return e===void 0&&(e=En),function(i){Iu(t,function(){for(var s=n.length,r=new Array(s),o=s,a=s,c=function(l){Iu(t,function(){var u=Ci(n[l],t),d=!1;u.subscribe(wt(i,function(f){r[l]=f,d||(d=!0,a--),a||i.next(e(r.slice()))},function(){--o||i.complete()}))},i)},h=0;h<s;h++)c(h)},i)}}function Iu(n,t,e){n?Le(e,n,t):t()}function H1(n,t,e,i,s,r,o,a){var c=[],h=0,l=0,u=!1,d=function(){u&&!c.length&&!h&&t.complete()},f=function(m){return h<i?p(m):c.push(m)},p=function(m){r&&t.next(m),h++;var v=!1;xt(e(m,l++)).subscribe(wt(t,function(y){s?.(y),r?f(y):t.next(y)},function(){v=!0},void 0,function(){if(v)try{h--;for(var y=function(){var b=c.shift();o?Le(t,o,function(){return p(b)}):p(b)};c.length&&h<i;)y();d()}catch(b){t.error(b)}}))};return n.subscribe(wt(t,f,function(){u=!0,d()})),function(){a?.()}}function la(n,t,e){return e===void 0&&(e=1/0),it(t)?la(function(i,s){return dt(function(r,o){return t(i,r,s,o)})(xt(n(i,s)))},e):(typeof t=="number"&&(e=t),Ft(function(i,s){return H1(i,s,n,e)}))}function Ou(n){return n===void 0&&(n=1/0),la(En,n)}function q1(){return Ou(1)}function ku(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return q1()(Ci(n,Si(n)))}var J1=["addListener","removeListener"],K1=["addEventListener","removeEventListener"],Z1=["on","off"];function ua(n,t,e,i){if(it(e)&&(i=e,e=void 0),i)return ua(n,t,e).pipe(ha(i));var s=ke(eb(n)?K1.map(function(a){return function(c){return n[a](t,c,e)}}):Q1(n)?J1.map(Ru(n,t)):tb(n)?Z1.map(Ru(n,t)):[],2),r=s[0],o=s[1];if(!r&&aa(n))return la(function(a){return ua(a,t,e)})(xt(n));if(!r)throw new TypeError("Invalid event target");return new ft(function(a){var c=function(){for(var h=[],l=0;l<arguments.length;l++)h[l]=arguments[l];return a.next(1<h.length?h:h[0])};return r(c),function(){return o(c)}})}function Ru(n,t){return function(e){return function(i){return n[e](t,i)}}}function Q1(n){return it(n.addListener)&&it(n.removeListener)}function tb(n){return it(n.on)&&it(n.off)}function eb(n){return it(n.addEventListener)&&it(n.removeEventListener)}function ut(n,t,e){return e?ut(n,t).pipe(ha(e)):new ft(function(i){var s=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return i.next(o.length===1?o[0]:o)},r=n(s);return it(t)?function(){return t(s,r)}:void 0})}function nb(n,t,e){n===void 0&&(n=0),e===void 0&&(e=y1);var i=-1;return t!=null&&(wu(t)?e=t:i=t),new ft(function(s){var r=z1(n)?+n-e.now():n;r<0&&(r=0);var o=0;return e.schedule(function(){s.closed||(s.next(o++),0<=i?this.schedule(void 0,i):s.complete())},r)})}function Bs(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=Si(n),i=w1(n,1/0),s=n;return s.length?s.length===1?xt(s[0]):Ou(i)(Ci(s,e)):bu}var ib=Array.isArray;function sb(n){return n.length===1&&ib(n[0])?n[0]:n}function fa(n,t){return Ft(function(e,i){var s=0;e.subscribe(wt(i,function(r){return n.call(t,r,s++)&&i.next(r)}))})}function Us(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n=sb(n),n.length===1?xt(n[0]):new ft(rb(n))}function rb(n){return function(t){for(var e=[],i=function(r){e.push(xt(n[r]).subscribe(wt(t,function(o){if(e){for(var a=0;a<e.length;a++)a!==r&&e[a].unsubscribe();e=null}t.next(o)})))},s=0;e&&!t.closed&&s<n.length;s++)i(s)}}function Lu(n){return Ft(function(t,e){var i=null,s=!1,r;i=t.subscribe(wt(e,void 0,void 0,function(o){r=xt(n(o,Lu(n)(t))),i?(i.unsubscribe(),i=null,r.subscribe(e)):s=!0})),s&&(i.unsubscribe(),i=null,r.subscribe(e))})}function Qe(n,t){return t===void 0&&(t=En),n=n??ob,Ft(function(e,i){var s,r=!0;e.subscribe(wt(i,function(o){var a=t(o);(r||!n(s,a))&&(r=!1,s=a,i.next(o))}))})}function ob(n,t){return n===t}function zu(n,t){return t?function(e){return e.pipe(zu(function(i,s){return xt(n(i,s)).pipe(dt(function(r,o){return t(i,r,s,o)}))}))}:Ft(function(e,i){var s=0,r=null,o=!1;e.subscribe(wt(i,function(a){r||(r=wt(i,void 0,function(){r=null,o&&i.complete()}),xt(n(a,s++)).subscribe(r))},function(){o=!0,!r&&i.complete()}))})}function ab(n){n===void 0&&(n={});var t=n.connector,e=t===void 0?function(){return new Re}:t,i=n.resetOnError,s=i===void 0?!0:i,r=n.resetOnComplete,o=r===void 0?!0:r,a=n.resetOnRefCountZero,c=a===void 0?!0:a;return function(h){var l,u,d,f=0,p=!1,m=!1,v=function(){u?.unsubscribe(),u=void 0},y=function(){v(),l=d=void 0,p=m=!1},b=function(){var x=l;y(),x?.unsubscribe()};return Ft(function(x,w){f++,!m&&!p&&v();var C=d=d??e();w.add(function(){f--,f===0&&!m&&!p&&(u=da(b,c))}),C.subscribe(w),!l&&f>0&&(l=new qn({next:function(S){return C.next(S)},error:function(S){m=!0,v(),u=da(y,s,S),C.error(S)},complete:function(){p=!0,v(),u=da(y,o),C.complete()}}),xt(x).subscribe(l))})(h)}}function da(n,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];if(t===!0){n();return}if(t!==!1){var s=new qn({next:function(){s.unsubscribe(),n()}});return xt(t.apply(void 0,Ze([],ke(e)))).subscribe(s)}}function Nu(n,t,e){var i,s,r,o,a=!1;return n&&typeof n=="object"?(i=n.bufferSize,o=i===void 0?1/0:i,s=n.windowTime,t=s===void 0?1/0:s,r=n.refCount,a=r===void 0?!1:r,e=n.scheduler):o=n??1/0,ab({connector:function(){return new d1(o,t,e)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:a})}function Tn(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=Si(n);return Ft(function(i,s){(e?ku(n,i,e):ku(n,i)).subscribe(s)})}function Vs(n,t){return Ft(function(e,i){var s=null,r=0,o=!1,a=function(){return o&&!s&&i.complete()};e.subscribe(wt(i,function(c){s?.unsubscribe();var h=0,l=r++;xt(n(c,l)).subscribe(s=wt(i,function(u){return i.next(t?t(c,u,l,h++):u)},function(){s=null,a()}))},function(){o=!0,a()}))})}function cb(){return Vs(En)}function ma(n){return Ft(function(t,e){xt(n).subscribe(wt(e,function(){return e.complete()},_i)),!e.closed&&t.subscribe(e)})}function Pn(n,t,e){var i=it(n)||t||e?{next:n,error:t,complete:e}:n;return i?Ft(function(s,r){var o;(o=i.subscribe)===null||o===void 0||o.call(i);var a=!0;s.subscribe(wt(r,function(c){var h;(h=i.next)===null||h===void 0||h.call(i,c),r.next(c)},function(){var c;a=!1,(c=i.complete)===null||c===void 0||c.call(i),r.complete()},function(c){var h;a=!1,(h=i.error)===null||h===void 0||h.call(i,c),r.error(c)},function(){var c,h;a&&((c=i.unsubscribe)===null||c===void 0||c.call(i)),(h=i.finalize)===null||h===void 0||h.call(i)}))}):En}function hb(n,t){return Ft(function(e,i){var s=t??{},r=s.leading,o=r===void 0?!0:r,a=s.trailing,c=a===void 0?!1:a,h=!1,l=null,u=null,d=!1,f=function(){u?.unsubscribe(),u=null,c&&(v(),d&&i.complete())},p=function(){u=null,d&&i.complete()},m=function(y){return u=xt(n(y)).subscribe(wt(i,f,p))},v=function(){if(h){h=!1;var y=l;l=null,i.next(y),!d&&m(y)}};e.subscribe(wt(i,function(y){h=!0,l=y,!(u&&!u.closed)&&(o?v():m(y))},function(){d=!0,!(c&&h&&u&&!u.closed)&&i.complete()}))})}function lb(n,t,e){t===void 0&&(t=ra);var i=nb(n,t);return hb(function(){return i},e)}function ub(n,t){return Ft(function(e,i){var s=[],r=function(o){for(;0<s.length;)s.shift().error(o);i.error(o)};xt(n).subscribe(wt(i,function(o){var a=new Re;s.push(a);var c=new Hn,h=function(){xi(s,a),a.complete(),c.unsubscribe()},l;try{l=xt(t(o))}catch(u){r(u);return}i.next(a.asObservable()),c.add(l.subscribe(wt(i,h,_i,r)))},_i)),e.subscribe(wt(i,function(o){var a,c,h=s.slice();try{for(var l=Cn(h),u=l.next();!u.done;u=l.next()){var d=u.value;d.next(o)}}catch(f){a={error:f}}finally{try{u&&!u.done&&(c=l.return)&&c.call(l)}finally{if(a)throw a.error}}},function(){for(;0<s.length;)s.shift().complete();i.complete()},r,function(){for(;0<s.length;)s.shift().unsubscribe()}))})}function fb(n){return n.toElement?n.toElement:n.currentTarget?n.currentTarget:n.srcElement?n.srcElement:null}function st(n,t,e,i=!1){const s=async r=>{await e(r)};try{n.addEventListener(t,s,i)}catch{n.attachEvent("on"+t,s)}return()=>{try{n.removeEventListener(t,s,i)}catch{n.detachEvent("on"+t,s)}}}function db(n,t,e,i,s=!1){return st(n||document.body,e,r=>{r.target===t&&i(r)},s)}function mb(n){n.replaceWith(n.cloneNode(!0))}function $(n,t,e=!1){return ua(n,t,{capture:e})}function pb(n){const t=ut(e=>n.register(e),(e,i)=>{n.unregister?.(e,...i||[])},(...e)=>[...e]);return n.share?t.pipe(Nu({bufferSize:n.bufferSize||1,refCount:!0})):t}function Fu(n){if(n.stopPropagation){n.stopPropagation();return}try{n.cancelBubble=!0}catch{}}function tn(n){if(n.preventDefault){n.preventDefault();return}try{n.returnValue=!1}catch{}}const gb=["click","dblclick","wheel","contextmenu","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave"],yb=["keydown","keyup","keypress"],bb=["touchstart","touchend","touchcancel","touchmove"],wb=["pointerdown","pointerup","pointercancel","pointermove"],vb=["dragstart","drag","dragend","dragenter","dragover","dragleave","drop"],xb=["change"];function Ys(n,t={bubbles:!0,detail:{}}){let e;try{const i=Object.assign({bubbles:!0,cancelable:!0,view:window,detail:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null},t);gb.includes(n)?e=new MouseEvent(n,i):yb.includes(n)?e=new KeyboardEvent(n,i):bb.includes(n)?e=new TouchEvent(n,i):wb.includes(n)?e=new PointerEvent(n,i):vb.includes(n)?e=new DragEvent(n,i):xb.includes(n)?e=new Event(n,i):e=new CustomEvent(n,i)}catch{document.createEvent?e=document.createEvent("Event").initEvent(n,!0,!0):document.createEventObject&&(e=document.createEventObject())}return e}function pa(n,t,e){if(n)if(n.dispatchEvent)n.dispatchEvent(e);else if(n.fireEvent&&document.createEventObject)n.fireEvent("on"+t,e);else throw new Error(`Can't dispatch event : ${t}`)}function _b(n,t){const e=n.target,i=Ys(t);pa(e,t,i)}function Sb(n){const t=n.target,e="click";if(!/(SELECT|INPUT|TEXTAREA)/i.test(t.tagName)){const i=Ys(e);i.view=n.view||window,i.detail=1,i.screenX=t.screenX||0,i.screenY=t.screenY||0,i.clientX=t.clientX||0,i.clientY=t.clientY||0,i.pageX=n.pageX,i.pageY=n.pageY,i.ctrlKey=!!n.ctrlKey,i.altKey=!!n.altKey,i.shiftKey=!!n.shiftKey,i.metaKey=!!n.metaKey,i.button=0,i.relatedTarget=null,i._constructed=!0,pa(t,e,i)}}function Cb(n,t){const e=n.changedTouches[0];return Ys(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 Eb(n,t,e,i,s){const r=t/e;let o=0,a=0;switch(n){case"aspectFit":r>=1?(o=i,a=o/r,a>s&&(a=s,o=a*r)):(a=s,o=a*r,o>i&&(o=i,a=o/r));break;case"aspectFill":r>=1?(a=s,o=a*r):(o=i,a=o/r);break;case"widthFix":o=i,a=o/r;break;case"heightFix":a=s,o=a*r;break;case"scaleToFill":default:o=i,a=s;break}return{width:o,height:a}}function Bu(n){try{const t=document.createElement("canvas"),e=t.getContext("2d");return t.width=n.width,t.height=n.height,e.drawImage(n,0,0,t.width,t.height),e.getImageData(0,0,t.width,t.height)}catch{return new ImageData(n.width,n.height)}}const Tb=n=>{const t=n.width,e=n.height,i=t*e*3,s=i+54,r=[66,77,s&255,s>>8&255,s>>16&255,s>>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,i&255,i>>8&255,i>>16&255,i>>24&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=(4-t*3%4)%4,c=n.data;let h="";const l=t<<2;let u=e;const d=String.fromCharCode;do{const p=l*(u-1);let m="";for(let v=0;v<t;v++){const y=v<<2;m+=d(c[p+y+2])+d(c[p+y+1])+d(c[p+y])}for(let v=0;v<a;v++)m+=String.fromCharCode(0);h+=m}while(--u);function f(p){if(!window.btoa)throw"btoa undefined";let m="";if(typeof p=="string")m=p;else for(let v=0;v<p.length;v++)m+=String.fromCharCode(p[v]);return btoa(m)}return f(r.concat(o))+f(h)};function Pb(n){const{width:t,height:e}=n,i=document.createElement("canvas"),s=i.getContext("2d");return i.width=t,i.height=e,s.putImageData(n,0,0,0,0,t,e),i.toDataURL("image/png")}const Ab=(n,t,e)=>{const{width:i,height:s}=n,r=document.createElement("canvas"),o=r.getContext("2d");r.width=i,r.height=s,o.putImageData(n,0,0,0,0,i,s);const a=`image/${t?t.toLowerCase():"png"}`;r.toBlob(c=>{e?.(null,c)},a,1)};function Mb(n,t){return createImageBitmap(n,t)}function Db(n){const t=[],e=[],i=[];let s=0;for(let c=0,h=n.data.length;c<h;c+=4)t[s]=n.data[c],e[s]=n.data[c+1],i[s]=n.data[c+2],s+=1;const r=ga(t),o=ga(e),a=ga(i);return"rgb("+r+","+o+","+a+")"}function ga(n){const t={},e=[],i=[];for(let a=0;a<n.length;a++)t[n[a]]?e.push(n[a]):t[n[a]]=1;let s=0;for(let a=0;a<e.length;a++){s=0;for(let c=0;c<e.length;c++)e[a]===e[c]&&(s+=1),i[a]=s}const r=Math.max.apply(null,i);let o=0;for(;o<i.length;o++)if(i[o]===r)return;return e[o]}const Ib=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[(o*e+e-a-1)*4],s[c+1]=t[(o*e+e-a-1)*4+1],s[c+2]=t[(o*e+e-a-1)*4+2],s[c+3]=t[(o*e+e-a-1)*4+3]}return new ImageData(s,e,i)},Ob=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[((i-o-1)*e+a)*4],s[c+1]=t[((i-o-1)*e+a)*4+1],s[c+2]=t[((i-o-1)*e+a)*4+2],s[c+3]=t[((i-o-1)*e+a)*4+3]}return new ImageData(s,e,i)},kb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<e;o++)for(let a=0;a<i;a++){const c=(o*i+a)*4;s[c]=t[(a*e+e-o-1)*4],s[c+1]=t[(a*e+e-o-1)*4+1],s[c+2]=t[(a*e+e-o-1)*4+2],s[c+3]=t[(a*e+e-o-1)*4+3]}return new ImageData(s,i,e)},Rb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<e;o++)for(let a=0;a<i;a++){const c=(o*i+a)*4;s[c]=t[((i-a-1)*e+o)*4],s[c+1]=t[((i-a-1)*e+o)*4+1],s[c+2]=t[((i-a-1)*e+o)*4+2],s[c+3]=t[((i-a-1)*e+o)*4+3]}return new ImageData(s,i,e)},Lb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+1]+t[c+2])/3;s[c]=h,s[c+1]=h,s[c+2]=h,s[c+3]=t[c+3]}return new ImageData(s,e,i)},zb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=.2126*t[c]+.7152*t[c+1]+.0722*t[c+2];s[c]=h,s[c+1]=h,s[c+2]=h,s[c+3]=t[c+3]}return new ImageData(s,e,i)},Nb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,l=(t[c]+t[c+1]+t[c+2])/3>127?255:0;s[c]=l,s[c+1]=l,s[c+2]=l,s[c+3]=t[c+3]}return new ImageData(s,e,i)},Fb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=255-t[c],s[c+1]=255-t[c+1],s[c+2]=255-t[c+2],s[c+3]=t[c+3]}return new ImageData(s,e,i)},Bb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[c],s[c+1]=0,s[c+2]=0,s[c+3]=t[c+3]}return new ImageData(s,e,i)},Ub=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=0,s[c+1]=t[c+1],s[c+2]=0,s[c+3]=t[c+3]}return new ImageData(s,e,i)},Vb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=0,s[c+1]=0,s[c+2]=t[c+2],s[c+3]=t[c+3]}return new ImageData(s,e,i)},Yb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[c],s[c+1]=t[c+1],s[c+2]=0,s[c+3]=t[c+3]}return new ImageData(s,e,i)},$b=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[c],s[c+1]=0,s[c+2]=t[c+1],s[c+3]=t[c+3]}return new ImageData(s,e,i)},Gb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=0,s[c+1]=t[c+1],s[c+2]=t[c+1],s[c+3]=t[c+3]}return new ImageData(s,e,i)},Xb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c+1]+t[c+2])/2;s[c]=t[c],s[c+1]=h,s[c+2]=h,s[c+3]=t[c+3]}return new ImageData(s,e,i)},jb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+2])/2;s[c]=h,s[c+1]=t[c+1],s[c+2]=h,s[c+3]=t[c+3]}return new ImageData(s,e,i)},Wb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+1])/2;s[c]=h,s[c+1]=h,s[c+2]=t[c+2],s[c+3]=t[c+3]}return new ImageData(s,e,i)},Hb=n=>Uu(n,[-1,-1,-1,-1,9,-1,-1,-1,-1]),qb=n=>Uu(n,[-1,-1,-1,-1,8,-1,-1,-1,-1]),Jb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[c],s[c+1]=t[c+1],s[c+2]=t[c+2],s[c+3]=255}return new ImageData(s,e,i)},Kb=n=>{const{data:t,width:e,height:i}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<i;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;if(t[c+3]===0)s[c]=255,s[c+1]=255,s[c+2]=255,s[c+3]=255;else{const h=Vu([t[c],t[c+1],t[c+2],t[c+3]],[255,255,255,255]);s[c]=h[0],s[c+1]=h[1],s[c+2]=h[2],s[c+3]=h[3]}}return new ImageData(s,e,i)};function Zb(n,t,e,i,s,r=!1,o){const{data:a,width:c,height:h}=n;let l=s,u=i,d=t,f=e;if(l<0?l=0:l>c&&(l=c),u<0?u=0:u>h&&(u=h),d<1?d=1:d>c&&(d=c),f<1?f=1:f>h&&(f=h),l+d>c&&(d=c-l),u+f>h&&(f=h-u),r){const p=new Uint8ClampedArray(a.length);for(let v=0;v<h;v++)for(let y=0;y<c;y++){const b=(v*c+y)*4;y>=l&&y<=l+d&&v>=u&&v<=u+f?(p[b]=a[b],p[b+1]=a[b+1],p[b+2]=a[b+2],p[b+3]=a[b+3]):(p[b]=255,p[b+1]=255,p[b+2]=255,p[b+3]=o&&["JPG","JPEG"].includes(o.toUpperCase())?255:0)}return new ImageData(p,c,h)}else{const p=new Uint8ClampedArray(d*f*4);for(let v=u;v<=u+f;v++)for(let y=l;y<=l+d;y++){const b=((v-u)*d+y-l)*4,x=(v*c+y)*4;p[b]=a[x],p[b+1]=a[x+1],p[b+2]=a[x+2],p[b+3]=a[x+3]}return new ImageData(p,d,f)}}function Qb(n,t,e,i){const{data:s,width:r,height:o}=n;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 c=new Uint8ClampedArray(s.length);for(let l=0;l<o;l++)for(let u=0;u<r;u++){const d=(l*r+u)*4;let f=-1;u<a?l<a?f=Math.sqrt(Math.pow(a-u-1,2)+Math.pow(a-l-1,2)):l>o-a-1&&(f=Math.sqrt(Math.pow(a-u-1,2)+Math.pow(l-(o-a),2))):u>r-a-1&&(l<a?f=Math.sqrt(Math.pow(u-(r-a),2)+Math.pow(a-l-1,2)):l>o-a-1&&(f=Math.sqrt(Math.pow(u-(r-a),2)+Math.pow(l-(o-a),2)))),Math.round(f)>a?(c[d]=255,c[d+1]=255,c[d+2]=255,c[d+3]=i||e.toUpperCase()==="PNG"?0:255):(c[d]=s[d],c[d+1]=s[d+1],c[d+2]=s[d+2],c[d+3]=i||e.toUpperCase()==="PNG"?s[d+3]:255)}return new ImageData(c,r,o)}function tw(n,t,e,i,s,r=1e4){const o=new Image;o.src=n;const a=document.createElement("canvas"),c=a.getContext("2d");return a.width=r,a.height=r,c.drawImage(o,0,0,t,e,0,0,i,s),c.getImageData(0,0,i,s)}function ew(n,t){const{data:e,width:i,height:s}=n,r=new Uint8ClampedArray(e.length);for(let a=0;a<s;a++)for(let c=0;c<i;c++){const h=(a*i+c)*4;r[h]=Math.max(Math.min(e[h]+t,255),0),r[h+1]=Math.max(Math.min(e[h+1]+t,255),0),r[h+2]=Math.max(Math.min(e[h+2]+t,255),0),r[h+3]=e[h+3]}return new ImageData(r,i,s)}function nw(n,t,e=!1){const{data:i,width:s,height:r}=n,o=new Uint8ClampedArray(i.length);for(let c=0;c<r;c++)for(let h=0;h<s;h++){const l=(c*s+h)*4;i[l+3]===0?(o[l]=255,o[l+1]=255,o[l+2]=255):(o[l]=i[l],o[l+1]=i[l+1],o[l+2]=i[l+2]);let u=i[l+3];e?u=Math.max(Math.min(Math.floor(255*t),255),0):u=Math.max(Math.min(Math.floor(u+255*t),255),0),o[l+3]=u}return new ImageData(o,s,r)}function iw(n,t,e,i){const{data:s,width:r,height:o}=n,{data:a,width:c,height:h}=t;let l=e,u=i;e+h>o&&(l=o-h),i+c>r&&(u=r-c);const d=new Uint8ClampedArray(s.length);for(let p=0;p<o;p++)for(let m=0;m<r;m++){const v=(p*r+m)*4;if(m<u||m>u+c||p<=l||p>=l+h)d[v]=s[v],d[v+1]=s[v+1],d[v+2]=s[v+2],d[v+3]=s[v+3];else{const y=(p*r+m-((l+1)*r+(p-(l+1))*(r-c))+c-u-1)*4,b=[a[y],a[y+1],a[y+2],a[y+3]],x=[s[v],s[v+1],s[v+2],s[v+3]],w=Vu(b,x);d[v]=w[0],d[v+1]=w[1],d[v+2]=w[2],d[v+3]=w[3]}}return new ImageData(d,r,o)}function sw(n,t,e,i,s,r=10){const{data:o,width:a,height:c}=n;let h=s,l=i,u=t,d=e;h<0?h=0:h>a&&(h=a),l<0?l=0:l>c&&(l=c),u<1?u=1:u>a&&(u=a),d<1?d=1:d>c&&(d=c),h+u>a&&(u=a-h),l+d>c&&(d=c-l);const f=new Uint8ClampedArray(o.length);for(let m=0;m<c;m++)for(let v=0;v<a;v++){const y=(m*a+v)*4;if(v>=h&&v<=h+u&&m>=l&&m<=l+d){const b=Math.floor((v-h)/r),x=Math.floor((m-l)/r);let w=Math.floor(r*(b+1)-r/2+h),C=Math.floor(r*(x+1)-r/2+l);w>a-1&&(w=a-1),C>c-1&&(C=c-1);const S=(C*a+w)*4;f[y]=o[S],f[y+1]=o[S+1],f[y+2]=o[S+2],f[y+3]=o[S+3]}else f[y]=o[y],f[y+1]=o[y+1],f[y+2]=o[y+2],f[y+3]=o[y+3]}return new ImageData(f,a,c)}function rw(n,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:i,width:s,height:r}=n,{data:o}=t,a=new Uint8ClampedArray(i.length),{backgroundColor:c,changeIntoColor:h}=e;for(let u=0;u<r;u++)for(let d=0;d<s;d++){const f=(u*s+d)*4,p=o[f],m=o[f+1],v=o[f+2],y=o[f+3];p===c.r&&m===c.g&&v===c.b&&y===c.a&&h.a!==0?(a[f]=h.r,a[f+1]=h.g,a[f+2]=h.b,a[f+3]=h.a):(a[f]=i[f],a[f+1]=i[f+1],a[f+2]=i[f+2],a[f+3]=i[f+3])}return new ImageData(a,s,r)}return n}function Uu(n,t){const{data:e,width:i,height:s}=n,r=new Uint8ClampedArray(e.length);for(let a=0;a<s;a++)for(let c=0;c<i;c++){const h=(a*i+c)*4;for(let l=0;l<3;l++){const u=h+l;c===0||c===i-1||a===0||a===s-1?r[u]=e[u]:r[u]=t[0]*e[u-i*4-4]+t[1]*e[u-i*4]+t[2]*e[u-i*4+4]+t[3]*e[u-4]+t[4]*e[u]+t[5]*e[u+4]+t[6]*e[u+i*4-4]+t[7]*e[u+i*4]+t[8]*e[u+i*4+4]}r[h+3]=e[h+3]}return new ImageData(r,i,s)}function Vu(n,t){if(n&&n.length===4&&t&&t.length===4){const e=n[3],i=t[3];if(e===255||i===0)return n;if(e===0)return t;{const s=e/255,r=i/255,o=Math.max(Math.min(Math.floor(n[0]*s+t[0]*r*(1-s)),255),0),a=Math.max(Math.min(Math.floor(n[1]*s+t[1]*r*(1-s)),255),0),c=Math.max(Math.min(Math.floor(n[2]*s+t[2]*r*(1-s)),255),0),h=Math.max(Math.min(Math.floor((s+r*(1-s))*255),255),0);return[o,a,c,h]}}return[255,255,255,255]}const ya=function(){const n=[];return{writeByte(t){n.push(t&255)},writeShort(t){this.writeByte(t),this.writeByte(t>>>8)},writeBytes(t,e=0,i=t.length){for(let s=0;s<i;s++)this.writeByte(t[s+e])},writeString(t){for(let e=0,i=t.length;e<i;e++)this.writeByte(t.charCodeAt(e))},toByteArray(){return n},toString(){let t="[";for(let e=0,i=n.length;e<i;e++)e>0&&(t+=","),t+=n[e];return t+="]",t}}},Yu=function(){let n=0,t=0,e=0,i="";const s=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){i+=String.fromCharCode(s(o&63))};return{writeByte(o){for(n=n<<8|o&255,t+=8,e+=1;t>=6;)r(n>>>t-6),t-=6},flush(){if(t>0&&(r(n<<6-t),n=0,t=0),e%3!=0){const o=3-e%3;for(let a=0;a<o;a++)i+="="}},toString(){return i}}},$u=function(n,t,e){const i=new Array(n*n),s=function(a){const c=a;let h=0,l=0;return{write(u,d){if(u>>>d)throw new Error("length over");for(;h+d>=8;)c.writeByte(255&(u<<h|l)),d-=8-h,u>>>=8-h,l=0,h=0;l=u<<h|l,h=h+d},flush(){h>0&&c.writeByte(l)}}},r=function(a){const c=1<<a,h=(1<<a)+1;let l=a+1;const u=o();for(let v=0;v<c;v++)u.add(String.fromCharCode(v));u.add(String.fromCharCode(c)),u.add(String.fromCharCode(h));const d=ya(),f=s(d);f.write(c,l);let p=0,m=String.fromCharCode(i[p]);for(p+=1;p<i.length;){const v=String.fromCharCode(i[p]);p+=1,u.contains(m+v)?m=m+v:(f.write(u.indexOf(m),l),u.size()<4095&&(u.size()==1<<l&&(l+=1),u.add(m+v)),m=v)}return f.write(u.indexOf(m),l),f.write(h,l),f.flush(),d.toByteArray()},o=function(){const a={};let c=0;return{add(h){if(this.contains(h))throw new Error("dup key:"+h);a[h]=c,c+=1},size(){return c},indexOf(h){return a[h]},contains(h){return typeof a[h]<"u"}}};return{setPixel(a,c,h){i[c*n+a]=h},write(a){a.writeString("GIF87a"),a.writeShort(n),a.writeShort(n),a.writeByte(128),a.writeByte(0),a.writeByte(0),a.writeByte(Un("0x"+t[1]+t[2])),a.writeByte(Un("0x"+t[3]+t[4])),a.writeByte(Un("0x"+t[5]+t[6])),a.writeByte(Un("0x"+e[1]+e[2])),a.writeByte(Un("0x"+e[3]+e[4])),a.writeByte(Un("0x"+e[5]+e[6])),a.writeString(","),a.writeShort(0),a.writeShort(0),a.writeShort(n),a.writeShort(n),a.writeByte(0);const c=2,h=r(c);a.writeByte(c);let l=0;for(;h.length-l>255;)a.writeByte(255),a.writeBytes(h,l,255),l+=255;a.writeByte(h.length-l),a.writeBytes(h,l,h.length-l),a.writeByte(0),a.writeString(";")}}},Gu=function(n,t,e,i){const s=$u(n,t,e);for(let h=0;h<n;h++)for(let l=0;l<n;l++)s.setPixel(l,h,i(l,h));const r=ya();s.write(r);const o=Yu(),a=r.toByteArray();for(let h=0,l=a.length;h<l;h++)o.writeByte(a[h]);o.flush();let c="";return c+="data:image/gif;base64,",c+=o,c},Zt={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Ei={M:0,L:1,H:2,Q:3},en={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},Et={glog:function(n){if(n<1)throw new Error("glog("+n+")");return Et.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return Et.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(let n=0;n<8;n++)Et.EXP_TABLE[n]=1<<n;for(let n=8;n<256;n++)Et.EXP_TABLE[n]=Et.EXP_TABLE[n-4]^Et.EXP_TABLE[n-5]^Et.EXP_TABLE[n-6]^Et.EXP_TABLE[n-8];for(let n=0;n<255;n++)Et.LOG_TABLE[Et.EXP_TABLE[n]]=n;const ht={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(n){let t=n<<10;for(;ht.getBCHDigit(t)-ht.getBCHDigit(ht.G15)>=0;)t^=ht.G15<<ht.getBCHDigit(t)-ht.getBCHDigit(ht.G15);return(n<<10|t)^ht.G15_MASK},getBCHTypeNumber:function(n){let t=n<<12;for(;ht.getBCHDigit(t)-ht.getBCHDigit(ht.G18)>=0;)t^=ht.G18<<ht.getBCHDigit(t)-ht.getBCHDigit(ht.G18);return n<<12|t},getBCHDigit:function(n){let t=0;for(;n!=0;)t++,n>>>=1;return t},getPatternPosition:function(n){return ht.PATTERN_POSITION_TABLE[n-1]},getMask:function(n,t,e){switch(n){case en.PATTERN000:return(t+e)%2==0;case en.PATTERN001:return t%2==0;case en.PATTERN010:return e%3==0;case en.PATTERN011:return(t+e)%3==0;case en.PATTERN100:return(Math.floor(t/2)+Math.floor(e/3))%2==0;case en.PATTERN101:return t*e%2+t*e%3==0;case en.PATTERN110:return(t*e%2+t*e%3)%2==0;case en.PATTERN111:return(t*e%3+(t+e)%2)%2==0;default:throw new Error("bad maskPattern:"+n)}},getErrorCorrectPolynomial:function(n){let t=new Jn([1],0);for(let e=0;e<n;e++)t=t.multiply(new Jn([1,Et.gexp(e)],0));return t},getLengthInBits:function(n,t){if(1<=t&&t<10)switch(n){case Zt.MODE_NUMBER:return 10;case Zt.MODE_ALPHA_NUM:return 9;case Zt.MODE_8BIT_BYTE:return 8;case Zt.MODE_KANJI:return 8;default:throw new Error("mode:"+n)}else if(t<27)switch(n){case Zt.MODE_NUMBER:return 12;case Zt.MODE_ALPHA_NUM:return 11;case Zt.MODE_8BIT_BYTE:return 16;case Zt.MODE_KANJI:return 10;default:throw new Error("mode:"+n)}else if(t<41)switch(n){case Zt.MODE_NUMBER:return 14;case Zt.MODE_ALPHA_NUM:return 13;case Zt.MODE_8BIT_BYTE:return 16;case Zt.MODE_KANJI:return 12;default:throw new Error("mode:"+n)}else throw new Error("type:"+t)},getLostPoint:function(n){const t=n.getModuleCount();let e=0;for(let r=0;r<t;r++)for(let o=0;o<t;o++){let a=0;const c=n.isDark(r,o);for(let h=-1;h<=1;h++)if(!(r+h<0||t<=r+h))for(let l=-1;l<=1;l++)o+l<0||t<=o+l||h==0&&l==0||c==n.isDark(r+h,o+l)&&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;n.isDark(r,o)&&a++,n.isDark(r+1,o)&&a++,n.isDark(r,o+1)&&a++,n.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++)n.isDark(r,o)&&!n.isDark(r,o+1)&&n.isDark(r,o+2)&&n.isDark(r,o+3)&&n.isDark(r,o+4)&&!n.isDark(r,o+5)&&n.isDark(r,o+6)&&(e+=40);for(let r=0;r<t;r++)for(let o=0;o<t-6;o++)n.isDark(o,r)&&!n.isDark(o+1,r)&&n.isDark(o+2,r)&&n.isDark(o+3,r)&&n.isDark(o+4,r)&&!n.isDark(o+5,r)&&n.isDark(o+6,r)&&(e+=40);let i=0;for(let r=0;r<t;r++)for(let o=0;o<t;o++)n.isDark(o,r)&&i++;const s=Math.abs(100*i/t/t-50)/5;return e+=s*10,e}};class Jn{num;constructor(t,e){if(t.length==null)throw new Error(t.length+"/"+e);let i=0;for(;i<t.length&&t[i]==0;)i++;this.num=new Array(t.length-i+e);for(let s=0;s<t.length-i;s++)this.num[s]=t[s+i]}get(t){return this.num[t]}getLength(){return this.num.length}multiply(t){const e=new Array(this.getLength()+t.getLength()-1);for(let i=0;i<this.getLength();i++)for(let s=0;s<t.getLength();s++)e[i+s]^=Et.gexp(Et.glog(this.get(i))+Et.glog(t.get(s)));return new Jn(e,0)}mod(t){if(this.getLength()-t.getLength()<0)return this;const e=Et.glog(this.get(0))-Et.glog(t.get(0)),i=new Array(this.getLength());for(let s=0;s<this.getLength();s++)i[s]=this.get(s);for(let s=0;s<t.getLength();s++)i[s]^=Et.gexp(Et.glog(t.get(s))+e);return new Jn(i,0).mod(t)}}class ze{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 i=ze.getRsBlockTable(t,e);if(i==null)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);const s=i.length/3,r=[];for(let o=0;o<s;o++){const a=i[o*3+0],c=i[o*3+1],h=i[o*3+2];for(let l=0;l<a;l++)r.push(new ze(c,h))}return r}static getRsBlockTable(t,e){switch(e){case Ei.L:return ze.RS_BLOCK_TABLE[(t-1)*4+0];case Ei.M:return ze.RS_BLOCK_TABLE[(t-1)*4+1];case Ei.Q:return ze.RS_BLOCK_TABLE[(t-1)*4+2];case Ei.H:return ze.RS_BLOCK_TABLE[(t-1)*4+3];default:return}}}class Xu{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 i=0;i<e;i++)this.putBit((t>>>e-i-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 ow{mode;data;constructor(t){this.mode=Zt.MODE_8BIT_BYTE,this.data=t}getLength(){return this.data.length}write(t){for(let e=0,i=this.data.length;e<i;e++)t.put(this.data.charCodeAt(e),8)}}class nn{static PAD0=236;static PAD1=17;typeNumber;errorCorrectLevel;modules;moduleCount;dataCache;dataList;constructor(t,e){this.typeNumber=t,this.errorCorrectLevel=Ei[e],this.modules=[],this.moduleCount=0,this.dataCache=null,this.dataList=[]}addData(t){const e=new ow(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=ze.getRSBlocks(t,this.errorCorrectLevel),i=new Xu;let s=0;for(let r=0;r<e.length;r++)s+=e[r].dataCount;for(let r=0;r<this.dataList.length;r++){const o=this.dataList[r];i.put(o.mode,4),i.put(o.getLength(),ht.getLengthInBits(o.mode,t)),o.write(i)}if(i.getLengthInBits()<=s*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 i=0;i<this.moduleCount;i++){this.modules[i]=new Array(this.moduleCount);for(let s=0;s<this.moduleCount;s++)this.modules[i][s]=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=nn.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)}setupPositionProbePattern(t,e){for(let i=-1;i<=7;i++)if(!(t+i<=-1||this.moduleCount<=t+i))for(let s=-1;s<=7;s++)e+s<=-1||this.moduleCount<=e+s||(0<=i&&i<=6&&(s==0||s==6)||0<=s&&s<=6&&(i==0||i==6)||2<=i&&i<=4&&2<=s&&s<=4?this.modules[t+i][e+s]=!0:this.modules[t+i][e+s]=!1)}getBestMaskPattern(){let t=0,e=0;for(let i=0;i<8;i++){this.makeImpl(!0,i);const s=ht.getLostPoint(this);(i==0||t>s)&&(t=s,e=i)}return e}createMovieClip(t,e,i){const s=t.createEmptyMovieClip(e,i),r=1;this.make();for(let o=0;o<this.modules.length;o++){const a=o*r;for(let c=0;c<this.modules[o].length;c++){const h=c*r;this.modules[o][c]&&(s.beginFill(0,100),s.moveTo(h,a),s.lineTo(h+r,a),s.lineTo(h+r,a+r),s.lineTo(h,a+r),s.endFill())}}return s}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=ht.getPatternPosition(this.typeNumber);for(let e=0;e<t.length;e++)for(let i=0;i<t.length;i++){const s=t[e],r=t[i];if(this.modules[s][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[s+o][r+a]=!0:this.modules[s+o][r+a]=!1}}setupTypeNumber(t){const e=ht.getBCHTypeNumber(this.typeNumber);for(let i=0;i<18;i++){const s=!t&&(e>>i&1)==1;this.modules[Math.floor(i/3)][i%3+this.moduleCount-8-3]=s}for(let i=0;i<18;i++){const s=!t&&(e>>i&1)==1;this.modules[i%3+this.moduleCount-8-3][Math.floor(i/3)]=s}}setupTypeInfo(t,e){const i=this.errorCorrectLevel<<3|e,s=ht.getBCHTypeInfo(i);for(let r=0;r<15;r++){const o=!t&&(s>>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&&(s>>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 i=-1,s=this.moduleCount-1,r=7,o=0;for(let a=this.moduleCount-1;a>0;a-=2)for(a==6&&a--;;){for(let c=0;c<2;c++)if(this.modules[s][a-c]==null){let h=!1;o<t.length&&(h=(t[o]>>>r&1)==1),ht.getMask(e,s,a-c)&&(h=!h),this.modules[s][a-c]=h,r--,r==-1&&(o++,r=7)}if(s+=i,s<0||this.moduleCount<=s){s-=i,i=-i;break}}}static createData(t,e,i){const s=ze.getRSBlocks(t,e),r=new Xu;for(let a=0;a<i.length;a++){const c=i[a];r.put(c.mode,4),r.put(c.getLength(),ht.getLengthInBits(c.mode,t)),c.write(r)}let o=0;for(let a=0;a<s.length;a++)o+=s[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(nn.PAD0,8),r.getLengthInBits()>=o*8));)r.put(nn.PAD1,8);return nn.createBytes(r,s)}static createBytes(t,e){let i=0,s=0,r=0;const o=new Array(e.length),a=new Array(e.length);for(let u=0;u<e.length;u++){const d=e[u].dataCount,f=e[u].totalCount-d;s=Math.max(s,d),r=Math.max(r,f),o[u]=new Array(d);for(let y=0;y<o[u].length;y++)o[u][y]=255&t.buffer[y+i];i+=d;const p=ht.getErrorCorrectPolynomial(f),v=new Jn(o[u],p.getLength()-1).mod(p);a[u]=new Array(p.getLength()-1);for(let y=0;y<a[u].length;y++){const b=y+v.getLength()-a[u].length;a[u][y]=b>=0?v.get(b):0}}let c=0;for(let u=0;u<e.length;u++)c+=e[u].totalCount;const h=new Array(c);let l=0;for(let u=0;u<s;u++)for(let d=0;d<e.length;d++)u<o[d].length&&(h[l++]=o[d][u]);for(let u=0;u<r;u++)for(let d=0;d<e.length;d++)u<a[d].length&&(h[l++]=a[d][u]);return h}}const ju=Math.ceil,Ti=Math.floor,Wu=Math.round;function aw(n,t){const e=Nh(n),i=t?.ecc||"H",s=t?.size||256,r=-1,o=t?.padding||0,a=t?.color||"#000000",c=t?.background||"#ffffff",h=new nn(r,i);h.addData(e),h.make();const l=h.getModuleCount(),u=(s-o*2)/l,d=o,f=s-o;return Gu(s,a,c,function(p,m){if(d<=p&&p<f&&d<=m&&m<f){const v=Ti((p-d)/u),y=Ti((m-d)/u);return h.isDark(y,v)?0:1}else return 1})}function cw(n,t){const e=t.x||0,i=t.y||0,s=Nh(n),r=t.ctx,o=t.ecc||"H",a=typeof t.size=="number"?Ti(t.size):256,c=t.padding||0,h=-1,l=t.color||"#000000",u=t.background||"#ffffff",d=new nn(h,o);d.addData(s),d.make();const f=d.getModuleCount(),p=(a-c*2)/f;r.fillStyle=u,r.fillRect(e,i,a,a);for(let m=0;m<f;m++)for(let v=0;v<f;v++){const y=ju((v+1)*p)-Ti(v*p),b=ju((m+1)*p)-Ti(m*p);r.fillStyle=d.isDark(m,v)?l:u,r.fillRect(e+Wu(v*p)+c,i+Wu(m*p)+c,y,b)}}function q(n){return n*Math.PI/180}function Tt(n){return n*180/Math.PI}function Kn(n,t,e=0){return Math.sqrt(n*n+t*t+e*e)}function sn(n,t,e,i){return Kn(e-n,i-t)}function Qt(n,t,e,i){let s=Math.atan2(i-t,e-n);return s<0&&(s+=Math.PI*2),s}function rn(n,t){return{dx:Math.cos(n)*t,dy:Math.sin(n)*t}}function hw(n,t,e){if(typeof e=="number"){const i=Kn(n,t,e);return{x:n/=i,y:t/=i,z:e/=i}}else{const i=Kn(n,t);return{x:n/=i,y:t/=i}}}function lw(n,t,e,i,s=10){if(Math.abs(e-n)<s&&Math.abs(i-t)<s)return"no";const r=Tt(Qt(n,t,e,i));return r>=-135&&r<=-45?"up":r>45&&r<135?"down":r>=135&&r<=180||r>=-180&&r<-135?"left":"right"}class $s{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 $s(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,i=this.y;return this.x=t.m11*e+t.m21*i+t.m31,this.y=t.m12*e+t.m22*i+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=Y(this.x,t.x,e.x),this.y=Y(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=Y(this.x,t,e),this.y=Y(this.y,t,e),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Y(i,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 i=t.dot(this)/e;return this.copy(t).multiplyScalar(i)}perpendOnVector(t){return Hu.copy(this).projectOnVector(t),this.sub(Hu)}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 i=this.dot(t)/e;return Math.acos(Y(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,i=this.y-t.y;return e*e+i*i}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,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,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}rotateAround(t,e){const i=Math.cos(e),s=Math.sin(e),r=this.x-t.x,o=this.y-t.y;return this.x=r*i-o*s+t.x,this.y=r*s+o*i+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class _e{x=0;y=0;z=0;constructor(t=0,e=0,i=0){this.x=t,this.y=e,this.z=i}set(t=0,e=0,i=0){return this.x=t,this.y=e,this.z=i,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 _e(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}applyMatrix3(t){const e=this.x,i=this.y,s=this.z,r=t.value;return this.x=r[0]*e+r[3]*i+r[6]*s,this.y=r[1]*e+r[4]*i+r[7]*s,this.z=r[2]*e+r[5]*i+r[8]*s,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,i=this.y,s=this.z,r=t.value,o=1/(r[3]*e+r[7]*i+r[11]*s+r[15]);return this.x=(r[0]*e+r[4]*i+r[8]*s+r[12])*o,this.y=(r[1]*e+r[5]*i+r[9]*s+r[13])*o,this.z=(r[2]*e+r[6]*i+r[10]*s+r[14])*o,this}transformDirection(t){const e=this.x,i=this.y,s=this.z,r=t.value;return this.x=r[0]*e+r[4]*i+r[8]*s,this.y=r[1]*e+r[5]*i+r[9]*s,this.z=r[2]*e+r[6]*i+r[10]*s,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=Y(this.x,t.x,e.x),this.y=Y(this.y,t.y,e.y),this.z=Y(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=Y(this.x,t,e),this.y=Y(this.y,t,e),this.z=Y(this.z,t,e),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Y(i,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,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this.z=t.z+(e.z-t.z)*i,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const i=t.x,s=t.y,r=t.z,o=e.x,a=e.y,c=e.z;return this.x=s*c-r*a,this.y=r*o-i*c,this.z=i*a-s*o,this}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0);const i=t.dot(this)/e;return this.copy(t).multiplyScalar(i)}perpendOnVector(t){return wa.copy(this).projectOnVector(t),this.sub(wa)}projectOnPlane(t){return this.perpendOnVector(t)}reflect(t){return this.sub(wa.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 i=this.dot(t)/e;return Math.acos(Y(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,i=this.y-t.y,s=this.z-t.z;return e*e+i*i+s*s}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(),i=this.setFromMatrix4Column(t,1).length(),s=this.setFromMatrix4Column(t,2).length();return this.x=e,this.y=i,this.z=s,this}setFromMatrix4Column(t,e){return this.fromArray(t.value,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.value,e*3)}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}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,i=Math.sqrt(1-e*e);return this.x=i*Math.cos(t),this.y=e,this.z=i*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}class ba{x=0;y=0;z=0;w=1;constructor(t=0,e=0,i=0,s=1){this.x=t,this.y=e,this.z=i,this.w=s}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,i=0,s=1){return this.x=t,this.y=e,this.z=i,this.w=s,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 ba(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,i=this.y,s=this.z,r=this.w,o=t.value;return this.x=o[0]*e+o[4]*i+o[8]*s+o[12]*r,this.y=o[1]*e+o[5]*i+o[9]*s+o[13]*r,this.z=o[2]*e+o[6]*i+o[10]*s+o[14]*r,this.w=o[3]*e+o[7]*i+o[11]*s+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)}setAxisAngleFromRotationMatrix4(t){let e,i,s,r;const c=t.value,h=c[0],l=c[4],u=c[8],d=c[1],f=c[5],p=c[9],m=c[2],v=c[6],y=c[10];if(Math.abs(l-d)<.01&&Math.abs(u-m)<.01&&Math.abs(p-v)<.01){if(Math.abs(l+d)<.1&&Math.abs(u+m)<.1&&Math.abs(p+v)<.1&&Math.abs(h+f+y-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;const x=(h+1)/2,w=(f+1)/2,C=(y+1)/2,S=(l+d)/4,D=(u+m)/4,L=(p+v)/4;return x>w&&x>C?x<.01?(i=0,s=.707106781,r=.707106781):(i=Math.sqrt(x),s=S/i,r=D/i):w>C?w<.01?(i=.707106781,s=0,r=.707106781):(s=Math.sqrt(w),i=S/s,r=L/s):C<.01?(i=.707106781,s=.707106781,r=0):(r=Math.sqrt(C),i=D/r,s=L/r),this.set(i,s,r,e),this}let b=Math.sqrt((v-p)*(v-p)+(u-m)*(u-m)+(d-l)*(d-l));return Math.abs(b)<.001&&(b=1),this.x=(v-p)/b,this.y=(u-m)/b,this.z=(d-l)/b,this.w=Math.acos((h+f+y-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=Y(this.x,t.x,e.x),this.y=Y(this.y,t.y,e.y),this.z=Y(this.z,t.z,e.z),this.w=Y(this.w,t.w,e.w),this}clampScalar(t,e){return this.x=Y(this.x,t,e),this.y=Y(this.y,t,e),this.z=Y(this.z,t,e),this.w=Y(this.w,t,e),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Y(i,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 i=t.dot(this)/e;return this.copy(t).multiplyScalar(i)}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,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this.z=t.z+(e.z-t.z)*i,this.w=t.w+(e.w-t.w)*i,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}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 Hu=new $s,wa=new _e,qu=uw("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 uw(n,t=10){const e={},i=n.split(",");for(let s=0;s<i.length;s+=2){const r="&"+i[s+1]+";",o=parseInt(i[s],t);e[r]="&#"+o+";"}return e["\\xa0"]=" ",e}function Bt(n,t){const e=Object.keys(t);for(let i=0;i<e.length;i++)n=n.replace(new RegExp("{"+e[i]+"}","gi"),""+t[e[i]]);return n}function Gs(n){let t,e;if(!n)throw new Error("cannot create a random attribute name for an undefined object");const i="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=i[Math.floor(Math.random()*i.length)];while(n[t]);return t}function fw(n){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[n]||t.start}function dw(n){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[n]||t.alphabetic}const Pi={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 i=this.__ctx.__createElement("stop");if(i.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&&(i.setAttribute("stop-color",Bt("rgb({r},{g},{b})",{r:r[1],g:r[2],b:r[3]})),i.setAttribute("stop-opacity",r[4]))}else i.setAttribute("stop-color",e);this.__root.appendChild(i)}},va=class{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}},Ju=class Mh{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:i=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=i),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(Pi);for(let e=0,i=t.length;e<i;e++){const s=t[e];this[s]=Pi[s].canvas}}__getStyleState(){const t={},e=Object.keys(Pi);for(let i=0,s=e.length;i<s;i++){const r=e[i];t[r]=this[r]}return t}__applyStyleState(t){const e=Object.keys(t);for(let i=0,s=e.length;i<s;i++){const r=e[i];this[r]=t[r]}}__createElement(t,e={},i=!1){const s=this.__document.createElementNS("http://www.w3.org/2000/svg",t),r=Object.keys(e);i&&(s.setAttribute("fill","none"),s.setAttribute("stroke","none"));for(let o=0;o<r.length;o++){const a=r[o];s.setAttribute(a,e[a])}return s}__applyStyleToCurrentElement(t){let e=this.__currentElement;const i=this.__currentElementsToStyle;i&&(e.setAttribute(t,""),e=i.element,i.children.forEach(r=>{r.setAttribute(t,"")}));const s=Object.keys(Pi);for(let r=0;r<s.length;r++){const o=Pi[s[r]],a=this[s[r]];if(o.apply){if(a instanceof va){if(a.__ctx)for(;a.__ctx.__SVGdefs.childNodes.length;){const c=a.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[c]=c,this.__SVGdefs.appendChild(a.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(o.apply,Bt("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof Xs)e.setAttribute(o.apply,Bt("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 h=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(a);if(h){e.setAttribute(o.svgAttr,Bt("rgb({r},{g},{b})",{r:h[1],g:h[2],b:h[3]}));let l=parseFloat(h[4]);const u=this.globalAlpha;u!=null&&(l*=u),e.setAttribute(o.svgAttr+"-opacity",""+l)}}else{let c=o.svgAttr;if(s[r]==="globalAlpha"&&(c=t+"-"+o.svgAttr,e.getAttribute(c)))continue;c&&e.setAttribute(c,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 s=Object.keys(qu);for(let r=0,o=s.length;r<o;r++){const a=s[r],c=qu[a],h=new RegExp(a,"gi");h.test(e)&&(e=e.replace(h,c))}}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 s=this.__createElement("g");e.appendChild(s),this.__currentElement=s}let i=this.__currentElement.getAttribute("transform");i?i+=" ":i="",i+=t,this.__currentElement.setAttribute("transform",i)}scale(t,e){e===void 0&&(e=t),this.__addTransform(Bt("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(Bt("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(Bt("translate({x},{y})",{x:t,y:e}))}transform(t,e,i,s,r,o){this.__addTransform(Bt("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:i,d:s,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(Bt("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(Bt("L {x} {y}",this.__currentPosition)):this.__addPathCommand(Bt("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,i,s,r,o){this.__currentPosition={x:r,y:o},this.__addPathCommand(Bt("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:i,cp2y:s,x:r,y:o}))}quadraticCurveTo(t,e,i,s){this.__currentPosition={x:i,y:s},this.__addPathCommand(Bt("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:i,y:s}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,i,s,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===i&&e===s||r===0){this.lineTo(t,e);return}const c=this.normalize([o-t,a-e]),h=this.normalize([i-t,s-e]);if(c[0]*h[1]===c[1]*h[0]){this.lineTo(t,e);return}const l=c[0]*h[0]+c[1]*h[1],u=Math.acos(Math.abs(l)),d=this.normalize([c[0]+h[0],c[1]+h[1]]),f=r/Math.sin(u/2),p=t+f*d[0],m=e+f*d[1],v=[-c[1],c[0]],y=[h[1],-h[0]],b=function(C){const S=C[0];return C[1]>=0?Math.acos(S):-Math.acos(S)},x=b(v),w=b(y);this.lineTo(p+v[0]*r,m+v[1]*r),this.arc(p,m,r,x,w)}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,i,s){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+s),this.lineTo(t,e+s),this.lineTo(t,e),this.closePath()}fillRect(t,e,i,s){const r=this.__createElement("rect",{x:t,y:e,width:i,height:s},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,i,s){const r=this.__createElement("rect",{x:t,y:e,width:i,height:s},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),i=this.__rootSVG.childNodes[1],s=i.childNodes;for(let r=s.length-1;r>=0;r--)s[r]&&i.removeChild(s[r]);this.__currentElement=i,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,i,s){if(t===0&&e===0&&i===this.width&&s===this.height){this.__clearCanvas();return}const r=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:t,y:e,width:i,height:s,fill:"#FFFFFF"},!0);r.appendChild(o)}createLinearGradient(t,e,i,s){const r=this.__createElement("linearGradient",{id:Gs(this.__ids),x1:t+"px",x2:i+"px",y1:e+"px",y2:s+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(r),new Xs(r,this)}createRadialGradient(t,e,i,s,r,o){const a=this.__createElement("radialGradient",{id:Gs(this.__ids),cx:s+"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),i={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"&&(i.decoration="underline"),this.__fontHref&&(i.href=this.__fontHref),i}__wrapTextLink(t,e){if(t.href){const i=this.__createElement("a");return i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),i.appendChild(e),i}return e}__applyText(t,e,i,s){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:i,"text-anchor":fw(this.textAlign),"dominant-baseline":dw(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(t)),this.__currentElement=a,this.__applyStyleToCurrentElement(s),o.appendChild(this.__wrapTextLink(r,a))}fillText(t,e,i){this.__applyText(t,e,i,"fill")}strokeText(t,e,i){this.__applyText(t,e,i,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,i,s,r,o){if(s===r)return;s=s%(2*Math.PI),r=r%(2*Math.PI),s===r&&(r=(r+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));const a=t+i*Math.cos(r),c=e+i*Math.sin(r),h=t+i*Math.cos(s),l=e+i*Math.sin(s),u=o?0:1;let d=0,f=r-s;f<0&&(f+=2*Math.PI),o?d=f>Math.PI?0:1:d=f>Math.PI?1:0,this.lineTo(h,l),this.__addPathCommand(Bt("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:i,ry:i,xAxisRotation:0,largeArcFlag:d,sweepFlag:u,endX:a,endY:c})),this.__currentPosition={x:a,y:c}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),i=Gs(this.__ids),s=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",i),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",Bt("url(#{id})",{id:i})),t.appendChild(s),this.__currentElement=s}drawImage(...t){let e=t[0],i,s,r,o,a=0,c=0,h,l,u,d,f,p,m,v;if(t.length===3)i=t[1],s=t[2],h=e.width,l=e.height,r=h,o=l;else if(t.length===5)i=t[1],s=t[2],r=t[3],o=t[4],h=e.width,l=e.height;else if(t.length===9)a=t[1],c=t[2],h=t[3],l=t[4],i=t[5],s=t[6],r=t[7],o=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const y=this.__closestGroupOrSvg();this.__currentElement;const b="translate("+i+", "+s+")";if(e instanceof Mh){if(u=e.getSvg().cloneNode(!0),u.childNodes&&u.childNodes.length>1){for(d=u.childNodes[0];d.childNodes.length;)v=d.childNodes[0].getAttribute("id"),this.__ids[v]=v,this.__SVGdefs.appendChild(d.childNodes[0]);if(f=u.childNodes[1],f){const x=f.getAttribute("transform");let w;x?w=x+" "+b:w=b,f.setAttribute("transform",w),y.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||c||h!==e.width||l!==e.height)&&(m=this.__document.createElement("canvas"),m.width=r,m.height=o,m.getContext("2d")?.drawImage(e,a,c,h,l,0,0,r,o),e=m),p.setAttribute("transform",b),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),y.appendChild(p))}createPattern(t,e){const i=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),s=Gs(this.__ids);let r;return i.setAttribute("id",s),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")),i.appendChild(r),this.__SVGdefs.appendChild(i)):t instanceof Mh&&(i.setAttribute("width",""+t.width),i.setAttribute("height",""+t.height),i.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(i)),new va(i,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}},xa=class{canvas;context;customContext;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,i,s=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),s&&(this.customContext=new Ju({canvas:this.canvas,width:e||this.canvas.width,height:i||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,i,s){return this.context.fillRect(t,e,i,s),this.customContext&&this.customContext.fillRect(t,e,i,s),this}fillText(t,e,i,s){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,i,s),this.customContext&&this.customContext.fillText(t,e,i),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,i,s){return this.context.strokeText(t,e,i,s),this.customContext&&this.customContext.strokeText(t,e,i),this}strokeRect(t,e,i,s){return this.context.strokeRect(t,e,i,s),this.customContext&&this.customContext.strokeRect(t,e,i,s),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,i=this.canvas.width,s=this.canvas.height){return this.context.clearRect(t,e,i,s),this.customContext&&this.customContext.clearRect(t,e,i,s),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 i=new Path2D;i.addPath(t,e),this.currentPath2D=i}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,i=0){return this.translate(e,i),this.context.rotate(t),this.customContext&&this.customContext.rotate(t),this.currentMatrix.rotate(t),this.translate(-e,-i),this.changePath2D(),this}scale(t,e=t,i=0,s=0){return this.translate(i,s),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix.scale(t,e),this.translate(-i,-s),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,i,s,r,o){return this.context.arc(t,e,i,s,r,o),this.customContext&&this.customContext.arc(t,e,i,s,r,o?-1:1),this.currentPath2D.arc(t,e,i,s,r,o),this}arcTo(t,e,i,s,r){return this.context.arcTo(t,e,i,s,r),this.customContext&&this.customContext.arcTo(t,e,i,s,r),this.currentPath2D.arcTo(t,e,i,s,r),this}ellipse(t,e,i,s,r,o,a,c){return this.context.ellipse(t,e,i,s,r,o,a,c),this.currentPath2D.ellipse(t,e,i,s,r,o,a,c),this}quadraticCurveTo(t,e,i,s){return this.context.quadraticCurveTo(t,e,i,s),this.customContext&&this.customContext.quadraticCurveTo(t,e,i,s),this.currentPath2D.quadraticCurveTo(t,e,i,s),this}bezierCurveTo(t,e,i,s,r,o){return this.context.bezierCurveTo(t,e,i,s,r,o),this.customContext&&this.customContext.bezierCurveTo(t,e,i,s,r,o),this.currentPath2D.bezierCurveTo(t,e,i,s,r,o),this}rect(t,e,i,s){return this.context.rect(t,e,i,s),this.customContext&&this.customContext.rect(t,e,i,s),this.currentPath2D.rect(t,e,i,s),this}createLinearGradient(t,e,i,s,r){const o=this.context.createLinearGradient(t,e,i,s);return r&&Object.entries(r).forEach(([a,c])=>{o.addColorStop(parseFloat(a),c)}),o}createRadialGradient(t,e,i,s,r,o,a){const c=this.context.createRadialGradient(t,e,i,s,r,o);return a&&Object.entries(a).forEach(([h,l])=>{c.addColorStop(parseFloat(h),l)}),c}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const i=e[0],s=e[1];this.context.drawImage(t,i,s)}else if(e.length===4){const i=e[0],s=e[1],r=e[2],o=e[3];this.context.drawImage(t,i,s,r,o)}else if(e.length===8){const i=e[0],s=e[1],r=e[2],o=e[3],a=e[4],c=e[5],h=e[6],l=e[7];this.context.drawImage(t,i,s,r,o,a,c,h,l)}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,i=this.canvas.width,s=this.canvas.height,r){return this.context.getImageData(t,e,i,s,r)}putImageData(t,e=0,i=0){return this.context.putImageData(t,e,i)}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}}},_a=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=Qt(this.x,this.y,this.toX,this.toY);if(t===0){const e=Math.min(this.x,this.toX),i=Math.min(this.y,this.toY),s=Math.max(this.x,this.toX),r=Math.max(this.y,this.toY);return{x:e,y:i,width:s-e,height:r-i}}else{const e=Math.sin(t),i=Math.cos(t),s=i*this.x-e*this.y,r=i*this.toX-e*this.toY,o=i*this.y+e*this.x,a=i*this.toY+e*this.toX;return{x:Math.min(s,r),y:Math.min(o,a),width:Math.max(s,r)-Math.min(s,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,i=this.y,s=t.toX,r=t.toY,o=this.toX-e,a=t.x-s;if(!o&&!a)return null;const c=(this.toY-i)/o,h=(t.y-r)/a;if(o){if(!a)return{x:s,y:c*(s-e)+i}}else return{x:e,y:h*(e-s)+r};const l=(-h*s+r+c*e-i)/(c-h),u=c*(l-e)+i;return isNaN(l)||isNaN(u)?null:{x:l,y:u}}};const mw=class extends _a{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,i,s,r,o,a,c]=this.convert(this.x,this.y,this.toX,this.toY,this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag);t.ellipse(e,i,s,r,o,a,c,!this.sweepFlag)}convert(t,e,i,s,r,o,a,c,h){const l=a/180*Math.PI,u=(t-i)/2,d=(e-s)/2,f=Math.cos(l)*u+Math.sin(l)*d,p=-Math.sin(l)*u+Math.cos(l)*d,m=f*f/(r*r)+p*p/(o*o);if(m>1){const U=Math.sqrt(m);throw r=U*r,o=U*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)),y=c!=h?1:-1,b=y*v*r*p/o,x=y*v*-o*f/r,w=(t+i)/2,C=(e+s)/2,S=Math.cos(l)*b-Math.sin(l)*x+w,D=Math.sin(l)*b+Math.cos(l)*x+C,L=(U,X,Z,at)=>(U*at>=X*Z?1:-1)*Math.acos((U*Z+X*at)/(Math.sqrt(U*U+X*X)*Math.sqrt(Z*Z+at*at))),I=L(1,0,t-S,e-D)-l,F=L(t-S,e-D,i-S,s-D);return[S,D,r,o,l,I,I+F]}},pw=class extends _a{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,i=this.cy*2-(this.y+this.toY)/2;t.quadraticCurveTo(e,i,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 i,s,r,o;for(let h=0;h<2;++h)i=h==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,s=h==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,r=h==0?this.x:this.y,Math.abs(i)>1e-12&&(o=-s/(2*i),0<o&&o<1&&[t,e][h].push(i*o*o+s*o+r));const a={x:Math.min.apply(0,t),y:Math.min.apply(0,e)},c={x:Math.max.apply(0,t),y:Math.max.apply(0,e)};return{x:a.x,y:a.y,width:c.x-a.x,height:c.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}}},on=class os extends _a{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),i=this.x-this.c1x,s=(-e+Math.sqrt(e*e-4*t*i))/2/t,r=(-e-Math.sqrt(e*e-4*t*i))/2/t;const o=[this.y,this.toY],a=[this.x,this.toX];let c;const h=[];Math.abs(s)>1e12&&(s=.5),Math.abs(r)>1e12&&(r=.5),s>=0&&s<=1&&(c=this.interpolate(s),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),r>=0&&r<=1&&(c=this.interpolate(r),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.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),i=this.y-this.c1y,s=(-e+Math.sqrt(e*e-4*t*i))/2/t,r=(-e-Math.sqrt(e*e-4*t*i))/2/t,Math.abs(s)>1e12&&(s=.5),Math.abs(r)>1e12&&(r=.5),s>=0&&s<=1&&(c=this.interpolate(s),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),r>=0&&r<=1&&(c=this.interpolate(r),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y}));const l=[],u=h.length;for(let p=0;p<u;p++){for(let m=p+1;m<u;m++)h[p].X===h[m].X&&h[p].Y===h[m].Y&&(m=++p);l.push({X:h[p].X,Y:h[p].Y})}const d={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:d.x,y:d.y,width:f.x-d.x,height:f.y-d.y,dots:l}}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,i,s,r){const o=-3*e+9*i-9*s+3*r,a=t*o+6*e-12*i+6*s;return t*a-3*e+3*i}static bezlen(t,e,i,s,r,o,a,c,h=1){h=Math.max(0,Math.min(h,1));const l=h/2,u=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let f=0;for(let p=0;p<12;p++){const m=l*u[p]+l,v=this.base3(m,t,i,r,a),y=this.base3(m,e,s,o,c);f+=d[p]*Math.sqrt(v*v+y*y)}return l*f}length(t=1){return os.bezlen(this.x,this.y,this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY,t)}getTatLen(t){const e=this.x,i=this.y,s=this.c1x,r=this.c1y,o=this.c2x,a=this.c2y,c=this.toX,h=this.toY;if(t<0||os.bezlen(e,i,s,r,o,a,c,h)<t)return 0;const l=1;let u=l/2,d=l-u,f=os.bezlen(e,i,s,r,o,a,c,h,d);for(;Math.abs(f-t)>.01;)u/=2,d+=(f<t?1:-1)*u,f=os.bezlen(e,i,s,r,o,a,c,h,d);return d}getPointAtSegmentLength(t){const e=this.getTatLen(t),i=1-e,s=Math.pow(i,3),r=Math.pow(i,2),o=e*e,a=o*e,c=s*this.x+r*3*e*this.c1x+i*3*e*e*this.c2x+a*this.toX,h=s*this.y+r*3*e*this.c1y+i*3*e*e*this.c2y+a*this.toY,l=this.x+2*e*(this.c1x-this.x)+o*(this.c2x-2*this.c1x+this.x),u=this.y+2*e*(this.c1y-this.y)+o*(this.c2y-2*this.c1y+this.y),d=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=i*this.x+e*this.c1x,m=i*this.y+e*this.c1y,v=i*this.c2x+e*this.toX,y=i*this.c2y+e*this.toY,b=90-Math.atan2(l-d,u-f)*180/Math.PI;return{x:c,y:h,m:{x:l,y:u},n:{x:d,y:f},start:{x:p,y:m},end:{x:v,y},alpha:b}}},Ai=Math.PI*2;function Ku(n,t,e,i){const s=n*i-t*e<0?-1:1;let r=n*e+t*i;return r>1&&(r=1),r<-1&&(r=-1),s*Math.acos(r)}function gw(n,t,e,i,s,r,o,a,c,h){const l=h*(n-e)/2+c*(t-i)/2,u=-c*(n-e)/2+h*(t-i)/2,d=o*o,f=a*a,p=l*l,m=u*u;let v=d*f-d*m-f*p;v<0&&(v=0),v/=d*m+f*p,v=Math.sqrt(v)*(s===r?-1:1);const y=v*o/a*u,b=v*-a/o*l,x=h*y-c*b+(n+e)/2,w=c*y+h*b+(t+i)/2,C=(l-y)/o,S=(u-b)/a,D=(-l-y)/o,L=(-u-b)/a,I=Ku(1,0,C,S);let F=Ku(C,S,D,L);return r===0&&F>0&&(F-=Ai),r===1&&F<0&&(F+=Ai),[x,w,I,F]}function yw(n,t){const e=1.3333333333333333*Math.tan(t/4),i=Math.cos(n),s=Math.sin(n),r=Math.cos(n+t),o=Math.sin(n+t);return[i,s,i-s*e,s+i*e,r+o*e,o-r*e,r,o]}function js(n,t,e,i,s,r,o,a,c){const h=Math.sin(c*Ai/360),l=Math.cos(c*Ai/360),u=l*(n-e)/2+h*(t-i)/2,d=-h*(n-e)/2+l*(t-i)/2;if(u===0&&d===0)return[];if(o===0||a===0)return[];o=Math.abs(o),a=Math.abs(a);const f=u*u/(o*o)+d*d/(a*a);f>1&&(o*=Math.sqrt(f),a*=Math.sqrt(f));const p=gw(n,t,e,i,s,r,o,a,h,l),m=[];let v=p[2],y=p[3];const b=Math.max(Math.ceil(Math.abs(y)/(Ai/4)),1);y/=b;for(let x=0;x<b;x++)m.push(yw(v,y)),v+=y;return m.map(x=>{for(let w=0;w<x.length;w+=2){let C=x[w+0],S=x[w+1];C*=o,S*=a;const D=l*C-h*S,L=h*C+l*S;x[w+0]=D+p[0],x[w+1]=L+p[1]}return x})}function Zu(n,t,e,i,s,r,o,a,c,h){const l=Math.PI*120/180,u=Math.PI/180*(+s||0);let d=[],f;const p=function(nt,rt,Q){const St=nt*Math.cos(Q)-rt*Math.sin(Q),z=nt*Math.sin(Q)+rt*Math.cos(Q);return{x:St,y:z}};let m,v,y,b;if(h)m=h[0],v=h[1],y=h[2],b=h[3];else{f=p(n,t,-u),n=f.x,t=f.y,f=p(a,c,-u),a=f.x,c=f.y;const nt=(n-a)/2,rt=(t-c)/2;let Q=nt*nt/(e*e)+rt*rt/(i*i);Q>1&&(Q=Math.sqrt(Q),e=Q*e,i=Q*i);const St=e*e,z=i*i,R=(r==o?-1:1)*Math.sqrt(Math.abs((St*z-St*rt*rt-z*nt*nt)/(St*rt*rt+z*nt*nt)));y=R*e*rt/i+(n+a)/2,b=R*-i*nt/e+(t+c)/2,m=Math.asin(Number(((t-b)/i).toFixed(9))),v=Math.asin(Number(((c-b)/i).toFixed(9))),m=n<y?Math.PI-m:m,v=a<y?Math.PI-v:v,m<0&&(m=Math.PI*2+m),v<0&&(v=Math.PI*2+v),o&&m>v&&(m=m-Math.PI*2),!o&&v>m&&(v=v-Math.PI*2)}let x=v-m;if(Math.abs(x)>l){const nt=v,rt=a,Q=c;v=m+l*(o&&v>m?1:-1),a=y+e*Math.cos(v),c=b+i*Math.sin(v),d=Zu(a,c,e,i,s,0,o,rt,Q,[v,nt,y,b])}x=v-m;const w=Math.cos(m),C=Math.sin(m),S=Math.cos(v),D=Math.sin(v),L=Math.tan(x/4),I=4/3*e*L,F=4/3*i*L,U=[n,t],X=[n+I*C,t-F*w],Z=[a+I*D,c-F*S],at=[a,c];return X[0]=2*U[0]-X[0],X[1]=2*U[1]-X[1],h?[[...X,...Z,...at]].concat(d):[[...X,...Z,...at]].concat(d).map(nt=>{const rt=[];for(let Q=0,St=nt.length;Q<St;Q++)rt[Q]=Q%2?p(nt[Q-1],nt[Q],u).y:p(nt[Q],nt[Q+1],u).x;return rt})}function Mi(n,t,e,i,s,r){return[n/3+2/3*e,t/3+2/3*i,s/3+2/3*e,r/3+2/3*i,s,r]}function An(n,t,e,i){return[n,t,e,i,e,i]}const Di={a:7,c:6,s:4,q:4,t:2,m:2,l:2,h:1,v:1,z:0};function an(n="path"){return document.createElementNS.call(document,"http://www.w3.org/2000/svg",n)}function Sa(){return an("path")}const Qu=n=>n instanceof SVGElement&&n.tagName==="path";function tf(n,t="shape"){return Zc(Ql(n),`${t}.svg`)}function bw(n,t="shape"){return Zc(so(n),`${t}.svg`)}function ww(n){return jo(n)}function Ca(n){return typeof n!="string"?!1:(n=n.trim(),/^[mlhvzaqtcs]\s*[-+.0-9][^mlhvzaqtcs]+/i.test(n)&&/[\dz]$/i.test(n))}function Ea(n){return n.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 Ws(n){const t=[];return Ca(n)&&n.replace(/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi,(e,i,s)=>{let r=i.toLowerCase();const o=Gh(s);for(r=="m"&&o.length>Di[r]&&(t.push([i,...o.splice(0,Di[r])]),r="l",i=i=="m"?"l":"L");o.length;){if(o.length<Di[r])throw new Error(`parseSVGPath substring:{ ${e} } command:{ ${i} } args:{ ${o} }`);t.push([i,...o.splice(0,Di[r])])}return r=="z"&&t.push([i]),""}),t}function Hs(n){let t=0,e=0,i=0,s=0;return n.map(function(r){const o=r[0],a=o.toUpperCase();if(o!=a)switch(r[0]=a,o){case"a":r[6]+=i,r[7]+=s;break;case"v":r[1]+=s;break;case"h":r[1]+=i;break;default:for(let c=1;c<r.length;)r[c++]+=i,r[c++]+=s}switch(a){case"Z":i=t,s=e;break;case"H":i=r[1];break;case"V":s=r[1];break;case"M":i=t=r[1],s=e=r[2];break;default:i=r[r.length-2],s=r[r.length-1]}return r})}function vw(n){let t=0,e=0,i=0,s=0;return n.map(function(r){const o=r[0],a=o.toLowerCase();if(o!=a)switch(r[0]=a,o){case"A":r[6]-=i,r[7]-=s;break;case"V":r[1]-=s;break;case"H":r[1]-=i;break;default:for(let c=1;c<r.length;)r[c++]-=i,r[c++]-=s}switch(a){case"z":i=t,s=e;break;case"h":i+=r[1];break;case"v":s+=r[1];break;case"m":i+=r[1],s+=r[2],t+=r[1],e+=r[2];break;default:i+=r[r.length-2],s+=r[r.length-1]}return r})}function Ta(n){const t=[];let e=0,i=0,s=0,r=0,o=0,a=0,c=0,h=0,l;for(let u=0,d=n.length;u<d;u++){let f=n[u];const p=f[0];switch(p){case"M":e=f[1],i=f[2];break;case"A":const m=js(s,r,f[6],f[7],f[4],f[5],f[1],f[2],f[3]);if(!m.length)continue;m.forEach((b,x)=>{const[w,C,S,D,L,I,F,U]=b;f=["C",S,D,L,I,F,U],x<m.length-1&&t.push(f)});break;case"S":let v=s,y=r;(l=="C"||l=="S")&&(v+=v-c,y+=y-h),f=["C",v,y,f[1],f[2],f[3],f[4]];break;case"T":l=="Q"||l=="T"?(o=s*2-o,a=r*2-a):(o=s,a=r),f=["C",...Mi(s,r,o,a,f[1],f[2])];break;case"Q":o=f[1],a=f[2],f=["C",...Mi(s,r,f[1],f[2],f[3],f[4])];break;case"L":f=["C",...An(s,r,f[1],f[2])];break;case"H":f=["C",...An(s,r,f[1],r)];break;case"V":f=["C",...An(s,r,s,f[1])];break;case"Z":f=["C",...An(s,r,e,i)];break}l=p,s=f[f.length-2],r=f[f.length-1],f.length>4?(c=f[f.length-4],h=f[f.length-3]):(c=s,h=r),t.push(f)}return t}function xw(n){const t=[];for(let e=0,i=n.length;i-2>e;e+=2){let s;e==0?s=[{x:n[e],y:n[e+1]},{x:n[e],y:n[e+1]},{x:n[e+2],y:n[e+3]},{x:n[e+4],y:n[e+5]}]:i-4==e?s=[{x:n[e-2],y:n[e-1]},{x:n[e],y:n[e+1]},{x:n[e+2],y:n[e+3]},{x:n[e+2],y:n[e+3]}]:s=[{x:n[e-2],y:n[e-1]},{x:n[e],y:n[e+1]},{x:n[e+2],y:n[e+3]},{x:n[e+4],y:n[e+5]}];const r=[{x:s[1].x,y:s[1].y},{x:(-s[0].x+6*s[1].x+s[2].x)/6,y:(-s[0].y+6*s[1].y+s[2].y)/6},{x:(s[1].x+6*s[2].x-s[3].x)/6,y:(s[1].y+6*s[2].y-s[3].y)/6},{x:s[2].x,y:s[2].y}];t.push(["C",r[1].x,r[1].y,r[2].x,r[2].y,r[3].x,r[3].y])}return t}function _w(n){const t=[];let e=["L",0,0],i;for(let s=0,r=n.length;s<r;s++){const o=n[s];switch(o[0]){case"M":e=["L",o[1],o[2]],t.push(o);break;case"Z":t.push(e);break;case"H":i=t[t.length-1]||["L",0,0],t.push(["L",o[1],i[i.length-1]]);break;case"V":i=t[t.length-1]||["L",0,0],t.push(["L",i[i.length-2],o[1]]);break;default:t.push(o)}}return t}function Sw(n){const t={S:{to:"C",x:3},T:{to:"Q",x:1}};let e,i=0,s=0;for(let r=0,o=n.length;r<o;r++){const a=n[r],c=t[a[0]];c&&(a[0]=c.to,e&&(e[0]===c.to?(i=2*Number(e[c.x+2])-Number(e[c.x]),s=2*Number(e[c.x+3])-Number(e[c.x+1])):(i=Number(e[e.length-2]),s=Number(e[e.length-1]))),a.splice(1,0,i,s)),e=a}return n}let Cw=class qe{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(Ws(t),e):t instanceof qe?this.resetFromSVGPathData(t.toSVGPathData(),e):this.resetFromSVGPathData(t||[],e)}resetFromSVGPathData(t,e){this.normalizedLines=[];const i=Ta(Hs(t));this.prevPathX=this.startPathX=0,this.prevPathY=this.startPathY=0;let s=!1;for(let r=0,o=i.length;r<o;r++){const a=i[r];if(a[0]=="M"){s||(s=!0,this.startPathX=a[1],this.startPathY=a[2]),this.prevPathX=a[1],this.prevPathY=a[2];continue}this.appendLine(new on({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 qe;e.prevPathX=e.startPathX=t[0]||0,e.prevPathY=e.startPathY=t[1]||0;for(let i=2,s=t.length;i+5<s;i+=6)e.appendLine(new on({c1x:t[i],c1y:t[i+1],c2x:t[i+2],c2y:t[i+3],toX:t[i+4],toY:t[i+5]}));return e}static fromLines(t){const e=new qe;e.prevPathX=e.startPathX=t[0].x||0,e.prevPathY=e.startPathY=t[0].y||0;for(let i=0,s=t.length;i<s;i++)e.appendLine(t[i]);return e}appendLine(t){if(t instanceof mw){js(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(h=>{const[l,u,d,f,p,m,v,y]=h;this.normalizedLines.push(new on({x:this.prevPathX,y:this.prevPathY,c1x:d,c1y:f,c2x:p,c2y:m,toX:v,toY:y})),this.prevPathX=v,this.prevPathY=y});return}let e,i,s,r,o,a;t instanceof on?(e=t.c1x,i=t.c1y,s=t.c2x,r=t.c2y,o=t.toX,a=t.toY):t instanceof pw?[e,i,s,r,o,a]=Mi(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,i,s,r,o,a]=An(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new on({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:i,c2x:s,c2y:r,toX:o,toY:a})),this.prevPathX=o,this.prevPathY=a}toSVGPathData(){const{startPathX:t,startPathY:e,normalizedLines:i}=this.updateTransform(),s=[];s.push(["M",t,e]);for(let r=0,o=i.length;r<o;r++)s.push(...i[r].toSVGPathData());return s}toSVGPathD(){return Ea(this.toSVGPathData())}toCanvasContext(t){const{startPathX:e,startPathY:i,normalizedLines:s}=this.updateTransform();t.beginPath(),t.moveTo(e,i),s.forEach(r=>{r.toCanvasContext(t)})}getBoundingClientRect(){const{normalizedLines:t}=this.updateTransform(),e=[],i=[];if(t.forEach(c=>{const h=c.getBoundingClientRect();e.push(h.x,h.x+h.width),i.push(h.y,h.y+h.height)}),e.length==0||i.length==0)return{x:0,y:0,width:0,height:0};const s=Math.min.apply(0,e),r=Math.min.apply(0,i),o=Math.max.apply(0,e),a=Math.max.apply(0,i);return{x:s,y:r,width:o-s,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 It;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,i=this.startPathY;({x:e,y:i}=t.transformPoint({x:e,y:i}));const s=[];return this.normalizedLines.forEach(r=>{let o=r.x,a=r.y,c=r.c1x,h=r.c1y,l=r.c2x,u=r.c2y,d=r.toX,f=r.toY;({x:o,y:a}=t.transformPoint({x:o,y:a})),{x:c,y:h}=t.transformPoint({x:c,y:h}),{x:l,y:u}=t.transformPoint({x:l,y:u}),{x:d,y:f}=t.transformPoint({x:d,y:f}),s.push(new on({x:o,y:a,c1x:c,c1y:h,c2x:l,c2y:u,toX:d,toY:f}))}),{startPathX:e,startPathY:i,normalizedLines:s}}}getTotalLength(){const{normalizedLines:t}=this.updateTransform();return t.reduce((e,i)=>e+=i.length(),0)}getPointAtLength(t){const{normalizedLines:e}=this.updateTransform();let i=0;const s=e.length;for(let r=0;r<s;r++){const o=e[r],a=o.length();if(i+a>=t)return o.getPointAtSegmentLength(t-i);i+=a}return e[s-1].getPointAtSegmentLength(1)}interpolate(t){const{startPathX:e,startPathY:i,normalizedLines:s}=this.updateTransform(),r=s.length;if(r===0)return{x:e,y:i};if(r===1)return s[0].interpolate(t);{let o=t*r,a=s[0];if(o--,o>1)for(let c=1;c<r&&(a=s[c],o>1);c++)o-=1;return a.interpolate(o)}}getSubpath(t,e){if(this.getTotalLength()-e<1e-6)return this.getSubpathsAtLength(this,t);{const i=this.getSubpathsAtLength(this,e,1);return t?this.getSubpathsAtLength(i,t):i}}getSubpathsAtLength(t,e,i){const{startPathX:s,startPathY:r,normalizedLines:o}=t.updateTransform();let a=null,c=0;const h=new qe;h.prevPathX=h.startPathX=s,h.prevPathY=h.startPathY=r;for(let l=0,u=o.length;l<u;l++){const d=o[l],f=d.length();if(c+f>e&&!a){const p=d.getPointAtSegmentLength(e-c);if(h.appendLine(new on({c1x:p.start.x,c1y:p.start.y,c2x:p.m.x,c2y:p.m.y,toX:p.x,toY:p.y})),i)return h;a=h,h.appendLine(new on({c1x:p.n.x,c1y:p.n.y,c2x:p.end.x,c2y:p.end.y,toX:d.x,toY:d.y})),c+=f;continue}c+=f,h.appendLine(d)}return h}closestPoint(t,e){const i=this.getTotalLength();let s={x:t,y:e},r=0,o=1/0,a=8;for(let h=0;h<=i;h+=a){const l=this.getPointAtLength(h),u=Math.pow(sn(l.x,l.y,t,e),2);u<o&&(s=l,r=h,o=u)}for(a/=2;a>.5;){const h=r-a,l=this.getPointAtLength(h),u=Math.pow(sn(l.x,l.y,t,e),2),d=r+a,f=this.getPointAtLength(d),p=Math.pow(sn(f.x,f.y,t,e),2);h>=0&&u<o?(s=l,r=h,o=u):d<=i&&p<o?(s=f,r=d,o=p):a/=2}const c=this.getPointAtLength(r+(r===i?-.1:.1));return{point:s,rotation:r>=i?Qt(c.x,c.y,s.x,s.y):Qt(s.x,s.y,c.x,c.y),distance:Math.sqrt(o)}}get polymorphPoints(){const{startPathX:t,startPathY:e,normalizedLines:i}=this.updateTransform();return[t,e].concat(i.reduce((s,r)=>s.concat([r.c1x,r.c1y,r.c2x,r.c2y,r.toX,r.toY]),[]))}perimeterPoints(){const t=this.polymorphPoints,e=t.length;let i=t[e-2],s=t[e-1],r=0;for(let o=0;o<e;o+=6)r+=sn(t[o],t[o+1],i,s),i=t[o],s=t[o+1];return Math.floor(r)}expendFill(t){const e=this.polymorphPoints,i=e.length;let s=t-i;const r=Math.ceil(t/i),o=[];o.push(["M",e[0],e[1]]);let a=2;for(;a+5<=i-1;){const c=e[a++],h=e[a++],l=e[a++],u=e[a++],d=e[a++],f=e[a++];o.push(["C",c,h,l,u,d,f]);let p=0;for(;p<r&&s>0;)o.push(["C",d,f,d,f,d,f]),s-=6,p++}return o}static mixPoints(t,e,i){const s=t.length,r=new Array(s);for(let o=0;o<s;o++)r[o]=G(t[o]+(e[o]-t[o])*i,6);return r}static getPathInterpolator(t,e){return i=>Math.abs(i-0)<Number.EPSILON?t:Math.abs(i-1)<Number.EPSILON?e:qe.fromPolymorphPoints(qe.mixPoints(new qe({d:t}).polymorphPoints,new qe({d:e}).polymorphPoints,i)).toSVGPathData()}};class Ii{static _nextId=0;static nextId(){return Ii._nextId++}}const N={Linear:{None:function(n){return n}},Ease:{In:function(n){return Math.pow(n,1.7)}},Quadratic:{In:function(n){return n*n},Out:function(n){return n*(2-n)},InOut:function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)},style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)"},Cubic:{In:function(n){return n*n*n},Out:function(n){return--n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)}},Quartic:{In:function(n){return n*n*n*n},Out:function(n){return 1- --n*n*n*n},InOut:function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)}},Quintic:{In:function(n){return n*n*n*n*n},Out:function(n){return--n*n*n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)}},Sinusoidal:{In:function(n){return 1-Math.sin((1-n)*Math.PI/2)},Out:function(n){return Math.sin(n*Math.PI/2)},InOut:function(n){return .5*(1-Math.sin(Math.PI*(.5-n)))}},Exponential:{In:function(n){return n===0?0:Math.pow(1024,n-1)},Out:function(n){return n===1?1:1-Math.pow(2,-10*n)},InOut:function(n){return n===0?0:n===1?1:(n*=2)<1?.5*Math.pow(1024,n-1):.5*(-Math.pow(2,-10*(n-1))+2)}},Circular:{In:function(n){return 1-Math.sqrt(1-n*n)},Out:function(n){return Math.sqrt(1- --n*n)},InOut:function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)},style:"cubic-bezier(0.1, 0.57, 0.1, 1)"},Elastic:{In:function(n){return n===0?0:n===1?1:-Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI)},Out:function(n){return n===0?0:n===1?1:Math.pow(2,-10*n)*Math.sin((n-.1)*5*Math.PI)+1},InOut:function(n){return n===0?0:n===1?1:(n*=2,n<1?-.5*Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI):.5*Math.pow(2,-10*(n-1))*Math.sin((n-1.1)*5*Math.PI)+1)}},Back:{In:function(n){return n===1?1:n*n*((1.70158+1)*n-1.70158)},Out:function(n){return n===0?0:--n*n*((1.70158+1)*n+1.70158)+1},InOut:function(n){const t=2.5949095;return(n*=2)<1?.5*(n*n*((t+1)*n-t)):.5*((n-=2)*n*((t+1)*n+t)+2)},style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)"},Bounce:{In:function(n){return 1-N.Bounce.Out(1-n)},Out:function(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},InOut:function(n){return n<.5?N.Bounce.In(n*2)*.5:N.Bounce.Out(n*2-1)*.5+.5}},generatePow:function(n=4){return n=n<Number.EPSILON?Number.EPSILON:n,n=n>1e4?1e4:n,{In:function(t){return t**n},Out:function(t){return 1-(1-t)**n},InOut:function(t){return t<.5?(t*2)**n/2:(1-(2-t*2)**n)/2+.5}}},random:function(n){return Math.random()},createStep:function(n){return function(t){return Math.floor(t*n)/n}},createNoisyEasing:function(n,t=.1){const e=1-t;return function(i){return t*Math.random()+e*n(i)}},swing:function(n){return n+Math.sin(n*Math.PI*2)/2},causeSeizures:function(n){return n+.2*Math.random()-.1}};function ef(n){switch(n){case N.Quadratic.In:return N.Quadratic.Out;case N.Quadratic.Out:return N.Quadratic.In;case N.Quadratic.InOut:return N.Quadratic.InOut;case N.Cubic.In:return N.Cubic.Out;case N.Cubic.Out:return N.Cubic.In;case N.Cubic.InOut:return N.Cubic.InOut;case N.Quartic.In:return N.Quartic.Out;case N.Quartic.Out:return N.Quartic.In;case N.Quartic.InOut:return N.Quartic.InOut;case N.Quintic.In:return N.Quintic.Out;case N.Quintic.Out:return N.Quintic.In;case N.Quintic.InOut:return N.Quintic.InOut;case N.Sinusoidal.In:return N.Sinusoidal.Out;case N.Sinusoidal.Out:return N.Sinusoidal.In;case N.Sinusoidal.InOut:return N.Sinusoidal.InOut;case N.Exponential.In:return N.Exponential.Out;case N.Exponential.Out:return N.Exponential.In;case N.Exponential.InOut:return N.Exponential.InOut;case N.Circular.In:return N.Circular.Out;case N.Circular.Out:return N.Circular.In;case N.Circular.InOut:return N.Circular.InOut;case N.Elastic.In:return N.Elastic.Out;case N.Elastic.Out:return N.Elastic.In;case N.Elastic.InOut:return N.Elastic.InOut;case N.Back.In:return N.Back.Out;case N.Back.Out:return N.Back.In;case N.Back.InOut:return N.Back.InOut;case N.Bounce.In:return N.Bounce.Out;case N.Bounce.Out:return N.Bounce.In;case N.Bounce.InOut:return N.Bounce.InOut;default:return n}}const Ew=4,Tw=.001,Pw=1e-7,Aw=10,Oi=11,qs=1/(Oi-1),Mw=typeof Float32Array=="function";function nf(n,t){return 1-3*t+3*n}function sf(n,t){return 3*t-6*n}function rf(n){return 3*n}function Js(n,t,e){return((nf(t,e)*n+sf(t,e))*n+rf(t))*n}function of(n,t,e){return 3*nf(t,e)*n*n+2*sf(t,e)*n+rf(t)}function Dw(n,t,e,i,s){let r,o,a=0;do o=t+(e-t)/2,r=Js(o,i,s)-n,r>0?e=o:t=o;while(Math.abs(r)>Pw&&++a<Aw);return o}function Iw(n,t,e,i){for(let s=0;s<Ew;++s){const r=of(t,e,i);if(r===0)return t;const o=Js(t,e,i)-n;t-=o/r}return t}function Ow(n){return n}function Pa(n,t,e,i){if(!(0<=n&&n<=1&&0<=e&&e<=1))throw new Error("bezier x values must be in [0, 1] range");if(n===t&&e===i)return Ow;const s=Mw?new Float32Array(Oi):new Array(Oi);for(let o=0;o<Oi;++o)s[o]=Js(o*qs,n,e);function r(o){let a=0,c=1;const h=Oi-1;for(;c!==h&&s[c]<=o;++c)a+=qs;--c;const l=(o-s[c])/(s[c+1]-s[c]),u=a+l*qs,d=of(u,n,e);return d>=Tw?Iw(o,u,n,e):d===0?u:Dw(o,a,a+qs,n,e)}return o=>o===0||o===1?o:Js(r(o),t,i)}function Aa(n){switch(n){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 af(n){const[t,e,i,s]=Aa(n);return[1-i,1-s,1-t,1-e]}function kw(n){return Pa(...Aa(n))}function Rw(n){return Pa(...af(n))}const Ne={Utils:{Linear:function(n,t,e){return(t-n)*e+n},Factorial:function(){const n=[1];return function(t){let e=1;if(n[t])return n[t];for(let i=t;i>1;i--)e*=i;return n[t]=e,e}}(),Bernstein:function(n,t){const e=Ne.Utils.Factorial;return e(n)/e(t)/e(n-t)},CatmullRom:function(n,t,e,i,s){const r=(e-n)*.5,o=(i-t)*.5,a=s*s,c=s*a;return(2*t-2*e+r+o)*c+(-3*t+3*e-2*r-o)*a+r*s+t},QuadraticBezier:(n,t,e,i)=>{const s=1-i;return s*s*n+2*s*i*t+i*i*e},CubicBezier:(n,t,e,i,s)=>{const r=1-s;return r*r*r*n+3*r*r*s*t+3*r*s*s*e+s*s*s*i}},Linear:function(n,t){const e=n.length-1,i=e*t,s=Math.floor(i),r=Ne.Utils.Linear;return t<0?r(n[0],n[1],i):t>1?r(n[e],n[e-1],e-i):r(n[s],n[s+1>e?e:s+1],i-s)},Bezier:function(n,t){let e=0;const i=n.length-1,s=Math.pow,r=Ne.Utils.Bernstein;for(let o=0;o<=i;o++)e+=s(1-t,i-o)*s(t,o)*n[o]*r(i,o);return e},CatmullRom:function(n,t){const e=n.length-1;let i=e*t,s=Math.floor(i);const r=Ne.Utils.CatmullRom;return n[0]===n[e]?(t<0&&(s=Math.floor(i=e*(1+t))),r(n[(s-1+e)%e],n[s],n[(s+1)%e],n[(s+2)%e],i-s)):t<0?n[0]-(r(n[0],n[0],n[1],n[1],-i)-n[0]):t>1?n[e]-(r(n[e],n[e],n[e-1],n[e-1],i-e)-n[e]):r(n[s?s-1:0],n[s],n[e<s+1?e:s+1],n[e<s+2?e:s+2],i-s)}};class cf{_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=lt(),e=!1){const i=Object.keys(this._tweens);for(let s=0;s<i.length;s++){const r=this._tweens[i[s]],o=!e;r&&r.update(t,o)===!1&&!e&&delete this._tweens[i[s]]}return!!Object.keys(this._tweens).length}}const oe=new cf;class Ma{constructor(t,e=oe){this._object=t,this._group=e}_id=Ii.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=N.Linear.None;_interpolationFunction=Ne.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=lt()){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,i,s){for(const r in i){const o=t[r],a=Array.isArray(o),c=a?"array":typeof o,h=!a&&Array.isArray(i[r]);if(!(c==="undefined"||c==="function")){if(h){let l=i[r];if(l.length===0)continue;l=l.map(this._handleRelativeValue.bind(this,o)),i[r]=[o].concat(l)}if((c==="object"||a)&&o&&!h){e[r]=a?[]:{};for(const l in o)e[r][l]=o[l];s[r]=a?[]:{},this._setupProperties(o,e[r],i[r],s[r])}else typeof e[r]>"u"&&(e[r]=o),a||(e[r]*=1),h?s[r]=i[r].slice().reverse():s[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=lt()){return this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStartTime=t,this._group&&this._group.remove(this),this)}resume(t=lt()){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=oe){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=N.Linear.None){return this._easingFunction=t,this}interpolation(t=Ne.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=lt(),e=!0){if(this._isPaused)return!0;let i,s;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),s=(t-this._startTime)/this._durationTime,s=this._durationTime===0||s>1?1:s;const o=this._easingFunction(s);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,o),this._onUpdateCallback&&this._onUpdateCallback(this._object,s),s===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(i in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[i]=="string"&&(this._valuesStartRepeat[i]=this._valuesStartRepeat[i]+parseFloat(this._valuesEnd[i])),this._yoyo&&this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i];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,c=this._chainedTweens.length;a<c;a++)this._chainedTweens[a].start(this._startTime+this._durationTime);return this._isPlaying=!1,!1}return!0}_updateProperties(t,e,i,s){for(const r in i){if(e[r]===void 0)continue;const o=e[r]||0;let a=i[r];const c=Array.isArray(t[r]),h=Array.isArray(a);!c&&h?t[r]=this._interpolationFunction(a,s):typeof a=="object"&&a?this._updateProperties(t[r],o,a,s):(a=this._handleRelativeValue(o,a),typeof a=="number"&&(t[r]=o+(a-o)*s))}}_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],i=this._valuesEnd[t];typeof i=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(i):this._valuesStartRepeat[t]=i,this._valuesEnd[t]=e}}const Lw=Ii.nextId,zw=oe.getAll.bind(oe),Nw=oe.removeAll.bind(oe),Fw=oe.add.bind(oe),Bw=oe.remove.bind(oe),Uw=oe.update.bind(oe),Vw={now:lt,Sequence:Ii,Easing:N,Interpolation:Ne,Group:cf,Tween:Ma,nextId:Lw,getAll:zw,removeAll:Nw,add:Fw,remove:Bw,update:Uw};class Da{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=lt(),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=lt();t=e-this.oldTime,this.oldTime=e,this.elapsedTime+=t}return t}}class ki{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){Uy(this.tweens,(e,i)=>t?e.delay>i.delay:e.delay<=i.delay)}cloneTweens(t=this.tweens){const e=[];return t.forEach(i=>{const s={...i};delete s.tween,s.fromValues={...s.fromValues},s.toValues={...s.toValues},e.push(s)}),e}addTween(t,e,i){const s={fromValues:t,toValues:e,frames:typeof i?.frames=="number"?i.frames:1,delay:typeof i?.delay=="number"?i.delay:this.tweens.length,easeFunction:i?.easeFunction||N.Linear.None,interpolationFunction:i?.interpolationFunction||Ne.Linear,repeat:typeof i?.repeat=="number"?i.repeat:0,yoyo:i?.yoyo||!1,onStart:i?.onStart||(()=>{}),onUpdate:i?.onUpdate||(()=>{}),onComplete:i?.onComplete||(()=>{})};return this.tweens.push(s),this}cancelRequestAnimationCycle=()=>{};runTweens(t){this.cancelRequestAnimationCycle();const e=new Da,i=this.frameDuration;return new Promise(s=>{this.onGroupStart?.(),this.cancelRequestAnimationCycle=Eg(r=>{if(!this.isPaused){const a=Math.max(0,r-this.pausedDuration),c=Math.max(0,e.getElapsedTime()-this.pausedDuration);t.filter(h=>h.delay*i<=c).forEach(h=>{h.tween||(h.tween=new Ma({...h.fromValues}).to({...h.toValues},h.frames*i).easing(h.easeFunction).interpolation(h.interpolationFunction).repeat(h.repeat).yoyo(h.yoyo).onStart(h.onStart).onUpdate(h.onUpdate).onComplete(h.onComplete),h.tween.start(a)),(h.delay+h.frames*(h.repeat+1))*i>c?h.tween.update(a):(h.tween.isPlaying()&&h.tween.end(),jh(t,h))})}const o=!!t.length;return o||(this.onGroupComplete?.(),s()),o})})}isPaused=!1;pausedClock=new Da;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(i=>{e=Math.max(e,i.delay+i.frames),i.easeFunction=ef(i.easeFunction);const s={...i.toValues};i.toValues={...i.fromValues},i.fromValues={...s}}),t.forEach(i=>{i.delay=e-i.frames}),this.play(t)}pause(){this.pausedClock.start(),this.isPaused=!0}resume(){this.pausedDuration+=this.pausedClock.getElapsedTime(),this.pausedClock.stop(),this.isPaused=!1}}/**
|
|
32
32
|
* @vue/shared v3.5.13
|
|
33
33
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
34
34
|
* @license MIT
|
|
35
|
-
**//*! #__NO_SIDE_EFFECTS__ */function
|
|
35
|
+
**//*! #__NO_SIDE_EFFECTS__ */function Yw(n){const t=Object.create(null);for(const e of n.split(","))t[e]=1;return e=>e in t}const ae={}.NODE_ENV!=="production"?Object.freeze({}):{},Ri=()=>{},me=Object.assign,$w=Object.prototype.hasOwnProperty,vt=(n,t)=>$w.call(n,t),Rt=Array.isArray,Zn=n=>Zs(n)==="[object Map]",Gw=n=>Zs(n)==="[object Set]",Lt=n=>typeof n=="function",Ks=n=>typeof n=="string",Li=n=>typeof n=="symbol",Se=n=>n!==null&&typeof n=="object",Xw=n=>(Se(n)||Lt(n))&&Lt(n.then)&&Lt(n.catch),jw=Object.prototype.toString,Zs=n=>jw.call(n),hf=n=>Zs(n).slice(8,-1),Ww=n=>Zs(n)==="[object Object]",Ia=n=>Ks(n)&&n!=="NaN"&&n[0]!=="-"&&""+parseInt(n,10)===n,Hw=(n=>{const t=Object.create(null);return e=>t[e]||(t[e]=n(e))})(n=>n.charAt(0).toUpperCase()+n.slice(1)),cn=(n,t)=>!Object.is(n,t),qw=(n,t,e,i=!1)=>{Object.defineProperty(n,t,{configurable:!0,enumerable:!1,writable:i,value:e})};let lf;const Qs=()=>lf||(lf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});/**
|
|
36
36
|
* @vue/reactivity v3.5.13
|
|
37
37
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
38
38
|
* @license MIT
|
|
39
|
-
**/function Fe(n,...t){console.warn(`[Vue warn] ${n}`,...t)}let et;const Ia=new WeakSet;class jw{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ia.has(this)&&(Ia.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||lf(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,pf(this),uf(this);const t=et,e=pe;et=this,pe=!0;try{return this.fn()}finally{({}).NODE_ENV!=="production"&&et!==this&&Fe("Active effect was not restored correctly - this is likely a Vue internal bug."),ff(this),et=t,pe=e,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)La(t);this.deps=this.depsTail=void 0,pf(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ia.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ra(this)&&this.run()}get dirty(){return Ra(this)}}let hf=0,zi,Ni;function lf(n,t=!1){if(n.flags|=8,t){n.next=Ni,Ni=n;return}n.next=zi,zi=n}function Oa(){hf++}function ka(){if(--hf>0)return;if(Ni){let t=Ni;for(Ni=void 0;t;){const e=t.next;t.next=void 0,t.flags&=-9,t=e}}let n;for(;zi;){let t=zi;for(zi=void 0;t;){const e=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(i){n||(n=i)}t=e}}if(n)throw n}function uf(n){for(let t=n.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ff(n){let t,e=n.depsTail,i=e;for(;i;){const s=i.prevDep;i.version===-1?(i===e&&(e=s),La(i),Ww(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=s}n.deps=t,n.depsTail=e}function Ra(n){for(let t=n.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(df(t.dep.computed)||t.dep.version!==t.version))return!0;return!!n._dirty}function df(n){if(n.flags&4&&!(n.flags&16)||(n.flags&=-17,n.globalVersion===Fi))return;n.globalVersion=Fi;const t=n.dep;if(n.flags|=2,t.version>0&&!n.isSSR&&n.deps&&!Ra(n)){n.flags&=-3;return}const e=et,i=pe;et=n,pe=!0;try{uf(n);const s=n.fn(n._value);(t.version===0||cn(s,n._value))&&(n._value=s,t.version++)}catch(s){throw t.version++,s}finally{et=e,pe=i,ff(n),n.flags&=-3}}function La(n,t=!1){const{dep:e,prevSub:i,nextSub:s}=n;if(i&&(i.nextSub=s,n.prevSub=void 0),s&&(s.prevSub=i,n.nextSub=void 0),{}.NODE_ENV!=="production"&&e.subsHead===n&&(e.subsHead=s),e.subs===n&&(e.subs=i,!i&&e.computed)){e.computed.flags&=-5;for(let r=e.computed.deps;r;r=r.nextDep)La(r,!0)}!t&&!--e.sc&&e.map&&e.map.delete(e.key)}function Ww(n){const{prevDep:t,nextDep:e}=n;t&&(t.nextDep=e,n.prevDep=void 0),e&&(e.prevDep=t,n.nextDep=void 0)}let pe=!0;const mf=[];function tr(){mf.push(pe),pe=!1}function er(){const n=mf.pop();pe=n===void 0?!0:n}function pf(n){const{cleanup:t}=n;if(n.cleanup=void 0,t){const e=et;et=void 0;try{t()}finally{et=e}}}let Fi=0;class Hw{constructor(t,e){this.sub=t,this.dep=e,this.version=e.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class za{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,{}.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){if(!et||!pe||et===this.computed)return;let e=this.activeLink;if(e===void 0||e.sub!==et)e=this.activeLink=new Hw(et,this),et.deps?(e.prevDep=et.depsTail,et.depsTail.nextDep=e,et.depsTail=e):et.deps=et.depsTail=e,gf(e);else if(e.version===-1&&(e.version=this.version,e.nextDep)){const i=e.nextDep;i.prevDep=e.prevDep,e.prevDep&&(e.prevDep.nextDep=i),e.prevDep=et.depsTail,e.nextDep=void 0,et.depsTail.nextDep=e,et.depsTail=e,et.deps===e&&(et.deps=i)}return{}.NODE_ENV!=="production"&&et.onTrack&&et.onTrack(me({effect:et},t)),e}trigger(t){this.version++,Fi++,this.notify(t)}notify(t){Oa();try{if({}.NODE_ENV!=="production")for(let e=this.subsHead;e;e=e.nextSub)e.sub.onTrigger&&!(e.sub.flags&8)&&e.sub.onTrigger(me({effect:e.sub},t));for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{ka()}}}function gf(n){if(n.dep.sc++,n.sub.flags&4){const t=n.dep.computed;if(t&&!n.dep.subs){t.flags|=20;for(let i=t.deps;i;i=i.nextDep)gf(i)}const e=n.dep.subs;e!==n&&(n.prevSub=e,e&&(e.nextSub=n)),{}.NODE_ENV!=="production"&&n.dep.subsHead===void 0&&(n.dep.subsHead=n),n.dep.subs=n}}const Na=new WeakMap,Mn=Symbol({}.NODE_ENV!=="production"?"Object iterate":""),Fa=Symbol({}.NODE_ENV!=="production"?"Map keys iterate":""),Bi=Symbol({}.NODE_ENV!=="production"?"Array iterate":"");function zt(n,t,e){if(pe&&et){let i=Na.get(n);i||Na.set(n,i=new Map);let s=i.get(e);s||(i.set(e,s=new za),s.map=i,s.key=e),{}.NODE_ENV!=="production"?s.track({target:n,type:t,key:e}):s.track()}}function hn(n,t,e,i,s,r){const o=Na.get(n);if(!o){Fi++;return}const a=c=>{c&&({}.NODE_ENV!=="production"?c.trigger({target:n,type:t,key:e,newValue:i,oldValue:s,oldTarget:r}):c.trigger())};if(Oa(),t==="clear")o.forEach(a);else{const c=Rt(n),h=c&&Da(e);if(c&&e==="length"){const l=Number(i);o.forEach((u,d)=>{(d==="length"||d===Bi||!Li(d)&&d>=l)&&a(u)})}else switch((e!==void 0||o.has(void 0))&&a(o.get(e)),h&&a(o.get(Bi)),t){case"add":c?h&&a(o.get("length")):(a(o.get(Mn)),Zn(n)&&a(o.get(Fa)));break;case"delete":c||(a(o.get(Mn)),Zn(n)&&a(o.get(Fa)));break;case"set":Zn(n)&&a(o.get(Mn));break}}ka()}function Qn(n){const t=K(n);return t===n?t:(zt(t,"iterate",Bi),Wt(n)?t:t.map(Ut))}function Ba(n){return zt(n=K(n),"iterate",Bi),n}const qw={__proto__:null,[Symbol.iterator](){return Ua(this,Symbol.iterator,Ut)},concat(...n){return Qn(this).concat(...n.map(t=>Rt(t)?Qn(t):t))},entries(){return Ua(this,"entries",n=>(n[1]=Ut(n[1]),n))},every(n,t){return Be(this,"every",n,t,void 0,arguments)},filter(n,t){return Be(this,"filter",n,t,e=>e.map(Ut),arguments)},find(n,t){return Be(this,"find",n,t,Ut,arguments)},findIndex(n,t){return Be(this,"findIndex",n,t,void 0,arguments)},findLast(n,t){return Be(this,"findLast",n,t,Ut,arguments)},findLastIndex(n,t){return Be(this,"findLastIndex",n,t,void 0,arguments)},forEach(n,t){return Be(this,"forEach",n,t,void 0,arguments)},includes(...n){return Va(this,"includes",n)},indexOf(...n){return Va(this,"indexOf",n)},join(n){return Qn(this).join(n)},lastIndexOf(...n){return Va(this,"lastIndexOf",n)},map(n,t){return Be(this,"map",n,t,void 0,arguments)},pop(){return Ui(this,"pop")},push(...n){return Ui(this,"push",n)},reduce(n,...t){return yf(this,"reduce",n,t)},reduceRight(n,...t){return yf(this,"reduceRight",n,t)},shift(){return Ui(this,"shift")},some(n,t){return Be(this,"some",n,t,void 0,arguments)},splice(...n){return Ui(this,"splice",n)},toReversed(){return Qn(this).toReversed()},toSorted(n){return Qn(this).toSorted(n)},toSpliced(...n){return Qn(this).toSpliced(...n)},unshift(...n){return Ui(this,"unshift",n)},values(){return Ua(this,"values",Ut)}};function Ua(n,t,e){const i=Ba(n),s=i[t]();return i!==n&&!Wt(n)&&(s._next=s.next,s.next=()=>{const r=s._next();return r.value&&(r.value=e(r.value)),r}),s}const Jw=Array.prototype;function Be(n,t,e,i,s,r){const o=Ba(n),a=o!==n&&!Wt(n),c=o[t];if(c!==Jw[t]){const u=c.apply(n,r);return a?Ut(u):u}let h=e;o!==n&&(a?h=function(u,d){return e.call(this,Ut(u),d,n)}:e.length>2&&(h=function(u,d){return e.call(this,u,d,n)}));const l=c.call(o,h,i);return a&&s?s(l):l}function yf(n,t,e,i){const s=Ba(n);let r=e;return s!==n&&(Wt(n)?e.length>3&&(r=function(o,a,c){return e.call(this,o,a,c,n)}):r=function(o,a,c){return e.call(this,o,Ut(a),c,n)}),s[t](r,...i)}function Va(n,t,e){const i=K(n);zt(i,"iterate",Bi);const s=i[t](...e);return(s===-1||s===!1)&&uv(e[0])?(e[0]=K(e[0]),i[t](...e)):s}function Ui(n,t,e=[]){tr(),Oa();const i=K(n)[t].apply(n,e);return ka(),er(),i}const Kw=Fw("__proto__,__v_isRef,__isVue"),bf=new Set(Object.getOwnPropertyNames(Symbol).filter(n=>n!=="arguments"&&n!=="caller").map(n=>Symbol[n]).filter(Li));function Zw(n){Li(n)||(n=String(n));const t=K(this);return zt(t,"has",n),t.hasOwnProperty(n)}class wf{constructor(t=!1,e=!1){this._isReadonly=t,this._isShallow=e}get(t,e,i){if(e==="__v_skip")return t.__v_skip;const s=this._isReadonly,r=this._isShallow;if(e==="__v_isReactive")return!s;if(e==="__v_isReadonly")return s;if(e==="__v_isShallow")return r;if(e==="__v_raw")return i===(s?r?Cf:Sf:r?cv:_f).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;const o=Rt(t);if(!s){let c;if(o&&(c=qw[e]))return c;if(e==="hasOwnProperty")return Zw}const a=Reflect.get(t,e,Ht(t)?t:i);return(Li(e)?bf.has(e):Kw(e))||(s||zt(t,"get",e),r)?a:Ht(a)?o&&Da(e)?a:a.value:Se(a)?s?Ga(a):Ef(a):a}}class Qw extends wf{constructor(t=!1){super(!1,t)}set(t,e,i,s){let r=t[e];if(!this._isShallow){const c=Ue(r);if(!Wt(i)&&!Ue(i)&&(r=K(r),i=K(i)),!Rt(t)&&Ht(r)&&!Ht(i))return c?!1:(r.value=i,!0)}const o=Rt(t)&&Da(e)?Number(e)<t.length:vt(t,e),a=Reflect.set(t,e,i,Ht(t)?t:s);return t===K(s)&&(o?cn(i,r)&&hn(t,"set",e,i,r):hn(t,"add",e,i)),a}deleteProperty(t,e){const i=vt(t,e),s=t[e],r=Reflect.deleteProperty(t,e);return r&&i&&hn(t,"delete",e,void 0,s),r}has(t,e){const i=Reflect.has(t,e);return(!Li(e)||!bf.has(e))&&zt(t,"has",e),i}ownKeys(t){return zt(t,"iterate",Rt(t)?"length":Mn),Reflect.ownKeys(t)}}class vf extends wf{constructor(t=!1){super(!0,t)}set(t,e){return{}.NODE_ENV!=="production"&&Fe(`Set operation on key "${String(e)}" failed: target is readonly.`,t),!0}deleteProperty(t,e){return{}.NODE_ENV!=="production"&&Fe(`Delete operation on key "${String(e)}" failed: target is readonly.`,t),!0}}const tv=new Qw,ev=new vf,nv=new vf(!0),Ya=n=>n,nr=n=>Reflect.getPrototypeOf(n);function iv(n,t,e){return function(...i){const s=this.__v_raw,r=K(s),o=Zn(r),a=n==="entries"||n===Symbol.iterator&&o,c=n==="keys"&&o,h=s[n](...i),l=e?Ya:t?ja:Ut;return!t&&zt(r,"iterate",c?Fa:Mn),{next(){const{value:u,done:d}=h.next();return d?{value:u,done:d}:{value:a?[l(u[0]),l(u[1])]:l(u),done:d}},[Symbol.iterator](){return this}}}}function ir(n){return function(...t){if({}.NODE_ENV!=="production"){const e=t[0]?`on key "${t[0]}" `:"";Fe(`${Gw(n)} operation ${e}failed: target is readonly.`,K(this))}return n==="delete"?!1:n==="clear"?void 0:this}}function sv(n,t){const e={get(s){const r=this.__v_raw,o=K(r),a=K(s);n||(cn(s,a)&&zt(o,"get",s),zt(o,"get",a));const{has:c}=nr(o),h=t?Ya:n?ja:Ut;if(c.call(o,s))return h(r.get(s));if(c.call(o,a))return h(r.get(a));r!==o&&r.get(s)},get size(){const s=this.__v_raw;return!n&&zt(K(s),"iterate",Mn),Reflect.get(s,"size",s)},has(s){const r=this.__v_raw,o=K(r),a=K(s);return n||(cn(s,a)&&zt(o,"has",s),zt(o,"has",a)),s===a?r.has(s):r.has(s)||r.has(a)},forEach(s,r){const o=this,a=o.__v_raw,c=K(a),h=t?Ya:n?ja:Ut;return!n&&zt(c,"iterate",Mn),a.forEach((l,u)=>s.call(r,h(l),h(u),o))}};return me(e,n?{add:ir("add"),set:ir("set"),delete:ir("delete"),clear:ir("clear")}:{add(s){!t&&!Wt(s)&&!Ue(s)&&(s=K(s));const r=K(this);return nr(r).has.call(r,s)||(r.add(s),hn(r,"add",s,s)),this},set(s,r){!t&&!Wt(r)&&!Ue(r)&&(r=K(r));const o=K(this),{has:a,get:c}=nr(o);let h=a.call(o,s);h?{}.NODE_ENV!=="production"&&xf(o,a,s):(s=K(s),h=a.call(o,s));const l=c.call(o,s);return o.set(s,r),h?cn(r,l)&&hn(o,"set",s,r,l):hn(o,"add",s,r),this},delete(s){const r=K(this),{has:o,get:a}=nr(r);let c=o.call(r,s);c?{}.NODE_ENV!=="production"&&xf(r,o,s):(s=K(s),c=o.call(r,s));const h=a?a.call(r,s):void 0,l=r.delete(s);return c&&hn(r,"delete",s,void 0,h),l},clear(){const s=K(this),r=s.size!==0,o={}.NODE_ENV!=="production"?Zn(s)?new Map(s):new Set(s):void 0,a=s.clear();return r&&hn(s,"clear",void 0,void 0,o),a}}),["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=iv(s,n,t)}),e}function $a(n,t){const e=sv(n,t);return(i,s,r)=>s==="__v_isReactive"?!n:s==="__v_isReadonly"?n:s==="__v_raw"?i:Reflect.get(vt(e,s)&&s in i?e:i,s,r)}const rv={get:$a(!1,!1)},ov={get:$a(!0,!1)},av={get:$a(!0,!0)};function xf(n,t,e){const i=K(e);if(i!==e&&t.call(n,i)){const s=af(n);Fe(`Reactive ${s} contains both the raw and reactive versions of the same object${s==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const _f=new WeakMap,cv=new WeakMap,Sf=new WeakMap,Cf=new WeakMap;function hv(n){switch(n){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function lv(n){return n.__v_skip||!Object.isExtensible(n)?0:hv(af(n))}function Ef(n){return Ue(n)?n:Xa(n,!1,tv,rv,_f)}function Ga(n){return Xa(n,!0,ev,ov,Sf)}function sr(n){return Xa(n,!0,nv,av,Cf)}function Xa(n,t,e,i,s){if(!Se(n))return{}.NODE_ENV!=="production"&&Fe(`value cannot be made ${t?"readonly":"reactive"}: ${String(n)}`),n;if(n.__v_raw&&!(t&&n.__v_isReactive))return n;const r=s.get(n);if(r)return r;const o=lv(n);if(o===0)return n;const a=new Proxy(n,o===2?i:e);return s.set(n,a),a}function ti(n){return Ue(n)?ti(n.__v_raw):!!(n&&n.__v_isReactive)}function Ue(n){return!!(n&&n.__v_isReadonly)}function Wt(n){return!!(n&&n.__v_isShallow)}function uv(n){return n?!!n.__v_raw:!1}function K(n){const t=n&&n.__v_raw;return t?K(t):n}function fv(n){return!vt(n,"__v_skip")&&Object.isExtensible(n)&&Xw(n,"__v_skip",!0),n}const Ut=n=>Se(n)?Ef(n):n,ja=n=>Se(n)?Ga(n):n;function Ht(n){return n?n.__v_isRef===!0:!1}function Tf(n){return Pf(n,!1)}function dv(n){return Pf(n,!0)}function Pf(n,t){return Ht(n)?n:new mv(n,t)}class mv{constructor(t,e){this.dep=new za,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=e?t:K(t),this._value=e?t:Ut(t),this.__v_isShallow=e}get value(){return{}.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(t){const e=this._rawValue,i=this.__v_isShallow||Wt(t)||Ue(t);t=i?t:K(t),cn(t,e)&&(this._rawValue=t,this._value=i?t:Ut(t),{}.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:e}):this.dep.trigger())}}function pv(n){return Ht(n)?n.value:n}const gv={get:(n,t,e)=>t==="__v_raw"?n:pv(Reflect.get(n,t,e)),set:(n,t,e,i)=>{const s=n[t];return Ht(s)&&!Ht(e)?(s.value=e,!0):Reflect.set(n,t,e,i)}};function yv(n){return ti(n)?n:new Proxy(n,gv)}class bv{constructor(t,e,i){this.fn=t,this.setter=e,this._value=void 0,this.dep=new za(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Fi-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!e,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&et!==this)return lf(this,!0),!0}get value(){const t={}.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return df(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter?this.setter(t):{}.NODE_ENV!=="production"&&Fe("Write operation failed: computed value is readonly")}}function wv(n,t,e=!1){let i,s;Lt(n)?i=n:(i=n.get,s=n.set);const r=new bv(i,s,e);return{}.NODE_ENV!=="production"&&t&&!e&&(r.onTrack=t.onTrack,r.onTrigger=t.onTrigger),r}const rr={},or=new WeakMap;let Dn;function vv(n,t=!1,e=Dn){if(e){let i=or.get(e);i||or.set(e,i=[]),i.push(n)}else({}).NODE_ENV!=="production"&&!t&&Fe("onWatcherCleanup() was called when there was no active watcher to associate with.")}function xv(n,t,e=ae){const{immediate:i,deep:s,once:r,scheduler:o,augmentJob:a,call:c}=e,h=w=>{(e.onWarn||Fe)("Invalid watch source: ",w,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},l=w=>s?w:Wt(w)||s===!1||s===0?ln(w,1):ln(w);let u,d,f,p,m=!1,v=!1;if(Ht(n)?(d=()=>n.value,m=Wt(n)):ti(n)?(d=()=>l(n),m=!0):Rt(n)?(v=!0,m=n.some(w=>ti(w)||Wt(w)),d=()=>n.map(w=>{if(Ht(w))return w.value;if(ti(w))return l(w);if(Lt(w))return c?c(w,2):w();({}).NODE_ENV!=="production"&&h(w)})):Lt(n)?t?d=c?()=>c(n,2):n:d=()=>{if(f){tr();try{f()}finally{er()}}const w=Dn;Dn=u;try{return c?c(n,3,[p]):n(p)}finally{Dn=w}}:(d=Ri,{}.NODE_ENV!=="production"&&h(n)),t&&s){const w=d,C=s===!0?1/0:s;d=()=>ln(w(),C)}const y=()=>{u.stop()};if(r&&t){const w=t;t=(...C)=>{w(...C),y()}}let b=v?new Array(n.length).fill(rr):rr;const x=w=>{if(!(!(u.flags&1)||!u.dirty&&!w))if(t){const C=u.run();if(s||m||(v?C.some((S,D)=>cn(S,b[D])):cn(C,b))){f&&f();const S=Dn;Dn=u;try{const D=[C,b===rr?void 0:v&&b[0]===rr?[]:b,p];c?c(t,3,D):t(...D),b=C}finally{Dn=S}}}else u.run()};return a&&a(x),u=new jw(d),u.scheduler=o?()=>o(x,!1):x,p=w=>vv(w,!1,u),f=u.onStop=()=>{const w=or.get(u);if(w){if(c)c(w,4);else for(const C of w)C();or.delete(u)}},{}.NODE_ENV!=="production"&&(u.onTrack=e.onTrack,u.onTrigger=e.onTrigger),t?i?x(!0):b=u.run():o?o(x.bind(null,!0),!0):u.run(),y.pause=u.pause.bind(u),y.resume=u.resume.bind(u),y.stop=y,y}function ln(n,t=1/0,e){if(t<=0||!Se(n)||n.__v_skip||(e=e||new Set,e.has(n)))return n;if(e.add(n),t--,Ht(n))ln(n.value,t,e);else if(Rt(n))for(let i=0;i<n.length;i++)ln(n[i],t,e);else if(Uw(n)||Zn(n))n.forEach(i=>{ln(i,t,e)});else if($w(n)){for(const i in n)ln(n[i],t,e);for(const i of Object.getOwnPropertySymbols(n))Object.prototype.propertyIsEnumerable.call(n,i)&&ln(n[i],t,e)}return n}/**
|
|
39
|
+
**/function Fe(n,...t){console.warn(`[Vue warn] ${n}`,...t)}let et;const Oa=new WeakSet;class Jw{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Oa.has(this)&&(Oa.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||ff(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,yf(this),df(this);const t=et,e=pe;et=this,pe=!0;try{return this.fn()}finally{({}).NODE_ENV!=="production"&&et!==this&&Fe("Active effect was not restored correctly - this is likely a Vue internal bug."),mf(this),et=t,pe=e,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)za(t);this.deps=this.depsTail=void 0,yf(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Oa.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){La(this)&&this.run()}get dirty(){return La(this)}}let uf=0,zi,Ni;function ff(n,t=!1){if(n.flags|=8,t){n.next=Ni,Ni=n;return}n.next=zi,zi=n}function ka(){uf++}function Ra(){if(--uf>0)return;if(Ni){let t=Ni;for(Ni=void 0;t;){const e=t.next;t.next=void 0,t.flags&=-9,t=e}}let n;for(;zi;){let t=zi;for(zi=void 0;t;){const e=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(i){n||(n=i)}t=e}}if(n)throw n}function df(n){for(let t=n.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function mf(n){let t,e=n.depsTail,i=e;for(;i;){const s=i.prevDep;i.version===-1?(i===e&&(e=s),za(i),Kw(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=s}n.deps=t,n.depsTail=e}function La(n){for(let t=n.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(pf(t.dep.computed)||t.dep.version!==t.version))return!0;return!!n._dirty}function pf(n){if(n.flags&4&&!(n.flags&16)||(n.flags&=-17,n.globalVersion===Fi))return;n.globalVersion=Fi;const t=n.dep;if(n.flags|=2,t.version>0&&!n.isSSR&&n.deps&&!La(n)){n.flags&=-3;return}const e=et,i=pe;et=n,pe=!0;try{df(n);const s=n.fn(n._value);(t.version===0||cn(s,n._value))&&(n._value=s,t.version++)}catch(s){throw t.version++,s}finally{et=e,pe=i,mf(n),n.flags&=-3}}function za(n,t=!1){const{dep:e,prevSub:i,nextSub:s}=n;if(i&&(i.nextSub=s,n.prevSub=void 0),s&&(s.prevSub=i,n.nextSub=void 0),{}.NODE_ENV!=="production"&&e.subsHead===n&&(e.subsHead=s),e.subs===n&&(e.subs=i,!i&&e.computed)){e.computed.flags&=-5;for(let r=e.computed.deps;r;r=r.nextDep)za(r,!0)}!t&&!--e.sc&&e.map&&e.map.delete(e.key)}function Kw(n){const{prevDep:t,nextDep:e}=n;t&&(t.nextDep=e,n.prevDep=void 0),e&&(e.prevDep=t,n.nextDep=void 0)}let pe=!0;const gf=[];function tr(){gf.push(pe),pe=!1}function er(){const n=gf.pop();pe=n===void 0?!0:n}function yf(n){const{cleanup:t}=n;if(n.cleanup=void 0,t){const e=et;et=void 0;try{t()}finally{et=e}}}let Fi=0;class Zw{constructor(t,e){this.sub=t,this.dep=e,this.version=e.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Na{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,{}.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){if(!et||!pe||et===this.computed)return;let e=this.activeLink;if(e===void 0||e.sub!==et)e=this.activeLink=new Zw(et,this),et.deps?(e.prevDep=et.depsTail,et.depsTail.nextDep=e,et.depsTail=e):et.deps=et.depsTail=e,bf(e);else if(e.version===-1&&(e.version=this.version,e.nextDep)){const i=e.nextDep;i.prevDep=e.prevDep,e.prevDep&&(e.prevDep.nextDep=i),e.prevDep=et.depsTail,e.nextDep=void 0,et.depsTail.nextDep=e,et.depsTail=e,et.deps===e&&(et.deps=i)}return{}.NODE_ENV!=="production"&&et.onTrack&&et.onTrack(me({effect:et},t)),e}trigger(t){this.version++,Fi++,this.notify(t)}notify(t){ka();try{if({}.NODE_ENV!=="production")for(let e=this.subsHead;e;e=e.nextSub)e.sub.onTrigger&&!(e.sub.flags&8)&&e.sub.onTrigger(me({effect:e.sub},t));for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Ra()}}}function bf(n){if(n.dep.sc++,n.sub.flags&4){const t=n.dep.computed;if(t&&!n.dep.subs){t.flags|=20;for(let i=t.deps;i;i=i.nextDep)bf(i)}const e=n.dep.subs;e!==n&&(n.prevSub=e,e&&(e.nextSub=n)),{}.NODE_ENV!=="production"&&n.dep.subsHead===void 0&&(n.dep.subsHead=n),n.dep.subs=n}}const Fa=new WeakMap,Mn=Symbol({}.NODE_ENV!=="production"?"Object iterate":""),Ba=Symbol({}.NODE_ENV!=="production"?"Map keys iterate":""),Bi=Symbol({}.NODE_ENV!=="production"?"Array iterate":"");function zt(n,t,e){if(pe&&et){let i=Fa.get(n);i||Fa.set(n,i=new Map);let s=i.get(e);s||(i.set(e,s=new Na),s.map=i,s.key=e),{}.NODE_ENV!=="production"?s.track({target:n,type:t,key:e}):s.track()}}function hn(n,t,e,i,s,r){const o=Fa.get(n);if(!o){Fi++;return}const a=c=>{c&&({}.NODE_ENV!=="production"?c.trigger({target:n,type:t,key:e,newValue:i,oldValue:s,oldTarget:r}):c.trigger())};if(ka(),t==="clear")o.forEach(a);else{const c=Rt(n),h=c&&Ia(e);if(c&&e==="length"){const l=Number(i);o.forEach((u,d)=>{(d==="length"||d===Bi||!Li(d)&&d>=l)&&a(u)})}else switch((e!==void 0||o.has(void 0))&&a(o.get(e)),h&&a(o.get(Bi)),t){case"add":c?h&&a(o.get("length")):(a(o.get(Mn)),Zn(n)&&a(o.get(Ba)));break;case"delete":c||(a(o.get(Mn)),Zn(n)&&a(o.get(Ba)));break;case"set":Zn(n)&&a(o.get(Mn));break}}Ra()}function Qn(n){const t=K(n);return t===n?t:(zt(t,"iterate",Bi),Wt(n)?t:t.map(Ut))}function Ua(n){return zt(n=K(n),"iterate",Bi),n}const Qw={__proto__:null,[Symbol.iterator](){return Va(this,Symbol.iterator,Ut)},concat(...n){return Qn(this).concat(...n.map(t=>Rt(t)?Qn(t):t))},entries(){return Va(this,"entries",n=>(n[1]=Ut(n[1]),n))},every(n,t){return Be(this,"every",n,t,void 0,arguments)},filter(n,t){return Be(this,"filter",n,t,e=>e.map(Ut),arguments)},find(n,t){return Be(this,"find",n,t,Ut,arguments)},findIndex(n,t){return Be(this,"findIndex",n,t,void 0,arguments)},findLast(n,t){return Be(this,"findLast",n,t,Ut,arguments)},findLastIndex(n,t){return Be(this,"findLastIndex",n,t,void 0,arguments)},forEach(n,t){return Be(this,"forEach",n,t,void 0,arguments)},includes(...n){return Ya(this,"includes",n)},indexOf(...n){return Ya(this,"indexOf",n)},join(n){return Qn(this).join(n)},lastIndexOf(...n){return Ya(this,"lastIndexOf",n)},map(n,t){return Be(this,"map",n,t,void 0,arguments)},pop(){return Ui(this,"pop")},push(...n){return Ui(this,"push",n)},reduce(n,...t){return wf(this,"reduce",n,t)},reduceRight(n,...t){return wf(this,"reduceRight",n,t)},shift(){return Ui(this,"shift")},some(n,t){return Be(this,"some",n,t,void 0,arguments)},splice(...n){return Ui(this,"splice",n)},toReversed(){return Qn(this).toReversed()},toSorted(n){return Qn(this).toSorted(n)},toSpliced(...n){return Qn(this).toSpliced(...n)},unshift(...n){return Ui(this,"unshift",n)},values(){return Va(this,"values",Ut)}};function Va(n,t,e){const i=Ua(n),s=i[t]();return i!==n&&!Wt(n)&&(s._next=s.next,s.next=()=>{const r=s._next();return r.value&&(r.value=e(r.value)),r}),s}const tv=Array.prototype;function Be(n,t,e,i,s,r){const o=Ua(n),a=o!==n&&!Wt(n),c=o[t];if(c!==tv[t]){const u=c.apply(n,r);return a?Ut(u):u}let h=e;o!==n&&(a?h=function(u,d){return e.call(this,Ut(u),d,n)}:e.length>2&&(h=function(u,d){return e.call(this,u,d,n)}));const l=c.call(o,h,i);return a&&s?s(l):l}function wf(n,t,e,i){const s=Ua(n);let r=e;return s!==n&&(Wt(n)?e.length>3&&(r=function(o,a,c){return e.call(this,o,a,c,n)}):r=function(o,a,c){return e.call(this,o,Ut(a),c,n)}),s[t](r,...i)}function Ya(n,t,e){const i=K(n);zt(i,"iterate",Bi);const s=i[t](...e);return(s===-1||s===!1)&&pv(e[0])?(e[0]=K(e[0]),i[t](...e)):s}function Ui(n,t,e=[]){tr(),ka();const i=K(n)[t].apply(n,e);return Ra(),er(),i}const ev=Yw("__proto__,__v_isRef,__isVue"),vf=new Set(Object.getOwnPropertyNames(Symbol).filter(n=>n!=="arguments"&&n!=="caller").map(n=>Symbol[n]).filter(Li));function nv(n){Li(n)||(n=String(n));const t=K(this);return zt(t,"has",n),t.hasOwnProperty(n)}class xf{constructor(t=!1,e=!1){this._isReadonly=t,this._isShallow=e}get(t,e,i){if(e==="__v_skip")return t.__v_skip;const s=this._isReadonly,r=this._isShallow;if(e==="__v_isReactive")return!s;if(e==="__v_isReadonly")return s;if(e==="__v_isShallow")return r;if(e==="__v_raw")return i===(s?r?Tf:Ef:r?fv:Cf).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;const o=Rt(t);if(!s){let c;if(o&&(c=Qw[e]))return c;if(e==="hasOwnProperty")return nv}const a=Reflect.get(t,e,Ht(t)?t:i);return(Li(e)?vf.has(e):ev(e))||(s||zt(t,"get",e),r)?a:Ht(a)?o&&Ia(e)?a:a.value:Se(a)?s?Xa(a):Pf(a):a}}class iv extends xf{constructor(t=!1){super(!1,t)}set(t,e,i,s){let r=t[e];if(!this._isShallow){const c=Ue(r);if(!Wt(i)&&!Ue(i)&&(r=K(r),i=K(i)),!Rt(t)&&Ht(r)&&!Ht(i))return c?!1:(r.value=i,!0)}const o=Rt(t)&&Ia(e)?Number(e)<t.length:vt(t,e),a=Reflect.set(t,e,i,Ht(t)?t:s);return t===K(s)&&(o?cn(i,r)&&hn(t,"set",e,i,r):hn(t,"add",e,i)),a}deleteProperty(t,e){const i=vt(t,e),s=t[e],r=Reflect.deleteProperty(t,e);return r&&i&&hn(t,"delete",e,void 0,s),r}has(t,e){const i=Reflect.has(t,e);return(!Li(e)||!vf.has(e))&&zt(t,"has",e),i}ownKeys(t){return zt(t,"iterate",Rt(t)?"length":Mn),Reflect.ownKeys(t)}}class _f extends xf{constructor(t=!1){super(!0,t)}set(t,e){return{}.NODE_ENV!=="production"&&Fe(`Set operation on key "${String(e)}" failed: target is readonly.`,t),!0}deleteProperty(t,e){return{}.NODE_ENV!=="production"&&Fe(`Delete operation on key "${String(e)}" failed: target is readonly.`,t),!0}}const sv=new iv,rv=new _f,ov=new _f(!0),$a=n=>n,nr=n=>Reflect.getPrototypeOf(n);function av(n,t,e){return function(...i){const s=this.__v_raw,r=K(s),o=Zn(r),a=n==="entries"||n===Symbol.iterator&&o,c=n==="keys"&&o,h=s[n](...i),l=e?$a:t?Wa:Ut;return!t&&zt(r,"iterate",c?Ba:Mn),{next(){const{value:u,done:d}=h.next();return d?{value:u,done:d}:{value:a?[l(u[0]),l(u[1])]:l(u),done:d}},[Symbol.iterator](){return this}}}}function ir(n){return function(...t){if({}.NODE_ENV!=="production"){const e=t[0]?`on key "${t[0]}" `:"";Fe(`${Hw(n)} operation ${e}failed: target is readonly.`,K(this))}return n==="delete"?!1:n==="clear"?void 0:this}}function cv(n,t){const e={get(s){const r=this.__v_raw,o=K(r),a=K(s);n||(cn(s,a)&&zt(o,"get",s),zt(o,"get",a));const{has:c}=nr(o),h=t?$a:n?Wa:Ut;if(c.call(o,s))return h(r.get(s));if(c.call(o,a))return h(r.get(a));r!==o&&r.get(s)},get size(){const s=this.__v_raw;return!n&&zt(K(s),"iterate",Mn),Reflect.get(s,"size",s)},has(s){const r=this.__v_raw,o=K(r),a=K(s);return n||(cn(s,a)&&zt(o,"has",s),zt(o,"has",a)),s===a?r.has(s):r.has(s)||r.has(a)},forEach(s,r){const o=this,a=o.__v_raw,c=K(a),h=t?$a:n?Wa:Ut;return!n&&zt(c,"iterate",Mn),a.forEach((l,u)=>s.call(r,h(l),h(u),o))}};return me(e,n?{add:ir("add"),set:ir("set"),delete:ir("delete"),clear:ir("clear")}:{add(s){!t&&!Wt(s)&&!Ue(s)&&(s=K(s));const r=K(this);return nr(r).has.call(r,s)||(r.add(s),hn(r,"add",s,s)),this},set(s,r){!t&&!Wt(r)&&!Ue(r)&&(r=K(r));const o=K(this),{has:a,get:c}=nr(o);let h=a.call(o,s);h?{}.NODE_ENV!=="production"&&Sf(o,a,s):(s=K(s),h=a.call(o,s));const l=c.call(o,s);return o.set(s,r),h?cn(r,l)&&hn(o,"set",s,r,l):hn(o,"add",s,r),this},delete(s){const r=K(this),{has:o,get:a}=nr(r);let c=o.call(r,s);c?{}.NODE_ENV!=="production"&&Sf(r,o,s):(s=K(s),c=o.call(r,s));const h=a?a.call(r,s):void 0,l=r.delete(s);return c&&hn(r,"delete",s,void 0,h),l},clear(){const s=K(this),r=s.size!==0,o={}.NODE_ENV!=="production"?Zn(s)?new Map(s):new Set(s):void 0,a=s.clear();return r&&hn(s,"clear",void 0,void 0,o),a}}),["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=av(s,n,t)}),e}function Ga(n,t){const e=cv(n,t);return(i,s,r)=>s==="__v_isReactive"?!n:s==="__v_isReadonly"?n:s==="__v_raw"?i:Reflect.get(vt(e,s)&&s in i?e:i,s,r)}const hv={get:Ga(!1,!1)},lv={get:Ga(!0,!1)},uv={get:Ga(!0,!0)};function Sf(n,t,e){const i=K(e);if(i!==e&&t.call(n,i)){const s=hf(n);Fe(`Reactive ${s} contains both the raw and reactive versions of the same object${s==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const Cf=new WeakMap,fv=new WeakMap,Ef=new WeakMap,Tf=new WeakMap;function dv(n){switch(n){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function mv(n){return n.__v_skip||!Object.isExtensible(n)?0:dv(hf(n))}function Pf(n){return Ue(n)?n:ja(n,!1,sv,hv,Cf)}function Xa(n){return ja(n,!0,rv,lv,Ef)}function sr(n){return ja(n,!0,ov,uv,Tf)}function ja(n,t,e,i,s){if(!Se(n))return{}.NODE_ENV!=="production"&&Fe(`value cannot be made ${t?"readonly":"reactive"}: ${String(n)}`),n;if(n.__v_raw&&!(t&&n.__v_isReactive))return n;const r=s.get(n);if(r)return r;const o=mv(n);if(o===0)return n;const a=new Proxy(n,o===2?i:e);return s.set(n,a),a}function ti(n){return Ue(n)?ti(n.__v_raw):!!(n&&n.__v_isReactive)}function Ue(n){return!!(n&&n.__v_isReadonly)}function Wt(n){return!!(n&&n.__v_isShallow)}function pv(n){return n?!!n.__v_raw:!1}function K(n){const t=n&&n.__v_raw;return t?K(t):n}function gv(n){return!vt(n,"__v_skip")&&Object.isExtensible(n)&&qw(n,"__v_skip",!0),n}const Ut=n=>Se(n)?Pf(n):n,Wa=n=>Se(n)?Xa(n):n;function Ht(n){return n?n.__v_isRef===!0:!1}function Af(n){return Mf(n,!1)}function yv(n){return Mf(n,!0)}function Mf(n,t){return Ht(n)?n:new bv(n,t)}class bv{constructor(t,e){this.dep=new Na,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=e?t:K(t),this._value=e?t:Ut(t),this.__v_isShallow=e}get value(){return{}.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(t){const e=this._rawValue,i=this.__v_isShallow||Wt(t)||Ue(t);t=i?t:K(t),cn(t,e)&&(this._rawValue=t,this._value=i?t:Ut(t),{}.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:e}):this.dep.trigger())}}function wv(n){return Ht(n)?n.value:n}const vv={get:(n,t,e)=>t==="__v_raw"?n:wv(Reflect.get(n,t,e)),set:(n,t,e,i)=>{const s=n[t];return Ht(s)&&!Ht(e)?(s.value=e,!0):Reflect.set(n,t,e,i)}};function xv(n){return ti(n)?n:new Proxy(n,vv)}class _v{constructor(t,e,i){this.fn=t,this.setter=e,this._value=void 0,this.dep=new Na(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Fi-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!e,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&et!==this)return ff(this,!0),!0}get value(){const t={}.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return pf(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter?this.setter(t):{}.NODE_ENV!=="production"&&Fe("Write operation failed: computed value is readonly")}}function Sv(n,t,e=!1){let i,s;Lt(n)?i=n:(i=n.get,s=n.set);const r=new _v(i,s,e);return{}.NODE_ENV!=="production"&&t&&!e&&(r.onTrack=t.onTrack,r.onTrigger=t.onTrigger),r}const rr={},or=new WeakMap;let Dn;function Cv(n,t=!1,e=Dn){if(e){let i=or.get(e);i||or.set(e,i=[]),i.push(n)}else({}).NODE_ENV!=="production"&&!t&&Fe("onWatcherCleanup() was called when there was no active watcher to associate with.")}function Ev(n,t,e=ae){const{immediate:i,deep:s,once:r,scheduler:o,augmentJob:a,call:c}=e,h=w=>{(e.onWarn||Fe)("Invalid watch source: ",w,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},l=w=>s?w:Wt(w)||s===!1||s===0?ln(w,1):ln(w);let u,d,f,p,m=!1,v=!1;if(Ht(n)?(d=()=>n.value,m=Wt(n)):ti(n)?(d=()=>l(n),m=!0):Rt(n)?(v=!0,m=n.some(w=>ti(w)||Wt(w)),d=()=>n.map(w=>{if(Ht(w))return w.value;if(ti(w))return l(w);if(Lt(w))return c?c(w,2):w();({}).NODE_ENV!=="production"&&h(w)})):Lt(n)?t?d=c?()=>c(n,2):n:d=()=>{if(f){tr();try{f()}finally{er()}}const w=Dn;Dn=u;try{return c?c(n,3,[p]):n(p)}finally{Dn=w}}:(d=Ri,{}.NODE_ENV!=="production"&&h(n)),t&&s){const w=d,C=s===!0?1/0:s;d=()=>ln(w(),C)}const y=()=>{u.stop()};if(r&&t){const w=t;t=(...C)=>{w(...C),y()}}let b=v?new Array(n.length).fill(rr):rr;const x=w=>{if(!(!(u.flags&1)||!u.dirty&&!w))if(t){const C=u.run();if(s||m||(v?C.some((S,D)=>cn(S,b[D])):cn(C,b))){f&&f();const S=Dn;Dn=u;try{const D=[C,b===rr?void 0:v&&b[0]===rr?[]:b,p];c?c(t,3,D):t(...D),b=C}finally{Dn=S}}}else u.run()};return a&&a(x),u=new Jw(d),u.scheduler=o?()=>o(x,!1):x,p=w=>Cv(w,!1,u),f=u.onStop=()=>{const w=or.get(u);if(w){if(c)c(w,4);else for(const C of w)C();or.delete(u)}},{}.NODE_ENV!=="production"&&(u.onTrack=e.onTrack,u.onTrigger=e.onTrigger),t?i?x(!0):b=u.run():o?o(x.bind(null,!0),!0):u.run(),y.pause=u.pause.bind(u),y.resume=u.resume.bind(u),y.stop=y,y}function ln(n,t=1/0,e){if(t<=0||!Se(n)||n.__v_skip||(e=e||new Set,e.has(n)))return n;if(e.add(n),t--,Ht(n))ln(n.value,t,e);else if(Rt(n))for(let i=0;i<n.length;i++)ln(n[i],t,e);else if(Gw(n)||Zn(n))n.forEach(i=>{ln(i,t,e)});else if(Ww(n)){for(const i in n)ln(n[i],t,e);for(const i of Object.getOwnPropertySymbols(n))Object.prototype.propertyIsEnumerable.call(n,i)&&ln(n[i],t,e)}return n}/**
|
|
40
40
|
* @vue/runtime-core v3.5.13
|
|
41
41
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
42
42
|
* @license MIT
|
|
43
|
-
**/const In=[];function
|
|
43
|
+
**/const In=[];function Tv(n){In.push(n)}function Pv(){In.pop()}let Ha=!1;function Mt(n,...t){if(Ha)return;Ha=!0,tr();const e=In.length?In[In.length-1].component:null,i=e&&e.appContext.config.warnHandler,s=Av();if(i)ar(i,e,11,[n+t.map(r=>{var o,a;return(a=(o=r.toString)==null?void 0:o.call(r))!=null?a:JSON.stringify(r)}).join(""),e&&e.proxy,s.map(({vnode:r})=>`at <${Hf(e,r.type)}>`).join(`
|
|
44
44
|
`),s]);else{const r=[`[Vue warn]: ${n}`,...t];s.length&&r.push(`
|
|
45
|
-
`,...
|
|
46
|
-
`],...Tv(e))}),t}function Tv({vnode:n,recurseCount:t}){const e=t>0?`... (${t} recursive calls)`:"",i=n.component?n.component.parent==null:!1,s=` at <${jf(n.component,n.type,i)}`,r=">"+e;return n.props?[s,...Pv(n.props),r]:[s+r]}function Pv(n){const t=[],e=Object.keys(n);return e.slice(0,3).forEach(i=>{t.push(...Af(i,n[i]))}),e.length>3&&t.push(" ..."),t}function Af(n,t,e){return Ks(t)?(t=JSON.stringify(t),e?t:[`${n}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?e?t:[`${n}=${t}`]:Ht(t)?(t=Af(n,K(t.value),!0),e?t:[`${n}=Ref<`,t,">"]):Lt(t)?[`${n}=fn${t.name?`<${t.name}>`:""}`]:(t=K(t),e?t:[`${n}=`,t])}const Mf={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function ar(n,t,e,i){try{return i?n(...i):n()}catch(s){Ha(s,t,e)}}function Df(n,t,e,i){if(Lt(n)){const s=ar(n,t,e,i);return s&&Vw(s)&&s.catch(r=>{Ha(r,t,e)}),s}if(Rt(n)){const s=[];for(let r=0;r<n.length;r++)s.push(Df(n[r],t,e,i));return s}else({}).NODE_ENV!=="production"&&Mt(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof n}`)}function Ha(n,t,e,i=!0){const s=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||ae;if(t){let a=t.parent;const c=t.proxy,h={}.NODE_ENV!=="production"?Mf[e]:`https://vuejs.org/error-reference/#runtime-${e}`;for(;a;){const l=a.ec;if(l){for(let u=0;u<l.length;u++)if(l[u](n,c,h)===!1)return}a=a.parent}if(r){tr(),ar(r,null,10,[n,c,h]),er();return}}Av(n,e,s,i,o)}function Av(n,t,e,i=!0,s=!1){if({}.NODE_ENV!=="production"){const r=Mf[t];if(e&&_v(e),Mt(`Unhandled error${r?` during execution of ${r}`:""}`),e&&Sv(),i)throw n;console.error(n)}else{if(s)throw n;console.error(n)}}const ce=[];let Ve=-1;const ei=[];let un=null,ni=0;const If=Promise.resolve();let cr=null;const Mv=100;function Of(n){const t=cr||If;return n?t.then(this?n.bind(this):n):t}function Dv(n){let t=Ve+1,e=ce.length;for(;t<e;){const i=t+e>>>1,s=ce[i],r=Vi(s);r<n||r===n&&s.flags&2?t=i+1:e=i}return t}function qa(n){if(!(n.flags&1)){const t=Vi(n),e=ce[ce.length-1];!e||!(n.flags&2)&&t>=Vi(e)?ce.push(n):ce.splice(Dv(t),0,n),n.flags|=1,kf()}}function kf(){cr||(cr=If.then(Lf))}function Rf(n){Rt(n)?ei.push(...n):un&&n.id===-1?un.splice(ni+1,0,n):n.flags&1||(ei.push(n),n.flags|=1),kf()}function Iv(n){if(ei.length){const t=[...new Set(ei)].sort((e,i)=>Vi(e)-Vi(i));if(ei.length=0,un){un.push(...t);return}for(un=t,{}.NODE_ENV!=="production"&&(n=n||new Map),ni=0;ni<un.length;ni++){const e=un[ni];({}).NODE_ENV!=="production"&&zf(n,e)||(e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2)}un=null,ni=0}}const Vi=n=>n.id==null?n.flags&2?-1:1/0:n.id;function Lf(n){({}).NODE_ENV!=="production"&&(n=n||new Map);const t={}.NODE_ENV!=="production"?e=>zf(n,e):Ri;try{for(Ve=0;Ve<ce.length;Ve++){const e=ce[Ve];if(e&&!(e.flags&8)){if({}.NODE_ENV!=="production"&&t(e))continue;e.flags&4&&(e.flags&=-2),ar(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2)}}}finally{for(;Ve<ce.length;Ve++){const e=ce[Ve];e&&(e.flags&=-2)}Ve=-1,ce.length=0,Iv(n),cr=null,(ce.length||ei.length)&&Lf(n)}}function zf(n,t){const e=n.get(t)||0;if(e>Mv){const i=t.i,s=i&&Xf(i.type);return Ha(`Maximum recursive updates exceeded${s?` in component <${s}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return n.set(t,e+1),!1}const Ja=new Map;({}).NODE_ENV!=="production"&&(Qs().__VUE_HMR_RUNTIME__={createRecord:Ka(Ov),rerender:Ka(kv),reload:Ka(Rv)});const hr=new Map;function Ov(n,t){return hr.has(n)?!1:(hr.set(n,{initialDef:lr(t),instances:new Set}),!0)}function lr(n){return tx(n)?n.__vccOpts:n}function kv(n,t){const e=hr.get(n);e&&(e.initialDef.render=t,[...e.instances].forEach(i=>{t&&(i.render=t,lr(i.type).render=t),i.renderCache=[],i.update()}))}function Rv(n,t){const e=hr.get(n);if(!e)return;t=lr(t),Nf(e.initialDef,t);const i=[...e.instances];for(let s=0;s<i.length;s++){const r=i[s],o=lr(r.type);let a=Ja.get(o);a||(o!==e.initialDef&&Nf(o,t),Ja.set(o,a=new Set)),a.add(r),r.appContext.propsCache.delete(r.type),r.appContext.emitsCache.delete(r.type),r.appContext.optionsCache.delete(r.type),r.ceReload?(a.add(r),r.ceReload(t.styles),a.delete(r)):r.parent?qa(()=>{r.parent.update(),a.delete(r)}):r.appContext.reload?r.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),r.root.ce&&r!==r.root&&r.root.ce._removeChildStyle(o)}Rf(()=>{Ja.clear()})}function Nf(n,t){me(n,t);for(const e in n)e!=="__file"&&!(e in t)&&delete n[e]}function Ka(n){return(t,e)=>{try{return n(t,e)}catch(i){console.error(i),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let ur=null;Qs().requestIdleCallback,Qs().cancelIdleCallback;const Za=n=>n?Jv(n)?Kv(n):Za(n.parent):null,Yi=me(Object.create(null),{$:n=>n,$el:n=>n.vnode.el,$data:n=>n.data,$props:n=>({}).NODE_ENV!=="production"?sr(n.props):n.props,$attrs:n=>({}).NODE_ENV!=="production"?sr(n.attrs):n.attrs,$slots:n=>({}).NODE_ENV!=="production"?sr(n.slots):n.slots,$refs:n=>({}).NODE_ENV!=="production"?sr(n.refs):n.refs,$parent:n=>Za(n.parent),$root:n=>Za(n.root),$host:n=>n.ce,$emit:n=>n.emit,$options:n=>Nv(n),$forceUpdate:n=>n.f||(n.f=()=>{qa(n.update)}),$nextTick:n=>n.n||(n.n=Of.bind(n.proxy)),$watch:n=>jv.bind(n)}),Lv=n=>n==="_"||n==="$",Qa=(n,t)=>n!==ae&&!n.__isScriptSetup&&vt(n,t),zv={get({_:n},t){if(t==="__v_skip")return!0;const{ctx:e,setupState:i,data:s,props:r,accessCache:o,type:a,appContext:c}=n;if({}.NODE_ENV!=="production"&&t==="__isVue")return!0;let h;if(t[0]!=="$"){const f=o[t];if(f!==void 0)switch(f){case 1:return i[t];case 2:return s[t];case 4:return e[t];case 3:return r[t]}else{if(Qa(i,t))return o[t]=1,i[t];if(s!==ae&&vt(s,t))return o[t]=2,s[t];if((h=n.propsOptions[0])&&vt(h,t))return o[t]=3,r[t];if(e!==ae&&vt(e,t))return o[t]=4,e[t];o[t]=0}}const l=Yi[t];let u,d;if(l)return t==="$attrs"?zt(n.attrs,"get",""):{}.NODE_ENV!=="production"&&t==="$slots"&&zt(n,"get",t),l(n);if((u=a.__cssModules)&&(u=u[t]))return u;if(e!==ae&&vt(e,t))return o[t]=4,e[t];if(d=c.config.globalProperties,vt(d,t))return d[t];({}).NODE_ENV!=="production"&&ur&&(!Ks(t)||t.indexOf("__v")!==0)&&(s!==ae&&Lv(t[0])&&vt(s,t)?Mt(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):n===ur&&Mt(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:n},t,e){const{data:i,setupState:s,ctx:r}=n;return Qa(s,t)?(s[t]=e,!0):{}.NODE_ENV!=="production"&&s.__isScriptSetup&&vt(s,t)?(Mt(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):i!==ae&&vt(i,t)?(i[t]=e,!0):vt(n.props,t)?({}.NODE_ENV!=="production"&&Mt(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in n?({}.NODE_ENV!=="production"&&Mt(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):({}.NODE_ENV!=="production"&&t in n.appContext.config.globalProperties?Object.defineProperty(r,t,{enumerable:!0,configurable:!0,value:e}):r[t]=e,!0)},has({_:{data:n,setupState:t,accessCache:e,ctx:i,appContext:s,propsOptions:r}},o){let a;return!!e[o]||n!==ae&&vt(n,o)||Qa(t,o)||(a=r[0])&&vt(a,o)||vt(i,o)||vt(Yi,o)||vt(s.config.globalProperties,o)},defineProperty(n,t,e){return e.get!=null?n._.accessCache[t]=0:vt(e,"value")&&this.set(n,t,e.value,null),Reflect.defineProperty(n,t,e)}};({}).NODE_ENV!=="production"&&(zv.ownKeys=n=>(Mt("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(n)));function Ff(n){return Rt(n)?n.reduce((t,e)=>(t[e]=null,t),{}):n}function Nv(n){const t=n.type,{mixins:e,extends:i}=t,{mixins:s,optionsCache:r,config:{optionMergeStrategies:o}}=n.appContext,a=r.get(t);let c;return a?c=a:!s.length&&!e&&!i?c=t:(c={},s.length&&s.forEach(h=>fr(c,h,o,!0)),fr(c,t,o)),Se(t)&&r.set(t,c),c}function fr(n,t,e,i=!1){const{mixins:s,extends:r}=t;r&&fr(n,r,e,!0),s&&s.forEach(o=>fr(n,o,e,!0));for(const o in t)if(i&&o==="expose")({}).NODE_ENV!=="production"&&Mt('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=Fv[o]||e&&e[o];n[o]=a?a(n[o],t[o]):t[o]}return n}const Fv={data:Bf,props:Vf,emits:Vf,methods:$i,computed:$i,beforeCreate:Vt,created:Vt,beforeMount:Vt,mounted:Vt,beforeUpdate:Vt,updated:Vt,beforeDestroy:Vt,beforeUnmount:Vt,destroyed:Vt,unmounted:Vt,activated:Vt,deactivated:Vt,errorCaptured:Vt,serverPrefetch:Vt,components:$i,directives:$i,watch:Uv,provide:Bf,inject:Bv};function Bf(n,t){return t?n?function(){return me(Lt(n)?n.call(this,this):n,Lt(t)?t.call(this,this):t)}:t:n}function Bv(n,t){return $i(Uf(n),Uf(t))}function Uf(n){if(Rt(n)){const t={};for(let e=0;e<n.length;e++)t[n[e]]=n[e];return t}return n}function Vt(n,t){return n?[...new Set([].concat(n,t))]:t}function $i(n,t){return n?me(Object.create(null),n,t):t}function Vf(n,t){return n?Rt(n)&&Rt(t)?[...new Set([...n,...t])]:me(Object.create(null),Ff(n),Ff(t??{})):t}function Uv(n,t){if(!n)return t;if(!t)return n;const e=me(Object.create(null),n);for(const i in t)e[i]=Vt(n[i],t[i]);return e}let Vv=null;function Yf(n,t,e=!1){const i=Gi||ur;if(i||Vv){const s=i?i.parent==null?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(s&&n in s)return s[n];if(arguments.length>1)return e&&Lt(t)?t.call(i&&i.proxy):t;({}).NODE_ENV!=="production"&&Mt(`injection "${String(n)}" not found.`)}else({}).NODE_ENV!=="production"&&Mt("inject() can only be used inside setup() or functional components.")}const Yv=Hv,$v=Symbol.for("v-scx"),Gv=()=>{{const n=Yf($v);return n||{}.NODE_ENV!=="production"&&Mt("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),n}};function Xv(n,t,e){return{}.NODE_ENV!=="production"&&!Lt(t)&&Mt("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),$f(n,t,e)}function $f(n,t,e=ae){const{immediate:i,deep:s,flush:r,once:o}=e;({}).NODE_ENV!=="production"&&!t&&(i!==void 0&&Mt('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),s!==void 0&&Mt('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&Mt('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const a=me({},e);({}).NODE_ENV!=="production"&&(a.onWarn=Mt);const c=t&&i||!t&&r!=="post";let h;if(dr){if(r==="sync"){const f=Gv();h=f.__watcherHandles||(f.__watcherHandles=[])}else if(!c){const f=()=>{};return f.stop=Ri,f.resume=Ri,f.pause=Ri,f}}const l=Gi;a.call=(f,p,m)=>Df(f,l,p,m);let u=!1;r==="post"?a.scheduler=f=>{Yv(f,l&&l.suspense)}:r!=="sync"&&(u=!0,a.scheduler=(f,p)=>{p?f():qa(f)}),a.augmentJob=f=>{t&&(f.flags|=4),u&&(f.flags|=2,l&&(f.id=l.uid,f.i=l))};const d=xv(n,t,a);return dr&&(h?h.push(d):c&&d()),d}function jv(n,t,e){const i=this.proxy,s=Ks(n)?n.includes(".")?Wv(i,n):()=>i[n]:n.bind(i,i);let r;Lt(t)?r=t:(r=t.handler,e=t);const o=qv(this),a=$f(s,r.bind(i),e);return o(),a}function Wv(n,t){const e=t.split(".");return()=>{let i=n;for(let s=0;s<e.length&&i;s++)i=i[e[s]];return i}}function Hv(n,t){t&&t.pendingBranch?Rt(n)?t.effects.push(...n):t.effects.push(n):Rf(n)}let Gi=null;const Gf=()=>Gi||ur;let tc;{const n=Qs(),t=(e,i)=>{let s;return(s=n[e])||(s=n[e]=[]),s.push(i),r=>{s.length>1?s.forEach(o=>o(r)):s[0](r)}};tc=t("__VUE_INSTANCE_SETTERS__",e=>Gi=e),t("__VUE_SSR_SETTERS__",e=>dr=e)}const qv=n=>{const t=Gi;return tc(n),n.scope.on(),()=>{n.scope.off(),tc(t)}};function Jv(n){return n.vnode.shapeFlag&4}let dr=!1;function Kv(n){return n.exposed?n.exposeProxy||(n.exposeProxy=new Proxy(yv(fv(n.exposed)),{get(t,e){if(e in t)return t[e];if(e in Yi)return Yi[e](n)},has(t,e){return e in t||e in Yi}})):n.proxy}const Zv=/(?:^|[-_])(\w)/g,Qv=n=>n.replace(Zv,t=>t.toUpperCase()).replace(/[-_]/g,"");function Xf(n,t=!0){return Lt(n)?n.displayName||n.name:n.name||t&&n.__name}function jf(n,t,e=!1){let i=Xf(t);if(!i&&t.__file){const s=t.__file.match(/([^/\\]+)\.\w+$/);s&&(i=s[1])}if(!i&&n&&n.parent){const s=r=>{for(const o in r)if(r[o]===t)return o};i=s(n.components||n.parent.type.components)||s(n.appContext.components)}return i?Qv(i):e?"App":"Anonymous"}function tx(n){return Lt(n)&&"__vccOpts"in n}const Wf=(n,t)=>{const e=wv(n,t,dr);if({}.NODE_ENV!=="production"){const i=Gf();i&&i.appContext.config.warnRecursiveComputed&&(e._warnRecursive=!0)}return e};function ex(){if({}.NODE_ENV==="production"||typeof window>"u")return;const n={style:"color:#3ba776"},t={style:"color:#1677ff"},e={style:"color:#f5222d"},i={style:"color:#eb2f96"},s={__vue_custom_formatter:!0,header(u){return Se(u)?u.__isVue?["div",n,"VueInstance"]:Ht(u)?["div",{},["span",n,l(u)],"<",a("_value"in u?u._value:u),">"]:ti(u)?["div",{},["span",n,Wt(u)?"ShallowReactive":"Reactive"],"<",a(u),`>${Ue(u)?" (readonly)":""}`]:Ue(u)?["div",{},["span",n,Wt(u)?"ShallowReadonly":"Readonly"],"<",a(u),">"]:null:null},hasBody(u){return u&&u.__isVue},body(u){if(u&&u.__isVue)return["div",{},...r(u.$)]}};function r(u){const d=[];u.type.props&&u.props&&d.push(o("props",K(u.props))),u.setupState!==ae&&d.push(o("setup",u.setupState)),u.data!==ae&&d.push(o("data",K(u.data)));const f=c(u,"computed");f&&d.push(o("computed",f));const p=c(u,"inject");return p&&d.push(o("injected",p)),d.push(["div",{},["span",{style:i.style+";opacity:0.66"},"$ (internal): "],["object",{object:u}]]),d}function o(u,d){return d=me({},d),Object.keys(d).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},u],["div",{style:"padding-left:1.25em"},...Object.keys(d).map(f=>["div",{},["span",i,f+": "],a(d[f],!1)])]]:["span",{}]}function a(u,d=!0){return typeof u=="number"?["span",t,u]:typeof u=="string"?["span",e,JSON.stringify(u)]:typeof u=="boolean"?["span",i,u]:Se(u)?["object",{object:d?K(u):u}]:["span",e,String(u)]}function c(u,d){const f=u.type;if(Lt(f))return;const p={};for(const m in u.ctx)h(f,m,d)&&(p[m]=u.ctx[m]);return p}function h(u,d,f){const p=u[f];if(Rt(p)&&p.includes(d)||Se(p)&&d in p||u.extends&&h(u.extends,d,f)||u.mixins&&u.mixins.some(m=>h(m,d,f)))return!0}function l(u){return Wt(u)?"ShallowRef":u.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(s):window.devtoolsFormatters=[s]}/**
|
|
45
|
+
`,...Mv(s)),console.warn(...r)}er(),Ha=!1}function Av(){let n=In[In.length-1];if(!n)return[];const t=[];for(;n;){const e=t[0];e&&e.vnode===n?e.recurseCount++:t.push({vnode:n,recurseCount:0});const i=n.component&&n.component.parent;n=i&&i.vnode}return t}function Mv(n){const t=[];return n.forEach((e,i)=>{t.push(...i===0?[]:[`
|
|
46
|
+
`],...Dv(e))}),t}function Dv({vnode:n,recurseCount:t}){const e=t>0?`... (${t} recursive calls)`:"",i=n.component?n.component.parent==null:!1,s=` at <${Hf(n.component,n.type,i)}`,r=">"+e;return n.props?[s,...Iv(n.props),r]:[s+r]}function Iv(n){const t=[],e=Object.keys(n);return e.slice(0,3).forEach(i=>{t.push(...Df(i,n[i]))}),e.length>3&&t.push(" ..."),t}function Df(n,t,e){return Ks(t)?(t=JSON.stringify(t),e?t:[`${n}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?e?t:[`${n}=${t}`]:Ht(t)?(t=Df(n,K(t.value),!0),e?t:[`${n}=Ref<`,t,">"]):Lt(t)?[`${n}=fn${t.name?`<${t.name}>`:""}`]:(t=K(t),e?t:[`${n}=`,t])}const If={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function ar(n,t,e,i){try{return i?n(...i):n()}catch(s){qa(s,t,e)}}function Of(n,t,e,i){if(Lt(n)){const s=ar(n,t,e,i);return s&&Xw(s)&&s.catch(r=>{qa(r,t,e)}),s}if(Rt(n)){const s=[];for(let r=0;r<n.length;r++)s.push(Of(n[r],t,e,i));return s}else({}).NODE_ENV!=="production"&&Mt(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof n}`)}function qa(n,t,e,i=!0){const s=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||ae;if(t){let a=t.parent;const c=t.proxy,h={}.NODE_ENV!=="production"?If[e]:`https://vuejs.org/error-reference/#runtime-${e}`;for(;a;){const l=a.ec;if(l){for(let u=0;u<l.length;u++)if(l[u](n,c,h)===!1)return}a=a.parent}if(r){tr(),ar(r,null,10,[n,c,h]),er();return}}Ov(n,e,s,i,o)}function Ov(n,t,e,i=!0,s=!1){if({}.NODE_ENV!=="production"){const r=If[t];if(e&&Tv(e),Mt(`Unhandled error${r?` during execution of ${r}`:""}`),e&&Pv(),i)throw n;console.error(n)}else{if(s)throw n;console.error(n)}}const ce=[];let Ve=-1;const ei=[];let un=null,ni=0;const kf=Promise.resolve();let cr=null;const kv=100;function Rf(n){const t=cr||kf;return n?t.then(this?n.bind(this):n):t}function Rv(n){let t=Ve+1,e=ce.length;for(;t<e;){const i=t+e>>>1,s=ce[i],r=Vi(s);r<n||r===n&&s.flags&2?t=i+1:e=i}return t}function Ja(n){if(!(n.flags&1)){const t=Vi(n),e=ce[ce.length-1];!e||!(n.flags&2)&&t>=Vi(e)?ce.push(n):ce.splice(Rv(t),0,n),n.flags|=1,Lf()}}function Lf(){cr||(cr=kf.then(Nf))}function zf(n){Rt(n)?ei.push(...n):un&&n.id===-1?un.splice(ni+1,0,n):n.flags&1||(ei.push(n),n.flags|=1),Lf()}function Lv(n){if(ei.length){const t=[...new Set(ei)].sort((e,i)=>Vi(e)-Vi(i));if(ei.length=0,un){un.push(...t);return}for(un=t,{}.NODE_ENV!=="production"&&(n=n||new Map),ni=0;ni<un.length;ni++){const e=un[ni];({}).NODE_ENV!=="production"&&Ff(n,e)||(e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2)}un=null,ni=0}}const Vi=n=>n.id==null?n.flags&2?-1:1/0:n.id;function Nf(n){({}).NODE_ENV!=="production"&&(n=n||new Map);const t={}.NODE_ENV!=="production"?e=>Ff(n,e):Ri;try{for(Ve=0;Ve<ce.length;Ve++){const e=ce[Ve];if(e&&!(e.flags&8)){if({}.NODE_ENV!=="production"&&t(e))continue;e.flags&4&&(e.flags&=-2),ar(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2)}}}finally{for(;Ve<ce.length;Ve++){const e=ce[Ve];e&&(e.flags&=-2)}Ve=-1,ce.length=0,Lv(n),cr=null,(ce.length||ei.length)&&Nf(n)}}function Ff(n,t){const e=n.get(t)||0;if(e>kv){const i=t.i,s=i&&Wf(i.type);return qa(`Maximum recursive updates exceeded${s?` in component <${s}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return n.set(t,e+1),!1}const Ka=new Map;({}).NODE_ENV!=="production"&&(Qs().__VUE_HMR_RUNTIME__={createRecord:Za(zv),rerender:Za(Nv),reload:Za(Fv)});const hr=new Map;function zv(n,t){return hr.has(n)?!1:(hr.set(n,{initialDef:lr(t),instances:new Set}),!0)}function lr(n){return sx(n)?n.__vccOpts:n}function Nv(n,t){const e=hr.get(n);e&&(e.initialDef.render=t,[...e.instances].forEach(i=>{t&&(i.render=t,lr(i.type).render=t),i.renderCache=[],i.update()}))}function Fv(n,t){const e=hr.get(n);if(!e)return;t=lr(t),Bf(e.initialDef,t);const i=[...e.instances];for(let s=0;s<i.length;s++){const r=i[s],o=lr(r.type);let a=Ka.get(o);a||(o!==e.initialDef&&Bf(o,t),Ka.set(o,a=new Set)),a.add(r),r.appContext.propsCache.delete(r.type),r.appContext.emitsCache.delete(r.type),r.appContext.optionsCache.delete(r.type),r.ceReload?(a.add(r),r.ceReload(t.styles),a.delete(r)):r.parent?Ja(()=>{r.parent.update(),a.delete(r)}):r.appContext.reload?r.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),r.root.ce&&r!==r.root&&r.root.ce._removeChildStyle(o)}zf(()=>{Ka.clear()})}function Bf(n,t){me(n,t);for(const e in n)e!=="__file"&&!(e in t)&&delete n[e]}function Za(n){return(t,e)=>{try{return n(t,e)}catch(i){console.error(i),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let ur=null;Qs().requestIdleCallback,Qs().cancelIdleCallback;const Qa=n=>n?tx(n)?ex(n):Qa(n.parent):null,Yi=me(Object.create(null),{$:n=>n,$el:n=>n.vnode.el,$data:n=>n.data,$props:n=>({}).NODE_ENV!=="production"?sr(n.props):n.props,$attrs:n=>({}).NODE_ENV!=="production"?sr(n.attrs):n.attrs,$slots:n=>({}).NODE_ENV!=="production"?sr(n.slots):n.slots,$refs:n=>({}).NODE_ENV!=="production"?sr(n.refs):n.refs,$parent:n=>Qa(n.parent),$root:n=>Qa(n.root),$host:n=>n.ce,$emit:n=>n.emit,$options:n=>Vv(n),$forceUpdate:n=>n.f||(n.f=()=>{Ja(n.update)}),$nextTick:n=>n.n||(n.n=Rf.bind(n.proxy)),$watch:n=>Jv.bind(n)}),Bv=n=>n==="_"||n==="$",tc=(n,t)=>n!==ae&&!n.__isScriptSetup&&vt(n,t),Uv={get({_:n},t){if(t==="__v_skip")return!0;const{ctx:e,setupState:i,data:s,props:r,accessCache:o,type:a,appContext:c}=n;if({}.NODE_ENV!=="production"&&t==="__isVue")return!0;let h;if(t[0]!=="$"){const f=o[t];if(f!==void 0)switch(f){case 1:return i[t];case 2:return s[t];case 4:return e[t];case 3:return r[t]}else{if(tc(i,t))return o[t]=1,i[t];if(s!==ae&&vt(s,t))return o[t]=2,s[t];if((h=n.propsOptions[0])&&vt(h,t))return o[t]=3,r[t];if(e!==ae&&vt(e,t))return o[t]=4,e[t];o[t]=0}}const l=Yi[t];let u,d;if(l)return t==="$attrs"?zt(n.attrs,"get",""):{}.NODE_ENV!=="production"&&t==="$slots"&&zt(n,"get",t),l(n);if((u=a.__cssModules)&&(u=u[t]))return u;if(e!==ae&&vt(e,t))return o[t]=4,e[t];if(d=c.config.globalProperties,vt(d,t))return d[t];({}).NODE_ENV!=="production"&&ur&&(!Ks(t)||t.indexOf("__v")!==0)&&(s!==ae&&Bv(t[0])&&vt(s,t)?Mt(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):n===ur&&Mt(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:n},t,e){const{data:i,setupState:s,ctx:r}=n;return tc(s,t)?(s[t]=e,!0):{}.NODE_ENV!=="production"&&s.__isScriptSetup&&vt(s,t)?(Mt(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):i!==ae&&vt(i,t)?(i[t]=e,!0):vt(n.props,t)?({}.NODE_ENV!=="production"&&Mt(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in n?({}.NODE_ENV!=="production"&&Mt(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):({}.NODE_ENV!=="production"&&t in n.appContext.config.globalProperties?Object.defineProperty(r,t,{enumerable:!0,configurable:!0,value:e}):r[t]=e,!0)},has({_:{data:n,setupState:t,accessCache:e,ctx:i,appContext:s,propsOptions:r}},o){let a;return!!e[o]||n!==ae&&vt(n,o)||tc(t,o)||(a=r[0])&&vt(a,o)||vt(i,o)||vt(Yi,o)||vt(s.config.globalProperties,o)},defineProperty(n,t,e){return e.get!=null?n._.accessCache[t]=0:vt(e,"value")&&this.set(n,t,e.value,null),Reflect.defineProperty(n,t,e)}};({}).NODE_ENV!=="production"&&(Uv.ownKeys=n=>(Mt("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(n)));function Uf(n){return Rt(n)?n.reduce((t,e)=>(t[e]=null,t),{}):n}function Vv(n){const t=n.type,{mixins:e,extends:i}=t,{mixins:s,optionsCache:r,config:{optionMergeStrategies:o}}=n.appContext,a=r.get(t);let c;return a?c=a:!s.length&&!e&&!i?c=t:(c={},s.length&&s.forEach(h=>fr(c,h,o,!0)),fr(c,t,o)),Se(t)&&r.set(t,c),c}function fr(n,t,e,i=!1){const{mixins:s,extends:r}=t;r&&fr(n,r,e,!0),s&&s.forEach(o=>fr(n,o,e,!0));for(const o in t)if(i&&o==="expose")({}).NODE_ENV!=="production"&&Mt('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=Yv[o]||e&&e[o];n[o]=a?a(n[o],t[o]):t[o]}return n}const Yv={data:Vf,props:$f,emits:$f,methods:$i,computed:$i,beforeCreate:Vt,created:Vt,beforeMount:Vt,mounted:Vt,beforeUpdate:Vt,updated:Vt,beforeDestroy:Vt,beforeUnmount:Vt,destroyed:Vt,unmounted:Vt,activated:Vt,deactivated:Vt,errorCaptured:Vt,serverPrefetch:Vt,components:$i,directives:$i,watch:Gv,provide:Vf,inject:$v};function Vf(n,t){return t?n?function(){return me(Lt(n)?n.call(this,this):n,Lt(t)?t.call(this,this):t)}:t:n}function $v(n,t){return $i(Yf(n),Yf(t))}function Yf(n){if(Rt(n)){const t={};for(let e=0;e<n.length;e++)t[n[e]]=n[e];return t}return n}function Vt(n,t){return n?[...new Set([].concat(n,t))]:t}function $i(n,t){return n?me(Object.create(null),n,t):t}function $f(n,t){return n?Rt(n)&&Rt(t)?[...new Set([...n,...t])]:me(Object.create(null),Uf(n),Uf(t??{})):t}function Gv(n,t){if(!n)return t;if(!t)return n;const e=me(Object.create(null),n);for(const i in t)e[i]=Vt(n[i],t[i]);return e}let Xv=null;function Gf(n,t,e=!1){const i=Gi||ur;if(i||Xv){const s=i?i.parent==null?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(s&&n in s)return s[n];if(arguments.length>1)return e&&Lt(t)?t.call(i&&i.proxy):t;({}).NODE_ENV!=="production"&&Mt(`injection "${String(n)}" not found.`)}else({}).NODE_ENV!=="production"&&Mt("inject() can only be used inside setup() or functional components.")}const jv=Zv,Wv=Symbol.for("v-scx"),Hv=()=>{{const n=Gf(Wv);return n||{}.NODE_ENV!=="production"&&Mt("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),n}};function qv(n,t,e){return{}.NODE_ENV!=="production"&&!Lt(t)&&Mt("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),Xf(n,t,e)}function Xf(n,t,e=ae){const{immediate:i,deep:s,flush:r,once:o}=e;({}).NODE_ENV!=="production"&&!t&&(i!==void 0&&Mt('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),s!==void 0&&Mt('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&Mt('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const a=me({},e);({}).NODE_ENV!=="production"&&(a.onWarn=Mt);const c=t&&i||!t&&r!=="post";let h;if(dr){if(r==="sync"){const f=Hv();h=f.__watcherHandles||(f.__watcherHandles=[])}else if(!c){const f=()=>{};return f.stop=Ri,f.resume=Ri,f.pause=Ri,f}}const l=Gi;a.call=(f,p,m)=>Of(f,l,p,m);let u=!1;r==="post"?a.scheduler=f=>{jv(f,l&&l.suspense)}:r!=="sync"&&(u=!0,a.scheduler=(f,p)=>{p?f():Ja(f)}),a.augmentJob=f=>{t&&(f.flags|=4),u&&(f.flags|=2,l&&(f.id=l.uid,f.i=l))};const d=Ev(n,t,a);return dr&&(h?h.push(d):c&&d()),d}function Jv(n,t,e){const i=this.proxy,s=Ks(n)?n.includes(".")?Kv(i,n):()=>i[n]:n.bind(i,i);let r;Lt(t)?r=t:(r=t.handler,e=t);const o=Qv(this),a=Xf(s,r.bind(i),e);return o(),a}function Kv(n,t){const e=t.split(".");return()=>{let i=n;for(let s=0;s<e.length&&i;s++)i=i[e[s]];return i}}function Zv(n,t){t&&t.pendingBranch?Rt(n)?t.effects.push(...n):t.effects.push(n):zf(n)}let Gi=null;const jf=()=>Gi||ur;let ec;{const n=Qs(),t=(e,i)=>{let s;return(s=n[e])||(s=n[e]=[]),s.push(i),r=>{s.length>1?s.forEach(o=>o(r)):s[0](r)}};ec=t("__VUE_INSTANCE_SETTERS__",e=>Gi=e),t("__VUE_SSR_SETTERS__",e=>dr=e)}const Qv=n=>{const t=Gi;return ec(n),n.scope.on(),()=>{n.scope.off(),ec(t)}};function tx(n){return n.vnode.shapeFlag&4}let dr=!1;function ex(n){return n.exposed?n.exposeProxy||(n.exposeProxy=new Proxy(xv(gv(n.exposed)),{get(t,e){if(e in t)return t[e];if(e in Yi)return Yi[e](n)},has(t,e){return e in t||e in Yi}})):n.proxy}const nx=/(?:^|[-_])(\w)/g,ix=n=>n.replace(nx,t=>t.toUpperCase()).replace(/[-_]/g,"");function Wf(n,t=!0){return Lt(n)?n.displayName||n.name:n.name||t&&n.__name}function Hf(n,t,e=!1){let i=Wf(t);if(!i&&t.__file){const s=t.__file.match(/([^/\\]+)\.\w+$/);s&&(i=s[1])}if(!i&&n&&n.parent){const s=r=>{for(const o in r)if(r[o]===t)return o};i=s(n.components||n.parent.type.components)||s(n.appContext.components)}return i?ix(i):e?"App":"Anonymous"}function sx(n){return Lt(n)&&"__vccOpts"in n}const qf=(n,t)=>{const e=Sv(n,t,dr);if({}.NODE_ENV!=="production"){const i=jf();i&&i.appContext.config.warnRecursiveComputed&&(e._warnRecursive=!0)}return e};function rx(){if({}.NODE_ENV==="production"||typeof window>"u")return;const n={style:"color:#3ba776"},t={style:"color:#1677ff"},e={style:"color:#f5222d"},i={style:"color:#eb2f96"},s={__vue_custom_formatter:!0,header(u){return Se(u)?u.__isVue?["div",n,"VueInstance"]:Ht(u)?["div",{},["span",n,l(u)],"<",a("_value"in u?u._value:u),">"]:ti(u)?["div",{},["span",n,Wt(u)?"ShallowReactive":"Reactive"],"<",a(u),`>${Ue(u)?" (readonly)":""}`]:Ue(u)?["div",{},["span",n,Wt(u)?"ShallowReadonly":"Readonly"],"<",a(u),">"]:null:null},hasBody(u){return u&&u.__isVue},body(u){if(u&&u.__isVue)return["div",{},...r(u.$)]}};function r(u){const d=[];u.type.props&&u.props&&d.push(o("props",K(u.props))),u.setupState!==ae&&d.push(o("setup",u.setupState)),u.data!==ae&&d.push(o("data",K(u.data)));const f=c(u,"computed");f&&d.push(o("computed",f));const p=c(u,"inject");return p&&d.push(o("injected",p)),d.push(["div",{},["span",{style:i.style+";opacity:0.66"},"$ (internal): "],["object",{object:u}]]),d}function o(u,d){return d=me({},d),Object.keys(d).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},u],["div",{style:"padding-left:1.25em"},...Object.keys(d).map(f=>["div",{},["span",i,f+": "],a(d[f],!1)])]]:["span",{}]}function a(u,d=!0){return typeof u=="number"?["span",t,u]:typeof u=="string"?["span",e,JSON.stringify(u)]:typeof u=="boolean"?["span",i,u]:Se(u)?["object",{object:d?K(u):u}]:["span",e,String(u)]}function c(u,d){const f=u.type;if(Lt(f))return;const p={};for(const m in u.ctx)h(f,m,d)&&(p[m]=u.ctx[m]);return p}function h(u,d,f){const p=u[f];if(Rt(p)&&p.includes(d)||Se(p)&&d in p||u.extends&&h(u.extends,d,f)||u.mixins&&u.mixins.some(m=>h(m,d,f)))return!0}function l(u){return Wt(u)?"ShallowRef":u.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(s):window.devtoolsFormatters=[s]}/**
|
|
47
47
|
* vue v3.5.13
|
|
48
48
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
49
49
|
* @license MIT
|
|
50
|
-
**/function
|
|
50
|
+
**/function ox(){rx()}({}).NODE_ENV!=="production"&&ox();function ax(n){const[t,e]=tt.useState(n),i=tt.useRef(t),s=tt.useRef(po()),r=tt.useCallback(o=>{e(a=>{const c=typeof o=="function"?o(a):o;return Object.is(a,c)?a:(i.current=c,s.current.emit(c),c)})},[]);return tt.useMemo(()=>({getState:()=>i.current,setState:r,subscribe:o=>{wn(()=>o(i.current));const a=s.current.subscribe(c=>{wn(()=>o(c))});return()=>a()}}),[])}function cx(n){const t=Af(n),e=po();return{getState:()=>t.value,setState:s=>{const r=typeof s=="function"?s(t.value):s;Object.is(t.value,r)||(t.value=r,e.emit(r))},subscribe:s=>(wn(()=>s(t.value)),e.subscribe(r=>{wn(()=>s(r))}))}}function hx(n){const t=new Ns(n);return{getState:()=>t.value,setState:e=>{const i=t.value,s=typeof e=="function"?e(i):e;Object.is(i,s)||t.next(s)},subscribe:e=>{const i=t.subscribe(s=>{wn(()=>e(s))});return()=>i.unsubscribe()}}}function nc(n,t){let e=n;const i=po();return{getState:()=>e,setState:s=>{const r=typeof s=="function"?s(e):s;Object.is(e,r)||t?.beforeChange&&!t.beforeChange(r)||(e=r,i.emit(e))},subscribe:s=>{wn(()=>s(e));const r=i.subscribe(o=>{wn(()=>s(o))});return()=>r()}}}function Jf(n){const t=n.initState||{};let e=n.reducer;if(n.enhancer)return n.enhancer(Jf)({reducer:e,initState:t});const i=nc(t),s=o=>{const a=e(i.getState(),o);i.setState(a)},r=o=>{e=o,s({type:Symbol()})};return s({type:Symbol()}),{getState:i.getState,dispatch:s,subscribe:i.subscribe,replaceReducer:r}}function lx(n,t=!0){const e=Object.keys(n);return(i={},s)=>{const r=t?{...i}:i;for(const o of e){const a=n[o](r[o]??{},s);if(a===void 0)throw new Error(`Reducer "${o}" returned undefined`);r[o]=a}return r}}function ux(...n){return t=>e=>{const i=t(e);let s=i.dispatch;const r={getState:i.getState,dispatch:s},o=n.map(a=>a(r));return s=lg(...o)(s),i.dispatch=s,i}}function fx(n){const t=new Ns(void 0),e=new Re;let i=null,s=!1,r=!1;return{middleware(o){return s?a=>a:(s=!0,t.next(o.getState()),a=>c=>{const h=a(c);return t.next(o.getState()),e.next(c),h})},run(o,a){if(!s)throw new Error("EpicMiddleware should applyMiddleware() to store before");if(r)throw new Error("EpicMiddleware destroyed");return i||(i=o(e,t,{...n?.dependencies??{},dispatch:a.dispatch}).pipe(Lu((c,h)=>(_g("[Epic Error]",c),h))).subscribe({next(c){a.dispatch(c)},error(c){console.error("[Epic Fatal Error]",c)}}),i)},destroy(){r=!0,i?.unsubscribe(),i=null,e.complete(),t.complete()}}}function dx(...n){return(t,e,i)=>Bs(...n.map(s=>s(t,e,i)))}function mx(...n){return fa(t=>n.includes(t.type))}function px(){return{middleware(n){return t=>e=>typeof e=="function"?e(n.dispatch,n.getState):t(e)}}}const gx=n=>{let t=0;return e=>i=>{Qh.start(`--- ${++t}: action(${String(i.type)}) ---`),Je(`action: ${ps(i)}`),Je(`old-state: ${ps(n.getState())}`),e(i),Je(`new-state: ${ps(n.getState())}`),Qh.end()}},yx=n=>t=>e=>{try{t(e)}catch(i){throw Je(`Reducer错误报告: ${i}`),i}},bx=n=>t=>e=>{const i=`dispatch(${String(e.type)}) execute time`;tl.start(i),t(e),tl.end(i)};function vx(n="",t){const{OPERATION_DELIMITER:e="/",KEY_DELIMITER:i=",",KEY_VALUE_DELIMITER:s=":"}=t||{};return n.split(e).filter(r=>r!=="").reduce((r,o)=>{const[a,...c]=o.split(i);if(c.length===0){const[h,l]=a.split(s);r.push({type:h,payload:l!==void 0?decodeURIComponent(l):!0})}else{if(a.indexOf(s)!==-1)throw new Error(`"${a}" is invalid`);r.push(c.reduce((h,l)=>{const[u,d]=l.split(s);return h[u]=d!==void 0?decodeURIComponent(d):!0,h},{type:a}))}return r},[])}var ic={exports:{}},sc={},mr={exports:{}},rc={};/**
|
|
51
51
|
* @license React
|
|
52
52
|
* use-sync-external-store-shim.production.js
|
|
53
53
|
*
|
|
@@ -55,7 +55,7 @@ Content-Type: `+f.type+`\r
|
|
|
55
55
|
*
|
|
56
56
|
* This source code is licensed under the MIT license found in the
|
|
57
57
|
* LICENSE file in the root directory of this source tree.
|
|
58
|
-
*/var
|
|
58
|
+
*/var Kf;function xx(){if(Kf)return rc;Kf=1;var n=tt;function t(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var e=typeof Object.is=="function"?Object.is:t,i=n.useState,s=n.useEffect,r=n.useLayoutEffect,o=n.useDebugValue;function a(u,d){var f=d(),p=i({inst:{value:f,getSnapshot:d}}),m=p[0].inst,v=p[1];return r(function(){m.value=f,m.getSnapshot=d,c(m)&&v({inst:m})},[u,f,d]),s(function(){return c(m)&&v({inst:m}),u(function(){c(m)&&v({inst:m})})},[u]),o(f),f}function c(u){var d=u.getSnapshot;u=u.value;try{var f=d();return!e(u,f)}catch{return!0}}function h(u,d){return d()}var l=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:a;return rc.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:l,rc}var oc={};/**
|
|
59
59
|
* @license React
|
|
60
60
|
* use-sync-external-store-shim.development.js
|
|
61
61
|
*
|
|
@@ -63,7 +63,7 @@ Content-Type: `+f.type+`\r
|
|
|
63
63
|
*
|
|
64
64
|
* This source code is licensed under the MIT license found in the
|
|
65
65
|
* LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/var
|
|
66
|
+
*/var Zf;function _x(){return Zf||(Zf=1,{}.NODE_ENV!=="production"&&function(){function n(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}function t(f,p){l||s.startTransition===void 0||(l=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=p();if(!u){var v=p();r(m,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),u=!0)}v=o({inst:{value:m,getSnapshot:p}});var y=v[0].inst,b=v[1];return c(function(){y.value=m,y.getSnapshot=p,e(y)&&b({inst:y})},[f,m,p]),a(function(){return e(y)&&b({inst:y}),f(function(){e(y)&&b({inst:y})})},[f]),h(m),m}function e(f){var p=f.getSnapshot;f=f.value;try{var m=p();return!r(f,m)}catch{return!0}}function i(f,p){return p()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var s=tt,r=typeof Object.is=="function"?Object.is:n,o=s.useState,a=s.useEffect,c=s.useLayoutEffect,h=s.useDebugValue,l=!1,u=!1,d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?i:t;oc.useSyncExternalStore=s.useSyncExternalStore!==void 0?s.useSyncExternalStore:d,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),oc}var Qf;function td(){return Qf||(Qf=1,{}.NODE_ENV==="production"?mr.exports=xx():mr.exports=_x()),mr.exports}/**
|
|
67
67
|
* @license React
|
|
68
68
|
* use-sync-external-store-shim/with-selector.production.js
|
|
69
69
|
*
|
|
@@ -71,7 +71,7 @@ Content-Type: `+f.type+`\r
|
|
|
71
71
|
*
|
|
72
72
|
* This source code is licensed under the MIT license found in the
|
|
73
73
|
* LICENSE file in the root directory of this source tree.
|
|
74
|
-
*/var
|
|
74
|
+
*/var ed;function Sx(){if(ed)return sc;ed=1;var n=tt,t=td();function e(h,l){return h===l&&(h!==0||1/h===1/l)||h!==h&&l!==l}var i=typeof Object.is=="function"?Object.is:e,s=t.useSyncExternalStore,r=n.useRef,o=n.useEffect,a=n.useMemo,c=n.useDebugValue;return sc.useSyncExternalStoreWithSelector=function(h,l,u,d,f){var p=r(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function y(S){if(!b){if(b=!0,x=S,S=d(S),f!==void 0&&m.hasValue){var D=m.value;if(f(D,S))return w=D}return w=S}if(D=w,i(x,S))return D;var L=d(S);return f!==void 0&&f(D,L)?(x=S,D):(x=S,w=L)}var b=!1,x,w,C=u===void 0?null:u;return[function(){return y(l())},C===null?void 0:function(){return y(C())}]},[l,u,d,f]);var v=s(h,p[0],p[1]);return o(function(){m.hasValue=!0,m.value=v},[v]),c(v),v},sc}var ac={};/**
|
|
75
75
|
* @license React
|
|
76
76
|
* use-sync-external-store-shim/with-selector.development.js
|
|
77
77
|
*
|
|
@@ -79,24 +79,18 @@ Content-Type: `+f.type+`\r
|
|
|
79
79
|
*
|
|
80
80
|
* This source code is licensed under the MIT license found in the
|
|
81
81
|
* LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/var td;function vx(){return td||(td=1,{}.NODE_ENV!=="production"&&function(){function n(h,l){return h===l&&(h!==0||1/h===1/l)||h!==h&&l!==l}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=tt,e=Zf(),i=typeof Object.is=="function"?Object.is:n,s=e.useSyncExternalStore,r=t.useRef,o=t.useEffect,a=t.useMemo,c=t.useDebugValue;oc.useSyncExternalStoreWithSelector=function(h,l,u,d,f){var p=r(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function y(S){if(!b){if(b=!0,x=S,S=d(S),f!==void 0&&m.hasValue){var D=m.value;if(f(D,S))return w=D}return w=S}if(D=w,i(x,S))return D;var L=d(S);return f!==void 0&&f(D,L)?(x=S,D):(x=S,w=L)}var b=!1,x,w,C=u===void 0?null:u;return[function(){return y(l())},C===null?void 0:function(){return y(C())}]},[l,u,d,f]);var v=s(h,p[0],p[1]);return o(function(){m.hasValue=!0,m.value=v},[v]),c(v),v},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),oc}({}).NODE_ENV==="production"?nc.exports=bx():nc.exports=vx();var xx=nc.exports;function _x(n){const t=tt.createContext(null);function e({children:a}){return React.createElement(t.Provider,{value:n},a)}function i(){const a=tt.useContext(t);if(!a)throw new ReferenceError("createReactAppStoreContext's hooks cannot be called outside of AppStoreProvider");return a}function s(a,c){const h=i(),l=u=>h.subscribe(()=>u());return a?xx.useSyncExternalStoreWithSelector(l,h.getState,h.getState,a,c):tt.useSyncExternalStore(l,h.getState,h.getState)}function r(){const a=i();if(cs(a))throw new Error("useSetAppState is only supported for StateStoreLike");return a.setState.bind(a)}function o(){const a=i();if(!cs(a))throw new Error("useDispatch is only supported for ReduxStore");return a.dispatch.bind(a)}return{AppStoreProvider:e,useAppStore:i,useAppState:s,useSetAppState:r,useDispatch:o}}function Sx(n){const e=tt.useRef(li(n.value)).current;if(!e&&!("defaultValue"in n))throw new Error("defaultValue is required in uncontrolled mode");if(e&&!("onChange"in n))throw new Error("onChange is required in controlled mode");const[i,s]=tt.useState(()=>e?n.value:n.defaultValue),r=e?n.value:i,o=tt.useRef(r);o.current=r;const a=tt.useRef(!1);tt.useEffect(()=>{!a.current&&li(n.value)!==e&&(a.current=!0,console.warn("[useReactControllableState] can't switch between controlled and uncontrolled mode."))},[n.value]);const c=tt.useRef(n.beforeChange);c.current=n.beforeChange;const h=tt.useRef(n.onChange);h.current=n.onChange;const l=tt.useRef(0),u=tt.useCallback(async d=>{const f=++l.current,p=typeof d=="function"?d(o.current):d;c.current&&!await c.current(p)||f===l.current&&(e||s(p),h.current?.(p))},[]);return[r,u]}var ed=Symbol.for("immer-nothing"),nd=Symbol.for("immer-draftable"),Yt=Symbol.for("immer-state"),Cx={}.NODE_ENV!=="production"?[function(n){return`The plugin for '${n}' has not been loaded into Immer. To enable the plugin, import and call \`enable${n}()\` when initializing your application.`},function(n){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${n}'`},"This object has been frozen and should not be mutated",function(n){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+n},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(n){return`'current' expects a draft, got: ${n}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(n){return`'original' expects a draft, got: ${n}`}]:[];function te(n,...t){if({}.NODE_ENV!=="production"){const e=Cx[n],i=On(e)?e.apply(null,t):e;throw new Error(`[Immer] ${i}`)}throw new Error(`[Immer] minified error nr: ${n}. Full error at: https://bit.ly/3cXEKWf`)}var ee=Object,ii=ee.getPrototypeOf,pr="constructor",gr="prototype",ac="configurable",yr="enumerable",br="writable",Xi="value",fn=n=>!!n&&!!n[Yt];function Ye(n){return n?sd(n)||xr(n)||!!n[nd]||!!n[pr]?.[nd]||_r(n)||Sr(n):!1}var Ex=ee[gr][pr].toString(),id=new WeakMap;function sd(n){if(!n||!hc(n))return!1;const t=ii(n);if(t===null||t===ee[gr])return!0;const e=ee.hasOwnProperty.call(t,pr)&&t[pr];if(e===Object)return!0;if(!On(e))return!1;let i=id.get(e);return i===void 0&&(i=Function.toString.call(e),id.set(e,i)),i===Ex}function wr(n,t,e=!0){ji(n)===0?(e?Reflect.ownKeys(n):ee.keys(n)).forEach(s=>{t(s,n[s],n)}):n.forEach((i,s)=>t(s,i,n))}function ji(n){const t=n[Yt];return t?t.type_:xr(n)?1:_r(n)?2:Sr(n)?3:0}var rd=(n,t,e=ji(n))=>e===2?n.has(t):ee[gr].hasOwnProperty.call(n,t),cc=(n,t,e=ji(n))=>e===2?n.get(t):n[t],vr=(n,t,e,i=ji(n))=>{i===2?n.set(t,e):i===3?n.add(e):n[t]=e};function Tx(n,t){return n===t?n!==0||1/n===1/t:n!==n&&t!==t}var xr=Array.isArray,_r=n=>n instanceof Map,Sr=n=>n instanceof Set,hc=n=>typeof n=="object",On=n=>typeof n=="function",lc=n=>typeof n=="boolean";function Px(n){const t=+n;return Number.isInteger(t)&&String(t)===n}var $e=n=>n.copy_||n.base_,uc=n=>n.modified_?n.copy_:n.base_;function fc(n,t){if(_r(n))return new Map(n);if(Sr(n))return new Set(n);if(xr(n))return Array[gr].slice.call(n);const e=sd(n);if(t===!0||t==="class_only"&&!e){const i=ee.getOwnPropertyDescriptors(n);delete i[Yt];let s=Reflect.ownKeys(i);for(let r=0;r<s.length;r++){const o=s[r],a=i[o];a[br]===!1&&(a[br]=!0,a[ac]=!0),(a.get||a.set)&&(i[o]={[ac]:!0,[br]:!0,[yr]:a[yr],[Xi]:n[o]})}return ee.create(ii(n),i)}else{const i=ii(n);if(i!==null&&e)return{...n};const s=ee.create(i);return ee.assign(s,n)}}function Wi(n,t=!1){return Er(n)||fn(n)||!Ye(n)||(ji(n)>1&&ee.defineProperties(n,{set:Cr,add:Cr,clear:Cr,delete:Cr}),ee.freeze(n),t&&wr(n,(e,i)=>{Wi(i,!0)},!1)),n}function Ax(){te(2)}var Cr={[Xi]:Ax};function Er(n){return n===null||!hc(n)?!0:ee.isFrozen(n)}var Tr="MapSet",dc="Patches",od="ArrayMethods",ad={};function kn(n){const t=ad[n];return t||te(0,n),t}var cd=n=>!!ad[n],Hi,hd=()=>Hi,Mx=(n,t)=>({drafts_:[],parent_:n,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:cd(Tr)?kn(Tr):void 0,arrayMethodsPlugin_:cd(od)?kn(od):void 0});function ld(n,t){t&&(n.patchPlugin_=kn(dc),n.patches_=[],n.inversePatches_=[],n.patchListener_=t)}function mc(n){pc(n),n.drafts_.forEach(Dx),n.drafts_=null}function pc(n){n===Hi&&(Hi=n.parent_)}var ud=n=>Hi=Mx(Hi,n);function Dx(n){const t=n[Yt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function fd(n,t){t.unfinalizedDrafts_=t.drafts_.length;const e=t.drafts_[0];if(n!==void 0&&n!==e){e[Yt].modified_&&(mc(t),te(4)),Ye(n)&&(n=dd(t,n));const{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(e[Yt].base_,n,t)}else n=dd(t,e);return Ix(t,n,!0),mc(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),n!==ed?n:void 0}function dd(n,t){if(Er(t))return t;const e=t[Yt];if(!e)return Ar(t,n.handledSet_,n);if(!Pr(e,n))return t;if(!e.modified_)return e.base_;if(!e.finalized_){const{callbacks_:i}=e;if(i)for(;i.length>0;)i.pop()(n);gd(e,n)}return e.copy_}function Ix(n,t,e=!1){!n.parent_&&n.immer_.autoFreeze_&&n.canAutoFreeze_&&Wi(t,e)}function md(n){n.finalized_=!0,n.scope_.unfinalizedDrafts_--}var Pr=(n,t)=>n.scope_===t,Ox=[];function pd(n,t,e,i){const s=$e(n),r=n.type_;if(i!==void 0&&cc(s,i,r)===t){vr(s,i,e,r);return}if(!n.draftLocations_){const a=n.draftLocations_=new Map;wr(s,(c,h)=>{if(fn(h)){const l=a.get(h)||[];l.push(c),a.set(h,l)}})}const o=n.draftLocations_.get(t)??Ox;for(const a of o)vr(s,a,e,r)}function kx(n,t,e){n.callbacks_.push(function(s){const r=t;if(!r||!Pr(r,s))return;s.mapSetPlugin_?.fixSetContents(r);const o=uc(r);pd(n,r.draft_??r,o,e),gd(r,s)})}function gd(n,t){if(n.modified_&&!n.finalized_&&(n.type_===3||n.type_===1&&n.allIndicesReassigned_||(n.assigned_?.size??0)>0)){const{patchPlugin_:i}=t;if(i){const s=i.getPath(n);s&&i.generatePatches_(n,s,t)}md(n)}}function Rx(n,t,e){const{scope_:i}=n;if(fn(e)){const s=e[Yt];Pr(s,i)&&s.callbacks_.push(function(){Dr(n);const o=uc(s);pd(n,e,o,t)})}else Ye(e)&&n.callbacks_.push(function(){const r=$e(n);n.type_===3?r.has(e)&&Ar(e,i.handledSet_,i):cc(r,t,n.type_)===e&&i.drafts_.length>1&&(n.assigned_.get(t)??!1)===!0&&n.copy_&&Ar(cc(n.copy_,t,n.type_),i.handledSet_,i)})}function Ar(n,t,e){return!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||fn(n)||t.has(n)||!Ye(n)||Er(n)||(t.add(n),wr(n,(i,s)=>{if(fn(s)){const r=s[Yt];if(Pr(r,e)){const o=uc(r);vr(n,i,o,n.type_),md(r)}}else Ye(s)&&Ar(s,t,e)})),n}function Lx(n,t){const e=xr(n),i={type_:e?1:0,scope_:t?t.scope_:hd(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:n,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let s=i,r=Mr;e&&(s=[i],r=qi);const{revoke:o,proxy:a}=Proxy.revocable(s,r);return i.draft_=a,i.revoke_=o,[a,i]}var Mr={get(n,t){if(t===Yt)return n;let e=n.scope_.arrayMethodsPlugin_;const i=n.type_===1&&typeof t=="string";if(i&&e?.isArrayOperationMethod(t))return e.createMethodInterceptor(n,t);const s=$e(n);if(!rd(s,t,n.type_))return zx(n,s,t);const r=s[t];if(n.finalized_||!Ye(r)||i&&n.operationMethod&&e?.isMutatingArrayMethod(n.operationMethod)&&Px(t))return r;if(r===gc(n.base_,t)){Dr(n);const o=n.type_===1?+t:t,a=bc(n.scope_,r,n,o);return n.copy_[o]=a}return r},has(n,t){return t in $e(n)},ownKeys(n){return Reflect.ownKeys($e(n))},set(n,t,e){const i=yd($e(n),t);if(i?.set)return i.set.call(n.draft_,e),!0;if(!n.modified_){const s=gc($e(n),t),r=s?.[Yt];if(r&&r.base_===e)return n.copy_[t]=e,n.assigned_.set(t,!1),!0;if(Tx(e,s)&&(e!==void 0||rd(n.base_,t,n.type_)))return!0;Dr(n),yc(n)}return n.copy_[t]===e&&(e!==void 0||t in n.copy_)||Number.isNaN(e)&&Number.isNaN(n.copy_[t])||(n.copy_[t]=e,n.assigned_.set(t,!0),Rx(n,t,e)),!0},deleteProperty(n,t){return Dr(n),gc(n.base_,t)!==void 0||t in n.base_?(n.assigned_.set(t,!1),yc(n)):n.assigned_.delete(t),n.copy_&&delete n.copy_[t],!0},getOwnPropertyDescriptor(n,t){const e=$e(n),i=Reflect.getOwnPropertyDescriptor(e,t);return i&&{[br]:!0,[ac]:n.type_!==1||t!=="length",[yr]:i[yr],[Xi]:e[t]}},defineProperty(){te(11)},getPrototypeOf(n){return ii(n.base_)},setPrototypeOf(){te(12)}},qi={};for(let n in Mr){let t=Mr[n];qi[n]=function(){const e=arguments;return e[0]=e[0][0],t.apply(this,e)}}qi.deleteProperty=function(n,t){return{}.NODE_ENV!=="production"&&isNaN(parseInt(t))&&te(13),qi.set.call(this,n,t,void 0)},qi.set=function(n,t,e){return{}.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&te(14),Mr.set.call(this,n[0],t,e,n[0])};function gc(n,t){const e=n[Yt];return(e?$e(e):n)[t]}function zx(n,t,e){const i=yd(t,e);return i?Xi in i?i[Xi]:i.get?.call(n.draft_):void 0}function yd(n,t){if(!(t in n))return;let e=ii(n);for(;e;){const i=Object.getOwnPropertyDescriptor(e,t);if(i)return i;e=ii(e)}}function yc(n){n.modified_||(n.modified_=!0,n.parent_&&yc(n.parent_))}function Dr(n){n.copy_||(n.assigned_=new Map,n.copy_=fc(n.base_,n.scope_.immer_.useStrictShallowCopy_))}var Nx=class{constructor(n){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,e,i)=>{if(On(t)&&!On(e)){const r=e;e=t;const o=this;return function(c=r,...h){return o.produce(c,l=>e.call(this,l,...h))}}On(e)||te(6),i!==void 0&&!On(i)&&te(7);let s;if(Ye(t)){const r=ud(this),o=bc(r,t,void 0);let a=!0;try{s=e(o),a=!1}finally{a?mc(r):pc(r)}return ld(r,i),fd(s,r)}else if(!t||!hc(t)){if(s=e(t),s===void 0&&(s=t),s===ed&&(s=void 0),this.autoFreeze_&&Wi(s,!0),i){const r=[],o=[];kn(dc).generateReplacementPatches_(t,s,{patches_:r,inversePatches_:o}),i(r,o)}return s}else te(1,t)},this.produceWithPatches=(t,e)=>{if(On(t))return(o,...a)=>this.produceWithPatches(o,c=>t(c,...a));let i,s;return[this.produce(t,e,(o,a)=>{i=o,s=a}),i,s]},lc(n?.autoFreeze)&&this.setAutoFreeze(n.autoFreeze),lc(n?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(n.useStrictShallowCopy),lc(n?.useStrictIteration)&&this.setUseStrictIteration(n.useStrictIteration)}createDraft(n){Ye(n)||te(8),fn(n)&&(n=Fx(n));const t=ud(this),e=bc(t,n,void 0);return e[Yt].isManual_=!0,pc(t),e}finishDraft(n,t){const e=n&&n[Yt];(!e||!e.isManual_)&&te(9);const{scope_:i}=e;return ld(i,t),fd(void 0,i)}setAutoFreeze(n){this.autoFreeze_=n}setUseStrictShallowCopy(n){this.useStrictShallowCopy_=n}setUseStrictIteration(n){this.useStrictIteration_=n}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(n,t){let e;for(e=t.length-1;e>=0;e--){const s=t[e];if(s.path.length===0&&s.op==="replace"){n=s.value;break}}e>-1&&(t=t.slice(e+1));const i=kn(dc).applyPatches_;return fn(n)?i(n,t):this.produce(n,s=>i(s,t))}};function bc(n,t,e,i){const[s,r]=_r(t)?kn(Tr).proxyMap_(t,e):Sr(t)?kn(Tr).proxySet_(t,e):Lx(t,e);return(e?.scope_??hd()).drafts_.push(s),r.callbacks_=e?.callbacks_??[],r.key_=i,e&&i!==void 0?kx(e,r,i):r.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(r);const{patchPlugin_:h}=c;r.modified_&&h&&h.generatePatches_(r,[],c)}),s}function Fx(n){return fn(n)||te(10,n),bd(n)}function bd(n){if(!Ye(n)||Er(n))return n;const t=n[Yt];let e,i=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,e=fc(n,t.scope_.immer_.useStrictShallowCopy_),i=t.scope_.immer_.shouldUseStrictIteration()}else e=fc(n,!0);return wr(e,(s,r)=>{vr(e,s,bd(r))},i),t&&(t.finalized_=!1),e}var Bx=new Nx,wd=Bx.produce;function Ux(n){const[t,e]=tt.useState(()=>Wi(typeof n=="function"?n():n,!0));return[t,tt.useCallback(i=>{e(typeof i=="function"?wd(i):Wi(i))},[])]}function Vx(n,t,e){const i=tt.useMemo(()=>wd(n),[n]);return tt.useReducer(i,t,e)}function Yx(n){const[t,e]=tt.useState({width:0,height:0});return tt.useLayoutEffect(()=>{n.current&&e(()=>({width:n.current.offsetWidth,height:n.current.offsetHeight}))},[n]),t}function $x(n){const t=Symbol("AppStore");function e(){const c=dv(n.getState());n.subscribe(u=>{c.value=u});const h=Gf();if(!h)throw new Error("provideAppStore must be called in setup()");const l={store:n,stateRef:c};h.appContext.provides[t]=l}function i(){const c=Yf(t);if(!c)throw new ReferenceError("createVueAppStoreContext's hooks cannot be called before provideAppStore()");return c}function s(){const{store:c}=i();return c}function r(c){const{stateRef:h}=i();return c?Wf(()=>c(h.value)):Ga(h)}function o(){const c=s();if(cs(c))throw new Error("useSetAppState is only supported for StateStoreLike");return c.setState.bind(c)}function a(){const c=s();if(!cs(c))throw new Error("useDispatch is only supported for ReduxStore");return c.dispatch.bind(c)}return{provideAppStore:e,useAppStore:s,useAppState:r,useSetAppState:o,useDispatch:a}}function Gx(n){const t=n.value(),e=li(t);if(!e&&!("defaultValue"in n))throw new Error("defaultValue is required in uncontrolled mode");if(e&&!("onChange"in n))throw new Error("onChange is required in controlled mode");const i=Tf(e?t:n.defaultValue),s=Wf(()=>e?n.value():i.value);let r=!1;Xv(n.value,c=>{if(!r&&li(c)!==e){r=!0,console.warn("[useVueControllableState] can't switch between controlled and uncontrolled mode.");return}},{});let o=0;async function a(c){const h=++o,l=typeof c=="function"?c(s.value):c;n.beforeChange&&!await n.beforeChange(l)||h===o&&(e||(i.value=l),n.onChange?.(l),await Of())}return[s,a]}let wc=class{x;y;toX;toY;constructor(t){this.x=G(t?.x||0,2),this.y=G(t?.y||0,2),this.toX=G(t?.toX||0,2),this.toY=G(t?.toY||0,2)}toSVGPathData(){return[["L",this.toX,this.toY]]}toCanvasContext(t){t.lineTo(this.toX,this.toY)}getBoundingClientRect(t=2){const e=Qt(this.x,this.y,this.toX,this.toY);if(e===0){const i=Math.min(this.x,this.toX),s=Math.min(this.y,this.toY),r=Math.max(this.x,this.toX),o=Math.max(this.y,this.toY);return{x:i,y:s,width:r-i,height:o-s}}else{const i=Math.sin(e),s=Math.cos(e),r=s*this.x-i*this.y,o=s*this.toX-i*this.toY,a=s*this.y+i*this.x,c=s*this.toY+i*this.toX;return{x:G(Math.min(r,o),t),y:G(Math.min(a,c),t),width:G(Math.max(r,o)-Math.min(r,o),t),height:G(Math.max(a,c)-Math.min(a,c),t)}}}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,i=this.y,s=t.toX,r=t.toY,o=this.toX-e,a=t.x-s;if(!o&&!a)return null;const c=(this.toY-i)/o,h=(t.y-r)/a;if(o){if(!a)return{x:s,y:c*(s-e)+i}}else return{x:e,y:h*(e-s)+r};const l=(-h*s+r+c*e-i)/(c-h),u=c*(l-e)+i;return isNaN(l)||isNaN(u)?null:{x:l,y:u}}};class vc extends wc{rx;ry;xAxisRotate;largeArcFlag;sweepFlag;constructor(t){super(t),this.rx=G(t.rx,2),this.ry=G(t.ry,2),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}toSVGPathData(){return[["A",this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag,this.toX,this.toY]]}toCanvasContext(t){const[e,i,s,r,o,a,c]=this.convert(this.x,this.y,this.toX,this.toY,this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag);t.ellipse(e,i,s,r,o,a,c,!this.sweepFlag)}convert(t,e,i,s,r,o,a,c,h){const l=a/180*Math.PI,u=(t-i)/2,d=(e-s)/2,f=Math.cos(l)*u+Math.sin(l)*d,p=-Math.sin(l)*u+Math.cos(l)*d,m=f*f/(r*r)+p*p/(o*o);if(m>1){const U=Math.sqrt(m);throw r=U*r,o=U*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)),y=c!=h?1:-1,b=y*v*r*p/o,x=y*v*-o*f/r,w=(t+i)/2,C=(e+s)/2,S=Math.cos(l)*b-Math.sin(l)*x+w,D=Math.sin(l)*b+Math.cos(l)*x+C,L=(U,X,Z,at)=>(U*at>=X*Z?1:-1)*Math.acos((U*Z+X*at)/(Math.sqrt(U*U+X*X)*Math.sqrt(Z*Z+at*at))),I=L(1,0,t-S,e-D)-l,F=L(t-S,e-D,i-S,s-D);return[S,D,r,o,l,I,I+F]}}class Xx extends wc{cx;cy;isLineThrough;constructor(t){super(t),this.cx=G(t.cx,2),this.cy=G(t.cy,2),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,i=this.cy*2-(this.y+this.toY)/2;t.quadraticCurveTo(e,i,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}getBoundingClientRect(t=2){const e=[this.x,this.toX],i=[this.y,this.toY];let s,r,o,a;for(let l=0;l<2;++l)s=l==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,r=l==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,o=l==0?this.x:this.y,Math.abs(s)>1e-12&&(a=-r/(2*s),0<a&&a<1&&[e,i][l].push(s*a*a+r*a+o));const c={x:Math.min(0,...e),y:Math.min(0,...i)},h={x:Math.max(0,...e),y:Math.max(0,...i)};return{x:G(c.x,t),y:G(c.y,t),width:G(h.x-c.x,t),height:G(h.y-c.y,t)}}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 jx=Xx;class Dt extends wc{c1x;c1y;c2x;c2y;constructor(t){super(t),this.c1x=G(t.c1x,2),this.c1y=G(t.c1y,2),this.c2x=G(t.c2x,2),this.c2y=G(t.c2y,2)}clone(){return new Dt({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(t=2){let e=this.c2x-2*this.c1x+this.x-(this.toX-2*this.c2x+this.c1x),i=2*(this.c1x-this.x)-2*(this.c2x-this.c1x),s=this.x-this.c1x,r=(-i+Math.sqrt(i*i-4*e*s))/2/e,o=(-i-Math.sqrt(i*i-4*e*s))/2/e;const a=[this.y,this.toY],c=[this.x,this.toX];let h;const l=[];Math.abs(r)>1e12&&(r=.5),Math.abs(o)>1e12&&(o=.5),r>=0&&r<=1&&(h=this.interpolate(r),c.push(h.x),a.push(h.y),l.push({X:h.x,Y:h.y})),o>=0&&o<=1&&(h=this.interpolate(o),c.push(h.x),a.push(h.y),l.push({X:h.x,Y:h.y})),e=this.c2y-2*this.c1y+this.y-(this.toY-2*this.c2y+this.c1y),i=2*(this.c1y-this.y)-2*(this.c2y-this.c1y),s=this.y-this.c1y,r=(-i+Math.sqrt(i*i-4*e*s))/2/e,o=(-i-Math.sqrt(i*i-4*e*s))/2/e,Math.abs(r)>1e12&&(r=.5),Math.abs(o)>1e12&&(o=.5),r>=0&&r<=1&&(h=this.interpolate(r),c.push(h.x),a.push(h.y),l.push({X:h.x,Y:h.y})),o>=0&&o<=1&&(h=this.interpolate(o),c.push(h.x),a.push(h.y),l.push({X:h.x,Y:h.y}));const u=[],d=l.length;for(let m=0;m<d;m++){for(let v=m+1;v<d;v++)l[m].X===l[v].X&&l[m].Y===l[v].Y&&(v=++m);u.push({X:l[m].X,Y:l[m].Y})}const f={x:Math.min(...c),y:Math.min(...a)},p={x:Math.max(...c),y:Math.max(...a)};return{x:G(f.x,t),y:G(f.y,t),width:G(p.x-f.x,t),height:G(p.y-f.y,t),dots:u}}static base3(t,e,i,s,r){const o=-3*e+9*i-9*s+3*r,a=t*o+6*e-12*i+6*s;return t*a-3*e+3*i}static bezlen(t,e,i,s,r,o,a,c,h=1){h=Math.max(0,Math.min(h,1));const l=h/2,u=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let f=0;for(let p=0;p<12;p++){const m=l*u[p]+l,v=Dt.base3(m,t,i,r,a),y=Dt.base3(m,e,s,o,c);f+=d[p]*Math.sqrt(v*v+y*y)}return l*f}length(t=1){return Dt.bezlen(this.x,this.y,this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY,t)}getPointAtSegmentLength(t){const e=this.getTatLen(t),i=1-e,s=Math.pow(i,3),r=Math.pow(i,2),o=e*e,a=o*e,c=s*this.x+r*3*e*this.c1x+i*3*e*e*this.c2x+a*this.toX,h=s*this.y+r*3*e*this.c1y+i*3*e*e*this.c2y+a*this.toY,l=this.x+2*e*(this.c1x-this.x)+o*(this.c2x-2*this.c1x+this.x),u=this.y+2*e*(this.c1y-this.y)+o*(this.c2y-2*this.c1y+this.y),d=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=i*this.x+e*this.c1x,m=i*this.y+e*this.c1y,v=i*this.c2x+e*this.toX,y=i*this.c2y+e*this.toY,b=90-Math.atan2(l-d,u-f)*180/Math.PI;return{x:c,y:h,m:{x:l,y:u},n:{x:d,y:f},start:{x:p,y:m},end:{x:v,y},alpha:b}}getTatLen(t){const e=this.x,i=this.y,s=this.c1x,r=this.c1y,o=this.c2x,a=this.c2y,c=this.toX,h=this.toY;if(t<0||Dt.bezlen(e,i,s,r,o,a,c,h)<t)return 0;const l=1;let u=l/2,d=l-u,f=Dt.bezlen(e,i,s,r,o,a,c,h,d);for(;Math.abs(f-t)>.01;)u/=2,d+=(f<t?1:-1)*u,f=Dt.bezlen(e,i,s,r,o,a,c,h,d);return d}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}}}class vd extends po{source;raw="";mode="text";tagname="";nodename="";textchunk="";entity="";quote="";attrs={};constructor(t){super(),this.source=t}parse(){const t=gp(this.source);if(t===0){this.emit("finish");return}let e,i,s=Oh(this.source,0);for(let r=1;r<t;r++)e=i,i=s,s=Oh(this.source,r),this.raw+=i,i&&this.step(i,s,e);s&&this.step(s,void 0,i),this.emit("finish")}step(t,e,i){t==`
|
|
83
|
-
`&&this.emit("newline"),this.act(t,e,i)}act(t,e,i){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":Ae("whitespace",t)?(this.textchunk+=
|
|
84
|
-
`);i=~H?z.length-H:i+z.length}function r(){var z={line:e,column:i};return function(R){return R.position=new o(z),p(),R}}function o(z){this.start=z,this.end={line:e,column:i},this.source=t.source}o.prototype.content=n;var a=[];function c(z){var R=new Error(t.source+":"+e+":"+i+": "+z);if(R.reason=z,R.filename=t.source,R.line=e,R.column=i,R.source=n,t.silent)a.push(R);else throw R}function h(){var z=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:z,parsingErrors:a}}}function l(){return f(/^{\s*/)}function u(){return f(/^}/)}function d(){var z,R=[];for(p(),m(R);n.length&&n.charAt(0)!="}"&&(z=Q()||St());)z!==!1&&(R.push(z),m(R));return R}function f(z){var R=z.exec(n);if(R){var H=R[0];return s(H),n=n.slice(H.length),R}}function p(){f(/^\s*/)}function m(z){var R;for(z=z||[];R=v();)R!==!1&&z.push(R);return z}function v(){var z=r();if(!(n.charAt(0)!="/"||n.charAt(1)!="*")){for(var R=2;n.charAt(R)!=""&&(n.charAt(R)!="*"||n.charAt(R+1)!="/");)++R;if(R+=2,n.charAt(R-1)==="")return c("End of comment missing");var H=n.slice(2,R-2);return i+=2,s(H),n=n.slice(R),i+=2,z({type:"comment",comment:H})}}function y(){var z=f(/^([^{]+)/);if(z)return Ge(z[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(R){return R.replace(/,/g,"")}).split(/\s*(?![^(]*\)),\s*/).map(function(R){return R.replace(/\u200C/g,",")})}function b(){var z=r(),R=f(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(R){if(R=Ge(R[0]),!f(/^:\s*/))return c("property missing ':'");var H=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/),ot=z({type:"declaration",property:R.replace(_d,""),value:H?Ge(H[0]).replace(_d,""):""});return f(/^[;\s]*/),ot}}function x(){var z=[];if(!l())return c("missing '{'");m(z);for(var R;R=b();)R!==!1&&(z.push(R),m(z));return u()?z:c("missing '}'")}function w(){for(var z,R=[],H=r();z=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)R.push(z[1]),f(/^,\s*/);if(R.length)return H({type:"keyframe",values:R,declarations:x()})}function C(){var z=r(),R=f(/^@([-\w]+)?keyframes\s*/);if(R){var H=R[1];if(R=f(/^([-\w]+)\s*/),!R)return c("@keyframes missing name");var ot=R[1];if(!l())return c("@keyframes missing '{'");for(var Xt,ye=m();Xt=w();)ye.push(Xt),ye=ye.concat(m());return u()?z({type:"keyframes",name:ot,vendor:H,keyframes:ye}):c("@keyframes missing '}'")}}function S(){var z=r(),R=f(/^@supports *([^{]+)/);if(R){var H=Ge(R[1]);if(!l())return c("@supports missing '{'");var ot=m().concat(d());return u()?z({type:"supports",supports:H,rules:ot}):c("@supports missing '}'")}}function D(){var z=r(),R=f(/^@host\s*/);if(R){if(!l())return c("@host missing '{'");var H=m().concat(d());return u()?z({type:"host",rules:H}):c("@host missing '}'")}}function L(){var z=r(),R=f(/^@media *([^{]+)/);if(R){var H=Ge(R[1]);if(!l())return c("@media missing '{'");var ot=m().concat(d());return u()?z({type:"media",media:H,rules:ot}):c("@media missing '}'")}}function I(){var z=r(),R=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(R)return z({type:"custom-media",name:Ge(R[1]),media:Ge(R[2])})}function F(){var z=r(),R=f(/^@page */);if(R){var H=y()||[];if(!l())return c("@page missing '{'");for(var ot=m(),Xt;Xt=b();)ot.push(Xt),ot=ot.concat(m());return u()?z({type:"page",selectors:H,declarations:ot}):c("@page missing '}'")}}function U(){var z=r(),R=f(/^@([-\w]+)?document *([^{]+)/);if(R){var H=Ge(R[1]),ot=Ge(R[2]);if(!l())return c("@document missing '{'");var Xt=m().concat(d());return u()?z({type:"document",document:ot,vendor:H,rules:Xt}):c("@document missing '}'")}}function X(){var z=r(),R=f(/^@font-face\s*/);if(R){if(!l())return c("@font-face missing '{'");for(var H=m(),ot;ot=b();)H.push(ot),H=H.concat(m());return u()?z({type:"font-face",declarations:H}):c("@font-face missing '}'")}}var Z=rt("import"),at=rt("charset"),nt=rt("namespace");function rt(z){var R=new RegExp("^@"+z+"\\s*([^;]+);");return function(){var H=r(),ot=f(R);if(ot){var Xt={type:z};return Xt[z]=ot[1].trim(),H(Xt)}}}function Q(){if(n[0]=="@")return C()||L()||I()||S()||Z()||at()||nt()||U()||F()||D()||X()}function St(){var z=r(),R=y();return R?(m(),z({type:"rule",selectors:R,declarations:x()})):c("selector missing")}return xc(h())}function Ge(n){return n?n.replace(/^\s+|\s+$/g,""):""}function xc(n,t){var e=n&&typeof n.type=="string",i=e?n:t;for(var s in n){var r=n[s];Array.isArray(r)?r.forEach(function(o){xc(o,i)}):r&&typeof r=="object"&&xc(r,i)}return e&&Object.defineProperty(n,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),n}class Cd extends vd{currentItem={};items=[];groups=[];globalStyles={};grad={};idtops={};text="";constructor(t){super(t),this.on("tag",(e,i)=>{switch(this.text="",this.currentItem={type:e},e){case"g":this.groups.push(this.currentItem);break}this.processAttrs(e,i)}),this.on("text",e=>{if(this.currentItem.type=="style"){try{const i=Sd(e);for(const s of i.stylesheet.rules)for(const r of s.declarations)for(const o of s.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,i)=>{let s=this.groups.length;for(;s--;)if(this.groups[s]!=this.currentItem){let r="",o="";for(const a in this.groups[s])a=="transform"?r=this.groups[s].transform:a=="class"&&this.globalStyles["."+this.groups[s][a]]?o=this.globalStyles["."+this.groups[s][a]].join(";")+";"+o:a=="id"&&this.globalStyles["#"+this.groups[s][a]]?o=this.globalStyles["#"+this.groups[s][a]].join(";")+";"+o:typeof this.currentItem[a]>"u"&&(this.currentItem[a]=this.groups[s][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),Sc(this.currentItem.style,this.currentItem,Cc)}switch(this.processAttrs(e,i),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 i=[],s;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":s={},e.style&&Sc(e.style,s),s.offset=s.offset||e.offset,s.color=s["stop-color"]||e["stop-color"],s.opacity=s["stop-opacity"]||e["stop-opacity"],~(s.offset+"").indexOf("%")?s.offset=parseFloat(s.offset):s.offset=parseFloat(s.offset)*100,s.offset=+s.offset.toFixed(2),this.grad.stops.push(s);break;case"linearGradient":this.grad.angle=(360+_c(parseFloat(e.x1),parseFloat(e.y1),parseFloat(e.x2),parseFloat(e.y2),parseFloat(e.x1)+100,parseFloat(e.y1))).toFixed(2),i=[this.grad.angle];for(let a=0,c=this.grad.stops.length;a<c;a++)s=this.grad.stops[a],a&&a!=c-1?i.push(s.color+":"+s.offset):i.push(s.color);this.idtops[this.grad.id]=i.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break;case"radialGradient":i=[];for(let a=0,c=this.grad.stops.length;a<c;a++)s=this.grad.stops[a],a&&a!=c-1?i.push(s.color+":"+s.offset):i.push(s.color);this.idtops[this.grad.id]=i.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(Cc.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"&&Sc(o,this.currentItem,Cc),r==="transform"&&(this.currentItem.transform=o+(this.currentItem.transform||" ")),r==="fill"){const a=o.match(/url\(#([^)]+)\)/);if(a){const c=a[1];this.currentItem.fillid=c,this.idtops[c]&&(this.currentItem.fill=this.idtops[c])}}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 _c(n,t,e,i,s,r){if(typeof s>"u"||typeof r>"u"){const o=n-e,a=t-i;return!o&&!a?0:(180+Math.atan2(-a,-o)*180/Math.PI+360)%360}else return _c(n,t,s,r)-_c(e,i,s,r)}function Sc(n,t,e){const i=(n+"").split(";"),s=/^\s+|\s+$/g;for(let r=0,o=i.length;r<o;r++){const a=i[r].split(":"),c=a[0].replace(s,"").replace(/[A-Z]/g,function(h){return"-"+h.toLowerCase()});(!e||e.includes(c))&&(t[c]=a[1].replace(s,""))}}const Cc=["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 $t{prevPathX=0;prevPathY=0;isUpdatedSVGPathData=!0;isUpdatedSVGPathD=!0;isUpdatedBoundingClientRect=!0;isUpdatedPolymorphPoints=!0;isUpdatedTotalLength=!0;normalizedLines=[];constructor(t){const e=typeof t=="string"?Ws(t):t||[],i=Ea(Hs(e));for(let s=0,r=i.length;s<r;s++){const o=i[s];o[0]=="M"?(this.prevPathX=o[1],this.prevPathY=o[2]):this._appendLine(new Dt({x:this.prevPathX,y:this.prevPathY,c1x:o[1],c1y:o[2],c2x:o[3],c2y:o[4],toX:o[5],toY:o[6]}))}}_appendLine(t){if(this.isUpdatedSVGPathData=!0,this.isUpdatedSVGPathD=!0,this.isUpdatedBoundingClientRect=!0,this.isUpdatedPolymorphPoints=!0,this.isUpdatedTotalLength=!0,t instanceof vc){js(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(h=>{const[l,u,d,f,p,m,v,y]=h;this.normalizedLines.push(new Dt({x:this.prevPathX,y:this.prevPathY,c1x:d,c1y:f,c2x:p,c2y:m,toX:v,toY:y})),this.prevPathX=v,this.prevPathY=y});return}if(t instanceof Dt){this.normalizedLines.push(t.clone()),this.prevPathX=t.toX,this.prevPathY=t.toY;return}let e,i,s,r,o,a;t instanceof jx?[e,i,s,r,o,a]=Mi(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,i,s,r,o,a]=An(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new Dt({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:i,c2x:s,c2y:r,toX:o,toY:a})),this.prevPathX=o,this.prevPathY=a}static fromPolymorphPoints(t){const e=new $t,i=t.length;if(i){e.prevPathX=t[0],e.prevPathY=t[1];for(let s=2;s+5<i;s+=6)e._appendLine(new Dt({x:e.prevPathX,y:e.prevPathY,c1x:t[s],c1y:t[s+1],c2x:t[s+2],c2y:t[s+3],toX:t[s+4],toY:t[s+5]}))}return e}static fromLines(t){const e=new $t,i=t.length;if(i){e.prevPathX=t[0].x,e.prevPathY=t[0].y;for(let s=0;s<i;s++)e._appendLine(t[s])}return e}clone(){return $t.fromLines(this.normalizedLines)}cachedSVGPathData=[];toSVGPathData(){if(this.isUpdatedSVGPathData){const t=[];for(let e=0,i=this.normalizedLines.length;e<i;e++){const s=this.normalizedLines[e];e==0&&t.push(["M",s.x,s.y]),t.push(...s.toSVGPathData())}this.cachedSVGPathData=t,this.isUpdatedSVGPathData=!1}return this.cachedSVGPathData}cachedSVGPathD="";toSVGPathD(){return this.isUpdatedSVGPathD&&(this.cachedSVGPathD=Ca(this.toSVGPathData()),this.isUpdatedSVGPathD=!1),this.cachedSVGPathD}toCanvasContext(t){t.beginPath();for(let e=0,i=this.normalizedLines.length;e<i;e++){const s=this.normalizedLines[e];e==0&&t.moveTo(s.x,s.y),s.toCanvasContext(t)}}cachedBoundingClientRect={x:0,y:0,width:0,height:0};getBoundingClientRect(t=2){if(this.isUpdatedBoundingClientRect){const e=[],i=[];if(this.normalizedLines.forEach(s=>{const r=s.getBoundingClientRect(t);e.push(r.x,r.x+r.width),i.push(r.y,r.y+r.height)}),e.length==0||i.length==0)this.cachedBoundingClientRect={x:0,y:0,width:0,height:0};else{const s=Math.min(...e),r=Math.min(...i),o=Math.max(...e),a=Math.max(...i);this.cachedBoundingClientRect={x:G(s,t),y:G(r,t),width:G(o-s,t),height:G(a-r,t)}}this.isUpdatedBoundingClientRect=!1}return this.cachedBoundingClientRect}getBoundingClientRectCenter(t=2){const e=this.getBoundingClientRect(t);return{x:G(e.x+e.width*.5,t),y:G(e.y+e.height*.5,t)}}transform(t){let e;return t.m?e=t.m:(e=new It,e.translate(t.x||0,t.y||0),e.rotate(t.degree||0,t.centerX,t.centerY),e.scale(t.scaleX||1,t.scaleY||1,t.centerX,t.centerY)),e.isIdentity?this.clone():$t.fromLines(this.normalizedLines.map(i=>{let s=i.x,r=i.y,o=i.c1x,a=i.c1y,c=i.c2x,h=i.c2y,l=i.toX,u=i.toY;return{x:s,y:r}=e.transformPoint({x:s,y:r}),{x:o,y:a}=e.transformPoint({x:o,y:a}),{x:c,y:h}=e.transformPoint({x:c,y:h}),{x:l,y:u}=e.transformPoint({x:l,y:u}),new Dt({x:s,y:r,c1x:o,c1y:a,c2x:c,c2y:h,toX:l,toY:u})}))}cachedTotalLength;getTotalLength(){return(typeof this.cachedTotalLength!="number"||this.isUpdatedTotalLength)&&(this.cachedTotalLength=Math.round(this.normalizedLines.reduce((t,e)=>t+=e.length(),0)),this.isUpdatedTotalLength=!1),this.cachedTotalLength}getPointAtLength(t){let e=0,i=0;const s=this.normalizedLines.length;for(let r=0;r<s;r++){const o=this.normalizedLines[r];if(i=o.length(),e+i>=t)return o.getPointAtSegmentLength(t-e);e+=i}return this.normalizedLines[s-1].getPointAtSegmentLength(i)}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 i=t*e,s=this.normalizedLines[0];if(i--,i>1)for(let r=1;r<e&&(s=this.normalizedLines[r],i>1);r++)i-=1;return s.interpolate(i)}}getSubPathD(t,e,i=1e-6){const s=this.getSubPathDAtLength(e,!0);return ao(i)(t,0)?s:s.getSubPathDAtLength(t,!1)}getSubPathDAtLength(t,e=!1){const i=new $t;let s=0,r=!1;for(let o=0,a=this.normalizedLines.length;o<a;o++){const c=this.normalizedLines[o];o==0&&(i.prevPathX=c.x,i.prevPathY=c.y);const h=c.length();if(s+h>t&&!r){r=!0;const l=c.getPointAtSegmentLength(t-s);if(i._appendLine(new Dt({x:i.prevPathX,y:i.prevPathY,c1x:l.start.x,c1y:l.start.y,c2x:l.m.x,c2y:l.m.y,toX:l.x,toY:l.y})),e)return i;i.normalizedLines=[],i._appendLine(new Dt({x:i.prevPathX,y:i.prevPathY,c1x:l.n.x,c1y:l.n.y,c2x:l.end.x,c2y:l.end.y,toX:c.toX,toY:c.toY})),s+=h;continue}i._appendLine(c),s+=h}return i}closestPoint(t,e){const i=this.getTotalLength();let s={x:t,y:e},r=0,o=1/0,a=8;for(let h=0;h<=i;h+=a){const l=this.getPointAtLength(h),u=(t-l.x)*(t-l.x)+(e-l.y)*(e-l.y);u<o&&(s=l,r=h,o=u)}for(a/=2;a>.5;){const h=r-a,l=this.getPointAtLength(h),u=(t-l.x)*(t-l.x)+(e-l.y)*(e-l.y),d=r+a,f=this.getPointAtLength(d),p=(t-f.x)*(t-f.x)+(e-f.y)*(e-f.y);h>=0&&u<o?(s=l,r=h,o=u):d<=i&&p<o?(s=f,r=d,o=p):a/=2}const c=this.getPointAtLength(r+(r===i?-.1:.1));return{point:s,rotation:r>=i?Qt(c.x,c.y,s.x,s.y):Qt(s.x,s.y,c.x,c.y),distance:Math.sqrt(o)}}cachedPolymorphPoints=[];getPolymorphPoints(){if(this.isUpdatedPolymorphPoints){if(this.normalizedLines.length){const t=this.normalizedLines[0];this.cachedPolymorphPoints=[t.x,t.y].concat(this.normalizedLines.reduce((e,i)=>e.concat([i.c1x,i.c1y,i.c2x,i.c2y,i.toX,i.toY]),[]))}this.isUpdatedPolymorphPoints=!1}return[...this.cachedPolymorphPoints]}getPolymorphPointsPerimeter(){let t=0;const e=this.getPolymorphPoints(),i=e.length;if(i){let s=e[i-2],r=e[i-1];for(let o=0;o<i;o+=6)t+=sn(e[o],e[o+1],s,r),s=e[o],r=e[o+1]}return Math.floor(t)}expendToPolymorphPoints(t){const e=t.length,i=this.getPolymorphPoints(),s=i.length;if(s){const r=[];let o=e-s;const a=Math.ceil(e/s);r.push(["M",i[0],i[1]]);let c=2;for(;c+5<=s-1;){const h=i[c++],l=i[c++],u=i[c++],d=i[c++],f=i[c++],p=i[c++];r.push(["C",h,l,u,d,f,p]);let m=0;for(;m<a&&o>0;)r.push(["C",f,p,f,p,f,p]),o-=6,m++}return new $t(r)}else return $t.fromPolymorphPoints(t)}static getInterpolator(t,e){return i=>{const s=ao(Number.EPSILON);return s(i,0)?t.clone():s(i,1)?e.clone():$t.fromPolymorphPoints(Hp(t.getPolymorphPoints(),e.getPolymorphPoints(),i).map(r=>G(r,2)))}}}const Ed=Wx("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 Wx(n,t=10){const e={},i=n.split(",");for(let s=0;s<i.length;s+=2){const r="&"+i[s+1]+";",o=parseInt(i[s],t);e[r]="&#"+o+";"}return e["\\xa0"]=" ",e}function Gt(n,t){const e=Object.keys(t);for(let i=0;i<e.length;i++)n=n.replace(new RegExp("{"+e[i]+"}","gi"),""+t[e[i]]);return n}function Ir(n){let t,e;if(!n)throw new Error("cannot create a random attribute name for an undefined object");const i="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=i[Math.floor(Math.random()*i.length)];while(n[t]);return t}function Hx(n){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[n]||t.start}function qx(n){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[n]||t.alphabetic}const Ji={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 Ec{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}addColorStop(t,e){const i=this.__ctx.__createElement("stop");if(i.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&&(i.setAttribute("stop-color",Gt("rgb({r},{g},{b})",{r:r[1],g:r[2],b:r[3]})),i.setAttribute("stop-opacity",r[4]))}else i.setAttribute("stop-color",e);this.__root.appendChild(i)}}class Td{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}}class Or{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:i=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=i||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(Ji);for(let e=0,i=t.length;e<i;e++){const s=t[e];this[s]=Ji[s].canvas}}__getStyleState(){const t={},e=Object.keys(Ji);for(let i=0,s=e.length;i<s;i++){const r=e[i];t[r]=this[r]}return t}__applyStyleState(t){const e=Object.keys(t);for(let i=0,s=e.length;i<s;i++){const r=e[i];this[r]=t[r]}}__createElement(t,e={},i=!1){const s=this.__document.createElementNS("http://www.w3.org/2000/svg",t),r=Object.keys(e);i&&(s.setAttribute("fill","none"),s.setAttribute("stroke","none"));for(let o=0;o<r.length;o++){const a=r[o];s.setAttribute(a,e[a])}return s}__applyStyleToCurrentElement(t){let e=this.__currentElement;const i=this.__currentElementsToStyle;i&&(e.setAttribute(t,""),e=i.element,i.children.forEach(r=>{r.setAttribute(t,"")}));const s=Object.keys(Ji);for(let r=0;r<s.length;r++){const o=Ji[s[r]],a=this[s[r]];if(o.apply){if(a instanceof Td){if(a.__ctx)for(;a.__ctx.__SVGdefs.childNodes.length;){const c=a.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[c]=c,this.__SVGdefs.appendChild(a.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(o.apply,Gt("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof Ec)e.setAttribute(o.apply,Gt("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 h=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(a);if(h){e.setAttribute(o.svgAttr,Gt("rgb({r},{g},{b})",{r:h[1],g:h[2],b:h[3]}));let l=parseFloat(h[4]);const u=this.globalAlpha;u!=null&&(l*=u),e.setAttribute(o.svgAttr+"-opacity",""+l)}}else{let c=o.svgAttr;if(s[r]==="globalAlpha"&&(c=t+"-"+o.svgAttr,e.getAttribute(c)))continue;c&&e.setAttribute(c,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 s=Object.keys(Ed);for(let r=0,o=s.length;r<o;r++){const a=s[r],c=Ed[a],h=new RegExp(a,"gi");h.test(e)&&(e=e.replace(h,c))}}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 s=this.__createElement("g");e.appendChild(s),this.__currentElement=s}let i=this.__currentElement.getAttribute("transform");i?i+=" ":i="",i+=t,this.__currentElement.setAttribute("transform",i)}scale(t,e){e===void 0&&(e=t),this.__addTransform(Gt("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(Gt("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(Gt("translate({x},{y})",{x:t,y:e}))}transform(t,e,i,s,r,o){this.__addTransform(Gt("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:i,d:s,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(Gt("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(Gt("L {x} {y}",this.__currentPosition)):this.__addPathCommand(Gt("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,i,s,r,o){this.__currentPosition={x:r,y:o},this.__addPathCommand(Gt("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:i,cp2y:s,x:r,y:o}))}quadraticCurveTo(t,e,i,s){this.__currentPosition={x:i,y:s},this.__addPathCommand(Gt("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:i,y:s}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,i,s,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===i&&e===s||r===0){this.lineTo(t,e);return}const c=this.normalize([o-t,a-e]),h=this.normalize([i-t,s-e]);if(c[0]*h[1]===c[1]*h[0]){this.lineTo(t,e);return}const l=c[0]*h[0]+c[1]*h[1],u=Math.acos(Math.abs(l)),d=this.normalize([c[0]+h[0],c[1]+h[1]]),f=r/Math.sin(u/2),p=t+f*d[0],m=e+f*d[1],v=[-c[1],c[0]],y=[h[1],-h[0]],b=function(C){const S=C[0];return C[1]>=0?Math.acos(S):-Math.acos(S)},x=b(v),w=b(y);this.lineTo(p+v[0]*r,m+v[1]*r),this.arc(p,m,r,x,w)}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,i,s){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+s),this.lineTo(t,e+s),this.lineTo(t,e),this.closePath()}fillRect(t,e,i,s){const r=this.__createElement("rect",{x:t,y:e,width:i,height:s},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,i,s){const r=this.__createElement("rect",{x:t,y:e,width:i,height:s},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),i=this.__rootSVG.childNodes[1],s=i.childNodes;for(let r=s.length-1;r>=0;r--)s[r]&&i.removeChild(s[r]);this.__currentElement=i,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,i,s){if(t===0&&e===0&&i===this.width&&s===this.height){this.__clearCanvas();return}const r=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:t,y:e,width:i,height:s,fill:"#FFFFFF"},!0);r.appendChild(o)}createLinearGradient(t,e,i,s){const r=this.__createElement("linearGradient",{id:Ir(this.__ids),x1:t+"px",x2:i+"px",y1:e+"px",y2:s+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(r),new Ec(r,this)}createRadialGradient(t,e,i,s,r,o){const a=this.__createElement("radialGradient",{id:Ir(this.__ids),cx:s+"px",cy:r+"px",r:o+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(a),new Ec(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),i={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"&&(i.decoration="underline"),this.__fontHref&&(i.href=this.__fontHref),i}__wrapTextLink(t,e){if(t.href){const i=this.__createElement("a");return i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),i.appendChild(e),i}return e}__applyText(t,e,i,s){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:i,"text-anchor":Hx(this.textAlign),"dominant-baseline":qx(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(t)),this.__currentElement=a,this.__applyStyleToCurrentElement(s),o.appendChild(this.__wrapTextLink(r,a))}fillText(t,e,i){this.__applyText(t,e,i,"fill")}strokeText(t,e,i){this.__applyText(t,e,i,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,i,s,r,o){if(s===r)return;s=s%(2*Math.PI),r=r%(2*Math.PI),s===r&&(r=(r+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));const a=t+i*Math.cos(r),c=e+i*Math.sin(r),h=t+i*Math.cos(s),l=e+i*Math.sin(s),u=o?0:1;let d=0,f=r-s;f<0&&(f+=2*Math.PI),o?d=f>Math.PI?0:1:d=f>Math.PI?1:0,this.lineTo(h,l),this.__addPathCommand(Gt("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:i,ry:i,xAxisRotation:0,largeArcFlag:d,sweepFlag:u,endX:a,endY:c})),this.__currentPosition={x:a,y:c}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),i=Ir(this.__ids),s=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",i),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",Gt("url(#{id})",{id:i})),t.appendChild(s),this.__currentElement=s}drawImage(...t){let e=t[0],i,s,r,o,a=0,c=0,h,l,u,d,f,p,m,v;if(t.length===3)i=t[1],s=t[2],h=e.width,l=e.height,r=h,o=l;else if(t.length===5)i=t[1],s=t[2],r=t[3],o=t[4],h=e.width,l=e.height;else if(t.length===9)a=t[1],c=t[2],h=t[3],l=t[4],i=t[5],s=t[6],r=t[7],o=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const y=this.__closestGroupOrSvg();this.__currentElement;const b="translate("+i+", "+s+")";if(e instanceof Or){if(u=e.getSvg().cloneNode(!0),u.childNodes&&u.childNodes.length>1){for(d=u.childNodes[0];d.childNodes.length;)v=d.childNodes[0].getAttribute("id"),this.__ids[v]=v,this.__SVGdefs.appendChild(d.childNodes[0]);if(f=u.childNodes[1],f){const x=f.getAttribute("transform");let w;x?w=x+" "+b:w=b,f.setAttribute("transform",w),y.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||c||h!==e.width||l!==e.height)&&(m=this.__document.createElement("canvas"),m.width=r,m.height=o,m.getContext("2d")?.drawImage(e,a,c,h,l,0,0,r,o),e=m),p.setAttribute("transform",b),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),y.appendChild(p))}createPattern(t,e){const i=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),s=Ir(this.__ids);let r;return i.setAttribute("id",s),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")),i.appendChild(r),this.__SVGdefs.appendChild(i)):t instanceof Or&&(i.setAttribute("width",""+t.width),i.setAttribute("height",""+t.height),i.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(i)),new Td(i,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}}class Tc{canvas;context;customContext;enablePath2D=!1;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,i,s=!1,r=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),s&&(this.customContext=new Or({canvas:this.canvas,width:e||this.canvas.width,height:i||this.canvas.height})),this.enablePath2D=typeof r=="boolean"?r:!1}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,i,s){return this.context.fillRect(t,e,i,s),this.customContext&&this.customContext.fillRect(t,e,i,s),this}fillText(t,e,i,s){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,i,s),this.customContext&&this.customContext.fillText(t,e,i),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,i,s){return this.context.strokeText(t,e,i,s),this.customContext&&this.customContext.strokeText(t,e,i),this}strokeRect(t,e,i,s){return this.context.strokeRect(t,e,i,s),this.customContext&&this.customContext.strokeRect(t,e,i,s),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,i=this.canvas.width,s=this.canvas.height){return this.context.clearRect(t,e,i,s),this.customContext&&this.customContext.clearRect(t,e,i,s),this}save(){return this.context.save(),this.customContext&&this.customContext.save(),this.currentMatrix=new DOMMatrix,this.enablePath2D&&(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.enablePath2D&&(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.enablePath2D&&this.currentPath2D.closePath(),this}changePath2D(t=this.currentPath2D,e=this.currentMatrix){if(this.enablePath2D){const i=new Path2D;i.addPath(t,e),this.currentPath2D=i}}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=this.currentMatrix.translate(t,e),this.changePath2D(),this}rotate(t,e=0,i=0){return this.translate(e,i),this.context.rotate(t),this.customContext&&this.customContext.rotate(t),this.currentMatrix=this.currentMatrix.rotate(t),this.translate(-e,-i),this.changePath2D(),this}scale(t,e=t,i=0,s=0){return this.translate(i,s),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix=this.currentMatrix.scale(t,e),this.translate(-i,-s),this.changePath2D(),this}moveTo(t,e){return this.context.moveTo(t,e),this.customContext&&this.customContext.moveTo(t,e),this.enablePath2D&&this.currentPath2D.moveTo(t,e),this}lineTo(t,e){return this.context.lineTo(t,e),this.customContext&&this.customContext.lineTo(t,e),this.enablePath2D&&this.currentPath2D.lineTo(t,e),this}arc(t,e,i,s,r,o){return this.context.arc(t,e,i,s,r,o),this.customContext&&this.customContext.arc(t,e,i,s,r,o?-1:1),this.enablePath2D&&this.currentPath2D.arc(t,e,i,s,r,o),this}arcTo(t,e,i,s,r){return this.context.arcTo(t,e,i,s,r),this.customContext&&this.customContext.arcTo(t,e,i,s,r),this.enablePath2D&&this.currentPath2D.arcTo(t,e,i,s,r),this}ellipse(t,e,i,s,r,o,a,c){return this.context.ellipse(t,e,i,s,r,o,a,c),this.enablePath2D&&this.currentPath2D.ellipse(t,e,i,s,r,o,a,c),this}quadraticCurveTo(t,e,i,s){return this.context.quadraticCurveTo(t,e,i,s),this.customContext&&this.customContext.quadraticCurveTo(t,e,i,s),this.enablePath2D&&this.currentPath2D.quadraticCurveTo(t,e,i,s),this}bezierCurveTo(t,e,i,s,r,o){return this.context.bezierCurveTo(t,e,i,s,r,o),this.customContext&&this.customContext.bezierCurveTo(t,e,i,s,r,o),this.enablePath2D&&this.currentPath2D.bezierCurveTo(t,e,i,s,r,o),this}rect(t,e,i,s){return this.context.rect(t,e,i,s),this.customContext&&this.customContext.rect(t,e,i,s),this.enablePath2D&&this.currentPath2D.rect(t,e,i,s),this}createLinearGradient(t,e,i,s,r){const o=this.context.createLinearGradient(t,e,i,s);return r&&Object.entries(r).forEach(([a,c])=>{o.addColorStop(parseFloat(a),c)}),o}createRadialGradient(t,e,i,s,r,o,a){const c=this.context.createRadialGradient(t,e,i,s,r,o);return a&&Object.entries(a).forEach(([h,l])=>{c.addColorStop(parseFloat(h),l)}),c}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const i=e[0],s=e[1];this.context.drawImage(t,i,s)}else if(e.length===4){const i=e[0],s=e[1],r=e[2],o=e[3];this.context.drawImage(t,i,s,r,o)}else if(e.length===8){const i=e[0],s=e[1],r=e[2],o=e[3],a=e[4],c=e[5],h=e[6],l=e[7];this.context.drawImage(t,i,s,r,o,a,c,h,l)}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,i=this.canvas.width,s=this.canvas.height,r){return this.context.getImageData(t,e,i,s,r)}putImageData(t,e=0,i=0){return this.context.putImageData(t,e,i)}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}}}let gt=class Ah{shouldUpdatePathD=!1;shouldUpdateTransformPathD=!1;shouldUpdateSVGElInDraw=!1;shouldUpdateMInDraw=!0;shouldUpdateAttrsInDraw=!0;shouldUpdateStyleInDraw=!0;id;initD;d;parent;attrs={};style={};initCenterX;initCenterY;_x;_y;_degree;_scaleX;_scaleY;vx;vy;ax;ay;mass;interactive;drag;transform$=new Re;transformSubscription;isMouseIn=!1;isDragging=!1;m;el;constructor(t){this.id=hl(),this.initD=t?.initD,this.setAttr({stroke:"none",fill:"none"}),t?.attrs&&this.setAttr(t.attrs),t?.style&&this.setStyle(t.style),this.initCenterX=t?.centerX,this.initCenterY=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.interactive=typeof t?.interactive=="boolean"?t?.interactive:!0,this.drag=t?.drag,this.transformSubscription=this.transform$.subscribe(()=>{this.shouldUpdateTransformPathD=!0,this.shouldUpdateMInDraw=!0})}destroy(){this.transformSubscription.unsubscribe()}moveTo(t,e){const i=this._x,s=this._y;(i!==t||s!==e)&&(this._x=t,this._y=e,this.transform$.next({dX:t-i,dY:e-s}))}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&&(this.transform$.next({dX:t-this._x}),this._x=t)}get y(){return this._y}set y(t){this._y!==t&&(this.transform$.next({dY:t-this._y}),this._y=t)}rotateTo(t){this._degree!==t&&(this.transform$.next({dDegree:t-this._degree}),this._degree=t)}rotate(t){this.rotateTo(this._degree+t)}get degree(){return this._degree}set degree(t){this._degree!==t&&(this.transform$.next({dDegree:t-this._degree}),this._degree=t)}scaleTo(t,e){const i=this._scaleX,s=this._scaleY;(this._scaleX!==t||this._scaleY!==(e||t))&&(this._scaleX=t,this._scaleY=e||t,this.transform$.next({dScaleX:this._scaleX/i,dScaleY:this._scaleY/s}))}scale(t,e){this.scaleTo(this._scaleX*t,this._scaleY*(e||t))}get scaleX(){return this._scaleX}set scaleX(t){this._scaleX!==t&&(this.transform$.next({dScaleX:t/this._scaleX}),this._scaleX=t)}get scaleY(){return this._scaleY}set scaleY(t){this._scaleY!==t&&(this.transform$.next({dScaleY:t/this._scaleY}),this._scaleY=t)}pathD(t){return t?(this.d=t,this.shouldUpdateTransformPathD=!0,this.shouldUpdateSVGElInDraw=!0):this.initD?this.d||(this.d=this.initD instanceof $t?this.initD:new $t(this.initD)):(!this.d||this.shouldUpdatePathD)&&(this.d=new $t(this.toSVGPathData()),this.shouldUpdatePathD=!1,this.shouldUpdateTransformPathD=!0,this.shouldUpdateSVGElInDraw=!0),this.d}cachedTransformedPathD;transformPathD(){if(!this.m){const{x:t,y:e}=this.transformOrigin();let i=0,s=0;if(this.parent?.dDegree||this.parent?.dScaleX!==1||this.parent?.dScaleY!==1){const o=this.transformOrigin(!0);i=o.x,s=o.y}const r=new It;r.translate(this.x+(this.parent?.dX||0),this.y+(this.parent?.dY||0)),r.rotate(this.degree,t,e),r.scale(this.scaleX,this.scaleY,t,e),this.parent?.dDegree&&r.rotate(this.parent.dDegree,i,s),(this.parent?.dScaleX!==1||this.parent?.dScaleY!==1)&&r.scale(this.parent?.dScaleX||1,this.parent?.dScaleY||1,i,s),this.m=r}return(this.shouldUpdateTransformPathD||!this.cachedTransformedPathD)&&(this.cachedTransformedPathD=this.pathD().transform({m:this.m}),this.shouldUpdateTransformPathD=!1),this.cachedTransformedPathD}getBaseOptions(){return{initD:this.initD,attrs:{...this.attrs},style:{...this.style},centerX:this.initCenterX,centerY:this.initCenterY,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,interactive:this.interactive,drag:{...this.drag}}}clone(){return this.cloneShape()}cloneShape(){return new Ah(this.getBaseOptions())}update(t){this.shouldUpdatePathD=!0}toSVGEl(){return null}toSVGPathData(){return[]}toSVGPathD(){return this.pathD().toSVGPathD()}toCanvasContext(t){this.pathD().toCanvasContext(t)}getBoundingClientRect(t=2){return this.pathD().getBoundingClientRect(t)}getRealBoundingClientRect(t=2){return this.transformPathD().getBoundingClientRect(t)}getBoundingClientRectCenter(t=2){return this.pathD().getBoundingClientRectCenter(t)}getRealBoundingClientRectCenter(t=2){return this.transformPathD().getBoundingClientRectCenter(t)}transformOrigin(t=!1,e=2){let i=0,s=0;if(this.parent&&!t){const r=this.parent.combo.getBoundingClientRectCenter(e);i=r.x-this.parent.dX,s=r.y-this.parent.dY}else if(typeof this.initCenterX>"u"&&typeof this.initCenterY>"u"){const r=this.getBoundingClientRectCenter(e);i=r.x,s=r.y}else i=this.initCenterX||0,s=this.initCenterY||0;return{x:i,y:s}}isPointInPath(t,e,i){if(t instanceof Tc)return t.isPointInPath(new Path2D(this.toSVGPathD()),e,i);if(this.el instanceof SVGGeometryElement){const s=this.el.getCTM();if(s){const r=s.inverse();return this.el.isPointInFill({x:r.a*e+r.c*i+r.e,y:r.b*e+r.d*i+r.f})}}return!1}isPointInStroke(t,e,i){if(t instanceof Tc)return t.isPointInStroke(new Path2D(this.toSVGPathD()),e,i);if(this.el instanceof SVGGeometryElement){const s=this.el.getCTM();if(s){const r=s.inverse();return this.el.isPointInStroke({x:r.a*e+r.c*i+r.e,y:r.b*e+r.d*i+r.f})}}return!1}setStyle(t){Object.assign(this.style,t),this.shouldUpdateStyleInDraw=!0}setAttr(t,e){if(typeof t!="string")for(const i in t){const s=t[i];s&&s!=this.getAttr(i)&&(this.attrs[Ct(i)]=s,this.shouldUpdateAttrsInDraw=!0)}else e&&e!=this.getAttr(t)&&(this.attrs[Ct(t)]=e,this.shouldUpdateAttrsInDraw=!0)}getAttr(t,e){return this.attrs[t]||this.attrs[Ct(t)]||e}hasAttr(t){return!!this.getAttr(t)}animate(t){this.vx+=this.ax,this.vy+=this.ay;const e=t?.gravity||0;this.vy+=e;const i=t?.friction||1;this.vx*=i,this.vy*=i,this.move(this.vx,this.vy)}animateEaseTo(t,e){const i=e?.easing||.05,s=t.x-this.x,r=t.y-this.y;this.vx=s*i,this.vy=r*i,this.animate(e)}animateSpringTo(t,e){const i=e?.spring||.03;(Array.isArray(t)?t:[t]).forEach(s=>{const r=s.x-this.x,o=s.y-this.y,a=r*i,c=o*i;this.vx+=a,this.vy+=c}),this.animate({friction:.9,...e})}getSpringMassAlphaTo(t,e){const i=e?.springLength||100,s=e?.spring||5e-4,r=t.x-this.x,o=t.y-this.y,a=Math.sqrt(r*r+o*o);if(a<i){const c=r*s,h=o*s;return this.vx+=c/this.mass,this.vy+=h/this.mass,t.vx-=c/t.mass,t.vy-=h/t.mass,1-a/i}return 0}followTo(t,e=3){this.rotateTo(Tt(Qt(this.x,this.y,t.x,t.y)));const{dx:i,dy:s}=rn(q(this.degree),e);this.vx=i,this.vy=s,this.animate()}followAccelerationTo(t,e=.05){this.rotateTo(Tt(Qt(this.x,this.y,t.x,t.y)));const{dx:i,dy:s}=rn(q(this.degree),e);this.ax=i,this.ay=s,this.animate()}gravitateTo(t){const e=t.x-this.x,i=t.y-this.y,s=e*e+i*i,r=Math.sqrt(s),o=this.mass*t.mass/s,a=o*e/r,c=o*i/r;this.vx+=a/this.mass,this.vy+=c/this.mass,t.vx-=a/t.mass,t.vy-=c/t.mass}checkCollision(t){const e=t.x-this.x,i=t.y-this.y,s=Math.sqrt(e*e+i*i),{x:r,y:o,width:a,height:c}=t.getBoundingClientRect(),{x:h,y:l}=t.getBoundingClientRectCenter(),{x:u,y:d,width:f,height:p}=this.getBoundingClientRect(),{x:m,y:v}=this.getBoundingClientRectCenter();if(s<Math.abs(h-r)+Math.abs(m-u)||s<Math.abs(l-o)+Math.abs(v-d)){const y=Math.atan2(i,e),b={x:0,y:0},x=ge(-y,e,i),w=ge(-y,this.vx,this.vy),C=ge(-y,t.vx,t.vy),S=w.x-C.x;w.x=((this.mass-t.mass)*w.x+2*t.mass*C.x)/(this.mass+t.mass),C.x=S+w.x;const D=Math.abs(w.x)+Math.abs(C.x),L=this.ballRadius+t.ballRadius-Math.abs(b.x-x.x);b.x+=w.x/D*L,x.x+=C.x/D*L;const I=ge(y,b.x,b.y),F=ge(y,x.x,x.y);t.moveTo(this.x+F.x,this.y+F.y),this.moveTo(this.x+I.x,this.y+I.y);const U=ge(y,w.x,w.y),X=ge(y,C.x,C.y);this.vx=U.x,this.vy=U.y,t.vx=X.x,t.vy=X.y}}checkWall(t){if(!t?.wall)return;const e=typeof t.wall.bounce=="number"?t.wall.bounce:-1,i=t.wall.x,s=t.wall.y,r=t.wall.x+t.wall.width,o=t.wall.y+t.wall.height,{x:a,y:c,width:h,height:l}=this.getBoundingClientRect();t.wall.cycle||!1?(this.x+a>r?this.moveXTo(i-(a+h)):this.x+a+h<i&&this.moveXTo(r-a),this.y+c>o?this.moveYTo(s-(c+l)):this.y+c+l<s&&this.moveYTo(o-c)):(this.x+a+h>r?(this.moveXTo(r-(a+h)),this.vx*=e):this.x+a<i&&(this.moveXTo(i+(a+h)),this.vx*=e),this.y+c+l>o?(this.moveYTo(o-(c+l)),this.vy*=e):this.y+c<s&&(this.moveYTo(s+(c+l)),this.vy*=e))}getTotalLength(){return this.transformPathD().getTotalLength()}getPointAtLength(t){return this.transformPathD().getPointAtLength(t)}interpolate(t){return this.transformPathD().interpolate(t)}trailPath(t=0,e=1){const i=this.getTotalLength(),s=t*i,r=e*i;return{subPathD:this.transformPathD().getSubPathD(s,r),point:this.getPointAtLength(r)}}strokeDashTween(t=1e3,e){const i=this.pathD().getTotalLength();this.setAttr({strokeDasharray:`${i} ${i}`,strokeDashoffset:`${i}`});const s=e?.onUpdate,r=new ki({frameDuration:t});r.addTween({offset:i},{offset:0},Object.assign(e||{},{onUpdate:(o,a)=>{this.setAttr("strokeDashoffset",""+G(o.offset,2)),s?.(o,a)}})),r.play()}static generateRosetta(t,e,i,s,r){if(r==0)throw new Error("no dividing by zero, please");const o=[],a=360/r;for(let c=0;c<r;c+=1){const h=a*c*Math.PI/180,l=t+2*i*Math.cos(h),u=e+2*i*Math.sin(h);o.push(new vc({x:t,y:e,rx:i,ry:s,xAxisRotate:a*c,largeArcFlag:1,sweepFlag:1,toX:l,toY:u})),o.push(new vc({x:l,y:u,rx:i,ry:s,xAxisRotate:a*c,largeArcFlag:1,sweepFlag:1,toX:t,toY:e}))}return new Ah({initD:$t.fromLines(o)})}};class qt{shapes=[];svg;forceWidth;attrs={};style={};initCenterX;initCenterY;x;y;degree;scaleX;scaleY;interactive;drag;constructor(t){if(this.initCenterX=t?.centerX,this.initCenterY=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),t?.attrs&&this.setAttr(t.attrs),t?.style&&this.setStyle(t.style),this.interactive=typeof t?.interactive=="boolean"?t?.interactive:!0,this.drag=t?.drag,this.svg=t?.svg,this.forceWidth=t?.forceWidth,t?.svg){this.initCenterX=0,this.initCenterY=0;let e=0,i=0,s=0,r=0;const o=new Cd(t.svg).parse();for(let a=0,c=o.length;a<c;a++){const h=o[a];if(h.type=="viewbox"&&h.width&&h.height){if(e=parseFloat(h.width),i=parseFloat(h.height),t.forceWidth){const p=e/i;s=t.forceWidth,r=s/p}else s=e,r=i;continue}if(h.type!="path"||!Sa(h.path))continue;const l={};for(const p in h)p==="type"||p==="path"||p==="transform"||(l[p]=h[p]);const u=Hs(Ws(h.path)),d=[];let f=[];for(let p=0,m=u.length;p<m;p++){const v=u[p];f.push(v),v[0].toLowerCase()=="z"&&(d.push(f),f=[])}f.length&&d.push(f),d.forEach(p=>{const m=new gt({attrs:l,initD:p});if(h.transform){const y=Od(h.transform).split();m.moveTo(y.x,y.y),m.rotateTo(y.degree),m.scaleTo(y.scaleX,y.scaleY)}this.addShape(m)})}s&&e&&r&&i&&this.comboScale(s/e,r/i,!0)}}destroy(){this.shapes.forEach(t=>t.destroy())}getBaseOptions(){return{svg:this.svg,forceWidth:this.forceWidth,attrs:{...this.attrs},style:{...this.style},centerX:this.initCenterX,centerY:this.initCenterY,x:this.x,y:this.y,degree:this.degree,scaleX:this.scaleX,scaleY:this.scaleY,interactive:this.interactive,drag:{...this.drag}}}clone(){const t=this.cloneShapeCombo();return t.shapes=this.shapes.map(e=>{const i=e.clone();return e.parent&&(i.parent={...e.parent,combo:t}),i}),t}cloneShapeCombo(){return new qt(this.getBaseOptions())}update(t){this.shapes.forEach(e=>e.update(t))}addShape(t,e){e?.notCopyFromCombo!==!0&&(t.setAttr(this.attrs),t.setStyle(this.style),t.interactive=t.interactive||this.interactive,t.drag={...this.drag,...t.drag}),t.parent={combo:this,dX:e?.dX||0,dY:e?.dY||0,dDegree:e?.dDegree||0,dScaleX:e?.dScaleX||1,dScaleY:e?.dScaleY||1},this.shapes.push(t)}comboMove(t,e,i=!1){i||(this.x+=t,this.y+=e),this.shapes.forEach(s=>{s.move(t,e)})}comboRotate(t,e=!1){e||(this.degree+=t),this.shapes.forEach(i=>{i.rotate(t)})}comboScale(t,e,i=!1){i||(this.scaleX*=t,this.scaleY*=e||t),this.shapes.forEach(s=>{s.scale(t,e)})}comboTransform(t,e=!1){(typeof t?.x=="number"||typeof t?.y=="number")&&this.comboMove(t?.x||0,t?.y||0,e),typeof t?.degree=="number"&&this.comboRotate(t?.degree||0,e),(typeof t?.scale=="number"||typeof t?.scaleX=="number"||typeof t?.scaleY=="number")&&this.comboScale(t?.scaleX||t?.scale||1,t?.scaleY||t?.scale||1,e)}getBoundingClientRect(t=2){const e=[],i=[];if(this.shapes.forEach(c=>{const h=c.getBoundingClientRect(t);e.push(h.x,h.x+h.width),i.push(h.y,h.y+h.height)}),e.length==0||i.length==0)return{x:0,y:0,width:0,height:0};const s=Math.min(...e),r=Math.min(...i),o=Math.max(...e),a=Math.max(...i);return{x:G(s,t),y:G(r,t),width:G(o-s,t),height:G(a-r,t)}}getBoundingClientRectCenter(t=2){if(typeof this.initCenterX=="number"&&typeof this.initCenterY=="number")return{x:this.initCenterX,y:this.initCenterY};const e=this.getBoundingClientRect(t);return{x:G(e.x+e.width*.5,t),y:G(e.y+e.height*.5,t)}}setStyle(t){Object.assign(this.style,t),this.shapes.forEach(e=>{e.setStyle(t)})}setAttr(t,e){if(typeof t!="string"){for(const i in t){const s=t[i];s&&s!=this.getAttr(i)&&(this.attrs[Ct(i)]=s)}this.shapes.forEach(i=>{i.setAttr(t)})}else e&&e!=this.getAttr(t)&&(this.attrs[Ct(t)]=e,this.shapes.forEach(i=>{i.setAttr(t,e)}))}getAttr(t,e){return this.attrs[t]||this.attrs[Ct(t)]||e}hasAttr(t){return!!this.getAttr(t)}sort(){this.shapes.map(t=>({shape:t,perimeter:t.transformPathD().getPolymorphPointsPerimeter()})).sort((t,e)=>e.perimeter-t.perimeter).map(t=>t.shape)}expendTo(t){const e=t.shapes.length,i=this.shapes.length;if(e<i)return t.expendTo(this);for(let s=i;s<e;s++){const r=t.shapes[s];this.addShape(new gt({initD:r.pathD().clone()}),{dX:r.x-this.x,dY:r.y-this.y,dDegree:r.degree-this.degree,dScaleX:r.scaleX/this.scaleX,dScaleY:r.scaleY/this.scaleY,notCopyFromCombo:!0})}}strokeDashTween(t,e){switch(e?.type){case"sequence":this.shapes.forEach((o,a)=>{o.strokeDashTween(t,{...e,delay:a,onStart:()=>{a==0&&e?.onGroupStart?.()},onUpdate:()=>{e?.onGroupUpdate?.()},onComplete:()=>{a==this.shapes.length-1&&e?.onGroupComplete?.()}})});break;case"parallel":default:const i=new ki({frameDuration:t}),s={},r={};this.shapes.forEach((o,a)=>{const c=o.pathD().getTotalLength();s[`offset_${a}`]=c,r[`offset_${a}`]=0,o.setAttr({strokeDasharray:`${c} ${c}`,strokeDashoffset:`${c}`})}),i.addTween(s,r,Object.assign(e||{},{onStart:()=>{e?.onGroupStart?.()},onUpdate:(o,a)=>{for(const c in o){const h=co(c).number;this.shapes[h].setAttr("strokeDashoffset",""+G(o[c],2))}e?.onGroupUpdate?.()},onComplete:()=>{e?.onGroupComplete?.()}})),i.play();break}}}function Jx(n,t,e=5){const i=ao(e);(!i(n.x,t.current.x)||!i(n.y,t.current.y))&&n.followTo(t.current)}function Kx(n,t,e){n.drag&&n.drag.enable&&!n.isDragging&&n.animateEaseTo(t,e)}function Zx(n,t){const e=[],i=n.length;for(let s=0;s<i;s++){const r=n[s];if(t?.springLength){const o=t?.springLength||100;r.isDragging||n.filter(a=>a.id!==r.id).forEach(a=>{const c=Qt(r.x,r.y,a.x,a.y);r.animateSpringTo({x:a.x-Math.cos(c)*o,y:a.y-Math.sin(c)*o},t)})}else t?.spring?s>0&&r.animateSpringTo(n[s-1],t):r.animate(t);if(t?.wall&&r.checkWall(t),t?.enableCollision||t?.enableGravityBetweenObjects||t?.enableSpringMassAlpha)for(let o=s+1;o<i;o++)t?.enableCollision&&r.checkCollision(n[o]),t?.enableGravityBetweenObjects&&r.gravitateTo(n[o]),t?.enableSpringMassAlpha&&e.push([r.x,r.y,n[o].x,n[o].y,r.getSpringMassAlphaTo(n[o],t)])}return e}function Pd(n){if(n.length<2)throw new Error("shapes个数必须大于等于2");const t=n.length-1,e=new Array(t);for(let s=0;s<t;s++){const r=n[s].transformPathD(),o=n[s+1].transformPathD(),a=r.getPolymorphPoints(),c=o.getPolymorphPoints(),h=a.length>=c.length?a:c;e[s]=$t.getInterpolator(r.expendToPolymorphPoints(h),o.expendToPolymorphPoints(h))}const i=new gt({initD:""});return s=>{const r=G(t*s,6),o=Math.min(Math.floor(r),t-1),a=G(r-o,6);return i.pathD(e[o](a)),i.setAttr(n[o+1].attrs),i}}function Qx(n){if(n.length<2)throw new Error("shapeCombos个数必须大于等于2");let t;const e=[];n.forEach(o=>{let a;o instanceof qt?(a=o,a.sort()):(a=new qt,a.addShape(o)),e.push(a),(!t||t.shapes.length<a.shapes.length)&&(t=a)});const i=[];e.forEach((o,a)=>{o!==t&&o.expendTo(t),o.shapes.forEach((c,h)=>{i[h]=i[h]||[],i[h][a]=c})});const s=[];i.forEach(o=>{s.push(Pd(o))});const r=new qt;return s.forEach(o=>{r.addShape(o(0))}),o=>(s.forEach(a=>{a(o)}),r)}function t2(n,t=6e3,e){const i=n.findIndex(a=>a instanceof qt)>=0?Qx(n):Pd(n),s=i(0),r=e?.onUpdate,o=new ki({frameDuration:t});return o.addTween({t:0},{t:1},Object.assign(e||{},{onUpdate:(a,c)=>{r?.(a,c),i(a.t),e?.shapeOrCombo?.(s,a.t)}})),o.play(),s}class e2{PARENT_EL;SVG_EL=null;CANVAS_EL=null;ctx=null;rect={x:0,y:0,width:0,height:0};size$=new Ns(null);resizeSubscription;mpg=Ln();mouseSubscription;shapes=[];shapeTap$=new Ns(null);tapSubscription;lastMouseInShapeId="";draggingShapeId="";prevCursor="default";constructor(t=document.documentElement,e="canvas",i=!1){this.PARENT_EL=t,(e=="svg"||e=="canvas")&&Ud(this.PARENT_EL),e=="svg"&&(this.SVG_EL=an("svg"),oi(this.PARENT_EL,this.SVG_EL)),e=="canvas"&&(this.CANVAS_EL=Gd("canvas"),oi(this.PARENT_EL,this.CANVAS_EL)),this.resizeSubscription=sh(this.PARENT_EL).subscribe(s=>{this.rect.x=s.x,this.rect.y=s.y,this.rect.width=s.width,this.rect.height=s.height,this.SVG_EL&&Ke(this.SVG_EL,{viewBox:`0 0 ${this.rect.width} ${this.rect.height}`,width:`${this.rect.width}`,height:`${this.rect.height}`}),this.CANVAS_EL&&(Ke(this.CANVAS_EL,{width:`${this.rect.width}`,height:`${this.rect.height}`}),this.ctx=new Tc(this.CANVAS_EL,this.rect.width,this.rect.height,i)),this.size$.next(s)}),this.mouseSubscription=dm(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL,{createMousePoint:this.mpg}).subscribe(()=>{}),this.tapSubscription=em(this.PARENT_EL).subscribe(s=>{for(const r of this.shapes)if(r.isMouseIn){this.shapeTap$.next(r);break}})}destroy(){this.resizeSubscription.unsubscribe(),this.mouseSubscription.unsubscribe(),this.tapSubscription.unsubscribe()}setCursor(t="default"){t!=this.prevCursor&&(this.PARENT_EL.style.cursor=t,this.prevCursor=t)}draw(...t){if(t.length){const e=[];t.forEach(i=>{i instanceof qt?e.push(...i.shapes):e.push(i)}),this.SVG_EL&&this.shapes.filter(i=>e.findIndex(s=>s.id==i.id)==-1).forEach(i=>{i.el&&(i.el.remove(),delete i.el)}),Kp(this.shapes,e)}this.ctx&&this.ctx.clearRect(),this.lastMouseInShapeId="",this.mpg.current.isDown||(this.draggingShapeId="");for(const e of this.shapes){const{x:i,y:s}=e.transformOrigin();let r=0,o=0;if(e.parent?.dDegree||e.parent?.dScaleX!==1||e.parent?.dScaleY!==1){const a=e.transformOrigin(!0);r=a.x,o=a.y}if(e.shouldUpdatePathD&&e.pathD(),this.SVG_EL){if(!e.el||e.shouldUpdateSVGElInDraw){const a=e.toSVGEl();e.el?a&&(e.el.remove(),e.el=a,oi(this.SVG_EL,e.el),Ke(e.el,{id:e.id})):(e.el=a||_a(),oi(this.SVG_EL,e.el),Ke(e.el,{id:e.id})),Ku(e.el)&&Ke(e.el,{d:e.toSVGPathD()}),e.shouldUpdateSVGElInDraw=!1,e.shouldUpdateAttrsInDraw=!0,e.shouldUpdateStyleInDraw=!0,e.shouldUpdateMInDraw=!0}if(e.shouldUpdateAttrsInDraw&&(Vh(e.attrs)||Ke(e.el,e.attrs),e.shouldUpdateAttrsInDraw=!1),e.shouldUpdateStyleInDraw&&(Vh(e.style)||jn(e.el,e.style),e.shouldUpdateStyleInDraw=!1),e.shouldUpdateMInDraw||!e.m){const a=new It;a.translate(e.x+(e.parent?.dX||0),e.y+(e.parent?.dY||0)),a.rotate(e.degree,i,s),a.scale(e.scaleX,e.scaleY,i,s),e.parent?.dDegree&&a.rotate(e.parent.dDegree,r,o),(e.parent?.dScaleX!==1||e.parent?.dScaleY!==1)&&a.scale(e.parent?.dScaleX||1,e.parent?.dScaleY||1,r,o),Ke(e.el,{transform:a.toString()}),e.m=a,e.shouldUpdateMInDraw=!1}}if(this.ctx&&(this.ctx.save(),this.ctx.translate(e.x+(e.parent?.dX||0),e.y+(e.parent?.dY||0)),this.ctx.rotate(q(e.degree),i,s),this.ctx.scale(e.scaleX,e.scaleY,i,s),e.parent?.dDegree&&this.ctx.rotate(q(e.parent.dDegree),r,o),(e.parent?.dScaleX!==1||e.parent?.dScaleY!==1)&&this.ctx.scale(e.parent?.dScaleX||1,e.parent?.dScaleY||1,r,o),e.m=this.ctx.currentMatrix,ou(this.ctx,e.attrs),e.toCanvasContext(this.ctx),this.ctx.hasSetCustomStrokeStyle&&this.ctx.stroke(),this.ctx.hasSetCustomFillStyle&&this.ctx.fill()),e.interactive?this.SVG_EL?e.isMouseIn=e.isPointInPath(this.SVG_EL,this.mpg.current.x,this.mpg.current.y)||e.isPointInStroke(this.SVG_EL,this.mpg.current.x,this.mpg.current.y):this.ctx?e.isMouseIn=e.isPointInPath(this.ctx,this.mpg.current.x,this.mpg.current.y)||e.isPointInStroke(this.ctx,this.mpg.current.x,this.mpg.current.y):e.isMouseIn=!1:e.isMouseIn=!1,e.isMouseIn&&(this.setCursor("pointer"),this.lastMouseInShapeId=e.id),e.isDragging=e.id==this.draggingShapeId,this.mpg.current.isDown&&(e.isDragging||!this.draggingShapeId&&e.isMouseIn&&e.drag&&e.drag.enable)){this.setCursor("grabbing"),e.isDragging=!0,this.draggingShapeId=e.id;let a=this.mpg.current.x-this.mpg.start.x,c=this.mpg.current.y-this.mpg.start.y;if(a||c){if(e.drag&&e.drag.enable&&e.drag.alongPath){const h=e.drag.alongPath.transform({m:e.m}).closestPoint(this.mpg.current.x,this.mpg.current.y);a=h.point.x-e.x,c=h.point.y-e.y}(a||c)&&(e.move(a,c),e.parent?.combo.shapes.forEach(h=>{h.drag?.followSibling&&h!==e&&h.move(a,c)}))}this.mpg.setStart(this.mpg.current)}else e.isMouseIn&&e.drag&&e.drag.enable&&this.setCursor("grab");this.ctx&&this.ctx.restore()}!this.lastMouseInShapeId&&!this.draggingShapeId&&this.setCursor("default")}clear(){this.shapes.forEach(t=>{t.el&&(t.el.remove(),delete t.el)}),this.ctx&&this.ctx.clearRect(),this.shapes=[]}drawMouseMoveLine(t){const e=t?.brushSize||4,i=t?.brushColor||"#000000";let s=!1;const r=Br(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL,{start:()=>{s=!1,this.ctx&&(this.ctx.save(),this.ctx.lineWidth=e,this.ctx.strokeStyle=i,this.ctx.beginPath())},end:()=>{this.ctx&&this.ctx.restore()}}).subscribe(o=>{this.ctx&&(s?this.ctx.lineTo(o.current.x,o.current.y):(s=!0,this.ctx.moveTo(o.current.x,o.current.y)),this.ctx.stroke())});return()=>{r.unsubscribe()}}drawMouseMoveBrush(t){const e=t?.brushSize||10,i=t?.brushDensity||50,s=t?.brushColor||"#000000",r=new ue(s),o=r.r,a=r.g,c=r.b,h=Br(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL).subscribe(l=>{if(this.ctx){const u=this.ctx.getImageData(0,0,this.ctx.canvas.width,this.ctx.canvas.height),d=u.data;for(let f=0;f<i;f++){const p=Math.random()*Math.PI*2,m=Math.random()*e,v=l.current.x+Math.cos(p)*m|0,y=l.current.y+Math.sin(p)*m|0,b=(v+y*u.width)*4;d[b]=o,d[b+1]=a,d[b+2]=c,d[b+3]=255}this.ctx.putImageData(u)}});return()=>{h.unsubscribe()}}downloadSVG=()=>{this.SVG_EL&&Zu(this.SVG_EL)}}class Rn extends gt{lineLength;startColor;endColor;constructor(t){super({...t,centerX:0,centerY:0}),this.lineLength=t?.lineLength||0,this.startColor=t?.startColor,this.endColor=t?.endColor,this.setAttr({strokeWidth:this.getAttr("strokeWidth")||"1",stroke:this.startColor||this.getAttr("stroke")||"#000000"})}cloneShape(){return new Rn({...super.getBaseOptions(),lineLength:this.lineLength,startColor:this.startColor,endColor:this.endColor})}lineToAbsolutePoint(t){const e=Tt(Qt(this.x,this.y,t.x,t.y)),i=sn(this.x,this.y,t.x,t.y);(e!=this.degree||i!=this.lineLength)&&(e!=this.degree&&this.rotateTo(e),i!=this.lineLength&&(this.lineLength=i),this.shouldUpdatePathD=!0)}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})}getBoundingClientRect(){return{x:0,y:0,width:this.lineLength,height:parseFloat(this.getAttr("strokeWidth"))}}toSVGPathData(){return[["m",0,0],["l",this.lineLength,0]]}toCanvasContext(t){this.startColor&&this.endColor&&this.setAttr({stroke:t.createLinearGradient(0,0,this.lineLength,0,{0:this.startColor,1:this.endColor})}),t.beginPath(),t.moveTo(0,0),t.lineTo(this.lineLength,0)}intersection(t){const e=this.transformPathD().normalizedLines[0],i=t.transformPathD().normalizedLines[0];return e.intersection(i)}}class Pc extends gt{cx;cy;toX;toY;isLineThrough;constructor(t){super(t),this.cx=t?.cx||0,this.cy=t?.cy||0,this.toX=t?.toX||0,this.toY=t?.toY||0,this.isLineThrough=typeof t?.isLineThrough=="boolean"?t.isLineThrough:!1,this.setAttr({strokeWidth:this.getAttr("strokeWidth")||"1",stroke:this.getAttr("stroke")||"#000000"})}cloneShape(){return new Pc({...super.getBaseOptions(),cx:this.cx,cy:this.cy,toX:this.toX,toY:this.toY,isLineThrough:this.isLineThrough})}update(t){typeof t.cx=="number"&&(this.cx=t.cx,this.shouldUpdatePathD=!0),typeof t.cy=="number"&&(this.cy=t.cy,this.shouldUpdatePathD=!0),typeof t.toX=="number"&&(this.toX=t.toX,this.shouldUpdatePathD=!0),typeof t.toY=="number"&&(this.toY=t.toY,this.shouldUpdatePathD=!0),typeof t.isLineThrough=="boolean"&&(this.isLineThrough=t.isLineThrough,this.shouldUpdatePathD=!0)}toSVGPathData(){if(this.isLineThrough){const t=this.cx*2-(0+this.toX)/2,e=this.cy*2-(0+this.toY)/2;return[["m",0,0],["q",t,e,this.toX,this.toY]]}else return[["m",0,0],["q",this.cx,this.cy,this.toX,this.toY]]}toCanvasContext(t){if(t.beginPath(),t.moveTo(0,0),this.isLineThrough){const e=this.cx*2-(0+this.toX)/2,i=this.cy*2-(0+this.toY)/2;t.quadraticCurveTo(e,i,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}}class kr extends gt{points;isStraight;constructor(t){super(t),this.points=t?.points||[],this.isStraight=typeof t?.isStraight=="boolean"?t.isStraight:!0,this.setAttr({strokeWidth:this.getAttr("strokeWidth")||"1",stroke:this.getAttr("stroke")||"#000000"})}cloneShape(){return new kr({...super.getBaseOptions(),points:[...this.points],isStraight:this.isStraight})}update(t){"points"in t&&(this.points=[...t.points||this.points],this.shouldUpdatePathD=!0),typeof t.isStraight=="boolean"&&(this.isStraight=t.isStraight,this.shouldUpdatePathD=!0)}toSVGPathData(){const t=[];if(this.points.length<3)return t;const e=this.points.length;if(this.isStraight){t.push(["m",this.points[0].x,this.points[0].y]);for(let i=1;i<=e-1;i++)t.push(["l",this.points[i].x-this.points[i-1].x,this.points[i].y-this.points[i-1].y]);t.push(["z"])}else{const i=(this.points[0].x+this.points[e-1].x)/2,s=(this.points[0].y+this.points[e-1].y)/2;let r=i,o=s;t.push(["m",r,o]);for(let a=0;a<e-1;a++){const c=(this.points[a].x+this.points[a+1].x)/2,h=(this.points[a].y+this.points[a+1].y)/2;t.push(["q",this.points[a].x-r,this.points[a].y-o,c-r,h-o]),r=c,o=h}t.push(["q",this.points[e-1].x-r,this.points[e-1].y-o,i-r,s-o])}return t}toCanvasContext(t){if(this.points.length<3)return;t.beginPath();const e=this.points.length;if(this.isStraight){t.moveTo(this.points[0].x,this.points[0].y);for(let i=1;i<=e-1;i++)t.lineTo(this.points[i].x,this.points[i].y);t.closePath()}else{const i=(this.points[0].x+this.points[e-1].x)/2,s=(this.points[0].y+this.points[e-1].y)/2;t.moveTo(i,s);for(let r=0;r<e-1;r++){const o=(this.points[r].x+this.points[r+1].x)/2,a=(this.points[r].y+this.points[r+1].y)/2;t.quadraticCurveTo(this.points[r].x,this.points[r].y,o,a)}t.quadraticCurveTo(this.points[e-1].x,this.points[e-1].y,i,s)}}isPointInShape(t){const e=this.points.length;let i=!1;const s=2e-10;for(let r=0,o=e-1;r<e;o=r,r++){const a=this.points[r].x,c=this.points[r].y,h=this.points[o].x,l=this.points[o].y;if(a===t.x&&c===t.y||h===t.x&&l===t.y||t.y===c&&t.y===l)return!0;if(t.y>=c&&t.y<l||t.y<c&&t.y>=l){const u=(h-a)/(l-c),d=a+u*(t.y-c);if(d===t.x||Math.abs(d-t.x)<s)return!0;d>t.x&&(i=!i)}}return i}[Symbol.iterator](){let t=-1;return{next:()=>({value:t<=this.points.length-1?this.points[++t]:void 0,done:t>=this.points.length})}}static generate(t,e,i,s){const r=[];for(let o=0;o<s;o++){const a=o/s*2*Math.PI,{dx:c,dy:h}=rn(a,i);r.push({x:t+c,y:e+h})}return new kr({points:r})}}class Ac extends qt{length=100;constructor(t){super(t);const e=new Rn({drag:{followSibling:!0},lineLength:this.length});this.addShape(e);const i=new Rn({drag:{followSibling:!0},lineLength:20+Math.random()*20});this.addShape(i,{dX:90-Math.random()*40,dDegree:Math.random()*70});const s=new Rn({drag:{followSibling:!0},lineLength:20+Math.random()*20});this.addShape(s,{dX:90-Math.random()*40,dDegree:-Math.random()*70}),this.comboRotate(-90,!0)}cloneShapeCombo(){return new Ac(super.getBaseOptions())}}class si extends gt{ballRadius;constructor(t){super(t),this.ballRadius=t?.ballRadius||0}cloneShape(){return new si({...super.getBaseOptions(),ballRadius:this.ballRadius})}update(t){typeof t.ballRadius=="number"&&(this.ballRadius=t.ballRadius,this.shouldUpdatePathD=!0)}getBoundingClientRect(){return{x:-this.ballRadius,y:-this.ballRadius,width:this.ballRadius*2,height:this.ballRadius*2}}toSVGEl(){const t=an("circle");return this.setAttr({cx:"0",cy:"0",r:String(this.ballRadius)}),t}toSVGPathData(){return this.ballRadius?[["m",0,-this.ballRadius],["a",this.ballRadius,this.ballRadius,0,1,1,0,2*this.ballRadius],["a",this.ballRadius,this.ballRadius,0,1,1,0,-2*this.ballRadius],["z"]]:[["m",0,0]]}toCanvasContext(t){t.beginPath(),t.arc(0,0,this.ballRadius,0,Math.PI*2,!0),t.closePath()}eq(t){return this.x===t.x&&this.y===t.y&&this.ballRadius===t.ballRadius&&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 Kn(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 i=t/e;this.scalar(i)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,i=this.y;return{x:i*t.x-e*t.y,y:e*t.y-i*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}}}class Mc extends gt{constructor(t){super(t)}cloneShape(){return new Mc({...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 dn extends gt{rectWidth;rectHeight;rectBorderRadius;constructor(t){super(t),this.rectWidth=t.rectWidth||0,this.rectHeight=t.rectHeight||0,this.rectBorderRadius=t.rectBorderRadius||0}cloneShape(){return new dn({...super.getBaseOptions(),rectWidth:this.rectWidth,rectHeight:this.rectHeight,rectBorderRadius:this.rectBorderRadius})}update(t){typeof t.rectWidth=="number"&&(this.rectWidth=t.rectWidth,this.shouldUpdatePathD=!0),typeof t.rectHeight=="number"&&(this.rectHeight=t.rectHeight,this.shouldUpdatePathD=!0),typeof t.rectBorderRadius=="number"&&(this.rectBorderRadius=t.rectBorderRadius,this.shouldUpdatePathD=!0)}getBoundingClientRect(){return{x:0,y:0,width:this.rectWidth,height:this.rectHeight}}toSVGEl(){const t=an("rect");return this.setAttr({x:"0",y:"0",width:String(this.rectWidth),height:String(this.rectHeight),rx:String(this.rectBorderRadius),ry:String(this.rectBorderRadius)}),t}toSVGPathData(){return this.rectBorderRadius?[["m",this.rectBorderRadius,0],["l",this.rectWidth-this.rectBorderRadius*2,0],["a",this.rectBorderRadius,this.rectBorderRadius,0,0,1,this.rectBorderRadius,this.rectBorderRadius],["l",0,this.rectHeight-this.rectBorderRadius*2],["a",this.rectBorderRadius,this.rectBorderRadius,0,0,1,-this.rectBorderRadius,this.rectBorderRadius],["l",this.rectBorderRadius*2-this.rectWidth,0],["a",this.rectBorderRadius,this.rectBorderRadius,0,0,1,-this.rectBorderRadius,-this.rectBorderRadius],["l",0,this.rectBorderRadius*2-this.rectHeight],["a",this.rectBorderRadius,this.rectBorderRadius,0,0,1,this.rectBorderRadius,-this.rectBorderRadius],["z"]]:[["m",0,0],["l",this.rectWidth,0],["l",0,this.rectHeight],["l",-this.rectWidth,0],["z"]]}toCanvasContext(t){t.beginPath(),this.rectBorderRadius<=0?t.rect(0,0,this.rectWidth,this.rectHeight):(t.moveTo(0,this.rectBorderRadius),t.lineTo(0,this.rectHeight-this.rectBorderRadius),t.quadraticCurveTo(0,this.rectHeight,this.rectBorderRadius,this.rectHeight),t.lineTo(this.rectWidth-this.rectBorderRadius,this.rectHeight),t.quadraticCurveTo(this.rectWidth,this.rectHeight,this.rectWidth,this.rectHeight-this.rectBorderRadius),t.lineTo(this.rectWidth,this.rectBorderRadius),t.quadraticCurveTo(this.rectWidth,0,this.rectWidth-this.rectBorderRadius,0),t.lineTo(this.rectBorderRadius,0),t.quadraticCurveTo(0,0,0,this.rectBorderRadius)),t.closePath()}static fromCubicBezier(t,e,i,s,r,o,a,c){const l=new Dt({x:t,y:e,c1x:i,c1y:s,c2x:r,c2y:o,toX:a,toY:c}).getBoundingClientRect();return new dn({x:l.x,y:l.y,rectWidth:l.width,rectHeight:l.height})}eq(t){return this.x===t.x&&this.y===t.y&&this.rectWidth===t.rectWidth&&this.rectHeight===t.rectHeight&&this.rectBorderRadius===t.rectBorderRadius}intersection(t){return!(this.x+this.rectWidth<t.x||t.x+t.rectWidth<this.x||this.y+this.rectHeight<t.y||t.y+t.rectHeight<this.y)}isPointInShape(t){return t.x>=this.x&&t.x<=this.x+this.rectWidth&&t.y>=this.y&&t.y<=this.y+this.rectHeight}}class Dc extends gt{rx;ry;constructor(t){super(t),this.rx=t?.heartRx||10,this.ry=t?.heartRy||10}cloneShape(){return new Dc({...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 Ic extends gt{rx;ry;constructor(t){super(t),this.rx=t?.heartRx||50,this.ry=t?.heartRy||50}cloneShape(){return new Ic({...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 Oc extends gt{r;constructor(t){super(t),this.r=t?.starR||20}cloneShape(){return new Oc({...super.getBaseOptions(),starR:this.r})}toSVGPathData(){const t=[["m",0,-this.r]];for(let e=0;e<6;e+=1){const i=288+e*144,s=this.r*Math.cos(q(i)),r=this.r*Math.sin(q(i));t.push(["l",s,r])}return t}}class kc extends gt{constructor(t){super(t)}cloneShape(){return new kc({...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 Rc extends gt{constructor(t){super(t)}cloneShape(){return new Rc({...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 Lc extends gt{constructor(t){super({...t,initD:"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 Lc({...super.getBaseOptions()})}}class zc extends gt{rx;ry;constructor(t){super(t),this.rx=t?.rx||0,this.ry=t?.ry||0}cloneShape(){return new zc({...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}}toSVGEl(){const t=an("ellipse");return this.setAttr({cx:"0",cy:"0",rx:String(this.rx),ry:String(this.ry)}),t}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 Nc extends qt{showFlame;flame;ship;constructor(t){super(t),this.showFlame=typeof t?.showFlame=="boolean"?t?.showFlame:!0,this.flame=new gt({initD:[["M",-15,0],["L",-2.5,-5],["L",-2.5,5],["Z"]],drag:{followSibling:!0}}),this.showFlame&&this.addShape(this.flame),this.ship=new gt({initD:[["M",10,0],["L",-10,10],["L",-5,0],["L",-10,-10],["L",10,0],["Z"]],drag:{followSibling:!0}}),this.addShape(this.ship)}cloneShapeCombo(){return new Nc({...super.getBaseOptions(),showFlame:this.showFlame})}update(t){typeof t?.showFlame=="boolean"&&(this.shapes=[],this.showFlame=t?.showFlame,this.showFlame&&this.addShape(this.flame),this.addShape(this.ship))}}class Fc extends qt{width;height;cornerRadius;constructor(t){super(t),this.width=t.segmentWidth,this.height=t.segmentHeight,this.cornerRadius=typeof t.segmentCornerRadius=="number"?t.segmentCornerRadius:this.height*.5;const e=new dn({drag:{followSibling:!0},rectWidth:this.width+this.cornerRadius*2,rectHeight:this.height,rectBorderRadius:this.cornerRadius});this.addShape(e,{dX:0-this.cornerRadius,dY:0-this.height*.5});const i=new si({drag:{followSibling:!0},ballRadius:2});this.addShape(i);const s=new si({drag:{followSibling:!0},ballRadius:2});this.addShape(s,{dX:0+this.width})}cloneShapeCombo(){return new Fc({...super.getBaseOptions(),segmentWidth:this.width,segmentHeight:this.height,segmentCornerRadius:this.cornerRadius})}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 Bc extends qt{options;value$=new Re;subscription;constructor(t){super(t),this.options=t;const e=t?.sliderMin||0,i=t?.sliderMax||100,s=t?.sliderStep||1,r=qp(e,i,s),o=r(typeof t?.sliderDefaultValue=="number"?Y(t.sliderDefaultValue,e,i):e);this.value$.next(o);const a=o/(i-e),c=t?.sliderWidth||100,h=t?.sliderHeight||4,l=h*.5,u=h*2.5,d=t?.sliderBackgroundColor||"#f5f5f5",f=t?.sliderForegroundColor||"#5a82f0",p=new dn({rectWidth:c,rectHeight:h,rectBorderRadius:l,attrs:{fill:d},drag:{enable:!1}});this.addShape(p);const m=new dn({rectWidth:c*a,rectHeight:h,rectBorderRadius:l,attrs:{fill:f},drag:{enable:!1}});this.addShape(m);const v=new si({x:c*a,y:l,ballRadius:u,attrs:{fill:f},drag:{enable:!0,alongPath:new $t([["m",0,0],["l",c,0]])}});this.addShape(v),this.subscription=v.transform$.subscribe(({dX:y})=>{console.log(y);const b=(v.x-p.x)/c;m.update({rectWidth:c*b}),this.value$.next(r(b*(i-e)+e))})}destroy(){super.destroy(),this.subscription.unsubscribe()}cloneShapeCombo(){return new Bc({...super.getBaseOptions(),...this.options})}}class Ki extends gt{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,i=t.height||0,s=(t.endDegree-t.startDegree-180)/2;if(t.radius)this.radius=t.radius;else if(this.half){const r=Math.min(e/2,i)-this.lineWidth;this.radius=Math.max(0,r-r*Math.sin(q(s)))}else this.radius=Math.max(0,Math.min(e/2,i/2)-this.lineWidth);t.x||(this.x=e/2),t.y||(this.half?this.y=i-this.lineWidth-this.radius*Math.sin(q(s)):this.y=i/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 Ki({...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}=rn(q(this.startDegree),this.radius),{dx:i,dy:s}=rn(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,i-t,s-e]]}toCanvasContext(t){if(this.startColor&&this.endColor){let e;if(this.half){const i=this.radius-this.radius*Math.cos(Math.PI*this.percent),s=this.radius*Math.sin(Math.PI*this.percent);e=t.createLinearGradient(-this.radius,0,-this.radius+i,-s,{0:this.startColor,1:this.endColor})}else{const i=this.radius*Math.sin(2*Math.PI*this.percent),s=this.radius*Math.cos(2*Math.PI*this.percent);e=t.createLinearGradient(0,-this.radius,i,-s,{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 Uc extends qt{half;lineWidth;width;height;bgColor;startColor;endColor;startDegree;endDegree;percent=0;ringBg;ring;lines=[];indicatorLineCount;constructor(t){if(super(t),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 Ki({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 Ki({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 r=this.ringBg.radius-20-17;for(let o=0;o<this.indicatorLineCount;o++){const a=new Rn({lineLength:17,startColor:this.startColor,endColor:this.endColor,attrs:{"stroke-linecap":"round","stroke-width":String(2),stroke:this.bgColor}});this.lines.push(a);const c=-90+this.startDegree+(this.endDegree-this.startDegree)/(this.indicatorLineCount-1)*o;this.addShape(a,{dX:this.ringBg.x+Math.cos(q(c))*r,dY:this.ringBg.y+Math.sin(q(c))*r,dDegree:c})}}this.setPercent(t.percent||0)}cloneShapeCombo(){return new Uc({...super.getBaseOptions(),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})}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)}}class ri extends gt{text;width=0;height=0;constructor(t){super(t),this.text=t.text,this.setAttr({fontSize:"10px",fontFamily:'system-ui, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif',emojiFontFamily:'"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif',fill:"#666666",stroke:"none","alignment-baseline":"middle",textAnchor:"start",...this.attrs});const e=co(this.getAttr("fontSize"),10).number,i=co(this.getAttr("fontWeight"),400).number,s=ri.measureText(this.text,e,i);this.width=s.width,this.height=s.height}cloneShape(){return new ri({...super.getBaseOptions(),text:this.text})}toSVGEl(){const t=an("text");t.setAttribute("x","0"),t.setAttribute("y","0"),t.style.alignmentBaseline="middle";const e=this.text.split(`
|
|
82
|
+
*/var nd;function Cx(){return nd||(nd=1,{}.NODE_ENV!=="production"&&function(){function n(h,l){return h===l&&(h!==0||1/h===1/l)||h!==h&&l!==l}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=tt,e=td(),i=typeof Object.is=="function"?Object.is:n,s=e.useSyncExternalStore,r=t.useRef,o=t.useEffect,a=t.useMemo,c=t.useDebugValue;ac.useSyncExternalStoreWithSelector=function(h,l,u,d,f){var p=r(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function y(S){if(!b){if(b=!0,x=S,S=d(S),f!==void 0&&m.hasValue){var D=m.value;if(f(D,S))return w=D}return w=S}if(D=w,i(x,S))return D;var L=d(S);return f!==void 0&&f(D,L)?(x=S,D):(x=S,w=L)}var b=!1,x,w,C=u===void 0?null:u;return[function(){return y(l())},C===null?void 0:function(){return y(C())}]},[l,u,d,f]);var v=s(h,p[0],p[1]);return o(function(){m.hasValue=!0,m.value=v},[v]),c(v),v},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),ac}({}).NODE_ENV==="production"?ic.exports=Sx():ic.exports=Cx();var Ex=ic.exports;function Tx(n){const t=tt.createContext(null);function e({children:a}){return React.createElement(t.Provider,{value:n},a)}function i(){const a=tt.useContext(t);if(!a)throw new ReferenceError("createReactAppStoreContext's hooks cannot be called outside of AppStoreProvider");return a}function s(a,c){const h=i(),l=u=>h.subscribe(()=>u());return a?Ex.useSyncExternalStoreWithSelector(l,h.getState,h.getState,a,c):tt.useSyncExternalStore(l,h.getState,h.getState)}function r(){const a=i();if(cs(a))throw new Error("useSetAppState is only supported for StateStoreLike");return a.setState.bind(a)}function o(){const a=i();if(!cs(a))throw new Error("useDispatch is only supported for ReduxStore");return a.dispatch.bind(a)}return{AppStoreProvider:e,useAppStore:i,useAppState:s,useSetAppState:r,useDispatch:o}}function Px(n){const e=tt.useRef(li(n.value)).current;if(!e&&!("defaultValue"in n))throw new Error("defaultValue is required in uncontrolled mode");if(e&&!("onChange"in n))throw new Error("onChange is required in controlled mode");const[i,s]=tt.useState(()=>e?n.value:n.defaultValue),r=e?n.value:i,o=tt.useRef(r);o.current=r;const a=tt.useRef(!1);tt.useEffect(()=>{!a.current&&li(n.value)!==e&&(a.current=!0,console.warn("[useReactControllableState] can't switch between controlled and uncontrolled mode."))},[n.value]);const c=tt.useRef(n.beforeChange);c.current=n.beforeChange;const h=tt.useRef(n.onChange);h.current=n.onChange;const l=tt.useRef(0),u=tt.useCallback(async d=>{const f=++l.current,p=typeof d=="function"?d(o.current):d;c.current&&!await c.current(p)||f===l.current&&(e||s(p),h.current?.(p))},[]);return[r,u]}var id=Symbol.for("immer-nothing"),sd=Symbol.for("immer-draftable"),Yt=Symbol.for("immer-state"),Ax={}.NODE_ENV!=="production"?[function(n){return`The plugin for '${n}' has not been loaded into Immer. To enable the plugin, import and call \`enable${n}()\` when initializing your application.`},function(n){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${n}'`},"This object has been frozen and should not be mutated",function(n){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+n},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(n){return`'current' expects a draft, got: ${n}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(n){return`'original' expects a draft, got: ${n}`}]:[];function te(n,...t){if({}.NODE_ENV!=="production"){const e=Ax[n],i=On(e)?e.apply(null,t):e;throw new Error(`[Immer] ${i}`)}throw new Error(`[Immer] minified error nr: ${n}. Full error at: https://bit.ly/3cXEKWf`)}var ee=Object,ii=ee.getPrototypeOf,pr="constructor",gr="prototype",cc="configurable",yr="enumerable",br="writable",Xi="value",fn=n=>!!n&&!!n[Yt];function Ye(n){return n?od(n)||xr(n)||!!n[sd]||!!n[pr]?.[sd]||_r(n)||Sr(n):!1}var Mx=ee[gr][pr].toString(),rd=new WeakMap;function od(n){if(!n||!lc(n))return!1;const t=ii(n);if(t===null||t===ee[gr])return!0;const e=ee.hasOwnProperty.call(t,pr)&&t[pr];if(e===Object)return!0;if(!On(e))return!1;let i=rd.get(e);return i===void 0&&(i=Function.toString.call(e),rd.set(e,i)),i===Mx}function wr(n,t,e=!0){ji(n)===0?(e?Reflect.ownKeys(n):ee.keys(n)).forEach(s=>{t(s,n[s],n)}):n.forEach((i,s)=>t(s,i,n))}function ji(n){const t=n[Yt];return t?t.type_:xr(n)?1:_r(n)?2:Sr(n)?3:0}var ad=(n,t,e=ji(n))=>e===2?n.has(t):ee[gr].hasOwnProperty.call(n,t),hc=(n,t,e=ji(n))=>e===2?n.get(t):n[t],vr=(n,t,e,i=ji(n))=>{i===2?n.set(t,e):i===3?n.add(e):n[t]=e};function Dx(n,t){return n===t?n!==0||1/n===1/t:n!==n&&t!==t}var xr=Array.isArray,_r=n=>n instanceof Map,Sr=n=>n instanceof Set,lc=n=>typeof n=="object",On=n=>typeof n=="function",uc=n=>typeof n=="boolean";function Ix(n){const t=+n;return Number.isInteger(t)&&String(t)===n}var $e=n=>n.copy_||n.base_,fc=n=>n.modified_?n.copy_:n.base_;function dc(n,t){if(_r(n))return new Map(n);if(Sr(n))return new Set(n);if(xr(n))return Array[gr].slice.call(n);const e=od(n);if(t===!0||t==="class_only"&&!e){const i=ee.getOwnPropertyDescriptors(n);delete i[Yt];let s=Reflect.ownKeys(i);for(let r=0;r<s.length;r++){const o=s[r],a=i[o];a[br]===!1&&(a[br]=!0,a[cc]=!0),(a.get||a.set)&&(i[o]={[cc]:!0,[br]:!0,[yr]:a[yr],[Xi]:n[o]})}return ee.create(ii(n),i)}else{const i=ii(n);if(i!==null&&e)return{...n};const s=ee.create(i);return ee.assign(s,n)}}function Wi(n,t=!1){return Er(n)||fn(n)||!Ye(n)||(ji(n)>1&&ee.defineProperties(n,{set:Cr,add:Cr,clear:Cr,delete:Cr}),ee.freeze(n),t&&wr(n,(e,i)=>{Wi(i,!0)},!1)),n}function Ox(){te(2)}var Cr={[Xi]:Ox};function Er(n){return n===null||!lc(n)?!0:ee.isFrozen(n)}var Tr="MapSet",mc="Patches",cd="ArrayMethods",hd={};function kn(n){const t=hd[n];return t||te(0,n),t}var ld=n=>!!hd[n],Hi,ud=()=>Hi,kx=(n,t)=>({drafts_:[],parent_:n,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ld(Tr)?kn(Tr):void 0,arrayMethodsPlugin_:ld(cd)?kn(cd):void 0});function fd(n,t){t&&(n.patchPlugin_=kn(mc),n.patches_=[],n.inversePatches_=[],n.patchListener_=t)}function pc(n){gc(n),n.drafts_.forEach(Rx),n.drafts_=null}function gc(n){n===Hi&&(Hi=n.parent_)}var dd=n=>Hi=kx(Hi,n);function Rx(n){const t=n[Yt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function md(n,t){t.unfinalizedDrafts_=t.drafts_.length;const e=t.drafts_[0];if(n!==void 0&&n!==e){e[Yt].modified_&&(pc(t),te(4)),Ye(n)&&(n=pd(t,n));const{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(e[Yt].base_,n,t)}else n=pd(t,e);return Lx(t,n,!0),pc(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),n!==id?n:void 0}function pd(n,t){if(Er(t))return t;const e=t[Yt];if(!e)return Ar(t,n.handledSet_,n);if(!Pr(e,n))return t;if(!e.modified_)return e.base_;if(!e.finalized_){const{callbacks_:i}=e;if(i)for(;i.length>0;)i.pop()(n);bd(e,n)}return e.copy_}function Lx(n,t,e=!1){!n.parent_&&n.immer_.autoFreeze_&&n.canAutoFreeze_&&Wi(t,e)}function gd(n){n.finalized_=!0,n.scope_.unfinalizedDrafts_--}var Pr=(n,t)=>n.scope_===t,zx=[];function yd(n,t,e,i){const s=$e(n),r=n.type_;if(i!==void 0&&hc(s,i,r)===t){vr(s,i,e,r);return}if(!n.draftLocations_){const a=n.draftLocations_=new Map;wr(s,(c,h)=>{if(fn(h)){const l=a.get(h)||[];l.push(c),a.set(h,l)}})}const o=n.draftLocations_.get(t)??zx;for(const a of o)vr(s,a,e,r)}function Nx(n,t,e){n.callbacks_.push(function(s){const r=t;if(!r||!Pr(r,s))return;s.mapSetPlugin_?.fixSetContents(r);const o=fc(r);yd(n,r.draft_??r,o,e),bd(r,s)})}function bd(n,t){if(n.modified_&&!n.finalized_&&(n.type_===3||n.type_===1&&n.allIndicesReassigned_||(n.assigned_?.size??0)>0)){const{patchPlugin_:i}=t;if(i){const s=i.getPath(n);s&&i.generatePatches_(n,s,t)}gd(n)}}function Fx(n,t,e){const{scope_:i}=n;if(fn(e)){const s=e[Yt];Pr(s,i)&&s.callbacks_.push(function(){Dr(n);const o=fc(s);yd(n,e,o,t)})}else Ye(e)&&n.callbacks_.push(function(){const r=$e(n);n.type_===3?r.has(e)&&Ar(e,i.handledSet_,i):hc(r,t,n.type_)===e&&i.drafts_.length>1&&(n.assigned_.get(t)??!1)===!0&&n.copy_&&Ar(hc(n.copy_,t,n.type_),i.handledSet_,i)})}function Ar(n,t,e){return!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||fn(n)||t.has(n)||!Ye(n)||Er(n)||(t.add(n),wr(n,(i,s)=>{if(fn(s)){const r=s[Yt];if(Pr(r,e)){const o=fc(r);vr(n,i,o,n.type_),gd(r)}}else Ye(s)&&Ar(s,t,e)})),n}function Bx(n,t){const e=xr(n),i={type_:e?1:0,scope_:t?t.scope_:ud(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:n,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let s=i,r=Mr;e&&(s=[i],r=qi);const{revoke:o,proxy:a}=Proxy.revocable(s,r);return i.draft_=a,i.revoke_=o,[a,i]}var Mr={get(n,t){if(t===Yt)return n;let e=n.scope_.arrayMethodsPlugin_;const i=n.type_===1&&typeof t=="string";if(i&&e?.isArrayOperationMethod(t))return e.createMethodInterceptor(n,t);const s=$e(n);if(!ad(s,t,n.type_))return Ux(n,s,t);const r=s[t];if(n.finalized_||!Ye(r)||i&&n.operationMethod&&e?.isMutatingArrayMethod(n.operationMethod)&&Ix(t))return r;if(r===yc(n.base_,t)){Dr(n);const o=n.type_===1?+t:t,a=wc(n.scope_,r,n,o);return n.copy_[o]=a}return r},has(n,t){return t in $e(n)},ownKeys(n){return Reflect.ownKeys($e(n))},set(n,t,e){const i=wd($e(n),t);if(i?.set)return i.set.call(n.draft_,e),!0;if(!n.modified_){const s=yc($e(n),t),r=s?.[Yt];if(r&&r.base_===e)return n.copy_[t]=e,n.assigned_.set(t,!1),!0;if(Dx(e,s)&&(e!==void 0||ad(n.base_,t,n.type_)))return!0;Dr(n),bc(n)}return n.copy_[t]===e&&(e!==void 0||t in n.copy_)||Number.isNaN(e)&&Number.isNaN(n.copy_[t])||(n.copy_[t]=e,n.assigned_.set(t,!0),Fx(n,t,e)),!0},deleteProperty(n,t){return Dr(n),yc(n.base_,t)!==void 0||t in n.base_?(n.assigned_.set(t,!1),bc(n)):n.assigned_.delete(t),n.copy_&&delete n.copy_[t],!0},getOwnPropertyDescriptor(n,t){const e=$e(n),i=Reflect.getOwnPropertyDescriptor(e,t);return i&&{[br]:!0,[cc]:n.type_!==1||t!=="length",[yr]:i[yr],[Xi]:e[t]}},defineProperty(){te(11)},getPrototypeOf(n){return ii(n.base_)},setPrototypeOf(){te(12)}},qi={};for(let n in Mr){let t=Mr[n];qi[n]=function(){const e=arguments;return e[0]=e[0][0],t.apply(this,e)}}qi.deleteProperty=function(n,t){return{}.NODE_ENV!=="production"&&isNaN(parseInt(t))&&te(13),qi.set.call(this,n,t,void 0)},qi.set=function(n,t,e){return{}.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&te(14),Mr.set.call(this,n[0],t,e,n[0])};function yc(n,t){const e=n[Yt];return(e?$e(e):n)[t]}function Ux(n,t,e){const i=wd(t,e);return i?Xi in i?i[Xi]:i.get?.call(n.draft_):void 0}function wd(n,t){if(!(t in n))return;let e=ii(n);for(;e;){const i=Object.getOwnPropertyDescriptor(e,t);if(i)return i;e=ii(e)}}function bc(n){n.modified_||(n.modified_=!0,n.parent_&&bc(n.parent_))}function Dr(n){n.copy_||(n.assigned_=new Map,n.copy_=dc(n.base_,n.scope_.immer_.useStrictShallowCopy_))}var Vx=class{constructor(n){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,e,i)=>{if(On(t)&&!On(e)){const r=e;e=t;const o=this;return function(c=r,...h){return o.produce(c,l=>e.call(this,l,...h))}}On(e)||te(6),i!==void 0&&!On(i)&&te(7);let s;if(Ye(t)){const r=dd(this),o=wc(r,t,void 0);let a=!0;try{s=e(o),a=!1}finally{a?pc(r):gc(r)}return fd(r,i),md(s,r)}else if(!t||!lc(t)){if(s=e(t),s===void 0&&(s=t),s===id&&(s=void 0),this.autoFreeze_&&Wi(s,!0),i){const r=[],o=[];kn(mc).generateReplacementPatches_(t,s,{patches_:r,inversePatches_:o}),i(r,o)}return s}else te(1,t)},this.produceWithPatches=(t,e)=>{if(On(t))return(o,...a)=>this.produceWithPatches(o,c=>t(c,...a));let i,s;return[this.produce(t,e,(o,a)=>{i=o,s=a}),i,s]},uc(n?.autoFreeze)&&this.setAutoFreeze(n.autoFreeze),uc(n?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(n.useStrictShallowCopy),uc(n?.useStrictIteration)&&this.setUseStrictIteration(n.useStrictIteration)}createDraft(n){Ye(n)||te(8),fn(n)&&(n=Yx(n));const t=dd(this),e=wc(t,n,void 0);return e[Yt].isManual_=!0,gc(t),e}finishDraft(n,t){const e=n&&n[Yt];(!e||!e.isManual_)&&te(9);const{scope_:i}=e;return fd(i,t),md(void 0,i)}setAutoFreeze(n){this.autoFreeze_=n}setUseStrictShallowCopy(n){this.useStrictShallowCopy_=n}setUseStrictIteration(n){this.useStrictIteration_=n}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(n,t){let e;for(e=t.length-1;e>=0;e--){const s=t[e];if(s.path.length===0&&s.op==="replace"){n=s.value;break}}e>-1&&(t=t.slice(e+1));const i=kn(mc).applyPatches_;return fn(n)?i(n,t):this.produce(n,s=>i(s,t))}};function wc(n,t,e,i){const[s,r]=_r(t)?kn(Tr).proxyMap_(t,e):Sr(t)?kn(Tr).proxySet_(t,e):Bx(t,e);return(e?.scope_??ud()).drafts_.push(s),r.callbacks_=e?.callbacks_??[],r.key_=i,e&&i!==void 0?Nx(e,r,i):r.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(r);const{patchPlugin_:h}=c;r.modified_&&h&&h.generatePatches_(r,[],c)}),s}function Yx(n){return fn(n)||te(10,n),vd(n)}function vd(n){if(!Ye(n)||Er(n))return n;const t=n[Yt];let e,i=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,e=dc(n,t.scope_.immer_.useStrictShallowCopy_),i=t.scope_.immer_.shouldUseStrictIteration()}else e=dc(n,!0);return wr(e,(s,r)=>{vr(e,s,vd(r))},i),t&&(t.finalized_=!1),e}var $x=new Vx,xd=$x.produce;function Gx(n){const[t,e]=tt.useState(()=>Wi(typeof n=="function"?n():n,!0));return[t,tt.useCallback(i=>{e(typeof i=="function"?xd(i):Wi(i))},[])]}function Xx(n,t,e){const i=tt.useMemo(()=>xd(n),[n]);return tt.useReducer(i,t,e)}function jx(n){const[t,e]=tt.useState({width:0,height:0});return tt.useLayoutEffect(()=>{n.current&&e(()=>({width:n.current.offsetWidth,height:n.current.offsetHeight}))},[n]),t}function Wx(n){const t=Symbol("AppStore");function e(){const c=yv(n.getState());n.subscribe(u=>{c.value=u});const h=jf();if(!h)throw new Error("provideAppStore must be called in setup()");const l={store:n,stateRef:c};h.appContext.provides[t]=l}function i(){const c=Gf(t);if(!c)throw new ReferenceError("createVueAppStoreContext's hooks cannot be called before provideAppStore()");return c}function s(){const{store:c}=i();return c}function r(c){const{stateRef:h}=i();return c?qf(()=>c(h.value)):Xa(h)}function o(){const c=s();if(cs(c))throw new Error("useSetAppState is only supported for StateStoreLike");return c.setState.bind(c)}function a(){const c=s();if(!cs(c))throw new Error("useDispatch is only supported for ReduxStore");return c.dispatch.bind(c)}return{provideAppStore:e,useAppStore:s,useAppState:r,useSetAppState:o,useDispatch:a}}function Hx(n){const t=n.value(),e=li(t);if(!e&&!("defaultValue"in n))throw new Error("defaultValue is required in uncontrolled mode");if(e&&!("onChange"in n))throw new Error("onChange is required in controlled mode");const i=Af(e?t:n.defaultValue),s=qf(()=>e?n.value():i.value);let r=!1;qv(n.value,c=>{if(!r&&li(c)!==e){r=!0,console.warn("[useVueControllableState] can't switch between controlled and uncontrolled mode.");return}},{});let o=0;async function a(c){const h=++o,l=typeof c=="function"?c(s.value):c;n.beforeChange&&!await n.beforeChange(l)||h===o&&(e||(i.value=l),n.onChange?.(l),await Rf())}return[s,a]}let vc=class{x;y;toX;toY;constructor(t){this.x=G(t?.x||0,2),this.y=G(t?.y||0,2),this.toX=G(t?.toX||0,2),this.toY=G(t?.toY||0,2)}toSVGPathData(){return[["L",this.toX,this.toY]]}toCanvasContext(t){t.lineTo(this.toX,this.toY)}getBoundingClientRect(t=2){const e=Qt(this.x,this.y,this.toX,this.toY);if(e===0){const i=Math.min(this.x,this.toX),s=Math.min(this.y,this.toY),r=Math.max(this.x,this.toX),o=Math.max(this.y,this.toY);return{x:i,y:s,width:r-i,height:o-s}}else{const i=Math.sin(e),s=Math.cos(e),r=s*this.x-i*this.y,o=s*this.toX-i*this.toY,a=s*this.y+i*this.x,c=s*this.toY+i*this.toX;return{x:G(Math.min(r,o),t),y:G(Math.min(a,c),t),width:G(Math.max(r,o)-Math.min(r,o),t),height:G(Math.max(a,c)-Math.min(a,c),t)}}}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,i=this.y,s=t.toX,r=t.toY,o=this.toX-e,a=t.x-s;if(!o&&!a)return null;const c=(this.toY-i)/o,h=(t.y-r)/a;if(o){if(!a)return{x:s,y:c*(s-e)+i}}else return{x:e,y:h*(e-s)+r};const l=(-h*s+r+c*e-i)/(c-h),u=c*(l-e)+i;return isNaN(l)||isNaN(u)?null:{x:l,y:u}}};class xc extends vc{rx;ry;xAxisRotate;largeArcFlag;sweepFlag;constructor(t){super(t),this.rx=G(t.rx,2),this.ry=G(t.ry,2),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}toSVGPathData(){return[["A",this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag,this.toX,this.toY]]}toCanvasContext(t){const[e,i,s,r,o,a,c]=this.convert(this.x,this.y,this.toX,this.toY,this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag);t.ellipse(e,i,s,r,o,a,c,!this.sweepFlag)}convert(t,e,i,s,r,o,a,c,h){const l=a/180*Math.PI,u=(t-i)/2,d=(e-s)/2,f=Math.cos(l)*u+Math.sin(l)*d,p=-Math.sin(l)*u+Math.cos(l)*d,m=f*f/(r*r)+p*p/(o*o);if(m>1){const U=Math.sqrt(m);throw r=U*r,o=U*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)),y=c!=h?1:-1,b=y*v*r*p/o,x=y*v*-o*f/r,w=(t+i)/2,C=(e+s)/2,S=Math.cos(l)*b-Math.sin(l)*x+w,D=Math.sin(l)*b+Math.cos(l)*x+C,L=(U,X,Z,at)=>(U*at>=X*Z?1:-1)*Math.acos((U*Z+X*at)/(Math.sqrt(U*U+X*X)*Math.sqrt(Z*Z+at*at))),I=L(1,0,t-S,e-D)-l,F=L(t-S,e-D,i-S,s-D);return[S,D,r,o,l,I,I+F]}}class qx extends vc{cx;cy;isLineThrough;constructor(t){super(t),this.cx=G(t.cx,2),this.cy=G(t.cy,2),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,i=this.cy*2-(this.y+this.toY)/2;t.quadraticCurveTo(e,i,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}getBoundingClientRect(t=2){const e=[this.x,this.toX],i=[this.y,this.toY];let s,r,o,a;for(let l=0;l<2;++l)s=l==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,r=l==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,o=l==0?this.x:this.y,Math.abs(s)>1e-12&&(a=-r/(2*s),0<a&&a<1&&[e,i][l].push(s*a*a+r*a+o));const c={x:Math.min(0,...e),y:Math.min(0,...i)},h={x:Math.max(0,...e),y:Math.max(0,...i)};return{x:G(c.x,t),y:G(c.y,t),width:G(h.x-c.x,t),height:G(h.y-c.y,t)}}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 Jx=qx;class Dt extends vc{c1x;c1y;c2x;c2y;constructor(t){super(t),this.c1x=G(t.c1x,2),this.c1y=G(t.c1y,2),this.c2x=G(t.c2x,2),this.c2y=G(t.c2y,2)}clone(){return new Dt({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(t=2){let e=this.c2x-2*this.c1x+this.x-(this.toX-2*this.c2x+this.c1x),i=2*(this.c1x-this.x)-2*(this.c2x-this.c1x),s=this.x-this.c1x,r=(-i+Math.sqrt(i*i-4*e*s))/2/e,o=(-i-Math.sqrt(i*i-4*e*s))/2/e;const a=[this.y,this.toY],c=[this.x,this.toX];let h;const l=[];Math.abs(r)>1e12&&(r=.5),Math.abs(o)>1e12&&(o=.5),r>=0&&r<=1&&(h=this.interpolate(r),c.push(h.x),a.push(h.y),l.push({X:h.x,Y:h.y})),o>=0&&o<=1&&(h=this.interpolate(o),c.push(h.x),a.push(h.y),l.push({X:h.x,Y:h.y})),e=this.c2y-2*this.c1y+this.y-(this.toY-2*this.c2y+this.c1y),i=2*(this.c1y-this.y)-2*(this.c2y-this.c1y),s=this.y-this.c1y,r=(-i+Math.sqrt(i*i-4*e*s))/2/e,o=(-i-Math.sqrt(i*i-4*e*s))/2/e,Math.abs(r)>1e12&&(r=.5),Math.abs(o)>1e12&&(o=.5),r>=0&&r<=1&&(h=this.interpolate(r),c.push(h.x),a.push(h.y),l.push({X:h.x,Y:h.y})),o>=0&&o<=1&&(h=this.interpolate(o),c.push(h.x),a.push(h.y),l.push({X:h.x,Y:h.y}));const u=[],d=l.length;for(let m=0;m<d;m++){for(let v=m+1;v<d;v++)l[m].X===l[v].X&&l[m].Y===l[v].Y&&(v=++m);u.push({X:l[m].X,Y:l[m].Y})}const f={x:Math.min(...c),y:Math.min(...a)},p={x:Math.max(...c),y:Math.max(...a)};return{x:G(f.x,t),y:G(f.y,t),width:G(p.x-f.x,t),height:G(p.y-f.y,t),dots:u}}static base3(t,e,i,s,r){const o=-3*e+9*i-9*s+3*r,a=t*o+6*e-12*i+6*s;return t*a-3*e+3*i}static bezlen(t,e,i,s,r,o,a,c,h=1){h=Math.max(0,Math.min(h,1));const l=h/2,u=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let f=0;for(let p=0;p<12;p++){const m=l*u[p]+l,v=Dt.base3(m,t,i,r,a),y=Dt.base3(m,e,s,o,c);f+=d[p]*Math.sqrt(v*v+y*y)}return l*f}length(t=1){return Dt.bezlen(this.x,this.y,this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY,t)}getPointAtSegmentLength(t){const e=this.getTatLen(t),i=1-e,s=Math.pow(i,3),r=Math.pow(i,2),o=e*e,a=o*e,c=s*this.x+r*3*e*this.c1x+i*3*e*e*this.c2x+a*this.toX,h=s*this.y+r*3*e*this.c1y+i*3*e*e*this.c2y+a*this.toY,l=this.x+2*e*(this.c1x-this.x)+o*(this.c2x-2*this.c1x+this.x),u=this.y+2*e*(this.c1y-this.y)+o*(this.c2y-2*this.c1y+this.y),d=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=i*this.x+e*this.c1x,m=i*this.y+e*this.c1y,v=i*this.c2x+e*this.toX,y=i*this.c2y+e*this.toY,b=90-Math.atan2(l-d,u-f)*180/Math.PI;return{x:c,y:h,m:{x:l,y:u},n:{x:d,y:f},start:{x:p,y:m},end:{x:v,y},alpha:b}}getTatLen(t){const e=this.x,i=this.y,s=this.c1x,r=this.c1y,o=this.c2x,a=this.c2y,c=this.toX,h=this.toY;if(t<0||Dt.bezlen(e,i,s,r,o,a,c,h)<t)return 0;const l=1;let u=l/2,d=l-u,f=Dt.bezlen(e,i,s,r,o,a,c,h,d);for(;Math.abs(f-t)>.01;)u/=2,d+=(f<t?1:-1)*u,f=Dt.bezlen(e,i,s,r,o,a,c,h,d);return d}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}}}class _d extends go{source;raw="";mode="text";tagname="";nodename="";textchunk="";entity="";quote="";attrs={};constructor(t){super(),this.source=t}parse(){const t=vp(this.source);if(t===0){this.emit("finish");return}let e,i,s=Rh(this.source,0);for(let r=1;r<t;r++)e=i,i=s,s=Rh(this.source,r),this.raw+=i,i&&this.step(i,s,e);s&&this.step(s,void 0,i),this.emit("finish")}step(t,e,i){t==`
|
|
83
|
+
`&&this.emit("newline"),this.act(t,e,i)}act(t,e,i){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":Ae("whitespace",t)?(this.textchunk+=Sd(this.entity),this.mode="text"):t==";"?(this.textchunk+=Sd(this.entity+t),this.mode="text"):this.entity+=t;break;case"special":if(i=="!"&&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(i=="]"&&t=="]"&&e==">"){this.mode="cdata end",this.textchunk=this.textchunk.slice(0,-1);break}t=="eof"&&(this.mode="cdata end",this.act(t,e,i)),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=="-"&&i=="-"&&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(!Ae("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,i)}break;case"close tag name start":Ae("whitespace",t)||(this.mode="close tag name",this.tagname="",this.nodename="",this.act(t,e,i));break;case"close tag name":if(Ae("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(Ae("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":Ae("whitespace",t)||(this.mode="attr",this.nodename="",this.act(t,e,i));break;case"attr":if(Ae("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(!Ae("whitespace",t)){if(this.mode="attr value",this.quote="",t=="'"||t=='"'){this.quote=t;return}this.act(t,e,i)}break;case"attr value":if(Ae("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&&i!="\\"&&(this.mode="attr start");break;default:this.attrs[this.nodename]+=t;break}break}}}function Sd(n){const t={lt:60,"lt;":60,"AMP;":38,AMP:38,"GT;":62,GT:62,"QUOT;":34,QUOT:34,"apos;":39,"bull;":8226,"bullet;":8226,"copy;":169,copy:169,"deg;":176,deg:176};let e;return n.charAt(0)=="#"?n.charAt(1).toLowerCase()=="x"?e=parseInt(n.substring(2),16):e=parseInt(n.substring(1),10):e=t[n],e?String.fromCharCode(e):"&"+n}var Cd=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Ed(n,t={}){var e=1,i=1;function s(z){var R=z.match(/\n/g);R&&(e+=R.length);var H=z.lastIndexOf(`
|
|
84
|
+
`);i=~H?z.length-H:i+z.length}function r(){var z={line:e,column:i};return function(R){return R.position=new o(z),p(),R}}function o(z){this.start=z,this.end={line:e,column:i},this.source=t.source}o.prototype.content=n;var a=[];function c(z){var R=new Error(t.source+":"+e+":"+i+": "+z);if(R.reason=z,R.filename=t.source,R.line=e,R.column=i,R.source=n,t.silent)a.push(R);else throw R}function h(){var z=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:z,parsingErrors:a}}}function l(){return f(/^{\s*/)}function u(){return f(/^}/)}function d(){var z,R=[];for(p(),m(R);n.length&&n.charAt(0)!="}"&&(z=Q()||St());)z!==!1&&(R.push(z),m(R));return R}function f(z){var R=z.exec(n);if(R){var H=R[0];return s(H),n=n.slice(H.length),R}}function p(){f(/^\s*/)}function m(z){var R;for(z=z||[];R=v();)R!==!1&&z.push(R);return z}function v(){var z=r();if(!(n.charAt(0)!="/"||n.charAt(1)!="*")){for(var R=2;n.charAt(R)!=""&&(n.charAt(R)!="*"||n.charAt(R+1)!="/");)++R;if(R+=2,n.charAt(R-1)==="")return c("End of comment missing");var H=n.slice(2,R-2);return i+=2,s(H),n=n.slice(R),i+=2,z({type:"comment",comment:H})}}function y(){var z=f(/^([^{]+)/);if(z)return Ge(z[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(R){return R.replace(/,/g,"")}).split(/\s*(?![^(]*\)),\s*/).map(function(R){return R.replace(/\u200C/g,",")})}function b(){var z=r(),R=f(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(R){if(R=Ge(R[0]),!f(/^:\s*/))return c("property missing ':'");var H=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/),ot=z({type:"declaration",property:R.replace(Cd,""),value:H?Ge(H[0]).replace(Cd,""):""});return f(/^[;\s]*/),ot}}function x(){var z=[];if(!l())return c("missing '{'");m(z);for(var R;R=b();)R!==!1&&(z.push(R),m(z));return u()?z:c("missing '}'")}function w(){for(var z,R=[],H=r();z=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)R.push(z[1]),f(/^,\s*/);if(R.length)return H({type:"keyframe",values:R,declarations:x()})}function C(){var z=r(),R=f(/^@([-\w]+)?keyframes\s*/);if(R){var H=R[1];if(R=f(/^([-\w]+)\s*/),!R)return c("@keyframes missing name");var ot=R[1];if(!l())return c("@keyframes missing '{'");for(var Xt,ye=m();Xt=w();)ye.push(Xt),ye=ye.concat(m());return u()?z({type:"keyframes",name:ot,vendor:H,keyframes:ye}):c("@keyframes missing '}'")}}function S(){var z=r(),R=f(/^@supports *([^{]+)/);if(R){var H=Ge(R[1]);if(!l())return c("@supports missing '{'");var ot=m().concat(d());return u()?z({type:"supports",supports:H,rules:ot}):c("@supports missing '}'")}}function D(){var z=r(),R=f(/^@host\s*/);if(R){if(!l())return c("@host missing '{'");var H=m().concat(d());return u()?z({type:"host",rules:H}):c("@host missing '}'")}}function L(){var z=r(),R=f(/^@media *([^{]+)/);if(R){var H=Ge(R[1]);if(!l())return c("@media missing '{'");var ot=m().concat(d());return u()?z({type:"media",media:H,rules:ot}):c("@media missing '}'")}}function I(){var z=r(),R=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(R)return z({type:"custom-media",name:Ge(R[1]),media:Ge(R[2])})}function F(){var z=r(),R=f(/^@page */);if(R){var H=y()||[];if(!l())return c("@page missing '{'");for(var ot=m(),Xt;Xt=b();)ot.push(Xt),ot=ot.concat(m());return u()?z({type:"page",selectors:H,declarations:ot}):c("@page missing '}'")}}function U(){var z=r(),R=f(/^@([-\w]+)?document *([^{]+)/);if(R){var H=Ge(R[1]),ot=Ge(R[2]);if(!l())return c("@document missing '{'");var Xt=m().concat(d());return u()?z({type:"document",document:ot,vendor:H,rules:Xt}):c("@document missing '}'")}}function X(){var z=r(),R=f(/^@font-face\s*/);if(R){if(!l())return c("@font-face missing '{'");for(var H=m(),ot;ot=b();)H.push(ot),H=H.concat(m());return u()?z({type:"font-face",declarations:H}):c("@font-face missing '}'")}}var Z=rt("import"),at=rt("charset"),nt=rt("namespace");function rt(z){var R=new RegExp("^@"+z+"\\s*([^;]+);");return function(){var H=r(),ot=f(R);if(ot){var Xt={type:z};return Xt[z]=ot[1].trim(),H(Xt)}}}function Q(){if(n[0]=="@")return C()||L()||I()||S()||Z()||at()||nt()||U()||F()||D()||X()}function St(){var z=r(),R=y();return R?(m(),z({type:"rule",selectors:R,declarations:x()})):c("selector missing")}return _c(h())}function Ge(n){return n?n.replace(/^\s+|\s+$/g,""):""}function _c(n,t){var e=n&&typeof n.type=="string",i=e?n:t;for(var s in n){var r=n[s];Array.isArray(r)?r.forEach(function(o){_c(o,i)}):r&&typeof r=="object"&&_c(r,i)}return e&&Object.defineProperty(n,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),n}class Td extends _d{currentItem={};items=[];groups=[];globalStyles={};grad={};idtops={};text="";constructor(t){super(t),this.on("tag",(e,i)=>{switch(this.text="",this.currentItem={type:e},e){case"g":this.groups.push(this.currentItem);break}this.processAttrs(e,i)}),this.on("text",e=>{if(this.currentItem.type=="style"){try{const i=Ed(e);for(const s of i.stylesheet.rules)for(const r of s.declarations)for(const o of s.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,i)=>{let s=this.groups.length;for(;s--;)if(this.groups[s]!=this.currentItem){let r="",o="";for(const a in this.groups[s])a=="transform"?r=this.groups[s].transform:a=="class"&&this.globalStyles["."+this.groups[s][a]]?o=this.globalStyles["."+this.groups[s][a]].join(";")+";"+o:a=="id"&&this.globalStyles["#"+this.groups[s][a]]?o=this.globalStyles["#"+this.groups[s][a]].join(";")+";"+o:typeof this.currentItem[a]>"u"&&(this.currentItem[a]=this.groups[s][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),Cc(this.currentItem.style,this.currentItem,Ec)}switch(this.processAttrs(e,i),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 i=[],s;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":s={},e.style&&Cc(e.style,s),s.offset=s.offset||e.offset,s.color=s["stop-color"]||e["stop-color"],s.opacity=s["stop-opacity"]||e["stop-opacity"],~(s.offset+"").indexOf("%")?s.offset=parseFloat(s.offset):s.offset=parseFloat(s.offset)*100,s.offset=+s.offset.toFixed(2),this.grad.stops.push(s);break;case"linearGradient":this.grad.angle=(360+Sc(parseFloat(e.x1),parseFloat(e.y1),parseFloat(e.x2),parseFloat(e.y2),parseFloat(e.x1)+100,parseFloat(e.y1))).toFixed(2),i=[this.grad.angle];for(let a=0,c=this.grad.stops.length;a<c;a++)s=this.grad.stops[a],a&&a!=c-1?i.push(s.color+":"+s.offset):i.push(s.color);this.idtops[this.grad.id]=i.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break;case"radialGradient":i=[];for(let a=0,c=this.grad.stops.length;a<c;a++)s=this.grad.stops[a],a&&a!=c-1?i.push(s.color+":"+s.offset):i.push(s.color);this.idtops[this.grad.id]=i.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(Ec.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"&&Cc(o,this.currentItem,Ec),r==="transform"&&(this.currentItem.transform=o+(this.currentItem.transform||" ")),r==="fill"){const a=o.match(/url\(#([^)]+)\)/);if(a){const c=a[1];this.currentItem.fillid=c,this.idtops[c]&&(this.currentItem.fill=this.idtops[c])}}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 Sc(n,t,e,i,s,r){if(typeof s>"u"||typeof r>"u"){const o=n-e,a=t-i;return!o&&!a?0:(180+Math.atan2(-a,-o)*180/Math.PI+360)%360}else return Sc(n,t,s,r)-Sc(e,i,s,r)}function Cc(n,t,e){const i=(n+"").split(";"),s=/^\s+|\s+$/g;for(let r=0,o=i.length;r<o;r++){const a=i[r].split(":"),c=a[0].replace(s,"").replace(/[A-Z]/g,function(h){return"-"+h.toLowerCase()});(!e||e.includes(c))&&(t[c]=a[1].replace(s,""))}}const Ec=["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 $t{prevPathX=0;prevPathY=0;isUpdatedSVGPathData=!0;isUpdatedSVGPathD=!0;isUpdatedBoundingClientRect=!0;isUpdatedPolymorphPoints=!0;isUpdatedTotalLength=!0;normalizedLines=[];constructor(t){const e=typeof t=="string"?Ws(t):t||[],i=Ta(Hs(e));for(let s=0,r=i.length;s<r;s++){const o=i[s];o[0]=="M"?(this.prevPathX=o[1],this.prevPathY=o[2]):this._appendLine(new Dt({x:this.prevPathX,y:this.prevPathY,c1x:o[1],c1y:o[2],c2x:o[3],c2y:o[4],toX:o[5],toY:o[6]}))}}_appendLine(t){if(this.isUpdatedSVGPathData=!0,this.isUpdatedSVGPathD=!0,this.isUpdatedBoundingClientRect=!0,this.isUpdatedPolymorphPoints=!0,this.isUpdatedTotalLength=!0,t instanceof xc){js(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(h=>{const[l,u,d,f,p,m,v,y]=h;this.normalizedLines.push(new Dt({x:this.prevPathX,y:this.prevPathY,c1x:d,c1y:f,c2x:p,c2y:m,toX:v,toY:y})),this.prevPathX=v,this.prevPathY=y});return}if(t instanceof Dt){this.normalizedLines.push(t.clone()),this.prevPathX=t.toX,this.prevPathY=t.toY;return}let e,i,s,r,o,a;t instanceof Jx?[e,i,s,r,o,a]=Mi(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,i,s,r,o,a]=An(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new Dt({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:i,c2x:s,c2y:r,toX:o,toY:a})),this.prevPathX=o,this.prevPathY=a}static fromPolymorphPoints(t){const e=new $t,i=t.length;if(i){e.prevPathX=t[0],e.prevPathY=t[1];for(let s=2;s+5<i;s+=6)e._appendLine(new Dt({x:e.prevPathX,y:e.prevPathY,c1x:t[s],c1y:t[s+1],c2x:t[s+2],c2y:t[s+3],toX:t[s+4],toY:t[s+5]}))}return e}static fromLines(t){const e=new $t,i=t.length;if(i){e.prevPathX=t[0].x,e.prevPathY=t[0].y;for(let s=0;s<i;s++)e._appendLine(t[s])}return e}clone(){return $t.fromLines(this.normalizedLines)}cachedSVGPathData=[];toSVGPathData(){if(this.isUpdatedSVGPathData){const t=[];for(let e=0,i=this.normalizedLines.length;e<i;e++){const s=this.normalizedLines[e];e==0&&t.push(["M",s.x,s.y]),t.push(...s.toSVGPathData())}this.cachedSVGPathData=t,this.isUpdatedSVGPathData=!1}return this.cachedSVGPathData}cachedSVGPathD="";toSVGPathD(){return this.isUpdatedSVGPathD&&(this.cachedSVGPathD=Ea(this.toSVGPathData()),this.isUpdatedSVGPathD=!1),this.cachedSVGPathD}toCanvasContext(t){t.beginPath();for(let e=0,i=this.normalizedLines.length;e<i;e++){const s=this.normalizedLines[e];e==0&&t.moveTo(s.x,s.y),s.toCanvasContext(t)}}cachedBoundingClientRect={x:0,y:0,width:0,height:0};getBoundingClientRect(t=2){if(this.isUpdatedBoundingClientRect){const e=[],i=[];if(this.normalizedLines.forEach(s=>{const r=s.getBoundingClientRect(t);e.push(r.x,r.x+r.width),i.push(r.y,r.y+r.height)}),e.length==0||i.length==0)this.cachedBoundingClientRect={x:0,y:0,width:0,height:0};else{const s=Math.min(...e),r=Math.min(...i),o=Math.max(...e),a=Math.max(...i);this.cachedBoundingClientRect={x:G(s,t),y:G(r,t),width:G(o-s,t),height:G(a-r,t)}}this.isUpdatedBoundingClientRect=!1}return this.cachedBoundingClientRect}getBoundingClientRectCenter(t=2){const e=this.getBoundingClientRect(t);return{x:G(e.x+e.width*.5,t),y:G(e.y+e.height*.5,t)}}transform(t){let e;return t.m?e=t.m:(e=new It,e.translate(t.x||0,t.y||0),e.rotate(t.degree||0,t.centerX,t.centerY),e.scale(t.scaleX||1,t.scaleY||1,t.centerX,t.centerY)),e.isIdentity?this.clone():$t.fromLines(this.normalizedLines.map(i=>{let s=i.x,r=i.y,o=i.c1x,a=i.c1y,c=i.c2x,h=i.c2y,l=i.toX,u=i.toY;return{x:s,y:r}=e.transformPoint({x:s,y:r}),{x:o,y:a}=e.transformPoint({x:o,y:a}),{x:c,y:h}=e.transformPoint({x:c,y:h}),{x:l,y:u}=e.transformPoint({x:l,y:u}),new Dt({x:s,y:r,c1x:o,c1y:a,c2x:c,c2y:h,toX:l,toY:u})}))}cachedTotalLength;getTotalLength(){return(typeof this.cachedTotalLength!="number"||this.isUpdatedTotalLength)&&(this.cachedTotalLength=Math.round(this.normalizedLines.reduce((t,e)=>t+=e.length(),0)),this.isUpdatedTotalLength=!1),this.cachedTotalLength}getPointAtLength(t){let e=0,i=0;const s=this.normalizedLines.length;for(let r=0;r<s;r++){const o=this.normalizedLines[r];if(i=o.length(),e+i>=t)return o.getPointAtSegmentLength(t-e);e+=i}return this.normalizedLines[s-1].getPointAtSegmentLength(i)}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 i=t*e,s=this.normalizedLines[0];if(i--,i>1)for(let r=1;r<e&&(s=this.normalizedLines[r],i>1);r++)i-=1;return s.interpolate(i)}}getSubPathD(t,e,i=1e-6){const s=this.getSubPathDAtLength(e,!0);return co(i)(t,0)?s:s.getSubPathDAtLength(t,!1)}getSubPathDAtLength(t,e=!1){const i=new $t;let s=0,r=!1;for(let o=0,a=this.normalizedLines.length;o<a;o++){const c=this.normalizedLines[o];o==0&&(i.prevPathX=c.x,i.prevPathY=c.y);const h=c.length();if(s+h>t&&!r){r=!0;const l=c.getPointAtSegmentLength(t-s);if(i._appendLine(new Dt({x:i.prevPathX,y:i.prevPathY,c1x:l.start.x,c1y:l.start.y,c2x:l.m.x,c2y:l.m.y,toX:l.x,toY:l.y})),e)return i;i.normalizedLines=[],i._appendLine(new Dt({x:i.prevPathX,y:i.prevPathY,c1x:l.n.x,c1y:l.n.y,c2x:l.end.x,c2y:l.end.y,toX:c.toX,toY:c.toY})),s+=h;continue}i._appendLine(c),s+=h}return i}closestPoint(t,e){const i=this.getTotalLength();let s={x:t,y:e},r=0,o=1/0,a=8;for(let h=0;h<=i;h+=a){const l=this.getPointAtLength(h),u=(t-l.x)*(t-l.x)+(e-l.y)*(e-l.y);u<o&&(s=l,r=h,o=u)}for(a/=2;a>.5;){const h=r-a,l=this.getPointAtLength(h),u=(t-l.x)*(t-l.x)+(e-l.y)*(e-l.y),d=r+a,f=this.getPointAtLength(d),p=(t-f.x)*(t-f.x)+(e-f.y)*(e-f.y);h>=0&&u<o?(s=l,r=h,o=u):d<=i&&p<o?(s=f,r=d,o=p):a/=2}const c=this.getPointAtLength(r+(r===i?-.1:.1));return{point:s,rotation:r>=i?Qt(c.x,c.y,s.x,s.y):Qt(s.x,s.y,c.x,c.y),distance:Math.sqrt(o)}}cachedPolymorphPoints=[];getPolymorphPoints(){if(this.isUpdatedPolymorphPoints){if(this.normalizedLines.length){const t=this.normalizedLines[0];this.cachedPolymorphPoints=[t.x,t.y].concat(this.normalizedLines.reduce((e,i)=>e.concat([i.c1x,i.c1y,i.c2x,i.c2y,i.toX,i.toY]),[]))}this.isUpdatedPolymorphPoints=!1}return[...this.cachedPolymorphPoints]}getPolymorphPointsPerimeter(){let t=0;const e=this.getPolymorphPoints(),i=e.length;if(i){let s=e[i-2],r=e[i-1];for(let o=0;o<i;o+=6)t+=sn(e[o],e[o+1],s,r),s=e[o],r=e[o+1]}return Math.floor(t)}expendToPolymorphPoints(t){const e=t.length,i=this.getPolymorphPoints(),s=i.length;if(s){const r=[];let o=e-s;const a=Math.ceil(e/s);r.push(["M",i[0],i[1]]);let c=2;for(;c+5<=s-1;){const h=i[c++],l=i[c++],u=i[c++],d=i[c++],f=i[c++],p=i[c++];r.push(["C",h,l,u,d,f,p]);let m=0;for(;m<a&&o>0;)r.push(["C",f,p,f,p,f,p]),o-=6,m++}return new $t(r)}else return $t.fromPolymorphPoints(t)}static getInterpolator(t,e){return i=>{const s=co(Number.EPSILON);return s(i,0)?t.clone():s(i,1)?e.clone():$t.fromPolymorphPoints(Zp(t.getPolymorphPoints(),e.getPolymorphPoints(),i).map(r=>G(r,2)))}}}const Pd=Kx("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 Kx(n,t=10){const e={},i=n.split(",");for(let s=0;s<i.length;s+=2){const r="&"+i[s+1]+";",o=parseInt(i[s],t);e[r]="&#"+o+";"}return e["\\xa0"]=" ",e}function Gt(n,t){const e=Object.keys(t);for(let i=0;i<e.length;i++)n=n.replace(new RegExp("{"+e[i]+"}","gi"),""+t[e[i]]);return n}function Ir(n){let t,e;if(!n)throw new Error("cannot create a random attribute name for an undefined object");const i="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=i[Math.floor(Math.random()*i.length)];while(n[t]);return t}function Zx(n){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[n]||t.start}function Qx(n){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[n]||t.alphabetic}const Ji={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 Tc{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}addColorStop(t,e){const i=this.__ctx.__createElement("stop");if(i.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&&(i.setAttribute("stop-color",Gt("rgb({r},{g},{b})",{r:r[1],g:r[2],b:r[3]})),i.setAttribute("stop-opacity",r[4]))}else i.setAttribute("stop-color",e);this.__root.appendChild(i)}}class Ad{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}}class Or{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:i=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=i||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(Ji);for(let e=0,i=t.length;e<i;e++){const s=t[e];this[s]=Ji[s].canvas}}__getStyleState(){const t={},e=Object.keys(Ji);for(let i=0,s=e.length;i<s;i++){const r=e[i];t[r]=this[r]}return t}__applyStyleState(t){const e=Object.keys(t);for(let i=0,s=e.length;i<s;i++){const r=e[i];this[r]=t[r]}}__createElement(t,e={},i=!1){const s=this.__document.createElementNS("http://www.w3.org/2000/svg",t),r=Object.keys(e);i&&(s.setAttribute("fill","none"),s.setAttribute("stroke","none"));for(let o=0;o<r.length;o++){const a=r[o];s.setAttribute(a,e[a])}return s}__applyStyleToCurrentElement(t){let e=this.__currentElement;const i=this.__currentElementsToStyle;i&&(e.setAttribute(t,""),e=i.element,i.children.forEach(r=>{r.setAttribute(t,"")}));const s=Object.keys(Ji);for(let r=0;r<s.length;r++){const o=Ji[s[r]],a=this[s[r]];if(o.apply){if(a instanceof Ad){if(a.__ctx)for(;a.__ctx.__SVGdefs.childNodes.length;){const c=a.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[c]=c,this.__SVGdefs.appendChild(a.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(o.apply,Gt("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof Tc)e.setAttribute(o.apply,Gt("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 h=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(a);if(h){e.setAttribute(o.svgAttr,Gt("rgb({r},{g},{b})",{r:h[1],g:h[2],b:h[3]}));let l=parseFloat(h[4]);const u=this.globalAlpha;u!=null&&(l*=u),e.setAttribute(o.svgAttr+"-opacity",""+l)}}else{let c=o.svgAttr;if(s[r]==="globalAlpha"&&(c=t+"-"+o.svgAttr,e.getAttribute(c)))continue;c&&e.setAttribute(c,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 s=Object.keys(Pd);for(let r=0,o=s.length;r<o;r++){const a=s[r],c=Pd[a],h=new RegExp(a,"gi");h.test(e)&&(e=e.replace(h,c))}}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 s=this.__createElement("g");e.appendChild(s),this.__currentElement=s}let i=this.__currentElement.getAttribute("transform");i?i+=" ":i="",i+=t,this.__currentElement.setAttribute("transform",i)}scale(t,e){e===void 0&&(e=t),this.__addTransform(Gt("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(Gt("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(Gt("translate({x},{y})",{x:t,y:e}))}transform(t,e,i,s,r,o){this.__addTransform(Gt("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:i,d:s,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(Gt("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(Gt("L {x} {y}",this.__currentPosition)):this.__addPathCommand(Gt("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,i,s,r,o){this.__currentPosition={x:r,y:o},this.__addPathCommand(Gt("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:i,cp2y:s,x:r,y:o}))}quadraticCurveTo(t,e,i,s){this.__currentPosition={x:i,y:s},this.__addPathCommand(Gt("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:i,y:s}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,i,s,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===i&&e===s||r===0){this.lineTo(t,e);return}const c=this.normalize([o-t,a-e]),h=this.normalize([i-t,s-e]);if(c[0]*h[1]===c[1]*h[0]){this.lineTo(t,e);return}const l=c[0]*h[0]+c[1]*h[1],u=Math.acos(Math.abs(l)),d=this.normalize([c[0]+h[0],c[1]+h[1]]),f=r/Math.sin(u/2),p=t+f*d[0],m=e+f*d[1],v=[-c[1],c[0]],y=[h[1],-h[0]],b=function(C){const S=C[0];return C[1]>=0?Math.acos(S):-Math.acos(S)},x=b(v),w=b(y);this.lineTo(p+v[0]*r,m+v[1]*r),this.arc(p,m,r,x,w)}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,i,s){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+s),this.lineTo(t,e+s),this.lineTo(t,e),this.closePath()}fillRect(t,e,i,s){const r=this.__createElement("rect",{x:t,y:e,width:i,height:s},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,i,s){const r=this.__createElement("rect",{x:t,y:e,width:i,height:s},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),i=this.__rootSVG.childNodes[1],s=i.childNodes;for(let r=s.length-1;r>=0;r--)s[r]&&i.removeChild(s[r]);this.__currentElement=i,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,i,s){if(t===0&&e===0&&i===this.width&&s===this.height){this.__clearCanvas();return}const r=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:t,y:e,width:i,height:s,fill:"#FFFFFF"},!0);r.appendChild(o)}createLinearGradient(t,e,i,s){const r=this.__createElement("linearGradient",{id:Ir(this.__ids),x1:t+"px",x2:i+"px",y1:e+"px",y2:s+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(r),new Tc(r,this)}createRadialGradient(t,e,i,s,r,o){const a=this.__createElement("radialGradient",{id:Ir(this.__ids),cx:s+"px",cy:r+"px",r:o+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(a),new Tc(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),i={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"&&(i.decoration="underline"),this.__fontHref&&(i.href=this.__fontHref),i}__wrapTextLink(t,e){if(t.href){const i=this.__createElement("a");return i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),i.appendChild(e),i}return e}__applyText(t,e,i,s){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:i,"text-anchor":Zx(this.textAlign),"dominant-baseline":Qx(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(t)),this.__currentElement=a,this.__applyStyleToCurrentElement(s),o.appendChild(this.__wrapTextLink(r,a))}fillText(t,e,i){this.__applyText(t,e,i,"fill")}strokeText(t,e,i){this.__applyText(t,e,i,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,i,s,r,o){if(s===r)return;s=s%(2*Math.PI),r=r%(2*Math.PI),s===r&&(r=(r+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));const a=t+i*Math.cos(r),c=e+i*Math.sin(r),h=t+i*Math.cos(s),l=e+i*Math.sin(s),u=o?0:1;let d=0,f=r-s;f<0&&(f+=2*Math.PI),o?d=f>Math.PI?0:1:d=f>Math.PI?1:0,this.lineTo(h,l),this.__addPathCommand(Gt("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:i,ry:i,xAxisRotation:0,largeArcFlag:d,sweepFlag:u,endX:a,endY:c})),this.__currentPosition={x:a,y:c}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),i=Ir(this.__ids),s=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",i),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",Gt("url(#{id})",{id:i})),t.appendChild(s),this.__currentElement=s}drawImage(...t){let e=t[0],i,s,r,o,a=0,c=0,h,l,u,d,f,p,m,v;if(t.length===3)i=t[1],s=t[2],h=e.width,l=e.height,r=h,o=l;else if(t.length===5)i=t[1],s=t[2],r=t[3],o=t[4],h=e.width,l=e.height;else if(t.length===9)a=t[1],c=t[2],h=t[3],l=t[4],i=t[5],s=t[6],r=t[7],o=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const y=this.__closestGroupOrSvg();this.__currentElement;const b="translate("+i+", "+s+")";if(e instanceof Or){if(u=e.getSvg().cloneNode(!0),u.childNodes&&u.childNodes.length>1){for(d=u.childNodes[0];d.childNodes.length;)v=d.childNodes[0].getAttribute("id"),this.__ids[v]=v,this.__SVGdefs.appendChild(d.childNodes[0]);if(f=u.childNodes[1],f){const x=f.getAttribute("transform");let w;x?w=x+" "+b:w=b,f.setAttribute("transform",w),y.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||c||h!==e.width||l!==e.height)&&(m=this.__document.createElement("canvas"),m.width=r,m.height=o,m.getContext("2d")?.drawImage(e,a,c,h,l,0,0,r,o),e=m),p.setAttribute("transform",b),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),y.appendChild(p))}createPattern(t,e){const i=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),s=Ir(this.__ids);let r;return i.setAttribute("id",s),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")),i.appendChild(r),this.__SVGdefs.appendChild(i)):t instanceof Or&&(i.setAttribute("width",""+t.width),i.setAttribute("height",""+t.height),i.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(i)),new Ad(i,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}}class Pc{canvas;context;customContext;enablePath2D=!1;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,i,s=!1,r=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),s&&(this.customContext=new Or({canvas:this.canvas,width:e||this.canvas.width,height:i||this.canvas.height})),this.enablePath2D=typeof r=="boolean"?r:!1}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,i,s){return this.context.fillRect(t,e,i,s),this.customContext&&this.customContext.fillRect(t,e,i,s),this}fillText(t,e,i,s){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,i,s),this.customContext&&this.customContext.fillText(t,e,i),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,i,s){return this.context.strokeText(t,e,i,s),this.customContext&&this.customContext.strokeText(t,e,i),this}strokeRect(t,e,i,s){return this.context.strokeRect(t,e,i,s),this.customContext&&this.customContext.strokeRect(t,e,i,s),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,i=this.canvas.width,s=this.canvas.height){return this.context.clearRect(t,e,i,s),this.customContext&&this.customContext.clearRect(t,e,i,s),this}save(){return this.context.save(),this.customContext&&this.customContext.save(),this.currentMatrix=new DOMMatrix,this.enablePath2D&&(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.enablePath2D&&(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.enablePath2D&&this.currentPath2D.closePath(),this}changePath2D(t=this.currentPath2D,e=this.currentMatrix){if(this.enablePath2D){const i=new Path2D;i.addPath(t,e),this.currentPath2D=i}}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=this.currentMatrix.translate(t,e),this.changePath2D(),this}rotate(t,e=0,i=0){return this.translate(e,i),this.context.rotate(t),this.customContext&&this.customContext.rotate(t),this.currentMatrix=this.currentMatrix.rotate(t),this.translate(-e,-i),this.changePath2D(),this}scale(t,e=t,i=0,s=0){return this.translate(i,s),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix=this.currentMatrix.scale(t,e),this.translate(-i,-s),this.changePath2D(),this}moveTo(t,e){return this.context.moveTo(t,e),this.customContext&&this.customContext.moveTo(t,e),this.enablePath2D&&this.currentPath2D.moveTo(t,e),this}lineTo(t,e){return this.context.lineTo(t,e),this.customContext&&this.customContext.lineTo(t,e),this.enablePath2D&&this.currentPath2D.lineTo(t,e),this}arc(t,e,i,s,r,o){return this.context.arc(t,e,i,s,r,o),this.customContext&&this.customContext.arc(t,e,i,s,r,o?-1:1),this.enablePath2D&&this.currentPath2D.arc(t,e,i,s,r,o),this}arcTo(t,e,i,s,r){return this.context.arcTo(t,e,i,s,r),this.customContext&&this.customContext.arcTo(t,e,i,s,r),this.enablePath2D&&this.currentPath2D.arcTo(t,e,i,s,r),this}ellipse(t,e,i,s,r,o,a,c){return this.context.ellipse(t,e,i,s,r,o,a,c),this.enablePath2D&&this.currentPath2D.ellipse(t,e,i,s,r,o,a,c),this}quadraticCurveTo(t,e,i,s){return this.context.quadraticCurveTo(t,e,i,s),this.customContext&&this.customContext.quadraticCurveTo(t,e,i,s),this.enablePath2D&&this.currentPath2D.quadraticCurveTo(t,e,i,s),this}bezierCurveTo(t,e,i,s,r,o){return this.context.bezierCurveTo(t,e,i,s,r,o),this.customContext&&this.customContext.bezierCurveTo(t,e,i,s,r,o),this.enablePath2D&&this.currentPath2D.bezierCurveTo(t,e,i,s,r,o),this}rect(t,e,i,s){return this.context.rect(t,e,i,s),this.customContext&&this.customContext.rect(t,e,i,s),this.enablePath2D&&this.currentPath2D.rect(t,e,i,s),this}createLinearGradient(t,e,i,s,r){const o=this.context.createLinearGradient(t,e,i,s);return r&&Object.entries(r).forEach(([a,c])=>{o.addColorStop(parseFloat(a),c)}),o}createRadialGradient(t,e,i,s,r,o,a){const c=this.context.createRadialGradient(t,e,i,s,r,o);return a&&Object.entries(a).forEach(([h,l])=>{c.addColorStop(parseFloat(h),l)}),c}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const i=e[0],s=e[1];this.context.drawImage(t,i,s)}else if(e.length===4){const i=e[0],s=e[1],r=e[2],o=e[3];this.context.drawImage(t,i,s,r,o)}else if(e.length===8){const i=e[0],s=e[1],r=e[2],o=e[3],a=e[4],c=e[5],h=e[6],l=e[7];this.context.drawImage(t,i,s,r,o,a,c,h,l)}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,i=this.canvas.width,s=this.canvas.height,r){return this.context.getImageData(t,e,i,s,r)}putImageData(t,e=0,i=0){return this.context.putImageData(t,e,i)}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}}}let pt=class Dh{shouldUpdatePathD=!1;shouldUpdateTransformPathD=!1;shouldUpdateSVGElInDraw=!1;shouldUpdateMInDraw=!0;shouldUpdateAttrsInDraw=!0;shouldUpdateStyleInDraw=!0;id;initD;d;parent;attrs={};style={};initCenterX;initCenterY;_x;_y;_degree;_scaleX;_scaleY;vx;vy;ax;ay;mass;interactive;drag;transform$=new Re;transformSubscription;isMouseIn=!1;isDragging=!1;m;el;constructor(t){this.id=ul(),this.initD=t?.initD,this.setAttr({stroke:"none",fill:"none"}),t?.attrs&&this.setAttr(t.attrs),t?.style&&this.setStyle(t.style),this.initCenterX=t?.centerX,this.initCenterY=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.interactive=typeof t?.interactive=="boolean"?t?.interactive:!0,this.drag=t?.drag,this.transformSubscription=this.transform$.subscribe(()=>{this.shouldUpdateTransformPathD=!0,this.shouldUpdateMInDraw=!0})}destroy(){this.transformSubscription.unsubscribe()}moveTo(t,e){const i=this._x,s=this._y;(i!==t||s!==e)&&(this._x=t,this._y=e,this.transform$.next({dX:t-i,dY:e-s}))}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&&(this.transform$.next({dX:t-this._x}),this._x=t)}get y(){return this._y}set y(t){this._y!==t&&(this.transform$.next({dY:t-this._y}),this._y=t)}rotateTo(t){this._degree!==t&&(this.transform$.next({dDegree:t-this._degree}),this._degree=t)}rotate(t){this.rotateTo(this._degree+t)}get degree(){return this._degree}set degree(t){this._degree!==t&&(this.transform$.next({dDegree:t-this._degree}),this._degree=t)}scaleTo(t,e){const i=this._scaleX,s=this._scaleY;(this._scaleX!==t||this._scaleY!==(e||t))&&(this._scaleX=t,this._scaleY=e||t,this.transform$.next({dScaleX:this._scaleX/i,dScaleY:this._scaleY/s}))}scale(t,e){this.scaleTo(this._scaleX*t,this._scaleY*(e||t))}get scaleX(){return this._scaleX}set scaleX(t){this._scaleX!==t&&(this.transform$.next({dScaleX:t/this._scaleX}),this._scaleX=t)}get scaleY(){return this._scaleY}set scaleY(t){this._scaleY!==t&&(this.transform$.next({dScaleY:t/this._scaleY}),this._scaleY=t)}pathD(t){return t?(this.d=t,this.shouldUpdateTransformPathD=!0,this.shouldUpdateSVGElInDraw=!0):this.initD?this.d||(this.d=this.initD instanceof $t?this.initD:new $t(this.initD)):(!this.d||this.shouldUpdatePathD)&&(this.d=new $t(this.toSVGPathData()),this.shouldUpdatePathD=!1,this.shouldUpdateTransformPathD=!0,this.shouldUpdateSVGElInDraw=!0),this.d}cachedTransformedPathD;transformPathD(){if(!this.m){const{x:t,y:e}=this.transformOrigin();let i=0,s=0;if(this.parent?.dDegree||this.parent?.dScaleX!==1||this.parent?.dScaleY!==1){const o=this.transformOrigin(!0);i=o.x,s=o.y}const r=new It;r.translate(this.x+(this.parent?.dX||0),this.y+(this.parent?.dY||0)),r.rotate(this.degree,t,e),r.scale(this.scaleX,this.scaleY,t,e),this.parent?.dDegree&&r.rotate(this.parent.dDegree,i,s),(this.parent?.dScaleX!==1||this.parent?.dScaleY!==1)&&r.scale(this.parent?.dScaleX||1,this.parent?.dScaleY||1,i,s),this.m=r}return(this.shouldUpdateTransformPathD||!this.cachedTransformedPathD)&&(this.cachedTransformedPathD=this.pathD().transform({m:this.m}),this.shouldUpdateTransformPathD=!1),this.cachedTransformedPathD}getBaseOptions(){return{initD:this.initD,attrs:{...this.attrs},style:{...this.style},centerX:this.initCenterX,centerY:this.initCenterY,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,interactive:this.interactive,drag:{...this.drag}}}clone(){return this.cloneShape()}cloneShape(){return new Dh(this.getBaseOptions())}update(t){this.shouldUpdatePathD=!0}toSVGEl(){return null}toSVGPathData(){return[]}toSVGPathD(){return this.pathD().toSVGPathD()}toCanvasContext(t){this.pathD().toCanvasContext(t)}getBoundingClientRect(t=2){return this.pathD().getBoundingClientRect(t)}getRealBoundingClientRect(t=2){return this.transformPathD().getBoundingClientRect(t)}getBoundingClientRectCenter(t=2){return this.pathD().getBoundingClientRectCenter(t)}getRealBoundingClientRectCenter(t=2){return this.transformPathD().getBoundingClientRectCenter(t)}transformOrigin(t=!1,e=2){let i=0,s=0;if(this.parent&&!t){const r=this.parent.combo.getBoundingClientRectCenter(e);i=r.x-this.parent.dX,s=r.y-this.parent.dY}else if(typeof this.initCenterX>"u"&&typeof this.initCenterY>"u"){const r=this.getBoundingClientRectCenter(e);i=r.x,s=r.y}else i=this.initCenterX||0,s=this.initCenterY||0;return{x:i,y:s}}isPointInPath(t,e,i){if(t instanceof Pc)return t.isPointInPath(new Path2D(this.toSVGPathD()),e,i);if(this.el instanceof SVGGeometryElement){const s=this.el.getCTM();if(s){const r=s.inverse();return this.el.isPointInFill({x:r.a*e+r.c*i+r.e,y:r.b*e+r.d*i+r.f})}}return!1}isPointInStroke(t,e,i){if(t instanceof Pc)return t.isPointInStroke(new Path2D(this.toSVGPathD()),e,i);if(this.el instanceof SVGGeometryElement){const s=this.el.getCTM();if(s){const r=s.inverse();return this.el.isPointInStroke({x:r.a*e+r.c*i+r.e,y:r.b*e+r.d*i+r.f})}}return!1}setStyle(t){Object.assign(this.style,t),this.shouldUpdateStyleInDraw=!0}setAttr(t,e){if(typeof t!="string")for(const i in t){const s=t[i];s&&s!=this.getAttr(i)&&(this.attrs[Ct(i)]=s,this.shouldUpdateAttrsInDraw=!0)}else e&&e!=this.getAttr(t)&&(this.attrs[Ct(t)]=e,this.shouldUpdateAttrsInDraw=!0)}getAttr(t,e){return this.attrs[t]||this.attrs[Ct(t)]||e}hasAttr(t){return!!this.getAttr(t)}animate(t){this.vx+=this.ax,this.vy+=this.ay;const e=t?.gravity||0;this.vy+=e;const i=t?.friction||1;this.vx*=i,this.vy*=i,this.move(this.vx,this.vy)}animateEaseTo(t,e){const i=e?.easing||.05,s=t.x-this.x,r=t.y-this.y;this.vx=s*i,this.vy=r*i,this.animate(e)}animateSpringTo(t,e){const i=e?.spring||.03;(Array.isArray(t)?t:[t]).forEach(s=>{const r=s.x-this.x,o=s.y-this.y,a=r*i,c=o*i;this.vx+=a,this.vy+=c}),this.animate({friction:.9,...e})}getSpringMassAlphaTo(t,e){const i=e?.springLength||100,s=e?.spring||5e-4,r=t.x-this.x,o=t.y-this.y,a=Math.sqrt(r*r+o*o);if(a<i){const c=r*s,h=o*s;return this.vx+=c/this.mass,this.vy+=h/this.mass,t.vx-=c/t.mass,t.vy-=h/t.mass,1-a/i}return 0}followTo(t,e=3){this.rotateTo(Tt(Qt(this.x,this.y,t.x,t.y)));const{dx:i,dy:s}=rn(q(this.degree),e);this.vx=i,this.vy=s,this.animate()}followAccelerationTo(t,e=.05){this.rotateTo(Tt(Qt(this.x,this.y,t.x,t.y)));const{dx:i,dy:s}=rn(q(this.degree),e);this.ax=i,this.ay=s,this.animate()}gravitateTo(t){const e=t.x-this.x,i=t.y-this.y,s=e*e+i*i,r=Math.sqrt(s),o=this.mass*t.mass/s,a=o*e/r,c=o*i/r;this.vx+=a/this.mass,this.vy+=c/this.mass,t.vx-=a/t.mass,t.vy-=c/t.mass}checkCollision(t){const e=t.x-this.x,i=t.y-this.y,s=Math.sqrt(e*e+i*i),{x:r,y:o,width:a,height:c}=t.getBoundingClientRect(),{x:h,y:l}=t.getBoundingClientRectCenter(),{x:u,y:d,width:f,height:p}=this.getBoundingClientRect(),{x:m,y:v}=this.getBoundingClientRectCenter();if(s<Math.abs(h-r)+Math.abs(m-u)||s<Math.abs(l-o)+Math.abs(v-d)){const y=Math.atan2(i,e),b={x:0,y:0},x=ge(-y,e,i),w=ge(-y,this.vx,this.vy),C=ge(-y,t.vx,t.vy),S=w.x-C.x;w.x=((this.mass-t.mass)*w.x+2*t.mass*C.x)/(this.mass+t.mass),C.x=S+w.x;const D=Math.abs(w.x)+Math.abs(C.x),L=this.ballRadius+t.ballRadius-Math.abs(b.x-x.x);b.x+=w.x/D*L,x.x+=C.x/D*L;const I=ge(y,b.x,b.y),F=ge(y,x.x,x.y);t.moveTo(this.x+F.x,this.y+F.y),this.moveTo(this.x+I.x,this.y+I.y);const U=ge(y,w.x,w.y),X=ge(y,C.x,C.y);this.vx=U.x,this.vy=U.y,t.vx=X.x,t.vy=X.y}}checkWall(t){if(!t?.wall)return;const e=typeof t.wall.bounce=="number"?t.wall.bounce:-1,i=t.wall.x,s=t.wall.y,r=t.wall.x+t.wall.width,o=t.wall.y+t.wall.height,{x:a,y:c,width:h,height:l}=this.getBoundingClientRect();t.wall.cycle||!1?(this.x+a>r?this.moveXTo(i-(a+h)):this.x+a+h<i&&this.moveXTo(r-a),this.y+c>o?this.moveYTo(s-(c+l)):this.y+c+l<s&&this.moveYTo(o-c)):(this.x+a+h>r?(this.moveXTo(r-(a+h)),this.vx*=e):this.x+a<i&&(this.moveXTo(i+(a+h)),this.vx*=e),this.y+c+l>o?(this.moveYTo(o-(c+l)),this.vy*=e):this.y+c<s&&(this.moveYTo(s+(c+l)),this.vy*=e))}getTotalLength(){return this.transformPathD().getTotalLength()}getPointAtLength(t){return this.transformPathD().getPointAtLength(t)}interpolate(t){return this.transformPathD().interpolate(t)}trailPath(t=0,e=1){const i=this.getTotalLength(),s=t*i,r=e*i;return{subPathD:this.transformPathD().getSubPathD(s,r),point:this.getPointAtLength(r)}}strokeDashTween(t=1e3,e){const i=this.pathD().getTotalLength();this.setAttr({strokeDasharray:`${i} ${i}`,strokeDashoffset:`${i}`});const s=e?.onUpdate,r=new ki({frameDuration:t});r.addTween({offset:i},{offset:0},Object.assign(e||{},{onUpdate:(o,a)=>{this.setAttr("strokeDashoffset",""+G(o.offset,2)),s?.(o,a)}})),r.play()}static generateRosetta(t,e,i,s,r){if(r==0)throw new Error("no dividing by zero, please");const o=[],a=360/r;for(let c=0;c<r;c+=1){const h=a*c*Math.PI/180,l=t+2*i*Math.cos(h),u=e+2*i*Math.sin(h);o.push(new xc({x:t,y:e,rx:i,ry:s,xAxisRotate:a*c,largeArcFlag:1,sweepFlag:1,toX:l,toY:u})),o.push(new xc({x:l,y:u,rx:i,ry:s,xAxisRotate:a*c,largeArcFlag:1,sweepFlag:1,toX:t,toY:e}))}return new Dh({initD:$t.fromLines(o)})}};class qt{shapes=[];svg;forceWidth;attrs={};style={};initCenterX;initCenterY;x;y;degree;scaleX;scaleY;interactive;drag;constructor(t){if(this.initCenterX=t?.centerX,this.initCenterY=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),t?.attrs&&this.setAttr(t.attrs),t?.style&&this.setStyle(t.style),this.interactive=typeof t?.interactive=="boolean"?t?.interactive:!0,this.drag=t?.drag,this.svg=t?.svg,this.forceWidth=t?.forceWidth,t?.svg){this.initCenterX=0,this.initCenterY=0;let e=0,i=0,s=0,r=0;const o=new Td(t.svg).parse();for(let a=0,c=o.length;a<c;a++){const h=o[a];if(h.type=="viewbox"&&h.width&&h.height){if(e=parseFloat(h.width),i=parseFloat(h.height),t.forceWidth){const p=e/i;s=t.forceWidth,r=s/p}else s=e,r=i;continue}if(h.type!="path"||!Ca(h.path))continue;const l={};for(const p in h)p==="type"||p==="path"||p==="transform"||(l[p]=h[p]);const u=Hs(Ws(h.path)),d=[];let f=[];for(let p=0,m=u.length;p<m;p++){const v=u[p];f.push(v),v[0].toLowerCase()=="z"&&(d.push(f),f=[])}f.length&&d.push(f),d.forEach(p=>{const m=new pt({attrs:l,initD:p});if(h.transform){const y=Rd(h.transform).split();m.moveTo(y.x,y.y),m.rotateTo(y.degree),m.scaleTo(y.scaleX,y.scaleY)}this.addShape(m)})}s&&e&&r&&i&&this.comboScale(s/e,r/i,!0)}}destroy(){this.shapes.forEach(t=>t.destroy())}getBaseOptions(){return{svg:this.svg,forceWidth:this.forceWidth,attrs:{...this.attrs},style:{...this.style},centerX:this.initCenterX,centerY:this.initCenterY,x:this.x,y:this.y,degree:this.degree,scaleX:this.scaleX,scaleY:this.scaleY,interactive:this.interactive,drag:{...this.drag}}}clone(){const t=this.cloneShapeCombo();return t.shapes=this.shapes.map(e=>{const i=e.clone();return e.parent&&(i.parent={...e.parent,combo:t}),i}),t}cloneShapeCombo(){return new qt(this.getBaseOptions())}update(t){this.shapes.forEach(e=>e.update(t))}addShape(t,e){e?.notCopyFromCombo!==!0&&(t.setAttr(this.attrs),t.setStyle(this.style),t.interactive=t.interactive||this.interactive,t.drag={...this.drag,...t.drag}),t.parent={combo:this,dX:e?.dX||0,dY:e?.dY||0,dDegree:e?.dDegree||0,dScaleX:e?.dScaleX||1,dScaleY:e?.dScaleY||1},this.shapes.push(t)}comboMove(t,e,i=!1){i||(this.x+=t,this.y+=e),this.shapes.forEach(s=>{s.move(t,e)})}comboRotate(t,e=!1){e||(this.degree+=t),this.shapes.forEach(i=>{i.rotate(t)})}comboScale(t,e,i=!1){i||(this.scaleX*=t,this.scaleY*=e||t),this.shapes.forEach(s=>{s.scale(t,e)})}comboTransform(t,e=!1){(typeof t?.x=="number"||typeof t?.y=="number")&&this.comboMove(t?.x||0,t?.y||0,e),typeof t?.degree=="number"&&this.comboRotate(t?.degree||0,e),(typeof t?.scale=="number"||typeof t?.scaleX=="number"||typeof t?.scaleY=="number")&&this.comboScale(t?.scaleX||t?.scale||1,t?.scaleY||t?.scale||1,e)}getBoundingClientRect(t=2){const e=[],i=[];if(this.shapes.forEach(c=>{const h=c.getBoundingClientRect(t);e.push(h.x,h.x+h.width),i.push(h.y,h.y+h.height)}),e.length==0||i.length==0)return{x:0,y:0,width:0,height:0};const s=Math.min(...e),r=Math.min(...i),o=Math.max(...e),a=Math.max(...i);return{x:G(s,t),y:G(r,t),width:G(o-s,t),height:G(a-r,t)}}getBoundingClientRectCenter(t=2){if(typeof this.initCenterX=="number"&&typeof this.initCenterY=="number")return{x:this.initCenterX,y:this.initCenterY};const e=this.getBoundingClientRect(t);return{x:G(e.x+e.width*.5,t),y:G(e.y+e.height*.5,t)}}setStyle(t){Object.assign(this.style,t),this.shapes.forEach(e=>{e.setStyle(t)})}setAttr(t,e){if(typeof t!="string"){for(const i in t){const s=t[i];s&&s!=this.getAttr(i)&&(this.attrs[Ct(i)]=s)}this.shapes.forEach(i=>{i.setAttr(t)})}else e&&e!=this.getAttr(t)&&(this.attrs[Ct(t)]=e,this.shapes.forEach(i=>{i.setAttr(t,e)}))}getAttr(t,e){return this.attrs[t]||this.attrs[Ct(t)]||e}hasAttr(t){return!!this.getAttr(t)}sort(){this.shapes.map(t=>({shape:t,perimeter:t.transformPathD().getPolymorphPointsPerimeter()})).sort((t,e)=>e.perimeter-t.perimeter).map(t=>t.shape)}expendTo(t){const e=t.shapes.length,i=this.shapes.length;if(e<i)return t.expendTo(this);for(let s=i;s<e;s++){const r=t.shapes[s];this.addShape(new pt({initD:r.pathD().clone()}),{dX:r.x-this.x,dY:r.y-this.y,dDegree:r.degree-this.degree,dScaleX:r.scaleX/this.scaleX,dScaleY:r.scaleY/this.scaleY,notCopyFromCombo:!0})}}strokeDashTween(t,e){switch(e?.type){case"sequence":this.shapes.forEach((o,a)=>{o.strokeDashTween(t,{...e,delay:a,onStart:()=>{a==0&&e?.onGroupStart?.()},onUpdate:()=>{e?.onGroupUpdate?.()},onComplete:()=>{a==this.shapes.length-1&&e?.onGroupComplete?.()}})});break;case"parallel":default:const i=new ki({frameDuration:t}),s={},r={};this.shapes.forEach((o,a)=>{const c=o.pathD().getTotalLength();s[`offset_${a}`]=c,r[`offset_${a}`]=0,o.setAttr({strokeDasharray:`${c} ${c}`,strokeDashoffset:`${c}`})}),i.addTween(s,r,Object.assign(e||{},{onStart:()=>{e?.onGroupStart?.()},onUpdate:(o,a)=>{for(const c in o){const h=ho(c).number;this.shapes[h].setAttr("strokeDashoffset",""+G(o[c],2))}e?.onGroupUpdate?.()},onComplete:()=>{e?.onGroupComplete?.()}})),i.play();break}}}function t2(n,t,e=5){const i=co(e);(!i(n.x,t.current.x)||!i(n.y,t.current.y))&&n.followTo(t.current)}function e2(n,t,e){n.drag&&n.drag.enable&&!n.isDragging&&n.animateEaseTo(t,e)}function n2(n,t){const e=[],i=n.length;for(let s=0;s<i;s++){const r=n[s];if(t?.springLength){const o=t?.springLength||100;r.isDragging||n.filter(a=>a.id!==r.id).forEach(a=>{const c=Qt(r.x,r.y,a.x,a.y);r.animateSpringTo({x:a.x-Math.cos(c)*o,y:a.y-Math.sin(c)*o},t)})}else t?.spring?s>0&&r.animateSpringTo(n[s-1],t):r.animate(t);if(t?.wall&&r.checkWall(t),t?.enableCollision||t?.enableGravityBetweenObjects||t?.enableSpringMassAlpha)for(let o=s+1;o<i;o++)t?.enableCollision&&r.checkCollision(n[o]),t?.enableGravityBetweenObjects&&r.gravitateTo(n[o]),t?.enableSpringMassAlpha&&e.push([r.x,r.y,n[o].x,n[o].y,r.getSpringMassAlphaTo(n[o],t)])}return e}function Md(n){if(n.length<2)throw new Error("shapes个数必须大于等于2");const t=n.length-1,e=new Array(t);for(let s=0;s<t;s++){const r=n[s].transformPathD(),o=n[s+1].transformPathD(),a=r.getPolymorphPoints(),c=o.getPolymorphPoints(),h=a.length>=c.length?a:c;e[s]=$t.getInterpolator(r.expendToPolymorphPoints(h),o.expendToPolymorphPoints(h))}const i=new pt({initD:""});return s=>{const r=G(t*s,6),o=Math.min(Math.floor(r),t-1),a=G(r-o,6);return i.pathD(e[o](a)),i.setAttr(n[o+1].attrs),i}}function i2(n){if(n.length<2)throw new Error("shapeCombos个数必须大于等于2");let t;const e=[];n.forEach(o=>{let a;o instanceof qt?(a=o,a.sort()):(a=new qt,a.addShape(o)),e.push(a),(!t||t.shapes.length<a.shapes.length)&&(t=a)});const i=[];e.forEach((o,a)=>{o!==t&&o.expendTo(t),o.shapes.forEach((c,h)=>{i[h]=i[h]||[],i[h][a]=c})});const s=[];i.forEach(o=>{s.push(Md(o))});const r=new qt;return s.forEach(o=>{r.addShape(o(0))}),o=>(s.forEach(a=>{a(o)}),r)}function s2(n,t=6e3,e){const i=n.findIndex(a=>a instanceof qt)>=0?i2(n):Md(n),s=i(0),r=e?.onUpdate,o=new ki({frameDuration:t});return o.addTween({t:0},{t:1},Object.assign(e||{},{onUpdate:(a,c)=>{r?.(a,c),i(a.t),e?.shapeOrCombo?.(s,a.t)}})),o.play(),s}class r2{PARENT_EL;SVG_EL=null;CANVAS_EL=null;ctx=null;rect={x:0,y:0,width:0,height:0};size$=new Ns(null);resizeSubscription;mpg=Ln();mouseSubscription;shapes=[];shapeTap$=new Ns(null);tapSubscription;lastMouseInShapeId="";draggingShapeId="";prevCursor="default";constructor(t=document.documentElement,e="canvas",i=!1){this.PARENT_EL=t,(e=="svg"||e=="canvas")&&Yd(this.PARENT_EL),e=="svg"&&(this.SVG_EL=an("svg"),oi(this.PARENT_EL,this.SVG_EL)),e=="canvas"&&(this.CANVAS_EL=jd("canvas"),oi(this.PARENT_EL,this.CANVAS_EL)),this.resizeSubscription=rh(this.PARENT_EL).subscribe(s=>{this.rect.x=s.x,this.rect.y=s.y,this.rect.width=s.width,this.rect.height=s.height,this.SVG_EL&&Ke(this.SVG_EL,{viewBox:`0 0 ${this.rect.width} ${this.rect.height}`,width:`${this.rect.width}`,height:`${this.rect.height}`}),this.CANVAS_EL&&(Ke(this.CANVAS_EL,{width:`${this.rect.width}`,height:`${this.rect.height}`}),this.ctx=new Pc(this.CANVAS_EL,this.rect.width,this.rect.height,i)),this.size$.next(s)}),this.mouseSubscription=mm(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL,{createMousePoint:this.mpg}).subscribe(()=>{}),this.tapSubscription=nm(this.PARENT_EL).subscribe(s=>{for(const r of this.shapes)if(r.isMouseIn){this.shapeTap$.next(r);break}})}destroy(){this.resizeSubscription.unsubscribe(),this.mouseSubscription.unsubscribe(),this.tapSubscription.unsubscribe()}setCursor(t="default"){t!=this.prevCursor&&(this.PARENT_EL.style.cursor=t,this.prevCursor=t)}draw(...t){if(t.length){const e=[];t.forEach(i=>{i instanceof qt?e.push(...i.shapes):e.push(i)}),this.SVG_EL&&this.shapes.filter(i=>e.findIndex(s=>s.id==i.id)==-1).forEach(i=>{i.el&&(i.el.remove(),delete i.el)}),eg(this.shapes,e)}this.ctx&&this.ctx.clearRect(),this.lastMouseInShapeId="",this.mpg.current.isDown||(this.draggingShapeId="");for(const e of this.shapes){const{x:i,y:s}=e.transformOrigin();let r=0,o=0;if(e.parent?.dDegree||e.parent?.dScaleX!==1||e.parent?.dScaleY!==1){const a=e.transformOrigin(!0);r=a.x,o=a.y}if(e.shouldUpdatePathD&&e.pathD(),this.SVG_EL){if(!e.el||e.shouldUpdateSVGElInDraw){const a=e.toSVGEl();e.el?a&&(e.el.remove(),e.el=a,oi(this.SVG_EL,e.el),Ke(e.el,{id:e.id})):(e.el=a||Sa(),oi(this.SVG_EL,e.el),Ke(e.el,{id:e.id})),Qu(e.el)&&Ke(e.el,{d:e.toSVGPathD()}),e.shouldUpdateSVGElInDraw=!1,e.shouldUpdateAttrsInDraw=!0,e.shouldUpdateStyleInDraw=!0,e.shouldUpdateMInDraw=!0}if(e.shouldUpdateAttrsInDraw&&($h(e.attrs)||Ke(e.el,e.attrs),e.shouldUpdateAttrsInDraw=!1),e.shouldUpdateStyleInDraw&&($h(e.style)||jn(e.el,e.style),e.shouldUpdateStyleInDraw=!1),e.shouldUpdateMInDraw||!e.m){const a=new It;a.translate(e.x+(e.parent?.dX||0),e.y+(e.parent?.dY||0)),a.rotate(e.degree,i,s),a.scale(e.scaleX,e.scaleY,i,s),e.parent?.dDegree&&a.rotate(e.parent.dDegree,r,o),(e.parent?.dScaleX!==1||e.parent?.dScaleY!==1)&&a.scale(e.parent?.dScaleX||1,e.parent?.dScaleY||1,r,o),Ke(e.el,{transform:a.toString()}),e.m=a,e.shouldUpdateMInDraw=!1}}if(this.ctx&&(this.ctx.save(),this.ctx.translate(e.x+(e.parent?.dX||0),e.y+(e.parent?.dY||0)),this.ctx.rotate(q(e.degree),i,s),this.ctx.scale(e.scaleX,e.scaleY,i,s),e.parent?.dDegree&&this.ctx.rotate(q(e.parent.dDegree),r,o),(e.parent?.dScaleX!==1||e.parent?.dScaleY!==1)&&this.ctx.scale(e.parent?.dScaleX||1,e.parent?.dScaleY||1,r,o),e.m=this.ctx.currentMatrix,cu(this.ctx,e.attrs),e.toCanvasContext(this.ctx),this.ctx.hasSetCustomStrokeStyle&&this.ctx.stroke(),this.ctx.hasSetCustomFillStyle&&this.ctx.fill()),e.interactive?this.SVG_EL?e.isMouseIn=e.isPointInPath(this.SVG_EL,this.mpg.current.x,this.mpg.current.y)||e.isPointInStroke(this.SVG_EL,this.mpg.current.x,this.mpg.current.y):this.ctx?e.isMouseIn=e.isPointInPath(this.ctx,this.mpg.current.x,this.mpg.current.y)||e.isPointInStroke(this.ctx,this.mpg.current.x,this.mpg.current.y):e.isMouseIn=!1:e.isMouseIn=!1,e.isMouseIn&&(this.setCursor("pointer"),this.lastMouseInShapeId=e.id),e.isDragging=e.id==this.draggingShapeId,this.mpg.current.isDown&&(e.isDragging||!this.draggingShapeId&&e.isMouseIn&&e.drag&&e.drag.enable)){this.setCursor("grabbing"),e.isDragging=!0,this.draggingShapeId=e.id;let a=this.mpg.current.x-this.mpg.start.x,c=this.mpg.current.y-this.mpg.start.y;if(a||c){if(e.drag&&e.drag.enable&&e.drag.alongPath){const h=e.drag.alongPath.transform({m:e.m}).closestPoint(this.mpg.current.x,this.mpg.current.y);a=h.point.x-e.x,c=h.point.y-e.y}(a||c)&&(e.move(a,c),e.parent?.combo.shapes.forEach(h=>{h.drag?.followSibling&&h!==e&&h.move(a,c)}))}this.mpg.setStart(this.mpg.current)}else e.isMouseIn&&e.drag&&e.drag.enable&&this.setCursor("grab");this.ctx&&this.ctx.restore()}!this.lastMouseInShapeId&&!this.draggingShapeId&&this.setCursor("default")}clear(){this.shapes.forEach(t=>{t.el&&(t.el.remove(),delete t.el)}),this.ctx&&this.ctx.clearRect(),this.shapes=[]}drawMouseMoveLine(t){const e=t?.brushSize||4,i=t?.brushColor||"#000000";let s=!1;const r=Ur(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL,{start:()=>{s=!1,this.ctx&&(this.ctx.save(),this.ctx.lineWidth=e,this.ctx.strokeStyle=i,this.ctx.beginPath())},end:()=>{this.ctx&&this.ctx.restore()}}).subscribe(o=>{this.ctx&&(s?this.ctx.lineTo(o.current.x,o.current.y):(s=!0,this.ctx.moveTo(o.current.x,o.current.y)),this.ctx.stroke())});return()=>{r.unsubscribe()}}drawMouseMoveBrush(t){const e=t?.brushSize||10,i=t?.brushDensity||50,s=t?.brushColor||"#000000",r=new ue(s),o=r.r,a=r.g,c=r.b,h=Ur(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL).subscribe(l=>{if(this.ctx){const u=this.ctx.getImageData(0,0,this.ctx.canvas.width,this.ctx.canvas.height),d=u.data;for(let f=0;f<i;f++){const p=Math.random()*Math.PI*2,m=Math.random()*e,v=l.current.x+Math.cos(p)*m|0,y=l.current.y+Math.sin(p)*m|0,b=(v+y*u.width)*4;d[b]=o,d[b+1]=a,d[b+2]=c,d[b+3]=255}this.ctx.putImageData(u)}});return()=>{h.unsubscribe()}}downloadSVG=()=>{this.SVG_EL&&tf(this.SVG_EL)}}class Rn extends pt{lineLength;startColor;endColor;constructor(t){super({...t,centerX:0,centerY:0}),this.lineLength=t?.lineLength||0,this.startColor=t?.startColor,this.endColor=t?.endColor,this.setAttr({strokeWidth:this.getAttr("strokeWidth")||"1",stroke:this.startColor||this.getAttr("stroke")||"#000000"})}cloneShape(){return new Rn({...super.getBaseOptions(),lineLength:this.lineLength,startColor:this.startColor,endColor:this.endColor})}lineToAbsolutePoint(t){const e=Tt(Qt(this.x,this.y,t.x,t.y)),i=sn(this.x,this.y,t.x,t.y);(e!=this.degree||i!=this.lineLength)&&(e!=this.degree&&this.rotateTo(e),i!=this.lineLength&&(this.lineLength=i),this.shouldUpdatePathD=!0)}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})}getBoundingClientRect(){return{x:0,y:0,width:this.lineLength,height:parseFloat(this.getAttr("strokeWidth"))}}toSVGPathData(){return[["m",0,0],["l",this.lineLength,0]]}toCanvasContext(t){this.startColor&&this.endColor&&this.setAttr({stroke:t.createLinearGradient(0,0,this.lineLength,0,{0:this.startColor,1:this.endColor})}),t.beginPath(),t.moveTo(0,0),t.lineTo(this.lineLength,0)}intersection(t){const e=this.transformPathD().normalizedLines[0],i=t.transformPathD().normalizedLines[0];return e.intersection(i)}}class Ac extends pt{cx;cy;toX;toY;isLineThrough;constructor(t){super(t),this.cx=t?.cx||0,this.cy=t?.cy||0,this.toX=t?.toX||0,this.toY=t?.toY||0,this.isLineThrough=typeof t?.isLineThrough=="boolean"?t.isLineThrough:!1,this.setAttr({strokeWidth:this.getAttr("strokeWidth")||"1",stroke:this.getAttr("stroke")||"#000000"})}cloneShape(){return new Ac({...super.getBaseOptions(),cx:this.cx,cy:this.cy,toX:this.toX,toY:this.toY,isLineThrough:this.isLineThrough})}update(t){typeof t.cx=="number"&&(this.cx=t.cx,this.shouldUpdatePathD=!0),typeof t.cy=="number"&&(this.cy=t.cy,this.shouldUpdatePathD=!0),typeof t.toX=="number"&&(this.toX=t.toX,this.shouldUpdatePathD=!0),typeof t.toY=="number"&&(this.toY=t.toY,this.shouldUpdatePathD=!0),typeof t.isLineThrough=="boolean"&&(this.isLineThrough=t.isLineThrough,this.shouldUpdatePathD=!0)}toSVGPathData(){if(this.isLineThrough){const t=this.cx*2-(0+this.toX)/2,e=this.cy*2-(0+this.toY)/2;return[["m",0,0],["q",t,e,this.toX,this.toY]]}else return[["m",0,0],["q",this.cx,this.cy,this.toX,this.toY]]}toCanvasContext(t){if(t.beginPath(),t.moveTo(0,0),this.isLineThrough){const e=this.cx*2-(0+this.toX)/2,i=this.cy*2-(0+this.toY)/2;t.quadraticCurveTo(e,i,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}}class kr extends pt{points;isStraight;constructor(t){super(t),this.points=t?.points||[],this.isStraight=typeof t?.isStraight=="boolean"?t.isStraight:!0,this.setAttr({strokeWidth:this.getAttr("strokeWidth")||"1",stroke:this.getAttr("stroke")||"#000000"})}cloneShape(){return new kr({...super.getBaseOptions(),points:[...this.points],isStraight:this.isStraight})}update(t){"points"in t&&(this.points=[...t.points||this.points],this.shouldUpdatePathD=!0),typeof t.isStraight=="boolean"&&(this.isStraight=t.isStraight,this.shouldUpdatePathD=!0)}toSVGPathData(){const t=[];if(this.points.length<3)return t;const e=this.points.length;if(this.isStraight){t.push(["m",this.points[0].x,this.points[0].y]);for(let i=1;i<=e-1;i++)t.push(["l",this.points[i].x-this.points[i-1].x,this.points[i].y-this.points[i-1].y]);t.push(["z"])}else{const i=(this.points[0].x+this.points[e-1].x)/2,s=(this.points[0].y+this.points[e-1].y)/2;let r=i,o=s;t.push(["m",r,o]);for(let a=0;a<e-1;a++){const c=(this.points[a].x+this.points[a+1].x)/2,h=(this.points[a].y+this.points[a+1].y)/2;t.push(["q",this.points[a].x-r,this.points[a].y-o,c-r,h-o]),r=c,o=h}t.push(["q",this.points[e-1].x-r,this.points[e-1].y-o,i-r,s-o])}return t}toCanvasContext(t){if(this.points.length<3)return;t.beginPath();const e=this.points.length;if(this.isStraight){t.moveTo(this.points[0].x,this.points[0].y);for(let i=1;i<=e-1;i++)t.lineTo(this.points[i].x,this.points[i].y);t.closePath()}else{const i=(this.points[0].x+this.points[e-1].x)/2,s=(this.points[0].y+this.points[e-1].y)/2;t.moveTo(i,s);for(let r=0;r<e-1;r++){const o=(this.points[r].x+this.points[r+1].x)/2,a=(this.points[r].y+this.points[r+1].y)/2;t.quadraticCurveTo(this.points[r].x,this.points[r].y,o,a)}t.quadraticCurveTo(this.points[e-1].x,this.points[e-1].y,i,s)}}isPointInShape(t){const e=this.points.length;let i=!1;const s=2e-10;for(let r=0,o=e-1;r<e;o=r,r++){const a=this.points[r].x,c=this.points[r].y,h=this.points[o].x,l=this.points[o].y;if(a===t.x&&c===t.y||h===t.x&&l===t.y||t.y===c&&t.y===l)return!0;if(t.y>=c&&t.y<l||t.y<c&&t.y>=l){const u=(h-a)/(l-c),d=a+u*(t.y-c);if(d===t.x||Math.abs(d-t.x)<s)return!0;d>t.x&&(i=!i)}}return i}[Symbol.iterator](){let t=-1;return{next:()=>({value:t<=this.points.length-1?this.points[++t]:void 0,done:t>=this.points.length})}}static generate(t,e,i,s){const r=[];for(let o=0;o<s;o++){const a=o/s*2*Math.PI,{dx:c,dy:h}=rn(a,i);r.push({x:t+c,y:e+h})}return new kr({points:r})}}class Mc extends qt{length=100;constructor(t){super(t);const e=new Rn({drag:{followSibling:!0},lineLength:this.length});this.addShape(e);const i=new Rn({drag:{followSibling:!0},lineLength:20+Math.random()*20});this.addShape(i,{dX:90-Math.random()*40,dDegree:Math.random()*70});const s=new Rn({drag:{followSibling:!0},lineLength:20+Math.random()*20});this.addShape(s,{dX:90-Math.random()*40,dDegree:-Math.random()*70}),this.comboRotate(-90,!0)}cloneShapeCombo(){return new Mc(super.getBaseOptions())}}class si extends pt{ballRadius;constructor(t){super(t),this.ballRadius=t?.ballRadius||0}cloneShape(){return new si({...super.getBaseOptions(),ballRadius:this.ballRadius})}update(t){typeof t.ballRadius=="number"&&(this.ballRadius=t.ballRadius,this.shouldUpdatePathD=!0)}getBoundingClientRect(){return{x:-this.ballRadius,y:-this.ballRadius,width:this.ballRadius*2,height:this.ballRadius*2}}toSVGEl(){const t=an("circle");return this.setAttr({cx:"0",cy:"0",r:String(this.ballRadius)}),t}toSVGPathData(){return this.ballRadius?[["m",0,-this.ballRadius],["a",this.ballRadius,this.ballRadius,0,1,1,0,2*this.ballRadius],["a",this.ballRadius,this.ballRadius,0,1,1,0,-2*this.ballRadius],["z"]]:[["m",0,0]]}toCanvasContext(t){t.beginPath(),t.arc(0,0,this.ballRadius,0,Math.PI*2,!0),t.closePath()}eq(t){return this.x===t.x&&this.y===t.y&&this.ballRadius===t.ballRadius&&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 Kn(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 i=t/e;this.scalar(i)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,i=this.y;return{x:i*t.x-e*t.y,y:e*t.y-i*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}}}class Dc extends pt{constructor(t){super(t)}cloneShape(){return new Dc({...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 dn extends pt{rectWidth;rectHeight;rectBorderRadius;constructor(t){super(t),this.rectWidth=t.rectWidth||0,this.rectHeight=t.rectHeight||0,this.rectBorderRadius=t.rectBorderRadius||0}cloneShape(){return new dn({...super.getBaseOptions(),rectWidth:this.rectWidth,rectHeight:this.rectHeight,rectBorderRadius:this.rectBorderRadius})}update(t){typeof t.rectWidth=="number"&&(this.rectWidth=t.rectWidth,this.shouldUpdatePathD=!0),typeof t.rectHeight=="number"&&(this.rectHeight=t.rectHeight,this.shouldUpdatePathD=!0),typeof t.rectBorderRadius=="number"&&(this.rectBorderRadius=t.rectBorderRadius,this.shouldUpdatePathD=!0)}getBoundingClientRect(){return{x:0,y:0,width:this.rectWidth,height:this.rectHeight}}toSVGEl(){const t=an("rect");return this.setAttr({x:"0",y:"0",width:String(this.rectWidth),height:String(this.rectHeight),rx:String(this.rectBorderRadius),ry:String(this.rectBorderRadius)}),t}toSVGPathData(){return this.rectBorderRadius?[["m",this.rectBorderRadius,0],["l",this.rectWidth-this.rectBorderRadius*2,0],["a",this.rectBorderRadius,this.rectBorderRadius,0,0,1,this.rectBorderRadius,this.rectBorderRadius],["l",0,this.rectHeight-this.rectBorderRadius*2],["a",this.rectBorderRadius,this.rectBorderRadius,0,0,1,-this.rectBorderRadius,this.rectBorderRadius],["l",this.rectBorderRadius*2-this.rectWidth,0],["a",this.rectBorderRadius,this.rectBorderRadius,0,0,1,-this.rectBorderRadius,-this.rectBorderRadius],["l",0,this.rectBorderRadius*2-this.rectHeight],["a",this.rectBorderRadius,this.rectBorderRadius,0,0,1,this.rectBorderRadius,-this.rectBorderRadius],["z"]]:[["m",0,0],["l",this.rectWidth,0],["l",0,this.rectHeight],["l",-this.rectWidth,0],["z"]]}toCanvasContext(t){t.beginPath(),this.rectBorderRadius<=0?t.rect(0,0,this.rectWidth,this.rectHeight):(t.moveTo(0,this.rectBorderRadius),t.lineTo(0,this.rectHeight-this.rectBorderRadius),t.quadraticCurveTo(0,this.rectHeight,this.rectBorderRadius,this.rectHeight),t.lineTo(this.rectWidth-this.rectBorderRadius,this.rectHeight),t.quadraticCurveTo(this.rectWidth,this.rectHeight,this.rectWidth,this.rectHeight-this.rectBorderRadius),t.lineTo(this.rectWidth,this.rectBorderRadius),t.quadraticCurveTo(this.rectWidth,0,this.rectWidth-this.rectBorderRadius,0),t.lineTo(this.rectBorderRadius,0),t.quadraticCurveTo(0,0,0,this.rectBorderRadius)),t.closePath()}static fromCubicBezier(t,e,i,s,r,o,a,c){const l=new Dt({x:t,y:e,c1x:i,c1y:s,c2x:r,c2y:o,toX:a,toY:c}).getBoundingClientRect();return new dn({x:l.x,y:l.y,rectWidth:l.width,rectHeight:l.height})}eq(t){return this.x===t.x&&this.y===t.y&&this.rectWidth===t.rectWidth&&this.rectHeight===t.rectHeight&&this.rectBorderRadius===t.rectBorderRadius}intersection(t){return!(this.x+this.rectWidth<t.x||t.x+t.rectWidth<this.x||this.y+this.rectHeight<t.y||t.y+t.rectHeight<this.y)}isPointInShape(t){return t.x>=this.x&&t.x<=this.x+this.rectWidth&&t.y>=this.y&&t.y<=this.y+this.rectHeight}}class Ic extends pt{rx;ry;constructor(t){super(t),this.rx=t?.heartRx||10,this.ry=t?.heartRy||10}cloneShape(){return new Ic({...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 Oc extends pt{rx;ry;constructor(t){super(t),this.rx=t?.heartRx||50,this.ry=t?.heartRy||50}cloneShape(){return new Oc({...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 kc extends pt{r;constructor(t){super(t),this.r=t?.starR||20}cloneShape(){return new kc({...super.getBaseOptions(),starR:this.r})}toSVGPathData(){const t=[["m",0,-this.r]];for(let e=0;e<6;e+=1){const i=288+e*144,s=this.r*Math.cos(q(i)),r=this.r*Math.sin(q(i));t.push(["l",s,r])}return t}}class Rc extends pt{constructor(t){super(t)}cloneShape(){return new Rc({...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 Lc extends pt{constructor(t){super(t)}cloneShape(){return new Lc({...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 zc extends pt{constructor(t){super({...t,initD:"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 zc({...super.getBaseOptions()})}}class Nc extends pt{rx;ry;constructor(t){super(t),this.rx=t?.rx||0,this.ry=t?.ry||0}cloneShape(){return new Nc({...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}}toSVGEl(){const t=an("ellipse");return this.setAttr({cx:"0",cy:"0",rx:String(this.rx),ry:String(this.ry)}),t}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 Fc extends qt{showFlame;flame;ship;constructor(t){super(t),this.showFlame=typeof t?.showFlame=="boolean"?t?.showFlame:!0,this.flame=new pt({initD:[["M",-15,0],["L",-2.5,-5],["L",-2.5,5],["Z"]],drag:{followSibling:!0}}),this.showFlame&&this.addShape(this.flame),this.ship=new pt({initD:[["M",10,0],["L",-10,10],["L",-5,0],["L",-10,-10],["L",10,0],["Z"]],drag:{followSibling:!0}}),this.addShape(this.ship)}cloneShapeCombo(){return new Fc({...super.getBaseOptions(),showFlame:this.showFlame})}update(t){typeof t?.showFlame=="boolean"&&(this.shapes=[],this.showFlame=t?.showFlame,this.showFlame&&this.addShape(this.flame),this.addShape(this.ship))}}class Bc extends qt{width;height;cornerRadius;constructor(t){super(t),this.width=t.segmentWidth,this.height=t.segmentHeight,this.cornerRadius=typeof t.segmentCornerRadius=="number"?t.segmentCornerRadius:this.height*.5;const e=new dn({drag:{followSibling:!0},rectWidth:this.width+this.cornerRadius*2,rectHeight:this.height,rectBorderRadius:this.cornerRadius});this.addShape(e,{dX:0-this.cornerRadius,dY:0-this.height*.5});const i=new si({drag:{followSibling:!0},ballRadius:2});this.addShape(i);const s=new si({drag:{followSibling:!0},ballRadius:2});this.addShape(s,{dX:0+this.width})}cloneShapeCombo(){return new Bc({...super.getBaseOptions(),segmentWidth:this.width,segmentHeight:this.height,segmentCornerRadius:this.cornerRadius})}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 Uc extends qt{options;value$=new Re;subscription;constructor(t){super(t),this.options=t;const e=t?.sliderMin||0,i=t?.sliderMax||100,s=t?.sliderStep||1,r=Qp(e,i,s),o=r(typeof t?.sliderDefaultValue=="number"?Y(t.sliderDefaultValue,e,i):e);this.value$.next(o);const a=o/(i-e),c=t?.sliderWidth||100,h=t?.sliderHeight||4,l=h*.5,u=h*2.5,d=t?.sliderBackgroundColor||"#f5f5f5",f=t?.sliderForegroundColor||"#5a82f0",p=new dn({rectWidth:c,rectHeight:h,rectBorderRadius:l,attrs:{fill:d},drag:{enable:!1}});this.addShape(p);const m=new dn({rectWidth:c*a,rectHeight:h,rectBorderRadius:l,attrs:{fill:f},drag:{enable:!1}});this.addShape(m);const v=new si({x:c*a,y:l,ballRadius:u,attrs:{fill:f},drag:{enable:!0,alongPath:new $t([["m",0,0],["l",c,0]])}});this.addShape(v),this.subscription=v.transform$.subscribe(({dX:y})=>{console.log(y);const b=(v.x-p.x)/c;m.update({rectWidth:c*b}),this.value$.next(r(b*(i-e)+e))})}destroy(){super.destroy(),this.subscription.unsubscribe()}cloneShapeCombo(){return new Uc({...super.getBaseOptions(),...this.options})}}class Ki extends pt{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,i=t.height||0,s=(t.endDegree-t.startDegree-180)/2;if(t.radius)this.radius=t.radius;else if(this.half){const r=Math.min(e/2,i)-this.lineWidth;this.radius=Math.max(0,r-r*Math.sin(q(s)))}else this.radius=Math.max(0,Math.min(e/2,i/2)-this.lineWidth);t.x||(this.x=e/2),t.y||(this.half?this.y=i-this.lineWidth-this.radius*Math.sin(q(s)):this.y=i/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 Ki({...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}=rn(q(this.startDegree),this.radius),{dx:i,dy:s}=rn(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,i-t,s-e]]}toCanvasContext(t){if(this.startColor&&this.endColor){let e;if(this.half){const i=this.radius-this.radius*Math.cos(Math.PI*this.percent),s=this.radius*Math.sin(Math.PI*this.percent);e=t.createLinearGradient(-this.radius,0,-this.radius+i,-s,{0:this.startColor,1:this.endColor})}else{const i=this.radius*Math.sin(2*Math.PI*this.percent),s=this.radius*Math.cos(2*Math.PI*this.percent);e=t.createLinearGradient(0,-this.radius,i,-s,{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 Vc extends qt{half;lineWidth;width;height;bgColor;startColor;endColor;startDegree;endDegree;percent=0;ringBg;ring;lines=[];indicatorLineCount;constructor(t){if(super(t),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 Ki({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 Ki({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 r=this.ringBg.radius-20-17;for(let o=0;o<this.indicatorLineCount;o++){const a=new Rn({lineLength:17,startColor:this.startColor,endColor:this.endColor,attrs:{"stroke-linecap":"round","stroke-width":String(2),stroke:this.bgColor}});this.lines.push(a);const c=-90+this.startDegree+(this.endDegree-this.startDegree)/(this.indicatorLineCount-1)*o;this.addShape(a,{dX:this.ringBg.x+Math.cos(q(c))*r,dY:this.ringBg.y+Math.sin(q(c))*r,dDegree:c})}}this.setPercent(t.percent||0)}cloneShapeCombo(){return new Vc({...super.getBaseOptions(),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})}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)}}class ri extends pt{text;width=0;height=0;constructor(t){super(t),this.text=t.text,this.setAttr({fontSize:"10px",fontFamily:'system-ui, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif',emojiFontFamily:'"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif',fill:"#666666",stroke:"none","alignment-baseline":"middle",textAnchor:"start",...this.attrs});const e=ho(this.getAttr("fontSize"),10).number,i=ho(this.getAttr("fontWeight"),400).number,s=ri.measureText(this.text,e,i);this.width=s.width,this.height=s.height}cloneShape(){return new ri({...super.getBaseOptions(),text:this.text})}toSVGEl(){const t=an("text");t.setAttribute("x","0"),t.setAttribute("y","0"),t.style.alignmentBaseline="middle";const e=this.text.split(`
|
|
85
85
|
`);if(e.length<=1)t.innerHTML=this.text;else{const i=this.getAttr("line-height","1.2em");e.forEach((s,r)=>{if(s.trim()){const o=an("tspan");o.setAttribute("x","0"),o.setAttribute("dy",r>0?i:"0"),o.innerHTML=s.trim(),o.style.alignmentBaseline="middle",t.append(o)}})}return t}toSVGPathData(){return[]}toCanvasContext(t){const e=this.text.split(`
|
|
86
|
-
`);if(e.length<=1)t.fillText(this.text,0,0);else{const i=t.measureText(this.text),r=(i.actualBoundingBoxAscent+i.actualBoundingBoxDescent)*parseFloat(this.getAttr("line-height","1.2em"));let o=0;e.forEach((a,c)=>{a.trim()&&(o+=c>0?r:0,t.fillText(a.trim(),0,o))})}}static measureText(t,e=12,i=400){const s=document.createElement("span");s.style.visibility="hidden",s.style.margin="0",s.style.padding="0",s.style.inset="0",s.style.whiteSpace="nowrap",s.style.overflow="visible",s.style.fontSize=e+"px",s.style.fontWeight=i.toString(),s.innerText=t,document.body.appendChild(s);const r=s.offsetWidth,o=s.offsetHeight;return document.body.removeChild(s),{width:r,height:o}}static getFixedWidthText(t,e,i=12,s=400,r="..."){let o="";if(!t||e<i)return o;const a=t.split("");let c=r?ri.measureText(r,i,s).width:0;for(let h=0,l=a.length;h<l;h++)if(c+=ri.measureText(a[h],i,s).width,c>e){r&&(o+=r);break}else o+=a[h];return o}}class Vc extends qt{options;constructor(t){super(t),this.options=t;const{shapeCreator:e,width:i,height:s,x:r,y:o,particleCount:a,angle:c,spread:h,startVelocity:l,decay:u,gravity:d,drift:f,ticks:p,colors:m,scalar:v,flat:y}=Object.assign({shapeCreator:()=>new dn({rectWidth:10,rectHeight:10}),width:100,height:100,x:.5,y:.6,particleCount:100,angle:90,spread:70,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,colors:qg,scalar:1,flat:!1},t||{}),b=(S,D)=>{S.x=i*r,S.y=s*o,S.scaleX=v,S.scaleY=v;const L=m[D%m.length];S.setAttr({fill:L}),S.interactive=!1,S.wobble=Math.random()*10,S.wobbleSpeed=Math.min(.11,Math.random()*.1+.05),S.velocity=l*.5+Math.random()*l,S.angle2D=-x+(.5*w-Math.random()*w),S.tiltAngle=(Math.random()*(.75-.25)+.25)*Math.PI,S.tick=0,S.totalTicks=p,S.decay=u,S.drift=f,S.random=Math.random()+2,S.tiltSin=0,S.tiltCos=0,S.wobbleX=0,S.wobbleY=0,S.gravity=d*3,S.scalar=v,S.flat=y,S.color=new ue(L)},x=q(c),w=q(h);let C=a;for(;C;){const S=e();b(S,C),S.clone=(D=>()=>{const L=e();return b(L,D),L})(C),this.addShape(S),C--}}cloneShapeCombo(){return new Vc(this.options)}update(){return this.shapes=this.shapes.filter(t=>{t.x+=Math.cos(t.angle2D)*t.velocity+t.drift,t.y+=Math.sin(t.angle2D)*t.velocity+t.gravity,t.velocity*=t.decay,t.flat?(t.wobble=0,t.wobbleX=t.x+10*t.scalar,t.wobbleY=t.y+10*t.scalar,t.tiltSin=0,t.tiltCos=0,t.random=1):(t.wobble+=t.wobbleSpeed,t.wobbleX=t.x+10*t.scalar*Math.cos(t.wobble),t.wobbleY=t.y+10*t.scalar*Math.sin(t.wobble),t.tiltAngle+=.1,t.tiltSin=Math.sin(t.tiltAngle),t.tiltCos=Math.cos(t.tiltAngle),t.random=Math.random()+2);const e=t.tick++/t.totalTicks,i=t.x+t.random*t.tiltCos,s=t.y+t.random*t.tiltSin,r=t.wobbleX+t.random*t.tiltCos,o=t.wobbleY+t.random*t.tiltSin;return t.setAttr("fill",t.color.setAlpha(1-e).toString()),t.degree=Tt(Math.PI/10*t.wobble),t.scaleX=Math.abs(r-i)*.1,t.scaleY=Math.abs(o-s)*.1,t.tick<t.totalTicks}),this.shapes.length>0}}const n2={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:(n,t)=>{switch(t){case"W":return`${n}周`;default:return`${n}日`}},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:(n,t)=>{const e=n*100+t;return e<600?"凌晨":e<900?"早上":e<1100?"上午":e<1300?"中午":e<1800?"下午":"晚上"}},i2={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:n=>{const t=["th","st","nd","rd"],e=n%100;return`[${n}${t[(e-20)%10]||t[e]||t[0]}]`}},mn=new fg;let Rr="zh-cn";Yc(i2),Yc(n2);function Yc(n,t){if(!n)return mn.get(Rr);let e;if(typeof n=="string"){const i=n.toLowerCase();if(mn.get(i))e=i;else if(t)mn.set(i,t),e=i;else return mn.get(Rr)}else{const{name:i}=n;mn.set(i,n),e=i}return e&&(Rr=e),mn.get(e)||mn.get(Rr)}class s2 extends po{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=[];state;constructor(t){if(super(),this.id=hl(),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 e=this.getAttr("stroke-dasharray","4 4");this.setAttr("stroke-dasharray",e),this.strokeDashTotalLength=Yh(e).reduce((i,s)=>i+s,0)}this.state=ec(this)}forceSetCXY(t,e){this.cX=t,this.cY=e,this.forceCXY=!0}shapeInit(){}initPathD(){if(!this.pathd){if(this.pathd=new vw,this.state.subscribe(()=>{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(i=>{const s=i.originMatrix?i.originMatrix.clone():new It;s.translate(-t.x+i.x,-t.y+i.y),i.originMatrix=s});const e=this.originMatrix?this.originMatrix.clone():new It;e.translate(-t.x+this.x,-t.y+this.y),this.originMatrix=e}isPointInPath(t,e,i){if(i instanceof va)return i.isPointInPath(new Path2D(this.toSVGPathD()),t,e);let s;try{s=new SVGPoint(t,e)}catch{s=i.createSVGPoint(),s.x=t,s.y=e}if(this.el instanceof SVGGeometryElement)return this.el.isPointInFill(s);{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,i){if(i instanceof va)return i.isPointInStroke(new Path2D(this.toSVGPathD()),t,e);let s;try{s=new SVGPoint(t,e)}catch{s=i.createSVGPoint(),s.x=t,s.y=e}return this.el instanceof SVGGeometryElement?this.el.isPointInStroke(s):!1}clone(){return Fp(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(([i,s])=>[Ct(i),s]))):e&&(this.attrs[Ct(t)]=e)}getAttr(t,e){return this.attrs[t]||this.attrs[Ct(t)]||e}getAttrs(){return this.attrs}hasAttr(t){return!!this.attrs[t]||!!this.attrs[Ct(t)]}distance(t){return sn(this.x,this.y,t.x,t.y)}rotateTo(t){this.degree=Tt(Qt(this.x,this.y,t.x,t.y))}followTo(t,e=3){this.rotateTo(t);const{dx:i,dy:s}=rn(q(this.degree),e);this.vx=i,this.vy=s,this.run()}followAccelerationTo(t,e=.05){this.rotateTo(t);const{dx:i,dy:s}=rn(q(this.degree),e);this.ax=i,this.ay=s,this.run()}checkCollision(t){}checkWall(t){}gravitateTo(t){const e=t.x-this.x,i=t.y-this.y,s=e*e+i*i,r=Math.sqrt(s),o=this.mass*t.mass/s,a=o*e/r,c=o*i/r;this.vx+=a/this.mass,this.vy+=c/this.mass,t.vx-=a/t.mass,t.vy-=c/t.mass}run(t){this.vx+=this.ax,this.vy+=this.ay;const e=se(t?.gravity,0);this.vy+=e;const i=se(t?.friction,1);this.vx*=i,this.vy*=i,this.x+=this.vx,this.y+=this.vy}runEaseTo(t,e){const i=se(e?.easing,.05),s=t.x-this.cX-this.x,r=t.y-this.cY-this.y;this.vx=s*i,this.vy=r*i,this.run(e)}runSpringTo(t,e){const i=se(e?.spring,.03);(Array.isArray(t)?t:[t]).forEach(s=>{const r=s.x-this.cX-this.x,o=s.y-this.cY-this.y,a=r*i,c=o*i;this.vx+=a,this.vy+=c}),this.run({friction:.9,...e})}springMassTo(t,e){const i=se(e?.springLength,100),s=se(e?.spring,1e-4),r=t.x-this.x,o=t.y-this.y,a=Math.sqrt(r*r+o*o);if(a<i){const c=r*s,h=o*s;return this.vx+=c/this.mass,this.vy+=h/this.mass,t.vx-=c/t.mass,t.vy-=h/t.mass,1-a/i}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 i=this.getTotalLength();return t.originD=this.initPathD().getSubpath(0,e*i),this.getPointAtLength(e*i)}strokeDashTween(t=1e3,e){const i=this.initPathD(),s=G(i.getTotalLength(),0);this.setAttr({strokeDasharray:`${s} ${s}`,strokeDashoffset:`${s}`});const r=e?.onUpdate,o=new ki({frameDuration:t});o.addTween({offset:s},{offset:0},Object.assign(e||{},{onUpdate:(a,c)=>{this.setAttr("strokeDashoffset",""+G(a.offset,2)),r?.(a,c)}})),o.play()}}class r2 extends s2{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,i){this.cX=t,this.cY=e,this.cZ=i}rotateX(t){({x:this.y,y:this.z}=ge(q(t),this.y,this.z))}rotateY(t){({x:this.x,y:this.z}=ge(q(t),this.x,this.z))}rotateZ(t){({x:this.x,y:this.y}=ge(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 Kn(this.x,this.y,this.z)}distance(t){const e=t.x-this.x,i=t.y-this.y,s=t.z-this.z;return Math.sqrt(e*e+i*i+s*s)}scalar(t){return this.x*=t,this.y*=t,this.z*=t,this}normalize(t=1){const e=this.length();if(e){const i=t/e;this.scalar(i)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,i=this.y,s=this.z;return{x:i*t.z-s*t.y,y:s*t.x-e*t.z,z:e*t.y-i*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 Lr=r2,Zi=2e3,$c=2001,Ad=[1,0,0,1],Md=[1,0,0,1,0,0],Dd=[1,0,0,0,1,0,0,0,1],Id=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];class Gc{value;constructor(t=Ad){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,i=0,s=1){return this.m11=t,this.m21=e,this.m12=i,this.m22=s,this}identity(){return this.value=Array.from(Ad),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 Gc(this.value)}fromArray(t,e=0){for(let i=0;i<4;i++)this.value[i]=t[i+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 i=t.value,s=e.value,r=this.value,o=i[0],a=i[2],c=i[1],h=i[3],l=s[0],u=s[2],d=s[1],f=s[3];return r[0]=o*l+a*d,r[2]=o*u+a*f,r[1]=c*l+h*d,r[3]=c*u+h*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 zr{value;constructor(t=Dd){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,i=0,s=0,r=1,o=0,a=0,c=0,h=1){const l=this.value;return l[0]=t,l[1]=s,l[2]=a,l[3]=e,l[4]=r,l[5]=c,l[6]=i,l[7]=o,l[8]=h,this}identity(){return this.value=Array.from(Dd),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 zr(this.value)}fromArray(t,e=0){for(let i=0;i<9;i++)this.value[i]=t[i+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,i){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),i.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 i=t.value,s=e.value,r=this.value,o=i[0],a=i[3],c=i[6],h=i[1],l=i[4],u=i[7],d=i[2],f=i[5],p=i[8],m=s[0],v=s[3],y=s[6],b=s[1],x=s[4],w=s[7],C=s[2],S=s[5],D=s[8];return r[0]=o*m+a*b+c*C,r[3]=o*v+a*x+c*S,r[6]=o*y+a*w+c*D,r[1]=h*m+l*b+u*C,r[4]=h*v+l*x+u*S,r[7]=h*y+l*w+u*D,r[2]=d*m+f*b+p*C,r[5]=d*v+f*x+p*S,r[8]=d*y+f*w+p*D,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],i=t[1],s=t[2],r=t[3],o=t[4],a=t[5],c=t[6],h=t[7],l=t[8];return e*o*l-e*a*h-i*r*l+i*a*c+s*r*h-s*o*c}inverse(){const t=this.value,e=t[0],i=t[1],s=t[2],r=t[3],o=t[4],a=t[5],c=t[6],h=t[7],l=t[8],u=l*o-a*h,d=a*c-l*r,f=h*r-o*c,p=e*u+i*d+s*f;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);const m=1/p;return t[0]=u*m,t[1]=(s*h-l*i)*m,t[2]=(a*i-s*o)*m,t[3]=d*m,t[4]=(l*e-s*c)*m,t[5]=(s*r-a*e)*m,t[6]=f*m,t[7]=(i*c-h*e)*m,t[8]=(o*e-i*r)*m,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).inverse().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,i,s,r,o,a){const c=Math.cos(r),h=Math.sin(r);return this.set(i*c,i*h,-i*(c*o+h*a)+o+t,-s*h,s*c,-s*(-h*o+c*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(jc.makeScale(t,e)),this}rotate(t){return this.premultiply(jc.makeRotation(-t)),this}translate(t,e){return this.premultiply(jc.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),i=Math.sin(t);return this.set(e,-i,0,i,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 Jt{value;is3dSpecial=!1;constructor(t=Id){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,i=0,s=0,r=0,o=1,a=0,c=0,h=0,l=0,u=1,d=0,f=0,p=0,m=0,v=1){const y=this.value;return y[0]=t,y[4]=e,y[8]=i,y[12]=s,y[1]=r,y[5]=o,y[9]=a,y[13]=c,y[2]=h,y[6]=l,y[10]=u,y[14]=d,y[3]=f,y[7]=p,y[11]=m,y[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(Id),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 Jt(this.value)}static fromString(t){const e=new Jt,i=Ih("number",t);return i.length===16&&i.forEach((s,r)=>{s.fullMatch&&(e.value[r]=parseFloat(s.fullMatch))}),e}fromArray(t,e=0){for(let i=0;i<16;i++)this.value[i]=t[i+e];return this}toArray(t=[],e=0){const i=this.value;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t[e+9]=i[9],t[e+10]=i[10],t[e+11]=i[11],t[e+12]=i[12],t[e+13]=i[13],t[e+14]=i[14],t[e+15]=i[15],t}copyPosition(t){const e=this.value,i=t.value;return e[12]=i[12],e[13]=i[13],e[14]=i[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,i){return t.setFromMatrix4Column(this,0),e.setFromMatrix4Column(this,1),i.setFromMatrix4Column(this,2),this}makeBasis(t,e,i){return this.set(t.x,e.x,i.x,0,t.y,e.y,i.y,0,t.z,e.z,i.z,0,0,0,0,1),this}normalize(){return this.multiplyScalar(1/(this.m44||1e-4))}transformPoint(t){const e=t.z||1,i=t.w||1;return{x:t.x*this.m11+t.y*this.m21+e*this.m31+i*this.m41,y:t.x*this.m12+t.y*this.m22+e*this.m32+i*this.m42,z:t.x*this.m13+t.y*this.m23+e*this.m33+i*this.m43,w:t.x*this.m14+t.y*this.m24+e*this.m34+i*this.m44}}toMatrix(t){const{scalarX:e,scalarY:i,skewX:s,skewY:r,x:o,y:a}=this.split(),c=[e,r,s,i,o,a];return t?(t.value=c,t):new It(c)}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=>G(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),i=Math.sqrt(this.m31*this.m31+this.m32*this.m32+this.m33*this.m33),s=Tt(Y(Math.asin(-this.m13),-1,1));let r=Tt(Math.atan2(this.m23,this.m33));Math.cos(q(s))===0&&(r=Tt(Math.atan2(-this.m31,this.m22)));let o=Tt(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:i,degreeX:r,degreeY:s,degreeZ:o,skewX:Tt(this.m14),skewY:Tt(this.m24),skewZ:Tt(this.m34),skewW:this.m44,perspective:this.m34?-(1/this.m34):0}}extractRotation(t){const e=this.value,i=t.value,s=1/Xc.setFromMatrix4Column(t,0).length(),r=1/Xc.setFromMatrix4Column(t,1).length(),o=1/Xc.setFromMatrix4Column(t,2).length();return e[0]=i[0]*s,e[1]=i[1]*s,e[2]=i[2]*s,e[3]=0,e[4]=i[4]*r,e[5]=i[5]*r,e[6]=i[6]*r,e[7]=0,e[8]=i[8]*o,e[9]=i[9]*o,e[10]=i[10]*o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}lookAt(t,e,i){const s=this.value;return ne.subVectors(t,e),ne.lengthSq()===0&&(ne.z=1),ne.normalize(),pn.crossVectors(i,ne),pn.lengthSq()===0&&(Math.abs(i.z)===1?ne.x+=1e-4:ne.z+=1e-4,ne.normalize(),pn.crossVectors(i,ne)),pn.normalize(),Nr.crossVectors(ne,pn),s[0]=pn.x,s[4]=Nr.x,s[8]=ne.x,s[1]=pn.y,s[5]=Nr.y,s[9]=ne.y,s[2]=pn.z,s[6]=Nr.z,s[10]=ne.z,this}multiplyMatrices(t,e){const i=t.value,s=e.value,r=this.value,o=i[0],a=i[4],c=i[8],h=i[12],l=i[1],u=i[5],d=i[9],f=i[13],p=i[2],m=i[6],v=i[10],y=i[14],b=i[3],x=i[7],w=i[11],C=i[15],S=s[0],D=s[4],L=s[8],I=s[12],F=s[1],U=s[5],X=s[9],Z=s[13],at=s[2],nt=s[6],rt=s[10],Q=s[14],St=s[3],z=s[7],R=s[11],H=s[15];return r[0]=o*S+a*F+c*at+h*St,r[4]=o*D+a*U+c*nt+h*z,r[8]=o*L+a*X+c*rt+h*R,r[12]=o*I+a*Z+c*Q+h*H,r[1]=l*S+u*F+d*at+f*St,r[5]=l*D+u*U+d*nt+f*z,r[9]=l*L+u*X+d*rt+f*R,r[13]=l*I+u*Z+d*Q+f*H,r[2]=p*S+m*F+v*at+y*St,r[6]=p*D+m*U+v*nt+y*z,r[10]=p*L+m*X+v*rt+y*R,r[14]=p*I+m*Z+v*Q+y*H,r[3]=b*S+x*F+w*at+C*St,r[7]=b*D+x*U+w*nt+C*z,r[11]=b*L+x*X+w*rt+C*R,r[15]=b*I+x*Z+w*Q+C*H,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],i=t[4],s=t[8],r=t[12],o=t[1],a=t[5],c=t[9],h=t[13],l=t[2],u=t[6],d=t[10],f=t[14],p=t[3],m=t[7],v=t[11],y=t[15];return p*(+r*c*u-s*h*u-r*a*d+i*h*d+s*a*f-i*c*f)+m*(+e*c*f-e*h*d+r*o*d-s*o*f+s*h*l-r*c*l)+v*(+e*h*u-e*a*f-r*o*u+i*o*f+r*a*l-i*h*l)+y*(-s*a*l-e*c*u+e*a*d+s*o*u-i*o*d+i*c*l)}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,i){const s=this.value;return t instanceof _e?(s[12]=t.x,s[13]=t.y,s[14]=t.z):typeof t=="number"&&typeof e=="number"&&typeof i=="number"&&(s[12]=t,s[13]=e,s[14]=i),this}inverse(){const t=this.value,e=t[0],i=t[1],s=t[2],r=t[3],o=t[4],a=t[5],c=t[6],h=t[7],l=t[8],u=t[9],d=t[10],f=t[11],p=t[12],m=t[13],v=t[14],y=t[15],b=u*v*h-m*d*h+m*c*f-a*v*f-u*c*y+a*d*y,x=p*d*h-l*v*h-p*c*f+o*v*f+l*c*y-o*d*y,w=l*m*h-p*u*h+p*a*f-o*m*f-l*a*y+o*u*y,C=p*u*c-l*m*c-p*a*d+o*m*d+l*a*v-o*u*v,S=e*b+i*x+s*w+r*C;if(S===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const D=1/S;return t[0]=b*D,t[1]=(m*d*r-u*v*r-m*s*f+i*v*f+u*s*y-i*d*y)*D,t[2]=(a*v*r-m*c*r+m*s*h-i*v*h-a*s*y+i*c*y)*D,t[3]=(u*c*r-a*d*r-u*s*h+i*d*h+a*s*f-i*c*f)*D,t[4]=x*D,t[5]=(l*v*r-p*d*r+p*s*f-e*v*f-l*s*y+e*d*y)*D,t[6]=(p*c*r-o*v*r-p*s*h+e*v*h+o*s*y-e*c*y)*D,t[7]=(o*d*r-l*c*r+l*s*h-e*d*h-o*s*f+e*c*f)*D,t[8]=w*D,t[9]=(p*u*r-l*m*r-p*i*f+e*m*f+l*i*y-e*u*y)*D,t[10]=(o*m*r-p*a*r+p*i*h-e*m*h-o*i*y+e*a*y)*D,t[11]=(l*a*r-o*u*r-l*i*h+e*u*h+o*i*f-e*a*f)*D,t[12]=C*D,t[13]=(l*m*s-p*u*s+p*i*d-e*m*d-l*i*v+e*u*v)*D,t[14]=(p*a*s-o*m*s-p*i*c+e*m*c+o*i*v-e*a*v)*D,t[15]=(o*u*s-l*a*s+l*i*c-e*u*c-o*i*d+e*a*d)*D,this}getMaxScaleOnAxis(){const t=this.value,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],s=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,i,s))}makeTranslation(t,e,i){return t instanceof _e?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,i,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),i=Math.sin(t);return this.set(1,0,0,0,0,e,-i,0,0,i,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,0,i,0,0,1,0,0,-i,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const i=Math.cos(e),s=Math.sin(e),r=1-i,o=t.x,a=t.y,c=t.z,h=r*o,l=r*a;return this.set(h*o+i,h*a-s*c,h*c+s*a,0,h*a+s*c,l*a+i,l*c-s*o,0,h*c-s*a,l*c+s*o,r*c*c+i,0,0,0,0,1),this}makeScale(t,e,i){return this.set(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1),this}makeShear(t,e,i,s,r,o){return this.set(1,i,r,0,t,1,o,0,e,s,1,0,0,0,0,1),this}makePerspective(t,e,i,s,r,o,a=Zi){const c=this.value,h=2*r/(e-t),l=2*r/(i-s),u=(e+t)/(e-t),d=(i+s)/(i-s);let f,p;if(a===Zi)f=-(o+r)/(o-r),p=-2*o*r/(o-r);else if(a===$c)f=-o/(o-r),p=-o*r/(o-r);else throw new Error("Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=h,c[4]=0,c[8]=u,c[12]=0,c[1]=0,c[5]=l,c[9]=d,c[13]=0,c[2]=0,c[6]=0,c[10]=f,c[14]=p,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(t,e,i,s,r,o,a=Zi){const c=this.value,h=1/(e-t),l=1/(i-s),u=1/(o-r),d=(e+t)*h,f=(i+s)*l;let p,m;if(a===Zi)p=(o+r)*u,m=-2*u;else if(a===$c)p=r*u,m=-1*u;else throw new Error("Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return c[0]=2*h,c[4]=0,c[8]=0,c[12]=-d,c[1]=0,c[5]=2*l,c[9]=0,c[13]=-f,c[2]=0,c[6]=0,c[10]=m,c[14]=-p,c[3]=0,c[7]=0,c[11]=0,c[15]=1,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,i=0){return this.multiply(new Jt([1,0,0,0,0,1,0,0,0,0,1,0,t,e,i,1]))}scale(t=1,e=1,i=1){return this.multiply(new Jt([t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1]))}scaleVector3(t){const e=this.value,i=t.x,s=t.y,r=t.z;return e[0]*=i,e[4]*=s,e[8]*=r,e[1]*=i,e[5]*=s,e[9]*=r,e[2]*=i,e[6]*=s,e[10]*=r,e[3]*=i,e[7]*=s,e[11]*=r,this}rotateX(t){const e=q(t),i=Math.cos(e),s=Math.sin(e);return this.multiply(new Jt([1,0,0,0,0,i,s,0,0,-s,i,0,0,0,0,1]))}rotateY(t){const e=q(t),i=Math.cos(e),s=Math.sin(e);return this.multiply(new Jt([i,0,-s,0,0,1,0,0,s,0,i,0,0,0,0,1]))}rotateZ(t){this.is3dSpecial=!0;const e=q(t),i=Math.cos(e),s=Math.sin(e);return this.multiply(new Jt([i,s,0,0,-s,i,0,0,0,0,1,0,0,0,0,1]))}skew(t=0,e=0,i=0){return this.multiply(new Jt([1,0,0,q(t),0,1,0,q(e),0,0,1,q(i),0,0,0,1]))}perspective(t){return this.multiply(new Jt([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,i=t.x*this.m12+t.y*this.m22+this.m42,s=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=i+this.m32,c=s+this.m33,h=r+this.m34;r==0&&(r=1e-4),e/=r,i/=r,s/=r,h==0&&(h=1e-4),o/=h,a/=h,c/=h;const l=c-s;if(l==0)return{x:e,y:i,z:s,mass:r};const u=-s/l;return e+=u*(o-e),i+=u*(a-i),{x:e,y:i,z:s,mass:r}}project(t){const e=t.z;let i=t.x*this.m11+t.y*this.m21+e*this.m31+this.m41,s=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),i/=r,s/=r,r<0&&(i-=this.m41,s-=this.m42,i*=1/r,s*=1/r,i+=this.m41,s+=this.m42),{x:i,y:s,z:e,mass:r}}bounds(t,e,i,s){const r=new Lr({x:t,y:e}),o=new Lr({x:t+i,y:e}),a=new Lr({x:t+i,y:e+s}),c=new Lr({x:t,y:e+s});({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:c.x,y:c.y,z:c.z,mass:c.mass}=this.project(c);const h=Math.min(r.x,o.x,a.x,c.x),l=Math.min(r.y,o.y,a.y,c.y),u=Math.max(r.x,o.x,a.x,c.x)-h,d=Math.max(r.y,o.y,a.y,c.y)-l;return{x:h,y:l,width:u,height:d}}}class It{value;_m13=0;_m23=0;_m33=1;matrix4;constructor(t=Md){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 It,i=Ih("number",t);return i.length===6&&i.forEach((s,r)=>{s.fullMatch&&(e.value[r]=parseFloat(s.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 Jt(e)}identity(){return this.value=Array.from(Md),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 It(this.value)}multiply(t){const e=this.clone(),i=t instanceof It?t:new It(t);return this.m11=i.m11*e.m11+i.m12*e.m21+i.m13*e.m31,this.m12=i.m11*e.m12+i.m12*e.m22+i.m13*e.m32,this.m13=i.m11*e.m13+i.m12*e.m23+i.m13*e.m33,this.m21=i.m21*e.m11+i.m22*e.m21+i.m23*e.m31,this.m22=i.m21*e.m12+i.m22*e.m22+i.m23*e.m32,this.m23=i.m21*e.m13+i.m22*e.m23+i.m23*e.m33,this.m31=i.m31*e.m11+i.m32*e.m21+i.m33*e.m31,this.m32=i.m31*e.m12+i.m32*e.m22+i.m33*e.m32,this.m33=i.m31*e.m13+i.m32*e.m23+i.m33*e.m33,this}append(t){return this.multiply(t)}prepend(t){return t.multiply(this),this}inverse(){const t=this.m11,e=this.m12,i=this.m13,s=this.m21,r=this.m22,o=this.m23,a=this.m31,c=this.m32,h=this.m33,l=h*r-o*c,u=-h*s+o*a,d=c*s-r*a;let f=t*l+e*u+i*d;return f?(f=1/f,this.m11=l*f,this.m12=(-h*e+i*c)*f,this.m13=(o*e-i*r)*f,this.m21=u*f,this.m22=(h*t-i*a)*f,this.m23=(-o*t+i*s)*f,this.m31=d*f,this.m32=(-c*t+e*a)*f,this.m33=(r*t-e*s)*f,this):null}adjugate(){const t=new It;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=Tt(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:Tt(Math.atan2(-this.m21,this.m22)),skewY:Tt(Math.atan2(this.m12,this.m11))}}getGroupCoords(t){const e=this.value[0],i=this.value[1],s=this.value[2],r=this.value[3],o=this.value[4],a=this.value[5],c=t.value[0],h=t.value[1],l=t.value[2],u=t.value[3],d=t.value[4],f=t.value[5],p=c*u,m=h*l,v=(l*i-e*u)/(m-p),y=(c*i-e*h)/(p-m),b=(l*r-s*u)/(m-p),x=(c*r-s*h)/(p-m),w=(l*(a-f)+u*(d-o))/(m-p),C=(c*(a-f)+h*(d-o))/(p-m),S=[v,y,b,x,w,C];return new It(S)}toString(t=6){return this.matrix4.is2D()?`matrix(${this.value.map(e=>G(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,i){return this.matrix4.translate(t,e,i),this.matrix4.toMatrix(this),this}translate3dTo(t,e,i){return this.translate3d(t-this.matrix4.m41,e-this.matrix4.m42,i-this.matrix4.m43),this}rotate(t,e=0,i=0){const s=q(t),r=Math.cos(s),o=Math.sin(s);return this.translate(e,i),this.multiply([r,o,-o,r,0,0]),this.translate(-e,-i),this.toMatrix4(),this}rotateTo(t,e=0,i=0){const{degree:s}=this.split();return this.rotate(t-s,e,i),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,i){return this.matrix4.rotateX(t).rotateY(e).rotateZ(i),this.matrix4.toMatrix(this),this}rotate3dTo(t,e,i){const{degreeX:s,degreeY:r,degreeZ:o}=this.matrix4.split();return this.rotate3d(t-s,e-r,i-o),this}scale(t,e=t,i=0,s=0){return this.translate(i,s),this.multiply([t,0,0,e,0,0]),this.translate(-i,-s),this.toMatrix4(),this}scaleTo(t,e=t,i=0,s=0){return this.scale(t/this.m11,e/this.m22,i,s)}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,i=t){return this.matrix4.scale(t,e,i),this.matrix4.toMatrix(this),this}scale3dTo(t,e=t,i=t){const{scalarX:s,scalarY:r,scalarZ:o}=this.matrix4.split();return this.scale3d(t/s,e/r,i/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:i,skewY:s}=this.split();return this.skew(t-i,e-s)}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,i){return this}skew3dTo(t,e,i){return this}perspective(t){return this.matrix4.perspective(t),this.matrix4.toMatrix(this),this}}const pn=new _e,Nr=new _e,ne=new _e,Xc=new _e,jc=new zr;new Jt;function Od(n){const t=new It;return n.replace(/([a-z0-9]+)\s*\(?\s*((-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)*[a-z%]*\s*,?\s*)+)\)?/gi,function(e,i,s){s.indexOf(",")>=0?s=s.split(/\s*,\s*/):s=s.split(/\s+/);const r=[];for(let o=0,a=s.length;o<a;o++)s[o].trim()&&r.push(parseFloat(""+s[o]));switch(i.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 Jt(r)),t.matrix4.toMatrix(t);break}return""}),t}function ge(n,t,e){const i=new It;return i.rotate(Tt(n)),i.transformPoint({x:t,y:e})}function Wc(n){const t=typeof n?.x=="number"?n?.x:0,e=typeof n?.y=="number"?n?.y:0,i=typeof n?.degree=="number"?n?.degree:0,s=typeof n?.scalarX=="number"?n?.scalarX:1,r=typeof n?.scalarY=="number"?n?.scalarY:1,o=q(i),a=Math.cos(o),c=Math.sin(o),h=new DOMMatrix([a*s,c*s,-c*r,a*r,t,e]);return h.multiplySelf(new DOMMatrix(n?.originMatrix||"")),h}function o2(n,t){const e=new Path2D(n),i=new Path2D;return i.addPath(e,Wc(t)),i}const kd={map:new Map,transform:function(n){if(Ug)return n;if(this.map.has(n))return this.map.get(n);const t=new OffscreenCanvas(n.width,n.height);return t.getContext("2d")?.drawImage(n,0,0),this.map.set(n,t),t},clear:function(){this.map.clear()}};function a2(n,t,e){const i=new OffscreenCanvas(n,t),s=i.getContext("2d");if(s)return e(s),i.transferToImageBitmap()}function c2(n,t,e){const i=n.createPattern(kd.transform(t),"no-repeat");if(i){const s=Wc(e);i.setTransform(s),n.fillStyle=i}}const Hc=["","-webkit-","-moz-","-o-","-ms-"];function qc(n,t){const e=t.x||0,i=t.y||0,s=t.z||0;vi(n,"transform",`translate(${e}px, ${i}px) translateZ(${s}px)`)}function h2(n,t){const e=t?.easingFn||N.Linear.None,i=t?.duration||0,s=t?.delay||0,r=Yn(),o=r+i;let a=0,c=0;const h=t.deltaX,l=t.deltaY;function u(){const d=Yn();if(d>=o){qc(n,{x:h-a,y:l-c});return}const f=(d-r)/i,p=e(f),m=h*p,v=l*p;qc(n,{x:m-a,y:v-c}),a=m,c=v,ys(u)}setTimeout(()=>{u()},s)}const l2=typeof HTMLElement=="object"?function(t){return t instanceof HTMLElement}:function(t){return t&&typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string"};function Rd(n){return window.URL.createObjectURL(n)}function u2(n){return window.URL.revokeObjectURL(n)}function Jc(n){let t=!1;function e(){/loaded|complete/.test(document.readyState)&&!t&&(o(),n(),t=!0)}const i=st(document,"DOMContentLoaded",e),s=st(window,"load",e),r=setInterval(e,100),o=()=>{clearInterval(r),i?.(),s?.()};return o}function Ld(n){return st(window,"beforeunload",t=>{n(t)})}async function f2(n,t=6e4){return new Promise((e,i)=>{const s=document.createElement("script");s.type="text/javascript",s.async=!1,s.onload=o=>{clearTimeout(r),e(o),s.onerror=s.onload=null},s.onerror=o=>{clearTimeout(r),i(o)},s.src=n;const r=setTimeout(()=>{i("Timeout!")},t);document.body.appendChild(s)})}function Kc(n,t){const e=document.createElement("a");e.style.visibility="hidden",e.download=t,typeof n=="string"?e.href=n:e.href=window.URL.createObjectURL(n),e.click()}async function d2(n,t=document.getElementsByTagName("head")[0],e=6e4){return new Promise((i,s)=>{const r=document.createElement("link");r.setAttribute("type","text/css"),r.setAttribute("rel","stylesheet"),r.onload=a=>{clearTimeout(o),i(a),r.onerror=r.onload=null},r.onerror=a=>{clearTimeout(o),s(a)},r.setAttribute("href",n);const o=setTimeout(()=>{s("Timeout!")},e);t.appendChild(r)})}function m2(){return new Promise(n=>{const t=Array.from(document.querySelectorAll("link[rel=stylesheet]"));let e=document.styleSheets.length||0;const i=()=>e>=t.length?(n(),!0):!1;i()||t.forEach(s=>{s.onload=()=>{e+=1,i()}})})}const zd=new lo({max:1e3});async function Nd(n,t=6e4){return new Promise((e,i)=>{const s=typeof n=="string"?n:Rd(n),r=zd.get(s);if(r)return e(r);const o=setTimeout(()=>{i("Timeout!")},t),a=document.createElement("img");a.onload=()=>{clearTimeout(o),a.onerror=a.onload=null;const c=a.naturalWidth||a.width,h=a.naturalHeight||a.height,l={width:c,height:h,aspectRatio:c/h,element:a,imageData:Nu(a)};zd.set(s,l),e(l)},a.onerror=c=>{clearTimeout(o),i(c)},a.src=s})}async function Fd(n=ie.text,t=["*"]){const i=(await jo(t))[0],s=await bi(i,n);return{type:i.type,name:i.name,size:i.size,data:s}}async function p2(n=["image/*"]){const e=(await jo(n))[0];if(!e.type.match(/image\/*/))return new Error("Not Image Type!");const i=await bi(e,ie.arraybuffer),s=io(i),r=await Nd(s);return{type:e.type,name:e.name,size:e.size,data:i,width:r.width,height:r.height,aspectRatio:r.aspectRatio,imageData:r.imageData}}function g2(){return window.getSelection()?.toString()||""}function y2(n){document.getElementsByTagName("title")[0].innerText=n,document.title=n}function b2(n=200){"vibrate"in navigator?window.navigator.vibrate(n):console.error("Your device is not support vibrate on this browser.")}async function w2(n){if(navigator.clipboard)return await navigator.clipboard.writeText(n);{const t=document.createElement("textarea");return t.value=n,t.style.opacity="0",t.style.position="fixed",t.style.top="0",t.style.left="0",t.focus(),t.select(),document.execCommand("copy")}}function v2(n=0,t=0){window.scrollTo(n,t)}function x2(){let n=jh,t=jh;return"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual",n=Ld(()=>{window.history.scrollRestoration="auto"}),t=Jc(()=>{window.history.scrollRestoration="manual"})),()=>{n(),t()}}function _2(n){return/(html|body)/i.test(n.tagName)||n===document.documentElement}const S2=n=>n===document.activeElement&&(n.type||n.href);function Zc(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}function C2(n){return n*Zc()}function E2(n){return n.parentElement?parseFloat(getComputedStyle(n.parentElement).fontSize):Zc()}const T2=n=>{let t=n;for(;t&&t.nodeType!==1;){const e=t.parentElement||n.parentNode;if(!e)break;t=e}return t},P2=n=>n.parentElement,Qc=(n,t=[])=>!n||n.parentElement===null&&n.parentNode===null?t:Qc(n.parentElement,t.concat([n]));function A2(n){const t=Qc(n);for(let e=0,i=t.length;e<i;e++)if(/(auto|scroll)/.test(wi(t[e],"overflow")+wi(t[e],"overflow-y")+wi(t[e],"overflow-x")))return t[e];return document.scrollingElement||document.documentElement}const M2=(n,t)=>n.contains?n!=t&&n.contains(t):!!(n.compareDocumentPosition(t)&16),D2=n=>Array.prototype.slice.call(n.parentElement?.children).filter(t=>t!==n),I2=n=>n.nextElementSibling,O2=n=>n.previousElementSibling,k2=(n,t)=>n.closest(t),R2=n=>n.shadowRoot,Qi=n=>n.tagName==="INPUT"||n instanceof HTMLInputElement,th=n=>n.tagName==="SELECT"||n instanceof HTMLSelectElement,L2=n=>n.tagName==="TEXTAREA"||n instanceof HTMLTextAreaElement,eh=n=>Qi(n)&&n.getAttribute("type")==="checkbox",nh=n=>Qi(n)&&n.getAttribute("type")==="radio",z2=n=>Qi(n)&&n.getAttribute("type")==="text",N2=n=>Qi(n)&&n.getAttribute("type")==="number";function F2(n,t){if(th(n)){const e=n.options;for(let i=0,s=e.length;i<s;i++)e[i].selected=e[i].value==t}}function B2(n,t){if(nh(n)){const e=document.getElementsByName(n.name);for(let i=0,s=e.length;i<s;i++){const r=e[i];r.checked=r.value==t}}}function U2(n,t){eh(n)&&(n.checked=t)}function oi(n,t,e="append"){typeof t=="string"?n[e]($d(t)):n[e](t)}function Bd(n,t){if(typeof t=="string"){n.innerHTML=t;const e=Xd(n);e!=n&&(n=e)}else oi(t,"replaceWith")}const Ud=function(n){Bd(n,"")},V2=(n,t)=>{n.textContent=t},Y2=n=>{if(n instanceof SVGElement)return"";let t=n.innerText;if(!t){const e=n.querySelector("slot")?.assignedNodes()||[];let i=0;for(;!t&&i<=e.length-1;)"innerText"in e[i]&&(t=e[i].innerText),i++}return t},$2=n=>n.remove();function G2(n,t){wi(n,"display")=="none"&&t===void 0||t===!0?Vd(n):Yd(n)}function Vd(n){jn(n,"display",n instanceof HTMLTableRowElement?"table-row":n instanceof HTMLTableCellElement?"table-cell":"block")}function Yd(n){jn(n,"display","none")}function ih(n,t,e="toggle"){const i=t.split(/[,\s]+/);if(n.classList)i.forEach(s=>{const r=s.trim();r!==""&&n.classList[e](r)});else{const s=n.className.split(/ +/);let r=!1;i.forEach(o=>{const a=o.trim();if(a!==""){const c=s.indexOf(a);switch(e){case"add":c===-1&&(s.push(a),r=!0);break;case"remove":c!==-1&&(s.splice(c,1),r=!0);break;case"toggle":c===-1?s.push(a):s.splice(c,1),r=!0;break}}}),r&&Sn(n,"class",s.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}}function X2(n,t){ih(n,t,"add")}function j2(n,t){ih(n,t,"remove")}function W2(n,t){return new RegExp("(?:^|\\s+)"+t+"(?:\\s+|$)").test(n.className)}function $d(n,t=!1){const e=document.createElement("template");return e.innerHTML=n,t&&e.content.childNodes.forEach(i=>{const s=Xd(i);s!=i&&e.content.replaceChild(s,i)}),e.content}function Gd(n){return document.createElement.call(document,n)}function H2(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function q2(n){return document.createTextNode.call(document,n)}function Xd(n){return n.tagName=="SCRIPT"&&(n=jd(n)),n.querySelectorAll&&n.querySelectorAll("script").forEach(t=>{t.parentNode?.replaceChild(jd(t),t)}),n}function jd(n){const t=n.ownerDocument.createElement("script");t.text=n.text;const e=n.attributes;for(let i=0,s=e.length;i<s;i++)t.setAttribute(e[i].name,e[i].value);return t}function J2(n,t="http://test.com/localstorage.html"){const e=document.createElement("iframe");e.src=t,document.body.append(e),setTimeout(function(){e.contentWindow?.postMessage(n,t)},4e3),setTimeout(function(){e.remove()},6e3)}function K2(n){const t=new Proxy(window,{get(e,i,s){if(typeof i=="string"&&["open","location","document"].includes(i))throw new Error(`禁止访问 key: ${i}`);return i==="window"?t:Reflect.get(e,i,s)},set(e,i,s,r){return Reflect.set(e,i,s,r)}});new Function("window",`with(window) { ${n} }`)(t,null)}function Z2(n){return n=n.replace(/<%=(.+?)%>/g,"`); \n echo( $1 ); \n echo(`").replace(/<%([\s\S]+?)%>/g,"`); \n $1 \n echo(`"),n="echo(`"+n+"`);",`(function parse(data){
|
|
86
|
+
`);if(e.length<=1)t.fillText(this.text,0,0);else{const i=t.measureText(this.text),r=(i.actualBoundingBoxAscent+i.actualBoundingBoxDescent)*parseFloat(this.getAttr("line-height","1.2em"));let o=0;e.forEach((a,c)=>{a.trim()&&(o+=c>0?r:0,t.fillText(a.trim(),0,o))})}}static measureText(t,e=12,i=400){const s=document.createElement("span");s.style.visibility="hidden",s.style.margin="0",s.style.padding="0",s.style.inset="0",s.style.whiteSpace="nowrap",s.style.overflow="visible",s.style.fontSize=e+"px",s.style.fontWeight=i.toString(),s.innerText=t,document.body.appendChild(s);const r=s.offsetWidth,o=s.offsetHeight;return document.body.removeChild(s),{width:r,height:o}}static getFixedWidthText(t,e,i=12,s=400,r="..."){let o="";if(!t||e<i)return o;const a=t.split("");let c=r?ri.measureText(r,i,s).width:0;for(let h=0,l=a.length;h<l;h++)if(c+=ri.measureText(a[h],i,s).width,c>e){r&&(o+=r);break}else o+=a[h];return o}}class Yc extends qt{options;constructor(t){super(t),this.options=t;const{shapeCreator:e,width:i,height:s,x:r,y:o,particleCount:a,angle:c,spread:h,startVelocity:l,decay:u,gravity:d,drift:f,ticks:p,colors:m,scalar:v,flat:y}=Object.assign({shapeCreator:()=>new dn({rectWidth:10,rectHeight:10}),width:100,height:100,x:.5,y:.6,particleCount:100,angle:90,spread:70,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,colors:Qg,scalar:1,flat:!1},t||{}),b=(S,D)=>{S.x=i*r,S.y=s*o,S.scaleX=v,S.scaleY=v;const L=m[D%m.length];S.setAttr({fill:L}),S.interactive=!1,S.wobble=Math.random()*10,S.wobbleSpeed=Math.min(.11,Math.random()*.1+.05),S.velocity=l*.5+Math.random()*l,S.angle2D=-x+(.5*w-Math.random()*w),S.tiltAngle=(Math.random()*(.75-.25)+.25)*Math.PI,S.tick=0,S.totalTicks=p,S.decay=u,S.drift=f,S.random=Math.random()+2,S.tiltSin=0,S.tiltCos=0,S.wobbleX=0,S.wobbleY=0,S.gravity=d*3,S.scalar=v,S.flat=y,S.color=new ue(L)},x=q(c),w=q(h);let C=a;for(;C;){const S=e();b(S,C),S.clone=(D=>()=>{const L=e();return b(L,D),L})(C),this.addShape(S),C--}}cloneShapeCombo(){return new Yc(this.options)}update(){return this.shapes=this.shapes.filter(t=>{t.x+=Math.cos(t.angle2D)*t.velocity+t.drift,t.y+=Math.sin(t.angle2D)*t.velocity+t.gravity,t.velocity*=t.decay,t.flat?(t.wobble=0,t.wobbleX=t.x+10*t.scalar,t.wobbleY=t.y+10*t.scalar,t.tiltSin=0,t.tiltCos=0,t.random=1):(t.wobble+=t.wobbleSpeed,t.wobbleX=t.x+10*t.scalar*Math.cos(t.wobble),t.wobbleY=t.y+10*t.scalar*Math.sin(t.wobble),t.tiltAngle+=.1,t.tiltSin=Math.sin(t.tiltAngle),t.tiltCos=Math.cos(t.tiltAngle),t.random=Math.random()+2);const e=t.tick++/t.totalTicks,i=t.x+t.random*t.tiltCos,s=t.y+t.random*t.tiltSin,r=t.wobbleX+t.random*t.tiltCos,o=t.wobbleY+t.random*t.tiltSin;return t.setAttr("fill",t.color.setAlpha(1-e).toString()),t.degree=Tt(Math.PI/10*t.wobble),t.scaleX=Math.abs(r-i)*.1,t.scaleY=Math.abs(o-s)*.1,t.tick<t.totalTicks}),this.shapes.length>0}}const o2={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:(n,t)=>{switch(t){case"W":return`${n}周`;default:return`${n}日`}},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:(n,t)=>{const e=n*100+t;return e<600?"凌晨":e<900?"早上":e<1100?"上午":e<1300?"中午":e<1800?"下午":"晚上"}},a2={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:n=>{const t=["th","st","nd","rd"],e=n%100;return`[${n}${t[(e-20)%10]||t[e]||t[0]}]`}},mn=new gg;let Rr="zh-cn";$c(a2),$c(o2);function $c(n,t){if(!n)return mn.get(Rr);let e;if(typeof n=="string"){const i=n.toLowerCase();if(mn.get(i))e=i;else if(t)mn.set(i,t),e=i;else return mn.get(Rr)}else{const{name:i}=n;mn.set(i,n),e=i}return e&&(Rr=e),mn.get(e)||mn.get(Rr)}class c2 extends go{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=[];state;constructor(t){if(super(),this.id=ul(),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 e=this.getAttr("stroke-dasharray","4 4");this.setAttr("stroke-dasharray",e),this.strokeDashTotalLength=Gh(e).reduce((i,s)=>i+s,0)}this.state=nc(this)}forceSetCXY(t,e){this.cX=t,this.cY=e,this.forceCXY=!0}shapeInit(){}initPathD(){if(!this.pathd){if(this.pathd=new Cw,this.state.subscribe(()=>{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(i=>{const s=i.originMatrix?i.originMatrix.clone():new It;s.translate(-t.x+i.x,-t.y+i.y),i.originMatrix=s});const e=this.originMatrix?this.originMatrix.clone():new It;e.translate(-t.x+this.x,-t.y+this.y),this.originMatrix=e}isPointInPath(t,e,i){if(i instanceof xa)return i.isPointInPath(new Path2D(this.toSVGPathD()),t,e);let s;try{s=new SVGPoint(t,e)}catch{s=i.createSVGPoint(),s.x=t,s.y=e}if(this.el instanceof SVGGeometryElement)return this.el.isPointInFill(s);{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,i){if(i instanceof xa)return i.isPointInStroke(new Path2D(this.toSVGPathD()),t,e);let s;try{s=new SVGPoint(t,e)}catch{s=i.createSVGPoint(),s.x=t,s.y=e}return this.el instanceof SVGGeometryElement?this.el.isPointInStroke(s):!1}clone(){return Yp(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(([i,s])=>[Ct(i),s]))):e&&(this.attrs[Ct(t)]=e)}getAttr(t,e){return this.attrs[t]||this.attrs[Ct(t)]||e}getAttrs(){return this.attrs}hasAttr(t){return!!this.attrs[t]||!!this.attrs[Ct(t)]}distance(t){return sn(this.x,this.y,t.x,t.y)}rotateTo(t){this.degree=Tt(Qt(this.x,this.y,t.x,t.y))}followTo(t,e=3){this.rotateTo(t);const{dx:i,dy:s}=rn(q(this.degree),e);this.vx=i,this.vy=s,this.run()}followAccelerationTo(t,e=.05){this.rotateTo(t);const{dx:i,dy:s}=rn(q(this.degree),e);this.ax=i,this.ay=s,this.run()}checkCollision(t){}checkWall(t){}gravitateTo(t){const e=t.x-this.x,i=t.y-this.y,s=e*e+i*i,r=Math.sqrt(s),o=this.mass*t.mass/s,a=o*e/r,c=o*i/r;this.vx+=a/this.mass,this.vy+=c/this.mass,t.vx-=a/t.mass,t.vy-=c/t.mass}run(t){this.vx+=this.ax,this.vy+=this.ay;const e=se(t?.gravity,0);this.vy+=e;const i=se(t?.friction,1);this.vx*=i,this.vy*=i,this.x+=this.vx,this.y+=this.vy}runEaseTo(t,e){const i=se(e?.easing,.05),s=t.x-this.cX-this.x,r=t.y-this.cY-this.y;this.vx=s*i,this.vy=r*i,this.run(e)}runSpringTo(t,e){const i=se(e?.spring,.03);(Array.isArray(t)?t:[t]).forEach(s=>{const r=s.x-this.cX-this.x,o=s.y-this.cY-this.y,a=r*i,c=o*i;this.vx+=a,this.vy+=c}),this.run({friction:.9,...e})}springMassTo(t,e){const i=se(e?.springLength,100),s=se(e?.spring,1e-4),r=t.x-this.x,o=t.y-this.y,a=Math.sqrt(r*r+o*o);if(a<i){const c=r*s,h=o*s;return this.vx+=c/this.mass,this.vy+=h/this.mass,t.vx-=c/t.mass,t.vy-=h/t.mass,1-a/i}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 i=this.getTotalLength();return t.originD=this.initPathD().getSubpath(0,e*i),this.getPointAtLength(e*i)}strokeDashTween(t=1e3,e){const i=this.initPathD(),s=G(i.getTotalLength(),0);this.setAttr({strokeDasharray:`${s} ${s}`,strokeDashoffset:`${s}`});const r=e?.onUpdate,o=new ki({frameDuration:t});o.addTween({offset:s},{offset:0},Object.assign(e||{},{onUpdate:(a,c)=>{this.setAttr("strokeDashoffset",""+G(a.offset,2)),r?.(a,c)}})),o.play()}}class h2 extends c2{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,i){this.cX=t,this.cY=e,this.cZ=i}rotateX(t){({x:this.y,y:this.z}=ge(q(t),this.y,this.z))}rotateY(t){({x:this.x,y:this.z}=ge(q(t),this.x,this.z))}rotateZ(t){({x:this.x,y:this.y}=ge(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 Kn(this.x,this.y,this.z)}distance(t){const e=t.x-this.x,i=t.y-this.y,s=t.z-this.z;return Math.sqrt(e*e+i*i+s*s)}scalar(t){return this.x*=t,this.y*=t,this.z*=t,this}normalize(t=1){const e=this.length();if(e){const i=t/e;this.scalar(i)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,i=this.y,s=this.z;return{x:i*t.z-s*t.y,y:s*t.x-e*t.z,z:e*t.y-i*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 Lr=h2,Zi=2e3,Gc=2001,Dd=[1,0,0,1],Id=[1,0,0,1,0,0],Od=[1,0,0,0,1,0,0,0,1],kd=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];class Xc{value;constructor(t=Dd){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,i=0,s=1){return this.m11=t,this.m21=e,this.m12=i,this.m22=s,this}identity(){return this.value=Array.from(Dd),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 Xc(this.value)}fromArray(t,e=0){for(let i=0;i<4;i++)this.value[i]=t[i+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 i=t.value,s=e.value,r=this.value,o=i[0],a=i[2],c=i[1],h=i[3],l=s[0],u=s[2],d=s[1],f=s[3];return r[0]=o*l+a*d,r[2]=o*u+a*f,r[1]=c*l+h*d,r[3]=c*u+h*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 zr{value;constructor(t=Od){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,i=0,s=0,r=1,o=0,a=0,c=0,h=1){const l=this.value;return l[0]=t,l[1]=s,l[2]=a,l[3]=e,l[4]=r,l[5]=c,l[6]=i,l[7]=o,l[8]=h,this}identity(){return this.value=Array.from(Od),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 zr(this.value)}fromArray(t,e=0){for(let i=0;i<9;i++)this.value[i]=t[i+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,i){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),i.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 i=t.value,s=e.value,r=this.value,o=i[0],a=i[3],c=i[6],h=i[1],l=i[4],u=i[7],d=i[2],f=i[5],p=i[8],m=s[0],v=s[3],y=s[6],b=s[1],x=s[4],w=s[7],C=s[2],S=s[5],D=s[8];return r[0]=o*m+a*b+c*C,r[3]=o*v+a*x+c*S,r[6]=o*y+a*w+c*D,r[1]=h*m+l*b+u*C,r[4]=h*v+l*x+u*S,r[7]=h*y+l*w+u*D,r[2]=d*m+f*b+p*C,r[5]=d*v+f*x+p*S,r[8]=d*y+f*w+p*D,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],i=t[1],s=t[2],r=t[3],o=t[4],a=t[5],c=t[6],h=t[7],l=t[8];return e*o*l-e*a*h-i*r*l+i*a*c+s*r*h-s*o*c}inverse(){const t=this.value,e=t[0],i=t[1],s=t[2],r=t[3],o=t[4],a=t[5],c=t[6],h=t[7],l=t[8],u=l*o-a*h,d=a*c-l*r,f=h*r-o*c,p=e*u+i*d+s*f;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);const m=1/p;return t[0]=u*m,t[1]=(s*h-l*i)*m,t[2]=(a*i-s*o)*m,t[3]=d*m,t[4]=(l*e-s*c)*m,t[5]=(s*r-a*e)*m,t[6]=f*m,t[7]=(i*c-h*e)*m,t[8]=(o*e-i*r)*m,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).inverse().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,i,s,r,o,a){const c=Math.cos(r),h=Math.sin(r);return this.set(i*c,i*h,-i*(c*o+h*a)+o+t,-s*h,s*c,-s*(-h*o+c*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(Wc.makeScale(t,e)),this}rotate(t){return this.premultiply(Wc.makeRotation(-t)),this}translate(t,e){return this.premultiply(Wc.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),i=Math.sin(t);return this.set(e,-i,0,i,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 Jt{value;is3dSpecial=!1;constructor(t=kd){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,i=0,s=0,r=0,o=1,a=0,c=0,h=0,l=0,u=1,d=0,f=0,p=0,m=0,v=1){const y=this.value;return y[0]=t,y[4]=e,y[8]=i,y[12]=s,y[1]=r,y[5]=o,y[9]=a,y[13]=c,y[2]=h,y[6]=l,y[10]=u,y[14]=d,y[3]=f,y[7]=p,y[11]=m,y[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(kd),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 Jt(this.value)}static fromString(t){const e=new Jt,i=kh("number",t);return i.length===16&&i.forEach((s,r)=>{s.fullMatch&&(e.value[r]=parseFloat(s.fullMatch))}),e}fromArray(t,e=0){for(let i=0;i<16;i++)this.value[i]=t[i+e];return this}toArray(t=[],e=0){const i=this.value;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t[e+9]=i[9],t[e+10]=i[10],t[e+11]=i[11],t[e+12]=i[12],t[e+13]=i[13],t[e+14]=i[14],t[e+15]=i[15],t}copyPosition(t){const e=this.value,i=t.value;return e[12]=i[12],e[13]=i[13],e[14]=i[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,i){return t.setFromMatrix4Column(this,0),e.setFromMatrix4Column(this,1),i.setFromMatrix4Column(this,2),this}makeBasis(t,e,i){return this.set(t.x,e.x,i.x,0,t.y,e.y,i.y,0,t.z,e.z,i.z,0,0,0,0,1),this}normalize(){return this.multiplyScalar(1/(this.m44||1e-4))}transformPoint(t){const e=t.z||1,i=t.w||1;return{x:t.x*this.m11+t.y*this.m21+e*this.m31+i*this.m41,y:t.x*this.m12+t.y*this.m22+e*this.m32+i*this.m42,z:t.x*this.m13+t.y*this.m23+e*this.m33+i*this.m43,w:t.x*this.m14+t.y*this.m24+e*this.m34+i*this.m44}}toMatrix(t){const{scalarX:e,scalarY:i,skewX:s,skewY:r,x:o,y:a}=this.split(),c=[e,r,s,i,o,a];return t?(t.value=c,t):new It(c)}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=>G(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),i=Math.sqrt(this.m31*this.m31+this.m32*this.m32+this.m33*this.m33),s=Tt(Y(Math.asin(-this.m13),-1,1));let r=Tt(Math.atan2(this.m23,this.m33));Math.cos(q(s))===0&&(r=Tt(Math.atan2(-this.m31,this.m22)));let o=Tt(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:i,degreeX:r,degreeY:s,degreeZ:o,skewX:Tt(this.m14),skewY:Tt(this.m24),skewZ:Tt(this.m34),skewW:this.m44,perspective:this.m34?-(1/this.m34):0}}extractRotation(t){const e=this.value,i=t.value,s=1/jc.setFromMatrix4Column(t,0).length(),r=1/jc.setFromMatrix4Column(t,1).length(),o=1/jc.setFromMatrix4Column(t,2).length();return e[0]=i[0]*s,e[1]=i[1]*s,e[2]=i[2]*s,e[3]=0,e[4]=i[4]*r,e[5]=i[5]*r,e[6]=i[6]*r,e[7]=0,e[8]=i[8]*o,e[9]=i[9]*o,e[10]=i[10]*o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}lookAt(t,e,i){const s=this.value;return ne.subVectors(t,e),ne.lengthSq()===0&&(ne.z=1),ne.normalize(),pn.crossVectors(i,ne),pn.lengthSq()===0&&(Math.abs(i.z)===1?ne.x+=1e-4:ne.z+=1e-4,ne.normalize(),pn.crossVectors(i,ne)),pn.normalize(),Nr.crossVectors(ne,pn),s[0]=pn.x,s[4]=Nr.x,s[8]=ne.x,s[1]=pn.y,s[5]=Nr.y,s[9]=ne.y,s[2]=pn.z,s[6]=Nr.z,s[10]=ne.z,this}multiplyMatrices(t,e){const i=t.value,s=e.value,r=this.value,o=i[0],a=i[4],c=i[8],h=i[12],l=i[1],u=i[5],d=i[9],f=i[13],p=i[2],m=i[6],v=i[10],y=i[14],b=i[3],x=i[7],w=i[11],C=i[15],S=s[0],D=s[4],L=s[8],I=s[12],F=s[1],U=s[5],X=s[9],Z=s[13],at=s[2],nt=s[6],rt=s[10],Q=s[14],St=s[3],z=s[7],R=s[11],H=s[15];return r[0]=o*S+a*F+c*at+h*St,r[4]=o*D+a*U+c*nt+h*z,r[8]=o*L+a*X+c*rt+h*R,r[12]=o*I+a*Z+c*Q+h*H,r[1]=l*S+u*F+d*at+f*St,r[5]=l*D+u*U+d*nt+f*z,r[9]=l*L+u*X+d*rt+f*R,r[13]=l*I+u*Z+d*Q+f*H,r[2]=p*S+m*F+v*at+y*St,r[6]=p*D+m*U+v*nt+y*z,r[10]=p*L+m*X+v*rt+y*R,r[14]=p*I+m*Z+v*Q+y*H,r[3]=b*S+x*F+w*at+C*St,r[7]=b*D+x*U+w*nt+C*z,r[11]=b*L+x*X+w*rt+C*R,r[15]=b*I+x*Z+w*Q+C*H,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],i=t[4],s=t[8],r=t[12],o=t[1],a=t[5],c=t[9],h=t[13],l=t[2],u=t[6],d=t[10],f=t[14],p=t[3],m=t[7],v=t[11],y=t[15];return p*(+r*c*u-s*h*u-r*a*d+i*h*d+s*a*f-i*c*f)+m*(+e*c*f-e*h*d+r*o*d-s*o*f+s*h*l-r*c*l)+v*(+e*h*u-e*a*f-r*o*u+i*o*f+r*a*l-i*h*l)+y*(-s*a*l-e*c*u+e*a*d+s*o*u-i*o*d+i*c*l)}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,i){const s=this.value;return t instanceof _e?(s[12]=t.x,s[13]=t.y,s[14]=t.z):typeof t=="number"&&typeof e=="number"&&typeof i=="number"&&(s[12]=t,s[13]=e,s[14]=i),this}inverse(){const t=this.value,e=t[0],i=t[1],s=t[2],r=t[3],o=t[4],a=t[5],c=t[6],h=t[7],l=t[8],u=t[9],d=t[10],f=t[11],p=t[12],m=t[13],v=t[14],y=t[15],b=u*v*h-m*d*h+m*c*f-a*v*f-u*c*y+a*d*y,x=p*d*h-l*v*h-p*c*f+o*v*f+l*c*y-o*d*y,w=l*m*h-p*u*h+p*a*f-o*m*f-l*a*y+o*u*y,C=p*u*c-l*m*c-p*a*d+o*m*d+l*a*v-o*u*v,S=e*b+i*x+s*w+r*C;if(S===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const D=1/S;return t[0]=b*D,t[1]=(m*d*r-u*v*r-m*s*f+i*v*f+u*s*y-i*d*y)*D,t[2]=(a*v*r-m*c*r+m*s*h-i*v*h-a*s*y+i*c*y)*D,t[3]=(u*c*r-a*d*r-u*s*h+i*d*h+a*s*f-i*c*f)*D,t[4]=x*D,t[5]=(l*v*r-p*d*r+p*s*f-e*v*f-l*s*y+e*d*y)*D,t[6]=(p*c*r-o*v*r-p*s*h+e*v*h+o*s*y-e*c*y)*D,t[7]=(o*d*r-l*c*r+l*s*h-e*d*h-o*s*f+e*c*f)*D,t[8]=w*D,t[9]=(p*u*r-l*m*r-p*i*f+e*m*f+l*i*y-e*u*y)*D,t[10]=(o*m*r-p*a*r+p*i*h-e*m*h-o*i*y+e*a*y)*D,t[11]=(l*a*r-o*u*r-l*i*h+e*u*h+o*i*f-e*a*f)*D,t[12]=C*D,t[13]=(l*m*s-p*u*s+p*i*d-e*m*d-l*i*v+e*u*v)*D,t[14]=(p*a*s-o*m*s-p*i*c+e*m*c+o*i*v-e*a*v)*D,t[15]=(o*u*s-l*a*s+l*i*c-e*u*c-o*i*d+e*a*d)*D,this}getMaxScaleOnAxis(){const t=this.value,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],s=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,i,s))}makeTranslation(t,e,i){return t instanceof _e?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,i,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),i=Math.sin(t);return this.set(1,0,0,0,0,e,-i,0,0,i,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,0,i,0,0,1,0,0,-i,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const i=Math.cos(e),s=Math.sin(e),r=1-i,o=t.x,a=t.y,c=t.z,h=r*o,l=r*a;return this.set(h*o+i,h*a-s*c,h*c+s*a,0,h*a+s*c,l*a+i,l*c-s*o,0,h*c-s*a,l*c+s*o,r*c*c+i,0,0,0,0,1),this}makeScale(t,e,i){return this.set(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1),this}makeShear(t,e,i,s,r,o){return this.set(1,i,r,0,t,1,o,0,e,s,1,0,0,0,0,1),this}makePerspective(t,e,i,s,r,o,a=Zi){const c=this.value,h=2*r/(e-t),l=2*r/(i-s),u=(e+t)/(e-t),d=(i+s)/(i-s);let f,p;if(a===Zi)f=-(o+r)/(o-r),p=-2*o*r/(o-r);else if(a===Gc)f=-o/(o-r),p=-o*r/(o-r);else throw new Error("Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=h,c[4]=0,c[8]=u,c[12]=0,c[1]=0,c[5]=l,c[9]=d,c[13]=0,c[2]=0,c[6]=0,c[10]=f,c[14]=p,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(t,e,i,s,r,o,a=Zi){const c=this.value,h=1/(e-t),l=1/(i-s),u=1/(o-r),d=(e+t)*h,f=(i+s)*l;let p,m;if(a===Zi)p=(o+r)*u,m=-2*u;else if(a===Gc)p=r*u,m=-1*u;else throw new Error("Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return c[0]=2*h,c[4]=0,c[8]=0,c[12]=-d,c[1]=0,c[5]=2*l,c[9]=0,c[13]=-f,c[2]=0,c[6]=0,c[10]=m,c[14]=-p,c[3]=0,c[7]=0,c[11]=0,c[15]=1,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,i=0){return this.multiply(new Jt([1,0,0,0,0,1,0,0,0,0,1,0,t,e,i,1]))}scale(t=1,e=1,i=1){return this.multiply(new Jt([t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1]))}scaleVector3(t){const e=this.value,i=t.x,s=t.y,r=t.z;return e[0]*=i,e[4]*=s,e[8]*=r,e[1]*=i,e[5]*=s,e[9]*=r,e[2]*=i,e[6]*=s,e[10]*=r,e[3]*=i,e[7]*=s,e[11]*=r,this}rotateX(t){const e=q(t),i=Math.cos(e),s=Math.sin(e);return this.multiply(new Jt([1,0,0,0,0,i,s,0,0,-s,i,0,0,0,0,1]))}rotateY(t){const e=q(t),i=Math.cos(e),s=Math.sin(e);return this.multiply(new Jt([i,0,-s,0,0,1,0,0,s,0,i,0,0,0,0,1]))}rotateZ(t){this.is3dSpecial=!0;const e=q(t),i=Math.cos(e),s=Math.sin(e);return this.multiply(new Jt([i,s,0,0,-s,i,0,0,0,0,1,0,0,0,0,1]))}skew(t=0,e=0,i=0){return this.multiply(new Jt([1,0,0,q(t),0,1,0,q(e),0,0,1,q(i),0,0,0,1]))}perspective(t){return this.multiply(new Jt([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,i=t.x*this.m12+t.y*this.m22+this.m42,s=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=i+this.m32,c=s+this.m33,h=r+this.m34;r==0&&(r=1e-4),e/=r,i/=r,s/=r,h==0&&(h=1e-4),o/=h,a/=h,c/=h;const l=c-s;if(l==0)return{x:e,y:i,z:s,mass:r};const u=-s/l;return e+=u*(o-e),i+=u*(a-i),{x:e,y:i,z:s,mass:r}}project(t){const e=t.z;let i=t.x*this.m11+t.y*this.m21+e*this.m31+this.m41,s=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),i/=r,s/=r,r<0&&(i-=this.m41,s-=this.m42,i*=1/r,s*=1/r,i+=this.m41,s+=this.m42),{x:i,y:s,z:e,mass:r}}bounds(t,e,i,s){const r=new Lr({x:t,y:e}),o=new Lr({x:t+i,y:e}),a=new Lr({x:t+i,y:e+s}),c=new Lr({x:t,y:e+s});({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:c.x,y:c.y,z:c.z,mass:c.mass}=this.project(c);const h=Math.min(r.x,o.x,a.x,c.x),l=Math.min(r.y,o.y,a.y,c.y),u=Math.max(r.x,o.x,a.x,c.x)-h,d=Math.max(r.y,o.y,a.y,c.y)-l;return{x:h,y:l,width:u,height:d}}}class It{value;_m13=0;_m23=0;_m33=1;matrix4;constructor(t=Id){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 It,i=kh("number",t);return i.length===6&&i.forEach((s,r)=>{s.fullMatch&&(e.value[r]=parseFloat(s.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 Jt(e)}identity(){return this.value=Array.from(Id),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 It(this.value)}multiply(t){const e=this.clone(),i=t instanceof It?t:new It(t);return this.m11=i.m11*e.m11+i.m12*e.m21+i.m13*e.m31,this.m12=i.m11*e.m12+i.m12*e.m22+i.m13*e.m32,this.m13=i.m11*e.m13+i.m12*e.m23+i.m13*e.m33,this.m21=i.m21*e.m11+i.m22*e.m21+i.m23*e.m31,this.m22=i.m21*e.m12+i.m22*e.m22+i.m23*e.m32,this.m23=i.m21*e.m13+i.m22*e.m23+i.m23*e.m33,this.m31=i.m31*e.m11+i.m32*e.m21+i.m33*e.m31,this.m32=i.m31*e.m12+i.m32*e.m22+i.m33*e.m32,this.m33=i.m31*e.m13+i.m32*e.m23+i.m33*e.m33,this}append(t){return this.multiply(t)}prepend(t){return t.multiply(this),this}inverse(){const t=this.m11,e=this.m12,i=this.m13,s=this.m21,r=this.m22,o=this.m23,a=this.m31,c=this.m32,h=this.m33,l=h*r-o*c,u=-h*s+o*a,d=c*s-r*a;let f=t*l+e*u+i*d;return f?(f=1/f,this.m11=l*f,this.m12=(-h*e+i*c)*f,this.m13=(o*e-i*r)*f,this.m21=u*f,this.m22=(h*t-i*a)*f,this.m23=(-o*t+i*s)*f,this.m31=d*f,this.m32=(-c*t+e*a)*f,this.m33=(r*t-e*s)*f,this):null}adjugate(){const t=new It;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=Tt(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:Tt(Math.atan2(-this.m21,this.m22)),skewY:Tt(Math.atan2(this.m12,this.m11))}}getGroupCoords(t){const e=this.value[0],i=this.value[1],s=this.value[2],r=this.value[3],o=this.value[4],a=this.value[5],c=t.value[0],h=t.value[1],l=t.value[2],u=t.value[3],d=t.value[4],f=t.value[5],p=c*u,m=h*l,v=(l*i-e*u)/(m-p),y=(c*i-e*h)/(p-m),b=(l*r-s*u)/(m-p),x=(c*r-s*h)/(p-m),w=(l*(a-f)+u*(d-o))/(m-p),C=(c*(a-f)+h*(d-o))/(p-m),S=[v,y,b,x,w,C];return new It(S)}toString(t=6){return this.matrix4.is2D()?`matrix(${this.value.map(e=>G(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,i){return this.matrix4.translate(t,e,i),this.matrix4.toMatrix(this),this}translate3dTo(t,e,i){return this.translate3d(t-this.matrix4.m41,e-this.matrix4.m42,i-this.matrix4.m43),this}rotate(t,e=0,i=0){const s=q(t),r=Math.cos(s),o=Math.sin(s);return this.translate(e,i),this.multiply([r,o,-o,r,0,0]),this.translate(-e,-i),this.toMatrix4(),this}rotateTo(t,e=0,i=0){const{degree:s}=this.split();return this.rotate(t-s,e,i),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,i){return this.matrix4.rotateX(t).rotateY(e).rotateZ(i),this.matrix4.toMatrix(this),this}rotate3dTo(t,e,i){const{degreeX:s,degreeY:r,degreeZ:o}=this.matrix4.split();return this.rotate3d(t-s,e-r,i-o),this}scale(t,e=t,i=0,s=0){return this.translate(i,s),this.multiply([t,0,0,e,0,0]),this.translate(-i,-s),this.toMatrix4(),this}scaleTo(t,e=t,i=0,s=0){return this.scale(t/this.m11,e/this.m22,i,s)}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,i=t){return this.matrix4.scale(t,e,i),this.matrix4.toMatrix(this),this}scale3dTo(t,e=t,i=t){const{scalarX:s,scalarY:r,scalarZ:o}=this.matrix4.split();return this.scale3d(t/s,e/r,i/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:i,skewY:s}=this.split();return this.skew(t-i,e-s)}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,i){return this}skew3dTo(t,e,i){return this}perspective(t){return this.matrix4.perspective(t),this.matrix4.toMatrix(this),this}}const pn=new _e,Nr=new _e,ne=new _e,jc=new _e,Wc=new zr;new Jt;function Rd(n){const t=new It;return n.replace(/([a-z0-9]+)\s*\(?\s*((-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)*[a-z%]*\s*,?\s*)+)\)?/gi,function(e,i,s){s.indexOf(",")>=0?s=s.split(/\s*,\s*/):s=s.split(/\s+/);const r=[];for(let o=0,a=s.length;o<a;o++)s[o].trim()&&r.push(parseFloat(""+s[o]));switch(i.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 Jt(r)),t.matrix4.toMatrix(t);break}return""}),t}function ge(n,t,e){const i=new It;return i.rotate(Tt(n)),i.transformPoint({x:t,y:e})}function Hc(n){const t=typeof n?.x=="number"?n?.x:0,e=typeof n?.y=="number"?n?.y:0,i=typeof n?.degree=="number"?n?.degree:0,s=typeof n?.scalarX=="number"?n?.scalarX:1,r=typeof n?.scalarY=="number"?n?.scalarY:1,o=q(i),a=Math.cos(o),c=Math.sin(o),h=new DOMMatrix([a*s,c*s,-c*r,a*r,t,e]);return h.multiplySelf(new DOMMatrix(n?.originMatrix||"")),h}function l2(n,t){const e=new Path2D(n),i=new Path2D;return i.addPath(e,Hc(t)),i}const Ld={map:new Map,transform:function(n){if(Gg)return n;if(this.map.has(n))return this.map.get(n);const t=new OffscreenCanvas(n.width,n.height);return t.getContext("2d")?.drawImage(n,0,0),this.map.set(n,t),t},clear:function(){this.map.clear()}};function u2(n,t,e){const i=new OffscreenCanvas(n,t),s=i.getContext("2d");if(s)return e(s),i.transferToImageBitmap()}function f2(n,t,e){const i=n.createPattern(Ld.transform(t),"no-repeat");if(i){const s=Hc(e);i.setTransform(s),n.fillStyle=i}}const qc=["","-webkit-","-moz-","-o-","-ms-"];function Jc(n,t){const e=t.x||0,i=t.y||0,s=t.z||0;vi(n,"transform",`translate(${e}px, ${i}px) translateZ(${s}px)`)}function d2(n,t){const e=t?.easingFn||N.Linear.None,i=t?.duration||0,s=t?.delay||0,r=Yn(),o=r+i;let a=0,c=0;const h=t.deltaX,l=t.deltaY;function u(){const d=Yn();if(d>=o){Jc(n,{x:h-a,y:l-c});return}const f=(d-r)/i,p=e(f),m=h*p,v=l*p;Jc(n,{x:m-a,y:v-c}),a=m,c=v,ys(u)}setTimeout(()=>{u()},s)}const m2=typeof HTMLElement=="object"?function(t){return t instanceof HTMLElement}:function(t){return t&&typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string"};function zd(n){return window.URL.createObjectURL(n)}function p2(n){return window.URL.revokeObjectURL(n)}function Kc(n){let t=!1;function e(){/loaded|complete/.test(document.readyState)&&!t&&(o(),n(),t=!0)}const i=st(document,"DOMContentLoaded",e),s=st(window,"load",e),r=setInterval(e,100),o=()=>{clearInterval(r),i?.(),s?.()};return o}function Nd(n){return st(window,"beforeunload",t=>{n(t)})}async function g2(n,t=6e4){return new Promise((e,i)=>{const s=document.createElement("script");s.type="text/javascript",s.async=!1,s.onload=o=>{clearTimeout(r),e(o),s.onerror=s.onload=null},s.onerror=o=>{clearTimeout(r),i(o)},s.src=n;const r=setTimeout(()=>{i("Timeout!")},t);document.body.appendChild(s)})}function Zc(n,t){const e=document.createElement("a");e.style.visibility="hidden",e.download=t,typeof n=="string"?e.href=n:e.href=window.URL.createObjectURL(n),e.click()}async function y2(n,t=document.getElementsByTagName("head")[0],e=6e4){return new Promise((i,s)=>{const r=document.createElement("link");r.setAttribute("type","text/css"),r.setAttribute("rel","stylesheet"),r.onload=a=>{clearTimeout(o),i(a),r.onerror=r.onload=null},r.onerror=a=>{clearTimeout(o),s(a)},r.setAttribute("href",n);const o=setTimeout(()=>{s("Timeout!")},e);t.appendChild(r)})}function b2(){return new Promise(n=>{const t=Array.from(document.querySelectorAll("link[rel=stylesheet]"));let e=document.styleSheets.length||0;const i=()=>e>=t.length?(n(),!0):!1;i()||t.forEach(s=>{s.onload=()=>{e+=1,i()}})})}const Fd=new uo({max:1e3});async function Bd(n,t=6e4){return new Promise((e,i)=>{const s=typeof n=="string"?n:zd(n),r=Fd.get(s);if(r)return e(r);const o=setTimeout(()=>{i("Timeout!")},t),a=document.createElement("img");a.onload=()=>{clearTimeout(o),a.onerror=a.onload=null;const c=a.naturalWidth||a.width,h=a.naturalHeight||a.height,l={width:c,height:h,aspectRatio:c/h,element:a,imageData:Bu(a)};Fd.set(s,l),e(l)},a.onerror=c=>{clearTimeout(o),i(c)},a.src=s})}async function Ud(n=ie.text,t=["*"]){const i=(await Wo(t))[0],s=await bi(i,n);return{type:i.type,name:i.name,size:i.size,data:s}}async function w2(n=["image/*"]){const e=(await Wo(n))[0];if(!e.type.match(/image\/*/))return new Error("Not Image Type!");const i=await bi(e,ie.arraybuffer),s=so(i),r=await Bd(s);return{type:e.type,name:e.name,size:e.size,data:i,width:r.width,height:r.height,aspectRatio:r.aspectRatio,imageData:r.imageData}}function v2(){return window.getSelection()?.toString()||""}function x2(n){document.getElementsByTagName("title")[0].innerText=n,document.title=n}function _2(n=200){"vibrate"in navigator?window.navigator.vibrate(n):console.error("Your device is not support vibrate on this browser.")}async function S2(n){if(navigator.clipboard)return await navigator.clipboard.writeText(n);{const t=document.createElement("textarea");return t.value=n,t.style.opacity="0",t.style.position="fixed",t.style.top="0",t.style.left="0",t.focus(),t.select(),document.execCommand("copy")}}function C2(n=0,t=0){window.scrollTo(n,t)}function E2(){let n=Hh,t=Hh;return"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual",n=Nd(()=>{window.history.scrollRestoration="auto"}),t=Kc(()=>{window.history.scrollRestoration="manual"})),()=>{n(),t()}}function T2(n){return/(html|body)/i.test(n.tagName)||n===document.documentElement}const P2=n=>n===document.activeElement&&(n.type||n.href);function Qc(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}function A2(n){return n*Qc()}function M2(n){return n.parentElement?parseFloat(getComputedStyle(n.parentElement).fontSize):Qc()}const D2=n=>{let t=n;for(;t&&t.nodeType!==1;){const e=t.parentElement||n.parentNode;if(!e)break;t=e}return t},I2=n=>n.parentElement,th=(n,t=[])=>!n||n.parentElement===null&&n.parentNode===null?t:th(n.parentElement,t.concat([n]));function O2(n){const t=th(n);for(let e=0,i=t.length;e<i;e++)if(/(auto|scroll)/.test(wi(t[e],"overflow")+wi(t[e],"overflow-y")+wi(t[e],"overflow-x")))return t[e];return document.scrollingElement||document.documentElement}const k2=(n,t)=>n.contains?n!=t&&n.contains(t):!!(n.compareDocumentPosition(t)&16),R2=n=>Array.prototype.slice.call(n.parentElement?.children).filter(t=>t!==n),L2=n=>n.nextElementSibling,z2=n=>n.previousElementSibling,N2=(n,t)=>n.closest(t),F2=n=>n.shadowRoot,Qi=n=>n.tagName==="INPUT"||n instanceof HTMLInputElement,eh=n=>n.tagName==="SELECT"||n instanceof HTMLSelectElement,B2=n=>n.tagName==="TEXTAREA"||n instanceof HTMLTextAreaElement,nh=n=>Qi(n)&&n.getAttribute("type")==="checkbox",ih=n=>Qi(n)&&n.getAttribute("type")==="radio",U2=n=>Qi(n)&&n.getAttribute("type")==="text",V2=n=>Qi(n)&&n.getAttribute("type")==="number";function Y2(n,t){if(eh(n)){const e=n.options;for(let i=0,s=e.length;i<s;i++)e[i].selected=e[i].value==t}}function $2(n,t){if(ih(n)){const e=document.getElementsByName(n.name);for(let i=0,s=e.length;i<s;i++){const r=e[i];r.checked=r.value==t}}}function G2(n,t){nh(n)&&(n.checked=t)}function oi(n,t,e="append"){typeof t=="string"?n[e](Xd(t)):n[e](t)}function Vd(n,t){if(typeof t=="string"){n.innerHTML=t;const e=Wd(n);e!=n&&(n=e)}else oi(t,"replaceWith")}const Yd=function(n){Vd(n,"")},X2=(n,t)=>{n.textContent=t},j2=n=>{if(n instanceof SVGElement)return"";let t=n.innerText;if(!t){const e=n.querySelector("slot")?.assignedNodes()||[];let i=0;for(;!t&&i<=e.length-1;)"innerText"in e[i]&&(t=e[i].innerText),i++}return t},W2=n=>n.remove();function H2(n,t){wi(n,"display")=="none"&&t===void 0||t===!0?$d(n):Gd(n)}function $d(n){jn(n,"display",n instanceof HTMLTableRowElement?"table-row":n instanceof HTMLTableCellElement?"table-cell":"block")}function Gd(n){jn(n,"display","none")}function sh(n,t,e="toggle"){const i=t.split(/[,\s]+/);if(n.classList)i.forEach(s=>{const r=s.trim();r!==""&&n.classList[e](r)});else{const s=n.className.split(/ +/);let r=!1;i.forEach(o=>{const a=o.trim();if(a!==""){const c=s.indexOf(a);switch(e){case"add":c===-1&&(s.push(a),r=!0);break;case"remove":c!==-1&&(s.splice(c,1),r=!0);break;case"toggle":c===-1?s.push(a):s.splice(c,1),r=!0;break}}}),r&&Sn(n,"class",s.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}}function q2(n,t){sh(n,t,"add")}function J2(n,t){sh(n,t,"remove")}function K2(n,t){return new RegExp("(?:^|\\s+)"+t+"(?:\\s+|$)").test(n.className)}function Xd(n,t=!1){const e=document.createElement("template");return e.innerHTML=n,t&&e.content.childNodes.forEach(i=>{const s=Wd(i);s!=i&&e.content.replaceChild(s,i)}),e.content}function jd(n){return document.createElement.call(document,n)}function Z2(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function Q2(n){return document.createTextNode.call(document,n)}function Wd(n){return n.tagName=="SCRIPT"&&(n=Hd(n)),n.querySelectorAll&&n.querySelectorAll("script").forEach(t=>{t.parentNode?.replaceChild(Hd(t),t)}),n}function Hd(n){const t=n.ownerDocument.createElement("script");t.text=n.text;const e=n.attributes;for(let i=0,s=e.length;i<s;i++)t.setAttribute(e[i].name,e[i].value);return t}function t_(n,t="http://test.com/localstorage.html"){const e=document.createElement("iframe");e.src=t,document.body.append(e),setTimeout(function(){e.contentWindow?.postMessage(n,t)},4e3),setTimeout(function(){e.remove()},6e3)}function e_(n){const t=new Proxy(window,{get(e,i,s){if(typeof i=="string"&&["open","location","document"].includes(i))throw new Error(`禁止访问 key: ${i}`);return i==="window"?t:Reflect.get(e,i,s)},set(e,i,s,r){return Reflect.set(e,i,s,r)}});new Function("window",`with(window) { ${n} }`)(t,null)}function n_(n){return n=n.replace(/<%=(.+?)%>/g,"`); \n echo( $1 ); \n echo(`").replace(/<%([\s\S]+?)%>/g,"`); \n $1 \n echo(`"),n="echo(`"+n+"`);",`(function parse(data){
|
|
87
87
|
let output = "";
|
|
88
88
|
function echo(html){
|
|
89
89
|
output += html;
|
|
90
90
|
}
|
|
91
91
|
${n}
|
|
92
92
|
return output;
|
|
93
|
-
})`}class ts{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"),i=document.createElement("video"),s=document.createElement("source"),r=new MediaSource;r.addEventListener("sourceopen",()=>t(!0)),s.src=URL.createObjectURL(r),s.media="(min-width:10px)",i.append(s),e.width="5",e.style.cssText="position: absolute; visibility: hidden;",document.documentElement.append(e),e.contentDocument?.body.append(i),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(()=>{ts.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)}}var Wd={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
94
|
-
* http://hammerjs.github.io/
|
|
95
|
-
*
|
|
96
|
-
* Copyright (c) 2016 Jorik Tangelder;
|
|
97
|
-
* Licensed under the MIT license */(function(n){(function(t,e,i,s){var r=["","webkit","Moz","MS","ms","o"],o=e.createElement("div"),a="function",c=Math.round,h=Math.abs,l=Date.now;function u(_,E,P){return setTimeout(x(_,P),E)}function d(_,E,P){return Array.isArray(_)?(f(_,P[E],P),!0):!1}function f(_,E,P){var A;if(_)if(_.forEach)_.forEach(E,P);else if(_.length!==s)for(A=0;A<_.length;)E.call(P,_[A],A,_),A++;else for(A in _)_.hasOwnProperty(A)&&E.call(P,_[A],A,_)}function p(_,E,P){var A="DEPRECATED METHOD: "+E+`
|
|
98
|
-
`+P+` AT
|
|
99
|
-
`;return function(){var k=new Error("get-stack-trace"),B=k&&k.stack?k.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",J=t.console&&(t.console.warn||t.console.log);return J&&J.call(t.console,A,B),_.apply(this,arguments)}}var m;typeof Object.assign!="function"?m=function(E){if(E===s||E===null)throw new TypeError("Cannot convert undefined or null to object");for(var P=Object(E),A=1;A<arguments.length;A++){var k=arguments[A];if(k!==s&&k!==null)for(var B in k)k.hasOwnProperty(B)&&(P[B]=k[B])}return P}:m=Object.assign;var v=p(function(E,P,A){for(var k=Object.keys(P),B=0;B<k.length;)(!A||A&&E[k[B]]===s)&&(E[k[B]]=P[k[B]]),B++;return E},"extend","Use `assign`."),y=p(function(E,P){return v(E,P,!0)},"merge","Use `assign`.");function b(_,E,P){var A=E.prototype,k;k=_.prototype=Object.create(A),k.constructor=_,k._super=A,P&&m(k,P)}function x(_,E){return function(){return _.apply(E,arguments)}}function w(_,E){return typeof _==a?_.apply(E&&E[0]||s,E):_}function C(_,E){return _===s?E:_}function S(_,E,P){f(F(E),function(A){_.addEventListener(A,P,!1)})}function D(_,E,P){f(F(E),function(A){_.removeEventListener(A,P,!1)})}function L(_,E){for(;_;){if(_==E)return!0;_=_.parentNode}return!1}function I(_,E){return _.indexOf(E)>-1}function F(_){return _.trim().split(/\s+/g)}function U(_,E,P){if(_.indexOf&&!P)return _.indexOf(E);for(var A=0;A<_.length;){if(P&&_[A][P]==E||!P&&_[A]===E)return A;A++}return-1}function X(_){return Array.prototype.slice.call(_,0)}function Z(_,E,P){for(var A=[],k=[],B=0;B<_.length;){var J=E?_[B][E]:_[B];U(k,J)<0&&A.push(_[B]),k[B]=J,B++}return P&&(E?A=A.sort(function(Ot,jt){return Ot[E]>jt[E]}):A=A.sort()),A}function at(_,E){for(var P,A,k=E[0].toUpperCase()+E.slice(1),B=0;B<r.length;){if(P=r[B],A=P?P+k:E,A in _)return A;B++}return s}var nt=1;function rt(){return nt++}function Q(_){var E=_.ownerDocument||_;return E.defaultView||E.parentWindow||t}var St=/mobile|tablet|ip(ad|hone|od)|android/i,z="ontouchstart"in t,R=at(t,"PointerEvent")!==s,H=z&&St.test(navigator.userAgent),ot="touch",Xt="pen",ye="mouse",Gr="kinect",Xr=25,Pt=1,Ee=2,pt=4,Nt=8,ci=1,zn=2,Nn=4,gn=8,O=16,yt=zn|Nn,Fn=gn|O,Ym=yt|Fn,$m=["x","y"],jr=["clientX","clientY"];function he(_,E){var P=this;this.manager=_,this.callback=E,this.element=_.element,this.target=_.options.inputTarget,this.domHandler=function(A){w(_.options.enable,[_])&&P.handler(A)},this.init()}he.prototype={handler:function(){},init:function(){this.evEl&&S(this.element,this.evEl,this.domHandler),this.evTarget&&S(this.target,this.evTarget,this.domHandler),this.evWin&&S(Q(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&D(this.element,this.evEl,this.domHandler),this.evTarget&&D(this.target,this.evTarget,this.domHandler),this.evWin&&D(Q(this.element),this.evWin,this.domHandler)}};function SC(_){var E,P=_.options.inputClass;return P?E=P:R?E=bh:H?E=qr:z?E=wh:E=Hr,new E(_,CC)}function CC(_,E,P){var A=P.pointers.length,k=P.changedPointers.length,B=E&Pt&&A-k===0,J=E&(pt|Nt)&&A-k===0;P.isFirst=!!B,P.isFinal=!!J,B&&(_.session={}),P.eventType=E,EC(_,P),_.emit("hammer.input",P),_.recognize(P),_.session.prevInput=P}function EC(_,E){var P=_.session,A=E.pointers,k=A.length;P.firstInput||(P.firstInput=Gm(E)),k>1&&!P.firstMultiple?P.firstMultiple=Gm(E):k===1&&(P.firstMultiple=!1);var B=P.firstInput,J=P.firstMultiple,At=J?J.center:B.center,Ot=E.center=Xm(A);E.timeStamp=l(),E.deltaTime=E.timeStamp-B.timeStamp,E.angle=yh(At,Ot),E.distance=Wr(At,Ot),TC(P,E),E.offsetDirection=Wm(E.deltaX,E.deltaY);var jt=jm(E.deltaTime,E.deltaX,E.deltaY);E.overallVelocityX=jt.x,E.overallVelocityY=jt.y,E.overallVelocity=h(jt.x)>h(jt.y)?jt.x:jt.y,E.scale=J?MC(J.pointers,A):1,E.rotation=J?AC(J.pointers,A):0,E.maxPointers=P.prevInput?E.pointers.length>P.prevInput.maxPointers?E.pointers.length:P.prevInput.maxPointers:E.pointers.length,PC(P,E);var Pe=_.element;L(E.srcEvent.target,Pe)&&(Pe=E.srcEvent.target),E.target=Pe}function TC(_,E){var P=E.center,A=_.offsetDelta||{},k=_.prevDelta||{},B=_.prevInput||{};(E.eventType===Pt||B.eventType===pt)&&(k=_.prevDelta={x:B.deltaX||0,y:B.deltaY||0},A=_.offsetDelta={x:P.x,y:P.y}),E.deltaX=k.x+(P.x-A.x),E.deltaY=k.y+(P.y-A.y)}function PC(_,E){var P=_.lastInterval||E,A=E.timeStamp-P.timeStamp,k,B,J,At;if(E.eventType!=Nt&&(A>Xr||P.velocity===s)){var Ot=E.deltaX-P.deltaX,jt=E.deltaY-P.deltaY,Pe=jm(A,Ot,jt);B=Pe.x,J=Pe.y,k=h(Pe.x)>h(Pe.y)?Pe.x:Pe.y,At=Wm(Ot,jt),_.lastInterval=E}else k=P.velocity,B=P.velocityX,J=P.velocityY,At=P.direction;E.velocity=k,E.velocityX=B,E.velocityY=J,E.direction=At}function Gm(_){for(var E=[],P=0;P<_.pointers.length;)E[P]={clientX:c(_.pointers[P].clientX),clientY:c(_.pointers[P].clientY)},P++;return{timeStamp:l(),pointers:E,center:Xm(E),deltaX:_.deltaX,deltaY:_.deltaY}}function Xm(_){var E=_.length;if(E===1)return{x:c(_[0].clientX),y:c(_[0].clientY)};for(var P=0,A=0,k=0;k<E;)P+=_[k].clientX,A+=_[k].clientY,k++;return{x:c(P/E),y:c(A/E)}}function jm(_,E,P){return{x:E/_||0,y:P/_||0}}function Wm(_,E){return _===E?ci:h(_)>=h(E)?_<0?zn:Nn:E<0?gn:O}function Wr(_,E,P){P||(P=$m);var A=E[P[0]]-_[P[0]],k=E[P[1]]-_[P[1]];return Math.sqrt(A*A+k*k)}function yh(_,E,P){P||(P=$m);var A=E[P[0]]-_[P[0]],k=E[P[1]]-_[P[1]];return Math.atan2(k,A)*180/Math.PI}function AC(_,E){return yh(E[1],E[0],jr)+yh(_[1],_[0],jr)}function MC(_,E){return Wr(E[0],E[1],jr)/Wr(_[0],_[1],jr)}var DC={mousedown:Pt,mousemove:Ee,mouseup:pt},IC="mousedown",OC="mousemove mouseup";function Hr(){this.evEl=IC,this.evWin=OC,this.pressed=!1,he.apply(this,arguments)}b(Hr,he,{handler:function(E){var P=DC[E.type];P&Pt&&E.button===0&&(this.pressed=!0),P&Ee&&E.which!==1&&(P=pt),this.pressed&&(P&pt&&(this.pressed=!1),this.callback(this.manager,P,{pointers:[E],changedPointers:[E],pointerType:ye,srcEvent:E}))}});var kC={pointerdown:Pt,pointermove:Ee,pointerup:pt,pointercancel:Nt,pointerout:Nt},RC={2:ot,3:Xt,4:ye,5:Gr},Hm="pointerdown",qm="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(Hm="MSPointerDown",qm="MSPointerMove MSPointerUp MSPointerCancel");function bh(){this.evEl=Hm,this.evWin=qm,he.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}b(bh,he,{handler:function(E){var P=this.store,A=!1,k=E.type.toLowerCase().replace("ms",""),B=kC[k],J=RC[E.pointerType]||E.pointerType,At=J==ot,Ot=U(P,E.pointerId,"pointerId");B&Pt&&(E.button===0||At)?Ot<0&&(P.push(E),Ot=P.length-1):B&(pt|Nt)&&(A=!0),!(Ot<0)&&(P[Ot]=E,this.callback(this.manager,B,{pointers:P,changedPointers:[E],pointerType:J,srcEvent:E}),A&&P.splice(Ot,1))}});var LC={touchstart:Pt,touchmove:Ee,touchend:pt,touchcancel:Nt},zC="touchstart",NC="touchstart touchmove touchend touchcancel";function Jm(){this.evTarget=zC,this.evWin=NC,this.started=!1,he.apply(this,arguments)}b(Jm,he,{handler:function(E){var P=LC[E.type];if(P===Pt&&(this.started=!0),!!this.started){var A=FC.call(this,E,P);P&(pt|Nt)&&A[0].length-A[1].length===0&&(this.started=!1),this.callback(this.manager,P,{pointers:A[0],changedPointers:A[1],pointerType:ot,srcEvent:E})}}});function FC(_,E){var P=X(_.touches),A=X(_.changedTouches);return E&(pt|Nt)&&(P=Z(P.concat(A),"identifier",!0)),[P,A]}var BC={touchstart:Pt,touchmove:Ee,touchend:pt,touchcancel:Nt},UC="touchstart touchmove touchend touchcancel";function qr(){this.evTarget=UC,this.targetIds={},he.apply(this,arguments)}b(qr,he,{handler:function(E){var P=BC[E.type],A=VC.call(this,E,P);A&&this.callback(this.manager,P,{pointers:A[0],changedPointers:A[1],pointerType:ot,srcEvent:E})}});function VC(_,E){var P=X(_.touches),A=this.targetIds;if(E&(Pt|Ee)&&P.length===1)return A[P[0].identifier]=!0,[P,P];var k,B,J=X(_.changedTouches),At=[],Ot=this.target;if(B=P.filter(function(jt){return L(jt.target,Ot)}),E===Pt)for(k=0;k<B.length;)A[B[k].identifier]=!0,k++;for(k=0;k<J.length;)A[J[k].identifier]&&At.push(J[k]),E&(pt|Nt)&&delete A[J[k].identifier],k++;if(At.length)return[Z(B.concat(At),"identifier",!0),At]}var YC=2500,Km=25;function wh(){he.apply(this,arguments);var _=x(this.handler,this);this.touch=new qr(this.manager,_),this.mouse=new Hr(this.manager,_),this.primaryTouch=null,this.lastTouches=[]}b(wh,he,{handler:function(E,P,A){var k=A.pointerType==ot,B=A.pointerType==ye;if(!(B&&A.sourceCapabilities&&A.sourceCapabilities.firesTouchEvents)){if(k)$C.call(this,P,A);else if(B&&GC.call(this,A))return;this.callback(E,P,A)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function $C(_,E){_&Pt?(this.primaryTouch=E.changedPointers[0].identifier,Zm.call(this,E)):_&(pt|Nt)&&Zm.call(this,E)}function Zm(_){var E=_.changedPointers[0];if(E.identifier===this.primaryTouch){var P={x:E.clientX,y:E.clientY};this.lastTouches.push(P);var A=this.lastTouches,k=function(){var B=A.indexOf(P);B>-1&&A.splice(B,1)};setTimeout(k,YC)}}function GC(_){for(var E=_.srcEvent.clientX,P=_.srcEvent.clientY,A=0;A<this.lastTouches.length;A++){var k=this.lastTouches[A],B=Math.abs(E-k.x),J=Math.abs(P-k.y);if(B<=Km&&J<=Km)return!0}return!1}var Qm=at(o.style,"touchAction"),tp=Qm!==s,ep="compute",np="auto",vh="manipulation",Bn="none",is="pan-x",ss="pan-y",Jr=jC();function xh(_,E){this.manager=_,this.set(E)}xh.prototype={set:function(_){_==ep&&(_=this.compute()),tp&&this.manager.element.style&&Jr[_]&&(this.manager.element.style[Qm]=_),this.actions=_.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var _=[];return f(this.manager.recognizers,function(E){w(E.options.enable,[E])&&(_=_.concat(E.getTouchAction()))}),XC(_.join(" "))},preventDefaults:function(_){var E=_.srcEvent,P=_.offsetDirection;if(this.manager.session.prevented){E.preventDefault();return}var A=this.actions,k=I(A,Bn)&&!Jr[Bn],B=I(A,ss)&&!Jr[ss],J=I(A,is)&&!Jr[is];if(k){var At=_.pointers.length===1,Ot=_.distance<2,jt=_.deltaTime<250;if(At&&Ot&&jt)return}if(!(J&&B)&&(k||B&&P&yt||J&&P&Fn))return this.preventSrc(E)},preventSrc:function(_){this.manager.session.prevented=!0,_.preventDefault()}};function XC(_){if(I(_,Bn))return Bn;var E=I(_,is),P=I(_,ss);return E&&P?Bn:E||P?E?is:ss:I(_,vh)?vh:np}function jC(){if(!tp)return!1;var _={},E=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(P){_[P]=E?t.CSS.supports("touch-action",P):!0}),_}var Kr=1,le=2,hi=4,yn=8,je=yn,rs=16,Te=32;function We(_){this.options=m({},this.defaults,_||{}),this.id=rt(),this.manager=null,this.options.enable=C(this.options.enable,!0),this.state=Kr,this.simultaneous={},this.requireFail=[]}We.prototype={defaults:{},set:function(_){return m(this.options,_),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(_){if(d(_,"recognizeWith",this))return this;var E=this.simultaneous;return _=Zr(_,this),E[_.id]||(E[_.id]=_,_.recognizeWith(this)),this},dropRecognizeWith:function(_){return d(_,"dropRecognizeWith",this)?this:(_=Zr(_,this),delete this.simultaneous[_.id],this)},requireFailure:function(_){if(d(_,"requireFailure",this))return this;var E=this.requireFail;return _=Zr(_,this),U(E,_)===-1&&(E.push(_),_.requireFailure(this)),this},dropRequireFailure:function(_){if(d(_,"dropRequireFailure",this))return this;_=Zr(_,this);var E=U(this.requireFail,_);return E>-1&&this.requireFail.splice(E,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(_){return!!this.simultaneous[_.id]},emit:function(_){var E=this,P=this.state;function A(k){E.manager.emit(k,_)}P<yn&&A(E.options.event+ip(P)),A(E.options.event),_.additionalEvent&&A(_.additionalEvent),P>=yn&&A(E.options.event+ip(P))},tryEmit:function(_){if(this.canEmit())return this.emit(_);this.state=Te},canEmit:function(){for(var _=0;_<this.requireFail.length;){if(!(this.requireFail[_].state&(Te|Kr)))return!1;_++}return!0},recognize:function(_){var E=m({},_);if(!w(this.options.enable,[this,E])){this.reset(),this.state=Te;return}this.state&(je|rs|Te)&&(this.state=Kr),this.state=this.process(E),this.state&(le|hi|yn|rs)&&this.tryEmit(E)},process:function(_){},getTouchAction:function(){},reset:function(){}};function ip(_){return _&rs?"cancel":_&yn?"end":_&hi?"move":_&le?"start":""}function sp(_){return _==O?"down":_==gn?"up":_==zn?"left":_==Nn?"right":""}function Zr(_,E){var P=E.manager;return P?P.get(_):_}function be(){We.apply(this,arguments)}b(be,We,{defaults:{pointers:1},attrTest:function(_){var E=this.options.pointers;return E===0||_.pointers.length===E},process:function(_){var E=this.state,P=_.eventType,A=E&(le|hi),k=this.attrTest(_);return A&&(P&Nt||!k)?E|rs:A||k?P&pt?E|yn:E&le?E|hi:le:Te}});function Qr(){be.apply(this,arguments),this.pX=null,this.pY=null}b(Qr,be,{defaults:{event:"pan",threshold:10,pointers:1,direction:Ym},getTouchAction:function(){var _=this.options.direction,E=[];return _&yt&&E.push(ss),_&Fn&&E.push(is),E},directionTest:function(_){var E=this.options,P=!0,A=_.distance,k=_.direction,B=_.deltaX,J=_.deltaY;return k&E.direction||(E.direction&yt?(k=B===0?ci:B<0?zn:Nn,P=B!=this.pX,A=Math.abs(_.deltaX)):(k=J===0?ci:J<0?gn:O,P=J!=this.pY,A=Math.abs(_.deltaY))),_.direction=k,P&&A>E.threshold&&k&E.direction},attrTest:function(_){return be.prototype.attrTest.call(this,_)&&(this.state&le||!(this.state&le)&&this.directionTest(_))},emit:function(_){this.pX=_.deltaX,this.pY=_.deltaY;var E=sp(_.direction);E&&(_.additionalEvent=this.options.event+E),this._super.emit.call(this,_)}});function _h(){be.apply(this,arguments)}b(_h,be,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Bn]},attrTest:function(_){return this._super.attrTest.call(this,_)&&(Math.abs(_.scale-1)>this.options.threshold||this.state&le)},emit:function(_){if(_.scale!==1){var E=_.scale<1?"in":"out";_.additionalEvent=this.options.event+E}this._super.emit.call(this,_)}});function Sh(){We.apply(this,arguments),this._timer=null,this._input=null}b(Sh,We,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[np]},process:function(_){var E=this.options,P=_.pointers.length===E.pointers,A=_.distance<E.threshold,k=_.deltaTime>E.time;if(this._input=_,!A||!P||_.eventType&(pt|Nt)&&!k)this.reset();else if(_.eventType&Pt)this.reset(),this._timer=u(function(){this.state=je,this.tryEmit()},E.time,this);else if(_.eventType&pt)return je;return Te},reset:function(){clearTimeout(this._timer)},emit:function(_){this.state===je&&(_&&_.eventType&pt?this.manager.emit(this.options.event+"up",_):(this._input.timeStamp=l(),this.manager.emit(this.options.event,this._input)))}});function Ch(){be.apply(this,arguments)}b(Ch,be,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Bn]},attrTest:function(_){return this._super.attrTest.call(this,_)&&(Math.abs(_.rotation)>this.options.threshold||this.state&le)}});function Eh(){be.apply(this,arguments)}b(Eh,be,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:yt|Fn,pointers:1},getTouchAction:function(){return Qr.prototype.getTouchAction.call(this)},attrTest:function(_){var E=this.options.direction,P;return E&(yt|Fn)?P=_.overallVelocity:E&yt?P=_.overallVelocityX:E&Fn&&(P=_.overallVelocityY),this._super.attrTest.call(this,_)&&E&_.offsetDirection&&_.distance>this.options.threshold&&_.maxPointers==this.options.pointers&&h(P)>this.options.velocity&&_.eventType&pt},emit:function(_){var E=sp(_.offsetDirection);E&&this.manager.emit(this.options.event+E,_),this.manager.emit(this.options.event,_)}});function to(){We.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}b(to,We,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[vh]},process:function(_){var E=this.options,P=_.pointers.length===E.pointers,A=_.distance<E.threshold,k=_.deltaTime<E.time;if(this.reset(),_.eventType&Pt&&this.count===0)return this.failTimeout();if(A&&k&&P){if(_.eventType!=pt)return this.failTimeout();var B=this.pTime?_.timeStamp-this.pTime<E.interval:!0,J=!this.pCenter||Wr(this.pCenter,_.center)<E.posThreshold;this.pTime=_.timeStamp,this.pCenter=_.center,!J||!B?this.count=1:this.count+=1,this._input=_;var At=this.count%E.taps;if(At===0)return this.hasRequireFailures()?(this._timer=u(function(){this.state=je,this.tryEmit()},E.interval,this),le):je}return Te},failTimeout:function(){return this._timer=u(function(){this.state=Te},this.options.interval,this),Te},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==je&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function He(_,E){return E=E||{},E.recognizers=C(E.recognizers,He.defaults.preset),new Th(_,E)}He.VERSION="2.0.7",He.defaults={domEvents:!1,touchAction:ep,enable:!0,inputTarget:null,inputClass:null,preset:[[Ch,{enable:!1}],[_h,{enable:!1},["rotate"]],[Eh,{direction:yt}],[Qr,{direction:yt},["swipe"]],[to],[to,{event:"doubletap",taps:2},["tap"]],[Sh]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var WC=1,rp=2;function Th(_,E){this.options=m({},He.defaults,E||{}),this.options.inputTarget=this.options.inputTarget||_,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=_,this.input=SC(this),this.touchAction=new xh(this,this.options.touchAction),op(this,!0),f(this.options.recognizers,function(P){var A=this.add(new P[0](P[1]));P[2]&&A.recognizeWith(P[2]),P[3]&&A.requireFailure(P[3])},this)}Th.prototype={set:function(_){return m(this.options,_),_.touchAction&&this.touchAction.update(),_.inputTarget&&(this.input.destroy(),this.input.target=_.inputTarget,this.input.init()),this},stop:function(_){this.session.stopped=_?rp:WC},recognize:function(_){var E=this.session;if(!E.stopped){this.touchAction.preventDefaults(_);var P,A=this.recognizers,k=E.curRecognizer;(!k||k&&k.state&je)&&(k=E.curRecognizer=null);for(var B=0;B<A.length;)P=A[B],E.stopped!==rp&&(!k||P==k||P.canRecognizeWith(k))?P.recognize(_):P.reset(),!k&&P.state&(le|hi|yn)&&(k=E.curRecognizer=P),B++}},get:function(_){if(_ instanceof We)return _;for(var E=this.recognizers,P=0;P<E.length;P++)if(E[P].options.event==_)return E[P];return null},add:function(_){if(d(_,"add",this))return this;var E=this.get(_.options.event);return E&&this.remove(E),this.recognizers.push(_),_.manager=this,this.touchAction.update(),_},remove:function(_){if(d(_,"remove",this))return this;if(_=this.get(_),_){var E=this.recognizers,P=U(E,_);P!==-1&&(E.splice(P,1),this.touchAction.update())}return this},on:function(_,E){if(_!==s&&E!==s){var P=this.handlers;return f(F(_),function(A){P[A]=P[A]||[],P[A].push(E)}),this}},off:function(_,E){if(_!==s){var P=this.handlers;return f(F(_),function(A){E?P[A]&&P[A].splice(U(P[A],E),1):delete P[A]}),this}},emit:function(_,E){this.options.domEvents&&HC(_,E);var P=this.handlers[_]&&this.handlers[_].slice();if(!(!P||!P.length)){E.type=_,E.preventDefault=function(){E.srcEvent.preventDefault()};for(var A=0;A<P.length;)P[A](E),A++}},destroy:function(){this.element&&op(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function op(_,E){var P=_.element;if(P.style){var A;f(_.options.cssProps,function(k,B){A=at(P.style,B),E?(_.oldCssProps[A]=P.style[A],P.style[A]=k):P.style[A]=_.oldCssProps[A]||""}),E||(_.oldCssProps={})}}function HC(_,E){var P=e.createEvent("Event");P.initEvent(_,!0,!0),P.gesture=E,E.target.dispatchEvent(P)}m(He,{INPUT_START:Pt,INPUT_MOVE:Ee,INPUT_END:pt,INPUT_CANCEL:Nt,STATE_POSSIBLE:Kr,STATE_BEGAN:le,STATE_CHANGED:hi,STATE_ENDED:yn,STATE_RECOGNIZED:je,STATE_CANCELLED:rs,STATE_FAILED:Te,DIRECTION_NONE:ci,DIRECTION_LEFT:zn,DIRECTION_RIGHT:Nn,DIRECTION_UP:gn,DIRECTION_DOWN:O,DIRECTION_HORIZONTAL:yt,DIRECTION_VERTICAL:Fn,DIRECTION_ALL:Ym,Manager:Th,Input:he,TouchAction:xh,TouchInput:qr,MouseInput:Hr,PointerEventInput:bh,TouchMouseInput:wh,SingleTouchInput:Jm,Recognizer:We,AttrRecognizer:be,Tap:to,Pan:Qr,Swipe:Eh,Pinch:_h,Rotate:Ch,Press:Sh,on:S,off:D,each:f,merge:y,extend:v,assign:m,inherit:b,bindFn:x,prefixed:at});var qC=typeof t<"u"?t:typeof self<"u"?self:{};qC.Hammer=He,typeof s=="function"&&s.amd?s(function(){return He}):n.exports?n.exports=He:t[i]=He})(window,document,"Hammer")})(Wd);var Q2=Wd.exports;const mt=ql(Q2);async function Hd(n,t){return new Promise(e=>{const i=new ResizeObserver(s=>{const r=n.getBoundingClientRect();t(r),e(()=>{i.unobserve(n)})});i.observe(n)})}function sh(n=document.documentElement,t){return new ft(e=>{const i=n.getBoundingClientRect();let s=i.x,r=i.y,o=i.width,a=i.height;e.next(i);const c=new ResizeObserver(h=>{const l=n.getBoundingClientRect();(s!=l.x||r!=l.y||o!=l.width||a!=l.height)&&(s=l.x,r=l.y,o=l.width,a=l.height,e.next(l))});return c.observe(n,t),()=>{c.unobserve(n),c.disconnect()}})}function t_(){return $(window,"orientationchange"in window?"orientationchange":"resize").pipe(dt(n=>({width:n.target.innerWidth,height:n.target.innerHeight})),Tn({width:window.innerWidth,height:window.innerHeight}))}function e_(){return"ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0}function n_(){return!!window.PointerEvent}function i_(n,t){let e=document.createElement(n);t="on"+t;let i=t in e;return i||(e.setAttribute(t,"return;"),i=typeof e[t]=="function"),e=null,i}function rh(){return{x:0,y:0,isDown:!1}}function Ln(){const n=rh(),t=rh();return{start:n,current:t,setStart:function(e,i){n.x=e.x,n.y=e.y,n.isDown=typeof i=="boolean"?i:typeof e.isDown=="boolean"?e.isDown:!1,this.setCurrent(e,i)},setCurrent:(e,i)=>{t.x=e.x,t.y=e.y,t.isDown=typeof i=="boolean"?i:typeof e.isDown=="boolean"?e.isDown:!1}}}function Fr(n=document.documentElement,t=!1){return $(n,"mousemove",t)}function qd(n=document.documentElement,t=!1){return $(n,"mousedown",t)}function Jd(n=document.documentElement,t=!1){return $(n,"mouseup",t)}function s_(n=document.documentElement,t=!1){return $(n,"mouseover",t)}function r_(n=document.documentElement,t=!1){return $(n,"mouseout",t)}function o_(n=document.documentElement,t=!1){return $(n,"mouseenter",t)}function a_(n=document.documentElement,t=!1){return $(n,"mouseleave",t)}function c_(n=document.documentElement,t=!1){return $(n,"click",t)}function h_(n=document.documentElement,t=!1){return $(n,"dblclick",t)}function l_(n=document.documentElement,t=!1){return $(n,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",t)}function u_(n=document.documentElement,t=!1){return $(n,"contextmenu",t)}function Kd(n=document.documentElement,t=!1){return $(n,"touchmove",t)}function Zd(n=document.documentElement,t=!1){return $(n,"touchstart",t)}function Qd(n=document.documentElement,t=!1){return $(n,"touchend",t)}function tm(n=document.documentElement,t=!1){return $(n,"touchcancel",t)}function oh(n=document.documentElement,t=!1){return $(n,"pointermove",t)}function ah(n=document.documentElement,t=!1){return $(n,"pointerdown",t)}function ch(n=document.documentElement,t=!1){return $(n,"pointerup",t)}function hh(n=document.documentElement,t=!1){return $(n,"pointercancel",t)}function f_(n=document.documentElement){const t=new mt(n);return ut(e=>{t.on("pan",e)},e=>{t.off("pan",e)})}function d_(n=document.documentElement){const t=new mt(n);return ut(e=>{t.on("panmove",e)},e=>{t.off("panmove",e)})}function m_(n=document.documentElement){const t=new mt(n);return ut(e=>{t.on("panstart",e)},e=>{t.off("panstart",e)})}function p_(n=document.documentElement){const t=new mt(n);return ut(e=>{t.on("panend",e)},e=>{t.off("panend",e)})}function g_(n=document.documentElement){const t=new mt(n);return ut(e=>{t.on("pancancel",e)},e=>{t.off("pancancel",e)})}function y_(n=document.documentElement){const t=new mt(n);return ut(e=>{t.on("panleft",e)},e=>{t.off("panleft",e)})}function b_(n=document.documentElement){const t=new mt(n);return ut(e=>{t.on("panright",e)},e=>{t.off("panright",e)})}function w_(n=document.documentElement){const t=new mt(n);return ut(e=>{t.on("panup",e)},e=>{t.off("panup",e)})}function v_(n=document.documentElement){const t=new mt(n);return ut(e=>{t.on("pandown",e)},e=>{t.off("pandown",e)})}function x_(n=document.documentElement){const t=new mt(n);return ut(e=>{t.on("pinch",e)},e=>{t.off("pinch",e)})}function __(n=document.documentElement){const t=new mt(n);return ut(e=>{t.on("pinchin",e)},e=>{t.off("pinchin",e)})}function S_(n=document.documentElement){const t=new mt(n);return ut(e=>{t.on("pinchout",e)},e=>{t.off("pinchout",e)})}function C_(n=document.documentElement){const t=new mt(n);return ut(e=>{t.on("press",e)},e=>{t.off("press",e)})}function E_(n=document.documentElement){const t=new mt(n);return ut(e=>{t.on("rotate",e)},e=>{t.off("rotate",e)})}function T_(n=document.documentElement){const t=new mt(n);return ut(e=>{t.on("swipe",e)},e=>{t.off("swipe",e)})}function P_(n=document.documentElement){const t=new mt(n);return ut(e=>{t.on("swipeleft",e)},e=>{t.off("swipeleft",e)})}function A_(n=document.documentElement){const t=new mt(n);return ut(e=>{t.on("swiperight",e)},e=>{t.off("swiperight",e)})}function M_(n=document.documentElement){const t=new mt(n);return ut(e=>{t.on("swipeup",e)},e=>{t.off("swipeup",e)})}function D_(n=document.documentElement){const t=new mt(n);return ut(e=>{t.on("swipedown",e)},e=>{t.off("swipedown",e)})}function em(n=document.documentElement){const t=new mt(n);return ut(e=>{t.on("tap",e)},e=>{t.off("tap",e)})}function I_(n=document.documentElement){const t=new mt(document.documentElement);return ut(e=>{const i=s=>{!s.target||n==s.target||n.contains(s.target)||e(s)};return t.on("tap",i),i},(e,i)=>{t.off("tap",i)})}function O_(n=document.documentElement,t=!1){return $(n,"transitionstart",t)}function k_(n=document.documentElement,t=!1){return Bs($(n,"transitionend",t),$(n,"webkitTransitionEnd",t),$(n,"oTransitionEnd",t),$(n,"MSTransitionEnd",t))}function R_(n=document.documentElement,t=!1){return $(n,"animationstart",t)}function L_(n=document.documentElement,t=!1){return $(n,"animationend",t)}function nm(n=document.documentElement,t=!1){return $(n,"drag",t)}function im(n=document.documentElement,t=!1){return $(n,"dragstart",t)}function sm(n=document.documentElement,t=!1){return $(n,"dragend",t)}function rm(n=document.documentElement,t=!1){return $(n,"drop",t)}function om(n=document.documentElement,t=!1){return $(n,"dragenter",t)}function am(n=document.documentElement,t=!1){return $(n,"dragleave",t)}function cm(n=document.documentElement,t=!1){return $(n,"dragover",t)}function hm(n=document.documentElement,t=!1){return $(n,"keydown",t)}function lm(n=document.documentElement,t=!1){return $(n,"keyup",t)}function z_(n=document.documentElement,t=!1){return $(n,"keypress",t)}function N_(n,t=!1){return $(n,"change",t)}function F_(n,t=!1){return $(n,"submit",t)}function B_(n=10){return $(window,"scroll",!0).pipe(ob(n))}function U_(){return $(document,"visibilitychange",!0).pipe(dt(()=>document.visibilityState==="visible"),Qe())}function V_(){return $(window,"storage",!1)}function Y_(){return Bs($(window,"online",!1),$(window,"offline",!1)).pipe(dt(()=>navigator.onLine),Tn(navigator.onLine),Qe(),Lu({bufferSize:1,refCount:!0}))}function $_(n=document.documentElement,t){const e=t?.createMousePoint||Ln();return Fr(n).pipe(dt(i=>(e.setCurrent(_t(i,n)),e)))}function um(n=document.documentElement,t){const e=t?.createMousePoint||Ln();return Fr(n).pipe(ab(qd(n).pipe(Pn(i=>{e.setStart(_t(i,n),!0),t?.start?.(i,e)})),()=>Jd(n).pipe(Pn(i=>{e.setCurrent(_t(i,n),!1),t?.end?.(i,e)}))),sb(),dt(i=>(e.setCurrent(_t(i,n),!0),e)))}function fm(n=document.documentElement,t){const e=t?.createMousePoint||Ln();return Zd(n).pipe(Pn(i=>{const s=i.changedTouches[0];e.setStart(_t(s,n),!0),t?.start?.(s,e)}),Vs(()=>Kd(n).pipe(da(Us(Qd(n),tm(n)).pipe(Pn(i=>{const s=i.changedTouches[0];e.setCurrent(_t(s,n),!1),t?.end?.(s,e)}))))),dt(i=>{const s=i.changedTouches[0];return e.setCurrent(_t(s,n),!0),e}))}function Br(n=document.documentElement,t){const e=t?.createMousePoint||Ln();return ah(n).pipe(Pn(i=>{e.setStart(_t(i,n),!0),t?.start?.(i,e)}),Vs(()=>oh(n).pipe(da(Us(ch(n),hh(n)).pipe(Pn(i=>{e.setCurrent(_t(i,n),!1),t?.end?.(i,e)}))))),dt(i=>(e.setCurrent(_t(i,n),!0),e)))}function G_(n=document.documentElement,t){return Us(um(n,t),fm(n,t))}function dm(n=document.documentElement,t){const e=t?.createMousePoint||Ln();return Bs(Fr(n),ah(n)).pipe(Ru(i=>i instanceof PointerEvent?(e.setStart(_t(i,n),!0),t?.start?.(i,e),oh(n).pipe(da(Us(ch(n),hh(n)).pipe(Pn(s=>{e.setCurrent(_t(s,n),!1),t?.end?.(s,e)}))))):i instanceof MouseEvent?M1(i):gu),dt(i=>(e.setCurrent(_t(i,n),i instanceof PointerEvent),e)))}function X_(n){return new ft(t=>Br(n,{start:()=>{t.next(0)}}).subscribe(i=>{t.next(i.current.y-i.start.y)}).unsubscribe).pipe(Qe())}function j_(n,t){Sn(n,"draggable","true");const e=im(n,!0).subscribe(r=>{tn(r),zu(r);const o=r.dataTransfer;o&&(o.effectAllowed="move",o.setData("text/plain","some-data")),t?.onStart?.(r)}),i=nm(n).subscribe(r=>{tn(r),t?.onDrag?.(r)}),s=sm(n).subscribe(r=>{tn(r),t?.onEnd?.(r)});return()=>{e.unsubscribe(),i.unsubscribe(),s.unsubscribe()}}function W_(n,t){const e=om(n).subscribe(o=>{tn(o),t?.onEnter?.(o)}),i=cm(n).subscribe(o=>{tn(o);const a=o.dataTransfer;a&&(a.dropEffect="move"),t?.onOver?.(o)}),s=am(n).subscribe(o=>{tn(o),t?.onLeave?.(o)}),r=rm(n).subscribe(o=>{tn(o);const a=o.dataTransfer;if(!a){t?.onDrop?.(o,[]);return}t?.onDrop?.(o,[...a.files])});return()=>{e.unsubscribe(),i.unsubscribe(),s.unsubscribe(),r.unsubscribe()}}function H_(){return{screenWidth:window.screen.width,screenHeight:window.screen.height,innerWidth:window.innerWidth,innerHeight:window.innerHeight,screenX:window.screenX,screenY:window.screenY,pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset}}function ai(){const n=document.documentElement||document.body;return{el:n,clientWidth:n.clientWidth,clientHeight:n.clientHeight,clientTop:n.clientTop,clientLeft:n.clientLeft,scrollWidth:n.scrollWidth,scrollHeight:n.scrollHeight,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft,offsetWidth:n.offsetWidth,offsetHeight:n.offsetHeight,offsetTop:n.offsetTop,offsetLeft:n.offsetLeft,offsetParent:n.offsetParent}}function mm(){const{clientWidth:n,clientHeight:t,scrollLeft:e,scrollTop:i}=ai();return{width:window.innerWidth||n,height:window.innerHeight||t,x:window.pageXOffset||e,y:window.pageYOffset||i}}function q_(){const{scrollWidth:n,scrollHeight:t,scrollLeft:e,scrollTop:i}=ai();return{width:n,height:t,scrollX:window.pageXOffset||e,scrollY:window.pageYOffset||i}}function lh(n){return n.getBoundingClientRect()}function J_(n){return{x:n.offsetLeft,y:n.offsetTop,width:n.offsetWidth,height:n.offsetHeight}}function uh(n){const{top:t,left:e,width:i,height:s}=n.getBoundingClientRect(),{scrollLeft:r,scrollTop:o}=ai();return{x:e+r,y:t+o,width:i,height:s}}function K_(n){let t=n,e=0,i=0;for(;t!==null;)e+=t.offsetLeft,i+=t.offsetTop,t.offsetParent instanceof HTMLElement?t=t.offsetParent:t=null;return{x:e,y:i,width:n.offsetWidth,height:n.offsetHeight}}function Z_(){const{clientHeight:n,scrollTop:t,scrollHeight:e}=ai(),i=e-n;return i<=0?0:t/i*100}function Q_(n){const t=mm(),e=lh(n);return e.bottom>=0&&e.top<=t.height&&e.right>=0&&e.left<=t.width}function tS(n){if("center"in n){const t=n.center,e=lh(n.target);return{x:t.x-e.x,y:t.y-e.y}}return{x:n.clientX,y:n.clientY}}function fh(n){if("center"in n)return n.center;if(typeof n.pageX=="number"&&typeof n.pageY=="number")return{x:n.pageX,y:n.pageY};const{scrollLeft:t,scrollTop:e}=ai();return{x:n.clientX+t,y:n.clientY+e}}function _t(n,t){const e={x:0,y:0};if(t){const i=fh(n),s=uh(t);e.x=Y(i.x-s.x,0,s.width),e.y=Y(i.y-s.y,0,s.height)}else{let i=0,s=0;if("currentTarget"in n&&n.currentTarget&&n.target&&n.currentTarget!=n.target){const r=n.currentTarget.getBoundingClientRect(),o=n.target.getBoundingClientRect();i=o.left-r.left,s=o.top-r.top}if("offsetX"in n)e.x=n.offsetX+i,e.y=n.offsetY+s;else{const r=fh(n),o=uh(n.target);e.x=Y(r.x-o.x+i,0,o.width),e.y=Y(r.y-o.y+s,0,o.height)}}return e}function eS(n){let t=0;return n||(n=window.event),n.wheelDelta?(t=n.wheelDelta/120,window.opera&&(t=-t)):n.detail&&(t=-n.detail/3),t}function nS(n){if(document.implementation.hasFeature("MouseEvents","2.0"))return n.button;switch(n.button){case 0:case 1:case 3:case 5:case 7:return 0;case 2:case 6:return 2;case 4:return 1}}const iS={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 sS(n){if(n.key)return n.key;if(n.keyCode)return n.keyCode;if(n.which)return n.which}function pm(n,t){const e=t.ctrl||!1,i=t.shift||!1,s=t.alt||!1;return(e===n.metaKey||e===n.ctrlKey)&&i===n.shiftKey&&s===n.altKey&&t.keys.map(r=>r.toLowerCase()).includes(n.key.toLowerCase())}function gm(n){return hm(n.target||document||window).pipe(ua(t=>pm(t,n)),dt(t=>{t.stopPropagation(),t.preventDefault()}))}function rS(n){return lm(n.target||document||window).pipe(ua(t=>pm(t,n)),dt(t=>{t.stopPropagation(),t.preventDefault()}))}function ym(n={keys:["o"]},t=ie.text){return gm(n).pipe(Vs(async()=>await Fd(t)))}async function oS(n={keys:["o"]},t=ie.text){return I1(ym(n,t))}function aS(){const n={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,i){n.x=e.x,n.y=e.y,n.isDown=typeof i=="boolean"?i:!1,this.setCurrentMousePoint(e,i)},setCurrentMousePoint:(e,i)=>{const s=t.x,r=t.y;t.x=e.x,t.y=e.y,t.dx=t.x-s,t.dy=t.y-r,t.dStartX=t.x-n.x,t.dStartY=t.y-n.y,t.isDown=typeof i=="boolean"?i:!1}}}function cS(n=document.documentElement){const t=new po,e=new mt(n);let i=[];const s=aS(),r=s.mousePoint,o=O=>{t.emit("mouseDown",O)},a=O=>{t.emit("mouseUp",O)},c=O=>{r.isDown||s.setCurrentMousePoint(_t(O,n)),t.emit("mouseMove",O)},h=O=>{t.emit("mouseOver",O)},l=O=>{t.emit("mouseOut",O)},u=O=>{t.emit("mouseEnter",O)},d=O=>{t.emit("mouseLeave",O)},f=O=>{t.emit("mouseClick",O)},p=O=>{t.emit("mouseDoubleClick",O)},m=O=>{t.emit("mouseWheel",O)},v=O=>{t.emit("mouseContextMenu",O)},y=O=>{t.emit("touchStart",O)},b=O=>{t.emit("touchEnd",O)},x=O=>{t.emit("touchCancel",O)},w=O=>{const yt=O.changedTouches[0];r.isDown||s.setCurrentMousePoint(_t(yt,n)),t.emit("touchMove",O)},C=O=>{t.emit("pointerDown",O)},S=O=>{t.emit("pointerUp",O)},D=O=>{t.emit("pointerCancel",O)},L=O=>{t.emit("pointerMove",O)},I=O=>{t.emit("pan",O)},F=O=>{t.emit("panStart",O)},U=O=>{t.emit("panMove",O)},X=O=>{t.emit("panEnd",O)},Z=O=>{t.emit("panCancel",O)},at=O=>{t.emit("panLeft",O)},nt=O=>{t.emit("panRight",O)},rt=O=>{t.emit("panUp",O)},Q=O=>{t.emit("panDown",O)},St=O=>{t.emit("pinch",O)},z=O=>{t.emit("pinchin",O)},R=O=>{t.emit("pinchout",O)},H=O=>{t.emit("press",O)},ot=O=>{t.emit("rotate",O)},Xt=O=>{t.emit("swipe",O)},ye=O=>{t.emit("swipeLeft",O)},Gr=O=>{t.emit("swipeRight",O)},Xr=O=>{t.emit("swipeUp",O)},Pt=O=>{t.emit("swipeDown",O)},Ee=O=>{t.emit("tap",O)},pt=O=>{!O.target||n==O.target||n.contains(O.target)||t.emit("tapOutSide",O)},Nt=O=>{t.emit("transitionstart",O)},ci=O=>{t.emit("transitionend",O)},zn=O=>{t.emit("animationstart",O)},Nn=O=>{t.emit("animationend",O)};let gn={...n.getBoundingClientRect(),width:n.offsetWidth,height:n.offsetHeight};return{el:n,get rect(){return gn},mousePoint:r,eb:t,start:async function(){i.push(st(n,"mousedown",o)),i.push(st(n,"mouseup",a)),i.push(st(n,"mousemove",c)),i.push(st(n,"mouseover",h)),i.push(st(n,"mouseout",l)),i.push(st(n,"mouseenter",u)),i.push(st(n,"mouseleave",d)),i.push(st(n,"click",f)),i.push(st(n,"dblclick",p)),i.push(st(n,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",m)),i.push(st(n,"contextmenu",v)),i.push(st(n,"touchstart",y)),i.push(st(n,"touchend",b)),i.push(st(n,"touchcancel",x)),i.push(st(n,"touchmove",w)),i.push(st(n,"pointerdown",C)),i.push(st(n,"pointerup",S)),i.push(st(n,"pointercancel",D)),i.push(st(n,"pointermove",L)),e.on("pan",I),e.on("panstart",F),e.on("panmove",U),e.on("panend",X),e.on("pancancel",Z),e.on("panleft",at),e.on("panright",nt),e.on("panup",rt),e.on("pandown",Q),e.on("pinch",St),e.on("pinchin",z),e.on("pinchout",R),e.on("press",H),e.on("rotate",ot),e.on("swipe",Xt),e.on("swipeleft",ye),e.on("swiperight",Gr),e.on("swipeup",Xr),e.on("swipedown",Pt),e.on("tap",Ee),i.push(st(document,"pointerdown",pt)),i.push(st(n,"transitionstart",Nt)),i.push(st(n,"transitionend",ci)),i.push(st(n,"animationstart",zn)),i.push(st(n,"animationend",Nn));const O=await Hd(n,yt=>{gn=yt,t.emit("resize",yt)});i.push(O),i.push(bm(this,{start:yt=>{s.setStartMousePoint(_t(yt,n),!0)},move:yt=>{s.setCurrentMousePoint(_t(yt,n))},end:yt=>{s.setCurrentMousePoint(_t(yt,n),!1)}}))},end:()=>{t.removeAllListeners(),i.forEach(O=>O()),i=[],e.off("pan",I),e.off("panstart",F),e.off("panmove",U),e.off("panend",X),e.off("pancancel",Z),e.off("panleft",at),e.off("panright",nt),e.off("panup",rt),e.off("pandown",Q),e.off("pinch",St),e.off("pinchin",z),e.off("pinchout",R),e.off("press",H),e.off("rotate",ot),e.off("swipe",Xt),e.off("swipeleft",ye),e.off("swiperight",Gr),e.off("swipeup",Xr),e.off("swipedown",Pt),e.off("tap",Ee)}}}function bm(n,t){return wm(n,t)}function wm(n,t){const e=n.eb,i=o=>{e.on("pointerMove",r),e.on("pointerUp",s),e.on("pointerCancel",s),t?.start?.(o)},s=o=>{e.off("pointerMove",r),e.off("pointerUp",s),e.off("pointerCancel",s),t?.end?.(o)},r=o=>{t?.move?.(o)};return e.on("pointerDown",i),()=>e.off("pointerDown",i)}function hS(n,t){const e=n.eb,i=o=>{document.addEventListener("mousemove",r,!1),document.addEventListener("mouseup",s,!1),t?.start?.(o)},s=o=>{document.removeEventListener("mousemove",r,!1),document.removeEventListener("mouseup",s,!1),t?.end?.(o)},r=o=>{t?.move?.(o)};return e.on("mouseDown",i),()=>e.off("mouseDown",i)}function lS(n,t){const e=n.eb,i=o=>{e.on("touchMove",r),e.on("touchEnd",s),e.on("touchCancel",s);const a=o.changedTouches[0];t?.start?.(a)},s=o=>{e.off("touchMove",r),e.off("touchEnd",s),e.off("touchCancel",s);const a=o.changedTouches[0];t?.end?.(a)},r=o=>{const a=o.changedTouches[0];t?.move?.(a)};return e.on("touchStart",i),()=>e.off("touchStart",i)}function uS(n,t,e){if(typeof t=="string"&&(t=Rh(t)),(typeof t=="string"||t===void 0)&&e===void 0){const i=Object.assign({},n.dataset);return Object.keys(i).forEach(s=>{if(i[s]?.startsWith("[")||i[s]?.startsWith("{"))try{i[s]=JSON.parse(i[s]||"")}catch{}}),typeof t=="string"?i[t]:i}else{let i={};typeof t=="object"?i=t:typeof t=="string"&&(i[t]=e),Object.entries(i).forEach(([s,r])=>{r?n.dataset[s]=r instanceof Object?JSON.stringify(r):r:delete n.dataset[s]})}}function fS(n,t){t.split(/[,\s]+/).forEach(e=>{e.trim()!=""&&delete n.dataset[e.trim()]})}function vm(n,t={attributes:!0,childList:!0,subtree:!0}){return new ft(e=>{const i=new MutationObserver((s,r)=>{e.next(s)});return i.observe(n,t),()=>{i.disconnect()}})}function dS(n,t){return new Promise(e=>{new MutationObserver((s,r)=>{for(const o of s)o.type==="childList"&&o.addedNodes.forEach(a=>{a.isEqualNode(t)&&(r.disconnect(),e(!0))})}).observe(n,{childList:!0})})}function xm(n,t={root:null}){return new ft(e=>{const i=new IntersectionObserver((s,r)=>{if(s.length){const o=s[s.length-1];o&&e.next(o)}},t);return i.observe(n),()=>{i.unobserve(n),i.disconnect()}})}function mS(n,t){const e=t?.threshold??.5;return xm(n,{threshold:e,root:t?.root}).pipe(dt(i=>i.isIntersecting&&i.intersectionRatio>=e),Qe())}function dh(n,t){const e=typeof n=="string"?n:n.toString(),i=()=>{try{const a=window.sessionStorage.getItem(e);if(a)return JSON.parse(a)}catch{}},s=a=>{try{typeof a.value<"u"?window.sessionStorage.setItem(e,JSON.stringify(a)):window.sessionStorage.removeItem(e)}catch{}};return{get:()=>{const{get:a}=Rs(i(),t);return a().value},set:a=>{const{set:c}=Rs(i(),t),h=c(a);s(h)}}}function pS(){window.sessionStorage.clear()}function _m(){return vm(document).pipe(dt(()=>location),Tn(location))}function gS(){return _m().pipe(dt(n=>n.href),Tn(location.href),Qe())}function yS(){return $(window,"hashchange").pipe(dt(n=>n.target.location.hash.replace("#","")),Tn(window.location.hash.replace("#","")),Qe())}function Sm(n="current"){return $(window,"popstate").pipe(dt(t=>t.state||{}),dt(t=>({...t,[n]:t[n]||window.location.pathname+window.location.search+window.location.hash})),Qe((t,e)=>t[n]===e[n]))}function bS(n={nameInState:"current",alreadyPushState:!0}){const t=n.nameInState,e=typeof n.alreadyPushState=="boolean"?n.alreadyPushState:!0,{get:i,set:s}=dh("fe-route-history"),r=i()||[],{get:o,set:a}=dh("fe-route-history-index"),c=o();let h=typeof c=="number"?c:r.length-1;function l(y){return r.findIndex(x=>x[t]===y[t])}const u={currentIndex:h};function d(y){y=Y(y,-1,r.length-1),h<0?(u.direction="keep",u.delta=0):(y<h?u.direction="backward":y>h?u.direction="forward":u.direction="keep",u.delta=y-h),u.from=u.to,u.to=r[y]?.[t],h=y,u.currentIndex=h,a(h)}d(h);function f(y){r.push(y),s(r),d(r.length-1)}function p(y,b){const x={...b,[t]:y};window.history.pushState(x,"",y),f(x)}function m(y,b=e){const x=l(y);if(x<0){h>=0&&(r.splice(h+1),s(r)),b?f(y):p(y[t],y);return}x!=h&&d(x)}const v=Sm().subscribe(y=>{m(y,!0)});return{history:r,route:u,navigate:(y,b)=>{m({...b,[t]:y},e)},go(y){window.history.go(y)},back(){window.history.back()},forward(){window.history.forward()},destroy:()=>{v.unsubscribe()}}}function Cm(n="(prefers-color-scheme: dark)"){const t=window.matchMedia(n);return $(t,"change").pipe(dt(e=>e.matches),Tn(t.matches),Qe())}let Em=!1;function wS(){Em||(Em=!0,iu(`
|
|
93
|
+
})`}class ts{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"),i=document.createElement("video"),s=document.createElement("source"),r=new MediaSource;r.addEventListener("sourceopen",()=>t(!0)),s.src=URL.createObjectURL(r),s.media="(min-width:10px)",i.append(s),e.width="5",e.style.cssText="position: absolute; visibility: hidden;",document.documentElement.append(e),e.contentDocument?.body.append(i),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(()=>{ts.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)}}async function qd(n,t){return new Promise(e=>{const i=new ResizeObserver(s=>{const r=n.getBoundingClientRect();t(r),e(()=>{i.unobserve(n)})});i.observe(n)})}function rh(n=document.documentElement,t){return new ft(e=>{const i=n.getBoundingClientRect();let s=i.x,r=i.y,o=i.width,a=i.height;e.next(i);const c=new ResizeObserver(h=>{const l=n.getBoundingClientRect();(s!=l.x||r!=l.y||o!=l.width||a!=l.height)&&(s=l.x,r=l.y,o=l.width,a=l.height,e.next(l))});return c.observe(n,t),()=>{c.unobserve(n),c.disconnect()}})}function i_(){return $(window,"orientationchange"in window?"orientationchange":"resize").pipe(dt(n=>({width:n.target.innerWidth,height:n.target.innerHeight})),Tn({width:window.innerWidth,height:window.innerHeight}))}let Fr=null,oh=null;function s_(){return Fr?Promise.resolve(Fr):(oh||(oh=Promise.resolve().then(()=>AC).then(n=>(Fr=n.default??n,Fr))),oh)}function gt(n){return new r_(n)}class r_{constructor(t){this.el=t,this.load()}instance=null;pending=[];async load(){const t=await s_();this.instance=new t(this.el),this.pending.forEach(([e,i])=>{this.instance.on(e,i)}),this.pending=[]}on(t,e){this.instance?this.instance.on(t,e):this.pending.push([t,e])}off(t,e){this.instance?.off(t,e)}destroy(){this.pending=[],this.instance?.destroy(),this.instance=null}}function o_(){return"ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0}function a_(){return!!window.PointerEvent}function c_(n,t){let e=document.createElement(n);t="on"+t;let i=t in e;return i||(e.setAttribute(t,"return;"),i=typeof e[t]=="function"),e=null,i}function ah(){return{x:0,y:0,isDown:!1}}function Ln(){const n=ah(),t=ah();return{start:n,current:t,setStart:function(e,i){n.x=e.x,n.y=e.y,n.isDown=typeof i=="boolean"?i:typeof e.isDown=="boolean"?e.isDown:!1,this.setCurrent(e,i)},setCurrent:(e,i)=>{t.x=e.x,t.y=e.y,t.isDown=typeof i=="boolean"?i:typeof e.isDown=="boolean"?e.isDown:!1}}}function Br(n=document.documentElement,t=!1){return $(n,"mousemove",t)}function Jd(n=document.documentElement,t=!1){return $(n,"mousedown",t)}function Kd(n=document.documentElement,t=!1){return $(n,"mouseup",t)}function h_(n=document.documentElement,t=!1){return $(n,"mouseover",t)}function l_(n=document.documentElement,t=!1){return $(n,"mouseout",t)}function u_(n=document.documentElement,t=!1){return $(n,"mouseenter",t)}function f_(n=document.documentElement,t=!1){return $(n,"mouseleave",t)}function d_(n=document.documentElement,t=!1){return $(n,"click",t)}function m_(n=document.documentElement,t=!1){return $(n,"dblclick",t)}function p_(n=document.documentElement,t=!1){return $(n,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",t)}function g_(n=document.documentElement,t=!1){return $(n,"contextmenu",t)}function Zd(n=document.documentElement,t=!1){return $(n,"touchmove",t)}function Qd(n=document.documentElement,t=!1){return $(n,"touchstart",t)}function tm(n=document.documentElement,t=!1){return $(n,"touchend",t)}function em(n=document.documentElement,t=!1){return $(n,"touchcancel",t)}function ch(n=document.documentElement,t=!1){return $(n,"pointermove",t)}function hh(n=document.documentElement,t=!1){return $(n,"pointerdown",t)}function lh(n=document.documentElement,t=!1){return $(n,"pointerup",t)}function uh(n=document.documentElement,t=!1){return $(n,"pointercancel",t)}function y_(n=document.documentElement){const t=gt(n);return ut(e=>{t.on("pan",e)},e=>{t.off("pan",e)})}function b_(n=document.documentElement){const t=gt(n);return ut(e=>{t.on("panmove",e)},e=>{t.off("panmove",e),t.destroy()})}function w_(n=document.documentElement){const t=gt(n);return ut(e=>{t.on("panstart",e)},e=>{t.off("panstart",e),t.destroy()})}function v_(n=document.documentElement){const t=gt(n);return ut(e=>{t.on("panend",e)},e=>{t.off("panend",e),t.destroy()})}function x_(n=document.documentElement){const t=gt(n);return ut(e=>{t.on("pancancel",e)},e=>{t.off("pancancel",e),t.destroy()})}function __(n=document.documentElement){const t=gt(n);return ut(e=>{t.on("panleft",e)},e=>{t.off("panleft",e),t.destroy()})}function S_(n=document.documentElement){const t=gt(n);return ut(e=>{t.on("panright",e)},e=>{t.off("panright",e),t.destroy()})}function C_(n=document.documentElement){const t=gt(n);return ut(e=>{t.on("panup",e)},e=>{t.off("panup",e),t.destroy()})}function E_(n=document.documentElement){const t=gt(n);return ut(e=>{t.on("pandown",e)},e=>{t.off("pandown",e),t.destroy()})}function T_(n=document.documentElement){const t=gt(n);return ut(e=>{t.on("pinch",e)},e=>{t.off("pinch",e),t.destroy()})}function P_(n=document.documentElement){const t=gt(n);return ut(e=>{t.on("pinchin",e)},e=>{t.off("pinchin",e),t.destroy()})}function A_(n=document.documentElement){const t=gt(n);return ut(e=>{t.on("pinchout",e)},e=>{t.off("pinchout",e),t.destroy()})}function M_(n=document.documentElement){const t=gt(n);return ut(e=>{t.on("press",e)},e=>{t.off("press",e),t.destroy()})}function D_(n=document.documentElement){const t=gt(n);return ut(e=>{t.on("rotate",e)},e=>{t.off("rotate",e),t.destroy()})}function I_(n=document.documentElement){const t=gt(n);return ut(e=>{t.on("swipe",e)},e=>{t.off("swipe",e),t.destroy()})}function O_(n=document.documentElement){const t=gt(n);return ut(e=>{t.on("swipeleft",e)},e=>{t.off("swipeleft",e),t.destroy()})}function k_(n=document.documentElement){const t=gt(n);return ut(e=>{t.on("swiperight",e)},e=>{t.off("swiperight",e),t.destroy()})}function R_(n=document.documentElement){const t=gt(n);return ut(e=>{t.on("swipeup",e)},e=>{t.off("swipeup",e),t.destroy()})}function L_(n=document.documentElement){const t=gt(n);return ut(e=>{t.on("swipedown",e)},e=>{t.off("swipedown",e),t.destroy()})}function nm(n=document.documentElement){const t=gt(n);return ut(e=>{t.on("tap",e)},e=>{t.off("tap",e),t.destroy()})}function z_(n=document.documentElement){const t=new Hammer(document.documentElement);return ut(e=>{const i=s=>{!s.target||n==s.target||n.contains(s.target)||e(s)};return t.on("tap",i),i},(e,i)=>{t.off("tap",i),t.destroy()})}function N_(n=document.documentElement,t=!1){return $(n,"transitionstart",t)}function F_(n=document.documentElement,t=!1){return Bs($(n,"transitionend",t),$(n,"webkitTransitionEnd",t),$(n,"oTransitionEnd",t),$(n,"MSTransitionEnd",t))}function B_(n=document.documentElement,t=!1){return $(n,"animationstart",t)}function U_(n=document.documentElement,t=!1){return $(n,"animationend",t)}function im(n=document.documentElement,t=!1){return $(n,"drag",t)}function sm(n=document.documentElement,t=!1){return $(n,"dragstart",t)}function rm(n=document.documentElement,t=!1){return $(n,"dragend",t)}function om(n=document.documentElement,t=!1){return $(n,"drop",t)}function am(n=document.documentElement,t=!1){return $(n,"dragenter",t)}function cm(n=document.documentElement,t=!1){return $(n,"dragleave",t)}function hm(n=document.documentElement,t=!1){return $(n,"dragover",t)}function lm(n=document.documentElement,t=!1){return $(n,"keydown",t)}function um(n=document.documentElement,t=!1){return $(n,"keyup",t)}function V_(n=document.documentElement,t=!1){return $(n,"keypress",t)}function Y_(n,t=!1){return $(n,"change",t)}function $_(n,t=!1){return $(n,"submit",t)}function G_(n=10){return $(window,"scroll",!0).pipe(lb(n))}function X_(){return $(document,"visibilitychange",!0).pipe(dt(()=>document.visibilityState==="visible"),Qe())}function j_(){return $(window,"storage",!1)}function W_(){return Bs($(window,"online",!1),$(window,"offline",!1)).pipe(dt(()=>navigator.onLine),Tn(navigator.onLine),Qe(),Nu({bufferSize:1,refCount:!0}))}function H_(n=document.documentElement,t){const e=t?.createMousePoint||Ln();return Br(n).pipe(dt(i=>(e.setCurrent(_t(i,n)),e)))}function fm(n=document.documentElement,t){const e=t?.createMousePoint||Ln();return Br(n).pipe(ub(Jd(n).pipe(Pn(i=>{e.setStart(_t(i,n),!0),t?.start?.(i,e)})),()=>Kd(n).pipe(Pn(i=>{e.setCurrent(_t(i,n),!1),t?.end?.(i,e)}))),cb(),dt(i=>(e.setCurrent(_t(i,n),!0),e)))}function dm(n=document.documentElement,t){const e=t?.createMousePoint||Ln();return Qd(n).pipe(Pn(i=>{const s=i.changedTouches[0];e.setStart(_t(s,n),!0),t?.start?.(s,e)}),Vs(()=>Zd(n).pipe(ma(Us(tm(n),em(n)).pipe(Pn(i=>{const s=i.changedTouches[0];e.setCurrent(_t(s,n),!1),t?.end?.(s,e)}))))),dt(i=>{const s=i.changedTouches[0];return e.setCurrent(_t(s,n),!0),e}))}function Ur(n=document.documentElement,t){const e=t?.createMousePoint||Ln();return hh(n).pipe(Pn(i=>{e.setStart(_t(i,n),!0),t?.start?.(i,e)}),Vs(()=>ch(n).pipe(ma(Us(lh(n),uh(n)).pipe(Pn(i=>{e.setCurrent(_t(i,n),!1),t?.end?.(i,e)}))))),dt(i=>(e.setCurrent(_t(i,n),!0),e)))}function q_(n=document.documentElement,t){return Us(fm(n,t),dm(n,t))}function mm(n=document.documentElement,t){const e=t?.createMousePoint||Ln();return Bs(Br(n),hh(n)).pipe(zu(i=>i instanceof PointerEvent?(e.setStart(_t(i,n),!0),t?.start?.(i,e),ch(n).pipe(ma(Us(lh(n),uh(n)).pipe(Pn(s=>{e.setCurrent(_t(s,n),!1),t?.end?.(s,e)}))))):i instanceof MouseEvent?k1(i):bu),dt(i=>(e.setCurrent(_t(i,n),i instanceof PointerEvent),e)))}function J_(n){return new ft(t=>Ur(n,{start:()=>{t.next(0)}}).subscribe(i=>{t.next(i.current.y-i.start.y)}).unsubscribe).pipe(Qe())}function K_(n,t){Sn(n,"draggable","true");const e=sm(n,!0).subscribe(r=>{tn(r),Fu(r);const o=r.dataTransfer;o&&(o.effectAllowed="move",o.setData("text/plain","some-data")),t?.onStart?.(r)}),i=im(n).subscribe(r=>{tn(r),t?.onDrag?.(r)}),s=rm(n).subscribe(r=>{tn(r),t?.onEnd?.(r)});return()=>{e.unsubscribe(),i.unsubscribe(),s.unsubscribe()}}function Z_(n,t){const e=am(n).subscribe(o=>{tn(o),t?.onEnter?.(o)}),i=hm(n).subscribe(o=>{tn(o);const a=o.dataTransfer;a&&(a.dropEffect="move"),t?.onOver?.(o)}),s=cm(n).subscribe(o=>{tn(o),t?.onLeave?.(o)}),r=om(n).subscribe(o=>{tn(o);const a=o.dataTransfer;if(!a){t?.onDrop?.(o,[]);return}t?.onDrop?.(o,[...a.files])});return()=>{e.unsubscribe(),i.unsubscribe(),s.unsubscribe(),r.unsubscribe()}}function Q_(){return{screenWidth:window.screen.width,screenHeight:window.screen.height,innerWidth:window.innerWidth,innerHeight:window.innerHeight,screenX:window.screenX,screenY:window.screenY,pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset}}function ai(){const n=document.documentElement||document.body;return{el:n,clientWidth:n.clientWidth,clientHeight:n.clientHeight,clientTop:n.clientTop,clientLeft:n.clientLeft,scrollWidth:n.scrollWidth,scrollHeight:n.scrollHeight,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft,offsetWidth:n.offsetWidth,offsetHeight:n.offsetHeight,offsetTop:n.offsetTop,offsetLeft:n.offsetLeft,offsetParent:n.offsetParent}}function pm(){const{clientWidth:n,clientHeight:t,scrollLeft:e,scrollTop:i}=ai();return{width:window.innerWidth||n,height:window.innerHeight||t,x:window.pageXOffset||e,y:window.pageYOffset||i}}function tS(){const{scrollWidth:n,scrollHeight:t,scrollLeft:e,scrollTop:i}=ai();return{width:n,height:t,scrollX:window.pageXOffset||e,scrollY:window.pageYOffset||i}}function fh(n){return n.getBoundingClientRect()}function eS(n){return{x:n.offsetLeft,y:n.offsetTop,width:n.offsetWidth,height:n.offsetHeight}}function dh(n){const{top:t,left:e,width:i,height:s}=n.getBoundingClientRect(),{scrollLeft:r,scrollTop:o}=ai();return{x:e+r,y:t+o,width:i,height:s}}function nS(n){let t=n,e=0,i=0;for(;t!==null;)e+=t.offsetLeft,i+=t.offsetTop,t.offsetParent instanceof HTMLElement?t=t.offsetParent:t=null;return{x:e,y:i,width:n.offsetWidth,height:n.offsetHeight}}function iS(){const{clientHeight:n,scrollTop:t,scrollHeight:e}=ai(),i=e-n;return i<=0?0:t/i*100}function sS(n){const t=pm(),e=fh(n);return e.bottom>=0&&e.top<=t.height&&e.right>=0&&e.left<=t.width}function rS(n){if("center"in n){const t=n.center,e=fh(n.target);return{x:t.x-e.x,y:t.y-e.y}}return{x:n.clientX,y:n.clientY}}function mh(n){if("center"in n)return n.center;if(typeof n.pageX=="number"&&typeof n.pageY=="number")return{x:n.pageX,y:n.pageY};const{scrollLeft:t,scrollTop:e}=ai();return{x:n.clientX+t,y:n.clientY+e}}function _t(n,t){const e={x:0,y:0};if(t){const i=mh(n),s=dh(t);e.x=Y(i.x-s.x,0,s.width),e.y=Y(i.y-s.y,0,s.height)}else{let i=0,s=0;if("currentTarget"in n&&n.currentTarget&&n.target&&n.currentTarget!=n.target){const r=n.currentTarget.getBoundingClientRect(),o=n.target.getBoundingClientRect();i=o.left-r.left,s=o.top-r.top}if("offsetX"in n)e.x=n.offsetX+i,e.y=n.offsetY+s;else{const r=mh(n),o=dh(n.target);e.x=Y(r.x-o.x+i,0,o.width),e.y=Y(r.y-o.y+s,0,o.height)}}return e}function oS(n){let t=0;return n||(n=window.event),n.wheelDelta?(t=n.wheelDelta/120,window.opera&&(t=-t)):n.detail&&(t=-n.detail/3),t}function aS(n){if(document.implementation.hasFeature("MouseEvents","2.0"))return n.button;switch(n.button){case 0:case 1:case 3:case 5:case 7:return 0;case 2:case 6:return 2;case 4:return 1}}const cS={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 hS(n){if(n.key)return n.key;if(n.keyCode)return n.keyCode;if(n.which)return n.which}function gm(n,t){const e=t.ctrl||!1,i=t.shift||!1,s=t.alt||!1;return(e===n.metaKey||e===n.ctrlKey)&&i===n.shiftKey&&s===n.altKey&&t.keys.map(r=>r.toLowerCase()).includes(n.key.toLowerCase())}function ym(n){return lm(n.target||document||window).pipe(fa(t=>gm(t,n)),dt(t=>{t.stopPropagation(),t.preventDefault()}))}function lS(n){return um(n.target||document||window).pipe(fa(t=>gm(t,n)),dt(t=>{t.stopPropagation(),t.preventDefault()}))}function bm(n={keys:["o"]},t=ie.text){return ym(n).pipe(Vs(async()=>await Ud(t)))}async function uS(n={keys:["o"]},t=ie.text){return L1(bm(n,t))}function fS(){const n={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,i){n.x=e.x,n.y=e.y,n.isDown=typeof i=="boolean"?i:!1,this.setCurrentMousePoint(e,i)},setCurrentMousePoint:(e,i)=>{const s=t.x,r=t.y;t.x=e.x,t.y=e.y,t.dx=t.x-s,t.dy=t.y-r,t.dStartX=t.x-n.x,t.dStartY=t.y-n.y,t.isDown=typeof i=="boolean"?i:!1}}}function dS(n=document.documentElement){const t=new go,e=gt(n);let i=[];const s=fS(),r=s.mousePoint,o=O=>{t.emit("mouseDown",O)},a=O=>{t.emit("mouseUp",O)},c=O=>{r.isDown||s.setCurrentMousePoint(_t(O,n)),t.emit("mouseMove",O)},h=O=>{t.emit("mouseOver",O)},l=O=>{t.emit("mouseOut",O)},u=O=>{t.emit("mouseEnter",O)},d=O=>{t.emit("mouseLeave",O)},f=O=>{t.emit("mouseClick",O)},p=O=>{t.emit("mouseDoubleClick",O)},m=O=>{t.emit("mouseWheel",O)},v=O=>{t.emit("mouseContextMenu",O)},y=O=>{t.emit("touchStart",O)},b=O=>{t.emit("touchEnd",O)},x=O=>{t.emit("touchCancel",O)},w=O=>{const yt=O.changedTouches[0];r.isDown||s.setCurrentMousePoint(_t(yt,n)),t.emit("touchMove",O)},C=O=>{t.emit("pointerDown",O)},S=O=>{t.emit("pointerUp",O)},D=O=>{t.emit("pointerCancel",O)},L=O=>{t.emit("pointerMove",O)},I=O=>{t.emit("pan",O)},F=O=>{t.emit("panStart",O)},U=O=>{t.emit("panMove",O)},X=O=>{t.emit("panEnd",O)},Z=O=>{t.emit("panCancel",O)},at=O=>{t.emit("panLeft",O)},nt=O=>{t.emit("panRight",O)},rt=O=>{t.emit("panUp",O)},Q=O=>{t.emit("panDown",O)},St=O=>{t.emit("pinch",O)},z=O=>{t.emit("pinchin",O)},R=O=>{t.emit("pinchout",O)},H=O=>{t.emit("press",O)},ot=O=>{t.emit("rotate",O)},Xt=O=>{t.emit("swipe",O)},ye=O=>{t.emit("swipeLeft",O)},Xr=O=>{t.emit("swipeRight",O)},jr=O=>{t.emit("swipeUp",O)},Pt=O=>{t.emit("swipeDown",O)},Ee=O=>{t.emit("tap",O)},mt=O=>{!O.target||n==O.target||n.contains(O.target)||t.emit("tapOutSide",O)},Nt=O=>{t.emit("transitionstart",O)},ci=O=>{t.emit("transitionend",O)},zn=O=>{t.emit("animationstart",O)},Nn=O=>{t.emit("animationend",O)};let gn={...n.getBoundingClientRect(),width:n.offsetWidth,height:n.offsetHeight};return{el:n,get rect(){return gn},mousePoint:r,eb:t,start:async function(){i.push(st(n,"mousedown",o)),i.push(st(n,"mouseup",a)),i.push(st(n,"mousemove",c)),i.push(st(n,"mouseover",h)),i.push(st(n,"mouseout",l)),i.push(st(n,"mouseenter",u)),i.push(st(n,"mouseleave",d)),i.push(st(n,"click",f)),i.push(st(n,"dblclick",p)),i.push(st(n,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",m)),i.push(st(n,"contextmenu",v)),i.push(st(n,"touchstart",y)),i.push(st(n,"touchend",b)),i.push(st(n,"touchcancel",x)),i.push(st(n,"touchmove",w)),i.push(st(n,"pointerdown",C)),i.push(st(n,"pointerup",S)),i.push(st(n,"pointercancel",D)),i.push(st(n,"pointermove",L)),e.on("pan",I),e.on("panstart",F),e.on("panmove",U),e.on("panend",X),e.on("pancancel",Z),e.on("panleft",at),e.on("panright",nt),e.on("panup",rt),e.on("pandown",Q),e.on("pinch",St),e.on("pinchin",z),e.on("pinchout",R),e.on("press",H),e.on("rotate",ot),e.on("swipe",Xt),e.on("swipeleft",ye),e.on("swiperight",Xr),e.on("swipeup",jr),e.on("swipedown",Pt),e.on("tap",Ee),i.push(st(document,"pointerdown",mt)),i.push(st(n,"transitionstart",Nt)),i.push(st(n,"transitionend",ci)),i.push(st(n,"animationstart",zn)),i.push(st(n,"animationend",Nn));const O=await qd(n,yt=>{gn=yt,t.emit("resize",yt)});i.push(O),i.push(wm(this,{start:yt=>{s.setStartMousePoint(_t(yt,n),!0)},move:yt=>{s.setCurrentMousePoint(_t(yt,n))},end:yt=>{s.setCurrentMousePoint(_t(yt,n),!1)}}))},end:()=>{t.removeAllListeners(),i.forEach(O=>O()),i=[],e.off("pan",I),e.off("panstart",F),e.off("panmove",U),e.off("panend",X),e.off("pancancel",Z),e.off("panleft",at),e.off("panright",nt),e.off("panup",rt),e.off("pandown",Q),e.off("pinch",St),e.off("pinchin",z),e.off("pinchout",R),e.off("press",H),e.off("rotate",ot),e.off("swipe",Xt),e.off("swipeleft",ye),e.off("swiperight",Xr),e.off("swipeup",jr),e.off("swipedown",Pt),e.off("tap",Ee)}}}function wm(n,t){return vm(n,t)}function vm(n,t){const e=n.eb,i=o=>{e.on("pointerMove",r),e.on("pointerUp",s),e.on("pointerCancel",s),t?.start?.(o)},s=o=>{e.off("pointerMove",r),e.off("pointerUp",s),e.off("pointerCancel",s),t?.end?.(o)},r=o=>{t?.move?.(o)};return e.on("pointerDown",i),()=>e.off("pointerDown",i)}function mS(n,t){const e=n.eb,i=o=>{document.addEventListener("mousemove",r,!1),document.addEventListener("mouseup",s,!1),t?.start?.(o)},s=o=>{document.removeEventListener("mousemove",r,!1),document.removeEventListener("mouseup",s,!1),t?.end?.(o)},r=o=>{t?.move?.(o)};return e.on("mouseDown",i),()=>e.off("mouseDown",i)}function pS(n,t){const e=n.eb,i=o=>{e.on("touchMove",r),e.on("touchEnd",s),e.on("touchCancel",s);const a=o.changedTouches[0];t?.start?.(a)},s=o=>{e.off("touchMove",r),e.off("touchEnd",s),e.off("touchCancel",s);const a=o.changedTouches[0];t?.end?.(a)},r=o=>{const a=o.changedTouches[0];t?.move?.(a)};return e.on("touchStart",i),()=>e.off("touchStart",i)}function gS(n,t,e){if(typeof t=="string"&&(t=zh(t)),(typeof t=="string"||t===void 0)&&e===void 0){const i=Object.assign({},n.dataset);return Object.keys(i).forEach(s=>{if(i[s]?.startsWith("[")||i[s]?.startsWith("{"))try{i[s]=JSON.parse(i[s]||"")}catch{}}),typeof t=="string"?i[t]:i}else{let i={};typeof t=="object"?i=t:typeof t=="string"&&(i[t]=e),Object.entries(i).forEach(([s,r])=>{r?n.dataset[s]=r instanceof Object?JSON.stringify(r):r:delete n.dataset[s]})}}function yS(n,t){t.split(/[,\s]+/).forEach(e=>{e.trim()!=""&&delete n.dataset[e.trim()]})}function xm(n,t={attributes:!0,childList:!0,subtree:!0}){return new ft(e=>{const i=new MutationObserver((s,r)=>{e.next(s)});return i.observe(n,t),()=>{i.disconnect()}})}function bS(n,t){return new Promise(e=>{new MutationObserver((s,r)=>{for(const o of s)o.type==="childList"&&o.addedNodes.forEach(a=>{a.isEqualNode(t)&&(r.disconnect(),e(!0))})}).observe(n,{childList:!0})})}function _m(n,t={root:null}){return new ft(e=>{const i=new IntersectionObserver((s,r)=>{if(s.length){const o=s[s.length-1];o&&e.next(o)}},t);return i.observe(n),()=>{i.unobserve(n),i.disconnect()}})}function wS(n,t){const e=t?.threshold??.5;return _m(n,{threshold:e,root:t?.root}).pipe(dt(i=>i.isIntersecting&&i.intersectionRatio>=e),Qe())}function ph(n,t){const e=typeof n=="string"?n:n.toString(),i=()=>{try{const a=window.sessionStorage.getItem(e);if(a)return JSON.parse(a)}catch{}},s=a=>{try{typeof a.value<"u"?window.sessionStorage.setItem(e,JSON.stringify(a)):window.sessionStorage.removeItem(e)}catch{}};return{get:()=>{const{get:a}=Rs(i(),t);return a().value},set:a=>{const{set:c}=Rs(i(),t),h=c(a);s(h)}}}function vS(){window.sessionStorage.clear()}function Sm(){return xm(document).pipe(dt(()=>location),Tn(location))}function xS(){return Sm().pipe(dt(n=>n.href),Tn(location.href),Qe())}function _S(){return $(window,"hashchange").pipe(dt(n=>n.target.location.hash.replace("#","")),Tn(window.location.hash.replace("#","")),Qe())}function Cm(n="current"){return $(window,"popstate").pipe(dt(t=>t.state||{}),dt(t=>({...t,[n]:t[n]||window.location.pathname+window.location.search+window.location.hash})),Qe((t,e)=>t[n]===e[n]))}function SS(n={nameInState:"current",alreadyPushState:!0}){const t=n.nameInState,e=typeof n.alreadyPushState=="boolean"?n.alreadyPushState:!0,{get:i,set:s}=ph("fe-route-history"),r=i()||[],{get:o,set:a}=ph("fe-route-history-index"),c=o();let h=typeof c=="number"?c:r.length-1;function l(y){return r.findIndex(x=>x[t]===y[t])}const u={currentIndex:h};function d(y){y=Y(y,-1,r.length-1),h<0?(u.direction="keep",u.delta=0):(y<h?u.direction="backward":y>h?u.direction="forward":u.direction="keep",u.delta=y-h),u.from=u.to,u.to=r[y]?.[t],h=y,u.currentIndex=h,a(h)}d(h);function f(y){r.push(y),s(r),d(r.length-1)}function p(y,b){const x={...b,[t]:y};window.history.pushState(x,"",y),f(x)}function m(y,b=e){const x=l(y);if(x<0){h>=0&&(r.splice(h+1),s(r)),b?f(y):p(y[t],y);return}x!=h&&d(x)}const v=Cm().subscribe(y=>{m(y,!0)});return{history:r,route:u,navigate:(y,b)=>{m({...b,[t]:y},e)},go(y){window.history.go(y)},back(){window.history.back()},forward(){window.history.forward()},destroy:()=>{v.unsubscribe()}}}function Em(n="(prefers-color-scheme: dark)"){const t=window.matchMedia(n);return $(t,"change").pipe(dt(e=>e.matches),Tn(t.matches),Qe())}let Tm=!1;function CS(){Tm||(Tm=!0,ru(`
|
|
100
94
|
:root {
|
|
101
95
|
--sat:env(safe-area-inset-top, 0px);
|
|
102
96
|
--sar:env(safe-area-inset-right, 0px);
|
|
@@ -109,9 +103,15 @@ Content-Type: `+f.type+`\r
|
|
|
109
103
|
--sab:env(safe-area-inset-bottom, 0px);
|
|
110
104
|
--sal:env(safe-area-inset-left, 0px);
|
|
111
105
|
}
|
|
112
|
-
`))}wS();function vS(){return sh(document.documentElement).pipe(aa(sa),dt(()=>{const n=getComputedStyle(document.documentElement);return{bottom:n.getPropertyValue("--sab"),top:n.getPropertyValue("--sat"),right:n.getPropertyValue("--sar"),left:n.getPropertyValue("--sal")}}))}function xS(n={enableHighAccuracy:!0,timeout:5e3,maximumAge:0}){return new ft(t=>{if(!("geolocation"in navigator))return t.error("navigator.geolocation is not available.");let e;return new Promise((i,s)=>{navigator.geolocation.getCurrentPosition(r=>{t.next({longitude:r.coords.longitude,latitude:r.coords.latitude}),i()},r=>{s(r)})}).then(()=>{e=navigator.geolocation.watchPosition(i=>{t.next({longitude:i.coords.longitude,latitude:i.coords.latitude})},i=>{t.error(i)},n)}).catch(i=>{t.error(i)}),()=>{typeof e=="number"&&navigator.geolocation.clearWatch(e)}})}function Tm(n,t={},e=[]){return typeof n=="string"?{tag:n,props:t,children:typeof e=="string"?e:e.filter(i=>typeof i!="boolean")}:n(t)}function Ur(n){const t=Tm(n.tagName,qo(n),Array.from(n.children).map(e=>Ur(e)));return t.el=n,t}function Xe(n,t=document.documentElement){if(typeof n=="string"){const i=document.createTextNode(n);return t.appendChild(i),i}if(n.el)return n.el;const e=n.tag=="path"?_a():document.createElement(n.tag);if(n.props)for(const[i,s]of Object.entries(n.props))i.startsWith("on")?e.addEventListener(i.slice(2).toLowerCase(),s):i==="style"?vi(e,s):Sn(e,i,s);return t.appendChild(e),n.el=e,n.children&&(typeof n.children=="string"?Xe(n.children,e):n.children.forEach(i=>{Xe(i,e)})),e}function es(n,t){typeof n=="string"||!n.el||(Array.isArray(n.children)&&n.children.forEach(e=>{n.el&&es(e,n.el)}),t.removeChild(n.el))}function Vr(n,t,e){if(!n.el||!t.el)return;e=e||n.el.parentElement||document.body||document.documentElement;const i=n.props.key,s=t.props.key;if(n.tag!==t.tag||n.el!==t.el||(s||i)&&s!==i){e.replaceChild(Xe(t,e),n.el);return}const r=t.el=n.el,o=n.props,a=t.props;for(const l in o)l in a||(l.startsWith("on")?r.removeEventListener(l.slice(2).toLowerCase(),o[l]):r.removeAttribute(l));for(const l in a){const u=o[l],d=a[l];if(d!=u)if(l.startsWith("on")){const f=l.slice(2).toLowerCase();r.removeEventListener(f,u),r.addEventListener(f,d)}else if(l==="style"){for(const f in u)f in d||Ho(r,f);vi(r,d)}else Sn(r,l,d)}const c=n.children||[],h=t.children||[];if(typeof h=="string")r.innerHTML="",Xe(h,r);else if(typeof c=="string")r.innerHTML="",h.forEach(l=>{Xe(l,r)});else{const l=Math.min(c.length,h.length);for(let u=0;u<l;u++)Vr(c[u],h[u],r);h.length>c.length?h.slice(c.length).forEach(u=>{Xe(u,r)}):h.length<c.length&&c.slice(h.length).forEach(u=>{es(u,r)})}}function Pm(n=document.documentElement,t,e){t.el?!e||!e.el?(es(t,n),Xe(t,n)):Vr(e,t,n):(e&&es(e,n),Xe(t,n))}const Yr=new Map;function mh(n,t=Yr){let e=t.get(n);return e||(e=Ur(n),t.set(n,e),e)}function $r(n,t,e=Yr){const i=mh(n,e);i.alternate||(i.alternate=Ur(n),Vn(i.alternate.props,i.props,!0)),t(i.alternate)}function Am(n=Yr){const t=Array.from(n.entries());for(const[e,i]of t){const s=i.alternate;s&&(Vr(i,s),i.props=s.props,i.alternate=void 0)}}function ph(n=Yr){Eg(()=>Am(n),50)}function _S(){const n=new Map;let t=null;const e=new Set;let i=!1;function s(p){const m=t,v=m.stateIndex;v in m.states||(m.states[v]=p);function y(b){let x;typeof b=="function"?x=b(m.states[v]):x=b,m.states[v]!==x&&(m.states[v]=x,l(m))}return m.stateIndex++,[m.states[v],y]}function r(p){const[m,v]=s({current:p});return m}function o(p,m){const v=t,y=v.effectIndex;v.pendingEffects||(v.pendingEffects=[]),v.pendingEffects.push({effect:p,deps:m,idx:y}),v.effectIndex++}function a(p){p.pendingEffects&&(p.pendingEffects.forEach(({effect:m,deps:v,idx:y})=>{const b=p.effects[y];if(!v||!b||!b.deps||v.length!==b.deps.length||v.some((w,C)=>w!==b.deps[C])){b.cleanup?.();const w=m();if(w instanceof Promise)throw new Error("useEffect callback must not return Promise");p.effects[y]={deps:v?[...v]:void 0,cleanup:w}}}),p.pendingEffects=[])}function c(p){const m=r(p);return m.current=p,h((...v)=>m.current(...v),[])}function h(p,m){const v=t,y=v.callbackIndex,b=v.callbacks[y]||{fn:p,deps:void 0};return(!m||!b.deps||m.length!==b.deps.length||m.some((w,C)=>w!==b.deps[C]))&&(b.fn=p,b.deps=m?[...m]:void 0),v.callbacks[y]=b,v.callbackIndex++,b.fn}function l(p){e.add(p),i||(i=!0,setTimeout(u,0))}function u(){for(;e.size;){const p=[...e];e.clear(),p.forEach(m=>{d(m.component,m.container,m.props)})}i=!1}function d(p,m,v={}){let y=n.get(m);!y||y.component!==p?(y={component:p,props:v,states:[],stateIndex:0,effects:[],effectIndex:0,pendingEffects:[],callbacks:[],callbackIndex:0,children:[],mounted:!1,container:m,vnode:void 0},n.set(m,y)):y.props=v,t=y,y.stateIndex=0,y.effectIndex=0,y.callbackIndex=0;const b=p(v);return Pm(m,b,y.vnode),y.vnode=b,y.mounted=!0,t=null,a(y),y}function f(p){p.effects.forEach(m=>m.cleanup?.()),p.children&&p.children.forEach(f),p.container&&"innerHTML"in p.container&&(p.container.innerHTML=""),n.delete(p.container)}return{useState:s,useRef:r,useEffect:o,useEffectEvent:c,useCallback:h,render:d,unmount:f,scheduleRender:l}}function Mm(){let n;function t(d){n=d,d(),n=null}class e{subscribers=new Set;add(){n&&!this.subscribers.has(n)&&this.subscribers.add(n)}notify(){this.subscribers.forEach(f=>f())}}const i=new WeakMap;function s(d,f){let p=i.get(d);p||(p=new Map,i.set(d,p));let m=p.get(f);return m||(m=new e,p.set(f,m)),m}function r(d,f,p=o){if(!Array.isArray(d))return;const m=Array.prototype,v=Object.create(m);["push","pop","shift","unshift","splice","sort","reverse"].forEach(y=>{v[y]=function(...b){return["push","unshift","splice"].includes(y)&&(y==="splice"?b.slice(2):b).forEach((w,C)=>{bn(w)&&(b[C]=p(w)),f.add()}),m[y].apply(this,b),this.slice()}}),Object.setPrototypeOf(d,v),d.forEach((y,b)=>{bn(y)&&(d[b]=p(y)),f.add()})}function o(d){return Object.keys(d).forEach(f=>{const p=s(d,f);let m=d[f];Object.defineProperty(d,f,{configurable:!0,enumerable:!0,get(){return bn(m)&&(Array.isArray(m)?r(m,p,o):o(m)),p.add(),m},set(v){m!==v&&(m=v,p.notify())}})}),d}function a(d){return o({value:d})}const c=h;function h(d){if(!bn(d))return d;const f={get(m,v,y){let b=Reflect.get(m,v,y);const x=s(m,v);if(bn(b)&&!("isYZProxy"in b)){const w=h(b);Array.isArray(b)&&(w.YZProxyArrayDep=x),b=w}return x.add(),b},set(m,v,y,b){const x=Reflect.get(m,v,b),w=Reflect.set(m,v,y,b);if(v=="YZProxyArrayDep")return w;if(x!==y){let C;Array.isArray(m)?C=m.YZProxyArrayDep:C=s(m,v),C.notify()}return w},deleteProperty(m,v){if(!(v in m))return!1;let b=typeof v=="symbol"?void 0:m[v];bn(b)&&(b=Array.isArray(b)?[...b]:{...b});const x=Reflect.deleteProperty(m,v);if(x){let w;Array.isArray(m)?w=m.YZProxyArrayDep:w=s(m,v),w.notify()}return x},has(m,v){return v==="isYZProxy"||v in m}};return new Proxy(d,f)}function l(d,f){const p=h(d);return u(p,f),p}function u(d,f){f.childNodes.forEach(p=>{switch(p.nodeType){case 1:const m=p;[...m.attributes].forEach(x=>{const w=x.name,C=x.value;if(w==="v-model")if(nh(m)){const S=m;t(()=>{S.checked=Me(d,C)==S.value}),S.addEventListener("change",D=>{ro(d,C,D.target.value)})}else if(eh(m)){const S=m;t(()=>{S.checked=$h(Me(d,C),S.value)}),S.addEventListener("change",D=>{const L=D.target,I=L.value;L.checked?Zp(Me(d,C),I):Gh(Me(d,C),I)})}else if(th(m)){const S=m;t(()=>{S.value=Me(d,C)}),S.addEventListener("change",D=>{ro(d,C,D.target.value)})}else{const S=m;t(()=>{S.value=Me(d,C)});const D=L=>{ro(d,C,L.target.value)};S.addEventListener("input",D)}else w==="v-text"?t(()=>{m.innerText=Me(d,C)}):w==="v-html"&&t(()=>{m.innerHTML=Me(d,C)})}),m.childNodes.length>0&&u(d,m);break;case 3:const v=p.textContent||"",y=/\{\{\s*([^{}\s]+)\s*\}\}/g,b=y.exec(v);b&&b[1]&&t(()=>{p.textContent=v.replace(y,Me(d,b[1]))});break}})}return{watchEffect:t,reactiveVue2:o,ref:a,reactiveVue3:h,reactive:c,mvvm:l}}const SS=Mm();function Dm(n,t,e){return new WebSocket(n)}function CS(n){return`${n}eventbus/${wp(3)}/${kh(8)}/websocket`}class Ce{static CONNECTING=WebSocket.CONNECTING;static OPEN=WebSocket.OPEN;static CLOSING=WebSocket.CLOSING;static CLOSED=WebSocket.CLOSED;url;socketCreatorProtocols;socketCreatorOptions;socketCreator;socket;state=Ce.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||Dm,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=Ce.CLOSING,this.socket?.close()}_connect(){this.socket?.readyState===Ce.CONNECTING||this.socket?.readyState===Ce.OPEN||(this.state=Ce.CONNECTING,this.socket=this.socketCreator(this.url,this.socketCreatorProtocols,this.socketCreatorOptions),this.socket.onopen=()=>{Je(`(${this.url}) onopen`),this.state=Ce.OPEN,this.reconnectTimerID&&(clearTimeout(this.reconnectTimerID),this.reconnectTimerID=void 0);const t=this.messageQueue.slice();this.messageQueue=[],t.forEach(this._send.bind(this)),this.ping(),this.pingTimerID=setInterval(this.ping.bind(this),this.pingInterval),this.onopen?.()},this.socket.onclose=t=>{const{code:e,reason:i,wasClean:s}=t;Je(`(${this.url}) onclose: code(${e}) reason(${i}) wasClean(${s})`),this.state=Ce.CLOSED,this.socket=void 0,this.pingTimerID&&(clearInterval(this.pingTimerID),this.pingTimerID=void 0),this.onclose?.(t),this.reconnect&&this.reconnectAttempts<this.maxReconnectAttempts&&(this.reconnectTimerID=setTimeout(this._connect.bind(this),ag(this.reconnectAttempts++)))},this.socket.onerror=t=>{Je(`(${this.url}) onerror: ${t}`),this.onerror?.(t)},this.socket.onmessage=t=>{if(Je(`(${this.url}) onmessage: { type: ${t.type}, data: ${t.data} }`),typeof t.data=="string"){let e;const i=t.data.substring(1);try{e=JSON.parse(i)}catch(s){e=[JSON.stringify({type:"err",failureCode:"fe-json-parse-error",failureType:s.toString(),message:i})]}e.forEach(s=>{const r=JSON.parse(s);if(r.body&&Object.prototype.hasOwnProperty.call(r.body,"requestid")){const o=this.waitings[r.body.requestid];o?o.resolve?.(r.body):re(`(${this.url}) onmessage: found no associated request, already timed out`)}else if(this.listeners[r.address]){const o=this.listeners[r.address];for(let a=0;a<o.length;a++)r.type==="err"?o[a]({failureCode:r.failureCode,failureType:r.failureType,message:r.message}):o[a](null,r.body)}else this.onunhandled(r)})}else t.data instanceof ArrayBuffer?re(`(${this.url}) onmessage: unhandle ArrayBuffer`):t.data instanceof Blob&&re(`(${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===Ce.OPEN?this.socket.send(JSON.stringify([JSON.stringify(t)])):(this.messageQueue.push(t),this._connect())}ping(){this._send({type:"ping"})}register(t,e,i={}){this.listeners[t]||(this.listeners[t]=[],this._send({type:"register",address:t,headers:Vn(i,this.socketCreatorOptions.headers,!1)})),this.listeners[t].push(e)}unregister(t,e,i={}){const s=this.listeners[t];if(s){const r=s.indexOf(e);r!=-1&&(s.splice(r,1),s.length===0&&(this._send({type:"unregister",address:t,headers:Vn(i,this.socketCreatorOptions.headers,!1)}),delete this.listeners[t]))}}publish(t,e,i={}){this._send({type:"publish",address:t,headers:Vn(i,this.socketCreatorOptions.headers,!1),body:e})}async send(t,e,i={},s=3e4){this.requestid++;const r=this.waitings[this.requestid]={requestid:this.requestid},o=await new Promise((a,c)=>{r.resolve=a,this._send({type:"send",address:t,headers:Vn(i,this.socketCreatorOptions.headers,!1),body:{requestid:r.requestid,...e}}),setTimeout(()=>{c(`(${this.url}) send(${r.requestid}: ${ps(e)}) Timeout!`)},s)});return delete this.waitings[r.requestid],o}}function ES(n=750){const t=document.documentElement,e=window.top===window.self?window.devicePixelRatio:1;t.dataset.dpr=e;let i=100;const s=function(){t.style.height=window.innerHeight+"px";const r=t.clientWidth;t.dataset.width=r,t.dataset.layout=r>n?"pc":"mobile",t.dataset.rem=i=Math.min(100,Math.round(100*(r/n))),t.style.fontSize=i+"px"};s(),window.rem2px=function(r){return parseFloat(r)*i},window.px2rem=function(r){return parseFloat(r)/i},window.addEventListener&&window.addEventListener("orientationchange"in window?"orientationchange":"resize",s,!1)}class TS{localVideoUtil;remoteVideoUtil;localPeerConnection=null;remotePeerConnection=null;constructor(t,e){this.localVideoUtil=new ts(t),this.remoteVideoUtil=new ts(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(i=>{this.localVideoUtil.setSrcObject(i),t(i)}).catch(i=>{this.trace(`navigator.getUserMedia error: ${i}.`),e(i)})})}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(),i=t.getAudioTracks();e.length>0&&this.trace(`Using video device: ${e[0].label}.`),i.length>0&&this.trace(`Using audio device: ${i[0].label}.`);const s=void 0,r=new RTCPeerConnection(s);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(s);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(i[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,i=t.candidate;if(e&&i){const s=new RTCIceCandidate(i),r=this.getOtherPeer(e);r&&(r.addIceCandidate(s).then(()=>{this.handleConnectionSuccess(e)}).catch(o=>{this.handleConnectionFailure(e,o)}),this.trace(`${this.getPeerName(e)} ICE candidate:
|
|
106
|
+
`))}function ES(){return CS(),rh(document.documentElement).pipe(ca(ra),dt(()=>{const n=getComputedStyle(document.documentElement);return{bottom:n.getPropertyValue("--sab"),top:n.getPropertyValue("--sat"),right:n.getPropertyValue("--sar"),left:n.getPropertyValue("--sal")}}))}function TS(n={enableHighAccuracy:!0,timeout:5e3,maximumAge:0}){return new ft(t=>{if(!("geolocation"in navigator))return t.error("navigator.geolocation is not available.");let e;return new Promise((i,s)=>{navigator.geolocation.getCurrentPosition(r=>{t.next({longitude:r.coords.longitude,latitude:r.coords.latitude}),i()},r=>{s(r)})}).then(()=>{e=navigator.geolocation.watchPosition(i=>{t.next({longitude:i.coords.longitude,latitude:i.coords.latitude})},i=>{t.error(i)},n)}).catch(i=>{t.error(i)}),()=>{typeof e=="number"&&navigator.geolocation.clearWatch(e)}})}function Pm(n,t={},e=[]){return typeof n=="string"?{tag:n,props:t,children:typeof e=="string"?e:e.filter(i=>typeof i!="boolean")}:n(t)}function Vr(n){const t=Pm(n.tagName,Jo(n),Array.from(n.children).map(e=>Vr(e)));return t.el=n,t}function Xe(n,t=document.documentElement){if(typeof n=="string"){const i=document.createTextNode(n);return t.appendChild(i),i}if(n.el)return n.el;const e=n.tag=="path"?Sa():document.createElement(n.tag);if(n.props)for(const[i,s]of Object.entries(n.props))i.startsWith("on")?e.addEventListener(i.slice(2).toLowerCase(),s):i==="style"?vi(e,s):Sn(e,i,s);return t.appendChild(e),n.el=e,n.children&&(typeof n.children=="string"?Xe(n.children,e):n.children.forEach(i=>{Xe(i,e)})),e}function es(n,t){typeof n=="string"||!n.el||(Array.isArray(n.children)&&n.children.forEach(e=>{n.el&&es(e,n.el)}),t.removeChild(n.el))}function Yr(n,t,e){if(!n.el||!t.el)return;e=e||n.el.parentElement||document.body||document.documentElement;const i=n.props.key,s=t.props.key;if(n.tag!==t.tag||n.el!==t.el||(s||i)&&s!==i){e.replaceChild(Xe(t,e),n.el);return}const r=t.el=n.el,o=n.props,a=t.props;for(const l in o)l in a||(l.startsWith("on")?r.removeEventListener(l.slice(2).toLowerCase(),o[l]):r.removeAttribute(l));for(const l in a){const u=o[l],d=a[l];if(d!=u)if(l.startsWith("on")){const f=l.slice(2).toLowerCase();r.removeEventListener(f,u),r.addEventListener(f,d)}else if(l==="style"){for(const f in u)f in d||qo(r,f);vi(r,d)}else Sn(r,l,d)}const c=n.children||[],h=t.children||[];if(typeof h=="string")r.innerHTML="",Xe(h,r);else if(typeof c=="string")r.innerHTML="",h.forEach(l=>{Xe(l,r)});else{const l=Math.min(c.length,h.length);for(let u=0;u<l;u++)Yr(c[u],h[u],r);h.length>c.length?h.slice(c.length).forEach(u=>{Xe(u,r)}):h.length<c.length&&c.slice(h.length).forEach(u=>{es(u,r)})}}function Am(n=document.documentElement,t,e){t.el?!e||!e.el?(es(t,n),Xe(t,n)):Yr(e,t,n):(e&&es(e,n),Xe(t,n))}const $r=new Map;function gh(n,t=$r){let e=t.get(n);return e||(e=Vr(n),t.set(n,e),e)}function Gr(n,t,e=$r){const i=gh(n,e);i.alternate||(i.alternate=Vr(n),Vn(i.alternate.props,i.props,!0)),t(i.alternate)}function Mm(n=$r){const t=Array.from(n.entries());for(const[e,i]of t){const s=i.alternate;s&&(Yr(i,s),i.props=s.props,i.alternate=void 0)}}function yh(n=$r){Mg(()=>Mm(n),50)}function PS(){const n=new Map;let t=null;const e=new Set;let i=!1;function s(p){const m=t,v=m.stateIndex;v in m.states||(m.states[v]=p);function y(b){let x;typeof b=="function"?x=b(m.states[v]):x=b,m.states[v]!==x&&(m.states[v]=x,l(m))}return m.stateIndex++,[m.states[v],y]}function r(p){const[m,v]=s({current:p});return m}function o(p,m){const v=t,y=v.effectIndex;v.pendingEffects||(v.pendingEffects=[]),v.pendingEffects.push({effect:p,deps:m,idx:y}),v.effectIndex++}function a(p){p.pendingEffects&&(p.pendingEffects.forEach(({effect:m,deps:v,idx:y})=>{const b=p.effects[y];if(!v||!b||!b.deps||v.length!==b.deps.length||v.some((w,C)=>w!==b.deps[C])){b.cleanup?.();const w=m();if(w instanceof Promise)throw new Error("useEffect callback must not return Promise");p.effects[y]={deps:v?[...v]:void 0,cleanup:w}}}),p.pendingEffects=[])}function c(p){const m=r(p);return m.current=p,h((...v)=>m.current(...v),[])}function h(p,m){const v=t,y=v.callbackIndex,b=v.callbacks[y]||{fn:p,deps:void 0};return(!m||!b.deps||m.length!==b.deps.length||m.some((w,C)=>w!==b.deps[C]))&&(b.fn=p,b.deps=m?[...m]:void 0),v.callbacks[y]=b,v.callbackIndex++,b.fn}function l(p){e.add(p),i||(i=!0,setTimeout(u,0))}function u(){for(;e.size;){const p=[...e];e.clear(),p.forEach(m=>{d(m.component,m.container,m.props)})}i=!1}function d(p,m,v={}){let y=n.get(m);!y||y.component!==p?(y={component:p,props:v,states:[],stateIndex:0,effects:[],effectIndex:0,pendingEffects:[],callbacks:[],callbackIndex:0,children:[],mounted:!1,container:m,vnode:void 0},n.set(m,y)):y.props=v,t=y,y.stateIndex=0,y.effectIndex=0,y.callbackIndex=0;const b=p(v);return Am(m,b,y.vnode),y.vnode=b,y.mounted=!0,t=null,a(y),y}function f(p){p.effects.forEach(m=>m.cleanup?.()),p.children&&p.children.forEach(f),p.container&&"innerHTML"in p.container&&(p.container.innerHTML=""),n.delete(p.container)}return{useState:s,useRef:r,useEffect:o,useEffectEvent:c,useCallback:h,render:d,unmount:f,scheduleRender:l}}function Dm(){let n;function t(d){n=d,d(),n=null}class e{subscribers=new Set;add(){n&&!this.subscribers.has(n)&&this.subscribers.add(n)}notify(){this.subscribers.forEach(f=>f())}}const i=new WeakMap;function s(d,f){let p=i.get(d);p||(p=new Map,i.set(d,p));let m=p.get(f);return m||(m=new e,p.set(f,m)),m}function r(d,f,p=o){if(!Array.isArray(d))return;const m=Array.prototype,v=Object.create(m);["push","pop","shift","unshift","splice","sort","reverse"].forEach(y=>{v[y]=function(...b){return["push","unshift","splice"].includes(y)&&(y==="splice"?b.slice(2):b).forEach((w,C)=>{bn(w)&&(b[C]=p(w)),f.add()}),m[y].apply(this,b),this.slice()}}),Object.setPrototypeOf(d,v),d.forEach((y,b)=>{bn(y)&&(d[b]=p(y)),f.add()})}function o(d){return Object.keys(d).forEach(f=>{const p=s(d,f);let m=d[f];Object.defineProperty(d,f,{configurable:!0,enumerable:!0,get(){return bn(m)&&(Array.isArray(m)?r(m,p,o):o(m)),p.add(),m},set(v){m!==v&&(m=v,p.notify())}})}),d}function a(d){return o({value:d})}const c=h;function h(d){if(!bn(d))return d;const f={get(m,v,y){let b=Reflect.get(m,v,y);const x=s(m,v);if(bn(b)&&!("isYZProxy"in b)){const w=h(b);Array.isArray(b)&&(w.YZProxyArrayDep=x),b=w}return x.add(),b},set(m,v,y,b){const x=Reflect.get(m,v,b),w=Reflect.set(m,v,y,b);if(v=="YZProxyArrayDep")return w;if(x!==y){let C;Array.isArray(m)?C=m.YZProxyArrayDep:C=s(m,v),C.notify()}return w},deleteProperty(m,v){if(!(v in m))return!1;let b=typeof v=="symbol"?void 0:m[v];bn(b)&&(b=Array.isArray(b)?[...b]:{...b});const x=Reflect.deleteProperty(m,v);if(x){let w;Array.isArray(m)?w=m.YZProxyArrayDep:w=s(m,v),w.notify()}return x},has(m,v){return v==="isYZProxy"||v in m}};return new Proxy(d,f)}function l(d,f){const p=h(d);return u(p,f),p}function u(d,f){f.childNodes.forEach(p=>{switch(p.nodeType){case 1:const m=p;[...m.attributes].forEach(x=>{const w=x.name,C=x.value;if(w==="v-model")if(ih(m)){const S=m;t(()=>{S.checked=Me(d,C)==S.value}),S.addEventListener("change",D=>{oo(d,C,D.target.value)})}else if(nh(m)){const S=m;t(()=>{S.checked=Xh(Me(d,C),S.value)}),S.addEventListener("change",D=>{const L=D.target,I=L.value;L.checked?ng(Me(d,C),I):jh(Me(d,C),I)})}else if(eh(m)){const S=m;t(()=>{S.value=Me(d,C)}),S.addEventListener("change",D=>{oo(d,C,D.target.value)})}else{const S=m;t(()=>{S.value=Me(d,C)});const D=L=>{oo(d,C,L.target.value)};S.addEventListener("input",D)}else w==="v-text"?t(()=>{m.innerText=Me(d,C)}):w==="v-html"&&t(()=>{m.innerHTML=Me(d,C)})}),m.childNodes.length>0&&u(d,m);break;case 3:const v=p.textContent||"",y=/\{\{\s*([^{}\s]+)\s*\}\}/g,b=y.exec(v);b&&b[1]&&t(()=>{p.textContent=v.replace(y,Me(d,b[1]))});break}})}return{watchEffect:t,reactiveVue2:o,ref:a,reactiveVue3:h,reactive:c,mvvm:l}}const AS=Dm();function Im(n,t,e){return new WebSocket(n)}function MS(n){return`${n}eventbus/${Sp(3)}/${Lh(8)}/websocket`}class Ce{static CONNECTING=WebSocket.CONNECTING;static OPEN=WebSocket.OPEN;static CLOSING=WebSocket.CLOSING;static CLOSED=WebSocket.CLOSED;url;socketCreatorProtocols;socketCreatorOptions;socketCreator;socket;state=Ce.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||Im,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=Ce.CLOSING,this.socket?.close()}_connect(){this.socket?.readyState===Ce.CONNECTING||this.socket?.readyState===Ce.OPEN||(this.state=Ce.CONNECTING,this.socket=this.socketCreator(this.url,this.socketCreatorProtocols,this.socketCreatorOptions),this.socket.onopen=()=>{Je(`(${this.url}) onopen`),this.state=Ce.OPEN,this.reconnectTimerID&&(clearTimeout(this.reconnectTimerID),this.reconnectTimerID=void 0);const t=this.messageQueue.slice();this.messageQueue=[],t.forEach(this._send.bind(this)),this.ping(),this.pingTimerID=setInterval(this.ping.bind(this),this.pingInterval),this.onopen?.()},this.socket.onclose=t=>{const{code:e,reason:i,wasClean:s}=t;Je(`(${this.url}) onclose: code(${e}) reason(${i}) wasClean(${s})`),this.state=Ce.CLOSED,this.socket=void 0,this.pingTimerID&&(clearInterval(this.pingTimerID),this.pingTimerID=void 0),this.onclose?.(t),this.reconnect&&this.reconnectAttempts<this.maxReconnectAttempts&&(this.reconnectTimerID=setTimeout(this._connect.bind(this),ug(this.reconnectAttempts++)))},this.socket.onerror=t=>{Je(`(${this.url}) onerror: ${t}`),this.onerror?.(t)},this.socket.onmessage=t=>{if(Je(`(${this.url}) onmessage: { type: ${t.type}, data: ${t.data} }`),typeof t.data=="string"){let e;const i=t.data.substring(1);try{e=JSON.parse(i)}catch(s){e=[JSON.stringify({type:"err",failureCode:"fe-json-parse-error",failureType:s.toString(),message:i})]}e.forEach(s=>{const r=JSON.parse(s);if(r.body&&Object.prototype.hasOwnProperty.call(r.body,"requestid")){const o=this.waitings[r.body.requestid];o?o.resolve?.(r.body):re(`(${this.url}) onmessage: found no associated request, already timed out`)}else if(this.listeners[r.address]){const o=this.listeners[r.address];for(let a=0;a<o.length;a++)r.type==="err"?o[a]({failureCode:r.failureCode,failureType:r.failureType,message:r.message}):o[a](null,r.body)}else this.onunhandled(r)})}else t.data instanceof ArrayBuffer?re(`(${this.url}) onmessage: unhandle ArrayBuffer`):t.data instanceof Blob&&re(`(${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===Ce.OPEN?this.socket.send(JSON.stringify([JSON.stringify(t)])):(this.messageQueue.push(t),this._connect())}ping(){this._send({type:"ping"})}register(t,e,i={}){this.listeners[t]||(this.listeners[t]=[],this._send({type:"register",address:t,headers:Vn(i,this.socketCreatorOptions.headers,!1)})),this.listeners[t].push(e)}unregister(t,e,i={}){const s=this.listeners[t];if(s){const r=s.indexOf(e);r!=-1&&(s.splice(r,1),s.length===0&&(this._send({type:"unregister",address:t,headers:Vn(i,this.socketCreatorOptions.headers,!1)}),delete this.listeners[t]))}}publish(t,e,i={}){this._send({type:"publish",address:t,headers:Vn(i,this.socketCreatorOptions.headers,!1),body:e})}async send(t,e,i={},s=3e4){this.requestid++;const r=this.waitings[this.requestid]={requestid:this.requestid},o=await new Promise((a,c)=>{r.resolve=a,this._send({type:"send",address:t,headers:Vn(i,this.socketCreatorOptions.headers,!1),body:{requestid:r.requestid,...e}}),setTimeout(()=>{c(`(${this.url}) send(${r.requestid}: ${ps(e)}) Timeout!`)},s)});return delete this.waitings[r.requestid],o}}function DS(n=750){const t=document.documentElement,e=window.top===window.self?window.devicePixelRatio:1;t.dataset.dpr=e;let i=100;const s=function(){t.style.height=window.innerHeight+"px";const r=t.clientWidth;t.dataset.width=r,t.dataset.layout=r>n?"pc":"mobile",t.dataset.rem=i=Math.min(100,Math.round(100*(r/n))),t.style.fontSize=i+"px"};s(),window.rem2px=function(r){return parseFloat(r)*i},window.px2rem=function(r){return parseFloat(r)/i},window.addEventListener&&window.addEventListener("orientationchange"in window?"orientationchange":"resize",s,!1)}class IS{localVideoUtil;remoteVideoUtil;localPeerConnection=null;remotePeerConnection=null;constructor(t,e){this.localVideoUtil=new ts(t),this.remoteVideoUtil=new ts(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(i=>{this.localVideoUtil.setSrcObject(i),t(i)}).catch(i=>{this.trace(`navigator.getUserMedia error: ${i}.`),e(i)})})}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(),i=t.getAudioTracks();e.length>0&&this.trace(`Using video device: ${e[0].label}.`),i.length>0&&this.trace(`Using audio device: ${i[0].label}.`);const s=void 0,r=new RTCPeerConnection(s);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(s);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(i[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,i=t.candidate;if(e&&i){const s=new RTCIceCandidate(i),r=this.getOtherPeer(e);r&&(r.addIceCandidate(s).then(()=>{this.handleConnectionSuccess(e)}).catch(o=>{this.handleConnectionFailure(e,o)}),this.trace(`${this.getPeerName(e)} ICE candidate:
|
|
113
107
|
${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:
|
|
114
108
|
${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:
|
|
115
109
|
${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:
|
|
116
|
-
${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 i=this.getPeerName(t);this.trace(`${i} ${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 i=document.createElement("div");i.innerHTML=`<div>${e}, ${t}</div>`,document.getElementById("trace")?.appendChild(i)}getOtherPeer(t){return t===this.localPeerConnection?this.remotePeerConnection:this.localPeerConnection}getPeerName(t){return t===this.localPeerConnection?"localPeerConnection":"remotePeerConnection"}}class PS{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 Im=[],Om={};function gh(n){Im.push(n)}function AS(n,t=!1){const e=Zg();if(Om[e])return;wx.error(r=>{console.log(r.errMsg||JSON.stringify(r))}),wx.ready(()=>{Im.forEach(r=>r())});const i=["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"],s=["wx-open-launch-app","wx-open-launch-app","wx-open-subscribe","wx-open-audio"];wx.config(Object.assign(n,{debug:t,jsApiList:i,openTagList:s})),Om[e]=!0}function MS(n){return new Promise((t,e)=>{wx.checkJsApi({jsApiList:[n],success:function(i){i.checkResult[n]?t(!0):e(!1)},fail:function(){e(!1)}})})}function DS(n){gh(function(){wx.updateAppMessageShareData(n)})}function IS(n){gh(function(){wx.updateTimelineShareData(n)})}function OS(n){wx.chooseImage(n)}function kS(n){wx.previewImage(n)}function RS(n){wx.uploadImage(n)}function LS(n){wx.downloadImage(n)}function zS(n){wx.getLocalImgData(n)}function NS(){wx.startRecord()}function FS(n){wx.stopRecord(n)}function BS(n){wx.onVoiceRecordEnd(n)}function US(n){wx.playVoice(n)}function VS(n){wx.pauseVoice(n)}function YS(n){wx.stopVoice(n)}function $S(n){wx.onVoicePlayEnd(n)}function GS(n){wx.uploadVoice(n)}function XS(n){wx.downloadVoice(n)}function jS(n){wx.translateVoice(n)}function WS(n){wx.getNetworkType(n)}function HS(n){wx.openLocation(n)}function qS(n){wx.getLocation(n)}function JS(n){wx.scanQRCode(n)}function KS(n,t,e){function i(){WeixinJSBridge.invoke("getBrandWCPayRequest",n,function(s){s.err_msg=="get_brand_wcpay_request:ok"?t():e(s.err_msg)})}typeof WeixinJSBridge>"u"?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",i,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",i),document.attachEvent("onWeixinJSBridgeReady",i)):i()}function ZS(n,t,e="snsapi_userinfo",i=""){return`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${n}&redirect_uri=${encodeURIComponent(t)}&response_type=code&scope=${e}&state=${i}#wechat_redirect`}function QS(n){window.AlipayJSBridge?n&&n():document.addEventListener("AlipayJSBridgeReady",n,!1)}function ns(n,t){let e="未知错误";switch(n.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`${n.error}(${e}): ${n.errorMessage}`}function tC(n,t,e){ap.tradePay(Object.assign(n,{}),function(i){let s="未知错误";switch(i.resultCode){case 9e3:return s="订单支付成功",t?.(s);case 8e3:s="正在处理中";break;case 4e3:s="订单支付失败";break;case 6001:s="用户中途取消";break;case 6002:s="网络连接出错";break;case 99:s="用户点击忘记密码导致快捷界面退出(only iOS)";break}e?.(s)})}function eC(n,t,e){ap.scan(Object.assign(n,{fail:i=>{e?.(ns(i))}}),function(i){t?.(i.code)})}function nC(n,t,e){ap.getLocation(Object.assign(n,{fail:i=>{e?.(ns(i))}}),function(i){t?.(i)})}function iC(n,t,e){ap.openLocation(Object.assign(n,{fail:i=>{e?.(ns(i))}}),function(){t?.()})}function sC(n,t,e){ap.chooseImage(Object.assign(n,{fail:i=>{e?.(ns(i,"chooseImage"))}}),function(i){t?.(i)})}function rC(n,t,e){ap.previewImage(Object.assign(n,{fail:i=>{e?.(ns(i))}}),function(){t?.()})}class oC{map;constructor(t,e=120.619585,i=31.299379,s=18){this.map=new T.Map(t),this.map.centerAndZoom(new T.LngLat(e,i),s)}}class aC{appId;reportUrl;constructor(t){this.appId=t.appId,this.reportUrl=t.reportUrl,this.listenJSError(),this.listenAssetsError(),this.listenPromiseError(),t.checkWhiteScreen&&this.listenWhiteScreenError()}listenJSError(){window.onerror=(t,e,i,s,r)=>{const o={type:"js_error",msg:t,file:e,row:i,col:s,stack:r?.stack};this.report(o)}}listenAssetsError(){window.addEventListener("error",t=>{const e=t.target;if(e instanceof HTMLScriptElement||e instanceof HTMLStyleElement||e instanceof HTMLImageElement){const i={type:"resource_error",filename:e.src||e.href,tagName:e.tagName};this.report(i)}},!0)}listenPromiseError(){window.addEventListener("unhandledrejection",t=>{const e={type:"promise_error",reason:t.reason};this.report(e)})}listenWhiteScreenError(){Jc(()=>{setTimeout(()=>{const t=[[window.innerWidth/2,window.innerHeight/2],[window.innerWidth/2,window.innerHeight*.2],[window.innerWidth/2,window.innerHeight*.8],[window.innerWidth*.2,window.innerHeight/2],[window.innerWidth*.8,window.innerHeight/2]];let e=0;if(t.forEach(i=>{const[s,r]=i,a=document.elementsFromPoint(s,r)[0];(a?.tagName==="BODY"||a?.tagName==="HTML")&&e++}),e>=t.length*.8){const i={type:"whitescreen_error",reason:"检测到白屏!"};this.report(i)}},3e3)})}report(t){const e=JSON.stringify({...t,appId:this.appId,time:Qp()});console.error(e),this.reportUrl&&navigator.sendBeacon(this.reportUrl,e)}}function km(){return document.querySelector('meta[name="app-version"]')?.getAttribute("content")}async function Rm(){const e=(await(await fetch(`/index.html?t=${Date.now()}`,{cache:"no-store"})).text()).match(/<meta\s+name=["']app-version["']\s+content=["']([^"']+)["']/);return e?e[1]:null}function Lm(){window.confirm("系统已更新,是否立即刷新页面?")&&window.location.reload()}async function cC(){try{const n=km(),t=await Rm();n&&t&&n!==t&&Lm()}catch(n){console.error("版本检测失败:",n)}}function hC(n){const t=n?.message||n?.reason?.message||"";return t.includes("Loading chunk")||t.includes("ChunkLoadError")||t.includes("Failed to fetch dynamically imported module")}function lC(){const n="app_chunk_reload_once";sessionStorage.getItem(n)?console.error("刷新后仍然失败,请提示用户手动刷新或联系管理员"):(sessionStorage.setItem(n,"1"),alert("系统资源已更新,正在为您刷新页面"),window.location.reload())}function zm(n,t){const e=typeof n=="string"?n:n.toString(),i=()=>{try{const a=window.localStorage.getItem(e);if(a)return JSON.parse(a)}catch{}},s=a=>{try{typeof a.value<"u"?window.localStorage.setItem(e,JSON.stringify(a)):window.localStorage.removeItem(e)}catch{}};return{get:()=>{const{get:a}=Rs(i(),t);return a().value},set:a=>{const{set:c}=Rs(i(),t),h=c(a);s(h)}}}function uC(){window.localStorage.clear()}function fC(n,t){let e=t?.value||"";if(!e){const r=`; ${document.cookie}`.split(`; ${n}=`).pop()?.split(";").shift();r&&(e=decodeURIComponent(r))}const i=()=>e,s=r=>{if(e=r,e){const o=t?.domain?"; domain="+t.domain:"",a=t?.path?"; path="+t.path:"",c=t?.secure==!0?"; secure":"";let h=n+"="+encodeURIComponent(e)+o+a+c;if(t?.days){const l="; expires="+new Date(Date.now()+t.days*864e5).toUTCString();h+=l}document.cookie=h}};return s(e),{get:i,set:s}}function dC(){const n=document.cookie.split("; ");for(let t=0;t<n.length;t++){const e=window.location.hostname.split(".");for(;e.length>0;){const i=encodeURIComponent(n[t].split(";")[0].split("=")[0])+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain="+e.join(".")+" ;path=",s=location.pathname.split("/");for(document.cookie=i+"/";s.length>0;)document.cookie=i+s.join("/"),s.pop();e.shift()}}}function mC(n,t){let e;return n.objectStoreNames.contains(t)||(e=n.createObjectStore(t,{keyPath:"id"})),e}function pC(n,t=1,e){return new Promise((i,s)=>{let r;const o=window.indexedDB.open(n,t);o.onerror=()=>{s("无法使用IndexDB!")},o.onsuccess=a=>{r=a.target.result,mC(r,e),i(r)}})}function gC(n,t,e={id:1,name:"xxx"}){return new Promise((i,s)=>{const r=n.transaction([t],"readwrite");r.objectStore(t).add(e),r.oncomplete=a=>{i(a)},r.onerror=a=>{s(a)}})}const yC=["dark","light"],{get:Nm,set:Fm}=zm("theme"),Bm=new Re,bC=Bm.pipe(Tn(void 0));function Um(n){switch(n){case"dark":document.documentElement.classList.add("dark"),Sn(document.documentElement,"data-theme","dark");break;case"light":default:document.documentElement.classList.remove("dark"),Sn(document.documentElement,"data-theme","light");break}}function Vm(n){return Fm(n),Um(n),Bm.next(n),n}function wC(){return Vm(Nm()=="dark"?"light":"dark")}function vC(){return Y1([bC,Cm("(prefers-color-scheme: dark)")]).pipe(dt(([n,t])=>n||(n=Nm(),n||(n=t?"dark":"light",Fm(n)),Um(n),n)))}function j(n,t=""){return getComputedStyle(document.documentElement).getPropertyValue(n)||t}function xC(n,t){document.documentElement.style.setProperty(n,t)}function _C(n){return{backgroundCommon:j("--yz-background-common","#ffffff"),backgroundBorderCommon:j("--yz-background-border-common","#e6e6e6"),panelCommon:j("--yz-panel-common","#f5f5f5"),panelBorderCommon:j("--yz-panel-border-common","#b3b3b3"),gapCommon:j("--yz-gap-common","#cccccc"),placeholderCommon:j("--yz-placeholder-common","#8f8f8f"),fontCommon:j("--yz-font-common","#333333"),fontSecondaryCommon:j("--yz-font-secondary-common","#666666"),fontTertiaryCommon:j("--yz-font-tertiary-common","#999999"),backgroundReverse:j("--yz-background-reverse","#ffffff"),backgroundBorderReverse:j("--yz-background-border-reverse","#e6e6e6"),panelReverse:j("--yz-panel-reverse","#f5f5f5"),panelBorderReverse:j("--yz-panel-border-reverse","#b3b3b3"),gapReverse:j("--yz-gap-reverse","#cccccc"),placeholderReverse:j("--yz-placeholder-reverse","#8f8f8f"),fontReverse:j("--yz-font-reverse","#333333"),fontSecondaryReverse:j("--yz-font-secondary-reverse","#666666"),fontTertiaryReverse:j("--yz-font-tertiary-reverse","#999999"),blueCommon:j("--yz-xg-blue","#5a82f0"),bluePanelCommon:j("--yz-xg-blue-panel","#e6f0ff"),bluePanelBorderCommon:j("--yz-xg-blue-panel-border","#a0b4f0"),blueGradientCommon:j("--yz-xg-blue-gradient","#66b3ff"),redCommon:j("--yz-xg-red","#fa503c"),redPanelCommon:j("--yz-xg-red-panel","#fff5f5"),redPanelBorderCommon:j("--yz-xg-red-panel-border","#fac8c8"),redGradientCommon:j("--yz-xg-red-gradient","#fa8c78"),greenCommon:j("--yz-xg-green","#00be5a"),greenGradientCommon:j("--yz-xg-green-gradient","#00e678"),yellowCommon:j("--yz-xg-yellow","#fa8c00"),yellowGradientCommon:j("--yz-xg-yellow-gradient","#ffb400"),newenergyCommon:j("--yz-xg-newenergy","#64c896"),newenergyPanelCommon:j("--yz-xg-newenergy-panel","#ebfaf2"),primaryPattern:j(`--yz-pattern-${n}-primary`,"#5a82f0"),secondaryPattern:j(`--yz-pattern-${n}-secondary`,"#e6f0ff"),gradientPattern:j(`--yz-pattern-${n}-gradient`,"#66b3ff"),backgroundPattern:j(`--yz-pattern-${n}-background`,"#ffffff"),backgroundBorderPattern:j(`--yz-pattern-${n}-background-border`,"#e6e6e6"),panelPattern:j(`--yz-pattern-${n}-panel`,"#f5f5f5"),panelBorderPattern:j(`--yz-pattern-${n}-panel-border`,"#b3b3b3"),gapPattern:j(`--yz-pattern-${n}-gap`,"#cccccc"),placeholderPattern:j(`--yz-pattern-${n}-placeholder`,"#8f8f8f"),fontPattern:j(`--yz-pattern-${n}-font`,"#333333"),fontSecondaryPattern:j(`--yz-pattern-${n}-font-secondary`,"#666666"),fontTertiaryPattern:j(`--yz-pattern-${n}-font-tertiary`,"#999999")}}g.ArrowShape=Mc,g.BallShape=si,g.BezierEasing=Ta,g.CSSToJSEasing=Mw,g.Clock=Ma,g.CommonKeyCode=iS,g.ConfettiShapeCombo=Vc,g.CrossShape=Lc,g.CurveShape=Pc,g.CustomCanvasContext=Hu,g.CustomCanvasGradient=Xs,g.CustomCanvasPattern=wa,g.DOMParse=vd,g.DOMVideo=ts,g.DrawContext=e2,g.Easing=N,g.EllipseShape=zc,g.FileUpload=Yy,g.FoxShape=kc,g.HeartShape=Dc,g.HeartVariantShape=Ic,g.Interpolation=Ne,g.LineShape=Rn,g.Ls=mn,g.Matrix=It,g.Matrix2=Gc,g.Matrix3=zr,g.Matrix4=Jt,g.PointsShape=kr,g.QRCode=nn,g.RabbitShape=Rc,g.RectShape=dn,g.RingIndicatorShapeCombo=Uc,g.RingShape=Ki,g.SVGParse=Cd,g.SVGParsedPathArgsLength=Di,g.SVGPathDataToD=Ca,g.SegmentShapeCombo=Fc,g.Shape=gt,g.ShapeCombo=qt,g.ShipShapeCombo=Nc,g.SliderShapeCombo=Bc,g.StarShape=Oc,g.THEME=yC,g.TWEEN=Nw,g.TextShape=ri,g.Timeline=ki,g.TreeShapeCombo=Ac,g.Tween=Aa,g.Vector2=$s,g.Vector3=_e,g.Vector4=ya,g.WebGLCoordinateSystem=Zi,g.WebGLRenderer=PS,g.WebGPUCoordinateSystem=$c,g.WebMonitor=aC,g.WebRTCClient=TS,g.WebSocketClient=Ce,g.YZCanvasContext=va,g.a2c=js,g.a2c2=Ju,g.absolutizeSVGPath=Hs,g.addClass=X2,g.addWatermark=Qb,g.addWxJsReadyFnBeforeConfig=gh,g.ajax=eu,g.aliJsChooseImage=sC,g.aliJsGetLocation=nC,g.aliJsOpenLocation=iC,g.aliJsPreviewImage=rC,g.aliJsReady=QS,g.aliJsScan=eC,g.aliJsTradePay=tC,g.angle=Qt,g.animate=h2,g.animateShapes=Zx,g.animationEnd$=L_,g.animationStart$=R_,g.applyMiddleware=ax,g.atomReadAttribute=ru,g.atomReadAttributes=qo,g.atomReadStyle=Xy,g.atomReadStyles=Wo,g.atomRemoveAttribute=qy,g.atomRemoveDataset=fS,g.atomRemoveStyle=Ho,g.atomWriteAttribute=Sn,g.atomWriteStyle=vi,g.attribute=Ke,g.base64EncodeOutputStream=Uu,g.bitmapMapper=kd,g.blobToImageData=Eb,g.byteArrayOutputStream=ga,g.catmullRom2bezier=yw,g.changeBrightness=Kb,g.changeCheckboxChecked=U2,g.changeDiaphaneity=Zb,g.changeRadioChecked=B2,g.changeSelected=F2,g.changeSize=Jb,g.checkVersion=cC,g.checkWxJsApi=MS,g.clearCookies=dC,g.clearLocalStorage=uC,g.clearSessionStorage=pS,g.clickA=Kc,g.clipboard=w2,g.closeLog=Jh,g.closest=k2,g.combineEpics=hx,g.combineReducers=ox,g.compatableDownMovePoint$=G_,g.compileTemplate=Z2,g.computeImageDisplayRect=xb,g.containsChild=M2,g.coords$=xS,g.createCookie=fC,g.createDefaultMousePoint=rh,g.createDraggable=j_,g.createDrop=W_,g.createElement=Gd,g.createElementEventBus=cS,g.createElementNS=H2,g.createEpicMiddleware=cx,g.createEvent=Ys,g.createEventListener=st,g.createEventListener$=$,g.createFeRoute=bS,g.createFragment=$d,g.createFromEventPattern$=ub,g.createIndexDB=pC,g.createLocalStorage=zm,g.createMiniReact=_S,g.createMiniVue=Mm,g.createMousePoint=Ln,g.createObjectURL=Rd,g.createOnlineStatus$=Y_,g.createParentEventListener=hb,g.createReactAppStoreContext=_x,g.createReduxStore=Hf,g.createSVGElement=an,g.createSessionStorage=dh,g.createStorage$=V_,g.createSvgPath=_a,g.createTextNode=q2,g.createThunkMiddleware=ux,g.createVueAppStoreContext=$x,g.createWebSocket=Dm,g.createXMLHttpRequest=tu,g.cssAttrsToCanvasAttrs=ou,g.dataset=uS,g.dispatchClickFromEvent=wb,g.dispatchEvent=ma,g.dispatchEventFromEvent=bb,g.distance=sn,g.documentVisible$=U_,g.domPrefixes=Hc,g.domToBlob=Kl,g.domToString=Xo,g.downloadFromSVGElement=Zu,g.downloadFromSVGString=mw,g.drag$=nm,g.dragEnd$=sm,g.dragEnter$=om,g.dragLeave$=am,g.dragOver$=cm,g.dragStart$=im,g.drawBitmapInCanvas=c2,g.drawQRCodeToCanvas=sw,g.drop$=rm,g.easeNameToCubicBezier=Pa,g.elValueChange$=N_,g.empty=Ud,g.exceptionLoggerMiddleware=dx,g.executeTimeLoggerMiddleware=mx,g.fetchLatestVersionFromHtml=Rm,g.flipSideToSide=Pb,g.flipUpsideDown=Ab,g.followMouseShape=Jx,g.formSubmit$=F_,g.getBitmapFromCanvas=a2,g.getCSSVar=j,g.getCurrentVersion=km,g.getDOMMatrix=Wc,g.getDirection=ow,g.getDocumentElement=ai,g.getElementPositionInPage=uh,g.getElementPositionInPage2=K_,g.getElementPositionInViewport=lh,g.getEmSize=E2,g.getEventCurrentTarget=cb,g.getFileMD5Hash=Ql,g.getFileMimeFromFileInBrowser=Vy,g.getFormSubmitData=$y,g.getImageData=Nu,g.getImageDataByAIData=ew,g.getImageMainColor=Tb,g.getInnerText=Y2,g.getKeyCode=sS,g.getMouseButton=nS,g.getMousePositionInElement=_t,g.getMousePositionInPage=fh,g.getMousePositionInViewport=tS,g.getPage=q_,g.getRelativeBoundingClientRect=J_,g.getRemSize=Zc,g.getRules=Hy,g.getSVGRawStringFromElement=pw,g.getScrollWheelDelta=eS,g.getSelectedText=g2,g.getStyle=wi,g.getStyleSheets=su,g.getTheme$=vC,g.getThemeColors=_C,g.getVNode=mh,g.getVerticalScrollTopPercentInPage=Z_,g.getVertxRegisterBaseUrl=CS,g.getViewport=mm,g.getWindow=H_,g.gifImage=Vu,g.h=Tm,g.hFromEl=Ur,g.handleChunkLoadError=lC,g.hasClass=W2,g.hashChange$=yS,g.hideEl=Yd,g.hotKeyDown$=gm,g.hotKeyFile=oS,g.hotKeyFile$=ym,g.hotKeyUp$=rS,g.html=Bd,g.iframePostMessage=J2,g.imageDataToBitmap=_b,g.imageDataToBlob=Cb,g.imageDataToDataURL=Sb,g.injectStyle=iu,g.injectWxJsConfig=AS,g.insert=oi,g.intersection$=xm,g.isActiveEl=S2,g.isChunkLoadError=hC,g.isElement=l2,g.isInViewport=Q_,g.isInput=Qi,g.isInputCheckbox=eh,g.isInputNumber=N2,g.isInputRadio=nh,g.isInputText=z2,g.isRootEl=_2,g.isSVGElementPath=Ku,g.isSVGPath=Sa,g.isSelect=th,g.isSupportEvent=i_,g.isSupportPointer=n_,g.isSupportTouch=e_,g.isTextArea=L2,g.jpgToPng=jb,g.keyDown$=hm,g.keyPress$=z_,g.keyUp$=lm,g.l2c=An,g.leftRotate=Mb,g.length=Kn,g.loadImage=Nd,g.loadLink=d2,g.loadScript=f2,g.location$=_m,g.longhandSVGPath=ww,g.mapTDTJSSDK=oC,g.marginSharpen=Xb,g.matchMedia$=Cm,g.miniVue=SS,g.mosaic=tw,g.mountVNode=Xe,g.mouseAndPointerDownMovePoint$=dm,g.mouseClick$=c_,g.mouseContextMenu$=u_,g.mouseDoubleClick$=h_,g.mouseDown$=qd,g.mouseDownMovePoint$=um,g.mouseEnter$=o_,g.mouseLeave$=a_,g.mouseMove$=Fr,g.mouseMovePoint$=$_,g.mouseOut$=r_,g.mouseOver$=s_,g.mouseUp$=Jd,g.mouseWheel$=l_,g.mutation$=vm,g.nearestElement=T2,g.nextElementSibling=I2,g.normalizePoint=rw,g.normalizeSVGPath=Ea,g.ofType=lx,g.onBeforeUnload=Ld,g.onDocumentReady=Jc,g.openLog=gg,g.operationParser=px,g.outputGifBase64=Yu,g.outputQRCodeBase64=iw,g.pan$=f_,g.panCancel$=g_,g.panDown$=v_,g.panEnd$=p_,g.panLeft$=y_,g.panMove$=d_,g.panRight$=b_,g.panStart$=m_,g.panUp$=w_,g.parent=P2,g.parents=Qc,g.parseCSS=Sd,g.parseSVGPath=Ws,g.parseTransformToMatrix=Od,g.patchVNode=Vr,g.pinch$=x_,g.pinchIn$=__,g.pinchOut$=S_,g.pngToJpg=Wb,g.pointerCancel$=hh,g.pointerDown$=ah,g.pointerDownMovePoint$=Br,g.pointerMove$=oh,g.pointerUp$=ch,g.polar=rn,g.polymorphTween=t2,g.popStateChange$=Sm,g.press$=C_,g.pressDownMove=bm,g.pressDownMoveWithMouse=hS,g.pressDownMoveWithPointer=wm,g.pressDownMoveWithTouch=lS,g.preventDefault=tn,g.previousElementSibling=O2,g.pull$=X_,g.q2c=Mi,g.querySelectorAllToStringArray=By,g.radiusClip=qb,g.rawState=ec,g.readFileInBrowser=bi,g.readStyleFromStyles=Gy,g.rectClip=Hb,g.relativeSVGPath=gw,g.rem2px=C2,g.remove=$2,g.removeAllEventListeners=lb,g.removeClass=j2,g.renderVNode=Pm,g.resize=Hd,g.resize$=sh,g.reverseCSSToJSEasing=Dw,g.reverseEaseNameToCubicBezier=rf,g.reverseEasing=Qu,g.revokeObjectURL=u2,g.rightRotate=Db,g.rotate$=E_,g.rotatePoint=ge,g.runInSandbox=K2,g.rxState=rx,g.safeArea$=vS,g.scheduleVNodeAsap=ph,g.scheduleVNodeImmediately=Am,g.scroll$=B_,g.scrollParent=A2,g.scrollTo=v2,g.selectFile=Fd,g.selectFileImage=p2,g.selectFileInBrowser=jo,g.setCSSVar=xC,g.setLogUploadFn=yg,g.setManualScroll=x2,g.setRem=ES,g.setStyle=jn,g.setTheme=Vm,g.setWindowTitle=y2,g.shadowRoot=R2,g.sharpen=Gb,g.showEl=Vd,g.showUpdateDialog=Lm,g.siblings=D2,g.simulateEventFromTouch=vb,g.stateLoggerMiddleware=fx,g.stopPropagation=zu,g.stringToDom=Uy,g.swipe$=T_,g.swipeDown$=D_,g.swipeLeft$=P_,g.swipeRight$=A_,g.swipeUp$=M_,g.tap$=em,g.tapOutSide$=I_,g.targetToAfterDropShape=Kx,g.text=V2,g.toBlackAndWhite=kb,g.toBlue=Nb,g.toBlueAndGreen=Ub,g.toBlueAndGrey=$b,g.toDegree=Tt,g.toGreen=zb,g.toGreenAndGrey=Yb,g.toGrey=Ib,g.toGrey2=Ob,g.toOpposite=Rb,g.toRadian=q,g.toRed=Lb,g.toRedAndBlue=Bb,g.toRedAndGreen=Fb,g.toRedAndGrey=Vb,g.toggleClass=ih,g.toggleElDisplay=G2,g.toggleTheme=wC,g.touchCancel$=tm,g.touchDownMovePoint$=fm,g.touchEnd$=Qd,g.touchMove$=Kd,g.touchStart$=Zd,g.transform=qc,g.transformPath2D=o2,g.transitionEnd$=k_,g.transitionStart$=O_,g.unmountVNode=es,g.updateVNode=$r,g.urlChange$=gS,g.useDimensions=Yx,g.useImmer=Ux,g.useImmerReducer=Vx,g.useLocale=Yc,g.useReactControllableState=Sx,g.useReactState=ix,g.useVueControllableState=Gx,g.useVueState=sx,g.useWindowResize$=t_,g.vibrate=b2,g.visible$=mS,g.waitElementAddedInDOM=dS,g.waitForStyleSheetsLoaded=m2,g.writeToIndexDB=gC,g.wxJsChooseImage=OS,g.wxJsDownloadImage=LS,g.wxJsDownloadVoice=XS,g.wxJsGetLocalImgData=zS,g.wxJsGetLocation=qS,g.wxJsGetNetworkType=WS,g.wxJsLogin=ZS,g.wxJsOnVoicePlayEnd=$S,g.wxJsOnVoiceRecordEnd=BS,g.wxJsOpenLocation=HS,g.wxJsPauseVoice=VS,g.wxJsPay=KS,g.wxJsPlayVoice=US,g.wxJsPreviewImage=kS,g.wxJsScanQRCode=JS,g.wxJsStartRecord=NS,g.wxJsStopRecord=FS,g.wxJsStopVoice=YS,g.wxJsTranslateVoice=jS,g.wxJsUpdateAppMessageShareData=DS,g.wxJsUpdateTimelineShareData=IS,g.wxJsUploadImage=RS,g.wxJsUploadVoice=GS,g.zvhToLSVGPath=bw,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|
|
110
|
+
${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 i=this.getPeerName(t);this.trace(`${i} ${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 i=document.createElement("div");i.innerHTML=`<div>${e}, ${t}</div>`,document.getElementById("trace")?.appendChild(i)}getOtherPeer(t){return t===this.localPeerConnection?this.remotePeerConnection:this.localPeerConnection}getPeerName(t){return t===this.localPeerConnection?"localPeerConnection":"remotePeerConnection"}}class OS{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 Om=[],km={};function bh(n){Om.push(n)}function kS(n,t=!1){const e=n0();if(km[e])return;wx.error(r=>{console.log(r.errMsg||JSON.stringify(r))}),wx.ready(()=>{Om.forEach(r=>r())});const i=["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"],s=["wx-open-launch-app","wx-open-launch-app","wx-open-subscribe","wx-open-audio"];wx.config(Object.assign(n,{debug:t,jsApiList:i,openTagList:s})),km[e]=!0}function RS(n){return new Promise((t,e)=>{wx.checkJsApi({jsApiList:[n],success:function(i){i.checkResult[n]?t(!0):e(!1)},fail:function(){e(!1)}})})}function LS(n){bh(function(){wx.updateAppMessageShareData(n)})}function zS(n){bh(function(){wx.updateTimelineShareData(n)})}function NS(n){wx.chooseImage(n)}function FS(n){wx.previewImage(n)}function BS(n){wx.uploadImage(n)}function US(n){wx.downloadImage(n)}function VS(n){wx.getLocalImgData(n)}function YS(){wx.startRecord()}function $S(n){wx.stopRecord(n)}function GS(n){wx.onVoiceRecordEnd(n)}function XS(n){wx.playVoice(n)}function jS(n){wx.pauseVoice(n)}function WS(n){wx.stopVoice(n)}function HS(n){wx.onVoicePlayEnd(n)}function qS(n){wx.uploadVoice(n)}function JS(n){wx.downloadVoice(n)}function KS(n){wx.translateVoice(n)}function ZS(n){wx.getNetworkType(n)}function QS(n){wx.openLocation(n)}function tC(n){wx.getLocation(n)}function eC(n){wx.scanQRCode(n)}function nC(n,t,e){function i(){WeixinJSBridge.invoke("getBrandWCPayRequest",n,function(s){s.err_msg=="get_brand_wcpay_request:ok"?t():e(s.err_msg)})}typeof WeixinJSBridge>"u"?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",i,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",i),document.attachEvent("onWeixinJSBridgeReady",i)):i()}function iC(n,t,e="snsapi_userinfo",i=""){return`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${n}&redirect_uri=${encodeURIComponent(t)}&response_type=code&scope=${e}&state=${i}#wechat_redirect`}function sC(n){window.AlipayJSBridge?n&&n():document.addEventListener("AlipayJSBridgeReady",n,!1)}function ns(n,t){let e="未知错误";switch(n.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`${n.error}(${e}): ${n.errorMessage}`}function rC(n,t,e){ap.tradePay(Object.assign(n,{}),function(i){let s="未知错误";switch(i.resultCode){case 9e3:return s="订单支付成功",t?.(s);case 8e3:s="正在处理中";break;case 4e3:s="订单支付失败";break;case 6001:s="用户中途取消";break;case 6002:s="网络连接出错";break;case 99:s="用户点击忘记密码导致快捷界面退出(only iOS)";break}e?.(s)})}function oC(n,t,e){ap.scan(Object.assign(n,{fail:i=>{e?.(ns(i))}}),function(i){t?.(i.code)})}function aC(n,t,e){ap.getLocation(Object.assign(n,{fail:i=>{e?.(ns(i))}}),function(i){t?.(i)})}function cC(n,t,e){ap.openLocation(Object.assign(n,{fail:i=>{e?.(ns(i))}}),function(){t?.()})}function hC(n,t,e){ap.chooseImage(Object.assign(n,{fail:i=>{e?.(ns(i,"chooseImage"))}}),function(i){t?.(i)})}function lC(n,t,e){ap.previewImage(Object.assign(n,{fail:i=>{e?.(ns(i))}}),function(){t?.()})}class uC{map;constructor(t,e=120.619585,i=31.299379,s=18){this.map=new T.Map(t),this.map.centerAndZoom(new T.LngLat(e,i),s)}}class fC{appId;reportUrl;constructor(t){this.appId=t.appId,this.reportUrl=t.reportUrl,this.listenJSError(),this.listenAssetsError(),this.listenPromiseError(),t.checkWhiteScreen&&this.listenWhiteScreenError()}listenJSError(){window.onerror=(t,e,i,s,r)=>{const o={type:"js_error",msg:t,file:e,row:i,col:s,stack:r?.stack};this.report(o)}}listenAssetsError(){window.addEventListener("error",t=>{const e=t.target;if(e instanceof HTMLScriptElement||e instanceof HTMLStyleElement||e instanceof HTMLImageElement){const i={type:"resource_error",filename:e.src||e.href,tagName:e.tagName};this.report(i)}},!0)}listenPromiseError(){window.addEventListener("unhandledrejection",t=>{const e={type:"promise_error",reason:t.reason};this.report(e)})}listenWhiteScreenError(){Kc(()=>{setTimeout(()=>{const t=[[window.innerWidth/2,window.innerHeight/2],[window.innerWidth/2,window.innerHeight*.2],[window.innerWidth/2,window.innerHeight*.8],[window.innerWidth*.2,window.innerHeight/2],[window.innerWidth*.8,window.innerHeight/2]];let e=0;if(t.forEach(i=>{const[s,r]=i,a=document.elementsFromPoint(s,r)[0];(a?.tagName==="BODY"||a?.tagName==="HTML")&&e++}),e>=t.length*.8){const i={type:"whitescreen_error",reason:"检测到白屏!"};this.report(i)}},3e3)})}report(t){const e=JSON.stringify({...t,appId:this.appId,time:ig()});console.error(e),this.reportUrl&&navigator.sendBeacon(this.reportUrl,e)}}function Rm(){return document.querySelector('meta[name="app-version"]')?.getAttribute("content")}async function Lm(){const e=(await(await fetch(`/index.html?t=${Date.now()}`,{cache:"no-store"})).text()).match(/<meta\s+name=["']app-version["']\s+content=["']([^"']+)["']/);return e?e[1]:null}function zm(){window.confirm("系统已更新,是否立即刷新页面?")&&window.location.reload()}async function dC(){try{const n=Rm(),t=await Lm();n&&t&&n!==t&&zm()}catch(n){console.error("版本检测失败:",n)}}function mC(n){const t=n?.message||n?.reason?.message||"";return t.includes("Loading chunk")||t.includes("ChunkLoadError")||t.includes("Failed to fetch dynamically imported module")}function pC(){const n="app_chunk_reload_once";sessionStorage.getItem(n)?console.error("刷新后仍然失败,请提示用户手动刷新或联系管理员"):(sessionStorage.setItem(n,"1"),alert("系统资源已更新,正在为您刷新页面"),window.location.reload())}function Nm(n,t){const e=typeof n=="string"?n:n.toString(),i=()=>{try{const a=window.localStorage.getItem(e);if(a)return JSON.parse(a)}catch{}},s=a=>{try{typeof a.value<"u"?window.localStorage.setItem(e,JSON.stringify(a)):window.localStorage.removeItem(e)}catch{}};return{get:()=>{const{get:a}=Rs(i(),t);return a().value},set:a=>{const{set:c}=Rs(i(),t),h=c(a);s(h)}}}function gC(){window.localStorage.clear()}function yC(n,t){let e=t?.value||"";if(!e){const r=`; ${document.cookie}`.split(`; ${n}=`).pop()?.split(";").shift();r&&(e=decodeURIComponent(r))}const i=()=>e,s=r=>{if(e=r,e){const o=t?.domain?"; domain="+t.domain:"",a=t?.path?"; path="+t.path:"",c=t?.secure==!0?"; secure":"";let h=n+"="+encodeURIComponent(e)+o+a+c;if(t?.days){const l="; expires="+new Date(Date.now()+t.days*864e5).toUTCString();h+=l}document.cookie=h}};return s(e),{get:i,set:s}}function bC(){const n=document.cookie.split("; ");for(let t=0;t<n.length;t++){const e=window.location.hostname.split(".");for(;e.length>0;){const i=encodeURIComponent(n[t].split(";")[0].split("=")[0])+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain="+e.join(".")+" ;path=",s=location.pathname.split("/");for(document.cookie=i+"/";s.length>0;)document.cookie=i+s.join("/"),s.pop();e.shift()}}}function wC(n,t){let e;return n.objectStoreNames.contains(t)||(e=n.createObjectStore(t,{keyPath:"id"})),e}function vC(n,t=1,e){return new Promise((i,s)=>{let r;const o=window.indexedDB.open(n,t);o.onerror=()=>{s("无法使用IndexDB!")},o.onsuccess=a=>{r=a.target.result,wC(r,e),i(r)}})}function xC(n,t,e={id:1,name:"xxx"}){return new Promise((i,s)=>{const r=n.transaction([t],"readwrite");r.objectStore(t).add(e),r.oncomplete=a=>{i(a)},r.onerror=a=>{s(a)}})}const _C=["dark","light"],{get:Fm,set:Bm}=Nm("theme"),Um=new Re,SC=Um.pipe(Tn(void 0));function Vm(n){switch(n){case"dark":document.documentElement.classList.add("dark"),Sn(document.documentElement,"data-theme","dark");break;case"light":default:document.documentElement.classList.remove("dark"),Sn(document.documentElement,"data-theme","light");break}}function Ym(n){return Bm(n),Vm(n),Um.next(n),n}function CC(){return Ym(Fm()=="dark"?"light":"dark")}function EC(){return j1([SC,Em("(prefers-color-scheme: dark)")]).pipe(dt(([n,t])=>n||(n=Fm(),n||(n=t?"dark":"light",Bm(n)),Vm(n),n)))}function j(n,t=""){return getComputedStyle(document.documentElement).getPropertyValue(n)||t}function TC(n,t){document.documentElement.style.setProperty(n,t)}function PC(n){return{backgroundCommon:j("--yz-background-common","#ffffff"),backgroundBorderCommon:j("--yz-background-border-common","#e6e6e6"),panelCommon:j("--yz-panel-common","#f5f5f5"),panelBorderCommon:j("--yz-panel-border-common","#b3b3b3"),gapCommon:j("--yz-gap-common","#cccccc"),placeholderCommon:j("--yz-placeholder-common","#8f8f8f"),fontCommon:j("--yz-font-common","#333333"),fontSecondaryCommon:j("--yz-font-secondary-common","#666666"),fontTertiaryCommon:j("--yz-font-tertiary-common","#999999"),backgroundReverse:j("--yz-background-reverse","#ffffff"),backgroundBorderReverse:j("--yz-background-border-reverse","#e6e6e6"),panelReverse:j("--yz-panel-reverse","#f5f5f5"),panelBorderReverse:j("--yz-panel-border-reverse","#b3b3b3"),gapReverse:j("--yz-gap-reverse","#cccccc"),placeholderReverse:j("--yz-placeholder-reverse","#8f8f8f"),fontReverse:j("--yz-font-reverse","#333333"),fontSecondaryReverse:j("--yz-font-secondary-reverse","#666666"),fontTertiaryReverse:j("--yz-font-tertiary-reverse","#999999"),blueCommon:j("--yz-xg-blue","#5a82f0"),bluePanelCommon:j("--yz-xg-blue-panel","#e6f0ff"),bluePanelBorderCommon:j("--yz-xg-blue-panel-border","#a0b4f0"),blueGradientCommon:j("--yz-xg-blue-gradient","#66b3ff"),redCommon:j("--yz-xg-red","#fa503c"),redPanelCommon:j("--yz-xg-red-panel","#fff5f5"),redPanelBorderCommon:j("--yz-xg-red-panel-border","#fac8c8"),redGradientCommon:j("--yz-xg-red-gradient","#fa8c78"),greenCommon:j("--yz-xg-green","#00be5a"),greenGradientCommon:j("--yz-xg-green-gradient","#00e678"),yellowCommon:j("--yz-xg-yellow","#fa8c00"),yellowGradientCommon:j("--yz-xg-yellow-gradient","#ffb400"),newenergyCommon:j("--yz-xg-newenergy","#64c896"),newenergyPanelCommon:j("--yz-xg-newenergy-panel","#ebfaf2"),primaryPattern:j(`--yz-pattern-${n}-primary`,"#5a82f0"),secondaryPattern:j(`--yz-pattern-${n}-secondary`,"#e6f0ff"),gradientPattern:j(`--yz-pattern-${n}-gradient`,"#66b3ff"),backgroundPattern:j(`--yz-pattern-${n}-background`,"#ffffff"),backgroundBorderPattern:j(`--yz-pattern-${n}-background-border`,"#e6e6e6"),panelPattern:j(`--yz-pattern-${n}-panel`,"#f5f5f5"),panelBorderPattern:j(`--yz-pattern-${n}-panel-border`,"#b3b3b3"),gapPattern:j(`--yz-pattern-${n}-gap`,"#cccccc"),placeholderPattern:j(`--yz-pattern-${n}-placeholder`,"#8f8f8f"),fontPattern:j(`--yz-pattern-${n}-font`,"#333333"),fontSecondaryPattern:j(`--yz-pattern-${n}-font-secondary`,"#666666"),fontTertiaryPattern:j(`--yz-pattern-${n}-font-tertiary`,"#999999")}}var $m={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
111
|
+
* http://hammerjs.github.io/
|
|
112
|
+
*
|
|
113
|
+
* Copyright (c) 2016 Jorik Tangelder;
|
|
114
|
+
* Licensed under the MIT license */(function(n){(function(t,e,i,s){var r=["","webkit","Moz","MS","ms","o"],o=e.createElement("div"),a="function",c=Math.round,h=Math.abs,l=Date.now;function u(_,E,P){return setTimeout(x(_,P),E)}function d(_,E,P){return Array.isArray(_)?(f(_,P[E],P),!0):!1}function f(_,E,P){var A;if(_)if(_.forEach)_.forEach(E,P);else if(_.length!==s)for(A=0;A<_.length;)E.call(P,_[A],A,_),A++;else for(A in _)_.hasOwnProperty(A)&&E.call(P,_[A],A,_)}function p(_,E,P){var A="DEPRECATED METHOD: "+E+`
|
|
115
|
+
`+P+` AT
|
|
116
|
+
`;return function(){var k=new Error("get-stack-trace"),B=k&&k.stack?k.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",J=t.console&&(t.console.warn||t.console.log);return J&&J.call(t.console,A,B),_.apply(this,arguments)}}var m;typeof Object.assign!="function"?m=function(E){if(E===s||E===null)throw new TypeError("Cannot convert undefined or null to object");for(var P=Object(E),A=1;A<arguments.length;A++){var k=arguments[A];if(k!==s&&k!==null)for(var B in k)k.hasOwnProperty(B)&&(P[B]=k[B])}return P}:m=Object.assign;var v=p(function(E,P,A){for(var k=Object.keys(P),B=0;B<k.length;)(!A||A&&E[k[B]]===s)&&(E[k[B]]=P[k[B]]),B++;return E},"extend","Use `assign`."),y=p(function(E,P){return v(E,P,!0)},"merge","Use `assign`.");function b(_,E,P){var A=E.prototype,k;k=_.prototype=Object.create(A),k.constructor=_,k._super=A,P&&m(k,P)}function x(_,E){return function(){return _.apply(E,arguments)}}function w(_,E){return typeof _==a?_.apply(E&&E[0]||s,E):_}function C(_,E){return _===s?E:_}function S(_,E,P){f(F(E),function(A){_.addEventListener(A,P,!1)})}function D(_,E,P){f(F(E),function(A){_.removeEventListener(A,P,!1)})}function L(_,E){for(;_;){if(_==E)return!0;_=_.parentNode}return!1}function I(_,E){return _.indexOf(E)>-1}function F(_){return _.trim().split(/\s+/g)}function U(_,E,P){if(_.indexOf&&!P)return _.indexOf(E);for(var A=0;A<_.length;){if(P&&_[A][P]==E||!P&&_[A]===E)return A;A++}return-1}function X(_){return Array.prototype.slice.call(_,0)}function Z(_,E,P){for(var A=[],k=[],B=0;B<_.length;){var J=E?_[B][E]:_[B];U(k,J)<0&&A.push(_[B]),k[B]=J,B++}return P&&(E?A=A.sort(function(Ot,jt){return Ot[E]>jt[E]}):A=A.sort()),A}function at(_,E){for(var P,A,k=E[0].toUpperCase()+E.slice(1),B=0;B<r.length;){if(P=r[B],A=P?P+k:E,A in _)return A;B++}return s}var nt=1;function rt(){return nt++}function Q(_){var E=_.ownerDocument||_;return E.defaultView||E.parentWindow||t}var St=/mobile|tablet|ip(ad|hone|od)|android/i,z="ontouchstart"in t,R=at(t,"PointerEvent")!==s,H=z&&St.test(navigator.userAgent),ot="touch",Xt="pen",ye="mouse",Xr="kinect",jr=25,Pt=1,Ee=2,mt=4,Nt=8,ci=1,zn=2,Nn=4,gn=8,O=16,yt=zn|Nn,Fn=gn|O,Xm=yt|Fn,jm=["x","y"],Wr=["clientX","clientY"];function he(_,E){var P=this;this.manager=_,this.callback=E,this.element=_.element,this.target=_.options.inputTarget,this.domHandler=function(A){w(_.options.enable,[_])&&P.handler(A)},this.init()}he.prototype={handler:function(){},init:function(){this.evEl&&S(this.element,this.evEl,this.domHandler),this.evTarget&&S(this.target,this.evTarget,this.domHandler),this.evWin&&S(Q(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&D(this.element,this.evEl,this.domHandler),this.evTarget&&D(this.target,this.evTarget,this.domHandler),this.evWin&&D(Q(this.element),this.evWin,this.domHandler)}};function MC(_){var E,P=_.options.inputClass;return P?E=P:R?E=vh:H?E=Jr:z?E=xh:E=qr,new E(_,DC)}function DC(_,E,P){var A=P.pointers.length,k=P.changedPointers.length,B=E&Pt&&A-k===0,J=E&(mt|Nt)&&A-k===0;P.isFirst=!!B,P.isFinal=!!J,B&&(_.session={}),P.eventType=E,IC(_,P),_.emit("hammer.input",P),_.recognize(P),_.session.prevInput=P}function IC(_,E){var P=_.session,A=E.pointers,k=A.length;P.firstInput||(P.firstInput=Wm(E)),k>1&&!P.firstMultiple?P.firstMultiple=Wm(E):k===1&&(P.firstMultiple=!1);var B=P.firstInput,J=P.firstMultiple,At=J?J.center:B.center,Ot=E.center=Hm(A);E.timeStamp=l(),E.deltaTime=E.timeStamp-B.timeStamp,E.angle=wh(At,Ot),E.distance=Hr(At,Ot),OC(P,E),E.offsetDirection=Jm(E.deltaX,E.deltaY);var jt=qm(E.deltaTime,E.deltaX,E.deltaY);E.overallVelocityX=jt.x,E.overallVelocityY=jt.y,E.overallVelocity=h(jt.x)>h(jt.y)?jt.x:jt.y,E.scale=J?LC(J.pointers,A):1,E.rotation=J?RC(J.pointers,A):0,E.maxPointers=P.prevInput?E.pointers.length>P.prevInput.maxPointers?E.pointers.length:P.prevInput.maxPointers:E.pointers.length,kC(P,E);var Pe=_.element;L(E.srcEvent.target,Pe)&&(Pe=E.srcEvent.target),E.target=Pe}function OC(_,E){var P=E.center,A=_.offsetDelta||{},k=_.prevDelta||{},B=_.prevInput||{};(E.eventType===Pt||B.eventType===mt)&&(k=_.prevDelta={x:B.deltaX||0,y:B.deltaY||0},A=_.offsetDelta={x:P.x,y:P.y}),E.deltaX=k.x+(P.x-A.x),E.deltaY=k.y+(P.y-A.y)}function kC(_,E){var P=_.lastInterval||E,A=E.timeStamp-P.timeStamp,k,B,J,At;if(E.eventType!=Nt&&(A>jr||P.velocity===s)){var Ot=E.deltaX-P.deltaX,jt=E.deltaY-P.deltaY,Pe=qm(A,Ot,jt);B=Pe.x,J=Pe.y,k=h(Pe.x)>h(Pe.y)?Pe.x:Pe.y,At=Jm(Ot,jt),_.lastInterval=E}else k=P.velocity,B=P.velocityX,J=P.velocityY,At=P.direction;E.velocity=k,E.velocityX=B,E.velocityY=J,E.direction=At}function Wm(_){for(var E=[],P=0;P<_.pointers.length;)E[P]={clientX:c(_.pointers[P].clientX),clientY:c(_.pointers[P].clientY)},P++;return{timeStamp:l(),pointers:E,center:Hm(E),deltaX:_.deltaX,deltaY:_.deltaY}}function Hm(_){var E=_.length;if(E===1)return{x:c(_[0].clientX),y:c(_[0].clientY)};for(var P=0,A=0,k=0;k<E;)P+=_[k].clientX,A+=_[k].clientY,k++;return{x:c(P/E),y:c(A/E)}}function qm(_,E,P){return{x:E/_||0,y:P/_||0}}function Jm(_,E){return _===E?ci:h(_)>=h(E)?_<0?zn:Nn:E<0?gn:O}function Hr(_,E,P){P||(P=jm);var A=E[P[0]]-_[P[0]],k=E[P[1]]-_[P[1]];return Math.sqrt(A*A+k*k)}function wh(_,E,P){P||(P=jm);var A=E[P[0]]-_[P[0]],k=E[P[1]]-_[P[1]];return Math.atan2(k,A)*180/Math.PI}function RC(_,E){return wh(E[1],E[0],Wr)+wh(_[1],_[0],Wr)}function LC(_,E){return Hr(E[0],E[1],Wr)/Hr(_[0],_[1],Wr)}var zC={mousedown:Pt,mousemove:Ee,mouseup:mt},NC="mousedown",FC="mousemove mouseup";function qr(){this.evEl=NC,this.evWin=FC,this.pressed=!1,he.apply(this,arguments)}b(qr,he,{handler:function(E){var P=zC[E.type];P&Pt&&E.button===0&&(this.pressed=!0),P&Ee&&E.which!==1&&(P=mt),this.pressed&&(P&mt&&(this.pressed=!1),this.callback(this.manager,P,{pointers:[E],changedPointers:[E],pointerType:ye,srcEvent:E}))}});var BC={pointerdown:Pt,pointermove:Ee,pointerup:mt,pointercancel:Nt,pointerout:Nt},UC={2:ot,3:Xt,4:ye,5:Xr},Km="pointerdown",Zm="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(Km="MSPointerDown",Zm="MSPointerMove MSPointerUp MSPointerCancel");function vh(){this.evEl=Km,this.evWin=Zm,he.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}b(vh,he,{handler:function(E){var P=this.store,A=!1,k=E.type.toLowerCase().replace("ms",""),B=BC[k],J=UC[E.pointerType]||E.pointerType,At=J==ot,Ot=U(P,E.pointerId,"pointerId");B&Pt&&(E.button===0||At)?Ot<0&&(P.push(E),Ot=P.length-1):B&(mt|Nt)&&(A=!0),!(Ot<0)&&(P[Ot]=E,this.callback(this.manager,B,{pointers:P,changedPointers:[E],pointerType:J,srcEvent:E}),A&&P.splice(Ot,1))}});var VC={touchstart:Pt,touchmove:Ee,touchend:mt,touchcancel:Nt},YC="touchstart",$C="touchstart touchmove touchend touchcancel";function Qm(){this.evTarget=YC,this.evWin=$C,this.started=!1,he.apply(this,arguments)}b(Qm,he,{handler:function(E){var P=VC[E.type];if(P===Pt&&(this.started=!0),!!this.started){var A=GC.call(this,E,P);P&(mt|Nt)&&A[0].length-A[1].length===0&&(this.started=!1),this.callback(this.manager,P,{pointers:A[0],changedPointers:A[1],pointerType:ot,srcEvent:E})}}});function GC(_,E){var P=X(_.touches),A=X(_.changedTouches);return E&(mt|Nt)&&(P=Z(P.concat(A),"identifier",!0)),[P,A]}var XC={touchstart:Pt,touchmove:Ee,touchend:mt,touchcancel:Nt},jC="touchstart touchmove touchend touchcancel";function Jr(){this.evTarget=jC,this.targetIds={},he.apply(this,arguments)}b(Jr,he,{handler:function(E){var P=XC[E.type],A=WC.call(this,E,P);A&&this.callback(this.manager,P,{pointers:A[0],changedPointers:A[1],pointerType:ot,srcEvent:E})}});function WC(_,E){var P=X(_.touches),A=this.targetIds;if(E&(Pt|Ee)&&P.length===1)return A[P[0].identifier]=!0,[P,P];var k,B,J=X(_.changedTouches),At=[],Ot=this.target;if(B=P.filter(function(jt){return L(jt.target,Ot)}),E===Pt)for(k=0;k<B.length;)A[B[k].identifier]=!0,k++;for(k=0;k<J.length;)A[J[k].identifier]&&At.push(J[k]),E&(mt|Nt)&&delete A[J[k].identifier],k++;if(At.length)return[Z(B.concat(At),"identifier",!0),At]}var HC=2500,tp=25;function xh(){he.apply(this,arguments);var _=x(this.handler,this);this.touch=new Jr(this.manager,_),this.mouse=new qr(this.manager,_),this.primaryTouch=null,this.lastTouches=[]}b(xh,he,{handler:function(E,P,A){var k=A.pointerType==ot,B=A.pointerType==ye;if(!(B&&A.sourceCapabilities&&A.sourceCapabilities.firesTouchEvents)){if(k)qC.call(this,P,A);else if(B&&JC.call(this,A))return;this.callback(E,P,A)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function qC(_,E){_&Pt?(this.primaryTouch=E.changedPointers[0].identifier,ep.call(this,E)):_&(mt|Nt)&&ep.call(this,E)}function ep(_){var E=_.changedPointers[0];if(E.identifier===this.primaryTouch){var P={x:E.clientX,y:E.clientY};this.lastTouches.push(P);var A=this.lastTouches,k=function(){var B=A.indexOf(P);B>-1&&A.splice(B,1)};setTimeout(k,HC)}}function JC(_){for(var E=_.srcEvent.clientX,P=_.srcEvent.clientY,A=0;A<this.lastTouches.length;A++){var k=this.lastTouches[A],B=Math.abs(E-k.x),J=Math.abs(P-k.y);if(B<=tp&&J<=tp)return!0}return!1}var np=at(o.style,"touchAction"),ip=np!==s,sp="compute",rp="auto",_h="manipulation",Bn="none",is="pan-x",ss="pan-y",Kr=ZC();function Sh(_,E){this.manager=_,this.set(E)}Sh.prototype={set:function(_){_==sp&&(_=this.compute()),ip&&this.manager.element.style&&Kr[_]&&(this.manager.element.style[np]=_),this.actions=_.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var _=[];return f(this.manager.recognizers,function(E){w(E.options.enable,[E])&&(_=_.concat(E.getTouchAction()))}),KC(_.join(" "))},preventDefaults:function(_){var E=_.srcEvent,P=_.offsetDirection;if(this.manager.session.prevented){E.preventDefault();return}var A=this.actions,k=I(A,Bn)&&!Kr[Bn],B=I(A,ss)&&!Kr[ss],J=I(A,is)&&!Kr[is];if(k){var At=_.pointers.length===1,Ot=_.distance<2,jt=_.deltaTime<250;if(At&&Ot&&jt)return}if(!(J&&B)&&(k||B&&P&yt||J&&P&Fn))return this.preventSrc(E)},preventSrc:function(_){this.manager.session.prevented=!0,_.preventDefault()}};function KC(_){if(I(_,Bn))return Bn;var E=I(_,is),P=I(_,ss);return E&&P?Bn:E||P?E?is:ss:I(_,_h)?_h:rp}function ZC(){if(!ip)return!1;var _={},E=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(P){_[P]=E?t.CSS.supports("touch-action",P):!0}),_}var Zr=1,le=2,hi=4,yn=8,je=yn,rs=16,Te=32;function We(_){this.options=m({},this.defaults,_||{}),this.id=rt(),this.manager=null,this.options.enable=C(this.options.enable,!0),this.state=Zr,this.simultaneous={},this.requireFail=[]}We.prototype={defaults:{},set:function(_){return m(this.options,_),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(_){if(d(_,"recognizeWith",this))return this;var E=this.simultaneous;return _=Qr(_,this),E[_.id]||(E[_.id]=_,_.recognizeWith(this)),this},dropRecognizeWith:function(_){return d(_,"dropRecognizeWith",this)?this:(_=Qr(_,this),delete this.simultaneous[_.id],this)},requireFailure:function(_){if(d(_,"requireFailure",this))return this;var E=this.requireFail;return _=Qr(_,this),U(E,_)===-1&&(E.push(_),_.requireFailure(this)),this},dropRequireFailure:function(_){if(d(_,"dropRequireFailure",this))return this;_=Qr(_,this);var E=U(this.requireFail,_);return E>-1&&this.requireFail.splice(E,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(_){return!!this.simultaneous[_.id]},emit:function(_){var E=this,P=this.state;function A(k){E.manager.emit(k,_)}P<yn&&A(E.options.event+op(P)),A(E.options.event),_.additionalEvent&&A(_.additionalEvent),P>=yn&&A(E.options.event+op(P))},tryEmit:function(_){if(this.canEmit())return this.emit(_);this.state=Te},canEmit:function(){for(var _=0;_<this.requireFail.length;){if(!(this.requireFail[_].state&(Te|Zr)))return!1;_++}return!0},recognize:function(_){var E=m({},_);if(!w(this.options.enable,[this,E])){this.reset(),this.state=Te;return}this.state&(je|rs|Te)&&(this.state=Zr),this.state=this.process(E),this.state&(le|hi|yn|rs)&&this.tryEmit(E)},process:function(_){},getTouchAction:function(){},reset:function(){}};function op(_){return _&rs?"cancel":_&yn?"end":_&hi?"move":_&le?"start":""}function cp(_){return _==O?"down":_==gn?"up":_==zn?"left":_==Nn?"right":""}function Qr(_,E){var P=E.manager;return P?P.get(_):_}function be(){We.apply(this,arguments)}b(be,We,{defaults:{pointers:1},attrTest:function(_){var E=this.options.pointers;return E===0||_.pointers.length===E},process:function(_){var E=this.state,P=_.eventType,A=E&(le|hi),k=this.attrTest(_);return A&&(P&Nt||!k)?E|rs:A||k?P&mt?E|yn:E&le?E|hi:le:Te}});function to(){be.apply(this,arguments),this.pX=null,this.pY=null}b(to,be,{defaults:{event:"pan",threshold:10,pointers:1,direction:Xm},getTouchAction:function(){var _=this.options.direction,E=[];return _&yt&&E.push(ss),_&Fn&&E.push(is),E},directionTest:function(_){var E=this.options,P=!0,A=_.distance,k=_.direction,B=_.deltaX,J=_.deltaY;return k&E.direction||(E.direction&yt?(k=B===0?ci:B<0?zn:Nn,P=B!=this.pX,A=Math.abs(_.deltaX)):(k=J===0?ci:J<0?gn:O,P=J!=this.pY,A=Math.abs(_.deltaY))),_.direction=k,P&&A>E.threshold&&k&E.direction},attrTest:function(_){return be.prototype.attrTest.call(this,_)&&(this.state&le||!(this.state&le)&&this.directionTest(_))},emit:function(_){this.pX=_.deltaX,this.pY=_.deltaY;var E=cp(_.direction);E&&(_.additionalEvent=this.options.event+E),this._super.emit.call(this,_)}});function Ch(){be.apply(this,arguments)}b(Ch,be,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Bn]},attrTest:function(_){return this._super.attrTest.call(this,_)&&(Math.abs(_.scale-1)>this.options.threshold||this.state&le)},emit:function(_){if(_.scale!==1){var E=_.scale<1?"in":"out";_.additionalEvent=this.options.event+E}this._super.emit.call(this,_)}});function Eh(){We.apply(this,arguments),this._timer=null,this._input=null}b(Eh,We,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[rp]},process:function(_){var E=this.options,P=_.pointers.length===E.pointers,A=_.distance<E.threshold,k=_.deltaTime>E.time;if(this._input=_,!A||!P||_.eventType&(mt|Nt)&&!k)this.reset();else if(_.eventType&Pt)this.reset(),this._timer=u(function(){this.state=je,this.tryEmit()},E.time,this);else if(_.eventType&mt)return je;return Te},reset:function(){clearTimeout(this._timer)},emit:function(_){this.state===je&&(_&&_.eventType&mt?this.manager.emit(this.options.event+"up",_):(this._input.timeStamp=l(),this.manager.emit(this.options.event,this._input)))}});function Th(){be.apply(this,arguments)}b(Th,be,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Bn]},attrTest:function(_){return this._super.attrTest.call(this,_)&&(Math.abs(_.rotation)>this.options.threshold||this.state&le)}});function Ph(){be.apply(this,arguments)}b(Ph,be,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:yt|Fn,pointers:1},getTouchAction:function(){return to.prototype.getTouchAction.call(this)},attrTest:function(_){var E=this.options.direction,P;return E&(yt|Fn)?P=_.overallVelocity:E&yt?P=_.overallVelocityX:E&Fn&&(P=_.overallVelocityY),this._super.attrTest.call(this,_)&&E&_.offsetDirection&&_.distance>this.options.threshold&&_.maxPointers==this.options.pointers&&h(P)>this.options.velocity&&_.eventType&mt},emit:function(_){var E=cp(_.offsetDirection);E&&this.manager.emit(this.options.event+E,_),this.manager.emit(this.options.event,_)}});function eo(){We.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}b(eo,We,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[_h]},process:function(_){var E=this.options,P=_.pointers.length===E.pointers,A=_.distance<E.threshold,k=_.deltaTime<E.time;if(this.reset(),_.eventType&Pt&&this.count===0)return this.failTimeout();if(A&&k&&P){if(_.eventType!=mt)return this.failTimeout();var B=this.pTime?_.timeStamp-this.pTime<E.interval:!0,J=!this.pCenter||Hr(this.pCenter,_.center)<E.posThreshold;this.pTime=_.timeStamp,this.pCenter=_.center,!J||!B?this.count=1:this.count+=1,this._input=_;var At=this.count%E.taps;if(At===0)return this.hasRequireFailures()?(this._timer=u(function(){this.state=je,this.tryEmit()},E.interval,this),le):je}return Te},failTimeout:function(){return this._timer=u(function(){this.state=Te},this.options.interval,this),Te},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==je&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function He(_,E){return E=E||{},E.recognizers=C(E.recognizers,He.defaults.preset),new Ah(_,E)}He.VERSION="2.0.7",He.defaults={domEvents:!1,touchAction:sp,enable:!0,inputTarget:null,inputClass:null,preset:[[Th,{enable:!1}],[Ch,{enable:!1},["rotate"]],[Ph,{direction:yt}],[to,{direction:yt},["swipe"]],[eo],[eo,{event:"doubletap",taps:2},["tap"]],[Eh]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var QC=1,hp=2;function Ah(_,E){this.options=m({},He.defaults,E||{}),this.options.inputTarget=this.options.inputTarget||_,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=_,this.input=MC(this),this.touchAction=new Sh(this,this.options.touchAction),lp(this,!0),f(this.options.recognizers,function(P){var A=this.add(new P[0](P[1]));P[2]&&A.recognizeWith(P[2]),P[3]&&A.requireFailure(P[3])},this)}Ah.prototype={set:function(_){return m(this.options,_),_.touchAction&&this.touchAction.update(),_.inputTarget&&(this.input.destroy(),this.input.target=_.inputTarget,this.input.init()),this},stop:function(_){this.session.stopped=_?hp:QC},recognize:function(_){var E=this.session;if(!E.stopped){this.touchAction.preventDefaults(_);var P,A=this.recognizers,k=E.curRecognizer;(!k||k&&k.state&je)&&(k=E.curRecognizer=null);for(var B=0;B<A.length;)P=A[B],E.stopped!==hp&&(!k||P==k||P.canRecognizeWith(k))?P.recognize(_):P.reset(),!k&&P.state&(le|hi|yn)&&(k=E.curRecognizer=P),B++}},get:function(_){if(_ instanceof We)return _;for(var E=this.recognizers,P=0;P<E.length;P++)if(E[P].options.event==_)return E[P];return null},add:function(_){if(d(_,"add",this))return this;var E=this.get(_.options.event);return E&&this.remove(E),this.recognizers.push(_),_.manager=this,this.touchAction.update(),_},remove:function(_){if(d(_,"remove",this))return this;if(_=this.get(_),_){var E=this.recognizers,P=U(E,_);P!==-1&&(E.splice(P,1),this.touchAction.update())}return this},on:function(_,E){if(_!==s&&E!==s){var P=this.handlers;return f(F(_),function(A){P[A]=P[A]||[],P[A].push(E)}),this}},off:function(_,E){if(_!==s){var P=this.handlers;return f(F(_),function(A){E?P[A]&&P[A].splice(U(P[A],E),1):delete P[A]}),this}},emit:function(_,E){this.options.domEvents&&tE(_,E);var P=this.handlers[_]&&this.handlers[_].slice();if(!(!P||!P.length)){E.type=_,E.preventDefault=function(){E.srcEvent.preventDefault()};for(var A=0;A<P.length;)P[A](E),A++}},destroy:function(){this.element&&lp(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function lp(_,E){var P=_.element;if(P.style){var A;f(_.options.cssProps,function(k,B){A=at(P.style,B),E?(_.oldCssProps[A]=P.style[A],P.style[A]=k):P.style[A]=_.oldCssProps[A]||""}),E||(_.oldCssProps={})}}function tE(_,E){var P=e.createEvent("Event");P.initEvent(_,!0,!0),P.gesture=E,E.target.dispatchEvent(P)}m(He,{INPUT_START:Pt,INPUT_MOVE:Ee,INPUT_END:mt,INPUT_CANCEL:Nt,STATE_POSSIBLE:Zr,STATE_BEGAN:le,STATE_CHANGED:hi,STATE_ENDED:yn,STATE_RECOGNIZED:je,STATE_CANCELLED:rs,STATE_FAILED:Te,DIRECTION_NONE:ci,DIRECTION_LEFT:zn,DIRECTION_RIGHT:Nn,DIRECTION_UP:gn,DIRECTION_DOWN:O,DIRECTION_HORIZONTAL:yt,DIRECTION_VERTICAL:Fn,DIRECTION_ALL:Xm,Manager:Ah,Input:he,TouchAction:Sh,TouchInput:Jr,MouseInput:qr,PointerEventInput:vh,TouchMouseInput:xh,SingleTouchInput:Qm,Recognizer:We,AttrRecognizer:be,Tap:eo,Pan:to,Swipe:Ph,Pinch:Ch,Rotate:Th,Press:Eh,on:S,off:D,each:f,merge:y,extend:v,assign:m,inherit:b,bindFn:x,prefixed:at});var eE=typeof t<"u"?t:typeof self<"u"?self:{};eE.Hammer=He,typeof s=="function"&&s.amd?s(function(){return He}):n.exports?n.exports=He:t[i]=He})(window,document,"Hammer")})($m);var Gm=$m.exports;const AC=up({__proto__:null,default:Kl(Gm)},[Gm]);g.ArrowShape=Dc,g.BallShape=si,g.BezierEasing=Pa,g.CSSToJSEasing=kw,g.Clock=Da,g.CommonKeyCode=cS,g.ConfettiShapeCombo=Yc,g.CrossShape=zc,g.CurveShape=Ac,g.CustomCanvasContext=Ju,g.CustomCanvasGradient=Xs,g.CustomCanvasPattern=va,g.DOMParse=_d,g.DOMVideo=ts,g.DrawContext=r2,g.Easing=N,g.EllipseShape=Nc,g.FileUpload=jy,g.FoxShape=Rc,g.HeartShape=Ic,g.HeartVariantShape=Oc,g.Interpolation=Ne,g.LineShape=Rn,g.Ls=mn,g.Matrix=It,g.Matrix2=Xc,g.Matrix3=zr,g.Matrix4=Jt,g.PointsShape=kr,g.QRCode=nn,g.RabbitShape=Lc,g.RectShape=dn,g.RingIndicatorShapeCombo=Vc,g.RingShape=Ki,g.SVGParse=Td,g.SVGParsedPathArgsLength=Di,g.SVGPathDataToD=Ea,g.SegmentShapeCombo=Bc,g.Shape=pt,g.ShapeCombo=qt,g.ShipShapeCombo=Fc,g.SliderShapeCombo=Uc,g.StarShape=kc,g.THEME=_C,g.TWEEN=Vw,g.TextShape=ri,g.Timeline=ki,g.TreeShapeCombo=Mc,g.Tween=Ma,g.Vector2=$s,g.Vector3=_e,g.Vector4=ba,g.WebGLCoordinateSystem=Zi,g.WebGLRenderer=OS,g.WebGPUCoordinateSystem=Gc,g.WebMonitor=fC,g.WebRTCClient=IS,g.WebSocketClient=Ce,g.YZCanvasContext=xa,g.a2c=js,g.a2c2=Zu,g.absolutizeSVGPath=Hs,g.addClass=q2,g.addWatermark=iw,g.addWxJsReadyFnBeforeConfig=bh,g.ajax=iu,g.aliJsChooseImage=hC,g.aliJsGetLocation=aC,g.aliJsOpenLocation=cC,g.aliJsPreviewImage=lC,g.aliJsReady=sC,g.aliJsScan=oC,g.aliJsTradePay=rC,g.angle=Qt,g.animate=d2,g.animateShapes=n2,g.animationEnd$=U_,g.animationStart$=B_,g.applyMiddleware=ux,g.atomReadAttribute=au,g.atomReadAttributes=Jo,g.atomReadStyle=qy,g.atomReadStyles=Ho,g.atomRemoveAttribute=Qy,g.atomRemoveDataset=yS,g.atomRemoveStyle=qo,g.atomWriteAttribute=Sn,g.atomWriteStyle=vi,g.attribute=Ke,g.base64EncodeOutputStream=Yu,g.bitmapMapper=Ld,g.blobToImageData=Mb,g.byteArrayOutputStream=ya,g.catmullRom2bezier=xw,g.changeBrightness=ew,g.changeCheckboxChecked=G2,g.changeDiaphaneity=nw,g.changeRadioChecked=$2,g.changeSelected=Y2,g.changeSize=tw,g.checkVersion=dC,g.checkWxJsApi=RS,g.clearCookies=bC,g.clearLocalStorage=gC,g.clearSessionStorage=vS,g.clickA=Zc,g.clipboard=S2,g.closeLog=Zh,g.closest=N2,g.combineEpics=dx,g.combineReducers=lx,g.compatableDownMovePoint$=q_,g.compileTemplate=n_,g.computeImageDisplayRect=Eb,g.containsChild=k2,g.coords$=TS,g.createCookie=yC,g.createDefaultMousePoint=ah,g.createDraggable=K_,g.createDrop=Z_,g.createElement=jd,g.createElementEventBus=dS,g.createElementNS=Z2,g.createEpicMiddleware=fx,g.createEvent=Ys,g.createEventListener=st,g.createEventListener$=$,g.createFeRoute=SS,g.createFragment=Xd,g.createFromEventPattern$=pb,g.createIndexDB=vC,g.createLocalStorage=Nm,g.createMiniReact=PS,g.createMiniVue=Dm,g.createMousePoint=Ln,g.createObjectURL=zd,g.createOnlineStatus$=W_,g.createParentEventListener=db,g.createReactAppStoreContext=Tx,g.createReduxStore=Jf,g.createSVGElement=an,g.createSessionStorage=ph,g.createStorage$=j_,g.createSvgPath=Sa,g.createTextNode=Q2,g.createThunkMiddleware=px,g.createVueAppStoreContext=Wx,g.createWebSocket=Im,g.createXMLHttpRequest=nu,g.cssAttrsToCanvasAttrs=cu,g.dataset=gS,g.dispatchClickFromEvent=Sb,g.dispatchEvent=pa,g.dispatchEventFromEvent=_b,g.distance=sn,g.documentVisible$=X_,g.domPrefixes=qc,g.domToBlob=Ql,g.domToString=jo,g.downloadFromSVGElement=tf,g.downloadFromSVGString=bw,g.drag$=im,g.dragEnd$=rm,g.dragEnter$=am,g.dragLeave$=cm,g.dragOver$=hm,g.dragStart$=sm,g.drawBitmapInCanvas=f2,g.drawQRCodeToCanvas=cw,g.drop$=om,g.easeNameToCubicBezier=Aa,g.elValueChange$=Y_,g.empty=Yd,g.exceptionLoggerMiddleware=yx,g.executeTimeLoggerMiddleware=bx,g.fetchLatestVersionFromHtml=Lm,g.flipSideToSide=Ib,g.flipUpsideDown=Ob,g.followMouseShape=t2,g.formSubmit$=$_,g.getBitmapFromCanvas=u2,g.getCSSVar=j,g.getCurrentVersion=Rm,g.getDOMMatrix=Hc,g.getDirection=lw,g.getDocumentElement=ai,g.getElementPositionInPage=dh,g.getElementPositionInPage2=nS,g.getElementPositionInViewport=fh,g.getEmSize=M2,g.getEventCurrentTarget=fb,g.getFileMD5Hash=eu,g.getFileMimeFromFileInBrowser=Xy,g.getFormSubmitData=Wy,g.getImageData=Bu,g.getImageDataByAIData=rw,g.getImageMainColor=Db,g.getInnerText=j2,g.getKeyCode=hS,g.getMouseButton=aS,g.getMousePositionInElement=_t,g.getMousePositionInPage=mh,g.getMousePositionInViewport=rS,g.getPage=tS,g.getRelativeBoundingClientRect=eS,g.getRemSize=Qc,g.getRules=Zy,g.getSVGRawStringFromElement=ww,g.getScrollWheelDelta=oS,g.getSelectedText=v2,g.getStyle=wi,g.getStyleSheets=ou,g.getTheme$=EC,g.getThemeColors=PC,g.getVNode=gh,g.getVerticalScrollTopPercentInPage=iS,g.getVertxRegisterBaseUrl=MS,g.getViewport=pm,g.getWindow=Q_,g.gifImage=$u,g.h=Pm,g.hFromEl=Vr,g.handleChunkLoadError=pC,g.hasClass=K2,g.hashChange$=_S,g.hideEl=Gd,g.hotKeyDown$=ym,g.hotKeyFile=uS,g.hotKeyFile$=bm,g.hotKeyUp$=lS,g.html=Vd,g.iframePostMessage=t_,g.imageDataToBitmap=Tb,g.imageDataToBlob=Ab,g.imageDataToDataURL=Pb,g.injectStyle=ru,g.injectWxJsConfig=kS,g.insert=oi,g.intersection$=_m,g.isActiveEl=P2,g.isChunkLoadError=mC,g.isElement=m2,g.isInViewport=sS,g.isInput=Qi,g.isInputCheckbox=nh,g.isInputNumber=V2,g.isInputRadio=ih,g.isInputText=U2,g.isRootEl=T2,g.isSVGElementPath=Qu,g.isSVGPath=Ca,g.isSelect=eh,g.isSupportEvent=c_,g.isSupportPointer=a_,g.isSupportTouch=o_,g.isTextArea=B2,g.jpgToPng=Jb,g.keyDown$=lm,g.keyPress$=V_,g.keyUp$=um,g.l2c=An,g.leftRotate=kb,g.length=Kn,g.loadImage=Bd,g.loadLink=y2,g.loadScript=g2,g.location$=Sm,g.longhandSVGPath=Sw,g.mapTDTJSSDK=uC,g.marginSharpen=qb,g.matchMedia$=Em,g.miniVue=AS,g.mosaic=sw,g.mountVNode=Xe,g.mouseAndPointerDownMovePoint$=mm,g.mouseClick$=d_,g.mouseContextMenu$=g_,g.mouseDoubleClick$=m_,g.mouseDown$=Jd,g.mouseDownMovePoint$=fm,g.mouseEnter$=u_,g.mouseLeave$=f_,g.mouseMove$=Br,g.mouseMovePoint$=H_,g.mouseOut$=l_,g.mouseOver$=h_,g.mouseUp$=Kd,g.mouseWheel$=p_,g.mutation$=xm,g.nearestElement=D2,g.nextElementSibling=L2,g.normalizePoint=hw,g.normalizeSVGPath=Ta,g.ofType=mx,g.onBeforeUnload=Nd,g.onDocumentReady=Kc,g.openLog=vg,g.operationParser=vx,g.outputGifBase64=Gu,g.outputQRCodeBase64=aw,g.pan$=y_,g.panCancel$=x_,g.panDown$=E_,g.panEnd$=v_,g.panLeft$=__,g.panMove$=b_,g.panRight$=S_,g.panStart$=w_,g.panUp$=C_,g.parent=I2,g.parents=th,g.parseCSS=Ed,g.parseSVGPath=Ws,g.parseTransformToMatrix=Rd,g.patchVNode=Yr,g.pinch$=T_,g.pinchIn$=P_,g.pinchOut$=A_,g.pngToJpg=Kb,g.pointerCancel$=uh,g.pointerDown$=hh,g.pointerDownMovePoint$=Ur,g.pointerMove$=ch,g.pointerUp$=lh,g.polar=rn,g.polymorphTween=s2,g.popStateChange$=Cm,g.press$=M_,g.pressDownMove=wm,g.pressDownMoveWithMouse=mS,g.pressDownMoveWithPointer=vm,g.pressDownMoveWithTouch=pS,g.preventDefault=tn,g.previousElementSibling=z2,g.pull$=J_,g.q2c=Mi,g.querySelectorAllToStringArray=$y,g.radiusClip=Qb,g.rawState=nc,g.readFileInBrowser=bi,g.readStyleFromStyles=Hy,g.rectClip=Zb,g.relativeSVGPath=vw,g.rem2px=A2,g.remove=W2,g.removeAllEventListeners=mb,g.removeClass=J2,g.renderVNode=Am,g.resize=qd,g.resize$=rh,g.reverseCSSToJSEasing=Rw,g.reverseEaseNameToCubicBezier=af,g.reverseEasing=ef,g.revokeObjectURL=p2,g.rightRotate=Rb,g.rotate$=D_,g.rotatePoint=ge,g.runInSandbox=e_,g.rxState=hx,g.safeArea$=ES,g.scheduleVNodeAsap=yh,g.scheduleVNodeImmediately=Mm,g.scroll$=G_,g.scrollParent=O2,g.scrollTo=C2,g.selectFile=Ud,g.selectFileImage=w2,g.selectFileInBrowser=Wo,g.setCSSVar=TC,g.setLogUploadFn=xg,g.setManualScroll=E2,g.setRem=DS,g.setStyle=jn,g.setTheme=Ym,g.setWindowTitle=x2,g.shadowRoot=F2,g.sharpen=Hb,g.showEl=$d,g.showUpdateDialog=zm,g.siblings=R2,g.simulateEventFromTouch=Cb,g.stateLoggerMiddleware=gx,g.stopPropagation=Fu,g.stringToDom=Gy,g.swipe$=I_,g.swipeDown$=L_,g.swipeLeft$=O_,g.swipeRight$=k_,g.swipeUp$=R_,g.tap$=nm,g.tapOutSide$=z_,g.targetToAfterDropShape=e2,g.text=X2,g.toBlackAndWhite=Nb,g.toBlue=Vb,g.toBlueAndGreen=Gb,g.toBlueAndGrey=Wb,g.toDegree=Tt,g.toGreen=Ub,g.toGreenAndGrey=jb,g.toGrey=Lb,g.toGrey2=zb,g.toOpposite=Fb,g.toRadian=q,g.toRed=Bb,g.toRedAndBlue=$b,g.toRedAndGreen=Yb,g.toRedAndGrey=Xb,g.toggleClass=sh,g.toggleElDisplay=H2,g.toggleTheme=CC,g.touchCancel$=em,g.touchDownMovePoint$=dm,g.touchEnd$=tm,g.touchMove$=Zd,g.touchStart$=Qd,g.transform=Jc,g.transformPath2D=l2,g.transitionEnd$=F_,g.transitionStart$=N_,g.unmountVNode=es,g.updateVNode=Gr,g.urlChange$=xS,g.useDimensions=jx,g.useImmer=Gx,g.useImmerReducer=Xx,g.useLocale=$c,g.useReactControllableState=Px,g.useReactState=ax,g.useVueControllableState=Hx,g.useVueState=cx,g.useWindowResize$=i_,g.vibrate=_2,g.visible$=wS,g.waitElementAddedInDOM=bS,g.waitForStyleSheetsLoaded=b2,g.writeToIndexDB=xC,g.wxJsChooseImage=NS,g.wxJsDownloadImage=US,g.wxJsDownloadVoice=JS,g.wxJsGetLocalImgData=VS,g.wxJsGetLocation=tC,g.wxJsGetNetworkType=ZS,g.wxJsLogin=iC,g.wxJsOnVoicePlayEnd=HS,g.wxJsOnVoiceRecordEnd=GS,g.wxJsOpenLocation=QS,g.wxJsPauseVoice=jS,g.wxJsPay=nC,g.wxJsPlayVoice=XS,g.wxJsPreviewImage=FS,g.wxJsScanQRCode=eC,g.wxJsStartRecord=YS,g.wxJsStopRecord=$S,g.wxJsStopVoice=WS,g.wxJsTranslateVoice=KS,g.wxJsUpdateAppMessageShareData=LS,g.wxJsUpdateTimelineShareData=zS,g.wxJsUploadImage=BS,g.wxJsUploadVoice=qS,g.zvhToLSVGPath=_w,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|
|
117
117
|
//# sourceMappingURL=zyzgroup_core_web.umd.cjs.map
|