Snapshot of main at 9f39a6e1e (2026-11-02)

This commit is contained in:
Ronald Huynen committed 2026-11-02 10:41:47 +01:00
commit 6ccf1792d7
2580 files changed
+1040202

No files matched your search

+93
View File
@@ -0,0 +1,93 @@
{
"__commonjsHelpers-Cpj98o6Y.js": {
"file": "assets/_commonjsHelpers-Cpj98o6Y.js",
"name": "_commonjsHelpers"
},
"_cytoscape-fcose-Di-e6ZnW.js": {
"file": "assets/cytoscape-fcose-Di-e6ZnW.js",
"name": "cytoscape-fcose",
"isDynamicEntry": true,
"imports": [
"__commonjsHelpers-Cpj98o6Y.js"
]
},
"_jszip.min-KAUKf24L.js": {
"file": "assets/jszip.min-KAUKf24L.js",
"name": "jszip.min",
"isDynamicEntry": true,
"imports": [
"__commonjsHelpers-Cpj98o6Y.js"
]
},
"node_modules/cytoscape/dist/cytoscape.esm.mjs": {
"file": "assets/cytoscape.esm-B5_a_fx8.js",
"name": "cytoscape.esm",
"src": "node_modules/cytoscape/dist/cytoscape.esm.mjs",
"isDynamicEntry": true
},
"resources/css/app.css": {
"file": "assets/app-C8dBRqJJ.css",
"src": "resources/css/app.css",
"isEntry": true
},
"resources/css/fonts.css": {
"file": "assets/fonts-CM_wEaGB.css",
"src": "resources/css/fonts.css",
"isEntry": true
},
"resources/fonts/static/oswald/Oswald-Bold.ttf": {
"file": "assets/Oswald-Bold-CHB0NlSS.ttf",
"src": "resources/fonts/static/oswald/Oswald-Bold.ttf"
},
"resources/fonts/static/oswald/Oswald-ExtraLight.ttf": {
"file": "assets/Oswald-ExtraLight-DU2v8jKc.ttf",
"src": "resources/fonts/static/oswald/Oswald-ExtraLight.ttf"
},
"resources/fonts/static/oswald/Oswald-Light.ttf": {
"file": "assets/Oswald-Light-BxipAuXN.ttf",
"src": "resources/fonts/static/oswald/Oswald-Light.ttf"
},
"resources/fonts/static/oswald/Oswald-Medium.ttf": {
"file": "assets/Oswald-Medium-UI9DaFIC.ttf",
"src": "resources/fonts/static/oswald/Oswald-Medium.ttf"
},
"resources/fonts/static/oswald/Oswald-Regular.ttf": {
"file": "assets/Oswald-Regular-CUewnb0h.ttf",
"src": "resources/fonts/static/oswald/Oswald-Regular.ttf"
},
"resources/fonts/static/oswald/Oswald-SemiBold.ttf": {
"file": "assets/Oswald-SemiBold-BS34gioX.ttf",
"src": "resources/fonts/static/oswald/Oswald-SemiBold.ttf"
},
"resources/js/app.js": {
"file": "assets/app-DRZ6ZsE1.js",
"name": "app",
"src": "resources/js/app.js",
"isEntry": true,
"imports": [
"__commonjsHelpers-Cpj98o6Y.js"
],
"dynamicImports": [
"node_modules/cytoscape/dist/cytoscape.esm.mjs",
"_cytoscape-fcose-Di-e6ZnW.js",
"_jszip.min-KAUKf24L.js"
]
},
"resources/js/quill.js": {
"file": "assets/quill-MA6zmW_h.js",
"name": "quill",
"src": "resources/js/quill.js",
"isEntry": true,
"imports": [
"__commonjsHelpers-Cpj98o6Y.js"
],
"css": [
"assets/quill-4RyaA7S0.css"
]
},
"resources/sass/custom_timebank.css": {
"file": "assets/custom_timebank-B67t1EYy.css",
"src": "resources/sass/custom_timebank.css",
"isEntry": true
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
var o=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}export{o as c,l as g};
+1
View File
@@ -0,0 +1 @@
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(var(--color-primary-200) / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(var(--color-primary-200) / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Poppins,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple]Line truncated
+138
View File
@@ -0,0 +1,138 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/cytoscape-fcose-Di-e6ZnW.js","assets/_commonjsHelpers-Cpj98o6Y.js","assets/jszip.min-KAUKf24L.js"])))=>i.map(i=>d[i]);
var VT=Object.defineProperty;var qT=(e,t,n)=>t in e?VT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ot=(e,t,n)=>qT(e,typeof t!="symbol"?t+"":t,n);import{c as Cl,g as zv}from"./_commonjsHelpers-Cpj98o6Y.js";const XT="modulepreload",YT=function(e){return"/build/"+e},ag={},af=function(t,n,i){let r=Promise.resolve();if(n&&n.length>0){let a=function(h){return Promise.all(h.map(d=>Promise.resolve(d).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),u=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));r=a(n.map(h=>{if(h=YT(h),h in ag)return;ag[h]=!0;const d=h.endsWith(".css"),m=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${m}`))return;const y=document.createElement("link");if(y.rel=d?"stylesheet":XT,d||(y.as="script"),y.crossOrigin="",y.href=h,u&&y.setAttribute("nonce",u),document.head.appendChild(y),d)return new Promise((x,S)=>{y.addEventListener("load",x),y.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return r.then(a=>{for(const l of a||[])l.status==="rejected"&&s(l.reason);return t().catch(s)})};var So={exports:{}};/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/var KT=So.exports,lg;function GT(){return lg||(lg=1,function(e,t){(function(){var n,i="4.17.23",r=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",l="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",h=500,d="__lodash_placeholder__",m=1,y=2,x=4,S=1,C=2,T=1,A=2,M=4,B=8,D=16,R=32,N=64,I=128,j=256,q=512,F=30,H="...",U=800,V=16,st=1,tt=2,it=3,K=1/0,ct=9007199254740991,dt=17976931348623157e292,_t=NaN,wt=4294967295,vt=wt-1,Ft=wt>>>1,xt=[["ary",I],["bind",T],["bindKey",A],["curry",B],["curryRight",D],["flip",q],["partial",R],["partialRight",N],["rearg",j]],Ct="[object Arguments]",Nt="[object Array]",be="[object AsyncFunction]",Ot="[object Boolean]",St="[object Date]",In="[object DOMException]",De="[object Error]",te="[object Function]",Le="[object GeneratorFunction]",re="[object Map]",oe="[object Number]",we="[object Null]",ye="[object Object]",Ve="[object Promise]",wn="[object Proxy]",he="[object RegExp]",Xt="[object Set]",xe="[object String]",Ae="[object Symbol]",xn="[object Undefined]",Yt="[object WeakMap]",Se="[object WeakSet]",fe="[object ArrayBuffer]",Z="[object DataView]",et="[object Float32Array]",ht="[object Float64Array]",lt="[object Int8Array]",Bt="[object Int16Array]",jt="[object Int32Array]",de="[object Uint8Array]",Ie="[object Uint8ClampedArray]",qe="[object Uint16Array]",Ne="[object Uint32Array]",Zi=/\b__p \+= '';/g,Qi=/\b(__p \+=) '' \+/g,tr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,er=/&(?:amp|lt|gt|quot|#39);/g,Fr=/[&<>"']/g,Br=RegExp(er.source),Nn=RegExp(Fr.source),$t=/<%-([\s\S]+?)%>/g,_e=/<%([\s\S]+?)%>/g,Sn=/<%=([\s\S]+?)%>/g,Wc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jc=/^\w*$/,$c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ss=/[\\^$.*+?()[\]{}|]/g,Ei=RegExp(Ss.source),Ts=/^\s+/,la=/\s/,ca=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ua=/\{\n\/\* \[wrapped with (.+)\] \*/,ha=/,? & /,Uc=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Vc=/[()=,{}\[\]\/\s]/,qc=/\\(\\)?/g,Hr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fa=/\w*$/,da=/^[-+]0x[0-9a-f]+$/i,Xc=/^0b[01]+$/i,Yc=/^\[object .+?Constructor\]$/,Kc=/^0o[0-7]+$/i,Gc=/^(?:0|[1-9]\d*)$/,Jc=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,zr=/($^)/,Zc=/['\n\r\u2028\u2029\\]/g,Wr="\\ud800-\\udfff",pa="\\u0300-\\u036f",oi="\\ufe20-\\ufe2f",Qc="\\u20d0-\\u20ff",ga=pa+oi+Qc,ma="\\u2700-\\u27bf",va="a-z\\xdf-\\xf6\\xf8-\\xff",tu="\\xac\\xb1\\xd7\\xf7",eu="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",nu="\\u2000-\\u206f",iu=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ba="A-Z\\xc0-\\xd6\\xd8-\\xde",jr="\\ufe0e\\ufe0f",ya=tu+eu+nu+iu,Cs="['’]",Os="["+Wr+"]",_a="["+ya+"]",$r="["+ga+"]",wa="\\d+",ru="["+ma+"]",xa="["+va+"]",Sa="[^"+Wr+ya+wa+ma+va+ba+"]",ks="\\ud83c[\\udffb-\\udfff]",su="(?:"+$r+"|"+ks+")",Ur="[^"+Wr+"]",As="(?:\\ud83c[\\udde6-\\uddff]){2}",Es="[\\ud800-\\udbff][\\udc00-\\udfff]",Pi="["+ba+"]",Ta="\\u200d",Ca="(?:"+xa+"|"+Sa+")",ou="(?:"+Pi+"|"+Sa+")",Oa="(?:"+Cs+"(?:d|ll|m|re|s|t|ve))?",ka="(?:"+Cs+"(?:D|LL|M|RE|S|T|VE))?",Aa=su+"?",Ea="["+jr+"]?",Fn="(?:"+Ta+"(?:"+[Ur,As,Es].join("|")+")"+Ea+Aa+")*",au="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pa="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ma=Ea+Aa+Fn,ai="(?:"+[ru,As,Es].join("|")+")"+Ma,lu="(?:"+[Ur+$r+"?",$r,As,Es,Os].join("|")+")",Ps=RegExp(Cs,"g"),cu=RegExp($r,"g"),Ms=RegExp(ks+"(?="+ks+")|"+lu+Ma,"g"),uu=RegExp([Pi+"?"+xa+"+"+Oa+"(?="+[_a,Pi,"$"].join("|")+")",ou+"+"+ka+"(?="+[_a,Pi+Ca,"$"].join("|")+")",Pi+"?"+Ca+"+"+Oa,Pi+"+"+ka,Pa,au,wa,ai].join("|"),"g"),hu=RegExp("["+Ta+Wr+ga+jr+"]"),fu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Rs=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],du=-1,qt={};qt[et]=qt[ht]=qt[lt]=qt[Bt]=qt[jt]=qt[de]=qt[Ie]=qt[qe]=qt[Ne]=!0,qt[Ct]=qt[Nt]=qt[fe]=qt[Ot]=qt[Z]=qt[St]=qt[De]=qt[te]=qt[re]=qt[oe]=qt[ye]=qt[he]=qt[Xt]=qt[xe]=qt[Yt]=!1;var Ut={};Ut[Ct]=Ut[Nt]=Ut[fe]=Ut[Z]=Ut[Ot]=Ut[St]=Ut[et]=Ut[ht]=Ut[lt]=Ut[Bt]=Ut[jt]=Ut[re]=Ut[oe]=Ut[ye]=Ut[he]=Ut[Xt]=Ut[xe]=Ut[Ae]=Ut[de]=Ut[Ie]=Ut[qe]=Ut[Ne]=!0,Ut[De]=Ut[te]=Ut[Yt]=!1;var pu={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:Line truncated
/* [wrapped with `+c+`] */
`)}function S_(o){return kt(o)||gr(o)||!!(xd&&o&&o[xd])}function gi(o,c){var f=typeof o;return c=c??ct,!!c&&(f=="number"||f!="symbol"&&Gc.test(o))&&o>-1&&o%1==0&&o<c}function Je(o,c,f){if(!se(f))return!1;var _=typeof c;return(_=="number"?nn(f)&&gi(c,f.length):_=="string"&&c in f)?Hn(f[c],o):!1}function hh(o,c){if(kt(o))return!1;var f=typeof o;return f=="number"||f=="symbol"||f=="boolean"||o==null||mn(o)?!0:jc.test(o)||!Wc.test(o)||c!=null&&o in ut(c)}function T_(o){var c=typeof o;return c=="string"||c=="number"||c=="symbol"||c=="boolean"?o!=="__proto__":o===null}function fh(o){var c=pl(o),f=E[c];if(typeof f!="function"||!(c in Dt.prototype))return!1;if(o===f)return!0;var _=lh(f);return!!_&&o===_[0]}function C_(o){return!!Xs&&Xs in o}var O_=Gr?mi:Eh;function co(o){var c=o&&o.constructor,f=typeof c=="function"&&c.prototype||ci;return o===f}function bp(o){return o===o&&!se(o)}function yp(o,c){return function(f){return f==null?!1:f[o]===c&&(c!==n||o in ut(f))}}function k_(o){var c=_l(o,function(_){return f.size===h&&f.clear(),_}),f=c.cache;return c}function A_(o,c){var f=o[1],_=c[1],k=f|_,P=k<(T|A|I),L=_==I&&f==B||_==I&&f==j&&o[7].length<=c[8]||_==(I|j)&&c[7].length<=c[8]&&f==B;if(!(P||L))return o;_&T&&(o[2]=c[2],k|=f&T?0:M);var z=c[3];if(z){var $=o[3];o[3]=$?ep($,z,c[4]):z,o[4]=$?Kn(o[3],d):c[4]}return z=c[5],z&&($=o[5],o[5]=$?np($,z,c[6]):z,o[6]=$?Kn(o[5],d):c[6]),z=c[7],z&&(o[7]=z),_&I&&(o[8]=o[8]==null?c[8]:Be(o[8],c[8])),o[9]==null&&(o[9]=c[9]),o[0]=c[0],o[1]=k,o}function E_(o){var c=[];if(o!=null)for(var f in ut(o))c.push(f);return c}function P_(o){return or.call(o)}function _p(o,c,f){return c=Ce(c===n?o.length-1:c,0),function(){for(var _=arguments,k=-1,P=Ce(_.length-c,0),L=O(P);++k<P;)L[k]=_[c+k];k=-1;for(var z=O(c+1);++k<c;)z[k]=_[k];return z[c]=f(L),Xe(o,this,z)}}function wp(o,c){return c.length<2?o:fr(o,kn(c,0,-1))}function M_(o,c){for(var f=o.length,_=Be(c.length,f),k=en(o);_--;){var P=c[_];o[_]=gi(P,f)?k[P]:n}return o}function dh(o,c){if(!(c==="constructor"&&typeof o[c]=="function")&&c!="__proto__")return o[c]}var xp=Tp(Vd),uo=qy||function(o,c){return Te.setTimeout(o,c)},ph=Tp(t_);function Sp(o,c,f){var _=c+"";return ph(o,x_(_,R_(y_(_),f)))}function Tp(o){var c=0,f=0;return function(){var _=Gy(),k=V-(_-f);if(f=_,k>0){if(++c>=U)return arguments[0]}else c=0;return o.apply(n,arguments)}}function ml(o,c){var f=-1,_=o.length,k=_-1;for(c=c===n?_:c;++f<c;){var P=Gu(f,k),L=o[P];o[P]=o[f],o[f]=L}return o.length=c,o}var Cp=k_(function(o){var c=[];return o.charCodeAt(0)===46&&c.push(""),o.replace($c,function(f,_,k,P){c.push(k?P.replace(qc,"$1"):_||f)}),c});function Qn(o){if(typeof o=="string"||mn(o))return o;var c=o+"";return c=="0"&&1/o==-K?"-0":c}function pr(o){if(o!=null){try{return sr.call(o)}catch{}try{return o+""}catch{}}return""}function R_(o,c){return Ye(xt,function(f){var _="_."+f[0];c&f[1]&&!Xr(o,_)&&o.push(_)}),o.sort()}function Op(o){if(o instanceof Dt)return o.clone();var c=new Cn(o.__wrapped__,o.__chain__);return c.__actions__=en(o.__actions__),c.__index__=o.__index__,c.__values__=o.__values__,c}function D_(o,c,f){(f?Je(o,c,f):c===n)?c=1:c=Ce(At(c),0);var _=o==null?0:o.length;if(!_||c<1)return[];for(var k=0,P=0,L=O(Za(_/c));k<_;)L[P++]=kn(o,k,k+=c);return L}function L_(o){for(var c=-1,f=o==null?0:o.length,_=0,k=[];++c<f;){var P=o[c];P&&(k[_++]=P)}return k}function I_(){var o=arguments.length;if(!o)return[];for(var c=O(o-1),f=arguments[0],_=o;_--;)c[_-1]=arguments[_];return Xn(kt(f)?en(f):[f],Fe(c,1))}var N_=Pt(function(o,c){return pe(o)?ro(o,Fe(c,1,pe,!0)):[]}),F_=Pt(function(o,c){var f=An(c);return pe(f)&&(f=n),pe(o)?ro(o,Fe(c,1,pe,!0),pt(f,2)):[]}),B_=Pt(function(o,c){var f=An(c);return pe(f)&&(f=n),pe(o)?ro(o,Fe(c,1,pe,!0),n,f):[]});function H_(o,c,f){var _=o==null?0:o.length;return _?(c=f||c===n?1:At(c),kn(o,c<0?0:c,_)):[]}function z_(o,c,f){var _=o==null?0:o.length;return _?(c=f||c===n?1:At(c),c=_-c,kn(o,0,c<0?0:c)):[]}function W_(o,c){return o&&o.length?ll(o,pt(c,3),!0,!0):[]}function j_(o,c){return o&&o.length?ll(o,pt(c,3),!0):[]}function $_(o,c,f,_){var k=o==null?0:o.length;return k?(f&&typeof f!="number"&&Je(o,c,f)&&(f=0,_=k),I0(o,c,f,_)):[]}function kp(o,c,f){var _=o==null?0:o.length;if(!_)return-1;var k=f==null?0:At(f);return k<0&&(k=Ce(_+k,0)),yt(o,pt(c,3),k)}function Ap(o,c,f){var _=o==null?0:o.length;if(!_)return-1;var k=_-1;return f!==n&&(k=At(f),k=f<0?Ce(_+k,0):Be(k,_-1)),yt(o,pt(c,3),k,!0)}function Ep(o){var c=o==null?0:o.length;return c?Fe(o,1):[]}function U_(o){var c=o==null?0:o.length;return c?Fe(o,K):[]}function V_(o,c){var f=o==null?0:o.length;return f?(c=c===n?1:At(c),Fe(o,c)):[]}function q_(o){for(var c=-1,f=o==null?0:o.length,_={};++c<f;){var k=o[c];_[k[0]]=k[1]}return _}function Pp(o){return o&&o.length?o[0]:n}function X_(o,c,f){var _=o==null?0:o.length;if(!_)return-1;var k=f==null?0:At(f);return k<0&&(k=Ce(_+k,0)),Yn(o,c,k)}function Y_(o){var c=o==null?0:o.length;return c?kn(o,0,-1):[]}var K_=Pt(function(o){var c=Kt(o,eh);return c.length&&c[0]===o[0]?Vu(c):[]}),G_=Pt(f Line truncated
`;o.replace(at,function(mt,Mt,It,vn,Ze,bn){return It||(It=vn),Q+=o.slice(G,bn).replace(Zc,Au),Mt&&(z=!0,Q+=`' +
__e(`+Mt+`) +
'`),Ze&&($=!0,Q+=`';
`+Ze+`;
__p += '`),It&&(Q+=`' +
((__t = (`+It+`)) == null ? '' : __t) +
'`),G=bn+mt.length,mt}),Q+=`';
`;var gt=Ht.call(c,"variable")&&c.variable;if(!gt)Q=`with (obj) {
`+Q+`
}
`;else if(Vc.test(gt))throw new Y(l);Q=($?Q.replace(Zi,""):Q).replace(Qi,"$1").replace(tr,"$1;"),Q="function("+(gt||"obj")+`) {
`+(gt?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(z?", __e = _.escape":"")+($?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+Q+`return __p
}`;var Et=rg(function(){return rt(P,ft+"return "+Q).apply(n,L)});if(Et.source=Q,yh(Et))throw Et;return Et}function ZS(o){return Wt(o).toLowerCase()}function QS(o){return Wt(o).toUpperCase()}function tT(o,c,f){if(o=Wt(o),o&&(f||c===n))return Wa(o);if(!o||!(c=gn(c)))return o;var _=pn(o),k=pn(c),P=ja(_,k),L=$a(_,k)+1;return Bi(_,P,L).join("")}function eT(o,c,f){if(o=Wt(o),o&&(f||c===n))return o.slice(0,qa(o)+1);if(!o||!(c=gn(c)))return o;var _=pn(o),k=$a(_,pn(c))+1;return Bi(_,0,k).join("")}function nT(o,c,f){if(o=Wt(o),o&&(f||c===n))return o.replace(Ts,"");if(!o||!(c=gn(c)))return o;var _=pn(o),k=ja(_,pn(c));return Bi(_,k).join("")}function iT(o,c){var f=F,_=H;if(se(c)){var k="separator"in c?c.separator:k;f="length"in c?At(c.length):f,_="omission"in c?gn(c.omission):_}o=Wt(o);var P=o.length;if(Di(o)){var L=pn(o);P=L.length}if(f>=P)return o;var z=f-Li(_);if(z<1)return _;var $=L?Bi(L,0,z).join(""):o.slice(0,z);if(k===n)return $+_;if(L&&(z+=$.length-z),_h(k)){if(o.slice(z).search(k)){var G,J=$;for(k.global||(k=ee(k.source,Wt(fa.exec(k))+"g")),k.lastIndex=0;G=k.exec(J);)var Q=G.index;$=$.slice(0,Q===n?z:Q)}}else if(o.indexOf(gn(k),z)!=z){var at=$.lastIndexOf(k);at>-1&&($=$.slice(0,at))}return $+_}function rT(o){return o=Wt(o),o&&Br.test(o)?o.replace(er,Xa):o}var sT=is(function(o,c,f){return o+(f?" ":"")+c.toUpperCase()}),Sh=sp("toUpperCase");function ig(o,c,f){return o=Wt(o),c=f?n:c,c===n?Eu(o)?v(o):Su(o):o.match(c)||[]}var rg=Pt(function(o,c){try{return Xe(o,n,c)}catch(f){return yh(f)?f:new Y(f)}}),oT=pi(function(o,c){return Ye(c,function(f){f=Qn(f),fi(o,f,vh(o[f],o))}),o});function aT(o){var c=o==null?0:o.length,f=pt();return o=c?Kt(o,function(_){if(typeof _[1]!="function")throw new tn(a);return[f(_[0]),_[1]]}):[],Pt(function(_){for(var k=-1;++k<c;){var P=o[k];if(Xe(P[0],this,_))return Xe(P[1],this,_)}})}function lT(o){return D0(On(o,m))}function Th(o){return function(){return o}}function cT(o,c){return o==null||o!==o?c:o}var uT=ap(),hT=ap(!0);function sn(o){return o}function Ch(o){return Fd(typeof o=="function"?o:On(o,m))}function fT(o){return Hd(On(o,m))}function dT(o,c){return zd(o,On(c,m))}var pT=Pt(function(o,c){return function(f){return so(f,o,c)}}),gT=Pt(function(o,c){return function(f){return so(o,f,c)}});function Oh(o,c,f){var _=Ee(c),k=sl(c,_);f==null&&!(se(c)&&(k.length||!_.length))&&(f=c,c=o,o=this,k=sl(c,Ee(c)));var P=!(se(f)&&"chain"in f)||!!f.chain,L=mi(o);return Ye(k,function(z){var $=c[z];o[z]=$,L&&(o.prototype[z]=function(){var G=this.__chain__;if(P||G){var J=o(this.__wrapped__),Q=J.__actions__=en(this.__actions__);return Q.push({func:$,args:arguments,thisArg:o}),J.__chain__=G,J}return $.apply(o,Xn([this.value()],arguments))})}),o}function mT(){return Te._===this&&(Te._=Ys),this}function kh(){}function vT(o){return o=At(o),Pt(function(c){return Wd(c,o)})}var bT=rh(Kt),yT=rh(Is),_T=rh(Bs);function sg(o){return hh(o)?Hs(Qn(o)):G0(o)}function wT(o){return function(c){return o==null?n:fr(o,c)}}var xT=cp(),ST=cp(!0);function Ah(){return[]}function Eh(){return!1}function TT(){return{}}function CT(){return""}function OT(){return!0}function kT(o,c){if(o=At(o),o<1||o>ct)return[];var f=wt,_=Be(o,wt);c=pt(c),o-=wt;for(var k=$s(_,c);++f<o;)c(f);return k}function AT(o){return kt(o)?Kt(o,Qn):mn(o)?[o]:en(Cp(Wt(o)))}function ET(o){var c=++Nu;return Wt(o)+c}var PT=hl(function(o,c){return o+c},0),MT=sh("ceil"),RT=hl(function(o,c){return o/c},1),DT=sh("floor");function LT(o){return o&&o.length?rl(o,sn,Uu):n}function IT(o,c){return o&&o.length?rl(o,pt(c,2),Uu):n}function NT(o){return za(o,sn)}function FT(o,c){return za(o,pt(c,2))}function BT(o){return o&&o.length?rl(o,sn,Yu):n}function HT(o,c){return o&&o.length?rl(o,pt(c,2),Yu):n}var zT=hl(function(o,c){return o*c},1),WT=sh("round"),jT=hl(function(o,c){return o-c},0);function $T(o){return o&&o.length?js(o,sn):0}function UT(o,c){return o&&o.length?js(o,pt(c,2)):0}return E.after=fx,E.ary=Np,E.assign=Qx,E.assignIn=Gp,E.assignInWith=Tl,E.assignWith=tS,E.at=eS,E.before=Fp,E.bind=vh,E.bindAll=oT,E.bindKey=Bp,E.castArray=Tx,E.chain=Dp,E.chunk=D_,E.compact=L_,E.concat=I_,E.cond=aT,E.conforms=lT,E.constant=Th,E.countBy=$w,E.create=nS,E.curry=Hp,E.curryRight=zp,E.debounce=Wp,E.defaults=iS,E.defaultsDeep=rS,E.defer=dx,E.delay=px,E.difference=N_,E.differenceBy=F_,E.differenceWith=B_,E.drop=H_,E.dropRight=z_,E.dropRightWhile=W_,E.dropWhile=j_,E.fill=$_,E.filter=Vw,E.flatMap=Yw,E.flatMapDeep=Kw,E.flatMapDepth=Gw,E.flatten=Ep,E.flattenDeep=U_,E.flattenDepth=V_,E.flip=gx,E.flow=uT,E.flowRight=hT,E.fromPairs=q_,E.functions=hS,E.functionsIn=fS,E.groupBy=Jw,E.initial=Y_,E.intersection=K_,E.intersectionBy=G_,E.intersectionWith=J_,E.invert=pS,E.invertBy=gS,E.invokeMap=Qw,E.iteratee=Ch,E.keyBy=tx,E.keys=Ee,E.keysIn=rn,E.map=bl,E.mapKeys=vS,E.mapValues=bS,E.matches=fT,E.matchesProperty=dT,E.memoize=_l,E.merge=yS,E.mergeWith=Jp,E.method=pT,E.methodOf=gT,E.mixin=Oh,E.negate=wl,E.nthArg=vT,E.omit=_S,E.omitBy=wS,E.once=mx,E.orderBy=ex,E.over=bT,E.overArgs=vx,E.overEvery=yT,E.overSome=_T Line truncated
`).forEach(function(a){r=a.indexOf(":"),n=a.substring(0,r).trim().toLowerCase(),i=a.substring(r+1).trim(),!(!n||t[n]&&iC[n])&&(n==="set-cookie"?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t},pg=Symbol("internals");function fo(e){return e&&String(e).trim().toLowerCase()}function Kl(e){return e===!1||e==null?e:X.isArray(e)?e.map(Kl):String(e)}function sC(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}const oC=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Mh(e,t,n,i,r){if(X.isFunction(i))return i.call(this,t,n);if(r&&(t=n),!!X.isString(t)){if(X.isString(i))return t.indexOf(i)!==-1;if(X.isRegExp(i))return i.test(t)}}function aC(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,i)=>n.toUpperCase()+i)}function lC(e,t){const n=X.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+n,{value:function(r,s,a){return this[i].call(this,t,r,s,a)},configurable:!0})})}let cn=class{constructor(t){t&&this.set(t)}set(t,n,i){const r=this;function s(l,u,h){const d=fo(u);if(!d)throw new Error("header name must be a non-empty string");const m=X.findKey(r,d);(!m||r[m]===void 0||h===!0||h===void 0&&r[m]!==!1)&&(r[m||u]=Kl(l))}const a=(l,u)=>X.forEach(l,(h,d)=>s(h,d,u));if(X.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(X.isString(t)&&(t=t.trim())&&!oC(t))a(rC(t),n);else if(X.isObject(t)&&X.isIterable(t)){let l={},u,h;for(const d of t){if(!X.isArray(d))throw TypeError("Object iterator must return a key-value pair");l[h=d[0]]=(u=l[h])?X.isArray(u)?[...u,d[1]]:[u,d[1]]:d[1]}a(l,n)}else t!=null&&s(n,t,i);return this}get(t,n){if(t=fo(t),t){const i=X.findKey(this,t);if(i){const r=this[i];if(!n)return r;if(n===!0)return sC(r);if(X.isFunction(n))return n.call(this,r,i);if(X.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=fo(t),t){const i=X.findKey(this,t);return!!(i&&this[i]!==void 0&&(!n||Mh(this,this[i],i,n)))}return!1}delete(t,n){const i=this;let r=!1;function s(a){if(a=fo(a),a){const l=X.findKey(i,a);l&&(!n||Mh(i,i[l],l,n))&&(delete i[l],r=!0)}}return X.isArray(t)?t.forEach(s):s(t),r}clear(t){const n=Object.keys(this);let i=n.length,r=!1;for(;i--;){const s=n[i];(!t||Mh(this,this[s],s,t,!0))&&(delete this[s],r=!0)}return r}normalize(t){const n=this,i={};return X.forEach(this,(r,s)=>{const a=X.findKey(i,s);if(a){n[a]=Kl(r),delete n[s];return}const l=t?aC(s):String(s).trim();l!==s&&delete n[s],n[l]=Kl(r),i[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return X.forEach(this,(i,r)=>{i!=null&&i!==!1&&(n[r]=t&&X.isArray(i)?i.join(", "):i)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const i=new this(t);return n.forEach(r=>i.set(r)),i}static accessor(t){const i=(this[pg]=this[pg]={accessors:{}}).accessors,r=this.prototype;function s(a){const l=fo(a);i[l]||(lC(r,a),i[l]=!0)}return X.isArray(t)?t.forEach(s):s(t),this}};cn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);X.reduceDescriptors(cn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[n]=i}}});X.freezeMethods(cn);function Rh(e,t){const n=this||na,i=t||n,r=cn.from(i.headers);let s=i.data;return X.forEach(e,function(l){s=l.call(n,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function tb(e){return!!(e&&e.__CANCEL__)}let ia=class extends bt{constructor(t,n,i){super(t??"canceled",bt.ERR_CANCELED,n,i),this.name="CanceledError",this.__CANCEL__=!0}};function eb(e,t,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):t(new bt("Request failed with status code "+n.status,[bt.ERR_BAD_REQUEST,bt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function cC(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function uC(e,t){e=e||10;const n=new Array(e),i=new Array(e);let r=0,s=0,a;return t=t!==void 0?t:1e3,function(u){const h=Date.now(),d=i[s];a||(a=h),n[r]=u,i[r]=h;let m=s,y=0;for(;m!==r;)y+=n[m++],m=m%e;if(r=(r+1)%e,r===s&&(s=(s+1)%e),h-a<t)return;const x=d&&h-d;return x?Math.round(y*1e3/x):void 0}}function hC(e,t){let n=0,i=1e3/t,r,s;const a=(h,d=Date.now())=>{n=d,r=null,s&&(clearTimeout(s),s=null),e(...h)};return[(...h)=>{const d=Date.now(),m=d-n;m>=i?a(h,d):(r=h,s||(s=setTimeout(()=>{s=null,a(r)},i-m)))},()=>r&&a(r)]}const cc=(e,t,n=3)=>{let i=0;const r=uC(50,250);return hC(s=>{const a=s.loaded,l=s.lengthComputable?s.total:void 0,u=a-i,h=r(u),d=a<=l;i=a;const m={loaded:a,total:l,progress:l?a/l:void 0,bytes:u,rate:h||void 0,estimated:h&&l&&d?(l-a)/h:void 0,event:s,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(m)},n)},gg=(e,t)=>{const n=e!=null;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},mg=e=>(...t)=>X.asap(()=>e(...t)),fC=je.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,je.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(je.origin),je.navigator&&/(msie|trident)/i.test(je.navigator.userAgent)):()=>!0,dC=je.hasStandardBrowserEnv?{write(e,t,n,i,r,s,a){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];X.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),X.isString(i)&&l.push(`path=${i}`),X.isString(r)&&l.push(`domain=${r}`),s===!0&&l.push("secure"),X.isString(a)&&l.push(`SameSite=${a}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function pC(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function gC(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function nb(e,t,n){let i=!pC(t);return e&&(i||n==!1)?gC(e,t):t}const vg=e=>e instanceof cn?{...e}:e;function Mr(e,t){t=t||{};const n={};function i(h,d,m,y){return X.isPlainObject(h)&&X.isPlainObject(d)?X.merge.call({caseless:y},h,d):X.isPlainObject(d)?X.merge({},d):X.isArray(d)?d.slice():d}function r(h,d,m,y){if(X.isUndefined(d)){if(!X.isUndefined(h))return i(void 0,h,m,y)}else return i(h,d,m,y)}function s(h,d){if(!X.isUndefined(d))return i(void 0,d)}function a(h,d){if(X.isUndefined(d)){if(!X.isUndefined(h))return i(void 0,h)}else return i(void 0,d)}function l(h,d,m){if(m in t)return i(h,d);if(m in e)return i(void 0,h)}const u={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l,headers:(h,d,m)=>r(vg(h),vg(d),m,!0)};return X.forEach(Object.keys({...e,...t}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;const m=X.hasOwnProp(u,d)?u[d]:r,y=m(e[d],t[d],d);X.isUndefined(y)&&m!==l||(n[d]=y)}),n}const ib=e=>{const t=Mr({},e);let{data:n,withXSRFToken:i,xsrfHeaderName:r,xsrfCookieName:s,headers:a,auth:l}=t;if(t.headers=a=cn.from(a),t.url=Zv(nb(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),X.isFormData(n)){if(je.hasStandardBrowserEnv||je.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(X.isFunction(n.getHeader Line truncated
`+a.map(Sg).join(`
`):" "+Sg(a[0]):"as no adapter specified";throw new bt("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r}const sb={getAdapter:OC,adapters:Uf};function Dh(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ia(null,e)}function Tg(e){return Dh(e),e.headers=cn.from(e.headers),e.data=Rh.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),sb.getAdapter(e.adapter||na.adapter,e)(e).then(function(i){return Dh(e),i.data=Rh.call(e,e.transformResponse,i),i.headers=cn.from(i.headers),i},function(i){return tb(i)||(Dh(e),i&&i.response&&(i.response.data=Rh.call(e,e.transformResponse,i.response),i.response.headers=cn.from(i.response.headers))),Promise.reject(i)})}const ob="1.13.6",Pc={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Pc[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const Cg={};Pc.transitional=function(t,n,i){function r(s,a){return"[Axios v"+ob+"] Transitional option '"+s+"'"+a+(i?". "+i:"")}return(s,a,l)=>{if(t===!1)throw new bt(r(a," has been removed"+(n?" in "+n:"")),bt.ERR_DEPRECATED);return n&&!Cg[a]&&(Cg[a]=!0,console.warn(r(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,a,l):!0}};Pc.spelling=function(t){return(n,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function kC(e,t,n){if(typeof e!="object")throw new bt("options must be an object",bt.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let r=i.length;for(;r-- >0;){const s=i[r],a=t[s];if(a){const l=e[s],u=l===void 0||a(l,s,e);if(u!==!0)throw new bt("option "+s+" must be "+u,bt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new bt("Unknown option "+s,bt.ERR_BAD_OPTION)}}const Gl={assertOptions:kC,validators:Pc},Pn=Gl.validators;let kr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new dg,response:new dg}}async request(t,n){try{return await this._request(t,n)}catch(i){if(i instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const s=r.stack?r.stack.replace(/^.+\n/,""):"";try{i.stack?s&&!String(i.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(i.stack+=`
`+s):i.stack=s}catch{}}throw i}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Mr(this.defaults,n);const{transitional:i,paramsSerializer:r,headers:s}=n;i!==void 0&&Gl.assertOptions(i,{silentJSONParsing:Pn.transitional(Pn.boolean),forcedJSONParsing:Pn.transitional(Pn.boolean),clarifyTimeoutError:Pn.transitional(Pn.boolean),legacyInterceptorReqResOrdering:Pn.transitional(Pn.boolean)},!1),r!=null&&(X.isFunction(r)?n.paramsSerializer={serialize:r}:Gl.assertOptions(r,{encode:Pn.function,serialize:Pn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Gl.assertOptions(n,{baseUrl:Pn.spelling("baseURL"),withXsrfToken:Pn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&X.merge(s.common,s[n.method]);s&&X.forEach(["delete","get","head","post","put","patch","common"],S=>{delete s[S]}),n.headers=cn.concat(a,s);const l=[];let u=!0;this.interceptors.request.forEach(function(C){if(typeof C.runWhen=="function"&&C.runWhen(n)===!1)return;u=u&&C.synchronous;const T=n.transitional||jf;T&&T.legacyInterceptorReqResOrdering?l.unshift(C.fulfilled,C.rejected):l.push(C.fulfilled,C.rejected)});const h=[];this.interceptors.response.forEach(function(C){h.push(C.fulfilled,C.rejected)});let d,m=0,y;if(!u){const S=[Tg.bind(this),void 0];for(S.unshift(...l),S.push(...h),y=S.length,d=Promise.resolve(n);m<y;)d=d.then(S[m++],S[m++]);return d}y=l.length;let x=n;for(;m<y;){const S=l[m++],C=l[m++];try{x=S(x)}catch(T){C.call(this,T);break}}try{d=Tg.call(this,x)}catch(S){return Promise.reject(S)}for(m=0,y=h.length;m<y;)d=d.then(h[m++],h[m++]);return d}getUri(t){t=Mr(this.defaults,t);const n=nb(t.baseURL,t.url,t.allowAbsoluteUrls);return Zv(n,t.params,t.paramsSerializer)}};X.forEach(["delete","get","head","options"],function(t){kr.prototype[t]=function(n,i){return this.request(Mr(i||{},{method:t,url:n,data:(i||{}).data}))}});X.forEach(["post","put","patch"],function(t){function n(i){return function(s,a,l){return this.request(Mr(l||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}kr.prototype[t]=n(),kr.prototype[t+"Form"]=n(!0)});let AC=class ab{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const i=this;this.promise.then(r=>{if(!i._listeners)return;let s=i._listeners.length;for(;s-- >0;)i._listeners[s](r);i._listeners=null}),this.promise.then=r=>{let s;const a=new Promise(l=>{i.subscribe(l),s=l}).then(r);return a.cancel=function(){i.unsubscribe(s)},a},t(function(s,a,l){i.reason||(i.reason=new ia(s,a,l),n(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 n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=i=>{t.abort(i)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new ab(function(r){t=r}),cancel:t}}};function EC(e){return function(n){return e.apply(null,n)}}function PC(e){return X.isObject(e)&&e.isAxiosError===!0}const hf={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(hf).forEach(([e,t])=>{hf[t]=e});function lb(e){const t=new kr(e),n=Wv(kr.prototype.request,t);return X.extend(n,kr.prototype,t,{allOwnKeys:!0}),X.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return lb(Mr(e,r))},n}const ve=lb(na);ve.Axios=kr;ve.CanceledError=ia;ve.CancelToken=AC;ve.isCancel=tb;ve.VERSION=ob; Line truncated
tabbable/dist/index.esm.js:
(*!
* tabbable 5.3.3
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
*)
focus-trap/dist/focus-trap.esm.js:
(*!
* focus-trap 6.9.4
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
*)
*/var jg="&#8203;";function Lh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function $g(e){return function(t){if(Array.isArray(t))return Lh(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||function(t,n){if(t){if(typeof t=="string")return Lh(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(i);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Lh(t,n)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var qi={isEnabled:function(){var e;return(e=window.TAGIFY_DEBUG)===null||e===void 0||e},log:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i;this.isEnabled()&&(i=console).log.apply(i,["[Tagify]:"].concat($g(t)))},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i;this.isEnabled()&&(i=console).warn.apply(i,["[Tagify]:"].concat($g(t)))}},To=function(e,t,n,i){return e=""+e,t=""+t,i&&(e=e.trim(),t=t.trim()),n?e==t:e.toLowerCase()==t.toLowerCase()},Ug=function(e,t){return e&&Array.isArray(e)&&e.map(function(n){return mf(n,t)})};function mf(e,t){var n,i={};for(n in e)t.indexOf(n)<0&&(i[n]=e[n]);return i}function Ih(e){return new DOMParser().parseFromString(e.trim(),"text/html").body.firstElementChild}function Vg(e,t){for(t=t||"previous";e=e[t+"Sibling"];)if(e.nodeType==3)return e}function wr(e){return typeof e=="string"?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/`|'/g,"&#039;"):e}function Wn(e){var t=Object.prototype.toString.call(e).split(" ")[1].slice(0,-1);return e===Object(e)&&t!="Array"&&t!="Function"&&t!="RegExp"&&t!="HTMLUnknownElement"}function Oe(e,t,n){var i,r;function s(a,l){for(var u in l)if(l.hasOwnProperty(u)){if(Wn(l[u])){Wn(a[u])?s(a[u],l[u]):a[u]=Object.assign({},l[u]);continue}if(Array.isArray(l[u])){a[u]=Object.assign([],l[u]);continue}a[u]=l[u]}}return i=e,((r=Object)!=null&&typeof Symbol<"u"&&r[Symbol.hasInstance]?r[Symbol.hasInstance](i):i instanceof r)||(e={}),s(e,t),n&&s(e,n),e}function qg(){var e=[],t={},n=!0,i=!1,r=void 0;try{for(var s,a=arguments[Symbol.iterator]();!(n=(s=a.next()).done);n=!0){var l=s.value,u=!0,h=!1,d=void 0;try{for(var m,y=l[Symbol.iterator]();!(u=(m=y.next()).done);u=!0){var x=m.value;Wn(x)?t[x.value]||(e.push(x),t[x.value]=1):e.includes(x)||e.push(x)}}catch(S){h=!0,d=S}finally{try{u||y.return==null||y.return()}finally{if(h)throw d}}}}catch(S){i=!0,r=S}finally{try{n||a.return==null||a.return()}finally{if(i)throw r}}return e}function Pl(e){return String.prototype.normalize?typeof e=="string"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):void 0:e}var Xg=function(){return/(?=.*chrome)(?=.*android)/i.test(navigator.userAgent)};function Yg(){return("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,function(e){return(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)})}function Tr(e){var t,n=Ob.call(this,e),i=e==null||(t=e.classList)===null||t===void 0?void 0:t.contains(this.settings.classNames.tag);return n&&i}function Kg(e){return Ob.call(this,e)&&(e==null?void 0:e.closest(this.settings.classNames.tagSelector))}function Ob(e){var t;return(e==null||(t=e.closest)===null||t===void 0?void 0:t.call(e,this.settings.classNames.namespaceSelector))===this.DOM.scope}function kb(e,t){var n=window.getSelection();return t=t||n.getRangeAt(0),typeof e=="string"&&(e=document.createTextNode(e)),t&&(t.deleteContents(),t.insertNode(e)),e}function Zt(e,t,n){return e?(t&&(e.__tagifyTagData=n?t:Oe({},e.__tagifyTagData||{},t)),e.__tagifyTagData):(qi.warn("tag element doesn't exist",{tagElm:e,data:t}),t)}function Wi(e){if(e&&e.parentNode){var t=e,n=window.getSelection(),i=n.getRangeAt(0);n.rangeCount&&(i.setStartAfter(t),i.collapse(!0),n.removeAllRanges(),n.addRange(i))}}function Ab(e,t){e.forEach(function(n){if(Zt(n.previousSibling)||!n.previousSibling){var i=document.createTextNode("​");n.before(i),t&&Wi(i)}})}var Nh={delimiters:",",pattern:null,tagTextProp:"value",maxTags:1/0,callbacks:{},addTagOnBlur:!0,addTagOn:["blur","tab","enter"],onChangeAfterBlur:!0,duplicates:!1,whitelist:[],blacklist:[],enforceWhitelist:!1,userInput:!0,focusable:!0,focusInputOnRemove:!0,keepInvalidTags:!1,createInvalidTags:!0,mixTagsAllowedAfter:/,|\.|\:|\s/,mixTagsInterpolator:["[[","]]"],backspace:!0,skipInvalid:!1,pasteAsTags:!0,editTags:{clicks:2,keepInvalid:!0},transformTag:function(){},trim:!0,a11y:{focusableTags:!1},mixMode:{insertAfterTag:" "},autoComplete:{enabled:!0,rightKey:!1,tabKey:!1},classNames:{namespace:"tagify",mixMode:"tagify--mix",selectMode:"tagify--select",input:"tagify__input",focus:"tagify--focus",tagNoAnimation:"tagify--noAnim",tagInvalid:"tagify--invalid",tagNotAllowed:Line truncated
`).concat(t.readonly?"readonly":"",`
`).concat(t.disabled?"disabled":"",`
`).concat(t.required?"required":"",`
`).concat(t.mode==="select"?"spellcheck='false'":"",`
tabIndex="-1">
`).concat(this.settings.templates.input.call(this),`
`).concat(jg,`
</tags>`)},input:function(){var e=this.settings,t=e.placeholder||jg;return"<span ".concat(!e.readonly&&e.userInput?"contenteditable":"",' data-can-editable tabIndex="0" data-placeholder="').concat(t,'" aria-placeholder="').concat(e.placeholder||"",`"
class="`).concat(e.classNames.input,`"
role="textbox"
autocapitalize="false"
autocorrect="off"
aria-autocomplete="both"
aria-multiline="`).concat(e.mode=="mix",'"></span>')},tag:function(e,t){var n=t.settings;return'<tag title="'.concat(e.title||e.value,`"
contenteditable='false'
tabIndex="`).concat(n.a11y.focusableTags?0:-1,`"
class="`).concat(n.classNames.tag," ").concat(e.class||"",`"
`).concat(this.getAttributes(e),`>
<x title='' tabIndex="`).concat(n.a11y.focusableTags?0:-1,'" class="').concat(n.classNames.tagX,`" role='button' aria-label='remove tag'></x>
<div>
<span `).concat(n.mode==="select"&&n.userInput?"contenteditable='true'":"",` autocapitalize="false" autocorrect="off" spellcheck='false' class="`).concat(n.classNames.tagText,'">').concat(e[n.tagTextProp]||e.value,`</span>
</div>
</tag>`)},dropdown:function(e){var t=e.dropdown,n=t.position=="manual";return'<div class="'.concat(n?"":e.classNames.dropdown," ").concat(t.classname,'" role="listbox" aria-labelledby="dropdown" dir="').concat(t.RTL?"rtl":"",`">
<div data-selector='tagify-suggestions-wrapper' class="`).concat(e.classNames.dropdownWrapper,`"></div>
</div>`)},dropdownContent:function(e){var t=this.settings.templates,n=this.state.dropdown.suggestions;return`
`.concat(t.dropdownHeader.call(this,n),`
`).concat(e,`
`).concat(t.dropdownFooter.call(this,n),`
`)},dropdownItem:function(e){return"<div ".concat(this.getAttributes(e),`
class='`).concat(this.settings.classNames.dropdownItem," ").concat(this.isTagDuplicate(e.value)?this.settings.classNames.dropdownItemSelected:""," ").concat(e.class||"",`'
tabindex="0"
role="option">`).concat(e.mappedValue||e.value,"</div>")},dropdownHeader:function(e){return`<header data-selector='tagify-suggestions-header' class="`.concat(this.settings.classNames.dropdownHeader,'"></header>')},dropdownFooter:function(e){var t=e.length-this.settings.dropdown.maxItems;return t>0?`<footer data-selector='tagify-suggestions-footer' class="`.concat(this.settings.classNames.dropdownFooter,`">
`).concat(t,` more items. Refine your search.
</footer>`):""},dropdownItemNoMatch:null};function Gg(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Jg(e,t){return t!=null&&typeof Symbol<"u"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function dk(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var r=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(r!=null){var s,a,l=[],u=!0,h=!1;try{for(r=r.call(n);!(u=(s=r.next()).done)&&(l.push(s.value),!i||l.length!==i);u=!0);}catch(d){h=!0,a=d}finally{try{u||r.return==null||r.return()}finally{if(h)throw a}}return l}}(e,t)||function(n,i){if(n){if(typeof n=="string")return Gg(n,i);var r=Object.prototype.toString.call(n).slice(8,-1);if(r==="Object"&&n.constructor&&(r=n.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Gg(n,i)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function mr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zg(e,t){return t!=null&&typeof Symbol<"u"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function pk(e,t){return t=t??{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(n,i){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);r.push.apply(r,s)}return r}(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function Hh(e){return function(t){if(Array.isArray(t))return Bh(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||function(t,n){if(t){if(typeof t=="string")return Bh(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(i);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Bh(t,n)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var gk={customBinding:function(){var e=this;this.customEventsList.forEach(function(t){e.on(t,e.settings.callbacks[t])})},binding:function(){var e,t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],n=this.settings,i=this.events.callbacks,r=t?"addEventListener":"removeEventListener";if(!(this.state.mainEvents&&t||n.disabled||n.readonly)){for(var s in this.state.mainEvents=t,t&&!this.listeners.main&&(this.events.bindGlobal.call(this),this.settings.isJQueryPlugin&&jQuery(this.DOM.originalInput).on("tagify.removeAllTags",this.removeAllTags.bind(this))),e=this.listeners.main=this.listeners.main||{keydown:["input",i.onKeydown.bind(this)],click:["scope",i.onClickScope.bind(this)],dblclick:n.mode!="select"&&["scope",i.onDoubleClickScope.bind(this)],paste:["input",i.onPaste.bind(this)],drop:["input",i.onDrop.bind(this)],compositionstart:["input",i.onCompositionStart.bind(this)],compositionend:["input",i.onCompositionEnd.bind(this)]})e[s]&&this.DOM[e[s][0]][r](s,e[s][1]);var a=this.listeners.main.inputMutationObserver||new MutationObserver(i.onInputDOMChange.bind(this));a.disconnect(),n.mode=="mix"&&a.observe(this.DOM.input,{childList:!0}),this.events.bindOriginaInputListener.call(this)}},bindOriginaInputListener:function(e){var t=(e||0)+500;this.listeners.main&&(clearInterval(this.listeners.main.originalInputValueObserverInterval),this.listeners.main.originalInputValueObserverInterval=setInterval(this.events.callbacks.observeOriginalInputValue.bind(this),t))},bindGlobal:function(e){var t,n=this.events.callbacks,i=e?"removeEventListener":"addEventListener";if(this.listeners&&(e||!this.listeners.global)){this.listeners.global=this.listeners.global||[{type:this.isIE?"keydown":"input",target:this.DOM.input,cb:n[this.isIE?"onInputIE":"onInput"].bind(this)},{type:"keydown",target:window,cb:n.onWindowKeyDown.bind(this)},{type:"focusin",target:this.DOM.scope,cb:n.onFocusBlur.bind(this)},{type:"focusout",target:this.DOM.scope,cb:n.onFocusBlur.bind(this)},{type:"click",target:document,cb:n.onClickAnywhere.bind(this),useCapture:!0}];var r=!0,s=!1,a=void 0;try{for(var l,u=this.listeners.global[Symbol.iterator]();!(r=(l=u.next()).done);r=!0)(t=l.value).target[i](t.type,t.cb,!!t.useCapture)}catch(h){s=!0,a=h}finally{try{r||u.return==null||u.return()}finally{if(s)throw a}}}},unbindGlobal:function(){this.events.bindGlobal.call(this,!0)},callbacks:{onFocusBlur:function(e){var t,n,i=this.settings,r=Kg.call(this,e.relatedTarget),s=Tr.call(this,e.target),a=e.target.classList.contains(i.claLine truncated
`)),(s=r).replaceWith.apply(s,Hh([a].concat(Hh(Hh(r.childNodes).slice(0,-1))))),Wi(a)}else if(Tr.call(t,r)){var l;if(((l=r.previousSibling)===null||l===void 0?void 0:l.nodeType)!=3||r.previousSibling.textContent||r.previousSibling.remove(),r.previousSibling&&r.previousSibling.nodeName=="BR"){r.previousSibling.replaceWith(`
​`);for(var u=r.nextSibling,h="";u;)h+=u.textContent,u=u.nextSibling;h.trim()&&Wi(r.previousSibling)}else r.previousSibling&&!Zt(r.previousSibling)||r.before("​")}}),i.removedNodes.forEach(function(r){r&&r.nodeName=="BR"&&Tr.call(t,n)&&(t.removeTags(n),t.fixFirefoxLastTagNoCaret())})});var n=this.DOM.input.lastChild;n&&n.nodeValue==""&&n.remove(),n&&n.nodeName=="BR"||this.DOM.input.appendChild(document.createElement("br"))}}};function zh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function vf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yi(e,t){return t!=null&&typeof Symbol<"u"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Qg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){vf(e,r,n[r])})}return e}function Rl(e){return function(t){if(Array.isArray(t))return zh(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||function(t,n){if(t){if(typeof t=="string")return zh(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(i);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return zh(t,n)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ql(e,t){if(!e){qi.warn("input element not found",e);var n=new Proxy(this,{get:function(){return function(){return n}}});return n}if(e.__tagify)return qi.warn("input element is already Tagified - Same instance is returned.",e),e.__tagify;var i;Oe(this,function(r){var s=document.createTextNode(""),a={};function l(u,h,d){d&&h.split(/\s+/g).forEach(function(m){return s[u+"EventListener"].call(s,m,d)})}return{removeAllCustomListeners:function(){Object.entries(a).forEach(function(u){var h=dk(u,2),d=h[0];h[1].forEach(function(m){return l("remove",d,m)})}),a={}},off:function(u,h){return u&&(h?l("remove",u,h):u.split(/\s+/g).forEach(function(d){var m;(m=a[d])===null||m===void 0||m.forEach(function(y){return l("remove",d,y)}),delete a[d]})),this},on:function(u,h){return h&&typeof h=="function"&&(u.split(/\s+/g).forEach(function(d){Array.isArray(a[d])?a[d].push(h):a[d]=[h]}),l("add",u,h)),this},trigger:function(u,h,d){var m;if(d=d||{cloneData:!0},u)if(r.settings.isJQueryPlugin)u=="remove"&&(u="removeTag"),jQuery(r.DOM.originalInput).triggerHandler(u,[h]);else{try{var y=typeof h=="object"?h:{value:h};if((y=d.cloneData?Oe({},y):y).tagify=this,h.event&&(y.event=this.cloneEvent(h.event)),Jg(h,Object))for(var x in h)Jg(h[x],HTMLElement)&&(y[x]=h[x]);m=new CustomEvent(u,{detail:y})}catch(S){qi.warn(S)}s.dispatchEvent(m)}}}}(this)),this.isFirefox=/firefox|fxios/i.test(navigator.userAgent)&&!/seamonkey/i.test(navigator.userAgent),this.isIE=window.document.documentMode,t=t||{},this.getPersistedData=(i=t.id,function(r){var s;if(i){var a,l="/"+r;if(((s=localStorage)===null||s===void 0?void 0:s.getItem(mo+i+"/v"))===1)try{a=JSON.parse(localStorage[mo+i+l])}catch{}return a}}),this.setPersistedData=function(r){var s;return r?((s=localStorage)===null||s===void 0||s.setItem(mo+r+"/v",1),function(a,l){var u,h="/"+l,d=JSON.stringify(a);a&&l&&((u=localStorage)===null||u===void 0||u.setItem(mo+r+h,d),dispatchEvent(new Event("storage")))}):function(){}}(t.id),this.clearPersistedData=function(r){return function(s){var a=mo+"/"+r+"/";if(s)localStorage.removeItem(a+s);else for(var l in localStorage)l.includes(a)&&localStorage.removeItem(l)}}(t.id),this.applySettings(e,t),this.state={inputText:"",editing:!1,composing:!1,actions:{},mixMode:{},dropdown:{},flaggedTags:{}},this.value=[],this.listeners={},this.DOM={},this.build(e),ck.call(this),this.getCSSVars(),this.loadOriginalValues(),this.events.customBinding.call(this),this.events.binding.call(this),e.autofocus&&this.DOM.input.focus(),e.__tagify=this}Ql.prototype={_dropdown:uk,placeCaretAfterNode:Wi,getSetTagData:Zt,helpers:{sameStr:To,removeCollectionProp:Ug,omit:mf,isObject:Wn,parseHTML:Ih,escapeHTML:wr,extend:Oe,concatWithoutDups:qg,getUID:Yg,isNodeTag:Tr},customEventsList:["change","add","remove","invalid","input","paste","click","keydown","focus","blur","edit:input","edit:beforeUpdate","edit:updated","edit:start","edit:keydown","dropdown:show","dropdown:hide","dropdown:select","dropdown:updated","dropdown:noMatch","dropdown:scroll"],dataProps:["__isValid","__removed","__originalData","__originalHTML","__tagId"],trim:function(e){return this.settings.trim&&e&&typeof e=="string"?e.trim():e},parseHTML:Ih,templates:fk,parseTemplate:function(e,t){return Ih((e=this. Line truncated
`);try{i=i.replace(/(?:\r\n|\r|\n)/g,this.settings.delimiters.source.charAt(0))}catch{}return i=i.replace(/\s/g," "),t!=null&&t.trim?this.trim(i):i},autocomplete:{suggest:function(e){if(this.settings.autoComplete.enabled){typeof(e=e||{value:""})!="object"&&(e={value:e});var t=this.dropdown.getMappedValue(e);if(typeof t!="number"){var n=this.state.inputText.toLowerCase(),i=t.substr(0,this.state.inputText.length).toLowerCase(),r=t.substring(this.state.inputText.length);t&&this.state.inputText&&i==n?(this.DOM.input.setAttribute("data-suggest",r),this.state.inputSuggestion=e):(this.DOM.input.removeAttribute("data-suggest"),delete this.state.inputSuggestion)}}},set:function(e){var t=this.DOM.input.getAttribute("data-suggest"),n=e||(t?this.state.inputText+t:null);return!!n&&(this.settings.mode=="mix"?this.replaceTextWithNode(document.createTextNode(this.state.tag.prefix+n)):(this.input.set.call(this,n),this.setRangeAtStartEnd(!1,this.DOM.input)),this.input.autocomplete.suggest.call(this),this.dropdown.hide(),!0)}}},getTagIdx:function(e){return this.value.findIndex(function(t){return t.__tagId==(e||{}).__tagId})},getNodeIndex:function(e){var t=0;if(e)for(;e=e.previousElementSibling;)t++;return t},getTagElms:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i="."+Rl(this.settings.classNames.tag.split(" ")).concat(Rl(t)).join(".");return[].slice.call(this.DOM.scope.querySelectorAll(i))},getLastTag:function(){var e=this.settings.classNames,t=this.DOM.scope.querySelectorAll("".concat(e.tagSelector,":not(.").concat(e.tagHide,"):not([readonly])"));return t[t.length-1]},isTagDuplicate:function(e,t,n){var i=0,r=!0,s=!1,a=void 0;try{for(var l,u=this.value[Symbol.iterator]();!(r=(l=u.next()).done);r=!0){var h=l.value;To(this.trim(""+e),h.value,t)&&n!=h.__tagId&&i++}}catch(d){s=!0,a=d}finally{try{r||u.return==null||u.return()}finally{if(s)throw a}}return i},getTagIndexByValue:function(e){var t=this,n=[],i=this.settings.dropdown.caseSensitive;return this.getTagElms().forEach(function(r,s){r.__tagifyTagData&&To(t.trim(r.__tagifyTagData.value),e,i)&&n.push(s)}),n},getTagElmByValue:function(e){var t=this.getTagIndexByValue(e)[0];return this.getTagElms()[t]},flashTag:function(e){var t=this;e&&(e.classList.add(this.settings.classNames.tagFlash),setTimeout(function(){e.classList.remove(t.settings.classNames.tagFlash)},100))},isTagBlacklisted:function(e){return e=this.trim(e.toLowerCase()),this.settings.blacklist.filter(function(t){return(""+t).toLowerCase()==e}).length},isTagWhitelisted:function(e){return!!this.getWhitelistItem(e)},getWhitelistItem:function(e,t,n){t=t||"value";var i,r=this.settings;return(n=n||r.whitelist).some(function(s){var a=typeof s=="object"?s[t]||s.value:s;if(To(a,e,r.dropdown.caseSensitive,r.trim))return i=typeof s=="object"?s:{value:s},!0}),i||t!="value"||r.tagTextProp=="value"||(i=this.getWhitelistItem(e,r.tagTextProp,n)),i},validateTag:function(e){var t=this.settings,n="value"in e?"value":t.tagTextProp,i=this.trim(e[n]+"");return(e[n]+"").trim()?t.mode!="mix"&&t.pattern&&yi(t.pattern,RegExp)&&!t.pattern.test(i)?this.TEXTS.pattern:!t.duplicates&&this.isTagDuplicate(i,t.dropdown.caseSensitive,e.__tagId)?this.TEXTS.duplicate:this.isTagBlacklisted(i)||t.enforceWhitelist&&!this.isTagWhitelisted(i)?this.TEXTS.notAllowed:!t.validate||t.validate(e):this.TEXTS.empty},getInvalidTagAttrs:function(e,t){return{"aria-invalid":!0,class:"".concat(e.class||""," ").concat(this.settings.classNames.tagNotAllowed).trim(),title:t}},hasMaxTags:function(){return this.value.length>=this.settings.maxTags&&this.TEXTS.exceed},setReadonly:function(e,t){var n=this.settings;this.DOM.scope.contains(document.activeElement)&&document.activeElement.blur(),n[t||"readonly"]=e,this.DOM.scope[(e?"set":"remove")+"Attribute"](t||"readonly",!0),this.settings.userInput=!0,this.setContentEditable(!e)},setContentEditable:function(e){this.DOM.scope.querySelectorAll("[data-can-editable]").forEach(function(t){t.contentEditable=e,t.tabIndex=e?0:-1})},setDisabled:function(e){this.setReadonly(e,"disabled")},normalizeTags:function(e){var t=this,n=this.settings,i=n.whitelist,r=n.delimiters,s=n.mode,a=n.tagTextProp,l=[],u=!!i&&yi(i[0],Object),h=Array.isArray(e),d=h&&e[0].value,m=function(y){return(y+"").split(r).reduce(function(x,S){var C,T=t.trim(S);return T&&x.push((vf(C={},a,T),vf(C,"value",T),C)),x},[])};if(typeof e=="number"&&(e=e.toString()),typeof e=="string"){if(!e.trim())return[];e=m(e)}else h&&(e=e.reduce(function(y,x){if(Wn(x)){var S=Oe({},x);a in S||(a="value"),S[a]=t.trim(S[a]),(S[a]||S[a]===0)&&y.push(S)}else if(x!=null&&x!==""&&x!==void 0){var C;(C=y).push.apply(C,Rl(m(x)))}return y},[]));return u&&!d&&(e.forEach(function(y){var x=l.map(function(T){return T.value}),S=t.dropdown.filterListItems.call(t,y[a],{exact:!0});t.settings.duplicates||(S=S.filter(function(T){return!x.includes(T.value)}));var C=S.length>1?t.getWhitelistItem(y[a],a,S):S[0];C&&yi(C,Object)?l.push(C):s!="mix"&&(y.value==null&&(y.value=y[ Line truncated
`),u&&Tr.call(t,l)){if(u.__removed)return;e+=r[0]+i(mf(u,t.dataProps))+r[1]}else l.getAttribute("style")||["B","I","U"].includes(l.tagName)?e+=l.textContent:l.tagName!="DIV"&&l.tagName!="P"||(e+=`\r
`,s(l))}else e+=l.textContent})}(this.DOM.input),e}},Ql.prototype.removeTag=Ql.prototype.removeTags;function Io(e){"@babel/helpers - typeof";return Io=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Io(e)}function Me(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mk(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Re(e,t,n){return t&&mk(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function $o(){return $o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},$o.apply(this,arguments)}function fn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bf(e,t)}function dc(e){return dc=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},dc(e)}function bf(e,t){return bf=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},bf(e,t)}function vk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function bk(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yk(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bk(e)}function dn(e){var t=vk();return function(){var i=dc(e),r;if(t){var s=dc(this).constructor;r=Reflect.construct(i,arguments,s)}else r=i.apply(this,arguments);return yk(this,r)}}var Zf=function(){function e(){Me(this,e)}return Re(e,[{key:"listenForWhisper",value:function(n,i){return this.listen(".client-"+n,i)}},{key:"notification",value:function(n){return this.listen(".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated",n)}},{key:"stopListeningForWhisper",value:function(n,i){return this.stopListening(".client-"+n,i)}}]),e}(),Eb=function(){function e(t){Me(this,e),this.namespace=t}return Re(e,[{key:"format",value:function(n){return[".","\\"].includes(n.charAt(0))?n.substring(1):(this.namespace&&(n=this.namespace+"."+n),n.replace(/\./g,"\\"))}},{key:"setNamespace",value:function(n){this.namespace=n}}]),e}();function _k(e){try{new e}catch(t){if(t.message.includes("is not a constructor"))return!1}return!0}var Qf=function(e){fn(n,e);var t=dn(n);function n(i,r,s){var a;return Me(this,n),a=t.call(this),a.name=r,a.pusher=i,a.options=s,a.eventFormatter=new Eb(a.options.namespace),a.subscribe(),a}return Re(n,[{key:"subscribe",value:function(){this.subscription=this.pusher.subscribe(this.name)}},{key:"unsubscribe",value:function(){this.pusher.unsubscribe(this.name)}},{key:"listen",value:function(r,s){return this.on(this.eventFormatter.format(r),s),this}},{key:"listenToAll",value:function(r){var s=this;return this.subscription.bind_global(function(a,l){if(!a.startsWith("pusher:")){var u=s.options.namespace.replace(/\./g,"\\"),h=a.startsWith(u)?a.substring(u.length+1):"."+a;r(h,l)}}),this}},{key:"stopListening",value:function(r,s){return s?this.subscription.unbind(this.eventFormatter.format(r),s):this.subscription.unbind(this.eventFormatter.format(r)),this}},{key:"stopListeningToAll",value:function(r){return r?this.subscription.unbind_global(r):this.subscription.unbind_global(),this}},{key:"subscribed",value:function(r){return this.on("pusher:subscription_succeeded",function(){r()}),this}},{key:"error",value:function(r){return this.on("pusher:subscription_error",function(s){r(s)}),this}},{key:"on",value:function(r,s){return this.subscription.bind(r,s),this}}]),n}(Zf),Pb=function(e){fn(n,e);var t=dn(n);function n(){return Me(this,n),t.apply(this,arguments)}return Re(n,[{key:"whisper",value:function(r,s){return this.pusher.channels.channels[this.name].trigger("client-".concat(r),s),this}}]),n}(Qf),wk=function(e){fn(n,e);var t=dn(n);function n(){return Me(this,n),t.apply(this,arguments)}return Re(n,[{key:"whisper",value:function(r,s){return this.pusher.channels.channels[this.name].trigger("client-".concat(r),s),this}}]),n}(Qf),xk=function(e){fn(n,e);var t=dn(n);function n(){return Me(this,n),t.apply(this,arguments)}return Re(n,[{key:"here",value:function(r){return this.on("pusher:subscription_succeeded",function(s){r(Object.keys(s.members).map(function(a){return s.members[a]}))}),this}},{key:"joining",value:function(r){return this.on("pusher:member_added",function(s){r( Line truncated
* Pusher JavaScript Library v7.6.0
* https://pusher.com/
*
* Copyright 2020, Pusher
* Released under the MIT licence.
*/var nm;function Ak(){return nm||(nm=1,function(e,t){(function(i,r){e.exports=r()})(window,function(){return function(n){var i={};function r(s){if(i[s])return i[s].exports;var a=i[s]={i:s,l:!1,exports:{}};return n[s].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=n,r.c=i,r.d=function(s,a,l){r.o(s,a)||Object.defineProperty(s,a,{enumerable:!0,get:l})},r.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},r.t=function(s,a){if(a&1&&(s=r(s)),a&8||a&4&&typeof s=="object"&&s&&s.__esModule)return s;var l=Object.create(null);if(r.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:s}),a&2&&typeof s!="string")for(var u in s)r.d(l,u,(function(h){return s[h]}).bind(null,u));return l},r.n=function(s){var a=s&&s.__esModule?function(){return s.default}:function(){return s};return r.d(a,"a",a),a},r.o=function(s,a){return Object.prototype.hasOwnProperty.call(s,a)},r.p="",r(r.s=2)}([function(n,i,r){var s=this&&this.__extends||function(){var C=function(T,A){return C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,B){M.__proto__=B}||function(M,B){for(var D in B)B.hasOwnProperty(D)&&(M[D]=B[D])},C(T,A)};return function(T,A){C(T,A);function M(){this.constructor=T}T.prototype=A===null?Object.create(A):(M.prototype=A.prototype,new M)}}();Object.defineProperty(i,"__esModule",{value:!0});var a=256,l=function(){function C(T){T===void 0&&(T="="),this._paddingCharacter=T}return C.prototype.encodedLength=function(T){return this._paddingCharacter?(T+2)/3*4|0:(T*8+5)/6|0},C.prototype.encode=function(T){for(var A="",M=0;M<T.length-2;M+=3){var B=T[M]<<16|T[M+1]<<8|T[M+2];A+=this._encodeByte(B>>>3*6&63),A+=this._encodeByte(B>>>2*6&63),A+=this._encodeByte(B>>>1*6&63),A+=this._encodeByte(B>>>0*6&63)}var D=T.length-M;if(D>0){var B=T[M]<<16|(D===2?T[M+1]<<8:0);A+=this._encodeByte(B>>>3*6&63),A+=this._encodeByte(B>>>2*6&63),D===2?A+=this._encodeByte(B>>>1*6&63):A+=this._paddingCharacter||"",A+=this._paddingCharacter||""}return A},C.prototype.maxDecodedLength=function(T){return this._paddingCharacter?T/4*3|0:(T*6+7)/8|0},C.prototype.decodedLength=function(T){return this.maxDecodedLength(T.length-this._getPaddingLength(T))},C.prototype.decode=function(T){if(T.length===0)return new Uint8Array(0);for(var A=this._getPaddingLength(T),M=T.length-A,B=new Uint8Array(this.maxDecodedLength(M)),D=0,R=0,N=0,I=0,j=0,q=0,F=0;R<M-4;R+=4)I=this._decodeChar(T.charCodeAt(R+0)),j=this._decodeChar(T.charCodeAt(R+1)),q=this._decodeChar(T.charCodeAt(R+2)),F=this._decodeChar(T.charCodeAt(R+3)),B[D++]=I<<2|j>>>4,B[D++]=j<<4|q>>>2,B[D++]=q<<6|F,N|=I&a,N|=j&a,N|=q&a,N|=F&a;if(R<M-1&&(I=this._decodeChar(T.charCodeAt(R)),j=this._decodeChar(T.charCodeAt(R+1)),B[D++]=I<<2|j>>>4,N|=I&a,N|=j&a),R<M-2&&(q=this._decodeChar(T.charCodeAt(R+2)),B[D++]=j<<4|q>>>2,N|=q&a),R<M-3&&(F=this._decodeChar(T.charCodeAt(R+3)),B[D++]=q<<6|F,N|=F&a),N!==0)throw new Error("Base64Coder: incorrect characters for decoding");return B},C.prototype._encodeByte=function(T){var A=T;return A+=65,A+=25-T>>>8&6,A+=51-T>>>8&-75,A+=61-T>>>8&-15,A+=62-T>>>8&3,String.fromCharCode(A)},C.prototype._decodeChar=function(T){var A=a;return A+=(42-T&T-44)>>>8&-a+T-43+62,A+=(46-T&T-48)>>>8&-a+T-47+63,A+=(47-T&T-58)>>>8&-a+T-48+52,A+=(64-T&T-91)>>>8&-a+T-65+0,A+=(96-T&T-123)>>>8&-a+T-97+26,A},C.prototype._getPaddingLength=function(T){var A=0;if(this._paddingCharacter){for(var M=T.length-1;M>=0&&T[M]===this._paddingCharacter;M--)A++;if(T.length<4||A>2)throw new Error("Base64Coder: incorrect padding")}return A},C}();i.Coder=l;var u=new l;function h(C){return u.encode(C)}i.encode=h;function d(C){return u.decode(C)}i.decode=d;var m=function(C){s(T,C);function T(){return C!==null&&C.apply(this,arguments)||this}return T.prototype._encodeByte=function(A){var M=A;return M+=65,M+=25-A>>>8&6,M+=51-A>>>8&-75,M+=61-A>>>8&-13,M+=62-A>>>8&49,String.fromCharCode(M)},T.prototype._decodeChar=function(A){var M=a;return M+=(44-A&A-46)>>>8&-a+A-45+62,M+=(94-A&A-96)>>>8&-a+A-95+63,M+=(47-A&A-58)>>>8&-a+A-48+52,M+=(64-A&A-91)>>>8&-a+A-65+0,M+=(96-A&A-123)>>>8&-a+A-97+26,M},T}(l);i.URLSafeCoder=m;var y=new m;function x(C){return y.encode(C)}i.encodeURLSafe=x;function S(C){return y.decode(C)}i.decodeURLSafe=S,i.encodedLength=function(C){return u.encodedLength(C)},i.maxDecodedLength=function(C){return u.maxDecodedLength(C)},i.decodedLength=function(C){return u.decodedLength(C)}},function(n,i,r){Object.defineProperty(i,"__esModule",{value:!0});var s="utf8: invalid string",a="utf8: invalid source encoding";function l(d){for(var m=new Uint8Array(u(d)),y=0,x=0;x<d.length;x++){var S=d.charCodeAt(x);S<128?m[y++]=S:S<2048?(m[y++]=192|S>>6,m[y++]=128|S&63):S<55296?(m[y++]=224|S>>12,m[y++]=128|S>>6&63,m[y++]=128|S&63):(x++,S=(S&1023)<<10,S|=d.charCodeAt(x)&1023,S+=65536,m[y++]=240|S>>18,m[y++]=128|S>>12&63,m[y++]=128|S>>6&63,m[y++]=128|S&63)}return m}i.encode=l;function u(d){for(var m=0,y=0;y<d.length;y++Line truncated
`);return w!==-1?(this.position+=w+1,b.slice(0,w)):null},p.prototype.isBufferTooLong=function(g){return this.position===g.length&&g.length>Qe},p}(Sn),La=Da,qr;(function(v){v[v.CONNECTING=0]="CONNECTING",v[v.OPEN=1]="OPEN",v[v.CLOSED=3]="CLOSED"})(qr||(qr={}));var Vn=qr,Ia=1,Na=function(){function v(p,g){this.hooks=p,this.session=Is(1e3)+"/"+qn(8),this.location=Xe(g),this.readyState=Vn.CONNECTING,this.openStream()}return v.prototype.send=function(p){return this.sendRaw(JSON.stringify([p]))},v.prototype.ping=function(){this.hooks.sendHeartbeat(this)},v.prototype.close=function(p,g){this.onClose(p,g,!0)},v.prototype.sendRaw=function(p){if(this.readyState===Vn.OPEN)try{return yt.createSocketRequest("POST",Ye(yu(this.location,this.session))).start(p),!0}catch{return!1}else return!1},v.prototype.reconnect=function(){this.closeStream(),this.openStream()},v.prototype.onClose=function(p,g,b){this.closeStream(),this.readyState=Vn.CLOSED,this.onclose&&this.onclose({code:p,reason:g,wasClean:b})},v.prototype.onChunk=function(p){if(p.status===200){this.readyState===Vn.OPEN&&this.onActivity();var g,b=p.data.slice(0,1);switch(b){case"o":g=JSON.parse(p.data.slice(1)||"{}"),this.onOpen(g);break;case"a":g=JSON.parse(p.data.slice(1)||"[]");for(var w=0;w<g.length;w++)this.onEvent(g[w]);break;case"m":g=JSON.parse(p.data.slice(1)||"null"),this.onEvent(g);break;case"h":this.hooks.onHeartbeat(this);break;case"c":g=JSON.parse(p.data.slice(1)||"[]"),this.onClose(g[0],g[1],!0);break}}},v.prototype.onOpen=function(p){this.readyState===Vn.CONNECTING?(p&&p.hostname&&(this.location.base=_u(this.location.base,p.hostname)),this.readyState=Vn.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)},v.prototype.onEvent=function(p){this.readyState===Vn.OPEN&&this.onmessage&&this.onmessage({data:p})},v.prototype.onActivity=function(){this.onactivity&&this.onactivity()},v.prototype.onError=function(p){this.onerror&&this.onerror(p)},v.prototype.openStream=function(){var p=this;this.stream=yt.createSocketRequest("POST",Ye(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",function(g){p.onChunk(g)}),this.stream.bind("finished",function(g){p.hooks.onFinished(p,g)}),this.stream.bind("buffer_too_long",function(){p.reconnect()});try{this.stream.start()}catch(g){Ot.defer(function(){p.onError(g),p.onClose(1006,"Could not start streaming",!1)})}},v.prototype.closeStream=function(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)},v}();function Xe(v){var p=/([^\?]*)\/*(\??.*)/.exec(v);return{base:p[1],queryString:p[2]}}function yu(v,p){return v.base+"/"+p+"/xhr_send"}function Ye(v){var p=v.indexOf("?")===-1?"?":"&";return v+p+"t="+ +new Date+"&n="+Ia++}function _u(v,p){var g=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(v);return g[1]+p+g[3]}function Is(v){return yt.randomInt(v)}function qn(v){for(var p=[],g=0;g<v;g++)p.push(Is(32).toString(32));return p.join("")}var Xr=Na,Ns={getReceiveURL:function(v,p){return v.base+"/"+p+"/xhr_streaming"+v.queryString},onHeartbeat:function(v){v.sendRaw("[]")},sendHeartbeat:function(v){v.sendRaw("[]")},onFinished:function(v,p){v.onClose(1006,"Connection interrupted ("+p+")",!1)}},Kt=Ns,Xn={getReceiveURL:function(v,p){return v.base+"/"+p+"/xhr"+v.queryString},onHeartbeat:function(){},sendHeartbeat:function(v){v.sendRaw("[]")},onFinished:function(v,p){p===200?v.reconnect():v.onClose(1006,"Connection interrupted ("+p+")",!1)}},Fs=Xn,wu={getRequest:function(v){var p=yt.getXHRAPI(),g=new p;return g.onreadystatechange=g.onprogress=function(){switch(g.readyState){case 3:g.responseText&&g.responseText.length>0&&v.onChunk(g.status,g.responseText);break;case 4:g.responseText&&g.responseText.length>0&&v.onChunk(g.status,g.responseText),v.emit("finished",g.status),v.close();break}},g},abortRequest:function(v){v.onreadystatechange=null,v.abort()}},Bs=wu,xu={createStreamingSocket:function(v){return this.createSocket(Kt,v)},createPollingSocket:function(v){return this.createSocket(Fs,v)},createSocket:function(v,p){return new Xr(v,p)},createXHR:function(v,p){return this.createRequest(Bs,v,p)},createRequest:function(v,p,g){return new La(v,p,g)}},Fa=xu;Fa.createXDR=function(v,p){return this.createRequest(Ra,v,p)};var Su=Fa,Ba={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:a,DependenciesReceivers:m,getDefaultStrategy:Te,Transports:Kc,transportConnectionInitializer:Ds,HTTPFactory:Su,TimelineTransport:Ne,getXHRAPI:function(){return window.XMLHttpRequest},getWebSocketAPI:function(){return window.WebSocket||window.MozWebSocket},setup:function(v){var p=this;window.Pusher=v;var g=function(){p.onDocumentBody(v.ready)};window.JSON?g():y.load("json2",{},g)},getDocument:function(){return document},getProtocol:function(){return this.getDocument().location.protocol},getAuthorizers:function(){return{ajax:U,jsonp:ht}},onDocumentBody:function(v){var p=this;document.body?v():setTimeout(function(){p.onDocumentBody(v)},0)},createJSONPRequest:function(v,p){return new de(v,p)},c Line truncated
* @kurkle/color v0.3.4
* https://github.com/kurkle/color#readme
* (c) 2024 Jukka Kurkela
* Released under the MIT License
*/function oa(e){return e+.5|0}const ji=(e,t,n)=>Math.max(Math.min(e,n),t);function Co(e){return ji(oa(e*2.55),0,255)}function Xi(e){return ji(oa(e*255),0,255)}function Si(e){return ji(oa(e/2.55)/100,0,1)}function im(e){return ji(oa(e*100),0,100)}const Mn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},yf=[..."0123456789ABCDEF"],Mk=e=>yf[e&15],Rk=e=>yf[(e&240)>>4]+yf[e&15],Dl=e=>(e&240)>>4===(e&15),Dk=e=>Dl(e.r)&&Dl(e.g)&&Dl(e.b)&&Dl(e.a);function Lk(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Mn[e[1]]*17,g:255&Mn[e[2]]*17,b:255&Mn[e[3]]*17,a:t===5?Mn[e[4]]*17:255}:(t===7||t===9)&&(n={r:Mn[e[1]]<<4|Mn[e[2]],g:Mn[e[3]]<<4|Mn[e[4]],b:Mn[e[5]]<<4|Mn[e[6]],a:t===9?Mn[e[7]]<<4|Mn[e[8]]:255})),n}const Ik=(e,t)=>e<255?t(e):"";function Nk(e){var t=Dk(e)?Mk:Rk;return e?"#"+t(e.r)+t(e.g)+t(e.b)+Ik(e.a,t):void 0}const Fk=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Lb(e,t,n){const i=t*Math.min(n,1-n),r=(s,a=(s+e/30)%12)=>n-i*Math.max(Math.min(a-3,9-a,1),-1);return[r(0),r(8),r(4)]}function Bk(e,t,n){const i=(r,s=(r+e/60)%6)=>n-n*t*Math.max(Math.min(s,4-s,1),0);return[i(5),i(3),i(1)]}function Hk(e,t,n){const i=Lb(e,1,.5);let r;for(t+n>1&&(r=1/(t+n),t*=r,n*=r),r=0;r<3;r++)i[r]*=1-t-n,i[r]+=t;return i}function zk(e,t,n,i,r){return e===r?(t-n)/i+(t<n?6:0):t===r?(n-e)/i+2:(e-t)/i+4}function ed(e){const n=e.r/255,i=e.g/255,r=e.b/255,s=Math.max(n,i,r),a=Math.min(n,i,r),l=(s+a)/2;let u,h,d;return s!==a&&(d=s-a,h=l>.5?d/(2-s-a):d/(s+a),u=zk(n,i,r,d,s),u=u*60+.5),[u|0,h||0,l]}function nd(e,t,n,i){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,i)).map(Xi)}function id(e,t,n){return nd(Lb,e,t,n)}function Wk(e,t,n){return nd(Hk,e,t,n)}function jk(e,t,n){return nd(Bk,e,t,n)}function Ib(e){return(e%360+360)%360}function $k(e){const t=Fk.exec(e);let n=255,i;if(!t)return;t[5]!==i&&(n=t[6]?Co(+t[5]):Xi(+t[5]));const r=Ib(+t[2]),s=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?i=Wk(r,s,a):t[1]==="hsv"?i=jk(r,s,a):i=id(r,s,a),{r:i[0],g:i[1],b:i[2],a:n}}function Uk(e,t){var n=ed(e);n[0]=Ib(n[0]+t),n=id(n),e.r=n[0],e.g=n[1],e.b=n[2]}function Vk(e){if(!e)return;const t=ed(e),n=t[0],i=im(t[1]),r=im(t[2]);return e.a<255?`hsla(${n}, ${i}%, ${r}%, ${Si(e.a)})`:`hsl(${n}, ${i}%, ${r}%)`}const rm={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},sm={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function qk(){const e={},t=Object.keys(sm),n=Object.keys(rm);let i,r,s,a,l;for(i=0;i<t.length;i++){for(a=l=t[i],r=0;r<n.length;r++)s=n[r]Line truncated
* Chart.js v4.5.0
* https://www.chartjs.org
* (c) 2025 Chart.js Contributors
* Released under the MIT License
*/function _i(){}const Qk=(()=>{let e=0;return()=>e++})();function Rt(e){return e==null}function ne(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function Lt(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function ue(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function yn(e,t){return ue(e)?e:t}function Tt(e,t){return typeof e>"u"?t:e}const tA=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,Fb=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Gt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Vt(e,t,n,i){let r,s,a;if(ne(e))for(s=e.length,r=0;r<s;r++)t.call(n,e[r],r);else if(Lt(e))for(a=Object.keys(e),s=a.length,r=0;r<s;r++)t.call(n,e[a[r]],a[r])}function gc(e,t){let n,i,r,s;if(!e||!t||e.length!==t.length)return!1;for(n=0,i=e.length;n<i;++n)if(r=e[n],s=t[n],r.datasetIndex!==s.datasetIndex||r.index!==s.index)return!1;return!0}function mc(e){if(ne(e))return e.map(mc);if(Lt(e)){const t=Object.create(null),n=Object.keys(e),i=n.length;let r=0;for(;r<i;++r)t[n[r]]=mc(e[n[r]]);return t}return e}function Bb(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function eA(e,t,n,i){if(!Bb(e))return;const r=t[e],s=n[e];Lt(r)&&Lt(s)?Vo(r,s,i):t[e]=mc(s)}function Vo(e,t,n){const i=ne(t)?t:[t],r=i.length;if(!Lt(e))return e;n=n||{};const s=n.merger||eA;let a;for(let l=0;l<r;++l){if(a=i[l],!Lt(a))continue;const u=Object.keys(a);for(let h=0,d=u.length;h<d;++h)s(u[h],e,a,n)}return e}function No(e,t){return Vo(e,t,{merger:nA})}function nA(e,t,n){if(!Bb(e))return;const i=t[e],r=n[e];Lt(i)&&Lt(r)?No(i,r):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=mc(r))}const am={"":e=>e,x:e=>e.x,y:e=>e.y};function iA(e){const t=e.split("."),n=[];let i="";for(const r of t)i+=r,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}function rA(e){const t=iA(e);return n=>{for(const i of t){if(i==="")break;n=n&&n[i]}return n}}function Yi(e,t){return(am[t]||(am[t]=rA(t)))(e)}function rd(e){return e.charAt(0).toUpperCase()+e.slice(1)}const qo=e=>typeof e<"u",Ki=e=>typeof e=="function",lm=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function sA(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const zt=Math.PI,Qt=2*zt,oA=Qt+zt,vc=Number.POSITIVE_INFINITY,aA=zt/180,me=zt/2,vr=zt/4,cm=zt*2/3,$i=Math.log10,ri=Math.sign;function Fo(e,t,n){return Math.abs(e-t)<n}function um(e){const t=Math.round(e);e=Fo(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor($i(e))),i=e/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function lA(e){const t=[],n=Math.sqrt(e);let i;for(i=1;i<n;i++)e%i===0&&(t.push(i),t.push(e/i));return n===(n|0)&&t.push(n),t.sort((r,s)=>r-s).pop(),t}function cA(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function ys(e){return!cA(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function uA(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function Hb(e,t,n){let i,r,s;for(i=0,r=e.length;i<r;i++)s=e[i][n],isNaN(s)||(t.min=Math.min(t.min,s),t.max=Math.max(t.max,s))}function jn(e){return e*(zt/180)}function sd(e){return e*(180/zt)}function hm(e){if(!ue(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function zb(e,t){const n=t.x-e.x,i=t.y-e.y,r=Math.sqrt(n*n+i*i);let s=Math.atan2(i,n);return s<-.5*zt&&(s+=Qt),{angle:s,distance:r}}function _f(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function hA(e,t){return(e-t+oA)%Qt-zt}function We(e){return(e%Qt+Qt)%Qt}function Xo(e,t,n,i){const r=We(e),s=We(t),a=We(n),l=We(s-r),u=We(a-r),h=We(r-s),d=We(r-a);return r===s||r===a||i&&s===a||l>u&&h<d}function Pe(e,t,n){return Math.max(t,Math.min(n,e))}function fA(e){return Pe(e,-32768,32767)}function Ti(e,t,n,i=1e-6){return e>=Math.min(t,n)-i&&e<=Math.max(t,n)+i}function od(e,t,n){n=n||(a=>e[a]<t);let i=e.length-1,r=0,s;for(;i-r>1;)s=r+i>>1,n(s)?r=s:i=s;return{lo:r,hi:i}}const Ci=(e,t,n,i)=>od(e,n,i?r=>{const s=e[r][t];return s<n||s===n&&e[r+1][t]===n}:r=>e[r][t]<n),dA=(e,t,n)=>od(e,n,i=>e[i][t]>=n);function pA(e,t,n){let i=0,r=e.length;for(;i<r&&e[i]<t;)i++;for(;r>i&&e[r-1]>n;)r--;return i>0||r<e.length?e.slice(i,r):e}const Wb=["push","pop","shift","splice","unshift"];function gA(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Wb.forEach(n=>{const i="_onData"+rd(n),r=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...s){const a=r.apply(this,s);return e._chartjs.listeners.forEach(l=>{typeof l[i]=="function"&&l[i](...s)}),a}})})}function fm(e,t){const n=e._chartjs;if(!n)return;const i=n.listeners,r=i.indexOf(t);r!==-1&&i.splice(r,1),!(i.length>0)&&(Wb.forEach(s=>{delete e[s]}),delete e._chartjs)}function jb(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const $Line truncated
* Chart.js v4.5.0
* https://www.chartjs.org
* (c) 2025 Chart.js Contributors
* Released under the MIT License
*/class bE{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,i,r){const s=n.listeners[r],a=n.duration;s.forEach(l=>l({chart:t,initial:n.initial,numSteps:a,currentStep:Math.min(i-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=$b.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((i,r)=>{if(!i.running||!i.items.length)return;const s=i.items;let a=s.length-1,l=!1,u;for(;a>=0;--a)u=s[a],u._active?(u._total>i.duration&&(i.duration=u._total),u.tick(t),l=!0):(s[a]=s[s.length-1],s.pop());l&&(r.draw(),this._notify(r,i,t,"progress")),s.length||(i.running=!1,this._notify(r,i,t,"complete"),i.initial=!1),n+=s.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let i=n.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,i)),i}listen(t,n,i){this._getAnims(t).listeners[n].push(i)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,r)=>Math.max(i,r._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const i=n.items;let r=i.length-1;for(;r>=0;--r)i[r].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var wi=new bE;const Cm="transparent",yE={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const i=gm(e||Cm),r=i.valid&&gm(t||Cm);return r&&r.valid?r.mix(i,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class _E{constructor(t,n,i,r){const s=n[i];r=Oo([t.to,r,s,t.from]);const a=Oo([t.from,s,r]);this._active=!0,this._fn=t.fn||yE[t.type||typeof a],this._easing=Bo[t.easing]||Bo.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=i,this._from=a,this._to=r,this._promises=void 0}active(){return this._active}update(t,n,i){if(this._active){this._notify(!1);const r=this._target[this._prop],s=i-this._start,a=this._duration-s;this._start=i,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=Oo([t.to,n,r,t.from]),this._from=Oo([t.from,r,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,i=this._duration,r=this._prop,s=this._from,a=this._loop,l=this._to;let u;if(this._active=s!==l&&(a||n<i),!this._active){this._target[r]=l,this._notify(!0);return}if(n<0){this._target[r]=s;return}u=n/i%2,u=a&&u>1?2-u:u,u=this._easing(Math.min(1,Math.max(0,u))),this._target[r]=this._fn(s,l,u)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,i)=>{t.push({res:n,rej:i})})}_notify(t){const n=t?"res":"rej",i=this._promises||[];for(let r=0;r<i.length;r++)i[r][n]()}}class ly{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Lt(t))return;const n=Object.keys(ie.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(r=>{const s=t[r];if(!Lt(s))return;const a={};for(const l of n)a[l]=s[l];(ne(s.properties)&&s.properties||[r]).forEach(l=>{(l===r||!i.has(l))&&i.set(l,a)})})}_animateOptions(t,n){const i=n.options,r=xE(t,i);if(!r)return[];const s=this._createAnimations(r,i);return i.$shared&&wE(t.options.$animations,i).then(()=>{t.options=i},()=>{}),s}_createAnimations(t,n){const i=this._properties,r=[],s=t.$animations||(t.$animations={}),a=Object.keys(n),l=Date.now();let u;for(u=a.length-1;u>=0;--u){const h=a[u];if(h.charAt(0)==="$")continue;if(h==="options"){r.push(...this._animateOptions(t,n));continue}const d=n[h];let m=s[h];const y=i.get(h);if(m)if(y&&m.active()){m.update(y,d,l);continue}else m.cancel();if(!y||!y.duration){t[h]=d;continue}s[h]=m=new _E(y,t,h,d),r.push(m)}return r}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const i=this._createAnimations(t,n);if(i.length)return wi.add(this._chart,i),!0}}function wE(e,t){const n=[],i=Object.keys(t);for(let r=0;r<i.length;r++){const s=e[i[r]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function xE(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Om(e,t){const n=e&&e.options||{},i=n.reverse,r=n.min===void 0?t:0,s=n.max===void 0?t:0;return{start:i?s:r,end:i?r:s}}function SE(e,t,n){if(n===!1)return!1;const i=Om(e,n),r=Om(t,n);return{top:r.end,right:i.end,bottom:r.start,left:i.start}}function TE(e){let t,n,i,r;return Lt(e)?(t=e.top,n=e.right,i=e.bottom,r=e.left):t=n=i=r=e,{top:t,right:n,bottom:i,left:r,disabled:e===!1}}function cy(e,t){const n=[],i=e._getSortedDatasetMetas(t);let r,s;for(r=0,s=i.length;r<s;++r)n.push(i[r].indLine truncated
`)>-1?e.split(`
`):e}function oR(e,t){const{element:n,datasetIndex:i,index:r}=t,s=e.getDatasetMeta(i).controller,{label:a,value:l}=s.getLabelAndValue(r);return{chart:e,label:a,parsed:s.getParsed(r),raw:e.data.datasets[i].data[r],formattedValue:l,dataset:s.getDataset(),dataIndex:r,datasetIndex:i,element:n}}function uv(e,t){const n=e.chart.ctx,{body:i,footer:r,title:s}=e,{boxWidth:a,boxHeight:l}=t,u=ke(t.bodyFont),h=ke(t.titleFont),d=ke(t.footerFont),m=s.length,y=r.length,x=i.length,S=Ue(t.padding);let C=S.height,T=0,A=i.reduce((D,R)=>D+R.before.length+R.lines.length+R.after.length,0);if(A+=e.beforeBody.length+e.afterBody.length,m&&(C+=m*h.lineHeight+(m-1)*t.titleSpacing+t.titleMarginBottom),A){const D=t.displayColors?Math.max(l,u.lineHeight):u.lineHeight;C+=x*D+(A-x)*u.lineHeight+(A-1)*t.bodySpacing}y&&(C+=t.footerMarginTop+y*d.lineHeight+(y-1)*t.footerSpacing);let M=0;const B=function(D){T=Math.max(T,n.measureText(D).width+M)};return n.save(),n.font=h.string,Vt(e.title,B),n.font=u.string,Vt(e.beforeBody.concat(e.afterBody),B),M=t.displayColors?a+2+t.boxPadding:0,Vt(i,D=>{Vt(D.before,B),Vt(D.lines,B),Vt(D.after,B)}),M=0,n.font=d.string,Vt(e.footer,B),n.restore(),T+=S.width,{width:T,height:C}}function aR(e,t){const{y:n,height:i}=t;return n<i/2?"top":n>e.height-i/2?"bottom":"center"}function lR(e,t,n,i){const{x:r,width:s}=i,a=n.caretSize+n.caretPadding;if(e==="left"&&r+s+a>t.width||e==="right"&&r-s-a<0)return!0}function cR(e,t,n,i){const{x:r,width:s}=n,{width:a,chartArea:{left:l,right:u}}=e;let h="center";return i==="center"?h=r<=(l+u)/2?"left":"right":r<=s/2?h="left":r>=a-s/2&&(h="right"),lR(h,e,t,n)&&(h="center"),h}function hv(e,t,n){const i=n.yAlign||t.yAlign||aR(e,n);return{xAlign:n.xAlign||t.xAlign||cR(e,t,n,i),yAlign:i}}function uR(e,t){let{x:n,width:i}=e;return t==="right"?n-=i:t==="center"&&(n-=i/2),n}function hR(e,t,n){let{y:i,height:r}=e;return t==="top"?i+=n:t==="bottom"?i-=r+n:i-=r/2,i}function fv(e,t,n,i){const{caretSize:r,caretPadding:s,cornerRadius:a}=e,{xAlign:l,yAlign:u}=n,h=r+s,{topLeft:d,topRight:m,bottomLeft:y,bottomRight:x}=Er(a);let S=uR(t,l);const C=hR(t,u,h);return u==="center"?l==="left"?S+=h:l==="right"&&(S-=h):l==="left"?S-=Math.max(d,y)+r:l==="right"&&(S+=Math.max(m,x)+r),{x:Pe(S,0,i.width-t.width),y:Pe(C,0,i.height-t.height)}}function Vl(e,t,n){const i=Ue(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-i.right:e.x+i.left}function dv(e){return ti([],xi(e))}function fR(e,t,n){return Ji(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function pv(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const Ey={beforeTitle:_i,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return n[t.dataIndex]}return""},afterTitle:_i,beforeBody:_i,beforeLabel:_i,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return Rt(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:_i,afterBody:_i,beforeFooter:_i,footer:_i,afterFooter:_i};function on(e,t,n,i){const r=e[t].call(n,i);return typeof r>"u"?Ey[t].call(n,i):r}class Ef extends Ai{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,i=this.options.setContext(this.getContext()),r=i.enabled&&n.options.animation&&i.animations,s=new ly(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=fR(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:i}=n,r=on(i,"beforeTitle",this,t),s=on(i,"title",this,t),a=on(i,"afterTitle",this,t);let l=[];return l=ti(l,xi(r)),l=ti(l,xi(s)),l=ti(l,xi(a)),l}getBeforeBody(t,n){return dv(on(n.call Line truncated
<span class="inline-flex items-center gap-1.5 text-xs text-theme-primary">
<span class="inline-block w-3 h-3 rounded-full" style="background-color: ${h.color};"></span>
${ce(r.cluster||"Cluster")} ${d+1} &middot; ${h.size} ${ce(u)}
</span>
`).join("")+(l>0?`<span class="text-xs text-theme-secondary">${ce(r.more||"+ :count more").replace(":count",l)}</span>`:""),i.hidden=!1}function le(e,t){return e.querySelector(t)||(e.closest("[data-network-section]")||document).querySelector(t)}function of(e,t,n){const i=e&&e.querySelector("[data-timelapse-play]");if(!i)return;const r=t==="busy",s={play:e.querySelector("[data-timelapse-icon-play]"),pause:e.querySelector("[data-timelapse-icon-pause]"),busy:e.querySelector("[data-timelapse-icon-busy]")};i.disabled=!0,i.setAttribute("title",n),i.setAttribute("aria-label",n),s.busy&&s.busy.classList.toggle("hidden",!r),s.play&&s.play.classList.toggle("hidden",r),s.pause&&s.pause.classList.add("hidden")}function vD(e,t){let n=0,i=e.length-1,r=null;for(;n<=i;){const s=n+i>>1;e[s]<=t?(r=e[s],n=s+1):i=s-1}return r}function Lv(e,t,n,{view:i,stoppedAfterDays:r,markInactive:s}){if(!n||!t||!t.till)return;const a=t.till,l=Date.parse(a),u=n.paid||{},h=n.removed||{},d=n.inactive||{};e.batch(()=>{e.nodes().forEach(m=>{const y=m.id(),x=!!h[y]&&h[y]<=a,S=!x&&!!d[y]&&d[y]<=a;if(m.hasClass("removed")!==x&&m.toggleClass("removed",x),m.hasClass("inactive")!==S&&m.toggleClass("inactive",S),i!=="circulation"||m.hasClass("outside"))return;const C=vD(u[y]||[],a);let T="neverPaid";if(C!==null){const A=Math.round((l-Date.parse(C))/864e5);T=s&&S||r!==null&&A>r?"stalled":"flowing"}m.data("flow")!==T&&(m.data("flow",T),m.data("color",By[T]||"#94a3b8"))})})}const Iv=.5,bD=30;function Nv(e){const t=Math.max(0,Math.min(100,Number(e)||0))/100;return Iv*Math.pow(bD/Iv,t)}function yD(e){return e<10?`${e.toFixed(1)}/s`:`${Math.round(e)}/s`}function Fv(e,t,n){const i=le(e,"[data-network-stagnant]");if(!i)return;const r=l=>l instanceof Set?l.size:(l||[]).length,s=(i.dataset.drawnTemplate||"").replace(":nodes",r(n.nodes)).replace(":edges",r(n.edges));i.textContent=s?`${t}: ${s}`:t,i.hidden=!1;const a=e.querySelector("[data-network-host]");a&&(a.dataset.networkSubtext=i.textContent)}function ce(e){return String(e).replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t])}let hs={symbol:"H",atEnd:!1,thousands:"."};function xo(e){const t=(e||0)/60,n=t>=100?Math.round(t):Math.round(t*10)/10;let i=String(n).replace(".",",");if(hs.thousands){const[r,s]=i.split(","),a=r.replace(/\B(?=(\d{3})+(?!\d))/g,hs.thousands);i=s?`${a},${s}`:a}return hs.atEnd?`${i} ${hs.symbol}`:`${hs.symbol} ${i}`}function Ro(e){try{return e?JSON.parse(e):null}catch{return null}}function _D(e,t,n,i=null,r=!1){const s=e.nodes.reduce((F,H)=>Math.max(F,H.volume||0),0),a=e.nodes.reduce((F,H)=>!F||H.degree>F.degree?H:F,null),l=t&&a?a.id:null,u=e.nodes.filter(F=>F.id!==l),h=hD(u),d=new Set(u.map(F=>F.id)),m=new Map;(e.edges||[]).forEach(F=>{!d.has(F.source)||!d.has(F.target)||(m.has(F.source)||m.set(F.source,new Set),m.has(F.target)||m.set(F.target,new Set),m.get(F.source).add(F.target),m.get(F.target).add(F.source))}),u.forEach(F=>{F.totalDegree=F.degree,F.degree=(m.get(F.id)||new Set).size});const y=n==="circulation"?uD(u,e.edges||[],i,r):new Map,x=u.reduce((F,H)=>Math.max(F,H.degree||0),0),S=u.map(F=>{const H=n==="volume"?Tc(F.volume||0,s):Tc(F.degree||0,x),U=F.outside?"#94a3b8":n==="circulation"?By[(y.get(F.id)||{}).flow]||"#94a3b8":n==="region"?h[F.region]||"#64748b":cD[F.type]||"#64748b";return{data:{id:F.id,label:F.name,fullName:F.full_name||null,type:F.type,region:F.region||"",bank:F.bank||"",degree:F.degree,hiddenPartners:Math.max((F.totalDegree||F.degree)-F.degree,0),volume:F.volume,paid:F.paid||0,received:F.received||0,size:H,color:U,flow:(y.get(F.id)||{}).flow||null,flowNet:(y.get(F.id)||{}).net||0,borderW:1,outlineW:1.5,fontS:14},classes:[F.outside?"outside":"",F.removed?"removed":"",F.inactive?"inactive":""].filter(Boolean).join(" ")}}),C=new Set(S.map(F=>F.data.id)),T=e.edges.reduce((F,H)=>Math.max(F,H.volume||0),0),A=e.edges.filter(F=>C.has(F.source)&&C.has(F.target)),M=F=>T?.2+Math.pow((F||0)/T,.7)*12:.5,B=[],D=new Map,R=(F,H)=>{const U=`${F}->${H}`,V=D.get(U)||0;return D.set(U,V+1),26+V*22};A.forEach((F,H)=>{if(n!=="flow"){B.push({data:{id:`e${H}`,key:`${F.source}|${F.target}|${F.type_id}`,source:F.source,target:F.target,tx:F.tx,volume:F.volume,width:Math.min(.2+Math.pow(Math.log2(1+F.tx),1.5)*.55,12),bend:26}});return}const U=F.a_to_b||0,V=F.b_to_a||0;U>0&&B.push({data:{id:`e${H}f`,key:`${F.source}|${F.target}|${F.type_id}`,source:F.source,target:F.target,tx:F.tx,volume:U,width:M(U),bend:R(F.source,F.target),edgeColor:Mv[F.type_id]||"#64748b"},classes:"directed flowtype"}),V>0&&B.push({data:{id:`e${H}b`,key:`${F.source}|${F.target}|${F.type_id}`,source:F.target,target:F.source,tx:F.tx,volume:V,width:M(V),bend:R(F.target,F.source),edgeColor:Mv[F.type_id]||"#64748b"},classes:"directed flowtype"})});const N=a?{...a,label:a.name}:null;let I=0,j=0,q=0;return y.forEach(F=>{if(F.flow==="neverPaid")q+=1;else if(F.flow!=="stalled")return;I+=1,F.net>0&&(j+=F.net)}),{elements:[...S,...B],hub:N,droppedHub:!!l,regions:h,stagnantNodes:I,stagnantMLine truncated
<button type="button" data-node-id="${ce(jt.id())}"
class="block w-full px-3 py-2 text-left text-sm hover:bg-gray-100">
<span class="font-semibold">${ce(jt.data("label")||"")}</span>
<span class="text-gray-500"> &middot; ${jt.data("degree")} ${ce(xt.partners||"")}</span>
</button>
`).join(""),St.hidden=!1};tt(Ot,"input",et=>Z(et.target.value)),tt(Ot,"search",et=>{et.target.value===""&&(In(),St.hidden=!0)}),tt(St,"mousedown",et=>{const ht=et.target.closest("[data-node-id]");if(!ht)return;et.preventDefault();const lt=K.getElementById(ht.dataset.nodeId);lt&&lt.length&&(De(lt),Ot.value=lt.data("label")||"",St.hidden=!0)}),tt(Ot,"keydown",et=>{if(et.key!=="Enter")return;et.preventDefault();const ht=St.querySelector("[data-node-id]");if(ht){const lt=K.getElementById(ht.dataset.nodeId);lt&&lt.length&&(De(lt),St.hidden=!0)}}),tt(document,"click",et=>{e.contains(et.target)||(St.hidden=!0)})}K.on("tap",Z=>{Z.target===K&&Nt&&be()});const te=1.5;[["[data-network-spread]",te],["[data-network-shrink]",1/te]].forEach(([Z,et])=>{const ht=le(e,Z);ht&&tt(ht,"click",lt=>{lt.preventDefault(),gD(K,K.elements(),et),_t()})}),aD({screenBox:le(e,"[data-network-screen]"),frameBox:le(e,"[data-network-frame]"),headerBox:le(e,"[data-network-header]"),button:le(e,"[data-network-fullscreen]"),panel:()=>le(e,"[data-network-timelapse-controls]"),signal:st.signal,onResize:()=>{if(K.destroyed())return;K.resize();const Z=K.elements().not(".hidden"),et=le(e,"[data-network-timelapse-controls]");K.fit(Z,zy(K)),Wy(K,Z,et?{width:et.offsetWidth,height:et.offsetHeight+12}:null),_t()}});const Le=le(e,"[data-network-svg]");Le&&tt(Le,"click",Z=>{Z.preventDefault();const et=e.getAttribute("data-network-anonymize")==="1",ht=Ro(e.getAttribute("data-network-meta")),lt=e.querySelector("[data-network-host]"),Bt=le(e,"[data-network-stagnant]"),jt=Bt&&!Bt.hidden?Bt.textContent.trim():"";ht&&jt?ht.subtext=jt:ht&&lt&&lt.dataset.networkSubtext&&(ht.subtext=lt.dataset.networkSubtext),ht&&lt&&lt._timelapse&&(ht.period=null);const de=jy(K,()=>TD(K,!et,ht));if(!de)return;const Ie=new Blob([de],{type:"image/svg+xml;charset=utf-8"}),qe=URL.createObjectURL(Ie),Ne=document.createElement("a");Ne.href=qe,Ne.download=(Le.dataset.filename||"trading-network")+"-"+new Date().toISOString().slice(0,10)+".svg",document.body.appendChild(Ne),Ne.click(),document.body.removeChild(Ne),setTimeout(()=>URL.revokeObjectURL(qe),1e3)});const re=le(e,"[data-network-drag-neighbours]"),oe=()=>!re||re.checked;let we=null;if(K.on("grab","node",Z=>{const et=Z.target;if(!oe()){we=null;return}const ht={...et.position()},lt=et.neighborhood("node").filter(Bt=>!Bt.hasClass("hidden")).map(Bt=>({node:Bt,offset:{x:Bt.position("x")-ht.x,y:Bt.position("y")-ht.y}}));we={node:et,followers:lt}}),K.on("drag","node",Z=>{if(!we||we.node.id()!==Z.target.id())return;const et=we.node.position();we.followers.forEach(({node:ht,offset:lt})=>{ht.position({x:et.x+lt.x,y:et.y+lt.y})})}),K.on("free","node",()=>{we=null}),await i((r.arranging||"Arranging :count profiles...").replace(":count",K.nodes().not(".hidden").length)),u()){K.destroy();return}const ye=()=>{it&&it.isConnected&&it.remove()};setTimeout(ye,12e4);const Ve=S?le(e,"[data-network-timelapse-controls]"):null,wn=Ve?{width:Ve.offsetWidth,height:Ve.offsetHeight+12}:null,he={view:m,stoppedAfterDays:Number.isFinite(I)?I:null,markInactive:e.getAttribute("data-network-mark-inactive")==="1"},Xt=S&&M.length>0?()=>{Nf(K,R.layers(0)),Lv(K,M[0],D,he)}:null,xe=le(e,"[data-network-warning]");if(xe){const Z=xe.querySelector("[data-network-warning-text]");Z&&(Z.textContent=""),xe.hidden=!1}let Ae;const xn=new Promise(Z=>{Ae=Z});if(sf(K,K.elements(),Rv(y,K),()=>{Xt&&Xt(),ye(),Ae()},wn,Z=>{const et=xe&&xe.querySelector("[data-network-warning-text]");et&&(et.textContent=`${r.layoutFallback||"The usual arrangement failed, so a simpler one is shown."} (${Z.message||Z})`)}),m==="cluster"){const et=K.nodes().not(".hidden").length;if(et>600){Dv(e,[],0);const ht=le(e,"[data-network-warning]"),lt=ht&&ht.querySelector("[data-network-warning-text]");ht&&lt&&(lt.textContent=(e.getAttribute("data-cluster-too-large")||"").replace(":count",et).replace(":limit",600))}else{if(await i((r.clustering||"Finding clusters in :count profiles, this can take a moment...").replace(":count",et)),u()){K.destroy();return}try{const ht=K.elements().markovClustering(),lt=[];ht.forEach((Bt,jt)=>{const de=Cc[jt%Cc.length],Ie=Bt.nodes().filter(qe=>!qe.hasClass("outside"));Ie.forEach(qe=>qe.data("color",de)),Ie.length>1&&lt.push({color:de,size:Ie.length})}),Dv(e,lt,ht.length)}catch{}}}const Yt=le(e,"[data-network-timelapse-controls]");if(S&&M.length>0&&Yt)try{const Z=Yt.querySelector("[data-timelapse-play]"),et=Yt.querySelector("[data-timelapse-scrubber]"),ht=Yt.querySelector("[data-timelapse-year]"),lt=Yt.querySelector("[data-timelapse-speed]"),Bt=r.timelapsePlay||"Play",jt=r.timelapsePause||"Pause",de=Yt.querySelector("[data-timelapse-icon-play]"),Ie=Yt.querySelector("[data-timelapse-icon-pause]"),qe=Yt.querySelector("[data-timelapse-icon-busy]"),Ne=$t=>{if(!Z)return;const _e=$t?jt:Bt;Z.setAttribute("title",_e),Z.setAttribute("aria-label",_e),de&&Ie&&(de.classList.toggle("hidden",$t),Ie.classList.toggle("hidden",!$t)),qe&&qe.classList.add("hidden"),Z.disabled=!1},Zi=(s.nodes Line truncated
<svg xmlns="http://www.w3.org/2000/svg" width="${i}" height="${B}" viewBox="0 0 ${i} ${B}">
<rect width="100%" height="100%" fill="#ffffff"/>
<defs>
<clipPath id="graph-frame">
<rect x="0" y="${x}" width="${i}" height="${r}"/>
</clipPath>
${h?h.defs:""}
</defs>
<g clip-path="url(#graph-frame)">
${j.join(`
`)}
${q.join(`
`)}
</g>
${F.join(`
`)}
</svg>
`}const Hf="faded neighbour hovered incident";function jy(e,t){const n={};Hf.split(" ").forEach(i=>{n[i]=e.elements(`.${i}`)}),e.batch(()=>e.elements().removeClass(Hf));try{return t()}finally{e.batch(()=>{Object.entries(n).forEach(([i,r])=>r.addClass(i))})}}function $y(){try{const e=window.statsNetworkChart;if(!e||e.destroyed()||e.nodes().length===0)return null;const t=2;return jy(e,()=>e.png({output:"base64uri",bg:"#ffffff",full:!1,scale:t}))}catch{return null}}typeof document<"u"&&document.addEventListener("click",e=>{e.target.closest("[data-network-pdf-trigger]")&&(window.__networkSnapshot=$y())},!0);function CD(){window.LaravelFlatpickr&&document.querySelectorAll("[data-network-timelapse-end] .flatpickr-input").forEach(e=>{e._flatpickr||window.LaravelFlatpickr.initializeFlatpickr(e)})}function yd(){document.querySelectorAll(`[${Ff}]`).forEach(e=>{wD(e).catch(t=>{const n=e.querySelector("[data-network-host]");n&&(n._buildingSignature=null),console.error("[network] drawing failed",t);const i=n&&n.querySelector("[data-network-placeholder] span");if(i){const r=Ro(e.getAttribute("data-network-labels"))||{};i.textContent=`${r.drawFailed||"The network could not be drawn."} (${t&&t.message||t})`}})})}document.addEventListener("DOMContentLoaded",()=>setTimeout(yd,100));document.addEventListener("livewire:init",()=>{let e=null,t=!1;Livewire.hook("morph.updated",()=>{clearTimeout(e),e=setTimeout(yd,300),t||(t=!0,requestAnimationFrame(()=>{t=!1,CD()}))})});document.addEventListener("livewire:navigated",()=>setTimeout(yd,100));Jt.register(...Hc);const OD=[{canvasId:"reportBalanceDistributionChart",dataAttribute:"data-report-balance-distribution",field:"User",color:"#14b8a6"},{canvasId:"reportBalanceDistributionOrgChart",dataAttribute:"data-report-balance-distribution-org",field:"Organization",color:"#d946ef"}];function kD(e){var u;const t=document.getElementById(e.canvasId);if(!t||typeof Jt>"u")return;const n=t.closest(`[${e.dataAttribute}]`);if(!n)return;let i;try{i=JSON.parse(n.getAttribute(e.dataAttribute)||"[]")}catch{return}if(!Array.isArray(i)||i.length===0)return;let r={};try{r=JSON.parse(n.getAttribute("data-series-labels")||"{}")}catch{r={}}const s=n.getAttribute(e.dataAttribute);if(t.dataset.chartSignature===s&&((u=Jt.getChart)!=null&&u.call(Jt,t)))return;const a=Jt.getChart?Jt.getChart(t):null;a&&a.destroy();const l=[{label:r[e.field]||e.field,data:i.map(h=>h[e.field]||0),backgroundColor:e.color,borderColor:e.color,borderWidth:1}];t.chart=new Jt(t.getContext("2d"),{type:"bar",data:{labels:i.map(h=>h.label),datasets:l},options:{responsive:!0,maintainAspectRatio:!1,layout:{padding:{bottom:16}},plugins:{legend:{display:!1}},scales:{y:{beginAtZero:!0,ticks:{precision:0}},x:{grid:{display:!0,drawOnChartArea:!0,offset:!1,color:"rgba(0, 0, 0, 0.10)"},ticks:{padding:8,autoSkip:!1,maxRotation:60,minRotation:60,font:{size:10}}}}}}),t.dataset.chartSignature=s}function _d(){OD.forEach(kD)}document.addEventListener("DOMContentLoaded",()=>{setTimeout(_d,100)});document.addEventListener("livewire:init",()=>{let e=null;Livewire.hook("morph.updated",()=>{clearTimeout(e),e=setTimeout(_d,300)})});document.addEventListener("livewire:navigated",()=>{setTimeout(_d,100)});window.exportBalanceDistributionChartForPdf=async function(e){try{const t=document.getElementById(e);if(!t)return null;const n=Jt.getChart?Jt.getChart(t):null;if(!n)return null;const i=2,r=674,s=300,a=document.createElement("canvas");a.width=r*i,a.height=s*i;const l=new Jt(a.getContext("2d"),{type:n.config.type,data:JSON.parse(JSON.stringify(n.config.data)),options:{...JSON.parse(JSON.stringify(n.config.options||{})),responsive:!1,maintainAspectRatio:!1,animation:!1,devicePixelRatio:i}});await new Promise(h=>setTimeout(h,300));const u=a.toDataURL("image/png",1);return l.destroy(),u}catch{return null}};window.__showProfileSwitchBanner=function(e){const t=document.getElementById("profile-switch-banner");if(!t)return;const n=document.getElementById("profile-switch-banner-photo");n&&(n.style.display="none");const i=document.getElementById("profile-switch-banner-role");i&&(i.style.display="none",i.textContent=""),e.photo&&n&&(n.src=e.photo,n.alt=e.name||"",n.style.display="block");const r=document.getElementById("profile-switch-banner-name");r&&(r.textContent=e.name||""),i&&e.roleLabel&&(i.textContent=e.roleLabel,i.style.display="block"),t.style.opacity="1",t.style.transition="",t.style.display="flex",t.addEventListener("click",()=>{t.style.display="none"},{once:!0}),setTimeout(()=>{t.style.transition="opacity 0.4s",t.style.opacity="0",setTimeout(()=>{t.style.display="none",t.style.opacity="",t.style.transition=""},400)},3e3)};Alpine.plugin(ik);Jt.register(...Hc);window.Chart=Jt;window.createPopper=NO;window.Tagify=Ql;window.loadJSZip=()=>af(()=>import("./jszip.min-KAUKf24L.js").then(e=>e.j),__vite__mapDeps([2,1])).then(e=>e.default);document.addEventListener("alpine:init",()=>{Alpine.data("callTagPicker",()=>({callTagify:null,init(){const e=this.$refs.callTagsInp Line truncated
@@ -0,0 +1 @@
#custom-timebank-style ol{padding-left:10px;margin-bottom:1rem}#custom-timebank-style ol li{margin-bottom:.5rem}#custom-timebank-style ul{padding-left:20px;list-style-type:none;margin-bottom:1rem}#custom-timebank-style ul li{position:relative;padding-left:1.5em;margin-bottom:.5rem}#custom-timebank-style ul{padding-left:20px;list-style-type:disc;margin-bottom:1rem}#custom-timebank-style ul li{margin-bottom:.5rem}.flatpickr-calendar{z-index:40!important}
@@ -0,0 +1 @@
import{g as ye}from"./_commonjsHelpers-Cpj98o6Y.js";function Te(zt,jt){for(var q=0;q<jt.length;q++){const lt=jt[q];if(typeof lt!="string"&&!Array.isArray(lt)){for(const A in lt)if(A!=="default"&&!(A in zt)){const T=Object.getOwnPropertyDescriptor(lt,A);T&&Object.defineProperty(zt,A,T.get?T:{enumerable:!0,get:()=>lt[A]})}}}return Object.freeze(Object.defineProperty(zt,Symbol.toStringTag,{value:"Module"}))}var te={exports:{}},ee={exports:{}},re={exports:{}},Ne=re.exports,ce;function me(){return ce||(ce=1,function(zt,jt){(function(lt,A){zt.exports=A()})(Ne,function(){return function(q){var lt={};function A(T){if(lt[T])return lt[T].exports;var l=lt[T]={i:T,l:!1,exports:{}};return q[T].call(l.exports,l,l.exports,A),l.l=!0,l.exports}return A.m=q,A.c=lt,A.i=function(T){return T},A.d=function(T,l,n){A.o(T,l)||Object.defineProperty(T,l,{configurable:!1,enumerable:!0,get:n})},A.n=function(T){var l=T&&T.__esModule?function(){return T.default}:function(){return T};return A.d(l,"a",l),l},A.o=function(T,l){return Object.prototype.hasOwnProperty.call(T,l)},A.p="",A(A.s=28)}([function(q,lt,A){function T(){}T.QUALITY=1,T.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,T.DEFAULT_INCREMENTAL=!1,T.DEFAULT_ANIMATION_ON_LAYOUT=!0,T.DEFAULT_ANIMATION_DURING_LAYOUT=!1,T.DEFAULT_ANIMATION_PERIOD=50,T.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,T.DEFAULT_GRAPH_MARGIN=15,T.NODE_DIMENSIONS_INCLUDE_LABELS=!1,T.SIMPLE_NODE_SIZE=40,T.SIMPLE_NODE_HALF_SIZE=T.SIMPLE_NODE_SIZE/2,T.EMPTY_COMPOUND_NODE_SIZE=40,T.MIN_EDGE_LENGTH=1,T.WORLD_BOUNDARY=1e6,T.INITIAL_WORLD_BOUNDARY=T.WORLD_BOUNDARY/1e3,T.WORLD_CENTER_X=1200,T.WORLD_CENTER_Y=900,q.exports=T},function(q,lt,A){var T=A(2),l=A(8),n=A(9);function r(u,i,y){T.call(this,y),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=y,this.bendpoints=[],this.source=u,this.target=i}r.prototype=Object.create(T.prototype);for(var a in T)r[a]=T[a];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(u){if(this.source===u)return this.target;if(this.target===u)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(u,i){for(var y=this.getOtherEnd(u),t=i.getGraphManager().getRoot();;){if(y.getOwner()==i)return y;if(y.getOwner()==t)break;y=y.getOwner().getParent()}return null},r.prototype.updateLength=function(){var u=new Array(4);this.isOverlapingSourceAndTarget=l.getIntersection(this.target.getRect(),this.source.getRect(),u),this.isOverlapingSourceAndTarget||(this.lengthX=u[0]-u[2],this.lengthY=u[1]-u[3],Math.abs(this.lengthX)<1&&(this.lengthX=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},q.exports=r},function(q,lt,A){function T(l){this.vGraphObject=l}q.exports=T},function(q,lt,A){var T=A(2),l=A(10),n=A(13),r=A(0),a=A(16),u=A(5);function i(t,s,o,f){o==null&&f==null&&(f=s),T.call(this,f),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=l.MIN_VALUE,this.inclusionTreeDepth=l.MAX_VALUE,this.vGraphObject=f,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new n(s.x,s.y,o.width,o.height):this.rect=new n}i.prototype=Object.create(T.prototype);for(var y in T)i[y]=T[y];i.prototype.getEdges=function(){return this.edges},i.prototype.getChild=function(){return this.child},i.prototype.getOwner=function(){return this.owner},i.prototype.getWidth=function(){return this.rect.width},i.prototype.setWidth=function(t){this.rect.width=t},i.prototype.getHeight=function(){return this.rect.height},i.prototype.setHeight=function(t){this.rect.height=t},i.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},i.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},i.prototype.getCenter=function(){return new u(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},i.prototype.getLocation=function(){return new u(this.rect.x,this.rect.y)},i.prototype.getRect=function(){return this.rect},i.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},i.prototype.getHalfTheDiagonal=function(){return Math.sLine truncated
@@ -0,0 +1,331 @@
function Ds(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,a=Array(e);t<e;t++)a[t]=r[t];return a}function tc(r){if(Array.isArray(r))return r}function ac(r){if(Array.isArray(r))return Ds(r)}function ct(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function nc(r,e){for(var t=0;t<e.length;t++){var a=e[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,Jl(a.key),a)}}function dt(r,e,t){return e&&nc(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function Cr(r,e){var t=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=Ks(r))||e){t&&(r=t);var a=0,n=function(){};return{s:n,n:function(){return a>=r.length?{done:!0}:{done:!1,value:r[a++]}},e:function(u){throw u},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,s=!0,o=!1;return{s:function(){t=t.call(r)},n:function(){var u=t.next();return s=u.done,u},e:function(u){o=!0,i=u},f:function(){try{s||t.return==null||t.return()}finally{if(o)throw i}}}}function Ql(r,e,t){return(e=Jl(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ic(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function sc(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var a,n,i,s,o=[],u=!0,l=!1;try{if(i=(t=t.call(r)).next,e===0){if(Object(t)!==t)return;u=!1}else for(;!(u=(a=i.call(t)).done)&&(o.push(a.value),o.length!==e);u=!0);}catch(v){l=!0,n=v}finally{try{if(!u&&t.return!=null&&(s=t.return(),Object(s)!==s))return}finally{if(l)throw n}}return o}}function oc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uc(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xe(r,e){return tc(r)||sc(r,e)||Ks(r,e)||oc()}function yn(r){return ac(r)||ic(r)||Ks(r)||uc()}function lc(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var a=t.call(r,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function Jl(r){var e=lc(r,"string");return typeof e=="symbol"?e:e+""}function je(r){"@babel/helpers - typeof";return je=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},je(r)}function Ks(r,e){if(r){if(typeof r=="string")return Ds(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ds(r,e):void 0}}var Qe=typeof window>"u"?null:window,Co=Qe?Qe.navigator:null;Qe&&Qe.document;var vc=je(""),jl=je({}),fc=je(function(){}),cc=typeof HTMLElement>"u"?"undefined":je(HTMLElement),La=function(e){return e&&e.instanceString&&He(e.instanceString)?e.instanceString():null},he=function(e){return e!=null&&je(e)==vc},He=function(e){return e!=null&&je(e)===fc},Fe=function(e){return!Tr(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},Me=function(e){return e!=null&&je(e)===jl&&!Fe(e)&&e.constructor===Object},dc=function(e){return e!=null&&je(e)===jl},ae=function(e){return e!=null&&je(e)===je(1)&&!isNaN(e)},ev=function(e){return ae(e)&&Math.floor(e)===e},mn=function(e){if(cc!=="undefined")return e!=null&&e instanceof HTMLElement},Tr=function(e){return Ia(e)||rv(e)},Ia=function(e){return La(e)==="collection"&&e._private.single},rv=function(e){return La(e)==="collection"&&!e._private.single},Xs=function(e){return La(e)==="core"},tv=function(e){return La(e)==="stylesheet"},hc=function(e){return La(e)==="event"},st=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},gc=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},pc=function(e){return Me(e)&&ae(e.x1)&&ae(e.x2)&&ae(e.y1)&&ae(e.y2)},yc=function(e){return dc(e)&&He(e.then)},mc=function(){return Co&&Co.userAgent.match(/msie|trident|edge/i)},Yt=function(e,t){t||(t=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],s=0;s<arguments.length;s++)i.push(arguments[s]);return i.join("$")});var a=function(){var i=this,s=arguments,o,u=t.apply(i,s),l=a.cache;return(o=l[u])||(o=l[u]=e.apply(i,s)),o};return a.cache={},a},Ys=Yt(function(r){return r.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),Rn=Yt(function(r){return r.replace(/(-\w)/g,function(e){return e[1].toUpperCase()})}),av=Yt(function(r,e){return r+e[0].toUpperCase()+e.substring(1)},function(r,e){return r+"$"+e}),To=function(e){return st(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},rt=function(e,t){return e.slice(-1*t.length)===t},Je="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",bc="rgb[a]?\\(("+Je+"[%]?)\\s*,\\s*("+Je+"[%]?)\\s*,\\s*("+Je+"[%]?)(?:\\s*,\\s*("+Je+"))?\\)",wc="rgb[a]?\\((?:"+Je+"[%]?)\\s*,\\s*(?:"+Je+"[%]?)\\s*,\\s*(?:"+Je+"[%]?)(?:\\s*,\\s*(?:"+Je+"))?\\)",xc="hsl[a]?\\(("+Je+")\\s*,\\s*("+Je+"[%])\\s*,\\s*("+Je+"[%])(?:\\s*,\\s*("+Je+"))?\\)",Ec="hsl[a]?\\((?:"+Je+")\\s*,\\s*(?:"+Je+"[%])\\s*,\\s*(?:"+Je+"[%])(?:\\s*,\\s*(?:"+Je+"))?\\)",Cc="\\#[0-9a-fA-F]{3}",Tc="\\#[0-9a-fA-F]{6}",nv=function(e,t){return e<t?-1:e>t?1:0},Sc=function(e,t){return-1*nv(e,t)},me=Object.assign!=null?Object.assign.bind(Object):function(r){for(var e=arguments,t=1;t<e.length;t++){var a=e[t];if(a!=null)for(var n=Object.keys(a),i=0;i<n.length;i++){var s=n[i];r[s]=a[s]}}return r},kc=function(e){if(!(!(e.length===4||e.length===7)||e[0]!=="#")){var t=e.length===4,a,n,i,s=16;return t?(a=parseInt(e[1]+e[1],s),n=parseInt(e[2]+e[2],s),i=parseInt(e[3]+e[3],s)):(a=parseInt(e[1]+e[2],s),n=parseInt(e[3]+e[4],s),i=parseInt(e[5]+e[6],s)),[a,n,i]}},Dc=function(e){var t,a,n,i,s,o,u,l;function v(d,y,g){return g<0&&(g+=1),g>1&&(g-=1),g<1/6?d+(y-d)*6*g:g<1/2?y:g<2/3?d+(y-d)*(2/3-g)*6:d}var f=new RegExp("^"+xc+"$").exec(e);if(f){if(a=parseInt(f[1]),a<0?a=(360- -1*a%360)%360:a>360&&(a=a%360),a/=360,n=parseFloat(f[2]),n<0||n>100||(n=n/100,i=parseFloat(f[3]),i<0||i>100)||(i=i/100,s=f[4],s!==void 0&&(s=parseFloat(s),s<0||s>1)))return;if(n===0)o=u=l=Math.round(i*255);else{var c=i<.5?i*(1+n):i+n-i*n,h=2*i-c;o=Math.round(255*v(h,c,a+1/3)),u=Math.round(255*v(h,c,a)),l=Math.round(255*v(h,c,a-1/3))}t=[o,u,l,s]}return t},Bc=function(e){var t,a=new RegExp("^"+bc+"$").exec(e);if(a){t=[];for(var n=[],i=1;i<=3;i++){var s=a[i];if(s[s.length-1]==="%"&&(n[i]=!0),s=parseFloat(s),n[i]&&(s=s/100*255),s<0||s>255)return;t.push(Math.floor(s))}var o=n[1]||n[2]||n[3],u=n[1]&&n[2]&&n[3];if(o&&!u)return;var l=a[4];if(l!==void 0){if(l=parseFloat(l),l<0||l>1)re Line truncated
Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable
Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com)
Licensed under The MIT License (http://opensource.org/licenses/MIT)
*/var Pv=0,Av=1,Rv=2,Nr=function(e){if(!(this instanceof Nr))return new Nr(e);this.id="Thenable/1.0.7",this.state=Pv,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};Nr.prototype={fulfill:function(e){return iu(this,Av,"fulfillValue",e)},reject:function(e){return iu(this,Rv,"rejectReason",e)},then:function(e,t){var a=this,n=new Nr;return a.onFulfilled.push(ou(e,n,"fulfill")),a.onRejected.push(ou(t,n,"reject")),Mv(a),n.proxy}};var iu=function(e,t,a,n){return e.state===Pv&&(e.state=t,e[a]=n,Mv(e)),e},Mv=function(e){e.state===Av?su(e,"onFulfilled",e.fulfillValue):e.state===Rv&&su(e,"onRejected",e.rejectReason)},su=function(e,t,a){if(e[t].length!==0){var n=e[t];e[t]=[];var i=function(){for(var o=0;o<n.length;o++)n[o](a)};typeof setImmediate=="function"?setImmediate(i):setTimeout(i,0)}},ou=function(e,t,a){return function(n){if(typeof e!="function")t[a].call(t,n);else{var i;try{i=e(n)}catch(s){t.reject(s);return}Lv(t,i)}}},Lv=function(e,t){if(e===t||e.proxy===t){e.reject(new TypeError("cannot resolve promise with itself"));return}var a;if(je(t)==="object"&&t!==null||typeof t=="function")try{a=t.then}catch(i){e.reject(i);return}if(typeof a=="function"){var n=!1;try{a.call(t,function(i){n||(n=!0,i===t?e.reject(new TypeError("circular thenable chain")):Lv(e,i))},function(i){n||(n=!0,e.reject(i))})}catch(i){n||e.reject(i)}return}e.fulfill(t)};Nr.all=function(r){return new Nr(function(e,t){for(var a=new Array(r.length),n=0,i=function(u,l){a[u]=l,n++,n===r.length&&e(a)},s=0;s<r.length;s++)(function(o){var u=r[o],l=u!=null&&u.then!=null;if(l)u.then(function(f){i(o,f)},function(f){t(f)});else{var v=u;i(o,v)}})(s)})};Nr.resolve=function(r){return new Nr(function(e,t){e(r)})};Nr.reject=function(r){return new Nr(function(e,t){t(r)})};var ta=typeof Promise<"u"?Promise:Nr,Ls=function(e,t,a){var n=Xs(e),i=!n,s=this._private=me({duration:1e3},t,a);if(s.target=e,s.style=s.style||s.css,s.started=!1,s.playing=!1,s.hooked=!1,s.applying=!1,s.progress=0,s.completes=[],s.frames=[],s.complete&&He(s.complete)&&s.completes.push(s.complete),i){var o=e.position();s.startPosition=s.startPosition||{x:o.x,y:o.y},s.startStyle=s.startStyle||e.cy().style().getAnimationStartStyle(e,s.style)}if(n){var u=e.pan();s.startPan={x:u.x,y:u.y},s.startZoom=e.zoom()}this.length=1,this[0]=this},Dt=Ls.prototype;me(Dt,{instanceString:function(){return"animation"},hook:function(){var e=this._private;if(!e.hooked){var t,a=e.target._private.animation;e.queue?t=a.queue:t=a.current,t.push(this),Tr(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0}return this},play:function(){var e=this._private;return e.progress===1&&(e.progress=0),e.playing=!0,e.started=!1,e.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var e=this._private;return e.applying=!0,e.started=!1,e.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var e=this._private;return e.playing=!1,e.started=!1,this},stop:function(){var e=this._private;return e.playing=!1,e.started=!1,e.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(e){var t=this._private;return e===void 0?t.progress*t.duration:this.progress(e/t.duration)},progress:function(e){var t=this._private,a=t.playing;return e===void 0?t.progress:(a&&this.pause(),t.progress=e,t.started=!1,a&&this.play(),this)},completed:function(){return this._private.progress===1},reverse:function(){var e=this._private,t=e.playing;t&&this.pause(),e.progress=1-e.progress,e.started=!1;var a=function(l,v){var f=e[l];f!=null&&(e[l]=e[v],e[v]=f)};if(a("zoom","startZoom"),a("pan","startPan"),a("position","startPosition"),e.style)for(var n=0;n<e.style.length;n++){var i=e.style[n],s=i.name,o=e.startStyle[s];e.startStyle[s]=i,e.style[n]=o}return t&&this.play(),this},promise:function(e){var t=this._private,a;switch(e){case"frame":a=t.frames;break;default:case"complete":case"completed":a=t.completes}return new ta(function(n,i){a.push(function(){n()})})}});Dt.complete=Dt.completed;Dt.run=Dt.play;Dt.running=Dt.playing;var Lh={animated:function(){return function(){var t=this,a=t.length!==void 0,n=a?t:[t],i=this._private.cy||this;if(!i.styleEnabled())return!1;var s=n[0];if(s)return s._private.animation.current.length>0}},clearQueue:function(){return function(){var t=this,a=t.length!==void 0,n=a?t:[t],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var s=0;s<n.length;s++){var o=n[s];o._private.animation.queue=[]}return this}},delay:function(){return function(t,a){var n=this._private.cy||this;return n.styleEnabled()?this.animate({delay:t,duration:t,complete:a}):this}},delayAnimation:function(){return function(t,a){var n=this._private.cy||this;return n.styleEnabled()?this.animation({delay:t,duration:t,complete:a}):this}},animation:functLine truncated
Event object based on jQuery events, MIT license
https://jquery.org/license/
https://tldrlegal.com/license/mit-license
https://github.com/jquery/jquery/blob/master/src/event.js
*/var Yv=function(e,t){this.recycle(e,t)};function ca(){return!1}function ja(){return!0}Yv.prototype={instanceString:function(){return"event"},recycle:function(e,t){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=ca,e!=null&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?ja:ca):e!=null&&e.type?t=e:this.type=e,t!=null&&(this.originalEvent=t.originalEvent,this.type=t.type!=null?t.type:this.type,this.cy=t.cy,this.target=t.target,this.position=t.position,this.renderedPosition=t.renderedPosition,this.namespace=t.namespace,this.layout=t.layout),this.cy!=null&&this.position!=null&&this.renderedPosition==null){var a=this.position,n=this.cy.zoom(),i=this.cy.pan();this.renderedPosition={x:a.x*n+i.x,y:a.y*n+i.y}}this.timeStamp=e&&e.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=ja;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.isPropagationStopped=ja;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ja,this.stopPropagation()},isDefaultPrevented:ca,isPropagationStopped:ca,isImmediatePropagationStopped:ca};var Zv=/^([^.]+)(\.(?:[^.]+))?$/,up=".*",Qv={qualifierCompare:function(e,t){return e===t},eventMatches:function(){return!0},addEventFields:function(){},callbackContext:function(e){return e},beforeEmit:function(){},afterEmit:function(){},bubble:function(){return!1},parent:function(){return null},context:null},fl=Object.keys(Qv),lp={};function _n(){for(var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:lp,e=arguments.length>1?arguments[1]:void 0,t=0;t<fl.length;t++){var a=fl[t];this[a]=r[a]||Qv[a]}this.context=e||this.context,this.listeners=[],this.emitting=0}var ft=_n.prototype,Jv=function(e,t,a,n,i,s,o){He(n)&&(i=n,n=null),o&&(s==null?s=o:s=me({},s,o));for(var u=Fe(a)?a:a.split(/\s+/),l=0;l<u.length;l++){var v=u[l];if(!st(v)){var f=v.match(Zv);if(f){var c=f[1],h=f[2]?f[2]:null,d=t(e,v,c,h,n,i,s);if(d===!1)break}}}},cl=function(e,t){return e.addEventFields(e.context,t),new Yv(t.type,t)},vp=function(e,t,a){if(hc(a)){t(e,a);return}else if(Me(a)){t(e,cl(e,a));return}for(var n=Fe(a)?a:a.split(/\s+/),i=0;i<n.length;i++){var s=n[i];if(!st(s)){var o=s.match(Zv);if(o){var u=o[1],l=o[2]?o[2]:null,v=cl(e,{type:u,namespace:l,target:e.context});t(e,v)}}}};ft.on=ft.addListener=function(r,e,t,a,n){return Jv(this,function(i,s,o,u,l,v,f){He(v)&&i.listeners.push({event:s,callback:v,type:o,namespace:u,qualifier:l,conf:f})},r,e,t,a,n),this};ft.one=function(r,e,t,a){return this.on(r,e,t,a,{one:!0})};ft.removeListener=ft.off=function(r,e,t,a){var n=this;this.emitting!==0&&(this.listeners=Zc(this.listeners));for(var i=this.listeners,s=function(l){var v=i[l];Jv(n,function(f,c,h,d,y,g){if((v.type===h||r==="*")&&(!d&&v.namespace!==".*"||v.namespace===d)&&(!y||f.qualifierCompare(v.qualifier,y))&&(!g||v.callback===g))return i.splice(l,1),!1},r,e,t,a)},o=i.length-1;o>=0;o--)s(o);return this};ft.removeAllListeners=function(){return this.removeListener("*")};ft.emit=ft.trigger=function(r,e,t){var a=this.listeners,n=a.length;return this.emitting++,Fe(e)||(e=[e]),vp(this,function(i,s){t!=null&&(a=[{event:s.event,type:s.type,namespace:s.namespace,callback:t}],n=a.length);for(var o=function(){var v=a[u];if(v.type===s.type&&(!v.namespace||v.namespace===s.namespace||v.namespace===up)&&i.eventMatches(i.context,v,s)){var f=[s];e!=null&&Jc(f,e),i.beforeEmit(i.context,v,s),v.conf&&v.conf.one&&(i.listeners=i.listeners.filter(function(d){return d!==v}));var c=i.callbackContext(i.context,v,s),h=v.callback.apply(c,f);i.afterEmit(i.context,v,s),h===!1&&(s.stopPropagation(),s.preventDefault())}},u=0;u<n;u++)o();i.bubble(i.context)&&!s.isPropagationStopped()&&i.parent(i.context).emit(s,e)},r),this.emitting--,this};var fp={qualifierCompare:function(e,t){return e==null||t==null?e==null&&t==null:e.sameText(t)},eventMatches:function(e,t,a){var n=t.qualifier;return n!=null?e!==a.target&&Ia(a.target)&&n.matches(a.target):!0},addEventFields:function(e,t){t.cy=e.cy(),t.target=e},callbackContext:function(e,t,a){return t.qualifier!=null?a.target:e},beforeEmit:function(e,t){t.conf&&t.conf.once&&t.conf.onceCollection.removeListener(t.event,t.qualifier,t.callback)},bubble:function(){return!0},parent:function(e){return e.isChild()?e.parent():e.cy()}},en=function(e){return he(e)?new lt(e):e},jv={createEmitter:function(){for(var e=0;e<this.length;e++){var t=this[e],a=t._private;a.emitter||(a.emitter=new _n(fp,t))}return this},emitter:function(){return this._private.emitter},on:function(e,t,a){for(var n=en(t),i=0;i<this.length;i++){var s=this[i];s.emitter().on(e,n,a)}return this},removeListener:function(e,t,a){for(var n=en(t),i=0;i<this.length;i++){var s=this[i];s.emitter().removeListener(e,n,a)}return this},removeAllListeners:function(){for(var e=0;e<this.length;e++){var t=this[e];t.emitter().removeAllListeners()}return this},one:functioLine truncated
`),f=r.pstyle("text-max-width").pfValue,c=r.pstyle("text-overflow-wrap").value,h=c==="anywhere",d=[],y=/[\s\u200b]+|$/g,g=0;g<v.length;g++){var p=v[g],m=this.calculateLabelDimensions(r,p),b=m.width;if(h){var w=p.split("").join(l);p=w}if(b>f){var E=p.matchAll(y),C="",x=0,T=Cr(E),k;try{for(T.s();!(k=T.n()).done;){var B=k.value,D=B[0],P=p.substring(x,B.index);x=B.index+D.length;var A=C.length===0?P:C+P+D,R=this.calculateLabelDimensions(r,A),L=R.width;L<=f?C+=P+D:(C&&d.push(C),C=P+D)}}catch(q){T.e(q)}finally{T.f()}C.match(/^[\s\u200b]+$/)||d.push(C)}else d.push(p)}s("labelWrapCachedLines",d),n=s("labelWrapCachedText",d.join(`
`)),s("labelWrapKey",u)}else if(o==="ellipsis"){var I=r.pstyle("text-max-width").pfValue,M="",N="…",F=!1;if(this.calculateLabelDimensions(r,n).width<I)return n;for(var _=0;_<n.length;_++){var z=this.calculateLabelDimensions(r,M+n[_]+N).width;if(z>I)break;M+=n[_],_===n.length-1&&(F=!0)}return F||(M+=N),M}return n};Hr.getLabelJustification=function(r){var e=r.pstyle("text-justification").strValue,t=r.pstyle("text-halign").strValue;return e==="auto"?r.isNode()?Ug(t):"center":e};Hr.calculateLabelDimensions=function(r,e){var t=this,a=t.cy.window(),n=a.document,i=0,s=r.pstyle("font-style").strValue,o=r.pstyle("font-size").pfValue,u=r.pstyle("font-family").strValue,l=r.pstyle("font-weight").strValue,v=r.pstyle("text-metrics").strValue||"font",f=this.labelCalcCanvas,c=this.labelCalcCanvasContext;if(!f){f=this.labelCalcCanvas=n.createElement("canvas"),c=this.labelCalcCanvasContext=f.getContext("2d");var h=f.style;h.position="absolute",h.left="-9999px",h.top="-9999px",h.zIndex="-1",h.visibility="hidden",h.pointerEvents="none"}c.font="".concat(s," ").concat(l," ").concat(o,"px ").concat(u);for(var d=0,y=0,g=e.split(`
`),p=g.length,m=0,b=0,w=0;w<p;w++){var E=g[w],C=c.measureText(E),x=Math.ceil(C.width),T=o;v==="glyph"&&(w===0&&(b=C.actualBoundingBoxAscent),w===p-1&&(m=C.actualBoundingBoxDescent)),d=Math.max(x,d),y+=T}return v==="glyph"&&(y-=o-b-m),d+=i,y+=i,{width:d,height:y,labelActualAscent:b,labelActualDescent:m}};Hr.calculateLabelAngle=function(r,e){var t=r._private,a=t.rscratch,n=r.isEdge(),i=e?e+"-":"",s=r.pstyle(i+"text-rotation"),o=s.strValue;return o==="none"?0:n&&o==="autorotate"?a.labelAutoAngle:o==="autorotate"?0:s.pfValue};Hr.calculateLabelAngles=function(r){var e=this,t=r.isEdge(),a=r._private,n=a.rscratch;n.labelAngle=e.calculateLabelAngle(r),t&&(n.sourceLabelAngle=e.calculateLabelAngle(r,"source"),n.targetLabelAngle=e.calculateLabelAngle(r,"target"))};var xf={},Ml=28,Ll=!1;xf.getNodeShape=function(r){var e=this,t=r.pstyle("shape").value;if(t==="cutrectangle"&&(r.width()<Ml||r.height()<Ml))return Ll||(Ne("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),Ll=!0),"rectangle";if(r.isParent())return t==="rectangle"||t==="roundrectangle"||t==="round-rectangle"||t==="cutrectangle"||t==="cut-rectangle"||t==="barrel"?t:"rectangle";if(t==="polygon"){var a=r.pstyle("shape-polygon-points").value;return e.nodeShapes.makePolygon(a).name}return t};var Kn={};Kn.registerCalculationListeners=function(){var r=this.cy,e=r.collection(),t=this,a=function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(s),o)for(var u=0;u<s.length;u++){var l=s[u],v=l._private,f=v.rstyle;f.clean=!1,f.cleanConnected=!1}};t.binder(r).on("bounds.* dirty.*",function(s){var o=s.target;a(o)}).on("style.* background.*",function(s){var o=s.target;a(o,!1)});var n=function(s){if(s){var o=t.onUpdateEleCalcsFns;e.cleanStyle();for(var u=0;u<e.length;u++){var l=e[u],v=l._private.rstyle;l.isNode()&&!v.cleanConnected&&(a(l.connectedEdges()),v.cleanConnected=!0)}if(o)for(var f=0;f<o.length;f++){var c=o[f];c(s,e)}t.recalculateRenderedStyle(e),e=r.collection()}};t.flushRenderedStyleQueue=function(){n(!0)},t.beforeRender(n,t.beforeRenderPriorities.eleCalcs)};Kn.onUpdateEleCalcs=function(r){var e=this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[];e.push(r)};Kn.recalculateRenderedStyle=function(r,e){var t=function(w){return w._private.rstyle.cleanConnected};if(r.length!==0){var a=[],n=[];if(!this.destroyed){e===void 0&&(e=!0);for(var i=0;i<r.length;i++){var s=r[i],o=s._private,u=o.rstyle;s.isEdge()&&(!t(s.source())||!t(s.target()))&&(u.clean=!1),s.isEdge()&&s.isBundledBezier()&&s.parallelEdges().some(function(b){return!b._private.rstyle.clean&&b.isBundledBezier()})&&(u.clean=!1),!(e&&u.clean||s.removed())&&s.pstyle("display").value!=="none"&&(o.group==="nodes"?n.push(s):a.push(s),u.clean=!0)}for(var l=0;l<n.length;l++){var v=n[l],f=v._private,c=f.rstyle,h=v.position();this.recalculateNodeLabelProjection(v),c.nodeX=h.x,c.nodeY=h.y,c.nodeW=v.pstyle("width").pfValue,c.nodeH=v.pstyle("height").pfValue}this.recalculateEdgeProjections(a);for(var d=0;d<a.length;d++){var y=a[d],g=y._private,p=g.rstyle,m=g.rscratch;p.srcX=m.arrowStartX,p.srcY=m.arrowStartY,p.tgtX=m.arrowEndX,p.tgtY=m.arrowEndY,p.midX=m.midX,p.midY=m.midY,p.labelAngle=m.labelAngle,p.sourceLabelAngle=m.sourceLabelAngle,p.targetLabelAngle=m.targetLabelAngle}}}};var Xn={};Xn.updateCachedGrabbedEles=function(){var r=this.cachedZSortedEles;if(r){r.drag=[],r.nondrag=[];for(var e=[],t=0;t<r.length;t++){var a=r[t],n=a._private.rscratch;a.grabbed()&&!a.isParent()?e.push(a):n.inDragLayer?r.drag.push(a):r.nondrag.push(a)}for(var t=0;t<e.length;t++){var a=e[t];r.drag.push(a)}}};Xn.invalidateCachedZSortedEles=function(){this.cachedZSortedEles=null};Xn.getCachedZSortedEles=function(r){if(r||!this.cachedZSortedEles){var e=this.cy.mutableElements().toArray();e.sort(rf),e.interactive=e.filter(function(t){return t.interactive()}),this.cachedZSortedEles=e,this.updateCachedGrabbedEles()}else e=this.cachedZSortedEles;return e};var Ef={};[At,Dn,hr,Ga,po,Hr,xf,Kn,Xn].forEach(function(r){me(Ef,r)});var Cf={};Cf.getCachedImage=function(r,e,t){var a=this,n=a.imageCache=a.imageCache||{},i=n[r];if(i)return i.image.complete||i.image.addEventListener("load",t),i.image;i=n[r]=n[r]||{};var s=i.image=new Image;s.addEventListener("load",t),s.addEventListener("error",function(){s.error=!0});var o="data:",u=r.substring(0,o.length).toLowerCase()===o;return u||(e=e==="null"?null:e,s.crossOrigin=e),s.src=r,s};var Tf=function(e,t){var a=e[0];!a||a._private.grabbed===t||(a._private.grabbed=t,e.updateStyle(!1))},sy=function(e){Tf(e,!0)},oy=function(e){Tf(e,!1)},ia={};ia.registerBinding=function(r,e,t,a){var n=Array.prototype.slice.apply(arguments,[1]);if(Array.isArray(r)){for(var i=[],s=0;s<r.length;s++){var o=r[s];if(o!==void 0){var u=this.binder(o);i.push(u.on.apply(u,n))}}return i}var u=this.binder(r);return u.on.apply(u,n)};ia.binder=function(r){var e=this,t=e.cy.window(),a=r===t||r===t.document||r===t.document.body||gc(r);if(e.supportsPassiveEvents==null){var n=!1;try{va Line truncated
float circleSD(vec2 p, float r) {
return distance(vec2(0), p) - r; // signed distance
}
`,dm=`
float rectangleSD(vec2 p, vec2 b) {
vec2 d = abs(p)-b;
return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0);
}
`,hm=`
float roundRectangleSD(vec2 p, vec2 b, vec4 cr) {
cr.xy = (p.x > 0.0) ? cr.xy : cr.zw;
cr.x = (p.y > 0.0) ? cr.x : cr.y;
vec2 q = abs(p) - b + cr.x;
return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x;
}
`,gm=`
float ellipseSD(vec2 p, vec2 ab) {
p = abs( p ); // symmetry
// find root with Newton solver
vec2 q = ab*(p-ab);
float w = (q.x<q.y)? 1.570796327 : 0.0;
for( int i=0; i<5; i++ ) {
vec2 cs = vec2(cos(w),sin(w));
vec2 u = ab*vec2( cs.x,cs.y);
vec2 v = ab*vec2(-cs.y,cs.x);
w = w + dot(p-u,v)/(dot(p-u,u)+dot(v,v));
}
// compute final point and distance
float d = length(p-ab*vec2(cos(w),sin(w)));
// return signed distance
return (dot(p/ab,p/ab)>1.0) ? d : -d;
}
`,Ea={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},Pn={IGNORE:1,USE_BB:2},Es=0,Ul=1,Kl=2,Cs=3,Vt=4,nn=5,ga=6,pa=7,pm=function(){function r(e,t,a){ct(this,r),this.r=e,this.gl=t,this.maxInstances=a.webglBatchSize,this.atlasSize=a.webglTexSize,this.bgColor=a.bgColor,this.debug=a.webglDebug,this.batchDebugInfo=[],a.enableWrapping=!0,a.createTextureCanvas=Xy,this.atlasManager=new vm(e,a),this.batchManager=new fm(a),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(Ea.SCREEN),this.pickingProgram=this._createShaderProgram(Ea.PICKING),this.vao=this._createVAO()}return dt(r,[{key:"addAtlasCollection",value:function(t,a){this.atlasManager.addAtlasCollection(t,a)}},{key:"addTextureAtlasRenderType",value:function(t,a){this.atlasManager.addRenderType(t,a)}},{key:"addSimpleShapeRenderType",value:function(t,a){this.simpleShapeOptions.set(t,a)}},{key:"invalidate",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=a.type,i=this.atlasManager;return n?i.invalidate(t,{filterType:function(o){return o===n},forceRedraw:!0}):i.invalidate(t)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"_createShaderProgram",value:function(t){var a=this.gl,n=`#version 300 es
precision highp float;
uniform mat3 uPanZoomMatrix;
uniform int uAtlasSize;
// instanced
in vec2 aPosition; // a vertex from the unit square
in mat3 aTransform; // used to transform verticies, eg into a bounding box
in int aVertType; // the type of thing we are rendering
// the z-index that is output when using picking mode
in vec4 aIndex;
// For textures
in int aAtlasId; // which shader unit/atlas to use
in vec4 aTex; // x/y/w/h of texture in atlas
// for edges
in vec4 aPointAPointB;
in vec4 aPointCPointD;
in vec2 aLineWidth; // also used for node border width
// simple shapes
in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left]
in vec4 aColor; // also used for edges
in vec4 aBorderColor; // aLineWidth is used for border width
// output values passed to the fragment shader
out vec2 vTexCoord;
out vec4 vColor;
out vec2 vPosition;
// flat values are not interpolated
flat out int vAtlasId;
flat out int vVertType;
flat out vec2 vTopRight;
flat out vec2 vBotLeft;
flat out vec4 vCornerRadius;
flat out vec4 vBorderColor;
flat out vec2 vBorderWidth;
flat out vec4 vIndex;
void main(void) {
int vid = gl_VertexID;
vec2 position = aPosition; // TODO make this a vec3, simplifies some code below
if(aVertType == `.concat(Es,`) {
float texX = aTex.x; // texture coordinates
float texY = aTex.y;
float texW = aTex.z;
float texH = aTex.w;
if(vid == 1 || vid == 2 || vid == 4) {
texX += texW;
}
if(vid == 2 || vid == 4 || vid == 5) {
texY += texH;
}
float d = float(uAtlasSize);
vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
}
else if(aVertType == `).concat(Vt," || aVertType == ").concat(pa,`
|| aVertType == `).concat(nn," || aVertType == ").concat(ga,`) { // simple shapes
// the bounding box is needed by the fragment shader
vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat
vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat
vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated
// calculations are done in the fragment shader, just pass these along
vColor = aColor;
vCornerRadius = aCornerRadius;
vBorderColor = aBorderColor;
vBorderWidth = aLineWidth;
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
}
else if(aVertType == `).concat(Ul,`) {
vec2 source = aPointAPointB.xy;
vec2 target = aPointAPointB.zw;
// adjust the geometry so that the line is centered on the edge
position.y = position.y - 0.5;
// stretch the unit square into a long skinny rectangle
vec2 xBasis = target - source;
vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x));
vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y;
gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0);
vColor = aColor;
}
else if(aVertType == `).concat(Kl,`) {
vec2 pointA = aPointAPointB.xy;
vec2 pointB = aPointAPointB.zw;
vec2 pointC = aPointCPointD.xy;
vec2 pointD = aPointCPointD.zw;
// adjust the geometry so that the line is centered on the edge
position.y = position.y - 0.5;
vec2 p0, p1, p2, pos;
if(position.x == 0.0) { // The left side of the unit square
p0 = pointA;
p1 = pointB;
p2 = pointC;
pos = position;
} else { // The right side of the unit square, use same approach but flip the geometry upside down
p0 = pointD;
p1 = pointC;
p2 = pointB;
pos = vec2(0.0, -position.y);
}
vec2 p01 = p1 - p0;
vec2 p12 = p2 - p1;
vec2 p21 = p1 - p2;
// Find the normal vector.
vec2 tangent = normalize(normalize(p12) + normalize(p01));
vec2 normal = vec2(-tangent.y, tangent.x);
// Find the vector perpendicular to p0 -> p1.
vec2 p01Norm = normalize(vec2(-p01.y, p01.x));
// Determine the bend direction.
float sigma = sign(dot(p01 + p21, normal));
float width = aLineWidth[0];
if(sign(pos.y) == -sigma) {
// This is an intersecting vertex. Adjust the position so that there's no overlap.
vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm);
gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);
} else {
// This is a non-intersecting vertex. Treat it like a mitre join.
vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm);
gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);
}
vColor = aColor;
}
else if(aVertType == `).concat(Cs,` && vid < 3) {
// massage the first triangle into an edge arrow
if(vid == 0)
position = vec2(-0.15, -0.3);
if(vid == 1)
position = vec2( 0.0, 0.0);
if(vid == 2)
position = vec2( 0.15, -0.3);
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
vColor = aColor;
}
else {
gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space
}
vAtlasId = aAtlasId;
vVertType = aVertType;
vIndex = aIndex;
}
`),i=this.batchManager.getIndexArray(),s=`#version 300 es
precision highp float;
// declare texture unit for each texture atlas in the batch
`.concat(i.map(function(l){return"uniform sampler2D uTexture".concat(l,";")}).join(`
`),`
uniform vec4 uBGColor;
uniform float uZoom;
in vec2 vTexCoord;
in vec4 vColor;
in vec2 vPosition; // model coordinates
flat in int vAtlasId;
flat in vec4 vIndex;
flat in int vVertType;
flat in vec2 vTopRight;
flat in vec2 vBotLeft;
flat in vec4 vCornerRadius;
flat in vec4 vBorderColor;
flat in vec2 vBorderWidth;
out vec4 outColor;
`).concat(cm,`
`).concat(dm,`
`).concat(hm,`
`).concat(gm,`
vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha
return vec4(
top.rgb + (bot.rgb * (1.0 - top.a)),
top.a + (bot.a * (1.0 - top.a))
);
}
vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance
// scale to the zoom level so that borders don't look blurry when zoomed in
// note 1.5 is an aribitrary value chosen because it looks good
return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d)));
}
void main(void) {
if(vVertType == `).concat(Es,`) {
// look up the texel from the texture unit
`).concat(i.map(function(l){return"if(vAtlasId == ".concat(l,") outColor = texture(uTexture").concat(l,", vTexCoord);")}).join(`
else `),`
}
else if(vVertType == `).concat(Cs,`) {
// mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out';
outColor = blend(vColor, uBGColor);
outColor.a = 1.0; // make opaque, masks out line under arrow
}
else if(vVertType == `).concat(Vt,` && vBorderWidth == vec2(0.0)) { // simple rectangle with no border
outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done
}
else if(vVertType == `).concat(Vt," || vVertType == ").concat(pa,`
|| vVertType == `).concat(nn," || vVertType == ").concat(ga,`) { // use SDF
float outerBorder = vBorderWidth[0];
float innerBorder = vBorderWidth[1];
float borderPadding = outerBorder * 2.0;
float w = vTopRight.x - vBotLeft.x - borderPadding;
float h = vTopRight.y - vBotLeft.y - borderPadding;
vec2 b = vec2(w/2.0, h/2.0); // half width, half height
vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center
float d; // signed distance
if(vVertType == `).concat(Vt,`) {
d = rectangleSD(p, b);
} else if(vVertType == `).concat(pa,` && w == h) {
d = circleSD(p, b.x); // faster than ellipse
} else if(vVertType == `).concat(pa,`) {
d = ellipseSD(p, b);
} else {
d = roundRectangleSD(p, b, vCornerRadius.wzyx);
}
// use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling
// we must smooth colors inwards, because we can't change pixels outside the shape's bounding box
if(d > 0.0) {
if(d > outerBorder) {
discard;
} else {
outColor = distInterp(vBorderColor, vec4(0), d - outerBorder);
}
} else {
if(d > innerBorder) {
vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor;
vec4 innerBorderColor = blend(vBorderColor, vColor);
outColor = distInterp(innerBorderColor, outerColor, d);
}
else {
vec4 outerColor;
if(innerBorder == 0.0 && outerBorder == 0.0) {
outerColor = vec4(0);
} else if(innerBorder == 0.0) {
outerColor = vBorderColor;
} else {
outerColor = blend(vBorderColor, vColor);
}
outColor = distInterp(vColor, outerColor, d - innerBorder);
}
}
}
else {
outColor = vColor;
}
`).concat(t.picking?`if(outColor.a == 0.0) discard;
else outColor = vIndex;`:"",`
}
`),o=Ky(a,n,s);o.aPosition=a.getAttribLocation(o,"aPosition"),o.aIndex=a.getAttribLocation(o,"aIndex"),o.aVertType=a.getAttribLocation(o,"aVertType"),o.aTransform=a.getAttribLocation(o,"aTransform"),o.aAtlasId=a.getAttribLocation(o,"aAtlasId"),o.aTex=a.getAttribLocation(o,"aTex"),o.aPointAPointB=a.getAttribLocation(o,"aPointAPointB"),o.aPointCPointD=a.getAttribLocation(o,"aPointCPointD"),o.aLineWidth=a.getAttribLocation(o,"aLineWidth"),o.aColor=a.getAttribLocation(o,"aColor"),o.aCornerRadius=a.getAttribLocation(o,"aCornerRadius"),o.aBorderColor=a.getAttribLocation(o,"aBorderColor"),o.uPanZoomMatrix=a.getUniformLocation(o,"uPanZoomMatrix"),o.uAtlasSize=a.getUniformLocation(o,"uAtlasSize"),o.uBGColor=a.getUniformLocation(o,"uBGColor"),o.uZoom=a.getUniformLocation(o,"uZoom"),o.uTextures=[];for(var u=0;u<this.batchManager.getMaxAtlasesPerBatch();u++)o.uTextures.push(a.getUniformLocation(o,"uTexture".concat(u)));return o}},{key:"_createVAO",value:function(){var t=[0,0,1,0,1,1,0,0,1,1,0,1];this.vertexCount=t.length/2;var a=this.maxInstances,n=this.gl,i=this.program,s=n.createVertexArray();return n.bindVertexArray(s),tm(n,"vec2",i.aPosition,t),this.transformBuffer=am(n,a,i.aTransform),this.indexBuffer=Fr(n,a,"vec4",i.aIndex),this.vertTypeBuffer=Fr(n,a,"int",i.aVertType),this.atlasIdBuffer=Fr(n,a,"int",i.aAtlasId),this.texBuffer=Fr(n,a,"vec4",i.aTex),this.pointAPointBBuffer=Fr(n,a,"vec4",i.aPointAPointB),this.pointCPointDBuffer=Fr(n,a,"vec4",i.aPointCPointD),this.lineWidthBuffer=Fr(n,a,"vec2",i.aLineWidth),this.colorBuffer=Fr(n,a,"vec4",i.aColor),this.cornerRadiusBuffer=Fr(n,a,"vec4",i.aCornerRadius),this.borderColorBuffer=Fr(n,a,"vec4",i.aBorderColor),n.bindVertexArray(null),s}},{key:"buffers",get:function(){var t=this;return this._buffers||(this._buffers=Object.keys(this).filter(function(a){return rt(a,"Buffer")}).map(function(a){return t[a]})),this._buffers}},{key:"startFrame",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ea.SCREEN;this.panZoomMatrix=t,this.renderTarget=a,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(t,a){return t.visible()?a&&a.isVisible?a.isVisible(t):!0:!1}},{key:"drawTexture",value:function(t,a,n){var i=this.atlasManager,s=this.batchManager,o=i.getRenderTypeOpts(n);if(this._isVisible(t,o)&&!(t.isEdge()&&!this._isValidEdge(t))){if(this.renderTarget.picking&&o.getTexPickingMode){var u=o.getTexPickingMode(t);if(u===Pn.IGNORE)return;if(u==Pn.USE_BB){this.drawPickingRectangle(t,a,n);return}}var l=i.getAtlasInfo(t,n),v=Cr(l),f;try{for(v.s();!(f=v.n()).done;){var c=f.value,h=c.atlas,d=c.tex1,y=c.tex2;s.canAddToCurrentBatch(h)||this.endBatch();for(var g=s.getAtlasIndexForBatch(h),p=0,m=[[d,!0],[y,!1]];p<m.length;p++){var b=Xe(m[p],2),w=b[0],E=b[1];if(w.w!=0){var C=this.instanceCount;this.vertTypeBuffer.getView(C)[0]=Es;var x=this.indexBuffer.getView(C);Ft(a,x);var T=this.atlasIdBuffer.getView(C);T[0]=g;var k=this.texBuffer.getView(C);k[0]=w.x,k[1]=w.y,k[2]=w.w,k[3]=w.h;var B=this.transformBuffer.getMatrixView(C);this.setTransformMatrix(t,B,o,c,E),this.instanceCount++,E||this.wrappedCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}catch(D){v.e(D)}finally{v.f()}}}},{key:"setTransformMatrix",value:function(t,a,n,i){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=0;if(n.shapeProps&&n.shapeProps.padding&&(o=t.pstyle(n.shapeProps.padding).pfValue),i){var u=i.bb,l=i.tex1,v=i.tex2,f=l.w/(l.w+v.w);s||(f=1-f);var c=this._getAdjustedBB(u,o,s,f);this._applyTransformMatrix(a,c,n,t)}else{var h=n.getBoundingBox(t),d=this._getAdjustedBB(h,o,!0,1);this._applyTransformMatrix(a,d,n,t)}}},{key:"_applyTransformMatrix",value:function(t,a,n,i){var s,o;Wl(t);var u=n.getRotation?n.getRotation(i):0;if(u!==0){var l=n.getRotationPoint(i),v=l.x,f=l.y;pn(t,t,[v,f]),$l(t,t,u);var c=n.getRotationOffset(i);s=c.x+(a.xOffset||0),o=c.y+(a.yOffset||0)}else s=a.x1,o=a.y1;pn(t,t,[s,o]),Hs(t,t,[a.w,a.h])}},{key:"_getAdjustedBB",value:function(t,a,n,i){var s=t.x1,o=t.y1,u=t.w,l=t.h,v=t.yOffset;a&&(s-=a,o-=a,u+=2*a,l+=2*a);var f=0,c=u*i;return n&&i<1?u=c:!n&&i<1&&(f=u-c,s+=f,u=c),{x1:s,y1:o,w:u,h:l,xOffset:f,yOffset:v}}},{key:"drawPickingRectangle",value:function(t,a,n){var i=this.atlasManager.getRenderTypeOpts(n),s=this.instanceCount;this.vertTypeBuffer.getView(s)[0]=Vt;var o=this.indexBuffer.getView(s);Ft(a,o);var u=this.colorBuffer.getView(s);bt([0,0,0],1,u);var l=this.transformBuffer.getMatrixView(s);this.setTransformMatrix(t,l,i),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(t,a,n){var i=this.simpleShapeOptions.get(n);if(this._isVisible(t,i)){var s=i.shapeProps,o=this._getVertTypeForShape(t,s.shape);if(o===void 0||i.isSimple&&!i.isSimple(t,this.renderTarget)){this.drawTexture(t, Line truncated
+1
View File
@@ -0,0 +1 @@
@font-face{font-family:Oswald;src:url(/build/assets/Oswald-Bold-CHB0NlSS.ttf) format("truetype");font-weight:700;font-style:normal}@font-face{font-family:Oswald;src:url(/build/assets/Oswald-ExtraLight-DU2v8jKc.ttf) format("truetype");font-weight:200;font-style:normal}@font-face{font-family:Oswald;src:url(/build/assets/Oswald-Light-BxipAuXN.ttf) format("truetype");font-weight:300;font-style:normal}@font-face{font-family:Oswald;src:url(/build/assets/Oswald-Medium-UI9DaFIC.ttf) format("truetype");font-weight:500;font-style:normal}@font-face{font-family:Oswald;src:url(/build/assets/Oswald-Regular-CUewnb0h.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:Oswald;src:url(/build/assets/Oswald-SemiBold-BS34gioX.ttf) format("truetype");font-weight:600;font-style:normal}@font-face{font-family:Poppins;src:url(/fonts/static/poppins/Poppins-Black.otf) format("opentype");font-weight:900;font-style:normal}@font-face{font-family:Poppins;src:url(/fonts/static/poppins/Poppins-BlackItalic.otf) format("opentype");font-weight:900;font-style:italic}@font-face{font-family:Poppins;src:url(/fonts/static/poppins/Poppins-Bold.otf) format("opentype");font-weight:700;font-style:normal}@font-face{font-family:Poppins;src:url(/fonts/static/poppins/Poppins-BoldItalic.otf) format("opentype");font-weight:700;font-style:italic}@font-face{font-family:Poppins;src:url(/fonts/static/poppins/Poppins-ExtraBold.otf) format("opentype");font-weight:800;font-style:normal}@font-face{font-family:Poppins;src:url(/fonts/static/poppins/Poppins-ExtraBoldItalic.otf) format("opentype");font-weight:800;font-style:italic}@font-face{font-family:Poppins;src:url(/fonts/static/poppins/Poppins-Italic.otf) format("opentype");font-weight:400;font-style:italic}@font-face{font-family:Poppins;src:url(/fonts/static/poppins/Poppins-Light.otf) format("opentype");font-weight:300;font-style:normal}@font-face{font-family:Poppins;src:url(/fonts/static/poppins/Poppins-LightItalic.otf) format("opentype");font-weight:300;font-style:italic}@font-face{font-family:Poppins;src:url(/fonts/static/poppins/Poppins-ExtraLight.otf) format("opentype");font-weight:200;font-style:normal}@font-face{font-family:Poppins;src:url(/fonts/static/poppins/Poppins-ExtraLightItalic.otf) format("opentype");font-weight:200;font-style:italic}@font-face{font-family:Poppins;src:url(/fonts/static/poppins/Poppins-Medium.otf) format("opentype");font-weight:500;font-style:normal}@font-face{font-family:Poppins;src:url(/fonts/static/poppins/Poppins-MediumItalic.otf) format("opentype");font-weight:500;font-style:italic}@font-face{font-family:Poppins;src:url(/fonts/static/poppins/Poppins-Regular.otf) format("opentype");font-weight:400;font-style:normal}@font-face{font-family:Poppins;src:url(/fonts/static/poppins/Poppins-SemiBold.otf) format("opentype");font-weight:600;font-style:normal}@font-face{font-family:Poppins;src:url(/fonts/static/poppins/Poppins-SemiBoldItalic.otf) format("opentype");font-weight:600;font-style:italic}@font-face{font-family:Poppins;src:url(/fonts/static/poppins/Poppins-Thin.otf) format("opentype");font-weight:100;font-style:normal}@font-face{font-family:Poppins;src:url(/fonts/static/poppins/Poppins-ThinItalic.otf) format("opentype");font-weight:100;font-style:italic}body,h1,h2,h3,h4,h5,h6{font-family:Poppins,sans-serif!important}
+12
View File
@@ -0,0 +1,12 @@
import{c as vt,g as Bt}from"./_commonjsHelpers-Cpj98o6Y.js";function Rt(ct,wt){for(var _=0;_<wt.length;_++){const N=wt[_];if(typeof N!="string"&&!Array.isArray(N)){for(const w in N)if(w!=="default"&&!(w in ct)){const u=Object.getOwnPropertyDescriptor(N,w);u&&Object.defineProperty(ct,w,u.get?u:{enumerable:!0,get:()=>N[w]})}}}return Object.freeze(Object.defineProperty(ct,Symbol.toStringTag,{value:"Module"}))}function yt(ct){throw new Error('Could not dynamically require "'+ct+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var xt={exports:{}};/*!
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
<http://stuartk.com/jszip>
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
JSZip uses the library pako released under the MIT license :
https://github.com/nodeca/pako/blob/main/LICENSE
*/var Ct;function Tt(){return Ct||(Ct=1,function(ct,wt){(function(_){ct.exports=_()})(function(){return function _(N,w,u){function o(g,y){if(!w[g]){if(!N[g]){var p=typeof yt=="function"&&yt;if(!y&&p)return p(g,!0);if(n)return n(g,!0);var b=new Error("Cannot find module '"+g+"'");throw b.code="MODULE_NOT_FOUND",b}var i=w[g]={exports:{}};N[g][0].call(i.exports,function(d){var r=N[g][1][d];return o(r||d)},i,i.exports,_,N,w,u)}return w[g].exports}for(var n=typeof yt=="function"&&yt,h=0;h<u.length;h++)o(u[h]);return o}({1:[function(_,N,w){var u=_("./utils"),o=_("./support"),n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";w.encode=function(h){for(var g,y,p,b,i,d,r,l=[],a=0,c=h.length,v=c,S=u.getTypeOf(h)!=="string";a<h.length;)v=c-a,p=S?(g=h[a++],y=a<c?h[a++]:0,a<c?h[a++]:0):(g=h.charCodeAt(a++),y=a<c?h.charCodeAt(a++):0,a<c?h.charCodeAt(a++):0),b=g>>2,i=(3&g)<<4|y>>4,d=1<v?(15&y)<<2|p>>6:64,r=2<v?63&p:64,l.push(n.charAt(b)+n.charAt(i)+n.charAt(d)+n.charAt(r));return l.join("")},w.decode=function(h){var g,y,p,b,i,d,r=0,l=0,a="data:";if(h.substr(0,a.length)===a)throw new Error("Invalid base64 input, it looks like a data url.");var c,v=3*(h=h.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(h.charAt(h.length-1)===n.charAt(64)&&v--,h.charAt(h.length-2)===n.charAt(64)&&v--,v%1!=0)throw new Error("Invalid base64 input, bad content length.");for(c=o.uint8array?new Uint8Array(0|v):new Array(0|v);r<h.length;)g=n.indexOf(h.charAt(r++))<<2|(b=n.indexOf(h.charAt(r++)))>>4,y=(15&b)<<4|(i=n.indexOf(h.charAt(r++)))>>2,p=(3&i)<<6|(d=n.indexOf(h.charAt(r++))),c[l++]=g,i!==64&&(c[l++]=y),d!==64&&(c[l++]=p);return c}},{"./support":30,"./utils":32}],2:[function(_,N,w){var u=_("./external"),o=_("./stream/DataWorker"),n=_("./stream/Crc32Probe"),h=_("./stream/DataLengthProbe");function g(y,p,b,i,d){this.compressedSize=y,this.uncompressedSize=p,this.crc32=b,this.compression=i,this.compressedContent=d}g.prototype={getContentWorker:function(){var y=new o(u.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new h("data_length")),p=this;return y.on("end",function(){if(this.streamInfo.data_length!==p.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),y},getCompressedWorker:function(){return new o(u.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},g.createWorkerFrom=function(y,p,b){return y.pipe(new n).pipe(new h("uncompressedSize")).pipe(p.compressWorker(b)).pipe(new h("compressedSize")).withStreamInfo("compression",p)},N.exports=g},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(_,N,w){var u=_("./stream/GenericWorker");w.STORE={magic:"\0\0",compressWorker:function(){return new u("STORE compression")},uncompressWorker:function(){return new u("STORE decompression")}},w.DEFLATE=_("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(_,N,w){var u=_("./utils"),o=function(){for(var n,h=[],g=0;g<256;g++){n=g;for(var y=0;y<8;y++)n=1&n?3988292384^n>>>1:n>>>1;h[g]=n}return h}();N.exports=function(n,h){return n!==void 0&&n.length?u.getTypeOf(n)!=="string"?function(g,y,p,b){var i=o,d=b+p;g^=-1;for(var r=b;r<d;r++)g=g>>>8^i[255&(g^y[r])];return-1^g}(0|h,n,n.length,0):function(g,y,p,b){var i=o,d=b+p;g^=-1;for(var r=b;r<d;r++)g=g>>>8^i[255&(g^y.charCodeAt(r))];return-1^g}(0|h,n,n.length,0):0}},{"./utils":32}],5:[function(_,N,w){w.base64=!1,w.binary=!1,w.dir=!1,w.createFolders=!0,w.date=null,w.compression=null,w.compressionOptions=null,w.comment=null,w.unixPermissions=null,w.dosPermissions=null},{}],6:[function(_,N,w){var u=null;u=typeof Promise<"u"?Promise:_("lie"),N.exports={Promise:u}},{lie:37}],7:[function(_,N,w){var u=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=_("pako"),n=_("./utils"),h=_("./stream/GenericWorker"),g=u?"uint8array":"array";function y(p,b){h.call(this,"FlateWorker/"+p),this._pako=null,this._pakoAction=p,this._pakoOptions=b,this.meta={}}w.magic="\b\0",n.inherits(y,h),y.prototype.processChunk=function(p){this.meta=p.meta,this._pako===null&&this._createPako(),this._pako.push(n.transformTo(g,p.data),!1)},y.prototype.flush=function(){h.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},y.prototype.cleanUp=function(){h.prototype.cleanUp.call(this),this._pako=null},y.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var p=this;this._pako.onData=function(b){p.push({data:b,meta:p.meta})}},w.compressWorker=function(p){return new y("Deflate",p)},w.uncompressWorker=function(){return new y("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(_,N,w){function u(i,d){var r,l="";for(r=0;r<d;r++)l+=String.fromCharCode(255&i),i>>>=8;return l}function o(i,d,r,l,a,c){vLine truncated
\0`,G+=u(E,2),G+=D.magic,G+=u(v,2),G+=u(S,2),G+=u(V.crc32,4),G+=u(V.compressedSize,4),G+=u(V.uncompressedSize,4),G+=u(j.length,2),G+=u(T.length,2),{fileRecord:p.LOCAL_FILE_HEADER+G+j+T,dirRecord:p.CENTRAL_FILE_HEADER+u(X,2)+G+u(q.length,2)+"\0\0\0\0"+u(C,4)+u(l,4)+j+T+q}}var n=_("../utils"),h=_("../stream/GenericWorker"),g=_("../utf8"),y=_("../crc32"),p=_("../signature");function b(i,d,r,l){h.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=d,this.zipPlatform=r,this.encodeFileName=l,this.streamFiles=i,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(b,h),b.prototype.push=function(i){var d=i.meta.percent||0,r=this.entriesCount,l=this._sources.length;this.accumulate?this.contentBuffer.push(i):(this.bytesWritten+=i.data.length,h.prototype.push.call(this,{data:i.data,meta:{currentFile:this.currentFile,percent:r?(d+100*(r-l-1))/r:100}}))},b.prototype.openedSource=function(i){this.currentSourceOffset=this.bytesWritten,this.currentFile=i.file.name;var d=this.streamFiles&&!i.file.dir;if(d){var r=o(i,d,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},b.prototype.closedSource=function(i){this.accumulate=!1;var d=this.streamFiles&&!i.file.dir,r=o(i,d,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),d)this.push({data:function(l){return p.DATA_DESCRIPTOR+u(l.crc32,4)+u(l.compressedSize,4)+u(l.uncompressedSize,4)}(i),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},b.prototype.flush=function(){for(var i=this.bytesWritten,d=0;d<this.dirRecords.length;d++)this.push({data:this.dirRecords[d],meta:{percent:100}});var r=this.bytesWritten-i,l=function(a,c,v,S,x){var D=n.transformTo("string",x(S));return p.CENTRAL_DIRECTORY_END+"\0\0\0\0"+u(a,2)+u(a,2)+u(c,4)+u(v,4)+u(D.length,2)+D}(this.dirRecords.length,r,i,this.zipComment,this.encodeFileName);this.push({data:l,meta:{percent:100}})},b.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},b.prototype.registerPrevious=function(i){this._sources.push(i);var d=this;return i.on("data",function(r){d.processChunk(r)}),i.on("end",function(){d.closedSource(d.previous.streamInfo),d._sources.length?d.prepareNextSource():d.end()}),i.on("error",function(r){d.error(r)}),this},b.prototype.resume=function(){return!!h.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},b.prototype.error=function(i){var d=this._sources;if(!h.prototype.error.call(this,i))return!1;for(var r=0;r<d.length;r++)try{d[r].error(i)}catch{}return!0},b.prototype.lock=function(){h.prototype.lock.call(this);for(var i=this._sources,d=0;d<i.length;d++)i[d].lock()},N.exports=b},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(_,N,w){var u=_("../compressions"),o=_("./ZipFileWorker");w.generateWorker=function(n,h,g){var y=new o(h.streamFiles,g,h.platform,h.encodeFileName),p=0;try{n.forEach(function(b,i){p++;var d=function(c,v){var S=c||v,x=u[S];if(!x)throw new Error(S+" is not a valid compression method !");return x}(i.options.compression,h.compression),r=i.options.compressionOptions||h.compressionOptions||{},l=i.dir,a=i.date;i._compressWorker(d,r).withStreamInfo("file",{name:b,dir:l,date:a,comment:i.comment||"",unixPermissions:i.unixPermissions,dosPermissions:i.dosPermissions}).pipe(y)}),y.entriesCount=p}catch(b){y.error(b)}return y}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(_,N,w){function u(){if(!(this instanceof u))return new u;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var o=new u;for(var n in this)typeof this[n]!="function"&&(o[n]=this[n]);return o}}(u.prototype=_("./object")).loadAsync=_("./load"),u.support=_("./support"),u.defaults=_("./defaults"),u.version="3.10.1",u.loadAsync=function(o,n){return new u().loadAsync(o,n)},u.external=_("./external"),N.exports=u},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(_,N,w){var u=_("./utils"),o=_("./external"),n=_("./utf8"),h=_("./zipEntries"),g=_("./stream/Crc32Probe"),y=_("./nodejsUtils");function p(b){return new o.Promise(function(i,d){var r=b.decompressed.getContentWorker().pipe(new g);r.on("error",function(l){d(l)}).on("end",function(){r.streamInfo.crc32!==b.decompressed.crc32?d(new Error("Corrupted zip : CRC32 mismatch")):i()}).resume()})}N.exports=function(b,i){var d=this;r Line truncated
@@ -0,0 +1,331 @@
(function(){"use strict";function hi(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,a=Array(e);r<e;r++)a[r]=t[r];return a}function oh(t){if(Array.isArray(t))return t}function sh(t){if(Array.isArray(t))return hi(t)}function ir(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uh(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,Bs(a.key),a)}}function or(t,e,r){return e&&uh(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ot(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=ci(t))||e){r&&(t=r);var a=0,n=function(){};return{s:n,n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(u){throw u},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var u=r.next();return o=u.done,u},e:function(u){s=!0,i=u},f:function(){try{o||r.return==null||r.return()}finally{if(s)throw i}}}}function Is(t,e,r){return(e=Bs(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function lh(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function fh(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var a,n,i,o,s=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(a=i.call(r)).done)&&(s.push(a.value),s.length!==e);u=!0);}catch(f){l=!0,n=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw n}}return s}}function vh(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hh(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vt(t,e){return oh(t)||fh(t,e)||ci(t,e)||vh()}function an(t){return sh(t)||lh(t)||ci(t)||hh()}function ch(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Bs(t){var e=ch(t,"string");return typeof e=="symbol"?e:e+""}function ct(t){"@babel/helpers - typeof";return ct=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ct(t)}function ci(t,e){if(t){if(typeof t=="string")return hi(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hi(t,e):void 0}}var dt=typeof window>"u"?null:window,Fs=dt?dt.navigator:null;dt&&dt.document;var dh=ct(""),ks=ct({}),gh=ct(function(){}),ph=typeof HTMLElement>"u"?"undefined":ct(HTMLElement),ba=function(e){return e&&e.instanceString&&it(e.instanceString)?e.instanceString():null},Ne=function(e){return e!=null&&ct(e)==dh},it=function(e){return e!=null&&ct(e)===gh},Je=function(e){return!Ft(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},Ue=function(e){return e!=null&&ct(e)===ks&&!Je(e)&&e.constructor===Object},yh=function(e){return e!=null&&ct(e)===ks},be=function(e){return e!=null&&ct(e)===ct(1)&&!isNaN(e)},zs=function(e){return be(e)&&Math.floor(e)===e},nn=function(e){if(ph!=="undefined")return e!=null&&e instanceof HTMLElement},Ft=function(e){return wa(e)||Vs(e)},wa=function(e){return ba(e)==="collection"&&e._private.single},Vs=function(e){return ba(e)==="collection"&&!e._private.single},di=function(e){return ba(e)==="core"},Gs=function(e){return ba(e)==="stylesheet"},mh=function(e){return ba(e)==="event"},sr=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},bh=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},wh=function(e){return Ue(e)&&be(e.x1)&&be(e.x2)&&be(e.y1)&&be(e.y2)},Eh=function(e){return yh(e)&&it(e.then)},xh=function(){return Fs&&Fs.userAgent.match(/msie|trident|edge/i)},Yr=function(e,r){r||(r=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);return i.join("$")});var a=function(){var i=this,o=arguments,s,u=r.apply(i,o),l=a.cache;return(s=l[u])||(s=l[u]=e.apply(i,o)),s};return a.cache={},a},gi=Yr(function(t){return t.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),on=Yr(function(t){return t.replace(/(-\w)/g,function(e){return e[1].toUpperCase()})}),Us=Yr(function(t,e){return t+e[0].toUpperCase()+e.substring(1)},function(t,e){return t+"$"+e}),Hs=function(e){return sr(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},ur=function(e,r){return e.slice(-1*r.length)===r},gt="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",Th="rgb[a]?\\(("+gt+"[%]?)\\s*,\\s*("+gt+"[%]?)\\s*,\\s*("+gt+"[%]?)(?:\\s*,\\s*("+gt+"))?\\)",Ch="rgb[a]?\\((?:"+gt+"[%]?)\\s*,\\s*(?:"+gt+"[%]?)\\s*,\\s*(?:"+gt+"[%]?)(?:\\s*,\\s*(?:"+gt+"))?\\)",Sh="hsl[a]?\\(("+gt+")\\s*,\\s*("+gt+"[%])\\s*,\\s*("+gt+"[%])(?:\\s*,\\s*("+gt+"))?\\)",Ah="hsl[a]?\\((?:"+gt+")\\s*,\\s*(?:"+gt+"[%])\\s*,\\s*(?:"+gt+"[%])(?:\\s*,\\s*(?:"+gt+"))?\\)",Dh="\\#[0-9a-fA-F]{3}",Lh="\\#[0-9a-fA-F]{6}",qs=function(e,r){return e<r?-1:e>r?1:0},Mh=function(e,r){return-1*qs(e,r)},Oe=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r<e.length;r++){var a=e[r];if(a!=null)for(var n=Object.keys(a),i=0;i<n.length;i++){var o=n[i];t[o]=a[o]}}return t},Rh=function(e){if(!(!(e.length===4||e.length===7)||e[0]!=="#")){var r=e.length===4,a,n,i,o=16;return r?(a=parseInt(e[1]+e[1],o),n=parseInt(e[2]+e[2],o),i=parseInt(e[3]+e[3],o)):(a=parseInt(e[1]+e[2],o),n=parseInt(e[3]+e[4],o),i=parseInt(e[5]+e[6],o)),[a,n,i]}},Nh=function(e){var r,a,n,i,o,s,u,l;function f(d,p,y){return y<0&&(y+=1),y>1&&(y-=1),y<1/6?d+(p-d)*6*y:y<1/2?p:y<2/3?d+(p-d)*(2/3-y)*6:d}var v=new RegExp("^"+Sh+"$").exec(e);if(v){if(a=parseInt(v[1]),a<0?a=(360- -1*a%360)%360:a>360&&(a=a%360),a/=360,n=parseFloat(v[2]),n<0||n>100||(n=n/100,i=parseFloat(v[3]),i<0||i>100)||(i=i/100,o=v[4],o!==void 0&&(o=parseFloat(o),o<0||o>1)))return;if(n===0)s=u=l=Math.round(i*255);else{var c=i<.5?i*(1+n):i+n-i*n,h=2*i-c;s=Math.round(255*f(h,c,a+1/3)),u=Math.round(255*f(h,c,a)),l=Math.round(255*f(h,c,a-1/3))}r=[s,u,l,o]}return r},Ph=function(e){var r,a=new RegExp("^"+Th+"$").exec(e);if(a){r=[];for(var n=[],i=1;i<=3;i++){var o=a[i];if(o[o.length-1]==="%"&&(n[i]=!0),o=parseFloat(o),n[i]&&(o=o/100*255),o<0||o>255)return;r.push(Math.floor(o))}var s=n[1]||n[2]||n[3],u=n[1]&&n[2]&&n[3];if(s&&!u)return;var l=a[4];if(l!==void 0){if(l=parseFloat(l),l<0||l>1)re Line truncated
Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable
Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com)
Licensed under The MIT License (http://opensource.org/licenses/MIT)
*/var Ku=0,_u=1,Zu=2,Ut=function(e){if(!(this instanceof Ut))return new Ut(e);this.id="Thenable/1.0.7",this.state=Ku,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};Ut.prototype={fulfill:function(e){return Qu(this,_u,"fulfillValue",e)},reject:function(e){return Qu(this,Zu,"rejectReason",e)},then:function(e,r){var a=this,n=new Ut;return a.onFulfilled.push(el(e,n,"fulfill")),a.onRejected.push(el(r,n,"reject")),Ju(a),n.proxy}};var Qu=function(e,r,a,n){return e.state===Ku&&(e.state=r,e[a]=n,Ju(e)),e},Ju=function(e){e.state===_u?ju(e,"onFulfilled",e.fulfillValue):e.state===Zu&&ju(e,"onRejected",e.rejectReason)},ju=function(e,r,a){if(e[r].length!==0){var n=e[r];e[r]=[];var i=function(){for(var s=0;s<n.length;s++)n[s](a)};typeof setImmediate=="function"?setImmediate(i):setTimeout(i,0)}},el=function(e,r,a){return function(n){if(typeof e!="function")r[a].call(r,n);else{var i;try{i=e(n)}catch(o){r.reject(o);return}tl(r,i)}}},tl=function(e,r){if(e===r||e.proxy===r){e.reject(new TypeError("cannot resolve promise with itself"));return}var a;if(ct(r)==="object"&&r!==null||typeof r=="function")try{a=r.then}catch(i){e.reject(i);return}if(typeof a=="function"){var n=!1;try{a.call(r,function(i){n||(n=!0,i===r?e.reject(new TypeError("circular thenable chain")):tl(e,i))},function(i){n||(n=!0,e.reject(i))})}catch(i){n||e.reject(i)}return}e.fulfill(r)};Ut.all=function(t){return new Ut(function(e,r){for(var a=new Array(t.length),n=0,i=function(u,l){a[u]=l,n++,n===t.length&&e(a)},o=0;o<t.length;o++)(function(s){var u=t[s],l=u!=null&&u.then!=null;if(l)u.then(function(v){i(s,v)},function(v){r(v)});else{var f=u;i(s,f)}})(o)})},Ut.resolve=function(t){return new Ut(function(e,r){e(t)})},Ut.reject=function(t){return new Ut(function(e,r){r(t)})};var jr=typeof Promise<"u"?Promise:Ut,Qi=function(e,r,a){var n=di(e),i=!n,o=this._private=Oe({duration:1e3},r,a);if(o.target=e,o.style=o.style||o.css,o.started=!1,o.playing=!1,o.hooked=!1,o.applying=!1,o.progress=0,o.completes=[],o.frames=[],o.complete&&it(o.complete)&&o.completes.push(o.complete),i){var s=e.position();o.startPosition=o.startPosition||{x:s.x,y:s.y},o.startStyle=o.startStyle||e.cy().style().getAnimationStartStyle(e,o.style)}if(n){var u=e.pan();o.startPan={x:u.x,y:u.y},o.startZoom=e.zoom()}this.length=1,this[0]=this},Pr=Qi.prototype;Oe(Pr,{instanceString:function(){return"animation"},hook:function(){var e=this._private;if(!e.hooked){var r,a=e.target._private.animation;e.queue?r=a.queue:r=a.current,r.push(this),Ft(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0}return this},play:function(){var e=this._private;return e.progress===1&&(e.progress=0),e.playing=!0,e.started=!1,e.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var e=this._private;return e.applying=!0,e.started=!1,e.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var e=this._private;return e.playing=!1,e.started=!1,this},stop:function(){var e=this._private;return e.playing=!1,e.started=!1,e.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(e){var r=this._private;return e===void 0?r.progress*r.duration:this.progress(e/r.duration)},progress:function(e){var r=this._private,a=r.playing;return e===void 0?r.progress:(a&&this.pause(),r.progress=e,r.started=!1,a&&this.play(),this)},completed:function(){return this._private.progress===1},reverse:function(){var e=this._private,r=e.playing;r&&this.pause(),e.progress=1-e.progress,e.started=!1;var a=function(l,f){var v=e[l];v!=null&&(e[l]=e[f],e[f]=v)};if(a("zoom","startZoom"),a("pan","startPan"),a("position","startPosition"),e.style)for(var n=0;n<e.style.length;n++){var i=e.style[n],o=i.name,s=e.startStyle[o];e.startStyle[o]=i,e.style[n]=s}return r&&this.play(),this},promise:function(e){var r=this._private,a;switch(e){case"frame":a=r.frames;break;default:case"complete":case"completed":a=r.completes}return new jr(function(n,i){a.push(function(){n()})})}}),Pr.complete=Pr.completed,Pr.run=Pr.play,Pr.running=Pr.playing;var kd={animated:function(){return function(){var r=this,a=r.length!==void 0,n=a?r:[r],i=this._private.cy||this;if(!i.styleEnabled())return!1;var o=n[0];if(o)return o._private.animation.current.length>0}},clearQueue:function(){return function(){var r=this,a=r.length!==void 0,n=a?r:[r],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var o=0;o<n.length;o++){var s=n[o];s._private.animation.queue=[]}return this}},delay:function(){return function(r,a){var n=this._private.cy||this;return n.styleEnabled()?this.animate({delay:r,duration:r,complete:a}):this}},delayAnimation:function(){return function(r,a){var n=this._private.cy||this;return n.styleEnabled()?this.animation({delay:r,duration:r,complete:a}):this}},animation:functLine truncated
Event object based on jQuery events, MIT license
https://jquery.org/license/
https://tldrlegal.com/license/mit-license
https://github.com/jquery/jquery/blob/master/src/event.js
*/var Ef=function(e,r){this.recycle(e,r)};function za(){return!1}function Pn(){return!0}Ef.prototype={instanceString:function(){return"event"},recycle:function(e,r){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=za,e!=null&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?Pn:za):e!=null&&e.type?r=e:this.type=e,r!=null&&(this.originalEvent=r.originalEvent,this.type=r.type!=null?r.type:this.type,this.cy=r.cy,this.target=r.target,this.position=r.position,this.renderedPosition=r.renderedPosition,this.namespace=r.namespace,this.layout=r.layout),this.cy!=null&&this.position!=null&&this.renderedPosition==null){var a=this.position,n=this.cy.zoom(),i=this.cy.pan();this.renderedPosition={x:a.x*n+i.x,y:a.y*n+i.y}}this.timeStamp=e&&e.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=Pn;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.isPropagationStopped=Pn;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Pn,this.stopPropagation()},isDefaultPrevented:za,isPropagationStopped:za,isImmediatePropagationStopped:za};var xf=/^([^.]+)(\.(?:[^.]+))?$/,hp=".*",Tf={qualifierCompare:function(e,r){return e===r},eventMatches:function(){return!0},addEventFields:function(){},callbackContext:function(e){return e},beforeEmit:function(){},afterEmit:function(){},bubble:function(){return!1},parent:function(){return null},context:null},Cf=Object.keys(Tf),cp={};function On(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:cp,e=arguments.length>1?arguments[1]:void 0,r=0;r<Cf.length;r++){var a=Cf[r];this[a]=t[a]||Tf[a]}this.context=e||this.context,this.listeners=[],this.emitting=0}var wr=On.prototype,Sf=function(e,r,a,n,i,o,s){it(n)&&(i=n,n=null),s&&(o==null?o=s:o=Oe({},o,s));for(var u=Je(a)?a:a.split(/\s+/),l=0;l<u.length;l++){var f=u[l];if(!sr(f)){var v=f.match(xf);if(v){var c=v[1],h=v[2]?v[2]:null,d=r(e,f,c,h,n,i,o);if(d===!1)break}}}},Af=function(e,r){return e.addEventFields(e.context,r),new Ef(r.type,r)},dp=function(e,r,a){if(mh(a)){r(e,a);return}else if(Ue(a)){r(e,Af(e,a));return}for(var n=Je(a)?a:a.split(/\s+/),i=0;i<n.length;i++){var o=n[i];if(!sr(o)){var s=o.match(xf);if(s){var u=s[1],l=s[2]?s[2]:null,f=Af(e,{type:u,namespace:l,target:e.context});r(e,f)}}}};wr.on=wr.addListener=function(t,e,r,a,n){return Sf(this,function(i,o,s,u,l,f,v){it(f)&&i.listeners.push({event:o,callback:f,type:s,namespace:u,qualifier:l,conf:v})},t,e,r,a,n),this},wr.one=function(t,e,r,a){return this.on(t,e,r,a,{one:!0})},wr.removeListener=wr.off=function(t,e,r,a){var n=this;this.emitting!==0&&(this.listeners=ec(this.listeners));for(var i=this.listeners,o=function(l){var f=i[l];Sf(n,function(v,c,h,d,p,y){if((f.type===h||t==="*")&&(!d&&f.namespace!==".*"||f.namespace===d)&&(!p||v.qualifierCompare(f.qualifier,p))&&(!y||f.callback===y))return i.splice(l,1),!1},t,e,r,a)},s=i.length-1;s>=0;s--)o(s);return this},wr.removeAllListeners=function(){return this.removeListener("*")},wr.emit=wr.trigger=function(t,e,r){var a=this.listeners,n=a.length;return this.emitting++,Je(e)||(e=[e]),dp(this,function(i,o){r!=null&&(a=[{event:o.event,type:o.type,namespace:o.namespace,callback:r}],n=a.length);for(var s=function(){var f=a[u];if(f.type===o.type&&(!f.namespace||f.namespace===o.namespace||f.namespace===hp)&&i.eventMatches(i.context,f,o)){var v=[o];e!=null&&rc(v,e),i.beforeEmit(i.context,f,o),f.conf&&f.conf.one&&(i.listeners=i.listeners.filter(function(d){return d!==f}));var c=i.callbackContext(i.context,f,o),h=f.callback.apply(c,v);i.afterEmit(i.context,f,o),h===!1&&(o.stopPropagation(),o.preventDefault())}},u=0;u<n;u++)s();i.bubble(i.context)&&!o.isPropagationStopped()&&i.parent(i.context).emit(o,e)},t),this.emitting--,this};var gp={qualifierCompare:function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r)},eventMatches:function(e,r,a){var n=r.qualifier;return n!=null?e!==a.target&&wa(a.target)&&n.matches(a.target):!0},addEventFields:function(e,r){r.cy=e.cy(),r.target=e},callbackContext:function(e,r,a){return r.qualifier!=null?a.target:e},beforeEmit:function(e,r){r.conf&&r.conf.once&&r.conf.onceCollection.removeListener(r.event,r.qualifier,r.callback)},bubble:function(){return!0},parent:function(e){return e.isChild()?e.parent():e.cy()}},In=function(e){return Ne(e)?new gr(e):e},Df={createEmitter:function(){for(var e=0;e<this.length;e++){var r=this[e],a=r._private;a.emitter||(a.emitter=new On(gp,r))}return this},emitter:function(){return this._private.emitter},on:function(e,r,a){for(var n=In(r),i=0;i<this.length;i++){var o=this[i];o.emitter().on(e,n,a)}return this},removeListener:function(e,r,a){for(var n=In(r),i=0;i<this.length;i++){var o=this[i];o.emitter().removeListener(e,n,a)}return this},removeAllListeners:function(){for(var e=0;e<this.length;e++){var r=this[e];r.emitter().removeAllListeners()}return this},one:functLine truncated
`),v=t.pstyle("text-max-width").pfValue,c=t.pstyle("text-overflow-wrap").value,h=c==="anywhere",d=[],p=/[\s\u200b]+|$/g,y=0;y<f.length;y++){var g=f[y],b=this.calculateLabelDimensions(t,g),m=b.width;if(h){var w=g.split("").join(l);g=w}if(m>v){var T=g.matchAll(p),D="",x=0,M=Ot(T),P;try{for(M.s();!(P=M.n()).done;){var N=P.value,O=N[0],R=g.substring(x,N.index);x=N.index+O.length;var I=D.length===0?R:D+R+O,E=this.calculateLabelDimensions(t,I),A=E.width;A<=v?D+=R+O:(D&&d.push(D),D=R+O)}}catch(H){M.e(H)}finally{M.f()}D.match(/^[\s\u200b]+$/)||d.push(D)}else d.push(g)}o("labelWrapCachedLines",d),n=o("labelWrapCachedText",d.join(`
`)),o("labelWrapKey",u)}else if(s==="ellipsis"){var S=t.pstyle("text-max-width").pfValue,C="",L="…",z=!1;if(this.calculateLabelDimensions(t,n).width<S)return n;for(var k=0;k<n.length;k++){var F=this.calculateLabelDimensions(t,C+n[k]+L).width;if(F>S)break;C+=n[k],k===n.length-1&&(z=!0)}return z||(C+=L),C}return n},_t.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,r=t.pstyle("text-halign").strValue;return e==="auto"?t.isNode()?Zg(r):"center":e},_t.calculateLabelDimensions=function(t,e){var r=this,a=r.cy.window(),n=a.document,i=0,o=t.pstyle("font-style").strValue,s=t.pstyle("font-size").pfValue,u=t.pstyle("font-family").strValue,l=t.pstyle("font-weight").strValue,f=t.pstyle("text-metrics").strValue||"font",v=this.labelCalcCanvas,c=this.labelCalcCanvasContext;if(!v){v=this.labelCalcCanvas=n.createElement("canvas"),c=this.labelCalcCanvasContext=v.getContext("2d");var h=v.style;h.position="absolute",h.left="-9999px",h.top="-9999px",h.zIndex="-1",h.visibility="hidden",h.pointerEvents="none"}c.font="".concat(o," ").concat(l," ").concat(s,"px ").concat(u);for(var d=0,p=0,y=e.split(`
`),g=y.length,b=0,m=0,w=0;w<g;w++){var T=y[w],D=c.measureText(T),x=Math.ceil(D.width),M=s;f==="glyph"&&(w===0&&(m=D.actualBoundingBoxAscent),w===g-1&&(b=D.actualBoundingBoxDescent)),d=Math.max(x,d),p+=M}return f==="glyph"&&(p-=s-m-b),d+=i,p+=i,{width:d,height:p,labelActualAscent:m,labelActualDescent:b}},_t.calculateLabelAngle=function(t,e){var r=t._private,a=r.rscratch,n=t.isEdge(),i=e?e+"-":"",o=t.pstyle(i+"text-rotation"),s=o.strValue;return s==="none"?0:n&&s==="autorotate"?a.labelAutoAngle:s==="autorotate"?0:o.pfValue},_t.calculateLabelAngles=function(t){var e=this,r=t.isEdge(),a=t._private,n=a.rscratch;n.labelAngle=e.calculateLabelAngle(t),r&&(n.sourceLabelAngle=e.calculateLabelAngle(t,"source"),n.targetLabelAngle=e.calculateLabelAngle(t,"target"))};var cv={},dv=28,gv=!1;cv.getNodeShape=function(t){var e=this,r=t.pstyle("shape").value;if(r==="cutrectangle"&&(t.width()<dv||t.height()<dv))return gv||(Xe("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),gv=!0),"rectangle";if(t.isParent())return r==="rectangle"||r==="roundrectangle"||r==="round-rectangle"||r==="cutrectangle"||r==="cut-rectangle"||r==="barrel"?r:"rectangle";if(r==="polygon"){var a=t.pstyle("shape-polygon-points").value;return e.nodeShapes.makePolygon(a).name}return r};var Qn={};Qn.registerCalculationListeners=function(){var t=this.cy,e=t.collection(),r=this,a=function(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(o),s)for(var u=0;u<o.length;u++){var l=o[u],f=l._private,v=f.rstyle;v.clean=!1,v.cleanConnected=!1}};r.binder(t).on("bounds.* dirty.*",function(o){var s=o.target;a(s)}).on("style.* background.*",function(o){var s=o.target;a(s,!1)});var n=function(o){if(o){var s=r.onUpdateEleCalcsFns;e.cleanStyle();for(var u=0;u<e.length;u++){var l=e[u],f=l._private.rstyle;l.isNode()&&!f.cleanConnected&&(a(l.connectedEdges()),f.cleanConnected=!0)}if(s)for(var v=0;v<s.length;v++){var c=s[v];c(o,e)}r.recalculateRenderedStyle(e),e=t.collection()}};r.flushRenderedStyleQueue=function(){n(!0)},r.beforeRender(n,r.beforeRenderPriorities.eleCalcs)},Qn.onUpdateEleCalcs=function(t){var e=this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[];e.push(t)},Qn.recalculateRenderedStyle=function(t,e){var r=function(w){return w._private.rstyle.cleanConnected};if(t.length!==0){var a=[],n=[];if(!this.destroyed){e===void 0&&(e=!0);for(var i=0;i<t.length;i++){var o=t[i],s=o._private,u=s.rstyle;o.isEdge()&&(!r(o.source())||!r(o.target()))&&(u.clean=!1),o.isEdge()&&o.isBundledBezier()&&o.parallelEdges().some(function(m){return!m._private.rstyle.clean&&m.isBundledBezier()})&&(u.clean=!1),!(e&&u.clean||o.removed())&&o.pstyle("display").value!=="none"&&(s.group==="nodes"?n.push(o):a.push(o),u.clean=!0)}for(var l=0;l<n.length;l++){var f=n[l],v=f._private,c=v.rstyle,h=f.position();this.recalculateNodeLabelProjection(f),c.nodeX=h.x,c.nodeY=h.y,c.nodeW=f.pstyle("width").pfValue,c.nodeH=f.pstyle("height").pfValue}this.recalculateEdgeProjections(a);for(var d=0;d<a.length;d++){var p=a[d],y=p._private,g=y.rstyle,b=y.rscratch;g.srcX=b.arrowStartX,g.srcY=b.arrowStartY,g.tgtX=b.arrowEndX,g.tgtY=b.arrowEndY,g.midX=b.midX,g.midY=b.midY,g.labelAngle=b.labelAngle,g.sourceLabelAngle=b.sourceLabelAngle,g.targetLabelAngle=b.targetLabelAngle}}}};var Jn={};Jn.updateCachedGrabbedEles=function(){var t=this.cachedZSortedEles;if(t){t.drag=[],t.nondrag=[];for(var e=[],r=0;r<t.length;r++){var a=t[r],n=a._private.rscratch;a.grabbed()&&!a.isParent()?e.push(a):n.inDragLayer?t.drag.push(a):t.nondrag.push(a)}for(var r=0;r<e.length;r++){var a=e[r];t.drag.push(a)}}},Jn.invalidateCachedZSortedEles=function(){this.cachedZSortedEles=null},Jn.getCachedZSortedEles=function(t){if(t||!this.cachedZSortedEles){var e=this.cy.mutableElements().toArray();e.sort(Mf),e.interactive=e.filter(function(r){return r.interactive()}),this.cachedZSortedEles=e,this.updateCachedGrabbedEles()}else e=this.cachedZSortedEles;return e};var pv={};[Ir,Kn,Lt,Wa,ms,_t,cv,Qn,Jn].forEach(function(t){Oe(pv,t)});var yv={};yv.getCachedImage=function(t,e,r){var a=this,n=a.imageCache=a.imageCache||{},i=n[t];if(i)return i.image.complete||i.image.addEventListener("load",r),i.image;i=n[t]=n[t]||{};var o=i.image=new Image;o.addEventListener("load",r),o.addEventListener("error",function(){o.error=!0});var s="data:",u=t.substring(0,s.length).toLowerCase()===s;return u||(e=e==="null"?null:e,o.crossOrigin=e),o.src=t,o};var mv=function(e,r){var a=e[0];!a||a._private.grabbed===r||(a._private.grabbed=r,e.updateStyle(!1))},fy=function(e){mv(e,!0)},vy=function(e){mv(e,!1)},va={};va.registerBinding=function(t,e,r,a){var n=Array.prototype.slice.apply(arguments,[1]);if(Array.isArray(t)){for(var i=[],o=0;o<t.length;o++){var s=t[o];if(s!==void 0){var u=this.binder(s);i.push(u.on.apply(u,n))}}return i}var u=this.binder(t);return u.on.apply(u,n)},va.binder=function(t){var e=this,r=e.cy.window(),a=t===r||t===r.document||t===r.document.body||bh(t);if(e.supportsPassiveEvents==null){var n=!1;try{va Line truncated
float circleSD(vec2 p, float r) {
return distance(vec2(0), p) - r; // signed distance
}
`,ym=`
float rectangleSD(vec2 p, vec2 b) {
vec2 d = abs(p)-b;
return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0);
}
`,mm=`
float roundRectangleSD(vec2 p, vec2 b, vec4 cr) {
cr.xy = (p.x > 0.0) ? cr.xy : cr.zw;
cr.x = (p.y > 0.0) ? cr.x : cr.y;
vec2 q = abs(p) - b + cr.x;
return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x;
}
`,bm=`
float ellipseSD(vec2 p, vec2 ab) {
p = abs( p ); // symmetry
// find root with Newton solver
vec2 q = ab*(p-ab);
float w = (q.x<q.y)? 1.570796327 : 0.0;
for( int i=0; i<5; i++ ) {
vec2 cs = vec2(cos(w),sin(w));
vec2 u = ab*vec2( cs.x,cs.y);
vec2 v = ab*vec2(-cs.y,cs.x);
w = w + dot(p-u,v)/(dot(p-u,u)+dot(v,v));
}
// compute final point and distance
float d = length(p-ab*vec2(cos(w),sin(w)));
// return signed distance
return (dot(p/ab,p/ab)>1.0) ? d : -d;
}
`,Za={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},ai={IGNORE:1,USE_BB:2},As=0,Gv=1,Uv=2,Ds=3,ga=4,ni=5,Qa=6,Ja=7,wm=function(){function t(e,r,a){ir(this,t),this.r=e,this.gl=r,this.maxInstances=a.webglBatchSize,this.atlasSize=a.webglTexSize,this.bgColor=a.bgColor,this.debug=a.webglDebug,this.batchDebugInfo=[],a.enableWrapping=!0,a.createTextureCanvas=Jy,this.atlasManager=new dm(e,a),this.batchManager=new gm(a),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(Za.SCREEN),this.pickingProgram=this._createShaderProgram(Za.PICKING),this.vao=this._createVAO()}return or(t,[{key:"addAtlasCollection",value:function(r,a){this.atlasManager.addAtlasCollection(r,a)}},{key:"addTextureAtlasRenderType",value:function(r,a){this.atlasManager.addRenderType(r,a)}},{key:"addSimpleShapeRenderType",value:function(r,a){this.simpleShapeOptions.set(r,a)}},{key:"invalidate",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=a.type,i=this.atlasManager;return n?i.invalidate(r,{filterType:function(s){return s===n},forceRedraw:!0}):i.invalidate(r)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"_createShaderProgram",value:function(r){var a=this.gl,n=`#version 300 es
precision highp float;
uniform mat3 uPanZoomMatrix;
uniform int uAtlasSize;
// instanced
in vec2 aPosition; // a vertex from the unit square
in mat3 aTransform; // used to transform verticies, eg into a bounding box
in int aVertType; // the type of thing we are rendering
// the z-index that is output when using picking mode
in vec4 aIndex;
// For textures
in int aAtlasId; // which shader unit/atlas to use
in vec4 aTex; // x/y/w/h of texture in atlas
// for edges
in vec4 aPointAPointB;
in vec4 aPointCPointD;
in vec2 aLineWidth; // also used for node border width
// simple shapes
in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left]
in vec4 aColor; // also used for edges
in vec4 aBorderColor; // aLineWidth is used for border width
// output values passed to the fragment shader
out vec2 vTexCoord;
out vec4 vColor;
out vec2 vPosition;
// flat values are not interpolated
flat out int vAtlasId;
flat out int vVertType;
flat out vec2 vTopRight;
flat out vec2 vBotLeft;
flat out vec4 vCornerRadius;
flat out vec4 vBorderColor;
flat out vec2 vBorderWidth;
flat out vec4 vIndex;
void main(void) {
int vid = gl_VertexID;
vec2 position = aPosition; // TODO make this a vec3, simplifies some code below
if(aVertType == `.concat(As,`) {
float texX = aTex.x; // texture coordinates
float texY = aTex.y;
float texW = aTex.z;
float texH = aTex.w;
if(vid == 1 || vid == 2 || vid == 4) {
texX += texW;
}
if(vid == 2 || vid == 4 || vid == 5) {
texY += texH;
}
float d = float(uAtlasSize);
vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
}
else if(aVertType == `).concat(ga," || aVertType == ").concat(Ja,`
|| aVertType == `).concat(ni," || aVertType == ").concat(Qa,`) { // simple shapes
// the bounding box is needed by the fragment shader
vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat
vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat
vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated
// calculations are done in the fragment shader, just pass these along
vColor = aColor;
vCornerRadius = aCornerRadius;
vBorderColor = aBorderColor;
vBorderWidth = aLineWidth;
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
}
else if(aVertType == `).concat(Gv,`) {
vec2 source = aPointAPointB.xy;
vec2 target = aPointAPointB.zw;
// adjust the geometry so that the line is centered on the edge
position.y = position.y - 0.5;
// stretch the unit square into a long skinny rectangle
vec2 xBasis = target - source;
vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x));
vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y;
gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0);
vColor = aColor;
}
else if(aVertType == `).concat(Uv,`) {
vec2 pointA = aPointAPointB.xy;
vec2 pointB = aPointAPointB.zw;
vec2 pointC = aPointCPointD.xy;
vec2 pointD = aPointCPointD.zw;
// adjust the geometry so that the line is centered on the edge
position.y = position.y - 0.5;
vec2 p0, p1, p2, pos;
if(position.x == 0.0) { // The left side of the unit square
p0 = pointA;
p1 = pointB;
p2 = pointC;
pos = position;
} else { // The right side of the unit square, use same approach but flip the geometry upside down
p0 = pointD;
p1 = pointC;
p2 = pointB;
pos = vec2(0.0, -position.y);
}
vec2 p01 = p1 - p0;
vec2 p12 = p2 - p1;
vec2 p21 = p1 - p2;
// Find the normal vector.
vec2 tangent = normalize(normalize(p12) + normalize(p01));
vec2 normal = vec2(-tangent.y, tangent.x);
// Find the vector perpendicular to p0 -> p1.
vec2 p01Norm = normalize(vec2(-p01.y, p01.x));
// Determine the bend direction.
float sigma = sign(dot(p01 + p21, normal));
float width = aLineWidth[0];
if(sign(pos.y) == -sigma) {
// This is an intersecting vertex. Adjust the position so that there's no overlap.
vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm);
gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);
} else {
// This is a non-intersecting vertex. Treat it like a mitre join.
vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm);
gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);
}
vColor = aColor;
}
else if(aVertType == `).concat(Ds,` && vid < 3) {
// massage the first triangle into an edge arrow
if(vid == 0)
position = vec2(-0.15, -0.3);
if(vid == 1)
position = vec2( 0.0, 0.0);
if(vid == 2)
position = vec2( 0.15, -0.3);
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
vColor = aColor;
}
else {
gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space
}
vAtlasId = aAtlasId;
vVertType = aVertType;
vIndex = aIndex;
}
`),i=this.batchManager.getIndexArray(),o=`#version 300 es
precision highp float;
// declare texture unit for each texture atlas in the batch
`.concat(i.map(function(l){return"uniform sampler2D uTexture".concat(l,";")}).join(`
`),`
uniform vec4 uBGColor;
uniform float uZoom;
in vec2 vTexCoord;
in vec4 vColor;
in vec2 vPosition; // model coordinates
flat in int vAtlasId;
flat in vec4 vIndex;
flat in int vVertType;
flat in vec2 vTopRight;
flat in vec2 vBotLeft;
flat in vec4 vCornerRadius;
flat in vec4 vBorderColor;
flat in vec2 vBorderWidth;
out vec4 outColor;
`).concat(pm,`
`).concat(ym,`
`).concat(mm,`
`).concat(bm,`
vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha
return vec4(
top.rgb + (bot.rgb * (1.0 - top.a)),
top.a + (bot.a * (1.0 - top.a))
);
}
vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance
// scale to the zoom level so that borders don't look blurry when zoomed in
// note 1.5 is an aribitrary value chosen because it looks good
return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d)));
}
void main(void) {
if(vVertType == `).concat(As,`) {
// look up the texel from the texture unit
`).concat(i.map(function(l){return"if(vAtlasId == ".concat(l,") outColor = texture(uTexture").concat(l,", vTexCoord);")}).join(`
else `),`
}
else if(vVertType == `).concat(Ds,`) {
// mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out';
outColor = blend(vColor, uBGColor);
outColor.a = 1.0; // make opaque, masks out line under arrow
}
else if(vVertType == `).concat(ga,` && vBorderWidth == vec2(0.0)) { // simple rectangle with no border
outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done
}
else if(vVertType == `).concat(ga," || vVertType == ").concat(Ja,`
|| vVertType == `).concat(ni," || vVertType == ").concat(Qa,`) { // use SDF
float outerBorder = vBorderWidth[0];
float innerBorder = vBorderWidth[1];
float borderPadding = outerBorder * 2.0;
float w = vTopRight.x - vBotLeft.x - borderPadding;
float h = vTopRight.y - vBotLeft.y - borderPadding;
vec2 b = vec2(w/2.0, h/2.0); // half width, half height
vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center
float d; // signed distance
if(vVertType == `).concat(ga,`) {
d = rectangleSD(p, b);
} else if(vVertType == `).concat(Ja,` && w == h) {
d = circleSD(p, b.x); // faster than ellipse
} else if(vVertType == `).concat(Ja,`) {
d = ellipseSD(p, b);
} else {
d = roundRectangleSD(p, b, vCornerRadius.wzyx);
}
// use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling
// we must smooth colors inwards, because we can't change pixels outside the shape's bounding box
if(d > 0.0) {
if(d > outerBorder) {
discard;
} else {
outColor = distInterp(vBorderColor, vec4(0), d - outerBorder);
}
} else {
if(d > innerBorder) {
vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor;
vec4 innerBorderColor = blend(vBorderColor, vColor);
outColor = distInterp(innerBorderColor, outerColor, d);
}
else {
vec4 outerColor;
if(innerBorder == 0.0 && outerBorder == 0.0) {
outerColor = vec4(0);
} else if(innerBorder == 0.0) {
outerColor = vBorderColor;
} else {
outerColor = blend(vBorderColor, vColor);
}
outColor = distInterp(vColor, outerColor, d - innerBorder);
}
}
}
else {
outColor = vColor;
}
`).concat(r.picking?`if(outColor.a == 0.0) discard;
else outColor = vIndex;`:"",`
}
`),s=Qy(a,n,o);s.aPosition=a.getAttribLocation(s,"aPosition"),s.aIndex=a.getAttribLocation(s,"aIndex"),s.aVertType=a.getAttribLocation(s,"aVertType"),s.aTransform=a.getAttribLocation(s,"aTransform"),s.aAtlasId=a.getAttribLocation(s,"aAtlasId"),s.aTex=a.getAttribLocation(s,"aTex"),s.aPointAPointB=a.getAttribLocation(s,"aPointAPointB"),s.aPointCPointD=a.getAttribLocation(s,"aPointCPointD"),s.aLineWidth=a.getAttribLocation(s,"aLineWidth"),s.aColor=a.getAttribLocation(s,"aColor"),s.aCornerRadius=a.getAttribLocation(s,"aCornerRadius"),s.aBorderColor=a.getAttribLocation(s,"aBorderColor"),s.uPanZoomMatrix=a.getUniformLocation(s,"uPanZoomMatrix"),s.uAtlasSize=a.getUniformLocation(s,"uAtlasSize"),s.uBGColor=a.getUniformLocation(s,"uBGColor"),s.uZoom=a.getUniformLocation(s,"uZoom"),s.uTextures=[];for(var u=0;u<this.batchManager.getMaxAtlasesPerBatch();u++)s.uTextures.push(a.getUniformLocation(s,"uTexture".concat(u)));return s}},{key:"_createVAO",value:function(){var r=[0,0,1,0,1,1,0,0,1,1,0,1];this.vertexCount=r.length/2;var a=this.maxInstances,n=this.gl,i=this.program,o=n.createVertexArray();return n.bindVertexArray(o),om(n,"vec2",i.aPosition,r),this.transformBuffer=sm(n,a,i.aTransform),this.indexBuffer=Qt(n,a,"vec4",i.aIndex),this.vertTypeBuffer=Qt(n,a,"int",i.aVertType),this.atlasIdBuffer=Qt(n,a,"int",i.aAtlasId),this.texBuffer=Qt(n,a,"vec4",i.aTex),this.pointAPointBBuffer=Qt(n,a,"vec4",i.aPointAPointB),this.pointCPointDBuffer=Qt(n,a,"vec4",i.aPointCPointD),this.lineWidthBuffer=Qt(n,a,"vec2",i.aLineWidth),this.colorBuffer=Qt(n,a,"vec4",i.aColor),this.cornerRadiusBuffer=Qt(n,a,"vec4",i.aCornerRadius),this.borderColorBuffer=Qt(n,a,"vec4",i.aBorderColor),n.bindVertexArray(null),o}},{key:"buffers",get:function(){var r=this;return this._buffers||(this._buffers=Object.keys(this).filter(function(a){return ur(a,"Buffer")}).map(function(a){return r[a]})),this._buffers}},{key:"startFrame",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Za.SCREEN;this.panZoomMatrix=r,this.renderTarget=a,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(r,a){return r.visible()?a&&a.isVisible?a.isVisible(r):!0:!1}},{key:"drawTexture",value:function(r,a,n){var i=this.atlasManager,o=this.batchManager,s=i.getRenderTypeOpts(n);if(this._isVisible(r,s)&&!(r.isEdge()&&!this._isValidEdge(r))){if(this.renderTarget.picking&&s.getTexPickingMode){var u=s.getTexPickingMode(r);if(u===ai.IGNORE)return;if(u==ai.USE_BB){this.drawPickingRectangle(r,a,n);return}}var l=i.getAtlasInfo(r,n),f=Ot(l),v;try{for(f.s();!(v=f.n()).done;){var c=v.value,h=c.atlas,d=c.tex1,p=c.tex2;o.canAddToCurrentBatch(h)||this.endBatch();for(var y=o.getAtlasIndexForBatch(h),g=0,b=[[d,!0],[p,!1]];g<b.length;g++){var m=vt(b[g],2),w=m[0],T=m[1];if(w.w!=0){var D=this.instanceCount;this.vertTypeBuffer.getView(D)[0]=As;var x=this.indexBuffer.getView(D);da(a,x);var M=this.atlasIdBuffer.getView(D);M[0]=y;var P=this.texBuffer.getView(D);P[0]=w.x,P[1]=w.y,P[2]=w.w,P[3]=w.h;var N=this.transformBuffer.getMatrixView(D);this.setTransformMatrix(r,N,s,c,T),this.instanceCount++,T||this.wrappedCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}catch(O){f.e(O)}finally{f.f()}}}},{key:"setTransformMatrix",value:function(r,a,n,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=0;if(n.shapeProps&&n.shapeProps.padding&&(s=r.pstyle(n.shapeProps.padding).pfValue),i){var u=i.bb,l=i.tex1,f=i.tex2,v=l.w/(l.w+f.w);o||(v=1-v);var c=this._getAdjustedBB(u,s,o,v);this._applyTransformMatrix(a,c,n,r)}else{var h=n.getBoundingBox(r),d=this._getAdjustedBB(h,s,!0,1);this._applyTransformMatrix(a,d,n,r)}}},{key:"_applyTransformMatrix",value:function(r,a,n,i){var o,s;zv(r);var u=n.getRotation?n.getRotation(i):0;if(u!==0){var l=n.getRotationPoint(i),f=l.x,v=l.y;ri(r,r,[f,v]),Vv(r,r,u);var c=n.getRotationOffset(i);o=c.x+(a.xOffset||0),s=c.y+(a.yOffset||0)}else o=a.x1,s=a.y1;ri(r,r,[o,s]),Ss(r,r,[a.w,a.h])}},{key:"_getAdjustedBB",value:function(r,a,n,i){var o=r.x1,s=r.y1,u=r.w,l=r.h,f=r.yOffset;a&&(o-=a,s-=a,u+=2*a,l+=2*a);var v=0,c=u*i;return n&&i<1?u=c:!n&&i<1&&(v=u-c,o+=v,u=c),{x1:o,y1:s,w:u,h:l,xOffset:v,yOffset:f}}},{key:"drawPickingRectangle",value:function(r,a,n){var i=this.atlasManager.getRenderTypeOpts(n),o=this.instanceCount;this.vertTypeBuffer.getView(o)[0]=ga;var s=this.indexBuffer.getView(o);da(a,s);var u=this.colorBuffer.getView(o);Vr([0,0,0],1,u);var l=this.transformBuffer.getMatrixView(o);this.setTransformMatrix(r,l,i),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(r,a,n){var i=this.simpleShapeOptions.get(n);if(this._isVisible(r,i)){var o=i.shapeProps,s=this._getVertTypeForShape(r,o.shape);if(s===void 0||i.isSimple&&!i.isSimple(r,this.renderTarget)){this.drawTexture(r, Line truncated
+7
View File
@@ -0,0 +1,7 @@
/*!
* Quill Editor v2.0.2
* https://quilljs.com
* Copyright (c) 2017-2024, Slab
* Copyright (c) 2014, Jason Chen
* Copyright (c) 2013, salesforce.com
*/.ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container:not(.ql-disabled) li[data-list=checked]>.ql-ui,.ql-container:not(.ql-disabled) li[data-list=unchecked]>.ql-ui{cursor:pointer}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;counter-reset:list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;-o-tab-size:4;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor p,.ql-editor ol,.ql-editor pre,.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{margin:0;padding:0}@supports (counter-set:none){.ql-editor p,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{counter-set:list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor p,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{counter-reset:list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor table{border-collapse:collapse}.ql-editor td{border:1px solid #000;padding:2px 5px}.ql-editor ol{padding-left:1.5em}.ql-editor li{list-style-type:none;padding-left:1.5em;position:relative}.ql-editor li>.ql-ui:before{display:inline-block;margin-left:-1.5em;margin-right:.3em;text-align:right;white-space:nowrap;width:1.2em}.ql-editor li[data-list=checked]>.ql-ui,.ql-editor li[data-list=unchecked]>.ql-ui{color:#777}.ql-editor li[data-list=bullet]>.ql-ui:before{content:"•"}.ql-editor li[data-list=checked]>.ql-ui:before{content:"☑"}.ql-editor li[data-list=unchecked]>.ql-ui:before{content:"☐"}@supports (counter-set:none){.ql-editor li[data-list]{counter-set:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list]{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered]{counter-increment:list-0}.ql-editor li[data-list=ordered]>.ql-ui:before{content:counter(list-0,decimal) ". "}.ql-editor li[data-list=ordered].ql-indent-1{counter-increment:list-1}.ql-editor li[data-list=ordered].ql-indent-1>.ql-ui:before{content:counter(list-1,lower-alpha) ". "}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-1{counter-set:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-2{counter-increment:list-2}.ql-editor li[data-list=ordered].ql-indent-2>.ql-ui:before{content:counter(list-2,lower-roman) ". "}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-2{counter-set:list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-3{counter-increment:list-3}.ql-editor li[data-list=ordered].ql-indent-3>.ql-ui:before{content:counter(list-3,decimal) ". "}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-3{counter-set:list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-4{counter-increment:list-4}.ql-editor li[data-list=ordered].ql-indent-4>.ql-ui:before{content:counter(list-4,lower-alpha) ". "}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-4{counter-set:list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-5{counter-increment:list-5}.ql-editor li[data-list=ordered].ql-indent-5>.ql-ui:before{content:counter(list-5,lower-roman) ". "}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-5{counter-set:list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-6{counter-increment:list-6}.ql-editor li[data-list=ordered].ql-indent-6>.ql-ui:before{content:counter(list-6,decimal) ". "}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-6{counter-set:list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-6{counter-reset:list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-7{counter-increment:list-7}.ql-editor li[data-list=ordered].ql-indent-7>.ql-ui:before{content:counter(list-7,lower-alpha) ". "Line truncated
+49
View File
@@ -0,0 +1,49 @@
var $o=Object.defineProperty;var Uo=(r,t,e)=>t in r?$o(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var Fo=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports);var O=(r,t,e)=>Uo(r,typeof t!="symbol"?t+"":t,e);import{c as me,g as Il}from"./_commonjsHelpers-Cpj98o6Y.js";var Cg=Fo((Lt,St)=>{var Rl=typeof global=="object"&&global&&global.Object===Object&&global,Ho=typeof self=="object"&&self&&self.Object===Object&&self,ne=Rl||Ho||Function("return this")(),Ee=ne.Symbol,kl=Object.prototype,zo=kl.hasOwnProperty,Ko=kl.toString,_n=Ee?Ee.toStringTag:void 0;function Go(r){var t=zo.call(r,_n),e=r[_n];try{r[_n]=void 0;var n=!0}catch{}var s=Ko.call(r);return n&&(t?r[_n]=e:delete r[_n]),s}var Vo=Object.prototype,Wo=Vo.toString;function Zo(r){return Wo.call(r)}var Xo="[object Null]",Yo="[object Undefined]",qi=Ee?Ee.toStringTag:void 0;function hn(r){return r==null?r===void 0?Yo:Xo:qi&&qi in Object(r)?Go(r):Zo(r)}function ae(r){return r!=null&&typeof r=="object"}var Oe=Array.isArray;function Ae(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}function Bl(r){return r}var Qo="[object AsyncFunction]",Jo="[object Function]",ta="[object GeneratorFunction]",ea="[object Proxy]";function ci(r){if(!Ae(r))return!1;var t=hn(r);return t==Jo||t==ta||t==Qo||t==ea}var Ls=ne["__core-js_shared__"],Oi=function(){var r=/[^.]+$/.exec(Ls&&Ls.keys&&Ls.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function na(r){return!!Oi&&Oi in r}var ra=Function.prototype,sa=ra.toString;function Re(r){if(r!=null){try{return sa.call(r)}catch{}try{return r+""}catch{}}return""}var ia=/[\\^$.*+?()[\]{}|]/g,la=/^\[object .+?Constructor\]$/,oa=Function.prototype,aa=Object.prototype,ca=oa.toString,ua=aa.hasOwnProperty,ha=RegExp("^"+ca.call(ua).replace(ia,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fa(r){if(!Ae(r)||na(r))return!1;var t=ci(r)?ha:la;return t.test(Re(r))}function da(r,t){return r==null?void 0:r[t]}function ke(r,t){var e=da(r,t);return fa(e)?e:void 0}var $s=ke(ne,"WeakMap"),Ci=Object.create,ga=function(){function r(){}return function(t){if(!Ae(t))return{};if(Ci)return Ci(t);r.prototype=t;var e=new r;return r.prototype=void 0,e}}();function pa(r,t,e){switch(e.length){case 0:return r.call(t);case 1:return r.call(t,e[0]);case 2:return r.call(t,e[0],e[1]);case 3:return r.call(t,e[0],e[1],e[2])}return r.apply(t,e)}function ma(r,t){var e=-1,n=r.length;for(t||(t=Array(n));++e<n;)t[e]=r[e];return t}var ba=800,ya=16,va=Date.now;function Ea(r){var t=0,e=0;return function(){var n=va(),s=ya-(n-e);if(e=n,s>0){if(++t>=ba)return arguments[0]}else t=0;return r.apply(void 0,arguments)}}function Aa(r){return function(){return r}}var Sr=function(){try{var r=ke(Object,"defineProperty");return r({},"",{}),r}catch{}}(),Na=Sr?function(r,t){return Sr(r,"toString",{configurable:!0,enumerable:!1,value:Aa(t),writable:!0})}:Bl,wa=Ea(Na);function Ta(r,t){for(var e=-1,n=r==null?0:r.length;++e<n&&t(r[e],e,r)!==!1;);return r}var xa=9007199254740991,La=/^(?:0|[1-9]\d*)$/;function Ml(r,t){var e=typeof r;return t=t??xa,!!t&&(e=="number"||e!="symbol"&&La.test(r))&&r>-1&&r%1==0&&r<t}function ui(r,t,e){t=="__proto__"&&Sr?Sr(r,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):r[t]=e}function zn(r,t){return r===t||r!==r&&t!==t}var Sa=Object.prototype,_a=Sa.hasOwnProperty;function Dl(r,t,e){var n=r[t];(!(_a.call(r,t)&&zn(n,e))||e===void 0&&!(t in r))&&ui(r,t,e)}function qa(r,t,e,n){var s=!e;e||(e={});for(var i=-1,o=t.length;++i<o;){var a=t[i],u=void 0;u===void 0&&(u=r[a]),s?ui(e,a,u):Dl(e,a,u)}return e}var Ii=Math.max;function Oa(r,t,e){return t=Ii(t===void 0?r.length-1:t,0),function(){for(var n=arguments,s=-1,i=Ii(n.length-t,0),o=Array(i);++s<i;)o[s]=n[t+s];s=-1;for(var a=Array(t+1);++s<t;)a[s]=n[s];return a[t]=e(o),pa(r,this,a)}}function Ca(r,t){return wa(Oa(r,t,Bl),r+"")}var Ia=9007199254740991;function jl(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Ia}function Cr(r){return r!=null&&jl(r.length)&&!ci(r)}function Ra(r,t,e){if(!Ae(e))return!1;var n=typeof t;return(n=="number"?Cr(e)&&Ml(t,e.length):n=="string"&&t in e)?zn(e[t],r):!1}function ka(r){return Ca(function(t,e){var n=-1,s=e.length,i=s>1?e[s-1]:void 0,o=s>2?e[2]:void 0;for(i=r.length>3&&typeof i=="function"?(s--,i):void 0,o&&Ra(e[0],e[1],o)&&(i=s<3?void 0:i,s=1),t=Object(t);++n<s;){var a=e[n];a&&r(t,a,n,i)}return t})}var Ba=Object.prototype;function hi(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||Ba;return r===e}function Ma(r,t){for(var e=-1,n=Array(r);++e<r;)n[e]=t(e);return n}var Da="[object Arguments]";function Ri(r){return ae(r)&&hn(r)==Da}var Pl=Object.prototype,ja=Pl.hasOwnProperty,Pa=Pl.propertyIsEnumerable,Us=Ri(function(){return arguments}())?Ri:function(r){return ae(r)&&ja.call(r,"callee")&&!Pa.call(r,"callee")};function $a(){return!1}var $l=typeof Lt=="object"&&Lt&&!Lt.nodeType&&Lt,ki=$l&&typeof St=="object"&&St&&!St.nodeType&&St,Ua=ki&&ki.exports===$l,Bi=Ua?ne.Buffer:void 0,Fa=Bi?Bi.isBuffer:void 0,Dn=Fa||$Line truncated
`){const y=new a.default(this.ops);let A=new p,w=0;for(;y.hasNext();){if(y.peekType()!=="insert")return;const x=y.peek(),C=o.default.length(x)-y.peekLength(),M=typeof x.insert=="string"?x.insert.indexOf(m,C)-C:-1;if(M<0)A.push(y.next());else if(M>0)A.push(y.next(M));else{if(f(A,y.next(1).attributes||{},w)===!1)return;w+=1,A=new p}}A.length()>0&&f(A,{},w)}invert(f){const m=new p;return this.reduce((y,A)=>{if(A.insert)m.delete(o.default.length(A));else{if(typeof A.retain=="number"&&A.attributes==null)return m.retain(A.retain),y+A.retain;if(A.delete||typeof A.retain=="number"){const w=A.delete||A.retain;return f.slice(y,y+w).forEach(C=>{A.delete?m.push(C):A.retain&&A.attributes&&m.retain(o.default.length(C),i.default.invert(A.attributes,C.attributes))}),y+w}else if(typeof A.retain=="object"&&A.retain!==null){const w=f.slice(y,y+1),x=new a.default(w.ops).next(),[C,M,z]=h(A.retain,x.insert),U=p.getHandler(C);return m.retain({[C]:U.invert(M,z)},i.default.invert(A.attributes,x.attributes)),y+1}}return y},0),m.chop()}transform(f,m=!1){if(m=!!m,typeof f=="number")return this.transformPosition(f,m);const y=f,A=new a.default(this.ops),w=new a.default(y.ops),x=new p;for(;A.hasNext()||w.hasNext();)if(A.peekType()==="insert"&&(m||w.peekType()!=="insert"))x.retain(o.default.length(A.next()));else if(w.peekType()==="insert")x.push(w.next());else{const C=Math.min(A.peekLength(),w.peekLength()),M=A.next(C),z=w.next(C);if(M.delete)continue;if(z.delete)x.push(z);else{const U=M.retain,rt=z.retain;let at=typeof rt=="object"&&rt!==null?rt:C;if(typeof U=="object"&&U!==null&&typeof rt=="object"&&rt!==null){const ft=Object.keys(U)[0];if(ft===Object.keys(rt)[0]){const Bt=p.getHandler(ft);Bt&&(at={[ft]:Bt.transform(U[ft],rt[ft],m)})}}x.retain(at,i.default.transform(M.attributes,z.attributes,m))}}return x.chop()}transformPosition(f,m=!1){m=!!m;const y=new a.default(this.ops);let A=0;for(;y.hasNext()&&A<=f;){const w=y.peekLength(),x=y.peekType();if(y.next(),x==="delete"){f-=Math.min(w,f-A);continue}else x==="insert"&&(A<f||!m)&&(f+=w);A+=w}return f}}p.Op=o.default,p.OpIterator=a.default,p.AttributeMap=i.default,p.handlers={},t.default=p,r.exports=p,r.exports.default=p}(pr,pr.exports)),pr.exports}var kt=_f();const B=Il(kt);class Kt extends _t{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}Kt.blotName="break";Kt.tagName="BR";let Ht=class extends Or{};function Mr(r){return r.replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t])}const Yt=class Yt extends mi{static compare(t,e){const n=Yt.order.indexOf(t),s=Yt.order.indexOf(e);return n>=0||s>=0?n-s:t===e?0:t<e?-1:1}formatAt(t,e,n,s){if(Yt.compare(this.statics.blotName,n)<0&&this.scroll.query(n,D.BLOT)){const i=this.isolate(t,e);s&&i.wrap(n,s)}else super.formatAt(t,e,n,s)}optimize(t){if(super.optimize(t),this.parent instanceof Yt&&Yt.compare(this.statics.blotName,this.parent.statics.blotName)>0){const e=this.parent.isolate(this.offset(),this.length());this.moveChildren(e),e.wrap(this)}}};O(Yt,"allowedChildren",[Yt,Kt,_t,Ht]),O(Yt,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);let ee=Yt;const cl=1;class pt extends $n{constructor(){super(...arguments);O(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=fo(this)),this.cache.delta}deleteAt(e,n){super.deleteAt(e,n),this.cache={}}formatAt(e,n,s,i){n<=0||(this.scroll.query(s,D.BLOCK)?e+n===this.length()&&this.format(s,i):super.formatAt(e,Math.min(n,this.length()-e-1),s,i),this.cache={})}insertAt(e,n,s){if(s!=null){super.insertAt(e,n,s),this.cache={};return}if(n.length===0)return;const i=n.split(`
`),o=i.shift();o.length>0&&(e<this.length()-1||this.children.tail==null?super.insertAt(Math.min(e,this.length()-1),o):this.children.tail.insertAt(this.children.tail.length(),o),this.cache={});let a=this;i.reduce((u,h)=>(a=a.split(u,!0),a.insertAt(0,h),h.length),e+o.length)}insertBefore(e,n){const{head:s}=this.children;super.insertBefore(e,n),s instanceof Kt&&s.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+cl),this.cache.length}moveChildren(e,n){super.moveChildren(e,n),this.cache={}}optimize(e){super.optimize(e),this.cache={}}path(e){return super.path(e,!0)}removeChild(e){super.removeChild(e),this.cache={}}split(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(n&&(e===0||e>=this.length()-cl)){const i=this.clone();return e===0?(this.parent.insertBefore(i,this),this):(this.parent.insertBefore(i,this.next),i)}const s=super.split(e,n);return this.cache={},s}}pt.blotName="block";pt.tagName="P";pt.defaultChild=Kt;pt.allowedChildren=[Kt,ee,_t,Ht];class Rt extends _t{attach(){super.attach(),this.attributes=new kr(this.domNode)}delta(){return new B().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(t,e){const n=this.scroll.query(t,D.BLOCK_ATTRIBUTE);n!=null&&this.attributes.attribute(n,e)}formatAt(t,e,n,s){this.format(n,s)}insertAt(t,e,n){if(n!=null){super.insertAt(t,e,n);return}const s=e.split(`
`),i=s.pop(),o=s.map(u=>{const h=this.scroll.create(pt.blotName);return h.insertAt(0,u),h}),a=this.split(t);o.forEach(u=>{this.parent.insertBefore(u,a)}),i&&this.parent.insertBefore(this.scroll.create("text",i),a)}}Rt.scope=D.BLOCK_BLOT;function fo(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return r.descendants(Et).reduce((e,n)=>n.length()===0?e:e.insert(n.value(),Ct(n,{},t)),new B).insert(`
`,Ct(r))}function Ct(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return r==null||("formats"in r&&typeof r.formats=="function"&&(t={...t,...r.formats()},e&&delete t["code-token"]),r.parent==null||r.parent.statics.blotName==="scroll"||r.parent.statics.scope!==r.statics.scope)?t:Ct(r.parent,t,e)}const Ot=class Ot extends _t{static value(){}constructor(t,e,n){super(t,e),this.selection=n,this.textNode=document.createTextNode(Ot.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(t,e){if(this.savedLength!==0){super.format(t,e);return}let n=this,s=0;for(;n!=null&&n.statics.scope!==D.BLOCK_BLOT;)s+=n.offset(n.parent),n=n.parent;n!=null&&(this.savedLength=Ot.CONTENTS.length,n.optimize(),n.formatAt(s,Ot.CONTENTS.length,t,e),this.savedLength=0)}index(t,e){return t===this.textNode?0:super.index(t,e)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;const t=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const e=this.prev instanceof Ht?this.prev:null,n=e?e.length():0,s=this.next instanceof Ht?this.next:null,i=s?s.text:"",{textNode:o}=this,a=o.data.split(Ot.CONTENTS).join("");o.data=Ot.CONTENTS;let u;if(e)u=e,(a||s)&&(e.insertAt(e.length(),a+i),s&&s.remove());else if(s)u=s,s.insertAt(0,a);else{const h=document.createTextNode(a);u=this.scroll.create(h),this.parent.insertBefore(u,this)}if(this.remove(),t){const h=(f,m)=>e&&f===e.domNode?m:f===o?n+m-1:s&&f===s.domNode?n+a.length+m:null,p=h(t.start.node,t.start.offset),v=h(t.end.node,t.end.offset);if(p!==null&&v!==null)return{startNode:u.domNode,startOffset:p,endNode:u.domNode,endOffset:v}}return null}update(t,e){if(t.some(n=>n.type==="characterData"&&n.target===this.textNode)){const n=this.restore();n&&(e.range=n)}}optimize(t){super.optimize(t);let{parent:e}=this;for(;e;){if(e.domNode.tagName==="A"){this.savedLength=Ot.CONTENTS.length,e.isolate(this.offset(e),this.length()).unwrap(),this.savedLength=0;break}e=e.parent}}value(){return""}};O(Ot,"blotName","cursor"),O(Ot,"className","ql-cursor"),O(Ot,"tagName","span"),O(Ot,"CONTENTS","\uFEFF");let an=Ot;var Cs={exports:{}},ul;function qf(){return ul||(ul=1,function(r){var t=Object.prototype.hasOwnProperty,e="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(e=!1));function s(u,h,p){this.fn=u,this.context=h,this.once=p||!1}function i(u,h,p,v,f){if(typeof p!="function")throw new TypeError("The listener must be a function");var m=new s(p,v||u,f),y=e?e+h:h;return u._events[y]?u._events[y].fn?u._events[y]=[u._events[y],m]:u._events[y].push(m):(u._events[y]=m,u._eventsCount++),u}function o(u,h){--u._eventsCount===0?u._events=new n:delete u._events[h]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var h=[],p,v;if(this._eventsCount===0)return h;for(v in p=this._events)t.call(p,v)&&h.push(e?v.slice(1):v);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(p)):h},a.prototype.listeners=function(h){var p=e?e+h:h,v=this._events[p];if(!v)return[];if(v.fn)return[v.fn];for(var f=0,m=v.length,y=new Array(m);f<m;f++)y[f]=v[f].fn;return y},a.prototype.listenerCount=function(h){var p=e?e+h:h,v=this._events[p];return v?v.fn?1:v.length:0},a.prototype.emit=function(h,p,v,f,m,y){var A=e?e+h:h;if(!this._events[A])return!1;var w=this._events[A],x=arguments.length,C,M;if(w.fn){switch(w.once&&this.removeListener(h,w.fn,void 0,!0),x){case 1:return w.fn.call(w.context),!0;case 2:return w.fn.call(w.context,p),!0;case 3:return w.fn.call(w.context,p,v),!0;case 4:return w.fn.call(w.context,p,v,f),!0;case 5:return w.fn.call(w.context,p,v,f,m),!0;case 6:return w.fn.call(w.context,p,v,f,m,y),!0}for(M=1,C=new Array(x-1);M<x;M++)C[M-1]=arguments[M];w.fn.apply(w.context,C)}else{var z=w.length,U;for(M=0;M<z;M++)switch(w[M].once&&this.removeListener(h,w[M].fn,void 0,!0),x){case 1:w[M].fn.call(w[M].context);break;case 2:w[M].fn.call(w[M].context,p);break;case 3:w[M].fn.call(w[M].context,p,v);break;case 4:w[M].fn.call(w[M].context,p,v,f);break;default:if(!C)for(U=1,C=new Array(x-1);U<x;U++)C[U-1]=arguments[U];w[M].fn.apply(w[M].context,C)}}return!0},a.prototype.on=function(h,p,v){return i(this,h,p,v,!1)},a.prototype.once=function(h,p,v){return i(this,h,p,v,!0)},a.prototype.removeListener=function(h,p,v,f){var m=e?e+h:h;if(!this._events[m])return this;if(!p)return o(this,m),this;var y=this._events[m];if(y.fn)y.fn===p&&(!f||y.once)&&(!v||y.context===v)&&o(this,m);else{for(var A=0,w=[],x=y.length;A<x;A++)(y[A].fn!==p||f&&!y[A].once||v&&y[A].context!==v)&&w.push(y[A]);w.length?this._events[m]=w.length===1?w[0]:w:o(this,m)}return this},a. Line truncated
`)&&(e<=o||!!this.scroll.descendant(Rt,o)[0]),this.scroll.insertAt(o,y);const[A,w]=this.scroll.line(o);let x=ve({},Ct(A));if(A instanceof pt){const[C]=A.descendant(Et,w);C&&(x=ve(x,Ct(C)))}h=kt.AttributeMap.diff(x,h)||{}}else if(typeof a.insert=="object"){const y=Object.keys(a.insert)[0];if(y==null)return o;const A=this.scroll.query(y,D.INLINE)!=null;if(A)(e<=o||this.scroll.descendant(Rt,o)[0])&&(v=!0);else if(o>0){const[w,x]=this.scroll.descendant(Et,o-1);w instanceof Ht?w.value()[x]!==`
`&&(p=!0):w instanceof _t&&w.statics.scope===D.INLINE_BLOT&&(p=!0)}if(this.scroll.insertAt(o,y,a.insert[y]),A){const[w]=this.scroll.descendant(Et,o);if(w){const x=ve({},Ct(w));h=kt.AttributeMap.diff(x,h)||{}}}}e+=u}else if(s.push(a),a.retain!==null&&typeof a.retain=="object"){const y=Object.keys(a.retain)[0];if(y==null)return o;this.scroll.updateEmbedAt(o,y,a.retain[y])}Object.keys(h).forEach(y=>{this.scroll.formatAt(o,u,y,h[y])});const f=p?1:0,m=v?1:0;return e+=f+m,s.retain(f),s.delete(m),o+u+f+m},0),s.reduce((o,a)=>typeof a.delete=="number"?(this.scroll.deleteAt(o,a.delete),o):o+kt.Op.length(a),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(n)}deleteText(t,e){return this.scroll.deleteAt(t,e),this.update(new B().retain(t).delete(e))}formatLine(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(n).forEach(i=>{this.scroll.lines(t,Math.max(e,1)).forEach(o=>{o.format(i,n[i])})}),this.scroll.optimize();const s=new B().retain(t).retain(e,nn(n));return this.update(s)}formatText(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(n).forEach(i=>{this.scroll.formatAt(t,e,i,n[i])});const s=new B().retain(t).retain(e,nn(n));return this.update(s)}getContents(t,e){return this.delta.slice(t,t+e)}getDelta(){return this.scroll.lines().reduce((t,e)=>t.concat(e.delta()),new B)}getFormat(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=[],s=[];e===0?this.scroll.path(t).forEach(a=>{const[u]=a;u instanceof pt?n.push(u):u instanceof Et&&s.push(u)}):(n=this.scroll.lines(t,e),s=this.scroll.descendants(Et,t,e));const[i,o]=[n,s].map(a=>{const u=a.shift();if(u==null)return{};let h=Ct(u);for(;Object.keys(h).length>0;){const p=a.shift();if(p==null)return h;h=Mf(Ct(p),h)}return h});return{...i,...o}}getHTML(t,e){const[n,s]=this.scroll.line(t);if(n){const i=n.length();return n.length()>=s+e&&!(s===0&&e===i)?Un(n,s,e,!0):Un(this.scroll,t,e,!0)}return""}getText(t,e){return this.getContents(t,e).filter(n=>typeof n.insert=="string").map(n=>n.insert).join("")}insertContents(t,e){const n=hl(e),s=new B().retain(t).concat(n);return this.scroll.insertContents(t,n),this.update(s)}insertEmbed(t,e,n){return this.scroll.insertAt(t,e,n),this.update(new B().retain(t).insert({[e]:n}))}insertText(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return e=e.replace(/\r\n/g,`
`).replace(/\r/g,`
`),this.scroll.insertAt(t,e),Object.keys(n).forEach(s=>{this.scroll.formatAt(t,e.length,s,n[s])}),this.update(new B().retain(t).insert(e,nn(n)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;const t=this.scroll.children.head;if((t==null?void 0:t.statics.blotName)!==pt.blotName)return!1;const e=t;return e.children.length>1?!1:e.children.head instanceof Kt}removeFormat(t,e){const n=this.getText(t,e),[s,i]=this.scroll.line(t+e);let o=0,a=new B;s!=null&&(o=s.length()-i,a=s.delta().slice(i,i+o-1).insert(`
`));const h=this.getContents(t,e+o).diff(new B().insert(n).concat(a)),p=new B().retain(t).concat(h);return this.applyDelta(p)}update(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;const s=this.delta;if(e.length===1&&e[0].type==="characterData"&&e[0].target.data.match(kf)&&this.scroll.find(e[0].target)){const i=this.scroll.find(e[0].target),o=Ct(i),a=i.offset(this.scroll),u=e[0].oldValue.replace(an.CONTENTS,""),h=new B().insert(u),p=new B().insert(i.value()),v=n&&{oldRange:fl(n.oldRange,-a),newRange:fl(n.newRange,-a)};t=new B().retain(a).concat(h.diff(p,v)).reduce((m,y)=>y.insert?m.insert(y.insert,o):m.push(y),new B),this.delta=s.compose(t)}else this.delta=this.getDelta(),(!t||!pi(s.compose(t),this.delta))&&(t=s.diff(this.delta,n));return t}}function tn(r,t,e){if(r.length===0){const[m]=Bs(e.pop());return t<=0?`</li></${m}>`:`</li></${m}>${tn([],t-1,e)}`}const[{child:n,offset:s,length:i,indent:o,type:a},...u]=r,[h,p]=Bs(a);if(o>t)return e.push(a),o===t+1?`<${h}><li${p}>${Un(n,s,i)}${tn(u,o,e)}`:`<${h}><li>${tn(r,t+1,e)}`;const v=e[e.length-1];if(o===t&&a===v)return`</li><li${p}>${Un(n,s,i)}${tn(u,o,e)}`;const[f]=Bs(e.pop());return`</li></${f}>${tn(r,t-1,e)}`}function Un(r,t,e){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in r&&typeof r.html=="function")return r.html(t,e);if(r instanceof Ht)return Mr(r.value().slice(t,t+e));if(r instanceof Ft){if(r.statics.blotName==="list-container"){const h=[];return r.children.forEachAt(t,e,(p,v,f)=>{const m="formats"in p&&typeof p.formats=="function"?p.formats():{};h.push({child:p,offset:v,length:f,indent:m.indent||0,type:m.list})}),tn(h,-1,[])}const s=[];if(r.children.forEachAt(t,e,(h,p,v)=>{s.push(Un(h,p,v))}),n||r.statics.blotName==="list")return s.join("");const{outerHTML:i,innerHTML:o}=r.domNode,[a,u]=i.split(`>${o}<`);return a==="<table"?`<table style="border: 1px solid #000;">${s.join("")}<${u}`:`${a}>${s.join("")}<${u}`}return r.domNode instanceof Element?r.domNode.outerHTML:""}function Mf(r,t){return Object.keys(t).reduce((e,n)=>{if(r[n]==null)return e;const s=t[n];return s===r[n]?e[n]=s:Array.isArray(s)?s.indexOf(r[n])<0?e[n]=s.concat([r[n]]):e[n]=s:e[n]=[s,r[n]],e},{})}function Bs(r){const t=r==="ordered"?"ol":"ul";switch(r){case"checked":return[t,' data-list="checked"'];case"unchecked":return[t,' data-list="unchecked"'];default:return[t,""]}}function hl(r){return r.reduce((t,e)=>{if(typeof e.insert=="string"){const n=e.insert.replace(/\r\n/g,`
`).replace(/\r/g,`
`);return t.insert(n,e.attributes)}return t.push(e)},new B)}function fl(r,t){let{index:e,length:n}=r;return new Ie(e+t,n)}function Df(r){const t=[];return r.forEach(e=>{typeof e.insert=="string"?e.insert.split(`
`).forEach((s,i)=>{i&&t.push({insert:`
`,attributes:e.attributes}),s&&t.push({insert:s,attributes:e.attributes})}):t.push(e)}),t}class Gt{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=t,this.options=e}}O(Gt,"DEFAULTS",{});const vr="\uFEFF";class yi extends _t{constructor(t,e){super(t,e),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(n=>{this.contentNode.appendChild(n)}),this.leftGuard=document.createTextNode(vr),this.rightGuard=document.createTextNode(vr),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(t,e){return t===this.leftGuard?0:t===this.rightGuard?1:super.index(t,e)}restore(t){let e=null,n;const s=t.data.split(vr).join("");if(t===this.leftGuard)if(this.prev instanceof Ht){const i=this.prev.length();this.prev.insertAt(i,s),e={startNode:this.prev.domNode,startOffset:i+s.length}}else n=document.createTextNode(s),this.parent.insertBefore(this.scroll.create(n),this),e={startNode:n,startOffset:s.length};else t===this.rightGuard&&(this.next instanceof Ht?(this.next.insertAt(0,s),e={startNode:this.next.domNode,startOffset:s.length}):(n=document.createTextNode(s),this.parent.insertBefore(this.scroll.create(n),this.next),e={startNode:n,startOffset:s.length}));return t.data=vr,e}update(t,e){t.forEach(n=>{if(n.type==="characterData"&&(n.target===this.leftGuard||n.target===this.rightGuard)){const s=this.restore(n.target);s&&(e.range=s)}})}}class jf{constructor(t,e){O(this,"isComposing",!1);this.scroll=t,this.emitter=e,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",t=>{this.isComposing||this.handleCompositionStart(t)}),this.scroll.domNode.addEventListener("compositionend",t=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(t)})})}handleCompositionStart(t){const e=t.target instanceof Node?this.scroll.find(t.target,!0):null;e&&!(e instanceof yi)&&(this.emitter.emit(R.events.COMPOSITION_BEFORE_START,t),this.scroll.batchStart(),this.emitter.emit(R.events.COMPOSITION_START,t),this.isComposing=!0)}handleCompositionEnd(t){this.emitter.emit(R.events.COMPOSITION_BEFORE_END,t),this.scroll.batchEnd(),this.emitter.emit(R.events.COMPOSITION_END,t),this.isComposing=!1}}const Bn=class Bn{constructor(t,e){O(this,"modules",{});this.quill=t,this.options=e}init(){Object.keys(this.options.modules).forEach(t=>{this.modules[t]==null&&this.addModule(t)})}addModule(t){const e=this.quill.constructor.import(`modules/${t}`);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}};O(Bn,"DEFAULTS",{modules:{}}),O(Bn,"themes",{default:Bn});let cn=Bn;const Pf=r=>r.parentElement||r.getRootNode().host||null,$f=r=>{const t=r.getBoundingClientRect(),e="offsetWidth"in r&&Math.abs(t.width)/r.offsetWidth||1,n="offsetHeight"in r&&Math.abs(t.height)/r.offsetHeight||1;return{top:t.top,right:t.left+r.clientWidth*e,bottom:t.top+r.clientHeight*n,left:t.left}},Er=r=>{const t=parseInt(r,10);return Number.isNaN(t)?0:t},dl=(r,t,e,n,s,i)=>r<e&&t>n?0:r<e?-(e-r+s):t>n?t-r>n-e?r+s-e:t-n+i:0,Uf=(r,t)=>{var i,o,a;const e=r.ownerDocument;let n=t,s=r;for(;s;){const u=s===e.body,h=u?{top:0,right:((i=window.visualViewport)==null?void 0:i.width)??e.documentElement.clientWidth,bottom:((o=window.visualViewport)==null?void 0:o.height)??e.documentElement.clientHeight,left:0}:$f(s),p=getComputedStyle(s),v=dl(n.left,n.right,h.left,h.right,Er(p.scrollPaddingLeft),Er(p.scrollPaddingRight)),f=dl(n.top,n.bottom,h.top,h.bottom,Er(p.scrollPaddingTop),Er(p.scrollPaddingBottom));if(v||f)if(u)(a=e.defaultView)==null||a.scrollBy(v,f);else{const{scrollLeft:m,scrollTop:y}=s;f&&(s.scrollTop+=f),v&&(s.scrollLeft+=v);const A=s.scrollLeft-m,w=s.scrollTop-y;n={left:n.left-A,top:n.top-w,right:n.right-A,bottom:n.bottom-w}}s=u||p.position==="fixed"?null:Pf(s)}},Ff=100,Hf=["block","break","cursor","inline","scroll","text"],zf=(r,t,e)=>{const n=new on;return Hf.forEach(s=>{const i=t.query(s);i&&n.register(i)}),r.forEach(s=>{let i=t.query(s);i||e.error(`Cannot register "${s}" specified in "formats" config. Are you sure it was registered?`);let o=0;for(;i;)if(n.register(i),i="blotName"in i?i.requiredContainer??null:null,o+=1,o>Ff){e.error(`Cycle detected in registering blot requiredContainer: "${s}"`);break}}),n},sn=fe("quill"),Ar=new on;Ft.uiClass="ql-ui";const Pt=class Pt{static debug(t){t===!0&&(t="log"),fe.level(t)}static find(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Qs.get(t)||Ar.find(t,e)}static import(t){return this.imports[t]==null&&sn.error(`Cannot import ${t}. Are you sure it was registered?`),this.imports[t]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){const t=arguments.length<=0?void 0:arguments[0],e=!!(!(arguments.length<=1)&&arguments[1]),n="attrName"in t?t.attrName:t.blotName;typeof n=="string"?this.register(`formats/${n}`,t,e):Object.keys Line truncated
`});this.setContents(o)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof t=="string"){const n=t;t=document.createElement("div"),t.classList.add(n)}return this.container.insertBefore(t,e),t}blur(){this.selection.setRange(null)}deleteText(t,e,n){return[t,e,,n]=oe(t,e,n),jt.call(this,()=>this.editor.deleteText(t,e),n,t,-1*e)}disable(){this.enable(!1)}editReadOnly(t){this.allowReadOnlyEdits=!0;const e=t();return this.allowReadOnlyEdits=!1,e}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}focus(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),t.preventScroll||this.scrollSelectionIntoView()}format(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:R.sources.API;return jt.call(this,()=>{const s=this.getSelection(!0);let i=new B;if(s==null)return i;if(this.scroll.query(t,D.BLOCK))i=this.editor.formatLine(s.index,s.length,{[t]:e});else{if(s.length===0)return this.selection.format(t,e),i;i=this.editor.formatText(s.index,s.length,{[t]:e})}return this.setSelection(s,R.sources.SILENT),i},n)}formatLine(t,e,n,s,i){let o;return[t,e,o,i]=oe(t,e,n,s,i),jt.call(this,()=>this.editor.formatLine(t,e,o),i,t,0)}formatText(t,e,n,s,i){let o;return[t,e,o,i]=oe(t,e,n,s,i),jt.call(this,()=>this.editor.formatText(t,e,o),i,t,0)}getBounds(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=null;if(typeof t=="number"?n=this.selection.getBounds(t,e):n=this.selection.getBounds(t.index,t.length),!n)return null;const s=this.container.getBoundingClientRect();return{bottom:n.bottom-s.top,height:n.height,left:n.left-s.left,right:n.right-s.left,top:n.top-s.top,width:n.width}}getContents(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-t;return[t,e]=oe(t,e),this.editor.getContents(t,e)}getFormat(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof t=="number"?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}getIndex(t){return t.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(t){return this.scroll.leaf(t)}getLine(t){return this.scroll.line(t)}getLines(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof t!="number"?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}getModule(t){return this.theme.modules[t]}getSelection(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return typeof t=="number"&&(e=e??this.getLength()-t),[t,e]=oe(t,e),this.editor.getHTML(t,e)}getText(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return typeof t=="number"&&(e=e??this.getLength()-t),[t,e]=oe(t,e),this.editor.getText(t,e)}hasFocus(){return this.selection.hasFocus()}insertEmbed(t,e,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Pt.sources.API;return jt.call(this,()=>this.editor.insertEmbed(t,e,n),s,t)}insertText(t,e,n,s,i){let o;return[t,,o,i]=oe(t,0,n,s,i),jt.call(this,()=>this.editor.insertText(t,e,o),i,t,e.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(t,e,n){return[t,e,,n]=oe(t,e,n),jt.call(this,()=>this.editor.removeFormat(t,e),n,t)}scrollRectIntoView(t){Uf(this.root,t)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const t=this.selection.lastRange,e=t&&this.selection.getBounds(t.index,t.length);e&&this.scrollRectIntoView(e)}setContents(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:R.sources.API;return jt.call(this,()=>{t=new B(t);const n=this.getLength(),s=this.editor.deleteText(0,n),i=this.editor.insertContents(0,t),o=this.editor.deleteText(this.getLength()-1,1);return s.compose(i).compose(o)},e)}setSelection(t,e,n){t==null?this.selection.setRange(null,e||Pt.sources.API):([t,e,,n]=oe(t,e,n),this.selection.setRange(new Ie(Math.max(0,t),e),n),n!==R.sources.SILENT&&this.scrollSelectionIntoView())}setText(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:R.sources.API;const n=new B().insert(t);return this.setContents(n,e)}update Line truncated
`)?s.insertAt(0,e.slice(0,-1),n):s.insertAt(0,e,n)}else{const s=this.scroll.create(e,n);this.appendChild(s)}else super.insertAt(t,e,n);this.optimize()}insertBefore(t,e){if(t.statics.scope===D.INLINE_BLOT){const n=this.scroll.create(this.statics.defaultChild.blotName);n.appendChild(t),super.insertBefore(n,e)}else super.insertBefore(t,e)}insertContents(t,e){const n=this.deltaToRenderBlocks(e.concat(new B().insert(`
`))),s=n.pop();if(s==null)return;this.batchStart();const i=n.shift();if(i){const u=i.type==="block"&&(i.delta.length()===0||!this.descendant(Rt,t)[0]&&t<this.length()),h=i.type==="block"?i.delta:new B().insert({[i.key]:i.value});Ds(this,t,h);const p=i.type==="block"?1:0,v=t+h.length()+p;u&&this.insertAt(v-1,`
`);const f=Ct(this.line(t)[0]),m=kt.AttributeMap.diff(f,i.attributes)||{};Object.keys(m).forEach(y=>{this.formatAt(v-1,1,y,m[y])}),t=v}let[o,a]=this.children.find(t);if(n.length&&(o&&(o=o.split(a),a=0),n.forEach(u=>{if(u.type==="block"){const h=this.createBlock(u.attributes,o||void 0);Ds(h,0,u.delta)}else{const h=this.create(u.key,u.value);this.insertBefore(h,o||void 0),Object.keys(u.attributes).forEach(p=>{h.format(p,u.attributes[p])})}})),s.type==="block"&&s.delta.length()){const u=o?o.offset(o.scroll)+a:this.length();Ds(this,u,s.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(t){const e=this.path(t).pop();if(!e)return[null,-1];const[n,s]=e;return n instanceof Et?[n,s]:[null,-1]}line(t){return t===this.length()?this.line(t-1):this.descendant(bl,t)}lines(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;const n=(s,i,o)=>{let a=[],u=o;return s.children.forEachAt(i,o,(h,p,v)=>{bl(h)?a.push(h):h instanceof Br&&(a=a.concat(n(h,p,u))),u-=v}),a};return n(this,t,e)}optimize(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(t,e),t.length>0&&this.emitter.emit(R.events.SCROLL_OPTIMIZE,t,e))}path(t){return super.path(t).slice(1)}remove(){}update(t){if(this.batch){Array.isArray(t)&&(this.batch=this.batch.concat(t));return}let e=R.sources.USER;typeof t=="string"&&(e=t),Array.isArray(t)||(t=this.observer.takeRecords()),t=t.filter(n=>{let{target:s}=n;const i=this.find(s,!0);return i&&!yl(i)}),t.length>0&&this.emitter.emit(R.events.SCROLL_BEFORE_UPDATE,e,t),super.update(t.concat([])),t.length>0&&this.emitter.emit(R.events.SCROLL_UPDATE,e,t)}updateEmbedAt(t,e,n){const[s]=this.descendant(i=>i instanceof Rt,t);s&&s.statics.blotName===e&&yl(s)&&s.updateContent(n)}handleDragStart(t){t.preventDefault()}deltaToRenderBlocks(t){const e=[];let n=new B;return t.forEach(s=>{const i=s==null?void 0:s.insert;if(i)if(typeof i=="string"){const o=i.split(`
`);o.slice(0,-1).forEach(u=>{n.insert(u,s.attributes),e.push({type:"block",delta:n,attributes:s.attributes??{}}),n=new B});const a=o[o.length-1];a&&n.insert(a,s.attributes)}else{const o=Object.keys(i)[0];if(!o)return;this.query(o,D.INLINE)?n.push(s):(n.length()&&e.push({type:"block",delta:n,attributes:{}}),n=new B,e.push({type:"blockEmbed",key:o,value:i[o],attributes:s.attributes??{}}))}}),n.length()&&e.push({type:"block",delta:n,attributes:{}}),e}createBlock(t,e){let n;const s={};Object.entries(t).forEach(a=>{let[u,h]=a;this.query(u,D.BLOCK&D.BLOT)!=null?n=u:s[u]=h});const i=this.create(n||this.statics.defaultChild.blotName,n?t[n]:void 0);this.insertBefore(i,e||void 0);const o=i.length();return Object.entries(s).forEach(a=>{let[u,h]=a;i.formatAt(0,o,u,h)}),i}}O(en,"blotName","scroll"),O(en,"className","ql-editor"),O(en,"tagName","DIV"),O(en,"defaultChild",pt),O(en,"allowedChildren",[pt,Rt,Me]);function Ds(r,t,e){e.reduce((n,s)=>{const i=kt.Op.length(s);let o=s.attributes||{};if(s.insert!=null){if(typeof s.insert=="string"){const a=s.insert;r.insertAt(n,a);const[u]=r.descendant(Et,n),h=Ct(u);o=kt.AttributeMap.diff(h,o)||{}}else if(typeof s.insert=="object"){const a=Object.keys(s.insert)[0];if(a==null)return n;if(r.insertAt(n,a,s.insert[a]),r.scroll.query(a,D.INLINE)!=null){const[h]=r.descendant(Et,n),p=Ct(h);o=kt.AttributeMap.diff(p,o)||{}}}}return Object.keys(o).forEach(a=>{r.formatAt(n,i,a,o[a])}),n+i},t)}const vi={scope:D.BLOCK,whitelist:["right","center","justify"]},Gf=new te("align","align",vi),po=new zt("align","ql-align",vi),mo=new Ne("align","text-align",vi);class bo extends Ne{value(t){let e=super.value(t);return e.startsWith("rgb(")?(e=e.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${e.split(",").map(s=>`00${parseInt(s,10).toString(16)}`.slice(-2)).join("")}`):e}}const Vf=new zt("color","ql-color",{scope:D.INLINE}),Ei=new bo("color","color",{scope:D.INLINE}),Wf=new zt("background","ql-bg",{scope:D.INLINE}),Ai=new bo("background","background-color",{scope:D.INLINE});class De extends Me{static create(t){const e=super.create(t);return e.setAttribute("spellcheck","false"),e}code(t,e){return this.children.map(n=>n.length()<=1?"":n.domNode.innerText).join(`
`).slice(t,t+e)}html(t,e){return`<pre>
${Mr(this.code(t,e))}
</pre>`}}class At extends pt{static register(){N.register(De)}}O(At,"TAB"," ");class Ni extends ee{}Ni.blotName="code";Ni.tagName="CODE";At.blotName="code-block";At.className="ql-code-block";At.tagName="DIV";De.blotName="code-block-container";De.className="ql-code-block-container";De.tagName="DIV";De.allowedChildren=[At];At.allowedChildren=[Ht,Kt,an];At.requiredContainer=De;const wi={scope:D.BLOCK,whitelist:["rtl"]},yo=new te("direction","dir",wi),vo=new zt("direction","ql-direction",wi),Eo=new Ne("direction","direction",wi),Ao={scope:D.INLINE,whitelist:["serif","monospace"]},No=new zt("font","ql-font",Ao);class Zf extends Ne{value(t){return super.value(t).replace(/["']/g,"")}}const wo=new Zf("font","font-family",Ao),To=new zt("size","ql-size",{scope:D.INLINE,whitelist:["small","large","huge"]}),xo=new Ne("size","font-size",{scope:D.INLINE,whitelist:["10px","18px","32px"]}),Xf=fe("quill:keyboard"),Yf=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class Dr extends Gt{static match(t,e){return["altKey","ctrlKey","metaKey","shiftKey"].some(n=>!!e[n]!==t[n]&&e[n]!==null)?!1:e.key===t.key||e.key===t.which}constructor(t,e){super(t,e),this.bindings={},Object.keys(this.options.bindings).forEach(n=>{this.options.bindings[n]&&this.addBinding(this.options.bindings[n])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=Jf(t);if(s==null){Xf.warn("Attempted to add invalid keyboard binding",s);return}typeof e=="function"&&(e={handler:e}),typeof n=="function"&&(n={handler:n}),(Array.isArray(s.key)?s.key:[s.key]).forEach(o=>{const a={...s,key:o,...e,...n};this.bindings[a.key]=this.bindings[a.key]||[],this.bindings[a.key].push(a)})}listen(){this.quill.root.addEventListener("keydown",t=>{if(t.defaultPrevented||t.isComposing||t.keyCode===229&&(t.key==="Enter"||t.key==="Backspace"))return;const s=(this.bindings[t.key]||[]).concat(this.bindings[t.which]||[]).filter(x=>Dr.match(t,x));if(s.length===0)return;const i=N.find(t.target,!0);if(i&&i.scroll!==this.quill.scroll)return;const o=this.quill.getSelection();if(o==null||!this.quill.hasFocus())return;const[a,u]=this.quill.getLine(o.index),[h,p]=this.quill.getLeaf(o.index),[v,f]=o.length===0?[h,p]:this.quill.getLeaf(o.index+o.length),m=h instanceof Or?h.value().slice(0,p):"",y=v instanceof Or?v.value().slice(f):"",A={collapsed:o.length===0,empty:o.length===0&&a.length()<=1,format:this.quill.getFormat(o),line:a,offset:u,prefix:m,suffix:y,event:t};s.some(x=>{if(x.collapsed!=null&&x.collapsed!==A.collapsed||x.empty!=null&&x.empty!==A.empty||x.offset!=null&&x.offset!==A.offset)return!1;if(Array.isArray(x.format)){if(x.format.every(C=>A.format[C]==null))return!1}else if(typeof x.format=="object"&&!Object.keys(x.format).every(C=>x.format[C]===!0?A.format[C]!=null:x.format[C]===!1?A.format[C]==null:pi(x.format[C],A.format[C])))return!1;return x.prefix!=null&&!x.prefix.test(A.prefix)||x.suffix!=null&&!x.suffix.test(A.suffix)?!1:x.handler.call(this,o,A,x)!==!0})&&t.preventDefault()})}handleBackspace(t,e){const n=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;if(t.index===0||this.quill.getLength()<=1)return;let s={};const[i]=this.quill.getLine(t.index);let o=new B().retain(t.index-n).delete(n);if(e.offset===0){const[a]=this.quill.getLine(t.index-1);if(a&&!(a.statics.blotName==="block"&&a.length()<=1)){const h=i.formats(),p=this.quill.getFormat(t.index-1,1);if(s=kt.AttributeMap.diff(h,p)||{},Object.keys(s).length>0){const v=new B().retain(t.index+i.length()-2).retain(1,s);o=o.compose(v)}}}this.quill.updateContents(o,N.sources.USER),this.quill.focus()}handleDelete(t,e){const n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(t.index>=this.quill.getLength()-n)return;let s={};const[i]=this.quill.getLine(t.index);let o=new B().retain(t.index).delete(n);if(e.offset>=i.length()-1){const[a]=this.quill.getLine(t.index+1);if(a){const u=i.formats(),h=this.quill.getFormat(t.index,1);s=kt.AttributeMap.diff(u,h)||{},Object.keys(s).length>0&&(o=o.retain(a.length()-1).retain(1,s))}}this.quill.updateContents(o,N.sources.USER),this.quill.focus()}handleDeleteRange(t){Ti({range:t,quill:this.quill}),this.quill.focus()}handleEnter(t,e){const n=ObLine truncated
`,n);this.quill.updateContents(s,N.sources.USER),this.quill.setSelection(t.index+1,N.sources.SILENT),this.quill.focus()}}const Qf={bindings:{bold:js("bold"),italic:js("italic"),underline:js("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(r,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","+1",N.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(r,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","-1",N.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(r,t){t.format.indent!=null?this.quill.format("indent","-1",N.sources.USER):t.format.list!=null&&this.quill.format("list",!1,N.sources.USER)}},"indent code-block":vl(!0),"outdent code-block":vl(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(r){this.quill.deleteText(r.index-1,1,N.sources.USER)}},tab:{key:"Tab",handler(r,t){if(t.format.table)return!0;this.quill.history.cutoff();const e=new B().retain(r.index).delete(r.length).insert(" ");return this.quill.updateContents(e,N.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(r.index+1,N.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,N.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(r,t){const e={list:!1};t.format.indent&&(e.indent=!1),this.quill.formatLine(r.index,r.length,e,N.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(r){const[t,e]=this.quill.getLine(r.index),n={...t.formats(),list:"checked"},s=new B().retain(r.index).insert(`
`,n).retain(t.length()-e-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,N.sources.USER),this.quill.setSelection(r.index+1,N.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(r,t){const[e,n]=this.quill.getLine(r.index),s=new B().retain(r.index).insert(`
`,t.format).retain(e.length()-n-1).retain(1,{header:null});this.quill.updateContents(s,N.sources.USER),this.quill.setSelection(r.index+1,N.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(r){const t=this.quill.getModule("table");if(t){const[e,n,s,i]=t.getTable(r),o=td(e,n,s,i);if(o==null)return;let a=e.offset();if(o<0){const u=new B().retain(a).insert(`
`);this.quill.updateContents(u,N.sources.USER),this.quill.setSelection(r.index+1,r.length,N.sources.SILENT)}else if(o>0){a+=e.length();const u=new B().retain(a).insert(`
`);this.quill.updateContents(u,N.sources.USER),this.quill.setSelection(a,N.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(r,t){const{event:e,line:n}=t,s=n.offset(this.quill.scroll);e.shiftKey?this.quill.setSelection(s-1,N.sources.USER):this.quill.setSelection(s+n.length(),N.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(r,t){if(this.quill.scroll.query("list")==null)return!0;const{length:e}=t.prefix,[n,s]=this.quill.getLine(r.index);if(s>e)return!0;let i;switch(t.prefix.trim()){case"[]":case"[ ]":i="unchecked";break;case"[x]":i="checked";break;case"-":case"*":i="bullet";break;default:i="ordered"}this.quill.insertText(r.index," ",N.sources.USER),this.quill.history.cutoff();const o=new B().retain(r.index-s).delete(e+1).retain(n.length()-2-s).retain(1,{list:i});return this.quill.updateContents(o,N.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(r.index-e,N.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(r){const[t,e]=this.quill.getLine(r.index);let n=2,s=t;for(;s!=null&&s.length()<=1&&s.formats()["code-block"];)if(s=s.prev,n-=1,n<=0){const i=new B().retain(r.index+t.length()-e-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(i,N.sources.USER),this.quill.setSelection(r.index-1,N.sources.SILENT),!1}return!0}},"embed left":Nr("ArrowLeft",!1),"embed left shift":Nr("ArrowLeft",!0),"embed right":Nr("ArrowRight",!1),"embed right shift":Nr("ArrowRight",!0),"table down":El(!1),"table up":El(!0)}};Dr.DEFAULTS=Qf;function vl(r){return{key:"Tab",shiftKey:!r,format:{"code-block":!0},handler(t,e){let{event:n}=e;const s=this.quill.scroll.query("code-block"),{TAB:i}=s;if(t.length===0&&!n.shiftKey){this.quill.insertText(t.index,i,N.sources.USER),this.quill.setSelection(t.index+i.length,N.sources.SILENT);return}const o=t.length===0?this.quill.getLines(t.index,1):this.quill.getLines(t);let{index:a,length:u}=t;o.forEach((h,p)=>{r?(h.insertAt(0,i),p===0?a+=i.length:u+=i.length):h.domNode.textContent.startsWith(i)&&(h.deleteAt(0,i.length),p===0?a-=i.length:u-=i.length)}),this.quill.update(N.sources.USER),this.quill.setSelection(a,u,N.sources.SILENT)}}}function Nr(r,t){return{key:r,shiftKey:t,altKey:null,[r==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(n){let{index:s}=n;r==="ArrowRight"&&(s+=n.length+1);const[i]=this.quill.getLeaf(s);return i instanceof _t?(r==="ArrowLeft"?t?this.quill.setSelection(n.index-1,n.length+1,N.sources.USER):this.quill.setSelection(n.index-1,N.sources.USER):t?this.quill.setSelection(n.index,n.length+1,N.sources.USER):this.quill.setSelection(n.index+n.length+1,N.sources.USER),!1):!0}}}function js(r){return{key:r[0],shortKey:!0,handler(t,e){this.quill.format(r,!e.format[r],N.sources.USER)}}}function El(r){return{key:r?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(t,e){const n=r?"prev":"next",s=e.line,i=s.parent[n];if(i!=null){if(i.statics.blotName==="table-row"){let o=i.children.head,a=s;for(;a.prev!=null;)a=a.prev,o=o.next;const u=o.offset(this.quill.scroll)+Math.min(e.offset,o.length()-1);this.quill.setSelection(u,0,N.sources.USER)}}else{const o=s.table()[n];o!=null&&(r?this.quill.setSelection(o.offset(this.quill.scroll)+o.length()-1,0,N.sources.USER):this.quill.setSelection(o.offset(this.quill.scroll),0,N.sources.USER))}return!1}}}function Jf(r){if(typeof r=="string"||typeof r=="number")r={key:r};else if(typeof r=="object")r=nn(r);else return null;return r.shortKey&&(r[Yf]=r.shortKey,delete r.shortKey),r}function Ti(r){let{quill:t,range:e}=r;const n=t.getLines(e);let s={};if(n.length>1){const i=n[0].formats(),o=n[n.length-1].formats();s=kt.AttributeMap.diff(o,i)||{}}t.deleteText(e,N.sources.USER),Object.keys(s).length>0&&t.formatLine(e.index,1,s,N.sources.USER),t.setSelection(e.index,N.sources.SILENT)}function td(r,t,e,n){return t.prev==null&&t.next==null?e.prev==null&&e.next==null?n===0?-1:1:e.prev==null?-1:1:t.prev==null?-1:t.next==null?1:null}const ed=/font-weight:\s*normal/,nd=["P","OL","UL"],Al=r=>r&&nd.includes(r.tagName),rd=r=>{Array.from(r.querySelectorAll("br")).filter(t=>Al(t.previousElementSibling)&&Al(t.nextElementSibling)).forEach(t=>{var e;(e=t.parentNode)==null||e.removeChild(t)})},sd=r=>{Array.from(r.querySelectorAll('b[style*="font-weight"]')).filter(t=>{var e;return(e=t.getAttribute("style"))==null?void 0:e.match(ed)}).forEach(t=>{var n;const e=r.createDocumentFragment();e.append(...t.childNodes),(n=t.parentNode)==null||n.replaceChild(e,t)})};function id(r){r.querySelector('[id^="docs-internal-guid-"]')&&(sd(r),rd(r))}const ld=/\bmso-list:[^;]*ignore/i,od=/\bmso-list:[^;]*\bl(\d+)/i,ad=/\bmso-list:[^;]*\blevel(\d+)/i,cd=(r,t)=>{const e=r.getAttribute("style"),n=e==null?void 0:e.match(od);if(!n)return null;const s=Number(n[1]),i=e==null?void 0:e.match(ad),o=i?Number(i[1]):1,a=new RegExp(`@list l${s}:level${o}\\s*\\{Line truncated
`)&&(i.ops[i.ops.length-1].attributes==null||s.table)?i.compose(new B().retain(i.length()-1).delete(1)):i}normalizeHTML(t){dd(t)}convertHTML(t){const e=new DOMParser().parseFromString(t,"text/html");this.normalizeHTML(e);const n=e.body,s=new WeakMap,[i,o]=this.prepareMatching(n,s);return xi(this.quill.scroll,n,i,o,s)}dangerouslyPasteHTML(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:N.sources.API;if(typeof t=="string"){const s=this.convert({html:t,text:""});this.quill.setContents(s,e),this.quill.setSelection(0,N.sources.SILENT)}else{const s=this.convert({html:e,text:""});this.quill.updateContents(new B().retain(t).concat(s),n),this.quill.setSelection(t+s.length(),N.sources.SILENT)}}onCaptureCopy(t){var o,a;let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(t.defaultPrevented)return;t.preventDefault();const[n]=this.quill.selection.getRange();if(n==null)return;const{html:s,text:i}=this.onCopy(n,e);(o=t.clipboardData)==null||o.setData("text/plain",i),(a=t.clipboardData)==null||a.setData("text/html",s),e&&Ti({range:n,quill:this.quill})}normalizeURIList(t){return t.split(/\r?\n/).filter(e=>e[0]!=="#").join(`
`)}onCapturePaste(t){var o,a,u,h,p;if(t.defaultPrevented||!this.quill.isEnabled())return;t.preventDefault();const e=this.quill.getSelection(!0);if(e==null)return;const n=(o=t.clipboardData)==null?void 0:o.getData("text/html");let s=(a=t.clipboardData)==null?void 0:a.getData("text/plain");if(!n&&!s){const v=(u=t.clipboardData)==null?void 0:u.getData("text/uri-list");v&&(s=this.normalizeURIList(v))}const i=Array.from(((h=t.clipboardData)==null?void 0:h.files)||[]);if(!n&&i.length>0){this.quill.uploader.upload(e,i);return}if(n&&i.length>0){const v=new DOMParser().parseFromString(n,"text/html");if(v.body.childElementCount===1&&((p=v.body.firstElementChild)==null?void 0:p.tagName)==="IMG"){this.quill.uploader.upload(e,i);return}}this.onPaste(e,{html:n,text:s})}onCopy(t){const e=this.quill.getText(t);return{html:this.quill.getSemanticHTML(t),text:e}}onPaste(t,e){let{text:n,html:s}=e;const i=this.quill.getFormat(t.index),o=this.convert({text:n,html:s},i);gd.log("onPaste",o,{text:n,html:s});const a=new B().retain(t.index).delete(t.length).concat(o);this.quill.updateContents(a,N.sources.USER),this.quill.setSelection(a.length()-t.length,N.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(t,e){const n=[],s=[];return this.matchers.forEach(i=>{const[o,a]=i;switch(o){case Node.TEXT_NODE:s.push(a);break;case Node.ELEMENT_NODE:n.push(a);break;default:Array.from(t.querySelectorAll(o)).forEach(u=>{if(e.has(u)){const h=e.get(u);h==null||h.push(a)}else e.set(u,[a])});break}}),[n,s]}}O(Lo,"DEFAULTS",{matchers:[]});function je(r,t,e,n){return n.query(t)?r.reduce((s,i)=>{if(!i.insert)return s;if(i.attributes&&i.attributes[t])return s.push(i);const o=e?{[t]:e}:{};return s.insert(i.insert,{...o,...i.attributes})},new B):r}function Kn(r,t){let e="";for(let n=r.ops.length-1;n>=0&&e.length<t.length;--n){const s=r.ops[n];if(typeof s.insert!="string")break;e=s.insert+e}return e.slice(-1*t.length)===t}function be(r,t){if(!(r instanceof Element))return!1;const e=t.query(r);return e&&e.prototype instanceof _t?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(r.tagName.toLowerCase())}function bd(r,t){return r.previousElementSibling&&r.nextElementSibling&&!be(r.previousElementSibling,t)&&!be(r.nextElementSibling,t)}const wr=new WeakMap;function So(r){return r==null?!1:(wr.has(r)||(r.tagName==="PRE"?wr.set(r,!0):wr.set(r,So(r.parentNode))),wr.get(r))}function xi(r,t,e,n,s){return t.nodeType===t.TEXT_NODE?n.reduce((i,o)=>o(t,i,r),new B):t.nodeType===t.ELEMENT_NODE?Array.from(t.childNodes||[]).reduce((i,o)=>{let a=xi(r,o,e,n,s);return o.nodeType===t.ELEMENT_NODE&&(a=e.reduce((u,h)=>h(o,u,r),a),a=(s.get(o)||[]).reduce((u,h)=>h(o,u,r),a)),i.concat(a)},new B):new B}function Ps(r){return(t,e,n)=>je(e,r,!0,n)}function yd(r,t,e){const n=te.keys(r),s=zt.keys(r),i=Ne.keys(r),o={};return n.concat(s).concat(i).forEach(a=>{let u=e.query(a,D.ATTRIBUTE);u!=null&&(o[u.attrName]=u.value(r),o[u.attrName])||(u=md[a],u!=null&&(u.attrName===a||u.keyName===a)&&(o[u.attrName]=u.value(r)||void 0),u=Nl[a],u!=null&&(u.attrName===a||u.keyName===a)&&(u=Nl[a],o[u.attrName]=u.value(r)||void 0))}),Object.entries(o).reduce((a,u)=>{let[h,p]=u;return je(a,h,p,e)},t)}function vd(r,t,e){const n=e.query(r);if(n==null)return t;if(n.prototype instanceof _t){const s={},i=n.value(r);if(i!=null)return s[n.blotName]=i,new B().insert(s,n.formats(r,e))}else if(n.prototype instanceof $n&&!Kn(t,`
`)&&t.insert(`
`),"blotName"in n&&"formats"in n&&typeof n.formats=="function")return je(t,n.blotName,n.formats(r,e),e);return t}function Ed(r,t){return Kn(t,`
`)||t.insert(`
`),t}function Ad(r,t,e){const n=e.query("code-block"),s=n&&"formats"in n&&typeof n.formats=="function"?n.formats(r,e):!0;return je(t,"code-block",s,e)}function Nd(){return new B}function wd(r,t,e){const n=e.query(r);if(n==null||n.blotName!=="list"||!Kn(t,`
`))return t;let s=-1,i=r.parentNode;for(;i!=null;)["OL","UL"].includes(i.tagName)&&(s+=1),i=i.parentNode;return s<=0?t:t.reduce((o,a)=>a.insert?a.attributes&&typeof a.attributes.indent=="number"?o.push(a):o.insert(a.insert,{indent:s,...a.attributes||{}}):o,new B)}function Td(r,t,e){const n=r;let s=n.tagName==="OL"?"ordered":"bullet";const i=n.getAttribute("data-checked");return i&&(s=i==="true"?"checked":"unchecked"),je(t,"list",s,e)}function wl(r,t,e){if(!Kn(t,`
`)){if(be(r,e)&&(r.childNodes.length>0||r instanceof HTMLParagraphElement))return t.insert(`
`);if(t.length()>0&&r.nextSibling){let n=r.nextSibling;for(;n!=null;){if(be(n,e))return t.insert(`
`);const s=e.query(n);if(s&&s.prototype instanceof Rt)return t.insert(`
`);n=n.firstChild}}}return t}function xd(r,t,e){var i;const n={},s=r.style||{};return s.fontStyle==="italic"&&(n.italic=!0),s.textDecoration==="underline"&&(n.underline=!0),s.textDecoration==="line-through"&&(n.strike=!0),((i=s.fontWeight)!=null&&i.startsWith("bold")||parseInt(s.fontWeight,10)>=700)&&(n.bold=!0),t=Object.entries(n).reduce((o,a)=>{let[u,h]=a;return je(o,u,h,e)},t),parseFloat(s.textIndent||0)>0?new B().insert(" ").concat(t):t}function Ld(r,t,e){var s,i;const n=((s=r.parentElement)==null?void 0:s.tagName)==="TABLE"?r.parentElement:(i=r.parentElement)==null?void 0:i.parentElement;if(n!=null){const a=Array.from(n.querySelectorAll("tr")).indexOf(r)+1;return je(t,"table",a,e)}return t}function Sd(r,t,e){var s;let n=r.data;if(((s=r.parentElement)==null?void 0:s.tagName)==="O:P")return t.insert(n.trim());if(!So(r)){if(n.trim().length===0&&n.includes(`
`)&&!bd(r,e))return t;const i=(o,a)=>{const u=a.replace(/[^\u00a0]/g,"");return u.length<1&&o?" ":u};n=n.replace(/\r\n/g," ").replace(/\n/g," "),n=n.replace(/\s\s+/g,i.bind(i,!0)),(r.previousSibling==null&&r.parentElement!=null&&be(r.parentElement,e)||r.previousSibling instanceof Element&&be(r.previousSibling,e))&&(n=n.replace(/^\s+/,i.bind(i,!1))),(r.nextSibling==null&&r.parentElement!=null&&be(r.parentElement,e)||r.nextSibling instanceof Element&&be(r.nextSibling,e))&&(n=n.replace(/\s+$/,i.bind(i,!1)))}return t.insert(n)}class _o extends Gt{constructor(e,n){super(e,n);O(this,"lastRecorded",0);O(this,"ignoreChange",!1);O(this,"stack",{undo:[],redo:[]});O(this,"currentRange",null);this.quill.on(N.events.EDITOR_CHANGE,(s,i,o,a)=>{s===N.events.SELECTION_CHANGE?i&&a!==N.sources.SILENT&&(this.currentRange=i):s===N.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||a===N.sources.USER?this.record(i,o):this.transform(i)),this.currentRange=ei(this.currentRange,i))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",s=>{s.inputType==="historyUndo"?(this.undo(),s.preventDefault()):s.inputType==="historyRedo"&&(this.redo(),s.preventDefault())})}change(e,n){if(this.stack[e].length===0)return;const s=this.stack[e].pop();if(!s)return;const i=this.quill.getContents(),o=s.delta.invert(i);this.stack[n].push({delta:o,range:ei(s.range,o)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(s.delta,N.sources.USER),this.ignoreChange=!1,this.restoreSelection(s)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(e,n){if(e.ops.length===0)return;this.stack.redo=[];let s=e.invert(n),i=this.currentRange;const o=Date.now();if(this.lastRecorded+this.options.delay>o&&this.stack.undo.length>0){const a=this.stack.undo.pop();a&&(s=s.compose(a.delta),i=a.range)}else this.lastRecorded=o;s.length()!==0&&(this.stack.undo.push({delta:s,range:i}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(e){Tl(this.stack.undo,e),Tl(this.stack.redo,e)}undo(){this.change("undo","redo")}restoreSelection(e){if(e.range)this.quill.setSelection(e.range,N.sources.USER);else{const n=qd(this.quill.scroll,e.delta);this.quill.setSelection(n,N.sources.USER)}}}O(_o,"DEFAULTS",{delay:1e3,maxStack:100,userOnly:!1});function Tl(r,t){let e=t;for(let n=r.length-1;n>=0;n-=1){const s=r[n];r[n]={delta:e.transform(s.delta,!0),range:s.range&&ei(s.range,e)},e=s.delta.transform(e),r[n].delta.length()===0&&r.splice(n,1)}}function _d(r,t){const e=t.ops[t.ops.length-1];return e==null?!1:e.insert!=null?typeof e.insert=="string"&&e.insert.endsWith(`
`):e.attributes!=null?Object.keys(e.attributes).some(n=>r.query(n,D.BLOCK)!=null):!1}function qd(r,t){const e=t.reduce((s,i)=>s+(i.delete||0),0);let n=t.length()-e;return _d(r,t)&&(n-=1),n}function ei(r,t){if(!r)return r;const e=t.transformPosition(r.index),n=t.transformPosition(r.index+r.length);return{index:e,length:n-e}}class qo extends Gt{constructor(t,e){super(t,e),t.root.addEventListener("drop",n=>{var o;n.preventDefault();let s=null;if(document.caretRangeFromPoint)s=document.caretRangeFromPoint(n.clientX,n.clientY);else if(document.caretPositionFromPoint){const a=document.caretPositionFromPoint(n.clientX,n.clientY);s=document.createRange(),s.setStart(a.offsetNode,a.offset),s.setEnd(a.offsetNode,a.offset)}const i=s&&t.selection.normalizeNative(s);if(i){const a=t.selection.normalizedToRange(i);(o=n.dataTransfer)!=null&&o.files&&this.upload(a,n.dataTransfer.files)}})}upload(t,e){const n=[];Array.from(e).forEach(s=>{var i;s&&((i=this.options.mimetypes)!=null&&i.includes(s.type))&&n.push(s)}),n.length>0&&this.options.handler.call(this,t,n)}}qo.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(r,t){if(!this.quill.scroll.query("image"))return;const e=t.map(n=>new Promise(s=>{const i=new FileReader;i.onload=()=>{s(i.result)},i.readAsDataURL(n)}));Promise.all(e).then(n=>{const s=n.reduce((i,o)=>i.insert({image:o}),new B().retain(r.index).delete(r.length));this.quill.updateContents(s,R.sources.USER),this.quill.setSelection(r.index+n.length,R.sources.SILENT)})}};const Od=["insertText","insertReplacementText"];class Cd extends Gt{constructor(t,e){super(t,e),t.root.addEventListener("beforeinput",n=>{this.handleBeforeInput(n)}),/Android/i.test(navigator.userAgent)||t.on(N.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(t){Ti({range:t,quill:this.quill})}replaceText(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(t.length===0)return!1;if(e){const n=this.quill.getFormat(t.index,1);this.deleteRange(t),this.quill.updateContents(new B().retain(t.index).insert(e,n),N.sources.USER)}else this.deleteRange(t);return this.quill.setSelection(t.index+e.length,0,N.sources.SILENT),!0}handleBeforeInput(t){if(this.quill.composition.isComposing||t.defaultPrevented||!Od.includes(t.inputType))return;const e=t.getTargetRanges?t.getTargetRanges()[0]:null;if(!e||e.collapsed===!0)return;const n=Id(t);if(n==null)return;const s=this.quill.selection.normalizeNative(e),i=s?this.quill.selection.normalizedToRange(s):null;i&&this.replaceText(i,n)&&t.preventDefault()}handleCompositionStart(){const t=this.quill.getSelection();t&&this.replaceText(t)}}function Id(r){var t;return typeof r.data=="string"?r.data:(t=r.dataTransfer)!=null&&t.types.includes("text/plain")?r.dataTransfer.getData("text/plain"):null}const Rd=/Mac/i.test(navigator.platform),kd=100,Bd=r=>!!(r.key==="ArrowLeft"||r.key==="ArrowRight"||r.key==="ArrowUp"||r.key==="ArrowDown"||r.key==="Home"||Rd&&r.key==="a"&&r.ctrlKey===!0);class Md extends Gt{constructor(e,n){super(e,n);O(this,"isListening",!1);O(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(e,n){let{line:s,event:i}=n;if(!(s instanceof Ft)||!s.uiNode)return!0;const o=getComputedStyle(s.domNode).direction==="rtl";return o&&i.key!=="ArrowRight"||!o&&i.key!=="ArrowLeft"?!0:(this.quill.setSelection(e.index-1,e.length+(i.shiftKey?1:0),N.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",e=>{!e.defaultPrevented&&Bd(e)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+kd,this.isListening)return;this.isListening=!0;const e=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",e,{once:!0})}handleSelectionChange(){const e=document.getSelection();if(!e)return;const n=e.getRangeAt(0);if(n.collapsed!==!0||n.startOffset!==0)return;const s=this.quill.scroll.find(n.startContainer);if(!(s instanceof Ft)||!s.uiNode)return;const i=document.createRange();i.setStartAfter(s.uiNode),i.setEndAfter(s.uiNode),e.removeAllRanges(),e.addRange(i)}}N.register({"blots/block":pt,"blots/block/embed":Rt,"blots/break":Kt,"blots/container":Me,"blots/cursor":an,"blots/embed":yi,"blots/inline":ee,"blots/scroll":en,"blots/text":Ht,"modules/clipboard":Lo,"modules/history":_o,"modules/keyboard":Dr,"modules/uploader":qo,"modules/input":Cd,"modules/uiNode":Md});class Dd extends zt{add(t,e){let n=0;if(e==="+1"||e==="-1"){const s=this.value(t)||0;n=e==="+1"?s+1:s-1}else typeof e=="number"&&(n=e);return n===0?(this.remove(t),!0):super.add(t,n.toString())}canAdd(t,e){return super.canAdd(t,e)||super.canAdd(t,parseInt(e,10))}value(t){return parseInt(super.value(t),10)||void 0}}const jd=new Dd("indent","ql-indent",{scope:D.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});class ni exten Line truncated
`)}
`,i=It.formats(this.children.head.domNode);if(e||this.forceNext||this.cachedText!==s){if(s.trim().length>0||this.cachedText==null){const o=this.children.reduce((u,h)=>u.concat(fo(h,!1)),new B),a=t(s,i);o.diff(a).reduce((u,h)=>{let{retain:p,attributes:v}=h;return p?(v&&Object.keys(v).forEach(f=>{[It.blotName,ce.blotName].includes(f)&&this.formatAt(u,p,f,v[f])}),u+p):u},0)}this.cachedText=s,this.forceNext=!1}}html(t,e){const[n]=this.children.find(t);return`<pre data-language="${n?It.formats(n.domNode):"plain"}">
${Mr(this.code(t,e))}
</pre>`}optimize(t){if(super.optimize(t),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){const e=It.formats(this.children.head.domNode);e!==this.uiNode.value&&(this.uiNode.value=e)}}}kn.allowedChildren=[It];It.requiredContainer=kn;It.allowedChildren=[ce,an,Ht,Kt];const Pd=(r,t,e)=>{if(typeof r.versionString=="string"){const n=r.versionString.split(".")[0];if(parseInt(n,10)>=11)return r.highlight(e,{language:t}).value}return r.highlight(t,e).value};class Co extends Gt{static register(){N.register(ce,!0),N.register(It,!0),N.register(kn,!0)}constructor(t,e){if(super(t,e),this.options.hljs==null)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((n,s)=>{let{key:i}=s;return n[i]=!0,n},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(N.events.SCROLL_BLOT_MOUNT,t=>{if(!(t instanceof kn))return;const e=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach(n=>{let{key:s,label:i}=n;const o=e.ownerDocument.createElement("option");o.textContent=i,o.setAttribute("value",s),e.appendChild(o)}),e.addEventListener("change",()=>{t.format(It.blotName,e.value),this.quill.root.focus(),this.highlight(t,!0)}),t.uiNode==null&&(t.attachUI(e),t.children.head&&(e.value=It.formats(t.children.head.domNode)))})}initTimer(){let t=null;this.quill.on(N.events.SCROLL_OPTIMIZE,()=>{t&&clearTimeout(t),t=setTimeout(()=>{this.highlight(),t=null},this.options.interval)})}highlight(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update(N.sources.USER);const n=this.quill.getSelection();(t==null?this.quill.scroll.descendants(kn):[t]).forEach(i=>{i.highlight(this.highlightBlot,e)}),this.quill.update(N.sources.SILENT),n!=null&&this.quill.setSelection(n,N.sources.SILENT)}highlightBlot(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"plain";if(e=this.languages[e]?e:"plain",e==="plain")return Mr(t).split(`
`).reduce((s,i,o)=>(o!==0&&s.insert(`
`,{[At.blotName]:e}),s.insert(i)),new B);const n=this.quill.root.ownerDocument.createElement("div");return n.classList.add(At.className),n.innerHTML=Pd(this.options.hljs,e,t),xi(this.quill.scroll,n,[(s,i)=>{const o=In.value(s);return o?i.compose(new B().retain(i.length(),{[ce.blotName]:o})):i}],[(s,i)=>s.data.split(`
`).reduce((o,a,u)=>(u!==0&&o.insert(`
`,{[At.blotName]:e}),o.insert(a)),i)],new WeakMap)}}Co.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};const Mn=class Mn extends pt{static create(t){const e=super.create();return t?e.setAttribute("data-row",t):e.setAttribute("data-row",Li()),e}static formats(t){if(t.hasAttribute("data-row"))return t.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(t,e){t===Mn.blotName&&e?this.domNode.setAttribute("data-row",e):super.format(t,e)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}};O(Mn,"blotName","table"),O(Mn,"tagName","TD");let Ut=Mn;class ue extends Me{checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const t=this.children.head.formats(),e=this.children.tail.formats(),n=this.next.children.head.formats(),s=this.next.children.tail.formats();return t.table===e.table&&t.table===n.table&&t.table===s.table}return!1}optimize(t){super.optimize(t),this.children.forEach(e=>{if(e.next==null)return;const n=e.formats(),s=e.next.formats();if(n.table!==s.table){const i=this.splitAfter(e);i&&i.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}O(ue,"blotName","table-row"),O(ue,"tagName","TR");class Jt extends Me{}O(Jt,"blotName","table-body"),O(Jt,"tagName","TBODY");class un extends Me{balanceCells(){const t=this.descendants(ue),e=t.reduce((n,s)=>Math.max(s.children.length,n),0);t.forEach(n=>{new Array(e-n.children.length).fill(0).forEach(()=>{let s;n.children.head!=null&&(s=Ut.formats(n.children.head.domNode));const i=this.scroll.create(Ut.blotName,s);n.appendChild(i),i.optimize()})})}cells(t){return this.rows().map(e=>e.children.at(t))}deleteColumn(t){const[e]=this.descendant(Jt);e==null||e.children.head==null||e.children.forEach(n=>{const s=n.children.at(t);s!=null&&s.remove()})}insertColumn(t){const[e]=this.descendant(Jt);e==null||e.children.head==null||e.children.forEach(n=>{const s=n.children.at(t),i=Ut.formats(n.children.head.domNode),o=this.scroll.create(Ut.blotName,i);n.insertBefore(o,s)})}insertRow(t){const[e]=this.descendant(Jt);if(e==null||e.children.head==null)return;const n=Li(),s=this.scroll.create(ue.blotName);e.children.head.children.forEach(()=>{const o=this.scroll.create(Ut.blotName,n);s.appendChild(o)});const i=e.children.at(t);e.insertBefore(s,i)}rows(){const t=this.children.head;return t==null?[]:t.children.map(e=>e)}}O(un,"blotName","table-container"),O(un,"tagName","TABLE");un.allowedChildren=[Jt];Jt.requiredContainer=un;Jt.allowedChildren=[ue];ue.requiredContainer=Jt;ue.allowedChildren=[Ut];Ut.requiredContainer=ue;function Li(){return`row-${Math.random().toString(36).slice(2,6)}`}class $d extends Gt{static register(){N.register(Ut),N.register(ue),N.register(Jt),N.register(un)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(un).forEach(t=>{t.balanceCells()})}deleteColumn(){const[t,,e]=this.getTable();e!=null&&(t.deleteColumn(e.cellOffset()),this.quill.update(N.sources.USER))}deleteRow(){const[,t]=this.getTable();t!=null&&(t.remove(),this.quill.update(N.sources.USER))}deleteTable(){const[t]=this.getTable();if(t==null)return;const e=t.offset();t.remove(),this.quill.update(N.sources.USER),this.quill.setSelection(e,N.sources.SILENT)}getTable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(t==null)return[null,null,null,-1];const[e,n]=this.quill.getLine(t.index);if(e==null||e.statics.blotName!==Ut.blotName)return[null,null,null,-1];const s=e.parent;return[s.parent.parent,s,e,n]}insertColumn(t){const e=this.quill.getSelection();if(!e)return;const[n,s,i]=this.getTable(e);if(i==null)return;const o=i.cellOffset();n.insertColumn(o+t),this.quill.update(N.sources.USER);let a=s.rowOffset();t===0&&(a+=1),this.quill.setSelection(e.index+a,e.length,N.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(t){const e=this.quill.getSelection();if(!e)return;const[n,s,i]=this.getTable(e);if(i==null)return;const o=s.rowOffset();n.insertRow(o+t),this.quill.update(N.sources.USER),t>0?this.quill.setSelection(e,N.sources.SILENT):this.quill.setSelection(e.index+s.children.length,e.length,N.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(t,e){const n=this.quill.getSelection();if(n==null)return;const s=new Array(t).fill(0).reduce(i=>{const o=new Array(e).fill(`
`).join("");return i.insert(o,{table:Li()})},new B().retain(n.index));this.quill.updateContents(s,N.sources.USER),this.quill.setSelection(n.index,N.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(N.events.SCROLL_OPTIMIZE,t=>{t.some(e=>["TD","TR","TBODY","TABLE"].includes(e.target.tagName)?(this.quill.once(N.events.TEXT_CHANGE,(n,s,i)=>{i===N.sources.USER&&this.balanceTables()}),!0):!1)})}}const Sl=fe("quill:toolbar");class Si extends Gt{constructor(t,e){var n,s;if(super(t,e),Array.isArray(this.options.container)){const i=document.createElement("div");i.setAttribute("role","toolbar"),Ud(i,this.options.container),(s=(n=t.container)==null?void 0:n.parentNode)==null||s.insertBefore(i,t.container),this.container=i}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){Sl.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(i=>{var a;const o=(a=this.options.handlers)==null?void 0:a[i];o&&this.addHandler(i,o)}),Array.from(this.container.querySelectorAll("button, select")).forEach(i=>{this.attach(i)}),this.quill.on(N.events.EDITOR_CHANGE,()=>{const[i]=this.quill.selection.getRange();this.update(i)})}addHandler(t,e){this.handlers[t]=e}attach(t){let e=Array.from(t.classList).find(s=>s.indexOf("ql-")===0);if(!e)return;if(e=e.slice(3),t.tagName==="BUTTON"&&t.setAttribute("type","button"),this.handlers[e]==null&&this.quill.scroll.query(e)==null){Sl.warn("ignoring attaching to nonexistent format",e,t);return}const n=t.tagName==="SELECT"?"change":"click";t.addEventListener(n,s=>{let i;if(t.tagName==="SELECT"){if(t.selectedIndex<0)return;const a=t.options[t.selectedIndex];a.hasAttribute("selected")?i=!1:i=a.value||!1}else t.classList.contains("ql-active")?i=!1:i=t.value||!t.hasAttribute("value"),s.preventDefault();this.quill.focus();const[o]=this.quill.selection.getRange();if(this.handlers[e]!=null)this.handlers[e].call(this,i);else if(this.quill.scroll.query(e).prototype instanceof _t){if(i=prompt(`Enter ${e}`),!i)return;this.quill.updateContents(new B().retain(o.index).delete(o.length).insert({[e]:i}),N.sources.USER)}else this.quill.format(e,i,N.sources.USER);this.update(o)}),this.controls.push([e,t])}update(t){const e=t==null?{}:this.quill.getFormat(t);this.controls.forEach(n=>{const[s,i]=n;if(i.tagName==="SELECT"){let o=null;if(t==null)o=null;else if(e[s]==null)o=i.querySelector("option[selected]");else if(!Array.isArray(e[s])){let a=e[s];typeof a=="string"&&(a=a.replace(/"/g,'\\"')),o=i.querySelector(`option[value="${a}"]`)}o==null?(i.value="",i.selectedIndex=-1):o.selected=!0}else if(t==null)i.classList.remove("ql-active"),i.setAttribute("aria-pressed","false");else if(i.hasAttribute("value")){const o=e[s],a=o===i.getAttribute("value")||o!=null&&o.toString()===i.getAttribute("value")||o==null&&!i.getAttribute("value");i.classList.toggle("ql-active",a),i.setAttribute("aria-pressed",a.toString())}else{const o=e[s]!=null;i.classList.toggle("ql-active",o),i.setAttribute("aria-pressed",o.toString())}})}}Si.DEFAULTS={};function _l(r,t,e){const n=document.createElement("button");n.setAttribute("type","button"),n.classList.add(`ql-${t}`),n.setAttribute("aria-pressed","false"),e!=null?(n.value=e,n.setAttribute("aria-label",`${t}: ${e}`)):n.setAttribute("aria-label",t),r.appendChild(n)}function Ud(r,t){Array.isArray(t[0])||(t=[t]),t.forEach(e=>{const n=document.createElement("span");n.classList.add("ql-formats"),e.forEach(s=>{if(typeof s=="string")_l(n,s);else{const i=Object.keys(s)[0],o=s[i];Array.isArray(o)?Fd(n,i,o):_l(n,i,o)}}),r.appendChild(n)})}function Fd(r,t,e){const n=document.createElement("select");n.classList.add(`ql-${t}`),e.forEach(s=>{const i=document.createElement("option");s!==!1?i.setAttribute("value",String(s)):i.setAttribute("selected","selected"),n.appendChild(i)}),r.appendChild(n)}Si.DEFAULTS={container:null,handlers:{clean(){const r=this.quill.getSelection();if(r!=null)if(r.length===0){const t=this.quill.getFormat();Object.keys(t).forEach(e=>{this.quill.scroll.query(e,D.INLINE)!=null&&this.quill.format(e,!1,N.sources.USER)})}else this.quill.removeFormat(r.index,r.length,N.sources.USER)},direction(r){const{align:t}=this.quill.getFormat();r==="rtl"&&t==null?this.quill.format("align","right",N.sources.USER):!r&&t==="right"&&this.quill.format("align",!1,N.sources.USER),this.quill.format("direction",r,N.sources.USER)},indent(r){const t=this.quill.getSelection(),e=this.quill.getFormat(t),n=parseInt(e.indent||0,10);if(r==="+1"||r==="-1"){let s=r==="+1"?1:-1;e.direction==="rtl"&&(s*=-1),this.quill.format("indent",n+s,N.sources.USER)}},link(r){r===!0&&(r=prompt("Enter link URL:")),this.quill.format("link",r,N.sources.USER)},list(r){const t=this.quill.getSelection(),e=this.quill.getFormat(t);r==="check"?e.list Line truncated