Files
mermaid-live-editor/_app/immutable/chunks/state-c48d6a97.js
T
2023-02-24 05:23:04 +00:00

25 lines
119 KiB
JavaScript

import{C as writable,J as derived,K as get_store_value}from"./index-02874a89.js";import{g as getDefaultExportFromCjs,c as commonjsGlobal}from"./_commonjsHelpers-35101cd5.js";import{_ as __vitePreload}from"./preload-helper-41c905a7.js";import{l as log}from"./transform-12111574.js";import{i as isDetailedError,u as utils,r as registerLazyLoadedDiagrams,l as loadRegisteredDiagrams}from"./utils-3cbdbddf-b0df7f51.js";import{m as mermaidAPI}from"./mermaidAPI-a1a81019-23aa79a7.js";import{u as unsafeStringify}from"./stringify-ec884b6d.js";const defaultLoading={loading:!1},loadingStateStore=writable(defaultLoading),initLoading=async(e,r)=>{loadingStateStore.set({loading:!0,message:e});const t=await r;return loadingStateStore.set({loading:!1}),t};var bundle={};(function(exports){(()=>{var __webpack_modules__={607:(module,exports,__webpack_require__)=>{Object.defineProperty(exports,"__esModule",{value:!0});var serializer_1=__webpack_require__(810),deserializer_1=__webpack_require__(496),Module;typeof process<"u"&&process.release&&process.release.name==="node"&&(Module=eval("require")("module"));var ESSerializer=function(){function e(){}return e.throwErrorIfInNonNodeEnvironment=function(){if(!Module)throw new Error("Cannot intercept require in non-Node environment.")},e.interceptRequire=function(){this.isRequireIntercepted||(this.isRequireIntercepted=!0,this.throwErrorIfInNonNodeEnvironment(),e.originRequire=Module.prototype.require,Module.prototype.require=function(){var r=e.originRequire.apply(this,arguments),t=r.name;return e.requiredClasses[t]||(e.requiredClasses[t]=r),r})},e.stopInterceptRequire=function(){this.throwErrorIfInNonNodeEnvironment(),Module.prototype.require=e.originRequire,this.isRequireIntercepted=!1},e.isInterceptingRequire=function(){return this.isRequireIntercepted},e.getRequiredClasses=function(){return this.requiredClasses},e.clearRequiredClasses=function(){this.requiredClasses={}},e.registerClass=function(r){this.registeredClasses.push(r)},e.registerClasses=function(r){this.registeredClasses=this.registeredClasses.concat(r)},e.clearRegisteredClasses=function(){this.registeredClasses=[]},e.serialize=function(r,t){return t===void 0&&(t={}),JSON.stringify(serializer_1.getSerializeValueWithClassName(r,t))},e.deserialize=function(r,t,a){return t===void 0&&(t=[]),a===void 0&&(a={}),deserializer_1.deserializeFromParsedObj(JSON.parse(r),Object.values(this.requiredClasses).concat(this.registeredClasses).concat(t),a)},e.originRequire=null,e.isRequireIntercepted=!1,e.requiredClasses={},e.registeredClasses=[],e}();module.exports=ESSerializer},917:function(e,r){var t=this&&this.__spreadArrays||function(){for(var B=0,k=0,M=arguments.length;k<M;k++)B+=arguments[k].length;var $=Array(B),F=0;for(k=0;k<M;k++)for(var Z=arguments[k],U=0,z=Z.length;U<z;U++,F++)$[F]=Z[U];return $};Object.defineProperty(r,"__esModule",{value:!0}),r.TO_STRING_FIELD=r.TIMESTAMP_FIELD=r.OPTIONS_FIELD=r.CLASS_NAME_FIELD=r.BOOLEAN_FIELD=r.ARRAY_FIELD=r.BUILTIN_TYPE_UNDEFINED=r.BUILTIN_TYPE_NOT_FINITE=r.BUILTIN_TYPE_BIG_INT=r.BUILTIN_CLASS_AGGREGATE_ERROR=r.BUILTIN_CLASS_URI_ERROR=r.BUILTIN_CLASS_TYPE_ERROR=r.BUILTIN_CLASS_SYNTAX_ERROR=r.BUILTIN_CLASS_REFERENCE_ERROR=r.BUILTIN_CLASS_RANGE_ERROR=r.BUILTIN_CLASS_EVAL_ERROR=r.BUILTIN_CLASS_ERROR=r.BUILTIN_CLASS_STRING=r.BUILTIN_CLASS_SET=r.BUILTIN_CLASS_REGEXP=r.BUILTIN_CLASS_INTL_RELATIVETIMEFORMAT=r.BUILTIN_CLASS_INTL_PLURALRULES=r.BUILTIN_CLASS_INTL_NUMBERFORMAT=r.BUILTIN_CLASS_INTL_LOCALE=r.BUILTIN_CLASS_INTL_LISTFORMAT=r.BUILTIN_CLASS_INTL_DATETIMEFORMAT=r.BUILTIN_CLASS_INTL_COLLATOR=r.BUILTIN_CLASS_DATE=r.BUILTIN_CLASS_DATAVIEW=r.BUILTIN_CLASS_BOOLEAN=r.BUILTIN_CLASS_SHAREDARRAYBUFFER=r.BUILTIN_CLASS_ARRAYBUFFER=r.BUILTIN_CLASS_BIGUINT64ARRAY=r.BUILTIN_CLASS_BIGINT64ARRAY=r.BUILTIN_CLASS_FLOAT64ARRAY=r.BUILTIN_CLASS_FLOAT32ARRAY=r.BUILTIN_CLASS_UINT32ARRAY=r.BUILTIN_CLASS_INT32ARRAY=r.BUILTIN_CLASS_UINT16ARRAY=r.BUILTIN_CLASS_INT16ARRAY=r.BUILTIN_CLASS_UINT8CLAMPEDARRAY=r.BUILTIN_CLASS_UINT8ARRAY=r.BUILTIN_CLASS_INT8ARRAY=r.CLASSNAMES_WHOSE_ENUMERABLE_PROPERTIES_SHOULD_BE_IGNORED=r.ALL_BUILTIN_INTLS=r.ALL_BUILTIN_ERRORS=r.ALL_BUILTIN_ARRAYS=r.ESSERIALIZER_NULL=void 0,r.ESSERIALIZER_NULL="__ESSERIALIZER_NULL__",r.ARRAY_FIELD="ess_arr",r.BOOLEAN_FIELD="ess_bool",r.CLASS_NAME_FIELD="ess_cn",r.OPTIONS_FIELD="ess_opt",r.TIMESTAMP_FIELD="ess_ts",r.TO_STRING_FIELD="ess_str";var a="Int8Array";r.BUILTIN_CLASS_INT8ARRAY=a;var n="Uint8Array";r.BUILTIN_CLASS_UINT8ARRAY=n;var o="Uint8ClampedArray";r.BUILTIN_CLASS_UINT8CLAMPEDARRAY=o;var c="Int16Array";r.BUILTIN_CLASS_INT16ARRAY=c;var s="Uint16Array";r.BUILTIN_CLASS_UINT16ARRAY=s;var f="Int32Array";r.BUILTIN_CLASS_INT32ARRAY=f;var l="Uint32Array";r.BUILTIN_CLASS_UINT32ARRAY=l;var d="Float32Array";r.BUILTIN_CLASS_FLOAT32ARRAY=d;var A="Float64Array";r.BUILTIN_CLASS_FLOAT64ARRAY=A;var g="BigInt64Array";r.BUILTIN_CLASS_BIGINT64ARRAY=g;var _="BigUint64Array";r.BUILTIN_CLASS_BIGUINT64ARRAY=_,r.BUILTIN_CLASS_ARRAYBUFFER="ArrayBuffer",r.BUILTIN_CLASS_SHAREDARRAYBUFFER="SharedArrayBuffer",r.BUILTIN_CLASS_BOOLEAN="Boolean",r.BUILTIN_CLASS_DATAVIEW="DataView",r.BUILTIN_CLASS_DATE="Date";var w="Collator";r.BUILTIN_CLASS_INTL_COLLATOR=w;var L="DateTimeFormat";r.BUILTIN_CLASS_INTL_DATETIMEFORMAT=L;var R="ListFormat";r.BUILTIN_CLASS_INTL_LISTFORMAT=R,r.BUILTIN_CLASS_INTL_LOCALE="Locale";var h="NumberFormat";r.BUILTIN_CLASS_INTL_NUMBERFORMAT=h;var E="PluralRules";r.BUILTIN_CLASS_INTL_PLURALRULES=E;var S="RelativeTimeFormat";r.BUILTIN_CLASS_INTL_RELATIVETIMEFORMAT=S,r.BUILTIN_CLASS_REGEXP="RegExp",r.BUILTIN_CLASS_SET="Set";var u="String";r.BUILTIN_CLASS_STRING=u;var T="Error";r.BUILTIN_CLASS_ERROR=T;var v="EvalError";r.BUILTIN_CLASS_EVAL_ERROR=v;var m="RangeError";r.BUILTIN_CLASS_RANGE_ERROR=m;var y="ReferenceError";r.BUILTIN_CLASS_REFERENCE_ERROR=y;var p="SyntaxError";r.BUILTIN_CLASS_SYNTAX_ERROR=p;var b="TypeError";r.BUILTIN_CLASS_TYPE_ERROR=b;var I="URIError";r.BUILTIN_CLASS_URI_ERROR=I;var N="AggregateError";r.BUILTIN_CLASS_AGGREGATE_ERROR=N,r.BUILTIN_TYPE_BIG_INT="BI",r.BUILTIN_TYPE_NOT_FINITE="NF",r.BUILTIN_TYPE_UNDEFINED="UD";var C=[a,n,o,c,s,f,l,d,A,g,_];r.ALL_BUILTIN_ARRAYS=C;var D=[T,v,m,y,p,b,I,N];r.ALL_BUILTIN_ERRORS=D;var O=[w,L,R,h,E,S];r.ALL_BUILTIN_INTLS=O;var x=t([u],C);r.CLASSNAMES_WHOSE_ENUMERABLE_PROPERTIES_SHOULD_BE_IGNORED=x},496:function(e,r,t){var a=this&&this.__spreadArrays||function(){for(var h=0,E=0,S=arguments.length;E<S;E++)h+=arguments[E].length;var u=Array(h),T=0;for(E=0;E<S;E++)for(var v=arguments[E],m=0,y=v.length;m<y;m++,T++)u[T]=v[m];return u};Object.defineProperty(r,"__esModule",{value:!0}),r.getParentClassName=r.getClassMappingFromClassArray=r.deserializeFromParsedObjWithClassMapping=r.deserializeFromParsedObj=void 0;var n=t(821),o=t(917),c=/^\s*class\s+/;function s(h,E,S){if(S===void 0&&(S={}),n.notObject(h))return h;if(Array.isArray(h))return f(h,E);var u=h[o.CLASS_NAME_FIELD],T=function(y,p,b){switch(y){case o.BUILTIN_CLASS_INT8ARRAY:return l(p[o.ARRAY_FIELD],Int8Array);case o.BUILTIN_CLASS_UINT8ARRAY:return l(p[o.ARRAY_FIELD],Uint8Array);case o.BUILTIN_CLASS_UINT8CLAMPEDARRAY:return l(p[o.ARRAY_FIELD],Uint8ClampedArray);case o.BUILTIN_CLASS_INT16ARRAY:return l(p[o.ARRAY_FIELD],Int16Array);case o.BUILTIN_CLASS_UINT16ARRAY:return l(p[o.ARRAY_FIELD],Uint16Array);case o.BUILTIN_CLASS_INT32ARRAY:return l(p[o.ARRAY_FIELD],Int32Array);case o.BUILTIN_CLASS_UINT32ARRAY:return l(p[o.ARRAY_FIELD],Uint32Array);case o.BUILTIN_CLASS_FLOAT32ARRAY:return l(p[o.ARRAY_FIELD],Float32Array);case o.BUILTIN_CLASS_FLOAT64ARRAY:return l(p[o.ARRAY_FIELD],Float64Array);case o.BUILTIN_CLASS_BIGINT64ARRAY:return d(p[o.ARRAY_FIELD],BigInt64Array);case o.BUILTIN_CLASS_BIGUINT64ARRAY:return d(p[o.ARRAY_FIELD],BigUint64Array);case o.BUILTIN_TYPE_BIG_INT:return A(p[o.TO_STRING_FIELD]);case o.BUILTIN_TYPE_UNDEFINED:return;case o.BUILTIN_TYPE_NOT_FINITE:return n.getValueFromToStringResult(p[o.TO_STRING_FIELD]);case o.BUILTIN_CLASS_ARRAYBUFFER:return I=p[o.ARRAY_FIELD],new Uint8Array(I).buffer;case o.BUILTIN_CLASS_SHAREDARRAYBUFFER:return function(N){var C=new SharedArrayBuffer(N.length),D=new Uint8Array(C);return N.forEach(function(O,x){D[x]=O}),C}(p[o.ARRAY_FIELD]);case o.BUILTIN_CLASS_BOOLEAN:return function(N){return new Boolean(N[o.BOOLEAN_FIELD])}(p);case o.BUILTIN_CLASS_DATAVIEW:return function(N){return new DataView(new Uint8Array(N).buffer)}(p[o.ARRAY_FIELD]);case o.BUILTIN_CLASS_DATE:return function(N){return typeof N[o.TIMESTAMP_FIELD]=="number"?new Date(N[o.TIMESTAMP_FIELD]):null}(p);case o.BUILTIN_CLASS_INTL_COLLATOR:return g(p,Intl.Collator);case o.BUILTIN_CLASS_INTL_DATETIMEFORMAT:return g(p,Intl.DateTimeFormat);case o.BUILTIN_CLASS_INTL_LISTFORMAT:return g(p,Intl.ListFormat);case o.BUILTIN_CLASS_INTL_LOCALE:return new Intl.Locale(p[o.TO_STRING_FIELD]);case o.BUILTIN_CLASS_INTL_NUMBERFORMAT:return g(p,Intl.NumberFormat);case o.BUILTIN_CLASS_INTL_PLURALRULES:return g(p,Intl.PluralRules);case o.BUILTIN_CLASS_INTL_RELATIVETIMEFORMAT:return g(p,Intl.RelativeTimeFormat);case o.BUILTIN_CLASS_REGEXP:return function(N){var C=N[o.TO_STRING_FIELD],D=C.lastIndexOf("/");return new RegExp(C.substring(1,D),C.substring(D+1))}(p);case o.BUILTIN_CLASS_SET:return function(N,C){return new Set(f(N[o.ARRAY_FIELD],C))}(p,b);case o.BUILTIN_CLASS_STRING:return function(N){return new String(N[o.TO_STRING_FIELD])}(p);case o.BUILTIN_CLASS_ERROR:return _(p,Error);case o.BUILTIN_CLASS_EVAL_ERROR:return _(p,EvalError);case o.BUILTIN_CLASS_RANGE_ERROR:return _(p,RangeError);case o.BUILTIN_CLASS_REFERENCE_ERROR:return _(p,ReferenceError);case o.BUILTIN_CLASS_SYNTAX_ERROR:return _(p,SyntaxError);case o.BUILTIN_CLASS_TYPE_ERROR:return _(p,TypeError);case o.BUILTIN_CLASS_URI_ERROR:return _(p,URIError);case o.BUILTIN_CLASS_AGGREGATE_ERROR:return _(p,AggregateError);default:return o.ESSERIALIZER_NULL}var I}(u,h,E);if(T!==o.ESSERIALIZER_NULL)return T;if(u&&!E[u])throw new Error("Class "+u+" not found");var v=[];S.fieldsForConstructorParameters&&(v=S.fieldsForConstructorParameters.map(function(y){return y in h?h[y]:{}}));var m=function(y,p){if(!y)return{};for(var b,I=Math.max(y.length-p.length,0),N=[{},0,"",null],C=N.shift();!b&&C!==void 0;)b=w(y,p.concat(Array.from(Array(I),function(){return C}))),C=I===0?void 0:N.shift();return b||(b={},Object.setPrototypeOf(b,y?y.prototype:Object.prototype)),b}(E[u],v);return function(y,p,b,I){for(var N in p){var C=p[N];if(!I.ignoreProperties||!I.ignoreProperties.includes(N))if(I.rawProperties&&I.rawProperties.includes(N))y[N]=JSON.stringify(C);else{var D=Object.getOwnPropertyDescriptor(y,N);O=C,x=D,N===o.CLASS_NAME_FIELD||x&&(typeof x.set=="function"||x.writable===!1&&typeof O!="object")||(D&&D.writable===!1&&typeof C=="object"?L(y[N],C,b):y[N]=s(C,b))}}var O,x;return y}(m,h,E,S)}function f(h,E){return h.map(function(S){return s(S,E)})}function l(h,E){return new E(h)}function d(h,E){return new E(h.map(function(S){return A(S[o.TO_STRING_FIELD])}))}function A(h){return BigInt(h)}function g(h,E){var S=h[o.OPTIONS_FIELD],u=S.locale;return delete S.locale,new E(u,S)}function _(h,E){var S;return delete(S=h.message?new E(h.message):new E).stack,h.name&&(S.name=h.name),h.stack&&(S.stack=h.stack),E===AggregateError&&(S.errors=s(h.errors,{})),S}function w(h,E){var S;try{if(c.test(h.toString()))S=new(h.bind.apply(h,a([void 0],E)));else{var u=h.prototype.constructor;u.name==="Object"&&(u=h),S=Object.create(u.prototype),u.call(S,E)}}catch{S=null}return S}function L(h,E,S){for(var u in E){var T=Object.getOwnPropertyDescriptor(h,u);T&&T.writable!==!0&&typeof T.set!="function"||(h[u]=s(E[u],S))}}function R(h){h===void 0&&(h=[]);var E={};return h.forEach(function(S){if(n.isClass(S)){var u=S.name,T=E[u];T&&T!==S&&console.warn("WARNING: Found class definition with the same name: "+u),E[u]=S}}),E}r.deserializeFromParsedObj=function(h,E,S){return s(h,R(E),S)},r.deserializeFromParsedObjWithClassMapping=s,r.getClassMappingFromClassArray=R,r.getParentClassName=function(h){return h.prototype.__proto__.constructor.name}},821:(e,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.isClass=r.notObject=r.getValueFromToStringResult=void 0,r.notObject=function(t){return t===null||typeof t!="object"},r.getValueFromToStringResult=function(t){switch(t){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN;default:return null}},r.isClass=function(t){if(function(a){return[Date].indexOf(a)>=0}(t))return!0;try{Reflect.construct(String,[],t)}catch{return!1}return!0}},810:(e,r,t)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.getSerializeValueWithClassName=void 0;var a=t(917),n=t(821);function o(s,f){f===void 0&&(f={});var l=function(g){var _,w,L;return g===void 0?((_={})[a.CLASS_NAME_FIELD]=a.BUILTIN_TYPE_UNDEFINED,_):typeof g!="number"||isFinite(g)?typeof g=="bigint"?((L={})[a.CLASS_NAME_FIELD]=a.BUILTIN_TYPE_BIG_INT,L[a.TO_STRING_FIELD]=g.toString(),L):n.notObject(g)?g:a.ESSERIALIZER_NULL:((w={})[a.CLASS_NAME_FIELD]=a.BUILTIN_TYPE_NOT_FINITE,w[a.TO_STRING_FIELD]=g.toString(),w)}(s);if(l!==a.ESSERIALIZER_NULL)return l;if(Array.isArray(s))return c(s);var d={};if(!function(g){var _=g.__proto__.constructor.name;return a.CLASSNAMES_WHOSE_ENUMERABLE_PROPERTIES_SHOULD_BE_IGNORED.includes(_)}(s)){if(f.ignoreProperties&&f.ignoreProperties.forEach(function(g){delete s[g]}),f.interceptProperties)for(var A in f.interceptProperties)s[A]=f.interceptProperties[A].call(s,s[A]);(function(g,_){for(var w in g)typeof g[w]!="function"&&(_[w]=o(g[w]))})(s,d)}return function(g,_){var w=g.__proto__.constructor.name;return w==="Object"&&(w=g.constructor.name),w!=="Object"&&(_[a.CLASS_NAME_FIELD]=w,w===a.BUILTIN_CLASS_ARRAYBUFFER||w===a.BUILTIN_CLASS_SHAREDARRAYBUFFER?_[a.ARRAY_FIELD]=c(Array.from(new Uint8Array(g))):w===a.BUILTIN_CLASS_BOOLEAN?_[a.BOOLEAN_FIELD]=g.valueOf():w===a.BUILTIN_CLASS_DATAVIEW?_[a.ARRAY_FIELD]=c(Array.from(new Uint8Array(g.buffer))):w===a.BUILTIN_CLASS_DATE?_[a.TIMESTAMP_FIELD]=g.getTime():w===a.BUILTIN_CLASS_INTL_LOCALE||w===a.BUILTIN_CLASS_REGEXP?_[a.TO_STRING_FIELD]=g.toString():w===a.BUILTIN_CLASS_SET?_[a.ARRAY_FIELD]=c(Array.from(g)):w===a.BUILTIN_CLASS_STRING?_[a.TO_STRING_FIELD]=g.toString():a.ALL_BUILTIN_ARRAYS.includes(w)?_[a.ARRAY_FIELD]=c(Array.from(g)):a.ALL_BUILTIN_ERRORS.includes(w)?function(L,R,h){L.name!=="Error"&&(R.name=L.name),L.message&&(R.message=L.message),L.stack&&(R.stack=L.stack),h===a.BUILTIN_CLASS_AGGREGATE_ERROR&&(R.errors=o(L.errors))}(g,_,w):a.ALL_BUILTIN_INTLS.includes(w)&&(_[a.OPTIONS_FIELD]=g.resolvedOptions())),_}(s,d)}function c(s){return s.map(function(f){return o(f)})}r.getSerializeValueWithClassName=o}},__webpack_module_cache__={};function __webpack_require__(e){var r=__webpack_module_cache__[e];if(r!==void 0)return r.exports;var t=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(t.exports,t,t.exports,__webpack_require__),t.exports}var __webpack_exports__=__webpack_require__(607),__webpack_export_target__=exports;for(var i in __webpack_exports__)__webpack_export_target__[i]=__webpack_exports__[i];__webpack_exports__.__esModule&&Object.defineProperty(__webpack_export_target__,"__esModule",{value:!0})})()})(bundle);const ESSerializer=getDefaultExportFromCjs(bundle),alreadyWarnFor=[],warnStorageNotFound=e=>{const r=typeof process<"u"&&!0;if(!alreadyWarnFor.includes(e)&&!r){let t=`Unable to find the ${e}. No data will be persisted.`;typeof window>"u"&&(t+=`
Are you running on a server? Most of storages are not available while running on a server.`),console.warn(t),alreadyWarnFor.push(e)}},serialize=e=>ESSerializer.serialize(e),deserialize=e=>{if(e!=="undefined"){if(e!=null){try{return ESSerializer.deserialize(e)}catch{}try{return JSON.parse(e)}catch{}}return e}};function persist(e,r,t){const a=r.getValue(t);return a!==null&&e.set(a),"addListener"in r&&r.addListener(t,n=>{e.set(n)}),e.subscribe(n=>{r.setValue(t,n)}),{...e,delete(){r.deleteValue(t)}}}function getBrowserStorage(e,r=!1){const t=[],a=c=>{const s=c.key;if(c.storageArea===e)for(const{listener:f}of t.filter(({key:l})=>l===s))f(deserialize(c.newValue))},n=()=>{r&&typeof window<"u"&&window.addEventListener&&window.addEventListener("storage",a)},o=()=>{r&&typeof window<"u"&&window.removeEventListener&&window.removeEventListener("storage",a)};return{addListener(c,s){t.push({key:c,listener:s}),t.length===1&&n()},removeListener(c,s){const f=t.indexOf({key:c,listener:s});f!==-1&&t.splice(f,1),t.length===0&&o()},getValue(c){const s=e.getItem(c);return deserialize(s)},deleteValue(c){e.removeItem(c)},setValue(c,s){e.setItem(c,serialize(s))}}}function localStorage(e=!1){return typeof window<"u"&&window.localStorage?getBrowserStorage(window.localStorage,e):(warnStorageNotFound("window.localStorage"),noopStorage())}function noopStorage(){return{getValue(){return null},deleteValue(){},setValue(){}}}let analytics;const initAnalytics=async()=>{if(!analytics)try{const[{Analytics:e},{default:r}]=await Promise.all([__vitePreload(()=>import("./analytics.browser.es-34f06abc.js"),[],import.meta.url),__vitePreload(()=>import("./plausible-c08e2f58.js").then(t=>t.p),["./plausible-c08e2f58.js","./_commonjsHelpers-35101cd5.js"],import.meta.url)]);analytics=e({app:"mermaid-live-editor",plugins:[r({domain:"mermaid.live",hashMode:!1,trackLocalhost:!1,apiHost:"https://plausible.io"})]})}catch(e){console.log(e),console.info("Analytics blocked ;)")}},detectType=e=>{const r=["classDiagram","erDiagram","flowChart","gantt","gitGraph","graph","journey","pie","stateDiagram"],t=e.replace(/^\s*%%.*\n/g,`
`).trimStart().split(" ")[0].toLowerCase();return r.find(n=>t.includes(n.toLowerCase()))},countLines=e=>{var r;return(((r=e.match(/\n/g))==null?void 0:r.length)??0)+1},saveStatistics=e=>{const r=detectType(e);if(!r)return;const t=countLines(e);logEvent("render",{graphType:r,length:t})},minutesToMilliSeconds=e=>e*6e4,defaultDelay=minutesToMilliSeconds(1),delaysPerEvent={render:minutesToMilliSeconds(5),panZoom:minutesToMilliSeconds(10),copyClipboard:defaultDelay,download:defaultDelay,copyMarkdown:defaultDelay,loadGist:defaultDelay,loadSampleDiagram:defaultDelay,renderDiagram:defaultDelay,history:defaultDelay,migration:defaultDelay,themeChange:defaultDelay},timeouts=new Map,logEvent=(e,r)=>{if(!analytics)return;const t=r?JSON.stringify({name:e,data:r}):e;timeouts.has(t)?clearTimeout(timeouts.get(t)):analytics.track(e,r),timeouts.set(t,window.setTimeout(()=>timeouts.delete(t),delaysPerEvent[e]))};const Z_FIXED$1=4,Z_BINARY=0,Z_TEXT=1,Z_UNKNOWN$1=2;function zero$1(e){let r=e.length;for(;--r>=0;)e[r]=0}const STORED_BLOCK=0,STATIC_TREES=1,DYN_TREES=2,MIN_MATCH$1=3,MAX_MATCH$1=258,LENGTH_CODES$1=29,LITERALS$1=256,L_CODES$1=LITERALS$1+1+LENGTH_CODES$1,D_CODES$1=30,BL_CODES$1=19,HEAP_SIZE$1=2*L_CODES$1+1,MAX_BITS$1=15,Buf_size=16,MAX_BL_BITS=7,END_BLOCK=256,REP_3_6=16,REPZ_3_10=17,REPZ_11_138=18,extra_lbits=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),extra_dbits=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),extra_blbits=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),bl_order=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),DIST_CODE_LEN=512,static_ltree=new Array((L_CODES$1+2)*2);zero$1(static_ltree);const static_dtree=new Array(D_CODES$1*2);zero$1(static_dtree);const _dist_code=new Array(DIST_CODE_LEN);zero$1(_dist_code);const _length_code=new Array(MAX_MATCH$1-MIN_MATCH$1+1);zero$1(_length_code);const base_length=new Array(LENGTH_CODES$1);zero$1(base_length);const base_dist=new Array(D_CODES$1);zero$1(base_dist);function StaticTreeDesc(e,r,t,a,n){this.static_tree=e,this.extra_bits=r,this.extra_base=t,this.elems=a,this.max_length=n,this.has_stree=e&&e.length}let static_l_desc,static_d_desc,static_bl_desc;function TreeDesc(e,r){this.dyn_tree=e,this.max_code=0,this.stat_desc=r}const d_code=e=>e<256?_dist_code[e]:_dist_code[256+(e>>>7)],put_short=(e,r)=>{e.pending_buf[e.pending++]=r&255,e.pending_buf[e.pending++]=r>>>8&255},send_bits=(e,r,t)=>{e.bi_valid>Buf_size-t?(e.bi_buf|=r<<e.bi_valid&65535,put_short(e,e.bi_buf),e.bi_buf=r>>Buf_size-e.bi_valid,e.bi_valid+=t-Buf_size):(e.bi_buf|=r<<e.bi_valid&65535,e.bi_valid+=t)},send_code=(e,r,t)=>{send_bits(e,t[r*2],t[r*2+1])},bi_reverse=(e,r)=>{let t=0;do t|=e&1,e>>>=1,t<<=1;while(--r>0);return t>>>1},bi_flush=e=>{e.bi_valid===16?(put_short(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},gen_bitlen=(e,r)=>{const t=r.dyn_tree,a=r.max_code,n=r.stat_desc.static_tree,o=r.stat_desc.has_stree,c=r.stat_desc.extra_bits,s=r.stat_desc.extra_base,f=r.stat_desc.max_length;let l,d,A,g,_,w,L=0;for(g=0;g<=MAX_BITS$1;g++)e.bl_count[g]=0;for(t[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<HEAP_SIZE$1;l++)d=e.heap[l],g=t[t[d*2+1]*2+1]+1,g>f&&(g=f,L++),t[d*2+1]=g,!(d>a)&&(e.bl_count[g]++,_=0,d>=s&&(_=c[d-s]),w=t[d*2],e.opt_len+=w*(g+_),o&&(e.static_len+=w*(n[d*2+1]+_)));if(L!==0){do{for(g=f-1;e.bl_count[g]===0;)g--;e.bl_count[g]--,e.bl_count[g+1]+=2,e.bl_count[f]--,L-=2}while(L>0);for(g=f;g!==0;g--)for(d=e.bl_count[g];d!==0;)A=e.heap[--l],!(A>a)&&(t[A*2+1]!==g&&(e.opt_len+=(g-t[A*2+1])*t[A*2],t[A*2+1]=g),d--)}},gen_codes=(e,r,t)=>{const a=new Array(MAX_BITS$1+1);let n=0,o,c;for(o=1;o<=MAX_BITS$1;o++)n=n+t[o-1]<<1,a[o]=n;for(c=0;c<=r;c++){let s=e[c*2+1];s!==0&&(e[c*2]=bi_reverse(a[s]++,s))}},tr_static_init=()=>{let e,r,t,a,n;const o=new Array(MAX_BITS$1+1);for(t=0,a=0;a<LENGTH_CODES$1-1;a++)for(base_length[a]=t,e=0;e<1<<extra_lbits[a];e++)_length_code[t++]=a;for(_length_code[t-1]=a,n=0,a=0;a<16;a++)for(base_dist[a]=n,e=0;e<1<<extra_dbits[a];e++)_dist_code[n++]=a;for(n>>=7;a<D_CODES$1;a++)for(base_dist[a]=n<<7,e=0;e<1<<extra_dbits[a]-7;e++)_dist_code[256+n++]=a;for(r=0;r<=MAX_BITS$1;r++)o[r]=0;for(e=0;e<=143;)static_ltree[e*2+1]=8,e++,o[8]++;for(;e<=255;)static_ltree[e*2+1]=9,e++,o[9]++;for(;e<=279;)static_ltree[e*2+1]=7,e++,o[7]++;for(;e<=287;)static_ltree[e*2+1]=8,e++,o[8]++;for(gen_codes(static_ltree,L_CODES$1+1,o),e=0;e<D_CODES$1;e++)static_dtree[e*2+1]=5,static_dtree[e*2]=bi_reverse(e,5);static_l_desc=new StaticTreeDesc(static_ltree,extra_lbits,LITERALS$1+1,L_CODES$1,MAX_BITS$1),static_d_desc=new StaticTreeDesc(static_dtree,extra_dbits,0,D_CODES$1,MAX_BITS$1),static_bl_desc=new StaticTreeDesc(new Array(0),extra_blbits,0,BL_CODES$1,MAX_BL_BITS)},init_block=e=>{let r;for(r=0;r<L_CODES$1;r++)e.dyn_ltree[r*2]=0;for(r=0;r<D_CODES$1;r++)e.dyn_dtree[r*2]=0;for(r=0;r<BL_CODES$1;r++)e.bl_tree[r*2]=0;e.dyn_ltree[END_BLOCK*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},bi_windup=e=>{e.bi_valid>8?put_short(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},smaller=(e,r,t,a)=>{const n=r*2,o=t*2;return e[n]<e[o]||e[n]===e[o]&&a[r]<=a[t]},pqdownheap=(e,r,t)=>{const a=e.heap[t];let n=t<<1;for(;n<=e.heap_len&&(n<e.heap_len&&smaller(r,e.heap[n+1],e.heap[n],e.depth)&&n++,!smaller(r,a,e.heap[n],e.depth));)e.heap[t]=e.heap[n],t=n,n<<=1;e.heap[t]=a},compress_block=(e,r,t)=>{let a,n,o=0,c,s;if(e.sym_next!==0)do a=e.pending_buf[e.sym_buf+o++]&255,a+=(e.pending_buf[e.sym_buf+o++]&255)<<8,n=e.pending_buf[e.sym_buf+o++],a===0?send_code(e,n,r):(c=_length_code[n],send_code(e,c+LITERALS$1+1,r),s=extra_lbits[c],s!==0&&(n-=base_length[c],send_bits(e,n,s)),a--,c=d_code(a),send_code(e,c,t),s=extra_dbits[c],s!==0&&(a-=base_dist[c],send_bits(e,a,s)));while(o<e.sym_next);send_code(e,END_BLOCK,r)},build_tree=(e,r)=>{const t=r.dyn_tree,a=r.stat_desc.static_tree,n=r.stat_desc.has_stree,o=r.stat_desc.elems;let c,s,f=-1,l;for(e.heap_len=0,e.heap_max=HEAP_SIZE$1,c=0;c<o;c++)t[c*2]!==0?(e.heap[++e.heap_len]=f=c,e.depth[c]=0):t[c*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=f<2?++f:0,t[l*2]=1,e.depth[l]=0,e.opt_len--,n&&(e.static_len-=a[l*2+1]);for(r.max_code=f,c=e.heap_len>>1;c>=1;c--)pqdownheap(e,t,c);l=o;do c=e.heap[1],e.heap[1]=e.heap[e.heap_len--],pqdownheap(e,t,1),s=e.heap[1],e.heap[--e.heap_max]=c,e.heap[--e.heap_max]=s,t[l*2]=t[c*2]+t[s*2],e.depth[l]=(e.depth[c]>=e.depth[s]?e.depth[c]:e.depth[s])+1,t[c*2+1]=t[s*2+1]=l,e.heap[1]=l++,pqdownheap(e,t,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],gen_bitlen(e,r),gen_codes(t,f,e.bl_count)},scan_tree=(e,r,t)=>{let a,n=-1,o,c=r[0*2+1],s=0,f=7,l=4;for(c===0&&(f=138,l=3),r[(t+1)*2+1]=65535,a=0;a<=t;a++)o=c,c=r[(a+1)*2+1],!(++s<f&&o===c)&&(s<l?e.bl_tree[o*2]+=s:o!==0?(o!==n&&e.bl_tree[o*2]++,e.bl_tree[REP_3_6*2]++):s<=10?e.bl_tree[REPZ_3_10*2]++:e.bl_tree[REPZ_11_138*2]++,s=0,n=o,c===0?(f=138,l=3):o===c?(f=6,l=3):(f=7,l=4))},send_tree=(e,r,t)=>{let a,n=-1,o,c=r[0*2+1],s=0,f=7,l=4;for(c===0&&(f=138,l=3),a=0;a<=t;a++)if(o=c,c=r[(a+1)*2+1],!(++s<f&&o===c)){if(s<l)do send_code(e,o,e.bl_tree);while(--s!==0);else o!==0?(o!==n&&(send_code(e,o,e.bl_tree),s--),send_code(e,REP_3_6,e.bl_tree),send_bits(e,s-3,2)):s<=10?(send_code(e,REPZ_3_10,e.bl_tree),send_bits(e,s-3,3)):(send_code(e,REPZ_11_138,e.bl_tree),send_bits(e,s-11,7));s=0,n=o,c===0?(f=138,l=3):o===c?(f=6,l=3):(f=7,l=4)}},build_bl_tree=e=>{let r;for(scan_tree(e,e.dyn_ltree,e.l_desc.max_code),scan_tree(e,e.dyn_dtree,e.d_desc.max_code),build_tree(e,e.bl_desc),r=BL_CODES$1-1;r>=3&&e.bl_tree[bl_order[r]*2+1]===0;r--);return e.opt_len+=3*(r+1)+5+5+4,r},send_all_trees=(e,r,t,a)=>{let n;for(send_bits(e,r-257,5),send_bits(e,t-1,5),send_bits(e,a-4,4),n=0;n<a;n++)send_bits(e,e.bl_tree[bl_order[n]*2+1],3);send_tree(e,e.dyn_ltree,r-1),send_tree(e,e.dyn_dtree,t-1)},detect_data_type=e=>{let r=4093624447,t;for(t=0;t<=31;t++,r>>>=1)if(r&1&&e.dyn_ltree[t*2]!==0)return Z_BINARY;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return Z_TEXT;for(t=32;t<LITERALS$1;t++)if(e.dyn_ltree[t*2]!==0)return Z_TEXT;return Z_BINARY};let static_init_done=!1;const _tr_init$1=e=>{static_init_done||(tr_static_init(),static_init_done=!0),e.l_desc=new TreeDesc(e.dyn_ltree,static_l_desc),e.d_desc=new TreeDesc(e.dyn_dtree,static_d_desc),e.bl_desc=new TreeDesc(e.bl_tree,static_bl_desc),e.bi_buf=0,e.bi_valid=0,init_block(e)},_tr_stored_block$1=(e,r,t,a)=>{send_bits(e,(STORED_BLOCK<<1)+(a?1:0),3),bi_windup(e),put_short(e,t),put_short(e,~t),t&&e.pending_buf.set(e.window.subarray(r,r+t),e.pending),e.pending+=t},_tr_align$1=e=>{send_bits(e,STATIC_TREES<<1,3),send_code(e,END_BLOCK,static_ltree),bi_flush(e)},_tr_flush_block$1=(e,r,t,a)=>{let n,o,c=0;e.level>0?(e.strm.data_type===Z_UNKNOWN$1&&(e.strm.data_type=detect_data_type(e)),build_tree(e,e.l_desc),build_tree(e,e.d_desc),c=build_bl_tree(e),n=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=n&&(n=o)):n=o=t+5,t+4<=n&&r!==-1?_tr_stored_block$1(e,r,t,a):e.strategy===Z_FIXED$1||o===n?(send_bits(e,(STATIC_TREES<<1)+(a?1:0),3),compress_block(e,static_ltree,static_dtree)):(send_bits(e,(DYN_TREES<<1)+(a?1:0),3),send_all_trees(e,e.l_desc.max_code+1,e.d_desc.max_code+1,c+1),compress_block(e,e.dyn_ltree,e.dyn_dtree)),init_block(e),a&&bi_windup(e)},_tr_tally$1=(e,r,t)=>(e.pending_buf[e.sym_buf+e.sym_next++]=r,e.pending_buf[e.sym_buf+e.sym_next++]=r>>8,e.pending_buf[e.sym_buf+e.sym_next++]=t,r===0?e.dyn_ltree[t*2]++:(e.matches++,r--,e.dyn_ltree[(_length_code[t]+LITERALS$1+1)*2]++,e.dyn_dtree[d_code(r)*2]++),e.sym_next===e.sym_end);var _tr_init_1=_tr_init$1,_tr_stored_block_1=_tr_stored_block$1,_tr_flush_block_1=_tr_flush_block$1,_tr_tally_1=_tr_tally$1,_tr_align_1=_tr_align$1,trees={_tr_init:_tr_init_1,_tr_stored_block:_tr_stored_block_1,_tr_flush_block:_tr_flush_block_1,_tr_tally:_tr_tally_1,_tr_align:_tr_align_1};const adler32=(e,r,t,a)=>{let n=e&65535|0,o=e>>>16&65535|0,c=0;for(;t!==0;){c=t>2e3?2e3:t,t-=c;do n=n+r[a++]|0,o=o+n|0;while(--c);n%=65521,o%=65521}return n|o<<16|0};var adler32_1=adler32;const makeTable=()=>{let e,r=[];for(var t=0;t<256;t++){e=t;for(var a=0;a<8;a++)e=e&1?3988292384^e>>>1:e>>>1;r[t]=e}return r},crcTable=new Uint32Array(makeTable()),crc32=(e,r,t,a)=>{const n=crcTable,o=a+t;e^=-1;for(let c=a;c<o;c++)e=e>>>8^n[(e^r[c])&255];return e^-1};var crc32_1=crc32,messages={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},constants$2={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init,_tr_stored_block,_tr_flush_block,_tr_tally,_tr_align}=trees,{Z_NO_FLUSH:Z_NO_FLUSH$2,Z_PARTIAL_FLUSH,Z_FULL_FLUSH:Z_FULL_FLUSH$1,Z_FINISH:Z_FINISH$3,Z_BLOCK:Z_BLOCK$1,Z_OK:Z_OK$3,Z_STREAM_END:Z_STREAM_END$3,Z_STREAM_ERROR:Z_STREAM_ERROR$2,Z_DATA_ERROR:Z_DATA_ERROR$2,Z_BUF_ERROR:Z_BUF_ERROR$1,Z_DEFAULT_COMPRESSION:Z_DEFAULT_COMPRESSION$1,Z_FILTERED,Z_HUFFMAN_ONLY,Z_RLE,Z_FIXED,Z_DEFAULT_STRATEGY:Z_DEFAULT_STRATEGY$1,Z_UNKNOWN,Z_DEFLATED:Z_DEFLATED$2}=constants$2,MAX_MEM_LEVEL=9,MAX_WBITS$1=15,DEF_MEM_LEVEL=8,LENGTH_CODES=29,LITERALS=256,L_CODES=LITERALS+1+LENGTH_CODES,D_CODES=30,BL_CODES=19,HEAP_SIZE=2*L_CODES+1,MAX_BITS=15,MIN_MATCH=3,MAX_MATCH=258,MIN_LOOKAHEAD=MAX_MATCH+MIN_MATCH+1,PRESET_DICT=32,INIT_STATE=42,GZIP_STATE=57,EXTRA_STATE=69,NAME_STATE=73,COMMENT_STATE=91,HCRC_STATE=103,BUSY_STATE=113,FINISH_STATE=666,BS_NEED_MORE=1,BS_BLOCK_DONE=2,BS_FINISH_STARTED=3,BS_FINISH_DONE=4,OS_CODE=3,err=(e,r)=>(e.msg=messages[r],r),rank=e=>e*2-(e>4?9:0),zero=e=>{let r=e.length;for(;--r>=0;)e[r]=0},slide_hash=e=>{let r,t,a,n=e.w_size;r=e.hash_size,a=r;do t=e.head[--a],e.head[a]=t>=n?t-n:0;while(--r);r=n,a=r;do t=e.prev[--a],e.prev[a]=t>=n?t-n:0;while(--r)};let HASH_ZLIB=(e,r,t)=>(r<<e.hash_shift^t)&e.hash_mask,HASH=HASH_ZLIB;const flush_pending=e=>{const r=e.state;let t=r.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.output.set(r.pending_buf.subarray(r.pending_out,r.pending_out+t),e.next_out),e.next_out+=t,r.pending_out+=t,e.total_out+=t,e.avail_out-=t,r.pending-=t,r.pending===0&&(r.pending_out=0))},flush_block_only=(e,r)=>{_tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,r),e.block_start=e.strstart,flush_pending(e.strm)},put_byte=(e,r)=>{e.pending_buf[e.pending++]=r},putShortMSB=(e,r)=>{e.pending_buf[e.pending++]=r>>>8&255,e.pending_buf[e.pending++]=r&255},read_buf=(e,r,t,a)=>{let n=e.avail_in;return n>a&&(n=a),n===0?0:(e.avail_in-=n,r.set(e.input.subarray(e.next_in,e.next_in+n),t),e.state.wrap===1?e.adler=adler32_1(e.adler,r,n,t):e.state.wrap===2&&(e.adler=crc32_1(e.adler,r,n,t)),e.next_in+=n,e.total_in+=n,n)},longest_match=(e,r)=>{let t=e.max_chain_length,a=e.strstart,n,o,c=e.prev_length,s=e.nice_match;const f=e.strstart>e.w_size-MIN_LOOKAHEAD?e.strstart-(e.w_size-MIN_LOOKAHEAD):0,l=e.window,d=e.w_mask,A=e.prev,g=e.strstart+MAX_MATCH;let _=l[a+c-1],w=l[a+c];e.prev_length>=e.good_match&&(t>>=2),s>e.lookahead&&(s=e.lookahead);do if(n=r,!(l[n+c]!==w||l[n+c-1]!==_||l[n]!==l[a]||l[++n]!==l[a+1])){a+=2,n++;do;while(l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&a<g);if(o=MAX_MATCH-(g-a),a=g-MAX_MATCH,o>c){if(e.match_start=r,c=o,o>=s)break;_=l[a+c-1],w=l[a+c]}}while((r=A[r&d])>f&&--t!==0);return c<=e.lookahead?c:e.lookahead},fill_window=e=>{const r=e.w_size;let t,a,n;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=r+(r-MIN_LOOKAHEAD)&&(e.window.set(e.window.subarray(r,r+r-a),0),e.match_start-=r,e.strstart-=r,e.block_start-=r,e.insert>e.strstart&&(e.insert=e.strstart),slide_hash(e),a+=r),e.strm.avail_in===0)break;if(t=read_buf(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=t,e.lookahead+e.insert>=MIN_MATCH)for(n=e.strstart-e.insert,e.ins_h=e.window[n],e.ins_h=HASH(e,e.ins_h,e.window[n+1]);e.insert&&(e.ins_h=HASH(e,e.ins_h,e.window[n+MIN_MATCH-1]),e.prev[n&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=n,n++,e.insert--,!(e.lookahead+e.insert<MIN_MATCH)););}while(e.lookahead<MIN_LOOKAHEAD&&e.strm.avail_in!==0)},deflate_stored=(e,r)=>{let t=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,a,n,o,c=0,s=e.strm.avail_in;do{if(a=65535,o=e.bi_valid+42>>3,e.strm.avail_out<o||(o=e.strm.avail_out-o,n=e.strstart-e.block_start,a>n+e.strm.avail_in&&(a=n+e.strm.avail_in),a>o&&(a=o),a<t&&(a===0&&r!==Z_FINISH$3||r===Z_NO_FLUSH$2||a!==n+e.strm.avail_in)))break;c=r===Z_FINISH$3&&a===n+e.strm.avail_in?1:0,_tr_stored_block(e,0,0,c),e.pending_buf[e.pending-4]=a,e.pending_buf[e.pending-3]=a>>8,e.pending_buf[e.pending-2]=~a,e.pending_buf[e.pending-1]=~a>>8,flush_pending(e.strm),n&&(n>a&&(n=a),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+n),e.strm.next_out),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n,e.block_start+=n,a-=n),a&&(read_buf(e.strm,e.strm.output,e.strm.next_out,a),e.strm.next_out+=a,e.strm.avail_out-=a,e.strm.total_out+=a)}while(c===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),c?BS_FINISH_DONE:r!==Z_NO_FLUSH$2&&r!==Z_FINISH$3&&e.strm.avail_in===0&&e.strstart===e.block_start?BS_BLOCK_DONE:(o=e.window_size-e.strstart,e.strm.avail_in>o&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(read_buf(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water<e.strstart&&(e.high_water=e.strstart),o=e.bi_valid+42>>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,t=o>e.w_size?e.w_size:o,n=e.strstart-e.block_start,(n>=t||(n||r===Z_FINISH$3)&&r!==Z_NO_FLUSH$2&&e.strm.avail_in===0&&n<=o)&&(a=n>o?o:n,c=r===Z_FINISH$3&&e.strm.avail_in===0&&a===n?1:0,_tr_stored_block(e,e.block_start,a,c),e.block_start+=a,flush_pending(e.strm)),c?BS_FINISH_STARTED:BS_NEED_MORE)},deflate_fast=(e,r)=>{let t,a;for(;;){if(e.lookahead<MIN_LOOKAHEAD){if(fill_window(e),e.lookahead<MIN_LOOKAHEAD&&r===Z_NO_FLUSH$2)return BS_NEED_MORE;if(e.lookahead===0)break}if(t=0,e.lookahead>=MIN_MATCH&&(e.ins_h=HASH(e,e.ins_h,e.window[e.strstart+MIN_MATCH-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),t!==0&&e.strstart-t<=e.w_size-MIN_LOOKAHEAD&&(e.match_length=longest_match(e,t)),e.match_length>=MIN_MATCH)if(a=_tr_tally(e,e.strstart-e.match_start,e.match_length-MIN_MATCH),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=MIN_MATCH){e.match_length--;do e.strstart++,e.ins_h=HASH(e,e.ins_h,e.window[e.strstart+MIN_MATCH-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=HASH(e,e.ins_h,e.window[e.strstart+1]);else a=_tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(a&&(flush_block_only(e,!1),e.strm.avail_out===0))return BS_NEED_MORE}return e.insert=e.strstart<MIN_MATCH-1?e.strstart:MIN_MATCH-1,r===Z_FINISH$3?(flush_block_only(e,!0),e.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):e.sym_next&&(flush_block_only(e,!1),e.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_slow=(e,r)=>{let t,a,n;for(;;){if(e.lookahead<MIN_LOOKAHEAD){if(fill_window(e),e.lookahead<MIN_LOOKAHEAD&&r===Z_NO_FLUSH$2)return BS_NEED_MORE;if(e.lookahead===0)break}if(t=0,e.lookahead>=MIN_MATCH&&(e.ins_h=HASH(e,e.ins_h,e.window[e.strstart+MIN_MATCH-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=MIN_MATCH-1,t!==0&&e.prev_length<e.max_lazy_match&&e.strstart-t<=e.w_size-MIN_LOOKAHEAD&&(e.match_length=longest_match(e,t),e.match_length<=5&&(e.strategy===Z_FILTERED||e.match_length===MIN_MATCH&&e.strstart-e.match_start>4096)&&(e.match_length=MIN_MATCH-1)),e.prev_length>=MIN_MATCH&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-MIN_MATCH,a=_tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-MIN_MATCH),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=n&&(e.ins_h=HASH(e,e.ins_h,e.window[e.strstart+MIN_MATCH-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=MIN_MATCH-1,e.strstart++,a&&(flush_block_only(e,!1),e.strm.avail_out===0))return BS_NEED_MORE}else if(e.match_available){if(a=_tr_tally(e,0,e.window[e.strstart-1]),a&&flush_block_only(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return BS_NEED_MORE}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(a=_tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<MIN_MATCH-1?e.strstart:MIN_MATCH-1,r===Z_FINISH$3?(flush_block_only(e,!0),e.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):e.sym_next&&(flush_block_only(e,!1),e.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_rle=(e,r)=>{let t,a,n,o;const c=e.window;for(;;){if(e.lookahead<=MAX_MATCH){if(fill_window(e),e.lookahead<=MAX_MATCH&&r===Z_NO_FLUSH$2)return BS_NEED_MORE;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=MIN_MATCH&&e.strstart>0&&(n=e.strstart-1,a=c[n],a===c[++n]&&a===c[++n]&&a===c[++n])){o=e.strstart+MAX_MATCH;do;while(a===c[++n]&&a===c[++n]&&a===c[++n]&&a===c[++n]&&a===c[++n]&&a===c[++n]&&a===c[++n]&&a===c[++n]&&n<o);e.match_length=MAX_MATCH-(o-n),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=MIN_MATCH?(t=_tr_tally(e,1,e.match_length-MIN_MATCH),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(t=_tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),t&&(flush_block_only(e,!1),e.strm.avail_out===0))return BS_NEED_MORE}return e.insert=0,r===Z_FINISH$3?(flush_block_only(e,!0),e.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):e.sym_next&&(flush_block_only(e,!1),e.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_huff=(e,r)=>{let t;for(;;){if(e.lookahead===0&&(fill_window(e),e.lookahead===0)){if(r===Z_NO_FLUSH$2)return BS_NEED_MORE;break}if(e.match_length=0,t=_tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,t&&(flush_block_only(e,!1),e.strm.avail_out===0))return BS_NEED_MORE}return e.insert=0,r===Z_FINISH$3?(flush_block_only(e,!0),e.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):e.sym_next&&(flush_block_only(e,!1),e.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE};function Config(e,r,t,a,n){this.good_length=e,this.max_lazy=r,this.nice_length=t,this.max_chain=a,this.func=n}const configuration_table=[new Config(0,0,0,0,deflate_stored),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)],lm_init=e=>{e.window_size=2*e.w_size,zero(e.head),e.max_lazy_match=configuration_table[e.level].max_lazy,e.good_match=configuration_table[e.level].good_length,e.nice_match=configuration_table[e.level].nice_length,e.max_chain_length=configuration_table[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=MIN_MATCH-1,e.match_available=0,e.ins_h=0};function DeflateState(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Z_DEFLATED$2,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(HEAP_SIZE*2),this.dyn_dtree=new Uint16Array((2*D_CODES+1)*2),this.bl_tree=new Uint16Array((2*BL_CODES+1)*2),zero(this.dyn_ltree),zero(this.dyn_dtree),zero(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(MAX_BITS+1),this.heap=new Uint16Array(2*L_CODES+1),zero(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*L_CODES+1),zero(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const deflateStateCheck=e=>{if(!e)return 1;const r=e.state;return!r||r.strm!==e||r.status!==INIT_STATE&&r.status!==GZIP_STATE&&r.status!==EXTRA_STATE&&r.status!==NAME_STATE&&r.status!==COMMENT_STATE&&r.status!==HCRC_STATE&&r.status!==BUSY_STATE&&r.status!==FINISH_STATE?1:0},deflateResetKeep=e=>{if(deflateStateCheck(e))return err(e,Z_STREAM_ERROR$2);e.total_in=e.total_out=0,e.data_type=Z_UNKNOWN;const r=e.state;return r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap===2?GZIP_STATE:r.wrap?INIT_STATE:BUSY_STATE,e.adler=r.wrap===2?0:1,r.last_flush=-2,_tr_init(r),Z_OK$3},deflateReset=e=>{const r=deflateResetKeep(e);return r===Z_OK$3&&lm_init(e.state),r},deflateSetHeader=(e,r)=>deflateStateCheck(e)||e.state.wrap!==2?Z_STREAM_ERROR$2:(e.state.gzhead=r,Z_OK$3),deflateInit2=(e,r,t,a,n,o)=>{if(!e)return Z_STREAM_ERROR$2;let c=1;if(r===Z_DEFAULT_COMPRESSION$1&&(r=6),a<0?(c=0,a=-a):a>15&&(c=2,a-=16),n<1||n>MAX_MEM_LEVEL||t!==Z_DEFLATED$2||a<8||a>15||r<0||r>9||o<0||o>Z_FIXED||a===8&&c!==1)return err(e,Z_STREAM_ERROR$2);a===8&&(a=9);const s=new DeflateState;return e.state=s,s.strm=e,s.status=INIT_STATE,s.wrap=c,s.gzhead=null,s.w_bits=a,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=n+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+MIN_MATCH-1)/MIN_MATCH),s.window=new Uint8Array(s.w_size*2),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<n+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=(s.lit_bufsize-1)*3,s.level=r,s.strategy=o,s.method=t,deflateReset(e)},deflateInit=(e,r)=>deflateInit2(e,r,Z_DEFLATED$2,MAX_WBITS$1,DEF_MEM_LEVEL,Z_DEFAULT_STRATEGY$1),deflate$2=(e,r)=>{if(deflateStateCheck(e)||r>Z_BLOCK$1||r<0)return e?err(e,Z_STREAM_ERROR$2):Z_STREAM_ERROR$2;const t=e.state;if(!e.output||e.avail_in!==0&&!e.input||t.status===FINISH_STATE&&r!==Z_FINISH$3)return err(e,e.avail_out===0?Z_BUF_ERROR$1:Z_STREAM_ERROR$2);const a=t.last_flush;if(t.last_flush=r,t.pending!==0){if(flush_pending(e),e.avail_out===0)return t.last_flush=-1,Z_OK$3}else if(e.avail_in===0&&rank(r)<=rank(a)&&r!==Z_FINISH$3)return err(e,Z_BUF_ERROR$1);if(t.status===FINISH_STATE&&e.avail_in!==0)return err(e,Z_BUF_ERROR$1);if(t.status===INIT_STATE&&t.wrap===0&&(t.status=BUSY_STATE),t.status===INIT_STATE){let n=Z_DEFLATED$2+(t.w_bits-8<<4)<<8,o=-1;if(t.strategy>=Z_HUFFMAN_ONLY||t.level<2?o=0:t.level<6?o=1:t.level===6?o=2:o=3,n|=o<<6,t.strstart!==0&&(n|=PRESET_DICT),n+=31-n%31,putShortMSB(t,n),t.strstart!==0&&(putShortMSB(t,e.adler>>>16),putShortMSB(t,e.adler&65535)),e.adler=1,t.status=BUSY_STATE,flush_pending(e),t.pending!==0)return t.last_flush=-1,Z_OK$3}if(t.status===GZIP_STATE){if(e.adler=0,put_byte(t,31),put_byte(t,139),put_byte(t,8),t.gzhead)put_byte(t,(t.gzhead.text?1:0)+(t.gzhead.hcrc?2:0)+(t.gzhead.extra?4:0)+(t.gzhead.name?8:0)+(t.gzhead.comment?16:0)),put_byte(t,t.gzhead.time&255),put_byte(t,t.gzhead.time>>8&255),put_byte(t,t.gzhead.time>>16&255),put_byte(t,t.gzhead.time>>24&255),put_byte(t,t.level===9?2:t.strategy>=Z_HUFFMAN_ONLY||t.level<2?4:0),put_byte(t,t.gzhead.os&255),t.gzhead.extra&&t.gzhead.extra.length&&(put_byte(t,t.gzhead.extra.length&255),put_byte(t,t.gzhead.extra.length>>8&255)),t.gzhead.hcrc&&(e.adler=crc32_1(e.adler,t.pending_buf,t.pending,0)),t.gzindex=0,t.status=EXTRA_STATE;else if(put_byte(t,0),put_byte(t,0),put_byte(t,0),put_byte(t,0),put_byte(t,0),put_byte(t,t.level===9?2:t.strategy>=Z_HUFFMAN_ONLY||t.level<2?4:0),put_byte(t,OS_CODE),t.status=BUSY_STATE,flush_pending(e),t.pending!==0)return t.last_flush=-1,Z_OK$3}if(t.status===EXTRA_STATE){if(t.gzhead.extra){let n=t.pending,o=(t.gzhead.extra.length&65535)-t.gzindex;for(;t.pending+o>t.pending_buf_size;){let s=t.pending_buf_size-t.pending;if(t.pending_buf.set(t.gzhead.extra.subarray(t.gzindex,t.gzindex+s),t.pending),t.pending=t.pending_buf_size,t.gzhead.hcrc&&t.pending>n&&(e.adler=crc32_1(e.adler,t.pending_buf,t.pending-n,n)),t.gzindex+=s,flush_pending(e),t.pending!==0)return t.last_flush=-1,Z_OK$3;n=0,o-=s}let c=new Uint8Array(t.gzhead.extra);t.pending_buf.set(c.subarray(t.gzindex,t.gzindex+o),t.pending),t.pending+=o,t.gzhead.hcrc&&t.pending>n&&(e.adler=crc32_1(e.adler,t.pending_buf,t.pending-n,n)),t.gzindex=0}t.status=NAME_STATE}if(t.status===NAME_STATE){if(t.gzhead.name){let n=t.pending,o;do{if(t.pending===t.pending_buf_size){if(t.gzhead.hcrc&&t.pending>n&&(e.adler=crc32_1(e.adler,t.pending_buf,t.pending-n,n)),flush_pending(e),t.pending!==0)return t.last_flush=-1,Z_OK$3;n=0}t.gzindex<t.gzhead.name.length?o=t.gzhead.name.charCodeAt(t.gzindex++)&255:o=0,put_byte(t,o)}while(o!==0);t.gzhead.hcrc&&t.pending>n&&(e.adler=crc32_1(e.adler,t.pending_buf,t.pending-n,n)),t.gzindex=0}t.status=COMMENT_STATE}if(t.status===COMMENT_STATE){if(t.gzhead.comment){let n=t.pending,o;do{if(t.pending===t.pending_buf_size){if(t.gzhead.hcrc&&t.pending>n&&(e.adler=crc32_1(e.adler,t.pending_buf,t.pending-n,n)),flush_pending(e),t.pending!==0)return t.last_flush=-1,Z_OK$3;n=0}t.gzindex<t.gzhead.comment.length?o=t.gzhead.comment.charCodeAt(t.gzindex++)&255:o=0,put_byte(t,o)}while(o!==0);t.gzhead.hcrc&&t.pending>n&&(e.adler=crc32_1(e.adler,t.pending_buf,t.pending-n,n))}t.status=HCRC_STATE}if(t.status===HCRC_STATE){if(t.gzhead.hcrc){if(t.pending+2>t.pending_buf_size&&(flush_pending(e),t.pending!==0))return t.last_flush=-1,Z_OK$3;put_byte(t,e.adler&255),put_byte(t,e.adler>>8&255),e.adler=0}if(t.status=BUSY_STATE,flush_pending(e),t.pending!==0)return t.last_flush=-1,Z_OK$3}if(e.avail_in!==0||t.lookahead!==0||r!==Z_NO_FLUSH$2&&t.status!==FINISH_STATE){let n=t.level===0?deflate_stored(t,r):t.strategy===Z_HUFFMAN_ONLY?deflate_huff(t,r):t.strategy===Z_RLE?deflate_rle(t,r):configuration_table[t.level].func(t,r);if((n===BS_FINISH_STARTED||n===BS_FINISH_DONE)&&(t.status=FINISH_STATE),n===BS_NEED_MORE||n===BS_FINISH_STARTED)return e.avail_out===0&&(t.last_flush=-1),Z_OK$3;if(n===BS_BLOCK_DONE&&(r===Z_PARTIAL_FLUSH?_tr_align(t):r!==Z_BLOCK$1&&(_tr_stored_block(t,0,0,!1),r===Z_FULL_FLUSH$1&&(zero(t.head),t.lookahead===0&&(t.strstart=0,t.block_start=0,t.insert=0))),flush_pending(e),e.avail_out===0))return t.last_flush=-1,Z_OK$3}return r!==Z_FINISH$3?Z_OK$3:t.wrap<=0?Z_STREAM_END$3:(t.wrap===2?(put_byte(t,e.adler&255),put_byte(t,e.adler>>8&255),put_byte(t,e.adler>>16&255),put_byte(t,e.adler>>24&255),put_byte(t,e.total_in&255),put_byte(t,e.total_in>>8&255),put_byte(t,e.total_in>>16&255),put_byte(t,e.total_in>>24&255)):(putShortMSB(t,e.adler>>>16),putShortMSB(t,e.adler&65535)),flush_pending(e),t.wrap>0&&(t.wrap=-t.wrap),t.pending!==0?Z_OK$3:Z_STREAM_END$3)},deflateEnd=e=>{if(deflateStateCheck(e))return Z_STREAM_ERROR$2;const r=e.state.status;return e.state=null,r===BUSY_STATE?err(e,Z_DATA_ERROR$2):Z_OK$3},deflateSetDictionary=(e,r)=>{let t=r.length;if(deflateStateCheck(e))return Z_STREAM_ERROR$2;const a=e.state,n=a.wrap;if(n===2||n===1&&a.status!==INIT_STATE||a.lookahead)return Z_STREAM_ERROR$2;if(n===1&&(e.adler=adler32_1(e.adler,r,t,0)),a.wrap=0,t>=a.w_size){n===0&&(zero(a.head),a.strstart=0,a.block_start=0,a.insert=0);let f=new Uint8Array(a.w_size);f.set(r.subarray(t-a.w_size,t),0),r=f,t=a.w_size}const o=e.avail_in,c=e.next_in,s=e.input;for(e.avail_in=t,e.next_in=0,e.input=r,fill_window(a);a.lookahead>=MIN_MATCH;){let f=a.strstart,l=a.lookahead-(MIN_MATCH-1);do a.ins_h=HASH(a,a.ins_h,a.window[f+MIN_MATCH-1]),a.prev[f&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=f,f++;while(--l);a.strstart=f,a.lookahead=MIN_MATCH-1,fill_window(a)}return a.strstart+=a.lookahead,a.block_start=a.strstart,a.insert=a.lookahead,a.lookahead=0,a.match_length=a.prev_length=MIN_MATCH-1,a.match_available=0,e.next_in=c,e.input=s,e.avail_in=o,a.wrap=n,Z_OK$3};var deflateInit_1=deflateInit,deflateInit2_1=deflateInit2,deflateReset_1=deflateReset,deflateResetKeep_1=deflateResetKeep,deflateSetHeader_1=deflateSetHeader,deflate_2$1=deflate$2,deflateEnd_1=deflateEnd,deflateSetDictionary_1=deflateSetDictionary,deflateInfo="pako deflate (from Nodeca project)",deflate_1$2={deflateInit:deflateInit_1,deflateInit2:deflateInit2_1,deflateReset:deflateReset_1,deflateResetKeep:deflateResetKeep_1,deflateSetHeader:deflateSetHeader_1,deflate:deflate_2$1,deflateEnd:deflateEnd_1,deflateSetDictionary:deflateSetDictionary_1,deflateInfo};const _has=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var assign=function(e){const r=Array.prototype.slice.call(arguments,1);for(;r.length;){const t=r.shift();if(t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(const a in t)_has(t,a)&&(e[a]=t[a])}}return e},flattenChunks=e=>{let r=0;for(let a=0,n=e.length;a<n;a++)r+=e[a].length;const t=new Uint8Array(r);for(let a=0,n=0,o=e.length;a<o;a++){let c=e[a];t.set(c,n),n+=c.length}return t},common={assign,flattenChunks};let STR_APPLY_UIA_OK=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){STR_APPLY_UIA_OK=!1}const _utf8len=new Uint8Array(256);for(let e=0;e<256;e++)_utf8len[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;_utf8len[254]=_utf8len[254]=1;var string2buf=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let r,t,a,n,o,c=e.length,s=0;for(n=0;n<c;n++)t=e.charCodeAt(n),(t&64512)===55296&&n+1<c&&(a=e.charCodeAt(n+1),(a&64512)===56320&&(t=65536+(t-55296<<10)+(a-56320),n++)),s+=t<128?1:t<2048?2:t<65536?3:4;for(r=new Uint8Array(s),o=0,n=0;o<s;n++)t=e.charCodeAt(n),(t&64512)===55296&&n+1<c&&(a=e.charCodeAt(n+1),(a&64512)===56320&&(t=65536+(t-55296<<10)+(a-56320),n++)),t<128?r[o++]=t:t<2048?(r[o++]=192|t>>>6,r[o++]=128|t&63):t<65536?(r[o++]=224|t>>>12,r[o++]=128|t>>>6&63,r[o++]=128|t&63):(r[o++]=240|t>>>18,r[o++]=128|t>>>12&63,r[o++]=128|t>>>6&63,r[o++]=128|t&63);return r};const buf2binstring=(e,r)=>{if(r<65534&&e.subarray&&STR_APPLY_UIA_OK)return String.fromCharCode.apply(null,e.length===r?e:e.subarray(0,r));let t="";for(let a=0;a<r;a++)t+=String.fromCharCode(e[a]);return t};var buf2string=(e,r)=>{const t=r||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,r));let a,n;const o=new Array(t*2);for(n=0,a=0;a<t;){let c=e[a++];if(c<128){o[n++]=c;continue}let s=_utf8len[c];if(s>4){o[n++]=65533,a+=s-1;continue}for(c&=s===2?31:s===3?15:7;s>1&&a<t;)c=c<<6|e[a++]&63,s--;if(s>1){o[n++]=65533;continue}c<65536?o[n++]=c:(c-=65536,o[n++]=55296|c>>10&1023,o[n++]=56320|c&1023)}return buf2binstring(o,n)},utf8border=(e,r)=>{r=r||e.length,r>e.length&&(r=e.length);let t=r-1;for(;t>=0&&(e[t]&192)===128;)t--;return t<0||t===0?r:t+_utf8len[e[t]]>r?t:r},strings={string2buf,buf2string,utf8border};function ZStream(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var zstream=ZStream;const toString$1=Object.prototype.toString,{Z_NO_FLUSH:Z_NO_FLUSH$1,Z_SYNC_FLUSH,Z_FULL_FLUSH,Z_FINISH:Z_FINISH$2,Z_OK:Z_OK$2,Z_STREAM_END:Z_STREAM_END$2,Z_DEFAULT_COMPRESSION,Z_DEFAULT_STRATEGY,Z_DEFLATED:Z_DEFLATED$1}=constants$2;function Deflate$1(e){this.options=common.assign({level:Z_DEFAULT_COMPRESSION,method:Z_DEFLATED$1,chunkSize:16384,windowBits:15,memLevel:8,strategy:Z_DEFAULT_STRATEGY},e||{});let r=this.options;r.raw&&r.windowBits>0?r.windowBits=-r.windowBits:r.gzip&&r.windowBits>0&&r.windowBits<16&&(r.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let t=deflate_1$2.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(t!==Z_OK$2)throw new Error(messages[t]);if(r.header&&deflate_1$2.deflateSetHeader(this.strm,r.header),r.dictionary){let a;if(typeof r.dictionary=="string"?a=strings.string2buf(r.dictionary):toString$1.call(r.dictionary)==="[object ArrayBuffer]"?a=new Uint8Array(r.dictionary):a=r.dictionary,t=deflate_1$2.deflateSetDictionary(this.strm,a),t!==Z_OK$2)throw new Error(messages[t]);this._dict_set=!0}}Deflate$1.prototype.push=function(e,r){const t=this.strm,a=this.options.chunkSize;let n,o;if(this.ended)return!1;for(r===~~r?o=r:o=r===!0?Z_FINISH$2:Z_NO_FLUSH$1,typeof e=="string"?t.input=strings.string2buf(e):toString$1.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;;){if(t.avail_out===0&&(t.output=new Uint8Array(a),t.next_out=0,t.avail_out=a),(o===Z_SYNC_FLUSH||o===Z_FULL_FLUSH)&&t.avail_out<=6){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(n=deflate_1$2.deflate(t,o),n===Z_STREAM_END$2)return t.next_out>0&&this.onData(t.output.subarray(0,t.next_out)),n=deflate_1$2.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Z_OK$2;if(t.avail_out===0){this.onData(t.output);continue}if(o>0&&t.next_out>0){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(t.avail_in===0)break}return!0};Deflate$1.prototype.onData=function(e){this.chunks.push(e)};Deflate$1.prototype.onEnd=function(e){e===Z_OK$2&&(this.result=common.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function deflate$1(e,r){const t=new Deflate$1(r);if(t.push(e,!0),t.err)throw t.msg||messages[t.err];return t.result}function deflateRaw$1(e,r){return r=r||{},r.raw=!0,deflate$1(e,r)}function gzip$1(e,r){return r=r||{},r.gzip=!0,deflate$1(e,r)}var Deflate_1$1=Deflate$1,deflate_2=deflate$1,deflateRaw_1$1=deflateRaw$1,gzip_1$1=gzip$1,constants$1=constants$2,deflate_1$1={Deflate:Deflate_1$1,deflate:deflate_2,deflateRaw:deflateRaw_1$1,gzip:gzip_1$1,constants:constants$1};const BAD$1=16209,TYPE$1=16191;var inffast=function e(r,t){let a,n,o,c,s,f,l,d,A,g,_,w,L,R,h,E,S,u,T,v,m,y,p,b;const I=r.state;a=r.next_in,p=r.input,n=a+(r.avail_in-5),o=r.next_out,b=r.output,c=o-(t-r.avail_out),s=o+(r.avail_out-257),f=I.dmax,l=I.wsize,d=I.whave,A=I.wnext,g=I.window,_=I.hold,w=I.bits,L=I.lencode,R=I.distcode,h=(1<<I.lenbits)-1,E=(1<<I.distbits)-1;e:do{w<15&&(_+=p[a++]<<w,w+=8,_+=p[a++]<<w,w+=8),S=L[_&h];t:for(;;){if(u=S>>>24,_>>>=u,w-=u,u=S>>>16&255,u===0)b[o++]=S&65535;else if(u&16){T=S&65535,u&=15,u&&(w<u&&(_+=p[a++]<<w,w+=8),T+=_&(1<<u)-1,_>>>=u,w-=u),w<15&&(_+=p[a++]<<w,w+=8,_+=p[a++]<<w,w+=8),S=R[_&E];r:for(;;){if(u=S>>>24,_>>>=u,w-=u,u=S>>>16&255,u&16){if(v=S&65535,u&=15,w<u&&(_+=p[a++]<<w,w+=8,w<u&&(_+=p[a++]<<w,w+=8)),v+=_&(1<<u)-1,v>f){r.msg="invalid distance too far back",I.mode=BAD$1;break e}if(_>>>=u,w-=u,u=o-c,v>u){if(u=v-u,u>d&&I.sane){r.msg="invalid distance too far back",I.mode=BAD$1;break e}if(m=0,y=g,A===0){if(m+=l-u,u<T){T-=u;do b[o++]=g[m++];while(--u);m=o-v,y=b}}else if(A<u){if(m+=l+A-u,u-=A,u<T){T-=u;do b[o++]=g[m++];while(--u);if(m=0,A<T){u=A,T-=u;do b[o++]=g[m++];while(--u);m=o-v,y=b}}}else if(m+=A-u,u<T){T-=u;do b[o++]=g[m++];while(--u);m=o-v,y=b}for(;T>2;)b[o++]=y[m++],b[o++]=y[m++],b[o++]=y[m++],T-=3;T&&(b[o++]=y[m++],T>1&&(b[o++]=y[m++]))}else{m=o-v;do b[o++]=b[m++],b[o++]=b[m++],b[o++]=b[m++],T-=3;while(T>2);T&&(b[o++]=b[m++],T>1&&(b[o++]=b[m++]))}}else if(u&64){r.msg="invalid distance code",I.mode=BAD$1;break e}else{S=R[(S&65535)+(_&(1<<u)-1)];continue r}break}}else if(u&64)if(u&32){I.mode=TYPE$1;break e}else{r.msg="invalid literal/length code",I.mode=BAD$1;break e}else{S=L[(S&65535)+(_&(1<<u)-1)];continue t}break}}while(a<n&&o<s);T=w>>3,a-=T,w-=T<<3,_&=(1<<w)-1,r.next_in=a,r.next_out=o,r.avail_in=a<n?5+(n-a):5-(a-n),r.avail_out=o<s?257+(s-o):257-(o-s),I.hold=_,I.bits=w};const MAXBITS=15,ENOUGH_LENS$1=852,ENOUGH_DISTS$1=592,CODES$1=0,LENS$1=1,DISTS$1=2,lbase=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),lext=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),dbase=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),dext=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),inflate_table=(e,r,t,a,n,o,c,s)=>{const f=s.bits;let l=0,d=0,A=0,g=0,_=0,w=0,L=0,R=0,h=0,E=0,S,u,T,v,m,y=null,p;const b=new Uint16Array(MAXBITS+1),I=new Uint16Array(MAXBITS+1);let N=null,C,D,O;for(l=0;l<=MAXBITS;l++)b[l]=0;for(d=0;d<a;d++)b[r[t+d]]++;for(_=f,g=MAXBITS;g>=1&&b[g]===0;g--);if(_>g&&(_=g),g===0)return n[o++]=1<<24|64<<16|0,n[o++]=1<<24|64<<16|0,s.bits=1,0;for(A=1;A<g&&b[A]===0;A++);for(_<A&&(_=A),R=1,l=1;l<=MAXBITS;l++)if(R<<=1,R-=b[l],R<0)return-1;if(R>0&&(e===CODES$1||g!==1))return-1;for(I[1]=0,l=1;l<MAXBITS;l++)I[l+1]=I[l]+b[l];for(d=0;d<a;d++)r[t+d]!==0&&(c[I[r[t+d]]++]=d);if(e===CODES$1?(y=N=c,p=20):e===LENS$1?(y=lbase,N=lext,p=257):(y=dbase,N=dext,p=0),E=0,d=0,l=A,m=o,w=_,L=0,T=-1,h=1<<_,v=h-1,e===LENS$1&&h>ENOUGH_LENS$1||e===DISTS$1&&h>ENOUGH_DISTS$1)return 1;for(;;){C=l-L,c[d]+1<p?(D=0,O=c[d]):c[d]>=p?(D=N[c[d]-p],O=y[c[d]-p]):(D=32+64,O=0),S=1<<l-L,u=1<<w,A=u;do u-=S,n[m+(E>>L)+u]=C<<24|D<<16|O|0;while(u!==0);for(S=1<<l-1;E&S;)S>>=1;if(S!==0?(E&=S-1,E+=S):E=0,d++,--b[l]===0){if(l===g)break;l=r[t+c[d]]}if(l>_&&(E&v)!==T){for(L===0&&(L=_),m+=A,w=l-L,R=1<<w;w+L<g&&(R-=b[w+L],!(R<=0));)w++,R<<=1;if(h+=1<<w,e===LENS$1&&h>ENOUGH_LENS$1||e===DISTS$1&&h>ENOUGH_DISTS$1)return 1;T=E&v,n[T]=_<<24|w<<16|m-o|0}}return E!==0&&(n[m+E]=l-L<<24|64<<16|0),s.bits=_,0};var inftrees=inflate_table;const CODES=0,LENS=1,DISTS=2,{Z_FINISH:Z_FINISH$1,Z_BLOCK,Z_TREES,Z_OK:Z_OK$1,Z_STREAM_END:Z_STREAM_END$1,Z_NEED_DICT:Z_NEED_DICT$1,Z_STREAM_ERROR:Z_STREAM_ERROR$1,Z_DATA_ERROR:Z_DATA_ERROR$1,Z_MEM_ERROR:Z_MEM_ERROR$1,Z_BUF_ERROR,Z_DEFLATED}=constants$2,HEAD=16180,FLAGS=16181,TIME=16182,OS=16183,EXLEN=16184,EXTRA=16185,NAME=16186,COMMENT=16187,HCRC=16188,DICTID=16189,DICT=16190,TYPE=16191,TYPEDO=16192,STORED=16193,COPY_=16194,COPY=16195,TABLE=16196,LENLENS=16197,CODELENS=16198,LEN_=16199,LEN=16200,LENEXT=16201,DIST=16202,DISTEXT=16203,MATCH=16204,LIT=16205,CHECK=16206,LENGTH=16207,DONE=16208,BAD=16209,MEM=16210,SYNC=16211,ENOUGH_LENS=852,ENOUGH_DISTS=592,MAX_WBITS=15,DEF_WBITS=MAX_WBITS,zswap32=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function InflateState(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const inflateStateCheck=e=>{if(!e)return 1;const r=e.state;return!r||r.strm!==e||r.mode<HEAD||r.mode>SYNC?1:0},inflateResetKeep=e=>{if(inflateStateCheck(e))return Z_STREAM_ERROR$1;const r=e.state;return e.total_in=e.total_out=r.total=0,e.msg="",r.wrap&&(e.adler=r.wrap&1),r.mode=HEAD,r.last=0,r.havedict=0,r.flags=-1,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new Int32Array(ENOUGH_LENS),r.distcode=r.distdyn=new Int32Array(ENOUGH_DISTS),r.sane=1,r.back=-1,Z_OK$1},inflateReset=e=>{if(inflateStateCheck(e))return Z_STREAM_ERROR$1;const r=e.state;return r.wsize=0,r.whave=0,r.wnext=0,inflateResetKeep(e)},inflateReset2=(e,r)=>{let t;if(inflateStateCheck(e))return Z_STREAM_ERROR$1;const a=e.state;return r<0?(t=0,r=-r):(t=(r>>4)+5,r<48&&(r&=15)),r&&(r<8||r>15)?Z_STREAM_ERROR$1:(a.window!==null&&a.wbits!==r&&(a.window=null),a.wrap=t,a.wbits=r,inflateReset(e))},inflateInit2=(e,r)=>{if(!e)return Z_STREAM_ERROR$1;const t=new InflateState;e.state=t,t.strm=e,t.window=null,t.mode=HEAD;const a=inflateReset2(e,r);return a!==Z_OK$1&&(e.state=null),a},inflateInit=e=>inflateInit2(e,DEF_WBITS);let virgin=!0,lenfix,distfix;const fixedtables=e=>{if(virgin){lenfix=new Int32Array(512),distfix=new Int32Array(32);let r=0;for(;r<144;)e.lens[r++]=8;for(;r<256;)e.lens[r++]=9;for(;r<280;)e.lens[r++]=7;for(;r<288;)e.lens[r++]=8;for(inftrees(LENS,e.lens,0,288,lenfix,0,e.work,{bits:9}),r=0;r<32;)e.lens[r++]=5;inftrees(DISTS,e.lens,0,32,distfix,0,e.work,{bits:5}),virgin=!1}e.lencode=lenfix,e.lenbits=9,e.distcode=distfix,e.distbits=5},updatewindow=(e,r,t,a)=>{let n;const o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),a>=o.wsize?(o.window.set(r.subarray(t-o.wsize,t),0),o.wnext=0,o.whave=o.wsize):(n=o.wsize-o.wnext,n>a&&(n=a),o.window.set(r.subarray(t-a,t-a+n),o.wnext),a-=n,a?(o.window.set(r.subarray(t-a,t),0),o.wnext=a,o.whave=o.wsize):(o.wnext+=n,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=n))),0},inflate$2=(e,r)=>{let t,a,n,o,c,s,f,l,d,A,g,_,w,L,R=0,h,E,S,u,T,v,m,y;const p=new Uint8Array(4);let b,I;const N=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(inflateStateCheck(e)||!e.output||!e.input&&e.avail_in!==0)return Z_STREAM_ERROR$1;t=e.state,t.mode===TYPE&&(t.mode=TYPEDO),c=e.next_out,n=e.output,f=e.avail_out,o=e.next_in,a=e.input,s=e.avail_in,l=t.hold,d=t.bits,A=s,g=f,y=Z_OK$1;e:for(;;)switch(t.mode){case HEAD:if(t.wrap===0){t.mode=TYPEDO;break}for(;d<16;){if(s===0)break e;s--,l+=a[o++]<<d,d+=8}if(t.wrap&2&&l===35615){t.wbits===0&&(t.wbits=15),t.check=0,p[0]=l&255,p[1]=l>>>8&255,t.check=crc32_1(t.check,p,2,0),l=0,d=0,t.mode=FLAGS;break}if(t.head&&(t.head.done=!1),!(t.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",t.mode=BAD;break}if((l&15)!==Z_DEFLATED){e.msg="unknown compression method",t.mode=BAD;break}if(l>>>=4,d-=4,m=(l&15)+8,t.wbits===0&&(t.wbits=m),m>15||m>t.wbits){e.msg="invalid window size",t.mode=BAD;break}t.dmax=1<<t.wbits,t.flags=0,e.adler=t.check=1,t.mode=l&512?DICTID:TYPE,l=0,d=0;break;case FLAGS:for(;d<16;){if(s===0)break e;s--,l+=a[o++]<<d,d+=8}if(t.flags=l,(t.flags&255)!==Z_DEFLATED){e.msg="unknown compression method",t.mode=BAD;break}if(t.flags&57344){e.msg="unknown header flags set",t.mode=BAD;break}t.head&&(t.head.text=l>>8&1),t.flags&512&&t.wrap&4&&(p[0]=l&255,p[1]=l>>>8&255,t.check=crc32_1(t.check,p,2,0)),l=0,d=0,t.mode=TIME;case TIME:for(;d<32;){if(s===0)break e;s--,l+=a[o++]<<d,d+=8}t.head&&(t.head.time=l),t.flags&512&&t.wrap&4&&(p[0]=l&255,p[1]=l>>>8&255,p[2]=l>>>16&255,p[3]=l>>>24&255,t.check=crc32_1(t.check,p,4,0)),l=0,d=0,t.mode=OS;case OS:for(;d<16;){if(s===0)break e;s--,l+=a[o++]<<d,d+=8}t.head&&(t.head.xflags=l&255,t.head.os=l>>8),t.flags&512&&t.wrap&4&&(p[0]=l&255,p[1]=l>>>8&255,t.check=crc32_1(t.check,p,2,0)),l=0,d=0,t.mode=EXLEN;case EXLEN:if(t.flags&1024){for(;d<16;){if(s===0)break e;s--,l+=a[o++]<<d,d+=8}t.length=l,t.head&&(t.head.extra_len=l),t.flags&512&&t.wrap&4&&(p[0]=l&255,p[1]=l>>>8&255,t.check=crc32_1(t.check,p,2,0)),l=0,d=0}else t.head&&(t.head.extra=null);t.mode=EXTRA;case EXTRA:if(t.flags&1024&&(_=t.length,_>s&&(_=s),_&&(t.head&&(m=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Uint8Array(t.head.extra_len)),t.head.extra.set(a.subarray(o,o+_),m)),t.flags&512&&t.wrap&4&&(t.check=crc32_1(t.check,a,_,o)),s-=_,o+=_,t.length-=_),t.length))break e;t.length=0,t.mode=NAME;case NAME:if(t.flags&2048){if(s===0)break e;_=0;do m=a[o+_++],t.head&&m&&t.length<65536&&(t.head.name+=String.fromCharCode(m));while(m&&_<s);if(t.flags&512&&t.wrap&4&&(t.check=crc32_1(t.check,a,_,o)),s-=_,o+=_,m)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=COMMENT;case COMMENT:if(t.flags&4096){if(s===0)break e;_=0;do m=a[o+_++],t.head&&m&&t.length<65536&&(t.head.comment+=String.fromCharCode(m));while(m&&_<s);if(t.flags&512&&t.wrap&4&&(t.check=crc32_1(t.check,a,_,o)),s-=_,o+=_,m)break e}else t.head&&(t.head.comment=null);t.mode=HCRC;case HCRC:if(t.flags&512){for(;d<16;){if(s===0)break e;s--,l+=a[o++]<<d,d+=8}if(t.wrap&4&&l!==(t.check&65535)){e.msg="header crc mismatch",t.mode=BAD;break}l=0,d=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),e.adler=t.check=0,t.mode=TYPE;break;case DICTID:for(;d<32;){if(s===0)break e;s--,l+=a[o++]<<d,d+=8}e.adler=t.check=zswap32(l),l=0,d=0,t.mode=DICT;case DICT:if(t.havedict===0)return e.next_out=c,e.avail_out=f,e.next_in=o,e.avail_in=s,t.hold=l,t.bits=d,Z_NEED_DICT$1;e.adler=t.check=1,t.mode=TYPE;case TYPE:if(r===Z_BLOCK||r===Z_TREES)break e;case TYPEDO:if(t.last){l>>>=d&7,d-=d&7,t.mode=CHECK;break}for(;d<3;){if(s===0)break e;s--,l+=a[o++]<<d,d+=8}switch(t.last=l&1,l>>>=1,d-=1,l&3){case 0:t.mode=STORED;break;case 1:if(fixedtables(t),t.mode=LEN_,r===Z_TREES){l>>>=2,d-=2;break e}break;case 2:t.mode=TABLE;break;case 3:e.msg="invalid block type",t.mode=BAD}l>>>=2,d-=2;break;case STORED:for(l>>>=d&7,d-=d&7;d<32;){if(s===0)break e;s--,l+=a[o++]<<d,d+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",t.mode=BAD;break}if(t.length=l&65535,l=0,d=0,t.mode=COPY_,r===Z_TREES)break e;case COPY_:t.mode=COPY;case COPY:if(_=t.length,_){if(_>s&&(_=s),_>f&&(_=f),_===0)break e;n.set(a.subarray(o,o+_),c),s-=_,o+=_,f-=_,c+=_,t.length-=_;break}t.mode=TYPE;break;case TABLE:for(;d<14;){if(s===0)break e;s--,l+=a[o++]<<d,d+=8}if(t.nlen=(l&31)+257,l>>>=5,d-=5,t.ndist=(l&31)+1,l>>>=5,d-=5,t.ncode=(l&15)+4,l>>>=4,d-=4,t.nlen>286||t.ndist>30){e.msg="too many length or distance symbols",t.mode=BAD;break}t.have=0,t.mode=LENLENS;case LENLENS:for(;t.have<t.ncode;){for(;d<3;){if(s===0)break e;s--,l+=a[o++]<<d,d+=8}t.lens[N[t.have++]]=l&7,l>>>=3,d-=3}for(;t.have<19;)t.lens[N[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,b={bits:t.lenbits},y=inftrees(CODES,t.lens,0,19,t.lencode,0,t.work,b),t.lenbits=b.bits,y){e.msg="invalid code lengths set",t.mode=BAD;break}t.have=0,t.mode=CODELENS;case CODELENS:for(;t.have<t.nlen+t.ndist;){for(;R=t.lencode[l&(1<<t.lenbits)-1],h=R>>>24,E=R>>>16&255,S=R&65535,!(h<=d);){if(s===0)break e;s--,l+=a[o++]<<d,d+=8}if(S<16)l>>>=h,d-=h,t.lens[t.have++]=S;else{if(S===16){for(I=h+2;d<I;){if(s===0)break e;s--,l+=a[o++]<<d,d+=8}if(l>>>=h,d-=h,t.have===0){e.msg="invalid bit length repeat",t.mode=BAD;break}m=t.lens[t.have-1],_=3+(l&3),l>>>=2,d-=2}else if(S===17){for(I=h+3;d<I;){if(s===0)break e;s--,l+=a[o++]<<d,d+=8}l>>>=h,d-=h,m=0,_=3+(l&7),l>>>=3,d-=3}else{for(I=h+7;d<I;){if(s===0)break e;s--,l+=a[o++]<<d,d+=8}l>>>=h,d-=h,m=0,_=11+(l&127),l>>>=7,d-=7}if(t.have+_>t.nlen+t.ndist){e.msg="invalid bit length repeat",t.mode=BAD;break}for(;_--;)t.lens[t.have++]=m}}if(t.mode===BAD)break;if(t.lens[256]===0){e.msg="invalid code -- missing end-of-block",t.mode=BAD;break}if(t.lenbits=9,b={bits:t.lenbits},y=inftrees(LENS,t.lens,0,t.nlen,t.lencode,0,t.work,b),t.lenbits=b.bits,y){e.msg="invalid literal/lengths set",t.mode=BAD;break}if(t.distbits=6,t.distcode=t.distdyn,b={bits:t.distbits},y=inftrees(DISTS,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,b),t.distbits=b.bits,y){e.msg="invalid distances set",t.mode=BAD;break}if(t.mode=LEN_,r===Z_TREES)break e;case LEN_:t.mode=LEN;case LEN:if(s>=6&&f>=258){e.next_out=c,e.avail_out=f,e.next_in=o,e.avail_in=s,t.hold=l,t.bits=d,inffast(e,g),c=e.next_out,n=e.output,f=e.avail_out,o=e.next_in,a=e.input,s=e.avail_in,l=t.hold,d=t.bits,t.mode===TYPE&&(t.back=-1);break}for(t.back=0;R=t.lencode[l&(1<<t.lenbits)-1],h=R>>>24,E=R>>>16&255,S=R&65535,!(h<=d);){if(s===0)break e;s--,l+=a[o++]<<d,d+=8}if(E&&!(E&240)){for(u=h,T=E,v=S;R=t.lencode[v+((l&(1<<u+T)-1)>>u)],h=R>>>24,E=R>>>16&255,S=R&65535,!(u+h<=d);){if(s===0)break e;s--,l+=a[o++]<<d,d+=8}l>>>=u,d-=u,t.back+=u}if(l>>>=h,d-=h,t.back+=h,t.length=S,E===0){t.mode=LIT;break}if(E&32){t.back=-1,t.mode=TYPE;break}if(E&64){e.msg="invalid literal/length code",t.mode=BAD;break}t.extra=E&15,t.mode=LENEXT;case LENEXT:if(t.extra){for(I=t.extra;d<I;){if(s===0)break e;s--,l+=a[o++]<<d,d+=8}t.length+=l&(1<<t.extra)-1,l>>>=t.extra,d-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=DIST;case DIST:for(;R=t.distcode[l&(1<<t.distbits)-1],h=R>>>24,E=R>>>16&255,S=R&65535,!(h<=d);){if(s===0)break e;s--,l+=a[o++]<<d,d+=8}if(!(E&240)){for(u=h,T=E,v=S;R=t.distcode[v+((l&(1<<u+T)-1)>>u)],h=R>>>24,E=R>>>16&255,S=R&65535,!(u+h<=d);){if(s===0)break e;s--,l+=a[o++]<<d,d+=8}l>>>=u,d-=u,t.back+=u}if(l>>>=h,d-=h,t.back+=h,E&64){e.msg="invalid distance code",t.mode=BAD;break}t.offset=S,t.extra=E&15,t.mode=DISTEXT;case DISTEXT:if(t.extra){for(I=t.extra;d<I;){if(s===0)break e;s--,l+=a[o++]<<d,d+=8}t.offset+=l&(1<<t.extra)-1,l>>>=t.extra,d-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){e.msg="invalid distance too far back",t.mode=BAD;break}t.mode=MATCH;case MATCH:if(f===0)break e;if(_=g-f,t.offset>_){if(_=t.offset-_,_>t.whave&&t.sane){e.msg="invalid distance too far back",t.mode=BAD;break}_>t.wnext?(_-=t.wnext,w=t.wsize-_):w=t.wnext-_,_>t.length&&(_=t.length),L=t.window}else L=n,w=c-t.offset,_=t.length;_>f&&(_=f),f-=_,t.length-=_;do n[c++]=L[w++];while(--_);t.length===0&&(t.mode=LEN);break;case LIT:if(f===0)break e;n[c++]=t.length,f--,t.mode=LEN;break;case CHECK:if(t.wrap){for(;d<32;){if(s===0)break e;s--,l|=a[o++]<<d,d+=8}if(g-=f,e.total_out+=g,t.total+=g,t.wrap&4&&g&&(e.adler=t.check=t.flags?crc32_1(t.check,n,g,c-g):adler32_1(t.check,n,g,c-g)),g=f,t.wrap&4&&(t.flags?l:zswap32(l))!==t.check){e.msg="incorrect data check",t.mode=BAD;break}l=0,d=0}t.mode=LENGTH;case LENGTH:if(t.wrap&&t.flags){for(;d<32;){if(s===0)break e;s--,l+=a[o++]<<d,d+=8}if(t.wrap&4&&l!==(t.total&4294967295)){e.msg="incorrect length check",t.mode=BAD;break}l=0,d=0}t.mode=DONE;case DONE:y=Z_STREAM_END$1;break e;case BAD:y=Z_DATA_ERROR$1;break e;case MEM:return Z_MEM_ERROR$1;case SYNC:default:return Z_STREAM_ERROR$1}return e.next_out=c,e.avail_out=f,e.next_in=o,e.avail_in=s,t.hold=l,t.bits=d,(t.wsize||g!==e.avail_out&&t.mode<BAD&&(t.mode<CHECK||r!==Z_FINISH$1))&&updatewindow(e,e.output,e.next_out,g-e.avail_out),A-=e.avail_in,g-=e.avail_out,e.total_in+=A,e.total_out+=g,t.total+=g,t.wrap&4&&g&&(e.adler=t.check=t.flags?crc32_1(t.check,n,g,e.next_out-g):adler32_1(t.check,n,g,e.next_out-g)),e.data_type=t.bits+(t.last?64:0)+(t.mode===TYPE?128:0)+(t.mode===LEN_||t.mode===COPY_?256:0),(A===0&&g===0||r===Z_FINISH$1)&&y===Z_OK$1&&(y=Z_BUF_ERROR),y},inflateEnd=e=>{if(inflateStateCheck(e))return Z_STREAM_ERROR$1;let r=e.state;return r.window&&(r.window=null),e.state=null,Z_OK$1},inflateGetHeader=(e,r)=>{if(inflateStateCheck(e))return Z_STREAM_ERROR$1;const t=e.state;return t.wrap&2?(t.head=r,r.done=!1,Z_OK$1):Z_STREAM_ERROR$1},inflateSetDictionary=(e,r)=>{const t=r.length;let a,n,o;return inflateStateCheck(e)||(a=e.state,a.wrap!==0&&a.mode!==DICT)?Z_STREAM_ERROR$1:a.mode===DICT&&(n=1,n=adler32_1(n,r,t,0),n!==a.check)?Z_DATA_ERROR$1:(o=updatewindow(e,r,t,t),o?(a.mode=MEM,Z_MEM_ERROR$1):(a.havedict=1,Z_OK$1))};var inflateReset_1=inflateReset,inflateReset2_1=inflateReset2,inflateResetKeep_1=inflateResetKeep,inflateInit_1=inflateInit,inflateInit2_1=inflateInit2,inflate_2$1=inflate$2,inflateEnd_1=inflateEnd,inflateGetHeader_1=inflateGetHeader,inflateSetDictionary_1=inflateSetDictionary,inflateInfo="pako inflate (from Nodeca project)",inflate_1$2={inflateReset:inflateReset_1,inflateReset2:inflateReset2_1,inflateResetKeep:inflateResetKeep_1,inflateInit:inflateInit_1,inflateInit2:inflateInit2_1,inflate:inflate_2$1,inflateEnd:inflateEnd_1,inflateGetHeader:inflateGetHeader_1,inflateSetDictionary:inflateSetDictionary_1,inflateInfo};function GZheader(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var gzheader=GZheader;const toString=Object.prototype.toString,{Z_NO_FLUSH,Z_FINISH,Z_OK,Z_STREAM_END,Z_NEED_DICT,Z_STREAM_ERROR,Z_DATA_ERROR,Z_MEM_ERROR}=constants$2;function Inflate$1(e){this.options=common.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const r=this.options;r.raw&&r.windowBits>=0&&r.windowBits<16&&(r.windowBits=-r.windowBits,r.windowBits===0&&(r.windowBits=-15)),r.windowBits>=0&&r.windowBits<16&&!(e&&e.windowBits)&&(r.windowBits+=32),r.windowBits>15&&r.windowBits<48&&(r.windowBits&15||(r.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let t=inflate_1$2.inflateInit2(this.strm,r.windowBits);if(t!==Z_OK)throw new Error(messages[t]);if(this.header=new gzheader,inflate_1$2.inflateGetHeader(this.strm,this.header),r.dictionary&&(typeof r.dictionary=="string"?r.dictionary=strings.string2buf(r.dictionary):toString.call(r.dictionary)==="[object ArrayBuffer]"&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&(t=inflate_1$2.inflateSetDictionary(this.strm,r.dictionary),t!==Z_OK)))throw new Error(messages[t])}Inflate$1.prototype.push=function(e,r){const t=this.strm,a=this.options.chunkSize,n=this.options.dictionary;let o,c,s;if(this.ended)return!1;for(r===~~r?c=r:c=r===!0?Z_FINISH:Z_NO_FLUSH,toString.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;;){for(t.avail_out===0&&(t.output=new Uint8Array(a),t.next_out=0,t.avail_out=a),o=inflate_1$2.inflate(t,c),o===Z_NEED_DICT&&n&&(o=inflate_1$2.inflateSetDictionary(t,n),o===Z_OK?o=inflate_1$2.inflate(t,c):o===Z_DATA_ERROR&&(o=Z_NEED_DICT));t.avail_in>0&&o===Z_STREAM_END&&t.state.wrap>0&&e[t.next_in]!==0;)inflate_1$2.inflateReset(t),o=inflate_1$2.inflate(t,c);switch(o){case Z_STREAM_ERROR:case Z_DATA_ERROR:case Z_NEED_DICT:case Z_MEM_ERROR:return this.onEnd(o),this.ended=!0,!1}if(s=t.avail_out,t.next_out&&(t.avail_out===0||o===Z_STREAM_END))if(this.options.to==="string"){let f=strings.utf8border(t.output,t.next_out),l=t.next_out-f,d=strings.buf2string(t.output,f);t.next_out=l,t.avail_out=a-l,l&&t.output.set(t.output.subarray(f,f+l),0),this.onData(d)}else this.onData(t.output.length===t.next_out?t.output:t.output.subarray(0,t.next_out));if(!(o===Z_OK&&s===0)){if(o===Z_STREAM_END)return o=inflate_1$2.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(t.avail_in===0)break}}return!0};Inflate$1.prototype.onData=function(e){this.chunks.push(e)};Inflate$1.prototype.onEnd=function(e){e===Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=common.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function inflate$1(e,r){const t=new Inflate$1(r);if(t.push(e),t.err)throw t.msg||messages[t.err];return t.result}function inflateRaw$1(e,r){return r=r||{},r.raw=!0,inflate$1(e,r)}var Inflate_1$1=Inflate$1,inflate_2=inflate$1,inflateRaw_1$1=inflateRaw$1,ungzip$1=inflate$1,constants=constants$2,inflate_1$1={Inflate:Inflate_1$1,inflate:inflate_2,inflateRaw:inflateRaw_1$1,ungzip:ungzip$1,constants};const{Deflate,deflate,deflateRaw,gzip}=deflate_1$1,{Inflate,inflate,inflateRaw,ungzip}=inflate_1$1;var deflate_1=deflate,inflate_1=inflate;const _hasatob=typeof atob=="function",_hasbtoa=typeof btoa=="function",_hasBuffer=typeof Buffer=="function",_TD=typeof TextDecoder=="function"?new TextDecoder:void 0,_TE=typeof TextEncoder=="function"?new TextEncoder:void 0,b64ch="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",b64chs=Array.prototype.slice.call(b64ch),b64tab=(e=>{let r={};return e.forEach((t,a)=>r[t]=a),r})(b64chs),b64re=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,_fromCC=String.fromCharCode.bind(String),_U8Afrom=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):(e,r=t=>t)=>new Uint8Array(Array.prototype.slice.call(e,0).map(r)),_mkUriSafe=e=>e.replace(/=/g,"").replace(/[+\/]/g,r=>r=="+"?"-":"_"),_tidyB64=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),btoaPolyfill=e=>{let r,t,a,n,o="";const c=e.length%3;for(let s=0;s<e.length;){if((t=e.charCodeAt(s++))>255||(a=e.charCodeAt(s++))>255||(n=e.charCodeAt(s++))>255)throw new TypeError("invalid character found");r=t<<16|a<<8|n,o+=b64chs[r>>18&63]+b64chs[r>>12&63]+b64chs[r>>6&63]+b64chs[r&63]}return c?o.slice(0,c-3)+"===".substring(c):o},_btoa=_hasbtoa?e=>btoa(e):_hasBuffer?e=>Buffer.from(e,"binary").toString("base64"):btoaPolyfill,_fromUint8Array=_hasBuffer?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let a=0,n=e.length;a<n;a+=4096)t.push(_fromCC.apply(null,e.subarray(a,a+4096)));return _btoa(t.join(""))},fromUint8Array=(e,r=!1)=>r?_mkUriSafe(_fromUint8Array(e)):_fromUint8Array(e),cb_utob=e=>{if(e.length<2){var r=e.charCodeAt(0);return r<128?e:r<2048?_fromCC(192|r>>>6)+_fromCC(128|r&63):_fromCC(224|r>>>12&15)+_fromCC(128|r>>>6&63)+_fromCC(128|r&63)}else{var r=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return _fromCC(240|r>>>18&7)+_fromCC(128|r>>>12&63)+_fromCC(128|r>>>6&63)+_fromCC(128|r&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=e=>e.replace(re_utob,cb_utob),_encode=_hasBuffer?e=>Buffer.from(e,"utf8").toString("base64"):_TE?e=>_fromUint8Array(_TE.encode(e)):e=>_btoa(utob(e)),encode=(e,r=!1)=>r?_mkUriSafe(_encode(e)):_encode(e),re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=e=>{switch(e.length){case 4:var r=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),t=r-65536;return _fromCC((t>>>10)+55296)+_fromCC((t&1023)+56320);case 3:return _fromCC((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return _fromCC((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},btou=e=>e.replace(re_btou,cb_btou),atobPolyfill=e=>{if(e=e.replace(/\s+/g,""),!b64re.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let r,t="",a,n;for(let o=0;o<e.length;)r=b64tab[e.charAt(o++)]<<18|b64tab[e.charAt(o++)]<<12|(a=b64tab[e.charAt(o++)])<<6|(n=b64tab[e.charAt(o++)]),t+=a===64?_fromCC(r>>16&255):n===64?_fromCC(r>>16&255,r>>8&255):_fromCC(r>>16&255,r>>8&255,r&255);return t},_atob=_hasatob?e=>atob(_tidyB64(e)):_hasBuffer?e=>Buffer.from(e,"base64").toString("binary"):atobPolyfill,_toUint8Array=_hasBuffer?e=>_U8Afrom(Buffer.from(e,"base64")):e=>_U8Afrom(_atob(e),r=>r.charCodeAt(0)),toUint8Array=e=>_toUint8Array(_unURI(e)),_decode=_hasBuffer?e=>Buffer.from(e,"base64").toString("utf8"):_TD?e=>_TD.decode(_toUint8Array(e)):e=>btou(_atob(e)),_unURI=e=>_tidyB64(e.replace(/[-_]/g,r=>r=="-"?"+":"/")),decode=e=>_decode(_unURI(e)),base64Serde={serialize:e=>encode(e,!0),deserialize:e=>decode(e)},pakoSerde={serialize:e=>{const r=new TextEncoder().encode(e),t=deflate_1(r,{level:9});return fromUint8Array(t,!0)},deserialize:e=>{const r=toUint8Array(e);return inflate_1(r,{to:"string"})}},serdes={base64:base64Serde,pako:pakoSerde},serializeState=(e,r="pako")=>{if(!(r in serdes))throw new Error(`Unknown serde type: ${r}`);const t=JSON.stringify(e),a=serdes[r].serialize(t);return`${r}:${a}`},deserializeState=e=>{let r,t;if(e.includes(":")){let n;if([n,t]=e.split(":"),n in serdes)r=n;else throw new Error(`Unknown serde type: ${n}`)}else r="base64",t=e;const a=serdes[r].deserialize(t);return JSON.parse(a)};var dist={},words={};(function(e){var r=commonjsGlobal&&commonjsGlobal.__values||function(a){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&a[n],c=0;if(o)return o.call(a);if(a&&typeof a.length=="number")return{next:function(){return a&&c>=a.length&&(a=void 0),{value:a&&a[c++],done:!a}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.getWordsByCategory=e.wordList=void 0,e.wordList={noun:[{word:"accountant",categories:["profession"]},{word:"ability",categories:["thing"]},{word:"accident",categories:["thing"]},{word:"account",categories:["thing"]},{word:"action",categories:["thing"]},{word:"activity",categories:["thing"]},{word:"actor",categories:["profession"]},{word:"ad",categories:["media"]},{word:"addition",categories:["thing"]},{word:"address",categories:["thing"]},{word:"adult",categories:["people"]},{word:"advantage",categories:["thing"]},{word:"advertisement",categories:["media"]},{word:"afternoon",categories:["time"]},{word:"agency",categories:["thing"]},{word:"agent",categories:["people"]},{word:"air",categories:["thing"]},{word:"airline",categories:["transportation"]},{word:"airplane",categories:["transportation"]},{word:"airport",categories:["transportation","place"]},{word:"alarm",categories:["thing"]},{word:"alligator",categories:["animals"]},{word:"ambulance",categories:["health"]},{word:"analyst",categories:["profession"]},{word:"angle",categories:["thing"]},{word:"animal",categories:["animals"]},{word:"answer",categories:["thing"]},{word:"apartment",categories:["place"]},{word:"apple",categories:["food"]},{word:"application",categories:["thing"]},{word:"appointment",categories:["thing"]},{word:"architect",categories:["profession"]},{word:"argument",categories:["thing"]},{word:"area",categories:["thing"]},{word:"arm",categories:["thing"]},{word:"army",categories:["thing"]},{word:"art",categories:["thing"]},{word:"article",categories:["thing"]},{word:"artist",categories:["profession"]},{word:"australia",categories:["place"]},{word:"author",categories:["profession"]},{word:"autumn",categories:["time"]},{word:"baby",categories:["people","family"]},{word:"baker",categories:["profession"]},{word:"balloon",categories:["thing"]},{word:"banana",categories:["food"]},{word:"barista",categories:["profession"]},{word:"battery",categories:["thing"]},{word:"beach",categories:["place"]},{word:"bear",categories:["animals"]},{word:"beard",categories:["thing"]},{word:"bed",categories:["thing"]},{word:"belgium",categories:["place"]},{word:"bird",categories:["animals"]},{word:"bit",categories:["thing","technology"]},{word:"book",categories:["thing","education"]},{word:"boots",categories:["thing"]},{word:"boy",categories:["people"]},{word:"branch",categories:["thing"]},{word:"breakfast",categories:["thing"]},{word:"brother",categories:["family"]},{word:"businessperson",categories:["people","business"]},{word:"butcher",categories:["profession"]},{word:"byte",categories:["thing","technology"]},{word:"camera",categories:["thing"]},{word:"candle",categories:["thing"]},{word:"car",categories:["transportation"]},{word:"caravan",categories:["transportation"]},{word:"carpenter",categories:["profession"]},{word:"carpet",categories:["thing"]},{word:"cartoon",categories:["media"]},{word:"cat",categories:["animals"]},{word:"chef",categories:["profession"]},{word:"child",categories:["people","family"]},{word:"china",categories:["place"]},{word:"church",categories:["religion"]},{word:"city",categories:["place"]},{word:"coat",categories:["thing"]},{word:"coffeeshop",categories:["place"]},{word:"computer",categories:["thing","technology"]},{word:"continent",categories:["place"]},{word:"controller",categories:["thing","technology"]},{word:"country",categories:["place"]},{word:"cpu",categories:["thing","technology"]},{word:"crayon",categories:["thing"]},{word:"cricket",categories:["animals"]},{word:"crowd",categories:["people"]},{word:"daughter",categories:["family"]},{word:"dawn",categories:["time"]},{word:"daybreak",categories:["time"]},{word:"death",categories:["thing"]},{word:"denmark",categories:["place"]},{word:"dentist",categories:["profession"]},{word:"diamond",categories:["thing"]},{word:"dinner",categories:["food"]},{word:"disease",categories:["thing"]},{word:"doctor",categories:["profession"]},{word:"dog",categories:["animals"]},{word:"dream",categories:["thing"]},{word:"dress",categories:["thing"]},{word:"dusk",categories:["time"]},{word:"easter",categories:["religion"]},{word:"egg",categories:["food"]},{word:"eggplant",categories:["food"]},{word:"egypt",categories:["place"]},{word:"electrician",categories:["profession"]},{word:"elephant",categories:["animals"]},{word:"energy",categories:["thing"]},{word:"engine",categories:["transportation"]},{word:"engineer",categories:["profession"]},{word:"england",categories:["place"]},{word:"eve",categories:["time"]},{word:"evening",categories:["time"]},{word:"eventide",categories:["time"]},{word:"exabyte",categories:["thing","technology"]},{word:"eye",categories:["thing"]},{word:"fall",categories:["time"]},{word:"family",categories:["family"]},{word:"farmer",categories:["profession"]},{word:"father",categories:["people","family"]},{word:"finland",categories:["place"]},{word:"fireman",categories:["profession"]},{word:"fish",categories:["animals"]},{word:"flag",categories:["thing"]},{word:"florist",categories:["profession"]},{word:"flower",categories:["thing"]},{word:"football",categories:["sports"]},{word:"forest",categories:["place"]},{word:"fountain",categories:["thing"]},{word:"france",categories:["place"]},{word:"furniture",categories:["thing"]},{word:"garage",categories:["place"]},{word:"garden",categories:["food"]},{word:"gas",categories:["transportation"]},{word:"ghost",categories:["thing"]},{word:"gigabyte",categories:["thing","technology"]},{word:"girl",categories:["people"]},{word:"glass",categories:["thing"]},{word:"gold",categories:["thing"]},{word:"gpu",categories:["thing","technology"]},{word:"grandmother",categories:["people","family"]},{word:"grass",categories:["thing"]},{word:"greece",categories:["place"]},{word:"guitar",categories:["thing"]},{word:"hair",categories:["thing"]},{word:"hairdresser",categories:["profession"]},{word:"hamburger",categories:["food"]},{word:"helicopter",categories:["transportation"]},{word:"helmet",categories:["thing"]},{word:"holiday",categories:["thing"]},{word:"honey",categories:["food"]},{word:"horse",categories:["animals"]},{word:"hospital",categories:["place"]},{word:"house",categories:["place"]},{word:"hydrogen",categories:["science"]},{word:"ice",categories:["science"]},{word:"insect",categories:["animals"]},{word:"insurance",categories:["thing"]},{word:"intern",categories:["profession"]},{word:"iron",categories:["science"]},{word:"island",categories:["place"]},{word:"jackal",categories:["animals"]},{word:"jelly",categories:["food"]},{word:"jewellery",categories:["thing"]},{word:"jordan",categories:["place"]},{word:"journalist",categories:["profession"]},{word:"joystick",categories:["thing","technology"]},{word:"judge",categories:["profession"]},{word:"juice",categories:["food"]},{word:"kangaroo",categories:["animals"]},{word:"keyboard",categories:["thing","technology"]},{word:"kilobyte",categories:["thing","technology"]},{word:"king",categories:["people"]},{word:"kitchen",categories:["place"]},{word:"kite",categories:["thing"]},{word:"knife",categories:["thing"]},{word:"lamp",categories:["thing"]},{word:"laptop",categories:["thing","technology"]},{word:"lawyer",categories:["profession"]},{word:"leather",categories:["thing"]},{word:"librarian",categories:["profession"]},{word:"library",categories:["place"]},{word:"lifeguard",categories:["profession"]},{word:"lighter",categories:["thing"]},{word:"lion",categories:["animals"]},{word:"lizard",categories:["animals"]},{word:"lock",categories:["thing"]},{word:"london",categories:["place"]},{word:"lunch",categories:["food"]},{word:"machine",categories:["science"]},{word:"magazine",categories:["media"]},{word:"magician",categories:["people"]},{word:"man",categories:["people"]},{word:"manchester",categories:["place"]},{word:"market",categories:["place"]},{word:"match",categories:["thing"]},{word:"mechanic",categories:["profession"]},{word:"megabyte",categories:["thing","technology"]},{word:"memory",categories:["thing","technology"]},{word:"microphone",categories:["thing"]},{word:"midnight",categories:["time"]},{word:"minister",categories:["people","religion"]},{word:"monitor",categories:["thing","technology"]},{word:"monkey",categories:["animals"]},{word:"morn",categories:["time"]},{word:"morning",categories:["time"]},{word:"mother",categories:["people","family"]},{word:"motherboard",categories:["thing","technology"]},{word:"motorcycle",categories:["transportation"]},{word:"mouse",categories:["thing","technology","animals"]},{word:"musician",categories:["profession"]},{word:"nail",categories:["thing"]},{word:"napkin",categories:["thing"]},{word:"needle",categories:["thing"]},{word:"nest",categories:["thing"]},{word:"nigeria",categories:["place"]},{word:"night",categories:["time"]},{word:"nightfall",categories:["time"]},{word:"noon",categories:["time"]},{word:"notebook",categories:["thing"]},{word:"nurse",categories:["profession"]},{word:"ocean",categories:["place"]},{word:"oil",categories:["thing"]},{word:"optician",categories:["profession"]},{word:"orange",categories:["food"]},{word:"oxygen",categories:["science"]},{word:"oyster",categories:["animals"]},{word:"pager",categories:["thing","technology"]},{word:"painter",categories:["profession"]},{word:"painting",categories:["media"]},{word:"park",categories:["place"]},{word:"parrot",categories:["animals"]},{word:"pencil",categories:["thing","education"]},{word:"petabyte",categories:["thing","technology"]},{word:"pharmacist",categories:["profession"]},{word:"photographer",categories:["profession"]},{word:"piano",categories:["thing"]},{word:"pillow",categories:["thing"]},{word:"pilot",categories:["profession"]},{word:"pizza",categories:["food"]},{word:"planet",categories:["science"]},{word:"plastic",categories:["thing"]},{word:"plumber",categories:["profession"]},{word:"policeman",categories:["profession"]},{word:"portugal",categories:["place"]},{word:"postman",categories:["profession"]},{word:"potato",categories:["food"]},{word:"printer",categories:["thing","technology"]},{word:"processor",categories:["thing","technology"]},{word:"psychiatrist",categories:["profession"]},{word:"queen",categories:["people"]},{word:"quill",categories:["thing"]},{word:"rain",categories:["thing"]},{word:"rainbow",categories:["science"]},{word:"raincoat",categories:["thing"]},{word:"ram",categories:["thing","technology"]},{word:"receptionist",categories:["profession"]},{word:"refrigerator",categories:["food"]},{word:"restaurant",categories:["place"]},{word:"river",categories:["thing"]},{word:"rocket",categories:["science"]},{word:"room",categories:["place"]},{word:"rose",categories:["thing"]},{word:"russia",categories:["place"]},{word:"salesclerk",categories:["people","business"]},{word:"salesmen",categories:["profession"]},{word:"sandwich",categories:["food"]},{word:"school",categories:["education"]},{word:"scientist",categories:["profession"]},{word:"scooter",categories:["transportation"]},{word:"secretary",categories:["profession"]},{word:"shampoo",categories:["thing"]},{word:"shoe",categories:["thing"]},{word:"smartphone",categories:["thing","technology"]},{word:"soccer",categories:["sports"]},{word:"solstice",categories:["time"]},{word:"spoon",categories:["thing"]},{word:"spring",categories:["time"]},{word:"state",categories:["place"]},{word:"stone",categories:["thing"]},{word:"student",categories:["people","education"]},{word:"sugar",categories:["food"]},{word:"summer",categories:["time"]},{word:"sundown",categories:["time"]},{word:"sunset",categories:["time"]},{word:"sweden",categories:["place"]},{word:"table",categories:["thing"]},{word:"tailor",categories:["profession"]},{word:"teacher",categories:["people","education","profession"]},{word:"teenager",categories:["people","family"]},{word:"telephone",categories:["thing"]},{word:"television",categories:["media"]},{word:"tent",categories:["thing"]},{word:"terabyte",categories:["thing","technology"]},{word:"thailand",categories:["place"]},{word:"tiger",categories:["animals"]},{word:"toddler",categories:["people","family"]},{word:"tomato",categories:["food"]},{word:"toothbrush",categories:["thing"]},{word:"traffic",categories:["thing"]},{word:"train",categories:["transportation"]},{word:"translator",categories:["profession"]},{word:"truck",categories:["thing","transportation"]},{word:"twilight",categories:["time"]},{word:"uganda",categories:["place"]},{word:"umbrella",categories:["thing"]},{word:"van",categories:["transportation"]},{word:"vase",categories:["thing"]},{word:"vegetable",categories:["food"]},{word:"vr",categories:["thing","technology"]},{word:"vulture",categories:["animals"]},{word:"waiter",categories:["profession"]},{word:"waitress",categories:["profession"]},{word:"wall",categories:["thing"]},{word:"whale",categories:["animals"]},{word:"window",categories:["thing"]},{word:"winter",categories:["time"]},{word:"wire",categories:["thing"]},{word:"wolf",categories:["animals"]},{word:"woman",categories:["people"]},{word:"xylophone",categories:["thing"]},{word:"yacht",categories:["transportation"]},{word:"yak",categories:["animals"]},{word:"yottabyte",categories:["thing","technology"]},{word:"zebra",categories:["animals"]},{word:"zettabyte",categories:["thing","technology"]},{word:"zoo",categories:["animals"]}],adjective:[{word:"abandoned",categories:["condition"]},{word:"abiding",categories:["personality"]},{word:"able",categories:["condition"]},{word:"abrasive",categories:["condition","personality"]},{word:"abnormal",categories:["condition"]},{word:"absurd",categories:["condition"]},{word:"abundant",categories:["quantity"]},{word:"acceptable",categories:["condition"]},{word:"acidic",categories:["taste"]},{word:"acoustic",categories:["sounds"]},{word:"acrid",categories:["condition"]},{word:"adamant",categories:["personality"]},{word:"adorable",categories:["personality"]},{word:"adventurous",categories:["personality"]},{word:"aggressive",categories:["personality"]},{word:"agitated",categories:["personality"]},{word:"agreeable",categories:["personality"]},{word:"alert",categories:["condition"]},{word:"alive",categories:["condition"]},{word:"aloof",categories:["personality"]},{word:"ambitious",categories:["personality"]},{word:"ancient",categories:["time"]},{word:"angry",categories:["personality"]},{word:"annoyed",categories:["personality"]},{word:"antsy",categories:["personality"]},{word:"anxious",categories:["personality"]},{word:"appalling",categories:["personality"]},{word:"appetizing",categories:["taste"]},{word:"apprehensive",categories:["personality"]},{word:"arrogant",categories:["personality"]},{word:"ashamed",categories:["personality"]},{word:"astonishing",categories:["personality"]},{word:"attractive",categories:["appearance"]},{word:"average",categories:["appearance"]},{word:"bad",categories:["condition"]},{word:"bald",categories:["appearance"]},{word:"bashful",categories:["personality"]},{word:"beautiful",categories:["appearance"]},{word:"beefy",categories:["appearance"]},{word:"belligerent",categories:["personality"]},{word:"bent",categories:["condition"]},{word:"better",categories:["condition"]},{word:"best",categories:["condition"]},{word:"better",categories:["condition"]},{word:"bewildered",categories:["personality"]},{word:"big",categories:["size"]},{word:"billions",categories:["quantity"]},{word:"billowy",categories:["appearance"]},{word:"bitter",categories:["taste"]},{word:"black",categories:["color"]},{word:"bland",categories:["taste"]},{word:"blue",categories:["color"]},{word:"blushing",categories:["appearance"]},{word:"bored",categories:["personality"]},{word:"boring",categories:["personality"]},{word:"boundless",categories:["personality"]},{word:"brainy",categories:["personality"]},{word:"brash",categories:["personality"]},{word:"brave",categories:["personality"]},{word:"breezy",categories:["touch"]},{word:"brief",categories:["time"]},{word:"bright",categories:["appearance"]},{word:"broad",categories:["shapes"]},{word:"broken",categories:["condition"]},{word:"brown",categories:["color"]},{word:"bulky",categories:["appearance"]},{word:"bumpy",categories:["touch"]},{word:"burly",categories:["appearance"]},{word:"busy",categories:["personality"]},{word:"cagey",categories:["personality"]},{word:"calm",categories:["personality"]},{word:"callous",categories:["personality"]},{word:"careful",categories:["condition"]},{word:"chilly",categories:["touch"]},{word:"chubby",categories:["appearance"]},{word:"clean",categories:["appearance"]},{word:"clever",categories:["condition"]},{word:"clumsy",categories:["personality"]},{word:"cold",categories:["touch"]},{word:"colossal",categories:["size"]},{word:"cool",categories:["touch"]},{word:"crashing",categories:["sounds"]},{word:"creamy",categories:["taste"]},{word:"crooked",categories:["shapes"]},{word:"cuddly",categories:["touch"]},{word:"curved",categories:["shapes"]},{word:"damaged",categories:["touch"]},{word:"damp",categories:["touch"]},{word:"dazzling",categories:["appearance"]},{word:"dead",categories:["condition"]},{word:"deafening",categories:["sounds"]},{word:"deep",categories:["shapes"]},{word:"defeated",categories:["personality"]},{word:"delicious",categories:["taste"]},{word:"delightful",categories:["personality"]},{word:"dirty",categories:["touch"]},{word:"disgusting",categories:["taste"]},{word:"drab",categories:["appearance"]},{word:"dry",categories:["touch"]},{word:"eager",categories:["personality"]},{word:"early",categories:["time"]},{word:"easy",categories:["condition"]},{word:"echoing",categories:["sounds"]},{word:"elegant",categories:["appearance"]},{word:"embarrassed",categories:["personality"]},{word:"enough",categories:["quantity"]},{word:"faint",categories:["sounds"]},{word:"faithful",categories:["personality"]},{word:"famous",categories:["condition"]},{word:"fancy",categories:["appearance"]},{word:"fast",categories:["time"]},{word:"fat",categories:["size"]},{word:"few",categories:["quantity"]},{word:"fierce",categories:["personality"]},{word:"fit",categories:["appearance"]},{word:"flabby",categories:["appearance"]},{word:"flaky",categories:["touch"]},{word:"flat",categories:["shapes"]},{word:"fluffy",categories:["touch"]},{word:"freezing",categories:["touch"]},{word:"fresh",categories:["taste"]},{word:"full",categories:["quantity"]},{word:"future",categories:["time"]},{word:"gentle",categories:["personality"]},{word:"gifted",categories:["condition"]},{word:"gigantic",categories:["size"]},{word:"glamorous",categories:["appearance"]},{word:"gorgeous",categories:["appearance"]},{word:"gray",categories:["color"]},{word:"greasy",categories:["touch","taste"]},{word:"great",categories:["size"]},{word:"green",categories:["color"]},{word:"grumpy",categories:["personality"]},{word:"hallowed",categories:["condition"]},{word:"handsome",categories:["appearance"]},{word:"happy",categories:["personality"]},{word:"harsh",categories:["sounds"]},{word:"helpful",categories:["condition"]},{word:"helpless",categories:["personality"]},{word:"high",categories:["shapes"]},{word:"hissing",categories:["sounds"]},{word:"hollow",categories:["shapes"]},{word:"hot",categories:["touch","taste"]},{word:"howling",categories:["sounds"]},{word:"huge",categories:["size"]},{word:"hundreds",categories:["quantity"]},{word:"icy",categories:["touch"]},{word:"immense",categories:["size"]},{word:"important",categories:["condition"]},{word:"incalculable",categories:["quantity"]},{word:"inexpensive",categories:["condition"]},{word:"itchy",categories:["personality"]},{word:"jealous",categories:["personality"]},{word:"jolly",categories:["personality"]},{word:"juicy",categories:["taste"]},{word:"kind",categories:["personality"]},{word:"large",categories:["size"]},{word:"late",categories:["time"]},{word:"lazy",categories:["personality"]},{word:"lemon",categories:["color"]},{word:"limited",categories:["quantity"]},{word:"little",categories:["size","quantity"]},{word:"lively",categories:["personality"]},{word:"long",categories:["time","appearance"]},{word:"loose",categories:["touch"]},{word:"loud",categories:["sounds"]},{word:"low",categories:["shapes"]},{word:"magnificent",categories:["appearance"]},{word:"mammoth",categories:["size"]},{word:"mango",categories:["color"]},{word:"many",categories:["quantity"]},{word:"massive",categories:["size"]},{word:"mealy",categories:["condition"]},{word:"melodic",categories:["sounds"]},{word:"melted",categories:["touch"]},{word:"microscopic",categories:["size"]},{word:"millions",categories:["quantity"]},{word:"miniature",categories:["size"]},{word:"modern",categories:["time"]},{word:"moldy",categories:["taste"]},{word:"most",categories:["quantity"]},{word:"muscular",categories:["appearance"]},{word:"mushy",categories:["condition"]},{word:"mysterious",categories:["personality"]},{word:"narrow",categories:["shapes"]},{word:"nervous",categories:["personality"]},{word:"nice",categories:["personality"]},{word:"noisy",categories:["sounds"]},{word:"numerous",categories:["quantity"]},{word:"nutritious",categories:["taste"]},{word:"nutty",categories:["taste"]},{word:"obedient",categories:["personality"]},{word:"obnoxious",categories:["personality"]},{word:"odd",categories:["condition"]},{word:"old",categories:["time"]},{word:"orange",categories:["color"]},{word:"panicky",categories:["personality"]},{word:"petite",categories:["size"]},{word:"pitiful",categories:["personality"]},{word:"plain",categories:["appearance"]},{word:"plump",categories:["appearance"]},{word:"polite",categories:["personality"]},{word:"poor",categories:["condition"]},{word:"powerful",categories:["condition"]},{word:"prehistoric",categories:["time"]},{word:"prickly",categories:["touch"]},{word:"proud",categories:["personality"]},{word:"puny",categories:["size"]},{word:"purple",categories:["color"]},{word:"purring",categories:["sounds"]},{word:"putrid",categories:["taste"]},{word:"quaint",categories:["appearance"]},{word:"quick",categories:["time"]},{word:"quiet",categories:["sounds"]},{word:"rancid",categories:["taste"]},{word:"rapid",categories:["time"]},{word:"rapping",categories:["sounds"]},{word:"raspy",categories:["sounds"]},{word:"red",categories:["color"]},{word:"refined",categories:["shapes"]},{word:"repulsive",categories:["personality"]},{word:"rhythmic",categories:["sounds"]},{word:"rich",categories:["condition"]},{word:"ripe",categories:["taste"]},{word:"rotten",categories:["taste"]},{word:"rough",categories:["touch"]},{word:"round",categories:["shapes"]},{word:"salmon",categories:["color"]},{word:"salty",categories:["taste"]},{word:"savory",categories:["taste"]},{word:"scarce",categories:["quantity"]},{word:"scary",categories:["personality"]},{word:"scrawny",categories:["size"]},{word:"screeching",categories:["sounds"]},{word:"scruffy",categories:["appearance"]},{word:"shaggy",categories:["touch"]},{word:"shallow",categories:["shapes"]},{word:"shapely",categories:["appearance"]},{word:"sharp",categories:["touch"]},{word:"short",categories:["size","appearance","time"]},{word:"shrilling",categories:["sounds"]},{word:"shy",categories:["condition"]},{word:"silly",categories:["personality"]},{word:"skinny",categories:["appearance","shapes"]},{word:"slimy",categories:["touch"]},{word:"slow",categories:["time"]},{word:"small",categories:["size"]},{word:"some",categories:["quantity"]},{word:"sour",categories:["taste"]},{word:"sparse",categories:["quantity"]},{word:"spicy",categories:["taste"]},{word:"spoiled",categories:["taste"]},{word:"square",categories:["shapes"]},{word:"squeaking",categories:["sounds"]},{word:"stale",categories:["taste"]},{word:"steep",categories:["shapes"]},{word:"sticky",categories:["touch"]},{word:"stocky",categories:["appearance"]},{word:"straight",categories:["shapes"]},{word:"strong",categories:["touch"]},{word:"substantial",categories:["quantity"]},{word:"sweet",categories:["taste"]},{word:"swift",categories:["time"]},{word:"tall",categories:["size"]},{word:"tangy",categories:["taste"]},{word:"tart",categories:["taste"]},{word:"tasteless",categories:["taste"]},{word:"tasty",categories:["taste"]},{word:"teeny",categories:["size"]},{word:"tender",categories:["condition"]},{word:"thankful",categories:["personality"]},{word:"thoughtless",categories:["personality"]},{word:"thousands",categories:["quantity"]},{word:"thundering",categories:["sounds"]},{word:"tight",categories:["touch"]},{word:"tinkling",categories:["sounds"]},{word:"tiny",categories:["size"]},{word:"ugly",categories:["appearance"]},{word:"uneven",categories:["touch"]},{word:"unimportant",categories:["condition"]},{word:"uninterested",categories:["condition"]},{word:"unkempt",categories:["appearance"]},{word:"unsightly",categories:["appearance"]},{word:"uptight",categories:["personality"]},{word:"vast",categories:["condition"]},{word:"victorious",categories:["personality"]},{word:"wailing",categories:["sounds"]},{word:"warm",categories:["touch"]},{word:"weak",categories:["touch"]},{word:"wet",categories:["touch"]},{word:"whining",categories:["sounds"]},{word:"whispering",categories:["sounds"]},{word:"white",categories:["color"]},{word:"wide",categories:["shapes"]},{word:"witty",categories:["personality"]},{word:"wonderful",categories:["personality"]},{word:"wooden",categories:["touch"]},{word:"worried",categories:["personality"]},{word:"wrong",categories:["condition"]},{word:"yellow",categories:["color"]},{word:"young",categories:["time"]},{word:"yummy",categories:["taste"]},{word:"zealous",categories:["personality"]}]};function t(a,n){var o,c;n===void 0&&(n=[]);var s=new Set(n),f=[];try{for(var l=r(e.wordList[a]),d=l.next();!d.done;d=l.next()){var A=d.value;(n.length===0||A.categories.some(function(g){return s.has(g)}))&&f.push(A.word)}}catch(g){o={error:g}}finally{try{d&&!d.done&&(c=l.return)&&c.call(l)}finally{if(o)throw o.error}}return f}e.getWordsByCategory=t})(words);var __assign=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},__assign.apply(this,arguments)};Object.defineProperty(dist,"__esModule",{value:!0});dist.totalUniqueSlugs=generateSlug_1=dist.generateSlug=void 0;var words_1=words,DEFAULT_NUMBER_OF_WORDS=3;function generateSlug(e,r){for(var t=e||DEFAULT_NUMBER_OF_WORDS,a={partsOfSpeech:getDefaultPartsOfSpeech(t),categories:{},format:"kebab"},n=__assign(__assign({},a),r),o=[],c=0;c<t;c++){var s=n.partsOfSpeech[c],f=words_1.getWordsByCategory(n.partsOfSpeech[c],n.categories[s]),l=f[Math.floor(Math.random()*f.length)];o.push(l)}return formatter(o,n.format)}var generateSlug_1=dist.generateSlug=generateSlug;function getDefaultPartsOfSpeech(e){for(var r=[],t=0;t<e-1;t++)r.push("adjective");return r.push("noun"),r}function formatter(e,r){return r==="kebab"?e.join("-").toLowerCase():r==="camel"?e.map(function(t,a){return a===0?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()}).join(""):r==="lower"?e.join(" ").toLowerCase():r==="sentence"?e.map(function(t,a){return a===0?t[0].toUpperCase()+t.slice(1).toLowerCase():t}).join(" "):e.map(function(t){return t[0].toUpperCase()+t.slice(1).toLowerCase()}).join(" ")}function totalUniqueSlugs(e,r){for(var t,a,n=words_1.getWordsByCategory("adjective",(t=r==null?void 0:r.categories)===null||t===void 0?void 0:t.adjective).length,o=words_1.getWordsByCategory("noun",(a=r==null?void 0:r.categories)===null||a===void 0?void 0:a.noun).length,c={adjective:n,noun:o},s=e||DEFAULT_NUMBER_OF_WORDS,f=(r==null?void 0:r.partsOfSpeech)||getDefaultPartsOfSpeech(s),l=1,d=0;d<s;d++)l*=c[f[d]];return l}dist.totalUniqueSlugs=totalUniqueSlugs;let getRandomValues;const rnds8=new Uint8Array(16);function rng(){if(!getRandomValues&&(getRandomValues=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!getRandomValues))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}const randomUUID=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),native={randomUUID};function v4(e,r,t){if(native.randomUUID&&!r&&!e)return native.randomUUID();e=e||{};const a=e.random||(e.rng||rng)();if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,r){t=t||0;for(let n=0;n<16;++n)r[t+n]=a[n];return r}return unsafeStringify(a)}const MAX_AUTO_HISTORY_LENGTH=30,historyModeStore=persist(writable("manual"),localStorage(),"autoHistoryMode"),autoHistoryStore=persist(writable([]),localStorage(),"autoHistoryStore"),manualHistoryStore=persist(writable([]),localStorage(),"manualHistoryStore"),loaderHistoryStore=writable([]),historyStore=derived([historyModeStore,autoHistoryStore,manualHistoryStore,loaderHistoryStore],([e,r,t,a],n)=>{switch(e){case"auto":{n(r);break}case"manual":{n(t);break}case"loader":{n(a);break}default:n(r)}}),addHistoryEntry=e=>{const r={...e,id:v4()};if(r.type==="loader"){loaderHistoryStore.update(t=>[r,...t]);return}r.name||(r.name=generateSlug_1(2)),r.type==="auto"?autoHistoryStore.update(t=>(t.length>=MAX_AUTO_HISTORY_LENGTH&&(t=t.slice(0,MAX_AUTO_HISTORY_LENGTH-1)),[r,...t])):r.type==="manual"&&(manualHistoryStore.update(t=>[r,...t]),logEvent("history",{action:"save"}))},clearHistoryData=e=>{(get_store_value(historyModeStore)==="auto"?autoHistoryStore:manualHistoryStore).update(r=>(get_store_value(historyModeStore)!=="loader"&&(r=r.filter(({id:t})=>e&&t!=e),logEvent("history",{action:"clear",type:e?"single":"all"})),r))},getPreviousState=e=>{const r=get_store_value(e?autoHistoryStore:manualHistoryStore);return r.length>0?JSON.stringify(r[0].state):""},restoreHistory=e=>{const r=e.filter(a=>validateEntry(a)),t=e.length-r.length;if(t>0&&(console.error(`${t} invalid history entries were removed.`),console.error(e)),r.length>0){let a=0;(r[0].type==="auto"?autoHistoryStore:manualHistoryStore).update(n=>{const o=new Set(n.map(({id:f})=>f)),c=r.filter(({id:f})=>!o.has(f));a=c.length;const s=[...n,...c];return s.sort((f,l)=>l.time-f.time),s}),alert(`${a} entries restored. ${t} invalid, ${r.length-a} duplicates.`),logEvent("history",{action:"restore",success:a,invalid:t,duplicates:r.length-a})}else alert("No valid entries found.")},setIDs=e=>{for(const r of e)r.id||(r.id=v4());return e},injectHistoryIDs=()=>{autoHistoryStore.update(setIDs),manualHistoryStore.update(setIDs)},validateEntry=e=>e.type&&e.state&&e.time&&!0,codeFileName="code.mmd",configFileName="config.json",isValidGist=e=>codeFileName in e,getFileContent=async e=>e.truncated?await fetchText(e.raw_url):e.content,getGistData=async e=>{const r=e.split("github.com").pop();if(!r)throw new Error("Invalid GitHub URL"+e);const[t,a,n,o]=r.split("/"),{html_url:c,files:s,history:f}=await fetchJSON(`https://api.github.com/gists/${n}${o?"/"+o:""}`);if(isValidGist(s)){const l=await getFileContent(s[codeFileName]);let d="{}";configFileName in s&&(d=await getFileContent(s[configFileName]));const A=f[0];return{url:`${c}/${A.version}`,code:l,config:d,author:A.user.login,time:new Date(A.committed_at).getTime(),version:A.version.slice(-7)}}else throw new Error("Invalid gist provided")},getStateFromGist=(e,r=e.url)=>{const t={...defaultState,code:e.code,loader:{type:"gist",config:{url:r}}};return e.config&&(t.mermaid=e.config),t},loadGistData=async e=>{const r=e.split("github.com").pop();if(!r)throw new Error("Invalid GitHub URL"+e);const[t,a,n,o]=r.split("/"),{history:c}=await fetchJSON(`https://api.github.com/gists/${n}${o?"/"+o:""}`),s=[];for(const d of c){const A=await getGistData(d.url).catch();A&&s.push(A)}if(s.length===0)throw new Error("Invalid gist provided");s.reverse();const f=s.slice(-1).pop();if(!f)throw new Error("Invalid gist provided");const l=getStateFromGist(f,e);for(const d of s)addHistoryEntry({state:getStateFromGist(d),time:d.time,type:"loader",url:d.url,name:`${d.author} v${d.version}`});return l},loaders={gist:loadGistData},loadDataFromUrl=async()=>{const e=new URLSearchParams(window.location.search);let r=defaultState,t=!1;const a=e.get("code")??void 0,n=e.get("config")??void 0;let o;const c=n?await fetchText(n):defaultState.mermaid;if(a&&(o=await fetchText(a),t=!0),o){if(!a)throw new Error("Code URL is not defined");r={code:o,mermaid:c,loader:{type:"files",config:{codeURL:a,configURL:n}}}}else for(const[s,f]of e.entries())if(s in loaders)try{r=await loaders[s](f),t=!0;break}catch(l){console.error(l)}t&&updateCodeStore({...r,autoSync:!0,updateDiagram:!0})},migrations={injectHistoryIDs},migrationStore=persist(writable({version:-1}),localStorage(),"migrations"),applyMigrations=()=>{const{version:e}=get_store_value(migrationStore),r=Object.entries(migrations);if(e!==r.length-1){console.log(`Current migration version: v${e}. Migrating to v${r.length-1}.`);for(let t=e+1;t<r.length;t++){const[a,n]=r[t];console.log(`Applying migration ${t}: ${a}.`),n(),logEvent("migration",{key:a}),migrationStore.set({version:t})}logEvent("migration",{status:"complete",from:e,to:r.length-1})}},loadStateFromURL=()=>{loadState(window.location.hash.slice(1))},syncDiagram=()=>{updateCodeStore({updateDiagram:!0})},initHandler=async()=>{applyMigrations(),loadStateFromURL(),await initLoading("Loading Gist...",loadDataFromUrl().catch(console.error)),syncDiagram(),initURLSubscription(),await initAnalytics(),await(analytics==null?void 0:analytics.page())},isMac=navigator.platform.toUpperCase().includes("MAC"),cmdKey=isMac?"Cmd":"Ctrl";let count=0;const errorDebug=(e=100)=>{if(count+=1,count>e){console.log(count,e);debugger}},formatJSON=e=>JSON.stringify(e,void 0,2),fetchJSON=async e=>(await fetch(e)).json(),fetchText=async e=>(await fetch(e)).text();function dedent(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];var a=Array.from(typeof e=="string"?[e]:e);a[a.length-1]=a[a.length-1].replace(/\r?\n([\t ]*)$/,"");var n=a.reduce(function(s,f){var l=f.match(/\n([\t ]+|(?!\s).)/g);return l?s.concat(l.map(function(d){var A,g;return(g=(A=d.match(/[\t ]/g))===null||A===void 0?void 0:A.length)!==null&&g!==void 0?g:0})):s},[]);if(n.length){var o=new RegExp(`
[ ]{`+Math.min.apply(Math,n)+"}","g");a=a.map(function(s){return s.replace(o,`
`)})}a[0]=a[0].replace(/^\r?\n/,"");var c=a[0];return r.forEach(function(s,f){var l=c.match(/(?:^|\n)( *)$/),d=l?l[1]:"",A=s;typeof s=="string"&&s.includes(`
`)&&(A=String(s).split(`
`).map(function(g,_){return _===0?g:""+d+g}).join(`
`)),c+=A+a[f+1]}),c}const handleError=(e,r,t)=>{log.warn(e),isDetailedError(e)?(t&&t(e.str,e.hash),r.push({...e,message:e.str,error:e})):(t&&t(e),e instanceof Error&&r.push({str:e.message,message:e.message,hash:e.name,error:e}))},run=async function(e={querySelector:".mermaid"}){try{await runThrowsErrors(e)}catch(r){if(isDetailedError(r)&&log.error(r.str),mermaid.parseError&&mermaid.parseError(r),!e.suppressErrors)throw log.error("Use the suppressErrors option to suppress these errors"),r}},runThrowsErrors=async function({postRenderCallback:e,querySelector:r,nodes:t}={querySelector:".mermaid"}){const a=mermaidAPI.getConfig();log.debug(`${e?"":"No "}Callback function found`);let n;if(t)n=t;else if(r)n=document.querySelectorAll(r);else throw new Error("Nodes and querySelector are both undefined");log.debug(`Found ${n.length} diagrams`),(a==null?void 0:a.startOnLoad)!==void 0&&(log.debug("Start On Load: "+(a==null?void 0:a.startOnLoad)),mermaidAPI.updateSiteConfig({startOnLoad:a==null?void 0:a.startOnLoad}));const o=new utils.initIdGenerator(a.deterministicIds,a.deterministicIDSeed);let c;const s=[];for(const f of Array.from(n)){log.info("Rendering diagram: "+f.id);if(f.getAttribute("data-processed"))continue;f.setAttribute("data-processed","true");const l=`mermaid-${o.next()}`;c=f.innerHTML,c=dedent(utils.entityDecode(c)).trim().replace(/<br\s*\/?>/gi,"<br/>");const d=utils.detectInit(c);d&&log.debug("Detected early reinit: ",d);try{const{svg:A,bindFunctions:g}=await mermaidAPI.render(l,c,f);f.innerHTML=A,e&&await e(l),g&&g(f)}catch(A){handleError(A,s,mermaid.parseError)}}if(s.length>0)throw s[0]},initialize=function(e){mermaidAPI.initialize(e)},init=async function(e,r,t){log.warn("mermaid.init is deprecated. Please use run instead."),e&&initialize(e);const a={postRenderCallback:t,querySelector:".mermaid"};typeof r=="string"?a.querySelector=r:r&&(r instanceof HTMLElement?a.nodes=[r]:a.nodes=r),await run(a)},registerExternalDiagrams=async(e,{lazyLoad:r=!0}={})=>{registerLazyLoadedDiagrams(...e),r===!1&&await loadRegisteredDiagrams()},contentLoaded=function(){if(mermaid.startOnLoad){const{startOnLoad:e}=mermaidAPI.getConfig();e&&mermaid.run().catch(r=>log.error("Mermaid failed to initialize",r))}};if(typeof document<"u"){window.addEventListener("load",contentLoaded,!1)}const setParseErrorHandler=function(e){mermaid.parseError=e},executionQueue=[];let executionQueueRunning=!1;const executeQueue=async()=>{if(!executionQueueRunning){for(executionQueueRunning=!0;executionQueue.length>0;){const e=executionQueue.shift();if(e)try{await e()}catch(r){log.error("Error executing queue",r)}}executionQueueRunning=!1}},parse$1=async(e,r)=>new Promise((t,a)=>{const n=()=>new Promise((o,c)=>{mermaidAPI.parse(e,r).then(s=>{o(s),t(s)},s=>{var f;log.error("Error parsing",s),(f=mermaid.parseError)==null||f.call(mermaid,s),c(s),a(s)})});executionQueue.push(n),executeQueue().catch(a)}),render$1=(e,r,t)=>new Promise((a,n)=>{const o=()=>new Promise((c,s)=>{mermaidAPI.render(e,r,t).then(f=>{c(f),a(f)},f=>{var l;log.error("Error parsing",f),(l=mermaid.parseError)==null||l.call(mermaid,f),s(f),n(f)})});executionQueue.push(o),executeQueue().catch(n)}),mermaid={startOnLoad:!0,mermaidAPI,parse:parse$1,render:render$1,init,run,registerExternalDiagrams,initialize,parseError:void 0,contentLoaded,setParseErrorHandler},render=async(e,r,t)=>(mermaid.initialize(e),await mermaid.render(t,r)),parse=async e=>await mermaid.parse(e),defaultState={code:`flowchart TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
`,mermaid:formatJSON({theme:"default"}),autoSync:!0,updateDiagram:!0},urlParseFailedState=`flowchart TD
A[Loading URL failed. We can try to figure out why.] -->|Decode JSON| B(Please check the console to see the JSON and error details.)
B --> C{Is the JSON correct?}
C -->|Yes| D(Please Click here to Raise an issue in github.<br/>Including the broken link in the issue <br/> will speed up the fix.)
C -->|No| E{Did someone <br/>send you this link?}
E -->|Yes| F[Ask them to send <br/>you the complete link]
E -->|No| G{Did you copy <br/> the complete URL?}
G --> |Yes| D
G --> |"No :("| H(Try using the Timeline tab in History <br/>from same browser you used to create the diagram.)
click D href "https://github.com/mermaid-js/mermaid-live-editor/issues/new?assignees=&labels=bug&template=bug_report.md&title=Broken%20link" "Raise issue"`,inputStateStore=persist(writable(defaultState),localStorage(),"codeStore"),currentState=(()=>{const e=get_store_value(inputStateStore);return{...e,serialized:serializeState(e),errorMarkers:[],error:void 0,editorMode:e.editorMode??"code"}})(),processState=async e=>{const r={...e,serialized:"",errorMarkers:[],error:void 0,editorMode:e.editorMode??"code"};try{r.serialized=serializeState(e),await parse(e.code),JSON.parse(e.mermaid)}catch(t){if(r.error=t,errorDebug(),console.error(t),"hash"in t)try{const{loc:{first_line:a,last_line:n,first_column:o,last_column:c}}=t.hash,s={severity:8,startLineNumber:a,startColumn:o,endLineNumber:n,endColumn:c+1,message:t.str};r.errorMarkers=[s]}catch(a){console.error("Error without line helper",a)}}return r},stateStore=derived([inputStateStore],([e],r)=>{processState(e).then(r)},currentState),loadState=e=>{let r;console.log(`Loading '${e}'`);try{r=deserializeState(e);const t=typeof r.mermaid=="string"?JSON.parse(r.mermaid):r.mermaid;t.securityLevel&&t.securityLevel!=="strict"&&confirm(`Removing "securityLevel":"${t.securityLevel}" from the config for safety.
Click Cancel if you trust the source of this Diagram.`)&&delete t.securityLevel,r.mermaid=formatJSON(t)}catch(t){r=get_store_value(inputStateStore),e&&(console.error("Init error",t),r.code=urlParseFailedState,r.mermaid=defaultState.mermaid)}updateCodeStore(r)},updateCodeStore=e=>{inputStateStore.update(r=>({...r,...e}))};let prompted=!1;const updateCode=(e,{updateDiagram:r=!1,resetPanZoom:t=!1}={})=>{const a=countLines(e);if(saveStatistics(e),errorDebug(),a>50&&!prompted&&get_store_value(stateStore).autoSync){const n=confirm(`Long diagram detected. Turn off Auto Sync? Use ${cmdKey} + Enter or click the sync logo to manually sync.`);prompted=!0,n&&updateCodeStore({autoSync:!1})}inputStateStore.update(n=>(t&&(n.pan=void 0,n.zoom=void 0),{...n,code:e,updateDiagram:r}))},updateConfig=e=>{inputStateStore.update(r=>({...r,mermaid:e}))},toggleDarkTheme=e=>{inputStateStore.update(r=>{const t=JSON.parse(r.mermaid);return(!t.theme||["dark","default"].includes(t.theme))&&(t.theme=e?"dark":"default"),{...r,mermaid:formatJSON(t)}})};let urlDebounce;const initURLSubscription=()=>{stateStore.subscribe(({serialized:e})=>{clearTimeout(urlDebounce),urlDebounce=window.setTimeout(()=>{history.replaceState(void 0,"",`#${e}`)},250)})},getStateString=()=>JSON.stringify(get_store_value(inputStateStore));export{localStorage as a,logEvent as b,syncDiagram as c,updateConfig as d,errorDebug as e,analytics as f,pakoSerde as g,encode as h,initHandler as i,inputStateStore as j,historyStore as k,loadingStateStore as l,historyModeStore as m,loaderHistoryStore as n,getStateString as o,persist as p,getPreviousState as q,restoreHistory as r,stateStore as s,toggleDarkTheme as t,updateCode as u,addHistoryEntry as v,clearHistoryData as w,updateCodeStore as x,cmdKey as y,render as z};