diff --git a/main.js b/main.js index b01517c..4f94fb3 100644 --- a/main.js +++ b/main.js @@ -41,7 +41,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `)}static newName(){let t=zX[LX]||1;return zX[LX]=t+1,_R+t.toString(36)}static mount(t,r,n){let i=t[PR],a=n&&n.nonce;i?a&&i.setNonce(a):i=new IR(t,a),i.mount(Array.isArray(r)?r:[r],t)}},UX=new Map,IR=class{constructor(t,r){let n=t.ownerDocument||t,i=n.defaultView;if(!t.head&&t.adoptedStyleSheets&&i.CSSStyleSheet){let a=UX.get(n);if(a)return t[PR]=a;this.sheet=new i.CSSStyleSheet,UX.set(n,this)}else this.styleTag=n.createElement("style"),r&&this.styleTag.setAttribute("nonce",r);this.modules=[],t[PR]=this}mount(t,r){let n=this.sheet,i=0,a=0;for(let o=0;o-1&&(this.modules.splice(l,1),a--,l=-1),l==-1){if(this.modules.splice(a++,0,s),n)for(let u=0;ut.concat(e):void 0})}var uFe=new gn,Ic=class{constructor(t,r,n=[],i=""){this.data=t,this.name=i,vn.EditorState.prototype.hasOwnProperty("tree")||Object.defineProperty(vn.EditorState.prototype,"tree",{get(){return bs(this)}}),this.parser=r,this.extension=[Cg.of(this),vn.EditorState.languageData.of((a,o,s)=>{let l=WX(a,o,s),u=l.type.prop(Ub);if(!u)return[];let c=a.facet(u),f=l.type.prop(uFe);if(f){let d=l.resolve(o-l.from,s);for(let p of f)if(p.test(d,a)){let h=a.facet(p.facet);return p.type=="replace"?h:h.concat(c)}}return c})].concat(n)}isActiveAt(t,r,n=-1){return WX(t,r,n).type.prop(Ub)==this.data}findRegions(t){let r=t.facet(Cg);if(r?.data==this.data)return[{from:0,to:t.doc.length}];if(!r||!r.allowsNesting)return[];let n=[],i=(a,o)=>{if(a.prop(Ub)==this.data){n.push({from:o,to:o+a.length});return}let s=a.prop(gn.mounted);if(s){if(s.tree.prop(Ub)==this.data){if(s.overlay)for(let l of s.overlay)n.push({from:l.from+o,to:l.to+o});else n.push({from:o,to:o+a.length});return}else if(s.overlay){let l=n.length;if(i(s.tree,s.overlay[0].from+o),n.length>l)return}}for(let l=0;l=this.cursorPos?this.doc.sliceString(t,r):this.string.slice(t-n,r-n)}},hE=null,Eg=class{constructor(t,r,n=[],i,a,o,s,l){this.parser=t,this.state=r,this.fragments=n,this.tree=i,this.treeLen=a,this.viewport=o,this.skipped=s,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(t,r,n){return new Eg(t,r,[],Xi.empty,0,n,[],null)}startParse(){return this.parser.startParse(new LR(this.state.doc),this.fragments)}work(t,r){return r!=null&&r>=this.state.doc.length&&(r=void 0),this.tree!=Xi.empty&&this.isDone(r??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var n;if(typeof t=="number"){let i=Date.now()+t;t=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),r!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>r)&&r=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext(()=>{for(;!(r=this.parse.advance()););}),this.treeLen=t,this.tree=r,this.fragments=this.withoutTempSkipped(im.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let r=hE;hE=this;try{return t()}finally{hE=r}}withoutTempSkipped(t){for(let r;r=this.tempSkipped.pop();)t=VX(t,r.from,r.to);return t}changes(t,r){let{fragments:n,tree:i,treeLen:a,viewport:o,skipped:s}=this;if(this.takeTree(),!t.empty){let l=[];if(t.iterChangedRanges((u,c,f,d)=>l.push({fromA:u,toA:c,fromB:f,toB:d})),n=im.applyChanges(n,l),i=Xi.empty,a=0,o={from:t.mapPos(o.from,-1),to:t.mapPos(o.to,1)},this.skipped.length){s=[];for(let u of this.skipped){let c=t.mapPos(u.from,1),f=t.mapPos(u.to,-1);ct.from&&(this.fragments=VX(this.fragments,i,a),this.skipped.splice(n--,1))}return this.skipped.length>=r?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,r){this.skipped.push({from:t,to:r})}static getSkippingParser(t){return new class extends pE{createParse(r,n,i){let a=i[0].from,o=i[i.length-1].to;return{parsedPos:a,advance(){let l=hE;if(l){for(let u of i)l.tempSkipped.push(u);t&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,t]):t)}return this.parsedPos=o,new Xi(Qs.none,[],[],o-a)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let r=this.fragments;return this.treeLen>=t&&r.length&&r[0].from==0&&r[0].to>=t}static get(){return hE}};function VX(e,t,r){return im.applyChanges(e,[{fromA:t,toA:r,fromB:t,toB:r}])}var kg=class{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let r=this.context.changes(t.changes,t.state),n=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),r.viewport.to);return r.work(20,n)||r.takeTree(),new kg(r)}static init(t){let r=Math.min(3e3,t.doc.length),n=Eg.create(t.facet(Cg).parser,t,{from:0,to:r});return n.work(20,r)||n.takeTree(),new kg(n)}};Ic.state=vn.StateField.define({create:kg.init,update(e,t){for(let r of t.effects)if(r.is(Ic.setState))return r.value;return t.startState.facet(Cg)!=t.state.facet(Cg)?kg.init(t.state):e.apply(t)}});var XX=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};typeof requestIdleCallback<"u"&&(XX=e=>{let t=-1,r=setTimeout(()=>{t=requestIdleCallback(e,{timeout:500-100})},100);return()=>t<0?clearTimeout(r):cancelIdleCallback(t)});var RR=typeof navigator<"u"&&((BR=navigator.scheduling)===null||BR===void 0?void 0:BR.isInputPending)?()=>navigator.scheduling.isInputPending():null,cFe=rn.ViewPlugin.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let r=this.view.state.field(Ic.state).context;(r.updateViewport(t.view.viewport)||this.view.viewport.to>r.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(r)}scheduleWork(){if(this.working)return;let{state:t}=this.view,r=t.field(Ic.state);(r.tree!=r.context.tree||!r.context.isDone(t.doc.length))&&(this.working=XX(this.work))}work(t){this.working=null;let r=Date.now();if(this.chunkEndi+1e3,l=a.context.work(()=>RR&&RR()||Date.now()>o,i+(s?0:1e5));this.chunkBudget-=Date.now()-r,(l||this.chunkBudget<=0)&&(a.context.takeTree(),this.view.dispatch({effects:Ic.setState.of(new kg(a.context))})),this.chunkBudget>0&&!(l&&!s)&&this.scheduleWork(),this.checkAsyncSchedule(a.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then(()=>this.scheduleWork()).catch(r=>(0,rn.logException)(this.view.state,r)).then(()=>this.workScheduled--),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Cg=vn.Facet.define({combine(e){return e.length?e[0]:null},enables:e=>[Ic.state,cFe,rn.EditorView.contentAttributes.compute([e],t=>{let r=t.facet(e);return r&&r.name?{"data-language":r.name}:{}})]});var KX=vn.Facet.define(),yE=vn.Facet.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(r=>r!=t[0]))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function wj(e){let t=e.facet(yE);return t.charCodeAt(0)==9?e.tabSize*t.length:t.length}function fFe(e,t){let r="",n=e.tabSize,i=e.facet(yE)[0];if(i==" "){for(;t>=n;)r+=" ",t-=n;i=" "}for(let a=0;a=t?mFe(e,r,t):null}var Sj=class{constructor(t,r={}){this.state=t,this.options=r,this.unit=wj(t)}lineAt(t,r=1){let n=this.state.doc.lineAt(t),{simulateBreak:i,simulateDoubleBreak:a}=this.options;return i!=null&&i>=n.from&&i<=n.to?a&&i==t?{text:"",from:t}:(r<0?i-1&&(a+=o-this.countColumn(n,n.search(/\S|$/))),a}countColumn(t,r=t.length){return(0,vn.countColumn)(t,this.state.tabSize,r)}lineIndent(t,r=1){let{text:n,from:i}=this.lineAt(t,r),a=this.options.overrideIndentation;if(a){let o=a(i);if(o>-1)return o}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}},pFe=new gn;function mFe(e,t,r){let n=t.resolveStack(r),i=n.node.enterUnfinishedNodesBefore(r);if(i!=n.node){let a=[];for(let o=i;o!=n.node;o=o.parent)a.push(o);for(let o=a.length-1;o>=0;o--)n={node:a[o],next:n}}return JX(n,e,r)}function JX(e,t,r){for(let n=e;n;n=n.next){let i=AFe(n.node);if(i)return i(gE.create(t,r,n))}return 0}function hFe(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}function AFe(e){let t=e.type.prop(pFe);if(t)return t;let r=e.firstChild,n;if(r&&(n=r.type.prop(gn.closedBy))){let i=e.lastChild,a=i&&n.indexOf(i.name)>-1;return o=>bFe(o,!0,1,void 0,a&&!hFe(o)?i.from:void 0)}return e.parent==null?gFe:null}function gFe(){return 0}var gE=class extends Sj{constructor(t,r,n){super(t.state,t.options),this.base=t,this.pos=r,this.context=n}get node(){return this.context.node}static create(t,r,n){return new gE(t,r,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(t){let r=this.state.doc.lineAt(t.from);for(;;){let n=t.resolve(r.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(vFe(n,t))break;r=this.state.doc.lineAt(n.from)}return this.lineIndent(r.from)}continue(){return JX(this.context.next,this.base,this.pos)}};function vFe(e,t){for(let r=t;r;r=r.parent)if(e==r)return!0;return!1}function yFe(e){let t=e.node,r=t.childAfter(t.from),n=t.lastChild;if(!r)return null;let i=e.options.simulateBreak,a=e.state.doc.lineAt(r.from),o=i==null||i<=a.from?a.to:Math.min(a.to,i);for(let s=r.to;;){let l=t.childAfter(s);if(!l||l==n)return null;if(!l.type.isSkipped)return l.from{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let r=e.newDoc,{head:n}=e.newSelection.main,i=r.lineAt(n);if(n>i.from+xFe)return e;let a=r.sliceString(i.from,n);if(!t.some(u=>u.test(a)))return e;let{state:o}=e,s=-1,l=[];for(let{head:u}of o.selection.ranges){let c=o.doc.lineAt(u);if(c.from==s)continue;s=c.from;let f=dFe(o,c.from);if(f==null)continue;let d=/^\s*/.exec(c.text)[0],p=fFe(o,f);d!=p&&l.push({from:c.from,to:c.from+d.length,insert:p})}return l.length?[e,{changes:l,sequential:!0}]:e})}var wFe=vn.Facet.define(),SFe=new gn;function EFe(e,t,r){let n=bs(e);if(n.lengthr)continue;if(a&&s.from=t&&u.to>r&&(a=u)}}return a}function kFe(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function Ej(e,t,r){for(let n of e.facet(wFe)){let i=n(e,t,r);if(i)return i}return EFe(e,t,r)}function tK(e,t){let r=t.mapPos(e.from,1),n=t.mapPos(e.to,-1);return r>=n?void 0:{from:r,to:n}}var jj=vn.StateEffect.define({map:tK}),bE=vn.StateEffect.define({map:tK});function rK(e){let t=[];for(let{head:r}of e.state.selection.ranges)t.some(n=>n.from<=r&&n.to>=r)||t.push(e.lineBlockAt(r));return t}var Qv=vn.StateField.define({create(){return rn.Decoration.none},update(e,t){e=e.map(t.changes);for(let r of t.effects)if(r.is(jj)&&!CFe(e,r.value.from,r.value.to)){let{preparePlaceholder:n}=t.state.facet(QR),i=n?rn.Decoration.replace({widget:new zR(n(t.state,r.value))}):GX;e=e.update({add:[i.range(r.value.from,r.value.to)]})}else r.is(bE)&&(e=e.update({filter:(n,i)=>r.value.from!=n||r.value.to!=i,filterFrom:r.value.from,filterTo:r.value.to}));if(t.selection){let r=!1,{head:n}=t.selection.main;e.between(n,n,(i,a)=>{in&&(r=!0)}),r&&(e=e.update({filterFrom:n,filterTo:n,filter:(i,a)=>a<=n||i>=n}))}return e},provide:e=>rn.EditorView.decorations.from(e),toJSON(e,t){let r=[];return e.between(0,t.doc.length,(n,i)=>{r.push(n,i)}),r},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw new RangeError("Invalid JSON for fold state");let t=[];for(let r=0;r{(!i||i.from>a)&&(i={from:a,to:o})}),i}function CFe(e,t,r){let n=!1;return e.between(t,t,(i,a)=>{i==t&&a==r&&(n=!0)}),n}function nK(e,t){return e.field(Qv,!1)?t:t.concat(vn.StateEffect.appendConfig.of(oK()))}var DFe=e=>{for(let t of rK(e)){let r=Ej(e.state,t.from,t.to);if(r)return e.dispatch({effects:nK(e.state,[jj.of(r),iK(e,r)])}),!0}return!1},jFe=e=>{if(!e.state.field(Qv,!1))return!1;let t=[];for(let r of rK(e)){let n=kj(e.state,r.from,r.to);n&&t.push(bE.of(n),iK(e,n,!1))}return t.length&&e.dispatch({effects:t}),t.length>0};function iK(e,t,r=!0){let n=e.state.doc.lineAt(t.from).number,i=e.state.doc.lineAt(t.to).number;return rn.EditorView.announce.of(`${e.state.phrase(r?"Folded lines":"Unfolded lines")} ${n} ${e.state.phrase("to")} ${i}.`)}var OFe=e=>{let{state:t}=e,r=[];for(let n=0;n{let t=e.state.field(Qv,!1);if(!t||!t.size)return!1;let r=[];return t.between(0,e.state.doc.length,(n,i)=>{r.push(bE.of({from:n,to:i}))}),e.dispatch({effects:r}),!0};var aK=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:DFe},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:jFe},{key:"Ctrl-Alt-[",run:OFe},{key:"Ctrl-Alt-]",run:MFe}],NFe={placeholderDOM:null,preparePlaceholder:null,placeholderText:"\u2026"},QR=vn.Facet.define({combine(e){return(0,vn.combineConfig)(e,NFe)}});function oK(e){let t=[Qv,FFe];return e&&t.push(QR.of(e)),t}function sK(e,t){let{state:r}=e,n=r.facet(QR),i=o=>{let s=e.lineBlockAt(e.posAtDOM(o.target)),l=kj(e.state,s.from,s.to);l&&e.dispatch({effects:bE.of(l)}),o.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(e,i,t);let a=document.createElement("span");return a.textContent=n.placeholderText,a.setAttribute("aria-label",r.phrase("folded code")),a.title=r.phrase("unfold"),a.className="cm-foldPlaceholder",a.onclick=i,a}var GX=rn.Decoration.replace({widget:new class extends rn.WidgetType{toDOM(e){return sK(e,null)}}}),zR=class extends rn.WidgetType{constructor(t){super(),this.value=t}eq(t){return this.value==t.value}toDOM(t){return sK(t,this.value)}},TFe={openText:"\u2304",closedText:"\u203A",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1},AE=class extends rn.GutterMarker{constructor(t,r){super(),this.config=t,this.open=r}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let r=document.createElement("span");return r.textContent=this.open?this.config.openText:this.config.closedText,r.title=t.state.phrase(this.open?"Fold line":"Unfold line"),r}};function lK(e={}){let t=Object.assign(Object.assign({},TFe),e),r=new AE(t,!0),n=new AE(t,!1),i=rn.ViewPlugin.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(Cg)!=o.state.facet(Cg)||o.startState.field(Qv,!1)!=o.state.field(Qv,!1)||bs(o.startState)!=bs(o.state)||t.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let s=new vn.RangeSetBuilder;for(let l of o.viewportLineBlocks){let u=kj(o.state,l.from,l.to)?n:Ej(o.state,l.from,l.to)?r:null;u&&s.add(l.from,l.from,u)}return s.finish()}}),{domEventHandlers:a}=t;return[i,(0,rn.gutter)({class:"cm-foldGutter",markers(o){var s;return((s=o.plugin(i))===null||s===void 0?void 0:s.markers)||vn.RangeSet.empty},initialSpacer(){return new AE(t,!1)},domEventHandlers:Object.assign(Object.assign({},a),{click:(o,s,l)=>{if(a.click&&a.click(o,s,l))return!0;let u=kj(o.state,s.from,s.to);if(u)return o.dispatch({effects:bE.of(u)}),!0;let c=Ej(o.state,s.from,s.to);return c?(o.dispatch({effects:jj.of(c)}),!0):!1}})}),oK()]}var FFe=rn.EditorView.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}}),Pf=class{constructor(t,r){this.specs=t;let n;function i(s){let l=Yd.newName();return(n||(n=Object.create(null)))["."+l]=s,l}let a=typeof r.all=="string"?r.all:r.all?i(r.all):void 0,o=r.scope;this.scope=o instanceof Ic?s=>s.prop(Ub)==o.data:o?s=>s==o:void 0,this.style=FR(t.map(s=>({tag:s.tag,class:s.class||i(Object.assign({},s,{tag:null}))})),{all:a}).style,this.module=n?new Yd(n):null,this.themeType=r.themeType}static define(t,r){return new Pf(t,r||{})}},UR=vn.Facet.define(),uK=vn.Facet.define({combine(e){return e.length?[e[0]]:null}});function $R(e){let t=e.facet(UR);return t.length?t:e.facet(uK)}function $h(e,t){let r=[_Fe],n;return e instanceof Pf&&(e.module&&r.push(rn.EditorView.styleModule.of(e.module)),n=e.themeType),t?.fallback?r.push(uK.of(e)):n?r.push(UR.computeN([rn.EditorView.darkTheme],i=>i.facet(rn.EditorView.darkTheme)==(n=="dark")?[e]:[])):r.push(UR.of(e)),r}var WR=class{constructor(t){this.markCache=Object.create(null),this.tree=bs(t.state),this.decorations=this.buildDeco(t,$R(t.state)),this.decoratedTo=t.viewport.to}update(t){let r=bs(t.state),n=$R(t.state),i=n!=$R(t.startState),{viewport:a}=t.view,o=t.changes.mapPos(this.decoratedTo,1);r.length=a.to?(this.decorations=this.decorations.map(t.changes),this.decoratedTo=o):(r!=this.tree||t.viewportChanged||i)&&(this.tree=r,this.decorations=this.buildDeco(t.view,n),this.decoratedTo=a.to)}buildDeco(t,r){if(!r||!this.tree.length)return rn.Decoration.none;let n=new vn.RangeSetBuilder;for(let{from:i,to:a}of t.visibleRanges)qX(this.tree,r,(o,s,l)=>{n.add(o,s,this.markCache[l]||(this.markCache[l]=rn.Decoration.mark({class:l})))},i,a);return n.finish()}},_Fe=vn.Prec.high(rn.ViewPlugin.fromClass(WR,{decorations:e=>e.decorations})),YR=Pf.define([{tag:qe.meta,color:"#404740"},{tag:qe.link,textDecoration:"underline"},{tag:qe.heading,textDecoration:"underline",fontWeight:"bold"},{tag:qe.emphasis,fontStyle:"italic"},{tag:qe.strong,fontWeight:"bold"},{tag:qe.strikethrough,textDecoration:"line-through"},{tag:qe.keyword,color:"#708"},{tag:[qe.atom,qe.bool,qe.url,qe.contentSeparator,qe.labelName],color:"#219"},{tag:[qe.literal,qe.inserted],color:"#164"},{tag:[qe.string,qe.deleted],color:"#a11"},{tag:[qe.regexp,qe.escape,qe.special(qe.string)],color:"#e40"},{tag:qe.definition(qe.variableName),color:"#00f"},{tag:qe.local(qe.variableName),color:"#30a"},{tag:[qe.typeName,qe.namespace],color:"#085"},{tag:qe.className,color:"#167"},{tag:[qe.special(qe.variableName),qe.macroName],color:"#256"},{tag:qe.definition(qe.propertyName),color:"#00c"},{tag:qe.comment,color:"#940"},{tag:qe.invalid,color:"#f00"}]),PFe=rn.EditorView.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),cK=1e4,fK="()[]{}",dK=vn.Facet.define({combine(e){return(0,vn.combineConfig)(e,{afterCursor:!0,brackets:fK,maxScanDistance:cK,renderMatch:RFe})}}),IFe=rn.Decoration.mark({class:"cm-matchingBracket"}),BFe=rn.Decoration.mark({class:"cm-nonmatchingBracket"});function RFe(e){let t=[],r=e.matched?IFe:BFe;return t.push(r.range(e.start.from,e.start.to)),e.end&&t.push(r.range(e.end.from,e.end.to)),t}var $Fe=vn.StateField.define({create(){return rn.Decoration.none},update(e,t){if(!t.docChanged&&!t.selection)return e;let r=[],n=t.state.facet(dK);for(let i of t.state.selection.ranges){if(!i.empty)continue;let a=xj(t.state,i.head,-1,n)||i.head>0&&xj(t.state,i.head-1,1,n)||n.afterCursor&&(xj(t.state,i.head,1,n)||i.headrn.EditorView.decorations.from(e)}),qFe=[$Fe,PFe];function pK(e={}){return[dK.of(e),qFe]}var LFe=new gn;function VR(e,t,r){let n=e.prop(t<0?gn.openedBy:gn.closedBy);if(n)return n;if(e.name.length==1){let i=r.indexOf(e.name);if(i>-1&&i%2==(t<0?1:0))return[r[i+t]]}return null}function GR(e){let t=e.type.prop(LFe);return t?t(e.node):e}function xj(e,t,r,n={}){let i=n.maxScanDistance||cK,a=n.brackets||fK,o=bs(e),s=o.resolveInner(t,r);for(let l=s;l;l=l.parent){let u=VR(l.type,r,a);if(u&&l.from0?t>=c.from&&tc.from&&t<=c.to))return zFe(e,t,r,l,c,u,a)}}return UFe(e,t,r,o,s.type,i,a)}function zFe(e,t,r,n,i,a,o){let s=n.parent,l={from:i.from,to:i.to},u=0,c=s?.cursor();if(c&&(r<0?c.childBefore(n.from):c.childAfter(n.to)))do if(r<0?c.to<=n.from:c.from>=n.to){if(u==0&&a.indexOf(c.type.name)>-1&&c.from0)return null;let u={from:r<0?t-1:t,to:r>0?t+1:t},c=e.doc.iterRange(t,r>0?e.doc.length:0),f=0;for(let d=0;!c.next().done&&d<=a;){let p=c.value;r<0&&(d+=p.length);let h=t+d*r;for(let m=r>0?0:p.length-1,g=r>0?p.length:-1;m!=g;m+=r){let A=o.indexOf(p[m]);if(!(A<0||n.resolveInner(h+m,1).type!=i))if(A%2==0==r>0)f++;else{if(f==1)return{start:u,end:{from:h+m,to:h+m+1},matched:A>>1==l>>1};f--}}r>0&&(d+=p.length)}return c.done?{start:u,matched:!1}:null}function HX(e,t,r,n=0,i=0){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));let a=i;for(let o=n;o=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.posr}eatSpace(){let t=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t}skipToEnd(){this.pos=this.string.length}skipTo(t){let r=this.string.indexOf(t,this.pos);if(r>-1)return this.pos=r,!0}backUp(t){this.pos-=t}column(){return this.lastColumnPosn?o.toLowerCase():o,a=this.string.substr(this.pos,t.length);return i(a)==i(t)?(r!==!1&&(this.pos+=t.length),!0):null}else{let i=this.string.slice(this.pos).match(t);return i&&i.index>0?null:(i&&r!==!1&&(this.pos+=i[0].length),i)}}current(){return this.string.slice(this.start,this.pos)}};function WFe(e){return{name:e.name||"",token:e.token,blankLine:e.blankLine||(()=>{}),startState:e.startState||(()=>!0),copyState:e.copyState||VFe,indent:e.indent||(()=>null),languageData:e.languageData||{},tokenTable:e.tokenTable||XR}}function VFe(e){if(typeof e!="object")return e;let t={};for(let r in e){let n=e[r];t[r]=n instanceof Array?n.slice():n}return t}var QX=new WeakMap,Wb=class extends Ic{constructor(t){let r=lFe(t.languageData),n=WFe(t),i,a=new class extends pE{createParse(o,s,l){return new HR(i,o,s,l)}};super(r,a,[KX.of((o,s)=>this.getIndent(o,s))],t.name),this.topNode=YFe(r),i=this,this.streamParser=n,this.stateAfter=new gn({perNode:!0}),this.tokenTable=t.tokenTable?new Dj(n.tokenTable):QFe}static define(t){return new Wb(t)}getIndent(t,r){let n=bs(t.state),i=n.resolve(r);for(;i&&i.type!=this.topNode;)i=i.parent;if(!i)return null;let a,{overrideIndentation:o}=t.options;o&&(a=QX.get(t.state),a!=null&&a1e4)return null;for(;l=n&&r+t.length<=i&&t.prop(e.stateAfter);if(a)return{state:e.streamParser.copyState(a),pos:r+t.length};for(let o=t.children.length-1;o>=0;o--){let s=t.children[o],l=r+t.positions[o],u=s instanceof Xi&&l=t.length)return t;!i&&t.type==e.topNode&&(i=!0);for(let a=t.children.length-1;a>=0;a--){let o=t.positions[a],s=t.children[a],l;if(or&&ZR(e,i.tree,0-i.offset,r,o),l;if(s&&(l=mK(e,i.tree,r+i.offset,s.pos+i.offset,!1)))return{state:s.state,tree:l}}return{state:e.streamParser.startState(n?wj(n):4),tree:Xi.empty}}var HR=class{constructor(t,r,n,i){this.lang=t,this.input=r,this.fragments=n,this.ranges=i,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=i[i.length-1].to;let a=Eg.get(),o=i[0].from,{state:s,tree:l}=GFe(t,n,o,a?.state);this.state=s,this.parsedPos=this.chunkStart=o+l.length;for(let u=0;u=r?this.finish():t&&this.parsedPos>=t.viewport.to?(t.skipUntilInView(this.parsedPos,r),this.finish()):null}stopAt(t){this.stoppedAt=t}lineAfter(t){let r=this.input.chunk(t);if(this.input.lineChunks)r==` `&&(r="");else{let n=r.indexOf(` -`);n>-1&&(r=r.slice(0,n))}return t+r.length<=this.to?r:r.slice(0,this.to-t)}nextLine(){let t=this.parsedPos,r=this.lineAfter(t),n=t+r.length;for(let i=this.rangeIndex;;){let a=this.ranges[i].to;if(a>=n||(r=r.slice(0,a-(n-r.length)),i++,i==this.ranges.length))break;let o=this.ranges[i].from,s=this.lineAfter(o);r+=s,n=o+s.length}return{line:r,end:n}}skipGapsTo(t,r,n){for(;;){let i=this.ranges[this.rangeIndex].to,a=t+r;if(n>0?i>a:i>=a)break;r+=this.ranges[++this.rangeIndex].from-i}return r}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to1){a=this.skipGapsTo(r,a,1),r+=a;let o=this.chunk.length;a=this.skipGapsTo(n,a,-1),n+=a,i+=this.chunk.length-o}return this.chunk.push(t,r,n,i),a}parseLine(t){let{line:r,end:n}=this.nextLine(),i=0,{streamParser:a}=this.lang,o=new Cj(r,t?t.state.tabSize:4,t?wj(t.state):2);if(o.eol())a.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let s=hK(a.token,o,this.state);if(s&&(i=this.emitToken(this.lang.tokenTable.resolve(s),this.parsedPos+o.start,this.parsedPos+o.pos,4,i)),o.start>1e4)break}this.parsedPos=n,this.moveRangeIndex(),this.parsedPost.start)return i}throw new Error("Stream parser failed to advance stream.")}var XR=Object.create(null),vE=[Qs.none],HFe=new qb(vE),YX=[],ZX=Object.create(null),AK=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])AK[e]=gK(XR,t);var Dj=class{constructor(t){this.extra=t,this.table=Object.assign(Object.create(null),AK)}resolve(t){return t?this.table[t]||(this.table[t]=gK(this.extra,t)):0}},QFe=new Dj(XR);function qR(e,t){YX.indexOf(e)>-1||(YX.push(e),console.warn(t))}function gK(e,t){let r=[];for(let s of t.split(" ")){let l=[];for(let u of s.split(".")){let c=e[u]||qe[u];c?typeof c=="function"?l.length?l=l.map(c):qR(u,`Modifier ${u} used at start of tag`):l.length?qR(u,`Tag ${u} used as modifier`):l=Array.isArray(c)?c:[c]:qR(u,`Unknown highlighting tag ${u}`)}for(let u of l)r.push(u)}if(!r.length)return 0;let n=t.replace(/ /g,"_"),i=n+" "+r.map(s=>s.id),a=ZX[i];if(a)return a.id;let o=ZX[i]=Qs.define({id:vE.length,name:n,props:[RX({[n]:r})]});return vE.push(o),o.id}function YFe(e){let t=Qs.define({id:vE.length,name:"Document",props:[Ub.add(()=>e)],top:!0});return vE.push(t),t}var jet={rtl:rn.Decoration.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"rtl"},bidiIsolate:rn.Direction.RTL}),ltr:rn.Decoration.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"ltr"},bidiIsolate:rn.Direction.LTR}),auto:rn.Decoration.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"auto"},bidiIsolate:null})};var qh=e=>{let t;return e.app.workspace.iterateLeaves(r=>{let n=r.view.editor?.cm;if(n?.hasFocus)return t=n,!0},e.app.workspace.rootSplit),t},xE=e=>{let t;return e.app.workspace.iterateLeaves(r=>{if(r.view.editor?.cm?.hasFocus)return t=r.view,!0},e.app.workspace.rootSplit),t};function vK(e,t,r){bs(t).iterate({...r,from:e,to:e})}function wE(e,t,r){bs(t).iterate({...r,from:e.from,to:e.to})}var JC=ge(Te());var Gb=require("@codemirror/state"),Tj=Gb.Annotation.define(),NK=Gb.Annotation.define(),Fj=Gb.StateField.define({create:()=>{},update(e,t){return t.annotation(NK)?t.annotation(NK):e}}),Yv=Gb.StateField.define({create:e=>"none",update(e,t){return t.annotation(Tj)?t.annotation(Tj):e}});var FK=ge(TK()),i$=class{constructor(){this.lang="en";this.all={en:{hintText:{fileName:"Enter File Name",alias:"Enter Display Name",dragDropModifierKeys:"Hold ${1} to Pin and ${2} to Copy",createListItem:"Select/Create List Item Frame",dragDropProperties:"Drag and drop properties to link them into the list",newItem:"+ New",selectNote:"Select Note...",newFrame:"New"},defaults:{spaceNote:"Current Note",spaceContext:"Current Space"},commands:{h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6",columns:"Columns",tabs:"Tabs",button:"Button",label:"Label",column:"Column",idea:"New",group:"Group",paragraph:"Text",card:"Card",progress:"Progress",rating:"Rating",circularProgress:"Circular Progress",list:"Bullet List","ordered-list":"Numbered List",todo:"To-do List",quote:"Quote",internal:"Link to Note",context:"Embed Existing Context",flow:"Embed Note or Space",board:"New Board",divider:"Divider",note:"Note Block",link:"Web Link",callout:"Callout",bookmark:"Bookmark",table:"New Table",codeblock:"Code Block",toggle:"Toggle",emoji:"Emoji",image:"Image",newNote:"New Note",tag:"Tag",makeMenu:"Flow Menu",selectStyle:"Style",toggleKeyboard:"Toggle Keyboard",rows:"Rows",masonry:"Gallery"},styles:{bold:"Bold",italics:"Italics",strikethrough:"Strikethrough",code:"Code",link:"Web Link",blocklink:"Link to Note",textColor:"Text Color",highlight:"Highlight"},commandsSuggest:{noResult:"No result"},commandPalette:{enable:"Enable",disabled:"Disable",openFlow:"Open Flow Blocks in Selection",closeFlow:"Close Flow Blocks in Selection",toggleBold:"Toggle Bold",toggleItalics:"Toggle Italics",openSpaces:"Open Spaces",blink:"Blink",openFileContext:"Open Explorer",convertPathToSpace:"Convert to Space",revealFile:"Reveal File in Spaces",releaseNotes:"Release Notes",toggleBacklinks:"Toggle Backlinks",collapseAllFolders:"Collapse All Folders",addFileSpace:"Add File to Space",removeFileSpace:"Remove File from Space"},frames:{sections:{kit:"Kit",paths:"Paths"},label:{label:"Label",description:"Label"},note:{label:"Note",description:"Link to a note"},table:{label:"Table",description:"Table"},context:{label:"Context",description:"Display a context view from another space"},calendar:{label:"Calendar View"},field:{label:"Field",description:"Dynamic node that displays a value based on property type"},event:{label:"Event"},divider:{label:"Divider",description:"Divider to separate your content"},button:{label:"Button",description:"Buttons can perform actions and open links"},callout:{label:"Callout",description:"Callout to highlight important information"},toggle:{label:"Toggle",description:"Toggle to show/hide content"}},menu:{layout:"Layout",enterFlowState:"Enter Flow State",exitFlowState:"Exit Flow State",newView:"New View",calendarView:"Calendar View",dayView:"Day View",closeSpace:"Close Space in Focus",customView:"Custom View",detailsView:"Details View",catalogView:"Catalog View",galleryView:"Gallery View",deleteContext:"Delete Context",openSpace:"Open",revealInDefault:"Reveal in Finder",revealInExplorer:"Reveal in Explorer",setNone:"None",fileMetadataDescription:"This note only",openFilePane:"Open in a new pane",rename:"Rename",changeToFolderNote:"New Space from Note",moveFile:"Move file to...",moveFolder:"Move folder to...",duplicate:"Make a copy",edit:"Edit",delete:"Delete",getHelp:"Make.md Community",vault:"Vault",openVault:"Open Another Vault",openVaultInFolder:"Open Vault Folder",obSettings:"Obsidian Settings",commandPalette:"Command Palette",backToSpace:"Back to Spaces",collapseAllSections:"Collapse All Spaces",expandAllSections:"Expand All Spaces",collapseAllFolders:"Collapse All Folders",expandAllFolders:"Expand All Folders",spaceTitle:"Add/Remove in Space",home:"Home",none:"None",tableView:"Table View",cardView:"Card View",boardView:"Board View",listView:"List View",flowView:"Flow View",groupBy:"Group",sortBy:"Sort",filters:"Filters",newFilter:"New Filter",clearFilters:"Clear Filters",hide:"Hide",unhideFields:"Unhide All Properties",importDataview:"Import All Dataview Properties",saveAllProperties:"Save All Properties to Files",mergeProperties:"Merge Properties",removeFromSpace:"Unpin from Space",editCode:"Edit Code",editProperties:"Edit Properties",properties:"Properties",deleteProperty:"Delete Property",hideProperty:"Hide Property",unhideProperty:"Unhide Property",saveProperty:"Save Property",sortAscending:"Sort Ascending",sortDescending:"Sort Descending",deleteRow:"Delete Item",collapseAll:"Collapse All",customSort:"Custom Sort",groupSpaces:"Group Spaces",recurisveSort:"Apply to Subfolders",fileNameSortAlphaAsc:"File Name (A to Z)",fileNameSortAlphaDesc:"File Name (Z to A)",fileNameSortNumericalAsc:"File Name (1 to 9)",fileNameSortNumericalDesc:"File Name (9 to 1)",createdTimeSortAsc:"Created Time (new to old)",createdTimeSortDesc:"Created Time (old to new)",modifiedTimeSortAsc:"Modified Time (new to old)",modifiedTimeSortDesc:"Modified Time (old to new)",sizeSortAsc:"Size (smallest to largest)",sizeSortDesc:"Size (largest to smallest)",spaces:"Spaces",tags:"Tags",manageHiddenFiles:"Manage Hidden Files",manageActions:"Manage Actions",deleteSpace:"Delete",changeColor:"Change Color",changePropertyType:"Change Type",deleteFiles:"Delete Files",createFolderSpace:"Create Space from Folder",folder:"Folder",syncToContext:"Add Property to Context",setIcon:"Set Icon",copyEmbedLink:"Copy Embed Link",moveUp:"Move Up",moveDown:"Move Down",moveTo:"Move To",groupNodes:"Group Nodes",moveFrame:"Move Frame",renameFrame:"Rename Frame",deleteFrame:"Delete Frame",insertAbove:"Insert Above",insertBelow:"Insert Below"},editor:{rows:"Rows",columns:"Columns",catalog:"Catalog",gallery:"Gallery",grid:"Grid",scaleToFit:"Change to Fit",scaleToFill:"Change to Fill",fit:"Fit",strokeNone:"None",strokeSolid:"Solid",strokeDotted:"Dotted",strokeDashed:"Dashed",size:"Size",gap:"Gap",marginLeft:"Left",marginTop:"Top",marginRight:"Right",marginBottom:"Bottom",minimize:"Minimize",paddingLeft:"Left",paddingTop:"Top",paddingRight:"Right",paddingBottom:"Bottom",unlinkProperty:"Unlink Property",linkedProperty:"Linked Property",linkProperty:"Link Property",currentSpace:"Current Space",linkName:"${1} Link",linkThumbnail:"${1} Thumbnail",linkSticker:"${1} Sticker",opacity:"Opacity",shadowSpread:"Spread",shadowBlur:"Blur",width:"Width",height:"Height",margin:"Margin",padding:"Padding",bold:"Bold",italic:"Italic",underline:"Underline",alignLeft:"Align Left",alignCenter:"Align Center",alignRight:"Align Right",alignJustify:"Align Justify",numberOfLines:"Lines",createVerticalSection:"Create Vertical Section",createHorizontalSection:"Create Horizontal Section",themeColors:"Theme Colors",uiColors:"UI Colors",hex:"Hex"},buttons:{add:"Add",togglePin:"Toggle Pin",refresh:"Refresh",showHidden:"Show Hidden",alias:"Alias",addFilter:"Add Filter",loadMore:"Load More",addCondition:"Add Condition",customize:"Customize",moreOptions:"More Options",saveProperty:"Save Property",newNote:"New Note",changeIcon:"Change Sticker",removeIcon:"Remove Sticker",addIcon:"Add Sticker",addCover:"Add Cover",addDisplay:"Display Name",changeBanner:"Change Cover",changeBannerShort:"Cover",saveChanges:"Save Changes",removeBanner:"Remove Cover",rename:"Change Name",editFrame:"Edit Frame",saveSpace:"Save Space",createSpace:"New Space",createFolder:"New Folder",createNote:"New Note",createCanvas:"New Canvas",addIntoSpace:"New Pin",addSmartSearch:"Add Live Search",subFolders:"Sub Folders",addItem:"Add Item",addProperty:"Add Property",editProperty:"Edit Property",addContext:"Add Context",cancel:"Cancel",search:"Search",delete:"Delete",toggleFlow:"Toggle Flow",openFlow:"Open Flow",hideFlow:"Hide Flow",openLink:"Open Link",addToSpace:"Add to Space",addToSpaceShort:"Pin",addTag:"Add Tag",tag:"Tag",syncFields:"Sync Properties",convertTable:"Convert to Markdown",cutTable:"Cut Table",deleteTable:"Delete From Note",blink:"Blink",addFile:"Add Item",merge:"Merge",saveView:"Save View",saveTable:"Save Table",renameView:"Rename View",deleteView:"Delete View",renameTable:"Rename Table",renameTag:"Rename Tag",createTag:"Create Tag",currentFolder:"Current Folder",sync:"Sync",pasteCSS:"Paste CSS",save:"Save",run:"Run"},metadataTypes:{fileName:"File Name",contexts:"Contexts",path:"Path",folder:"Folder",sticker:"Sticker",color:"Color",created:"Created",lastModified:"Last Modified",extension:"Extension",size:"Size",tags:"Tags",inlinks:"Linked Mentions",outlinks:"Links",label:"Label",fileMetadata:"File Metadata",frontmatter:"Frontmatter"},filterTypes:{contains:"contains",notContains:"does not contain",is:"is",isNot:"is not",before:"before",after:"on or after",anyOf:"is any of",noneOf:"is none of",checked:"is checked",unchecked:"is unchecked",isEmpty:"is empty",isNotEmpty:"is not empty",isSameDate:"is same date",isSameDateAsToday:"today"},sortTypes:{alphaAsc:"A to Z",alphaDesc:"Z to A",earliest:"Earliest",latest:"Latest",checkAsc:"Checked \u2192 Unchecked",checkDesc:"Unchecked \u2192 Checked",itemsAsc:"Least Items",itemsDesc:"Most Items"},properties:{defaultField:"Name",audio:{label:"Audio",description:"Audio"},text:{label:"Text",description:"Text field"},number:{label:"Number",description:"Number field with optional unit"},boolean:{label:"Yes/No",description:"Yes or No toggle to indicate the status"},date:{label:"Date",description:"Select a date from a calendar"},option:{label:"Option",description:"Select one or multiple option from a list"},file:{label:"File"},link:{label:"Link",description:"Link to another note or a website"},tags:{label:"Tags",description:"Use tags to quickly organize your items"},object:{label:"Object",description:"Store any complex objects"},context:{label:"Relation",description:"Connect to another context property and create a relation"},image:{label:"Image",description:"Select any image from your system or from the internet"},color:{label:"Color",description:"Use colors to label your items or status"},space:{label:"Context",description:"Link to a context"},icon:{label:"Sticker",description:"Use stickers to uniquely label your items or status"},super:{label:"Super Property",links:"Open Link",properties:"Update Property",api:"API",obsidianCommands:"Run Command",runCommand:"Run Command",performAction:"Perform Action",whenClicked:"When Clicked"},fileProperty:{name:"Name",label:"Formula",createdTime:"Created",modifiedTime:"Last Edited",sticker:"Sticker",links:"Links",tags:"Tags",spaces:"Spaces",extension:"Extension",size:"Size",preview:"Note Preview",parentFolder:"Folder",description:"Use a formula to dynamically display a property"}},views:{navigator:"Navigator",explorer:"Explorer",space:"Space"},subViews:{spaceItems:"Items",spaceContext:"Context",spaceLists:"Lists",spaceActions:"Actions",spaceTemplates:"Templates",smartSearch:"Live Searches",filesAndFolders:"Files and Folders"},labels:{duplicateTable:"Duplicate Table",pinned:"Pinned",live:"Pinned by Live Search",moveTable:"Move Table",editFormula:"Edit Formula",editObject:"Edit Object",properties:"Properties",newAction:"Action",newTable:"List",template:"Template",createFolder:"New Folder Name",rename:"Rename",createNew:"New",default:"Default",done:"Done",changeCoverShort:"Change",reposition:"Reposition",tables:"Tables",selectDateFormat:"Select/Type Date Format",renameSection:"Edit Space",createSection:"New Folder",createNote:"New Note",contextMaker:"Context Maker",select:"Select",pinnedItems:"Pinned Items",collapse:"Collapse",expand:"Expand",all:"All",none:"None",view:"View",findStickers:"Find Sticker",mergeProperties:"Merge Properties",placeholder:"Type '${1}' for commands",notePlaceholder:"New Note for ${1}",itemsSelected:"${1} Selected",selectNote:"Select Note",selectIcon:"Select Icon",selectImage:"Select Image",selectSpace:"Select Space",styleSmall:"Small",styleMedium:"Medium",styleLarge:"Large",hiddenFilePattern:"Name, Suffixes and Extension",hiddenFileSpecific:"Exclude specific files and folders",textPlaceholder:"Enter Text",noFile:"is not created yet. Click to create.",navigatorSearchPlaceholder:"Search by Text or Filters",blinkPlaceholder:"Search for notes, spaces...",searchPlaceholder:"Type to search...",contextItemSelectPlaceholder:"Find Item",linkItemSelectPlaceholder:"Find or Create Note",pinNotePlaceholder:"Select a Note or Space to Pin",optionItemSelectPlaceholder:"Select Option",viewItemSelectPlaceholder:"Select View",tagItemSelectPlaceholder:"Find Tag",spaceSelectPlaceholder:"Select any Folder or Tag",propertyItemSelectPlaceholder:"Select Property",sortItemSelectPlaceholder:"Select Sort",filterItemSelectPlaceholder:"Select Filter",imageSelectPlaceholder:"Select an image or paste a URL",imageNotFoundPlaceholder:"No Images Found",syncFrontmatterProperty:"Sync Frontmatter Property",newProperty:"New Property",newPropertyShort:"New Property",propertyType:"Type",propertyDynamic:"Dyanmic",propertyValueSpace:"Space",propertyValueProperty:"Property",propertyLookup:"Edit Formula",existingFrontmatter:"Existing Property",dateFormat:"Date Format",propertyFileProp:"Property",multiple:"Multiple",filesCount:"{$1} Files",hiddenFiles:"Hidden Files",addExtension:"Add Rule",saveView:"Save View",saveTable:"Save Table",renameView:"Rename View",renameTable:"Rename Table",syncMetadata:"Sync Metadata",syncProperties:"Sync Properties",selectContext:"Select Context",metadata:"Metadata",backlinks:"Backlinks",spaces:"Spaces",contexts:"Contexts",content:"Content",deleteSpace:"Delete Space",deleteFiles:"Delete Files",outgoingLinks:"Outgoing Links",moveTo:"Move to",addTo:"Pin to",copyTo:"Copy to",reorderIn:"Reorder in",border:"Border",corners:"Corners",color:"Color",backgroundColor:"Background",cornerRadius:"Radius",onClick:"On Click",layout:"Layout",element:"Element",name:"Name",display:"Display",alignment:"Alignment",margin:"Margin",padding:"Padding",gap:"Gap",width:"Width",height:"Height",opacity:"Opacity",shadow:"Shadow",shadowBlur:"Blur",shadowSpread:"Spread",typography:"Typography",layers:"Layers",fontSize:"Size",props:"Props",styles:"Styles",events:"Events",code:"Code",selectedLayers:"${1} Layers"},descriptions:{spaceActions:"Create actions that runs when you press a button",spaceLists:"Create lists to track data and organize them in your space",spaceItems:"Add new items to the space or pin items to the space",spaceTemplates:"Create templates to quickly add items to your space",smartSearch:"Automatically pin notes to this space based on a set of searches",hiddenFileOptions:"Exclude any files and folders by name, suffix or extension.",deleteSpace:"Deleting the space will also delete the folder and its contents.",deleteFiles:"Delete ${1} files/folders and their contents?",addContext:"Contexts lets you connect properties from your tags",spaceProperties:"Define Properties for your Space Items",syncMetadata:"Select which fields from your notes to start syncing with the context.",syncProperties:"Contexts defines and syncs the same fields across your notes depending on their folder or tag.",selectContext:"Select which folder or tag context you want to sync the fields."},flowView:{emptyDoc:"Empty Document",itemsCount:" Items",emptyFolder:"This Folder is Empty"},notice:{duplicateFile:"Folder already contains note with same name",addedToSection:"Added to Space",fileExists:"File Already Exists",folderExists:"Folder Already Exists",noPropertyName:"Property Name is Required",noPropertiesFound:"No Properties Found",duplicatePropertyName:"Duplicate Property Name",newSpaceName:"Enter a name for your space",duplicateSpaceName:"Space name already exists",cantConvertNoteToSpace:"The view is not a note",templateSaved:"Template saved to space: ",tableDeleted:"Table removed from note, you can find the table in the folder space"},settings:{layoutVertical:"Vertical",layoutHorizontal:"Horizontal",sectionSidebar:"Spaces",sectionEditor:"Maker Mode",sectionFlow:"Flow",sectionAdvanced:"Advanced",sectionDataview:"Dataview",sectionContext:"Context",sectionStickers:"Stickers",sectionNavigator:"Navigator",sectionDefault:"Default Spaces",sectionSpaceView:"Space View",sectionBlink:"Blink",sectionInlineContext:"Inline Context",sectionFlowBlock:"Flow Block",sectionFlowMenu:"Flow Menu",sectionFlowStyler:"Flow Styler",experimental:{name:"Experimental",desc:"Experimental features that are subject to change and may not be optimized for performance"},generateThumbnails:{name:"Generate Thumbnails",desc:"Create thumbnails for images to speed up performance"},minimalThemeFix:{name:"Minimal Theme Fix",description:"Apply fixes for the popular theme Minimal"},inlineStickerMenu:{name:"Inline Stickers",desc:"Add inline stickers by typing :"},openSpacesOnLaunch:{name:"Open Spaces as Default Tab",desc:"Open the Spaces tab when Obsidian launches"},defaultSpaceTemplate:{name:"Default Space Template",desc:"Select the default template for new spaces"},defaultDateFormat:{name:"Default Date Format",desc:"Set the default date format, example: yyyy-MM-dd (see https://date-fns.org/v2.30.0/docs/format)"},newNotePlaceholder:{name:"New Note Placeholder",desc:"Default name for new notes"},folderIndentationLines:{name:"Show Folder Indentation Lines",desc:"Turn on to show a line on the left of folders to indicate indentation"},folderNoteLocation:{name:"Folder Note Location Inside Folder",desc:"Turn on to have folder notes inside the folder, turn off to have it outside"},folderViewDefault:{name:"Show Folder Note by Default",desc:"Show the folder note by default when opening a folder"},internalLinkFlowEditor:{name:"Show Toggles to Open Flow Editor on Links",desc:"Turn on to toggle Flow Blocks directly in inline links"},internalLinkSticker:{name:"Show Stickers on Links",desc:"Turn on to toggle stickers shown directly by beside internal links"},syncContextToFrontmatter:{name:"Sync Context Fields to Frontmatter",desc:"Turn on to automatically save all context fields to frontmatter fields, not just existing frontmatter fields."},syncFormulaToFrontmatter:{name:"Sync Formula Fields to Frontmatter",desc:"Turn on to save calculated formula values to frontmatter fields."},inlineBacklinks:{name:"Show Inline Backlinks (Inline Context required)",desc:"Show editable backlinks at the bottom of your notes"},dataviewInlineContext:{name:"Show Dataview in Inline Context",desc:"Show dataview when inline context is enabled"},inlineContextExplorer:{name:"Inline Context",desc:"Display the context and a banner at the top of your notes"},inlineContextProperties:{name:"Inline Context Properties",desc:"Show the properties in the inline context"},inlineContextExpanded:{name:"Auto Expand Inline Context",desc:"Expand the inline context sections when opening a note"},inlineContextHorizontal:{name:"Inline Title and Sticker Layout",desc:"Layout for inline title and sticker in Inline Context"},hideFrontmatter:{name:"Hide Context Properties",desc:"Hide properties you have added in context from the Obsidian properties panel"},openFileContext:{name:"Auto Open Explorer",desc:"Automatically open explorer panel in the right panel"},folderNote:{name:"Enable Folder Note",desc:"Access the folder note in the folder page and hide the folder note from spaces"},folderNoteName:{name:"Folder Note Name",desc:"Name of the folder note, keep blank to use the same name as the folder"},expandFolder:{name:"Auto Expand Folder",desc:"Auto expand folders on click"},hoverPreview:{name:"Preview on Hover",desc:"Preview on Hover while holding Control/Command key"},activeFile:{name:"Reveal Active File",desc:"Automatically reveal the active file in Spaces"},contexts:{name:"Contexts",desc:"Contexts allows you to have full control over the metadata of your files"},spaces:{name:"Navigator",desc:"The navigator lets you create and organize your spaces"},spacesStickers:{name:"Stickers",desc:"Use Emojis to make it easier to find your notes"},spacesAlias:{name:"Alias",desc:"Use the alias metadata to show in Spaces"},spacesFileExplorerDual:{name:"Compatibility Mode",desc:"This will improve the compatibility of plugins while using Spaces"},spacesDeleteOption:{name:"Delete File Option",desc:"Select how you want files to be deleted"},spacesDeleteOptions:{permanant:"Delete Permanently",trash:"Move to Obsidian Trash","system-trash":"Move to System Trash"},flowState:{name:"Flow State",desc:"Toggle the flow state"},hideRibbon:{name:"App Ribbon",desc:"Show/hide the left menu aka. ribbon"},spaceView:{name:"Space View",desc:"Open the space view when you click on a space"},defaultSpaces:{name:"Default Spaces",desc:"Recommended spaces for quickly organizing your vault"},homeSpace:{name:"Home Space",desc:"An easy-to-access space where you can add/organize your other spaces"},tagSpaces:{name:"Tag Spaces",desc:"Automatically create spaces for each of your tags"},readableLineWidth:{name:"Readable Line Width",desc:"Use Readable Line Width"},sidebarTabs:{name:"Sidebar Tabs",desc:"Show/hide other sidebar tabs"},spacesPerformance:{name:"Performance Mode",desc:"Turn on performance mode for Spaces, may affect scrolling appearance. Requires Restart"},indexSVG:{name:"Use SVGs as Stickers",desc:"Use any svg file in your vault as a sticker"},inlineStyler:{name:"Flow Styler",desc:"Select text to add styling"},inlineStylerColor:{name:"Text and Highlight Colors \u{1F9EA}",desc:"Select text color and highlight color, (this may change in the future because of the limitations with HTML and Obsidian)"},spaceRowHeight:{name:"Row Height",desc:"The height for each row in spaces (in pixels), default is 29"},contextPagination:{name:"Table View Pagination",desc:"Number of items per page in table view"},coverHeight:{name:"Cover Height",desc:"The height for the cover of the note or space, default is 200"},makeChar:{name:"Flow Menu Trigger",desc:"Character to open the Flow Menu"},mobileMakeBar:{name:"Flow Styler (Mobile)",desc:"Replaces the mobile toolbar"},editorMarkSans:{name:"Mark Sans \u{1F9EA}",desc:"Use the editor without Markdown."},editorMakerMode:{name:"Flow (Beta)",desc:"An integrated and intuitive editor experience"},editorMakePlacholder:{name:"Flow Menu Hint Text",desc:"Show a hint text on how to open the Flow Menu Shortcut"},blink:{name:"Blink",desc:"A faster way to search and edit your notes"},editorMakeMenu:{name:"Flow Menu",desc:"Open the Flow menu to quickly add content"},editorMakeMenuTrigger:{name:"Flow Menu Shortcut",desc:"Trigger key to use flow menu"},editorFlowReplace:{name:"Flow Block",desc:"Open your internal links or toggle your embeds in the flow block."},editorFlowStyle:{name:"Flow Block Style",desc:"Select a theme for your flow block",seamless:"Seamless",minimal:"Minimal"}}}};this.lang="en";let t=FK.default.locale();["en"].includes(t)&&(this.lang=t)}get texts(){return this.all.en}},z=new i$().texts;var _K=(e,t)=>t?e.spacesIndex.has(t):!1,Bc=(e,t)=>t.superstate.settings.spacesMDBInHidden?e=="/"?t.superstate.settings.spaceSubFolder+"/":e+t.superstate.settings.spaceSubFolder+"/":e;var _j=(e,t)=>t.spacesFolder+"/"+e;var It="File";function Sl(e){return Sl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sl(e)}function dn(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function pt(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function _t(e){pt(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Sl(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Co(e,t){pt(2,arguments);var r=_t(e),n=dn(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function su(e,t){pt(2,arguments);var r=_t(e),n=dn(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var i=r.getDate(),a=new Date(r.getTime());a.setMonth(r.getMonth()+n+1,0);var o=a.getDate();return i>=o?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}function a$(e,t){pt(2,arguments);var r=_t(e).getTime(),n=dn(t);return new Date(r+n)}var f3e={};function El(){return f3e}function xs(e,t){var r,n,i,a,o,s,l,u;pt(1,arguments);var c=El(),f=dn((r=(n=(i=(a=t?.weekStartsOn)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=_t(e),p=d.getDay(),h=(p=i.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function s$(e){pt(1,arguments);var t=o$(e),r=new Date(0);r.setFullYear(t,0,4),r.setHours(0,0,0,0);var n=Rc(r);return n}function Lh(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Zd(e){pt(1,arguments);var t=_t(e);return t.setHours(0,0,0,0),t}var d3e=864e5;function If(e,t){pt(2,arguments);var r=Zd(e),n=Zd(t),i=r.getTime()-Lh(r),a=n.getTime()-Lh(n);return Math.round((i-a)/d3e)}function Qb(e,t){pt(2,arguments);var r=dn(t),n=r*7;return Co(e,n)}function Pj(e,t){pt(2,arguments);var r=dn(t);return su(e,r*12)}function Ij(e){pt(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(Sl(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var r;return t.forEach(function(n){var i=_t(n);(r===void 0||ri||isNaN(i.getDate()))&&(r=i)}),r||new Date(NaN)}var p3e=365.2425,m3e=Math.pow(10,8)*24*60*60*1e3,l$=6e4,u$=36e5;var Htt=-m3e;var h3e=3600;var PK=h3e*24,Qtt=PK*7,A3e=PK*p3e,g3e=A3e/12,Ytt=g3e*3;function Ys(e,t){pt(2,arguments);var r=Zd(e),n=Zd(t);return r.getTime()===n.getTime()}function Zv(e){return pt(1,arguments),e instanceof Date||Sl(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function c$(e){if(pt(1,arguments),!Zv(e)&&typeof e!="number")return!1;var t=_t(e);return!isNaN(Number(t))}function Dg(e,t){pt(2,arguments);var r=_t(e),n=_t(t),i=r.getFullYear()-n.getFullYear(),a=r.getMonth()-n.getMonth();return i*12+a}var v3e=6048e5;function f$(e,t,r){pt(2,arguments);var n=xs(e,r),i=xs(t,r),a=n.getTime()-Lh(n),o=i.getTime()-Lh(i);return Math.round((a-o)/v3e)}function Yb(e){pt(1,arguments);var t=_t(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function ws(e){pt(1,arguments);var t=_t(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Rj(e){pt(1,arguments);var t=_t(e),r=new Date(0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function Xv(e,t){var r,n,i,a,o,s,l,u;pt(1,arguments);var c=El(),f=dn((r=(n=(i=(a=t?.weekStartsOn)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=_t(e),p=d.getDay(),h=(p=i.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function m$(e){pt(1,arguments);var t=kE(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=jg(r);return n}var b3e=6048e5;function h$(e){pt(1,arguments);var t=_t(e),r=jg(t).getTime()-m$(t).getTime();return Math.round(r/b3e)+1}function Og(e,t){var r,n,i,a,o,s,l,u;pt(1,arguments);var c=El(),f=dn((r=(n=(i=(a=t?.weekStartsOn)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=_t(e),p=d.getUTCDay(),h=(p=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(f+1,0,p),h.setUTCHours(0,0,0,0);var m=Og(h,t),g=new Date(0);g.setUTCFullYear(f,0,p),g.setUTCHours(0,0,0,0);var A=Og(g,t);return c.getTime()>=m.getTime()?f+1:c.getTime()>=A.getTime()?f:f-1}function A$(e,t){var r,n,i,a,o,s,l,u;pt(1,arguments);var c=El(),f=dn((r=(n=(i=(a=t?.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=CE(e,t),p=new Date(0);p.setUTCFullYear(d,0,f),p.setUTCHours(0,0,0,0);var h=Og(p,t);return h}var x3e=6048e5;function g$(e,t){pt(1,arguments);var r=_t(e),n=Og(r,t).getTime()-A$(r,t).getTime();return Math.round(n/x3e)+1}function ni(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length0?n:1-n;return ni(r==="yy"?i%100:i,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):ni(n+1,2)},d:function(t,r){return ni(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return ni(t.getUTCHours()%12||12,r.length)},H:function(t,r){return ni(t.getUTCHours(),r.length)},m:function(t,r){return ni(t.getUTCMinutes(),r.length)},s:function(t,r){return ni(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,i=t.getUTCMilliseconds(),a=Math.floor(i*Math.pow(10,n-3));return ni(a,r.length)}},zh=w3e;var Zb={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},S3e={G:function(t,r,n){var i=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var i=t.getUTCFullYear(),a=i>0?i:1-i;return n.ordinalNumber(a,{unit:"year"})}return zh.y(t,r)},Y:function(t,r,n,i){var a=CE(t,i),o=a>0?a:1-a;if(r==="YY"){var s=o%100;return ni(s,2)}return r==="Yo"?n.ordinalNumber(o,{unit:"year"}):ni(o,r.length)},R:function(t,r){var n=kE(t);return ni(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return ni(n,r.length)},Q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(i);case"QQ":return ni(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(i);case"qq":return ni(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,r,n){var i=t.getUTCMonth();switch(r){case"M":case"MM":return zh.M(t,r);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,r,n){var i=t.getUTCMonth();switch(r){case"L":return String(i+1);case"LL":return ni(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,r,n,i){var a=g$(t,i);return r==="wo"?n.ordinalNumber(a,{unit:"week"}):ni(a,r.length)},I:function(t,r,n){var i=h$(t);return r==="Io"?n.ordinalNumber(i,{unit:"week"}):ni(i,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):zh.d(t,r)},D:function(t,r,n){var i=p$(t);return r==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):ni(i,r.length)},E:function(t,r,n){var i=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,r,n,i){var a=t.getUTCDay(),o=(a-i.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return ni(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,r,n,i){var a=t.getUTCDay(),o=(a-i.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return ni(o,r.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,r,n){var i=t.getUTCDay(),a=i===0?7:i;switch(r){case"i":return String(a);case"ii":return ni(a,r.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,r,n){var i=t.getUTCHours(),a=i/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,r,n){var i=t.getUTCHours(),a;switch(i===12?a=Zb.noon:i===0?a=Zb.midnight:a=i/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,r,n){var i=t.getUTCHours(),a;switch(i>=17?a=Zb.evening:i>=12?a=Zb.afternoon:i>=4?a=Zb.morning:a=Zb.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return zh.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):zh.H(t,r)},K:function(t,r,n){var i=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(i,{unit:"hour"}):ni(i,r.length)},k:function(t,r,n){var i=t.getUTCHours();return i===0&&(i=24),r==="ko"?n.ordinalNumber(i,{unit:"hour"}):ni(i,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):zh.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):zh.s(t,r)},S:function(t,r){return zh.S(t,r)},X:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return BK(o);case"XXXX":case"XX":return Kv(o);case"XXXXX":case"XXX":default:return Kv(o,":")}},x:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"x":return BK(o);case"xxxx":case"xx":return Kv(o);case"xxxxx":case"xxx":default:return Kv(o,":")}},O:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+IK(o,":");case"OOOO":default:return"GMT"+Kv(o,":")}},z:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+IK(o,":");case"zzzz":default:return"GMT"+Kv(o,":")}},t:function(t,r,n,i){var a=i._originalDate||t,o=Math.floor(a.getTime()/1e3);return ni(o,r.length)},T:function(t,r,n,i){var a=i._originalDate||t,o=a.getTime();return ni(o,r.length)}};function IK(e,t){var r=e>0?"-":"+",n=Math.abs(e),i=Math.floor(n/60),a=n%60;if(a===0)return r+String(i);var o=t||"";return r+String(i)+o+ni(a,2)}function BK(e,t){if(e%60===0){var r=e>0?"-":"+";return r+ni(Math.abs(e)/60,2)}return Kv(e,t)}function Kv(e,t){var r=t||"",n=e>0?"-":"+",i=Math.abs(e),a=ni(Math.floor(i/60),2),o=ni(i%60,2);return n+a+r+o}var RK=S3e;var $K=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},qK=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},E3e=function(t,r){var n=t.match(/(P+)(p+)?/)||[],i=n[1],a=n[2];if(!a)return $K(t,r);var o;switch(i){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",$K(i,r)).replace("{{time}}",qK(a,r))},k3e={p:qK,P:E3e},LK=k3e;var C3e=["D","DD"],D3e=["YY","YYYY"];function zK(e){return C3e.indexOf(e)!==-1}function UK(e){return D3e.indexOf(e)!==-1}function v$(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var j3e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},O3e=function(t,r,n){var i,a=j3e[t];return typeof a=="string"?i=a:r===1?i=a.one:i=a.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},WK=O3e;function DE(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var M3e={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},N3e={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},T3e={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},F3e={date:DE({formats:M3e,defaultWidth:"full"}),time:DE({formats:N3e,defaultWidth:"full"}),dateTime:DE({formats:T3e,defaultWidth:"full"})},VK=F3e;var _3e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},P3e=function(t,r,n,i){return _3e[t]},GK=P3e;function Jv(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):a;i=e.formattingValues[o]||e.formattingValues[a]}else{var s=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;i=e.values[l]||e.values[s]}var u=e.argumentCallback?e.argumentCallback(t):t;return i[u]}}var I3e={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},B3e={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},R3e={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},$3e={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},q3e={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},L3e={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},z3e=function(t,r){var n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},U3e={ordinalNumber:z3e,era:Jv({values:I3e,defaultWidth:"wide"}),quarter:Jv({values:B3e,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Jv({values:R3e,defaultWidth:"wide"}),day:Jv({values:$3e,defaultWidth:"wide"}),dayPeriod:Jv({values:q3e,defaultWidth:"wide",formattingValues:L3e,defaultFormattingWidth:"wide"})},HK=U3e;function e1(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var o=a[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?V3e(s,function(f){return f.test(o)}):W3e(s,function(f){return f.test(o)}),u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;var c=t.slice(o.length);return{value:u,rest:c}}}function W3e(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function V3e(e,t){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var i=n[0],a=t.match(e.parsePattern);if(!a)return null;var o=e.valueCallback?e.valueCallback(a[0]):a[0];o=r.valueCallback?r.valueCallback(o):o;var s=t.slice(i.length);return{value:o,rest:s}}}var G3e=/^(\d+)(th|st|nd|rd)?/i,H3e=/\d+/i,Q3e={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Y3e={any:[/^b/i,/^(a|c)/i]},Z3e={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},X3e={any:[/1/i,/2/i,/3/i,/4/i]},K3e={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},J3e={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},e4e={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},t4e={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},r4e={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},n4e={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},i4e={ordinalNumber:y$({matchPattern:G3e,parsePattern:H3e,valueCallback:function(t){return parseInt(t,10)}}),era:e1({matchPatterns:Q3e,defaultMatchWidth:"wide",parsePatterns:Y3e,defaultParseWidth:"any"}),quarter:e1({matchPatterns:Z3e,defaultMatchWidth:"wide",parsePatterns:X3e,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:e1({matchPatterns:K3e,defaultMatchWidth:"wide",parsePatterns:J3e,defaultParseWidth:"any"}),day:e1({matchPatterns:e4e,defaultMatchWidth:"wide",parsePatterns:t4e,defaultParseWidth:"any"}),dayPeriod:e1({matchPatterns:r4e,defaultMatchWidth:"any",parsePatterns:n4e,defaultParseWidth:"any"})},QK=i4e;var a4e={code:"en-US",formatDistance:WK,formatLong:VK,formatRelative:GK,localize:HK,match:QK,options:{weekStartsOn:0,firstWeekContainsDate:1}},jE=a4e;var YK=jE;var o4e=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,s4e=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,l4e=/^'([^]*?)'?$/,u4e=/''/g,c4e=/[a-zA-Z]/;function Pa(e,t,r){var n,i,a,o,s,l,u,c,f,d,p,h,m,g,A,b,v,x;pt(2,arguments);var w=String(t),S=El(),k=(n=(i=r?.locale)!==null&&i!==void 0?i:S.locale)!==null&&n!==void 0?n:YK,M=dn((a=(o=(s=(l=r?.firstWeekContainsDate)!==null&&l!==void 0?l:r==null||(u=r.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&s!==void 0?s:S.firstWeekContainsDate)!==null&&o!==void 0?o:(f=S.locale)===null||f===void 0||(d=f.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(M>=1&&M<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var O=dn((p=(h=(m=(g=r?.weekStartsOn)!==null&&g!==void 0?g:r==null||(A=r.locale)===null||A===void 0||(b=A.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&m!==void 0?m:S.weekStartsOn)!==null&&h!==void 0?h:(v=S.locale)===null||v===void 0||(x=v.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&p!==void 0?p:0);if(!(O>=0&&O<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw new RangeError("locale must contain localize property");if(!k.formatLong)throw new RangeError("locale must contain formatLong property");var C=_t(e);if(!c$(C))throw new RangeError("Invalid time value");var T=Lh(C),D=d$(C,T),P={firstWeekContainsDate:M,weekStartsOn:O,locale:k,_originalDate:C},R=w.match(s4e).map(function(q){var B=q[0];if(B==="p"||B==="P"){var N=LK[B];return N(q,k.formatLong)}return q}).join("").match(o4e).map(function(q){if(q==="''")return"'";var B=q[0];if(B==="'")return f4e(q);var N=RK[B];if(N)return!(r!=null&&r.useAdditionalWeekYearTokens)&&UK(q)&&v$(q,t,String(e)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&zK(q)&&v$(q,t,String(e)),N(D,q,k.localize,P);if(B.match(c4e))throw new RangeError("Format string contains an unescaped latin alphabet character `"+B+"`");return q}).join("");return R}function f4e(e){var t=e.match(l4e);return t?t[1].replace(u4e,"'"):e}function b$(e){pt(1,arguments);var t=_t(e),r=t.getFullYear(),n=t.getMonth(),i=new Date(0);return i.setFullYear(r,n+1,0),i.setHours(0,0,0,0),i.getDate()}var d4e=6048e5;function $j(e){pt(1,arguments);var t=_t(e),r=Rc(t).getTime()-s$(t).getTime();return Math.round(r/d4e)+1}function x$(e){pt(1,arguments);var t=_t(e),r=t.getTime();return r}function qj(e){return pt(1,arguments),Math.floor(x$(e)/1e3)}function w$(e,t){var r,n,i,a,o,s,l,u;pt(1,arguments);var c=_t(e),f=c.getFullYear(),d=El(),p=dn((r=(n=(i=(a=t?.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:d.firstWeekContainsDate)!==null&&n!==void 0?n:(l=d.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setFullYear(f+1,0,p),h.setHours(0,0,0,0);var m=xs(h,t),g=new Date(0);g.setFullYear(f,0,p),g.setHours(0,0,0,0);var A=xs(g,t);return c.getTime()>=m.getTime()?f+1:c.getTime()>=A.getTime()?f:f-1}function S$(e,t){var r,n,i,a,o,s,l,u;pt(1,arguments);var c=El(),f=dn((r=(n=(i=(a=t?.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=w$(e,t),p=new Date(0);p.setFullYear(d,0,f),p.setHours(0,0,0,0);var h=xs(p,t);return h}var p4e=6048e5;function Lj(e,t){pt(1,arguments);var r=_t(e),n=xs(r,t).getTime()-S$(r,t).getTime();return Math.round(n/p4e)+1}function E$(e){pt(1,arguments);var t=_t(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(0,0,0,0),t}function zj(e,t){return pt(1,arguments),f$(E$(e),ws(e),t)+1}function Xb(e,t){pt(2,arguments);var r=_t(e),n=_t(t);return r.getTime()>n.getTime()}function OE(e,t){pt(2,arguments);var r=_t(e),n=_t(t);return r.getTime()2)return t;if(/:/.test(r[0])?n=r[0]:(t.date=r[0],n=r[1],Wj.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Wj.timeZoneDelimiter)[0],n=e.substr(t.date.length,e.length))),n){var i=Wj.timezone.exec(n);i?(t.time=n.replace(i[1],""),t.timezone=i[1]):t.time=n}return t}function v4e(e,t){var r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:NaN,restDateString:""};var i=n[1]?parseInt(n[1]):null,a=n[2]?parseInt(n[2]):null;return{year:a===null?i:a*100,restDateString:e.slice((n[1]||n[2]).length)}}function y4e(e,t){if(t===null)return new Date(NaN);var r=e.match(m4e);if(!r)return new Date(NaN);var n=!!r[4],i=NE(r[1]),a=NE(r[2])-1,o=NE(r[3]),s=NE(r[4]),l=NE(r[5])-1;if(n)return C4e(t,s,l)?w4e(t,s,l):new Date(NaN);var u=new Date(0);return!E4e(t,a,o)||!k4e(t,i)?new Date(NaN):(u.setUTCFullYear(t,a,Math.max(i,o)),u)}function NE(e){return e?parseInt(e):1}function b4e(e){var t=e.match(h4e);if(!t)return NaN;var r=D$(t[1]),n=D$(t[2]),i=D$(t[3]);return D4e(r,n,i)?r*u$+n*l$+i*1e3:NaN}function D$(e){return e&&parseFloat(e.replace(",","."))||0}function x4e(e){if(e==="Z")return 0;var t=e.match(A4e);if(!t)return 0;var r=t[1]==="+"?-1:1,n=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return j4e(n,i)?r*(n*u$+i*l$):NaN}function w4e(e,t,r){var n=new Date(0);n.setUTCFullYear(e,0,4);var i=n.getUTCDay()||7,a=(t-1)*7+r+1-i;return n.setUTCDate(n.getUTCDate()+a),n}var S4e=[31,null,31,30,31,30,31,31,30,31,30,31];function ZK(e){return e%400===0||e%4===0&&e%100!==0}function E4e(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(S4e[t]||(ZK(e)?29:28))}function k4e(e,t){return t>=1&&t<=(ZK(e)?366:365)}function C4e(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function D4e(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function j4e(e,t){return t>=0&&t<=59}function ex(e,t){pt(2,arguments);var r=_t(e),n=dn(t),i=r.getFullYear(),a=r.getDate(),o=new Date(0);o.setFullYear(i,n,15),o.setHours(0,0,0,0);var s=b$(o);return r.setMonth(n,Math.min(a,s)),r}function TE(e,t){pt(2,arguments);var r=_t(e),n=dn(t);return isNaN(r.getTime())?new Date(NaN):(r.setFullYear(n),r)}var tx=(e,t,r)=>!t||t<=0?[r,...e]:[...e.slice(0,t),r,...e.slice(t)],rx=(e,t,r)=>!t||t<=0?[...r,...e]:[...e.slice(0,t),...r,...e.slice(t)],Mr=e=>[...new Set(e)],Gj=e=>[...new Map(e.map(t=>[t.toLowerCase(),t])).values()],Mi=(e,t)=>{let r=e;if(t.includes(r)){let n=1;for(;t.includes(r);)r=e+n.toString(),n+=1}return r},XK=e=>(t,r,n)=>n.findIndex(i=>t[e]==i[e])===r;var KK=(e,t,r)=>e.sort(function(n,i){let a=t.indexOf(n[r]),o=t.indexOf(i[r]);return a>o?a!=-1&&o==-1?-1:1:o!=-1&&a==-1?1:-1});var Uh=(e,t)=>{if(e instanceof Date)return"date";if(typeof e=="string"){if(/\/\/(\S+?(?:jpe?g|png|gif|svg))/gi.test(e)||e.includes("unsplash"))return"image";if(/^\d{4}-\d{2}-\d{2}$/.test(e))return"date";if(t=="tag"||t=="tags")return"tags-multi";if(/\[\[.*?\]\]/.test(e))return"link"}else{if(typeof e=="number")return"number";if(typeof e=="boolean")return"boolean";if(e)if(Array.isArray(e)||typeof e=="string"&&e.indexOf(",")>-1){let r=Array.isArray(e)?e:[];if(typeof e=="string"&&e.indexOf(",")>-1&&(r=mr(e)),t=="tag"||t=="tags")return"tags-multi";if(r.length==1&&Array.isArray(r[0])&&r[0].length==1&&typeof r[0][0]=="string")return"link";let n=Mr(r.map(i=>Uh(i,t)));return n.length==1&&n[0]=="link"?"link-multi":n.some(i=>i=="object")?"object-multi":"option-multi"}else return e.isLuxonDateTime?"date":e.isLuxonDuration?"duration":e.type=="file"?"link":typeof e=="object"&&!Array.isArray(e)&&e!==null?"object":"unknown";else return"unknown"}return"text"},nx=e=>{if(e=="date")return Pa(Date.now(),"yyyy-MM-dd");if(e=="number")return 0;if(e=="boolean")return!0;if(e=="link")return"[[Select Note]]";if(e=="option")return"one, two";if(e=="text")return" ";if(e=="image")return"https://images.unsplash.com/photo-1675789652575-0a5d2425b6c2?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2070&q=80"};var j$=(e,t)=>t=="number"?parseFloat(e):t=="boolean"?e=="true":t.includes("-multi")?mr(e).map(r=>Sa(t.replace("-multi",""),r,!1)):e,Sa=(e,t,r)=>e=="object"||e=="object-multi"?JSON.parse(t):e=="number"?parseFloat(t):e=="boolean"?t=="true":e.includes("-multi")?mr(t).map(n=>Sa(e.replace("-multi",""),n,r)):(e.includes("link")||e.includes("context"))&&r?`[[${t}]]`:t,O$=e=>{switch(e){case"duration":return"text";case"unknown":return"text"}return e},ix=e=>e.type=="object"||e.type=="object-multi"||e.type=="super";var Lo=e=>e.map(t=>t.replace(",","\\,")).join(", "),Ni=e=>JSON.stringify(e),M$=e=>e.join(", "),JK=e=>e.join("; "),eJ=e=>e.join(",");var mr=e=>e?.startsWith("[")?Zs(dr(e)):ox(e),ox=e=>(e?.replace("\\,",",")?.match(/(\\.|[^,])+/g)??[]).map(t=>t.trim()),Ki=(e,t,r)=>{let n=r??Uh(t,e);if(!t)return"";switch(n){case"tags-multi":return t;case"object":case"object-multi":return JSON.stringify(t);case"number":return t.toString();case"boolean":return t?"true":"false";case"date":{if(t instanceof Date){let i=Pa(t,"yyyy-MM-dd");return typeof i=="string"?i:""}return typeof t!="string"?"":t}break;case"duration":return Lo(Object.keys(t.values).reduce((i,a)=>[...i,...t.values[a]>0?[t.values[a]+" "+a]:[]],[]));case"option-multi":case"link-multi":case"context-multi":return typeof t=="string"?ax(t):Ni(t.map(i=>i?typeof i=="string"?ax(i):i.path?i.path:Array.isArray(t)&&i.length==1&&Array.isArray(i[0])&&i[0].length==1&&typeof i[0][0]=="string"?i[0][0]:JSON.stringify(i):""));case"link":case"context":return Array.isArray(t)&&t.length==1&&Array.isArray(t[0])&&t[0].length==1&&typeof t[0][0]=="string"?t[0][0]:typeof t=="string"?ax(t):t.path;case"text":case"tag":case"option":case"image":return t}return""},lm=(e,t)=>t?Zs(dr(e)):dr(e)??{},dr=e=>{let t;try{t=JSON.parse(e)}catch{}return t};var ax=e=>{if(!e)return"";let t=/\[\[(.*?)\]\]/g.exec(e),r=t?.length>1?t[1].substring(0,tJ("|",t[1])):e;return r||e};var Hj=(e,t)=>!e||e.length==0?t:e;function Zs(e){return Array.isArray(e)?e:typeof e=="string"?[e]:[]}function rJ(e,t,r){let n=lu(e);return t.some(i=>i==n)?n:r}function lu(e){return e?typeof e!="string"?e.toString():e:""}function Qj(e){return!!e}var tJ=(e,t)=>t.indexOf(e)>0?t.indexOf(e):t.length,nJ=(e,t)=>t.spacesIndex.get(e)?.name??e,iJ=e=>"spaces://"+FE(e),FE=e=>e?.replace(/\//g,"+"),$c=e=>"spaces://"+e;var aJ=e=>e?`(${e})`:null,fr=e=>e?`"${e.replace(/"/g,'\\"').replace(/\n/g,"\\n")}"`:null,N$=e=>{if(!e)return e;if(e.startsWith("(")){if(e.endsWith(")"))return e.substring(1,e.length-1);if(e.endsWith(");"))return e.substring(1,e.length-2)}return e},ca=e=>{if(!e)return e;if(typeof e=="number")return e.toString();let t=e.startsWith("'")&&(e.endsWith("';")||e.endsWith("'")),r=e.startsWith('"')&&(e.endsWith('";')||e.endsWith('"'));return t||r?(e=e.substring(1,e.length-1),(e.endsWith('"')||e.endsWith("'"))&&(e=e.substring(0,e.length-1)),e.replace(/\\"/g,'"')):e.replace(/\\"/g,'"')},Wh=(e,t)=>!e||e.length==0?t:e,Yj=e=>e.charAt(0)=="/"?e.substring(1):e,oJ=e=>Yj(e.substring(0,e.lastIndexOf("/")))||e;var qc=e=>e=="/"?e:e.slice(-1)=="/"?e.substring(0,e.length-1):e,t1=(e,t)=>{if(!e)return"";let r=t.spaceManager.uriByString(e);if(r.refType){if(r.refType=="context"){let n=t.contextsIndex.get(r.basePath)?.schemas.find(a=>a.id==r.ref),i=t.spacesIndex.get(r.basePath);return n&&i?`${i.name} / ${n.name}`:""}return r.refType=="action"?t.actionsIndex.get(r.basePath)?.find(n=>n.schema.id==r.ref)?.schema.name:r.ref}return t.pathsIndex.get(r.basePath)?.name||e},Mg=e=>Yj(e.substring(e.lastIndexOf("/")))||e,sJ=e=>{let t=[],r=e.split("/"),n="";for(let i=0;ie.lastIndexOf("/")!=-1?e.lastIndexOf(".")!=-1?Yj(e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("."))):e.substring(e.lastIndexOf("/")+1):e.lastIndexOf(".")!=-1?e.substring(0,e.lastIndexOf(".")):e,sx=e=>e.substring(0,e.lastIndexOf("."))||e,uu=e=>{let t=e.lastIndexOf("/");return t==-1?"/":e.substring(0,t+1)};var Bf=e=>{let t=e,r="",n=A=>{let b={};return A.split("&").forEach(v=>{let[x,w]=v.split("=");b[decodeURIComponent(x)]=decodeURIComponent(w)}),b},i=(A,b)=>b?A==="^"?"context":A==="*"?"frame":A===";"?"action":"unknown":A==="^"?"block":"heading",a=null,o=null,s=null,l=null,u=null,c=null,f="vault";if(t.indexOf("://")!=-1){f=e.slice(0,e.indexOf("://"));let A=e.slice(e.indexOf("://")+3);if(A.charAt(0)=="#"||A.charAt(0)=="$"){let b=A.split("/")[0].lastIndexOf("#");b>0?(a=qc(A.slice(0,b)),e=A.slice(b)):(a=A.split("/")[0],e=A.replace(a,""),e.length>0&&(e=e.slice(1)),e==""&&(e="/"))}else{let b=A.split("/");a=b[0],e=b.slice(1).join("/")||""}}let d=e.lastIndexOf("/"),p=e.lastIndexOf("#"),h=e.lastIndexOf("|"),m=e.lastIndexOf("?"),g=!1;if(m!==-1&&(c=n(e.slice(m+1)),e=e.slice(0,m)),p!==-1&&p>d){p==d+1&&(g=!0);let A=e.slice(p+1);u=i(A[0],g),(u||p!=d+1)&&(r=A[0],l=u?A.slice(1):A,e=e.slice(0,p))}return h!==-1&&h>d&&(s=e.slice(h+1),e=e.slice(0,h)),e.charAt(e.length-1)=="/"&&(g=!0),o=e,{basePath:qc(`${a?`${f}://${a}/${o!="/"?o:""}`:o}`),authority:a,fullPath:t,scheme:f,path:qc(e),alias:s,ref:l,refType:u,refStr:u?r+l:l,query:c,trailSlash:g}},Rf=(e,t)=>{let r=e.split("/");return t+"/"+r[r.length-1]},lJ=(e,t)=>{let r=e.substring(0,e.lastIndexOf("/"));return r.length>0?`${r}/${t}`:`${t}`},uJ=(e,t)=>{let r=e.substring(0,e.lastIndexOf("/")),n=e.lastIndexOf(".")!=-1?e.substring(e.lastIndexOf(".")):"";return r.length>0?`${r}/${t}${n}`:`${t}${n}`};var lx=async(e,t,r)=>{if(e.spacesIndex.has(t)){let n=e.spacesIndex.get(t);return n.type=="tag"?T$(e,n.name,r):e.spaceManager.renameSpace(t,lJ(t,r))}else return e.spaceManager.renamePath(t,uJ(t,r))},Zj=async(e,t)=>{e.settings.hiddenFiles=Mr([...e.settings.hiddenFiles,t]),e.ui.notify("Item is now hidden in the Navigator, you can manage hidden items in the Navigator menu."),e.saveSettings(),e.reloadPath(t,!0).then(r=>e.dispatchEvent("superstateUpdated",null))},cJ=async(e,t)=>{e.settings.hiddenFiles=Mr([...e.settings.hiddenFiles,...t]),e.saveSettings(),Promise.all(t.map(r=>{e.reloadPath(r,!0)})).then(r=>e.dispatchEvent("superstateUpdated",null))},Vh=async(e,t)=>{e.spaceManager.deletePath(t),e.onPathDeleted(t)},fJ=async(e,t,r)=>e.spaceManager.renamePath(t,Rf(t,r)),Xj=async(e,t,r)=>{let n=e.pathsIndex.get(t);if(!n)return;let i=n.parent+"/"+n.name;await e.spaceManager.createSpace(n.name,n.parent,{}),await e.spaceManager.renamePath(t,i+"/"+n.metadata?.file?.name+".md"),r&&e.ui.openPath(i,!1)};var yJ=ge(pi());var F$=(e,t)=>{let r=n=>n=="builtin"?"Builtin":n=="api"?"Spaces":"Action";return[...(e.actionsIndex.get(t)??[]).map(n=>({name:n.schema.name,description:"Action",value:`${t}/#;${n.schema.id}`,section:"Action"}))??[],...[...e.cli.allCommands()].map(n=>({name:n.schema.name,description:r(n.schema.type),value:n.path,section:r(n.schema.type)}))]};var dJ=({field:e,value:t})=>t=="ctime"?{value:"parseDate(prop('File')['metadata']['ctime'])",type:"date"}:{value:"",type:"string"},Lr=(e,t,r,n)=>{let i=dr(e);if(i)return t=="fileprop"&&i.field?dJ(i):(t=="option"&&i.source?.length>0&&(i.source=="$commands"?i.options=r.cli.allCommands():i.source=="$links"?i.options=r.spaceManager.allPaths().map(a=>({name:a,value:a})):i.source=="$super"?i.options=F$(r,n):i.source=="$properties"&&(i.options=r.contextsIndex.get(n)?.contextTable?.cols?.map(a=>({name:a.name,value:a.name}))??[])),[...Gu(t).configKeys??[],"alias","default"].reduce((a,o)=>({...a,[o]:i[o]}),{}));if(!t)return{};if(!i)if(t=="context")e?.length>0?i={space:e}:i={};else if(t.startsWith("date"))e?.length>0?i={format:e}:i={};else if(t.startsWith("fileprop"))if(e?.length>0){let[a,o]=e.split(".");i=dJ({field:a,value:o})}else i={};else t.startsWith("option")&&(e?.length>0?i={options:mr(e).map(o=>({name:o,value:o}))}:i={});return i??{}};var Hu=e=>e?e.type=="fileprop"?Lr(e.value,"fileprop")?.type??"text":e.type:null,Li=e=>e.attrs?.length>0?dr(e.attrs)?.icon??Gu(e.type,e.name)?.icon:Gu(e.type,e.name)?.icon,cx=e=>e.def?.icon?.length>0?e.def?.icon:"ui//layout-list",pJ=e=>dr(e?.def)?.icon??"ui//layout-list",Gu=(e,t)=>t==It?Xs.find(r=>r.type=="file"):t=="tags"?Xs.find(r=>r.type=="tags-multi"):t=="aliases"?Xs.find(r=>r.type=="option-multi"):t=="sticker"?Xs.find(r=>e=="icon"):Xs.find(r=>e==r.type)||Xs.find(r=>e==r.multiType),Xs=[{type:"unknown",label:"",restricted:!0,icon:"ui//file-question"},{type:"any",label:"",restricted:!0,icon:"ui//wildcard",multi:!0,multiType:"any-multi"},{type:"text",label:z.properties.text.label,metadata:!0,icon:"ui//text",primative:!0,description:z.properties.text.description},{type:"number",label:z.properties.number.label,metadata:!0,icon:"ui//binary",configKeys:["unit"],primative:!0,description:z.properties.number.description},{type:"boolean",label:z.properties.boolean.label,metadata:!0,icon:"ui//check-square",primative:!0,description:z.properties.boolean.description},{type:"date",label:z.properties.date.label,metadata:!0,icon:"ui//calendar",configKeys:["format"],primative:!0,description:z.properties.date.description},{type:"option",label:z.properties.option.label,multi:!0,multiType:"option-multi",icon:"ui//list",configKeys:["options","source"],description:z.properties.option.description},{type:"tags-multi",label:z.properties.tags.label,icon:"ui//tags",description:z.properties.tags.description},{type:"file",label:z.properties.file.label,restricted:!0,icon:"ui//mk-make-h3"},{type:"fileprop",label:z.properties.fileProperty.label,icon:"ui//formula",configKeys:["field","value","type"],description:z.properties.fileProperty.description},{type:"link",label:z.properties.link.label,multi:!0,multiType:"link-multi",metadata:!0,icon:"ui//file-text",primative:!0,description:z.properties.link.description},{type:"context",label:z.properties.context.label,icon:"ui//mk-make-note",multi:!0,multiType:"context-multi",configKeys:["space"],description:z.properties.context.description},{type:"object",label:z.properties.object.label,multi:!0,multiType:"object-multi",metadata:!0,icon:"ui//list-tree",configKeys:["type","typeName"],description:z.properties.object.description},{type:"icon",label:z.properties.icon.label,multi:!0,multiType:"icon-multi",icon:"ui//gem",restricted:!0,primative:!0,description:z.properties.icon.description},{type:"image",label:z.properties.image.label,multi:!0,multiType:"image-multi",metadata:!0,icon:"ui//mk-make-image",primative:!0,description:z.properties.image.description},{type:"color",label:z.properties.color.label,icon:"ui//mk-make-image",restricted:!0,description:z.properties.color.description},{type:"space",label:z.properties.space.label,icon:"ui//layout-grid",restricted:!0,description:z.properties.space.description},{type:"table",label:z.properties.space.label,icon:"ui//layout-grid",restricted:!0,description:z.properties.space.description},{type:"super",label:z.properties.super.label,icon:"ui//zap",restricted:!0,configKeys:["dynamic","field"]},{type:"input",label:z.properties.super.label,icon:"ui//input",restricted:!0}];var Nr="files",um={id:Nr,name:"Items",type:"db",primary:"true"},Ng="filesView",Kd={id:Ng,name:"All",type:"view",def:JSON.stringify({db:Nr,icon:"ui//file-stack"})},r1="main",Kj=e=>({id:e,name:e,type:"frame",def:"",predicate:"",primary:"true"}),mJ={uniques:[],cols:["id","name","type","def","predicate","primary"],rows:[Kj(r1),Kd]},Gh={uniques:[],cols:["id","name","type","def","predicate","primary"],rows:[um]},Ji={uniques:["name,schemaId"],cols:["name","schemaId","type","value","attrs","hidden","unique","primary"]},Xd={...Ji,rows:[{name:It,schemaId:Nr,type:"file",primary:"true",hidden:"",unique:"",attrs:"",value:""},{name:z.properties.fileProperty.createdTime,schemaId:Nr,type:"fileprop",value:It+".ctime",hidden:"",unique:"",attrs:"",primary:"true"}]},P$=e=>Xd,fx=[{name:z.properties.defaultField,schemaId:"",type:"text",primary:"true"}],_$={...Ji,rows:[{name:It,schemaId:Nr,type:"file",primary:"true",hidden:"",unique:"",attrs:"",value:""}]},hJ=e=>O4e,O4e={schema:um,cols:Xd.rows,rows:[]},Got={schema:um,cols:Xd.rows,rows:[]},Hot={schema:um,cols:_$.rows,rows:[]},AJ=(e,t)=>e.filter(r=>t.find(n=>n.id==r.schemaId&&n.type=="db")).reduce((r,n)=>({...r,...r[n.schemaId]?{[n.schemaId]:{uniques:n.unique=="true"?[...r[n.schemaId].uniques,n.name]:r[n.schemaId].uniques,cols:[...r[n.schemaId].cols,n.name],rows:[]}}:{[n.schemaId]:{uniques:n.unique=="true"?[n.name]:[],cols:[n.name],rows:[]}}}),{}),gJ=e=>M4e,M4e={m_schema:Gh,m_fields:Xd,...AJ(Xd.rows,Gh.rows)},Qot={m_schema:Gh,m_fields:_$,...AJ(_$.rows,Gh.rows)};var dx=ge(pi()),vJ=e=>e instanceof Date&&!isNaN(e),Qu=(e,t,r)=>{let n;try{n=Pa(t,r?.length>0?r:e.settings.defaultDateFormat)}catch{n=""}return n},PE=e=>e?(0,dx.isFinite)(e)?new Date(e):(0,dx.isString)(e)?Vj(e):(0,dx.isDate)(e)?e:null:null;var bJ=(e,t)=>Mr(t?.rows.reduce((r,n)=>(0,yJ.isString)(n[e])?[...r,...mr(n[e])]:[...r],[])??[]),px=(e,t)=>{let r=[...e.getSpaceItems(t.path,!0)];return{...hJ(t),rows:r.map(n=>({[It]:n.path,Created:Qu(e,n.metadata?.ctime,"yyyy-MM-dd")}))}},xJ=(e,t,r)=>r?{...e,rows:tx(e.rows,r,t)}:{...e,rows:[...e.rows,t]},wJ=async(e,t,r)=>{let n=_j(t,e.settings);await e.spaceManager.pathExists(n)?e.spaceManager.renamePath(n,oJ(n)+"/"+r):Vh(e,n),e.onTagRenamed(t,r)};var T$=async(e,t,r)=>{let n=N4e(e,t),i=Tg(I$(r)),a=e.spaceManager.pathsForTag(t);for(let o of a)e.spaceManager.renameTag(o,t,i);await wJ(e,t,i);for(let o of n)await T$(e,o,o.replace(t,i));return i},SJ=e=>{e.startsWith("#")&&(e=e.slice(1));let t=e.split("/"),r=[];for(let n=0;ne.trim(),N4e=(e,t)=>e.spaceManager.readTags().filter(n=>n.startsWith(t)&&n!=t),EJ=e=>FE(Tg(e)),Jj=e=>Lc(e).replace(/\+/g,"/"),Tg=e=>{if(!e)return null;let t=e;return t.charAt(0)!="#"&&(t="#"+t),t},Ks=e=>e.charAt(0)=="#"?e.charAt(1)=="#"?e.substring(2,e.length):e.substring(1,e.length):e;var n1=(e,t,r)=>{let n=$c(t),i=e.superstate.settings.spacesFolder+"/"+EJ(t);return{name:t,path:n,isRemote:!1,readOnly:r,folderPath:i,defPath:`${i}/${e.superstate.settings.spaceSubFolder}/def.json`,notePath:`${i}/${FE(t)}.md`,framePath:Bc(i+"/",e)+"views.mdb",dbPath:Bc(i+"/",e)+"context.mdb",commandsPath:Bc(i+"/",e)+"commands.mdb"}},kJ=(e,t)=>{if(!t)return;if(t.startsWith(Fg)){let i=t.slice(Fg.length),a=e.superstate.settings.spacesFolder+"/$"+i;return{name:cm[i].name,path:t,isRemote:!1,readOnly:!1,folderPath:a,defPath:`${a}/${e.superstate.settings.spaceSubFolder}/def.json`,notePath:`${a}/${cm[i].name}.md`,framePath:Bc(a+"/",e)+"views.mdb",dbPath:Bc(a+"/",e)+"context.mdb",commandsPath:Bc(a+"/",e)+"commands.mdb"}}let r=e.uriByString(t);if(!r)return null;let n=e.spaceTypeByString(r);return n=="folder"?IE(e,qc(r.path)):n=="tag"?n1(e,r.authority):n=="vault"?IE(e,"/"):null},IE=(e,t,r)=>{if(t=="/"){let a="Vault";return{name:a,path:t,isRemote:!1,readOnly:r,folderPath:t,defPath:`${e.superstate.settings.spaceSubFolder}/def.json`,notePath:a+".md",dbPath:Bc(t,e)+"context.mdb",framePath:Bc(t,e)+"views.mdb",commandsPath:Bc(t,e)+"commands.mdb"}}let n=Mg(t),i=e.superstate.settings.folderNoteName;return{name:n,path:t,isRemote:!1,readOnly:r,folderPath:t,defPath:t+`/${e.superstate.settings.spaceSubFolder}/def.json`,notePath:t+"/"+(i.length>0?i:n)+".md",dbPath:Bc(t+"/",e)+"context.mdb",framePath:Bc(t+"/",e)+"views.mdb",commandsPath:Bc(t+"/",e)+"commands.mdb"}};var _g=e=>[e.fmKeyBanner,e.fmKeySticker,e.fmKeyColor,e.fmKeyBanner,e.fmKeyBannerOffset,BE,qE,LE,zE,RE,$E],Fg="spaces://$",mx="spaces://$tags";var bst={name:z.menu.vault,readOnly:!1,path:"/",label:{thumbnail:"",name:z.menu.vault,sticker:"ui//vault",color:""},type:"default"},cm={tags:{name:"Tags",icon:"ui//tags",readOnly:!1,hidden:!1},overview:{name:"Overview",icon:"ui//overview",readOnly:!0,hidden:!0}},BE="_contexts",RE="_template",$E="_templateName",qE="_filters",LE="_links",zE="_sort",eO="_subfolders";var Hh=(e,t)=>JSON.stringify({...t,options:e.map(r=>({name:r.name,value:r.value,color:r.color}))});var UE=class{constructor(){this.spaceAdapters=[];this.readSystemCommands=()=>this.primarySpaceAdapter.readSystemCommands();this.saveSystemCommand=(t,r)=>this.primarySpaceAdapter.saveSystemCommand(t,r).then(n=>this.superstate.reloadSystemActions());this.onFocusesUpdated=()=>{this.readFocuses().then(t=>{this.superstate.focuses=t,this.superstate.dispatchEvent("focusesChanged",null)})};this.onPathCreated=async t=>{this.superstate.onPathCreated(t)};this.onPathDeleted=async t=>{this.superstate.onPathDeleted(t)};this.onPathChanged=async(t,r)=>{this.superstate.onPathRename(r,t)};this.onSpaceCreated=async t=>{if(t.startsWith(this.superstate.settings.spacesFolder)){await this.onSpaceCreated(t.replace(this.superstate.settings.spacesFolder,"spaces:/"));return}let r=await this.superstate.reloadSpace(this.spaceInfoForPath(t),null,!0);await this.superstate.onSpaceDefinitionChanged(r),await this.superstate.onPathCreated(t)};this.onSpaceRenamed=async(t,r)=>{await this.superstate.onSpaceRenamed(r,this.spaceInfoForPath(t)),await this.superstate.onPathRename(r,t)};this.onSpaceDeleted=async t=>{this.superstate.onSpaceDeleted(t),this.superstate.onPathDeleted(t)};this.onPathPropertyChanged=async t=>{this.superstate.onMetadataChange(t)};this.spaceTypeByString=t=>t.fullPath.startsWith(Fg)?"default":t.scheme=="space"?"folder":t.authority?.charAt(0)=="#"?"tag":t.path.charAt(t.path.length-1)=="/"&&t.path=="/"?"vault":"folder"}onSpaceUpdated(t,r){!this.superstate.spacesIndex.has(t)||(r=="context"&&this.superstate.reloadContextByPath(t),r=="frame"&&this.superstate.dispatchEvent("frameStateUpdated",{path:t}),r=="action"&&this.superstate.reloadActions(this.spaceInfoForPath(t)))}saveFrameKit(t,r){return this.primarySpaceAdapter.saveFrameKit(t,r)}saveSpaceTemplate(t,r){return this.primarySpaceAdapter.saveSpaceTemplate(t,r)}resolvePath(t,r){if(!r||!t||t.indexOf("http")==0)return t;if(t.indexOf("|")!=-1&&(t=t.split("|")[0]),t.indexOf("./")==0&&r)return this.superstate.spacesIndex.has(r)?r+t.slice(1):r.slice(0,r.lastIndexOf("/"))+t.slice(1);if(t.indexOf("../")==0&&r){let n=r.split("/"),i=t.split("/");for(;i[0]==="..";)n.pop(),i.shift();return[...n,...i].join("/")}return this.superstate.pathsIndex.has(t)?t:this.primarySpaceAdapter.resolvePath(t,r)??t}uriByString(t,r){return!t||r&&(t=this.resolvePath(t,r),!t)?null:Bf(t)}async allCaches(){let t=new Map,r=this.primarySpaceAdapter.allCaches().keys();for(let n of r){let i=await this.readPathCache(n);t.set(n,i)}return t}keysForCacheType(t){return this.primarySpaceAdapter.keysForCacheType(t)}pathExists(t){return this.primarySpaceAdapter.pathExists(t)}addSpaceAdapter(t,r){t.initiateAdapter(this),r&&(this.primarySpaceAdapter=t),this.spaceAdapters.push(t)}adapterForPath(t){let r=this.uriByString(t);return r?this.spaceAdapters.find(n=>n.schemes.includes(r.scheme))??this.primarySpaceAdapter:this.primarySpaceAdapter}createSpace(t,r,n){return this.adapterForPath(r).createSpace(t,r,n)}saveSpace(t,r,n){return this.adapterForPath(t).saveSpace(t,r,n)}renameSpace(t,r){return this.adapterForPath(t).renameSpace(t,r)}deleteSpace(t){return this.adapterForPath(t).deleteSpace(t)}childrenForSpace(t){return this.adapterForPath(t).childrenForSpace(t)}contextForSpace(t){return this.adapterForPath(t).contextForSpace(t)}async tablesForSpace(t){return this.adapterForPath(t).tablesForSpace(t)}spaceInitiated(t){return this.adapterForPath(t).spaceInitiated(t)}contextInitiated(t){return this.adapterForPath(t).contextInitiated(t)}readTable(t,r){return this.adapterForPath(t).readTable(t,r)}createTable(t,r){return this.adapterForPath(t).createTable(t,r).then(n=>this.superstate.reloadContextByPath(t,!0))}saveTableSchema(t,r,n){return this.adapterForPath(t).saveTableSchema(t,r,n).then(i=>i&&this.superstate.reloadContextByPath(t,!0))}saveTable(t,r,n){return this.adapterForPath(t).saveTable(t,r,n)}deleteTable(t,r){return this.adapterForPath(t).deleteTable(t,r).then(n=>this.superstate.reloadContextByPath(t,!0))}readAllKits(){return this.primarySpaceAdapter.readAllKits()}readAllTemplates(){return this.primarySpaceAdapter.readAllTemplates()}readAllTables(t){return this.adapterForPath(t).readAllTables(t)}framesForSpace(t){return this.adapterForPath(t).framesForSpace(t)}readFrame(t,r){return this.adapterForPath(t).readFrame(t,r)}readAllFrames(t){return this.adapterForPath(t).readAllFrames(t)}createFrame(t,r){return this.adapterForPath(t).createFrame(t,r).then(n=>this.superstate.dispatchEvent("frameStateUpdated",{path:this.spaceInfoForPath(t).path,schemaId:r.id}))}deleteFrame(t,r){return this.adapterForPath(t).deleteFrame(t,r)}saveFrameSchema(t,r,n){return this.adapterForPath(t).saveFrameSchema(t,r,n).then(i=>this.superstate.dispatchEvent("frameStateUpdated",{path:this.spaceInfoForPath(t).path,schemaId:r}))}saveFrame(t,r){return this.adapterForPath(t).saveFrame(t,r).then(n=>this.superstate.dispatchEvent("frameStateUpdated",{path:this.spaceInfoForPath(t).path,schemaId:r.schema.id}))}commandsForSpace(t){return this.adapterForPath(t).commandsForSpace(t)}runCommand(t,r,n){return this.adapterForPath(t).runCommand(t,r,n)}createCommand(t,r){return this.adapterForPath(t).createCommand(t,r).then(n=>this.superstate.reloadActions(this.spaceInfoForPath(t)))}deleteCommand(t,r){return this.adapterForPath(t).deleteCommand(t,r).then(n=>this.superstate.reloadActions(this.spaceInfoForPath(t)))}saveCommand(t,r,n){return this.adapterForPath(t).saveCommand(t,r,n).then(i=>this.superstate.reloadActions(this.spaceInfoForPath(t)))}allPaths(t){return this.spaceAdapters.flatMap(r=>r.allPaths(t))}createItemAtPath(t,r,n,i){return this.adapterForPath(t).createItemAtPath(t,r,n,i)}renamePath(t,r){return this.adapterForPath(t).renamePath(t,r)}copyPath(t,r,n){return this.adapterForPath(t).copyPath(t,r,n)}getPathInfo(t){return this.adapterForPath(t).getPathInfo(t)}deletePath(t){return this.adapterForPath(t).deletePath(t)}readPath(t){return this.adapterForPath(t).readPath(t)}writeToPath(t,r,n){return this.adapterForPath(t).writeToPath(t,r,n)}parentPathForPath(t){return this.adapterForPath(t).parentPathForPath(t)}async readPathCache(t){let r=await this.adapterForPath(t).readPathCache(t);if(r&&r.type=="space"&&!this.superstate.settings.enableFolderNote){let n=this.spaceInfoForPath(t).defPath;r.label={...r.label,...await this.readLabel(n)},r.property=await this.readProperties(n)}return r}allSpaces(){return this.primarySpaceAdapter.allSpaces()}spaceInfoForPath(t){return this.adapterForPath(t).spaceInfoForPath(t)}spaceDefForSpace(t){return this.adapterForPath(t).spaceDefForSpace(t)}readLabel(t){return this.adapterForPath(t).readLabel(t)}saveLabel(t,r,n){return this.adapterForPath(t).saveLabel(t,r,n)}addProperty(t,r){return this.adapterForPath(t).addProperty(t,r)}saveProperties(t,r){if(!!t)return this.adapterForPath(t).saveProperties(t,r)}readProperties(t){return this.adapterForPath(t).readProperties(t)}renameProperty(t,r,n){return this.adapterForPath(t).renameProperty(t,r,n)}deleteProperty(t,r){return this.adapterForPath(t).deleteProperty(t,r)}addSpaceProperty(t,r){if(r.schemaId==Nr&&r.type.startsWith("option")){let n=Mr([...this.superstate.spacesMap.getInverse(t)??[]].flatMap(a=>mr(this.superstate.pathsIndex.get(a)?.metadata?.property?.[r.name])??[])),i=Hh(n.map(a=>({value:a,name:a})),{});r.value=i}return this.adapterForPath(t).addSpaceProperty(t,r).then(n=>this.superstate.reloadContextByPath(t,!0))}deleteSpaceProperty(t,r){return this.adapterForPath(t).deleteSpaceProperty(t,r).then(n=>this.superstate.reloadContextByPath(t,!0))}saveSpaceProperty(t,r,n){return this.adapterForPath(t).saveSpaceProperty(t,r,n).then(i=>(n.name!=r.name&&this.superstate.getSpaceItems(t).forEach(a=>{this.renameProperty(a.path,n.name,r.name)}),this.superstate.reloadContextByPath(t,!0)))}addTag(t,r){return this.adapterForPath(t).addTag(t,r)}deleteTag(t,r){return this.adapterForPath(t).deleteTag(t,r)}renameTag(t,r,n){return this.adapterForPath(t).renameTag(t,r,n)}readTags(){return this.primarySpaceAdapter.readTags()}pathsForTag(t){return this.primarySpaceAdapter.pathsForTag(t)}childrenForPath(t,r){return this.adapterForPath(t).childrenForPath(t,r)}readFocuses(){return this.primarySpaceAdapter.readFocuses()}saveFocuses(t){return this.superstate.focuses=t,this.superstate.dispatchEvent("focusesChanged",null),this.primarySpaceAdapter.saveFocuses(t)}readTemplates(t){return this.adapterForPath(t).readTemplates(t)}saveTemplate(t,r){return this.adapterForPath(t).saveTemplate(t,r).then(n=>this.superstate.reloadSpace(this.spaceInfoForPath(r),null,!0))}deleteTemplate(t,r){return this.primarySpaceAdapter.deleteTemplate(t,r).then(n=>this.superstate.reloadSpace(this.spaceInfoForPath(r),null,!0))}};var CJ=(e,t)=>mr(t).some(r=>e==ax(r)),T4e=(e,t,r)=>Ni(mr(r).map(n=>ax(n)==e?t:e)),F4e=(e,t)=>Ni(mr(t).filter(r=>r!=e)),B$=e=>e.filter(t=>t.type.startsWith("link")||t.type.startsWith("context")),DJ=(e,t,r,n)=>{if(n.length==0)return t;let i=n.reduce((a,o)=>{if(CJ(r,t[o.name])){let s=F4e(r,t[o.name]);return e.saveProperties(t[It],{[o.name]:Sa(o.type,s,!0)}),{...a,[o.name]:s}}return a},{});return{...t,...i}},jJ=(e,t,r,n,i)=>{if(i.length==0)return t;let a=i.reduce((o,s)=>{if(CJ(r,t[s.name])){let l=T4e(r,n,t[s.name]);return e.saveProperties(t[It],{[s.name]:Sa(s.type,l,!0)}),{...o,[s.name]:l}}return o},{});return{...t,...a}};var OJ=(e,t,r)=>({...e,rows:e.rows.map(n=>n[It]==t?{...n,[It]:r}:n)}),MJ=(e,t)=>({...e,rows:e.rows.filter(r=>r[It]!=t)});var R$=(e,t,r)=>{let n=e.rows.filter(i=>t.includes(i[It]));return{...e,rows:rx(e.rows.filter(i=>!t.includes(i[It])),r,n)}};var mc=ge(pi());var mo=ge(Te());var nt=ge(Te()),n0=ge(rl());var po=ge(Te());function Kre(){for(var e=arguments.length,t=new Array(e),r=0;rn=>{t.forEach(i=>i(n))},t)}var Pk=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function y1(e){let t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function bM(e){return"nodeType"in e}function Ml(e){var t,r;return e?y1(e)?e:bM(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function xM(e){let{Document:t}=Ml(e);return e instanceof t}function Wx(e){return y1(e)?!1:e instanceof Ml(e).HTMLElement}function JL(e){return e instanceof Ml(e).SVGElement}function b1(e){return e?y1(e)?e.document:bM(e)?xM(e)?e:Wx(e)||JL(e)?e.ownerDocument:document:document:document}var ec=Pk?po.useLayoutEffect:po.useEffect;function Ik(e){let t=(0,po.useRef)(e);return ec(()=>{t.current=e}),(0,po.useCallback)(function(){for(var r=arguments.length,n=new Array(r),i=0;i{e.current=setInterval(n,i)},[]),r=(0,po.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function Vx(e,t){t===void 0&&(t=[e]);let r=(0,po.useRef)(e);return ec(()=>{r.current!==e&&(r.current=e)},t),r}function Gx(e,t){let r=(0,po.useRef)();return(0,po.useMemo)(()=>{let n=e(r.current);return r.current=n,n},[...t])}function Bk(e){let t=Ik(e),r=(0,po.useRef)(null),n=(0,po.useCallback)(i=>{i!==r.current&&t?.(i,r.current),r.current=i},[]);return[r,n]}function Rk(e){let t=(0,po.useRef)();return(0,po.useEffect)(()=>{t.current=e},[e]),t.current}var KL={};function x1(e,t){return(0,po.useMemo)(()=>{if(t)return t;let r=KL[e]==null?0:KL[e]+1;return KL[e]=r,e+"-"+r},[e,t])}function ene(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i{let s=Object.entries(o);for(let[l,u]of s){let c=a[l];c!=null&&(a[l]=c+e*u)}return a},{...t})}}var w1=ene(1),S1=ene(-1);function PPe(e){return"clientX"in e&&"clientY"in e}function Hx(e){if(!e)return!1;let{KeyboardEvent:t}=Ml(e.target);return t&&e instanceof t}function IPe(e){if(!e)return!1;let{TouchEvent:t}=Ml(e.target);return t&&e instanceof t}function $k(e){if(IPe(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return PPe(e)?{x:e.clientX,y:e.clientY}:null}var pu=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(!!e)return[pu.Translate.toString(e),pu.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),Xre="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function tne(e){return e.matches(Xre)?e:e.querySelector(Xre)}var E1=ge(Te()),BPe={display:"none"};function rne(e){let{id:t,value:r}=e;return E1.default.createElement("div",{id:t,style:BPe},r)}function nne(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e,i={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return E1.default.createElement("div",{id:t,style:i,role:"status","aria-live":n,"aria-atomic":!0},r)}function ine(){let[e,t]=(0,E1.useState)("");return{announce:(0,E1.useCallback)(n=>{n!=null&&t(n)},[]),announcement:e}}var gne=(0,nt.createContext)(null);function Vo(e){let t=(0,nt.useContext)(gne);(0,nt.useEffect)(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function RPe(){let[e]=(0,nt.useState)(()=>new Set),t=(0,nt.useCallback)(n=>(e.add(n),()=>e.delete(n)),[e]);return[(0,nt.useCallback)(n=>{let{type:i,event:a}=n;e.forEach(o=>{var s;return(s=o[i])==null?void 0:s.call(o,a)})},[e]),t]}var $Pe={draggable:` +`);n>-1&&(r=r.slice(0,n))}return t+r.length<=this.to?r:r.slice(0,this.to-t)}nextLine(){let t=this.parsedPos,r=this.lineAfter(t),n=t+r.length;for(let i=this.rangeIndex;;){let a=this.ranges[i].to;if(a>=n||(r=r.slice(0,a-(n-r.length)),i++,i==this.ranges.length))break;let o=this.ranges[i].from,s=this.lineAfter(o);r+=s,n=o+s.length}return{line:r,end:n}}skipGapsTo(t,r,n){for(;;){let i=this.ranges[this.rangeIndex].to,a=t+r;if(n>0?i>a:i>=a)break;r+=this.ranges[++this.rangeIndex].from-i}return r}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to1){a=this.skipGapsTo(r,a,1),r+=a;let o=this.chunk.length;a=this.skipGapsTo(n,a,-1),n+=a,i+=this.chunk.length-o}return this.chunk.push(t,r,n,i),a}parseLine(t){let{line:r,end:n}=this.nextLine(),i=0,{streamParser:a}=this.lang,o=new Cj(r,t?t.state.tabSize:4,t?wj(t.state):2);if(o.eol())a.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let s=hK(a.token,o,this.state);if(s&&(i=this.emitToken(this.lang.tokenTable.resolve(s),this.parsedPos+o.start,this.parsedPos+o.pos,4,i)),o.start>1e4)break}this.parsedPos=n,this.moveRangeIndex(),this.parsedPost.start)return i}throw new Error("Stream parser failed to advance stream.")}var XR=Object.create(null),vE=[Qs.none],HFe=new qb(vE),YX=[],ZX=Object.create(null),AK=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])AK[e]=gK(XR,t);var Dj=class{constructor(t){this.extra=t,this.table=Object.assign(Object.create(null),AK)}resolve(t){return t?this.table[t]||(this.table[t]=gK(this.extra,t)):0}},QFe=new Dj(XR);function qR(e,t){YX.indexOf(e)>-1||(YX.push(e),console.warn(t))}function gK(e,t){let r=[];for(let s of t.split(" ")){let l=[];for(let u of s.split(".")){let c=e[u]||qe[u];c?typeof c=="function"?l.length?l=l.map(c):qR(u,`Modifier ${u} used at start of tag`):l.length?qR(u,`Tag ${u} used as modifier`):l=Array.isArray(c)?c:[c]:qR(u,`Unknown highlighting tag ${u}`)}for(let u of l)r.push(u)}if(!r.length)return 0;let n=t.replace(/ /g,"_"),i=n+" "+r.map(s=>s.id),a=ZX[i];if(a)return a.id;let o=ZX[i]=Qs.define({id:vE.length,name:n,props:[RX({[n]:r})]});return vE.push(o),o.id}function YFe(e){let t=Qs.define({id:vE.length,name:"Document",props:[Ub.add(()=>e)],top:!0});return vE.push(t),t}var jet={rtl:rn.Decoration.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"rtl"},bidiIsolate:rn.Direction.RTL}),ltr:rn.Decoration.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"ltr"},bidiIsolate:rn.Direction.LTR}),auto:rn.Decoration.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"auto"},bidiIsolate:null})};var qh=e=>{let t;return e.app.workspace.iterateLeaves(r=>{let n=r.view.editor?.cm;if(n?.hasFocus)return t=n,!0},e.app.workspace.rootSplit),t},xE=e=>{let t;return e.app.workspace.iterateLeaves(r=>{if(r.view.editor?.cm?.hasFocus)return t=r.view,!0},e.app.workspace.rootSplit),t};function vK(e,t,r){bs(t).iterate({...r,from:e,to:e})}function wE(e,t,r){bs(t).iterate({...r,from:e.from,to:e.to})}var JC=ge(Te());var Gb=require("@codemirror/state"),Tj=Gb.Annotation.define(),NK=Gb.Annotation.define(),Fj=Gb.StateField.define({create:()=>{},update(e,t){return t.annotation(NK)?t.annotation(NK):e}}),Yv=Gb.StateField.define({create:e=>"none",update(e,t){return t.annotation(Tj)?t.annotation(Tj):e}});var FK=ge(TK()),i$=class{constructor(){this.lang="en";this.all={en:{hintText:{fileName:"Enter File Name",alias:"Enter Display Name",dragDropModifierKeys:"Hold ${1} to Pin and ${2} to Copy",createListItem:"Select/Create List Item Frame",dragDropProperties:"Drag and drop properties to link them into the list",newItem:"+ New",selectNote:"Select Note...",newFrame:"New"},defaults:{spaceNote:"Current Note",spaceContext:"Current Space"},commands:{h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6",columns:"Columns",tabs:"Tabs",button:"Button",label:"Label",column:"Column",idea:"New",group:"Group",paragraph:"Text",card:"Card",progress:"Progress",rating:"Rating",circularProgress:"Circular Progress",list:"Bullet List","ordered-list":"Numbered List",todo:"To-do List",quote:"Quote",internal:"Link to Note",context:"Embed Existing Context",flow:"Embed Note or Space",board:"New Board",divider:"Divider",note:"Note Block",link:"Web Link",callout:"Callout",bookmark:"Bookmark",table:"New Table",codeblock:"Code Block",toggle:"Toggle",emoji:"Emoji",image:"Image",newNote:"New Note",tag:"Tag",makeMenu:"Flow Menu",selectStyle:"Style",toggleKeyboard:"Toggle Keyboard",rows:"Rows",masonry:"Gallery"},styles:{bold:"Bold",italics:"Italics",strikethrough:"Strikethrough",code:"Code",link:"Web Link",blocklink:"Link to Note",textColor:"Text Color",highlight:"Highlight"},commandsSuggest:{noResult:"No result"},commandPalette:{enable:"Enable",disabled:"Disable",openFlow:"Open Flow Blocks in Selection",closeFlow:"Close Flow Blocks in Selection",toggleBold:"Toggle Bold",toggleItalics:"Toggle Italics",openSpaces:"Open Spaces",blink:"Blink",openFileContext:"Open Explorer",convertPathToSpace:"Convert to Space",revealFile:"Reveal File in Spaces",releaseNotes:"Release Notes",toggleBacklinks:"Toggle Backlinks",collapseAllFolders:"Collapse All Folders",addFileSpace:"Add File to Space",removeFileSpace:"Remove File from Space"},frames:{sections:{kit:"Kit",paths:"Paths"},label:{label:"Label",description:"Label"},note:{label:"Note",description:"Link to a note"},table:{label:"Table",description:"Table"},context:{label:"Context",description:"Display a context view from another space"},calendar:{label:"Calendar View"},field:{label:"Field",description:"Dynamic node that displays a value based on property type"},event:{label:"Event"},divider:{label:"Divider",description:"Divider to separate your content"},button:{label:"Button",description:"Buttons can perform actions and open links"},callout:{label:"Callout",description:"Callout to highlight important information"},toggle:{label:"Toggle",description:"Toggle to show/hide content"}},menu:{layout:"Layout",enterFlowState:"Enter Flow State",exitFlowState:"Exit Flow State",newView:"New View",calendarView:"Calendar View",dayView:"Day View",closeSpace:"Close Space in Focus",customView:"Custom View",detailsView:"Details View",catalogView:"Catalog View",galleryView:"Gallery View",deleteContext:"Delete Context",openSpace:"Open",revealInDefault:"Reveal in Finder",revealInExplorer:"Reveal in Explorer",setNone:"None",fileMetadataDescription:"This note only",openFilePane:"Open in a new pane",rename:"Rename",changeToFolderNote:"New Space from Note",moveFile:"Move file to...",moveFolder:"Move folder to...",duplicate:"Make a copy",edit:"Edit",delete:"Delete",getHelp:"Make.md Community",vault:"Vault",openVault:"Open Another Vault",openVaultInFolder:"Open Vault Folder",obSettings:"Obsidian Settings",commandPalette:"Command Palette",backToSpace:"Back to Spaces",collapseAllSections:"Collapse All Spaces",expandAllSections:"Expand All Spaces",collapseAllFolders:"Collapse All Folders",expandAllFolders:"Expand All Folders",spaceTitle:"Add/Remove in Space",home:"Home",none:"None",tableView:"Table View",cardView:"Card View",boardView:"Board View",listView:"List View",flowView:"Flow View",groupBy:"Group",sortBy:"Sort",filters:"Filters",newFilter:"New Filter",clearFilters:"Clear Filters",hide:"Hide",unhideFields:"Unhide All Properties",importDataview:"Import All Dataview Properties",saveAllProperties:"Save All Properties to Files",mergeProperties:"Merge Properties",removeFromSpace:"Unpin from Space",editCode:"Edit Code",editProperties:"Edit Properties",properties:"Properties",deleteProperty:"Delete Property",hideProperty:"Hide Property",unhideProperty:"Unhide Property",saveProperty:"Save Property",sortAscending:"Sort Ascending",sortDescending:"Sort Descending",deleteRow:"Delete Item",collapseAll:"Collapse All",customSort:"Custom Sort",groupSpaces:"Group Spaces",recurisveSort:"Apply to Subfolders",fileNameSortAlphaAsc:"File Name (A to Z)",fileNameSortAlphaDesc:"File Name (Z to A)",fileNameSortNumericalAsc:"File Name (1 to 9)",fileNameSortNumericalDesc:"File Name (9 to 1)",createdTimeSortAsc:"Created Time (new to old)",createdTimeSortDesc:"Created Time (old to new)",modifiedTimeSortAsc:"Modified Time (new to old)",modifiedTimeSortDesc:"Modified Time (old to new)",sizeSortAsc:"Size (smallest to largest)",sizeSortDesc:"Size (largest to smallest)",spaces:"Spaces",tags:"Tags",manageHiddenFiles:"Manage Hidden Files",manageActions:"Manage Actions",deleteSpace:"Delete",changeColor:"Change Color",changePropertyType:"Change Type",deleteFiles:"Delete Files",createFolderSpace:"Create Space from Folder",folder:"Folder",syncToContext:"Add Property to Context",setIcon:"Set Icon",copyEmbedLink:"Copy Embed Link",moveUp:"Move Up",moveDown:"Move Down",moveTo:"Move To",groupNodes:"Group Nodes",moveFrame:"Move Frame",renameFrame:"Rename Frame",deleteFrame:"Delete Frame",insertAbove:"Insert Above",insertBelow:"Insert Below"},editor:{rows:"Rows",columns:"Columns",catalog:"Catalog",gallery:"Gallery",grid:"Grid",scaleToFit:"Change to Fit",scaleToFill:"Change to Fill",fit:"Fit",strokeNone:"None",strokeSolid:"Solid",strokeDotted:"Dotted",strokeDashed:"Dashed",size:"Size",gap:"Gap",marginLeft:"Left",marginTop:"Top",marginRight:"Right",marginBottom:"Bottom",minimize:"Minimize",paddingLeft:"Left",paddingTop:"Top",paddingRight:"Right",paddingBottom:"Bottom",unlinkProperty:"Unlink Property",linkedProperty:"Linked Property",linkProperty:"Link Property",currentSpace:"Current Space",linkName:"${1} Link",linkThumbnail:"${1} Thumbnail",linkSticker:"${1} Sticker",opacity:"Opacity",shadowSpread:"Spread",shadowBlur:"Blur",width:"Width",height:"Height",margin:"Margin",padding:"Padding",bold:"Bold",italic:"Italic",underline:"Underline",alignLeft:"Align Left",alignCenter:"Align Center",alignRight:"Align Right",alignJustify:"Align Justify",numberOfLines:"Lines",createVerticalSection:"Create Vertical Section",createHorizontalSection:"Create Horizontal Section",themeColors:"Theme Colors",uiColors:"UI Colors",hex:"Hex"},buttons:{add:"Add",togglePin:"Toggle Pin",refresh:"Refresh",showHidden:"Show Hidden",alias:"Alias",addFilter:"Add Filter",loadMore:"Load More",addCondition:"Add Condition",customize:"Customize",moreOptions:"More Options",saveProperty:"Save Property",newNote:"New Note",changeIcon:"Change Sticker",removeIcon:"Remove Sticker",addIcon:"Add Sticker",addCover:"Add Cover",addDisplay:"Display Name",changeBanner:"Change Cover",changeBannerShort:"Cover",saveChanges:"Save Changes",removeBanner:"Remove Cover",rename:"Change Name",editFrame:"Edit Frame",saveSpace:"Save Space",createSpace:"New Space",createFolder:"New Folder",createNote:"New Note",createCanvas:"New Canvas",addIntoSpace:"New Pin",addSmartSearch:"Add Live Search",subFolders:"Sub Folders",addItem:"Add Item",addProperty:"Add Property",editProperty:"Edit Property",addContext:"Add Context",cancel:"Cancel",search:"Search",delete:"Delete",toggleFlow:"Toggle Flow",openFlow:"Open Flow",hideFlow:"Hide Flow",openLink:"Open Link",addToSpace:"Add to Space",addToSpaceShort:"Pin",addTag:"Add Tag",tag:"Tag",syncFields:"Sync Properties",convertTable:"Convert to Markdown",cutTable:"Cut Table",deleteTable:"Delete From Note",blink:"Blink",addFile:"Add Item",merge:"Merge",saveView:"Save View",saveTable:"Save Table",renameView:"Rename View",deleteView:"Delete View",renameTable:"Rename Table",renameTag:"Rename Tag",createTag:"Create Tag",currentFolder:"Current Folder",sync:"Sync",pasteCSS:"Paste CSS",save:"Save",run:"Run"},metadataTypes:{fileName:"File Name",contexts:"Contexts",path:"Path",folder:"Folder",sticker:"Sticker",color:"Color",created:"Created",lastModified:"Last Modified",extension:"Extension",size:"Size",tags:"Tags",inlinks:"Linked Mentions",outlinks:"Links",label:"Label",fileMetadata:"File Metadata",frontmatter:"Frontmatter"},filterTypes:{contains:"contains",notContains:"does not contain",is:"is",isNot:"is not",before:"before",after:"on or after",anyOf:"is any of",noneOf:"is none of",checked:"is checked",unchecked:"is unchecked",isEmpty:"is empty",isNotEmpty:"is not empty",isSameDate:"is same date",isSameDateAsToday:"today"},sortTypes:{alphaAsc:"A to Z",alphaDesc:"Z to A",earliest:"Earliest",latest:"Latest",checkAsc:"Checked \u2192 Unchecked",checkDesc:"Unchecked \u2192 Checked",itemsAsc:"Least Items",itemsDesc:"Most Items"},properties:{defaultField:"Name",audio:{label:"Audio",description:"Audio"},text:{label:"Text",description:"Text field"},number:{label:"Number",description:"Number field with optional unit"},boolean:{label:"Yes/No",description:"Yes or No toggle to indicate the status"},date:{label:"Date",description:"Select a date from a calendar"},option:{label:"Option",description:"Select one or multiple option from a list"},file:{label:"File"},link:{label:"Link",description:"Link to another note or a website"},tags:{label:"Tags",description:"Use tags to quickly organize your items"},object:{label:"Object",description:"Store any complex objects"},context:{label:"Relation",description:"Connect to another context property and create a relation"},image:{label:"Image",description:"Select any image from your system or from the internet"},color:{label:"Color",description:"Use colors to label your items or status"},space:{label:"Context",description:"Link to a context"},icon:{label:"Sticker",description:"Use stickers to uniquely label your items or status"},super:{label:"Super Property",links:"Open Link",properties:"Update Property",api:"API",obsidianCommands:"Run Command",runCommand:"Run Command",performAction:"Perform Action",whenClicked:"When Clicked"},fileProperty:{name:"Name",label:"Formula",createdTime:"Created",modifiedTime:"Last Edited",sticker:"Sticker",links:"Links",tags:"Tags",spaces:"Spaces",extension:"Extension",size:"Size",preview:"Note Preview",parentFolder:"Folder",description:"Use a formula to dynamically display a property"}},views:{navigator:"Navigator",explorer:"Explorer",space:"Space"},subViews:{spaceItems:"Items",spaceContext:"Context",spaceLists:"Lists",spaceActions:"Actions",spaceTemplates:"Templates",smartSearch:"Live Searches",filesAndFolders:"Files and Folders"},labels:{duplicateTable:"Duplicate Table",pinned:"Pinned",live:"Pinned by Live Search",moveTable:"Move Table",editFormula:"Edit Formula",editObject:"Edit Object",properties:"Properties",newAction:"Action",newTable:"List",template:"Template",createFolder:"New Folder Name",rename:"Rename",createNew:"New",default:"Default",done:"Done",changeCoverShort:"Change",reposition:"Reposition",tables:"Tables",selectDateFormat:"Select/Type Date Format",renameSection:"Edit Space",createSection:"New Folder",createNote:"New Note",contextMaker:"Context Maker",select:"Select",pinnedItems:"Pinned Items",collapse:"Collapse",expand:"Expand",all:"All",none:"None",view:"View",findStickers:"Find Sticker",mergeProperties:"Merge Properties",placeholder:"Type '${1}' for commands",notePlaceholder:"New Note for ${1}",itemsSelected:"${1} Selected",selectNote:"Select Note",selectIcon:"Select Icon",selectImage:"Select Image",selectSpace:"Select Space",styleSmall:"Small",styleMedium:"Medium",styleLarge:"Large",hiddenFilePattern:"Name, Suffixes and Extension",hiddenFileSpecific:"Exclude specific files and folders",textPlaceholder:"Enter Text",noFile:"is not created yet. Click to create.",navigatorSearchPlaceholder:"Search by Text or Filters",blinkPlaceholder:"Search for notes, spaces...",searchPlaceholder:"Type to search...",contextItemSelectPlaceholder:"Find Item",linkItemSelectPlaceholder:"Find or Create Note",pinNotePlaceholder:"Select a Note or Space to Pin",optionItemSelectPlaceholder:"Select Option",viewItemSelectPlaceholder:"Select View",tagItemSelectPlaceholder:"Find Tag",spaceSelectPlaceholder:"Select any Folder or Tag",propertyItemSelectPlaceholder:"Select Property",sortItemSelectPlaceholder:"Select Sort",filterItemSelectPlaceholder:"Select Filter",imageSelectPlaceholder:"Select an image or paste a URL",imageNotFoundPlaceholder:"No Images Found",syncFrontmatterProperty:"Sync Frontmatter Property",newProperty:"New Property",newPropertyShort:"New Property",propertyType:"Type",propertyDynamic:"Dyanmic",propertyValueSpace:"Space",propertyValueProperty:"Property",propertyLookup:"Edit Formula",existingFrontmatter:"Existing Property",dateFormat:"Date Format",propertyFileProp:"Property",multiple:"Multiple",filesCount:"{$1} Files",hiddenFiles:"Hidden Files",addExtension:"Add Rule",saveView:"Save View",saveTable:"Save Table",renameView:"Rename View",renameTable:"Rename Table",syncMetadata:"Sync Metadata",syncProperties:"Sync Properties",selectContext:"Select Context",metadata:"Metadata",backlinks:"Backlinks",spaces:"Spaces",contexts:"Contexts",content:"Content",deleteSpace:"Delete Space",deleteFiles:"Delete Files",outgoingLinks:"Outgoing Links",moveTo:"Move to",addTo:"Pin to",copyTo:"Copy to",reorderIn:"Reorder in",border:"Border",corners:"Corners",color:"Color",backgroundColor:"Background",cornerRadius:"Radius",onClick:"On Click",layout:"Layout",element:"Element",name:"Name",display:"Display",alignment:"Alignment",margin:"Margin",padding:"Padding",gap:"Gap",width:"Width",height:"Height",opacity:"Opacity",shadow:"Shadow",shadowBlur:"Blur",shadowSpread:"Spread",typography:"Typography",layers:"Layers",fontSize:"Size",props:"Props",styles:"Styles",events:"Events",code:"Code",selectedLayers:"${1} Layers"},descriptions:{spaceActions:"Create actions that runs when you press a button",spaceLists:"Create lists to track data and organize them in your space",spaceItems:"Add new items to the space or pin items to the space",spaceTemplates:"Create templates to quickly add items to your space",smartSearch:"Automatically pin notes to this space based on a set of searches",hiddenFileOptions:"Exclude any files and folders by name, suffix or extension.",deleteSpace:"Deleting the space will also delete the folder and its contents.",deleteFiles:"Delete ${1} files/folders and their contents?",addContext:"Contexts lets you connect properties from your tags",spaceProperties:"Define Properties for your Space Items",syncMetadata:"Select which fields from your notes to start syncing with the context.",syncProperties:"Contexts defines and syncs the same fields across your notes depending on their folder or tag.",selectContext:"Select which folder or tag context you want to sync the fields."},flowView:{emptyDoc:"Empty Document",itemsCount:" Items",emptyFolder:"This Folder is Empty"},notice:{duplicateFile:"Folder already contains note with same name",addedToSection:"Added to Space",fileExists:"File Already Exists",folderExists:"Folder Already Exists",noPropertyName:"Property Name is Required",noPropertiesFound:"No Properties Found",duplicatePropertyName:"Duplicate Property Name",newSpaceName:"Enter a name for your space",duplicateSpaceName:"Space name already exists",cantConvertNoteToSpace:"The view is not a note",templateSaved:"Template saved to space: ",tableDeleted:"Table removed from note, you can find the table in the folder space"},settings:{layoutVertical:"Vertical",layoutHorizontal:"Horizontal",sectionSidebar:"Spaces",sectionEditor:"Maker Mode",sectionFlow:"Flow",sectionAdvanced:"Advanced",sectionDataview:"Dataview",sectionContext:"Context",sectionStickers:"Stickers",sectionNavigator:"Navigator",sectionDefault:"Default Spaces",sectionSpaceView:"Space View",sectionBlink:"Blink",sectionInlineContext:"Inline Context",sectionFlowBlock:"Flow Block",sectionFlowMenu:"Flow Menu",sectionFlowStyler:"Flow Styler",experimental:{name:"Experimental",desc:"Experimental features that are subject to change and may not be optimized for performance"},generateThumbnails:{name:"Generate Thumbnails",desc:"Create thumbnails for images to speed up performance"},minimalThemeFix:{name:"Minimal Theme Fix",description:"Apply fixes for the popular theme Minimal"},inlineStickerMenu:{name:"Inline Stickers",desc:"Add inline stickers by typing :"},openSpacesOnLaunch:{name:"Open Spaces as Default Tab",desc:"Open the Spaces tab when Obsidian launches"},defaultSpaceTemplate:{name:"Default Space Template",desc:"Select the default template for new spaces"},defaultDateFormat:{name:"Default Date Format",desc:"Set the default date format, example: yyyy-MM-dd (see https://date-fns.org/v2.30.0/docs/format)"},newNotePlaceholder:{name:"New Note Placeholder",desc:"Default name for new notes"},folderIndentationLines:{name:"Show Folder Indentation Lines",desc:"Turn on to show a line on the left of folders to indicate indentation"},folderNoteLocation:{name:"Folder Note Location Inside Folder",desc:"Turn on to have folder notes inside the folder, turn off to have it outside"},folderViewDefault:{name:"Show Folder Note by Default",desc:"Show the folder note by default when opening a folder"},internalLinkFlowEditor:{name:"Show Toggles to Open Flow Editor on Links",desc:"Turn on to toggle Flow Blocks directly in inline links"},internalLinkSticker:{name:"Show Stickers on Links",desc:"Turn on to toggle stickers shown directly by beside internal links"},syncContextToFrontmatter:{name:"Sync Context Fields to Frontmatter",desc:"Turn on to automatically save all context fields to frontmatter fields, not just existing frontmatter fields."},syncFormulaToFrontmatter:{name:"Sync Formula Fields to Frontmatter",desc:"Turn on to save calculated formula values to frontmatter fields."},inlineBacklinks:{name:"Show Inline Backlinks (Inline Context required)",desc:"Show editable backlinks at the bottom of your notes"},dataviewInlineContext:{name:"Show Dataview in Inline Context",desc:"Show dataview when inline context is enabled"},inlineContextExplorer:{name:"Inline Context",desc:"Display the context and a banner at the top of your notes"},inlineContextProperties:{name:"Inline Context Properties",desc:"Show the properties in the inline context"},inlineContextExpanded:{name:"Auto Expand Inline Context",desc:"Expand the inline context sections when opening a note"},inlineContextHorizontal:{name:"Inline Title and Sticker Layout",desc:"Layout for inline title and sticker in Inline Context"},hideFrontmatter:{name:"Hide Context Properties",desc:"Hide properties you have added in context from the Obsidian properties panel"},openFileContext:{name:"Auto Open Explorer",desc:"Automatically open explorer panel in the right panel"},folderNote:{name:"Enable Folder Note",desc:"Access the folder note in the folder page and hide the folder note from spaces"},folderNoteName:{name:"Folder Note Name",desc:"Name of the folder note, keep blank to use the same name as the folder"},expandFolder:{name:"Auto Expand Folder",desc:"Auto expand folders on click"},hoverPreview:{name:"Preview on Hover",desc:"Preview on Hover while holding Control/Command key"},activeFile:{name:"Reveal Active File",desc:"Automatically reveal the active file in Spaces"},contexts:{name:"Contexts",desc:"Contexts allows you to have full control over the metadata of your files"},spaces:{name:"Navigator",desc:"The navigator lets you create and organize your spaces"},spacesStickers:{name:"Stickers",desc:"Use Emojis to make it easier to find your notes"},spacesAlias:{name:"Alias",desc:"Use the alias metadata to show in Spaces"},spacesFileExplorerDual:{name:"Compatibility Mode",desc:"This will improve the compatibility of plugins while using Spaces"},spacesDeleteOption:{name:"Delete File Option",desc:"Select how you want files to be deleted"},spacesDeleteOptions:{permanant:"Delete Permanently",trash:"Move to Obsidian Trash","system-trash":"Move to System Trash"},flowState:{name:"Flow State",desc:"Toggle the flow state"},hideRibbon:{name:"App Ribbon",desc:"Show/hide the left menu aka. ribbon"},spaceView:{name:"Space View",desc:"Open the space view when you click on a space"},defaultSpaces:{name:"Default Spaces",desc:"Recommended spaces for quickly organizing your vault"},homeSpace:{name:"Home Space",desc:"An easy-to-access space where you can add/organize your other spaces"},tagSpaces:{name:"Tag Spaces",desc:"Automatically create spaces for each of your tags"},readableLineWidth:{name:"Readable Line Width",desc:"Use Readable Line Width"},sidebarTabs:{name:"Sidebar Tabs",desc:"Show/hide other sidebar tabs"},spacesPerformance:{name:"Performance Mode",desc:"Turn on performance mode for Spaces, may affect scrolling appearance. Requires Restart"},indexSVG:{name:"Use SVGs as Stickers",desc:"Use any svg file in your vault as a sticker"},inlineStyler:{name:"Flow Styler",desc:"Select text to add styling"},inlineStylerColor:{name:"Text and Highlight Colors \u{1F9EA}",desc:"Select text color and highlight color, (this may change in the future because of the limitations with HTML and Obsidian)"},spaceRowHeight:{name:"Row Height",desc:"The height for each row in spaces (in pixels), default is 29"},contextPagination:{name:"Table View Pagination",desc:"Number of items per page in table view"},coverHeight:{name:"Cover Height",desc:"The height for the cover of the note or space, default is 200"},makeChar:{name:"Flow Menu Trigger",desc:"Character to open the Flow Menu"},mobileMakeBar:{name:"Flow Styler (Mobile)",desc:"Replaces the mobile toolbar"},editorMarkSans:{name:"Mark Sans \u{1F9EA}",desc:"Use the editor without Markdown."},editorMakerMode:{name:"Flow (Beta)",desc:"An integrated and intuitive editor experience"},editorMakePlacholder:{name:"Flow Menu Hint Text",desc:"Show a hint text on how to open the Flow Menu Shortcut"},blink:{name:"Blink",desc:"A faster way to search and edit your notes"},editorMakeMenu:{name:"Flow Menu",desc:"Open the Flow menu to quickly add content"},editorMakeMenuTrigger:{name:"Flow Menu Shortcut",desc:"Trigger key to use flow menu"},editorFlowReplace:{name:"Flow Block",desc:"Open your internal links or toggle your embeds in the flow block."},editorFlowStyle:{name:"Flow Block Style",desc:"Select a theme for your flow block",seamless:"Seamless",minimal:"Minimal"}}}};this.lang="en";let t=FK.default.locale();["en"].includes(t)&&(this.lang=t)}get texts(){return this.all.en}},z=new i$().texts;var _K=(e,t)=>t?e.spacesIndex.has(t):!1,Bc=(e,t)=>t.superstate.settings.spacesMDBInHidden?e=="/"?t.superstate.settings.spaceSubFolder+"/":e+t.superstate.settings.spaceSubFolder+"/":e;var _j=(e,t)=>t.spacesFolder+"/"+e;var It="File";function Sl(e){return Sl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sl(e)}function dn(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function pt(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function _t(e){pt(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Sl(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Co(e,t){pt(2,arguments);var r=_t(e),n=dn(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function su(e,t){pt(2,arguments);var r=_t(e),n=dn(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var i=r.getDate(),a=new Date(r.getTime());a.setMonth(r.getMonth()+n+1,0);var o=a.getDate();return i>=o?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}function a$(e,t){pt(2,arguments);var r=_t(e).getTime(),n=dn(t);return new Date(r+n)}var f3e={};function El(){return f3e}function xs(e,t){var r,n,i,a,o,s,l,u;pt(1,arguments);var c=El(),f=dn((r=(n=(i=(a=t?.weekStartsOn)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=_t(e),p=d.getDay(),h=(p=i.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function s$(e){pt(1,arguments);var t=o$(e),r=new Date(0);r.setFullYear(t,0,4),r.setHours(0,0,0,0);var n=Rc(r);return n}function Lh(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Zd(e){pt(1,arguments);var t=_t(e);return t.setHours(0,0,0,0),t}var d3e=864e5;function If(e,t){pt(2,arguments);var r=Zd(e),n=Zd(t),i=r.getTime()-Lh(r),a=n.getTime()-Lh(n);return Math.round((i-a)/d3e)}function Qb(e,t){pt(2,arguments);var r=dn(t),n=r*7;return Co(e,n)}function Pj(e,t){pt(2,arguments);var r=dn(t);return su(e,r*12)}function Ij(e){pt(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(Sl(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var r;return t.forEach(function(n){var i=_t(n);(r===void 0||ri||isNaN(i.getDate()))&&(r=i)}),r||new Date(NaN)}var p3e=365.2425,m3e=Math.pow(10,8)*24*60*60*1e3,l$=6e4,u$=36e5;var Htt=-m3e;var h3e=3600;var PK=h3e*24,Qtt=PK*7,A3e=PK*p3e,g3e=A3e/12,Ytt=g3e*3;function Ys(e,t){pt(2,arguments);var r=Zd(e),n=Zd(t);return r.getTime()===n.getTime()}function Zv(e){return pt(1,arguments),e instanceof Date||Sl(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function c$(e){if(pt(1,arguments),!Zv(e)&&typeof e!="number")return!1;var t=_t(e);return!isNaN(Number(t))}function Dg(e,t){pt(2,arguments);var r=_t(e),n=_t(t),i=r.getFullYear()-n.getFullYear(),a=r.getMonth()-n.getMonth();return i*12+a}var v3e=6048e5;function f$(e,t,r){pt(2,arguments);var n=xs(e,r),i=xs(t,r),a=n.getTime()-Lh(n),o=i.getTime()-Lh(i);return Math.round((a-o)/v3e)}function Yb(e){pt(1,arguments);var t=_t(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function ws(e){pt(1,arguments);var t=_t(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Rj(e){pt(1,arguments);var t=_t(e),r=new Date(0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function Xv(e,t){var r,n,i,a,o,s,l,u;pt(1,arguments);var c=El(),f=dn((r=(n=(i=(a=t?.weekStartsOn)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=_t(e),p=d.getDay(),h=(p=i.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function m$(e){pt(1,arguments);var t=kE(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=jg(r);return n}var b3e=6048e5;function h$(e){pt(1,arguments);var t=_t(e),r=jg(t).getTime()-m$(t).getTime();return Math.round(r/b3e)+1}function Og(e,t){var r,n,i,a,o,s,l,u;pt(1,arguments);var c=El(),f=dn((r=(n=(i=(a=t?.weekStartsOn)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=_t(e),p=d.getUTCDay(),h=(p=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(f+1,0,p),h.setUTCHours(0,0,0,0);var m=Og(h,t),g=new Date(0);g.setUTCFullYear(f,0,p),g.setUTCHours(0,0,0,0);var A=Og(g,t);return c.getTime()>=m.getTime()?f+1:c.getTime()>=A.getTime()?f:f-1}function A$(e,t){var r,n,i,a,o,s,l,u;pt(1,arguments);var c=El(),f=dn((r=(n=(i=(a=t?.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=CE(e,t),p=new Date(0);p.setUTCFullYear(d,0,f),p.setUTCHours(0,0,0,0);var h=Og(p,t);return h}var x3e=6048e5;function g$(e,t){pt(1,arguments);var r=_t(e),n=Og(r,t).getTime()-A$(r,t).getTime();return Math.round(n/x3e)+1}function ni(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length0?n:1-n;return ni(r==="yy"?i%100:i,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):ni(n+1,2)},d:function(t,r){return ni(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return ni(t.getUTCHours()%12||12,r.length)},H:function(t,r){return ni(t.getUTCHours(),r.length)},m:function(t,r){return ni(t.getUTCMinutes(),r.length)},s:function(t,r){return ni(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,i=t.getUTCMilliseconds(),a=Math.floor(i*Math.pow(10,n-3));return ni(a,r.length)}},zh=w3e;var Zb={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},S3e={G:function(t,r,n){var i=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var i=t.getUTCFullYear(),a=i>0?i:1-i;return n.ordinalNumber(a,{unit:"year"})}return zh.y(t,r)},Y:function(t,r,n,i){var a=CE(t,i),o=a>0?a:1-a;if(r==="YY"){var s=o%100;return ni(s,2)}return r==="Yo"?n.ordinalNumber(o,{unit:"year"}):ni(o,r.length)},R:function(t,r){var n=kE(t);return ni(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return ni(n,r.length)},Q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(i);case"QQ":return ni(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(i);case"qq":return ni(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,r,n){var i=t.getUTCMonth();switch(r){case"M":case"MM":return zh.M(t,r);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,r,n){var i=t.getUTCMonth();switch(r){case"L":return String(i+1);case"LL":return ni(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,r,n,i){var a=g$(t,i);return r==="wo"?n.ordinalNumber(a,{unit:"week"}):ni(a,r.length)},I:function(t,r,n){var i=h$(t);return r==="Io"?n.ordinalNumber(i,{unit:"week"}):ni(i,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):zh.d(t,r)},D:function(t,r,n){var i=p$(t);return r==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):ni(i,r.length)},E:function(t,r,n){var i=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,r,n,i){var a=t.getUTCDay(),o=(a-i.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return ni(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,r,n,i){var a=t.getUTCDay(),o=(a-i.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return ni(o,r.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,r,n){var i=t.getUTCDay(),a=i===0?7:i;switch(r){case"i":return String(a);case"ii":return ni(a,r.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,r,n){var i=t.getUTCHours(),a=i/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,r,n){var i=t.getUTCHours(),a;switch(i===12?a=Zb.noon:i===0?a=Zb.midnight:a=i/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,r,n){var i=t.getUTCHours(),a;switch(i>=17?a=Zb.evening:i>=12?a=Zb.afternoon:i>=4?a=Zb.morning:a=Zb.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return zh.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):zh.H(t,r)},K:function(t,r,n){var i=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(i,{unit:"hour"}):ni(i,r.length)},k:function(t,r,n){var i=t.getUTCHours();return i===0&&(i=24),r==="ko"?n.ordinalNumber(i,{unit:"hour"}):ni(i,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):zh.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):zh.s(t,r)},S:function(t,r){return zh.S(t,r)},X:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return BK(o);case"XXXX":case"XX":return Kv(o);case"XXXXX":case"XXX":default:return Kv(o,":")}},x:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"x":return BK(o);case"xxxx":case"xx":return Kv(o);case"xxxxx":case"xxx":default:return Kv(o,":")}},O:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+IK(o,":");case"OOOO":default:return"GMT"+Kv(o,":")}},z:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+IK(o,":");case"zzzz":default:return"GMT"+Kv(o,":")}},t:function(t,r,n,i){var a=i._originalDate||t,o=Math.floor(a.getTime()/1e3);return ni(o,r.length)},T:function(t,r,n,i){var a=i._originalDate||t,o=a.getTime();return ni(o,r.length)}};function IK(e,t){var r=e>0?"-":"+",n=Math.abs(e),i=Math.floor(n/60),a=n%60;if(a===0)return r+String(i);var o=t||"";return r+String(i)+o+ni(a,2)}function BK(e,t){if(e%60===0){var r=e>0?"-":"+";return r+ni(Math.abs(e)/60,2)}return Kv(e,t)}function Kv(e,t){var r=t||"",n=e>0?"-":"+",i=Math.abs(e),a=ni(Math.floor(i/60),2),o=ni(i%60,2);return n+a+r+o}var RK=S3e;var $K=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},qK=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},E3e=function(t,r){var n=t.match(/(P+)(p+)?/)||[],i=n[1],a=n[2];if(!a)return $K(t,r);var o;switch(i){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",$K(i,r)).replace("{{time}}",qK(a,r))},k3e={p:qK,P:E3e},LK=k3e;var C3e=["D","DD"],D3e=["YY","YYYY"];function zK(e){return C3e.indexOf(e)!==-1}function UK(e){return D3e.indexOf(e)!==-1}function v$(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var j3e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},O3e=function(t,r,n){var i,a=j3e[t];return typeof a=="string"?i=a:r===1?i=a.one:i=a.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},WK=O3e;function DE(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var M3e={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},N3e={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},T3e={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},F3e={date:DE({formats:M3e,defaultWidth:"full"}),time:DE({formats:N3e,defaultWidth:"full"}),dateTime:DE({formats:T3e,defaultWidth:"full"})},VK=F3e;var _3e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},P3e=function(t,r,n,i){return _3e[t]},GK=P3e;function Jv(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):a;i=e.formattingValues[o]||e.formattingValues[a]}else{var s=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;i=e.values[l]||e.values[s]}var u=e.argumentCallback?e.argumentCallback(t):t;return i[u]}}var I3e={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},B3e={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},R3e={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},$3e={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},q3e={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},L3e={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},z3e=function(t,r){var n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},U3e={ordinalNumber:z3e,era:Jv({values:I3e,defaultWidth:"wide"}),quarter:Jv({values:B3e,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Jv({values:R3e,defaultWidth:"wide"}),day:Jv({values:$3e,defaultWidth:"wide"}),dayPeriod:Jv({values:q3e,defaultWidth:"wide",formattingValues:L3e,defaultFormattingWidth:"wide"})},HK=U3e;function e1(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var o=a[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?V3e(s,function(f){return f.test(o)}):W3e(s,function(f){return f.test(o)}),u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;var c=t.slice(o.length);return{value:u,rest:c}}}function W3e(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function V3e(e,t){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var i=n[0],a=t.match(e.parsePattern);if(!a)return null;var o=e.valueCallback?e.valueCallback(a[0]):a[0];o=r.valueCallback?r.valueCallback(o):o;var s=t.slice(i.length);return{value:o,rest:s}}}var G3e=/^(\d+)(th|st|nd|rd)?/i,H3e=/\d+/i,Q3e={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Y3e={any:[/^b/i,/^(a|c)/i]},Z3e={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},X3e={any:[/1/i,/2/i,/3/i,/4/i]},K3e={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},J3e={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},e4e={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},t4e={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},r4e={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},n4e={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},i4e={ordinalNumber:y$({matchPattern:G3e,parsePattern:H3e,valueCallback:function(t){return parseInt(t,10)}}),era:e1({matchPatterns:Q3e,defaultMatchWidth:"wide",parsePatterns:Y3e,defaultParseWidth:"any"}),quarter:e1({matchPatterns:Z3e,defaultMatchWidth:"wide",parsePatterns:X3e,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:e1({matchPatterns:K3e,defaultMatchWidth:"wide",parsePatterns:J3e,defaultParseWidth:"any"}),day:e1({matchPatterns:e4e,defaultMatchWidth:"wide",parsePatterns:t4e,defaultParseWidth:"any"}),dayPeriod:e1({matchPatterns:r4e,defaultMatchWidth:"any",parsePatterns:n4e,defaultParseWidth:"any"})},QK=i4e;var a4e={code:"en-US",formatDistance:WK,formatLong:VK,formatRelative:GK,localize:HK,match:QK,options:{weekStartsOn:0,firstWeekContainsDate:1}},jE=a4e;var YK=jE;var o4e=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,s4e=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,l4e=/^'([^]*?)'?$/,u4e=/''/g,c4e=/[a-zA-Z]/;function Pa(e,t,r){var n,i,a,o,s,l,u,c,f,d,p,h,m,g,A,b,v,x;pt(2,arguments);var w=String(t),S=El(),k=(n=(i=r?.locale)!==null&&i!==void 0?i:S.locale)!==null&&n!==void 0?n:YK,M=dn((a=(o=(s=(l=r?.firstWeekContainsDate)!==null&&l!==void 0?l:r==null||(u=r.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&s!==void 0?s:S.firstWeekContainsDate)!==null&&o!==void 0?o:(f=S.locale)===null||f===void 0||(d=f.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(M>=1&&M<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var O=dn((p=(h=(m=(g=r?.weekStartsOn)!==null&&g!==void 0?g:r==null||(A=r.locale)===null||A===void 0||(b=A.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&m!==void 0?m:S.weekStartsOn)!==null&&h!==void 0?h:(v=S.locale)===null||v===void 0||(x=v.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&p!==void 0?p:0);if(!(O>=0&&O<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw new RangeError("locale must contain localize property");if(!k.formatLong)throw new RangeError("locale must contain formatLong property");var C=_t(e);if(!c$(C))throw new RangeError("Invalid time value");var T=Lh(C),D=d$(C,T),P={firstWeekContainsDate:M,weekStartsOn:O,locale:k,_originalDate:C},R=w.match(s4e).map(function(q){var B=q[0];if(B==="p"||B==="P"){var N=LK[B];return N(q,k.formatLong)}return q}).join("").match(o4e).map(function(q){if(q==="''")return"'";var B=q[0];if(B==="'")return f4e(q);var N=RK[B];if(N)return!(r!=null&&r.useAdditionalWeekYearTokens)&&UK(q)&&v$(q,t,String(e)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&zK(q)&&v$(q,t,String(e)),N(D,q,k.localize,P);if(B.match(c4e))throw new RangeError("Format string contains an unescaped latin alphabet character `"+B+"`");return q}).join("");return R}function f4e(e){var t=e.match(l4e);return t?t[1].replace(u4e,"'"):e}function b$(e){pt(1,arguments);var t=_t(e),r=t.getFullYear(),n=t.getMonth(),i=new Date(0);return i.setFullYear(r,n+1,0),i.setHours(0,0,0,0),i.getDate()}var d4e=6048e5;function $j(e){pt(1,arguments);var t=_t(e),r=Rc(t).getTime()-s$(t).getTime();return Math.round(r/d4e)+1}function x$(e){pt(1,arguments);var t=_t(e),r=t.getTime();return r}function qj(e){return pt(1,arguments),Math.floor(x$(e)/1e3)}function w$(e,t){var r,n,i,a,o,s,l,u;pt(1,arguments);var c=_t(e),f=c.getFullYear(),d=El(),p=dn((r=(n=(i=(a=t?.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:d.firstWeekContainsDate)!==null&&n!==void 0?n:(l=d.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setFullYear(f+1,0,p),h.setHours(0,0,0,0);var m=xs(h,t),g=new Date(0);g.setFullYear(f,0,p),g.setHours(0,0,0,0);var A=xs(g,t);return c.getTime()>=m.getTime()?f+1:c.getTime()>=A.getTime()?f:f-1}function S$(e,t){var r,n,i,a,o,s,l,u;pt(1,arguments);var c=El(),f=dn((r=(n=(i=(a=t?.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=w$(e,t),p=new Date(0);p.setFullYear(d,0,f),p.setHours(0,0,0,0);var h=xs(p,t);return h}var p4e=6048e5;function Lj(e,t){pt(1,arguments);var r=_t(e),n=xs(r,t).getTime()-S$(r,t).getTime();return Math.round(n/p4e)+1}function E$(e){pt(1,arguments);var t=_t(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(0,0,0,0),t}function zj(e,t){return pt(1,arguments),f$(E$(e),ws(e),t)+1}function Xb(e,t){pt(2,arguments);var r=_t(e),n=_t(t);return r.getTime()>n.getTime()}function OE(e,t){pt(2,arguments);var r=_t(e),n=_t(t);return r.getTime()2)return t;if(/:/.test(r[0])?n=r[0]:(t.date=r[0],n=r[1],Wj.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Wj.timeZoneDelimiter)[0],n=e.substr(t.date.length,e.length))),n){var i=Wj.timezone.exec(n);i?(t.time=n.replace(i[1],""),t.timezone=i[1]):t.time=n}return t}function v4e(e,t){var r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:NaN,restDateString:""};var i=n[1]?parseInt(n[1]):null,a=n[2]?parseInt(n[2]):null;return{year:a===null?i:a*100,restDateString:e.slice((n[1]||n[2]).length)}}function y4e(e,t){if(t===null)return new Date(NaN);var r=e.match(m4e);if(!r)return new Date(NaN);var n=!!r[4],i=NE(r[1]),a=NE(r[2])-1,o=NE(r[3]),s=NE(r[4]),l=NE(r[5])-1;if(n)return C4e(t,s,l)?w4e(t,s,l):new Date(NaN);var u=new Date(0);return!E4e(t,a,o)||!k4e(t,i)?new Date(NaN):(u.setUTCFullYear(t,a,Math.max(i,o)),u)}function NE(e){return e?parseInt(e):1}function b4e(e){var t=e.match(h4e);if(!t)return NaN;var r=D$(t[1]),n=D$(t[2]),i=D$(t[3]);return D4e(r,n,i)?r*u$+n*l$+i*1e3:NaN}function D$(e){return e&&parseFloat(e.replace(",","."))||0}function x4e(e){if(e==="Z")return 0;var t=e.match(A4e);if(!t)return 0;var r=t[1]==="+"?-1:1,n=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return j4e(n,i)?r*(n*u$+i*l$):NaN}function w4e(e,t,r){var n=new Date(0);n.setUTCFullYear(e,0,4);var i=n.getUTCDay()||7,a=(t-1)*7+r+1-i;return n.setUTCDate(n.getUTCDate()+a),n}var S4e=[31,null,31,30,31,30,31,31,30,31,30,31];function ZK(e){return e%400===0||e%4===0&&e%100!==0}function E4e(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(S4e[t]||(ZK(e)?29:28))}function k4e(e,t){return t>=1&&t<=(ZK(e)?366:365)}function C4e(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function D4e(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function j4e(e,t){return t>=0&&t<=59}function ex(e,t){pt(2,arguments);var r=_t(e),n=dn(t),i=r.getFullYear(),a=r.getDate(),o=new Date(0);o.setFullYear(i,n,15),o.setHours(0,0,0,0);var s=b$(o);return r.setMonth(n,Math.min(a,s)),r}function TE(e,t){pt(2,arguments);var r=_t(e),n=dn(t);return isNaN(r.getTime())?new Date(NaN):(r.setFullYear(n),r)}var tx=(e,t,r)=>!t||t<=0?[r,...e]:[...e.slice(0,t),r,...e.slice(t)],rx=(e,t,r)=>!t||t<=0?[...r,...e]:[...e.slice(0,t),...r,...e.slice(t)],Mr=e=>[...new Set(e)],Gj=e=>[...new Map(e.map(t=>[t.toLowerCase(),t])).values()],Mi=(e,t)=>{let r=e;if(t.includes(r)){let n=1;for(;t.includes(r);)r=e+n.toString(),n+=1}return r},XK=e=>(t,r,n)=>n.findIndex(i=>t[e]==i[e])===r;var KK=(e,t,r)=>e.sort(function(n,i){let a=t.indexOf(n[r]),o=t.indexOf(i[r]);return a>o?a!=-1&&o==-1?-1:1:o!=-1&&a==-1?1:-1});var Uh=(e,t)=>{if(e instanceof Date)return"date";if(typeof e=="string"){if(/\/\/(\S+?(?:jpe?g|png|gif|svg))/gi.test(e)||e.includes("unsplash"))return"image";if(/^\d{4}-\d{2}-\d{2}$/.test(e))return"date";if(t=="tag"||t=="tags")return"tags-multi";if(/\[\[.*?\]\]/.test(e))return"link"}else{if(typeof e=="number")return"number";if(typeof e=="boolean")return"boolean";if(e)if(Array.isArray(e)||typeof e=="string"&&e.indexOf(",")>-1){let r=Array.isArray(e)?e:[];if(typeof e=="string"&&e.indexOf(",")>-1&&(r=mr(e)),t=="tag"||t=="tags")return"tags-multi";if(r.length==1&&Array.isArray(r[0])&&r[0].length==1&&typeof r[0][0]=="string")return"link";let n=Mr(r.map(i=>Uh(i,t)));return n.length==1&&n[0]=="link"?"link-multi":n.some(i=>i=="object")?"object-multi":"option-multi"}else return e.isLuxonDateTime?"date":e.isLuxonDuration?"duration":e.type=="file"?"link":typeof e=="object"&&!Array.isArray(e)&&e!==null?"object":"unknown";else return"unknown"}return"text"},nx=e=>{if(e=="date")return Pa(Date.now(),"yyyy-MM-dd");if(e=="number")return 0;if(e=="boolean")return!0;if(e=="link")return"[[Select Note]]";if(e=="option")return"one, two";if(e=="text")return" ";if(e=="image")return"https://images.unsplash.com/photo-1675789652575-0a5d2425b6c2?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2070&q=80"};var j$=(e,t)=>t?t=="number"?parseFloat(e):t=="boolean"?e=="true":t.includes("-multi")?mr(e).map(r=>Sa(t.replace("-multi",""),r,!1)):e:e,Sa=(e,t,r)=>e?e=="object"||e=="object-multi"?JSON.parse(t):e=="number"?parseFloat(t):e=="boolean"?t=="true":e.includes("-multi")?mr(t).map(n=>Sa(e.replace("-multi",""),n,r)):(e.includes("link")||e.includes("context"))&&r?`[[${t}]]`:t:t,O$=e=>{switch(e){case"duration":return"text";case"unknown":return"text"}return e},ix=e=>e.type=="object"||e.type=="object-multi"||e.type=="super";var Lo=e=>e.map(t=>t.replace(",","\\,")).join(", "),Ni=e=>JSON.stringify(e),M$=e=>e.join(", "),JK=e=>e.join("; "),eJ=e=>e.join(",");var mr=e=>e?.startsWith("[")?Zs(dr(e)):ox(e),ox=e=>(e?.replace("\\,",",")?.match(/(\\.|[^,])+/g)??[]).map(t=>t.trim()),Ki=(e,t,r)=>{let n=r??Uh(t,e);if(!t)return"";switch(n){case"tags-multi":return t;case"object":case"object-multi":return JSON.stringify(t);case"number":return t.toString();case"boolean":return t?"true":"false";case"date":{if(t instanceof Date){let i=Pa(t,"yyyy-MM-dd");return typeof i=="string"?i:""}return typeof t!="string"?"":t}break;case"duration":return Lo(Object.keys(t.values).reduce((i,a)=>[...i,...t.values[a]>0?[t.values[a]+" "+a]:[]],[]));case"option-multi":case"link-multi":case"context-multi":return typeof t=="string"?ax(t):Ni(t.map(i=>i?typeof i=="string"?ax(i):i.path?i.path:Array.isArray(t)&&i.length==1&&Array.isArray(i[0])&&i[0].length==1&&typeof i[0][0]=="string"?i[0][0]:JSON.stringify(i):""));case"link":case"context":return Array.isArray(t)&&t.length==1&&Array.isArray(t[0])&&t[0].length==1&&typeof t[0][0]=="string"?t[0][0]:typeof t=="string"?ax(t):t.path;case"text":case"tag":case"option":case"image":return t}return""},lm=(e,t)=>t?Zs(dr(e)):dr(e)??{},dr=e=>{let t;try{t=JSON.parse(e)}catch{}return t};var ax=e=>{if(!e)return"";let t=/\[\[(.*?)\]\]/g.exec(e),r=t?.length>1?t[1].substring(0,tJ("|",t[1])):e;return r||e};var Hj=(e,t)=>!e||e.length==0?t:e;function Zs(e){return Array.isArray(e)?e:typeof e=="string"?[e]:[]}function rJ(e,t,r){let n=lu(e);return t.some(i=>i==n)?n:r}function lu(e){return e?typeof e!="string"?e.toString():e:""}function Qj(e){return!!e}var tJ=(e,t)=>t.indexOf(e)>0?t.indexOf(e):t.length,nJ=(e,t)=>t.spacesIndex.get(e)?.name??e,iJ=e=>"spaces://"+FE(e),FE=e=>e?.replace(/\//g,"+"),$c=e=>"spaces://"+e;var aJ=e=>e?`(${e})`:null,fr=e=>e?`"${e.replace(/"/g,'\\"').replace(/\n/g,"\\n")}"`:null,N$=e=>{if(!e)return e;if(e.startsWith("(")){if(e.endsWith(")"))return e.substring(1,e.length-1);if(e.endsWith(");"))return e.substring(1,e.length-2)}return e},ca=e=>{if(!e)return e;if(typeof e=="number")return e.toString();let t=e.startsWith("'")&&(e.endsWith("';")||e.endsWith("'")),r=e.startsWith('"')&&(e.endsWith('";')||e.endsWith('"'));return t||r?(e=e.substring(1,e.length-1),(e.endsWith('"')||e.endsWith("'"))&&(e=e.substring(0,e.length-1)),e.replace(/\\"/g,'"')):e.replace(/\\"/g,'"')},Wh=(e,t)=>!e||e.length==0?t:e,Yj=e=>e.charAt(0)=="/"?e.substring(1):e,oJ=e=>Yj(e.substring(0,e.lastIndexOf("/")))||e;var qc=e=>e=="/"?e:e.slice(-1)=="/"?e.substring(0,e.length-1):e,t1=(e,t)=>{if(!e)return"";let r=t.spaceManager.uriByString(e);if(r.refType){if(r.refType=="context"){let n=t.contextsIndex.get(r.basePath)?.schemas.find(a=>a.id==r.ref),i=t.spacesIndex.get(r.basePath);return n&&i?`${i.name} / ${n.name}`:""}return r.refType=="action"?t.actionsIndex.get(r.basePath)?.find(n=>n.schema.id==r.ref)?.schema.name:r.ref}return t.pathsIndex.get(r.basePath)?.name||e},Mg=e=>Yj(e.substring(e.lastIndexOf("/")))||e,sJ=e=>{let t=[],r=e.split("/"),n="";for(let i=0;ie.lastIndexOf("/")!=-1?e.lastIndexOf(".")!=-1?Yj(e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("."))):e.substring(e.lastIndexOf("/")+1):e.lastIndexOf(".")!=-1?e.substring(0,e.lastIndexOf(".")):e,sx=e=>e.substring(0,e.lastIndexOf("."))||e,uu=e=>{let t=e.lastIndexOf("/");return t==-1?"/":e.substring(0,t+1)};var Bf=e=>{let t=e,r="",n=A=>{let b={};return A.split("&").forEach(v=>{let[x,w]=v.split("=");b[decodeURIComponent(x)]=decodeURIComponent(w)}),b},i=(A,b)=>b?A==="^"?"context":A==="*"?"frame":A===";"?"action":"unknown":A==="^"?"block":"heading",a=null,o=null,s=null,l=null,u=null,c=null,f="vault";if(t.indexOf("://")!=-1){f=e.slice(0,e.indexOf("://"));let A=e.slice(e.indexOf("://")+3);if(A.charAt(0)=="#"||A.charAt(0)=="$"){let b=A.split("/")[0].lastIndexOf("#");b>0?(a=qc(A.slice(0,b)),e=A.slice(b)):(a=A.split("/")[0],e=A.replace(a,""),e.length>0&&(e=e.slice(1)),e==""&&(e="/"))}else{let b=A.split("/");a=b[0],e=b.slice(1).join("/")||""}}let d=e.lastIndexOf("/"),p=e.lastIndexOf("#"),h=e.lastIndexOf("|"),m=e.lastIndexOf("?"),g=!1;if(m!==-1&&(c=n(e.slice(m+1)),e=e.slice(0,m)),p!==-1&&p>d){p==d+1&&(g=!0);let A=e.slice(p+1);u=i(A[0],g),(u||p!=d+1)&&(r=A[0],l=u?A.slice(1):A,e=e.slice(0,p))}return h!==-1&&h>d&&(s=e.slice(h+1),e=e.slice(0,h)),e.charAt(e.length-1)=="/"&&(g=!0),o=e,{basePath:qc(`${a?`${f}://${a}/${o!="/"?o:""}`:o}`),authority:a,fullPath:t,scheme:f,path:qc(e),alias:s,ref:l,refType:u,refStr:u?r+l:l,query:c,trailSlash:g}},Rf=(e,t)=>{let r=e.split("/");return t+"/"+r[r.length-1]},lJ=(e,t)=>{let r=e.substring(0,e.lastIndexOf("/"));return r.length>0?`${r}/${t}`:`${t}`},uJ=(e,t)=>{let r=e.substring(0,e.lastIndexOf("/")),n=e.lastIndexOf(".")!=-1?e.substring(e.lastIndexOf(".")):"";return r.length>0?`${r}/${t}${n}`:`${t}${n}`};var lx=async(e,t,r)=>{if(e.spacesIndex.has(t)){let n=e.spacesIndex.get(t);return n.type=="tag"?T$(e,n.name,r):e.spaceManager.renameSpace(t,lJ(t,r))}else return e.spaceManager.renamePath(t,uJ(t,r))},Zj=async(e,t)=>{e.settings.hiddenFiles=Mr([...e.settings.hiddenFiles,t]),e.ui.notify("Item is now hidden in the Navigator, you can manage hidden items in the Navigator menu."),e.saveSettings(),e.reloadPath(t,!0).then(r=>e.dispatchEvent("superstateUpdated",null))},cJ=async(e,t)=>{e.settings.hiddenFiles=Mr([...e.settings.hiddenFiles,...t]),e.saveSettings(),Promise.all(t.map(r=>{e.reloadPath(r,!0)})).then(r=>e.dispatchEvent("superstateUpdated",null))},Vh=async(e,t)=>{e.spaceManager.deletePath(t),e.onPathDeleted(t)},fJ=async(e,t,r)=>e.spaceManager.renamePath(t,Rf(t,r)),Xj=async(e,t,r)=>{let n=e.pathsIndex.get(t);if(!n)return;let i=n.parent+"/"+n.name;await e.spaceManager.createSpace(n.name,n.parent,{}),await e.spaceManager.renamePath(t,i+"/"+n.metadata?.file?.name+".md"),r&&e.ui.openPath(i,!1)};var yJ=ge(pi());var F$=(e,t)=>{let r=n=>n=="builtin"?"Builtin":n=="api"?"Spaces":"Action";return[...(e.actionsIndex.get(t)??[]).map(n=>({name:n.schema.name,description:"Action",value:`${t}/#;${n.schema.id}`,section:"Action"}))??[],...[...e.cli.allCommands()].map(n=>({name:n.schema.name,description:r(n.schema.type),value:n.path,section:r(n.schema.type)}))]};var dJ=({field:e,value:t})=>t=="ctime"?{value:"parseDate(prop('File')['metadata']['ctime'])",type:"date"}:{value:"",type:"string"},Lr=(e,t,r,n)=>{let i=dr(e);if(i)return t=="fileprop"&&i.field?dJ(i):(t=="option"&&i.source?.length>0&&(i.source=="$commands"?i.options=r.cli.allCommands():i.source=="$links"?i.options=r.spaceManager.allPaths().map(a=>({name:a,value:a})):i.source=="$super"?i.options=F$(r,n):i.source=="$properties"&&(i.options=r.contextsIndex.get(n)?.contextTable?.cols?.map(a=>({name:a.name,value:a.name}))??[])),[...Gu(t).configKeys??[],"alias","default"].reduce((a,o)=>({...a,[o]:i[o]}),{}));if(!t)return{};if(!i)if(t=="context")e?.length>0?i={space:e}:i={};else if(t.startsWith("date"))e?.length>0?i={format:e}:i={};else if(t.startsWith("fileprop"))if(e?.length>0){let[a,o]=e.split(".");i=dJ({field:a,value:o})}else i={};else t.startsWith("option")&&(e?.length>0?i={options:mr(e).map(o=>({name:o,value:o}))}:i={});return i??{}};var Hu=e=>e?e.type=="fileprop"?Lr(e.value,"fileprop")?.type??"text":e.type:null,Li=e=>e.attrs?.length>0?dr(e.attrs)?.icon??Gu(e.type,e.name)?.icon:Gu(e.type,e.name)?.icon,cx=e=>e.def?.icon?.length>0?e.def?.icon:"ui//layout-list",pJ=e=>dr(e?.def)?.icon??"ui//layout-list",Gu=(e,t)=>t==It?Xs.find(r=>r.type=="file"):t=="tags"?Xs.find(r=>r.type=="tags-multi"):t=="aliases"?Xs.find(r=>r.type=="option-multi"):t=="sticker"?Xs.find(r=>e=="icon"):Xs.find(r=>e==r.type)||Xs.find(r=>e==r.multiType),Xs=[{type:"unknown",label:"",restricted:!0,icon:"ui//file-question"},{type:"any",label:"",restricted:!0,icon:"ui//wildcard",multi:!0,multiType:"any-multi"},{type:"text",label:z.properties.text.label,metadata:!0,icon:"ui//text",primative:!0,description:z.properties.text.description},{type:"number",label:z.properties.number.label,metadata:!0,icon:"ui//binary",configKeys:["unit"],primative:!0,description:z.properties.number.description},{type:"boolean",label:z.properties.boolean.label,metadata:!0,icon:"ui//check-square",primative:!0,description:z.properties.boolean.description},{type:"date",label:z.properties.date.label,metadata:!0,icon:"ui//calendar",configKeys:["format"],primative:!0,description:z.properties.date.description},{type:"option",label:z.properties.option.label,multi:!0,multiType:"option-multi",icon:"ui//list",configKeys:["options","source"],description:z.properties.option.description},{type:"tags-multi",label:z.properties.tags.label,icon:"ui//tags",description:z.properties.tags.description},{type:"file",label:z.properties.file.label,restricted:!0,icon:"ui//mk-make-h3"},{type:"fileprop",label:z.properties.fileProperty.label,icon:"ui//formula",configKeys:["field","value","type"],description:z.properties.fileProperty.description},{type:"link",label:z.properties.link.label,multi:!0,multiType:"link-multi",metadata:!0,icon:"ui//file-text",primative:!0,description:z.properties.link.description},{type:"context",label:z.properties.context.label,icon:"ui//mk-make-note",multi:!0,multiType:"context-multi",configKeys:["space"],description:z.properties.context.description},{type:"object",label:z.properties.object.label,multi:!0,multiType:"object-multi",metadata:!0,icon:"ui//list-tree",configKeys:["type","typeName"],description:z.properties.object.description},{type:"icon",label:z.properties.icon.label,multi:!0,multiType:"icon-multi",icon:"ui//gem",restricted:!0,primative:!0,description:z.properties.icon.description},{type:"image",label:z.properties.image.label,multi:!0,multiType:"image-multi",metadata:!0,icon:"ui//mk-make-image",primative:!0,description:z.properties.image.description},{type:"color",label:z.properties.color.label,icon:"ui//mk-make-image",restricted:!0,description:z.properties.color.description},{type:"space",label:z.properties.space.label,icon:"ui//layout-grid",restricted:!0,description:z.properties.space.description},{type:"table",label:z.properties.space.label,icon:"ui//layout-grid",restricted:!0,description:z.properties.space.description},{type:"super",label:z.properties.super.label,icon:"ui//zap",restricted:!0,configKeys:["dynamic","field"]},{type:"input",label:z.properties.super.label,icon:"ui//input",restricted:!0}];var Nr="files",um={id:Nr,name:"Items",type:"db",primary:"true"},Ng="filesView",Kd={id:Ng,name:"All",type:"view",def:JSON.stringify({db:Nr,icon:"ui//file-stack"})},r1="main",Kj=e=>({id:e,name:e,type:"frame",def:"",predicate:"",primary:"true"}),mJ={uniques:[],cols:["id","name","type","def","predicate","primary"],rows:[Kj(r1),Kd]},Gh={uniques:[],cols:["id","name","type","def","predicate","primary"],rows:[um]},Ji={uniques:["name,schemaId"],cols:["name","schemaId","type","value","attrs","hidden","unique","primary"]},Xd={...Ji,rows:[{name:It,schemaId:Nr,type:"file",primary:"true",hidden:"",unique:"",attrs:"",value:""},{name:z.properties.fileProperty.createdTime,schemaId:Nr,type:"fileprop",value:It+".ctime",hidden:"",unique:"",attrs:"",primary:"true"}]},P$=e=>Xd,fx=[{name:z.properties.defaultField,schemaId:"",type:"text",primary:"true"}],_$={...Ji,rows:[{name:It,schemaId:Nr,type:"file",primary:"true",hidden:"",unique:"",attrs:"",value:""}]},hJ=e=>O4e,O4e={schema:um,cols:Xd.rows,rows:[]},Got={schema:um,cols:Xd.rows,rows:[]},Hot={schema:um,cols:_$.rows,rows:[]},AJ=(e,t)=>e.filter(r=>t.find(n=>n.id==r.schemaId&&n.type=="db")).reduce((r,n)=>({...r,...r[n.schemaId]?{[n.schemaId]:{uniques:n.unique=="true"?[...r[n.schemaId].uniques,n.name]:r[n.schemaId].uniques,cols:[...r[n.schemaId].cols,n.name],rows:[]}}:{[n.schemaId]:{uniques:n.unique=="true"?[n.name]:[],cols:[n.name],rows:[]}}}),{}),gJ=e=>M4e,M4e={m_schema:Gh,m_fields:Xd,...AJ(Xd.rows,Gh.rows)},Qot={m_schema:Gh,m_fields:_$,...AJ(_$.rows,Gh.rows)};var dx=ge(pi()),vJ=e=>e instanceof Date&&!isNaN(e),Qu=(e,t,r)=>{let n;try{n=Pa(t,r?.length>0?r:e.settings.defaultDateFormat)}catch{n=""}return n},PE=e=>e?(0,dx.isFinite)(e)?new Date(e):(0,dx.isString)(e)?Vj(e):(0,dx.isDate)(e)?e:null:null;var bJ=(e,t)=>Mr(t?.rows.reduce((r,n)=>(0,yJ.isString)(n[e])?[...r,...mr(n[e])]:[...r],[])??[]),px=(e,t)=>{let r=[...e.getSpaceItems(t.path,!0)];return{...hJ(t),rows:r.map(n=>({[It]:n.path,Created:Qu(e,n.metadata?.ctime,"yyyy-MM-dd")}))}},xJ=(e,t,r)=>r?{...e,rows:tx(e.rows,r,t)}:{...e,rows:[...e.rows,t]},wJ=async(e,t,r)=>{let n=_j(t,e.settings);await e.spaceManager.pathExists(n)?e.spaceManager.renamePath(n,oJ(n)+"/"+r):Vh(e,n),e.onTagRenamed(t,r)};var T$=async(e,t,r)=>{let n=N4e(e,t),i=Tg(I$(r)),a=e.spaceManager.pathsForTag(t);for(let o of a)e.spaceManager.renameTag(o,t,i);await wJ(e,t,i);for(let o of n)await T$(e,o,o.replace(t,i));return i},SJ=e=>{e.startsWith("#")&&(e=e.slice(1));let t=e.split("/"),r=[];for(let n=0;ne.trim(),N4e=(e,t)=>e.spaceManager.readTags().filter(n=>n.startsWith(t)&&n!=t),EJ=e=>FE(Tg(e)),Jj=e=>Lc(e).replace(/\+/g,"/"),Tg=e=>{if(!e)return null;let t=e;return t.charAt(0)!="#"&&(t="#"+t),t},Ks=e=>e.charAt(0)=="#"?e.charAt(1)=="#"?e.substring(2,e.length):e.substring(1,e.length):e;var n1=(e,t,r)=>{let n=$c(t),i=e.superstate.settings.spacesFolder+"/"+EJ(t);return{name:t,path:n,isRemote:!1,readOnly:r,folderPath:i,defPath:`${i}/${e.superstate.settings.spaceSubFolder}/def.json`,notePath:`${i}/${FE(t)}.md`,framePath:Bc(i+"/",e)+"views.mdb",dbPath:Bc(i+"/",e)+"context.mdb",commandsPath:Bc(i+"/",e)+"commands.mdb"}},kJ=(e,t)=>{if(!t)return;if(t.startsWith(Fg)){let i=t.slice(Fg.length),a=e.superstate.settings.spacesFolder+"/$"+i;return{name:cm[i].name,path:t,isRemote:!1,readOnly:!1,folderPath:a,defPath:`${a}/${e.superstate.settings.spaceSubFolder}/def.json`,notePath:`${a}/${cm[i].name}.md`,framePath:Bc(a+"/",e)+"views.mdb",dbPath:Bc(a+"/",e)+"context.mdb",commandsPath:Bc(a+"/",e)+"commands.mdb"}}let r=e.uriByString(t);if(!r)return null;let n=e.spaceTypeByString(r);return n=="folder"?IE(e,qc(r.path)):n=="tag"?n1(e,r.authority):n=="vault"?IE(e,"/"):null},IE=(e,t,r)=>{if(t=="/"){let a="Vault";return{name:a,path:t,isRemote:!1,readOnly:r,folderPath:t,defPath:`${e.superstate.settings.spaceSubFolder}/def.json`,notePath:a+".md",dbPath:Bc(t,e)+"context.mdb",framePath:Bc(t,e)+"views.mdb",commandsPath:Bc(t,e)+"commands.mdb"}}let n=Mg(t),i=e.superstate.settings.folderNoteName;return{name:n,path:t,isRemote:!1,readOnly:r,folderPath:t,defPath:t+`/${e.superstate.settings.spaceSubFolder}/def.json`,notePath:t+"/"+(i.length>0?i:n)+".md",dbPath:Bc(t+"/",e)+"context.mdb",framePath:Bc(t+"/",e)+"views.mdb",commandsPath:Bc(t+"/",e)+"commands.mdb"}};var _g=e=>[e.fmKeyBanner,e.fmKeySticker,e.fmKeyColor,e.fmKeyBanner,e.fmKeyBannerOffset,BE,qE,LE,zE,RE,$E],Fg="spaces://$",mx="spaces://$tags";var bst={name:z.menu.vault,readOnly:!1,path:"/",label:{thumbnail:"",name:z.menu.vault,sticker:"ui//vault",color:""},type:"default"},cm={tags:{name:"Tags",icon:"ui//tags",readOnly:!1,hidden:!1},overview:{name:"Overview",icon:"ui//overview",readOnly:!0,hidden:!0}},BE="_contexts",RE="_template",$E="_templateName",qE="_filters",LE="_links",zE="_sort",eO="_subfolders";var Hh=(e,t)=>JSON.stringify({...t,options:e.map(r=>({name:r.name,value:r.value,color:r.color}))});var UE=class{constructor(){this.spaceAdapters=[];this.readSystemCommands=()=>this.primarySpaceAdapter.readSystemCommands();this.saveSystemCommand=(t,r)=>this.primarySpaceAdapter.saveSystemCommand(t,r).then(n=>this.superstate.reloadSystemActions());this.onFocusesUpdated=()=>{this.readFocuses().then(t=>{this.superstate.focuses=t,this.superstate.dispatchEvent("focusesChanged",null)})};this.onPathCreated=async t=>{this.superstate.onPathCreated(t)};this.onPathDeleted=async t=>{this.superstate.onPathDeleted(t)};this.onPathChanged=async(t,r)=>{this.superstate.onPathRename(r,t)};this.onSpaceCreated=async t=>{if(t.startsWith(this.superstate.settings.spacesFolder)){await this.onSpaceCreated(t.replace(this.superstate.settings.spacesFolder,"spaces:/"));return}let r=await this.superstate.reloadSpace(this.spaceInfoForPath(t),null,!0);await this.superstate.onSpaceDefinitionChanged(r),await this.superstate.onPathCreated(t)};this.onSpaceRenamed=async(t,r)=>{await this.superstate.onSpaceRenamed(r,this.spaceInfoForPath(t)),await this.superstate.onPathRename(r,t)};this.onSpaceDeleted=async t=>{this.superstate.onSpaceDeleted(t),this.superstate.onPathDeleted(t)};this.onPathPropertyChanged=async t=>{this.superstate.onMetadataChange(t)};this.spaceTypeByString=t=>t.fullPath.startsWith(Fg)?"default":t.scheme=="space"?"folder":t.authority?.charAt(0)=="#"?"tag":t.path.charAt(t.path.length-1)=="/"&&t.path=="/"?"vault":"folder"}onSpaceUpdated(t,r){!this.superstate.spacesIndex.has(t)||(r=="context"&&this.superstate.reloadContextByPath(t),r=="frame"&&this.superstate.dispatchEvent("frameStateUpdated",{path:t}),r=="action"&&this.superstate.reloadActions(this.spaceInfoForPath(t)))}saveFrameKit(t,r){return this.primarySpaceAdapter.saveFrameKit(t,r)}saveSpaceTemplate(t,r){return this.primarySpaceAdapter.saveSpaceTemplate(t,r)}resolvePath(t,r){if(!r||!t||t.indexOf("http")==0)return t;if(t.indexOf("|")!=-1&&(t=t.split("|")[0]),t.indexOf("./")==0&&r)return this.superstate.spacesIndex.has(r)?r+t.slice(1):r.slice(0,r.lastIndexOf("/"))+t.slice(1);if(t.indexOf("../")==0&&r){let n=r.split("/"),i=t.split("/");for(;i[0]==="..";)n.pop(),i.shift();return[...n,...i].join("/")}return this.superstate.pathsIndex.has(t)?t:this.primarySpaceAdapter.resolvePath(t,r)??t}uriByString(t,r){return!t||r&&(t=this.resolvePath(t,r),!t)?null:Bf(t)}async allCaches(){let t=new Map,r=this.primarySpaceAdapter.allCaches().keys();for(let n of r){let i=await this.readPathCache(n);t.set(n,i)}return t}keysForCacheType(t){return this.primarySpaceAdapter.keysForCacheType(t)}pathExists(t){return this.primarySpaceAdapter.pathExists(t)}addSpaceAdapter(t,r){t.initiateAdapter(this),r&&(this.primarySpaceAdapter=t),this.spaceAdapters.push(t)}adapterForPath(t){let r=this.uriByString(t);return r?this.spaceAdapters.find(n=>n.schemes.includes(r.scheme))??this.primarySpaceAdapter:this.primarySpaceAdapter}createSpace(t,r,n){return this.adapterForPath(r).createSpace(t,r,n)}saveSpace(t,r,n){return this.adapterForPath(t).saveSpace(t,r,n)}renameSpace(t,r){return this.adapterForPath(t).renameSpace(t,r)}deleteSpace(t){return this.adapterForPath(t).deleteSpace(t)}childrenForSpace(t){return this.adapterForPath(t).childrenForSpace(t)}contextForSpace(t){return this.adapterForPath(t).contextForSpace(t)}async tablesForSpace(t){return this.adapterForPath(t).tablesForSpace(t)}spaceInitiated(t){return this.adapterForPath(t).spaceInitiated(t)}contextInitiated(t){return this.adapterForPath(t).contextInitiated(t)}readTable(t,r){return this.adapterForPath(t).readTable(t,r)}createTable(t,r){return this.adapterForPath(t).createTable(t,r).then(n=>this.superstate.reloadContextByPath(t,!0))}saveTableSchema(t,r,n){return this.adapterForPath(t).saveTableSchema(t,r,n).then(i=>i&&this.superstate.reloadContextByPath(t,!0))}saveTable(t,r,n){return this.adapterForPath(t).saveTable(t,r,n)}deleteTable(t,r){return this.adapterForPath(t).deleteTable(t,r).then(n=>this.superstate.reloadContextByPath(t,!0))}readAllKits(){return this.primarySpaceAdapter.readAllKits()}readAllTemplates(){return this.primarySpaceAdapter.readAllTemplates()}readAllTables(t){return this.adapterForPath(t).readAllTables(t)}framesForSpace(t){return this.adapterForPath(t).framesForSpace(t)}readFrame(t,r){return this.adapterForPath(t).readFrame(t,r)}readAllFrames(t){return this.adapterForPath(t).readAllFrames(t)}createFrame(t,r){return this.adapterForPath(t).createFrame(t,r).then(n=>this.superstate.dispatchEvent("frameStateUpdated",{path:this.spaceInfoForPath(t).path,schemaId:r.id}))}deleteFrame(t,r){return this.adapterForPath(t).deleteFrame(t,r)}saveFrameSchema(t,r,n){return this.adapterForPath(t).saveFrameSchema(t,r,n).then(i=>this.superstate.dispatchEvent("frameStateUpdated",{path:this.spaceInfoForPath(t).path,schemaId:r}))}saveFrame(t,r){return this.adapterForPath(t).saveFrame(t,r).then(n=>this.superstate.dispatchEvent("frameStateUpdated",{path:this.spaceInfoForPath(t).path,schemaId:r.schema.id}))}commandsForSpace(t){return this.adapterForPath(t).commandsForSpace(t)}runCommand(t,r,n){return this.adapterForPath(t).runCommand(t,r,n)}createCommand(t,r){return this.adapterForPath(t).createCommand(t,r).then(n=>this.superstate.reloadActions(this.spaceInfoForPath(t)))}deleteCommand(t,r){return this.adapterForPath(t).deleteCommand(t,r).then(n=>this.superstate.reloadActions(this.spaceInfoForPath(t)))}saveCommand(t,r,n){return this.adapterForPath(t).saveCommand(t,r,n).then(i=>this.superstate.reloadActions(this.spaceInfoForPath(t)))}allPaths(t){return this.spaceAdapters.flatMap(r=>r.allPaths(t))}createItemAtPath(t,r,n,i){return this.adapterForPath(t).createItemAtPath(t,r,n,i)}renamePath(t,r){return this.adapterForPath(t).renamePath(t,r)}copyPath(t,r,n){return this.adapterForPath(t).copyPath(t,r,n)}getPathInfo(t){return this.adapterForPath(t).getPathInfo(t)}deletePath(t){return this.adapterForPath(t).deletePath(t)}readPath(t){return this.adapterForPath(t).readPath(t)}writeToPath(t,r,n){return this.adapterForPath(t).writeToPath(t,r,n)}parentPathForPath(t){return this.adapterForPath(t).parentPathForPath(t)}async readPathCache(t){let r=await this.adapterForPath(t).readPathCache(t);if(r&&r.type=="space"&&!this.superstate.settings.enableFolderNote){let n=this.spaceInfoForPath(t).defPath;r.label={...r.label,...await this.readLabel(n)},r.property=await this.readProperties(n)}return r}allSpaces(){return this.primarySpaceAdapter.allSpaces()}spaceInfoForPath(t){return this.adapterForPath(t).spaceInfoForPath(t)}spaceDefForSpace(t){return this.adapterForPath(t).spaceDefForSpace(t)}readLabel(t){return this.adapterForPath(t).readLabel(t)}saveLabel(t,r,n){return this.adapterForPath(t).saveLabel(t,r,n)}addProperty(t,r){return this.adapterForPath(t).addProperty(t,r)}saveProperties(t,r){if(!!t)return this.adapterForPath(t).saveProperties(t,r)}readProperties(t){return this.adapterForPath(t).readProperties(t)}renameProperty(t,r,n){return this.adapterForPath(t).renameProperty(t,r,n)}deleteProperty(t,r){return this.adapterForPath(t).deleteProperty(t,r)}addSpaceProperty(t,r){if(r.schemaId==Nr&&r.type.startsWith("option")){let n=Mr([...this.superstate.spacesMap.getInverse(t)??[]].flatMap(a=>mr(this.superstate.pathsIndex.get(a)?.metadata?.property?.[r.name])??[])),i=Hh(n.map(a=>({value:a,name:a})),{});r.value=i}return this.adapterForPath(t).addSpaceProperty(t,r).then(n=>this.superstate.reloadContextByPath(t,!0))}deleteSpaceProperty(t,r){return this.adapterForPath(t).deleteSpaceProperty(t,r).then(n=>this.superstate.reloadContextByPath(t,!0))}saveSpaceProperty(t,r,n){return this.adapterForPath(t).saveSpaceProperty(t,r,n).then(i=>(n.name!=r.name&&this.superstate.getSpaceItems(t).forEach(a=>{this.renameProperty(a.path,n.name,r.name)}),this.superstate.reloadContextByPath(t,!0)))}addTag(t,r){return this.adapterForPath(t).addTag(t,r)}deleteTag(t,r){return this.adapterForPath(t).deleteTag(t,r)}renameTag(t,r,n){return this.adapterForPath(t).renameTag(t,r,n)}readTags(){return this.primarySpaceAdapter.readTags()}pathsForTag(t){return this.primarySpaceAdapter.pathsForTag(t)}childrenForPath(t,r){return this.adapterForPath(t).childrenForPath(t,r)}readFocuses(){return this.primarySpaceAdapter.readFocuses()}saveFocuses(t){return this.superstate.focuses=t,this.superstate.dispatchEvent("focusesChanged",null),this.primarySpaceAdapter.saveFocuses(t)}readTemplates(t){return this.adapterForPath(t).readTemplates(t)}saveTemplate(t,r){return this.adapterForPath(t).saveTemplate(t,r).then(n=>this.superstate.reloadSpace(this.spaceInfoForPath(r),null,!0))}deleteTemplate(t,r){return this.primarySpaceAdapter.deleteTemplate(t,r).then(n=>this.superstate.reloadSpace(this.spaceInfoForPath(r),null,!0))}};var CJ=(e,t)=>mr(t).some(r=>e==ax(r)),T4e=(e,t,r)=>Ni(mr(r).map(n=>ax(n)==e?t:e)),F4e=(e,t)=>Ni(mr(t).filter(r=>r!=e)),B$=e=>e.filter(t=>t.type.startsWith("link")||t.type.startsWith("context")),DJ=(e,t,r,n)=>{if(n.length==0)return t;let i=n.reduce((a,o)=>{if(CJ(r,t[o.name])){let s=F4e(r,t[o.name]);return e.saveProperties(t[It],{[o.name]:Sa(o.type,s,!0)}),{...a,[o.name]:s}}return a},{});return{...t,...i}},jJ=(e,t,r,n,i)=>{if(i.length==0)return t;let a=i.reduce((o,s)=>{if(CJ(r,t[s.name])){let l=T4e(r,n,t[s.name]);return e.saveProperties(t[It],{[s.name]:Sa(s.type,l,!0)}),{...o,[s.name]:l}}return o},{});return{...t,...a}};var OJ=(e,t,r)=>({...e,rows:e.rows.map(n=>n[It]==t?{...n,[It]:r}:n)}),MJ=(e,t)=>({...e,rows:e.rows.filter(r=>r[It]!=t)});var R$=(e,t,r)=>{let n=e.rows.filter(i=>t.includes(i[It]));return{...e,rows:rx(e.rows.filter(i=>!t.includes(i[It])),r,n)}};var mc=ge(pi());var mo=ge(Te());var nt=ge(Te()),n0=ge(rl());var po=ge(Te());function Kre(){for(var e=arguments.length,t=new Array(e),r=0;rn=>{t.forEach(i=>i(n))},t)}var Pk=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function y1(e){let t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function bM(e){return"nodeType"in e}function Ml(e){var t,r;return e?y1(e)?e:bM(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function xM(e){let{Document:t}=Ml(e);return e instanceof t}function Wx(e){return y1(e)?!1:e instanceof Ml(e).HTMLElement}function JL(e){return e instanceof Ml(e).SVGElement}function b1(e){return e?y1(e)?e.document:bM(e)?xM(e)?e:Wx(e)||JL(e)?e.ownerDocument:document:document:document}var ec=Pk?po.useLayoutEffect:po.useEffect;function Ik(e){let t=(0,po.useRef)(e);return ec(()=>{t.current=e}),(0,po.useCallback)(function(){for(var r=arguments.length,n=new Array(r),i=0;i{e.current=setInterval(n,i)},[]),r=(0,po.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function Vx(e,t){t===void 0&&(t=[e]);let r=(0,po.useRef)(e);return ec(()=>{r.current!==e&&(r.current=e)},t),r}function Gx(e,t){let r=(0,po.useRef)();return(0,po.useMemo)(()=>{let n=e(r.current);return r.current=n,n},[...t])}function Bk(e){let t=Ik(e),r=(0,po.useRef)(null),n=(0,po.useCallback)(i=>{i!==r.current&&t?.(i,r.current),r.current=i},[]);return[r,n]}function Rk(e){let t=(0,po.useRef)();return(0,po.useEffect)(()=>{t.current=e},[e]),t.current}var KL={};function x1(e,t){return(0,po.useMemo)(()=>{if(t)return t;let r=KL[e]==null?0:KL[e]+1;return KL[e]=r,e+"-"+r},[e,t])}function ene(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i{let s=Object.entries(o);for(let[l,u]of s){let c=a[l];c!=null&&(a[l]=c+e*u)}return a},{...t})}}var w1=ene(1),S1=ene(-1);function PPe(e){return"clientX"in e&&"clientY"in e}function Hx(e){if(!e)return!1;let{KeyboardEvent:t}=Ml(e.target);return t&&e instanceof t}function IPe(e){if(!e)return!1;let{TouchEvent:t}=Ml(e.target);return t&&e instanceof t}function $k(e){if(IPe(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return PPe(e)?{x:e.clientX,y:e.clientY}:null}var pu=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(!!e)return[pu.Translate.toString(e),pu.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),Xre="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function tne(e){return e.matches(Xre)?e:e.querySelector(Xre)}var E1=ge(Te()),BPe={display:"none"};function rne(e){let{id:t,value:r}=e;return E1.default.createElement("div",{id:t,style:BPe},r)}function nne(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e,i={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return E1.default.createElement("div",{id:t,style:i,role:"status","aria-live":n,"aria-atomic":!0},r)}function ine(){let[e,t]=(0,E1.useState)("");return{announce:(0,E1.useCallback)(n=>{n!=null&&t(n)},[]),announcement:e}}var gne=(0,nt.createContext)(null);function Vo(e){let t=(0,nt.useContext)(gne);(0,nt.useEffect)(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function RPe(){let[e]=(0,nt.useState)(()=>new Set),t=(0,nt.useCallback)(n=>(e.add(n),()=>e.delete(n)),[e]);return[(0,nt.useCallback)(n=>{let{type:i,event:a}=n;e.forEach(o=>{var s;return(s=o[i])==null?void 0:s.call(o,a)})},[e]),t]}var $Pe={draggable:` To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel. @@ -170,7 +170,7 @@ q: `+this.q.toString():"")+` `),n.seealso&&n.seealso.length&&(i+="See also: "+n.seealso.join(", ")+` `),i},r.prototype.toJSON=function(){var n=Bt(this.doc);return n.mathjs="Help",n},r.fromJSON=function(n){var i={};return Object.keys(n).filter(a=>a!=="mathjs").forEach(a=>{i[a]=n[a]}),new r(i)},r.prototype.valueOf=r.prototype.toString,r},{isClass:!0});var cUe="Chain",fUe=["?on","math","typed"],w_=G(cUe,fUe,e=>{var{on:t,math:r,typed:n}=e;function i(u){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");uw(u)?this.value=u.value:this.value=u}i.prototype.type="Chain",i.prototype.isChain=!0,i.prototype.done=function(){return this.value},i.prototype.valueOf=function(){return this.value},i.prototype.toString=function(){return er(this.value)},i.prototype.toJSON=function(){return{mathjs:"Chain",value:this.value}},i.fromJSON=function(u){return new i(u.value)};function a(u,c){typeof c=="function"&&(i.prototype[u]=s(c))}function o(u,c){fw(i.prototype,u,function(){var d=c();if(typeof d=="function")return s(d)})}function s(u){return function(){if(arguments.length===0)return new i(u(this.value));for(var c=[this.value],f=0;fu[h])};for(var d in u)f(d)}};var l={expression:!0,docs:!0,type:!0,classes:!0,json:!0,error:!0,isChain:!0};return i.createProxy(r),t&&t("import",function(u,c,f){f||o(u,c)}),i},{isClass:!0});var oV={name:"e",category:"Constants",syntax:["e"],description:"Euler's number, the base of the natural logarithm. Approximately equal to 2.71828",examples:["e","e ^ 2","exp(2)","log(e)"],seealso:["exp"]};var Rfe={name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]};var $fe={name:"i",category:"Constants",syntax:["i"],description:"Imaginary unit, defined as i*i=-1. A complex number is described as a + b*i, where a is the real part, and b is the imaginary part.",examples:["i","i * i","sqrt(-1)"],seealso:[]};var qfe={name:"Infinity",category:"Constants",syntax:["Infinity"],description:"Infinity, a number which is larger than the maximum number that can be handled by a floating point number.",examples:["Infinity","1 / 0"],seealso:[]};var Lfe={name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]};var zfe={name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]};var Ufe={name:"LOG10E",category:"Constants",syntax:["LOG10E"],description:"Returns the base-10 logarithm of E, approximately equal to 0.434",examples:["LOG10E","log(e, 10)"],seealso:[]};var Wfe={name:"LOG2E",category:"Constants",syntax:["LOG2E"],description:"Returns the base-2 logarithm of E, approximately equal to 1.442",examples:["LOG2E","log(e, 2)"],seealso:[]};var Vfe={name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]};var Gfe={name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]};var Hfe={name:"phi",category:"Constants",syntax:["phi"],description:"Phi is the golden ratio. Two quantities are in the golden ratio if their ratio is the same as the ratio of their sum to the larger of the two quantities. Phi is defined as `(1 + sqrt(5)) / 2` and is approximately 1.618034...",examples:["phi"],seealso:[]};var sV={name:"pi",category:"Constants",syntax:["pi"],description:"The number pi is a mathematical constant that is the ratio of a circle's circumference to its diameter, and is approximately equal to 3.14159",examples:["pi","sin(pi/2)"],seealso:["tau"]};var Qfe={name:"SQRT1_2",category:"Constants",syntax:["SQRT1_2"],description:"Returns the square root of 1/2, approximately equal to 0.707",examples:["SQRT1_2","sqrt(1/2)"],seealso:[]};var Yfe={name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]};var Zfe={name:"tau",category:"Constants",syntax:["tau"],description:"Tau is the ratio constant of a circle's circumference to radius, equal to 2 * pi, approximately 6.2832.",examples:["tau","2 * pi"],seealso:["pi"]};var Xfe={name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]};var Kfe={name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]};var Jfe={name:"bignumber",category:"Construction",syntax:["bignumber(x)"],description:"Create a big number from a number or string.",examples:["0.1 + 0.2","bignumber(0.1) + bignumber(0.2)",'bignumber("7.2")','bignumber("7.2e500")',"bignumber([0.1, 0.2, 0.3])"],seealso:["boolean","complex","fraction","index","matrix","string","unit"]};var ede={name:"boolean",category:"Construction",syntax:["x","boolean(x)"],description:"Convert a string or number into a boolean.",examples:["boolean(0)","boolean(1)","boolean(3)",'boolean("true")','boolean("false")',"boolean([1, 0, 1, 1])"],seealso:["bignumber","complex","index","matrix","number","string","unit"]};var tde={name:"complex",category:"Construction",syntax:["complex()","complex(re, im)","complex(string)"],description:"Create a complex number.",examples:["complex()","complex(2, 3)",'complex("7 - 2i")'],seealso:["bignumber","boolean","index","matrix","number","string","unit"]};var rde={name:"createUnit",category:"Construction",syntax:["createUnit(definitions)","createUnit(name, definition)"],description:"Create a user-defined unit and register it with the Unit type.",examples:['createUnit("foo")','createUnit("knot", {definition: "0.514444444 m/s", aliases: ["knots", "kt", "kts"]})','createUnit("mph", "1 mile/hour")'],seealso:["unit","splitUnit"]};var nde={name:"fraction",category:"Construction",syntax:["fraction(num)","fraction(matrix)","fraction(num,den)","fraction({n: num, d: den})"],description:"Create a fraction from a number or from integer numerator and denominator.",examples:["fraction(0.125)","fraction(1, 3) + fraction(2, 5)","fraction({n: 333, d: 53})","fraction([sqrt(9), sqrt(10), sqrt(11)])"],seealso:["bignumber","boolean","complex","index","matrix","string","unit"]};var ide={name:"index",category:"Construction",syntax:["[start]","[start:end]","[start:step:end]","[start1, start 2, ...]","[start1:end1, start2:end2, ...]","[start1:step1:end1, start2:step2:end2, ...]"],description:"Create an index to get or replace a subset of a matrix",examples:["A = [1, 2, 3; 4, 5, 6]","A[1, :]","A[1, 2] = 50","A[1:2, 1:2] = 1","B = [1, 2, 3]","B[B>1 and B<3]"],seealso:["bignumber","boolean","complex","matrix,","number","range","string","unit"]};var ade={name:"matrix",category:"Construction",syntax:["[]","[a1, b1, ...; a2, b2, ...]","matrix()",'matrix("dense")',"matrix([...])"],description:"Create a matrix.",examples:["[]","[1, 2, 3]","[1, 2, 3; 4, 5, 6]","matrix()","matrix([3, 4])",'matrix([3, 4; 5, 6], "sparse")','matrix([3, 4; 5, 6], "sparse", "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","sparse"]};var ode={name:"number",category:"Construction",syntax:["x","number(x)","number(unit, valuelessUnit)"],description:"Create a number or convert a string or boolean into a number.",examples:["2","2e3","4.05","number(2)",'number("7.2")',"number(true)","number([true, false, true, true])",'number(unit("52cm"), "m")'],seealso:["bignumber","boolean","complex","fraction","index","matrix","string","unit"]};var sde={name:"sparse",category:"Construction",syntax:["sparse()","sparse([a1, b1, ...; a1, b2, ...])",'sparse([a1, b1, ...; a1, b2, ...], "number")'],description:"Create a sparse matrix.",examples:["sparse()","sparse([3, 4; 5, 6])",'sparse([3, 0; 5, 0], "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","matrix"]};var lde={name:"splitUnit",category:"Construction",syntax:["splitUnit(unit: Unit, parts: Unit[])"],description:"Split a unit in an array of units whose sum is equal to the original unit.",examples:['splitUnit(1 m, ["feet", "inch"])'],seealso:["unit","createUnit"]};var ude={name:"string",category:"Construction",syntax:['"text"',"string(x)"],description:"Create a string or convert a value to a string",examples:['"Hello World!"',"string(4.2)","string(3 + 2i)"],seealso:["bignumber","boolean","complex","index","matrix","number","unit"]};var cde={name:"unit",category:"Construction",syntax:["value unit","unit(value, unit)","unit(string)"],description:"Create a unit.",examples:["5.5 mm","3 inch",'unit(7.1, "kilogram")','unit("23 deg")'],seealso:["bignumber","boolean","complex","index","matrix","number","string"]};var fde={name:"config",category:"Core",syntax:["config()","config(options)"],description:"Get configuration or change configuration.",examples:["config()","1/3 + 1/4",'config({number: "Fraction"})',"1/3 + 1/4"],seealso:[]};var dde={name:"import",category:"Core",syntax:["import(functions)","import(functions, options)"],description:"Import functions or constants from an object.",examples:["import({myFn: f(x)=x^2, myConstant: 32 })","myFn(2)","myConstant"],seealso:[]};var pde={name:"typed",category:"Core",syntax:["typed(signatures)","typed(name, signatures)"],description:"Create a typed function.",examples:['double = typed({ "number": f(x)=x+x, "string": f(x)=concat(x,x) })',"double(2)",'double("hello")'],seealso:[]};var mde={name:"derivative",category:"Algebra",syntax:["derivative(expr, variable)","derivative(expr, variable, {simplify: boolean})"],description:"Takes the derivative of an expression expressed in parser Nodes. The derivative will be taken over the supplied variable in the second parameter. If there are multiple variables in the expression, it will return a partial derivative.",examples:['derivative("2x^3", "x")','derivative("2x^3", "x", {simplify: false})','derivative("2x^2 + 3x + 4", "x")','derivative("sin(2x)", "x")','f = parse("x^2 + x")','x = parse("x")',"df = derivative(f, x)","df.evaluate({x: 3})"],seealso:["simplify","parse","evaluate"]};var hde={name:"leafCount",category:"Algebra",syntax:["leafCount(expr)"],description:"Computes the number of leaves in the parse tree of the given expression",examples:['leafCount("e^(i*pi)-1")','leafCount(parse("{a: 22/7, b: 10^(1/2)}"))'],seealso:["simplify"]};var Ade={name:"lsolve",category:"Algebra",syntax:["x=lsolve(L, b)"],description:"Finds one solution of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolveAll","lup","lusolve","usolve","matrix","sparse"]};var gde={name:"lsolveAll",category:"Algebra",syntax:["x=lsolveAll(L, b)"],description:"Finds all solutions of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolve","lup","lusolve","usolve","matrix","sparse"]};var vde={name:"lup",category:"Algebra",syntax:["lup(m)"],description:"Calculate the Matrix LU decomposition with partial pivoting. Matrix A is decomposed in three matrices (L, U, P) where P * A = L * U",examples:["lup([[2, 1], [1, 4]])","lup(matrix([[2, 1], [1, 4]]))","lup(sparse([[2, 1], [1, 4]]))"],seealso:["lusolve","lsolve","usolve","matrix","sparse","slu","qr"]};var yde={name:"lusolve",category:"Algebra",syntax:["x=lusolve(A, b)","x=lusolve(lu, b)"],description:"Solves the linear system A * x = b where A is an [n x n] matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lusolve(a, b)"],seealso:["lup","slu","lsolve","usolve","matrix","sparse"]};var bde={name:"polynomialRoot",category:"Algebra",syntax:["x=polynomialRoot(-6, 3)","x=polynomialRoot(4, -4, 1)","x=polynomialRoot(-8, 12, -6, 1)"],description:"Finds the roots of a univariate polynomial given by its coefficients starting from constant, linear, and so on, increasing in degree.",examples:["a = polynomialRoot(-6, 11, -6, 1)"],seealso:["cbrt","sqrt"]};var xde={name:"qr",category:"Algebra",syntax:["qr(A)"],description:"Calculates the Matrix QR decomposition. Matrix `A` is decomposed in two matrices (`Q`, `R`) where `Q` is an orthogonal matrix and `R` is an upper triangular matrix.",examples:["qr([[1, -1, 4], [1, 4, -2], [1, 4, 2], [1, -1, 0]])"],seealso:["lup","slu","matrix"]};var wde={name:"rationalize",category:"Algebra",syntax:["rationalize(expr)","rationalize(expr, scope)","rationalize(expr, scope, detailed)"],description:"Transform a rationalizable expression in a rational fraction. If rational fraction is one variable polynomial then converts the numerator and denominator in canonical form, with decreasing exponents, returning the coefficients of numerator.",examples:['rationalize("2x/y - y/(x+1)")','rationalize("2x/y - y/(x+1)", true)'],seealso:["simplify"]};var Sde={name:"resolve",category:"Algebra",syntax:["resolve(node, scope)"],description:"Recursively substitute variables in an expression tree.",examples:['resolve(parse("1 + x"), { x: 7 })','resolve(parse("size(text)"), { text: "Hello World" })','resolve(parse("x + y"), { x: parse("3z") })','resolve(parse("3x"), { x: parse("y+z"), z: parse("w^y") })'],seealso:["simplify","evaluate"],mayThrow:["ReferenceError"]};var Ede={name:"simplify",category:"Algebra",syntax:["simplify(expr)","simplify(expr, rules)"],description:"Simplify an expression tree.",examples:['simplify("3 + 2 / 4")','simplify("2x + x")','f = parse("x * (x + 2 + x)")',"simplified = simplify(f)","simplified.evaluate({x: 2})"],seealso:["simplifyCore","derivative","evaluate","parse","rationalize","resolve"]};var kde={name:"simplifyConstant",category:"Algebra",syntax:["simplifyConstant(expr)","simplifyConstant(expr, options)"],description:"Replace constant subexpressions of node with their values.",examples:['simplifyConstant("(3-3)*x")','simplifyConstant(parse("z-cos(tau/8)"))'],seealso:["simplify","simplifyCore","evaluate"]};var Cde={name:"simplifyCore",category:"Algebra",syntax:["simplifyCore(node)"],description:"Perform simple one-pass simplifications on an expression tree.",examples:['simplifyCore(parse("0*x"))','simplifyCore(parse("(x+0)*2"))'],seealso:["simplify","simplifyConstant","evaluate"]};var Dde={name:"slu",category:"Algebra",syntax:["slu(A, order, threshold)"],description:"Calculate the Matrix LU decomposition with full pivoting. Matrix A is decomposed in two matrices (L, U) and two permutation vectors (pinv, q) where P * A * Q = L * U",examples:["slu(sparse([4.5, 0, 3.2, 0; 3.1, 2.9, 0, 0.9; 0, 1.7, 3, 0; 3.5, 0.4, 0, 1]), 1, 0.001)"],seealso:["lusolve","lsolve","usolve","matrix","sparse","lup","qr"]};var jde={name:"symbolicEqual",category:"Algebra",syntax:["symbolicEqual(expr1, expr2)","symbolicEqual(expr1, expr2, options)"],description:"Returns true if the difference of the expressions simplifies to 0",examples:['symbolicEqual("x*y","y*x")','symbolicEqual("abs(x^2)", "x^2")','symbolicEqual("abs(x)", "x", {context: {abs: {trivial: true}}})'],seealso:["simplify","evaluate"]};var Ode={name:"usolve",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds one solution of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolveAll","lup","lusolve","lsolve","matrix","sparse"]};var Mde={name:"usolveAll",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds all solutions of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolve","lup","lusolve","lsolve","matrix","sparse"]};var Nde={name:"abs",category:"Arithmetic",syntax:["abs(x)"],description:"Compute the absolute value.",examples:["abs(3.5)","abs(-4.2)"],seealso:["sign"]};var Tde={name:"add",category:"Operators",syntax:["x + y","add(x, y)"],description:"Add two values.",examples:["a = 2.1 + 3.6","a - 3.6","3 + 2i","3 cm + 2 inch",'"2.3" + "4"'],seealso:["subtract"]};var Fde={name:"cbrt",category:"Arithmetic",syntax:["cbrt(x)","cbrt(x, allRoots)"],description:"Compute the cubic root value. If x = y * y * y, then y is the cubic root of x. When `x` is a number or complex number, an optional second argument `allRoots` can be provided to return all three cubic roots. If not provided, the principal root is returned",examples:["cbrt(64)","cube(4)","cbrt(-8)","cbrt(2 + 3i)","cbrt(8i)","cbrt(8i, true)","cbrt(27 m^3)"],seealso:["square","sqrt","cube","multiply"]};var _de={name:"ceil",category:"Arithmetic",syntax:["ceil(x)"],description:"Round a value towards plus infinity. If x is complex, both real and imaginary part are rounded towards plus infinity.",examples:["ceil(3.2)","ceil(3.8)","ceil(-4.2)"],seealso:["floor","fix","round"]};var Pde={name:"cube",category:"Arithmetic",syntax:["cube(x)"],description:"Compute the cube of a value. The cube of x is x * x * x.",examples:["cube(2)","2^3","2 * 2 * 2"],seealso:["multiply","square","pow"]};var Ide={name:"divide",category:"Operators",syntax:["x / y","divide(x, y)"],description:"Divide two values.",examples:["a = 2 / 3","a * 3","4.5 / 2","3 + 4 / 2","(3 + 4) / 2","18 km / 4.5"],seealso:["multiply"]};var Bde={name:"dotDivide",category:"Operators",syntax:["x ./ y","dotDivide(x, y)"],description:"Divide two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a ./ b"],seealso:["multiply","dotMultiply","divide"]};var Rde={name:"dotMultiply",category:"Operators",syntax:["x .* y","dotMultiply(x, y)"],description:"Multiply two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a .* b"],seealso:["multiply","divide","dotDivide"]};var $de={name:"dotPow",category:"Operators",syntax:["x .^ y","dotPow(x, y)"],description:"Calculates the power of x to y element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","a .^ 2"],seealso:["pow"]};var qde={name:"exp",category:"Arithmetic",syntax:["exp(x)"],description:"Calculate the exponent of a value.",examples:["exp(1.3)","e ^ 1.3","log(exp(1.3))","x = 2.4","(exp(i*x) == cos(x) + i*sin(x)) # Euler's formula"],seealso:["expm","expm1","pow","log"]};var Lde={name:"expm",category:"Arithmetic",syntax:["exp(x)"],description:"Compute the matrix exponential, expm(A) = e^A. The matrix must be square. Not to be confused with exp(a), which performs element-wise exponentiation.",examples:["expm([[0,2],[0,0]])"],seealso:["exp"]};var zde={name:"expm1",category:"Arithmetic",syntax:["expm1(x)"],description:"Calculate the value of subtracting 1 from the exponential value.",examples:["expm1(2)","pow(e, 2) - 1","log(expm1(2) + 1)"],seealso:["exp","pow","log"]};var Ude={name:"fix",category:"Arithmetic",syntax:["fix(x)"],description:"Round a value towards zero. If x is complex, both real and imaginary part are rounded towards zero.",examples:["fix(3.2)","fix(3.8)","fix(-4.2)","fix(-4.8)"],seealso:["ceil","floor","round"]};var Wde={name:"floor",category:"Arithmetic",syntax:["floor(x)"],description:"Round a value towards minus infinity.If x is complex, both real and imaginary part are rounded towards minus infinity.",examples:["floor(3.2)","floor(3.8)","floor(-4.2)"],seealso:["ceil","fix","round"]};var Vde={name:"gcd",category:"Arithmetic",syntax:["gcd(a, b)","gcd(a, b, c, ...)"],description:"Compute the greatest common divisor.",examples:["gcd(8, 12)","gcd(-4, 6)","gcd(25, 15, -10)"],seealso:["lcm","xgcd"]};var Gde={name:"hypot",category:"Arithmetic",syntax:["hypot(a, b, c, ...)","hypot([a, b, c, ...])"],description:"Calculate the hypotenusa of a list with values. ",examples:["hypot(3, 4)","sqrt(3^2 + 4^2)","hypot(-2)","hypot([3, 4, 5])"],seealso:["abs","norm"]};var Hde={name:"invmod",category:"Arithmetic",syntax:["invmod(a, b)"],description:"Calculate the (modular) multiplicative inverse of a modulo b. Solution to the equation ax \u2263 1 (mod b)",examples:["invmod(8, 12)","invmod(7, 13)","invmod(15151, 15122)"],seealso:["gcd","xgcd"]};var Qde={name:"lcm",category:"Arithmetic",syntax:["lcm(x, y)"],description:"Compute the least common multiple.",examples:["lcm(4, 6)","lcm(6, 21)","lcm(6, 21, 5)"],seealso:["gcd"]};var Yde={name:"log",category:"Arithmetic",syntax:["log(x)","log(x, base)"],description:"Compute the logarithm of a value. If no base is provided, the natural logarithm of x is calculated. If base if provided, the logarithm is calculated for the specified base. log(x, base) is defined as log(x) / log(base).",examples:["log(3.5)","a = log(2.4)","exp(a)","10 ^ 4","log(10000, 10)","log(10000) / log(10)","b = log(1024, 2)","2 ^ b"],seealso:["exp","log1p","log2","log10"]};var Zde={name:"log10",category:"Arithmetic",syntax:["log10(x)"],description:"Compute the 10-base logarithm of a value.",examples:["log10(0.00001)","log10(10000)","10 ^ 4","log(10000) / log(10)","log(10000, 10)"],seealso:["exp","log"]};var Xde={name:"log1p",category:"Arithmetic",syntax:["log1p(x)","log1p(x, base)"],description:"Calculate the logarithm of a `value+1`",examples:["log1p(2.5)","exp(log1p(1.4))","pow(10, 4)","log1p(9999, 10)","log1p(9999) / log(10)"],seealso:["exp","log","log2","log10"]};var Kde={name:"log2",category:"Arithmetic",syntax:["log2(x)"],description:"Calculate the 2-base of a value. This is the same as calculating `log(x, 2)`.",examples:["log2(0.03125)","log2(16)","log2(16) / log2(2)","pow(2, 4)"],seealso:["exp","log1p","log","log10"]};var Jde={name:"mod",category:"Operators",syntax:["x % y","x mod y","mod(x, y)"],description:"Calculates the modulus, the remainder of an integer division.",examples:["7 % 3","11 % 2","10 mod 4","isOdd(x) = x % 2","isOdd(2)","isOdd(3)"],seealso:["divide"]};var epe={name:"multiply",category:"Operators",syntax:["x * y","multiply(x, y)"],description:"multiply two values.",examples:["a = 2.1 * 3.4","a / 3.4","2 * 3 + 4","2 * (3 + 4)","3 * 2.1 km"],seealso:["divide"]};var tpe={name:"norm",category:"Arithmetic",syntax:["norm(x)","norm(x, p)"],description:"Calculate the norm of a number, vector or matrix.",examples:["abs(-3.5)","norm(-3.5)","norm(3 - 4i)","norm([1, 2, -3], Infinity)","norm([1, 2, -3], -Infinity)","norm([3, 4], 2)","norm([[1, 2], [3, 4]], 1)",'norm([[1, 2], [3, 4]], "inf")','norm([[1, 2], [3, 4]], "fro")']};var rpe={name:"nthRoot",category:"Arithmetic",syntax:["nthRoot(a)","nthRoot(a, root)"],description:'Calculate the nth root of a value. The principal nth root of a positive real number A, is the positive real solution of the equation "x^root = A".',examples:["4 ^ 3","nthRoot(64, 3)","nthRoot(9, 2)","sqrt(9)"],seealso:["nthRoots","pow","sqrt"]};var npe={name:"nthRoots",category:"Arithmetic",syntax:["nthRoots(A)","nthRoots(A, root)"],description:'Calculate the nth roots of a value. An nth root of a positive real number A, is a positive real solution of the equation "x^root = A". This function returns an array of complex values.',examples:["nthRoots(1)","nthRoots(1, 3)"],seealso:["sqrt","pow","nthRoot"]};var ipe={name:"pow",category:"Operators",syntax:["x ^ y","pow(x, y)"],description:"Calculates the power of x to y, x^y.",examples:["2^3","2*2*2","1 + e ^ (pi * i)","pow([[1, 2], [4, 3]], 2)","pow([[1, 2], [4, 3]], -1)"],seealso:["multiply","nthRoot","nthRoots","sqrt"]};var ape={name:"round",category:"Arithmetic",syntax:["round(x)","round(x, n)","round(unit, valuelessUnit)","round(unit, n, valuelessUnit)"],description:"round a value towards the nearest integer.If x is complex, both real and imaginary part are rounded towards the nearest integer. When n is specified, the value is rounded to n decimals.",examples:["round(3.2)","round(3.8)","round(-4.2)","round(-4.8)","round(pi, 3)","round(123.45678, 2)","round(3.241cm, 2, cm)","round([3.2, 3.8, -4.7])"],seealso:["ceil","floor","fix"]};var ope={name:"sign",category:"Arithmetic",syntax:["sign(x)"],description:"Compute the sign of a value. The sign of a value x is 1 when x>1, -1 when x<0, and 0 when x=0.",examples:["sign(3.5)","sign(-4.2)","sign(0)"],seealso:["abs"]};var spe={name:"sqrt",category:"Arithmetic",syntax:["sqrt(x)"],description:"Compute the square root value. If x = y * y, then y is the square root of x.",examples:["sqrt(25)","5 * 5","sqrt(-1)"],seealso:["square","sqrtm","multiply","nthRoot","nthRoots","pow"]};var lpe={name:"sqrtm",category:"Arithmetic",syntax:["sqrtm(x)"],description:"Calculate the principal square root of a square matrix. The principal square root matrix `X` of another matrix `A` is such that `X * X = A`.",examples:["sqrtm([[33, 24], [48, 57]])"],seealso:["sqrt","abs","square","multiply"]};var upe={name:"sylvester",category:"Algebra",syntax:["sylvester(A,B,C)"],description:"Solves the real-valued Sylvester equation AX+XB=C for X",examples:["sylvester([[-1, -2], [1, 1]], [[-2, 1], [-1, 2]], [[-3, 2], [3, 0]])","A = [[-1, -2], [1, 1]]; B = [[2, -1], [1, -2]]; C = [[-3, 2], [3, 0]]","sylvester(A, B, C)"],seealso:["schur","lyap"]};var cpe={name:"schur",category:"Algebra",syntax:["schur(A)"],description:"Performs a real Schur decomposition of the real matrix A = UTU'",examples:["schur([[1, 0], [-4, 3]])","A = [[1, 0], [-4, 3]]","schur(A)"],seealso:["lyap","sylvester"]};var fpe={name:"lyap",category:"Algebra",syntax:["lyap(A,Q)"],description:"Solves the Continuous-time Lyapunov equation AP+PA'+Q=0 for P",examples:["lyap([[-2, 0], [1, -4]], [[3, 1], [1, 3]])","A = [[-2, 0], [1, -4]]","Q = [[3, 1], [1, 3]]","lyap(A,Q)"],seealso:["schur","sylvester"]};var dpe={name:"square",category:"Arithmetic",syntax:["square(x)"],description:"Compute the square of a value. The square of x is x * x.",examples:["square(3)","sqrt(9)","3^2","3 * 3"],seealso:["multiply","pow","sqrt","cube"]};var ppe={name:"subtract",category:"Operators",syntax:["x - y","subtract(x, y)"],description:"subtract two values.",examples:["a = 5.3 - 2","a + 2","2/3 - 1/6","2 * 3 - 3","2.1 km - 500m"],seealso:["add"]};var mpe={name:"unaryMinus",category:"Operators",syntax:["-x","unaryMinus(x)"],description:"Inverse the sign of a value. Converts booleans and strings to numbers.",examples:["-4.5","-(-5.6)",'-"22"'],seealso:["add","subtract","unaryPlus"]};var hpe={name:"unaryPlus",category:"Operators",syntax:["+x","unaryPlus(x)"],description:"Converts booleans and strings to numbers.",examples:["+true",'+"2"'],seealso:["add","subtract","unaryMinus"]};var Ape={name:"xgcd",category:"Arithmetic",syntax:["xgcd(a, b)"],description:"Calculate the extended greatest common divisor for two values. The result is an array [d, x, y] with 3 entries, where d is the greatest common divisor, and d = x * a + y * b.",examples:["xgcd(8, 12)","gcd(8, 12)","xgcd(36163, 21199)"],seealso:["gcd","lcm"]};var gpe={name:"bitAnd",category:"Bitwise",syntax:["x & y","bitAnd(x, y)"],description:"Bitwise AND operation. Performs the logical AND operation on each pair of the corresponding bits of the two given values by multiplying them. If both bits in the compared position are 1, the bit in the resulting binary representation is 1, otherwise, the result is 0",examples:["5 & 3","bitAnd(53, 131)","[1, 12, 31] & 42"],seealso:["bitNot","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]};var vpe={name:"bitNot",category:"Bitwise",syntax:["~x","bitNot(x)"],description:"Bitwise NOT operation. Performs a logical negation on each bit of the given value. Bits that are 0 become 1, and those that are 1 become 0.",examples:["~1","~2","bitNot([2, -3, 4])"],seealso:["bitAnd","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]};var ype={name:"bitOr",category:"Bitwise",syntax:["x | y","bitOr(x, y)"],description:"Bitwise OR operation. Performs the logical inclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if the first bit is 1 or the second bit is 1 or both bits are 1, otherwise, the result is 0.",examples:["5 | 3","bitOr([1, 2, 3], 4)"],seealso:["bitAnd","bitNot","bitXor","leftShift","rightArithShift","rightLogShift"]};var bpe={name:"bitXor",category:"Bitwise",syntax:["bitXor(x, y)"],description:"Bitwise XOR operation, exclusive OR. Performs the logical exclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if only the first bit is 1 or only the second bit is 1, but will be 0 if both are 0 or both are 1.",examples:["bitOr(1, 2)","bitXor([2, 3, 4], 4)"],seealso:["bitAnd","bitNot","bitOr","leftShift","rightArithShift","rightLogShift"]};var xpe={name:"leftShift",category:"Bitwise",syntax:["x << y","leftShift(x, y)"],description:"Bitwise left logical shift of a value x by y number of bits.",examples:["4 << 1","8 >> 1"],seealso:["bitAnd","bitNot","bitOr","bitXor","rightArithShift","rightLogShift"]};var wpe={name:"rightArithShift",category:"Bitwise",syntax:["x >> y","rightArithShift(x, y)"],description:"Bitwise right arithmetic shift of a value x by y number of bits.",examples:["8 >> 1","4 << 1","-12 >> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightLogShift"]};var Spe={name:"rightLogShift",category:"Bitwise",syntax:["x >>> y","rightLogShift(x, y)"],description:"Bitwise right logical shift of a value x by y number of bits.",examples:["8 >>> 1","4 << 1","-12 >>> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightArithShift"]};var Epe={name:"bellNumbers",category:"Combinatorics",syntax:["bellNumbers(n)"],description:"The Bell Numbers count the number of partitions of a set. A partition is a pairwise disjoint subset of S whose union is S. `bellNumbers` only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["bellNumbers(3)","bellNumbers(8)"],seealso:["stirlingS2"]};var kpe={name:"catalan",category:"Combinatorics",syntax:["catalan(n)"],description:"The Catalan Numbers enumerate combinatorial structures of many different types. catalan only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["catalan(3)","catalan(8)"],seealso:["bellNumbers"]};var Cpe={name:"composition",category:"Combinatorics",syntax:["composition(n, k)"],description:"The composition counts of n into k parts. composition only takes integer arguments. The following condition must be enforced: k <= n.",examples:["composition(5, 3)"],seealso:["combinations"]};var Dpe={name:"stirlingS2",category:"Combinatorics",syntax:["stirlingS2(n, k)"],description:"he Stirling numbers of the second kind, counts the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets. `stirlingS2` only takes integer arguments. The following condition must be enforced: k <= n. If n = k or k = 1, then s(n,k) = 1.",examples:["stirlingS2(5, 3)"],seealso:["bellNumbers"]};var jpe={name:"arg",category:"Complex",syntax:["arg(x)"],description:"Compute the argument of a complex value. If x = a+bi, the argument is computed as atan2(b, a).",examples:["arg(2 + 2i)","atan2(3, 2)","arg(2 + 3i)"],seealso:["re","im","conj","abs"]};var Ope={name:"conj",category:"Complex",syntax:["conj(x)"],description:"Compute the complex conjugate of a complex value. If x = a+bi, the complex conjugate is a-bi.",examples:["conj(2 + 3i)","conj(2 - 3i)","conj(-5.2i)"],seealso:["re","im","abs","arg"]};var Mpe={name:"im",category:"Complex",syntax:["im(x)"],description:"Get the imaginary part of a complex number.",examples:["im(2 + 3i)","re(2 + 3i)","im(-5.2i)","im(2.4)"],seealso:["re","conj","abs","arg"]};var Npe={name:"re",category:"Complex",syntax:["re(x)"],description:"Get the real part of a complex number.",examples:["re(2 + 3i)","im(2 + 3i)","re(-5.2i)","re(2.4)"],seealso:["im","conj","abs","arg"]};var Tpe={name:"evaluate",category:"Expression",syntax:["evaluate(expression)","evaluate(expression, scope)","evaluate([expr1, expr2, expr3, ...])","evaluate([expr1, expr2, expr3, ...], scope)"],description:"Evaluate an expression or an array with expressions.",examples:['evaluate("2 + 3")','evaluate("sqrt(16)")','evaluate("2 inch to cm")','evaluate("sin(x * pi)", { "x": 1/2 })','evaluate(["width=2", "height=4","width*height"])'],seealso:[]};var Fpe={name:"help",category:"Expression",syntax:["help(object)","help(string)"],description:"Display documentation on a function or data type.",examples:["help(sqrt)",'help("complex")'],seealso:[]};var _pe={name:"distance",category:"Geometry",syntax:["distance([x1, y1], [x2, y2])","distance([[x1, y1], [x2, y2]])"],description:"Calculates the Euclidean distance between two points.",examples:["distance([0,0], [4,4])","distance([[0,0], [4,4]])"],seealso:[]};var Ppe={name:"intersect",category:"Geometry",syntax:["intersect(expr1, expr2, expr3, expr4)","intersect(expr1, expr2, expr3)"],description:"Computes the intersection point of lines and/or planes.",examples:["intersect([0, 0], [10, 10], [10, 0], [0, 10])","intersect([1, 0, 1], [4, -2, 2], [1, 1, 1, 6])"],seealso:[]};var Ipe={name:"and",category:"Logical",syntax:["x and y","and(x, y)"],description:"Logical and. Test whether two values are both defined with a nonzero/nonempty value.",examples:["true and false","true and true","2 and 4"],seealso:["not","or","xor"]};var Bpe={name:"not",category:"Logical",syntax:["not x","not(x)"],description:"Logical not. Flips the boolean value of given argument.",examples:["not true","not false","not 2","not 0"],seealso:["and","or","xor"]};var Rpe={name:"or",category:"Logical",syntax:["x or y","or(x, y)"],description:"Logical or. Test if at least one value is defined with a nonzero/nonempty value.",examples:["true or false","false or false","0 or 4"],seealso:["not","and","xor"]};var $pe={name:"xor",category:"Logical",syntax:["x xor y","xor(x, y)"],description:"Logical exclusive or, xor. Test whether one and only one value is defined with a nonzero/nonempty value.",examples:["true xor false","false xor false","true xor true","0 xor 4"],seealso:["not","and","or"]};var qpe={name:"column",category:"Matrix",syntax:["column(x, index)"],description:"Return a column from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","column(A, 1)","column(A, 2)"],seealso:["row","matrixFromColumns"]};var Lpe={name:"concat",category:"Matrix",syntax:["concat(A, B, C, ...)","concat(A, B, C, ..., dim)"],description:"Concatenate matrices. By default, the matrices are concatenated by the last dimension. The dimension on which to concatenate can be provided as last argument.",examples:["A = [1, 2; 5, 6]","B = [3, 4; 7, 8]","concat(A, B)","concat(A, B, 1)","concat(A, B, 2)"],seealso:["det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]};var zpe={name:"count",category:"Matrix",syntax:["count(x)"],description:"Count the number of elements of a matrix, array or string.",examples:["a = [1, 2; 3, 4; 5, 6]","count(a)","size(a)",'count("hello world")'],seealso:["size"]};var Upe={name:"cross",category:"Matrix",syntax:["cross(A, B)"],description:"Calculate the cross product for two vectors in three dimensional space.",examples:["cross([1, 1, 0], [0, 1, 1])","cross([3, -3, 1], [4, 9, 2])","cross([2, 3, 4], [5, 6, 7])"],seealso:["multiply","dot"]};var Wpe={name:"ctranspose",category:"Matrix",syntax:["x'","ctranspose(x)"],description:"Complex Conjugate and Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","ctranspose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]};var Vpe={name:"det",category:"Matrix",syntax:["det(x)"],description:"Calculate the determinant of a matrix",examples:["det([1, 2; 3, 4])","det([-2, 2, 3; -1, 1, 3; 2, 0, -1])"],seealso:["concat","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]};var Gpe={name:"diag",category:"Matrix",syntax:["diag(x)","diag(x, k)"],description:"Create a diagonal matrix or retrieve the diagonal of a matrix. When x is a vector, a matrix with the vector values on the diagonal will be returned. When x is a matrix, a vector with the diagonal values of the matrix is returned. When k is provided, the k-th diagonal will be filled in or retrieved, if k is positive, the values are placed on the super diagonal. When k is negative, the values are placed on the sub diagonal.",examples:["diag(1:3)","diag(1:3, 1)","a = [1, 2, 3; 4, 5, 6; 7, 8, 9]","diag(a)"],seealso:["concat","det","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]};var Hpe={name:"diff",category:"Matrix",syntax:["diff(arr)","diff(arr, dim)"],description:["Create a new matrix or array with the difference of the passed matrix or array.","Dim parameter is optional and used to indicant the dimension of the array/matrix to apply the difference","If no dimension parameter is passed it is assumed as dimension 0","Dimension is zero-based in javascript and one-based in the parser","Arrays must be 'rectangular' meaning arrays like [1, 2]","If something is passed as a matrix it will be returned as a matrix but other than that all matrices are converted to arrays"],examples:["A = [1, 2, 4, 7, 0]","diff(A)","diff(A, 1)","B = [[1, 2], [3, 4]]","diff(B)","diff(B, 1)","diff(B, 2)","diff(B, bignumber(2))","diff([[1, 2], matrix([3, 4])], 2)"],seealso:["subtract","partitionSelect"]};var Qpe={name:"dot",category:"Matrix",syntax:["dot(A, B)","A * B"],description:"Calculate the dot product of two vectors. The dot product of A = [a1, a2, a3, ..., an] and B = [b1, b2, b3, ..., bn] is defined as dot(A, B) = a1 * b1 + a2 * b2 + a3 * b3 + ... + an * bn",examples:["dot([2, 4, 1], [2, 2, 3])","[2, 4, 1] * [2, 2, 3]"],seealso:["multiply","cross"]};var Ype={name:"eigs",category:"Matrix",syntax:["eigs(x)"],description:"Calculate the eigenvalues and optionally eigenvectors of a square matrix",examples:["eigs([[5, 2.3], [2.3, 1]])","eigs([[1, 2, 3], [4, 5, 6], [7, 8, 9]], { precision: 1e-6, eigenvectors: false })"],seealso:["inv"]};var Zpe={name:"filter",category:"Matrix",syntax:["filter(x, test)"],description:"Filter items in a matrix.",examples:["isPositive(x) = x > 0","filter([6, -2, -1, 4, 3], isPositive)","filter([6, -2, 0, 1, 0], x != 0)"],seealso:["sort","map","forEach"]};var Xpe={name:"flatten",category:"Matrix",syntax:["flatten(x)"],description:"Flatten a multi dimensional matrix into a single dimensional matrix.",examples:["a = [1, 2, 3; 4, 5, 6]","size(a)","b = flatten(a)","size(b)"],seealso:["concat","resize","size","squeeze"]};var Kpe={name:"forEach",category:"Matrix",syntax:["forEach(x, callback)"],description:"Iterates over all elements of a matrix/array, and executes the given callback function.",examples:["numberOfPets = {}","addPet(n) = numberOfPets[n] = (numberOfPets[n] ? numberOfPets[n]:0 ) + 1;",'forEach(["Dog","Cat","Cat"], addPet)',"numberOfPets"],seealso:["map","sort","filter"]};var Jpe={name:"getMatrixDataType",category:"Matrix",syntax:["getMatrixDataType(x)"],description:'Find the data type of all elements in a matrix or array, for example "number" if all items are a number and "Complex" if all values are complex numbers. If a matrix contains more than one data type, it will return "mixed".',examples:["getMatrixDataType([1, 2, 3])","getMatrixDataType([[5 cm], [2 inch]])",'getMatrixDataType([1, "text"])',"getMatrixDataType([1, bignumber(4)])"],seealso:["matrix","sparse","typeOf"]};var eme={name:"identity",category:"Matrix",syntax:["identity(n)","identity(m, n)","identity([m, n])"],description:"Returns the identity matrix with size m-by-n. The matrix has ones on the diagonal and zeros elsewhere.",examples:["identity(3)","identity(3, 5)","a = [1, 2, 3; 4, 5, 6]","identity(size(a))"],seealso:["concat","det","diag","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]};var tme={name:"inv",category:"Matrix",syntax:["inv(x)"],description:"Calculate the inverse of a matrix",examples:["inv([1, 2; 3, 4])","inv(4)","1 / 4"],seealso:["concat","det","diag","identity","ones","range","size","squeeze","subset","trace","transpose","zeros"]};var rme={name:"pinv",category:"Matrix",syntax:["pinv(x)"],description:"Calculate the Moore\u2013Penrose inverse of a matrix",examples:["pinv([1, 2; 3, 4])","pinv([[1, 0], [0, 1], [0, 1]])","pinv(4)"],seealso:["inv"]};var nme={name:"kron",category:"Matrix",syntax:["kron(x, y)"],description:"Calculates the kronecker product of 2 matrices or vectors.",examples:["kron([[1, 0], [0, 1]], [[1, 2], [3, 4]])","kron([1,1], [2,3,4])"],seealso:["multiply","dot","cross"]};var ime={name:"map",category:"Matrix",syntax:["map(x, callback)"],description:"Create a new matrix or array with the results of the callback function executed on each entry of the matrix/array.",examples:["map([1, 2, 3], square)"],seealso:["filter","forEach"]};var ame={name:"matrixFromColumns",category:"Matrix",syntax:["matrixFromColumns(...arr)","matrixFromColumns(row1, row2)","matrixFromColumns(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual columns.",examples:["matrixFromColumns([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromRows","matrixFromFunction","zeros"]};var ome={name:"matrixFromFunction",category:"Matrix",syntax:["matrixFromFunction(size, fn)","matrixFromFunction(size, fn, format)","matrixFromFunction(size, fn, format, datatype)","matrixFromFunction(size, format, fn)","matrixFromFunction(size, format, datatype, fn)"],description:"Create a matrix by evaluating a generating function at each index.",examples:["f(I) = I[1] - I[2]","matrixFromFunction([3,3], f)","g(I) = I[1] - I[2] == 1 ? 4 : 0",'matrixFromFunction([100, 100], "sparse", g)',"matrixFromFunction([5], random)"],seealso:["matrix","matrixFromRows","matrixFromColumns","zeros"]};var sme={name:"matrixFromRows",category:"Matrix",syntax:["matrixFromRows(...arr)","matrixFromRows(row1, row2)","matrixFromRows(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual rows.",examples:["matrixFromRows([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromColumns","matrixFromFunction","zeros"]};var lme={name:"ones",category:"Matrix",syntax:["ones(m)","ones(m, n)","ones(m, n, p, ...)","ones([m])","ones([m, n])","ones([m, n, p, ...])"],description:"Create a matrix containing ones.",examples:["ones(3)","ones(3, 5)","ones([2,3]) * 4.5","a = [1, 2, 3; 4, 5, 6]","ones(size(a))"],seealso:["concat","det","diag","identity","inv","range","size","squeeze","subset","trace","transpose","zeros"]};var ume={name:"partitionSelect",category:"Matrix",syntax:["partitionSelect(x, k)","partitionSelect(x, k, compare)"],description:"Partition-based selection of an array or 1D matrix. Will find the kth smallest value, and mutates the input array. Uses Quickselect.",examples:["partitionSelect([5, 10, 1], 2)",'partitionSelect(["C", "B", "A", "D"], 1, compareText)',"arr = [5, 2, 1]","partitionSelect(arr, 0) # returns 1, arr is now: [1, 2, 5]","arr","partitionSelect(arr, 1, 'desc') # returns 2, arr is now: [5, 2, 1]","arr"],seealso:["sort"]};var cme={name:"range",category:"Type",syntax:["start:end","start:step:end","range(start, end)","range(start, end, step)","range(string)"],description:"Create a range. Lower bound of the range is included, upper bound is excluded.",examples:["1:5","3:-1:-3","range(3, 7)","range(0, 12, 2)",'range("4:10")',"range(1m, 1m, 3m)","a = [1, 2, 3, 4; 5, 6, 7, 8]","a[1:2, 1:2]"],seealso:["concat","det","diag","identity","inv","ones","size","squeeze","subset","trace","transpose","zeros"]};var fme={name:"reshape",category:"Matrix",syntax:["reshape(x, sizes)"],description:"Reshape a multi dimensional array to fit the specified dimensions.",examples:["reshape([1, 2, 3, 4, 5, 6], [2, 3])","reshape([[1, 2], [3, 4]], [1, 4])","reshape([[1, 2], [3, 4]], [4])","reshape([1, 2, 3, 4], [-1, 2])"],seealso:["size","squeeze","resize"]};var dme={name:"resize",category:"Matrix",syntax:["resize(x, size)","resize(x, size, defaultValue)"],description:"Resize a matrix.",examples:["resize([1,2,3,4,5], [3])","resize([1,2,3], [5])","resize([1,2,3], [5], -1)","resize(2, [2, 3])",'resize("hello", [8], "!")'],seealso:["size","subset","squeeze","reshape"]};var pme={name:"rotate",category:"Matrix",syntax:["rotate(w, theta)","rotate(w, theta, v)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotate([1, 0], pi / 2)",'rotate(matrix([1, 0]), unit("35deg"))','rotate([1, 0, 0], unit("90deg"), [0, 0, 1])','rotate(matrix([1, 0, 0]), unit("90deg"), matrix([0, 0, 1]))'],seealso:["matrix","rotationMatrix"]};var mme={name:"rotationMatrix",category:"Matrix",syntax:["rotationMatrix(theta)","rotationMatrix(theta, v)","rotationMatrix(theta, v, format)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotationMatrix(pi / 2)",'rotationMatrix(unit("45deg"), [0, 0, 1])','rotationMatrix(1, matrix([0, 0, 1]), "sparse")'],seealso:["cos","sin"]};var hme={name:"row",category:"Matrix",syntax:["row(x, index)"],description:"Return a row from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","row(A, 1)","row(A, 2)"],seealso:["column","matrixFromRows"]};var Ame={name:"size",category:"Matrix",syntax:["size(x)"],description:"Calculate the size of a matrix.",examples:["size(2.3)",'size("hello world")',"a = [1, 2; 3, 4; 5, 6]","size(a)","size(1:6)"],seealso:["concat","count","det","diag","identity","inv","ones","range","squeeze","subset","trace","transpose","zeros"]};var gme={name:"sort",category:"Matrix",syntax:["sort(x)","sort(x, compare)"],description:'Sort the items in a matrix. Compare can be a string "asc", "desc", "natural", or a custom sort function.',examples:["sort([5, 10, 1])",'sort(["C", "B", "A", "D"], "natural")',"sortByLength(a, b) = size(a)[1] - size(b)[1]",'sort(["Langdon", "Tom", "Sara"], sortByLength)','sort(["10", "1", "2"], "natural")'],seealso:["map","filter","forEach"]};var vme={name:"squeeze",category:"Matrix",syntax:["squeeze(x)"],description:"Remove inner and outer singleton dimensions from a matrix.",examples:["a = zeros(3,2,1)","size(squeeze(a))","b = zeros(1,1,3)","size(squeeze(b))"],seealso:["concat","det","diag","identity","inv","ones","range","size","subset","trace","transpose","zeros"]};var yme={name:"subset",category:"Matrix",syntax:["value(index)","value(index) = replacement","subset(value, [index])","subset(value, [index], replacement)"],description:"Get or set a subset of the entries of a matrix or characters of a string. Indexes are one-based. There should be one index specification for each dimension of the target. Each specification can be a single index, a list of indices, or a range in colon notation `l:u`. In a range, both the lower bound l and upper bound u are included; and if a bound is omitted it defaults to the most extreme valid value. The cartesian product of the indices specified in each dimension determines the target of the operation.",examples:["d = [1, 2; 3, 4]","e = []","e[1, 1:2] = [5, 6]","e[2, :] = [7, 8]","f = d * e","f[2, 1]","f[:, 1]","f[[1,2], [1,3]] = [9, 10; 11, 12]","f"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","trace","transpose","zeros"]};var bme={name:"trace",category:"Matrix",syntax:["trace(A)"],description:"Calculate the trace of a matrix: the sum of the elements on the main diagonal of a square matrix.",examples:["A = [1, 2, 3; -1, 2, 3; 2, 0, 3]","trace(A)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","transpose","zeros"]};var xme={name:"transpose",category:"Matrix",syntax:["x'","transpose(x)"],description:"Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","transpose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]};var wme={name:"zeros",category:"Matrix",syntax:["zeros(m)","zeros(m, n)","zeros(m, n, p, ...)","zeros([m])","zeros([m, n])","zeros([m, n, p, ...])"],description:"Create a matrix containing zeros.",examples:["zeros(3)","zeros(3, 5)","a = [1, 2, 3; 4, 5, 6]","zeros(size(a))"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose"]};var Sme={name:"fft",category:"Matrix",syntax:["fft(x)"],description:"Calculate N-dimensional fourier transform",examples:["fft([[1, 0], [1, 0]])"],seealso:["ifft"]};var Eme={name:"ifft",category:"Matrix",syntax:["ifft(x)"],description:"Calculate N-dimensional inverse fourier transform",examples:["ifft([[2, 2], [0, 0]])"],seealso:["fft"]};var kme={name:"combinations",category:"Probability",syntax:["combinations(n, k)"],description:"Compute the number of combinations of n items taken k at a time",examples:["combinations(7, 5)"],seealso:["combinationsWithRep","permutations","factorial"]};var Cme={name:"combinationsWithRep",category:"Probability",syntax:["combinationsWithRep(n, k)"],description:"Compute the number of combinations of n items taken k at a time with replacements.",examples:["combinationsWithRep(7, 5)"],seealso:["combinations","permutations","factorial"]};var Dme={name:"factorial",category:"Probability",syntax:["n!","factorial(n)"],description:"Compute the factorial of a value",examples:["5!","5 * 4 * 3 * 2 * 1","3!"],seealso:["combinations","combinationsWithRep","permutations","gamma"]};var jme={name:"gamma",category:"Probability",syntax:["gamma(n)"],description:"Compute the gamma function. For small values, the Lanczos approximation is used, and for large values the extended Stirling approximation.",examples:["gamma(4)","3!","gamma(1/2)","sqrt(pi)"],seealso:["factorial"]};var Ome={name:"lgamma",category:"Probability",syntax:["lgamma(n)"],description:"Logarithm of the gamma function for real, positive numbers and complex numbers, using Lanczos approximation for numbers and Stirling series for complex numbers.",examples:["lgamma(4)","lgamma(1/2)","lgamma(i)","lgamma(complex(1.1, 2))"],seealso:["gamma"]};var Mme={name:"kldivergence",category:"Probability",syntax:["kldivergence(x, y)"],description:"Calculate the Kullback-Leibler (KL) divergence between two distributions.",examples:["kldivergence([0.7,0.5,0.4], [0.2,0.9,0.5])"],seealso:[]};var Nme={name:"multinomial",category:"Probability",syntax:["multinomial(A)"],description:"Multinomial Coefficients compute the number of ways of picking a1, a2, ..., ai unordered outcomes from `n` possibilities. multinomial takes one array of integers as an argument. The following condition must be enforced: every ai > 0.",examples:["multinomial([1, 2, 1])"],seealso:["combinations","factorial"]};var Tme={name:"permutations",category:"Probability",syntax:["permutations(n)","permutations(n, k)"],description:"Compute the number of permutations of n items taken k at a time",examples:["permutations(5)","permutations(5, 3)"],seealso:["combinations","combinationsWithRep","factorial"]};var Fme={name:"pickRandom",category:"Probability",syntax:["pickRandom(array)","pickRandom(array, number)","pickRandom(array, weights)","pickRandom(array, number, weights)","pickRandom(array, weights, number)"],description:"Pick a random entry from a given array.",examples:["pickRandom(0:10)","pickRandom([1, 3, 1, 6])","pickRandom([1, 3, 1, 6], 2)","pickRandom([1, 3, 1, 6], [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], 2, [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], [2, 3, 2, 1], 2)"],seealso:["random","randomInt"]};var _me={name:"random",category:"Probability",syntax:["random()","random(max)","random(min, max)","random(size)","random(size, max)","random(size, min, max)"],description:"Return a random number.",examples:["random()","random(10, 20)","random([2, 3])"],seealso:["pickRandom","randomInt"]};var Pme={name:"randomInt",category:"Probability",syntax:["randomInt(max)","randomInt(min, max)","randomInt(size)","randomInt(size, max)","randomInt(size, min, max)"],description:"Return a random integer number",examples:["randomInt(10, 20)","randomInt([2, 3], 10)"],seealso:["pickRandom","random"]};var Ime={name:"compare",category:"Relational",syntax:["compare(x, y)"],description:"Compare two values. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compare(2, 3)","compare(3, 2)","compare(2, 2)","compare(5cm, 40mm)","compare(2, [1, 2, 3])"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compareNatural","compareText"]};var Bme={name:"compareNatural",category:"Relational",syntax:["compareNatural(x, y)"],description:"Compare two values of any type in a deterministic, natural way. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compareNatural(2, 3)","compareNatural(3, 2)","compareNatural(2, 2)","compareNatural(5cm, 40mm)",'compareNatural("2", "10")',"compareNatural(2 + 3i, 2 + 4i)","compareNatural([1, 2, 4], [1, 2, 3])","compareNatural([1, 5], [1, 2, 3])","compareNatural([1, 2], [1, 2])","compareNatural({a: 2}, {a: 4})"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare","compareText"]};var Rme={name:"compareText",category:"Relational",syntax:["compareText(x, y)"],description:"Compare two strings lexically. Comparison is case sensitive. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:['compareText("B", "A")','compareText("A", "B")','compareText("A", "A")','compareText("2", "10")','compare("2", "10")',"compare(2, 10)",'compareNatural("2", "10")','compareText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural"]};var $me={name:"deepEqual",category:"Relational",syntax:["deepEqual(x, y)"],description:"Check equality of two matrices element wise. Returns true if the size of both matrices is equal and when and each of the elements are equal.",examples:["deepEqual([1,3,4], [1,3,4])","deepEqual([1,3,4], [1,3])"],seealso:["equal","unequal","smaller","larger","smallerEq","largerEq","compare"]};var qme={name:"equal",category:"Relational",syntax:["x == y","equal(x, y)"],description:"Check equality of two values. Returns true if the values are equal, and false if not.",examples:["2+2 == 3","2+2 == 4","a = 3.2","b = 6-2.8","a == b","50cm == 0.5m"],seealso:["unequal","smaller","larger","smallerEq","largerEq","compare","deepEqual","equalText"]};var Lme={name:"equalText",category:"Relational",syntax:["equalText(x, y)"],description:"Check equality of two strings. Comparison is case sensitive. Returns true if the values are equal, and false if not.",examples:['equalText("Hello", "Hello")','equalText("a", "A")','equal("2e3", "2000")','equalText("2e3", "2000")','equalText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural","compareText","equal"]};var zme={name:"larger",category:"Relational",syntax:["x > y","larger(x, y)"],description:"Check if value x is larger than y. Returns true if x is larger than y, and false if not.",examples:["2 > 3","5 > 2*2","a = 3.3","b = 6-2.8","(a > b)","(b < a)","5 cm > 2 inch"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare"]};var Ume={name:"largerEq",category:"Relational",syntax:["x >= y","largerEq(x, y)"],description:"Check if value x is larger or equal to y. Returns true if x is larger or equal to y, and false if not.",examples:["2 >= 1+1","2 > 1+1","a = 3.2","b = 6-2.8","(a >= b)"],seealso:["equal","unequal","smallerEq","smaller","compare"]};var Wme={name:"smaller",category:"Relational",syntax:["x < y","smaller(x, y)"],description:"Check if value x is smaller than value y. Returns true if x is smaller than y, and false if not.",examples:["2 < 3","5 < 2*2","a = 3.3","b = 6-2.8","(a < b)","5 cm < 2 inch"],seealso:["equal","unequal","larger","smallerEq","largerEq","compare"]};var Vme={name:"smallerEq",category:"Relational",syntax:["x <= y","smallerEq(x, y)"],description:"Check if value x is smaller or equal to value y. Returns true if x is smaller than y, and false if not.",examples:["2 <= 1+1","2 < 1+1","a = 3.2","b = 6-2.8","(a <= b)"],seealso:["equal","unequal","larger","smaller","largerEq","compare"]};var Gme={name:"unequal",category:"Relational",syntax:["x != y","unequal(x, y)"],description:"Check unequality of two values. Returns true if the values are unequal, and false if they are equal.",examples:["2+2 != 3","2+2 != 4","a = 3.2","b = 6-2.8","a != b","50cm != 0.5m","5 cm != 2 inch"],seealso:["equal","smaller","larger","smallerEq","largerEq","compare","deepEqual"]};var Hme={name:"setCartesian",category:"Set",syntax:["setCartesian(set1, set2)"],description:"Create the cartesian product of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays and the values will be sorted in ascending order before the operation.",examples:["setCartesian([1, 2], [3, 4])"],seealso:["setUnion","setIntersect","setDifference","setPowerset"]};var Qme={name:"setDifference",category:"Set",syntax:["setDifference(set1, set2)"],description:"Create the difference of two (multi)sets: every element of set1, that is not the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setDifference([1, 2, 3, 4], [3, 4, 5, 6])","setDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setSymDifference"]};var Yme={name:"setDistinct",category:"Set",syntax:["setDistinct(set)"],description:"Collect the distinct elements of a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setDistinct([1, 1, 1, 2, 2, 3])"],seealso:["setMultiplicity"]};var Zme={name:"setIntersect",category:"Set",syntax:["setIntersect(set1, set2)"],description:"Create the intersection of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIntersect([1, 2, 3, 4], [3, 4, 5, 6])","setIntersect([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setDifference"]};var Xme={name:"setIsSubset",category:"Set",syntax:["setIsSubset(set1, set2)"],description:"Check whether a (multi)set is a subset of another (multi)set: every element of set1 is the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIsSubset([1, 2], [3, 4, 5, 6])","setIsSubset([3, 4], [3, 4, 5, 6])"],seealso:["setUnion","setIntersect","setDifference"]};var Kme={name:"setMultiplicity",category:"Set",syntax:["setMultiplicity(element, set)"],description:"Count the multiplicity of an element in a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setMultiplicity(1, [1, 2, 2, 4])","setMultiplicity(2, [1, 2, 2, 4])"],seealso:["setDistinct","setSize"]};var Jme={name:"setPowerset",category:"Set",syntax:["setPowerset(set)"],description:"Create the powerset of a (multi)set: the powerset contains very possible subsets of a (multi)set. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setPowerset([1, 2, 3])"],seealso:["setCartesian"]};var ehe={name:"setSize",category:"Set",syntax:["setSize(set)","setSize(set, unique)"],description:'Count the number of elements of a (multi)set. When the second parameter "unique" is true, count only the unique values. A multi-dimension array will be converted to a single-dimension array before the operation.',examples:["setSize([1, 2, 2, 4])","setSize([1, 2, 2, 4], true)"],seealso:["setUnion","setIntersect","setDifference"]};var the={name:"setSymDifference",category:"Set",syntax:["setSymDifference(set1, set2)"],description:"Create the symmetric difference of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setSymDifference([1, 2, 3, 4], [3, 4, 5, 6])","setSymDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setDifference"]};var rhe={name:"setUnion",category:"Set",syntax:["setUnion(set1, set2)"],description:"Create the union of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setUnion([1, 2, 3, 4], [3, 4, 5, 6])","setUnion([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setIntersect","setDifference"]};var nhe={name:"zpk2tf",category:"Signal",syntax:["zpk2tf(z, p, k)"],description:"Compute the transfer function of a zero-pole-gain model.",examples:["zpk2tf([1, 2], [-1, -2], 1)","zpk2tf([1, 2], [-1, -2])","zpk2tf([1 - 3i, 2 + 2i], [-1, -2])"],seealso:[]};var ihe={name:"freqz",category:"Signal",syntax:["freqz(b, a)","freqz(b, a, w)"],description:"Calculates the frequency response of a filter given its numerator and denominator coefficients.",examples:["freqz([1, 2], [1, 2, 3])","freqz([1, 2], [1, 2, 3], [0, 1])","freqz([1, 2], [1, 2, 3], 512)"],seealso:[]};var ahe={name:"erf",category:"Special",syntax:["erf(x)"],description:"Compute the erf function of a value using a rational Chebyshev approximations for different intervals of x",examples:["erf(0.2)","erf(-0.5)","erf(4)"],seealso:[]};var ohe={name:"zeta",category:"Special",syntax:["zeta(s)"],description:"Compute the Riemann Zeta Function using an infinite series and Riemanns Functional Equation for the entire complex plane",examples:["zeta(0.2)","zeta(-0.5)","zeta(4)"],seealso:[]};var she={name:"mad",category:"Statistics",syntax:["mad(a, b, c, ...)","mad(A)"],description:"Compute the median absolute deviation of a matrix or a list with values. The median absolute deviation is defined as the median of the absolute deviations from the median.",examples:["mad(10, 20, 30)","mad([1, 2, 3])"],seealso:["mean","median","std","abs"]};var lhe={name:"max",category:"Statistics",syntax:["max(a, b, c, ...)","max(A)","max(A, dimension)"],description:"Compute the maximum value of a list of values.",examples:["max(2, 3, 4, 1)","max([2, 3, 4, 1])","max([2, 5; 4, 3])","max([2, 5; 4, 3], 1)","max([2, 5; 4, 3], 2)","max(2.7, 7.1, -4.5, 2.0, 4.1)","min(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["mean","median","min","prod","std","sum","variance"]};var uhe={name:"mean",category:"Statistics",syntax:["mean(a, b, c, ...)","mean(A)","mean(A, dimension)"],description:"Compute the arithmetic mean of a list of values.",examples:["mean(2, 3, 4, 1)","mean([2, 3, 4, 1])","mean([2, 5; 4, 3])","mean([2, 5; 4, 3], 1)","mean([2, 5; 4, 3], 2)","mean([1.0, 2.7, 3.2, 4.0])"],seealso:["max","median","min","prod","std","sum","variance"]};var che={name:"median",category:"Statistics",syntax:["median(a, b, c, ...)","median(A)"],description:"Compute the median of all values. The values are sorted and the middle value is returned. In case of an even number of values, the average of the two middle values is returned.",examples:["median(5, 2, 7)","median([3, -1, 5, 7])"],seealso:["max","mean","min","prod","std","sum","variance","quantileSeq"]};var fhe={name:"min",category:"Statistics",syntax:["min(a, b, c, ...)","min(A)","min(A, dimension)"],description:"Compute the minimum value of a list of values.",examples:["min(2, 3, 4, 1)","min([2, 3, 4, 1])","min([2, 5; 4, 3])","min([2, 5; 4, 3], 1)","min([2, 5; 4, 3], 2)","min(2.7, 7.1, -4.5, 2.0, 4.1)","max(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["max","mean","median","prod","std","sum","variance"]};var dhe={name:"mode",category:"Statistics",syntax:["mode(a, b, c, ...)","mode(A)","mode(A, a, b, B, c, ...)"],description:"Computes the mode of all values as an array. In case mode being more than one, multiple values are returned in an array.",examples:["mode(2, 1, 4, 3, 1)","mode([1, 2.7, 3.2, 4, 2.7])","mode(1, 4, 6, 1, 6)"],seealso:["max","mean","min","median","prod","std","sum","variance"]};var phe={name:"prod",category:"Statistics",syntax:["prod(a, b, c, ...)","prod(A)"],description:"Compute the product of all values.",examples:["prod(2, 3, 4)","prod([2, 3, 4])","prod([2, 5; 4, 3])"],seealso:["max","mean","min","median","min","std","sum","variance"]};var mhe={name:"quantileSeq",category:"Statistics",syntax:["quantileSeq(A, prob[, sorted])","quantileSeq(A, [prob1, prob2, ...][, sorted])","quantileSeq(A, N[, sorted])"],description:`Compute the prob order quantile of a matrix or a list with values. The sequence is sorted and the middle value is returned. Supported types of sequence values are: Number, BigNumber, Unit Supported types of probablity are: Number, BigNumber. -In case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated.`,examples:["quantileSeq([3, -1, 5, 7], 0.5)","quantileSeq([3, -1, 5, 7], [1/3, 2/3])","quantileSeq([3, -1, 5, 7], 2)","quantileSeq([-1, 3, 5, 7], 0.5, true)"],seealso:["mean","median","min","max","prod","std","sum","variance"]};var hhe={name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, dimension)","std(A, normalization)","std(A, dimension, normalization)"],description:'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["std(2, 4, 6)","std([2, 4, 6, 8])",'std([2, 4, 6, 8], "uncorrected")','std([2, 4, 6, 8], "biased")',"std([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","prod","sum","variance"]};var Ahe={name:"cumsum",category:"Statistics",syntax:["cumsum(a, b, c, ...)","cumsum(A)"],description:"Compute the cumulative sum of all values.",examples:["cumsum(2, 3, 4, 1)","cumsum([2, 3, 4, 1])","cumsum([1, 2; 3, 4])","cumsum([1, 2; 3, 4], 1)","cumsum([1, 2; 3, 4], 2)"],seealso:["max","mean","median","min","prod","std","sum","variance"]};var ghe={name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)","sum(A, dimension)"],description:"Compute the sum of all values.",examples:["sum(2, 3, 4, 1)","sum([2, 3, 4, 1])","sum([2, 5; 4, 3])"],seealso:["max","mean","median","min","prod","std","sum","variance"]};var vhe={name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, dimension)","variance(A, normalization)","variance(A, dimension, normalization)"],description:'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["variance(2, 4, 6)","variance([2, 4, 6, 8])",'variance([2, 4, 6, 8], "uncorrected")','variance([2, 4, 6, 8], "biased")',"variance([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","std","sum"]};var yhe={name:"corr",category:"Statistics",syntax:["corr(A,B)"],description:"Compute the correlation coefficient of a two list with values, For matrices, the matrix correlation coefficient is calculated.",examples:["corr([2, 4, 6, 8],[1, 2, 3, 6])","corr(matrix([[1, 2.2, 3, 4.8, 5], [1, 2, 3, 4, 5]]), matrix([[4, 5.3, 6.6, 7, 8], [1, 2, 3, 4, 5]]))"],seealso:["max","mean","min","median","min","prod","std","sum"]};var bhe={name:"acos",category:"Trigonometry",syntax:["acos(x)"],description:"Compute the inverse cosine of a value in radians.",examples:["acos(0.5)","acos(cos(2.3))"],seealso:["cos","atan","asin"]};var xhe={name:"acosh",category:"Trigonometry",syntax:["acosh(x)"],description:"Calculate the hyperbolic arccos of a value, defined as `acosh(x) = ln(sqrt(x^2 - 1) + x)`.",examples:["acosh(1.5)"],seealso:["cosh","asinh","atanh"]};var whe={name:"acot",category:"Trigonometry",syntax:["acot(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acot(0.5)","acot(cot(0.5))","acot(2)"],seealso:["cot","atan"]};var She={name:"acoth",category:"Trigonometry",syntax:["acoth(x)"],description:"Calculate the hyperbolic arccotangent of a value, defined as `acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2`.",examples:["acoth(2)","acoth(0.5)"],seealso:["acsch","asech"]};var Ehe={name:"acsc",category:"Trigonometry",syntax:["acsc(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acsc(2)","acsc(csc(0.5))","acsc(0.5)"],seealso:["csc","asin","asec"]};var khe={name:"acsch",category:"Trigonometry",syntax:["acsch(x)"],description:"Calculate the hyperbolic arccosecant of a value, defined as `acsch(x) = ln(1/x + sqrt(1/x^2 + 1))`.",examples:["acsch(0.5)"],seealso:["asech","acoth"]};var Che={name:"asec",category:"Trigonometry",syntax:["asec(x)"],description:"Calculate the inverse secant of a value.",examples:["asec(0.5)","asec(sec(0.5))","asec(2)"],seealso:["acos","acot","acsc"]};var Dhe={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]};var jhe={name:"asin",category:"Trigonometry",syntax:["asin(x)"],description:"Compute the inverse sine of a value in radians.",examples:["asin(0.5)","asin(sin(0.5))"],seealso:["sin","acos","atan"]};var Ohe={name:"asinh",category:"Trigonometry",syntax:["asinh(x)"],description:"Calculate the hyperbolic arcsine of a value, defined as `asinh(x) = ln(x + sqrt(x^2 + 1))`.",examples:["asinh(0.5)"],seealso:["acosh","atanh"]};var Mhe={name:"atan",category:"Trigonometry",syntax:["atan(x)"],description:"Compute the inverse tangent of a value in radians.",examples:["atan(0.5)","atan(tan(0.5))"],seealso:["tan","acos","asin"]};var Nhe={name:"atan2",category:"Trigonometry",syntax:["atan2(y, x)"],description:"Computes the principal value of the arc tangent of y/x in radians.",examples:["atan2(2, 2) / pi","angle = 60 deg in rad","x = cos(angle)","y = sin(angle)","atan2(y, x)"],seealso:["sin","cos","tan"]};var The={name:"atanh",category:"Trigonometry",syntax:["atanh(x)"],description:"Calculate the hyperbolic arctangent of a value, defined as `atanh(x) = ln((1 + x)/(1 - x)) / 2`.",examples:["atanh(0.5)"],seealso:["acosh","asinh"]};var Fhe={name:"cos",category:"Trigonometry",syntax:["cos(x)"],description:"Compute the cosine of x in radians.",examples:["cos(2)","cos(pi / 4) ^ 2","cos(180 deg)","cos(60 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["acos","sin","tan"]};var _he={name:"cosh",category:"Trigonometry",syntax:["cosh(x)"],description:"Compute the hyperbolic cosine of x in radians.",examples:["cosh(0.5)"],seealso:["sinh","tanh","coth"]};var Phe={name:"cot",category:"Trigonometry",syntax:["cot(x)"],description:"Compute the cotangent of x in radians. Defined as 1/tan(x)",examples:["cot(2)","1 / tan(2)"],seealso:["sec","csc","tan"]};var Ihe={name:"coth",category:"Trigonometry",syntax:["coth(x)"],description:"Compute the hyperbolic cotangent of x in radians.",examples:["coth(2)","1 / tanh(2)"],seealso:["sech","csch","tanh"]};var Bhe={name:"csc",category:"Trigonometry",syntax:["csc(x)"],description:"Compute the cosecant of x in radians. Defined as 1/sin(x)",examples:["csc(2)","1 / sin(2)"],seealso:["sec","cot","sin"]};var Rhe={name:"csch",category:"Trigonometry",syntax:["csch(x)"],description:"Compute the hyperbolic cosecant of x in radians. Defined as 1/sinh(x)",examples:["csch(2)","1 / sinh(2)"],seealso:["sech","coth","sinh"]};var $he={name:"sec",category:"Trigonometry",syntax:["sec(x)"],description:"Compute the secant of x in radians. Defined as 1/cos(x)",examples:["sec(2)","1 / cos(2)"],seealso:["cot","csc","cos"]};var qhe={name:"sech",category:"Trigonometry",syntax:["sech(x)"],description:"Compute the hyperbolic secant of x in radians. Defined as 1/cosh(x)",examples:["sech(2)","1 / cosh(2)"],seealso:["coth","csch","cosh"]};var Lhe={name:"sin",category:"Trigonometry",syntax:["sin(x)"],description:"Compute the sine of x in radians.",examples:["sin(2)","sin(pi / 4) ^ 2","sin(90 deg)","sin(30 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["asin","cos","tan"]};var zhe={name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]};var Uhe={name:"tan",category:"Trigonometry",syntax:["tan(x)"],description:"Compute the tangent of x in radians.",examples:["tan(0.5)","sin(0.5) / cos(0.5)","tan(pi / 4)","tan(45 deg)"],seealso:["atan","sin","cos"]};var Whe={name:"tanh",category:"Trigonometry",syntax:["tanh(x)"],description:"Compute the hyperbolic tangent of x in radians.",examples:["tanh(0.5)","sinh(0.5) / cosh(0.5)"],seealso:["sinh","cosh"]};var Vhe={name:"to",category:"Units",syntax:["x to unit","to(x, unit)"],description:"Change the unit of a value.",examples:["5 inch to cm","3.2kg to g","16 bytes in bits"],seealso:[]};var Ghe={name:"bin",category:"Utils",syntax:["bin(value)"],description:"Format a number as binary",examples:["bin(2)"],seealso:["oct","hex"]};var Hhe={name:"clone",category:"Utils",syntax:["clone(x)"],description:"Clone a variable. Creates a copy of primitive variables,and a deep copy of matrices",examples:["clone(3.5)","clone(2 - 4i)","clone(45 deg)","clone([1, 2; 3, 4])",'clone("hello world")'],seealso:[]};var Qhe={name:"format",category:"Utils",syntax:["format(value)","format(value, precision)"],description:"Format a value of any type as string.",examples:["format(2.3)","format(3 - 4i)","format([])","format(pi, 3)"],seealso:["print"]};var Yhe={name:"hasNumericValue",category:"Utils",syntax:["hasNumericValue(x)"],description:"Test whether a value is an numeric value. In case of a string, true is returned if the string contains a numeric value.",examples:["hasNumericValue(2)",'hasNumericValue("2")','isNumeric("2")',"hasNumericValue(0)","hasNumericValue(bignumber(500))","hasNumericValue(fraction(0.125))","hasNumericValue(2 + 3i)",'hasNumericValue([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","isNumeric"]};var Zhe={name:"hex",category:"Utils",syntax:["hex(value)"],description:"Format a number as hexadecimal",examples:["hex(240)"],seealso:["bin","oct"]};var Xhe={name:"isInteger",category:"Utils",syntax:["isInteger(x)"],description:"Test whether a value is an integer number.",examples:["isInteger(2)","isInteger(3.5)","isInteger([3, 0.5, -2])"],seealso:["isNegative","isNumeric","isPositive","isZero"]};var Khe={name:"isNaN",category:"Utils",syntax:["isNaN(x)"],description:"Test whether a value is NaN (not a number)",examples:["isNaN(2)","isNaN(0 / 0)","isNaN(NaN)","isNaN(Infinity)"],seealso:["isNegative","isNumeric","isPositive","isZero"]};var Jhe={name:"isNegative",category:"Utils",syntax:["isNegative(x)"],description:"Test whether a value is negative: smaller than zero.",examples:["isNegative(2)","isNegative(0)","isNegative(-4)","isNegative([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isPositive","isZero"]};var eAe={name:"isNumeric",category:"Utils",syntax:["isNumeric(x)"],description:"Test whether a value is a numeric value. Returns true when the input is a number, BigNumber, Fraction, or boolean.",examples:["isNumeric(2)",'isNumeric("2")','hasNumericValue("2")',"isNumeric(0)","isNumeric(bignumber(500))","isNumeric(fraction(0.125))","isNumeric(2 + 3i)",'isNumeric([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","hasNumericValue"]};var tAe={name:"isPositive",category:"Utils",syntax:["isPositive(x)"],description:"Test whether a value is positive: larger than zero.",examples:["isPositive(2)","isPositive(0)","isPositive(-4)","isPositive([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isNegative","isZero"]};var rAe={name:"isPrime",category:"Utils",syntax:["isPrime(x)"],description:"Test whether a value is prime: has no divisors other than itself and one.",examples:["isPrime(3)","isPrime(-2)","isPrime([2, 17, 100])"],seealso:["isInteger","isNumeric","isNegative","isZero"]};var nAe={name:"isZero",category:"Utils",syntax:["isZero(x)"],description:"Test whether a value is zero.",examples:["isZero(2)","isZero(0)","isZero(-4)","isZero([3, 0, -2, 0])"],seealso:["isInteger","isNumeric","isNegative","isPositive"]};var iAe={name:"numeric",category:"Utils",syntax:["numeric(x)"],description:"Convert a numeric input to a specific numeric type: number, BigNumber, or Fraction.",examples:['numeric("4")','numeric("4", "number")','numeric("4", "BigNumber")','numeric("4", "Fraction")','numeric(4, "Fraction")','numeric(fraction(2, 5), "number")'],seealso:["number","fraction","bignumber","string","format"]};var aAe={name:"oct",category:"Utils",syntax:["oct(value)"],description:"Format a number as octal",examples:["oct(56)"],seealso:["bin","hex"]};var oAe={name:"print",category:"Utils",syntax:["print(template, values)","print(template, values, precision)"],description:"Interpolate values into a string template.",examples:['print("Lucy is $age years old", {age: 5})','print("The value of pi is $pi", {pi: pi}, 3)','print("Hello, $user.name!", {user: {name: "John"}})','print("Values: $1, $2, $3", [6, 9, 4])'],seealso:["format"]};var sAe={name:"typeOf",category:"Utils",syntax:["typeOf(x)"],description:"Get the type of a variable.",examples:["typeOf(3.5)","typeOf(2 - 4i)","typeOf(45 deg)",'typeOf("hello world")'],seealso:["getMatrixDataType"]};var lAe={name:"solveODE",category:"Numeric",syntax:["solveODE(func, tspan, y0)","solveODE(func, tspan, y0, options)"],description:"Numerical Integration of Ordinary Differential Equations.",examples:["f(t,y) = y","tspan = [0, 4]","solveODE(f, tspan, 1)","solveODE(f, tspan, [1, 2])",'solveODE(f, tspan, 1, { method:"RK23", maxStep:0.1 })'],seealso:["derivative","simplifyCore"]};var uAe={bignumber:Jfe,boolean:ede,complex:tde,createUnit:rde,fraction:nde,index:ide,matrix:ade,number:ode,sparse:sde,splitUnit:lde,string:ude,unit:cde,e:oV,E:oV,false:Rfe,i:$fe,Infinity:qfe,LN2:zfe,LN10:Lfe,LOG2E:Wfe,LOG10E:Ufe,NaN:Vfe,null:Gfe,pi:sV,PI:sV,phi:Hfe,SQRT1_2:Qfe,SQRT2:Yfe,tau:Zfe,true:Xfe,version:Kfe,speedOfLight:{description:"Speed of light in vacuum",examples:["speedOfLight"]},gravitationConstant:{description:"Newtonian constant of gravitation",examples:["gravitationConstant"]},planckConstant:{description:"Planck constant",examples:["planckConstant"]},reducedPlanckConstant:{description:"Reduced Planck constant",examples:["reducedPlanckConstant"]},magneticConstant:{description:"Magnetic constant (vacuum permeability)",examples:["magneticConstant"]},electricConstant:{description:"Electric constant (vacuum permeability)",examples:["electricConstant"]},vacuumImpedance:{description:"Characteristic impedance of vacuum",examples:["vacuumImpedance"]},coulomb:{description:"Coulomb's constant",examples:["coulomb"]},elementaryCharge:{description:"Elementary charge",examples:["elementaryCharge"]},bohrMagneton:{description:"Borh magneton",examples:["bohrMagneton"]},conductanceQuantum:{description:"Conductance quantum",examples:["conductanceQuantum"]},inverseConductanceQuantum:{description:"Inverse conductance quantum",examples:["inverseConductanceQuantum"]},magneticFluxQuantum:{description:"Magnetic flux quantum",examples:["magneticFluxQuantum"]},nuclearMagneton:{description:"Nuclear magneton",examples:["nuclearMagneton"]},klitzing:{description:"Von Klitzing constant",examples:["klitzing"]},bohrRadius:{description:"Borh radius",examples:["bohrRadius"]},classicalElectronRadius:{description:"Classical electron radius",examples:["classicalElectronRadius"]},electronMass:{description:"Electron mass",examples:["electronMass"]},fermiCoupling:{description:"Fermi coupling constant",examples:["fermiCoupling"]},fineStructure:{description:"Fine-structure constant",examples:["fineStructure"]},hartreeEnergy:{description:"Hartree energy",examples:["hartreeEnergy"]},protonMass:{description:"Proton mass",examples:["protonMass"]},deuteronMass:{description:"Deuteron Mass",examples:["deuteronMass"]},neutronMass:{description:"Neutron mass",examples:["neutronMass"]},quantumOfCirculation:{description:"Quantum of circulation",examples:["quantumOfCirculation"]},rydberg:{description:"Rydberg constant",examples:["rydberg"]},thomsonCrossSection:{description:"Thomson cross section",examples:["thomsonCrossSection"]},weakMixingAngle:{description:"Weak mixing angle",examples:["weakMixingAngle"]},efimovFactor:{description:"Efimov factor",examples:["efimovFactor"]},atomicMass:{description:"Atomic mass constant",examples:["atomicMass"]},avogadro:{description:"Avogadro's number",examples:["avogadro"]},boltzmann:{description:"Boltzmann constant",examples:["boltzmann"]},faraday:{description:"Faraday constant",examples:["faraday"]},firstRadiation:{description:"First radiation constant",examples:["firstRadiation"]},loschmidt:{description:"Loschmidt constant at T=273.15 K and p=101.325 kPa",examples:["loschmidt"]},gasConstant:{description:"Gas constant",examples:["gasConstant"]},molarPlanckConstant:{description:"Molar Planck constant",examples:["molarPlanckConstant"]},molarVolume:{description:"Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa",examples:["molarVolume"]},sackurTetrode:{description:"Sackur-Tetrode constant at T=1 K and p=101.325 kPa",examples:["sackurTetrode"]},secondRadiation:{description:"Second radiation constant",examples:["secondRadiation"]},stefanBoltzmann:{description:"Stefan-Boltzmann constant",examples:["stefanBoltzmann"]},wienDisplacement:{description:"Wien displacement law constant",examples:["wienDisplacement"]},molarMass:{description:"Molar mass constant",examples:["molarMass"]},molarMassC12:{description:"Molar mass constant of carbon-12",examples:["molarMassC12"]},gravity:{description:"Standard acceleration of gravity (standard acceleration of free-fall on Earth)",examples:["gravity"]},planckLength:{description:"Planck length",examples:["planckLength"]},planckMass:{description:"Planck mass",examples:["planckMass"]},planckTime:{description:"Planck time",examples:["planckTime"]},planckCharge:{description:"Planck charge",examples:["planckCharge"]},planckTemperature:{description:"Planck temperature",examples:["planckTemperature"]},derivative:mde,lsolve:Ade,lsolveAll:gde,lup:vde,lusolve:yde,leafCount:hde,polynomialRoot:bde,resolve:Sde,simplify:Ede,simplifyConstant:kde,simplifyCore:Cde,symbolicEqual:jde,rationalize:wde,slu:Dde,usolve:Ode,usolveAll:Mde,qr:xde,abs:Nde,add:Tde,cbrt:Fde,ceil:_de,cube:Pde,divide:Ide,dotDivide:Bde,dotMultiply:Rde,dotPow:$de,exp:qde,expm:Lde,expm1:zde,fix:Ude,floor:Wde,gcd:Vde,hypot:Gde,lcm:Qde,log:Yde,log2:Kde,log1p:Xde,log10:Zde,mod:Jde,multiply:epe,norm:tpe,nthRoot:rpe,nthRoots:npe,pow:ipe,round:ape,sign:ope,sqrt:spe,sqrtm:lpe,square:dpe,subtract:ppe,unaryMinus:mpe,unaryPlus:hpe,xgcd:Ape,invmod:Hde,bitAnd:gpe,bitNot:vpe,bitOr:ype,bitXor:bpe,leftShift:xpe,rightArithShift:wpe,rightLogShift:Spe,bellNumbers:Epe,catalan:kpe,composition:Cpe,stirlingS2:Dpe,config:fde,import:dde,typed:pde,arg:jpe,conj:Ope,re:Npe,im:Mpe,evaluate:Tpe,help:Fpe,distance:_pe,intersect:Ppe,and:Ipe,not:Bpe,or:Rpe,xor:$pe,concat:Lpe,count:zpe,cross:Upe,column:qpe,ctranspose:Wpe,det:Vpe,diag:Gpe,diff:Hpe,dot:Qpe,getMatrixDataType:Jpe,identity:eme,filter:Zpe,flatten:Xpe,forEach:Kpe,inv:tme,pinv:rme,eigs:Ype,kron:nme,matrixFromFunction:ome,matrixFromRows:sme,matrixFromColumns:ame,map:ime,ones:lme,partitionSelect:ume,range:cme,resize:dme,reshape:fme,rotate:pme,rotationMatrix:mme,row:hme,size:Ame,sort:gme,squeeze:vme,subset:yme,trace:bme,transpose:xme,zeros:wme,fft:Sme,ifft:Eme,sylvester:upe,schur:cpe,lyap:fpe,solveODE:lAe,combinations:kme,combinationsWithRep:Cme,factorial:Dme,gamma:jme,kldivergence:Mme,lgamma:Ome,multinomial:Nme,permutations:Tme,pickRandom:Fme,random:_me,randomInt:Pme,compare:Ime,compareNatural:Bme,compareText:Rme,deepEqual:$me,equal:qme,equalText:Lme,larger:zme,largerEq:Ume,smaller:Wme,smallerEq:Vme,unequal:Gme,setCartesian:Hme,setDifference:Qme,setDistinct:Yme,setIntersect:Zme,setIsSubset:Xme,setMultiplicity:Kme,setPowerset:Jme,setSize:ehe,setSymDifference:the,setUnion:rhe,zpk2tf:nhe,freqz:ihe,erf:ahe,zeta:ohe,cumsum:Ahe,mad:she,max:lhe,mean:uhe,median:che,min:fhe,mode:dhe,prod:phe,quantileSeq:mhe,std:hhe,sum:ghe,variance:vhe,corr:yhe,acos:bhe,acosh:xhe,acot:whe,acoth:She,acsc:Ehe,acsch:khe,asec:Che,asech:Dhe,asin:jhe,asinh:Ohe,atan:Mhe,atanh:The,atan2:Nhe,cos:Fhe,cosh:_he,cot:Phe,coth:Ihe,csc:Bhe,csch:Rhe,sec:$he,sech:qhe,sin:Lhe,sinh:zhe,tan:Uhe,tanh:Whe,to:Vhe,clone:Hhe,format:Qhe,bin:Ghe,oct:aAe,hex:Zhe,isNaN:Khe,isInteger:Xhe,isNegative:Jhe,isNumeric:eAe,hasNumericValue:Yhe,isPositive:tAe,isPrime:rAe,isZero:nAe,print:oAe,typeOf:sAe,numeric:iAe};var cAe="help",dUe=["typed","mathWithTransform","Help"],S_=G(cAe,dUe,e=>{var{typed:t,mathWithTransform:r,Help:n}=e;return t(cAe,{any:function(a){var o,s=a;if(typeof a!="string"){for(o in r)if(St(r,o)&&a===r[o]){s=o;break}}var l=zi(uAe,s);if(!l){var u=typeof s=="function"?s.name:s;throw new Error('No documentation found on "'+u+'"')}return new n(l)}})});var fAe="chain",pUe=["typed","Chain"],E_=G(fAe,pUe,e=>{var{typed:t,Chain:r}=e;return t(fAe,{"":function(){return new r},any:function(i){return new r(i)}})});var dAe="det",mUe=["typed","matrix","subtractScalar","multiply","divideScalar","isZero","unaryMinus"],k_=G(dAe,mUe,e=>{var{typed:t,matrix:r,subtractScalar:n,multiply:i,divideScalar:a,isZero:o,unaryMinus:s}=e;return t(dAe,{any:function(c){return Bt(c)},"Array | Matrix":function(c){var f;switch(wt(c)?f=c.size():Array.isArray(c)?(c=r(c),f=c.size()):f=[],f.length){case 0:return Bt(c);case 1:if(f[0]===1)return Bt(c.valueOf()[0]);if(f[0]===0)return 1;throw new RangeError("Matrix must be square (size: "+er(f)+")");case 2:{var d=f[0],p=f[1];if(d===p)return l(c.clone().valueOf(),d,p);if(p===0)return 1;throw new RangeError("Matrix must be square (size: "+er(f)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+er(f)+")")}}});function l(u,c,f){if(c===1)return Bt(u[0][0]);if(c===2)return n(i(u[0][0],u[1][1]),i(u[1][0],u[0][1]));for(var d=!1,p=new Array(c).fill(0).map((k,M)=>M),h=0;h{var{typed:t,matrix:r,divideScalar:n,addScalar:i,multiply:a,unaryMinus:o,det:s,identity:l,abs:u}=e;return t(pAe,{"Array | Matrix":function(d){var p=wt(d)?d.size():Ht(d);switch(p.length){case 1:if(p[0]===1)return wt(d)?r([n(1,d.valueOf()[0])]):[n(1,d[0])];throw new RangeError("Matrix must be square (size: "+er(p)+")");case 2:{var h=p[0],m=p[1];if(h===m)return wt(d)?r(c(d.valueOf(),h,m),d.storage()):c(d,h,m);throw new RangeError("Matrix must be square (size: "+er(p)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+er(p)+")")}},any:function(d){return n(1,d)}});function c(f,d,p){var h,m,g,A,b;if(d===1){if(A=f[0][0],A===0)throw Error("Cannot calculate inverse, determinant is zero");return[[n(1,A)]]}else if(d===2){var v=s(f);if(v===0)throw Error("Cannot calculate inverse, determinant is zero");return[[n(f[1][1],v),n(o(f[0][1]),v)],[n(o(f[1][0]),v),n(f[0][0],v)]]}else{var x=f.concat();for(h=0;hk&&(k=u(x[h][S]),M=h),h++;if(k===0)throw Error("Cannot calculate inverse, determinant is zero");h=M,h!==S&&(b=x[S],x[S]=x[h],x[h]=b,b=w[S],w[S]=w[h],w[h]=b);var O=x[S],C=w[S];for(h=0;h{var{typed:t,matrix:r,inv:n,deepEqual:i,equal:a,dotDivide:o,dot:s,ctranspose:l,divideScalar:u,multiply:c,add:f,Complex:d}=e;return t(mAe,{"Array | Matrix":function(v){var x=wt(v)?v.size():Ht(v);switch(x.length){case 1:return A(v)?l(v):x[0]===1?n(v):o(l(v),s(v,v));case 2:{if(A(v))return l(v);var w=x[0],S=x[1];if(w===S)try{return n(v)}catch(k){if(!(k instanceof Error&&k.message.match(/Cannot calculate inverse, determinant is zero/)))throw k}return wt(v)?r(p(v.valueOf(),w,S),v.storage()):p(v,w,S)}default:throw new RangeError("Matrix must be two dimensional (size: "+er(x)+")")}},any:function(v){return a(v,0)?Bt(v):u(1,v)}});function p(b,v,x){var{C:w,F:S}=m(b,v,x),k=c(n(c(l(w),w)),l(w)),M=c(l(S),n(c(S,l(S))));return c(M,k)}function h(b,v,x){for(var w=Bt(b),S=0,k=0;kM.filter((C,T)=>T!g(s(w[O],w[O])));return{C:S,F:k}}function g(b){return a(f(b,d(1,1)),f(0,d(1,1)))}function A(b){return i(f(b,d(1,1)),f(c(b,0),d(1,1)))}});function hAe(e){var{addScalar:t,subtract:r,flatten:n,multiply:i,multiplyScalar:a,divideScalar:o,sqrt:s,abs:l,bignumber:u,diag:c,size:f,reshape:d,inv:p,qr:h,usolve:m,usolveAll:g,equal:A,complex:b,larger:v,smaller:x,matrixFromColumns:w,dot:S}=e;function k(re,Q,he,Ie){var xe=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,Oe=M(re,Q,he,Ie,xe);O(re,Q,he,Ie,xe,Oe);var{values:Re,C:_e}=C(re,Q,he,Ie,xe);if(xe){var we=T(re,Q,_e,Oe,Re,he,Ie);return{values:Re,eigenvectors:we}}return{values:Re}}function M(re,Q,he,Ie,xe){var Oe=Ie==="BigNumber",Re=Ie==="Complex",_e=Oe?u(0):0,we=Oe?u(1):Re?b(1):1,se=Oe?u(1):1,L=Oe?u(10):2,ue=a(L,L),ce;xe&&(ce=Array(Q).fill(we));for(var U=!1;!U;){U=!0;for(var $=0;$1&&(U=c(Array(L-1).fill(_e)))),L-=1,we.pop();for(var ke=0;ke2&&(U=c(Array(L-2).fill(_e)))),L-=2,we.pop(),we.pop();for(var me=0;me+r(l(tt),l(Et))),$>100){var ze=Error("The eigenvalues failed to converge. Only found these eigenvalues: "+se.join(", "));throw ze.values=se,ze.vectors=[],ze}var Ye=xe?i(ce,q(ue,Q)):void 0;return{values:se,C:Ye}}function T(re,Q,he,Ie,xe,Oe,Re){var _e=p(he),we=i(_e,re,he),se=Re==="BigNumber",L=Re==="Complex",ue=se?u(0):L?b(0):0,ce=se?u(1):L?b(1):1,U=[],$=[];for(var ee of xe){var Y=B(U,ee,A);Y===-1?(U.push(ee),$.push(1)):$[Y]+=1}for(var te=[],ie=U.length,Se=Array(Q).fill(ue),ke=c(Array(Q).fill(ce)),Me=function(){var Ye=U[me],tt=r(we,i(Ye,ke)),Et=g(tt,Se);for(Et.shift();Et.length<$[me];){var be=N(tt,Q,Et,Oe,Re);if(be===null)break;Et.push(be)}var Pe=i(p(Ie),he);Et=Et.map(Le=>i(Pe,Le)),te.push(...Et.map(Le=>({value:Ye,vector:n(Le)})))},me=0;me=5)return null;for(_e=0;;){var we=m(re,Re);if(x(X(_(Re,[we])),Ie))break;if(++_e>=10)return null;Re=oe(we)}return Re}function W(re,Q,he){var Ie=he==="BigNumber",xe=he==="Complex",Oe=Array(re).fill(0).map(Re=>2*Math.random()-1);return Ie&&(Oe=Oe.map(Re=>u(Re))),xe&&(Oe=Oe.map(Re=>b(Re))),Oe=_(Oe,Q),oe(Oe,he)}function _(re,Q){var he=f(re);for(var Ie of Q)Ie=d(Ie,he),re=r(re,i(o(S(Ie,re),S(Ie,Ie)),Ie));return re}function X(re){return l(s(S(re,re)))}function oe(re,Q){var he=Q==="BigNumber",Ie=Q==="Complex",xe=he?u(1):Ie?b(1):1;return i(o(xe,X(re)),re)}return k}function AAe(e){var{config:t,addScalar:r,subtract:n,abs:i,atan:a,cos:o,sin:s,multiplyScalar:l,inv:u,bignumber:c,multiply:f,add:d}=e;function p(O,C){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.epsilon,D=arguments.length>3?arguments[3]:void 0,P=arguments.length>4?arguments[4]:void 0;if(D==="number")return h(O,T,P);if(D==="BigNumber")return m(O,T,P);throw TypeError("Unsupported data type: "+D)}function h(O,C,T){var D=O.length,P=Math.abs(C/D),R,q;if(T){q=new Array(D);for(var B=0;B=Math.abs(P);){var W=N[0][0],_=N[0][1];R=g(O[W][W],O[_][_],O[W][_]),O=w(O,R,W,_),T&&(q=b(q,R,W,_)),N=S(O)}for(var X=Array(D).fill(0),oe=0;oe=i(P);){var W=N[0][0],_=N[0][1];R=A(O[W][W],O[_][_],O[W][_]),O=x(O,R,W,_),T&&(q=v(q,R,W,_)),N=k(O)}for(var X=Array(D).fill(0),oe=0;oe({value:P[Q],vector:re}));return{values:P,eigenvectors:oe}}return p}var gUe="eigs",vUe=["config","typed","matrix","addScalar","equal","subtract","abs","atan","cos","sin","multiplyScalar","divideScalar","inv","bignumber","multiply","add","larger","column","flatten","number","complex","sqrt","diag","size","reshape","qr","usolve","usolveAll","im","re","smaller","matrixFromColumns","dot"],j_=G(gUe,vUe,e=>{var{config:t,typed:r,matrix:n,addScalar:i,subtract:a,equal:o,abs:s,atan:l,cos:u,sin:c,multiplyScalar:f,divideScalar:d,inv:p,bignumber:h,multiply:m,add:g,larger:A,column:b,flatten:v,number:x,complex:w,sqrt:S,diag:k,size:M,reshape:O,qr:C,usolve:T,usolveAll:D,im:P,re:R,smaller:q,matrixFromColumns:B,dot:N}=e,W=AAe({config:t,addScalar:i,subtract:a,column:b,flatten:v,equal:o,abs:s,atan:l,cos:u,sin:c,multiplyScalar:f,inv:p,bignumber:h,complex:w,multiply:m,add:g}),_=hAe({config:t,addScalar:i,subtract:a,multiply:m,multiplyScalar:f,flatten:v,divideScalar:d,sqrt:S,abs:s,bignumber:h,diag:k,size:M,reshape:O,qr:C,inv:p,usolve:T,usolveAll:D,equal:o,complex:w,larger:A,smaller:q,matrixFromColumns:B,dot:N});return r("eigs",{Array:function(Oe){return X(n(Oe))},"Array, number|BigNumber":function(Oe,Re){return X(n(Oe),{precision:Re})},"Array, Object"(xe,Oe){return X(n(xe),Oe)},Matrix:function(Oe){return X(Oe,{matricize:!0})},"Matrix, number|BigNumber":function(Oe,Re){return X(Oe,{precision:Re,matricize:!0})},"Matrix, Object":function(Oe,Re){var _e={matricize:!0};return Mn(_e,Re),X(Oe,_e)}});function X(xe){var Oe,Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_e="eigenvectors"in Re?Re.eigenvectors:!0,we=(Oe=Re.precision)!==null&&Oe!==void 0?Oe:t.epsilon,se=oe(xe,we,_e);return Re.matricize&&(se.values=n(se.values),_e&&(se.eigenvectors=se.eigenvectors.map(L=>{var{value:ue,vector:ce}=L;return{value:ue,vector:n(ce)}}))),_e&&Object.defineProperty(se,"vectors",{enumerable:!1,get:()=>{throw new Error("eigs(M).vectors replaced with eigs(M).eigenvectors")}}),se}function oe(xe,Oe,Re){var _e=xe.toArray(),we=xe.size();if(we.length!==2||we[0]!==we[1])throw new RangeError("Matrix must be square (size: ".concat(er(we),")"));var se=we[0];if(Q(_e,se,Oe)&&(he(_e,se),re(_e,se,Oe))){var L=Ie(xe,_e,se);return W(_e,se,Oe,L,Re)}var ue=Ie(xe,_e,se);return _(_e,se,Oe,ue,Re)}function re(xe,Oe,Re){for(var _e=0;_e{var{typed:t,abs:r,add:n,identity:i,inv:a,multiply:o}=e;return t(gAe,{Matrix:function(f){var d=f.size();if(d.length!==2||d[0]!==d[1])throw new RangeError("Matrix must be square (size: "+er(d)+")");for(var p=d[0],h=1e-15,m=s(f),g=l(m,h),A=g.q,b=g.j,v=o(f,Math.pow(2,-b)),x=i(p),w=i(p),S=1,k=v,M=-1,O=1;O<=A;O++)O>1&&(k=o(k,v),M=-M),S=S*(A-O+1)/((2*A-O+1)*O),x=n(x,o(S,k)),w=n(w,o(S*M,k));for(var C=o(a(w),x),T=0;T{var{typed:t,abs:r,add:n,multiply:i,map:a,sqrt:o,subtract:s,inv:l,size:u,max:c,identity:f}=e,d=1e3,p=1e-6;function h(m){var g,A=0,b=m,v=f(u(m));do{var x=b;if(b=i(.5,n(x,l(v))),v=i(.5,n(v,l(x))),g=c(r(s(b,x))),g>p&&++A>d)throw new Error("computing square root of matrix: iterative method could not converge")}while(g>p);return b}return t(vAe,{"Array | Matrix":function(g){var A=wt(g)?g.size():Ht(g);switch(A.length){case 1:if(A[0]===1)return a(g,o);throw new RangeError("Matrix must be square (size: "+er(A)+")");case 2:{var b=A[0],v=A[1];if(b===v)return h(g);throw new RangeError("Matrix must be square (size: "+er(A)+")")}default:throw new RangeError("Matrix must be at most two dimensional (size: "+er(A)+")")}}})});var yAe="sylvester",xUe=["typed","schur","matrixFromColumns","matrix","multiply","range","concat","transpose","index","subset","add","subtract","identity","lusolve","abs"],N_=G(yAe,xUe,e=>{var{typed:t,schur:r,matrixFromColumns:n,matrix:i,multiply:a,range:o,concat:s,transpose:l,index:u,subset:c,add:f,subtract:d,identity:p,lusolve:h,abs:m}=e;return t(yAe,{"Matrix, Matrix, Matrix":g,"Array, Matrix, Matrix":function(b,v,x){return g(i(b),v,x)},"Array, Array, Matrix":function(b,v,x){return g(i(b),i(v),x)},"Array, Matrix, Array":function(b,v,x){return g(i(b),v,i(x))},"Matrix, Array, Matrix":function(b,v,x){return g(b,i(v),x)},"Matrix, Array, Array":function(b,v,x){return g(b,i(v),i(x))},"Matrix, Matrix, Array":function(b,v,x){return g(b,v,i(x))},"Array, Array, Array":function(b,v,x){return g(i(b),i(v),i(x)).toArray()}});function g(A,b,v){for(var x=b.size()[0],w=A.size()[0],S=r(A),k=S.T,M=S.U,O=r(a(-1,b)),C=O.T,T=O.U,D=a(a(l(M),v),T),P=o(0,w),R=[],q=(L,ue)=>s(L,ue,1),B=(L,ue)=>s(L,ue,0),N=0;N1e-5){for(var W=B(c(D,u(P,N)),c(D,u(P,N+1))),_=0;_{var{typed:t,matrix:r,identity:n,multiply:i,qr:a,norm:o,subtract:s}=e;return t(bAe,{Array:function(c){var f=l(r(c));return{U:f.U.valueOf(),T:f.T.valueOf()}},Matrix:function(c){return l(c)}});function l(u){var c=u.size()[0],f=u,d=n(c),p=0,h;do{h=f;var m=a(f),g=m.Q,A=m.R;if(f=i(A,g),d=i(d,g),p++>100)break}while(o(s(f,h))>1e-4);return{U:d,T:f}}});var xAe="lyap",SUe=["typed","matrix","sylvester","multiply","transpose"],F_=G(xAe,SUe,e=>{var{typed:t,matrix:r,sylvester:n,multiply:i,transpose:a}=e;return t(xAe,{"Matrix, Matrix":function(s,l){return n(s,a(s),i(-1,l))},"Array, Matrix":function(s,l){return n(r(s),a(r(s)),i(-1,l))},"Matrix, Array":function(s,l){return n(s,a(r(s)),r(i(-1,l)))},"Array, Array":function(s,l){return n(r(s),a(r(s)),r(i(-1,l))).toArray()}})});var EUe="divide",kUe=["typed","matrix","multiply","equalScalar","divideScalar","inv"],__=G(EUe,kUe,e=>{var{typed:t,matrix:r,multiply:n,equalScalar:i,divideScalar:a,inv:o}=e,s=Ln({typed:t,equalScalar:i}),l=ro({typed:t});return t("divide",MN({"Array | Matrix, Array | Matrix":function(c,f){return n(c,o(f))},"DenseMatrix, any":function(c,f){return l(c,f,a,!1)},"SparseMatrix, any":function(c,f){return s(c,f,a,!1)},"Array, any":function(c,f){return l(r(c),f,a,!1).valueOf()},"any, Array | Matrix":function(c,f){return n(c,o(f))}},a.signatures))});var wAe="distance",CUe=["typed","addScalar","subtractScalar","divideScalar","multiplyScalar","deepEqual","sqrt","abs"],P_=G(wAe,CUe,e=>{var{typed:t,addScalar:r,subtractScalar:n,multiplyScalar:i,divideScalar:a,deepEqual:o,sqrt:s,abs:l}=e;return t(wAe,{"Array, Array, Array":function(w,S,k){if(w.length===2&&S.length===2&&k.length===2){if(!c(w))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!c(S))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!c(k))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(o(S,k))throw new TypeError("LinePoint1 should not be same with LinePoint2");var M=n(k[1],S[1]),O=n(S[0],k[0]),C=n(i(k[0],S[1]),i(S[0],k[1]));return g(w[0],w[1],M,O,C)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object, Object":function(w,S,k){if(Object.keys(w).length===2&&Object.keys(S).length===2&&Object.keys(k).length===2){if(!c(w))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!c(S))throw new TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!c(k))throw new TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");if(o(h(S),h(k)))throw new TypeError("LinePoint1 should not be same with LinePoint2");if("pointX"in w&&"pointY"in w&&"lineOnePtX"in S&&"lineOnePtY"in S&&"lineTwoPtX"in k&&"lineTwoPtY"in k){var M=n(k.lineTwoPtY,S.lineOnePtY),O=n(S.lineOnePtX,k.lineTwoPtX),C=n(i(k.lineTwoPtX,S.lineOnePtY),i(S.lineOnePtX,k.lineTwoPtY));return g(w.pointX,w.pointY,M,O,C)}else throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},"Array, Array":function(w,S){if(w.length===2&&S.length===3){if(!c(w))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!f(S))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return g(w[0],w[1],S[0],S[1],S[2])}else if(w.length===3&&S.length===6){if(!f(w))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!p(S))throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument");return A(w[0],w[1],w[2],S[0],S[1],S[2],S[3],S[4],S[5])}else if(w.length===S.length&&w.length>0){if(!d(w))throw new TypeError("All values of an array should be numbers or BigNumbers");if(!d(S))throw new TypeError("All values of an array should be numbers or BigNumbers");return b(w,S)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object":function(w,S){if(Object.keys(w).length===2&&Object.keys(S).length===3){if(!c(w))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!f(S))throw new TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if("pointX"in w&&"pointY"in w&&"xCoeffLine"in S&&"yCoeffLine"in S&&"constant"in S)return g(w.pointX,w.pointY,S.xCoeffLine,S.yCoeffLine,S.constant);throw new TypeError("Key names do not match")}else if(Object.keys(w).length===3&&Object.keys(S).length===6){if(!f(w))throw new TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!p(S))throw new TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if("pointX"in w&&"pointY"in w&&"x0"in S&&"y0"in S&&"z0"in S&&"a"in S&&"b"in S&&"c"in S)return A(w.pointX,w.pointY,w.pointZ,S.x0,S.y0,S.z0,S.a,S.b,S.c);throw new TypeError("Key names do not match")}else if(Object.keys(w).length===2&&Object.keys(S).length===2){if(!c(w))throw new TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!c(S))throw new TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if("pointOneX"in w&&"pointOneY"in w&&"pointTwoX"in S&&"pointTwoY"in S)return b([w.pointOneX,w.pointOneY],[S.pointTwoX,S.pointTwoY]);throw new TypeError("Key names do not match")}else if(Object.keys(w).length===3&&Object.keys(S).length===3){if(!f(w))throw new TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!f(S))throw new TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if("pointOneX"in w&&"pointOneY"in w&&"pointOneZ"in w&&"pointTwoX"in S&&"pointTwoY"in S&&"pointTwoZ"in S)return b([w.pointOneX,w.pointOneY,w.pointOneZ],[S.pointTwoX,S.pointTwoY,S.pointTwoZ]);throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},Array:function(w){if(!m(w))throw new TypeError("Incorrect array format entered for pairwise distance calculation");return v(w)}});function u(x){return typeof x=="number"||Ft(x)}function c(x){return x.constructor!==Array&&(x=h(x)),u(x[0])&&u(x[1])}function f(x){return x.constructor!==Array&&(x=h(x)),u(x[0])&&u(x[1])&&u(x[2])}function d(x){return Array.isArray(x)||(x=h(x)),x.every(u)}function p(x){return x.constructor!==Array&&(x=h(x)),u(x[0])&&u(x[1])&&u(x[2])&&u(x[3])&&u(x[4])&&u(x[5])}function h(x){for(var w=Object.keys(x),S=[],k=0;kw.length!==2||!u(w[0])||!u(w[1])))return!1}else if(x[0].length===3&&u(x[0][0])&&u(x[0][1])&&u(x[0][2])){if(x.some(w=>w.length!==3||!u(w[0])||!u(w[1])||!u(w[2])))return!1}else return!1;return!0}function g(x,w,S,k,M){var O=l(r(r(i(S,x),i(k,w)),M)),C=s(r(i(S,S),i(k,k)));return a(O,C)}function A(x,w,S,k,M,O,C,T,D){var P=[n(i(n(M,w),D),i(n(O,S),T)),n(i(n(O,S),C),i(n(k,x),D)),n(i(n(k,x),T),i(n(M,w),C))];P=s(r(r(i(P[0],P[0]),i(P[1],P[1])),i(P[2],P[2])));var R=s(r(r(i(C,C),i(T,T)),i(D,D)));return a(P,R)}function b(x,w){for(var S=x.length,k=0,M=0,O=0;O{var{typed:t,config:r,abs:n,add:i,addScalar:a,matrix:o,multiply:s,multiplyScalar:l,divideScalar:u,subtract:c,smaller:f,equalScalar:d,flatten:p,isZero:h,isNumeric:m}=e;return t("intersect",{"Array, Array, Array":g,"Array, Array, Array, Array":A,"Matrix, Matrix, Matrix":function(T,D,P){var R=g(T.valueOf(),D.valueOf(),P.valueOf());return R===null?null:o(R)},"Matrix, Matrix, Matrix, Matrix":function(T,D,P,R){var q=A(T.valueOf(),D.valueOf(),P.valueOf(),R.valueOf());return q===null?null:o(q)}});function g(C,T,D){if(C=b(C),T=b(T),D=b(D),!x(C))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!x(T))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!w(D))throw new TypeError("Array with 4 numbers expected as third argument");return O(C[0],C[1],C[2],T[0],T[1],T[2],D[0],D[1],D[2],D[3])}function A(C,T,D,P){if(C=b(C),T=b(T),D=b(D),P=b(P),C.length===2){if(!v(C))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!v(T))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!v(D))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(!v(P))throw new TypeError("Array with 2 numbers or BigNumbers expected for fourth argument");return S(C,T,D,P)}else if(C.length===3){if(!x(C))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!x(T))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!x(D))throw new TypeError("Array with 3 numbers or BigNumbers expected for third argument");if(!x(P))throw new TypeError("Array with 3 numbers or BigNumbers expected for fourth argument");return M(C[0],C[1],C[2],T[0],T[1],T[2],D[0],D[1],D[2],P[0],P[1],P[2])}else throw new TypeError("Arrays with two or thee dimensional points expected")}function b(C){return C.length===1?C[0]:C.length>1&&Array.isArray(C[0])&&C.every(T=>Array.isArray(T)&&T.length===1)?p(C):C}function v(C){return C.length===2&&m(C[0])&&m(C[1])}function x(C){return C.length===3&&m(C[0])&&m(C[1])&&m(C[2])}function w(C){return C.length===4&&m(C[0])&&m(C[1])&&m(C[2])&&m(C[3])}function S(C,T,D,P){var R=C,q=D,B=c(R,T),N=c(q,P),W=c(l(B[0],N[1]),l(N[0],B[1]));if(h(W)||f(n(W),r.epsilon))return null;var _=l(N[0],R[1]),X=l(N[1],R[0]),oe=l(N[0],q[1]),re=l(N[1],q[0]),Q=u(a(c(c(_,X),oe),re),W);return i(s(B,Q),R)}function k(C,T,D,P,R,q,B,N,W,_,X,oe){var re=l(c(C,T),c(D,P)),Q=l(c(R,q),c(B,N)),he=l(c(W,_),c(X,oe));return a(a(re,Q),he)}function M(C,T,D,P,R,q,B,N,W,_,X,oe){var re=k(C,B,_,B,T,N,X,N,D,W,oe,W),Q=k(_,B,P,C,X,N,R,T,oe,W,q,D),he=k(C,B,P,C,T,N,R,T,D,W,q,D),Ie=k(_,B,_,B,X,N,X,N,oe,W,oe,W),xe=k(P,C,P,C,R,T,R,T,q,D,q,D),Oe=c(l(re,Q),l(he,Ie)),Re=c(l(xe,Ie),l(Q,Q));if(h(Re))return null;var _e=u(Oe,Re),we=u(a(re,l(_e,Q)),Ie),se=a(C,l(_e,c(P,C))),L=a(T,l(_e,c(R,T))),ue=a(D,l(_e,c(q,D))),ce=a(B,l(we,c(_,B))),U=a(N,l(we,c(X,N))),$=a(W,l(we,c(oe,W)));return d(se,ce)&&d(L,U)&&d(ue,$)?[se,L,ue]:null}function O(C,T,D,P,R,q,B,N,W,_){var X=l(C,B),oe=l(P,B),re=l(T,N),Q=l(R,N),he=l(D,W),Ie=l(q,W),xe=c(c(c(_,X),re),he),Oe=c(c(c(a(a(oe,Q),Ie),X),re),he),Re=u(xe,Oe),_e=a(C,l(Re,c(P,C))),we=a(T,l(Re,c(R,T))),se=a(D,l(Re,c(q,D)));return[_e,we,se]}});var SAe="sum",OUe=["typed","config","add","numeric"],Gw=G(SAe,OUe,e=>{var{typed:t,config:r,add:n,numeric:i}=e;return t(SAe,{"Array | Matrix":a,"Array | Matrix, number | BigNumber":o,"...":function(l){if(ad(l))throw new TypeError("Scalar values expected in function sum");return a(l)}});function a(s){var l;return Pl(s,function(u){try{l=l===void 0?u:n(l,u)}catch(c){throw Da(c,"sum",u)}}),l===void 0&&(l=i(0,r.number)),typeof l=="string"&&(l=i(l,r.number)),l}function o(s,l){try{var u=x0(s,l,n);return u}catch(c){throw Da(c,"sum")}}});var B_="cumsum",MUe=["typed","add","unaryPlus"],Hw=G(B_,MUe,e=>{var{typed:t,add:r,unaryPlus:n}=e;return t(B_,{Array:i,Matrix:function(u){return u.create(i(u.valueOf()))},"Array, number | BigNumber":o,"Matrix, number | BigNumber":function(u,c){return u.create(o(u.valueOf(),c))},"...":function(u){if(ad(u))throw new TypeError("All values expected to be scalar in function cumsum");return i(u)}});function i(l){try{return a(l)}catch(u){throw Da(u,B_)}}function a(l){if(l.length===0)return[];for(var u=[n(l[0])],c=1;c=c.length)throw new Ko(u,c.length);try{return s(l,u)}catch(f){throw Da(f,B_)}}function s(l,u){var c,f,d;if(u<=0){var p=l[0][0];if(Array.isArray(p)){for(d=oT(l),f=[],c=0;c{var{typed:t,add:r,divide:n}=e;return t(EAe,{"Array | Matrix":a,"Array | Matrix, number | BigNumber":i,"...":function(s){if(ad(s))throw new TypeError("Scalar values expected in function mean");return a(s)}});function i(o,s){try{var l=x0(o,s,r),u=Array.isArray(o)?Ht(o):o.size();return n(l,u[s])}catch(c){throw Da(c,"mean")}}function a(o){var s,l=0;if(Pl(o,function(u){try{s=s===void 0?u:r(s,u),l++}catch(c){throw Da(c,"mean",u)}}),l===0)throw new Error("Cannot calculate the mean of an empty array");return n(s,l)}});var kAe="median",TUe=["typed","add","divide","compare","partitionSelect"],R_=G(kAe,TUe,e=>{var{typed:t,add:r,divide:n,compare:i,partitionSelect:a}=e;function o(u){try{u=hr(u.valueOf());var c=u.length;if(c===0)throw new Error("Cannot calculate median of an empty array");if(c%2===0){for(var f=c/2-1,d=a(u,f+1),p=u[f],h=0;h0&&(p=u[h]);return l(p,d)}else{var m=a(u,(c-1)/2);return s(m)}}catch(g){throw Da(g,"median")}}var s=t({"number | BigNumber | Complex | Unit":function(c){return c}}),l=t({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(c,f){return n(r(c,f),2)}});return t(kAe,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(c,f){throw new Error("median(A, dim) is not yet supported")},"...":function(c){if(ad(c))throw new TypeError("Scalar values expected in function median");return o(c)}})});var CAe="mad",FUe=["typed","abs","map","median","subtract"],$_=G(CAe,FUe,e=>{var{typed:t,abs:r,map:n,median:i,subtract:a}=e;return t(CAe,{"Array | Matrix":o,"...":function(l){return o(l)}});function o(s){if(s=hr(s.valueOf()),s.length===0)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var l=i(s);return i(n(s,function(u){return r(a(u,l))}))}catch(u){throw u instanceof TypeError&&u.message.indexOf("median")!==-1?new TypeError(u.message.replace("median","mad")):Da(u,"mad")}}});var lV="unbiased",DAe="variance",_Ue=["typed","add","subtract","multiply","divide","apply","isNaN"],Yw=G(DAe,_Ue,e=>{var{typed:t,add:r,subtract:n,multiply:i,divide:a,apply:o,isNaN:s}=e;return t(DAe,{"Array | Matrix":function(f){return l(f,lV)},"Array | Matrix, string":l,"Array | Matrix, number | BigNumber":function(f,d){return u(f,d,lV)},"Array | Matrix, number | BigNumber, string":u,"...":function(f){return l(f,lV)}});function l(c,f){var d,p=0;if(c.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");if(Pl(c,function(g){try{d=d===void 0?g:r(d,g),p++}catch(A){throw Da(A,"variance",g)}}),p===0)throw new Error("Cannot calculate variance of an empty array");var h=a(d,p);if(d=void 0,Pl(c,function(g){var A=n(g,h);d=d===void 0?i(A,A):r(d,i(A,A))}),s(d))return d;switch(f){case"uncorrected":return a(d,p);case"biased":return a(d,p+1);case"unbiased":{var m=Ft(d)?d.mul(0):0;return p===1?m:a(d,p-1)}default:throw new Error('Unknown normalization "'+f+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function u(c,f,d){try{if(c.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");return o(c,f,p=>l(p,d))}catch(p){throw Da(p,"variance")}}});var jAe="quantileSeq",PUe=["typed","?bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger"],Zw=G(jAe,PUe,e=>{var{typed:t,bignumber:r,add:n,subtract:i,divide:a,multiply:o,partitionSelect:s,compare:l,isInteger:u,smaller:c,smallerEq:f,larger:d}=e,p=w0({typed:t,isInteger:u});return t(jAe,{"Array | Matrix, number | BigNumber":(b,v)=>m(b,v,!1),"Array | Matrix, number | BigNumber, number":(b,v,x)=>h(b,v,!1,x,m),"Array | Matrix, number | BigNumber, boolean":m,"Array | Matrix, number | BigNumber, boolean, number":(b,v,x,w)=>h(b,v,x,w,m),"Array | Matrix, Array | Matrix":(b,v)=>g(b,v,!1),"Array | Matrix, Array | Matrix, number":(b,v,x)=>h(b,v,!1,x,g),"Array | Matrix, Array | Matrix, boolean":g,"Array | Matrix, Array | Matrix, boolean, number":(b,v,x,w)=>h(b,v,x,w,g)});function h(b,v,x,w,S){return p(b,w,k=>S(k,v,x))}function m(b,v,x){var w,S=b.valueOf();if(c(v,0))throw new Error("N/prob must be non-negative");if(f(v,1))return Gt(v)?A(S,v,x):r(A(S,v,x));if(d(v,1)){if(!u(v))throw new Error("N must be a positive integer");if(d(v,4294967295))throw new Error("N must be less than or equal to 2^32-1, as that is the maximum length of an Array");var k=n(v,1);w=[];for(var M=0;c(M,v);M++){var O=a(M+1,k);w.push(A(S,O,x))}return Gt(v)?w:r(w)}}function g(b,v,x){for(var w=b.valueOf(),S=v.valueOf(),k=[],M=0;M0&&(C=w[D])}return n(o(C,i(1,O)),o(T,O))}});var OAe="std",IUe=["typed","map","sqrt","variance"],Xw=G(OAe,IUe,e=>{var{typed:t,map:r,sqrt:n,variance:i}=e;return t(OAe,{"Array | Matrix":a,"Array | Matrix, string":a,"Array | Matrix, number | BigNumber":a,"Array | Matrix, number | BigNumber, string":a,"...":function(s){return a(s)}});function a(o,s){if(o.length===0)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{var l=i.apply(null,arguments);return ha(l)?r(l,n):n(l)}catch(u){throw u instanceof TypeError&&u.message.indexOf(" variance")!==-1?new TypeError(u.message.replace(" variance"," std")):u}}});var MAe="corr",BUe=["typed","matrix","mean","sqrt","sum","add","subtract","multiply","pow","divide"],q_=G(MAe,BUe,e=>{var{typed:t,matrix:r,sqrt:n,sum:i,add:a,subtract:o,multiply:s,pow:l,divide:u}=e;return t(MAe,{"Array, Array":function(p,h){return c(p,h)},"Matrix, Matrix":function(p,h){var m=c(p.toArray(),h.toArray());return Array.isArray(m)?r(m):m}});function c(d,p){var h=[];if(Array.isArray(d[0])&&Array.isArray(p[0])){if(d.length!==p.length)throw new SyntaxError("Dimension mismatch. Array A and B must have the same length.");for(var m=0;ma(S,s(k,p[M])),0),b=i(d.map(S=>l(S,2))),v=i(p.map(S=>l(S,2))),x=o(s(h,A),s(m,g)),w=n(s(o(s(h,b),l(m,2)),o(s(h,v),l(g,2))));return u(x,w)}});var NAe="combinations",RUe=["typed"],L_=G(NAe,RUe,e=>{var{typed:t}=e;return t(NAe,{"number, number":xW,"BigNumber, BigNumber":function(n,i){var a=n.constructor,o,s,l=n.minus(i),u=new a(1);if(!TAe(n)||!TAe(i))throw new TypeError("Positive integer value expected in function combinations");if(i.gt(n))throw new TypeError("k must be less than n in function combinations");if(o=u,i.lt(l))for(s=u;s.lte(l);s=s.plus(u))o=o.times(i.plus(s)).dividedBy(s);else for(s=u;s.lte(i);s=s.plus(u))o=o.times(l.plus(s)).dividedBy(s);return o}})});function TAe(e){return e.isInteger()&&e.gte(0)}var FAe="combinationsWithRep",$Ue=["typed"],z_=G(FAe,$Ue,e=>{var{typed:t}=e;return t(FAe,{"number, number":function(n,i){if(!xt(n)||n<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(!xt(i)||i<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(n<1)throw new TypeError("k must be less than or equal to n + k - 1");if(i{var{typed:t,config:r,multiplyScalar:n,pow:i,BigNumber:a,Complex:o}=e;function s(u){if(u.im===0)return g6(u.re);if(u.re<.5){var c=new o(1-u.re,-u.im),f=new o(Math.PI*u.re,Math.PI*u.im);return new o(Math.PI).div(f.sin()).div(s(c))}u=new o(u.re-1,u.im);for(var d=new o(K1[0],0),p=1;p2;)d-=2,h+=d,p=p.times(h);return new a(p.toPrecision(a.precision))}});var IAe="lgamma",LUe=["Complex","typed"],W_=G(IAe,LUe,e=>{var{Complex:t,typed:r}=e,n=7,i=7,a=[-.029550653594771242,.00641025641025641,-.0019175269175269176,.0008417508417508417,-.0005952380952380953,.0007936507936507937,-.002777777777777778,.08333333333333333];return r(IAe,{number:v6,Complex:o,BigNumber:function(){throw new Error("mathjs doesn't yet provide an implementation of the algorithm lgamma for BigNumber")}});function o(u){var c=6.283185307179586,f=1.1447298858494002,d=.1;if(u.isNaN())return new t(NaN,NaN);if(u.im===0)return new t(v6(u.re),0);if(u.re>=n||Math.abs(u.im)>=i)return s(u);if(u.re<=d){var p=pse(c,u.im)*Math.floor(.5*u.re+.25),h=u.mul(Math.PI).sin().log(),m=o(new t(1-u.re,-u.im));return new t(f,p).sub(h).sub(m)}else return u.im>=0?l(u):l(u.conjugate()).conjugate()}function s(u){for(var c=u.sub(.5).mul(u.log()).sub(u).add(jW),f=new t(1,0).div(u),d=f.div(u),p=a[0],h=a[1],m=2*d.re,g=d.re*d.re+d.im*d.im,A=2;A<8;A++){var b=h;h=-g*p+a[A],p=m*p+b}var v=f.mul(d.mul(p).add(h));return c.add(v)}function l(u){var c=0,f=0,d=u;for(u=u.add(1);u.re<=n;){d=d.mul(u);var p=d.im<0?1:0;p!==0&&f===0&&c++,f=p,u=u.add(1)}return s(u).sub(d.log()).sub(new t(0,c*2*Math.PI*1))}});var BAe="factorial",zUe=["typed","gamma"],V_=G(BAe,zUe,e=>{var{typed:t,gamma:r}=e;return t(BAe,{number:function(i){if(i<0)throw new Error("Value must be non-negative");return r(i+1)},BigNumber:function(i){if(i.isNegative())throw new Error("Value must be non-negative");return r(i.plus(1))},"Array | Matrix":t.referToSelf(n=>i=>jt(i,n))})});var RAe="kldivergence",UUe=["typed","matrix","divide","sum","multiply","map","dotDivide","log","isNumeric"],G_=G(RAe,UUe,e=>{var{typed:t,matrix:r,divide:n,sum:i,multiply:a,map:o,dotDivide:s,log:l,isNumeric:u}=e;return t(RAe,{"Array, Array":function(d,p){return c(r(d),r(p))},"Matrix, Array":function(d,p){return c(d,r(p))},"Array, Matrix":function(d,p){return c(r(d),p)},"Matrix, Matrix":function(d,p){return c(d,p)}});function c(f,d){var p=d.size().length,h=f.size().length;if(p>1)throw new Error("first object must be one dimensional");if(h>1)throw new Error("second object must be one dimensional");if(p!==h)throw new Error("Length of two vectors must be equal");var m=i(f);if(m===0)throw new Error("Sum of elements in first object must be non zero");var g=i(d);if(g===0)throw new Error("Sum of elements in second object must be non zero");var A=n(f,i(f)),b=n(d,i(d)),v=i(a(A,o(s(A,b),x=>l(x))));return u(v)?v:Number.NaN}});var $Ae="multinomial",WUe=["typed","add","divide","multiply","factorial","isInteger","isPositive"],H_=G($Ae,WUe,e=>{var{typed:t,add:r,divide:n,multiply:i,factorial:a,isInteger:o,isPositive:s}=e;return t($Ae,{"Array | Matrix":function(u){var c=0,f=1;return Pl(u,function(d){if(!o(d)||!s(d))throw new TypeError("Positive integer value expected in function multinomial");c=r(c,d),f=i(f,a(d))}),n(a(c),f)}})});var qAe="permutations",VUe=["typed","factorial"],Q_=G(qAe,VUe,e=>{var{typed:t,factorial:r}=e;return t(qAe,{"number | BigNumber":r,"number, number":function(i,a){if(!xt(i)||i<0)throw new TypeError("Positive integer value expected in function permutations");if(!xt(a)||a<0)throw new TypeError("Positive integer value expected in function permutations");if(a>i)throw new TypeError("second argument k must be less than or equal to first argument n");return Jc(i-a+1,i)},"BigNumber, BigNumber":function(i,a){var o,s;if(!LAe(i)||!LAe(a))throw new TypeError("Positive integer value expected in function permutations");if(a.gt(i))throw new TypeError("second argument k must be less than or equal to first argument n");var l=i.mul(0).add(1);for(o=l,s=i.minus(a).plus(1);s.lte(i);s=s.plus(1))o=o.times(s);return o}})});function LAe(e){return e.isInteger()&&e.gte(0)}var hV=ge(nge(),1),KUe=(0,hV.default)(Date.now());function yA(e){var t;function r(i){t=i===null?KUe:(0,hV.default)(String(i))}r(e);function n(){return t()}return n}var ige="pickRandom",JUe=["typed","config","?on"],Z_=G(ige,JUe,e=>{var{typed:t,config:r,on:n}=e,i=yA(r.randomSeed);return n&&n("config",function(o,s){o.randomSeed!==s.randomSeed&&(i=yA(o.randomSeed))}),t(ige,{"Array | Matrix":function(s){return a(s,{})},"Array | Matrix, Object":function(s,l){return a(s,l)},"Array | Matrix, number":function(s,l){return a(s,{number:l})},"Array | Matrix, Array | Matrix":function(s,l){return a(s,{weights:l})},"Array | Matrix, Array | Matrix, number":function(s,l,u){return a(s,{number:u,weights:l})},"Array | Matrix, number, Array | Matrix":function(s,l,u){return a(s,{number:l,weights:u})}});function a(o,s){var{number:l,weights:u,elementWise:c=!0}=s,f=typeof l>"u";f&&(l=1);var d=wt(o)?o.create:wt(u)?u.create:null;o=o.valueOf(),u&&(u=u.valueOf()),c===!0&&(o=hr(o),u=hr(u));var p=0;if(typeof u<"u"){if(u.length!==o.length)throw new Error("Weights must have the same length as possibles");for(var h=0,m=u.length;h"u")b=o[Math.floor(i()*g)];else for(var v=i()*p,x=0,w=o.length;x1)for(var n=0,i=e.shift();n{var{typed:t,config:r,on:n}=e,i=yA(r.randomSeed);return n&&n("config",function(s,l){s.randomSeed!==l.randomSeed&&(i=yA(s.randomSeed))}),t(age,{"":()=>o(0,1),number:s=>o(0,s),"number, number":(s,l)=>o(s,l),"Array | Matrix":s=>a(s,0,1),"Array | Matrix, number":(s,l)=>a(s,0,l),"Array | Matrix, number, number":(s,l,u)=>a(s,l,u)});function a(s,l,u){var c=S6(s.valueOf(),()=>o(l,u));return wt(s)?s.create(c):c}function o(s,l){return s+i()*(l-s)}});var oge="randomInt",tWe=["typed","config","?on"],K_=G(oge,tWe,e=>{var{typed:t,config:r,on:n}=e,i=yA(r.randomSeed);return n&&n("config",function(s,l){s.randomSeed!==l.randomSeed&&(i=yA(s.randomSeed))}),t(oge,{"":()=>o(0,1),number:s=>o(0,s),"number, number":(s,l)=>o(s,l),"Array | Matrix":s=>a(s,0,1),"Array | Matrix, number":(s,l)=>a(s,0,l),"Array | Matrix, number, number":(s,l,u)=>a(s,l,u)});function a(s,l,u){var c=S6(s.valueOf(),()=>o(l,u));return wt(s)?s.create(c):c}function o(s,l){return Math.floor(s+i()*(l-s))}});var sge="stirlingS2",rWe=["typed","addScalar","subtractScalar","multiplyScalar","divideScalar","pow","factorial","combinations","isNegative","isInteger","number","?bignumber","larger"],J_=G(sge,rWe,e=>{var{typed:t,addScalar:r,subtractScalar:n,multiplyScalar:i,divideScalar:a,pow:o,factorial:s,combinations:l,isNegative:u,isInteger:c,number:f,bignumber:d,larger:p}=e,h=[],m=[];return t(sge,{"number | BigNumber, number | BigNumber":function(A,b){if(!c(A)||u(A)||!c(b)||u(b))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(p(b,A))throw new TypeError("k must be less than or equal to n in function stirlingS2");var v=!(Gt(A)&&Gt(b)),x=v?m:h,w=v?d:f,S=f(A),k=f(b);if(x[S]&&x[S].length>k)return x[S][k];for(var M=0;M<=S;++M)if(x[M]||(x[M]=[w(M===0?1:0)]),M!==0)for(var O=x[M],C=x[M-1],T=O.length;T<=M&&T<=k;++T)T===M?O[T]=1:O[T]=r(i(w(T),C[T]),C[T-1]);return x[S][k]}})});var lge="bellNumbers",nWe=["typed","addScalar","isNegative","isInteger","stirlingS2"],eP=G(lge,nWe,e=>{var{typed:t,addScalar:r,isNegative:n,isInteger:i,stirlingS2:a}=e;return t(lge,{"number | BigNumber":function(s){if(!i(s)||n(s))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var l=0,u=0;u<=s;u++)l=r(l,a(s,u));return l}})});var uge="catalan",iWe=["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],tP=G(uge,iWe,e=>{var{typed:t,addScalar:r,divideScalar:n,multiplyScalar:i,combinations:a,isNegative:o,isInteger:s}=e;return t(uge,{"number | BigNumber":function(u){if(!s(u)||o(u))throw new TypeError("Non-negative integer value expected in function catalan");return n(a(i(u,2),u),r(u,1))}})});var cge="composition",aWe=["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],rP=G(cge,aWe,e=>{var{typed:t,addScalar:r,combinations:n,isPositive:i,isNegative:a,isInteger:o,larger:s}=e;return t(cge,{"number | BigNumber, number | BigNumber":function(u,c){if(!o(u)||!i(u)||!o(c)||!i(c))throw new TypeError("Positive integer value expected in function composition");if(s(c,u))throw new TypeError("k must be less than or equal to n in function composition");return n(r(u,-1),r(c,-1))}})});var fge="leafCount",oWe=["parse","typed"],nP=G(fge,oWe,e=>{var{parse:t,typed:r}=e;function n(i){var a=0;return i.forEach(o=>{a+=n(o)}),a||1}return r(fge,{Node:function(a){return n(a)}})});function AV(e){return vr(e)||mi(e)&&e.isUnary()&&vr(e.args[0])}function E6(e){return!!(vr(e)||(il(e)||mi(e))&&e.args.every(E6)||Zo(e)&&E6(e.content))}function dge(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gV(e){for(var t=1;t{var{FunctionNode:t,OperatorNode:r,SymbolNode:n}=e,i=!0,a=!1,o="defaultF",s={add:{trivial:i,total:i,commutative:i,associative:i},unaryPlus:{trivial:i,total:i,commutative:i,associative:i},subtract:{trivial:a,total:i,commutative:a,associative:a},multiply:{trivial:i,total:i,commutative:i,associative:i},divide:{trivial:a,total:i,commutative:a,associative:a},paren:{trivial:i,total:i,commutative:i,associative:a},defaultF:{trivial:a,total:i,commutative:a,associative:a}},l={divide:{total:a},log:{total:a}},u={subtract:{total:a},abs:{trivial:i},log:{total:i}};function c(v,x){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:s,S=o;if(typeof v=="string"?S=v:mi(v)?S=v.fn.toString():il(v)?S=v.name:Zo(v)&&(S="paren"),St(w,S)){var k=w[S];if(St(k,x))return k[x];if(St(s,S))return s[S][x]}if(St(w,o)){var M=w[o];return St(M,x)?M[x]:s[o][x]}if(St(s,S)){var O=s[S];if(St(O,x))return O[x]}return s[o][x]}function f(v){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s;return c(v,"commutative",x)}function d(v){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s;return c(v,"associative",x)}function p(v,x){var w=gV({},v);for(var S in x)St(v,S)?w[S]=gV(gV({},x[S]),v[S]):w[S]=x[S];return w}function h(v,x){if(!v.args||v.args.length===0)return v;v.args=m(v,x);for(var w=0;w2&&d(v,x)){for(var M=v.args.pop();v.args.length>0;)M=w([v.args.pop(),M]);v.args=M.args}}}function A(v,x){if(!(!v.args||v.args.length===0)){for(var w=b(v),S=v.args.length,k=0;k2&&d(v,x)){for(var M=v.args.shift();v.args.length>0;)M=w([M,v.args.shift()]);v.args=M.args}}}function b(v){return mi(v)?function(x){try{return new r(v.op,v.fn,x,v.implicit)}catch(w){return console.error(w),[]}}:function(x){return new t(new n(v.name),x)}}return{createMakeNodeFunction:b,hasProperty:c,isCommutative:f,isAssociative:d,mergeContext:p,flatten:h,allChildren:m,unflattenr:g,unflattenl:A,defaultContext:s,realContext:l,positiveContext:u}});var uWe="simplify",cWe=["config","typed","parse","add","subtract","multiply","divide","pow","isZero","equal","resolve","simplifyConstant","simplifyCore","?fraction","?bignumber","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],iP=G(uWe,cWe,e=>{var{config:t,typed:r,parse:n,add:i,subtract:a,multiply:o,divide:s,pow:l,isZero:u,equal:c,resolve:f,simplifyConstant:d,simplifyCore:p,fraction:h,bignumber:m,mathWithTransform:g,matrix:A,AccessorNode:b,ArrayNode:v,ConstantNode:x,FunctionNode:w,IndexNode:S,ObjectNode:k,OperatorNode:M,ParenthesisNode:O,SymbolNode:C}=e,{hasProperty:T,isCommutative:D,isAssociative:P,mergeContext:R,flatten:q,unflattenr:B,unflattenl:N,createMakeNodeFunction:W,defaultContext:_,realContext:X,positiveContext:oe}=Kw({FunctionNode:w,OperatorNode:M,SymbolNode:C});r.addConversion({from:"Object",to:"Map",convert:hA});var re=r("simplify",{Node:_e,"Node, Map":(Y,te)=>_e(Y,!1,te),"Node, Map, Object":(Y,te,ie)=>_e(Y,!1,te,ie),"Node, Array":_e,"Node, Array, Map":_e,"Node, Array, Map, Object":_e});r.removeConversion({from:"Object",to:"Map",convert:hA}),re.defaultContext=_,re.realContext=X,re.positiveContext=oe;function Q(Y){return Y.transform(function(te,ie,Se){return Zo(te)?Q(te.content):te})}var he={true:!0,false:!0,e:!0,i:!0,Infinity:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,NaN:!0,phi:!0,pi:!0,SQRT1_2:!0,SQRT2:!0,tau:!0};re.rules=[p,{l:"log(e)",r:"1"},{s:"n-n1 -> n+-n1",assuming:{subtract:{total:!0}}},{s:"n-n -> 0",assuming:{subtract:{total:!1}}},{s:"-(cl*v) -> v * (-cl)",assuming:{multiply:{commutative:!0},subtract:{total:!0}}},{s:"-(cl*v) -> (-cl) * v",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{s:"-(v*cl) -> v * (-cl)",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{l:"-(n1/n2)",r:"-n1/n2"},{l:"-v",r:"v * (-1)"},{l:"(n1 + n2)*(-1)",r:"n1*(-1) + n2*(-1)",repeat:!0},{l:"n/n1^n2",r:"n*n1^-n2"},{l:"n/n1",r:"n*n1^-1"},{s:"(n1*n2)^n3 -> n1^n3 * n2^n3",assuming:{multiply:{commutative:!0}}},{s:"(n1*n2)^(-1) -> n2^(-1) * n1^(-1)",assuming:{multiply:{commutative:!1}}},{s:"(n ^ n1) ^ n2 -> n ^ (n1 * n2)",assuming:{divide:{total:!0}}},{l:" vd * ( vd * n1 + n2)",r:"vd^2 * n1 + vd * n2"},{s:" vd * (vd^n4 * n1 + n2) -> vd^(1+n4) * n1 + vd * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * ( vd * n1 + n2) -> vd^(n3+1) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * (vd^n4 * n1 + n2) -> vd^(n3+n4) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{l:"n*n",r:"n^2"},{s:"n * n^n1 -> n^(n1+1)",assuming:{divide:{total:!0}}},{s:"n^n1 * n^n2 -> n^(n1+n2)",assuming:{divide:{total:!0}}},d,{s:"n+n -> 2*n",assuming:{add:{total:!0}}},{l:"n+-n",r:"0"},{l:"vd*n + vd",r:"vd*(n+1)"},{l:"n3*n1 + n3*n2",r:"n3*(n1+n2)"},{l:"n3^(-n4)*n1 + n3 * n2",r:"n3^(-n4)*(n1 + n3^(n4+1) *n2)"},{l:"n3^(-n4)*n1 + n3^n5 * n2",r:"n3^(-n4)*(n1 + n3^(n4+n5)*n2)"},{s:"n*vd + vd -> (n+1)*vd",assuming:{multiply:{commutative:!1}}},{s:"vd + n*vd -> (1+n)*vd",assuming:{multiply:{commutative:!1}}},{s:"n1*n3 + n2*n3 -> (n1+n2)*n3",assuming:{multiply:{commutative:!1}}},{s:"n^n1 * n -> n^(n1+1)",assuming:{divide:{total:!0},multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3 -> (n1 + n2*n3^(n4 + 1))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3^n5 -> (n1 + n2*n3^(n4 + n5))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{l:"n*cd + cd",r:"(n+1)*cd"},{s:"cd*n + cd -> cd*(n+1)",assuming:{multiply:{commutative:!1}}},{s:"cd + cd*n -> cd*(1+n)",assuming:{multiply:{commutative:!1}}},d,{s:"(-n)*n1 -> -(n*n1)",assuming:{subtract:{total:!0}}},{s:"n1*(-n) -> -(n1*n)",assuming:{subtract:{total:!0},multiply:{commutative:!1}}},{s:"ce+ve -> ve+ce",assuming:{add:{commutative:!0}},imposeContext:{add:{commutative:!1}}},{s:"vd*cd -> cd*vd",assuming:{multiply:{commutative:!0}},imposeContext:{multiply:{commutative:!1}}},{l:"n+-n1",r:"n-n1"},{l:"n+-(n1)",r:"n-(n1)"},{s:"n*(n1^-1) -> n/n1",assuming:{multiply:{commutative:!0}}},{s:"n*n1^-n2 -> n/n1^n2",assuming:{multiply:{commutative:!0}}},{s:"n^-1 -> 1/n",assuming:{multiply:{commutative:!0}}},{l:"n^1",r:"n"},{s:"n*(n1/n2) -> (n*n1)/n2",assuming:{multiply:{associative:!0}}},{s:"n-(n1+n2) -> n-n1-n2",assuming:{addition:{associative:!0,commutative:!0}}},{l:"1*n",r:"n",imposeContext:{multiply:{commutative:!0}}},{s:"n1/(n2/n3) -> (n1*n3)/n2",assuming:{multiply:{associative:!0}}},{l:"n1/(-n2)",r:"-n1/n2"}];function Ie(Y,te){var ie={};if(Y.s){var Se=Y.s.split("->");if(Se.length===2)ie.l=Se[0],ie.r=Se[1];else throw SyntaxError("Could not parse rule: "+Y.s)}else ie.l=Y.l,ie.r=Y.r;ie.l=Q(n(ie.l)),ie.r=Q(n(ie.r));for(var ke of["imposeContext","repeat","assuming"])ke in Y&&(ie[ke]=Y[ke]);if(Y.evaluate&&(ie.evaluate=n(Y.evaluate)),P(ie.l,te)){var Me=!D(ie.l,te),me;Me&&(me=Re());var ze=W(ie.l),Ye=Re();ie.expanded={},ie.expanded.l=ze([ie.l,Ye]),q(ie.expanded.l,te),B(ie.expanded.l,te),ie.expanded.r=ze([ie.r,Ye]),Me&&(ie.expandedNC1={},ie.expandedNC1.l=ze([me,ie.l]),ie.expandedNC1.r=ze([me,ie.r]),ie.expandedNC2={},ie.expandedNC2.l=ze([me,ie.expanded.l]),ie.expandedNC2.r=ze([me,ie.expanded.r]))}return ie}function xe(Y,te){for(var ie=[],Se=0;Se2&&arguments[2]!==void 0?arguments[2]:A0(),Se=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},ke=Se.consoleDebug;te=xe(te||re.rules,Se.context);var Me=f(Y,ie);Me=Q(Me);for(var me={},ze=Me.toString({parenthesis:"all"});!me[ze];){me[ze]=!0,Oe=0;var Ye=ze;ke&&console.log("Working on: ",ze);for(var tt=0;tt ").concat(te[tt].r.toString()))),ke){var be=Me.toString({parenthesis:"all"});be!==Ye&&(console.log("Applying",Et,"produced",be),Ye=be)}N(Me,Se.context)}ze=Me.toString({parenthesis:"all"})}return Me}function we(Y,te,ie){var Se=Y;if(Y)for(var ke=0;ke1&&(Ye=Me(Y.args.slice(0,ze))),ke=Y.args.slice(ze),Se=ke.length===1?ke[0]:Me(ke),ie.push(Me([Ye,Se]))}return ie}function ue(Y,te){var ie={placeholders:{}};if(!Y.placeholders&&!te.placeholders)return ie;if(Y.placeholders){if(!te.placeholders)return Y}else return te;for(var Se in Y.placeholders)if(St(Y.placeholders,Se)&&(ie.placeholders[Se]=Y.placeholders[Se],St(te.placeholders,Se)&&!ee(Y.placeholders[Se],te.placeholders[Se])))return null;for(var ke in te.placeholders)St(te.placeholders,ke)&&(ie.placeholders[ke]=te.placeholders[ke]);return ie}function ce(Y,te){var ie=[];if(Y.length===0||te.length===0)return ie;for(var Se,ke=0;ke2)throw new Error("permuting >2 commutative non-associative rule arguments not yet implemented");var Ye=$(Y.args[0],te.args[1],ie);if(Ye.length===0)return[];var tt=$(Y.args[1],te.args[0],ie);if(tt.length===0)return[];Me=[Ye,tt]}ke=U(Me)}else if(te.args.length>=2&&Y.args.length===2){for(var Et=L(te,ie),be=[],Pe=0;Pe2)throw Error("Unexpected non-binary associative function: "+Y.toString());return[]}}else if(Y instanceof C){if(Y.name.length===0)throw new Error("Symbol in rule has 0 length...!?");if(he[Y.name]){if(Y.name!==te.name)return[]}else switch(Y.name[1]>="a"&&Y.name[1]<="z"?Y.name.substring(0,2):Y.name[0]){case"n":case"_p":ke[0].placeholders[Y.name]=te;break;case"c":case"cl":if(vr(te))ke[0].placeholders[Y.name]=te;else return[];break;case"v":if(!vr(te))ke[0].placeholders[Y.name]=te;else return[];break;case"vl":if(Kn(te))ke[0].placeholders[Y.name]=te;else return[];break;case"cd":if(AV(te))ke[0].placeholders[Y.name]=te;else return[];break;case"vd":if(!AV(te))ke[0].placeholders[Y.name]=te;else return[];break;case"ce":if(E6(te))ke[0].placeholders[Y.name]=te;else return[];break;case"ve":if(!E6(te))ke[0].placeholders[Y.name]=te;else return[];break;default:throw new Error("Invalid symbol in rule: "+Y.name)}}else if(Y instanceof x){if(!c(Y.value,te.value))return[]}else return[];return ke}function ee(Y,te){if(Y instanceof x&&te instanceof x){if(!c(Y.value,te.value))return!1}else if(Y instanceof C&&te instanceof C){if(Y.name!==te.name)return!1}else if(Y instanceof M&&te instanceof M||Y instanceof w&&te instanceof w){if(Y instanceof M){if(Y.op!==te.op||Y.fn!==te.fn)return!1}else if(Y instanceof w&&Y.name!==te.name)return!1;if(Y.args.length!==te.args.length)return!1;for(var ie=0;ie{var{typed:t,config:r,mathWithTransform:n,matrix:i,fraction:a,bignumber:o,AccessorNode:s,ArrayNode:l,ConstantNode:u,FunctionNode:c,IndexNode:f,ObjectNode:d,OperatorNode:p,SymbolNode:h}=e,{isCommutative:m,isAssociative:g,allChildren:A,createMakeNodeFunction:b}=Kw({FunctionNode:c,OperatorNode:p,SymbolNode:h}),v=t("simplifyConstant",{Node:q=>k(R(q,{})),"Node, Object":function(B,N){return k(R(B,N))}});function x(q){return Xc(q)?q.valueOf():q instanceof Array?q.map(x):wt(q)?i(x(q.valueOf())):q}function w(q,B,N){try{return n[q].apply(null,B)}catch{return B=B.map(x),O(n[q].apply(null,B),N)}}var S=t({Fraction:T,number:function(B){return B<0?C(new u(-B)):new u(B)},BigNumber:function(B){return B<0?C(new u(-B)):new u(B)},Complex:function(B){throw new Error("Cannot convert Complex number to Node")},string:function(B){return new u(B)},Matrix:function(B){return new l(B.valueOf().map(N=>S(N)))}});function k(q){return Dr(q)?q:S(q)}function M(q,B){var N=B&&B.exactFractions!==!1;if(N&&isFinite(q)&&a){var W=a(q),_=B&&typeof B.fractionsLimit=="number"?B.fractionsLimit:1/0;if(W.valueOf()===q&&W.n<_&&W.d<_)return W}return q}var O=t({"string, Object":function(B,N){if(r.number==="BigNumber")return o===void 0&&Fw(),o(B);if(r.number==="Fraction")return a===void 0&&EF(),a(B);var W=parseFloat(B);return M(W,N)},"Fraction, Object":function(B,N){return B},"BigNumber, Object":function(B,N){return B},"number, Object":function(B,N){return M(B,N)},"Complex, Object":function(B,N){return B.im!==0?B:M(B.re,N)},"Matrix, Object":function(B,N){return i(M(B.valueOf()))},"Array, Object":function(B,N){return B.map(M)}});function C(q){return new p("-","unaryMinus",[q])}function T(q){var B,N=q.s*q.n;return N<0?B=new p("-","unaryMinus",[new u(-N)]):B=new u(N),q.d===1?B:new p("/","divide",[B,new u(q.d)])}function D(q,B,N){if(!sc(B))return new s(k(q),k(B));if(Yo(q)||wt(q)){for(var W=Array.from(B.dimensions);W.length>0;)if(vr(W[0])&&typeof W[0].value!="string"){var _=O(W.shift().value,N);Yo(q)?q=q.items[_-1]:(q=q.valueOf()[_-1],q instanceof Array&&(q=i(q)))}else if(W.length>1&&vr(W[1])&&typeof W[1].value!="string"){var X=O(W[1].value,N),oe=[],re=Yo(q)?q.items:q.valueOf();for(var Q of re)if(Yo(Q))oe.push(Q.items[X-1]);else if(wt(q))oe.push(Q[X-1]);else break;if(oe.length===re.length)Yo(q)?q=new l(oe):q=i(oe),W.splice(1,1);else break}else break;return W.length===B.dimensions.length?new s(k(q),B):W.length>0?(B=new f(W),new s(k(q),B)):q}if(Em(q)&&B.dimensions.length===1&&vr(B.dimensions[0])){var he=B.dimensions[0].value;return he in q.properties?q.properties[he]:new u}return new s(k(q),B)}function P(q,B,N,W){var _=B.shift(),X=B.reduce((oe,re)=>{if(!Dr(re)){var Q=oe.pop();if(Dr(Q))return[Q,re];try{return oe.push(w(q,[Q,re],W)),oe}catch{oe.push(Q)}}oe.push(k(oe.pop()));var he=oe.length===1?oe[0]:N(oe);return[N([he,k(re)])]},[_]);return X.length===1?X[0]:N([X[0],S(X[1])])}function R(q,B){switch(q.type){case"SymbolNode":return q;case"ConstantNode":switch(typeof q.value){case"number":return O(q.value,B);case"string":return q.value;default:if(!isNaN(q.value))return O(q.value,B)}return q;case"FunctionNode":if(n[q.name]&&n[q.name].rawArgs)return q;{var N=["add","multiply"];if(N.indexOf(q.name)===-1){var W=q.args.map(se=>R(se,B));if(!W.some(Dr))try{return w(q.name,W,B)}catch{}if(q.name==="size"&&W.length===1&&Yo(W[0])){for(var _=[],X=W[0];Yo(X);)_.push(X.items.length),X=X.items[0];return i(_)}return new c(q.name,W.map(k))}}case"OperatorNode":{var oe=q.fn.toString(),re,Q,he=b(q);if(mi(q)&&q.isUnary())re=[R(q.args[0],B)],Dr(re[0])?Q=he(re):Q=w(oe,re,B);else if(g(q,B.context))if(re=A(q,B.context),re=re.map(se=>R(se,B)),m(oe,B.context)){for(var Ie=[],xe=[],Oe=0;Oe1?(Q=P(oe,Ie,he,B),xe.unshift(Q),Q=P(oe,xe,he,B)):Q=P(oe,re,he,B)}else Q=P(oe,re,he,B);else re=q.args.map(se=>R(se,B)),Q=P(oe,re,he,B);return Q}case"ParenthesisNode":return R(q.content,B);case"AccessorNode":return D(R(q.object,B),R(q.index,B),B);case"ArrayNode":{var Re=q.items.map(se=>R(se,B));return Re.some(Dr)?new l(Re.map(k)):i(Re)}case"IndexNode":return new f(q.dimensions.map(se=>v(se,B)));case"ObjectNode":{var _e={};for(var we in q.properties)_e[we]=v(q.properties[we],B);return new d(_e)}case"AssignmentNode":case"BlockNode":case"FunctionAssignmentNode":case"RangeNode":case"ConditionalNode":default:throw new Error("Unimplemented node type in simplifyConstant: ".concat(q.type))}}return v});var pge="simplifyCore",pWe=["typed","parse","equal","isZero","add","subtract","multiply","divide","pow","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],oP=G(pge,pWe,e=>{var{typed:t,parse:r,equal:n,isZero:i,add:a,subtract:o,multiply:s,divide:l,pow:u,AccessorNode:c,ArrayNode:f,ConstantNode:d,FunctionNode:p,IndexNode:h,ObjectNode:m,OperatorNode:g,ParenthesisNode:A,SymbolNode:b}=e,v=new d(0),x=new d(1),w=new d(!0),S=new d(!1);function k(T){return mi(T)&&["and","not","or"].includes(T.op)}var{hasProperty:M,isCommutative:O}=Kw({FunctionNode:p,OperatorNode:g,SymbolNode:b});function C(T){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},P=D?D.context:void 0;if(M(T,"trivial",P)){if(il(T)&&T.args.length===1)return C(T.args[0],D);var R=!1,q=0;if(T.forEach(xe=>{++q,q===1&&(R=C(xe,D))}),q===1)return R}var B=T;if(il(B)){var N=ffe(B.name);if(N){if(B.args.length>2&&M(B,"associative",P))for(;B.args.length>2;){var W=B.args.pop(),_=B.args.pop();B.args.push(new g(N,B.name,[W,_]))}B=new g(N,B.name,B.args)}else return new p(C(B.fn),B.args.map(xe=>C(xe,D)))}if(mi(B)&&B.isUnary()){var X=C(B.args[0],D);if(B.op==="~"&&mi(X)&&X.isUnary()&&X.op==="~"||B.op==="not"&&mi(X)&&X.isUnary()&&X.op==="not"&&k(X.args[0]))return X.args[0];var oe=!0;if(B.op==="-"&&mi(X)&&(X.isBinary()&&X.fn==="subtract"&&(B=new g("-","subtract",[X.args[1],X.args[0]]),oe=!1),X.isUnary()&&X.op==="-"))return X.args[0];if(oe)return new g(B.op,B.fn,[X])}if(mi(B)&&B.isBinary()){var re=C(B.args[0],D),Q=C(B.args[1],D);if(B.op==="+"){if(vr(re)&&i(re.value))return Q;if(vr(Q)&&i(Q.value))return re;mi(Q)&&Q.isUnary()&&Q.op==="-"&&(Q=Q.args[0],B=new g("-","subtract",[re,Q]))}if(B.op==="-")return mi(Q)&&Q.isUnary()&&Q.op==="-"?C(new g("+","add",[re,Q.args[0]]),D):vr(re)&&i(re.value)?C(new g("-","unaryMinus",[Q])):vr(Q)&&i(Q.value)?re:new g(B.op,B.fn,[re,Q]);if(B.op==="*"){if(vr(re)){if(i(re.value))return v;if(n(re.value,1))return Q}if(vr(Q)){if(i(Q.value))return v;if(n(Q.value,1))return re;if(O(B,P))return new g(B.op,B.fn,[Q,re],B.implicit)}return new g(B.op,B.fn,[re,Q],B.implicit)}if(B.op==="/")return vr(re)&&i(re.value)?v:vr(Q)&&n(Q.value,1)?re:new g(B.op,B.fn,[re,Q]);if(B.op==="^"&&vr(Q)){if(i(Q.value))return x;if(n(Q.value,1))return re}if(B.op==="and"){if(vr(re))if(re.value){if(k(Q))return Q;if(vr(Q))return Q.value?w:S}else return S;if(vr(Q))if(Q.value){if(k(re))return re}else return S}if(B.op==="or"){if(vr(re)){if(re.value)return w;if(k(Q))return Q}if(vr(Q)){if(Q.value)return w;if(k(re))return re}}return new g(B.op,B.fn,[re,Q])}if(mi(B))return new g(B.op,B.fn,B.args.map(xe=>C(xe,D)));if(Yo(B))return new f(B.items.map(xe=>C(xe,D)));if(vu(B))return new c(C(B.object,D),C(B.index,D));if(sc(B))return new h(B.dimensions.map(xe=>C(xe,D)));if(Em(B)){var he={};for(var Ie in B.properties)he[Ie]=C(B.properties[Ie],D);return new m(he)}return B}return t(pge,{Node:C,"Node,Object":C})});var mWe="resolve",hWe=["typed","parse","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode"],sP=G(mWe,hWe,e=>{var{typed:t,parse:r,ConstantNode:n,FunctionNode:i,OperatorNode:a,ParenthesisNode:o}=e;function s(l,u){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Set;if(!u)return l;if(Kn(l)){if(c.has(l.name)){var f=Array.from(c).join(", ");throw new ReferenceError("recursive loop of variable definitions among {".concat(f,"}"))}var d=u.get(l.name);if(Dr(d)){var p=new Set(c);return p.add(l.name),s(d,u,p)}else return typeof d=="number"?r(String(d)):d!==void 0?new n(d):l}else if(mi(l)){var h=l.args.map(function(g){return s(g,u,c)});return new a(l.op,l.fn,h,l.implicit)}else{if(Zo(l))return new o(s(l.content,u,c));if(il(l)){var m=l.args.map(function(g){return s(g,u,c)});return new i(l.name,m)}}return l.map(g=>s(g,u,c))}return t("resolve",{Node:s,"Node, Map | null | undefined":s,"Node, Object":(l,u)=>s(l,hA(u)),"Array | Matrix":t.referToSelf(l=>u=>u.map(c=>l(c))),"Array | Matrix, null | undefined":t.referToSelf(l=>u=>u.map(c=>l(c))),"Array, Object":t.referTo("Array,Map",l=>(u,c)=>l(u,hA(c))),"Matrix, Object":t.referTo("Matrix,Map",l=>(u,c)=>l(u,hA(c))),"Array | Matrix, Map":t.referToSelf(l=>(u,c)=>u.map(f=>l(f,c)))})});var mge="symbolicEqual",AWe=["parse","simplify","typed","OperatorNode"],lP=G(mge,AWe,e=>{var{parse:t,simplify:r,typed:n,OperatorNode:i}=e;function a(o,s){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u=new i("-","subtract",[o,s]),c=r(u,{},l);return vr(c)&&!c.value}return n(mge,{"Node, Node":a,"Node, Node, Object":a})});var hge="derivative",gWe=["typed","config","parse","simplify","equal","isZero","numeric","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],uP=G(hge,gWe,e=>{var{typed:t,config:r,parse:n,simplify:i,equal:a,isZero:o,numeric:s,ConstantNode:l,FunctionNode:u,OperatorNode:c,ParenthesisNode:f,SymbolNode:d}=e;function p(v,x){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{simplify:!0},S={};g(S,v,x.name);var k=A(v,S);return w.simplify?i(k):k}t.addConversion({from:"identifier",to:"SymbolNode",convert:n});var h=t(hge,{"Node, SymbolNode":p,"Node, SymbolNode, Object":p});t.removeConversion({from:"identifier",to:"SymbolNode",convert:n}),h._simplify=!0,h.toTex=function(v){return m.apply(null,v.args)};var m=t("_derivTex",{"Node, SymbolNode":function(x,w){return vr(x)&&Br(x.value)==="string"?m(n(x.value).toString(),w.toString(),1):m(x.toTex(),w.toString(),1)},"Node, ConstantNode":function(x,w){if(Br(w.value)==="string")return m(x,n(w.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(x,w,S){return m(x.toString(),w.name,S.value)},"string, string, number":function(x,w,S){var k;return S===1?k="{d\\over d"+w+"}":k="{d^{"+S+"}\\over d"+w+"^{"+S+"}}",k+"\\left[".concat(x,"\\right]")}}),g=t("constTag",{"Object, ConstantNode, string":function(x,w){return x[w]=!0,!0},"Object, SymbolNode, string":function(x,w,S){return w.name!==S?(x[w]=!0,!0):!1},"Object, ParenthesisNode, string":function(x,w,S){return g(x,w.content,S)},"Object, FunctionAssignmentNode, string":function(x,w,S){return w.params.indexOf(S)===-1?(x[w]=!0,!0):g(x,w.expr,S)},"Object, FunctionNode | OperatorNode, string":function(x,w,S){if(w.args.length>0){for(var k=g(x,w.args[0],S),M=1;M0){var k=x.args.filter(function(q){return w[q]===void 0}),M=k.length===1?k[0]:new c("*","multiply",k),O=S.concat(A(M,w));return new c("*","multiply",O)}return new c("+","add",x.args.map(function(q){return new c("*","multiply",x.args.map(function(B){return B===q?A(B,w):B.clone()}))}))}if(x.op==="/"&&x.isBinary()){var C=x.args[0],T=x.args[1];return w[T]!==void 0?new c("/","divide",[A(C,w),T]):w[C]!==void 0?new c("*","multiply",[new c("-","unaryMinus",[C]),new c("/","divide",[A(T,w),new c("^","pow",[T.clone(),b(2)])])]):new c("/","divide",[new c("-","subtract",[new c("*","multiply",[A(C,w),T.clone()]),new c("*","multiply",[C.clone(),A(T,w)])]),new c("^","pow",[T.clone(),b(2)])])}if(x.op==="^"&&x.isBinary()){var D=x.args[0],P=x.args[1];if(w[D]!==void 0)return vr(D)&&(o(D.value)||a(D.value,1))?b(0):new c("*","multiply",[x,new c("*","multiply",[new u("log",[D.clone()]),A(P.clone(),w)])]);if(w[P]!==void 0){if(vr(P)){if(o(P.value))return b(0);if(a(P.value,1))return A(D,w)}var R=new c("^","pow",[D.clone(),new c("-","subtract",[P,b(1)])]);return new c("*","multiply",[P.clone(),new c("*","multiply",[A(D,w),R])])}return new c("*","multiply",[new c("^","pow",[D.clone(),P.clone()]),new c("+","add",[new c("*","multiply",[A(D,w),new c("/","divide",[P.clone(),D.clone()])]),new c("*","multiply",[A(P,w),new u("log",[D.clone()])])])])}throw new Error('Cannot process operator "'+x.op+'" in derivative: the operator is not supported, undefined, or the number of arguments passed to it are not supported')}});function b(v,x){return new l(s(v,x||r.number))}return h});var Age="rationalize",vWe=["config","typed","equal","isZero","add","subtract","multiply","divide","pow","parse","simplifyConstant","simplifyCore","simplify","?bignumber","?fraction","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","SymbolNode","ParenthesisNode"],cP=G(Age,vWe,e=>{var{config:t,typed:r,equal:n,isZero:i,add:a,subtract:o,multiply:s,divide:l,pow:u,parse:c,simplifyConstant:f,simplifyCore:d,simplify:p,fraction:h,bignumber:m,mathWithTransform:g,matrix:A,AccessorNode:b,ArrayNode:v,ConstantNode:x,FunctionNode:w,IndexNode:S,ObjectNode:k,OperatorNode:M,SymbolNode:O,ParenthesisNode:C}=e;function T(B){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,_=P(),X=D(B,N,!0,_.firstRules),oe=X.variables.length,re={exactFractions:!1},Q={exactFractions:!0};if(B=X.expression,oe>=1){B=R(B);var he,Ie,xe=!0,Oe=!1;B=p(B,_.firstRules,{},re);for(var Re;Ie=xe?_.distrDivRules:_.sucDivRules,B=p(B,Ie,{},Q),xe=!xe,Re=B.toString(),Re!==he;)Oe=!0,he=Re;Oe&&(B=p(B,_.firstRulesAgain,{},re)),B=p(B,_.finalRules,{},re)}var _e=[],we={};return B.type==="OperatorNode"&&B.isBinary()&&B.op==="/"?(oe===1&&(B.args[0]=q(B.args[0],_e),B.args[1]=q(B.args[1])),W&&(we.numerator=B.args[0],we.denominator=B.args[1])):(oe===1&&(B=q(B,_e)),W&&(we.numerator=B,we.denominator=null)),W?(we.coefficients=_e,we.variables=X.variables,we.expression=B,we):B}return r(Age,{Node:T,"Node, boolean":(B,N)=>T(B,{},N),"Node, Object":T,"Node, Object, boolean":T});function D(B,N,W,_){var X=[],oe=p(B,_,N,{exactFractions:!1});W=!!W;var re="+-*"+(W?"/":"");he(oe);var Q={};return Q.expression=oe,Q.variables=X,Q;function he(Ie){var xe=Ie.type;if(xe==="FunctionNode")throw new Error("There is an unsolved function call");if(xe==="OperatorNode")if(Ie.op==="^"){if(Ie.args[1].type!=="ConstantNode"||!xt(parseFloat(Ie.args[1].value)))throw new Error("There is a non-integer exponent");he(Ie.args[0])}else{if(re.indexOf(Ie.op)===-1)throw new Error("Operator "+Ie.op+" invalid in polynomial expression");for(var Oe=0;Oe1;if(_==="OperatorNode"&&B.isBinary()){var oe=!1,re;if(B.op==="^"&&(B.args[0].type==="ParenthesisNode"||B.args[0].type==="OperatorNode")&&B.args[1].type==="ConstantNode"&&(re=parseFloat(B.args[1].value),oe=re>=2&&xt(re)),oe){if(re>2){var Q=B.args[0],he=new M("^","pow",[B.args[0].cloneDeep(),new x(re-1)]);B=new M("*","multiply",[Q,he])}else B=new M("*","multiply",[B.args[0],B.args[0].cloneDeep()]);X&&(W==="content"?N.content=B:N.args[W]=B)}}if(_==="ParenthesisNode")R(B.content,B,"content");else if(_!=="ConstantNode"&&_!=="SymbolNode")for(var Ie=0;Ie=0;Q--)if(N[Q]!==0){var he=new x(oe?N[Q]:Math.abs(N[Q])),Ie=N[Q]<0?"-":"+";if(Q>0){var xe=new O(X);if(Q>1){var Oe=new x(Q);xe=new M("^","pow",[xe,Oe])}N[Q]===-1&&oe?he=new M("-","unaryMinus",[xe]):Math.abs(N[Q])===1?he=xe:he=new M("*","multiply",[he,xe])}oe?re=he:Ie==="+"?re=new M("+","add",[re,he]):re=new M("-","subtract",[re,he]),oe=!1}if(oe)return new x(0);return re;function Re(_e,we,se){var L=_e.type;if(L==="FunctionNode")throw new Error("There is an unsolved function call");if(L==="OperatorNode"){if("+-*^".indexOf(_e.op)===-1)throw new Error("Operator "+_e.op+" invalid");if(we!==null){if((_e.fn==="unaryMinus"||_e.fn==="pow")&&we.fn!=="add"&&we.fn!=="subtract"&&we.fn!=="multiply")throw new Error("Invalid "+_e.op+" placing");if((_e.fn==="subtract"||_e.fn==="add"||_e.fn==="multiply")&&we.fn!=="add"&&we.fn!=="subtract")throw new Error("Invalid "+_e.op+" placing");if((_e.fn==="subtract"||_e.fn==="add"||_e.fn==="unaryMinus")&&se.noFil!==0)throw new Error("Invalid "+_e.op+" placing")}(_e.op==="^"||_e.op==="*")&&(se.fire=_e.op);for(var ue=0;ue<_e.args.length;ue++)_e.fn==="unaryMinus"&&(se.oper="-"),(_e.op==="+"||_e.fn==="subtract")&&(se.fire="",se.cte=1,se.oper=ue===0?"+":_e.op),se.noFil=ue,Re(_e.args[ue],_e,se)}else if(L==="SymbolNode"){if(_e.name!==X&&X!=="")throw new Error("There is more than one variable");if(X=_e.name,we===null){N[1]=1;return}if(we.op==="^"&&se.noFil!==0)throw new Error("In power the variable should be the first parameter");if(we.op==="*"&&se.noFil!==1)throw new Error("In multiply the variable should be the second parameter");(se.fire===""||se.fire==="*")&&(_<1&&(N[1]=0),N[1]+=se.cte*(se.oper==="+"?1:-1),_=Math.max(1,_))}else if(L==="ConstantNode"){var ce=parseFloat(_e.value);if(we===null){N[0]=ce;return}if(we.op==="^"){if(se.noFil!==1)throw new Error("Constant cannot be powered");if(!xt(ce)||ce<=0)throw new Error("Non-integer exponent is not allowed");for(var U=_+1;U_&&(N[ce]=0),N[ce]+=se.cte*(se.oper==="+"?1:-1),_=Math.max(ce,_);return}se.cte=ce,se.fire===""&&(N[0]+=se.cte*(se.oper==="+"?1:-1))}else throw new Error("Type "+L+" is not allowed")}}});var gge="zpk2tf",yWe=["typed","add","multiply","Complex","number"],fP=G(gge,yWe,e=>{var{typed:t,add:r,multiply:n,Complex:i,number:a}=e;return t(gge,{"Array,Array,number":function(u,c,f){return o(u,c,f)},"Array,Array":function(u,c){return o(u,c,1)},"Matrix,Matrix,number":function(u,c,f){return o(u.valueOf(),c.valueOf(),f)},"Matrix,Matrix":function(u,c){return o(u.valueOf(),c.valueOf(),1)}});function o(l,u,c){l.some(b=>b.type==="BigNumber")&&(l=l.map(b=>a(b))),u.some(b=>b.type==="BigNumber")&&(u=u.map(b=>a(b)));for(var f=[i(1,0)],d=[i(1,0)],p=0;p=0&&f-d{var{typed:t,add:r,multiply:n,Complex:i,divide:a,matrix:o}=e;return t(vge,{"Array, Array":function(c,f){var d=l(512);return s(c,f,d)},"Array, Array, Array":function(c,f,d){return s(c,f,d)},"Array, Array, number":function(c,f,d){if(d<0)throw new Error("w must be a positive number");var p=l(d);return s(c,f,p)},"Matrix, Matrix":function(c,f){var d=l(512),{w:p,h}=s(c.valueOf(),f.valueOf(),d);return{w:o(p),h:o(h)}},"Matrix, Matrix, Matrix":function(c,f,d){var{h:p}=s(c.valueOf(),f.valueOf(),d.valueOf());return{h:o(p),w:o(d)}},"Matrix, Matrix, number":function(c,f,d){if(d<0)throw new Error("w must be a positive number");var p=l(d),{h}=s(c.valueOf(),f.valueOf(),p);return{h:o(h),w:o(p)}}});function s(u,c,f){for(var d=[],p=[],h=0;h{var{classes:t}=e;return function(n,i){var a=t[i&&i.mathjs];return a&&typeof a.fromJSON=="function"?a.fromJSON(i):i}});var SWe="replacer",EWe=[],mP=G(SWe,EWe,()=>function(t,r){return typeof r=="number"&&(!isFinite(r)||isNaN(r))?{mathjs:"number",value:String(r)}:r});var yge="12.4.1";var hP=G("true",[],()=>!0),AP=G("false",[],()=>!1),gP=G("null",[],()=>null),vP=tf("Infinity",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(1/0):1/0}),yP=tf("NaN",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(NaN):NaN}),bP=tf("pi",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?x6(r):ele}),xP=tf("tau",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?wce(r):tle}),wP=tf("e",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?bce(r):rle}),SP=tf("phi",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?xce(r):nle}),EP=tf("LN2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(2).ln():Math.LN2}),kP=tf("LN10",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(10).ln():Math.LN10}),CP=tf("LOG2E",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(1).div(new r(2).ln()):Math.LOG2E}),DP=tf("LOG10E",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(1).div(new r(10).ln()):Math.LOG10E}),jP=tf("SQRT1_2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r("0.5").sqrt():Math.SQRT1_2}),OP=tf("SQRT2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(2).sqrt():Math.SQRT2}),MP=tf("i",["Complex"],e=>{var{Complex:t}=e;return t.I}),bge=G("PI",["pi"],e=>{var{pi:t}=e;return t}),xge=G("E",["e"],e=>{var{e:t}=e;return t}),NP=G("version",[],()=>yge);function tf(e,t,r){return G(e,t,r,{recreateOnConfigChange:!0})}var TP=Pr("speedOfLight","299792458","m s^-1"),FP=Pr("gravitationConstant","6.67430e-11","m^3 kg^-1 s^-2"),_P=Pr("planckConstant","6.62607015e-34","J s"),PP=Pr("reducedPlanckConstant","1.0545718176461565e-34","J s"),IP=Pr("magneticConstant","1.25663706212e-6","N A^-2"),BP=Pr("electricConstant","8.8541878128e-12","F m^-1"),RP=Pr("vacuumImpedance","376.730313667","ohm"),$P=Pr("coulomb","8.987551792261171e9","N m^2 C^-2"),qP=Pr("elementaryCharge","1.602176634e-19","C"),LP=Pr("bohrMagneton","9.2740100783e-24","J T^-1"),zP=Pr("conductanceQuantum","7.748091729863649e-5","S"),UP=Pr("inverseConductanceQuantum","12906.403729652257","ohm"),WP=Pr("magneticFluxQuantum","2.0678338484619295e-15","Wb"),VP=Pr("nuclearMagneton","5.0507837461e-27","J T^-1"),GP=Pr("klitzing","25812.807459304513","ohm");var HP=Pr("bohrRadius","5.29177210903e-11","m"),QP=Pr("classicalElectronRadius","2.8179403262e-15","m"),YP=Pr("electronMass","9.1093837015e-31","kg"),ZP=Pr("fermiCoupling","1.1663787e-5","GeV^-2"),XP=jI("fineStructure",.0072973525693),KP=Pr("hartreeEnergy","4.3597447222071e-18","J"),JP=Pr("protonMass","1.67262192369e-27","kg"),eI=Pr("deuteronMass","3.3435830926e-27","kg"),tI=Pr("neutronMass","1.6749271613e-27","kg"),rI=Pr("quantumOfCirculation","3.6369475516e-4","m^2 s^-1"),nI=Pr("rydberg","10973731.568160","m^-1"),iI=Pr("thomsonCrossSection","6.6524587321e-29","m^2"),aI=jI("weakMixingAngle",.2229),oI=jI("efimovFactor",22.7),sI=Pr("atomicMass","1.66053906660e-27","kg"),lI=Pr("avogadro","6.02214076e23","mol^-1"),uI=Pr("boltzmann","1.380649e-23","J K^-1"),cI=Pr("faraday","96485.33212331001","C mol^-1"),fI=Pr("firstRadiation","3.7417718521927573e-16","W m^2"),dI=Pr("loschmidt","2.686780111798444e25","m^-3"),pI=Pr("gasConstant","8.31446261815324","J K^-1 mol^-1"),mI=Pr("molarPlanckConstant","3.990312712893431e-10","J s mol^-1"),hI=Pr("molarVolume","0.022413969545014137","m^3 mol^-1"),AI=jI("sackurTetrode",-1.16487052358),gI=Pr("secondRadiation","0.014387768775039337","m K"),vI=Pr("stefanBoltzmann","5.67037441918443e-8","W m^-2 K^-4"),yI=Pr("wienDisplacement","2.897771955e-3","m K"),bI=Pr("molarMass","0.99999999965e-3","kg mol^-1"),xI=Pr("molarMassC12","11.9999999958e-3","kg mol^-1"),wI=Pr("gravity","9.80665","m s^-2"),SI=Pr("planckLength","1.616255e-35","m"),EI=Pr("planckMass","2.176435e-8","kg"),kI=Pr("planckTime","5.391245e-44","s"),CI=Pr("planckCharge","1.87554603778e-18","C"),DI=Pr("planckTemperature","1.416785e+32","K");function Pr(e,t,r){var n=["config","Unit","BigNumber"];return G(e,n,i=>{var{config:a,Unit:o,BigNumber:s}=i,l=a.number==="BigNumber"?new s(t):parseFloat(t),u=new o(l,r);return u.fixPrefix=!0,u})}function jI(e,t){var r=["config","BigNumber"];return G(e,r,n=>{var{config:i,BigNumber:a}=n;return i.number==="BigNumber"?new a(t):t})}var kWe="apply",CWe=["typed","isInteger"],OI=G(kWe,CWe,e=>{var{typed:t,isInteger:r}=e,n=w0({typed:t,isInteger:r});return t("apply",{"...any":function(a){var o=a[1];Gt(o)?a[1]=o-1:Ft(o)&&(a[1]=o.minus(1));try{return n.apply(null,a)}catch(s){throw Ai(s)}}})},{isTransformFunction:!0});var DWe="column",jWe=["typed","Index","matrix","range"],MI=G(DWe,jWe,e=>{var{typed:t,Index:r,matrix:n,range:i}=e,a=Nw({typed:t,Index:r,matrix:n,range:i});return t("column",{"...any":function(s){var l=s.length-1,u=s[l];Gt(u)&&(s[l]=u-1);try{return a.apply(null,s)}catch(c){throw Ai(c)}}})},{isTransformFunction:!0});function Jw(e,t,r){var n=e.filter(function(l){return Kn(l)&&!(l.name in t)&&!r.has(l.name)})[0];if(!n)throw new Error('No undefined variable found in inline expression "'+e+'"');var i=n.name,a=new Map,o=new gw(r,a,new Set([i])),s=e.compile();return function(u){return a.set(i,u),s.evaluate(o)}}var OWe="filter",MWe=["typed"],NI=G(OWe,MWe,e=>{var{typed:t}=e;function r(i,a,o){var s,l;return i[0]&&(s=i[0].compile().evaluate(o)),i[1]&&(Kn(i[1])||nd(i[1])?l=i[1].compile().evaluate(o):l=Jw(i[1],a,o)),n(s,l)}r.rawArgs=!0;var n=t("filter",{"Array, function":wge,"Matrix, function":function(a,o){return a.create(wge(a.toArray(),o))},"Array, RegExp":hw,"Matrix, RegExp":function(a,o){return a.create(hw(a.toArray(),o))}});return r},{isTransformFunction:!0});function wge(e,t){return qN(e,function(r,n,i){return sd(t,r,[n+1],i,"filter")})}var NWe="forEach",TWe=["typed"],TI=G(NWe,TWe,e=>{var{typed:t}=e;function r(i,a,o){var s,l;return i[0]&&(s=i[0].compile().evaluate(o)),i[1]&&(Kn(i[1])||nd(i[1])?l=i[1].compile().evaluate(o):l=Jw(i[1],a,o)),n(s,l)}r.rawArgs=!0;var n=t("forEach",{"Array | Matrix, function":function(a,o){var s=function l(u,c){if(Array.isArray(u))m0(u,function(f,d){l(f,c.concat(d+1))});else return sd(o,u,c,a,"forEach")};s(a.valueOf(),[])}});return r},{isTransformFunction:!0});var FWe="index",_We=["Index","getMatrixDataType"],FI=G(FWe,_We,e=>{var{Index:t,getMatrixDataType:r}=e;return function(){for(var i=[],a=0,o=arguments.length;a0?0:2;else if(s&&s.isSet===!0)s=s.map(function(u){return u-1});else if(Fr(s)||wt(s))r(s)!=="boolean"&&(s=s.map(function(u){return u-1}));else if(Gt(s))s--;else if(Ft(s))s=s.toNumber()-1;else if(typeof s!="string")throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");i[a]=s}var l=new t;return t.apply(l,i),l}},{isTransformFunction:!0});var PWe="map",IWe=["typed"],_I=G(PWe,IWe,e=>{var{typed:t}=e;function r(i,a,o){var s,l;return i[0]&&(s=i[0].compile().evaluate(o)),i[1]&&(Kn(i[1])||nd(i[1])?l=i[1].compile().evaluate(o):l=Jw(i[1],a,o)),n(s,l)}r.rawArgs=!0;var n=t("map",{"Array, function":function(a,o){return Sge(a,o,a)},"Matrix, function":function(a,o){return a.create(Sge(a.valueOf(),o,a))}});return r},{isTransformFunction:!0});function Sge(e,t,r){function n(i,a){return Array.isArray(i)?lc(i,function(o,s){return n(o,a.concat(s+1))}):sd(t,i,a,r,"map")}return n(e,[])}function Bl(e){if(e.length===2&&ha(e[0])){e=e.slice();var t=e[1];Gt(t)?e[1]=t-1:Ft(t)&&(e[1]=t.minus(1))}return e}var BWe="max",RWe=["typed","config","numeric","larger"],PI=G(BWe,RWe,e=>{var{typed:t,config:r,numeric:n,larger:i}=e,a=Uw({typed:t,config:r,numeric:n,larger:i});return t("max",{"...any":function(s){s=Bl(s);try{return a.apply(null,s)}catch(l){throw Ai(l)}}})},{isTransformFunction:!0});var $We="mean",qWe=["typed","add","divide"],II=G($We,qWe,e=>{var{typed:t,add:r,divide:n}=e,i=Qw({typed:t,add:r,divide:n});return t("mean",{"...any":function(o){o=Bl(o);try{return i.apply(null,o)}catch(s){throw Ai(s)}}})},{isTransformFunction:!0});var LWe="min",zWe=["typed","config","numeric","smaller"],BI=G(LWe,zWe,e=>{var{typed:t,config:r,numeric:n,smaller:i}=e,a=Ww({typed:t,config:r,numeric:n,smaller:i});return t("min",{"...any":function(s){s=Bl(s);try{return a.apply(null,s)}catch(l){throw Ai(l)}}})},{isTransformFunction:!0});var UWe="range",WWe=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq","add","isPositive"],RI=G(UWe,WWe,e=>{var{typed:t,config:r,matrix:n,bignumber:i,smaller:a,smallerEq:o,larger:s,largerEq:l,add:u,isPositive:c}=e,f=_w({typed:t,config:r,matrix:n,bignumber:i,smaller:a,smallerEq:o,larger:s,largerEq:l,add:u,isPositive:c});return t("range",{"...any":function(p){var h=p.length-1,m=p[h];return typeof m!="boolean"&&p.push(!0),f.apply(null,p)}})},{isTransformFunction:!0});var VWe="row",GWe=["typed","Index","matrix","range"],$I=G(VWe,GWe,e=>{var{typed:t,Index:r,matrix:n,range:i}=e,a=Pw({typed:t,Index:r,matrix:n,range:i});return t("row",{"...any":function(s){var l=s.length-1,u=s[l];Gt(u)&&(s[l]=u-1);try{return a.apply(null,s)}catch(c){throw Ai(c)}}})},{isTransformFunction:!0});var HWe="subset",QWe=["typed","matrix","zeros","add"],qI=G(HWe,QWe,e=>{var{typed:t,matrix:r,zeros:n,add:i}=e,a=Iw({typed:t,matrix:r,zeros:n,add:i});return t("subset",{"...any":function(s){try{return a.apply(null,s)}catch(l){throw Ai(l)}}})},{isTransformFunction:!0});var YWe="concat",ZWe=["typed","matrix","isInteger"],LI=G(YWe,ZWe,e=>{var{typed:t,matrix:r,isInteger:n}=e,i=Mw({typed:t,matrix:r,isInteger:n});return t("concat",{"...any":function(o){var s=o.length-1,l=o[s];Gt(l)?o[s]=l-1:Ft(l)&&(o[s]=l.minus(1));try{return i.apply(null,o)}catch(u){throw Ai(u)}}})},{isTransformFunction:!0});var Ege="diff",XWe=["typed","matrix","subtract","number","bignumber"],zI=G(Ege,XWe,e=>{var{typed:t,matrix:r,subtract:n,number:i,bignumber:a}=e,o=Tw({typed:t,matrix:r,subtract:n,number:i,bignumber:a});return t(Ege,{"...any":function(l){l=Bl(l);try{return o.apply(null,l)}catch(u){throw Ai(u)}}})},{isTransformFunction:!0});var KWe="std",JWe=["typed","map","sqrt","variance"],UI=G(KWe,JWe,e=>{var{typed:t,map:r,sqrt:n,variance:i}=e,a=Xw({typed:t,map:r,sqrt:n,variance:i});return t("std",{"...any":function(s){s=Bl(s);try{return a.apply(null,s)}catch(l){throw Ai(l)}}})},{isTransformFunction:!0});var kge="sum",eVe=["typed","config","add","numeric"],WI=G(kge,eVe,e=>{var{typed:t,config:r,add:n,numeric:i}=e,a=Gw({typed:t,config:r,add:n,numeric:i});return t(kge,{"...any":function(s){s=Bl(s);try{return a.apply(null,s)}catch(l){throw Ai(l)}}})},{isTransformFunction:!0});var tVe="quantileSeq",rVe=["typed","bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger"],VI=G(tVe,rVe,e=>{var{typed:t,bignumber:r,add:n,subtract:i,divide:a,multiply:o,partitionSelect:s,compare:l,isInteger:u,smaller:c,smallerEq:f,larger:d}=e,p=Zw({typed:t,bignumber:r,add:n,subtract:i,divide:a,multiply:o,partitionSelect:s,compare:l,isInteger:u,smaller:c,smallerEq:f,larger:d});return t("quantileSeq",{"Array | Matrix, number | BigNumber":p,"Array | Matrix, number | BigNumber, number":(m,g,A)=>p(m,g,h(A)),"Array | Matrix, number | BigNumber, boolean":p,"Array | Matrix, number | BigNumber, boolean, number":(m,g,A,b)=>p(m,g,A,h(b)),"Array | Matrix, Array | Matrix":p,"Array | Matrix, Array | Matrix, number":(m,g,A)=>p(m,g,h(A)),"Array | Matrix, Array | Matrix, boolean":p,"Array | Matrix, Array | Matrix, boolean, number":(m,g,A,b)=>p(m,g,A,h(b))});function h(m){return Bl([[],m])[1]}},{isTransformFunction:!0});var Cge="cumsum",nVe=["typed","add","unaryPlus"],GI=G(Cge,nVe,e=>{var{typed:t,add:r,unaryPlus:n}=e,i=Hw({typed:t,add:r,unaryPlus:n});return t(Cge,{"...any":function(o){if(o.length===2&&ha(o[0])){var s=o[1];Gt(s)?o[1]=s-1:Ft(s)&&(o[1]=s.minus(1))}try{return i.apply(null,o)}catch(l){throw Ai(l)}}})},{isTransformFunction:!0});var Dge="variance",iVe=["typed","add","subtract","multiply","divide","apply","isNaN"],HI=G(Dge,iVe,e=>{var{typed:t,add:r,subtract:n,multiply:i,divide:a,apply:o,isNaN:s}=e,l=Yw({typed:t,add:r,subtract:n,multiply:i,divide:a,apply:o,isNaN:s});return t(Dge,{"...any":function(c){c=Bl(c);try{return l.apply(null,c)}catch(f){throw Ai(f)}}})},{isTransformFunction:!0});var jge="print",aVe=["typed","matrix","zeros","add"],QI=G(jge,aVe,e=>{var{typed:t,matrix:r,zeros:n,add:i}=e,a=Rw({typed:t,matrix:r,zeros:n,add:i});return t(jge,{"string, Object | Array":function(l,u){return a(o(l),u)},"string, Object | Array, number | Object":function(l,u,c){return a(o(l),u,c)}});function o(s){return s.replace(GF,l=>{var u=l.slice(1).split("."),c=u.map(function(f){return!isNaN(f)&&f.length>0?parseInt(f)-1:f});return"$"+c.join(".")})}},{isTransformFunction:!0});var oVe="and",sVe=["typed","matrix","zeros","add","equalScalar","not","concat"],YI=G(oVe,sVe,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:i,not:a,concat:o}=e,s=zw({typed:t,matrix:r,equalScalar:n,zeros:i,not:a,concat:o});function l(u,c,f){var d=u[0].compile().evaluate(f);if(!ha(d)&&!s(d,!0))return!1;var p=u[1].compile().evaluate(f);return s(d,p)}return l.rawArgs=!0,l},{isTransformFunction:!0});var lVe="or",uVe=["typed","matrix","equalScalar","DenseMatrix","concat"],ZI=G(lVe,uVe,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:i,concat:a}=e,o=Ow({typed:t,matrix:r,equalScalar:n,DenseMatrix:i,concat:a});function s(l,u,c){var f=l[0].compile().evaluate(c);if(!ha(f)&&o(f,!1))return!0;var d=l[1].compile().evaluate(c);return o(f,d)}return s.rawArgs=!0,s},{isTransformFunction:!0});var cVe="bitAnd",fVe=["typed","matrix","zeros","add","equalScalar","not","concat"],XI=G(cVe,fVe,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:i,not:a,concat:o}=e,s=Dw({typed:t,matrix:r,equalScalar:n,zeros:i,not:a,concat:o});function l(u,c,f){var d=u[0].compile().evaluate(f);if(!ha(d)){if(isNaN(d))return NaN;if(d===0||d===!1)return 0}var p=u[1].compile().evaluate(f);return s(d,p)}return l.rawArgs=!0,l},{isTransformFunction:!0});var dVe="bitOr",pVe=["typed","matrix","equalScalar","DenseMatrix","concat"],KI=G(dVe,pVe,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:i,concat:a}=e,o=jw({typed:t,matrix:r,equalScalar:n,DenseMatrix:i,concat:a});function s(l,u,c){var f=l[0].compile().evaluate(c);if(!ha(f)){if(isNaN(f))return NaN;if(f===-1)return-1;if(f===!0)return 1}var d=l[1].compile().evaluate(c);return o(f,d)}return s.rawArgs=!0,s},{isTransformFunction:!0});var vt=KN({config:it}),gi=JN({}),yV=wP({BigNumber:vt,config:it}),Oge=AP({}),Mge=XP({BigNumber:vt,config:it}),k0=eT({}),bV=MP({Complex:gi}),Nge=vP({BigNumber:vt,config:it}),Tge=kP({BigNumber:vt,config:it}),Fge=DP({BigNumber:vt,config:it}),k6=rT({}),_ge=yP({BigNumber:vt,config:it}),Pge=gP({}),Ige=SP({BigNumber:vt,config:it}),Bge=tT({}),xV=WN({}),Rge=jP({BigNumber:vt,config:it}),$ge=AI({BigNumber:vt,config:it}),wV=xP({BigNumber:vt,config:it}),qge=hP({}),Lge=NP({}),Rr=iT({Matrix:k6}),zge=oI({BigNumber:vt,config:it}),Uge=EP({BigNumber:vt,config:it}),JI=bP({BigNumber:vt,config:it}),Wge=mP({}),Vge=OP({BigNumber:vt,config:it}),Ce=UN({BigNumber:vt,Complex:gi,DenseMatrix:Rr,Fraction:k0}),eB=TT({BigNumber:vt,config:it,typed:Ce}),Gge=aI({BigNumber:vt,config:it}),Rl=FT({typed:Ce}),Hge=q3({Complex:gi,config:it,typed:Ce}),Qge=z3({BigNumber:vt,typed:Ce}),Yge=W3({BigNumber:vt,Complex:gi,config:it,typed:Ce}),Oo=PT({typed:Ce}),Zge=sF({typed:Ce}),Xge=H3({BigNumber:vt,Complex:gi,config:it,typed:Ce}),Kge=Y3({typed:Ce}),SV=Z3({typed:Ce}),Jge=K3({Complex:gi,config:it,typed:Ce}),dc=ST({BigNumber:vt,typed:Ce}),e0e=aF({typed:Ce}),t0e=wT({typed:Ce}),r0e=aT({typed:Ce}),C6=L_({typed:Ce}),D6=ET({Complex:gi,typed:Ce}),C0=lF({typed:Ce}),tB=J3({typed:Ce}),n0e=t4({BigNumber:vt,typed:Ce}),i0e=n4({BigNumber:vt,typed:Ce}),a0e=$T({typed:Ce}),Qr=vT({config:it,typed:Ce}),o0e=RF({typed:Ce}),EV=qT({typed:Ce}),s0e=LT({Complex:gi,typed:Ce}),l0e=AF({typed:Ce}),u0e=vF({typed:Ce}),e2=zF({typed:Ce}),rB=yF({typed:Ce}),c0e=VF({format:e2,typed:Ce}),nB=uF({typed:Ce}),yu=lT({typed:Ce}),bA=cT({typed:Ce}),D0=pT({typed:Ce}),cd=mT({typed:Ce}),f0e=CP({BigNumber:vt,config:it}),d0e=W_({Complex:gi,typed:Ce}),p0e=VT({Complex:gi,config:it,typed:Ce}),kV=GT({Complex:gi,config:it,typed:Ce}),j0=wF({typed:Ce}),za=HT({typed:Ce}),j6=fF({typed:Ce}),Om=bT({typed:Ce}),m0e=WF({format:e2,typed:Ce}),h0e=Z_({config:it,typed:Ce}),A0e=Rw({typed:Ce}),g0e=X_({config:it,typed:Ce}),iB=cF({typed:Ce}),v0e=a4({BigNumber:vt,typed:Ce}),CV=ZT({BigNumber:vt,Fraction:k0,complex:D6,typed:Ce}),O6=s4({typed:Ce}),Mm=yT({Matrix:k6,equalScalar:Qr,typed:Ce}),y0e=MT({typed:Ce}),b0e=KT({typed:Ce}),x0e=xT({typed:Ce}),rf=IT({typed:Ce}),w0e=u4({typed:Ce}),DV=AT({typed:Ce}),S0e=L3({Complex:gi,config:it,typed:Ce}),E0e=V3({BigNumber:vt,typed:Ce}),aB=w0({isInteger:yu,typed:Ce}),k0e=G3({BigNumber:vt,Complex:gi,config:it,typed:Ce}),C0e=UF({format:e2,typed:Ce}),D0e=z_({typed:Ce}),j0e=e4({typed:Ce}),O0e=i4({BigNumber:vt,typed:Ce}),t2=hT({typed:Ce}),M0e=QF({typed:Ce}),N0e=K_({config:it,typed:Ce}),T0e=o4({BigNumber:vt,typed:Ce}),F0e=l4({typed:Ce}),_0e=R3({SparseMatrix:Mm,typed:Ce}),fd=XT({Complex:gi,config:it,typed:Ce}),P0e=c4({typed:Ce}),xp=NT({typed:Ce}),I0e=U3({BigNumber:vt,Complex:gi,config:it,typed:Ce}),B0e=r4({BigNumber:vt,typed:Ce}),ry=kT({Fraction:k0,typed:Ce}),O0=fT({typed:Ce}),gt=CT({DenseMatrix:Rr,Matrix:k6,SparseMatrix:Mm,typed:Ce}),R0e=DT({isZero:cd,matrix:gt,typed:Ce}),$0e=qF({isNaN:t2,isNumeric:O0,typed:Ce}),dd=YF({bignumber:dc,fraction:ry,number:Om}),jV=LF({config:it,multiplyScalar:za,numeric:dd,typed:Ce}),OV=CF({isInteger:yu,matrix:gt,typed:Ce}),Os=MF({matrix:gt,config:it,typed:Ce}),q0e=NF({matrix:gt,typed:Ce}),r2=TF({matrix:gt,typed:Ce}),MV=eF({BigNumber:vt,config:it,matrix:gt,typed:Ce}),Ms=_F({BigNumber:vt,config:it,matrix:gt,typed:Ce}),L0e=Q3({Complex:gi,config:it,typed:Ce}),NV=BT({BigNumber:vt,Complex:gi,Fraction:k0,config:it,isNegative:bA,matrix:gt,typed:Ce,unaryMinus:xp}),xn=Mw({isInteger:yu,matrix:gt,typed:Ce}),z0e=pF({prod:jV,size:Os,typed:Ce}),oB=FF({conj:C0,transpose:r2,typed:Ce}),TV=hF({DenseMatrix:Rr,SparseMatrix:Mm,matrix:gt,typed:Ce}),ga=ZF({numeric:dd,typed:Ce}),n2=n3({DenseMatrix:Rr,concat:xn,divideScalar:ga,equalScalar:Qr,matrix:gt,typed:Ce}),nf=A3({DenseMatrix:Rr,concat:xn,equalScalar:Qr,matrix:gt,typed:Ce}),i2=gF({matrix:gt,typed:Ce}),U0e=dT({isNumeric:O0,typed:Ce}),xA=bF({BigNumber:vt,DenseMatrix:Rr,SparseMatrix:Mm,config:it,matrix:gt,typed:Ce}),W0e=xF({matrix:gt,multiplyScalar:za,typed:Ce}),M6=k3({DenseMatrix:Rr,concat:xn,config:it,matrix:gt,typed:Ce}),V0e=l3({DenseMatrix:Rr,concat:xn,equalScalar:Qr,matrix:gt,typed:Ce,zeros:Ms}),FV=i3({DenseMatrix:Rr,divideScalar:ga,equalScalar:Qr,matrix:gt,multiplyScalar:za,subtractScalar:rf,typed:Ce}),sB=OT({flatten:i2,matrix:gt,size:Os,typed:Ce}),G0e=YT({BigNumber:vt,concat:xn,equalScalar:Qr,matrix:gt,typed:Ce}),H0e=SF({BigNumber:vt,config:it,matrix:gt,typed:Ce}),lB=h_({addScalar:Oo,complex:D6,conj:C0,divideScalar:ga,equal:nf,identity:xA,isZero:cd,matrix:gt,multiplyScalar:za,sign:CV,sqrt:fd,subtractScalar:rf,typed:Ce,unaryMinus:xp,zeros:Ms}),Q0e=DF({config:it,matrix:gt}),Y0e=u3({DenseMatrix:Rr,concat:xn,equalScalar:Qr,matrix:gt,typed:Ce,zeros:Ms}),ny=KF({BigNumber:vt,DenseMatrix:Rr,config:it,equalScalar:Qr,matrix:gt,typed:Ce,zeros:Ms}),$l=y3({DenseMatrix:Rr,concat:xn,config:it,matrix:gt,typed:Ce}),Ua=JT({DenseMatrix:Rr,concat:xn,equalScalar:Qr,matrix:gt,subtractScalar:rf,typed:Ce,unaryMinus:xp}),Z0e=HF({concat:xn,matrix:gt,typed:Ce}),X0e=j3({DenseMatrix:Rr,concat:xn,config:it,equalScalar:Qr,matrix:gt,typed:Ce}),uB=a3({DenseMatrix:Rr,divideScalar:ga,equalScalar:Qr,matrix:gt,multiplyScalar:za,subtractScalar:rf,typed:Ce}),K0e=dF({DenseMatrix:Rr,concat:xn,matrix:gt,typed:Ce}),an=x4({DenseMatrix:Rr,SparseMatrix:Mm,addScalar:Oo,concat:xn,equalScalar:Qr,matrix:gt,typed:Ce}),J0e=X3({BigNumber:vt,DenseMatrix:Rr,concat:xn,equalScalar:Qr,matrix:gt,typed:Ce}),eve=Dw({concat:xn,equalScalar:Qr,matrix:gt,typed:Ce}),tve=jw({DenseMatrix:Rr,concat:xn,equalScalar:Qr,matrix:gt,typed:Ce}),rve=oF({DenseMatrix:Rr,concat:xn,matrix:gt,typed:Ce}),nve=tP({addScalar:Oo,combinations:C6,divideScalar:ga,isInteger:yu,isNegative:bA,multiplyScalar:za,typed:Ce}),M0=d3({BigNumber:vt,DenseMatrix:Rr,Fraction:k0,concat:xn,config:it,equalScalar:Qr,matrix:gt,typed:Ce}),_V=m3({concat:xn,matrix:gt,typed:Ce}),ive=Hw({add:an,typed:Ce,unaryPlus:eB}),cB=C3({equal:nf,typed:Ce}),ave=Tw({matrix:gt,number:Om,subtract:Ua,typed:Ce}),ove=P_({abs:Rl,addScalar:Oo,deepEqual:cB,divideScalar:ga,multiplyScalar:za,sqrt:fd,subtractScalar:rf,typed:Ce}),N6=E4({addScalar:Oo,conj:C0,multiplyScalar:za,size:Os,typed:Ce}),sve=g3({compareText:_V,isZero:cd,typed:Ce}),PV=Sw({DenseMatrix:Rr,config:it,equalScalar:Qr,matrix:gt,round:ny,typed:Ce,zeros:Ms}),lve=UT({BigNumber:vt,DenseMatrix:Rr,concat:xn,config:it,equalScalar:Qr,matrix:gt,round:ny,typed:Ce,zeros:Ms}),uve=w4({abs:Rl,addScalar:Oo,divideScalar:ga,isPositive:D0,multiplyScalar:za,smaller:$l,sqrt:fd,typed:Ce}),IV=N3({DenseMatrix:Rr,smaller:$l}),ol=T3({ImmutableDenseMatrix:IV,getMatrixDataType:rB}),ql=S3({DenseMatrix:Rr,concat:xn,config:it,matrix:gt,typed:Ce}),fB=JF({Complex:gi,config:it,divideScalar:ga,typed:Ce}),cve=o3({DenseMatrix:Rr,divideScalar:ga,equalScalar:Qr,matrix:gt,multiplyScalar:za,subtractScalar:rf,typed:Ce}),fve=jT({flatten:i2,matrix:gt,size:Os,typed:Ce}),dve=Ww({config:it,numeric:dd,smaller:$l,typed:Ce}),BV=Ew({DenseMatrix:Rr,concat:xn,config:it,equalScalar:Qr,matrix:gt,round:ny,typed:Ce,zeros:Ms}),Jn=QT({addScalar:Oo,dot:N6,equalScalar:Qr,matrix:gt,multiplyScalar:za,typed:Ce}),pve=t3({Complex:gi,config:it,divideScalar:ga,typed:Ce}),mve=Ow({DenseMatrix:Rr,concat:xn,equalScalar:Qr,matrix:gt,typed:Ce}),T6=O3({compare:M0,isNaN:t2,isNumeric:O0,typed:Ce}),hve=c3({DenseMatrix:Rr,concat:xn,equalScalar:Qr,matrix:gt,typed:Ce,zeros:Ms}),RV=v_({SparseMatrix:Mm,abs:Rl,add:an,divideScalar:ga,larger:ql,largerEq:M6,multiply:Jn,subtract:Ua,transpose:r2,typed:Ce}),pc=Iw({add:an,matrix:gt,typed:Ce,zeros:Ms}),dB=Gw({add:an,config:it,numeric:dd,typed:Ce}),Ave=k4({add:an,matrix:gt,typed:Ce}),$V=s3({DenseMatrix:Rr,divideScalar:ga,equalScalar:Qr,matrix:gt,multiplyScalar:za,subtractScalar:rf,typed:Ce}),gve=fP({Complex:gi,add:an,multiply:Jn,number:Om,typed:Ce}),pB=RT({DenseMatrix:Rr,config:it,equalScalar:Qr,matrix:gt,round:ny,typed:Ce,zeros:Ms}),wp=p3({compare:M0,typed:Ce}),vve=rP({addScalar:Oo,combinations:C6,isInteger:yu,isNegative:bA,isPositive:D0,larger:ql,typed:Ce}),yve=mF({matrix:gt,multiply:Jn,subtract:Ua,typed:Ce}),qV=k_({divideScalar:ga,isZero:cd,matrix:gt,multiply:Jn,subtractScalar:rf,typed:Ce,unaryMinus:xp}),bve=nF({concat:xn,equalScalar:Qr,matrix:gt,multiplyScalar:za,typed:Ce}),LV=F3({larger:ql,smaller:$l}),zV=zT({Complex:gi,DenseMatrix:Rr,ceil:pB,equalScalar:Qr,floor:PV,matrix:gt,typed:Ce,zeros:Ms}),UV=C4({Index:ol,typed:Ce}),xve=I_({abs:Rl,add:an,addScalar:Oo,config:it,divideScalar:ga,equalScalar:Qr,flatten:i2,isNumeric:O0,isZero:cd,matrix:gt,multiply:Jn,multiplyScalar:za,smaller:$l,subtract:Ua,typed:Ce}),wve=tF({BigNumber:vt,add:an,config:it,equal:nf,isInteger:yu,mod:BV,smaller:$l,typed:Ce,xgcd:MV}),Sve=WT({concat:xn,equalScalar:Qr,matrix:gt,typed:Ce}),Eve=e3({Complex:gi,config:it,divideScalar:ga,log:fB,typed:Ce}),mB=Uw({config:it,larger:ql,numeric:dd,typed:Ce}),kve=f4({DenseMatrix:Rr,Index:ol,compareNatural:wp,size:Os,subset:pc,typed:Ce}),Cve=p4({DenseMatrix:Rr,Index:ol,compareNatural:wp,size:Os,subset:pc,typed:Ce}),Dve=h4({Index:ol,compareNatural:wp,size:Os,subset:pc,typed:Ce}),jve=g4({Index:ol,compareNatural:wp,size:Os,subset:pc,typed:Ce}),iy=x3({DenseMatrix:Rr,concat:xn,config:it,matrix:gt,typed:Ce}),Ove=M3({compare:M0,compareNatural:wp,matrix:gt,typed:Ce}),Mve=zw({concat:xn,equalScalar:Qr,matrix:gt,not:j6,typed:Ce,zeros:Ms}),ay=_w({bignumber:dc,matrix:gt,add:an,config:it,isPositive:D0,larger:ql,largerEq:M6,smaller:$l,smallerEq:iy,typed:Ce}),Nve=Pw({Index:ol,matrix:gt,range:ay,typed:Ce}),WV=d4({DenseMatrix:Rr,Index:ol,compareNatural:wp,size:Os,subset:pc,typed:Ce}),Tve=A4({Index:ol,compareNatural:wp,size:Os,subset:pc,typed:Ce}),VV=y4({Index:ol,concat:xn,setDifference:WV,size:Os,subset:pc,typed:Ce}),GV=_3({FibonacciHeap:LV,addScalar:Oo,equalScalar:Qr}),HV=Nw({Index:ol,matrix:gt,range:ay,typed:Ce}),N0=C_({abs:Rl,addScalar:Oo,det:qV,divideScalar:ga,identity:xA,matrix:gt,multiply:Jn,typed:Ce,unaryMinus:xp}),QV=m_({DenseMatrix:Rr,Spa:GV,SparseMatrix:Mm,abs:Rl,addScalar:Oo,divideScalar:ga,equalScalar:Qr,larger:ql,matrix:gt,multiplyScalar:za,subtractScalar:rf,typed:Ce,unaryMinus:xp}),Fve=D_({Complex:gi,add:an,ctranspose:oB,deepEqual:cB,divideScalar:ga,dot:N6,dotDivide:n2,equal:nf,inv:N0,matrix:gt,multiply:Jn,typed:Ce}),af=XF({Complex:gi,config:it,fraction:ry,identity:xA,inv:N0,matrix:gt,multiply:Jn,number:Om,typed:Ce}),YV=m4({DenseMatrix:Rr,Index:ol,compareNatural:wp,size:Os,subset:pc,typed:Ce}),_ve=b4({Index:ol,concat:xn,setIntersect:YV,setSymDifference:VV,size:Os,subset:pc,typed:Ce}),Pve=M_({abs:Rl,add:an,identity:xA,inv:N0,map:j0,max:mB,multiply:Jn,size:Os,sqrt:fd,subtract:Ua,typed:Ce}),br=I3({BigNumber:vt,Complex:gi,Fraction:k0,abs:Rl,addScalar:Oo,config:it,divideScalar:ga,equal:nf,fix:zV,format:e2,isNumeric:O0,multiplyScalar:za,number:Om,pow:af,round:ny,subtractScalar:rf}),Ive=RP({BigNumber:vt,Unit:br,config:it}),Bve=yI({BigNumber:vt,Unit:br,config:it}),Rve=sI({BigNumber:vt,Unit:br,config:it}),$ve=LP({BigNumber:vt,Unit:br,config:it}),qve=uI({BigNumber:vt,Unit:br,config:it}),Lve=zP({BigNumber:vt,Unit:br,config:it}),zve=$P({BigNumber:vt,Unit:br,config:it}),Uve=eI({BigNumber:vt,Unit:br,config:it}),Wve=r3({DenseMatrix:Rr,concat:xn,equalScalar:Qr,matrix:gt,pow:af,typed:Ce}),Vve=BP({BigNumber:vt,Unit:br,config:it}),Gve=qP({BigNumber:vt,Unit:br,config:it}),Hve=O_({abs:Rl,add:an,identity:xA,inv:N0,multiply:Jn,typed:Ce}),Qve=cI({BigNumber:vt,Unit:br,config:it}),ZV=PF({addScalar:Oo,ceil:pB,conj:C0,divideScalar:ga,dotDivide:n2,exp:EV,i:bV,log2:kV,matrix:gt,multiplyScalar:za,pow:af,tau:wV,typed:Ce}),hB=U_({BigNumber:vt,Complex:gi,config:it,multiplyScalar:za,pow:af,typed:Ce}),Yve=FP({BigNumber:vt,Unit:br,config:it}),Zve=KP({BigNumber:vt,Unit:br,config:it}),Xve=IF({conj:C0,dotDivide:n2,fft:ZV,typed:Ce}),Kve=GP({BigNumber:vt,Unit:br,config:it}),Jve=dI({BigNumber:vt,Unit:br,config:it}),e1e=IP({BigNumber:vt,Unit:br,config:it}),t1e=bI({BigNumber:vt,Unit:br,config:it}),r1e=mI({BigNumber:vt,Unit:br,config:it}),n1e=tI({BigNumber:vt,Unit:br,config:it}),i1e=VP({BigNumber:vt,Unit:br,config:it}),a1e=CI({BigNumber:vt,Unit:br,config:it}),o1e=SI({BigNumber:vt,Unit:br,config:it}),s1e=DI({BigNumber:vt,Unit:br,config:it}),l1e=JP({BigNumber:vt,Unit:br,config:it}),u1e=rI({BigNumber:vt,Unit:br,config:it}),c1e=PP({BigNumber:vt,Unit:br,config:it}),f1e=nI({BigNumber:vt,Unit:br,config:it}),d1e=gI({BigNumber:vt,Unit:br,config:it}),p1e=TP({BigNumber:vt,Unit:br,config:it}),m1e=vI({BigNumber:vt,Unit:br,config:it}),h1e=iI({BigNumber:vt,Unit:br,config:it}),A1e=lI({BigNumber:vt,Unit:br,config:it}),g1e=HP({BigNumber:vt,Unit:br,config:it}),v1e=$3({Unit:br,typed:Ce}),es=__({divideScalar:ga,equalScalar:Qr,inv:N0,matrix:gt,multiply:Jn,typed:Ce}),y1e=YP({BigNumber:vt,Unit:br,config:it}),a2=V_({gamma:hB,typed:Ce}),b1e=fI({BigNumber:vt,Unit:br,config:it}),x1e=wI({BigNumber:vt,Unit:br,config:it}),w1e=UP({BigNumber:vt,Unit:br,config:it}),XV=y_({DenseMatrix:Rr,lsolve:FV,lup:QV,matrix:gt,slu:RV,typed:Ce,usolve:uB}),S1e=WP({BigNumber:vt,Unit:br,config:it}),E1e=xI({BigNumber:vt,Unit:br,config:it}),k1e=H_({add:an,divide:es,factorial:a2,isInteger:yu,isPositive:D0,multiply:Jn,typed:Ce}),C1e=Q_({factorial:a2,typed:Ce}),D1e=EI({BigNumber:vt,Unit:br,config:it}),j1e=b_({add:an,cbrt:NV,divide:es,equalScalar:Qr,im:nB,isZero:cd,multiply:Jn,re:iB,sqrt:fd,subtract:Ua,typeOf:DV,typed:Ce,unaryMinus:xp}),O1e=v4({compareNatural:wp,typed:Ce}),M1e=BF({abs:Rl,add:an,bignumber:dc,divide:es,isNegative:bA,isPositive:D0,larger:ql,map:j0,matrix:gt,max:mB,multiply:Jn,smaller:$l,subtract:Ua,typed:Ce,unaryMinus:xp}),KV=J_({bignumber:dc,addScalar:Oo,combinations:C6,divideScalar:ga,factorial:a2,isInteger:yu,isNegative:bA,larger:ql,multiplyScalar:za,number:Om,pow:af,subtractScalar:rf,typed:Ce}),N1e=B3({Unit:br,typed:Ce}),T1e=eP({addScalar:Oo,isInteger:yu,isNegative:bA,stirlingS2:KV,typed:Ce}),JV=j_({abs:Rl,add:an,addScalar:Oo,atan:SV,bignumber:dc,column:HV,complex:D6,config:it,cos:tB,diag:TV,divideScalar:ga,dot:N6,equal:nf,flatten:i2,im:nB,inv:N0,larger:ql,matrix:gt,matrixFromColumns:sB,multiply:Jn,multiplyScalar:za,number:Om,qr:lB,re:iB,reshape:OV,sin:O6,size:Os,smaller:$l,sqrt:fd,subtract:Ua,typed:Ce,usolve:uB,usolveAll:$V}),F1e=ZP({BigNumber:vt,Unit:br,config:it}),_1e=pI({BigNumber:vt,Unit:br,config:it}),P1e=G_({divide:es,dotDivide:n2,isNumeric:O0,log:fB,map:j0,matrix:gt,multiply:Jn,sum:dB,typed:Ce}),eG=Qw({add:an,divide:es,typed:Ce}),I1e=hI({BigNumber:vt,Unit:br,config:it}),B1e=_P({BigNumber:vt,Unit:br,config:it}),R1e=Zw({bignumber:dc,add:an,compare:M0,divide:es,isInteger:yu,larger:ql,multiply:Jn,partitionSelect:T6,smaller:$l,smallerEq:iy,subtract:Ua,typed:Ce}),AB=Yw({add:an,apply:aB,divide:es,isNaN:t2,multiply:Jn,subtract:Ua,typed:Ce}),$1e=QP({BigNumber:vt,Unit:br,config:it}),F6=R_({add:an,compare:M0,divide:es,partitionSelect:T6,typed:Ce}),q1e=q_({add:an,divide:es,matrix:gt,mean:eG,multiply:Jn,pow:af,sqrt:fd,subtract:Ua,sum:dB,typed:Ce}),L1e=dP({Complex:gi,add:an,divide:es,matrix:gt,multiply:Jn,typed:Ce}),z1e=$_({abs:Rl,map:j0,median:F6,subtract:Ua,typed:Ce}),U1e=Xw({map:j0,sqrt:fd,typed:Ce,variance:AB}),W1e=$F({BigNumber:vt,Complex:gi,add:an,config:it,divide:es,equal:nf,factorial:a2,gamma:hB,isNegative:bA,multiply:Jn,pi:JI,pow:af,sin:O6,smallerEq:iy,subtract:Ua,typed:Ce}),gB=S4({abs:Rl,add:an,conj:C0,ctranspose:oB,eigs:JV,equalScalar:Qr,larger:ql,matrix:gt,multiply:Jn,pow:af,smaller:$l,sqrt:fd,typed:Ce}),tG=OF({BigNumber:vt,DenseMatrix:Rr,SparseMatrix:Mm,addScalar:Oo,config:it,cos:tB,matrix:gt,multiplyScalar:za,norm:gB,sin:O6,typed:Ce,unaryMinus:xp}),V1e=kI({BigNumber:vt,Unit:br,config:it}),rG=T_({identity:xA,matrix:gt,multiply:Jn,norm:gB,qr:lB,subtract:Ua,typed:Ce}),G1e=jF({multiply:Jn,rotationMatrix:tG,typed:Ce}),nG=N_({abs:Rl,add:an,concat:xn,identity:xA,index:UV,lusolve:XV,matrix:gt,matrixFromColumns:sB,multiply:Jn,range:ay,schur:rG,subset:pc,subtract:Ua,transpose:r2,typed:Ce}),H1e=F_({matrix:gt,multiply:Jn,sylvester:nG,transpose:r2,typed:Ce});var o2={},s2={},Q1e={},Ll=j4({mathWithTransform:s2}),l2=X4({Node:Ll}),wA=J4({Node:Ll}),oy=t_({Node:Ll}),Y1e=a_({Node:Ll}),u2=F4({Node:Ll}),Z1e=$4({Node:Ll,ResultSet:xV}),X1e=L4({Node:Ll}),T0=V4({Node:Ll}),K1e=n_({Node:Ll}),mVe=pP({classes:Q1e}),iG=w_({math:o2,typed:Ce}),J1e=H4({Node:Ll,typed:Ce}),hVe=E_({Chain:iG,typed:Ce}),c2=Y4({Node:Ll,size:Os}),f2=N4({Node:Ll,subset:pc}),eye=B4({matrix:gt,Node:Ll,subset:pc}),F0=o_({Unit:br,Node:Ll,math:o2}),_0=l_({Node:Ll,SymbolNode:F0,math:o2}),pd=u_({AccessorNode:f2,ArrayNode:u2,AssignmentNode:eye,BlockNode:Z1e,ConditionalNode:X1e,ConstantNode:T0,FunctionAssignmentNode:J1e,FunctionNode:_0,IndexNode:c2,ObjectNode:l2,OperatorNode:wA,ParenthesisNode:oy,RangeNode:K1e,RelationalNode:Y1e,SymbolNode:F0,config:it,numeric:dd,typed:Ce}),tye=sP({ConstantNode:T0,FunctionNode:_0,OperatorNode:wA,ParenthesisNode:oy,parse:pd,typed:Ce}),aG=aP({bignumber:dc,fraction:ry,AccessorNode:f2,ArrayNode:u2,ConstantNode:T0,FunctionNode:_0,IndexNode:c2,ObjectNode:l2,OperatorNode:wA,SymbolNode:F0,config:it,mathWithTransform:s2,matrix:gt,typed:Ce}),AVe=c_({parse:pd,typed:Ce}),oG=oP({AccessorNode:f2,ArrayNode:u2,ConstantNode:T0,FunctionNode:_0,IndexNode:c2,ObjectNode:l2,OperatorNode:wA,ParenthesisNode:oy,SymbolNode:F0,add:an,divide:es,equal:nf,isZero:cd,multiply:Jn,parse:pd,pow:af,subtract:Ua,typed:Ce}),sG=f_({parse:pd,typed:Ce}),rye=x_({evaluate:sG}),nye=d_({evaluate:sG}),vB=iP({bignumber:dc,fraction:ry,AccessorNode:f2,ArrayNode:u2,ConstantNode:T0,FunctionNode:_0,IndexNode:c2,ObjectNode:l2,OperatorNode:wA,ParenthesisNode:oy,SymbolNode:F0,add:an,config:it,divide:es,equal:nf,isZero:cd,mathWithTransform:s2,matrix:gt,multiply:Jn,parse:pd,pow:af,resolve:tye,simplifyConstant:aG,simplifyCore:oG,subtract:Ua,typed:Ce}),gVe=lP({OperatorNode:wA,parse:pd,simplify:vB,typed:Ce}),vVe=nP({parse:pd,typed:Ce}),yVe=p_({Parser:nye,typed:Ce}),bVe=cP({bignumber:dc,fraction:ry,AccessorNode:f2,ArrayNode:u2,ConstantNode:T0,FunctionNode:_0,IndexNode:c2,ObjectNode:l2,OperatorNode:wA,ParenthesisNode:oy,SymbolNode:F0,add:an,config:it,divide:es,equal:nf,isZero:cd,mathWithTransform:s2,matrix:gt,multiply:Jn,parse:pd,pow:af,simplify:vB,simplifyConstant:aG,simplifyCore:oG,subtract:Ua,typed:Ce}),xVe=uP({ConstantNode:T0,FunctionNode:_0,OperatorNode:wA,ParenthesisNode:oy,SymbolNode:F0,config:it,equal:nf,isZero:cd,numeric:dd,parse:pd,simplify:vB,typed:Ce}),wVe=S_({Help:rye,mathWithTransform:s2,typed:Ce});Mn(o2,{e:yV,false:Oge,fineStructure:Mge,i:bV,Infinity:Nge,LN10:Tge,LOG10E:Fge,NaN:_ge,null:Pge,phi:Ige,SQRT1_2:Rge,sackurTetrode:$ge,tau:wV,true:qge,E:yV,version:Lge,efimovFactor:zge,LN2:Uge,pi:JI,replacer:Wge,reviver:mVe,SQRT2:Vge,typed:Ce,unaryPlus:eB,PI:JI,weakMixingAngle:Gge,abs:Rl,acos:Hge,acot:Qge,acsc:Yge,addScalar:Oo,arg:Zge,asech:Xge,asinh:Kge,atan:SV,atanh:Jge,bignumber:dc,bitNot:e0e,boolean:t0e,clone:r0e,combinations:C6,complex:D6,conj:C0,cos:tB,cot:n0e,csc:i0e,cube:a0e,equalScalar:Qr,erf:o0e,exp:EV,expm1:s0e,filter:l0e,forEach:u0e,format:e2,getMatrixDataType:rB,hex:c0e,im:nB,isInteger:yu,isNegative:bA,isPositive:D0,isZero:cd,LOG2E:f0e,lgamma:d0e,log10:p0e,log2:kV,map:j0,multiplyScalar:za,not:j6,number:Om,oct:m0e,pickRandom:h0e,print:A0e,random:g0e,re:iB,sec:v0e,sign:CV,sin:O6,splitUnit:y0e,square:b0e,string:x0e,subtractScalar:rf,tan:w0e,typeOf:DV,acosh:S0e,acsch:E0e,apply:aB,asec:k0e,bin:C0e,chain:hVe,combinationsWithRep:D0e,cosh:j0e,csch:O0e,isNaN:t2,isPrime:M0e,randomInt:N0e,sech:T0e,sinh:F0e,sparse:_0e,sqrt:fd,tanh:P0e,unaryMinus:xp,acoth:I0e,coth:B0e,fraction:ry,isNumeric:O0,matrix:gt,matrixFromFunction:R0e,mode:$0e,numeric:dd,prod:jV,reshape:OV,size:Os,squeeze:q0e,transpose:r2,xgcd:MV,zeros:Ms,asin:L0e,cbrt:NV,concat:xn,count:z0e,ctranspose:oB,diag:TV,divideScalar:ga,dotDivide:n2,equal:nf,flatten:i2,hasNumericValue:U0e,identity:xA,kron:W0e,largerEq:M6,leftShift:V0e,lsolve:FV,matrixFromColumns:sB,nthRoot:G0e,ones:H0e,qr:lB,resize:Q0e,rightArithShift:Y0e,round:ny,smaller:$l,subtract:Ua,to:Z0e,unequal:X0e,usolve:uB,xor:K0e,add:an,atan2:J0e,bitAnd:eve,bitOr:tve,bitXor:rve,catalan:nve,compare:M0,compareText:_V,cumsum:ive,deepEqual:cB,diff:ave,distance:ove,dot:N6,equalText:sve,floor:PV,gcd:lve,hypot:uve,larger:ql,log:fB,lsolveAll:cve,matrixFromRows:fve,min:dve,mod:BV,multiply:Jn,nthRoots:pve,or:mve,partitionSelect:T6,rightLogShift:hve,slu:RV,subset:pc,sum:dB,trace:Ave,usolveAll:$V,zpk2tf:gve,ceil:pB,compareNatural:wp,composition:vve,cross:yve,det:qV,dotMultiply:bve,fix:zV,index:UV,intersect:xve,invmod:wve,lcm:Sve,log1p:Eve,max:mB,setCartesian:kve,setDistinct:Cve,setIsSubset:Dve,setPowerset:jve,smallerEq:iy,sort:Ove,and:Mve,range:ay,row:Nve,setDifference:WV,setMultiplicity:Tve,setSymDifference:VV,column:HV,inv:N0,lup:QV,pinv:Fve,pow:af,setIntersect:YV,setUnion:_ve,sqrtm:Pve,vacuumImpedance:Ive,wienDisplacement:Bve,atomicMass:Rve,bohrMagneton:$ve,boltzmann:qve,conductanceQuantum:Lve,coulomb:zve,deuteronMass:Uve,dotPow:Wve,electricConstant:Vve,elementaryCharge:Gve,expm:Hve,faraday:Qve,fft:ZV,gamma:hB,gravitationConstant:Yve,hartreeEnergy:Zve,ifft:Xve,klitzing:Kve,loschmidt:Jve,magneticConstant:e1e,molarMass:t1e,molarPlanckConstant:r1e,neutronMass:n1e,nuclearMagneton:i1e,planckCharge:a1e,planckLength:o1e,planckTemperature:s1e,protonMass:l1e,quantumOfCirculation:u1e,reducedPlanckConstant:c1e,rydberg:f1e,secondRadiation:d1e,speedOfLight:p1e,stefanBoltzmann:m1e,thomsonCrossSection:h1e,avogadro:A1e,bohrRadius:g1e,createUnit:v1e,divide:es,electronMass:y1e,factorial:a2,firstRadiation:b1e,gravity:x1e,inverseConductanceQuantum:w1e,lusolve:XV,magneticFluxQuantum:S1e,molarMassC12:E1e,multinomial:k1e,parse:pd,permutations:C1e,planckMass:D1e,polynomialRoot:j1e,resolve:tye,setSize:O1e,simplifyConstant:aG,solveODE:M1e,stirlingS2:KV,unit:N1e,bellNumbers:T1e,compile:AVe,eigs:JV,fermiCoupling:F1e,gasConstant:_1e,kldivergence:P1e,mean:eG,molarVolume:I1e,planckConstant:B1e,quantileSeq:R1e,simplifyCore:oG,variance:AB,classicalElectronRadius:$1e,evaluate:sG,median:F6,simplify:vB,symbolicEqual:gVe,corr:q1e,freqz:L1e,leafCount:vVe,mad:z1e,parser:yVe,rationalize:bVe,std:U1e,zeta:W1e,derivative:xVe,norm:gB,rotationMatrix:tG,help:wVe,planckTime:V1e,schur:rG,rotate:G1e,sylvester:nG,lyap:H1e,config:it});Mn(s2,o2,{filter:NI({typed:Ce}),forEach:TI({typed:Ce}),map:_I({typed:Ce}),apply:OI({isInteger:yu,typed:Ce}),or:ZI({DenseMatrix:Rr,concat:xn,equalScalar:Qr,matrix:gt,typed:Ce}),and:YI({add:an,concat:xn,equalScalar:Qr,matrix:gt,not:j6,typed:Ce,zeros:Ms}),concat:LI({isInteger:yu,matrix:gt,typed:Ce}),max:PI({config:it,larger:ql,numeric:dd,typed:Ce}),print:QI({add:an,matrix:gt,typed:Ce,zeros:Ms}),bitAnd:XI({add:an,concat:xn,equalScalar:Qr,matrix:gt,not:j6,typed:Ce,zeros:Ms}),diff:zI({bignumber:dc,matrix:gt,number:Om,subtract:Ua,typed:Ce}),min:BI({config:it,numeric:dd,smaller:$l,typed:Ce}),subset:qI({add:an,matrix:gt,typed:Ce,zeros:Ms}),bitOr:KI({DenseMatrix:Rr,concat:xn,equalScalar:Qr,matrix:gt,typed:Ce}),cumsum:GI({add:an,typed:Ce,unaryPlus:eB}),index:FI({Index:ol,getMatrixDataType:rB}),sum:WI({add:an,config:it,numeric:dd,typed:Ce}),range:RI({bignumber:dc,matrix:gt,add:an,config:it,isPositive:D0,larger:ql,largerEq:M6,smaller:$l,smallerEq:iy,typed:Ce}),row:$I({Index:ol,matrix:gt,range:ay,typed:Ce}),column:MI({Index:ol,matrix:gt,range:ay,typed:Ce}),mean:II({add:an,divide:es,typed:Ce}),quantileSeq:VI({add:an,bignumber:dc,compare:M0,divide:es,isInteger:yu,larger:ql,multiply:Jn,partitionSelect:T6,smaller:$l,smallerEq:iy,subtract:Ua,typed:Ce}),variance:HI({add:an,apply:aB,divide:es,isNaN:t2,multiply:Jn,subtract:Ua,typed:Ce}),std:UI({map:j0,sqrt:fd,typed:Ce,variance:AB})});Mn(Q1e,{BigNumber:vt,Complex:gi,Fraction:k0,Matrix:k6,Node:Ll,ObjectNode:l2,OperatorNode:wA,ParenthesisNode:oy,Range:Bge,RelationalNode:Y1e,ResultSet:xV,ArrayNode:u2,BlockNode:Z1e,ConditionalNode:X1e,ConstantNode:T0,DenseMatrix:Rr,RangeNode:K1e,Chain:iG,FunctionAssignmentNode:J1e,SparseMatrix:Mm,IndexNode:c2,ImmutableDenseMatrix:IV,Index:ol,AccessorNode:f2,AssignmentNode:eye,FibonacciHeap:LV,Spa:GV,Unit:br,SymbolNode:F0,FunctionNode:_0,Help:rye,Parser:nye});iG.createProxy(o2);var lG=vV;var lye=ge(FN(),1);var aye=ge(iye(),1);function oye(e){var t=new aye.default;return e.on=t.on.bind(t),e.off=t.off.bind(t),e.once=t.once.bind(t),e.emit=t.emit.bind(t),e}function sye(e,t,r,n){function i(g,A){var b=arguments.length;if(b!==1&&b!==2)throw new ef("import",b,1,2);A||(A={});function v(k,M,O){if(Array.isArray(M))M.forEach(D=>v(k,D));else if(typeof M=="object")for(var C in M)St(M,C)&&v(k,M[C],C);else if(Q1(M)||O!==void 0){var T=Q1(M)?h(M)?M.fn+".transform":M.fn:O;if(St(k,T)&&k[T]!==M&&!A.silent)throw new Error('Cannot import "'+T+'" twice');k[T]=M}else if(!A.silent)throw new TypeError("Factory, Object, or Array expected")}var x={};v(x,g);for(var w in x)if(St(x,w)){var S=x[w];if(Q1(S))u(S,A);else if(c(S))a(w,S,A);else if(!A.silent)throw new TypeError("Factory, Object, or Array expected")}}function a(g,A,b){if(b.wrap&&typeof A=="function"&&(A=l(A)),f(A)&&(A=e(g,{[A.signature]:A})),e.isTypedFunction(r[g])&&e.isTypedFunction(A)){b.override?A=e(g,A.signatures):A=e(r[g],A),r[g]=A,delete n[g],o(g,A),r.emit("import",g,function(){return A});return}if(r[g]===void 0||b.override){r[g]=A,delete n[g],o(g,A),r.emit("import",g,function(){return A});return}if(!b.silent)throw new Error('Cannot import "'+g+'": already exists')}function o(g,A){A&&typeof A.transform=="function"?(r.expression.transform[g]=A.transform,d(g)&&(r.expression.mathWithTransform[g]=A.transform)):(delete r.expression.transform[g],d(g)&&(r.expression.mathWithTransform[g]=A))}function s(g){delete r.expression.transform[g],d(g)?r.expression.mathWithTransform[g]=r[g]:delete r.expression.mathWithTransform[g]}function l(g){var A=function(){for(var v=[],x=0,w=arguments.length;x2&&arguments[2]!==void 0?arguments[2]:g.fn;if(PU(b,"."))throw new Error("Factory name should not contain a nested path. Name: "+JSON.stringify(b));var v=h(g)?r.expression.transform:r,x=b in r.expression.transform,w=St(v,b)?v[b]:void 0,S=function(){var M={};g.dependencies.map(RU).forEach(C=>{if(PU(C,"."))throw new Error("Factory dependency should not contain a nested path. Name: "+JSON.stringify(C));C==="math"?M.math=r:C==="mathWithTransform"?M.mathWithTransform=r.expression.mathWithTransform:C==="classes"?M.classes=r:M[C]=r[C]});var O=g(M);if(O&&typeof O.transform=="function")throw new Error('Transforms cannot be attached to factory functions. Please create a separate function for it with exports.path="expression.transform"');if(w===void 0||A.override)return O;if(e.isTypedFunction(w)&&e.isTypedFunction(O))return e(w,O);if(A.silent)return w;throw new Error('Cannot import "'+b+'": already exists')};!g.meta||g.meta.lazy!==!1?(fw(v,b,S),w&&x?s(b):(h(g)||p(g))&&fw(r.expression.mathWithTransform,b,()=>v[b])):(v[b]=S(),w&&x?s(b):(h(g)||p(g))&&fw(r.expression.mathWithTransform,b,()=>v[b])),n[b]=g,r.emit("import",b,S)}function c(g){return typeof g=="function"||typeof g=="number"||typeof g=="string"||typeof g=="boolean"||g===null||ho(g)||Qo(g)||Ft(g)||Xc(g)||wt(g)||Array.isArray(g)}function f(g){return typeof g=="function"&&typeof g.signature=="string"}function d(g){return!St(m,g)}function p(g){return g.fn.indexOf(".")===-1&&!St(m,g.fn)&&(!g.meta||!g.meta.isClass)}function h(g){return g!==void 0&&g.meta!==void 0&&g.meta.isTransformFunction===!0||!1}var m={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return i}function yB(e,t){var r=Mn({},V1,t);if(typeof Object.create!="function")throw new Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var n=oye({isNumber:Gt,isComplex:Qo,isBigNumber:Ft,isFraction:Xc,isUnit:ho,isString:na,isArray:Fr,isMatrix:wt,isCollection:ha,isDenseMatrix:pA,isSparseMatrix:Kc,isRange:p0,isIndex:wm,isBoolean:vN,isResultSet:yN,isHelp:lw,isFunction:bN,isDate:xN,isRegExp:wN,isObject:Sm,isNull:SN,isUndefined:EN,isAccessorNode:vu,isArrayNode:Yo,isAssignmentNode:kN,isBlockNode:CN,isConditionalNode:DN,isConstantNode:vr,isFunctionAssignmentNode:nd,isFunctionNode:il,isIndexNode:sc,isNode:Dr,isObjectNode:Em,isOperatorNode:mi,isParenthesisNode:Zo,isRangeNode:jN,isRelationalNode:ON,isSymbolNode:Kn,isChain:uw});n.config=ese(r,n.emit),n.expression={transform:{},mathWithTransform:{config:n.config}};var i=[],a=[];function o(c){if(Q1(c))return c(n);var f=c[Object.keys(c)[0]];if(Q1(f))return f(n);if(!Xoe(c))throw console.warn("Factory object with properties `type`, `name`, and `factory` expected",c),new Error("Factory object with properties `type`, `name`, and `factory` expected");var d=i.indexOf(c),p;return d===-1?(c.math===!0?p=c.factory(n.type,r,o,n.typed,n):p=c.factory(n.type,r,o,n.typed),i.push(c),a.push(p)):p=a[d],p}var s={};function l(){for(var c=arguments.length,f=new Array(c),d=0;d{kU(s).forEach(c=>{c&&c.meta&&c.meta.recreateOnConfigChange&&u(c,{override:!0})})}),n.create=yB.bind(null,e),n.factory=G,n.import(kU(Yoe(e))),n.ArgumentsError=ef,n.DimensionError=rr,n.IndexError=Ko,n}var _6={prop:{name:"prop",fn:"prop",args:[{name:"property",types:["text"]}],returnType:"any",description:"Get the value of a property",category:"Property",difficulty:1},slice:{name:"slice",fn:"slice",args:[{name:"text",types:["text"]},{name:"start",types:["number"]},{name:"end",types:["number"]}],returnType:"text",description:"Get a part of a text",category:"String",difficulty:1},if:{name:"if",fn:"if",args:[{name:"condition",types:["boolean"]},{name:"ifTrue",types:["any"]},{name:"ifFalse",types:["any"]}],returnType:"any",description:"If condition is true return the first argument else return the second",category:"Logic",difficulty:2},ifs:{name:"ifs",fn:"ifs",args:[{name:"condition",types:["boolean"]},{name:"ifTrue",types:["any"]},{name:"...",types:[]},{name:"ifFalse",types:["any"]}],returnType:"any",description:"If the first condition is true return the first argument else check the next condition",category:"Logic",difficulty:2},empty:{name:"empty",fn:"empty",args:[{name:"value",types:["any"]}],returnType:"boolean",description:"Check if a list is empty",category:"String",difficulty:1},length:{name:"length",fn:"length",args:[{name:"list",types:["any-multi"]}],returnType:"number",description:"Get the length of a list",category:"List",difficulty:1},values:{name:"values",fn:"values",args:[{name:"list",types:["any-multi"]}],returnType:"number",description:"Get the number of values in a list",category:"List",difficulty:1},uniques:{name:"uniques",fn:"uniques",args:[{name:"list",types:["any-list"]}],returnType:"number",description:"Get the number of unique values in a list",category:"List",difficulty:1},substring:{name:"substring",fn:"substring",args:[{name:"string",types:["text"]},{name:"start",types:["number"]},{name:"end",types:["number"]}],returnType:"text",description:"Get a substring of a string",category:"String",difficulty:2},startsWith:{name:"startsWith",fn:"startsWith",args:[{name:"string",types:["text"]},{name:"substring",types:["text"]}],returnType:"boolean",description:"Check if a string starts with another string",category:"String",difficulty:1},contains:{name:"contains",fn:"contains",args:[{name:"string",types:["text"]},{name:"substring",types:["text"]}],returnType:"boolean",description:"Check if a string contains another string",category:"String",difficulty:1},test:{name:"test",fn:"test",args:[{name:"string",types:["text"]},{name:"regex",types:["text"]}],returnType:"boolean",description:"Test a string with a regex",category:"String",difficulty:3},match:{name:"match",fn:"match",args:[{name:"string",types:["text"]},{name:"regex",types:["text"]}],returnType:"boolean",description:"Match a string with a regex",category:"String",difficulty:3},replace:{name:"replace",fn:"replace",args:[{name:"string",types:["text"]},{name:"search",types:["text"]},{name:"replace",types:["text"]}],returnType:"text",description:"Replace a string with another string",category:"String",difficulty:1},replaceAll:{name:"replaceAll",fn:"replaceAll",args:[{name:"string",types:["text"]},{name:"search",types:["text"]},{name:"replace",types:["text"]}],returnType:"text",description:"Replace all occurences of a string with another string",category:"String",difficulty:1},lower:{name:"lower",fn:"lower",args:[{name:"string",types:["text"]}],returnType:"text",description:"Convert a string to lowercase",category:"String",difficulty:1},upper:{name:"upper",fn:"upper",args:[{name:"string",types:["text"]}],returnType:"text",description:"Convert a string to uppercase",category:"String",difficulty:1},repeat:{name:"repeat",fn:"repeat",args:[{name:"string",types:["text"]},{name:"times",types:["number"]}],returnType:"text",description:"Repeat a string",category:"String",difficulty:1},format:{name:"format",fn:"format",args:[{name:"value",types:["any"]}],returnType:"text",description:"Format a value to string",category:"String",difficulty:1},toNumber:{name:"toNumber",fn:"toNumber",args:[{name:"value",types:["any"]}],returnType:"number",description:"Convert a value to a number",category:"Number",difficulty:1},now:{name:"now",fn:"now",args:[],returnType:"date",description:"Get the current date",category:"Date",difficulty:1},minute:{name:"minute",fn:"minute",args:[{name:"date",types:["date"]}],returnType:"number",description:"Get the minutes of a date",category:"Date",difficulty:1},hour:{name:"hour",fn:"hour",args:[{name:"date",types:["date"]}],returnType:"number",description:"Get the hours of a date",category:"Date",difficulty:1},day:{name:"day",fn:"day",args:[{name:"date",types:["date"]}],returnType:"number",description:"Get the day of a date",category:"Date",difficulty:1},date:{name:"date",fn:"date",args:[{name:"date",types:["date"]}],returnType:"number",description:"Get the date of a date",category:"Date",difficulty:1},week:{name:"week",fn:"week",args:[{name:"date",types:["date"]}],returnType:"number",description:"Get the week of a date",category:"Date",difficulty:1},month:{name:"month",fn:"month",args:[{name:"date",types:["date"]}],returnType:"number",description:"Get the month of a date",category:"Date",difficulty:1},year:{name:"year",fn:"year",args:[{name:"date",types:["date"]}],returnType:"number",description:"Get the year of a date",category:"Date",difficulty:1},pad:{name:"pad",fn:"pad",args:[{name:"number",types:["number"]},{name:"length",types:["number"]},{name:"text",types:["text"]}],returnType:"text",description:"Pad a number with text",category:"String",difficulty:1},range:{name:"range",fn:"range",args:[{name:"numbers",types:["number-multi"]}],returnType:"number",description:"Get the difference between the largest and smallest from a list of numbers",category:"List",difficulty:1},latest:{name:"latest",fn:"latest",args:[{name:"dates",types:["date-multi"]}],returnType:"date",description:"Get the latest date of a list of dates",category:"Date",difficulty:1},earliest:{name:"earliest",fn:"earliest",args:[{name:"dates",types:["date-multi"]}],returnType:"date",description:"Get the earliest date of a list of dates",category:"Date",difficulty:1},dateRange:{name:"dateRange",fn:"dateRange",args:[{name:"dates",types:["date-multi"]},{name:"type",types:["text"]}],returnType:"number",description:"Get the date range of a list of dates",category:"Date",difficulty:1},dateAdd:{name:"dateAdd",fn:"dateAdd",args:[{name:"date",types:["date"]},{name:"amount",types:["number"]},{name:"type",types:["text"]}],returnType:"date",description:"Add an amount to a date",category:"Date",difficulty:2},dateSubtract:{name:"dateSubtract",fn:"dateSubtract",args:[{name:"date",types:["date"]},{name:"amount",types:["number"]},{name:"type",types:["text"]}],description:"Subtract an amount from a date",category:"Date",difficulty:2},dateBetween:{name:"dateBetween",fn:"dateBetween",args:[{name:"date1",types:["date"]},{name:"date2",types:["date"]},{name:"type",types:["text"]}],returnType:"number",description:"Get the difference between two dates",category:"Date",difficulty:2},timeStamp:{name:"timeStamp",fn:"timeStamp",args:[{name:"date",types:["date"]}],returnType:"number",description:"Get the timestamp of a date",category:"Date",difficulty:1},at:{name:"at",fn:"at",args:[{name:"list",types:["any-list"]},{name:"index",types:["number"]}],returnType:"any",description:"Get an element at a specific index",category:"List",difficulty:2},first:{name:"first",fn:"first",args:[{name:"list",types:["any-multi"]}],returnType:"any",description:"Get the first element of a list",category:"List",difficulty:1},last:{name:"last",fn:"last",args:[{name:"list",types:["any-multi"]}],returnType:"any",description:"Get the last element of a list",category:"List",difficulty:1},concat:{name:"concat",fn:"concat",args:[{name:"list 1",types:["any-multi"]},{name:"list 2",types:["any-multi"]}],returnType:"any-multi",description:"Concatenate two lists",category:"List",difficulty:1},sort:{name:"sort",fn:"sort",args:[{name:"list",types:["any-multi"]}],returnType:"any-multi",description:"Sort a list",category:"List",difficulty:1},reverse:{name:"reverse",fn:"reverse",args:[{name:"list",types:["any-multi"]}],returnType:"any-multi",description:"Reverse a list",category:"List",difficulty:1},join:{name:"join",fn:"join",args:[{name:"list",types:["text-multi"]},{name:"separator",types:["text"]}],returnType:"text",description:"Turn a list into text separator",category:"List",difficulty:1},includes:{name:"includes",fn:"includes",args:[{name:"list",types:["any-multi"]},{name:"value",types:["any"]}],returnType:"boolean",description:"Check if a list includes a value",category:"List",difficulty:1},split:{name:"split",fn:"split",args:[{name:"string",types:["text"]},{name:"separator",types:["text"]}],returnType:"text-multi",description:"Split text into a list using a separator",category:"String",difficulty:1},formatDate:{name:"formatDate",fn:"formatDate",args:[{name:"date",types:["date"]},{name:"format",types:["text"]}],returnType:"text",description:"Format a date into text",category:"Date",difficulty:2},parseDate:{name:"parseDate",fn:"parseDate",args:[{name:"date",types:["text"]}],returnType:"date",description:"Transform date from text",category:"Date",difficulty:1},find:{name:"find",fn:"find",args:[{name:"list",types:["any-multi"]},{name:"condition",types:["boolean"]}],returnType:"any",description:"Find an element in a list",category:"List",difficulty:2},findIndex:{name:"findIndex",fn:"findIndex",args:[{name:"list",types:["any-multi"]},{name:"condition",types:["boolean"]}],returnType:"number",description:"Find the index of an element in a list",category:"List",difficulty:2},filter:{name:"filter",fn:"filter",args:[{name:"list",types:["any-multi"]},{name:"condition",types:["boolean"]}],returnType:"any-multi",description:"Filter a list based on a condition",category:"List",difficulty:2},map:{name:"map",fn:"map",args:[{name:"list",types:["any-multi"]},{name:"formula",types:["any"]}],returnType:"any-multi",description:"Change all the values in a list based on a formula",category:"List",difficulty:2},some:{name:"some",fn:"some",args:[{name:"list",types:["any-multi"]},{name:"condition",types:["boolean"]}],returnType:"boolean",description:"Check if some elements in a list are true",category:"List",difficulty:2},every:{name:"every",fn:"every",args:[{name:"list",types:["any-multi"]},{name:"condition",types:["boolean"]}],returnType:"boolean",description:"Check if every element in a list is true",category:"List",difficulty:2},flat:{name:"flat",fn:"flat",args:[{name:"list",types:["any-multi"]}],returnType:"any-multi",description:"Flatten a list of lists into a single list",category:"List",difficulty:2},path:{name:"path",fn:"path",args:[{name:"path",types:["text"]}],returnType:"link",description:"Get the path object of a path",category:"Path",difficulty:2},let:{name:"let",fn:"let",args:[{name:"variable",types:["text"]},{name:"value",types:["any"]},{name:"formula",types:["any"]}],returnType:"any",description:"Define a variable to use in a formula",category:"Variable",difficulty:3},lets:{name:"lets",fn:"lets",args:[{name:"variable",types:["text"]},{name:"value",types:["any"]},{name:"...",types:[]},{name:"formula",types:["any"]}],returnType:"any",description:"Define multiple variables to use in a formula",category:"Variable",difficulty:3}},uye=(e,t,r)=>{let n=e[0];if(!n.isSymbolNode||e.length!==3)return"";let i=n.name,a=e[1];return t.evaluate(`${i} = ${a.toString()}`,r),e[2].compile().evaluate(r)};uye.rawArgs=!0;var cye=(e,t,r)=>{if(e.length%2!==1)return"";for(let i=0;i{if(e.length!==1)return"";let n=e.map(function(a){return a.compile().evaluate(r)});return r.get("$paths").get(n[0])};fye.rawArgs=!0;var dye=(e,t,r)=>r?.get("$current");dye.rawArgs=!0;var pye=(e,t,r)=>r?.get("$index");pye.rawArgs=!0;var mye=(e,t,r)=>{if(e.length!==2)return"";let n=e[0].compile().evaluate?e[0].compile().evaluate(r):e[0];return Array.isArray(n)?n.find((i,a)=>{r.set("$current",i),r.set("$index",a),t.evaluate("current = _current(); index = _index()",r);let o=e[1].compile().evaluate?e[1].compile().evaluate(r):e[1];return i===o})??"":""};mye.rawArgs=!0;var hye=(e,t,r)=>{if(e.length!==2)return"";let n=e[0].compile().evaluate?e[0].compile().evaluate(r):e[0];return Array.isArray(n)?n.findIndex((i,a)=>{r.set("$current",i),r.set("$index",a),t.evaluate("current = _current(); index = _index()",r);let o=e[1].compile().evaluate?e[1].compile().evaluate(r):e[1];return i===o}):""};hye.rawArgs=!0;var Aye=(e,t,r)=>{if(e.length!==2)return"";let n=e[0].compile().evaluate?e[0].compile().evaluate(r):e[0];return Array.isArray(n)?n.filter((i,a)=>(r.set("$current",i),r.set("$index",a),t.evaluate("current = _current(); index = _index()",r),e[1].compile().evaluate(r))):""};Aye.rawArgs=!0;var gye=(e,t,r)=>{if(e.length!==2)return"";let n=e[0].compile().evaluate?e[0].compile().evaluate(r):e[0];return Array.isArray(n)?n.map((i,a)=>(r.set("$current",i),r.set("$index",a),t.evaluate("current = _current(); index = _index()",r),e[1].compile().evaluate(r))):[]};gye.rawArgs=!0;var vye=(e,t,r)=>{if(e.length!==2)return"";let n=e[0].compile().evaluate?e[0].compile().evaluate(r):e[0];return Array.isArray(n)?n.some((i,a)=>(r.set("$current",i),r.set("$index",a),t.evaluate("current = _current(); index = _index()",r),e[1].compile().evaluate(r))):""};vye.rawArgs=!0;var yye=(e,t,r)=>{if(e.length!==2)return"";let n=e[0].compile().evaluate?e[0].compile().evaluate(r):e[0];return Array.isArray(n)?n.every((i,a)=>(r.set("$current",i),r.set("$index",a),t.evaluate("current = _current(); index = _index()",r),e[1].compile().evaluate(r))):""};yye.rawArgs=!0;var bye=(e,t,r)=>{if(e.length!==1)return"";let n=e[0].compile().evaluate?e[0].compile().evaluate(r):e[0];return Array.isArray(n)?n.flat():""};bye.rawArgs=!0;var xye=(e,t,r)=>{if(e.length!==1)return"";let n=e.map(function(o){return o.compile().evaluate(r)}),i=r.get("$properties")?.[n[0]]?.type,a=Sa(i,r.get(n[0]));return(i=="file"||i=="link"||i=="context")&&(i.includes("multi")?a=mr(a).map(o=>r.get("$paths").get(o)??o):a=r.get("$paths").get(a)??a),i=="date"&&(a=PE(a)),a??""};xye.rawArgs=!0;var wye=(e,t,r)=>{if((e.length-1)%2!==0)return"";for(let n=0;n{if(e.length<1||e.length>2)return"";let n=e[0].compile().evaluate(r);n instanceof Date||(n=new Date(n));let i=e[1]?.compile().evaluate(r);return i?.length>0?Pa(n,i):Pa(n,r.get("$settings")?.dateFormat??"yyyy-MM-dd")};Sye.rawArgs=!0;var bu=e=>typeof e=="string"||e instanceof String?e:e instanceof Date?Pa(e,"yyyy-MM-dd"):typeof e=="number"?e.toFixed(0):e?.path?e.path:"",P6={prop:xye,_current:dye,_index:pye,slice:(e,t,r)=>(e=bu(e),e.slice(t,r)),if:(e,t,r)=>e===!0?t:r,ifs:wye,empty:e=>e.length!==1?"":Array.isArray(e[0])?e[0].length===0:e[0]===""?"true":"false",length:e=>e.length,values:e=>e.flat().length,uniques:e=>Mr(e.flat()).length,substring:(e,t,r)=>(e=bu(e),r?e.substring(t,r):e.substring(t)),startsWith:(e,t)=>(e=bu(e),t=bu(t),e.startsWith(t)),contains:(e,t)=>(e=bu(e),t=bu(t),e.includes(t)),test:(e,t)=>(e=bu(e),new RegExp(t).test(e)),match:(e,t)=>(e=bu(e),e.match(new RegExp(t))),replace:(e,t,r)=>(e=bu(e),e.replace(new RegExp(t),r)),replaceAll:(e,t,r)=>(e=bu(e),t=bu(t),r=bu(r),e.replace(new RegExp(t,"g"),r)),lower:e=>(e=bu(e),e.toLowerCase()),upper:e=>(e=bu(e),e.toUpperCase()),repeat:(e,t)=>e.repeat(t),format:bu,toNumber:e=>e instanceof Date?e.getTime():typeof e=="string"?parseFloat(e):e,now:()=>new Date,minute:e=>e.getMinutes(),hour:e=>e.getHours(),day:e=>e.getDay(),date:e=>e.getDate(),week:e=>Pa(e,"w"),month:e=>e.getMonth()+1,year:e=>e.getFullYear(),pad:(e,t,r)=>e.padStart(t,r),range:e=>Math.max(...e)-Math.min(...e),latest:e=>new Date(Math.max(...e.map(t=>t.getTime()))),earliest:e=>new Date(Math.min(...e.map(t=>t.getTime()))),dateRange:(e,t)=>{let r=Math.abs(Math.max(...e.map(n=>n.getTime()))-Math.min(...e.map(n=>n.getTime())));return t.startsWith("day")?r/(1e3*60*60*24):t.startsWith("month")?r/(1e3*60*60*24*30):t.startsWith("year")?r/(1e3*60*60*24*365):t.startsWith("hour")?r/(1e3*60*60):t.startsWith("minute")?r/(1e3*60):t.startsWith("second")?r/1e3:t.startsWith("week")?r/(1e3*60*60*24*7):t.startsWith("quarter")?r/(1e3*60*60*24*30*3):r/(1e3*60*60*24)},dateAdd:(e,t,r)=>(r.startsWith("day")&&e.setDate(e.getDate()+t),r.startsWith("month")&&e.setMonth(e.getMonth()+t),r.startsWith("year")&&e.setFullYear(e.getFullYear()+t),r.startsWith("quarter")&&e.setMonth(e.getMonth()+t*3),r.startsWith("week")&&e.setDate(e.getDate()+t*7),r.startsWith("hour")&&e.setHours(e.getHours()+t),r.startsWith("minute")&&e.setMinutes(e.getMinutes()+t),r.startsWith("second")&&e.setSeconds(e.getSeconds()+t),e),dateSubtract:(e,t,r)=>(r.startsWith("day")&&e.setDate(e.getDate()-t),r.startsWith("month")&&e.setMonth(e.getMonth()-t),r.startsWith("year")&&e.setFullYear(e.getFullYear()-t),r.startsWith("quarter")&&e.setMonth(e.getMonth()-t*3),r.startsWith("week")&&e.setDate(e.getDate()-t*7),r.startsWith("hour")&&e.setHours(e.getHours()-t),r.startsWith("minute")&&e.setMinutes(e.getMinutes()-t),r.startsWith("second")&&e.setSeconds(e.getSeconds()-t),e),dateBetween:(e,t,r)=>{let o=Math.abs(t.getTime()-e.getTime());switch(r){case"days":return Math.round(o/864e5);case"months":return Math.round(o/2592e6);case"years":return Math.round(o/31536e6);case"hours":return Math.round(o/(60*60*1e3));case"minutes":return Math.round(o/(60*1e3));case"seconds":return Math.round(o/1e3);case"weeks":return Math.round(o/(864e5*7));case"quarters":return Math.round(o/(2592e6*3));default:return Math.round(o/864e5)}},style:(e,t)=>e,timeStamp:e=>e.getTime(),at:(e,t)=>e[t],first:e=>e[0],last:e=>e[e.length-1],concat:(e,t)=>e.concat(t),sort:e=>e.sort((t,r)=>r-t),reverse:e=>e.reverse(),join:(e,t)=>e.join(t),includes:(e,t)=>e.includes(t),split:(e,t)=>e.split(t),formatDate:Sye,parseDate:e=>PE(e),find:mye,findIndex:hye,filter:Aye,map:gye,some:vye,every:yye,flat:bye,path:fye,let:uye,lets:cye};var md=(e,t,r,n,i,a,o)=>{if(!r)return"";let s=new Map;Object.keys(i).forEach(u=>s.set(u,i[u])),s.set("$properties",n),s.set("$paths",t),a&&s.set("$current",a);let l;try{e.evaluate("current = _current()",s),l=e.evaluate(r,s),l=Ki("",l)}catch(u){if(l="",o)throw u;console.log(a,r,u)}return l};var bB=(e,t)=>t.startsWith(e),fG=(e,t)=>(r,n)=>{let i=t?r:n,a=t?n:r;return e(i)e(a)?1:0},I6=(e,t)=>(r,n)=>{let i=t?r:n,a=t?n:r;return i[e]a[e]?1:0},Eye=(e,t)=>(r,n)=>{let i=t?r:n,a=t?n:r;return i[e]?.toLowerCase().localeCompare(a[e]?.toLowerCase())},kye=(e,t)=>(r,n)=>{let i=t?r:n,a=t?n:r;return+i[e]-+a[e]};var Nm=e=>{try{return e?.replace(/'/g,"''")}catch(t){return console.log(t,e),""}},SA=e=>e?.charAt(0)=="_"?SA(e.substring(1)):e?.replace(/"/g,""),Tm=e=>e?.replace(/[^a-z0-9+]+/gi,""),EVe=/^[+\$#^]+/,Cye=/[\/\?<>\\:\*\|":]/g,Dye=/[\x00-\x1f\x80-\x9f]/g,jye=/^\.+$/,Oye=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,Mye=e=>{let t="";return e.replace(EVe,t).replace(Cye,t).replace(Dye,t).replace(jye,t).replace(Oye,t)},P0=e=>{let t="";return e.replace(Cye,t).replace(Dye,t).replace(jye,t).replace(Oye,t)};var xB=(e,t,r)=>e.spacesIndex.has(t)?e.spaceManager.deleteTag(of(e,e.spacesIndex.get(t).space),r):e.spaceManager.deleteTag(t,r),Fm=(e,t,r)=>e.spacesIndex.has(t)?e.spaceManager.addTag(of(e,e.spacesIndex.get(t).space),r):e.spaceManager.addTag(t,r),dG=(e,t)=>e.spaceManager.createSpace(Tg(t),e.settings.spacesFolder,null);var wB=async(e,t)=>{let r=e.spaceManager.uriByString(t);if(r.refType=="context"){let n=e.contextsIndex.get(r.basePath)?.schemas.find(i=>i.id==r.ref);if(n)return{id:n.id,name:n.name,type:"context",path:r.basePath}}if(r.refType=="frame")return e.spaceManager.readFrame(r.basePath,r.ref).then(n=>{let i=n?.schema;if(i){let a=to(i);return{id:i.id,name:a.name,sticker:a.def?.icon,type:"frame",frameType:a.type,path:r.basePath}}return null});if(r.refType=="action"){let n=e.actionsIndex.get(r.path)?.find(i=>i.schema.id==r.ref)?.schema;if(n)return{id:n.id,name:n.name,sticker:n.def?.icon,type:"action",path:r.basePath}}return null},kVe=e=>({field:lu(e?.field??"rank"),asc:Qj(e?.asc),group:Qj(e?.group),recursive:Qj(e?.recursive)}),CVe=e=>e=="fileprop"?"file":e=="filemeta"?"path":lu(e),DVe=e=>({type:CVe(e.type),fType:lu(e.fType),field:lu(e.field),fn:lu(e.fn),value:lu(e.value)}),jVe=e=>({type:rJ(e.type,["any","all"],"any"),trueFalse:!!e.truefalse,filters:Zs(e.filters).map(t=>DVe(t))}),B6=(e,t)=>({sort:kVe(e[zE]),recursive:lu(e[eO]),contexts:Zs(e[BE]),links:Zs(e[LE]),filters:Zs(e[qE]).map(r=>jVe(r)),template:lu(e[RE]),templateName:lu(e[$E])}),Nye=(e,t,r,n,i,a,o)=>({id:i?i+"/"+e.path:e.path,parentId:i,depth:n,index:0,space:a,path:e.path,item:e,rank:e?.rank,collapsed:t,sortable:r,childrenCount:o,type:"space"}),SB=(e,t,r,n,i,a,o,s,l,u)=>({item:t,space:r,id:u+"/"+t.path,parentId:u,depth:i,path:n,index:a,collapsed:o,sortable:s,childrenCount:l,rank:t.rank,type:"file"}),d2=(e,t,r)=>(t??(ar(e.ui)?40:29))+(r?10:0),pG=e=>(t,r)=>{if(e.field=="rank")return t.rank-r.rank;let n=[];if(e.group&&n.push(I6("type",!1)),e.field=="number")n.push(kye("name",e.asc));else if(e.field=="name")n.push(Eye(e.field,e.asc));else if(e.field.startsWith("props")){let i=e.field.split(".")[1],a=o=>o?.metadata?.property?.[i];n.push(fG(a,e.asc))}else{let i=a=>a?.metadata?.file?.[e.field];n.push(fG(i,e.asc))}return n.reduce((i,a)=>i==0?a(t,r):i,0)},p2=async(e,t,r,n)=>{let i=e.spacesIndex.get(n);if(!i)return;let a=r;e.addToContextStateQueue(()=>Iye(e.spaceManager,[t],a,i.space).then(o=>{let s=[...e.spacesMap.getInverse(i.path)].map(l=>e.reloadPath(l));return Promise.all(s)}).then(o=>e.dispatchEvent("spaceStateUpdated",{path:i.path})))},mG=async(e,t,r,n,i)=>{if(!t)return;let a=e.pathsIndex.get(t.path);if(!a)return;let o=r=="/"?a.name:r+"/"+a.name;if(await e.spaceManager.pathExists(o)){e.ui.notify(z.notice.fileExists);return}i?await e.spaceManager.copyPath(t.path,r):await e.spaceManager.renamePath(t.path,Rf(t.path,r)),p2(e,o,n,r)},Tye=(e,t,r)=>{sy(e,t,"template",r)},Fye=(e,t,r)=>{sy(e,t,"templateName",r)};var Sp=async(e,t,r)=>{let n=e.spacesIndex.get(t),i;if(n){if(!e.pathsIndex.has(t))return await e.reloadSpace(n.space);if(r)i=await sf(e,n.space,r);else return}else{let a=e.spaceManager.spaceInfoForPath(t);if(a.readOnly)return await e.reloadSpace(a);await e.spaceManager.createSpace(a.name,e.spaceManager.parentPathForPath(a.path),r),r?(await sf(e,a,r),i=await e.reloadSpace(a,r)):i=await e.reloadSpace(a)}return e.onSpaceDefinitionChanged(i,null),i},sy=async(e,t,r,n)=>{e.spaceManager.saveSpace(t,a=>({...a,[r]:n}));let i=e.spacesIndex.get(t);await e.updateSpaceMetadata(t,{...i.metadata,[r]:n})},OVe=async(e,t,r)=>{e.spaceManager.saveSpace(t,n=>n,r)},sf=async(e,t,r)=>(await e.spaceManager.saveSpace(t.path,n=>({...n,...r})),e.updateSpaceMetadata(t.path,r)),m2=async(e,t,r,n)=>t.type=="tag"?Fm(e,r,t.name):_m(e,t,r,n);var h2=async(e,t)=>{let r=null;return e.settings.newFileLocation=="folder"?r=e.spacesIndex.get(e.settings.newFileFolderPath):e.settings.newFileLocation=="current"&&t&&t.type=="space"?r=e.spacesIndex.get(t.path):t&&(r=e.spacesIndex.get(t.parent)),r||(r=e.spacesIndex.get("/")),r},_m=async(e,t,r,n)=>{if(r==t.path)return;let i=Zs(t.metadata.links)??[];i.find(o=>o==r)||i.push(r),await sf(e,t.space,{...t.metadata,links:i}),await e.reloadPath(r,!0).then(o=>e.dispatchEvent("pathStateUpdated",{path:r})),p2(e,r,n,t.path)},R6=async(e,t)=>{let r=e.spacesIndex.get(t);!r||(r.type=="tag"?e.onTagDeleted(r.name):r.type=="folder"&&await Vh(e,r.path))},hd=(e,t,r)=>{let n=e.spacesIndex.get(t);n&&sf(e,n.space,{...n.metadata,sort:r})},of=(e,t)=>e.settings.enableFolderNote?t.notePath:t.defPath,I0=async(e,t,r)=>{let n=e.spacesIndex.get(r);!n||(await e.spaceManager.saveTemplate(t,n.path),e.ui.notify(z.notice.templateSaved+n.name))},B0=async(e,t,r)=>{let n=e.spacesIndex.get(t);!n||(n.type=="tag"?r.forEach(i=>xB(e,i,n.name)):(n.type=="folder"||n.type=="vault")&&await sy(e,n.path,"links",n.metadata.links.filter(i=>!r.some(a=>a==i))))},hG=async(e,t,r,n)=>{let i;try{if(t.metadata.templateName?.length>0){let o=md(e.formulaContext,e.pathsIndex,t.metadata.templateName,{},{},e.pathsIndex.get(t.path));o?.length>0&&(i=o)}}catch{}if(!await e.spaceManager.pathExists(`${t.path}/${e.settings.spaceSubFolder}/templates/${r}`)){zn(e,t,"md",null,!1,null,n);return}let a=await e.spaceManager.copyPath(`${t.path}/${e.settings.spaceSubFolder}/templates/${r}`,t.path,i);a&&e.ui.openPath(a,n)},zn=async(e,t,r,n,i,a,o)=>{let s;return t.type=="tag"?(s=await e.spaceManager.createItemAtPath("/",r,n,a),await e.spaceManager.addTag(s,t.name)):s=await e.spaceManager.createItemAtPath(t.path,r,n,a),i||e.ui.openPath(s,o),s};var _ye=async(e,t,r)=>{let n=(i,a,o)=>{let s={...a,name:SA(a.name)},l=i;if(s.name=="")return e.ui.notify(z.notice.noPropertyName),!1;if(!o&&l.cols.find(d=>d.name.toLowerCase()==s.name.toLowerCase())||o&&o.name!=s.name&&l.cols.find(d=>d.name.toLowerCase()==s.name.toLowerCase()))return e.ui.notify(z.notice.duplicatePropertyName),!1;let u=o?l.cols.findIndex(d=>d.name==o.name):-1,c=u==-1?[...l.cols,s]:l.cols.map((d,p)=>p==u?s:d),f={...l,cols:c??[]};return e.spaceManager.saveFrame(t,f),!0};if(e.spacesIndex.has(t)){let i=await e.spaceManager.readFrame(t,"main");n(i,{...r,schemaId:"main"})}else e.spaceManager.saveProperties(t,{[r.name]:nx(r.type)})},Di=(e,t,r)=>e.spacesIndex.has(t)?OVe(e,t,r):e.spaceManager.saveProperties(t,r),AG=(e,t,r,n)=>{if(e.spacesIndex.has(t)){e.spaceManager.renameProperty(of(e,e.spacesIndex.get(t).space),r,n);return}e.spaceManager.renameProperty(t,r,n)},Pye=(e,t,r)=>{if(e.spacesIndex.has(t)){e.spaceManager.deleteProperty(of(e,e.spacesIndex.get(t).space),r);return}e.spaceManager.deleteProperty(t,r)};var EB=async(e,t)=>{let r=e.spaceManager.uriByString(t);if(!r)return null;let n=r.basePath,i=e.spacesIndex.get(r.basePath);if(!i)return null;let a,o,s,l;if(r.refType=="frame"){s=r.ref;let u=await e.spaceManager.readAllFrames(n).then(c=>Object.values(c).map(f=>f.schema));s&&u&&(l=u.find(c=>c.id==s)?.name,a=dr(u.find(c=>c.id==s)?.def)?.db,o=e.contextsIndex.get(n)?.schemas.find(c=>c.id==a)?.name)}else r.refType=="context"&&(a=r.ref,o=e.contextsIndex.get(n)?.schemas.find(u=>u.id==a)?.name);return{space:n,spaceName:i.name,schema:a,schemaName:o,view:s,viewName:l}},kB=async(e,t,r,n)=>{let i=await e.readTable(t.path,r);i&&await n(i,t)},EA=async(e,t,r)=>{let n=await e.contextForSpace(t.path);n&&await r(n,t)},hc=async(e,t,r,n)=>{await e.saveTable(t.path,r,n).then(i=>i&&e.superstate.reloadContextByPath(t.path,!0))};var Bye=(e,t,r,n,i)=>({...e,rows:e.rows.map(a=>a[t]==r?{...a,[n]:Ni(mr(a[n]).filter(o=>o!=i))}:a)}),MVe=(e,t,r,n,i)=>({...e,rows:e.rows.map(a=>a[t]==r?{...a,[n]:i}:a)});var NVe=(e,t,r)=>({...e,rows:r?rx(e.rows,r,t):[...e.rows,...t]}),TVe=(e,t,r)=>({...e,rows:e.rows.map((n,i)=>i==r?t:n)}),Rye=async(e,t,r,n,i,a,o)=>{kB(e,t,r,async s=>{let l={...s,rows:s.rows.map((u,c)=>c==n?{...u,[i]:a}:u)};return o&&(l={...l,rows:Cs(l.rows,n,o)}),mc.default.isEqual(s,l)||await hc(e,t,l),l})},CB=async(e,t,r,n,i,a,o)=>{e.contextForSpace(t.path).then(s=>{let u=(a??MVe)(s,It,r,n,i);return o&&(u=R$(u,[r],o)),hc(e,t,u).then(c=>u)})};var FVe=async(e,t,r)=>{let n=t;e.spacesIndex.has(n)&&(n=of(e,e.spacesIndex.get(n).space));let i=await e.spaceManager.readProperties(n);return i?Object.keys(i).reduce((a,o)=>r.some(s=>s.name==o)?{...a,[o]:Ki(o,i[o],r.find(s=>s.name==o).type)}:a,{}):{}},$ye=(e,t)=>t=="$space"?Qoe:t=="$context"?Xd.rows:e.contextsIndex.get(t)?.contextTable?.cols??[],gG=async(e,t,r)=>{let n=async a=>{let o=a.rows.some(l=>l[It]===t),s=await FVe(e,t,a.cols);return o?a.rows.map(l=>l[It]==t?{...l,...s}:l):[...a.rows,{[It]:t,...s}]},i=r.map(a=>EA(e.spaceManager,a,async(o,s)=>{let l=await n(o),u={...o,rows:l};return mc.default.isEqual(o,u)||await hc(e.spaceManager,s,u,!0),u}));await Promise.all(i)},DB=async(e,t,r,n,i)=>kB(e,t,r,async(a,o)=>{let s=TVe(a,i,n);return mc.default.isEqual(a,s)||await hc(e,o,s),s}),qye=async(e,t,r,n,i)=>{let a=o=>({...o,rows:o.rows.map(s=>s[It]==t?{...s,[r]:n}:s)});return EA(e,i,async(o,s)=>{let l=a(o);return mc.default.isEqual(o,l)||await hc(e,s,l),l})},Lye=async(e,t,r,n)=>{let i=o=>{let s=o.cols.map(l=>l.type.startsWith("context")&&l.value==t?{...l,value:r}:l);return{...o,cols:s}},a=n.map(o=>EA(e,o,async(s,l)=>{let u=i(s);return mc.default.isEqual(s,u)||await hc(e,l,u),u}));return Promise.all(a)},zye=async(e,t,r)=>{let n=a=>{let o=a.cols.map(s=>s.type.startsWith("context")&&s.value==t?{...s,type:"link-multi"}:s);return{...a,cols:o}},i=r.map(a=>EA(e,a,async(o,s)=>{let l=n(o);return mc.default.isEqual(o,l)||await hc(e,s,l),l}));return Promise.all(i)},Uye=async(e,t,r,n,i)=>kB(e,r,n,async(a,o)=>{let s=NVe(a,[t],i);return mc.default.isEqual(a,s)||await hc(e,o,s),s}),Wye=async(e,t,r,n)=>kB(e,t,r,async(i,a)=>{let o={...i,rows:i.rows.filter((s,l)=>l!=n)};return mc.default.isEqual(i,o)||await hc(e,a,o),o});var Vye=async(e,t,r,n)=>{let i=n.map(a=>EA(e,a,async(o,s)=>{let l=B$(o.cols),u={...o,rows:o.rows.map(c=>jJ(e,c,t,r,l))};return mc.default.isEqual(o,u)||await hc(e,s,u),u}));return Promise.all(i)},Gye=async(e,t,r)=>{let n=r.map(i=>EA(e,i,async(a,o)=>{let s=B$(a.cols),l={...a,rows:a.rows.map(u=>DJ(e,u,t,s))};return mc.default.isEqual(a,l)||await hc(e,o,l),l}));return Promise.all(n)},Hye=async(e,t,r,n)=>{let i=n.map(a=>EA(e,a,async(o,s)=>{let l=OJ(o,t,r);return mc.default.isEqual(o,l)||await hc(e,s,l),l}));return Promise.all(i)},Qye=async(e,t,r)=>{let n=r.map(i=>EA(e,i,async(a,o)=>{let s=MJ(a,t);return mc.default.isEqual(a,s)||await hc(e,o,s),s}));return Promise.all(n)},Iye=async(e,t,r,n)=>EA(e,n,async(i,a)=>{let o=R$(i,t,r);return mc.default.isEqual(i,o)||await hc(e,a,o,!0),o});var bwe=ge(Te());var je=e=>e.defaultView||window;var Pm=(e,t)=>({name:"",type:2,value:e,onValueChange:t}),vG=e=>({name:e,type:-2,disabled:!0}),Ut={name:"",type:-1,disabled:!0},Yt=(e,t)=>({ui:e,multi:!1,value:[],editable:!1,options:t,searchable:!1,showAll:!0});var lf=ge(Te()),Yye=(e,t,r,n,i,a)=>{e.ui.openModal(t,lf.default.createElement(ji,{value:r,saveValue:n,saveLabel:i}),a)},ji=e=>{let[t,r]=(0,lf.useState)(e.value),n=()=>{e.saveValue(t),e.hide&&e.hide()},i=(0,lf.useRef)(null);return(0,lf.useEffect)(()=>{i?.current&&i.current.focus()},[i]),lf.default.createElement("div",{className:"mk-layout-column mk-gap-8"},lf.default.createElement("input",{ref:i,value:t,type:"text",onChange:a=>r(a.target.value),className:"mk-input mk-input-large",style:{width:"100%"},onKeyDown:a=>{a.key==="Enter"&&n()}}),lf.default.createElement("div",{className:"mk-modal-actions"},lf.default.createElement("button",{onClick:()=>n()},e.saveLabel),lf.default.createElement("button",{onClick:()=>e.hide&&e.hide()},z.buttons.cancel)))};var ei=ge(Te());var ly=e=>{let t;try{t=_Ve(e)}catch{t=e}return t};function kA(e){if(!e)return["",""];let t=e.match(/^(.*?)\s*\/\/\s*(.*)$/);return t?[t[1],t[2]]:["",e]}var _Ve=e=>{let r=e.split("-").map(n=>`0x${n}`);return String.fromCodePoint(...r)};var PVe=e=>{let[t,r]=(0,ei.useState)(""),[n,i]=(0,ei.useState)([]),[a,o]=(0,ei.useState)([]),[s,l]=(0,ei.useState)(null),u=x=>x.type=="emoji"?ly(x.html):x.html;(0,ei.useEffect)(()=>{let x=[];x.push(...e.ui.allStickers()),i(x)},[]);let c=(0,ei.useMemo)(()=>new Set(n.map(x=>x.type)),[n]),[f,d]=(0,ei.useState)(1),p=(0,ei.useCallback)(()=>{d(x=>x+1)},[f]),h=(0,ei.useRef)(null);(0,ei.useEffect)(()=>{let x=new IntersectionObserver(w=>{w[0].isIntersecting&&p()});return h.current&&x.observe(h.current),()=>{h.current&&x.unobserve(h.current)}},[p]);let[m,g]=(0,ei.useState)(null);(0,ei.useEffect)(()=>{o(n.filter(x=>x.name.includes(t)&&(m==null||x.type==m)).slice(0,f*250))},[t,n,f,m]);let A=x=>{r(x.target.value)},b=x=>{let w=s;x.key==="ArrowUp"&&w>0?l(w-1):x.key==="ArrowDown"&&w{v.current&&v.current.focus()},[v.current]),ei.default.createElement(ei.default.Fragment,null,ei.default.createElement("div",{className:"mk-palette-search"},ei.default.createElement("div",{className:"mk-icon-small",dangerouslySetInnerHTML:{__html:e.ui.getSticker("ui//search")}}),ei.default.createElement("input",{value:t,onChange:A,onKeyDown:b,placeholder:z.labels.findStickers,ref:v}),ei.default.createElement("button",{className:"mk-toolbar-button"})),ei.default.createElement("div",{className:"mk-menu-sections"},ei.default.createElement("div",{onClick:()=>g(null),className:`${m==null?"is-active":""} mk-menu-section`},"All"),[...c].map(x=>ei.default.createElement("div",{key:x,onClick:()=>g(x),className:`${m==x?"is-active":""} mk-menu-section`},x))),ei.default.createElement("div",{className:"mk-layout-row mk-layout-wrap mk-gap-4 mk-padding-12 mk-layout-scroll"},a.map((x,w)=>ei.default.createElement("div",{key:w,onClick:()=>{e.selectedSticker(a[w].type+"//"+a[w].value),e.hide()},className:s===w?"selected mk-padding-4 mk-border-radius-4 mk-hover":"mk-padding-4 mk-border-radius-4 mk-hover"},ei.default.createElement("div",{dangerouslySetInnerHTML:{__html:u(x)},className:"mk-sticker"}))),ei.default.createElement("div",{ref:h})))},va=PVe;var CA=(e,t,r)=>{if(e.spacesIndex.has(t)){Di(e,of(e,e.spacesIndex.get(t).space),{[e.settings.fmKeyBanner]:r});return}Di(e,t,{[e.settings.fmKeyBanner]:r})},A2=async(e,t,r)=>{e.spaceManager.saveLabel(t,e.settings.fmKeyColor,r)},uf=async(e,t,r)=>{e.spaceManager.saveLabel(t,e.settings.fmKeySticker,r)},uy=(e,t,r,n)=>{let i=Lo([n,...Zs(r).filter(a=>a==n)]);return Di(e,t,{[e.settings.fmKeyAlias]:Sa("option-multi",i,!0)})};var Xye=async(e,t,r,n,i,a,o,s)=>{if(t.length==1){IVe(e,t[0],r,n,i,a,o,s);return}if(i){let l=a.findIndex(({id:m})=>m===n),u=a[l],c=u.type=="file"?u.depth==0?null:a.find(m=>m.id==u.parentId)?.item:u.item,f=t.filter(m=>!bB(m,c.path)),d=i.insert?n:i.parentId,p=a.find(({id:m})=>m===d)?.item.path,h=d==u.id?-1:u.rank??-1;if(!p)return;g2(e,f,p,i.sortable&&h,s)}},IVe=async(e,t,r,n,i,a,o,s)=>{if(i){let l=a,u=l.findIndex(({id:A})=>A===n),c=l[u],f=i.insert?n:i.parentId,d=i.depth==0&&!i.insert?null:l.find(({id:A})=>A===f)?.item.path,p=f==null?o.findIndex(A=>A?.path==c.id):f==c.id?-1:c.rank??-1;if(!r){Zye(e,t,null,d,i.sortable&&p,s);return}let h=l.findIndex(({id:A})=>A===r),m=l[h],g=m.parentId==null?null:l.find(({id:A})=>A===m.parentId)?.item.path;Zye(e,m.item.path,g,d,i.sortable&&p,s)}},BVe=(e,t,r)=>{let n=e.focuses[e.settings.currentWaypoint]??{sticker:"",name:"Waypoint",paths:[]},a=n.paths.findIndex(s=>s==t)>r?Math.max(0,r-1):r;n.paths=Cs(n.paths,n.paths.findIndex(s=>s==t),a),e.settings.currentWaypoint>e.focuses.length&&e.spaceManager.saveFocuses([...e.focuses,n]);let o=e.focuses.map((s,l)=>l==e.settings.currentWaypoint?n:s);e.spaceManager.saveFocuses(o)},Zye=async(e,t,r,n,i,a)=>{if(!e.pathsIndex.get(t))return!1;if(!n){BVe(e,t,i);return}let s=e.spacesIndex.get(n);if(r==n){p2(e,t,i,n);return}(s.type=="folder"||s.type=="vault")&&(a=="link"||bB(t,s.path)?_m(e,s,t,i):mG(e,e.pathsIndex.get(t),s.path,i,a=="copy")),s.type=="tag"&&Fm(e,t,s.name),r&&r!=n&&B0(e,r,[t])},g2=async(e,t,r,n,i)=>{let a=e.spacesIndex.get(r);!a||((a.type=="folder"||a.type=="vault")&&t.forEach(o=>{i=="link"||bB(o,a.path)?_m(e,a,o,n):mG(e,e.pathsIndex.get(o),a.path,n,i=="copy")}),a.type=="tag"&&t.forEach(o=>Fm(e,o,a.name)))};var Kye=(e,t,r)=>{t.forEach(n=>{uf(e,n,r)})},Jye=(e,t,r)=>{t.forEach(n=>{A2(e,n,r)})},v2=(e,t,r)=>{uf(e,t,r)},jB=(e,t)=>{t.forEach(r=>{uf(e,r,"")})},y2=(e,t)=>{uf(e,t,"")};var $6=ge(Te());var b2=ge(Te()),cy=e=>{let{hide:t,confirmAction:r,message:n,confirmLabel:i}=e,a=()=>{r(),t()};return b2.default.createElement("div",{className:"mk-modal-contents"},b2.default.createElement("div",{className:"mk-modal-message"},n),b2.default.createElement("div",{className:"mk-button-group"},b2.default.createElement("button",{onClick:()=>a(),className:"mod-warning"},i),b2.default.createElement("button",{onClick:()=>t&&t()},z.buttons.cancel)))};var RVe=e=>`${e}-gradient(`,yG=e=>{let t=e.values;t.sort((o,s)=>o.position-s.position),t=t.length==1?[t[0],t[0]]:t;let r=t.map(o=>`${o.color} ${o.position}%`).join(", "),n=e.type,i=["top","left","bottom","right","center"],a=e.direction;return["linear","repeating-linear"].indexOf(n)>=0&&i.indexOf(a)>=0&&(a=a==="center"?"to right":`to ${a}`),["radial","repeating-radial"].indexOf(n)>=0&&i.indexOf(a)>=0&&(a=`circle at ${a}`),r?`${n}-gradient(${a}, ${r})`:""},ebe=e=>{let t=null,r=null,n=e.indexOf("(")+1,i=e.lastIndexOf(")"),a=e.substring(n,i),o=a.split(/,(?![^(]*\)) /);if(!a)return null;o.length>2&&(r=o.shift());let s=!1;return["repeating-linear","repeating-radial","linear","radial"].forEach(u=>{e.indexOf(RVe(u))>-1&&!s&&(s=!0,t=u)}),t?{type:t,direction:r,values:o.map(u=>{let c=u.split(" "),f=parseFloat(c.pop()),d=c.join("");return{position:f,color:d}})}:null};var bG=ge(pi());var ia=ge(Te());var R0=[["Red","var(--mk-color-red)"],["Pink","var(--mk-color-pink)"],["Orange","var(--mk-color-orange)"],["Yellow","var(--mk-color-yellow)"],["Green","var(--mk-color-green)"],["Turquoise","var(--mk-color-turquoise)"],["Teal","var(--mk-color-teal)"],["Blue","var(--mk-color-blue)"],["Purple","var(--mk-color-purple)"],["Brown","var(--mk-color-brown)"],["Charcoal","var(--mk-color-charcoal)"],["Gray","var(--mk-color-gray)"]],OB=[["Base 0","var(--mk-color-base-0)"],["Base 10","var(--mk-color-base-10)"],["Base 20","var(--mk-color-base-20)"],["Base 30","var(--mk-color-base-30)"],["Base 40","var(--mk-color-base-40)"],["Base 50","var(--mk-color-base-50)"],["Base 60","var(--mk-color-base-60)"],["Base 70","var(--mk-color-base-70)"],["Base 100","var(--mk-color-base-100)"]],tbe=[["Background","var(--mk-ui-background)"],["Background Variant","var(--mk-ui-background-variant)"],["Background Contrast","var(--mk-ui-background-contrast)"],["Background Active","var(--mk-ui-background-active)"],["Background Selected","var(--mk-ui-background-selected)"]],rbe=[["Text Primary","var(--mk-ui-text-primary)"],["Text Secondary","var(--mk-ui-text-secondary)"],["Text Tertiary","var(--mk-ui-text-tertiary)"]];var $Ve=e=>{let[t,r]=(0,ia.useState)(null),[n,i]=(0,ia.useState)(null),[a,o]=(0,ia.useState)(e.color??"#eb3b5a"),[s,l]=(0,ia.useState)(a),u=(0,ia.useRef)(null),c=p=>{if(l(p),t){let h={...t};h.values.find(g=>g.id==n).color=p,r(h);let m=yG(h);o(m),e.saveValue(m);return}o(p),e.saveValue(p),e.stayOpen||e.hide()},f=p=>{let h=yG(p);o(h),e.saveValue(h)},d=p=>{p&&(o(p),l(p));let h;try{h=ebe(p);let m=h.values.map(g=>{let A=t?.values.find(b=>b.position==g.position&&b.color==g.color);return A?{...g,id:A.id??(0,bG.uniqueId)()}:{...g,id:(0,bG.uniqueId)()}});h.values=m}catch(m){console.log(m)}h?(r(h),l(h.values[0].color)):l(p)};return(0,ia.useEffect)(()=>{l(t?.values.find(p=>p.id==n)?.color)},[n,t]),ia.default.createElement("div",{className:"mk-ui-color-picker"},ia.default.createElement("div",{className:"mk-ui-color-picker-palette"},ia.default.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",marginBottom:"12px"}},ia.default.createElement("div",{onMouseDown:()=>{e.saveValue("")},className:"mk-color",style:{background:`linear-gradient(to top left, rgba(0,0,0,0) 0%, +In case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated.`,examples:["quantileSeq([3, -1, 5, 7], 0.5)","quantileSeq([3, -1, 5, 7], [1/3, 2/3])","quantileSeq([3, -1, 5, 7], 2)","quantileSeq([-1, 3, 5, 7], 0.5, true)"],seealso:["mean","median","min","max","prod","std","sum","variance"]};var hhe={name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, dimension)","std(A, normalization)","std(A, dimension, normalization)"],description:'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["std(2, 4, 6)","std([2, 4, 6, 8])",'std([2, 4, 6, 8], "uncorrected")','std([2, 4, 6, 8], "biased")',"std([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","prod","sum","variance"]};var Ahe={name:"cumsum",category:"Statistics",syntax:["cumsum(a, b, c, ...)","cumsum(A)"],description:"Compute the cumulative sum of all values.",examples:["cumsum(2, 3, 4, 1)","cumsum([2, 3, 4, 1])","cumsum([1, 2; 3, 4])","cumsum([1, 2; 3, 4], 1)","cumsum([1, 2; 3, 4], 2)"],seealso:["max","mean","median","min","prod","std","sum","variance"]};var ghe={name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)","sum(A, dimension)"],description:"Compute the sum of all values.",examples:["sum(2, 3, 4, 1)","sum([2, 3, 4, 1])","sum([2, 5; 4, 3])"],seealso:["max","mean","median","min","prod","std","sum","variance"]};var vhe={name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, dimension)","variance(A, normalization)","variance(A, dimension, normalization)"],description:'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["variance(2, 4, 6)","variance([2, 4, 6, 8])",'variance([2, 4, 6, 8], "uncorrected")','variance([2, 4, 6, 8], "biased")',"variance([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","std","sum"]};var yhe={name:"corr",category:"Statistics",syntax:["corr(A,B)"],description:"Compute the correlation coefficient of a two list with values, For matrices, the matrix correlation coefficient is calculated.",examples:["corr([2, 4, 6, 8],[1, 2, 3, 6])","corr(matrix([[1, 2.2, 3, 4.8, 5], [1, 2, 3, 4, 5]]), matrix([[4, 5.3, 6.6, 7, 8], [1, 2, 3, 4, 5]]))"],seealso:["max","mean","min","median","min","prod","std","sum"]};var bhe={name:"acos",category:"Trigonometry",syntax:["acos(x)"],description:"Compute the inverse cosine of a value in radians.",examples:["acos(0.5)","acos(cos(2.3))"],seealso:["cos","atan","asin"]};var xhe={name:"acosh",category:"Trigonometry",syntax:["acosh(x)"],description:"Calculate the hyperbolic arccos of a value, defined as `acosh(x) = ln(sqrt(x^2 - 1) + x)`.",examples:["acosh(1.5)"],seealso:["cosh","asinh","atanh"]};var whe={name:"acot",category:"Trigonometry",syntax:["acot(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acot(0.5)","acot(cot(0.5))","acot(2)"],seealso:["cot","atan"]};var She={name:"acoth",category:"Trigonometry",syntax:["acoth(x)"],description:"Calculate the hyperbolic arccotangent of a value, defined as `acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2`.",examples:["acoth(2)","acoth(0.5)"],seealso:["acsch","asech"]};var Ehe={name:"acsc",category:"Trigonometry",syntax:["acsc(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acsc(2)","acsc(csc(0.5))","acsc(0.5)"],seealso:["csc","asin","asec"]};var khe={name:"acsch",category:"Trigonometry",syntax:["acsch(x)"],description:"Calculate the hyperbolic arccosecant of a value, defined as `acsch(x) = ln(1/x + sqrt(1/x^2 + 1))`.",examples:["acsch(0.5)"],seealso:["asech","acoth"]};var Che={name:"asec",category:"Trigonometry",syntax:["asec(x)"],description:"Calculate the inverse secant of a value.",examples:["asec(0.5)","asec(sec(0.5))","asec(2)"],seealso:["acos","acot","acsc"]};var Dhe={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]};var jhe={name:"asin",category:"Trigonometry",syntax:["asin(x)"],description:"Compute the inverse sine of a value in radians.",examples:["asin(0.5)","asin(sin(0.5))"],seealso:["sin","acos","atan"]};var Ohe={name:"asinh",category:"Trigonometry",syntax:["asinh(x)"],description:"Calculate the hyperbolic arcsine of a value, defined as `asinh(x) = ln(x + sqrt(x^2 + 1))`.",examples:["asinh(0.5)"],seealso:["acosh","atanh"]};var Mhe={name:"atan",category:"Trigonometry",syntax:["atan(x)"],description:"Compute the inverse tangent of a value in radians.",examples:["atan(0.5)","atan(tan(0.5))"],seealso:["tan","acos","asin"]};var Nhe={name:"atan2",category:"Trigonometry",syntax:["atan2(y, x)"],description:"Computes the principal value of the arc tangent of y/x in radians.",examples:["atan2(2, 2) / pi","angle = 60 deg in rad","x = cos(angle)","y = sin(angle)","atan2(y, x)"],seealso:["sin","cos","tan"]};var The={name:"atanh",category:"Trigonometry",syntax:["atanh(x)"],description:"Calculate the hyperbolic arctangent of a value, defined as `atanh(x) = ln((1 + x)/(1 - x)) / 2`.",examples:["atanh(0.5)"],seealso:["acosh","asinh"]};var Fhe={name:"cos",category:"Trigonometry",syntax:["cos(x)"],description:"Compute the cosine of x in radians.",examples:["cos(2)","cos(pi / 4) ^ 2","cos(180 deg)","cos(60 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["acos","sin","tan"]};var _he={name:"cosh",category:"Trigonometry",syntax:["cosh(x)"],description:"Compute the hyperbolic cosine of x in radians.",examples:["cosh(0.5)"],seealso:["sinh","tanh","coth"]};var Phe={name:"cot",category:"Trigonometry",syntax:["cot(x)"],description:"Compute the cotangent of x in radians. Defined as 1/tan(x)",examples:["cot(2)","1 / tan(2)"],seealso:["sec","csc","tan"]};var Ihe={name:"coth",category:"Trigonometry",syntax:["coth(x)"],description:"Compute the hyperbolic cotangent of x in radians.",examples:["coth(2)","1 / tanh(2)"],seealso:["sech","csch","tanh"]};var Bhe={name:"csc",category:"Trigonometry",syntax:["csc(x)"],description:"Compute the cosecant of x in radians. Defined as 1/sin(x)",examples:["csc(2)","1 / sin(2)"],seealso:["sec","cot","sin"]};var Rhe={name:"csch",category:"Trigonometry",syntax:["csch(x)"],description:"Compute the hyperbolic cosecant of x in radians. Defined as 1/sinh(x)",examples:["csch(2)","1 / sinh(2)"],seealso:["sech","coth","sinh"]};var $he={name:"sec",category:"Trigonometry",syntax:["sec(x)"],description:"Compute the secant of x in radians. Defined as 1/cos(x)",examples:["sec(2)","1 / cos(2)"],seealso:["cot","csc","cos"]};var qhe={name:"sech",category:"Trigonometry",syntax:["sech(x)"],description:"Compute the hyperbolic secant of x in radians. Defined as 1/cosh(x)",examples:["sech(2)","1 / cosh(2)"],seealso:["coth","csch","cosh"]};var Lhe={name:"sin",category:"Trigonometry",syntax:["sin(x)"],description:"Compute the sine of x in radians.",examples:["sin(2)","sin(pi / 4) ^ 2","sin(90 deg)","sin(30 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["asin","cos","tan"]};var zhe={name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]};var Uhe={name:"tan",category:"Trigonometry",syntax:["tan(x)"],description:"Compute the tangent of x in radians.",examples:["tan(0.5)","sin(0.5) / cos(0.5)","tan(pi / 4)","tan(45 deg)"],seealso:["atan","sin","cos"]};var Whe={name:"tanh",category:"Trigonometry",syntax:["tanh(x)"],description:"Compute the hyperbolic tangent of x in radians.",examples:["tanh(0.5)","sinh(0.5) / cosh(0.5)"],seealso:["sinh","cosh"]};var Vhe={name:"to",category:"Units",syntax:["x to unit","to(x, unit)"],description:"Change the unit of a value.",examples:["5 inch to cm","3.2kg to g","16 bytes in bits"],seealso:[]};var Ghe={name:"bin",category:"Utils",syntax:["bin(value)"],description:"Format a number as binary",examples:["bin(2)"],seealso:["oct","hex"]};var Hhe={name:"clone",category:"Utils",syntax:["clone(x)"],description:"Clone a variable. Creates a copy of primitive variables,and a deep copy of matrices",examples:["clone(3.5)","clone(2 - 4i)","clone(45 deg)","clone([1, 2; 3, 4])",'clone("hello world")'],seealso:[]};var Qhe={name:"format",category:"Utils",syntax:["format(value)","format(value, precision)"],description:"Format a value of any type as string.",examples:["format(2.3)","format(3 - 4i)","format([])","format(pi, 3)"],seealso:["print"]};var Yhe={name:"hasNumericValue",category:"Utils",syntax:["hasNumericValue(x)"],description:"Test whether a value is an numeric value. In case of a string, true is returned if the string contains a numeric value.",examples:["hasNumericValue(2)",'hasNumericValue("2")','isNumeric("2")',"hasNumericValue(0)","hasNumericValue(bignumber(500))","hasNumericValue(fraction(0.125))","hasNumericValue(2 + 3i)",'hasNumericValue([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","isNumeric"]};var Zhe={name:"hex",category:"Utils",syntax:["hex(value)"],description:"Format a number as hexadecimal",examples:["hex(240)"],seealso:["bin","oct"]};var Xhe={name:"isInteger",category:"Utils",syntax:["isInteger(x)"],description:"Test whether a value is an integer number.",examples:["isInteger(2)","isInteger(3.5)","isInteger([3, 0.5, -2])"],seealso:["isNegative","isNumeric","isPositive","isZero"]};var Khe={name:"isNaN",category:"Utils",syntax:["isNaN(x)"],description:"Test whether a value is NaN (not a number)",examples:["isNaN(2)","isNaN(0 / 0)","isNaN(NaN)","isNaN(Infinity)"],seealso:["isNegative","isNumeric","isPositive","isZero"]};var Jhe={name:"isNegative",category:"Utils",syntax:["isNegative(x)"],description:"Test whether a value is negative: smaller than zero.",examples:["isNegative(2)","isNegative(0)","isNegative(-4)","isNegative([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isPositive","isZero"]};var eAe={name:"isNumeric",category:"Utils",syntax:["isNumeric(x)"],description:"Test whether a value is a numeric value. Returns true when the input is a number, BigNumber, Fraction, or boolean.",examples:["isNumeric(2)",'isNumeric("2")','hasNumericValue("2")',"isNumeric(0)","isNumeric(bignumber(500))","isNumeric(fraction(0.125))","isNumeric(2 + 3i)",'isNumeric([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","hasNumericValue"]};var tAe={name:"isPositive",category:"Utils",syntax:["isPositive(x)"],description:"Test whether a value is positive: larger than zero.",examples:["isPositive(2)","isPositive(0)","isPositive(-4)","isPositive([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isNegative","isZero"]};var rAe={name:"isPrime",category:"Utils",syntax:["isPrime(x)"],description:"Test whether a value is prime: has no divisors other than itself and one.",examples:["isPrime(3)","isPrime(-2)","isPrime([2, 17, 100])"],seealso:["isInteger","isNumeric","isNegative","isZero"]};var nAe={name:"isZero",category:"Utils",syntax:["isZero(x)"],description:"Test whether a value is zero.",examples:["isZero(2)","isZero(0)","isZero(-4)","isZero([3, 0, -2, 0])"],seealso:["isInteger","isNumeric","isNegative","isPositive"]};var iAe={name:"numeric",category:"Utils",syntax:["numeric(x)"],description:"Convert a numeric input to a specific numeric type: number, BigNumber, or Fraction.",examples:['numeric("4")','numeric("4", "number")','numeric("4", "BigNumber")','numeric("4", "Fraction")','numeric(4, "Fraction")','numeric(fraction(2, 5), "number")'],seealso:["number","fraction","bignumber","string","format"]};var aAe={name:"oct",category:"Utils",syntax:["oct(value)"],description:"Format a number as octal",examples:["oct(56)"],seealso:["bin","hex"]};var oAe={name:"print",category:"Utils",syntax:["print(template, values)","print(template, values, precision)"],description:"Interpolate values into a string template.",examples:['print("Lucy is $age years old", {age: 5})','print("The value of pi is $pi", {pi: pi}, 3)','print("Hello, $user.name!", {user: {name: "John"}})','print("Values: $1, $2, $3", [6, 9, 4])'],seealso:["format"]};var sAe={name:"typeOf",category:"Utils",syntax:["typeOf(x)"],description:"Get the type of a variable.",examples:["typeOf(3.5)","typeOf(2 - 4i)","typeOf(45 deg)",'typeOf("hello world")'],seealso:["getMatrixDataType"]};var lAe={name:"solveODE",category:"Numeric",syntax:["solveODE(func, tspan, y0)","solveODE(func, tspan, y0, options)"],description:"Numerical Integration of Ordinary Differential Equations.",examples:["f(t,y) = y","tspan = [0, 4]","solveODE(f, tspan, 1)","solveODE(f, tspan, [1, 2])",'solveODE(f, tspan, 1, { method:"RK23", maxStep:0.1 })'],seealso:["derivative","simplifyCore"]};var uAe={bignumber:Jfe,boolean:ede,complex:tde,createUnit:rde,fraction:nde,index:ide,matrix:ade,number:ode,sparse:sde,splitUnit:lde,string:ude,unit:cde,e:oV,E:oV,false:Rfe,i:$fe,Infinity:qfe,LN2:zfe,LN10:Lfe,LOG2E:Wfe,LOG10E:Ufe,NaN:Vfe,null:Gfe,pi:sV,PI:sV,phi:Hfe,SQRT1_2:Qfe,SQRT2:Yfe,tau:Zfe,true:Xfe,version:Kfe,speedOfLight:{description:"Speed of light in vacuum",examples:["speedOfLight"]},gravitationConstant:{description:"Newtonian constant of gravitation",examples:["gravitationConstant"]},planckConstant:{description:"Planck constant",examples:["planckConstant"]},reducedPlanckConstant:{description:"Reduced Planck constant",examples:["reducedPlanckConstant"]},magneticConstant:{description:"Magnetic constant (vacuum permeability)",examples:["magneticConstant"]},electricConstant:{description:"Electric constant (vacuum permeability)",examples:["electricConstant"]},vacuumImpedance:{description:"Characteristic impedance of vacuum",examples:["vacuumImpedance"]},coulomb:{description:"Coulomb's constant",examples:["coulomb"]},elementaryCharge:{description:"Elementary charge",examples:["elementaryCharge"]},bohrMagneton:{description:"Borh magneton",examples:["bohrMagneton"]},conductanceQuantum:{description:"Conductance quantum",examples:["conductanceQuantum"]},inverseConductanceQuantum:{description:"Inverse conductance quantum",examples:["inverseConductanceQuantum"]},magneticFluxQuantum:{description:"Magnetic flux quantum",examples:["magneticFluxQuantum"]},nuclearMagneton:{description:"Nuclear magneton",examples:["nuclearMagneton"]},klitzing:{description:"Von Klitzing constant",examples:["klitzing"]},bohrRadius:{description:"Borh radius",examples:["bohrRadius"]},classicalElectronRadius:{description:"Classical electron radius",examples:["classicalElectronRadius"]},electronMass:{description:"Electron mass",examples:["electronMass"]},fermiCoupling:{description:"Fermi coupling constant",examples:["fermiCoupling"]},fineStructure:{description:"Fine-structure constant",examples:["fineStructure"]},hartreeEnergy:{description:"Hartree energy",examples:["hartreeEnergy"]},protonMass:{description:"Proton mass",examples:["protonMass"]},deuteronMass:{description:"Deuteron Mass",examples:["deuteronMass"]},neutronMass:{description:"Neutron mass",examples:["neutronMass"]},quantumOfCirculation:{description:"Quantum of circulation",examples:["quantumOfCirculation"]},rydberg:{description:"Rydberg constant",examples:["rydberg"]},thomsonCrossSection:{description:"Thomson cross section",examples:["thomsonCrossSection"]},weakMixingAngle:{description:"Weak mixing angle",examples:["weakMixingAngle"]},efimovFactor:{description:"Efimov factor",examples:["efimovFactor"]},atomicMass:{description:"Atomic mass constant",examples:["atomicMass"]},avogadro:{description:"Avogadro's number",examples:["avogadro"]},boltzmann:{description:"Boltzmann constant",examples:["boltzmann"]},faraday:{description:"Faraday constant",examples:["faraday"]},firstRadiation:{description:"First radiation constant",examples:["firstRadiation"]},loschmidt:{description:"Loschmidt constant at T=273.15 K and p=101.325 kPa",examples:["loschmidt"]},gasConstant:{description:"Gas constant",examples:["gasConstant"]},molarPlanckConstant:{description:"Molar Planck constant",examples:["molarPlanckConstant"]},molarVolume:{description:"Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa",examples:["molarVolume"]},sackurTetrode:{description:"Sackur-Tetrode constant at T=1 K and p=101.325 kPa",examples:["sackurTetrode"]},secondRadiation:{description:"Second radiation constant",examples:["secondRadiation"]},stefanBoltzmann:{description:"Stefan-Boltzmann constant",examples:["stefanBoltzmann"]},wienDisplacement:{description:"Wien displacement law constant",examples:["wienDisplacement"]},molarMass:{description:"Molar mass constant",examples:["molarMass"]},molarMassC12:{description:"Molar mass constant of carbon-12",examples:["molarMassC12"]},gravity:{description:"Standard acceleration of gravity (standard acceleration of free-fall on Earth)",examples:["gravity"]},planckLength:{description:"Planck length",examples:["planckLength"]},planckMass:{description:"Planck mass",examples:["planckMass"]},planckTime:{description:"Planck time",examples:["planckTime"]},planckCharge:{description:"Planck charge",examples:["planckCharge"]},planckTemperature:{description:"Planck temperature",examples:["planckTemperature"]},derivative:mde,lsolve:Ade,lsolveAll:gde,lup:vde,lusolve:yde,leafCount:hde,polynomialRoot:bde,resolve:Sde,simplify:Ede,simplifyConstant:kde,simplifyCore:Cde,symbolicEqual:jde,rationalize:wde,slu:Dde,usolve:Ode,usolveAll:Mde,qr:xde,abs:Nde,add:Tde,cbrt:Fde,ceil:_de,cube:Pde,divide:Ide,dotDivide:Bde,dotMultiply:Rde,dotPow:$de,exp:qde,expm:Lde,expm1:zde,fix:Ude,floor:Wde,gcd:Vde,hypot:Gde,lcm:Qde,log:Yde,log2:Kde,log1p:Xde,log10:Zde,mod:Jde,multiply:epe,norm:tpe,nthRoot:rpe,nthRoots:npe,pow:ipe,round:ape,sign:ope,sqrt:spe,sqrtm:lpe,square:dpe,subtract:ppe,unaryMinus:mpe,unaryPlus:hpe,xgcd:Ape,invmod:Hde,bitAnd:gpe,bitNot:vpe,bitOr:ype,bitXor:bpe,leftShift:xpe,rightArithShift:wpe,rightLogShift:Spe,bellNumbers:Epe,catalan:kpe,composition:Cpe,stirlingS2:Dpe,config:fde,import:dde,typed:pde,arg:jpe,conj:Ope,re:Npe,im:Mpe,evaluate:Tpe,help:Fpe,distance:_pe,intersect:Ppe,and:Ipe,not:Bpe,or:Rpe,xor:$pe,concat:Lpe,count:zpe,cross:Upe,column:qpe,ctranspose:Wpe,det:Vpe,diag:Gpe,diff:Hpe,dot:Qpe,getMatrixDataType:Jpe,identity:eme,filter:Zpe,flatten:Xpe,forEach:Kpe,inv:tme,pinv:rme,eigs:Ype,kron:nme,matrixFromFunction:ome,matrixFromRows:sme,matrixFromColumns:ame,map:ime,ones:lme,partitionSelect:ume,range:cme,resize:dme,reshape:fme,rotate:pme,rotationMatrix:mme,row:hme,size:Ame,sort:gme,squeeze:vme,subset:yme,trace:bme,transpose:xme,zeros:wme,fft:Sme,ifft:Eme,sylvester:upe,schur:cpe,lyap:fpe,solveODE:lAe,combinations:kme,combinationsWithRep:Cme,factorial:Dme,gamma:jme,kldivergence:Mme,lgamma:Ome,multinomial:Nme,permutations:Tme,pickRandom:Fme,random:_me,randomInt:Pme,compare:Ime,compareNatural:Bme,compareText:Rme,deepEqual:$me,equal:qme,equalText:Lme,larger:zme,largerEq:Ume,smaller:Wme,smallerEq:Vme,unequal:Gme,setCartesian:Hme,setDifference:Qme,setDistinct:Yme,setIntersect:Zme,setIsSubset:Xme,setMultiplicity:Kme,setPowerset:Jme,setSize:ehe,setSymDifference:the,setUnion:rhe,zpk2tf:nhe,freqz:ihe,erf:ahe,zeta:ohe,cumsum:Ahe,mad:she,max:lhe,mean:uhe,median:che,min:fhe,mode:dhe,prod:phe,quantileSeq:mhe,std:hhe,sum:ghe,variance:vhe,corr:yhe,acos:bhe,acosh:xhe,acot:whe,acoth:She,acsc:Ehe,acsch:khe,asec:Che,asech:Dhe,asin:jhe,asinh:Ohe,atan:Mhe,atanh:The,atan2:Nhe,cos:Fhe,cosh:_he,cot:Phe,coth:Ihe,csc:Bhe,csch:Rhe,sec:$he,sech:qhe,sin:Lhe,sinh:zhe,tan:Uhe,tanh:Whe,to:Vhe,clone:Hhe,format:Qhe,bin:Ghe,oct:aAe,hex:Zhe,isNaN:Khe,isInteger:Xhe,isNegative:Jhe,isNumeric:eAe,hasNumericValue:Yhe,isPositive:tAe,isPrime:rAe,isZero:nAe,print:oAe,typeOf:sAe,numeric:iAe};var cAe="help",dUe=["typed","mathWithTransform","Help"],S_=G(cAe,dUe,e=>{var{typed:t,mathWithTransform:r,Help:n}=e;return t(cAe,{any:function(a){var o,s=a;if(typeof a!="string"){for(o in r)if(St(r,o)&&a===r[o]){s=o;break}}var l=zi(uAe,s);if(!l){var u=typeof s=="function"?s.name:s;throw new Error('No documentation found on "'+u+'"')}return new n(l)}})});var fAe="chain",pUe=["typed","Chain"],E_=G(fAe,pUe,e=>{var{typed:t,Chain:r}=e;return t(fAe,{"":function(){return new r},any:function(i){return new r(i)}})});var dAe="det",mUe=["typed","matrix","subtractScalar","multiply","divideScalar","isZero","unaryMinus"],k_=G(dAe,mUe,e=>{var{typed:t,matrix:r,subtractScalar:n,multiply:i,divideScalar:a,isZero:o,unaryMinus:s}=e;return t(dAe,{any:function(c){return Bt(c)},"Array | Matrix":function(c){var f;switch(wt(c)?f=c.size():Array.isArray(c)?(c=r(c),f=c.size()):f=[],f.length){case 0:return Bt(c);case 1:if(f[0]===1)return Bt(c.valueOf()[0]);if(f[0]===0)return 1;throw new RangeError("Matrix must be square (size: "+er(f)+")");case 2:{var d=f[0],p=f[1];if(d===p)return l(c.clone().valueOf(),d,p);if(p===0)return 1;throw new RangeError("Matrix must be square (size: "+er(f)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+er(f)+")")}}});function l(u,c,f){if(c===1)return Bt(u[0][0]);if(c===2)return n(i(u[0][0],u[1][1]),i(u[1][0],u[0][1]));for(var d=!1,p=new Array(c).fill(0).map((k,M)=>M),h=0;h{var{typed:t,matrix:r,divideScalar:n,addScalar:i,multiply:a,unaryMinus:o,det:s,identity:l,abs:u}=e;return t(pAe,{"Array | Matrix":function(d){var p=wt(d)?d.size():Ht(d);switch(p.length){case 1:if(p[0]===1)return wt(d)?r([n(1,d.valueOf()[0])]):[n(1,d[0])];throw new RangeError("Matrix must be square (size: "+er(p)+")");case 2:{var h=p[0],m=p[1];if(h===m)return wt(d)?r(c(d.valueOf(),h,m),d.storage()):c(d,h,m);throw new RangeError("Matrix must be square (size: "+er(p)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+er(p)+")")}},any:function(d){return n(1,d)}});function c(f,d,p){var h,m,g,A,b;if(d===1){if(A=f[0][0],A===0)throw Error("Cannot calculate inverse, determinant is zero");return[[n(1,A)]]}else if(d===2){var v=s(f);if(v===0)throw Error("Cannot calculate inverse, determinant is zero");return[[n(f[1][1],v),n(o(f[0][1]),v)],[n(o(f[1][0]),v),n(f[0][0],v)]]}else{var x=f.concat();for(h=0;hk&&(k=u(x[h][S]),M=h),h++;if(k===0)throw Error("Cannot calculate inverse, determinant is zero");h=M,h!==S&&(b=x[S],x[S]=x[h],x[h]=b,b=w[S],w[S]=w[h],w[h]=b);var O=x[S],C=w[S];for(h=0;h{var{typed:t,matrix:r,inv:n,deepEqual:i,equal:a,dotDivide:o,dot:s,ctranspose:l,divideScalar:u,multiply:c,add:f,Complex:d}=e;return t(mAe,{"Array | Matrix":function(v){var x=wt(v)?v.size():Ht(v);switch(x.length){case 1:return A(v)?l(v):x[0]===1?n(v):o(l(v),s(v,v));case 2:{if(A(v))return l(v);var w=x[0],S=x[1];if(w===S)try{return n(v)}catch(k){if(!(k instanceof Error&&k.message.match(/Cannot calculate inverse, determinant is zero/)))throw k}return wt(v)?r(p(v.valueOf(),w,S),v.storage()):p(v,w,S)}default:throw new RangeError("Matrix must be two dimensional (size: "+er(x)+")")}},any:function(v){return a(v,0)?Bt(v):u(1,v)}});function p(b,v,x){var{C:w,F:S}=m(b,v,x),k=c(n(c(l(w),w)),l(w)),M=c(l(S),n(c(S,l(S))));return c(M,k)}function h(b,v,x){for(var w=Bt(b),S=0,k=0;kM.filter((C,T)=>T!g(s(w[O],w[O])));return{C:S,F:k}}function g(b){return a(f(b,d(1,1)),f(0,d(1,1)))}function A(b){return i(f(b,d(1,1)),f(c(b,0),d(1,1)))}});function hAe(e){var{addScalar:t,subtract:r,flatten:n,multiply:i,multiplyScalar:a,divideScalar:o,sqrt:s,abs:l,bignumber:u,diag:c,size:f,reshape:d,inv:p,qr:h,usolve:m,usolveAll:g,equal:A,complex:b,larger:v,smaller:x,matrixFromColumns:w,dot:S}=e;function k(re,Q,he,Ie){var xe=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,Oe=M(re,Q,he,Ie,xe);O(re,Q,he,Ie,xe,Oe);var{values:Re,C:_e}=C(re,Q,he,Ie,xe);if(xe){var we=T(re,Q,_e,Oe,Re,he,Ie);return{values:Re,eigenvectors:we}}return{values:Re}}function M(re,Q,he,Ie,xe){var Oe=Ie==="BigNumber",Re=Ie==="Complex",_e=Oe?u(0):0,we=Oe?u(1):Re?b(1):1,se=Oe?u(1):1,L=Oe?u(10):2,ue=a(L,L),ce;xe&&(ce=Array(Q).fill(we));for(var U=!1;!U;){U=!0;for(var $=0;$1&&(U=c(Array(L-1).fill(_e)))),L-=1,we.pop();for(var ke=0;ke2&&(U=c(Array(L-2).fill(_e)))),L-=2,we.pop(),we.pop();for(var me=0;me+r(l(tt),l(Et))),$>100){var ze=Error("The eigenvalues failed to converge. Only found these eigenvalues: "+se.join(", "));throw ze.values=se,ze.vectors=[],ze}var Ye=xe?i(ce,q(ue,Q)):void 0;return{values:se,C:Ye}}function T(re,Q,he,Ie,xe,Oe,Re){var _e=p(he),we=i(_e,re,he),se=Re==="BigNumber",L=Re==="Complex",ue=se?u(0):L?b(0):0,ce=se?u(1):L?b(1):1,U=[],$=[];for(var ee of xe){var Y=B(U,ee,A);Y===-1?(U.push(ee),$.push(1)):$[Y]+=1}for(var te=[],ie=U.length,Se=Array(Q).fill(ue),ke=c(Array(Q).fill(ce)),Me=function(){var Ye=U[me],tt=r(we,i(Ye,ke)),Et=g(tt,Se);for(Et.shift();Et.length<$[me];){var be=N(tt,Q,Et,Oe,Re);if(be===null)break;Et.push(be)}var Pe=i(p(Ie),he);Et=Et.map(Le=>i(Pe,Le)),te.push(...Et.map(Le=>({value:Ye,vector:n(Le)})))},me=0;me=5)return null;for(_e=0;;){var we=m(re,Re);if(x(X(_(Re,[we])),Ie))break;if(++_e>=10)return null;Re=oe(we)}return Re}function W(re,Q,he){var Ie=he==="BigNumber",xe=he==="Complex",Oe=Array(re).fill(0).map(Re=>2*Math.random()-1);return Ie&&(Oe=Oe.map(Re=>u(Re))),xe&&(Oe=Oe.map(Re=>b(Re))),Oe=_(Oe,Q),oe(Oe,he)}function _(re,Q){var he=f(re);for(var Ie of Q)Ie=d(Ie,he),re=r(re,i(o(S(Ie,re),S(Ie,Ie)),Ie));return re}function X(re){return l(s(S(re,re)))}function oe(re,Q){var he=Q==="BigNumber",Ie=Q==="Complex",xe=he?u(1):Ie?b(1):1;return i(o(xe,X(re)),re)}return k}function AAe(e){var{config:t,addScalar:r,subtract:n,abs:i,atan:a,cos:o,sin:s,multiplyScalar:l,inv:u,bignumber:c,multiply:f,add:d}=e;function p(O,C){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.epsilon,D=arguments.length>3?arguments[3]:void 0,P=arguments.length>4?arguments[4]:void 0;if(D==="number")return h(O,T,P);if(D==="BigNumber")return m(O,T,P);throw TypeError("Unsupported data type: "+D)}function h(O,C,T){var D=O.length,P=Math.abs(C/D),R,q;if(T){q=new Array(D);for(var B=0;B=Math.abs(P);){var W=N[0][0],_=N[0][1];R=g(O[W][W],O[_][_],O[W][_]),O=w(O,R,W,_),T&&(q=b(q,R,W,_)),N=S(O)}for(var X=Array(D).fill(0),oe=0;oe=i(P);){var W=N[0][0],_=N[0][1];R=A(O[W][W],O[_][_],O[W][_]),O=x(O,R,W,_),T&&(q=v(q,R,W,_)),N=k(O)}for(var X=Array(D).fill(0),oe=0;oe({value:P[Q],vector:re}));return{values:P,eigenvectors:oe}}return p}var gUe="eigs",vUe=["config","typed","matrix","addScalar","equal","subtract","abs","atan","cos","sin","multiplyScalar","divideScalar","inv","bignumber","multiply","add","larger","column","flatten","number","complex","sqrt","diag","size","reshape","qr","usolve","usolveAll","im","re","smaller","matrixFromColumns","dot"],j_=G(gUe,vUe,e=>{var{config:t,typed:r,matrix:n,addScalar:i,subtract:a,equal:o,abs:s,atan:l,cos:u,sin:c,multiplyScalar:f,divideScalar:d,inv:p,bignumber:h,multiply:m,add:g,larger:A,column:b,flatten:v,number:x,complex:w,sqrt:S,diag:k,size:M,reshape:O,qr:C,usolve:T,usolveAll:D,im:P,re:R,smaller:q,matrixFromColumns:B,dot:N}=e,W=AAe({config:t,addScalar:i,subtract:a,column:b,flatten:v,equal:o,abs:s,atan:l,cos:u,sin:c,multiplyScalar:f,inv:p,bignumber:h,complex:w,multiply:m,add:g}),_=hAe({config:t,addScalar:i,subtract:a,multiply:m,multiplyScalar:f,flatten:v,divideScalar:d,sqrt:S,abs:s,bignumber:h,diag:k,size:M,reshape:O,qr:C,inv:p,usolve:T,usolveAll:D,equal:o,complex:w,larger:A,smaller:q,matrixFromColumns:B,dot:N});return r("eigs",{Array:function(Oe){return X(n(Oe))},"Array, number|BigNumber":function(Oe,Re){return X(n(Oe),{precision:Re})},"Array, Object"(xe,Oe){return X(n(xe),Oe)},Matrix:function(Oe){return X(Oe,{matricize:!0})},"Matrix, number|BigNumber":function(Oe,Re){return X(Oe,{precision:Re,matricize:!0})},"Matrix, Object":function(Oe,Re){var _e={matricize:!0};return Mn(_e,Re),X(Oe,_e)}});function X(xe){var Oe,Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_e="eigenvectors"in Re?Re.eigenvectors:!0,we=(Oe=Re.precision)!==null&&Oe!==void 0?Oe:t.epsilon,se=oe(xe,we,_e);return Re.matricize&&(se.values=n(se.values),_e&&(se.eigenvectors=se.eigenvectors.map(L=>{var{value:ue,vector:ce}=L;return{value:ue,vector:n(ce)}}))),_e&&Object.defineProperty(se,"vectors",{enumerable:!1,get:()=>{throw new Error("eigs(M).vectors replaced with eigs(M).eigenvectors")}}),se}function oe(xe,Oe,Re){var _e=xe.toArray(),we=xe.size();if(we.length!==2||we[0]!==we[1])throw new RangeError("Matrix must be square (size: ".concat(er(we),")"));var se=we[0];if(Q(_e,se,Oe)&&(he(_e,se),re(_e,se,Oe))){var L=Ie(xe,_e,se);return W(_e,se,Oe,L,Re)}var ue=Ie(xe,_e,se);return _(_e,se,Oe,ue,Re)}function re(xe,Oe,Re){for(var _e=0;_e{var{typed:t,abs:r,add:n,identity:i,inv:a,multiply:o}=e;return t(gAe,{Matrix:function(f){var d=f.size();if(d.length!==2||d[0]!==d[1])throw new RangeError("Matrix must be square (size: "+er(d)+")");for(var p=d[0],h=1e-15,m=s(f),g=l(m,h),A=g.q,b=g.j,v=o(f,Math.pow(2,-b)),x=i(p),w=i(p),S=1,k=v,M=-1,O=1;O<=A;O++)O>1&&(k=o(k,v),M=-M),S=S*(A-O+1)/((2*A-O+1)*O),x=n(x,o(S,k)),w=n(w,o(S*M,k));for(var C=o(a(w),x),T=0;T{var{typed:t,abs:r,add:n,multiply:i,map:a,sqrt:o,subtract:s,inv:l,size:u,max:c,identity:f}=e,d=1e3,p=1e-6;function h(m){var g,A=0,b=m,v=f(u(m));do{var x=b;if(b=i(.5,n(x,l(v))),v=i(.5,n(v,l(x))),g=c(r(s(b,x))),g>p&&++A>d)throw new Error("computing square root of matrix: iterative method could not converge")}while(g>p);return b}return t(vAe,{"Array | Matrix":function(g){var A=wt(g)?g.size():Ht(g);switch(A.length){case 1:if(A[0]===1)return a(g,o);throw new RangeError("Matrix must be square (size: "+er(A)+")");case 2:{var b=A[0],v=A[1];if(b===v)return h(g);throw new RangeError("Matrix must be square (size: "+er(A)+")")}default:throw new RangeError("Matrix must be at most two dimensional (size: "+er(A)+")")}}})});var yAe="sylvester",xUe=["typed","schur","matrixFromColumns","matrix","multiply","range","concat","transpose","index","subset","add","subtract","identity","lusolve","abs"],N_=G(yAe,xUe,e=>{var{typed:t,schur:r,matrixFromColumns:n,matrix:i,multiply:a,range:o,concat:s,transpose:l,index:u,subset:c,add:f,subtract:d,identity:p,lusolve:h,abs:m}=e;return t(yAe,{"Matrix, Matrix, Matrix":g,"Array, Matrix, Matrix":function(b,v,x){return g(i(b),v,x)},"Array, Array, Matrix":function(b,v,x){return g(i(b),i(v),x)},"Array, Matrix, Array":function(b,v,x){return g(i(b),v,i(x))},"Matrix, Array, Matrix":function(b,v,x){return g(b,i(v),x)},"Matrix, Array, Array":function(b,v,x){return g(b,i(v),i(x))},"Matrix, Matrix, Array":function(b,v,x){return g(b,v,i(x))},"Array, Array, Array":function(b,v,x){return g(i(b),i(v),i(x)).toArray()}});function g(A,b,v){for(var x=b.size()[0],w=A.size()[0],S=r(A),k=S.T,M=S.U,O=r(a(-1,b)),C=O.T,T=O.U,D=a(a(l(M),v),T),P=o(0,w),R=[],q=(L,ue)=>s(L,ue,1),B=(L,ue)=>s(L,ue,0),N=0;N1e-5){for(var W=B(c(D,u(P,N)),c(D,u(P,N+1))),_=0;_{var{typed:t,matrix:r,identity:n,multiply:i,qr:a,norm:o,subtract:s}=e;return t(bAe,{Array:function(c){var f=l(r(c));return{U:f.U.valueOf(),T:f.T.valueOf()}},Matrix:function(c){return l(c)}});function l(u){var c=u.size()[0],f=u,d=n(c),p=0,h;do{h=f;var m=a(f),g=m.Q,A=m.R;if(f=i(A,g),d=i(d,g),p++>100)break}while(o(s(f,h))>1e-4);return{U:d,T:f}}});var xAe="lyap",SUe=["typed","matrix","sylvester","multiply","transpose"],F_=G(xAe,SUe,e=>{var{typed:t,matrix:r,sylvester:n,multiply:i,transpose:a}=e;return t(xAe,{"Matrix, Matrix":function(s,l){return n(s,a(s),i(-1,l))},"Array, Matrix":function(s,l){return n(r(s),a(r(s)),i(-1,l))},"Matrix, Array":function(s,l){return n(s,a(r(s)),r(i(-1,l)))},"Array, Array":function(s,l){return n(r(s),a(r(s)),r(i(-1,l))).toArray()}})});var EUe="divide",kUe=["typed","matrix","multiply","equalScalar","divideScalar","inv"],__=G(EUe,kUe,e=>{var{typed:t,matrix:r,multiply:n,equalScalar:i,divideScalar:a,inv:o}=e,s=Ln({typed:t,equalScalar:i}),l=ro({typed:t});return t("divide",MN({"Array | Matrix, Array | Matrix":function(c,f){return n(c,o(f))},"DenseMatrix, any":function(c,f){return l(c,f,a,!1)},"SparseMatrix, any":function(c,f){return s(c,f,a,!1)},"Array, any":function(c,f){return l(r(c),f,a,!1).valueOf()},"any, Array | Matrix":function(c,f){return n(c,o(f))}},a.signatures))});var wAe="distance",CUe=["typed","addScalar","subtractScalar","divideScalar","multiplyScalar","deepEqual","sqrt","abs"],P_=G(wAe,CUe,e=>{var{typed:t,addScalar:r,subtractScalar:n,multiplyScalar:i,divideScalar:a,deepEqual:o,sqrt:s,abs:l}=e;return t(wAe,{"Array, Array, Array":function(w,S,k){if(w.length===2&&S.length===2&&k.length===2){if(!c(w))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!c(S))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!c(k))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(o(S,k))throw new TypeError("LinePoint1 should not be same with LinePoint2");var M=n(k[1],S[1]),O=n(S[0],k[0]),C=n(i(k[0],S[1]),i(S[0],k[1]));return g(w[0],w[1],M,O,C)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object, Object":function(w,S,k){if(Object.keys(w).length===2&&Object.keys(S).length===2&&Object.keys(k).length===2){if(!c(w))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!c(S))throw new TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!c(k))throw new TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");if(o(h(S),h(k)))throw new TypeError("LinePoint1 should not be same with LinePoint2");if("pointX"in w&&"pointY"in w&&"lineOnePtX"in S&&"lineOnePtY"in S&&"lineTwoPtX"in k&&"lineTwoPtY"in k){var M=n(k.lineTwoPtY,S.lineOnePtY),O=n(S.lineOnePtX,k.lineTwoPtX),C=n(i(k.lineTwoPtX,S.lineOnePtY),i(S.lineOnePtX,k.lineTwoPtY));return g(w.pointX,w.pointY,M,O,C)}else throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},"Array, Array":function(w,S){if(w.length===2&&S.length===3){if(!c(w))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!f(S))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return g(w[0],w[1],S[0],S[1],S[2])}else if(w.length===3&&S.length===6){if(!f(w))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!p(S))throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument");return A(w[0],w[1],w[2],S[0],S[1],S[2],S[3],S[4],S[5])}else if(w.length===S.length&&w.length>0){if(!d(w))throw new TypeError("All values of an array should be numbers or BigNumbers");if(!d(S))throw new TypeError("All values of an array should be numbers or BigNumbers");return b(w,S)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object":function(w,S){if(Object.keys(w).length===2&&Object.keys(S).length===3){if(!c(w))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!f(S))throw new TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if("pointX"in w&&"pointY"in w&&"xCoeffLine"in S&&"yCoeffLine"in S&&"constant"in S)return g(w.pointX,w.pointY,S.xCoeffLine,S.yCoeffLine,S.constant);throw new TypeError("Key names do not match")}else if(Object.keys(w).length===3&&Object.keys(S).length===6){if(!f(w))throw new TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!p(S))throw new TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if("pointX"in w&&"pointY"in w&&"x0"in S&&"y0"in S&&"z0"in S&&"a"in S&&"b"in S&&"c"in S)return A(w.pointX,w.pointY,w.pointZ,S.x0,S.y0,S.z0,S.a,S.b,S.c);throw new TypeError("Key names do not match")}else if(Object.keys(w).length===2&&Object.keys(S).length===2){if(!c(w))throw new TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!c(S))throw new TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if("pointOneX"in w&&"pointOneY"in w&&"pointTwoX"in S&&"pointTwoY"in S)return b([w.pointOneX,w.pointOneY],[S.pointTwoX,S.pointTwoY]);throw new TypeError("Key names do not match")}else if(Object.keys(w).length===3&&Object.keys(S).length===3){if(!f(w))throw new TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!f(S))throw new TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if("pointOneX"in w&&"pointOneY"in w&&"pointOneZ"in w&&"pointTwoX"in S&&"pointTwoY"in S&&"pointTwoZ"in S)return b([w.pointOneX,w.pointOneY,w.pointOneZ],[S.pointTwoX,S.pointTwoY,S.pointTwoZ]);throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},Array:function(w){if(!m(w))throw new TypeError("Incorrect array format entered for pairwise distance calculation");return v(w)}});function u(x){return typeof x=="number"||Ft(x)}function c(x){return x.constructor!==Array&&(x=h(x)),u(x[0])&&u(x[1])}function f(x){return x.constructor!==Array&&(x=h(x)),u(x[0])&&u(x[1])&&u(x[2])}function d(x){return Array.isArray(x)||(x=h(x)),x.every(u)}function p(x){return x.constructor!==Array&&(x=h(x)),u(x[0])&&u(x[1])&&u(x[2])&&u(x[3])&&u(x[4])&&u(x[5])}function h(x){for(var w=Object.keys(x),S=[],k=0;kw.length!==2||!u(w[0])||!u(w[1])))return!1}else if(x[0].length===3&&u(x[0][0])&&u(x[0][1])&&u(x[0][2])){if(x.some(w=>w.length!==3||!u(w[0])||!u(w[1])||!u(w[2])))return!1}else return!1;return!0}function g(x,w,S,k,M){var O=l(r(r(i(S,x),i(k,w)),M)),C=s(r(i(S,S),i(k,k)));return a(O,C)}function A(x,w,S,k,M,O,C,T,D){var P=[n(i(n(M,w),D),i(n(O,S),T)),n(i(n(O,S),C),i(n(k,x),D)),n(i(n(k,x),T),i(n(M,w),C))];P=s(r(r(i(P[0],P[0]),i(P[1],P[1])),i(P[2],P[2])));var R=s(r(r(i(C,C),i(T,T)),i(D,D)));return a(P,R)}function b(x,w){for(var S=x.length,k=0,M=0,O=0;O{var{typed:t,config:r,abs:n,add:i,addScalar:a,matrix:o,multiply:s,multiplyScalar:l,divideScalar:u,subtract:c,smaller:f,equalScalar:d,flatten:p,isZero:h,isNumeric:m}=e;return t("intersect",{"Array, Array, Array":g,"Array, Array, Array, Array":A,"Matrix, Matrix, Matrix":function(T,D,P){var R=g(T.valueOf(),D.valueOf(),P.valueOf());return R===null?null:o(R)},"Matrix, Matrix, Matrix, Matrix":function(T,D,P,R){var q=A(T.valueOf(),D.valueOf(),P.valueOf(),R.valueOf());return q===null?null:o(q)}});function g(C,T,D){if(C=b(C),T=b(T),D=b(D),!x(C))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!x(T))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!w(D))throw new TypeError("Array with 4 numbers expected as third argument");return O(C[0],C[1],C[2],T[0],T[1],T[2],D[0],D[1],D[2],D[3])}function A(C,T,D,P){if(C=b(C),T=b(T),D=b(D),P=b(P),C.length===2){if(!v(C))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!v(T))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!v(D))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(!v(P))throw new TypeError("Array with 2 numbers or BigNumbers expected for fourth argument");return S(C,T,D,P)}else if(C.length===3){if(!x(C))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!x(T))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!x(D))throw new TypeError("Array with 3 numbers or BigNumbers expected for third argument");if(!x(P))throw new TypeError("Array with 3 numbers or BigNumbers expected for fourth argument");return M(C[0],C[1],C[2],T[0],T[1],T[2],D[0],D[1],D[2],P[0],P[1],P[2])}else throw new TypeError("Arrays with two or thee dimensional points expected")}function b(C){return C.length===1?C[0]:C.length>1&&Array.isArray(C[0])&&C.every(T=>Array.isArray(T)&&T.length===1)?p(C):C}function v(C){return C.length===2&&m(C[0])&&m(C[1])}function x(C){return C.length===3&&m(C[0])&&m(C[1])&&m(C[2])}function w(C){return C.length===4&&m(C[0])&&m(C[1])&&m(C[2])&&m(C[3])}function S(C,T,D,P){var R=C,q=D,B=c(R,T),N=c(q,P),W=c(l(B[0],N[1]),l(N[0],B[1]));if(h(W)||f(n(W),r.epsilon))return null;var _=l(N[0],R[1]),X=l(N[1],R[0]),oe=l(N[0],q[1]),re=l(N[1],q[0]),Q=u(a(c(c(_,X),oe),re),W);return i(s(B,Q),R)}function k(C,T,D,P,R,q,B,N,W,_,X,oe){var re=l(c(C,T),c(D,P)),Q=l(c(R,q),c(B,N)),he=l(c(W,_),c(X,oe));return a(a(re,Q),he)}function M(C,T,D,P,R,q,B,N,W,_,X,oe){var re=k(C,B,_,B,T,N,X,N,D,W,oe,W),Q=k(_,B,P,C,X,N,R,T,oe,W,q,D),he=k(C,B,P,C,T,N,R,T,D,W,q,D),Ie=k(_,B,_,B,X,N,X,N,oe,W,oe,W),xe=k(P,C,P,C,R,T,R,T,q,D,q,D),Oe=c(l(re,Q),l(he,Ie)),Re=c(l(xe,Ie),l(Q,Q));if(h(Re))return null;var _e=u(Oe,Re),we=u(a(re,l(_e,Q)),Ie),se=a(C,l(_e,c(P,C))),L=a(T,l(_e,c(R,T))),ue=a(D,l(_e,c(q,D))),ce=a(B,l(we,c(_,B))),U=a(N,l(we,c(X,N))),$=a(W,l(we,c(oe,W)));return d(se,ce)&&d(L,U)&&d(ue,$)?[se,L,ue]:null}function O(C,T,D,P,R,q,B,N,W,_){var X=l(C,B),oe=l(P,B),re=l(T,N),Q=l(R,N),he=l(D,W),Ie=l(q,W),xe=c(c(c(_,X),re),he),Oe=c(c(c(a(a(oe,Q),Ie),X),re),he),Re=u(xe,Oe),_e=a(C,l(Re,c(P,C))),we=a(T,l(Re,c(R,T))),se=a(D,l(Re,c(q,D)));return[_e,we,se]}});var SAe="sum",OUe=["typed","config","add","numeric"],Gw=G(SAe,OUe,e=>{var{typed:t,config:r,add:n,numeric:i}=e;return t(SAe,{"Array | Matrix":a,"Array | Matrix, number | BigNumber":o,"...":function(l){if(ad(l))throw new TypeError("Scalar values expected in function sum");return a(l)}});function a(s){var l;return Pl(s,function(u){try{l=l===void 0?u:n(l,u)}catch(c){throw Da(c,"sum",u)}}),l===void 0&&(l=i(0,r.number)),typeof l=="string"&&(l=i(l,r.number)),l}function o(s,l){try{var u=x0(s,l,n);return u}catch(c){throw Da(c,"sum")}}});var B_="cumsum",MUe=["typed","add","unaryPlus"],Hw=G(B_,MUe,e=>{var{typed:t,add:r,unaryPlus:n}=e;return t(B_,{Array:i,Matrix:function(u){return u.create(i(u.valueOf()))},"Array, number | BigNumber":o,"Matrix, number | BigNumber":function(u,c){return u.create(o(u.valueOf(),c))},"...":function(u){if(ad(u))throw new TypeError("All values expected to be scalar in function cumsum");return i(u)}});function i(l){try{return a(l)}catch(u){throw Da(u,B_)}}function a(l){if(l.length===0)return[];for(var u=[n(l[0])],c=1;c=c.length)throw new Ko(u,c.length);try{return s(l,u)}catch(f){throw Da(f,B_)}}function s(l,u){var c,f,d;if(u<=0){var p=l[0][0];if(Array.isArray(p)){for(d=oT(l),f=[],c=0;c{var{typed:t,add:r,divide:n}=e;return t(EAe,{"Array | Matrix":a,"Array | Matrix, number | BigNumber":i,"...":function(s){if(ad(s))throw new TypeError("Scalar values expected in function mean");return a(s)}});function i(o,s){try{var l=x0(o,s,r),u=Array.isArray(o)?Ht(o):o.size();return n(l,u[s])}catch(c){throw Da(c,"mean")}}function a(o){var s,l=0;if(Pl(o,function(u){try{s=s===void 0?u:r(s,u),l++}catch(c){throw Da(c,"mean",u)}}),l===0)throw new Error("Cannot calculate the mean of an empty array");return n(s,l)}});var kAe="median",TUe=["typed","add","divide","compare","partitionSelect"],R_=G(kAe,TUe,e=>{var{typed:t,add:r,divide:n,compare:i,partitionSelect:a}=e;function o(u){try{u=hr(u.valueOf());var c=u.length;if(c===0)throw new Error("Cannot calculate median of an empty array");if(c%2===0){for(var f=c/2-1,d=a(u,f+1),p=u[f],h=0;h0&&(p=u[h]);return l(p,d)}else{var m=a(u,(c-1)/2);return s(m)}}catch(g){throw Da(g,"median")}}var s=t({"number | BigNumber | Complex | Unit":function(c){return c}}),l=t({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(c,f){return n(r(c,f),2)}});return t(kAe,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(c,f){throw new Error("median(A, dim) is not yet supported")},"...":function(c){if(ad(c))throw new TypeError("Scalar values expected in function median");return o(c)}})});var CAe="mad",FUe=["typed","abs","map","median","subtract"],$_=G(CAe,FUe,e=>{var{typed:t,abs:r,map:n,median:i,subtract:a}=e;return t(CAe,{"Array | Matrix":o,"...":function(l){return o(l)}});function o(s){if(s=hr(s.valueOf()),s.length===0)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var l=i(s);return i(n(s,function(u){return r(a(u,l))}))}catch(u){throw u instanceof TypeError&&u.message.indexOf("median")!==-1?new TypeError(u.message.replace("median","mad")):Da(u,"mad")}}});var lV="unbiased",DAe="variance",_Ue=["typed","add","subtract","multiply","divide","apply","isNaN"],Yw=G(DAe,_Ue,e=>{var{typed:t,add:r,subtract:n,multiply:i,divide:a,apply:o,isNaN:s}=e;return t(DAe,{"Array | Matrix":function(f){return l(f,lV)},"Array | Matrix, string":l,"Array | Matrix, number | BigNumber":function(f,d){return u(f,d,lV)},"Array | Matrix, number | BigNumber, string":u,"...":function(f){return l(f,lV)}});function l(c,f){var d,p=0;if(c.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");if(Pl(c,function(g){try{d=d===void 0?g:r(d,g),p++}catch(A){throw Da(A,"variance",g)}}),p===0)throw new Error("Cannot calculate variance of an empty array");var h=a(d,p);if(d=void 0,Pl(c,function(g){var A=n(g,h);d=d===void 0?i(A,A):r(d,i(A,A))}),s(d))return d;switch(f){case"uncorrected":return a(d,p);case"biased":return a(d,p+1);case"unbiased":{var m=Ft(d)?d.mul(0):0;return p===1?m:a(d,p-1)}default:throw new Error('Unknown normalization "'+f+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function u(c,f,d){try{if(c.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");return o(c,f,p=>l(p,d))}catch(p){throw Da(p,"variance")}}});var jAe="quantileSeq",PUe=["typed","?bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger"],Zw=G(jAe,PUe,e=>{var{typed:t,bignumber:r,add:n,subtract:i,divide:a,multiply:o,partitionSelect:s,compare:l,isInteger:u,smaller:c,smallerEq:f,larger:d}=e,p=w0({typed:t,isInteger:u});return t(jAe,{"Array | Matrix, number | BigNumber":(b,v)=>m(b,v,!1),"Array | Matrix, number | BigNumber, number":(b,v,x)=>h(b,v,!1,x,m),"Array | Matrix, number | BigNumber, boolean":m,"Array | Matrix, number | BigNumber, boolean, number":(b,v,x,w)=>h(b,v,x,w,m),"Array | Matrix, Array | Matrix":(b,v)=>g(b,v,!1),"Array | Matrix, Array | Matrix, number":(b,v,x)=>h(b,v,!1,x,g),"Array | Matrix, Array | Matrix, boolean":g,"Array | Matrix, Array | Matrix, boolean, number":(b,v,x,w)=>h(b,v,x,w,g)});function h(b,v,x,w,S){return p(b,w,k=>S(k,v,x))}function m(b,v,x){var w,S=b.valueOf();if(c(v,0))throw new Error("N/prob must be non-negative");if(f(v,1))return Gt(v)?A(S,v,x):r(A(S,v,x));if(d(v,1)){if(!u(v))throw new Error("N must be a positive integer");if(d(v,4294967295))throw new Error("N must be less than or equal to 2^32-1, as that is the maximum length of an Array");var k=n(v,1);w=[];for(var M=0;c(M,v);M++){var O=a(M+1,k);w.push(A(S,O,x))}return Gt(v)?w:r(w)}}function g(b,v,x){for(var w=b.valueOf(),S=v.valueOf(),k=[],M=0;M0&&(C=w[D])}return n(o(C,i(1,O)),o(T,O))}});var OAe="std",IUe=["typed","map","sqrt","variance"],Xw=G(OAe,IUe,e=>{var{typed:t,map:r,sqrt:n,variance:i}=e;return t(OAe,{"Array | Matrix":a,"Array | Matrix, string":a,"Array | Matrix, number | BigNumber":a,"Array | Matrix, number | BigNumber, string":a,"...":function(s){return a(s)}});function a(o,s){if(o.length===0)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{var l=i.apply(null,arguments);return ha(l)?r(l,n):n(l)}catch(u){throw u instanceof TypeError&&u.message.indexOf(" variance")!==-1?new TypeError(u.message.replace(" variance"," std")):u}}});var MAe="corr",BUe=["typed","matrix","mean","sqrt","sum","add","subtract","multiply","pow","divide"],q_=G(MAe,BUe,e=>{var{typed:t,matrix:r,sqrt:n,sum:i,add:a,subtract:o,multiply:s,pow:l,divide:u}=e;return t(MAe,{"Array, Array":function(p,h){return c(p,h)},"Matrix, Matrix":function(p,h){var m=c(p.toArray(),h.toArray());return Array.isArray(m)?r(m):m}});function c(d,p){var h=[];if(Array.isArray(d[0])&&Array.isArray(p[0])){if(d.length!==p.length)throw new SyntaxError("Dimension mismatch. Array A and B must have the same length.");for(var m=0;ma(S,s(k,p[M])),0),b=i(d.map(S=>l(S,2))),v=i(p.map(S=>l(S,2))),x=o(s(h,A),s(m,g)),w=n(s(o(s(h,b),l(m,2)),o(s(h,v),l(g,2))));return u(x,w)}});var NAe="combinations",RUe=["typed"],L_=G(NAe,RUe,e=>{var{typed:t}=e;return t(NAe,{"number, number":xW,"BigNumber, BigNumber":function(n,i){var a=n.constructor,o,s,l=n.minus(i),u=new a(1);if(!TAe(n)||!TAe(i))throw new TypeError("Positive integer value expected in function combinations");if(i.gt(n))throw new TypeError("k must be less than n in function combinations");if(o=u,i.lt(l))for(s=u;s.lte(l);s=s.plus(u))o=o.times(i.plus(s)).dividedBy(s);else for(s=u;s.lte(i);s=s.plus(u))o=o.times(l.plus(s)).dividedBy(s);return o}})});function TAe(e){return e.isInteger()&&e.gte(0)}var FAe="combinationsWithRep",$Ue=["typed"],z_=G(FAe,$Ue,e=>{var{typed:t}=e;return t(FAe,{"number, number":function(n,i){if(!xt(n)||n<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(!xt(i)||i<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(n<1)throw new TypeError("k must be less than or equal to n + k - 1");if(i{var{typed:t,config:r,multiplyScalar:n,pow:i,BigNumber:a,Complex:o}=e;function s(u){if(u.im===0)return g6(u.re);if(u.re<.5){var c=new o(1-u.re,-u.im),f=new o(Math.PI*u.re,Math.PI*u.im);return new o(Math.PI).div(f.sin()).div(s(c))}u=new o(u.re-1,u.im);for(var d=new o(K1[0],0),p=1;p2;)d-=2,h+=d,p=p.times(h);return new a(p.toPrecision(a.precision))}});var IAe="lgamma",LUe=["Complex","typed"],W_=G(IAe,LUe,e=>{var{Complex:t,typed:r}=e,n=7,i=7,a=[-.029550653594771242,.00641025641025641,-.0019175269175269176,.0008417508417508417,-.0005952380952380953,.0007936507936507937,-.002777777777777778,.08333333333333333];return r(IAe,{number:v6,Complex:o,BigNumber:function(){throw new Error("mathjs doesn't yet provide an implementation of the algorithm lgamma for BigNumber")}});function o(u){var c=6.283185307179586,f=1.1447298858494002,d=.1;if(u.isNaN())return new t(NaN,NaN);if(u.im===0)return new t(v6(u.re),0);if(u.re>=n||Math.abs(u.im)>=i)return s(u);if(u.re<=d){var p=pse(c,u.im)*Math.floor(.5*u.re+.25),h=u.mul(Math.PI).sin().log(),m=o(new t(1-u.re,-u.im));return new t(f,p).sub(h).sub(m)}else return u.im>=0?l(u):l(u.conjugate()).conjugate()}function s(u){for(var c=u.sub(.5).mul(u.log()).sub(u).add(jW),f=new t(1,0).div(u),d=f.div(u),p=a[0],h=a[1],m=2*d.re,g=d.re*d.re+d.im*d.im,A=2;A<8;A++){var b=h;h=-g*p+a[A],p=m*p+b}var v=f.mul(d.mul(p).add(h));return c.add(v)}function l(u){var c=0,f=0,d=u;for(u=u.add(1);u.re<=n;){d=d.mul(u);var p=d.im<0?1:0;p!==0&&f===0&&c++,f=p,u=u.add(1)}return s(u).sub(d.log()).sub(new t(0,c*2*Math.PI*1))}});var BAe="factorial",zUe=["typed","gamma"],V_=G(BAe,zUe,e=>{var{typed:t,gamma:r}=e;return t(BAe,{number:function(i){if(i<0)throw new Error("Value must be non-negative");return r(i+1)},BigNumber:function(i){if(i.isNegative())throw new Error("Value must be non-negative");return r(i.plus(1))},"Array | Matrix":t.referToSelf(n=>i=>jt(i,n))})});var RAe="kldivergence",UUe=["typed","matrix","divide","sum","multiply","map","dotDivide","log","isNumeric"],G_=G(RAe,UUe,e=>{var{typed:t,matrix:r,divide:n,sum:i,multiply:a,map:o,dotDivide:s,log:l,isNumeric:u}=e;return t(RAe,{"Array, Array":function(d,p){return c(r(d),r(p))},"Matrix, Array":function(d,p){return c(d,r(p))},"Array, Matrix":function(d,p){return c(r(d),p)},"Matrix, Matrix":function(d,p){return c(d,p)}});function c(f,d){var p=d.size().length,h=f.size().length;if(p>1)throw new Error("first object must be one dimensional");if(h>1)throw new Error("second object must be one dimensional");if(p!==h)throw new Error("Length of two vectors must be equal");var m=i(f);if(m===0)throw new Error("Sum of elements in first object must be non zero");var g=i(d);if(g===0)throw new Error("Sum of elements in second object must be non zero");var A=n(f,i(f)),b=n(d,i(d)),v=i(a(A,o(s(A,b),x=>l(x))));return u(v)?v:Number.NaN}});var $Ae="multinomial",WUe=["typed","add","divide","multiply","factorial","isInteger","isPositive"],H_=G($Ae,WUe,e=>{var{typed:t,add:r,divide:n,multiply:i,factorial:a,isInteger:o,isPositive:s}=e;return t($Ae,{"Array | Matrix":function(u){var c=0,f=1;return Pl(u,function(d){if(!o(d)||!s(d))throw new TypeError("Positive integer value expected in function multinomial");c=r(c,d),f=i(f,a(d))}),n(a(c),f)}})});var qAe="permutations",VUe=["typed","factorial"],Q_=G(qAe,VUe,e=>{var{typed:t,factorial:r}=e;return t(qAe,{"number | BigNumber":r,"number, number":function(i,a){if(!xt(i)||i<0)throw new TypeError("Positive integer value expected in function permutations");if(!xt(a)||a<0)throw new TypeError("Positive integer value expected in function permutations");if(a>i)throw new TypeError("second argument k must be less than or equal to first argument n");return Jc(i-a+1,i)},"BigNumber, BigNumber":function(i,a){var o,s;if(!LAe(i)||!LAe(a))throw new TypeError("Positive integer value expected in function permutations");if(a.gt(i))throw new TypeError("second argument k must be less than or equal to first argument n");var l=i.mul(0).add(1);for(o=l,s=i.minus(a).plus(1);s.lte(i);s=s.plus(1))o=o.times(s);return o}})});function LAe(e){return e.isInteger()&&e.gte(0)}var hV=ge(nge(),1),KUe=(0,hV.default)(Date.now());function yA(e){var t;function r(i){t=i===null?KUe:(0,hV.default)(String(i))}r(e);function n(){return t()}return n}var ige="pickRandom",JUe=["typed","config","?on"],Z_=G(ige,JUe,e=>{var{typed:t,config:r,on:n}=e,i=yA(r.randomSeed);return n&&n("config",function(o,s){o.randomSeed!==s.randomSeed&&(i=yA(o.randomSeed))}),t(ige,{"Array | Matrix":function(s){return a(s,{})},"Array | Matrix, Object":function(s,l){return a(s,l)},"Array | Matrix, number":function(s,l){return a(s,{number:l})},"Array | Matrix, Array | Matrix":function(s,l){return a(s,{weights:l})},"Array | Matrix, Array | Matrix, number":function(s,l,u){return a(s,{number:u,weights:l})},"Array | Matrix, number, Array | Matrix":function(s,l,u){return a(s,{number:l,weights:u})}});function a(o,s){var{number:l,weights:u,elementWise:c=!0}=s,f=typeof l>"u";f&&(l=1);var d=wt(o)?o.create:wt(u)?u.create:null;o=o.valueOf(),u&&(u=u.valueOf()),c===!0&&(o=hr(o),u=hr(u));var p=0;if(typeof u<"u"){if(u.length!==o.length)throw new Error("Weights must have the same length as possibles");for(var h=0,m=u.length;h"u")b=o[Math.floor(i()*g)];else for(var v=i()*p,x=0,w=o.length;x1)for(var n=0,i=e.shift();n{var{typed:t,config:r,on:n}=e,i=yA(r.randomSeed);return n&&n("config",function(s,l){s.randomSeed!==l.randomSeed&&(i=yA(s.randomSeed))}),t(age,{"":()=>o(0,1),number:s=>o(0,s),"number, number":(s,l)=>o(s,l),"Array | Matrix":s=>a(s,0,1),"Array | Matrix, number":(s,l)=>a(s,0,l),"Array | Matrix, number, number":(s,l,u)=>a(s,l,u)});function a(s,l,u){var c=S6(s.valueOf(),()=>o(l,u));return wt(s)?s.create(c):c}function o(s,l){return s+i()*(l-s)}});var oge="randomInt",tWe=["typed","config","?on"],K_=G(oge,tWe,e=>{var{typed:t,config:r,on:n}=e,i=yA(r.randomSeed);return n&&n("config",function(s,l){s.randomSeed!==l.randomSeed&&(i=yA(s.randomSeed))}),t(oge,{"":()=>o(0,1),number:s=>o(0,s),"number, number":(s,l)=>o(s,l),"Array | Matrix":s=>a(s,0,1),"Array | Matrix, number":(s,l)=>a(s,0,l),"Array | Matrix, number, number":(s,l,u)=>a(s,l,u)});function a(s,l,u){var c=S6(s.valueOf(),()=>o(l,u));return wt(s)?s.create(c):c}function o(s,l){return Math.floor(s+i()*(l-s))}});var sge="stirlingS2",rWe=["typed","addScalar","subtractScalar","multiplyScalar","divideScalar","pow","factorial","combinations","isNegative","isInteger","number","?bignumber","larger"],J_=G(sge,rWe,e=>{var{typed:t,addScalar:r,subtractScalar:n,multiplyScalar:i,divideScalar:a,pow:o,factorial:s,combinations:l,isNegative:u,isInteger:c,number:f,bignumber:d,larger:p}=e,h=[],m=[];return t(sge,{"number | BigNumber, number | BigNumber":function(A,b){if(!c(A)||u(A)||!c(b)||u(b))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(p(b,A))throw new TypeError("k must be less than or equal to n in function stirlingS2");var v=!(Gt(A)&&Gt(b)),x=v?m:h,w=v?d:f,S=f(A),k=f(b);if(x[S]&&x[S].length>k)return x[S][k];for(var M=0;M<=S;++M)if(x[M]||(x[M]=[w(M===0?1:0)]),M!==0)for(var O=x[M],C=x[M-1],T=O.length;T<=M&&T<=k;++T)T===M?O[T]=1:O[T]=r(i(w(T),C[T]),C[T-1]);return x[S][k]}})});var lge="bellNumbers",nWe=["typed","addScalar","isNegative","isInteger","stirlingS2"],eP=G(lge,nWe,e=>{var{typed:t,addScalar:r,isNegative:n,isInteger:i,stirlingS2:a}=e;return t(lge,{"number | BigNumber":function(s){if(!i(s)||n(s))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var l=0,u=0;u<=s;u++)l=r(l,a(s,u));return l}})});var uge="catalan",iWe=["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],tP=G(uge,iWe,e=>{var{typed:t,addScalar:r,divideScalar:n,multiplyScalar:i,combinations:a,isNegative:o,isInteger:s}=e;return t(uge,{"number | BigNumber":function(u){if(!s(u)||o(u))throw new TypeError("Non-negative integer value expected in function catalan");return n(a(i(u,2),u),r(u,1))}})});var cge="composition",aWe=["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],rP=G(cge,aWe,e=>{var{typed:t,addScalar:r,combinations:n,isPositive:i,isNegative:a,isInteger:o,larger:s}=e;return t(cge,{"number | BigNumber, number | BigNumber":function(u,c){if(!o(u)||!i(u)||!o(c)||!i(c))throw new TypeError("Positive integer value expected in function composition");if(s(c,u))throw new TypeError("k must be less than or equal to n in function composition");return n(r(u,-1),r(c,-1))}})});var fge="leafCount",oWe=["parse","typed"],nP=G(fge,oWe,e=>{var{parse:t,typed:r}=e;function n(i){var a=0;return i.forEach(o=>{a+=n(o)}),a||1}return r(fge,{Node:function(a){return n(a)}})});function AV(e){return vr(e)||mi(e)&&e.isUnary()&&vr(e.args[0])}function E6(e){return!!(vr(e)||(il(e)||mi(e))&&e.args.every(E6)||Zo(e)&&E6(e.content))}function dge(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gV(e){for(var t=1;t{var{FunctionNode:t,OperatorNode:r,SymbolNode:n}=e,i=!0,a=!1,o="defaultF",s={add:{trivial:i,total:i,commutative:i,associative:i},unaryPlus:{trivial:i,total:i,commutative:i,associative:i},subtract:{trivial:a,total:i,commutative:a,associative:a},multiply:{trivial:i,total:i,commutative:i,associative:i},divide:{trivial:a,total:i,commutative:a,associative:a},paren:{trivial:i,total:i,commutative:i,associative:a},defaultF:{trivial:a,total:i,commutative:a,associative:a}},l={divide:{total:a},log:{total:a}},u={subtract:{total:a},abs:{trivial:i},log:{total:i}};function c(v,x){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:s,S=o;if(typeof v=="string"?S=v:mi(v)?S=v.fn.toString():il(v)?S=v.name:Zo(v)&&(S="paren"),St(w,S)){var k=w[S];if(St(k,x))return k[x];if(St(s,S))return s[S][x]}if(St(w,o)){var M=w[o];return St(M,x)?M[x]:s[o][x]}if(St(s,S)){var O=s[S];if(St(O,x))return O[x]}return s[o][x]}function f(v){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s;return c(v,"commutative",x)}function d(v){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s;return c(v,"associative",x)}function p(v,x){var w=gV({},v);for(var S in x)St(v,S)?w[S]=gV(gV({},x[S]),v[S]):w[S]=x[S];return w}function h(v,x){if(!v.args||v.args.length===0)return v;v.args=m(v,x);for(var w=0;w2&&d(v,x)){for(var M=v.args.pop();v.args.length>0;)M=w([v.args.pop(),M]);v.args=M.args}}}function A(v,x){if(!(!v.args||v.args.length===0)){for(var w=b(v),S=v.args.length,k=0;k2&&d(v,x)){for(var M=v.args.shift();v.args.length>0;)M=w([M,v.args.shift()]);v.args=M.args}}}function b(v){return mi(v)?function(x){try{return new r(v.op,v.fn,x,v.implicit)}catch(w){return console.error(w),[]}}:function(x){return new t(new n(v.name),x)}}return{createMakeNodeFunction:b,hasProperty:c,isCommutative:f,isAssociative:d,mergeContext:p,flatten:h,allChildren:m,unflattenr:g,unflattenl:A,defaultContext:s,realContext:l,positiveContext:u}});var uWe="simplify",cWe=["config","typed","parse","add","subtract","multiply","divide","pow","isZero","equal","resolve","simplifyConstant","simplifyCore","?fraction","?bignumber","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],iP=G(uWe,cWe,e=>{var{config:t,typed:r,parse:n,add:i,subtract:a,multiply:o,divide:s,pow:l,isZero:u,equal:c,resolve:f,simplifyConstant:d,simplifyCore:p,fraction:h,bignumber:m,mathWithTransform:g,matrix:A,AccessorNode:b,ArrayNode:v,ConstantNode:x,FunctionNode:w,IndexNode:S,ObjectNode:k,OperatorNode:M,ParenthesisNode:O,SymbolNode:C}=e,{hasProperty:T,isCommutative:D,isAssociative:P,mergeContext:R,flatten:q,unflattenr:B,unflattenl:N,createMakeNodeFunction:W,defaultContext:_,realContext:X,positiveContext:oe}=Kw({FunctionNode:w,OperatorNode:M,SymbolNode:C});r.addConversion({from:"Object",to:"Map",convert:hA});var re=r("simplify",{Node:_e,"Node, Map":(Y,te)=>_e(Y,!1,te),"Node, Map, Object":(Y,te,ie)=>_e(Y,!1,te,ie),"Node, Array":_e,"Node, Array, Map":_e,"Node, Array, Map, Object":_e});r.removeConversion({from:"Object",to:"Map",convert:hA}),re.defaultContext=_,re.realContext=X,re.positiveContext=oe;function Q(Y){return Y.transform(function(te,ie,Se){return Zo(te)?Q(te.content):te})}var he={true:!0,false:!0,e:!0,i:!0,Infinity:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,NaN:!0,phi:!0,pi:!0,SQRT1_2:!0,SQRT2:!0,tau:!0};re.rules=[p,{l:"log(e)",r:"1"},{s:"n-n1 -> n+-n1",assuming:{subtract:{total:!0}}},{s:"n-n -> 0",assuming:{subtract:{total:!1}}},{s:"-(cl*v) -> v * (-cl)",assuming:{multiply:{commutative:!0},subtract:{total:!0}}},{s:"-(cl*v) -> (-cl) * v",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{s:"-(v*cl) -> v * (-cl)",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{l:"-(n1/n2)",r:"-n1/n2"},{l:"-v",r:"v * (-1)"},{l:"(n1 + n2)*(-1)",r:"n1*(-1) + n2*(-1)",repeat:!0},{l:"n/n1^n2",r:"n*n1^-n2"},{l:"n/n1",r:"n*n1^-1"},{s:"(n1*n2)^n3 -> n1^n3 * n2^n3",assuming:{multiply:{commutative:!0}}},{s:"(n1*n2)^(-1) -> n2^(-1) * n1^(-1)",assuming:{multiply:{commutative:!1}}},{s:"(n ^ n1) ^ n2 -> n ^ (n1 * n2)",assuming:{divide:{total:!0}}},{l:" vd * ( vd * n1 + n2)",r:"vd^2 * n1 + vd * n2"},{s:" vd * (vd^n4 * n1 + n2) -> vd^(1+n4) * n1 + vd * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * ( vd * n1 + n2) -> vd^(n3+1) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * (vd^n4 * n1 + n2) -> vd^(n3+n4) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{l:"n*n",r:"n^2"},{s:"n * n^n1 -> n^(n1+1)",assuming:{divide:{total:!0}}},{s:"n^n1 * n^n2 -> n^(n1+n2)",assuming:{divide:{total:!0}}},d,{s:"n+n -> 2*n",assuming:{add:{total:!0}}},{l:"n+-n",r:"0"},{l:"vd*n + vd",r:"vd*(n+1)"},{l:"n3*n1 + n3*n2",r:"n3*(n1+n2)"},{l:"n3^(-n4)*n1 + n3 * n2",r:"n3^(-n4)*(n1 + n3^(n4+1) *n2)"},{l:"n3^(-n4)*n1 + n3^n5 * n2",r:"n3^(-n4)*(n1 + n3^(n4+n5)*n2)"},{s:"n*vd + vd -> (n+1)*vd",assuming:{multiply:{commutative:!1}}},{s:"vd + n*vd -> (1+n)*vd",assuming:{multiply:{commutative:!1}}},{s:"n1*n3 + n2*n3 -> (n1+n2)*n3",assuming:{multiply:{commutative:!1}}},{s:"n^n1 * n -> n^(n1+1)",assuming:{divide:{total:!0},multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3 -> (n1 + n2*n3^(n4 + 1))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3^n5 -> (n1 + n2*n3^(n4 + n5))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{l:"n*cd + cd",r:"(n+1)*cd"},{s:"cd*n + cd -> cd*(n+1)",assuming:{multiply:{commutative:!1}}},{s:"cd + cd*n -> cd*(1+n)",assuming:{multiply:{commutative:!1}}},d,{s:"(-n)*n1 -> -(n*n1)",assuming:{subtract:{total:!0}}},{s:"n1*(-n) -> -(n1*n)",assuming:{subtract:{total:!0},multiply:{commutative:!1}}},{s:"ce+ve -> ve+ce",assuming:{add:{commutative:!0}},imposeContext:{add:{commutative:!1}}},{s:"vd*cd -> cd*vd",assuming:{multiply:{commutative:!0}},imposeContext:{multiply:{commutative:!1}}},{l:"n+-n1",r:"n-n1"},{l:"n+-(n1)",r:"n-(n1)"},{s:"n*(n1^-1) -> n/n1",assuming:{multiply:{commutative:!0}}},{s:"n*n1^-n2 -> n/n1^n2",assuming:{multiply:{commutative:!0}}},{s:"n^-1 -> 1/n",assuming:{multiply:{commutative:!0}}},{l:"n^1",r:"n"},{s:"n*(n1/n2) -> (n*n1)/n2",assuming:{multiply:{associative:!0}}},{s:"n-(n1+n2) -> n-n1-n2",assuming:{addition:{associative:!0,commutative:!0}}},{l:"1*n",r:"n",imposeContext:{multiply:{commutative:!0}}},{s:"n1/(n2/n3) -> (n1*n3)/n2",assuming:{multiply:{associative:!0}}},{l:"n1/(-n2)",r:"-n1/n2"}];function Ie(Y,te){var ie={};if(Y.s){var Se=Y.s.split("->");if(Se.length===2)ie.l=Se[0],ie.r=Se[1];else throw SyntaxError("Could not parse rule: "+Y.s)}else ie.l=Y.l,ie.r=Y.r;ie.l=Q(n(ie.l)),ie.r=Q(n(ie.r));for(var ke of["imposeContext","repeat","assuming"])ke in Y&&(ie[ke]=Y[ke]);if(Y.evaluate&&(ie.evaluate=n(Y.evaluate)),P(ie.l,te)){var Me=!D(ie.l,te),me;Me&&(me=Re());var ze=W(ie.l),Ye=Re();ie.expanded={},ie.expanded.l=ze([ie.l,Ye]),q(ie.expanded.l,te),B(ie.expanded.l,te),ie.expanded.r=ze([ie.r,Ye]),Me&&(ie.expandedNC1={},ie.expandedNC1.l=ze([me,ie.l]),ie.expandedNC1.r=ze([me,ie.r]),ie.expandedNC2={},ie.expandedNC2.l=ze([me,ie.expanded.l]),ie.expandedNC2.r=ze([me,ie.expanded.r]))}return ie}function xe(Y,te){for(var ie=[],Se=0;Se2&&arguments[2]!==void 0?arguments[2]:A0(),Se=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},ke=Se.consoleDebug;te=xe(te||re.rules,Se.context);var Me=f(Y,ie);Me=Q(Me);for(var me={},ze=Me.toString({parenthesis:"all"});!me[ze];){me[ze]=!0,Oe=0;var Ye=ze;ke&&console.log("Working on: ",ze);for(var tt=0;tt ").concat(te[tt].r.toString()))),ke){var be=Me.toString({parenthesis:"all"});be!==Ye&&(console.log("Applying",Et,"produced",be),Ye=be)}N(Me,Se.context)}ze=Me.toString({parenthesis:"all"})}return Me}function we(Y,te,ie){var Se=Y;if(Y)for(var ke=0;ke1&&(Ye=Me(Y.args.slice(0,ze))),ke=Y.args.slice(ze),Se=ke.length===1?ke[0]:Me(ke),ie.push(Me([Ye,Se]))}return ie}function ue(Y,te){var ie={placeholders:{}};if(!Y.placeholders&&!te.placeholders)return ie;if(Y.placeholders){if(!te.placeholders)return Y}else return te;for(var Se in Y.placeholders)if(St(Y.placeholders,Se)&&(ie.placeholders[Se]=Y.placeholders[Se],St(te.placeholders,Se)&&!ee(Y.placeholders[Se],te.placeholders[Se])))return null;for(var ke in te.placeholders)St(te.placeholders,ke)&&(ie.placeholders[ke]=te.placeholders[ke]);return ie}function ce(Y,te){var ie=[];if(Y.length===0||te.length===0)return ie;for(var Se,ke=0;ke2)throw new Error("permuting >2 commutative non-associative rule arguments not yet implemented");var Ye=$(Y.args[0],te.args[1],ie);if(Ye.length===0)return[];var tt=$(Y.args[1],te.args[0],ie);if(tt.length===0)return[];Me=[Ye,tt]}ke=U(Me)}else if(te.args.length>=2&&Y.args.length===2){for(var Et=L(te,ie),be=[],Pe=0;Pe2)throw Error("Unexpected non-binary associative function: "+Y.toString());return[]}}else if(Y instanceof C){if(Y.name.length===0)throw new Error("Symbol in rule has 0 length...!?");if(he[Y.name]){if(Y.name!==te.name)return[]}else switch(Y.name[1]>="a"&&Y.name[1]<="z"?Y.name.substring(0,2):Y.name[0]){case"n":case"_p":ke[0].placeholders[Y.name]=te;break;case"c":case"cl":if(vr(te))ke[0].placeholders[Y.name]=te;else return[];break;case"v":if(!vr(te))ke[0].placeholders[Y.name]=te;else return[];break;case"vl":if(Kn(te))ke[0].placeholders[Y.name]=te;else return[];break;case"cd":if(AV(te))ke[0].placeholders[Y.name]=te;else return[];break;case"vd":if(!AV(te))ke[0].placeholders[Y.name]=te;else return[];break;case"ce":if(E6(te))ke[0].placeholders[Y.name]=te;else return[];break;case"ve":if(!E6(te))ke[0].placeholders[Y.name]=te;else return[];break;default:throw new Error("Invalid symbol in rule: "+Y.name)}}else if(Y instanceof x){if(!c(Y.value,te.value))return[]}else return[];return ke}function ee(Y,te){if(Y instanceof x&&te instanceof x){if(!c(Y.value,te.value))return!1}else if(Y instanceof C&&te instanceof C){if(Y.name!==te.name)return!1}else if(Y instanceof M&&te instanceof M||Y instanceof w&&te instanceof w){if(Y instanceof M){if(Y.op!==te.op||Y.fn!==te.fn)return!1}else if(Y instanceof w&&Y.name!==te.name)return!1;if(Y.args.length!==te.args.length)return!1;for(var ie=0;ie{var{typed:t,config:r,mathWithTransform:n,matrix:i,fraction:a,bignumber:o,AccessorNode:s,ArrayNode:l,ConstantNode:u,FunctionNode:c,IndexNode:f,ObjectNode:d,OperatorNode:p,SymbolNode:h}=e,{isCommutative:m,isAssociative:g,allChildren:A,createMakeNodeFunction:b}=Kw({FunctionNode:c,OperatorNode:p,SymbolNode:h}),v=t("simplifyConstant",{Node:q=>k(R(q,{})),"Node, Object":function(B,N){return k(R(B,N))}});function x(q){return Xc(q)?q.valueOf():q instanceof Array?q.map(x):wt(q)?i(x(q.valueOf())):q}function w(q,B,N){try{return n[q].apply(null,B)}catch{return B=B.map(x),O(n[q].apply(null,B),N)}}var S=t({Fraction:T,number:function(B){return B<0?C(new u(-B)):new u(B)},BigNumber:function(B){return B<0?C(new u(-B)):new u(B)},Complex:function(B){throw new Error("Cannot convert Complex number to Node")},string:function(B){return new u(B)},Matrix:function(B){return new l(B.valueOf().map(N=>S(N)))}});function k(q){return Dr(q)?q:S(q)}function M(q,B){var N=B&&B.exactFractions!==!1;if(N&&isFinite(q)&&a){var W=a(q),_=B&&typeof B.fractionsLimit=="number"?B.fractionsLimit:1/0;if(W.valueOf()===q&&W.n<_&&W.d<_)return W}return q}var O=t({"string, Object":function(B,N){if(r.number==="BigNumber")return o===void 0&&Fw(),o(B);if(r.number==="Fraction")return a===void 0&&EF(),a(B);var W=parseFloat(B);return M(W,N)},"Fraction, Object":function(B,N){return B},"BigNumber, Object":function(B,N){return B},"number, Object":function(B,N){return M(B,N)},"Complex, Object":function(B,N){return B.im!==0?B:M(B.re,N)},"Matrix, Object":function(B,N){return i(M(B.valueOf()))},"Array, Object":function(B,N){return B.map(M)}});function C(q){return new p("-","unaryMinus",[q])}function T(q){var B,N=q.s*q.n;return N<0?B=new p("-","unaryMinus",[new u(-N)]):B=new u(N),q.d===1?B:new p("/","divide",[B,new u(q.d)])}function D(q,B,N){if(!sc(B))return new s(k(q),k(B));if(Yo(q)||wt(q)){for(var W=Array.from(B.dimensions);W.length>0;)if(vr(W[0])&&typeof W[0].value!="string"){var _=O(W.shift().value,N);Yo(q)?q=q.items[_-1]:(q=q.valueOf()[_-1],q instanceof Array&&(q=i(q)))}else if(W.length>1&&vr(W[1])&&typeof W[1].value!="string"){var X=O(W[1].value,N),oe=[],re=Yo(q)?q.items:q.valueOf();for(var Q of re)if(Yo(Q))oe.push(Q.items[X-1]);else if(wt(q))oe.push(Q[X-1]);else break;if(oe.length===re.length)Yo(q)?q=new l(oe):q=i(oe),W.splice(1,1);else break}else break;return W.length===B.dimensions.length?new s(k(q),B):W.length>0?(B=new f(W),new s(k(q),B)):q}if(Em(q)&&B.dimensions.length===1&&vr(B.dimensions[0])){var he=B.dimensions[0].value;return he in q.properties?q.properties[he]:new u}return new s(k(q),B)}function P(q,B,N,W){var _=B.shift(),X=B.reduce((oe,re)=>{if(!Dr(re)){var Q=oe.pop();if(Dr(Q))return[Q,re];try{return oe.push(w(q,[Q,re],W)),oe}catch{oe.push(Q)}}oe.push(k(oe.pop()));var he=oe.length===1?oe[0]:N(oe);return[N([he,k(re)])]},[_]);return X.length===1?X[0]:N([X[0],S(X[1])])}function R(q,B){switch(q.type){case"SymbolNode":return q;case"ConstantNode":switch(typeof q.value){case"number":return O(q.value,B);case"string":return q.value;default:if(!isNaN(q.value))return O(q.value,B)}return q;case"FunctionNode":if(n[q.name]&&n[q.name].rawArgs)return q;{var N=["add","multiply"];if(N.indexOf(q.name)===-1){var W=q.args.map(se=>R(se,B));if(!W.some(Dr))try{return w(q.name,W,B)}catch{}if(q.name==="size"&&W.length===1&&Yo(W[0])){for(var _=[],X=W[0];Yo(X);)_.push(X.items.length),X=X.items[0];return i(_)}return new c(q.name,W.map(k))}}case"OperatorNode":{var oe=q.fn.toString(),re,Q,he=b(q);if(mi(q)&&q.isUnary())re=[R(q.args[0],B)],Dr(re[0])?Q=he(re):Q=w(oe,re,B);else if(g(q,B.context))if(re=A(q,B.context),re=re.map(se=>R(se,B)),m(oe,B.context)){for(var Ie=[],xe=[],Oe=0;Oe1?(Q=P(oe,Ie,he,B),xe.unshift(Q),Q=P(oe,xe,he,B)):Q=P(oe,re,he,B)}else Q=P(oe,re,he,B);else re=q.args.map(se=>R(se,B)),Q=P(oe,re,he,B);return Q}case"ParenthesisNode":return R(q.content,B);case"AccessorNode":return D(R(q.object,B),R(q.index,B),B);case"ArrayNode":{var Re=q.items.map(se=>R(se,B));return Re.some(Dr)?new l(Re.map(k)):i(Re)}case"IndexNode":return new f(q.dimensions.map(se=>v(se,B)));case"ObjectNode":{var _e={};for(var we in q.properties)_e[we]=v(q.properties[we],B);return new d(_e)}case"AssignmentNode":case"BlockNode":case"FunctionAssignmentNode":case"RangeNode":case"ConditionalNode":default:throw new Error("Unimplemented node type in simplifyConstant: ".concat(q.type))}}return v});var pge="simplifyCore",pWe=["typed","parse","equal","isZero","add","subtract","multiply","divide","pow","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],oP=G(pge,pWe,e=>{var{typed:t,parse:r,equal:n,isZero:i,add:a,subtract:o,multiply:s,divide:l,pow:u,AccessorNode:c,ArrayNode:f,ConstantNode:d,FunctionNode:p,IndexNode:h,ObjectNode:m,OperatorNode:g,ParenthesisNode:A,SymbolNode:b}=e,v=new d(0),x=new d(1),w=new d(!0),S=new d(!1);function k(T){return mi(T)&&["and","not","or"].includes(T.op)}var{hasProperty:M,isCommutative:O}=Kw({FunctionNode:p,OperatorNode:g,SymbolNode:b});function C(T){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},P=D?D.context:void 0;if(M(T,"trivial",P)){if(il(T)&&T.args.length===1)return C(T.args[0],D);var R=!1,q=0;if(T.forEach(xe=>{++q,q===1&&(R=C(xe,D))}),q===1)return R}var B=T;if(il(B)){var N=ffe(B.name);if(N){if(B.args.length>2&&M(B,"associative",P))for(;B.args.length>2;){var W=B.args.pop(),_=B.args.pop();B.args.push(new g(N,B.name,[W,_]))}B=new g(N,B.name,B.args)}else return new p(C(B.fn),B.args.map(xe=>C(xe,D)))}if(mi(B)&&B.isUnary()){var X=C(B.args[0],D);if(B.op==="~"&&mi(X)&&X.isUnary()&&X.op==="~"||B.op==="not"&&mi(X)&&X.isUnary()&&X.op==="not"&&k(X.args[0]))return X.args[0];var oe=!0;if(B.op==="-"&&mi(X)&&(X.isBinary()&&X.fn==="subtract"&&(B=new g("-","subtract",[X.args[1],X.args[0]]),oe=!1),X.isUnary()&&X.op==="-"))return X.args[0];if(oe)return new g(B.op,B.fn,[X])}if(mi(B)&&B.isBinary()){var re=C(B.args[0],D),Q=C(B.args[1],D);if(B.op==="+"){if(vr(re)&&i(re.value))return Q;if(vr(Q)&&i(Q.value))return re;mi(Q)&&Q.isUnary()&&Q.op==="-"&&(Q=Q.args[0],B=new g("-","subtract",[re,Q]))}if(B.op==="-")return mi(Q)&&Q.isUnary()&&Q.op==="-"?C(new g("+","add",[re,Q.args[0]]),D):vr(re)&&i(re.value)?C(new g("-","unaryMinus",[Q])):vr(Q)&&i(Q.value)?re:new g(B.op,B.fn,[re,Q]);if(B.op==="*"){if(vr(re)){if(i(re.value))return v;if(n(re.value,1))return Q}if(vr(Q)){if(i(Q.value))return v;if(n(Q.value,1))return re;if(O(B,P))return new g(B.op,B.fn,[Q,re],B.implicit)}return new g(B.op,B.fn,[re,Q],B.implicit)}if(B.op==="/")return vr(re)&&i(re.value)?v:vr(Q)&&n(Q.value,1)?re:new g(B.op,B.fn,[re,Q]);if(B.op==="^"&&vr(Q)){if(i(Q.value))return x;if(n(Q.value,1))return re}if(B.op==="and"){if(vr(re))if(re.value){if(k(Q))return Q;if(vr(Q))return Q.value?w:S}else return S;if(vr(Q))if(Q.value){if(k(re))return re}else return S}if(B.op==="or"){if(vr(re)){if(re.value)return w;if(k(Q))return Q}if(vr(Q)){if(Q.value)return w;if(k(re))return re}}return new g(B.op,B.fn,[re,Q])}if(mi(B))return new g(B.op,B.fn,B.args.map(xe=>C(xe,D)));if(Yo(B))return new f(B.items.map(xe=>C(xe,D)));if(vu(B))return new c(C(B.object,D),C(B.index,D));if(sc(B))return new h(B.dimensions.map(xe=>C(xe,D)));if(Em(B)){var he={};for(var Ie in B.properties)he[Ie]=C(B.properties[Ie],D);return new m(he)}return B}return t(pge,{Node:C,"Node,Object":C})});var mWe="resolve",hWe=["typed","parse","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode"],sP=G(mWe,hWe,e=>{var{typed:t,parse:r,ConstantNode:n,FunctionNode:i,OperatorNode:a,ParenthesisNode:o}=e;function s(l,u){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Set;if(!u)return l;if(Kn(l)){if(c.has(l.name)){var f=Array.from(c).join(", ");throw new ReferenceError("recursive loop of variable definitions among {".concat(f,"}"))}var d=u.get(l.name);if(Dr(d)){var p=new Set(c);return p.add(l.name),s(d,u,p)}else return typeof d=="number"?r(String(d)):d!==void 0?new n(d):l}else if(mi(l)){var h=l.args.map(function(g){return s(g,u,c)});return new a(l.op,l.fn,h,l.implicit)}else{if(Zo(l))return new o(s(l.content,u,c));if(il(l)){var m=l.args.map(function(g){return s(g,u,c)});return new i(l.name,m)}}return l.map(g=>s(g,u,c))}return t("resolve",{Node:s,"Node, Map | null | undefined":s,"Node, Object":(l,u)=>s(l,hA(u)),"Array | Matrix":t.referToSelf(l=>u=>u.map(c=>l(c))),"Array | Matrix, null | undefined":t.referToSelf(l=>u=>u.map(c=>l(c))),"Array, Object":t.referTo("Array,Map",l=>(u,c)=>l(u,hA(c))),"Matrix, Object":t.referTo("Matrix,Map",l=>(u,c)=>l(u,hA(c))),"Array | Matrix, Map":t.referToSelf(l=>(u,c)=>u.map(f=>l(f,c)))})});var mge="symbolicEqual",AWe=["parse","simplify","typed","OperatorNode"],lP=G(mge,AWe,e=>{var{parse:t,simplify:r,typed:n,OperatorNode:i}=e;function a(o,s){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u=new i("-","subtract",[o,s]),c=r(u,{},l);return vr(c)&&!c.value}return n(mge,{"Node, Node":a,"Node, Node, Object":a})});var hge="derivative",gWe=["typed","config","parse","simplify","equal","isZero","numeric","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],uP=G(hge,gWe,e=>{var{typed:t,config:r,parse:n,simplify:i,equal:a,isZero:o,numeric:s,ConstantNode:l,FunctionNode:u,OperatorNode:c,ParenthesisNode:f,SymbolNode:d}=e;function p(v,x){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{simplify:!0},S={};g(S,v,x.name);var k=A(v,S);return w.simplify?i(k):k}t.addConversion({from:"identifier",to:"SymbolNode",convert:n});var h=t(hge,{"Node, SymbolNode":p,"Node, SymbolNode, Object":p});t.removeConversion({from:"identifier",to:"SymbolNode",convert:n}),h._simplify=!0,h.toTex=function(v){return m.apply(null,v.args)};var m=t("_derivTex",{"Node, SymbolNode":function(x,w){return vr(x)&&Br(x.value)==="string"?m(n(x.value).toString(),w.toString(),1):m(x.toTex(),w.toString(),1)},"Node, ConstantNode":function(x,w){if(Br(w.value)==="string")return m(x,n(w.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(x,w,S){return m(x.toString(),w.name,S.value)},"string, string, number":function(x,w,S){var k;return S===1?k="{d\\over d"+w+"}":k="{d^{"+S+"}\\over d"+w+"^{"+S+"}}",k+"\\left[".concat(x,"\\right]")}}),g=t("constTag",{"Object, ConstantNode, string":function(x,w){return x[w]=!0,!0},"Object, SymbolNode, string":function(x,w,S){return w.name!==S?(x[w]=!0,!0):!1},"Object, ParenthesisNode, string":function(x,w,S){return g(x,w.content,S)},"Object, FunctionAssignmentNode, string":function(x,w,S){return w.params.indexOf(S)===-1?(x[w]=!0,!0):g(x,w.expr,S)},"Object, FunctionNode | OperatorNode, string":function(x,w,S){if(w.args.length>0){for(var k=g(x,w.args[0],S),M=1;M0){var k=x.args.filter(function(q){return w[q]===void 0}),M=k.length===1?k[0]:new c("*","multiply",k),O=S.concat(A(M,w));return new c("*","multiply",O)}return new c("+","add",x.args.map(function(q){return new c("*","multiply",x.args.map(function(B){return B===q?A(B,w):B.clone()}))}))}if(x.op==="/"&&x.isBinary()){var C=x.args[0],T=x.args[1];return w[T]!==void 0?new c("/","divide",[A(C,w),T]):w[C]!==void 0?new c("*","multiply",[new c("-","unaryMinus",[C]),new c("/","divide",[A(T,w),new c("^","pow",[T.clone(),b(2)])])]):new c("/","divide",[new c("-","subtract",[new c("*","multiply",[A(C,w),T.clone()]),new c("*","multiply",[C.clone(),A(T,w)])]),new c("^","pow",[T.clone(),b(2)])])}if(x.op==="^"&&x.isBinary()){var D=x.args[0],P=x.args[1];if(w[D]!==void 0)return vr(D)&&(o(D.value)||a(D.value,1))?b(0):new c("*","multiply",[x,new c("*","multiply",[new u("log",[D.clone()]),A(P.clone(),w)])]);if(w[P]!==void 0){if(vr(P)){if(o(P.value))return b(0);if(a(P.value,1))return A(D,w)}var R=new c("^","pow",[D.clone(),new c("-","subtract",[P,b(1)])]);return new c("*","multiply",[P.clone(),new c("*","multiply",[A(D,w),R])])}return new c("*","multiply",[new c("^","pow",[D.clone(),P.clone()]),new c("+","add",[new c("*","multiply",[A(D,w),new c("/","divide",[P.clone(),D.clone()])]),new c("*","multiply",[A(P,w),new u("log",[D.clone()])])])])}throw new Error('Cannot process operator "'+x.op+'" in derivative: the operator is not supported, undefined, or the number of arguments passed to it are not supported')}});function b(v,x){return new l(s(v,x||r.number))}return h});var Age="rationalize",vWe=["config","typed","equal","isZero","add","subtract","multiply","divide","pow","parse","simplifyConstant","simplifyCore","simplify","?bignumber","?fraction","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","SymbolNode","ParenthesisNode"],cP=G(Age,vWe,e=>{var{config:t,typed:r,equal:n,isZero:i,add:a,subtract:o,multiply:s,divide:l,pow:u,parse:c,simplifyConstant:f,simplifyCore:d,simplify:p,fraction:h,bignumber:m,mathWithTransform:g,matrix:A,AccessorNode:b,ArrayNode:v,ConstantNode:x,FunctionNode:w,IndexNode:S,ObjectNode:k,OperatorNode:M,SymbolNode:O,ParenthesisNode:C}=e;function T(B){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,_=P(),X=D(B,N,!0,_.firstRules),oe=X.variables.length,re={exactFractions:!1},Q={exactFractions:!0};if(B=X.expression,oe>=1){B=R(B);var he,Ie,xe=!0,Oe=!1;B=p(B,_.firstRules,{},re);for(var Re;Ie=xe?_.distrDivRules:_.sucDivRules,B=p(B,Ie,{},Q),xe=!xe,Re=B.toString(),Re!==he;)Oe=!0,he=Re;Oe&&(B=p(B,_.firstRulesAgain,{},re)),B=p(B,_.finalRules,{},re)}var _e=[],we={};return B.type==="OperatorNode"&&B.isBinary()&&B.op==="/"?(oe===1&&(B.args[0]=q(B.args[0],_e),B.args[1]=q(B.args[1])),W&&(we.numerator=B.args[0],we.denominator=B.args[1])):(oe===1&&(B=q(B,_e)),W&&(we.numerator=B,we.denominator=null)),W?(we.coefficients=_e,we.variables=X.variables,we.expression=B,we):B}return r(Age,{Node:T,"Node, boolean":(B,N)=>T(B,{},N),"Node, Object":T,"Node, Object, boolean":T});function D(B,N,W,_){var X=[],oe=p(B,_,N,{exactFractions:!1});W=!!W;var re="+-*"+(W?"/":"");he(oe);var Q={};return Q.expression=oe,Q.variables=X,Q;function he(Ie){var xe=Ie.type;if(xe==="FunctionNode")throw new Error("There is an unsolved function call");if(xe==="OperatorNode")if(Ie.op==="^"){if(Ie.args[1].type!=="ConstantNode"||!xt(parseFloat(Ie.args[1].value)))throw new Error("There is a non-integer exponent");he(Ie.args[0])}else{if(re.indexOf(Ie.op)===-1)throw new Error("Operator "+Ie.op+" invalid in polynomial expression");for(var Oe=0;Oe1;if(_==="OperatorNode"&&B.isBinary()){var oe=!1,re;if(B.op==="^"&&(B.args[0].type==="ParenthesisNode"||B.args[0].type==="OperatorNode")&&B.args[1].type==="ConstantNode"&&(re=parseFloat(B.args[1].value),oe=re>=2&&xt(re)),oe){if(re>2){var Q=B.args[0],he=new M("^","pow",[B.args[0].cloneDeep(),new x(re-1)]);B=new M("*","multiply",[Q,he])}else B=new M("*","multiply",[B.args[0],B.args[0].cloneDeep()]);X&&(W==="content"?N.content=B:N.args[W]=B)}}if(_==="ParenthesisNode")R(B.content,B,"content");else if(_!=="ConstantNode"&&_!=="SymbolNode")for(var Ie=0;Ie=0;Q--)if(N[Q]!==0){var he=new x(oe?N[Q]:Math.abs(N[Q])),Ie=N[Q]<0?"-":"+";if(Q>0){var xe=new O(X);if(Q>1){var Oe=new x(Q);xe=new M("^","pow",[xe,Oe])}N[Q]===-1&&oe?he=new M("-","unaryMinus",[xe]):Math.abs(N[Q])===1?he=xe:he=new M("*","multiply",[he,xe])}oe?re=he:Ie==="+"?re=new M("+","add",[re,he]):re=new M("-","subtract",[re,he]),oe=!1}if(oe)return new x(0);return re;function Re(_e,we,se){var L=_e.type;if(L==="FunctionNode")throw new Error("There is an unsolved function call");if(L==="OperatorNode"){if("+-*^".indexOf(_e.op)===-1)throw new Error("Operator "+_e.op+" invalid");if(we!==null){if((_e.fn==="unaryMinus"||_e.fn==="pow")&&we.fn!=="add"&&we.fn!=="subtract"&&we.fn!=="multiply")throw new Error("Invalid "+_e.op+" placing");if((_e.fn==="subtract"||_e.fn==="add"||_e.fn==="multiply")&&we.fn!=="add"&&we.fn!=="subtract")throw new Error("Invalid "+_e.op+" placing");if((_e.fn==="subtract"||_e.fn==="add"||_e.fn==="unaryMinus")&&se.noFil!==0)throw new Error("Invalid "+_e.op+" placing")}(_e.op==="^"||_e.op==="*")&&(se.fire=_e.op);for(var ue=0;ue<_e.args.length;ue++)_e.fn==="unaryMinus"&&(se.oper="-"),(_e.op==="+"||_e.fn==="subtract")&&(se.fire="",se.cte=1,se.oper=ue===0?"+":_e.op),se.noFil=ue,Re(_e.args[ue],_e,se)}else if(L==="SymbolNode"){if(_e.name!==X&&X!=="")throw new Error("There is more than one variable");if(X=_e.name,we===null){N[1]=1;return}if(we.op==="^"&&se.noFil!==0)throw new Error("In power the variable should be the first parameter");if(we.op==="*"&&se.noFil!==1)throw new Error("In multiply the variable should be the second parameter");(se.fire===""||se.fire==="*")&&(_<1&&(N[1]=0),N[1]+=se.cte*(se.oper==="+"?1:-1),_=Math.max(1,_))}else if(L==="ConstantNode"){var ce=parseFloat(_e.value);if(we===null){N[0]=ce;return}if(we.op==="^"){if(se.noFil!==1)throw new Error("Constant cannot be powered");if(!xt(ce)||ce<=0)throw new Error("Non-integer exponent is not allowed");for(var U=_+1;U_&&(N[ce]=0),N[ce]+=se.cte*(se.oper==="+"?1:-1),_=Math.max(ce,_);return}se.cte=ce,se.fire===""&&(N[0]+=se.cte*(se.oper==="+"?1:-1))}else throw new Error("Type "+L+" is not allowed")}}});var gge="zpk2tf",yWe=["typed","add","multiply","Complex","number"],fP=G(gge,yWe,e=>{var{typed:t,add:r,multiply:n,Complex:i,number:a}=e;return t(gge,{"Array,Array,number":function(u,c,f){return o(u,c,f)},"Array,Array":function(u,c){return o(u,c,1)},"Matrix,Matrix,number":function(u,c,f){return o(u.valueOf(),c.valueOf(),f)},"Matrix,Matrix":function(u,c){return o(u.valueOf(),c.valueOf(),1)}});function o(l,u,c){l.some(b=>b.type==="BigNumber")&&(l=l.map(b=>a(b))),u.some(b=>b.type==="BigNumber")&&(u=u.map(b=>a(b)));for(var f=[i(1,0)],d=[i(1,0)],p=0;p=0&&f-d{var{typed:t,add:r,multiply:n,Complex:i,divide:a,matrix:o}=e;return t(vge,{"Array, Array":function(c,f){var d=l(512);return s(c,f,d)},"Array, Array, Array":function(c,f,d){return s(c,f,d)},"Array, Array, number":function(c,f,d){if(d<0)throw new Error("w must be a positive number");var p=l(d);return s(c,f,p)},"Matrix, Matrix":function(c,f){var d=l(512),{w:p,h}=s(c.valueOf(),f.valueOf(),d);return{w:o(p),h:o(h)}},"Matrix, Matrix, Matrix":function(c,f,d){var{h:p}=s(c.valueOf(),f.valueOf(),d.valueOf());return{h:o(p),w:o(d)}},"Matrix, Matrix, number":function(c,f,d){if(d<0)throw new Error("w must be a positive number");var p=l(d),{h}=s(c.valueOf(),f.valueOf(),p);return{h:o(h),w:o(p)}}});function s(u,c,f){for(var d=[],p=[],h=0;h{var{classes:t}=e;return function(n,i){var a=t[i&&i.mathjs];return a&&typeof a.fromJSON=="function"?a.fromJSON(i):i}});var SWe="replacer",EWe=[],mP=G(SWe,EWe,()=>function(t,r){return typeof r=="number"&&(!isFinite(r)||isNaN(r))?{mathjs:"number",value:String(r)}:r});var yge="12.4.1";var hP=G("true",[],()=>!0),AP=G("false",[],()=>!1),gP=G("null",[],()=>null),vP=tf("Infinity",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(1/0):1/0}),yP=tf("NaN",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(NaN):NaN}),bP=tf("pi",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?x6(r):ele}),xP=tf("tau",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?wce(r):tle}),wP=tf("e",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?bce(r):rle}),SP=tf("phi",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?xce(r):nle}),EP=tf("LN2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(2).ln():Math.LN2}),kP=tf("LN10",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(10).ln():Math.LN10}),CP=tf("LOG2E",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(1).div(new r(2).ln()):Math.LOG2E}),DP=tf("LOG10E",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(1).div(new r(10).ln()):Math.LOG10E}),jP=tf("SQRT1_2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r("0.5").sqrt():Math.SQRT1_2}),OP=tf("SQRT2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(2).sqrt():Math.SQRT2}),MP=tf("i",["Complex"],e=>{var{Complex:t}=e;return t.I}),bge=G("PI",["pi"],e=>{var{pi:t}=e;return t}),xge=G("E",["e"],e=>{var{e:t}=e;return t}),NP=G("version",[],()=>yge);function tf(e,t,r){return G(e,t,r,{recreateOnConfigChange:!0})}var TP=Pr("speedOfLight","299792458","m s^-1"),FP=Pr("gravitationConstant","6.67430e-11","m^3 kg^-1 s^-2"),_P=Pr("planckConstant","6.62607015e-34","J s"),PP=Pr("reducedPlanckConstant","1.0545718176461565e-34","J s"),IP=Pr("magneticConstant","1.25663706212e-6","N A^-2"),BP=Pr("electricConstant","8.8541878128e-12","F m^-1"),RP=Pr("vacuumImpedance","376.730313667","ohm"),$P=Pr("coulomb","8.987551792261171e9","N m^2 C^-2"),qP=Pr("elementaryCharge","1.602176634e-19","C"),LP=Pr("bohrMagneton","9.2740100783e-24","J T^-1"),zP=Pr("conductanceQuantum","7.748091729863649e-5","S"),UP=Pr("inverseConductanceQuantum","12906.403729652257","ohm"),WP=Pr("magneticFluxQuantum","2.0678338484619295e-15","Wb"),VP=Pr("nuclearMagneton","5.0507837461e-27","J T^-1"),GP=Pr("klitzing","25812.807459304513","ohm");var HP=Pr("bohrRadius","5.29177210903e-11","m"),QP=Pr("classicalElectronRadius","2.8179403262e-15","m"),YP=Pr("electronMass","9.1093837015e-31","kg"),ZP=Pr("fermiCoupling","1.1663787e-5","GeV^-2"),XP=jI("fineStructure",.0072973525693),KP=Pr("hartreeEnergy","4.3597447222071e-18","J"),JP=Pr("protonMass","1.67262192369e-27","kg"),eI=Pr("deuteronMass","3.3435830926e-27","kg"),tI=Pr("neutronMass","1.6749271613e-27","kg"),rI=Pr("quantumOfCirculation","3.6369475516e-4","m^2 s^-1"),nI=Pr("rydberg","10973731.568160","m^-1"),iI=Pr("thomsonCrossSection","6.6524587321e-29","m^2"),aI=jI("weakMixingAngle",.2229),oI=jI("efimovFactor",22.7),sI=Pr("atomicMass","1.66053906660e-27","kg"),lI=Pr("avogadro","6.02214076e23","mol^-1"),uI=Pr("boltzmann","1.380649e-23","J K^-1"),cI=Pr("faraday","96485.33212331001","C mol^-1"),fI=Pr("firstRadiation","3.7417718521927573e-16","W m^2"),dI=Pr("loschmidt","2.686780111798444e25","m^-3"),pI=Pr("gasConstant","8.31446261815324","J K^-1 mol^-1"),mI=Pr("molarPlanckConstant","3.990312712893431e-10","J s mol^-1"),hI=Pr("molarVolume","0.022413969545014137","m^3 mol^-1"),AI=jI("sackurTetrode",-1.16487052358),gI=Pr("secondRadiation","0.014387768775039337","m K"),vI=Pr("stefanBoltzmann","5.67037441918443e-8","W m^-2 K^-4"),yI=Pr("wienDisplacement","2.897771955e-3","m K"),bI=Pr("molarMass","0.99999999965e-3","kg mol^-1"),xI=Pr("molarMassC12","11.9999999958e-3","kg mol^-1"),wI=Pr("gravity","9.80665","m s^-2"),SI=Pr("planckLength","1.616255e-35","m"),EI=Pr("planckMass","2.176435e-8","kg"),kI=Pr("planckTime","5.391245e-44","s"),CI=Pr("planckCharge","1.87554603778e-18","C"),DI=Pr("planckTemperature","1.416785e+32","K");function Pr(e,t,r){var n=["config","Unit","BigNumber"];return G(e,n,i=>{var{config:a,Unit:o,BigNumber:s}=i,l=a.number==="BigNumber"?new s(t):parseFloat(t),u=new o(l,r);return u.fixPrefix=!0,u})}function jI(e,t){var r=["config","BigNumber"];return G(e,r,n=>{var{config:i,BigNumber:a}=n;return i.number==="BigNumber"?new a(t):t})}var kWe="apply",CWe=["typed","isInteger"],OI=G(kWe,CWe,e=>{var{typed:t,isInteger:r}=e,n=w0({typed:t,isInteger:r});return t("apply",{"...any":function(a){var o=a[1];Gt(o)?a[1]=o-1:Ft(o)&&(a[1]=o.minus(1));try{return n.apply(null,a)}catch(s){throw Ai(s)}}})},{isTransformFunction:!0});var DWe="column",jWe=["typed","Index","matrix","range"],MI=G(DWe,jWe,e=>{var{typed:t,Index:r,matrix:n,range:i}=e,a=Nw({typed:t,Index:r,matrix:n,range:i});return t("column",{"...any":function(s){var l=s.length-1,u=s[l];Gt(u)&&(s[l]=u-1);try{return a.apply(null,s)}catch(c){throw Ai(c)}}})},{isTransformFunction:!0});function Jw(e,t,r){var n=e.filter(function(l){return Kn(l)&&!(l.name in t)&&!r.has(l.name)})[0];if(!n)throw new Error('No undefined variable found in inline expression "'+e+'"');var i=n.name,a=new Map,o=new gw(r,a,new Set([i])),s=e.compile();return function(u){return a.set(i,u),s.evaluate(o)}}var OWe="filter",MWe=["typed"],NI=G(OWe,MWe,e=>{var{typed:t}=e;function r(i,a,o){var s,l;return i[0]&&(s=i[0].compile().evaluate(o)),i[1]&&(Kn(i[1])||nd(i[1])?l=i[1].compile().evaluate(o):l=Jw(i[1],a,o)),n(s,l)}r.rawArgs=!0;var n=t("filter",{"Array, function":wge,"Matrix, function":function(a,o){return a.create(wge(a.toArray(),o))},"Array, RegExp":hw,"Matrix, RegExp":function(a,o){return a.create(hw(a.toArray(),o))}});return r},{isTransformFunction:!0});function wge(e,t){return qN(e,function(r,n,i){return sd(t,r,[n+1],i,"filter")})}var NWe="forEach",TWe=["typed"],TI=G(NWe,TWe,e=>{var{typed:t}=e;function r(i,a,o){var s,l;return i[0]&&(s=i[0].compile().evaluate(o)),i[1]&&(Kn(i[1])||nd(i[1])?l=i[1].compile().evaluate(o):l=Jw(i[1],a,o)),n(s,l)}r.rawArgs=!0;var n=t("forEach",{"Array | Matrix, function":function(a,o){var s=function l(u,c){if(Array.isArray(u))m0(u,function(f,d){l(f,c.concat(d+1))});else return sd(o,u,c,a,"forEach")};s(a.valueOf(),[])}});return r},{isTransformFunction:!0});var FWe="index",_We=["Index","getMatrixDataType"],FI=G(FWe,_We,e=>{var{Index:t,getMatrixDataType:r}=e;return function(){for(var i=[],a=0,o=arguments.length;a0?0:2;else if(s&&s.isSet===!0)s=s.map(function(u){return u-1});else if(Fr(s)||wt(s))r(s)!=="boolean"&&(s=s.map(function(u){return u-1}));else if(Gt(s))s--;else if(Ft(s))s=s.toNumber()-1;else if(typeof s!="string")throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");i[a]=s}var l=new t;return t.apply(l,i),l}},{isTransformFunction:!0});var PWe="map",IWe=["typed"],_I=G(PWe,IWe,e=>{var{typed:t}=e;function r(i,a,o){var s,l;return i[0]&&(s=i[0].compile().evaluate(o)),i[1]&&(Kn(i[1])||nd(i[1])?l=i[1].compile().evaluate(o):l=Jw(i[1],a,o)),n(s,l)}r.rawArgs=!0;var n=t("map",{"Array, function":function(a,o){return Sge(a,o,a)},"Matrix, function":function(a,o){return a.create(Sge(a.valueOf(),o,a))}});return r},{isTransformFunction:!0});function Sge(e,t,r){function n(i,a){return Array.isArray(i)?lc(i,function(o,s){return n(o,a.concat(s+1))}):sd(t,i,a,r,"map")}return n(e,[])}function Bl(e){if(e.length===2&&ha(e[0])){e=e.slice();var t=e[1];Gt(t)?e[1]=t-1:Ft(t)&&(e[1]=t.minus(1))}return e}var BWe="max",RWe=["typed","config","numeric","larger"],PI=G(BWe,RWe,e=>{var{typed:t,config:r,numeric:n,larger:i}=e,a=Uw({typed:t,config:r,numeric:n,larger:i});return t("max",{"...any":function(s){s=Bl(s);try{return a.apply(null,s)}catch(l){throw Ai(l)}}})},{isTransformFunction:!0});var $We="mean",qWe=["typed","add","divide"],II=G($We,qWe,e=>{var{typed:t,add:r,divide:n}=e,i=Qw({typed:t,add:r,divide:n});return t("mean",{"...any":function(o){o=Bl(o);try{return i.apply(null,o)}catch(s){throw Ai(s)}}})},{isTransformFunction:!0});var LWe="min",zWe=["typed","config","numeric","smaller"],BI=G(LWe,zWe,e=>{var{typed:t,config:r,numeric:n,smaller:i}=e,a=Ww({typed:t,config:r,numeric:n,smaller:i});return t("min",{"...any":function(s){s=Bl(s);try{return a.apply(null,s)}catch(l){throw Ai(l)}}})},{isTransformFunction:!0});var UWe="range",WWe=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq","add","isPositive"],RI=G(UWe,WWe,e=>{var{typed:t,config:r,matrix:n,bignumber:i,smaller:a,smallerEq:o,larger:s,largerEq:l,add:u,isPositive:c}=e,f=_w({typed:t,config:r,matrix:n,bignumber:i,smaller:a,smallerEq:o,larger:s,largerEq:l,add:u,isPositive:c});return t("range",{"...any":function(p){var h=p.length-1,m=p[h];return typeof m!="boolean"&&p.push(!0),f.apply(null,p)}})},{isTransformFunction:!0});var VWe="row",GWe=["typed","Index","matrix","range"],$I=G(VWe,GWe,e=>{var{typed:t,Index:r,matrix:n,range:i}=e,a=Pw({typed:t,Index:r,matrix:n,range:i});return t("row",{"...any":function(s){var l=s.length-1,u=s[l];Gt(u)&&(s[l]=u-1);try{return a.apply(null,s)}catch(c){throw Ai(c)}}})},{isTransformFunction:!0});var HWe="subset",QWe=["typed","matrix","zeros","add"],qI=G(HWe,QWe,e=>{var{typed:t,matrix:r,zeros:n,add:i}=e,a=Iw({typed:t,matrix:r,zeros:n,add:i});return t("subset",{"...any":function(s){try{return a.apply(null,s)}catch(l){throw Ai(l)}}})},{isTransformFunction:!0});var YWe="concat",ZWe=["typed","matrix","isInteger"],LI=G(YWe,ZWe,e=>{var{typed:t,matrix:r,isInteger:n}=e,i=Mw({typed:t,matrix:r,isInteger:n});return t("concat",{"...any":function(o){var s=o.length-1,l=o[s];Gt(l)?o[s]=l-1:Ft(l)&&(o[s]=l.minus(1));try{return i.apply(null,o)}catch(u){throw Ai(u)}}})},{isTransformFunction:!0});var Ege="diff",XWe=["typed","matrix","subtract","number","bignumber"],zI=G(Ege,XWe,e=>{var{typed:t,matrix:r,subtract:n,number:i,bignumber:a}=e,o=Tw({typed:t,matrix:r,subtract:n,number:i,bignumber:a});return t(Ege,{"...any":function(l){l=Bl(l);try{return o.apply(null,l)}catch(u){throw Ai(u)}}})},{isTransformFunction:!0});var KWe="std",JWe=["typed","map","sqrt","variance"],UI=G(KWe,JWe,e=>{var{typed:t,map:r,sqrt:n,variance:i}=e,a=Xw({typed:t,map:r,sqrt:n,variance:i});return t("std",{"...any":function(s){s=Bl(s);try{return a.apply(null,s)}catch(l){throw Ai(l)}}})},{isTransformFunction:!0});var kge="sum",eVe=["typed","config","add","numeric"],WI=G(kge,eVe,e=>{var{typed:t,config:r,add:n,numeric:i}=e,a=Gw({typed:t,config:r,add:n,numeric:i});return t(kge,{"...any":function(s){s=Bl(s);try{return a.apply(null,s)}catch(l){throw Ai(l)}}})},{isTransformFunction:!0});var tVe="quantileSeq",rVe=["typed","bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger"],VI=G(tVe,rVe,e=>{var{typed:t,bignumber:r,add:n,subtract:i,divide:a,multiply:o,partitionSelect:s,compare:l,isInteger:u,smaller:c,smallerEq:f,larger:d}=e,p=Zw({typed:t,bignumber:r,add:n,subtract:i,divide:a,multiply:o,partitionSelect:s,compare:l,isInteger:u,smaller:c,smallerEq:f,larger:d});return t("quantileSeq",{"Array | Matrix, number | BigNumber":p,"Array | Matrix, number | BigNumber, number":(m,g,A)=>p(m,g,h(A)),"Array | Matrix, number | BigNumber, boolean":p,"Array | Matrix, number | BigNumber, boolean, number":(m,g,A,b)=>p(m,g,A,h(b)),"Array | Matrix, Array | Matrix":p,"Array | Matrix, Array | Matrix, number":(m,g,A)=>p(m,g,h(A)),"Array | Matrix, Array | Matrix, boolean":p,"Array | Matrix, Array | Matrix, boolean, number":(m,g,A,b)=>p(m,g,A,h(b))});function h(m){return Bl([[],m])[1]}},{isTransformFunction:!0});var Cge="cumsum",nVe=["typed","add","unaryPlus"],GI=G(Cge,nVe,e=>{var{typed:t,add:r,unaryPlus:n}=e,i=Hw({typed:t,add:r,unaryPlus:n});return t(Cge,{"...any":function(o){if(o.length===2&&ha(o[0])){var s=o[1];Gt(s)?o[1]=s-1:Ft(s)&&(o[1]=s.minus(1))}try{return i.apply(null,o)}catch(l){throw Ai(l)}}})},{isTransformFunction:!0});var Dge="variance",iVe=["typed","add","subtract","multiply","divide","apply","isNaN"],HI=G(Dge,iVe,e=>{var{typed:t,add:r,subtract:n,multiply:i,divide:a,apply:o,isNaN:s}=e,l=Yw({typed:t,add:r,subtract:n,multiply:i,divide:a,apply:o,isNaN:s});return t(Dge,{"...any":function(c){c=Bl(c);try{return l.apply(null,c)}catch(f){throw Ai(f)}}})},{isTransformFunction:!0});var jge="print",aVe=["typed","matrix","zeros","add"],QI=G(jge,aVe,e=>{var{typed:t,matrix:r,zeros:n,add:i}=e,a=Rw({typed:t,matrix:r,zeros:n,add:i});return t(jge,{"string, Object | Array":function(l,u){return a(o(l),u)},"string, Object | Array, number | Object":function(l,u,c){return a(o(l),u,c)}});function o(s){return s.replace(GF,l=>{var u=l.slice(1).split("."),c=u.map(function(f){return!isNaN(f)&&f.length>0?parseInt(f)-1:f});return"$"+c.join(".")})}},{isTransformFunction:!0});var oVe="and",sVe=["typed","matrix","zeros","add","equalScalar","not","concat"],YI=G(oVe,sVe,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:i,not:a,concat:o}=e,s=zw({typed:t,matrix:r,equalScalar:n,zeros:i,not:a,concat:o});function l(u,c,f){var d=u[0].compile().evaluate(f);if(!ha(d)&&!s(d,!0))return!1;var p=u[1].compile().evaluate(f);return s(d,p)}return l.rawArgs=!0,l},{isTransformFunction:!0});var lVe="or",uVe=["typed","matrix","equalScalar","DenseMatrix","concat"],ZI=G(lVe,uVe,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:i,concat:a}=e,o=Ow({typed:t,matrix:r,equalScalar:n,DenseMatrix:i,concat:a});function s(l,u,c){var f=l[0].compile().evaluate(c);if(!ha(f)&&o(f,!1))return!0;var d=l[1].compile().evaluate(c);return o(f,d)}return s.rawArgs=!0,s},{isTransformFunction:!0});var cVe="bitAnd",fVe=["typed","matrix","zeros","add","equalScalar","not","concat"],XI=G(cVe,fVe,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:i,not:a,concat:o}=e,s=Dw({typed:t,matrix:r,equalScalar:n,zeros:i,not:a,concat:o});function l(u,c,f){var d=u[0].compile().evaluate(f);if(!ha(d)){if(isNaN(d))return NaN;if(d===0||d===!1)return 0}var p=u[1].compile().evaluate(f);return s(d,p)}return l.rawArgs=!0,l},{isTransformFunction:!0});var dVe="bitOr",pVe=["typed","matrix","equalScalar","DenseMatrix","concat"],KI=G(dVe,pVe,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:i,concat:a}=e,o=jw({typed:t,matrix:r,equalScalar:n,DenseMatrix:i,concat:a});function s(l,u,c){var f=l[0].compile().evaluate(c);if(!ha(f)){if(isNaN(f))return NaN;if(f===-1)return-1;if(f===!0)return 1}var d=l[1].compile().evaluate(c);return o(f,d)}return s.rawArgs=!0,s},{isTransformFunction:!0});var vt=KN({config:it}),gi=JN({}),yV=wP({BigNumber:vt,config:it}),Oge=AP({}),Mge=XP({BigNumber:vt,config:it}),k0=eT({}),bV=MP({Complex:gi}),Nge=vP({BigNumber:vt,config:it}),Tge=kP({BigNumber:vt,config:it}),Fge=DP({BigNumber:vt,config:it}),k6=rT({}),_ge=yP({BigNumber:vt,config:it}),Pge=gP({}),Ige=SP({BigNumber:vt,config:it}),Bge=tT({}),xV=WN({}),Rge=jP({BigNumber:vt,config:it}),$ge=AI({BigNumber:vt,config:it}),wV=xP({BigNumber:vt,config:it}),qge=hP({}),Lge=NP({}),Rr=iT({Matrix:k6}),zge=oI({BigNumber:vt,config:it}),Uge=EP({BigNumber:vt,config:it}),JI=bP({BigNumber:vt,config:it}),Wge=mP({}),Vge=OP({BigNumber:vt,config:it}),Ce=UN({BigNumber:vt,Complex:gi,DenseMatrix:Rr,Fraction:k0}),eB=TT({BigNumber:vt,config:it,typed:Ce}),Gge=aI({BigNumber:vt,config:it}),Rl=FT({typed:Ce}),Hge=q3({Complex:gi,config:it,typed:Ce}),Qge=z3({BigNumber:vt,typed:Ce}),Yge=W3({BigNumber:vt,Complex:gi,config:it,typed:Ce}),Oo=PT({typed:Ce}),Zge=sF({typed:Ce}),Xge=H3({BigNumber:vt,Complex:gi,config:it,typed:Ce}),Kge=Y3({typed:Ce}),SV=Z3({typed:Ce}),Jge=K3({Complex:gi,config:it,typed:Ce}),dc=ST({BigNumber:vt,typed:Ce}),e0e=aF({typed:Ce}),t0e=wT({typed:Ce}),r0e=aT({typed:Ce}),C6=L_({typed:Ce}),D6=ET({Complex:gi,typed:Ce}),C0=lF({typed:Ce}),tB=J3({typed:Ce}),n0e=t4({BigNumber:vt,typed:Ce}),i0e=n4({BigNumber:vt,typed:Ce}),a0e=$T({typed:Ce}),Qr=vT({config:it,typed:Ce}),o0e=RF({typed:Ce}),EV=qT({typed:Ce}),s0e=LT({Complex:gi,typed:Ce}),l0e=AF({typed:Ce}),u0e=vF({typed:Ce}),e2=zF({typed:Ce}),rB=yF({typed:Ce}),c0e=VF({format:e2,typed:Ce}),nB=uF({typed:Ce}),yu=lT({typed:Ce}),bA=cT({typed:Ce}),D0=pT({typed:Ce}),cd=mT({typed:Ce}),f0e=CP({BigNumber:vt,config:it}),d0e=W_({Complex:gi,typed:Ce}),p0e=VT({Complex:gi,config:it,typed:Ce}),kV=GT({Complex:gi,config:it,typed:Ce}),j0=wF({typed:Ce}),za=HT({typed:Ce}),j6=fF({typed:Ce}),Om=bT({typed:Ce}),m0e=WF({format:e2,typed:Ce}),h0e=Z_({config:it,typed:Ce}),A0e=Rw({typed:Ce}),g0e=X_({config:it,typed:Ce}),iB=cF({typed:Ce}),v0e=a4({BigNumber:vt,typed:Ce}),CV=ZT({BigNumber:vt,Fraction:k0,complex:D6,typed:Ce}),O6=s4({typed:Ce}),Mm=yT({Matrix:k6,equalScalar:Qr,typed:Ce}),y0e=MT({typed:Ce}),b0e=KT({typed:Ce}),x0e=xT({typed:Ce}),rf=IT({typed:Ce}),w0e=u4({typed:Ce}),DV=AT({typed:Ce}),S0e=L3({Complex:gi,config:it,typed:Ce}),E0e=V3({BigNumber:vt,typed:Ce}),aB=w0({isInteger:yu,typed:Ce}),k0e=G3({BigNumber:vt,Complex:gi,config:it,typed:Ce}),C0e=UF({format:e2,typed:Ce}),D0e=z_({typed:Ce}),j0e=e4({typed:Ce}),O0e=i4({BigNumber:vt,typed:Ce}),t2=hT({typed:Ce}),M0e=QF({typed:Ce}),N0e=K_({config:it,typed:Ce}),T0e=o4({BigNumber:vt,typed:Ce}),F0e=l4({typed:Ce}),_0e=R3({SparseMatrix:Mm,typed:Ce}),fd=XT({Complex:gi,config:it,typed:Ce}),P0e=c4({typed:Ce}),xp=NT({typed:Ce}),I0e=U3({BigNumber:vt,Complex:gi,config:it,typed:Ce}),B0e=r4({BigNumber:vt,typed:Ce}),ry=kT({Fraction:k0,typed:Ce}),O0=fT({typed:Ce}),gt=CT({DenseMatrix:Rr,Matrix:k6,SparseMatrix:Mm,typed:Ce}),R0e=DT({isZero:cd,matrix:gt,typed:Ce}),$0e=qF({isNaN:t2,isNumeric:O0,typed:Ce}),dd=YF({bignumber:dc,fraction:ry,number:Om}),jV=LF({config:it,multiplyScalar:za,numeric:dd,typed:Ce}),OV=CF({isInteger:yu,matrix:gt,typed:Ce}),Os=MF({matrix:gt,config:it,typed:Ce}),q0e=NF({matrix:gt,typed:Ce}),r2=TF({matrix:gt,typed:Ce}),MV=eF({BigNumber:vt,config:it,matrix:gt,typed:Ce}),Ms=_F({BigNumber:vt,config:it,matrix:gt,typed:Ce}),L0e=Q3({Complex:gi,config:it,typed:Ce}),NV=BT({BigNumber:vt,Complex:gi,Fraction:k0,config:it,isNegative:bA,matrix:gt,typed:Ce,unaryMinus:xp}),xn=Mw({isInteger:yu,matrix:gt,typed:Ce}),z0e=pF({prod:jV,size:Os,typed:Ce}),oB=FF({conj:C0,transpose:r2,typed:Ce}),TV=hF({DenseMatrix:Rr,SparseMatrix:Mm,matrix:gt,typed:Ce}),ga=ZF({numeric:dd,typed:Ce}),n2=n3({DenseMatrix:Rr,concat:xn,divideScalar:ga,equalScalar:Qr,matrix:gt,typed:Ce}),nf=A3({DenseMatrix:Rr,concat:xn,equalScalar:Qr,matrix:gt,typed:Ce}),i2=gF({matrix:gt,typed:Ce}),U0e=dT({isNumeric:O0,typed:Ce}),xA=bF({BigNumber:vt,DenseMatrix:Rr,SparseMatrix:Mm,config:it,matrix:gt,typed:Ce}),W0e=xF({matrix:gt,multiplyScalar:za,typed:Ce}),M6=k3({DenseMatrix:Rr,concat:xn,config:it,matrix:gt,typed:Ce}),V0e=l3({DenseMatrix:Rr,concat:xn,equalScalar:Qr,matrix:gt,typed:Ce,zeros:Ms}),FV=i3({DenseMatrix:Rr,divideScalar:ga,equalScalar:Qr,matrix:gt,multiplyScalar:za,subtractScalar:rf,typed:Ce}),sB=OT({flatten:i2,matrix:gt,size:Os,typed:Ce}),G0e=YT({BigNumber:vt,concat:xn,equalScalar:Qr,matrix:gt,typed:Ce}),H0e=SF({BigNumber:vt,config:it,matrix:gt,typed:Ce}),lB=h_({addScalar:Oo,complex:D6,conj:C0,divideScalar:ga,equal:nf,identity:xA,isZero:cd,matrix:gt,multiplyScalar:za,sign:CV,sqrt:fd,subtractScalar:rf,typed:Ce,unaryMinus:xp,zeros:Ms}),Q0e=DF({config:it,matrix:gt}),Y0e=u3({DenseMatrix:Rr,concat:xn,equalScalar:Qr,matrix:gt,typed:Ce,zeros:Ms}),ny=KF({BigNumber:vt,DenseMatrix:Rr,config:it,equalScalar:Qr,matrix:gt,typed:Ce,zeros:Ms}),$l=y3({DenseMatrix:Rr,concat:xn,config:it,matrix:gt,typed:Ce}),Ua=JT({DenseMatrix:Rr,concat:xn,equalScalar:Qr,matrix:gt,subtractScalar:rf,typed:Ce,unaryMinus:xp}),Z0e=HF({concat:xn,matrix:gt,typed:Ce}),X0e=j3({DenseMatrix:Rr,concat:xn,config:it,equalScalar:Qr,matrix:gt,typed:Ce}),uB=a3({DenseMatrix:Rr,divideScalar:ga,equalScalar:Qr,matrix:gt,multiplyScalar:za,subtractScalar:rf,typed:Ce}),K0e=dF({DenseMatrix:Rr,concat:xn,matrix:gt,typed:Ce}),an=x4({DenseMatrix:Rr,SparseMatrix:Mm,addScalar:Oo,concat:xn,equalScalar:Qr,matrix:gt,typed:Ce}),J0e=X3({BigNumber:vt,DenseMatrix:Rr,concat:xn,equalScalar:Qr,matrix:gt,typed:Ce}),eve=Dw({concat:xn,equalScalar:Qr,matrix:gt,typed:Ce}),tve=jw({DenseMatrix:Rr,concat:xn,equalScalar:Qr,matrix:gt,typed:Ce}),rve=oF({DenseMatrix:Rr,concat:xn,matrix:gt,typed:Ce}),nve=tP({addScalar:Oo,combinations:C6,divideScalar:ga,isInteger:yu,isNegative:bA,multiplyScalar:za,typed:Ce}),M0=d3({BigNumber:vt,DenseMatrix:Rr,Fraction:k0,concat:xn,config:it,equalScalar:Qr,matrix:gt,typed:Ce}),_V=m3({concat:xn,matrix:gt,typed:Ce}),ive=Hw({add:an,typed:Ce,unaryPlus:eB}),cB=C3({equal:nf,typed:Ce}),ave=Tw({matrix:gt,number:Om,subtract:Ua,typed:Ce}),ove=P_({abs:Rl,addScalar:Oo,deepEqual:cB,divideScalar:ga,multiplyScalar:za,sqrt:fd,subtractScalar:rf,typed:Ce}),N6=E4({addScalar:Oo,conj:C0,multiplyScalar:za,size:Os,typed:Ce}),sve=g3({compareText:_V,isZero:cd,typed:Ce}),PV=Sw({DenseMatrix:Rr,config:it,equalScalar:Qr,matrix:gt,round:ny,typed:Ce,zeros:Ms}),lve=UT({BigNumber:vt,DenseMatrix:Rr,concat:xn,config:it,equalScalar:Qr,matrix:gt,round:ny,typed:Ce,zeros:Ms}),uve=w4({abs:Rl,addScalar:Oo,divideScalar:ga,isPositive:D0,multiplyScalar:za,smaller:$l,sqrt:fd,typed:Ce}),IV=N3({DenseMatrix:Rr,smaller:$l}),ol=T3({ImmutableDenseMatrix:IV,getMatrixDataType:rB}),ql=S3({DenseMatrix:Rr,concat:xn,config:it,matrix:gt,typed:Ce}),fB=JF({Complex:gi,config:it,divideScalar:ga,typed:Ce}),cve=o3({DenseMatrix:Rr,divideScalar:ga,equalScalar:Qr,matrix:gt,multiplyScalar:za,subtractScalar:rf,typed:Ce}),fve=jT({flatten:i2,matrix:gt,size:Os,typed:Ce}),dve=Ww({config:it,numeric:dd,smaller:$l,typed:Ce}),BV=Ew({DenseMatrix:Rr,concat:xn,config:it,equalScalar:Qr,matrix:gt,round:ny,typed:Ce,zeros:Ms}),Jn=QT({addScalar:Oo,dot:N6,equalScalar:Qr,matrix:gt,multiplyScalar:za,typed:Ce}),pve=t3({Complex:gi,config:it,divideScalar:ga,typed:Ce}),mve=Ow({DenseMatrix:Rr,concat:xn,equalScalar:Qr,matrix:gt,typed:Ce}),T6=O3({compare:M0,isNaN:t2,isNumeric:O0,typed:Ce}),hve=c3({DenseMatrix:Rr,concat:xn,equalScalar:Qr,matrix:gt,typed:Ce,zeros:Ms}),RV=v_({SparseMatrix:Mm,abs:Rl,add:an,divideScalar:ga,larger:ql,largerEq:M6,multiply:Jn,subtract:Ua,transpose:r2,typed:Ce}),pc=Iw({add:an,matrix:gt,typed:Ce,zeros:Ms}),dB=Gw({add:an,config:it,numeric:dd,typed:Ce}),Ave=k4({add:an,matrix:gt,typed:Ce}),$V=s3({DenseMatrix:Rr,divideScalar:ga,equalScalar:Qr,matrix:gt,multiplyScalar:za,subtractScalar:rf,typed:Ce}),gve=fP({Complex:gi,add:an,multiply:Jn,number:Om,typed:Ce}),pB=RT({DenseMatrix:Rr,config:it,equalScalar:Qr,matrix:gt,round:ny,typed:Ce,zeros:Ms}),wp=p3({compare:M0,typed:Ce}),vve=rP({addScalar:Oo,combinations:C6,isInteger:yu,isNegative:bA,isPositive:D0,larger:ql,typed:Ce}),yve=mF({matrix:gt,multiply:Jn,subtract:Ua,typed:Ce}),qV=k_({divideScalar:ga,isZero:cd,matrix:gt,multiply:Jn,subtractScalar:rf,typed:Ce,unaryMinus:xp}),bve=nF({concat:xn,equalScalar:Qr,matrix:gt,multiplyScalar:za,typed:Ce}),LV=F3({larger:ql,smaller:$l}),zV=zT({Complex:gi,DenseMatrix:Rr,ceil:pB,equalScalar:Qr,floor:PV,matrix:gt,typed:Ce,zeros:Ms}),UV=C4({Index:ol,typed:Ce}),xve=I_({abs:Rl,add:an,addScalar:Oo,config:it,divideScalar:ga,equalScalar:Qr,flatten:i2,isNumeric:O0,isZero:cd,matrix:gt,multiply:Jn,multiplyScalar:za,smaller:$l,subtract:Ua,typed:Ce}),wve=tF({BigNumber:vt,add:an,config:it,equal:nf,isInteger:yu,mod:BV,smaller:$l,typed:Ce,xgcd:MV}),Sve=WT({concat:xn,equalScalar:Qr,matrix:gt,typed:Ce}),Eve=e3({Complex:gi,config:it,divideScalar:ga,log:fB,typed:Ce}),mB=Uw({config:it,larger:ql,numeric:dd,typed:Ce}),kve=f4({DenseMatrix:Rr,Index:ol,compareNatural:wp,size:Os,subset:pc,typed:Ce}),Cve=p4({DenseMatrix:Rr,Index:ol,compareNatural:wp,size:Os,subset:pc,typed:Ce}),Dve=h4({Index:ol,compareNatural:wp,size:Os,subset:pc,typed:Ce}),jve=g4({Index:ol,compareNatural:wp,size:Os,subset:pc,typed:Ce}),iy=x3({DenseMatrix:Rr,concat:xn,config:it,matrix:gt,typed:Ce}),Ove=M3({compare:M0,compareNatural:wp,matrix:gt,typed:Ce}),Mve=zw({concat:xn,equalScalar:Qr,matrix:gt,not:j6,typed:Ce,zeros:Ms}),ay=_w({bignumber:dc,matrix:gt,add:an,config:it,isPositive:D0,larger:ql,largerEq:M6,smaller:$l,smallerEq:iy,typed:Ce}),Nve=Pw({Index:ol,matrix:gt,range:ay,typed:Ce}),WV=d4({DenseMatrix:Rr,Index:ol,compareNatural:wp,size:Os,subset:pc,typed:Ce}),Tve=A4({Index:ol,compareNatural:wp,size:Os,subset:pc,typed:Ce}),VV=y4({Index:ol,concat:xn,setDifference:WV,size:Os,subset:pc,typed:Ce}),GV=_3({FibonacciHeap:LV,addScalar:Oo,equalScalar:Qr}),HV=Nw({Index:ol,matrix:gt,range:ay,typed:Ce}),N0=C_({abs:Rl,addScalar:Oo,det:qV,divideScalar:ga,identity:xA,matrix:gt,multiply:Jn,typed:Ce,unaryMinus:xp}),QV=m_({DenseMatrix:Rr,Spa:GV,SparseMatrix:Mm,abs:Rl,addScalar:Oo,divideScalar:ga,equalScalar:Qr,larger:ql,matrix:gt,multiplyScalar:za,subtractScalar:rf,typed:Ce,unaryMinus:xp}),Fve=D_({Complex:gi,add:an,ctranspose:oB,deepEqual:cB,divideScalar:ga,dot:N6,dotDivide:n2,equal:nf,inv:N0,matrix:gt,multiply:Jn,typed:Ce}),af=XF({Complex:gi,config:it,fraction:ry,identity:xA,inv:N0,matrix:gt,multiply:Jn,number:Om,typed:Ce}),YV=m4({DenseMatrix:Rr,Index:ol,compareNatural:wp,size:Os,subset:pc,typed:Ce}),_ve=b4({Index:ol,concat:xn,setIntersect:YV,setSymDifference:VV,size:Os,subset:pc,typed:Ce}),Pve=M_({abs:Rl,add:an,identity:xA,inv:N0,map:j0,max:mB,multiply:Jn,size:Os,sqrt:fd,subtract:Ua,typed:Ce}),br=I3({BigNumber:vt,Complex:gi,Fraction:k0,abs:Rl,addScalar:Oo,config:it,divideScalar:ga,equal:nf,fix:zV,format:e2,isNumeric:O0,multiplyScalar:za,number:Om,pow:af,round:ny,subtractScalar:rf}),Ive=RP({BigNumber:vt,Unit:br,config:it}),Bve=yI({BigNumber:vt,Unit:br,config:it}),Rve=sI({BigNumber:vt,Unit:br,config:it}),$ve=LP({BigNumber:vt,Unit:br,config:it}),qve=uI({BigNumber:vt,Unit:br,config:it}),Lve=zP({BigNumber:vt,Unit:br,config:it}),zve=$P({BigNumber:vt,Unit:br,config:it}),Uve=eI({BigNumber:vt,Unit:br,config:it}),Wve=r3({DenseMatrix:Rr,concat:xn,equalScalar:Qr,matrix:gt,pow:af,typed:Ce}),Vve=BP({BigNumber:vt,Unit:br,config:it}),Gve=qP({BigNumber:vt,Unit:br,config:it}),Hve=O_({abs:Rl,add:an,identity:xA,inv:N0,multiply:Jn,typed:Ce}),Qve=cI({BigNumber:vt,Unit:br,config:it}),ZV=PF({addScalar:Oo,ceil:pB,conj:C0,divideScalar:ga,dotDivide:n2,exp:EV,i:bV,log2:kV,matrix:gt,multiplyScalar:za,pow:af,tau:wV,typed:Ce}),hB=U_({BigNumber:vt,Complex:gi,config:it,multiplyScalar:za,pow:af,typed:Ce}),Yve=FP({BigNumber:vt,Unit:br,config:it}),Zve=KP({BigNumber:vt,Unit:br,config:it}),Xve=IF({conj:C0,dotDivide:n2,fft:ZV,typed:Ce}),Kve=GP({BigNumber:vt,Unit:br,config:it}),Jve=dI({BigNumber:vt,Unit:br,config:it}),e1e=IP({BigNumber:vt,Unit:br,config:it}),t1e=bI({BigNumber:vt,Unit:br,config:it}),r1e=mI({BigNumber:vt,Unit:br,config:it}),n1e=tI({BigNumber:vt,Unit:br,config:it}),i1e=VP({BigNumber:vt,Unit:br,config:it}),a1e=CI({BigNumber:vt,Unit:br,config:it}),o1e=SI({BigNumber:vt,Unit:br,config:it}),s1e=DI({BigNumber:vt,Unit:br,config:it}),l1e=JP({BigNumber:vt,Unit:br,config:it}),u1e=rI({BigNumber:vt,Unit:br,config:it}),c1e=PP({BigNumber:vt,Unit:br,config:it}),f1e=nI({BigNumber:vt,Unit:br,config:it}),d1e=gI({BigNumber:vt,Unit:br,config:it}),p1e=TP({BigNumber:vt,Unit:br,config:it}),m1e=vI({BigNumber:vt,Unit:br,config:it}),h1e=iI({BigNumber:vt,Unit:br,config:it}),A1e=lI({BigNumber:vt,Unit:br,config:it}),g1e=HP({BigNumber:vt,Unit:br,config:it}),v1e=$3({Unit:br,typed:Ce}),es=__({divideScalar:ga,equalScalar:Qr,inv:N0,matrix:gt,multiply:Jn,typed:Ce}),y1e=YP({BigNumber:vt,Unit:br,config:it}),a2=V_({gamma:hB,typed:Ce}),b1e=fI({BigNumber:vt,Unit:br,config:it}),x1e=wI({BigNumber:vt,Unit:br,config:it}),w1e=UP({BigNumber:vt,Unit:br,config:it}),XV=y_({DenseMatrix:Rr,lsolve:FV,lup:QV,matrix:gt,slu:RV,typed:Ce,usolve:uB}),S1e=WP({BigNumber:vt,Unit:br,config:it}),E1e=xI({BigNumber:vt,Unit:br,config:it}),k1e=H_({add:an,divide:es,factorial:a2,isInteger:yu,isPositive:D0,multiply:Jn,typed:Ce}),C1e=Q_({factorial:a2,typed:Ce}),D1e=EI({BigNumber:vt,Unit:br,config:it}),j1e=b_({add:an,cbrt:NV,divide:es,equalScalar:Qr,im:nB,isZero:cd,multiply:Jn,re:iB,sqrt:fd,subtract:Ua,typeOf:DV,typed:Ce,unaryMinus:xp}),O1e=v4({compareNatural:wp,typed:Ce}),M1e=BF({abs:Rl,add:an,bignumber:dc,divide:es,isNegative:bA,isPositive:D0,larger:ql,map:j0,matrix:gt,max:mB,multiply:Jn,smaller:$l,subtract:Ua,typed:Ce,unaryMinus:xp}),KV=J_({bignumber:dc,addScalar:Oo,combinations:C6,divideScalar:ga,factorial:a2,isInteger:yu,isNegative:bA,larger:ql,multiplyScalar:za,number:Om,pow:af,subtractScalar:rf,typed:Ce}),N1e=B3({Unit:br,typed:Ce}),T1e=eP({addScalar:Oo,isInteger:yu,isNegative:bA,stirlingS2:KV,typed:Ce}),JV=j_({abs:Rl,add:an,addScalar:Oo,atan:SV,bignumber:dc,column:HV,complex:D6,config:it,cos:tB,diag:TV,divideScalar:ga,dot:N6,equal:nf,flatten:i2,im:nB,inv:N0,larger:ql,matrix:gt,matrixFromColumns:sB,multiply:Jn,multiplyScalar:za,number:Om,qr:lB,re:iB,reshape:OV,sin:O6,size:Os,smaller:$l,sqrt:fd,subtract:Ua,typed:Ce,usolve:uB,usolveAll:$V}),F1e=ZP({BigNumber:vt,Unit:br,config:it}),_1e=pI({BigNumber:vt,Unit:br,config:it}),P1e=G_({divide:es,dotDivide:n2,isNumeric:O0,log:fB,map:j0,matrix:gt,multiply:Jn,sum:dB,typed:Ce}),eG=Qw({add:an,divide:es,typed:Ce}),I1e=hI({BigNumber:vt,Unit:br,config:it}),B1e=_P({BigNumber:vt,Unit:br,config:it}),R1e=Zw({bignumber:dc,add:an,compare:M0,divide:es,isInteger:yu,larger:ql,multiply:Jn,partitionSelect:T6,smaller:$l,smallerEq:iy,subtract:Ua,typed:Ce}),AB=Yw({add:an,apply:aB,divide:es,isNaN:t2,multiply:Jn,subtract:Ua,typed:Ce}),$1e=QP({BigNumber:vt,Unit:br,config:it}),F6=R_({add:an,compare:M0,divide:es,partitionSelect:T6,typed:Ce}),q1e=q_({add:an,divide:es,matrix:gt,mean:eG,multiply:Jn,pow:af,sqrt:fd,subtract:Ua,sum:dB,typed:Ce}),L1e=dP({Complex:gi,add:an,divide:es,matrix:gt,multiply:Jn,typed:Ce}),z1e=$_({abs:Rl,map:j0,median:F6,subtract:Ua,typed:Ce}),U1e=Xw({map:j0,sqrt:fd,typed:Ce,variance:AB}),W1e=$F({BigNumber:vt,Complex:gi,add:an,config:it,divide:es,equal:nf,factorial:a2,gamma:hB,isNegative:bA,multiply:Jn,pi:JI,pow:af,sin:O6,smallerEq:iy,subtract:Ua,typed:Ce}),gB=S4({abs:Rl,add:an,conj:C0,ctranspose:oB,eigs:JV,equalScalar:Qr,larger:ql,matrix:gt,multiply:Jn,pow:af,smaller:$l,sqrt:fd,typed:Ce}),tG=OF({BigNumber:vt,DenseMatrix:Rr,SparseMatrix:Mm,addScalar:Oo,config:it,cos:tB,matrix:gt,multiplyScalar:za,norm:gB,sin:O6,typed:Ce,unaryMinus:xp}),V1e=kI({BigNumber:vt,Unit:br,config:it}),rG=T_({identity:xA,matrix:gt,multiply:Jn,norm:gB,qr:lB,subtract:Ua,typed:Ce}),G1e=jF({multiply:Jn,rotationMatrix:tG,typed:Ce}),nG=N_({abs:Rl,add:an,concat:xn,identity:xA,index:UV,lusolve:XV,matrix:gt,matrixFromColumns:sB,multiply:Jn,range:ay,schur:rG,subset:pc,subtract:Ua,transpose:r2,typed:Ce}),H1e=F_({matrix:gt,multiply:Jn,sylvester:nG,transpose:r2,typed:Ce});var o2={},s2={},Q1e={},Ll=j4({mathWithTransform:s2}),l2=X4({Node:Ll}),wA=J4({Node:Ll}),oy=t_({Node:Ll}),Y1e=a_({Node:Ll}),u2=F4({Node:Ll}),Z1e=$4({Node:Ll,ResultSet:xV}),X1e=L4({Node:Ll}),T0=V4({Node:Ll}),K1e=n_({Node:Ll}),mVe=pP({classes:Q1e}),iG=w_({math:o2,typed:Ce}),J1e=H4({Node:Ll,typed:Ce}),hVe=E_({Chain:iG,typed:Ce}),c2=Y4({Node:Ll,size:Os}),f2=N4({Node:Ll,subset:pc}),eye=B4({matrix:gt,Node:Ll,subset:pc}),F0=o_({Unit:br,Node:Ll,math:o2}),_0=l_({Node:Ll,SymbolNode:F0,math:o2}),pd=u_({AccessorNode:f2,ArrayNode:u2,AssignmentNode:eye,BlockNode:Z1e,ConditionalNode:X1e,ConstantNode:T0,FunctionAssignmentNode:J1e,FunctionNode:_0,IndexNode:c2,ObjectNode:l2,OperatorNode:wA,ParenthesisNode:oy,RangeNode:K1e,RelationalNode:Y1e,SymbolNode:F0,config:it,numeric:dd,typed:Ce}),tye=sP({ConstantNode:T0,FunctionNode:_0,OperatorNode:wA,ParenthesisNode:oy,parse:pd,typed:Ce}),aG=aP({bignumber:dc,fraction:ry,AccessorNode:f2,ArrayNode:u2,ConstantNode:T0,FunctionNode:_0,IndexNode:c2,ObjectNode:l2,OperatorNode:wA,SymbolNode:F0,config:it,mathWithTransform:s2,matrix:gt,typed:Ce}),AVe=c_({parse:pd,typed:Ce}),oG=oP({AccessorNode:f2,ArrayNode:u2,ConstantNode:T0,FunctionNode:_0,IndexNode:c2,ObjectNode:l2,OperatorNode:wA,ParenthesisNode:oy,SymbolNode:F0,add:an,divide:es,equal:nf,isZero:cd,multiply:Jn,parse:pd,pow:af,subtract:Ua,typed:Ce}),sG=f_({parse:pd,typed:Ce}),rye=x_({evaluate:sG}),nye=d_({evaluate:sG}),vB=iP({bignumber:dc,fraction:ry,AccessorNode:f2,ArrayNode:u2,ConstantNode:T0,FunctionNode:_0,IndexNode:c2,ObjectNode:l2,OperatorNode:wA,ParenthesisNode:oy,SymbolNode:F0,add:an,config:it,divide:es,equal:nf,isZero:cd,mathWithTransform:s2,matrix:gt,multiply:Jn,parse:pd,pow:af,resolve:tye,simplifyConstant:aG,simplifyCore:oG,subtract:Ua,typed:Ce}),gVe=lP({OperatorNode:wA,parse:pd,simplify:vB,typed:Ce}),vVe=nP({parse:pd,typed:Ce}),yVe=p_({Parser:nye,typed:Ce}),bVe=cP({bignumber:dc,fraction:ry,AccessorNode:f2,ArrayNode:u2,ConstantNode:T0,FunctionNode:_0,IndexNode:c2,ObjectNode:l2,OperatorNode:wA,ParenthesisNode:oy,SymbolNode:F0,add:an,config:it,divide:es,equal:nf,isZero:cd,mathWithTransform:s2,matrix:gt,multiply:Jn,parse:pd,pow:af,simplify:vB,simplifyConstant:aG,simplifyCore:oG,subtract:Ua,typed:Ce}),xVe=uP({ConstantNode:T0,FunctionNode:_0,OperatorNode:wA,ParenthesisNode:oy,SymbolNode:F0,config:it,equal:nf,isZero:cd,numeric:dd,parse:pd,simplify:vB,typed:Ce}),wVe=S_({Help:rye,mathWithTransform:s2,typed:Ce});Mn(o2,{e:yV,false:Oge,fineStructure:Mge,i:bV,Infinity:Nge,LN10:Tge,LOG10E:Fge,NaN:_ge,null:Pge,phi:Ige,SQRT1_2:Rge,sackurTetrode:$ge,tau:wV,true:qge,E:yV,version:Lge,efimovFactor:zge,LN2:Uge,pi:JI,replacer:Wge,reviver:mVe,SQRT2:Vge,typed:Ce,unaryPlus:eB,PI:JI,weakMixingAngle:Gge,abs:Rl,acos:Hge,acot:Qge,acsc:Yge,addScalar:Oo,arg:Zge,asech:Xge,asinh:Kge,atan:SV,atanh:Jge,bignumber:dc,bitNot:e0e,boolean:t0e,clone:r0e,combinations:C6,complex:D6,conj:C0,cos:tB,cot:n0e,csc:i0e,cube:a0e,equalScalar:Qr,erf:o0e,exp:EV,expm1:s0e,filter:l0e,forEach:u0e,format:e2,getMatrixDataType:rB,hex:c0e,im:nB,isInteger:yu,isNegative:bA,isPositive:D0,isZero:cd,LOG2E:f0e,lgamma:d0e,log10:p0e,log2:kV,map:j0,multiplyScalar:za,not:j6,number:Om,oct:m0e,pickRandom:h0e,print:A0e,random:g0e,re:iB,sec:v0e,sign:CV,sin:O6,splitUnit:y0e,square:b0e,string:x0e,subtractScalar:rf,tan:w0e,typeOf:DV,acosh:S0e,acsch:E0e,apply:aB,asec:k0e,bin:C0e,chain:hVe,combinationsWithRep:D0e,cosh:j0e,csch:O0e,isNaN:t2,isPrime:M0e,randomInt:N0e,sech:T0e,sinh:F0e,sparse:_0e,sqrt:fd,tanh:P0e,unaryMinus:xp,acoth:I0e,coth:B0e,fraction:ry,isNumeric:O0,matrix:gt,matrixFromFunction:R0e,mode:$0e,numeric:dd,prod:jV,reshape:OV,size:Os,squeeze:q0e,transpose:r2,xgcd:MV,zeros:Ms,asin:L0e,cbrt:NV,concat:xn,count:z0e,ctranspose:oB,diag:TV,divideScalar:ga,dotDivide:n2,equal:nf,flatten:i2,hasNumericValue:U0e,identity:xA,kron:W0e,largerEq:M6,leftShift:V0e,lsolve:FV,matrixFromColumns:sB,nthRoot:G0e,ones:H0e,qr:lB,resize:Q0e,rightArithShift:Y0e,round:ny,smaller:$l,subtract:Ua,to:Z0e,unequal:X0e,usolve:uB,xor:K0e,add:an,atan2:J0e,bitAnd:eve,bitOr:tve,bitXor:rve,catalan:nve,compare:M0,compareText:_V,cumsum:ive,deepEqual:cB,diff:ave,distance:ove,dot:N6,equalText:sve,floor:PV,gcd:lve,hypot:uve,larger:ql,log:fB,lsolveAll:cve,matrixFromRows:fve,min:dve,mod:BV,multiply:Jn,nthRoots:pve,or:mve,partitionSelect:T6,rightLogShift:hve,slu:RV,subset:pc,sum:dB,trace:Ave,usolveAll:$V,zpk2tf:gve,ceil:pB,compareNatural:wp,composition:vve,cross:yve,det:qV,dotMultiply:bve,fix:zV,index:UV,intersect:xve,invmod:wve,lcm:Sve,log1p:Eve,max:mB,setCartesian:kve,setDistinct:Cve,setIsSubset:Dve,setPowerset:jve,smallerEq:iy,sort:Ove,and:Mve,range:ay,row:Nve,setDifference:WV,setMultiplicity:Tve,setSymDifference:VV,column:HV,inv:N0,lup:QV,pinv:Fve,pow:af,setIntersect:YV,setUnion:_ve,sqrtm:Pve,vacuumImpedance:Ive,wienDisplacement:Bve,atomicMass:Rve,bohrMagneton:$ve,boltzmann:qve,conductanceQuantum:Lve,coulomb:zve,deuteronMass:Uve,dotPow:Wve,electricConstant:Vve,elementaryCharge:Gve,expm:Hve,faraday:Qve,fft:ZV,gamma:hB,gravitationConstant:Yve,hartreeEnergy:Zve,ifft:Xve,klitzing:Kve,loschmidt:Jve,magneticConstant:e1e,molarMass:t1e,molarPlanckConstant:r1e,neutronMass:n1e,nuclearMagneton:i1e,planckCharge:a1e,planckLength:o1e,planckTemperature:s1e,protonMass:l1e,quantumOfCirculation:u1e,reducedPlanckConstant:c1e,rydberg:f1e,secondRadiation:d1e,speedOfLight:p1e,stefanBoltzmann:m1e,thomsonCrossSection:h1e,avogadro:A1e,bohrRadius:g1e,createUnit:v1e,divide:es,electronMass:y1e,factorial:a2,firstRadiation:b1e,gravity:x1e,inverseConductanceQuantum:w1e,lusolve:XV,magneticFluxQuantum:S1e,molarMassC12:E1e,multinomial:k1e,parse:pd,permutations:C1e,planckMass:D1e,polynomialRoot:j1e,resolve:tye,setSize:O1e,simplifyConstant:aG,solveODE:M1e,stirlingS2:KV,unit:N1e,bellNumbers:T1e,compile:AVe,eigs:JV,fermiCoupling:F1e,gasConstant:_1e,kldivergence:P1e,mean:eG,molarVolume:I1e,planckConstant:B1e,quantileSeq:R1e,simplifyCore:oG,variance:AB,classicalElectronRadius:$1e,evaluate:sG,median:F6,simplify:vB,symbolicEqual:gVe,corr:q1e,freqz:L1e,leafCount:vVe,mad:z1e,parser:yVe,rationalize:bVe,std:U1e,zeta:W1e,derivative:xVe,norm:gB,rotationMatrix:tG,help:wVe,planckTime:V1e,schur:rG,rotate:G1e,sylvester:nG,lyap:H1e,config:it});Mn(s2,o2,{filter:NI({typed:Ce}),forEach:TI({typed:Ce}),map:_I({typed:Ce}),apply:OI({isInteger:yu,typed:Ce}),or:ZI({DenseMatrix:Rr,concat:xn,equalScalar:Qr,matrix:gt,typed:Ce}),and:YI({add:an,concat:xn,equalScalar:Qr,matrix:gt,not:j6,typed:Ce,zeros:Ms}),concat:LI({isInteger:yu,matrix:gt,typed:Ce}),max:PI({config:it,larger:ql,numeric:dd,typed:Ce}),print:QI({add:an,matrix:gt,typed:Ce,zeros:Ms}),bitAnd:XI({add:an,concat:xn,equalScalar:Qr,matrix:gt,not:j6,typed:Ce,zeros:Ms}),diff:zI({bignumber:dc,matrix:gt,number:Om,subtract:Ua,typed:Ce}),min:BI({config:it,numeric:dd,smaller:$l,typed:Ce}),subset:qI({add:an,matrix:gt,typed:Ce,zeros:Ms}),bitOr:KI({DenseMatrix:Rr,concat:xn,equalScalar:Qr,matrix:gt,typed:Ce}),cumsum:GI({add:an,typed:Ce,unaryPlus:eB}),index:FI({Index:ol,getMatrixDataType:rB}),sum:WI({add:an,config:it,numeric:dd,typed:Ce}),range:RI({bignumber:dc,matrix:gt,add:an,config:it,isPositive:D0,larger:ql,largerEq:M6,smaller:$l,smallerEq:iy,typed:Ce}),row:$I({Index:ol,matrix:gt,range:ay,typed:Ce}),column:MI({Index:ol,matrix:gt,range:ay,typed:Ce}),mean:II({add:an,divide:es,typed:Ce}),quantileSeq:VI({add:an,bignumber:dc,compare:M0,divide:es,isInteger:yu,larger:ql,multiply:Jn,partitionSelect:T6,smaller:$l,smallerEq:iy,subtract:Ua,typed:Ce}),variance:HI({add:an,apply:aB,divide:es,isNaN:t2,multiply:Jn,subtract:Ua,typed:Ce}),std:UI({map:j0,sqrt:fd,typed:Ce,variance:AB})});Mn(Q1e,{BigNumber:vt,Complex:gi,Fraction:k0,Matrix:k6,Node:Ll,ObjectNode:l2,OperatorNode:wA,ParenthesisNode:oy,Range:Bge,RelationalNode:Y1e,ResultSet:xV,ArrayNode:u2,BlockNode:Z1e,ConditionalNode:X1e,ConstantNode:T0,DenseMatrix:Rr,RangeNode:K1e,Chain:iG,FunctionAssignmentNode:J1e,SparseMatrix:Mm,IndexNode:c2,ImmutableDenseMatrix:IV,Index:ol,AccessorNode:f2,AssignmentNode:eye,FibonacciHeap:LV,Spa:GV,Unit:br,SymbolNode:F0,FunctionNode:_0,Help:rye,Parser:nye});iG.createProxy(o2);var lG=vV;var lye=ge(FN(),1);var aye=ge(iye(),1);function oye(e){var t=new aye.default;return e.on=t.on.bind(t),e.off=t.off.bind(t),e.once=t.once.bind(t),e.emit=t.emit.bind(t),e}function sye(e,t,r,n){function i(g,A){var b=arguments.length;if(b!==1&&b!==2)throw new ef("import",b,1,2);A||(A={});function v(k,M,O){if(Array.isArray(M))M.forEach(D=>v(k,D));else if(typeof M=="object")for(var C in M)St(M,C)&&v(k,M[C],C);else if(Q1(M)||O!==void 0){var T=Q1(M)?h(M)?M.fn+".transform":M.fn:O;if(St(k,T)&&k[T]!==M&&!A.silent)throw new Error('Cannot import "'+T+'" twice');k[T]=M}else if(!A.silent)throw new TypeError("Factory, Object, or Array expected")}var x={};v(x,g);for(var w in x)if(St(x,w)){var S=x[w];if(Q1(S))u(S,A);else if(c(S))a(w,S,A);else if(!A.silent)throw new TypeError("Factory, Object, or Array expected")}}function a(g,A,b){if(b.wrap&&typeof A=="function"&&(A=l(A)),f(A)&&(A=e(g,{[A.signature]:A})),e.isTypedFunction(r[g])&&e.isTypedFunction(A)){b.override?A=e(g,A.signatures):A=e(r[g],A),r[g]=A,delete n[g],o(g,A),r.emit("import",g,function(){return A});return}if(r[g]===void 0||b.override){r[g]=A,delete n[g],o(g,A),r.emit("import",g,function(){return A});return}if(!b.silent)throw new Error('Cannot import "'+g+'": already exists')}function o(g,A){A&&typeof A.transform=="function"?(r.expression.transform[g]=A.transform,d(g)&&(r.expression.mathWithTransform[g]=A.transform)):(delete r.expression.transform[g],d(g)&&(r.expression.mathWithTransform[g]=A))}function s(g){delete r.expression.transform[g],d(g)?r.expression.mathWithTransform[g]=r[g]:delete r.expression.mathWithTransform[g]}function l(g){var A=function(){for(var v=[],x=0,w=arguments.length;x2&&arguments[2]!==void 0?arguments[2]:g.fn;if(PU(b,"."))throw new Error("Factory name should not contain a nested path. Name: "+JSON.stringify(b));var v=h(g)?r.expression.transform:r,x=b in r.expression.transform,w=St(v,b)?v[b]:void 0,S=function(){var M={};g.dependencies.map(RU).forEach(C=>{if(PU(C,"."))throw new Error("Factory dependency should not contain a nested path. Name: "+JSON.stringify(C));C==="math"?M.math=r:C==="mathWithTransform"?M.mathWithTransform=r.expression.mathWithTransform:C==="classes"?M.classes=r:M[C]=r[C]});var O=g(M);if(O&&typeof O.transform=="function")throw new Error('Transforms cannot be attached to factory functions. Please create a separate function for it with exports.path="expression.transform"');if(w===void 0||A.override)return O;if(e.isTypedFunction(w)&&e.isTypedFunction(O))return e(w,O);if(A.silent)return w;throw new Error('Cannot import "'+b+'": already exists')};!g.meta||g.meta.lazy!==!1?(fw(v,b,S),w&&x?s(b):(h(g)||p(g))&&fw(r.expression.mathWithTransform,b,()=>v[b])):(v[b]=S(),w&&x?s(b):(h(g)||p(g))&&fw(r.expression.mathWithTransform,b,()=>v[b])),n[b]=g,r.emit("import",b,S)}function c(g){return typeof g=="function"||typeof g=="number"||typeof g=="string"||typeof g=="boolean"||g===null||ho(g)||Qo(g)||Ft(g)||Xc(g)||wt(g)||Array.isArray(g)}function f(g){return typeof g=="function"&&typeof g.signature=="string"}function d(g){return!St(m,g)}function p(g){return g.fn.indexOf(".")===-1&&!St(m,g.fn)&&(!g.meta||!g.meta.isClass)}function h(g){return g!==void 0&&g.meta!==void 0&&g.meta.isTransformFunction===!0||!1}var m={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return i}function yB(e,t){var r=Mn({},V1,t);if(typeof Object.create!="function")throw new Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var n=oye({isNumber:Gt,isComplex:Qo,isBigNumber:Ft,isFraction:Xc,isUnit:ho,isString:na,isArray:Fr,isMatrix:wt,isCollection:ha,isDenseMatrix:pA,isSparseMatrix:Kc,isRange:p0,isIndex:wm,isBoolean:vN,isResultSet:yN,isHelp:lw,isFunction:bN,isDate:xN,isRegExp:wN,isObject:Sm,isNull:SN,isUndefined:EN,isAccessorNode:vu,isArrayNode:Yo,isAssignmentNode:kN,isBlockNode:CN,isConditionalNode:DN,isConstantNode:vr,isFunctionAssignmentNode:nd,isFunctionNode:il,isIndexNode:sc,isNode:Dr,isObjectNode:Em,isOperatorNode:mi,isParenthesisNode:Zo,isRangeNode:jN,isRelationalNode:ON,isSymbolNode:Kn,isChain:uw});n.config=ese(r,n.emit),n.expression={transform:{},mathWithTransform:{config:n.config}};var i=[],a=[];function o(c){if(Q1(c))return c(n);var f=c[Object.keys(c)[0]];if(Q1(f))return f(n);if(!Xoe(c))throw console.warn("Factory object with properties `type`, `name`, and `factory` expected",c),new Error("Factory object with properties `type`, `name`, and `factory` expected");var d=i.indexOf(c),p;return d===-1?(c.math===!0?p=c.factory(n.type,r,o,n.typed,n):p=c.factory(n.type,r,o,n.typed),i.push(c),a.push(p)):p=a[d],p}var s={};function l(){for(var c=arguments.length,f=new Array(c),d=0;d{kU(s).forEach(c=>{c&&c.meta&&c.meta.recreateOnConfigChange&&u(c,{override:!0})})}),n.create=yB.bind(null,e),n.factory=G,n.import(kU(Yoe(e))),n.ArgumentsError=ef,n.DimensionError=rr,n.IndexError=Ko,n}var _6={prop:{name:"prop",fn:"prop",args:[{name:"property",types:["text"]}],returnType:"any",description:"Get the value of a property",category:"Property",difficulty:1},slice:{name:"slice",fn:"slice",args:[{name:"text",types:["text"]},{name:"start",types:["number"]},{name:"end",types:["number"]}],returnType:"text",description:"Get a part of a text",category:"String",difficulty:1},if:{name:"if",fn:"if",args:[{name:"condition",types:["boolean"]},{name:"ifTrue",types:["any"]},{name:"ifFalse",types:["any"]}],returnType:"any",description:"If condition is true return the first argument else return the second",category:"Logic",difficulty:2},ifs:{name:"ifs",fn:"ifs",args:[{name:"condition",types:["boolean"]},{name:"ifTrue",types:["any"]},{name:"...",types:[]},{name:"ifFalse",types:["any"]}],returnType:"any",description:"If the first condition is true return the first argument else check the next condition",category:"Logic",difficulty:2},empty:{name:"empty",fn:"empty",args:[{name:"value",types:["any"]}],returnType:"boolean",description:"Check if a list is empty",category:"String",difficulty:1},length:{name:"length",fn:"length",args:[{name:"list",types:["any-multi"]}],returnType:"number",description:"Get the length of a list",category:"List",difficulty:1},values:{name:"values",fn:"values",args:[{name:"list",types:["any-multi"]}],returnType:"number",description:"Get the number of values in a list",category:"List",difficulty:1},uniques:{name:"uniques",fn:"uniques",args:[{name:"list",types:["any-list"]}],returnType:"number",description:"Get the number of unique values in a list",category:"List",difficulty:1},substring:{name:"substring",fn:"substring",args:[{name:"string",types:["text"]},{name:"start",types:["number"]},{name:"end",types:["number"]}],returnType:"text",description:"Get a substring of a string",category:"String",difficulty:2},startsWith:{name:"startsWith",fn:"startsWith",args:[{name:"string",types:["text"]},{name:"substring",types:["text"]}],returnType:"boolean",description:"Check if a string starts with another string",category:"String",difficulty:1},contains:{name:"contains",fn:"contains",args:[{name:"string",types:["text"]},{name:"substring",types:["text"]}],returnType:"boolean",description:"Check if a string contains another string",category:"String",difficulty:1},test:{name:"test",fn:"test",args:[{name:"string",types:["text"]},{name:"regex",types:["text"]}],returnType:"boolean",description:"Test a string with a regex",category:"String",difficulty:3},match:{name:"match",fn:"match",args:[{name:"string",types:["text"]},{name:"regex",types:["text"]}],returnType:"boolean",description:"Match a string with a regex",category:"String",difficulty:3},replace:{name:"replace",fn:"replace",args:[{name:"string",types:["text"]},{name:"search",types:["text"]},{name:"replace",types:["text"]}],returnType:"text",description:"Replace a string with another string",category:"String",difficulty:1},replaceAll:{name:"replaceAll",fn:"replaceAll",args:[{name:"string",types:["text"]},{name:"search",types:["text"]},{name:"replace",types:["text"]}],returnType:"text",description:"Replace all occurences of a string with another string",category:"String",difficulty:1},lower:{name:"lower",fn:"lower",args:[{name:"string",types:["text"]}],returnType:"text",description:"Convert a string to lowercase",category:"String",difficulty:1},upper:{name:"upper",fn:"upper",args:[{name:"string",types:["text"]}],returnType:"text",description:"Convert a string to uppercase",category:"String",difficulty:1},repeat:{name:"repeat",fn:"repeat",args:[{name:"string",types:["text"]},{name:"times",types:["number"]}],returnType:"text",description:"Repeat a string",category:"String",difficulty:1},format:{name:"format",fn:"format",args:[{name:"value",types:["any"]}],returnType:"text",description:"Format a value to string",category:"String",difficulty:1},toNumber:{name:"toNumber",fn:"toNumber",args:[{name:"value",types:["any"]}],returnType:"number",description:"Convert a value to a number",category:"Number",difficulty:1},now:{name:"now",fn:"now",args:[],returnType:"date",description:"Get the current date",category:"Date",difficulty:1},minute:{name:"minute",fn:"minute",args:[{name:"date",types:["date"]}],returnType:"number",description:"Get the minutes of a date",category:"Date",difficulty:1},hour:{name:"hour",fn:"hour",args:[{name:"date",types:["date"]}],returnType:"number",description:"Get the hours of a date",category:"Date",difficulty:1},day:{name:"day",fn:"day",args:[{name:"date",types:["date"]}],returnType:"number",description:"Get the day of a date",category:"Date",difficulty:1},date:{name:"date",fn:"date",args:[{name:"date",types:["date"]}],returnType:"number",description:"Get the date of a date",category:"Date",difficulty:1},week:{name:"week",fn:"week",args:[{name:"date",types:["date"]}],returnType:"number",description:"Get the week of a date",category:"Date",difficulty:1},month:{name:"month",fn:"month",args:[{name:"date",types:["date"]}],returnType:"number",description:"Get the month of a date",category:"Date",difficulty:1},year:{name:"year",fn:"year",args:[{name:"date",types:["date"]}],returnType:"number",description:"Get the year of a date",category:"Date",difficulty:1},pad:{name:"pad",fn:"pad",args:[{name:"number",types:["number"]},{name:"length",types:["number"]},{name:"text",types:["text"]}],returnType:"text",description:"Pad a number with text",category:"String",difficulty:1},range:{name:"range",fn:"range",args:[{name:"numbers",types:["number-multi"]}],returnType:"number",description:"Get the difference between the largest and smallest from a list of numbers",category:"List",difficulty:1},latest:{name:"latest",fn:"latest",args:[{name:"dates",types:["date-multi"]}],returnType:"date",description:"Get the latest date of a list of dates",category:"Date",difficulty:1},earliest:{name:"earliest",fn:"earliest",args:[{name:"dates",types:["date-multi"]}],returnType:"date",description:"Get the earliest date of a list of dates",category:"Date",difficulty:1},dateRange:{name:"dateRange",fn:"dateRange",args:[{name:"dates",types:["date-multi"]},{name:"type",types:["text"]}],returnType:"number",description:"Get the date range of a list of dates",category:"Date",difficulty:1},dateAdd:{name:"dateAdd",fn:"dateAdd",args:[{name:"date",types:["date"]},{name:"amount",types:["number"]},{name:"type",types:["text"]}],returnType:"date",description:"Add an amount to a date",category:"Date",difficulty:2},dateSubtract:{name:"dateSubtract",fn:"dateSubtract",args:[{name:"date",types:["date"]},{name:"amount",types:["number"]},{name:"type",types:["text"]}],description:"Subtract an amount from a date",category:"Date",difficulty:2},dateBetween:{name:"dateBetween",fn:"dateBetween",args:[{name:"date1",types:["date"]},{name:"date2",types:["date"]},{name:"type",types:["text"]}],returnType:"number",description:"Get the difference between two dates",category:"Date",difficulty:2},timeStamp:{name:"timeStamp",fn:"timeStamp",args:[{name:"date",types:["date"]}],returnType:"number",description:"Get the timestamp of a date",category:"Date",difficulty:1},at:{name:"at",fn:"at",args:[{name:"list",types:["any-list"]},{name:"index",types:["number"]}],returnType:"any",description:"Get an element at a specific index",category:"List",difficulty:2},first:{name:"first",fn:"first",args:[{name:"list",types:["any-multi"]}],returnType:"any",description:"Get the first element of a list",category:"List",difficulty:1},last:{name:"last",fn:"last",args:[{name:"list",types:["any-multi"]}],returnType:"any",description:"Get the last element of a list",category:"List",difficulty:1},concat:{name:"concat",fn:"concat",args:[{name:"list 1",types:["any-multi"]},{name:"list 2",types:["any-multi"]}],returnType:"any-multi",description:"Concatenate two lists",category:"List",difficulty:1},sort:{name:"sort",fn:"sort",args:[{name:"list",types:["any-multi"]}],returnType:"any-multi",description:"Sort a list",category:"List",difficulty:1},reverse:{name:"reverse",fn:"reverse",args:[{name:"list",types:["any-multi"]}],returnType:"any-multi",description:"Reverse a list",category:"List",difficulty:1},join:{name:"join",fn:"join",args:[{name:"list",types:["text-multi"]},{name:"separator",types:["text"]}],returnType:"text",description:"Turn a list into text separator",category:"List",difficulty:1},includes:{name:"includes",fn:"includes",args:[{name:"list",types:["any-multi"]},{name:"value",types:["any"]}],returnType:"boolean",description:"Check if a list includes a value",category:"List",difficulty:1},split:{name:"split",fn:"split",args:[{name:"string",types:["text"]},{name:"separator",types:["text"]}],returnType:"text-multi",description:"Split text into a list using a separator",category:"String",difficulty:1},formatDate:{name:"formatDate",fn:"formatDate",args:[{name:"date",types:["date"]},{name:"format",types:["text"]}],returnType:"text",description:"Format a date into text",category:"Date",difficulty:2},parseDate:{name:"parseDate",fn:"parseDate",args:[{name:"date",types:["text"]}],returnType:"date",description:"Transform date from text",category:"Date",difficulty:1},find:{name:"find",fn:"find",args:[{name:"list",types:["any-multi"]},{name:"condition",types:["boolean"]}],returnType:"any",description:"Find an element in a list",category:"List",difficulty:2},findIndex:{name:"findIndex",fn:"findIndex",args:[{name:"list",types:["any-multi"]},{name:"condition",types:["boolean"]}],returnType:"number",description:"Find the index of an element in a list",category:"List",difficulty:2},filter:{name:"filter",fn:"filter",args:[{name:"list",types:["any-multi"]},{name:"condition",types:["boolean"]}],returnType:"any-multi",description:"Filter a list based on a condition",category:"List",difficulty:2},map:{name:"map",fn:"map",args:[{name:"list",types:["any-multi"]},{name:"formula",types:["any"]}],returnType:"any-multi",description:"Change all the values in a list based on a formula",category:"List",difficulty:2},some:{name:"some",fn:"some",args:[{name:"list",types:["any-multi"]},{name:"condition",types:["boolean"]}],returnType:"boolean",description:"Check if some elements in a list are true",category:"List",difficulty:2},every:{name:"every",fn:"every",args:[{name:"list",types:["any-multi"]},{name:"condition",types:["boolean"]}],returnType:"boolean",description:"Check if every element in a list is true",category:"List",difficulty:2},flat:{name:"flat",fn:"flat",args:[{name:"list",types:["any-multi"]}],returnType:"any-multi",description:"Flatten a list of lists into a single list",category:"List",difficulty:2},path:{name:"path",fn:"path",args:[{name:"path",types:["text"]}],returnType:"link",description:"Get the path object of a path",category:"Path",difficulty:2},let:{name:"let",fn:"let",args:[{name:"variable",types:["text"]},{name:"value",types:["any"]},{name:"formula",types:["any"]}],returnType:"any",description:"Define a variable to use in a formula",category:"Variable",difficulty:3},lets:{name:"lets",fn:"lets",args:[{name:"variable",types:["text"]},{name:"value",types:["any"]},{name:"...",types:[]},{name:"formula",types:["any"]}],returnType:"any",description:"Define multiple variables to use in a formula",category:"Variable",difficulty:3}},uye=(e,t,r)=>{let n=e[0];if(!n.isSymbolNode||e.length!==3)return"";let i=n.name,a=e[1];return t.evaluate(`${i} = ${a.toString()}`,r),e[2].compile().evaluate(r)};uye.rawArgs=!0;var cye=(e,t,r)=>{if(e.length%2!==1)return"";for(let i=0;i{if(e.length!==1)return"";let n=e.map(function(a){return a.compile().evaluate(r)});return r.get("$paths").get(n[0])};fye.rawArgs=!0;var dye=(e,t,r)=>r?.get("$current");dye.rawArgs=!0;var pye=(e,t,r)=>r?.get("$index");pye.rawArgs=!0;var mye=(e,t,r)=>{if(e.length!==2)return"";let n=e[0].compile().evaluate?e[0].compile().evaluate(r):e[0];return Array.isArray(n)?n.find((i,a)=>{r.set("$current",i),r.set("$index",a),t.evaluate("current = _current(); index = _index()",r);let o=e[1].compile().evaluate?e[1].compile().evaluate(r):e[1];return i===o})??"":""};mye.rawArgs=!0;var hye=(e,t,r)=>{if(e.length!==2)return"";let n=e[0].compile().evaluate?e[0].compile().evaluate(r):e[0];return Array.isArray(n)?n.findIndex((i,a)=>{r.set("$current",i),r.set("$index",a),t.evaluate("current = _current(); index = _index()",r);let o=e[1].compile().evaluate?e[1].compile().evaluate(r):e[1];return i===o}):""};hye.rawArgs=!0;var Aye=(e,t,r)=>{if(e.length!==2)return"";let n=e[0].compile().evaluate?e[0].compile().evaluate(r):e[0];return Array.isArray(n)?n.filter((i,a)=>(r.set("$current",i),r.set("$index",a),t.evaluate("current = _current(); index = _index()",r),e[1].compile().evaluate(r))):""};Aye.rawArgs=!0;var gye=(e,t,r)=>{if(e.length!==2)return"";let n=e[0].compile().evaluate?e[0].compile().evaluate(r):e[0];return Array.isArray(n)?n.map((i,a)=>(r.set("$current",i),r.set("$index",a),t.evaluate("current = _current(); index = _index()",r),e[1].compile().evaluate(r))):[]};gye.rawArgs=!0;var vye=(e,t,r)=>{if(e.length!==2)return"";let n=e[0].compile().evaluate?e[0].compile().evaluate(r):e[0];return Array.isArray(n)?n.some((i,a)=>(r.set("$current",i),r.set("$index",a),t.evaluate("current = _current(); index = _index()",r),e[1].compile().evaluate(r))):""};vye.rawArgs=!0;var yye=(e,t,r)=>{if(e.length!==2)return"";let n=e[0].compile().evaluate?e[0].compile().evaluate(r):e[0];return Array.isArray(n)?n.every((i,a)=>(r.set("$current",i),r.set("$index",a),t.evaluate("current = _current(); index = _index()",r),e[1].compile().evaluate(r))):""};yye.rawArgs=!0;var bye=(e,t,r)=>{if(e.length!==1)return"";let n=e[0].compile().evaluate?e[0].compile().evaluate(r):e[0];return Array.isArray(n)?n.flat():""};bye.rawArgs=!0;var xye=(e,t,r)=>{if(e.length!==1)return"";let n=e.map(function(o){return o.compile().evaluate(r)}),i=r.get("$properties")?.[n[0]]?.type,a=Sa(i,r.get(n[0]));return(i=="file"||i=="link"||i=="context")&&(i.includes("multi")?a=mr(a).map(o=>r.get("$paths").get(o)??o):a=r.get("$paths").get(a)??a),i=="date"&&(a=PE(a)),a??""};xye.rawArgs=!0;var wye=(e,t,r)=>{if((e.length-1)%2!==0)return"";for(let n=0;n{if(e.length<1||e.length>2)return"";let n=e[0].compile().evaluate(r);n instanceof Date||(n=new Date(n));let i=e[1]?.compile().evaluate(r);return i?.length>0?Pa(n,i):Pa(n,r.get("$settings")?.dateFormat??"yyyy-MM-dd")};Sye.rawArgs=!0;var bu=e=>typeof e=="string"||e instanceof String?e:e instanceof Date?Pa(e,"yyyy-MM-dd"):typeof e=="number"?e.toFixed(0):e?.path?e.path:"",P6={prop:xye,_current:dye,_index:pye,slice:(e,t,r)=>(e=bu(e),e.slice(t,r)),if:(e,t,r)=>e===!0?t:r,ifs:wye,empty:e=>e.length!==1?"":Array.isArray(e[0])?e[0].length===0:e[0]===""?"true":"false",length:e=>e.length,values:e=>e.flat().length,uniques:e=>Mr(e.flat()).length,substring:(e,t,r)=>(e=bu(e),r?e.substring(t,r):e.substring(t)),startsWith:(e,t)=>(e=bu(e),t=bu(t),e.startsWith(t)),contains:(e,t)=>(e=bu(e),t=bu(t),e.includes(t)),test:(e,t)=>(e=bu(e),new RegExp(t).test(e)),match:(e,t)=>(e=bu(e),e.match(new RegExp(t))),replace:(e,t,r)=>(e=bu(e),e.replace(new RegExp(t),r)),replaceAll:(e,t,r)=>(e=bu(e),t=bu(t),r=bu(r),e.replace(new RegExp(t,"g"),r)),lower:e=>(e=bu(e),e.toLowerCase()),upper:e=>(e=bu(e),e.toUpperCase()),repeat:(e,t)=>e.repeat(t),format:bu,toNumber:e=>e instanceof Date?e.getTime():typeof e=="string"?parseFloat(e):e,now:()=>new Date,minute:e=>e.getMinutes(),hour:e=>e.getHours(),day:e=>e.getDay(),date:e=>e.getDate(),week:e=>Pa(e,"w"),month:e=>e.getMonth()+1,year:e=>e.getFullYear(),pad:(e,t,r)=>e.padStart(t,r),range:e=>Math.max(...e)-Math.min(...e),latest:e=>new Date(Math.max(...e.map(t=>t.getTime()))),earliest:e=>new Date(Math.min(...e.map(t=>t.getTime()))),dateRange:(e,t)=>{let r=Math.abs(Math.max(...e.map(n=>n.getTime()))-Math.min(...e.map(n=>n.getTime())));return t.startsWith("day")?r/(1e3*60*60*24):t.startsWith("month")?r/(1e3*60*60*24*30):t.startsWith("year")?r/(1e3*60*60*24*365):t.startsWith("hour")?r/(1e3*60*60):t.startsWith("minute")?r/(1e3*60):t.startsWith("second")?r/1e3:t.startsWith("week")?r/(1e3*60*60*24*7):t.startsWith("quarter")?r/(1e3*60*60*24*30*3):r/(1e3*60*60*24)},dateAdd:(e,t,r)=>(r.startsWith("day")&&e.setDate(e.getDate()+t),r.startsWith("month")&&e.setMonth(e.getMonth()+t),r.startsWith("year")&&e.setFullYear(e.getFullYear()+t),r.startsWith("quarter")&&e.setMonth(e.getMonth()+t*3),r.startsWith("week")&&e.setDate(e.getDate()+t*7),r.startsWith("hour")&&e.setHours(e.getHours()+t),r.startsWith("minute")&&e.setMinutes(e.getMinutes()+t),r.startsWith("second")&&e.setSeconds(e.getSeconds()+t),e),dateSubtract:(e,t,r)=>(r.startsWith("day")&&e.setDate(e.getDate()-t),r.startsWith("month")&&e.setMonth(e.getMonth()-t),r.startsWith("year")&&e.setFullYear(e.getFullYear()-t),r.startsWith("quarter")&&e.setMonth(e.getMonth()-t*3),r.startsWith("week")&&e.setDate(e.getDate()-t*7),r.startsWith("hour")&&e.setHours(e.getHours()-t),r.startsWith("minute")&&e.setMinutes(e.getMinutes()-t),r.startsWith("second")&&e.setSeconds(e.getSeconds()-t),e),dateBetween:(e,t,r)=>{let o=Math.abs(t.getTime()-e.getTime());switch(r){case"days":return Math.round(o/864e5);case"months":return Math.round(o/2592e6);case"years":return Math.round(o/31536e6);case"hours":return Math.round(o/(60*60*1e3));case"minutes":return Math.round(o/(60*1e3));case"seconds":return Math.round(o/1e3);case"weeks":return Math.round(o/(864e5*7));case"quarters":return Math.round(o/(2592e6*3));default:return Math.round(o/864e5)}},style:(e,t)=>e,timeStamp:e=>e.getTime(),at:(e,t)=>e[t],first:e=>e[0],last:e=>e[e.length-1],concat:(e,t)=>e.concat(t),sort:e=>e.sort((t,r)=>r-t),reverse:e=>e.reverse(),join:(e,t)=>e.join(t),includes:(e,t)=>e.includes(t),split:(e,t)=>e.split(t),formatDate:Sye,parseDate:e=>PE(e),find:mye,findIndex:hye,filter:Aye,map:gye,some:vye,every:yye,flat:bye,path:fye,let:uye,lets:cye};var md=(e,t,r,n,i,a,o)=>{if(!r)return"";let s=new Map;Object.keys(i).forEach(u=>s.set(u,i[u])),s.set("$properties",n),s.set("$paths",t),a&&s.set("$current",a);let l;try{e.evaluate("current = _current()",s),l=e.evaluate(r,s),l=Ki("",l)}catch(u){if(l="",o)throw u;console.log(r,u)}return l};var bB=(e,t)=>t.startsWith(e),fG=(e,t)=>(r,n)=>{let i=t?r:n,a=t?n:r;return e(i)e(a)?1:0},I6=(e,t)=>(r,n)=>{let i=t?r:n,a=t?n:r;return i[e]a[e]?1:0},Eye=(e,t)=>(r,n)=>{let i=t?r:n,a=t?n:r;return i[e]?.toLowerCase().localeCompare(a[e]?.toLowerCase())},kye=(e,t)=>(r,n)=>{let i=t?r:n,a=t?n:r;return+i[e]-+a[e]};var Nm=e=>{try{return e?.replace(/'/g,"''")}catch(t){return console.log(t,e),""}},SA=e=>e?.charAt(0)=="_"?SA(e.substring(1)):e?.replace(/"/g,""),Tm=e=>e?.replace(/[^a-z0-9+]+/gi,""),EVe=/^[+\$#^]+/,Cye=/[\/\?<>\\:\*\|":]/g,Dye=/[\x00-\x1f\x80-\x9f]/g,jye=/^\.+$/,Oye=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,Mye=e=>{let t="";return e.replace(EVe,t).replace(Cye,t).replace(Dye,t).replace(jye,t).replace(Oye,t)},P0=e=>{let t="";return e.replace(Cye,t).replace(Dye,t).replace(jye,t).replace(Oye,t)};var xB=(e,t,r)=>e.spacesIndex.has(t)?e.spaceManager.deleteTag(of(e,e.spacesIndex.get(t).space),r):e.spaceManager.deleteTag(t,r),Fm=(e,t,r)=>e.spacesIndex.has(t)?e.spaceManager.addTag(of(e,e.spacesIndex.get(t).space),r):e.spaceManager.addTag(t,r),dG=(e,t)=>e.spaceManager.createSpace(Tg(t),e.settings.spacesFolder,null);var wB=async(e,t)=>{let r=e.spaceManager.uriByString(t);if(r.refType=="context"){let n=e.contextsIndex.get(r.basePath)?.schemas.find(i=>i.id==r.ref);if(n)return{id:n.id,name:n.name,type:"context",path:r.basePath}}if(r.refType=="frame")return e.spaceManager.readFrame(r.basePath,r.ref).then(n=>{let i=n?.schema;if(i){let a=to(i);return{id:i.id,name:a.name,sticker:a.def?.icon,type:"frame",frameType:a.type,path:r.basePath}}return null});if(r.refType=="action"){let n=e.actionsIndex.get(r.path)?.find(i=>i.schema.id==r.ref)?.schema;if(n)return{id:n.id,name:n.name,sticker:n.def?.icon,type:"action",path:r.basePath}}return null},kVe=e=>({field:lu(e?.field??"rank"),asc:Qj(e?.asc),group:Qj(e?.group),recursive:Qj(e?.recursive)}),CVe=e=>e=="fileprop"?"file":e=="filemeta"?"path":lu(e),DVe=e=>({type:CVe(e.type),fType:lu(e.fType),field:lu(e.field),fn:lu(e.fn),value:lu(e.value)}),jVe=e=>({type:rJ(e.type,["any","all"],"any"),trueFalse:!!e.truefalse,filters:Zs(e.filters).map(t=>DVe(t))}),B6=(e,t)=>({sort:kVe(e[zE]),recursive:lu(e[eO]),contexts:Zs(e[BE]),links:Zs(e[LE]),filters:Zs(e[qE]).map(r=>jVe(r)),template:lu(e[RE]),templateName:lu(e[$E])}),Nye=(e,t,r,n,i,a,o)=>({id:i?i+"/"+e.path:e.path,parentId:i,depth:n,index:0,space:a,path:e.path,item:e,rank:e?.rank,collapsed:t,sortable:r,childrenCount:o,type:"space"}),SB=(e,t,r,n,i,a,o,s,l,u)=>({item:t,space:r,id:u+"/"+t.path,parentId:u,depth:i,path:n,index:a,collapsed:o,sortable:s,childrenCount:l,rank:t.rank,type:"file"}),d2=(e,t,r)=>(t??(ar(e.ui)?40:29))+(r?10:0),pG=e=>(t,r)=>{if(e.field=="rank")return t.rank-r.rank;let n=[];if(e.group&&n.push(I6("type",!1)),e.field=="number")n.push(kye("name",e.asc));else if(e.field=="name")n.push(Eye(e.field,e.asc));else if(e.field.startsWith("props")){let i=e.field.split(".")[1],a=o=>o?.metadata?.property?.[i];n.push(fG(a,e.asc))}else{let i=a=>a?.metadata?.file?.[e.field];n.push(fG(i,e.asc))}return n.reduce((i,a)=>i==0?a(t,r):i,0)},p2=async(e,t,r,n)=>{let i=e.spacesIndex.get(n);if(!i)return;let a=r;e.addToContextStateQueue(()=>Iye(e.spaceManager,[t],a,i.space).then(o=>{let s=[...e.spacesMap.getInverse(i.path)].map(l=>e.reloadPath(l));return Promise.all(s)}).then(o=>e.dispatchEvent("spaceStateUpdated",{path:i.path})))},mG=async(e,t,r,n,i)=>{if(!t)return;let a=e.pathsIndex.get(t.path);if(!a)return;let o=r=="/"?a.name:r+"/"+a.name;if(await e.spaceManager.pathExists(o)){e.ui.notify(z.notice.fileExists);return}i?await e.spaceManager.copyPath(t.path,r):await e.spaceManager.renamePath(t.path,Rf(t.path,r)),p2(e,o,n,r)},Tye=(e,t,r)=>{sy(e,t,"template",r)},Fye=(e,t,r)=>{sy(e,t,"templateName",r)};var Sp=async(e,t,r)=>{let n=e.spacesIndex.get(t),i;if(n){if(!e.pathsIndex.has(t))return await e.reloadSpace(n.space);if(r)i=await sf(e,n.space,r);else return}else{let a=e.spaceManager.spaceInfoForPath(t);if(a.readOnly)return await e.reloadSpace(a);await e.spaceManager.createSpace(a.name,e.spaceManager.parentPathForPath(a.path),r),r?(await sf(e,a,r),i=await e.reloadSpace(a,r)):i=await e.reloadSpace(a)}return e.onSpaceDefinitionChanged(i,null),i},sy=async(e,t,r,n)=>{e.spaceManager.saveSpace(t,a=>({...a,[r]:n}));let i=e.spacesIndex.get(t);await e.updateSpaceMetadata(t,{...i.metadata,[r]:n})},OVe=async(e,t,r)=>{e.spaceManager.saveSpace(t,n=>n,r)},sf=async(e,t,r)=>(await e.spaceManager.saveSpace(t.path,n=>({...n,...r})),e.updateSpaceMetadata(t.path,r)),m2=async(e,t,r,n)=>t.type=="tag"?Fm(e,r,t.name):_m(e,t,r,n);var h2=async(e,t)=>{let r=null;return e.settings.newFileLocation=="folder"?r=e.spacesIndex.get(e.settings.newFileFolderPath):e.settings.newFileLocation=="current"&&t&&t.type=="space"?r=e.spacesIndex.get(t.path):t&&(r=e.spacesIndex.get(t.parent)),r||(r=e.spacesIndex.get("/")),r},_m=async(e,t,r,n)=>{if(r==t.path)return;let i=Zs(t.metadata.links)??[];i.find(o=>o==r)||i.push(r),await sf(e,t.space,{...t.metadata,links:i}),await e.reloadPath(r,!0).then(o=>e.dispatchEvent("pathStateUpdated",{path:r})),p2(e,r,n,t.path)},R6=async(e,t)=>{let r=e.spacesIndex.get(t);!r||(r.type=="tag"?e.onTagDeleted(r.name):r.type=="folder"&&await Vh(e,r.path))},hd=(e,t,r)=>{let n=e.spacesIndex.get(t);n&&sf(e,n.space,{...n.metadata,sort:r})},of=(e,t)=>e.settings.enableFolderNote?t.notePath:t.defPath,I0=async(e,t,r)=>{let n=e.spacesIndex.get(r);!n||(await e.spaceManager.saveTemplate(t,n.path),e.ui.notify(z.notice.templateSaved+n.name))},B0=async(e,t,r)=>{let n=e.spacesIndex.get(t);!n||(n.type=="tag"?r.forEach(i=>xB(e,i,n.name)):(n.type=="folder"||n.type=="vault")&&await sy(e,n.path,"links",n.metadata.links.filter(i=>!r.some(a=>a==i))))},hG=async(e,t,r,n)=>{let i;try{if(t.metadata.templateName?.length>0){let o=md(e.formulaContext,e.pathsIndex,t.metadata.templateName,{},{},e.pathsIndex.get(t.path));o?.length>0&&(i=o)}}catch{}if(!await e.spaceManager.pathExists(`${t.path}/${e.settings.spaceSubFolder}/templates/${r}`)){zn(e,t,"md",null,!1,null,n);return}let a=await e.spaceManager.copyPath(`${t.path}/${e.settings.spaceSubFolder}/templates/${r}`,t.path,i);a&&e.ui.openPath(a,n)},zn=async(e,t,r,n,i,a,o)=>{let s;return t.type=="tag"?(s=await e.spaceManager.createItemAtPath("/",r,n,a),await e.spaceManager.addTag(s,t.name)):s=await e.spaceManager.createItemAtPath(t.path,r,n,a),i||e.ui.openPath(s,o),s};var _ye=async(e,t,r)=>{let n=(i,a,o)=>{let s={...a,name:SA(a.name)},l=i;if(s.name=="")return e.ui.notify(z.notice.noPropertyName),!1;if(!o&&l.cols.find(d=>d.name.toLowerCase()==s.name.toLowerCase())||o&&o.name!=s.name&&l.cols.find(d=>d.name.toLowerCase()==s.name.toLowerCase()))return e.ui.notify(z.notice.duplicatePropertyName),!1;let u=o?l.cols.findIndex(d=>d.name==o.name):-1,c=u==-1?[...l.cols,s]:l.cols.map((d,p)=>p==u?s:d),f={...l,cols:c??[]};return e.spaceManager.saveFrame(t,f),!0};if(e.spacesIndex.has(t)){let i=await e.spaceManager.readFrame(t,"main");n(i,{...r,schemaId:"main"})}else e.spaceManager.saveProperties(t,{[r.name]:nx(r.type)})},Di=(e,t,r)=>e.spacesIndex.has(t)?OVe(e,t,r):e.spaceManager.saveProperties(t,r),AG=(e,t,r,n)=>{if(e.spacesIndex.has(t)){e.spaceManager.renameProperty(of(e,e.spacesIndex.get(t).space),r,n);return}e.spaceManager.renameProperty(t,r,n)},Pye=(e,t,r)=>{if(e.spacesIndex.has(t)){e.spaceManager.deleteProperty(of(e,e.spacesIndex.get(t).space),r);return}e.spaceManager.deleteProperty(t,r)};var EB=async(e,t)=>{let r=e.spaceManager.uriByString(t);if(!r)return null;let n=r.basePath,i=e.spacesIndex.get(r.basePath);if(!i)return null;let a,o,s,l;if(r.refType=="frame"){s=r.ref;let u=await e.spaceManager.readAllFrames(n).then(c=>Object.values(c).map(f=>f.schema));s&&u&&(l=u.find(c=>c.id==s)?.name,a=dr(u.find(c=>c.id==s)?.def)?.db,o=e.contextsIndex.get(n)?.schemas.find(c=>c.id==a)?.name)}else r.refType=="context"&&(a=r.ref,o=e.contextsIndex.get(n)?.schemas.find(u=>u.id==a)?.name);return{space:n,spaceName:i.name,schema:a,schemaName:o,view:s,viewName:l}},kB=async(e,t,r,n)=>{let i=await e.readTable(t.path,r);i&&await n(i,t)},EA=async(e,t,r)=>{let n=await e.contextForSpace(t.path);n&&await r(n,t)},hc=async(e,t,r,n)=>{await e.saveTable(t.path,r,n).then(i=>i&&e.superstate.reloadContextByPath(t.path,!0))};var Bye=(e,t,r,n,i)=>({...e,rows:e.rows.map(a=>a[t]==r?{...a,[n]:Ni(mr(a[n]).filter(o=>o!=i))}:a)}),MVe=(e,t,r,n,i)=>({...e,rows:e.rows.map(a=>a[t]==r?{...a,[n]:i}:a)});var NVe=(e,t,r)=>({...e,rows:r?rx(e.rows,r,t):[...e.rows,...t]}),TVe=(e,t,r)=>({...e,rows:e.rows.map((n,i)=>i==r?t:n)}),Rye=async(e,t,r,n,i,a,o)=>{kB(e,t,r,async s=>{let l={...s,rows:s.rows.map((u,c)=>c==n?{...u,[i]:a}:u)};return o&&(l={...l,rows:Cs(l.rows,n,o)}),mc.default.isEqual(s,l)||await hc(e,t,l),l})},CB=async(e,t,r,n,i,a,o)=>{e.contextForSpace(t.path).then(s=>{let u=(a??MVe)(s,It,r,n,i);return o&&(u=R$(u,[r],o)),hc(e,t,u).then(c=>u)})};var FVe=async(e,t,r)=>{let n=t;e.spacesIndex.has(n)&&(n=of(e,e.spacesIndex.get(n).space));let i=await e.spaceManager.readProperties(n);return i?Object.keys(i).reduce((a,o)=>r.some(s=>s.name==o)?{...a,[o]:Ki(o,i[o],r.find(s=>s.name==o).type)}:a,{}):{}},$ye=(e,t)=>t=="$space"?Qoe:t=="$context"?Xd.rows:e.contextsIndex.get(t)?.contextTable?.cols??[],gG=async(e,t,r)=>{let n=async a=>{let o=a.rows.some(l=>l[It]===t),s=await FVe(e,t,a.cols);return o?a.rows.map(l=>l[It]==t?{...l,...s}:l):[...a.rows,{[It]:t,...s}]},i=r.map(a=>EA(e.spaceManager,a,async(o,s)=>{let l=await n(o),u={...o,rows:l};return mc.default.isEqual(o,u)||await hc(e.spaceManager,s,u,!0),u}));await Promise.all(i)},DB=async(e,t,r,n,i)=>kB(e,t,r,async(a,o)=>{let s=TVe(a,i,n);return mc.default.isEqual(a,s)||await hc(e,o,s),s}),qye=async(e,t,r,n,i)=>{let a=o=>({...o,rows:o.rows.map(s=>s[It]==t?{...s,[r]:n}:s)});return EA(e,i,async(o,s)=>{let l=a(o);return mc.default.isEqual(o,l)||await hc(e,s,l),l})},Lye=async(e,t,r,n)=>{let i=o=>{let s=o.cols.map(l=>l.type.startsWith("context")&&l.value==t?{...l,value:r}:l);return{...o,cols:s}},a=n.map(o=>EA(e,o,async(s,l)=>{let u=i(s);return mc.default.isEqual(s,u)||await hc(e,l,u),u}));return Promise.all(a)},zye=async(e,t,r)=>{let n=a=>{let o=a.cols.map(s=>s.type.startsWith("context")&&s.value==t?{...s,type:"link-multi"}:s);return{...a,cols:o}},i=r.map(a=>EA(e,a,async(o,s)=>{let l=n(o);return mc.default.isEqual(o,l)||await hc(e,s,l),l}));return Promise.all(i)},Uye=async(e,t,r,n,i)=>kB(e,r,n,async(a,o)=>{let s=NVe(a,[t],i);return mc.default.isEqual(a,s)||await hc(e,o,s),s}),Wye=async(e,t,r,n)=>kB(e,t,r,async(i,a)=>{let o={...i,rows:i.rows.filter((s,l)=>l!=n)};return mc.default.isEqual(i,o)||await hc(e,a,o),o});var Vye=async(e,t,r,n)=>{let i=n.map(a=>EA(e,a,async(o,s)=>{let l=B$(o.cols),u={...o,rows:o.rows.map(c=>jJ(e,c,t,r,l))};return mc.default.isEqual(o,u)||await hc(e,s,u),u}));return Promise.all(i)},Gye=async(e,t,r)=>{let n=r.map(i=>EA(e,i,async(a,o)=>{let s=B$(a.cols),l={...a,rows:a.rows.map(u=>DJ(e,u,t,s))};return mc.default.isEqual(a,l)||await hc(e,o,l),l}));return Promise.all(n)},Hye=async(e,t,r,n)=>{let i=n.map(a=>EA(e,a,async(o,s)=>{let l=OJ(o,t,r);return mc.default.isEqual(o,l)||await hc(e,s,l),l}));return Promise.all(i)},Qye=async(e,t,r)=>{let n=r.map(i=>EA(e,i,async(a,o)=>{let s=MJ(a,t);return mc.default.isEqual(a,s)||await hc(e,o,s),s}));return Promise.all(n)},Iye=async(e,t,r,n)=>EA(e,n,async(i,a)=>{let o=R$(i,t,r);return mc.default.isEqual(i,o)||await hc(e,a,o,!0),o});var bwe=ge(Te());var je=e=>e.defaultView||window;var Pm=(e,t)=>({name:"",type:2,value:e,onValueChange:t}),vG=e=>({name:e,type:-2,disabled:!0}),Ut={name:"",type:-1,disabled:!0},Yt=(e,t)=>({ui:e,multi:!1,value:[],editable:!1,options:t,searchable:!1,showAll:!0});var lf=ge(Te()),Yye=(e,t,r,n,i,a)=>{e.ui.openModal(t,lf.default.createElement(ji,{value:r,saveValue:n,saveLabel:i}),a)},ji=e=>{let[t,r]=(0,lf.useState)(e.value),n=()=>{e.saveValue(t),e.hide&&e.hide()},i=(0,lf.useRef)(null);return(0,lf.useEffect)(()=>{i?.current&&i.current.focus()},[i]),lf.default.createElement("div",{className:"mk-layout-column mk-gap-8"},lf.default.createElement("input",{ref:i,value:t,type:"text",onChange:a=>r(a.target.value),className:"mk-input mk-input-large",style:{width:"100%"},onKeyDown:a=>{a.key==="Enter"&&n()}}),lf.default.createElement("div",{className:"mk-modal-actions"},lf.default.createElement("button",{onClick:()=>n()},e.saveLabel),lf.default.createElement("button",{onClick:()=>e.hide&&e.hide()},z.buttons.cancel)))};var ei=ge(Te());var ly=e=>{let t;try{t=_Ve(e)}catch{t=e}return t};function kA(e){if(!e)return["",""];let t=e.match(/^(.*?)\s*\/\/\s*(.*)$/);return t?[t[1],t[2]]:["",e]}var _Ve=e=>{let r=e.split("-").map(n=>`0x${n}`);return String.fromCodePoint(...r)};var PVe=e=>{let[t,r]=(0,ei.useState)(""),[n,i]=(0,ei.useState)([]),[a,o]=(0,ei.useState)([]),[s,l]=(0,ei.useState)(null),u=x=>x.type=="emoji"?ly(x.html):x.html;(0,ei.useEffect)(()=>{let x=[];x.push(...e.ui.allStickers()),i(x)},[]);let c=(0,ei.useMemo)(()=>new Set(n.map(x=>x.type)),[n]),[f,d]=(0,ei.useState)(1),p=(0,ei.useCallback)(()=>{d(x=>x+1)},[f]),h=(0,ei.useRef)(null);(0,ei.useEffect)(()=>{let x=new IntersectionObserver(w=>{w[0].isIntersecting&&p()});return h.current&&x.observe(h.current),()=>{h.current&&x.unobserve(h.current)}},[p]);let[m,g]=(0,ei.useState)(null);(0,ei.useEffect)(()=>{o(n.filter(x=>x.name.includes(t)&&(m==null||x.type==m)).slice(0,f*250))},[t,n,f,m]);let A=x=>{r(x.target.value)},b=x=>{let w=s;x.key==="ArrowUp"&&w>0?l(w-1):x.key==="ArrowDown"&&w{v.current&&v.current.focus()},[v.current]),ei.default.createElement(ei.default.Fragment,null,ei.default.createElement("div",{className:"mk-palette-search"},ei.default.createElement("div",{className:"mk-icon-small",dangerouslySetInnerHTML:{__html:e.ui.getSticker("ui//search")}}),ei.default.createElement("input",{value:t,onChange:A,onKeyDown:b,placeholder:z.labels.findStickers,ref:v}),ei.default.createElement("button",{className:"mk-toolbar-button"})),ei.default.createElement("div",{className:"mk-menu-sections"},ei.default.createElement("div",{onClick:()=>g(null),className:`${m==null?"is-active":""} mk-menu-section`},"All"),[...c].map(x=>ei.default.createElement("div",{key:x,onClick:()=>g(x),className:`${m==x?"is-active":""} mk-menu-section`},x))),ei.default.createElement("div",{className:"mk-layout-row mk-layout-wrap mk-gap-4 mk-padding-12 mk-layout-scroll"},a.map((x,w)=>ei.default.createElement("div",{key:w,onClick:()=>{e.selectedSticker(a[w].type+"//"+a[w].value),e.hide()},className:s===w?"selected mk-padding-4 mk-border-radius-4 mk-hover":"mk-padding-4 mk-border-radius-4 mk-hover"},ei.default.createElement("div",{dangerouslySetInnerHTML:{__html:u(x)},className:"mk-sticker"}))),ei.default.createElement("div",{ref:h})))},va=PVe;var CA=(e,t,r)=>{if(e.spacesIndex.has(t)){Di(e,of(e,e.spacesIndex.get(t).space),{[e.settings.fmKeyBanner]:r});return}Di(e,t,{[e.settings.fmKeyBanner]:r})},A2=async(e,t,r)=>{e.spaceManager.saveLabel(t,e.settings.fmKeyColor,r)},uf=async(e,t,r)=>{e.spaceManager.saveLabel(t,e.settings.fmKeySticker,r)},uy=(e,t,r,n)=>{let i=Lo([n,...Zs(r).filter(a=>a==n)]);return Di(e,t,{[e.settings.fmKeyAlias]:Sa("option-multi",i,!0)})};var Xye=async(e,t,r,n,i,a,o,s)=>{if(t.length==1){IVe(e,t[0],r,n,i,a,o,s);return}if(i){let l=a.findIndex(({id:m})=>m===n),u=a[l],c=u.type=="file"?u.depth==0?null:a.find(m=>m.id==u.parentId)?.item:u.item,f=t.filter(m=>!bB(m,c.path)),d=i.insert?n:i.parentId,p=a.find(({id:m})=>m===d)?.item.path,h=d==u.id?-1:u.rank??-1;if(!p)return;g2(e,f,p,i.sortable&&h,s)}},IVe=async(e,t,r,n,i,a,o,s)=>{if(i){let l=a,u=l.findIndex(({id:A})=>A===n),c=l[u],f=i.insert?n:i.parentId,d=i.depth==0&&!i.insert?null:l.find(({id:A})=>A===f)?.item.path,p=f==null?o.findIndex(A=>A?.path==c.id):f==c.id?-1:c.rank??-1;if(!r){Zye(e,t,null,d,i.sortable&&p,s);return}let h=l.findIndex(({id:A})=>A===r),m=l[h],g=m.parentId==null?null:l.find(({id:A})=>A===m.parentId)?.item.path;Zye(e,m.item.path,g,d,i.sortable&&p,s)}},BVe=(e,t,r)=>{let n=e.focuses[e.settings.currentWaypoint]??{sticker:"",name:"Waypoint",paths:[]},a=n.paths.findIndex(s=>s==t)>r?Math.max(0,r-1):r;n.paths=Cs(n.paths,n.paths.findIndex(s=>s==t),a),e.settings.currentWaypoint>e.focuses.length&&e.spaceManager.saveFocuses([...e.focuses,n]);let o=e.focuses.map((s,l)=>l==e.settings.currentWaypoint?n:s);e.spaceManager.saveFocuses(o)},Zye=async(e,t,r,n,i,a)=>{if(!e.pathsIndex.get(t))return!1;if(!n){BVe(e,t,i);return}let s=e.spacesIndex.get(n);if(r==n){p2(e,t,i,n);return}(s.type=="folder"||s.type=="vault")&&(a=="link"||bB(t,s.path)?_m(e,s,t,i):mG(e,e.pathsIndex.get(t),s.path,i,a=="copy")),s.type=="tag"&&Fm(e,t,s.name),r&&r!=n&&B0(e,r,[t])},g2=async(e,t,r,n,i)=>{let a=e.spacesIndex.get(r);!a||((a.type=="folder"||a.type=="vault")&&t.forEach(o=>{i=="link"||bB(o,a.path)?_m(e,a,o,n):mG(e,e.pathsIndex.get(o),a.path,n,i=="copy")}),a.type=="tag"&&t.forEach(o=>Fm(e,o,a.name)))};var Kye=(e,t,r)=>{t.forEach(n=>{uf(e,n,r)})},Jye=(e,t,r)=>{t.forEach(n=>{A2(e,n,r)})},v2=(e,t,r)=>{uf(e,t,r)},jB=(e,t)=>{t.forEach(r=>{uf(e,r,"")})},y2=(e,t)=>{uf(e,t,"")};var $6=ge(Te());var b2=ge(Te()),cy=e=>{let{hide:t,confirmAction:r,message:n,confirmLabel:i}=e,a=()=>{r(),t()};return b2.default.createElement("div",{className:"mk-modal-contents"},b2.default.createElement("div",{className:"mk-modal-message"},n),b2.default.createElement("div",{className:"mk-button-group"},b2.default.createElement("button",{onClick:()=>a(),className:"mod-warning"},i),b2.default.createElement("button",{onClick:()=>t&&t()},z.buttons.cancel)))};var RVe=e=>`${e}-gradient(`,yG=e=>{let t=e.values;t.sort((o,s)=>o.position-s.position),t=t.length==1?[t[0],t[0]]:t;let r=t.map(o=>`${o.color} ${o.position}%`).join(", "),n=e.type,i=["top","left","bottom","right","center"],a=e.direction;return["linear","repeating-linear"].indexOf(n)>=0&&i.indexOf(a)>=0&&(a=a==="center"?"to right":`to ${a}`),["radial","repeating-radial"].indexOf(n)>=0&&i.indexOf(a)>=0&&(a=`circle at ${a}`),r?`${n}-gradient(${a}, ${r})`:""},ebe=e=>{let t=null,r=null,n=e.indexOf("(")+1,i=e.lastIndexOf(")"),a=e.substring(n,i),o=a.split(/,(?![^(]*\)) /);if(!a)return null;o.length>2&&(r=o.shift());let s=!1;return["repeating-linear","repeating-radial","linear","radial"].forEach(u=>{e.indexOf(RVe(u))>-1&&!s&&(s=!0,t=u)}),t?{type:t,direction:r,values:o.map(u=>{let c=u.split(" "),f=parseFloat(c.pop()),d=c.join("");return{position:f,color:d}})}:null};var bG=ge(pi());var ia=ge(Te());var R0=[["Red","var(--mk-color-red)"],["Pink","var(--mk-color-pink)"],["Orange","var(--mk-color-orange)"],["Yellow","var(--mk-color-yellow)"],["Green","var(--mk-color-green)"],["Turquoise","var(--mk-color-turquoise)"],["Teal","var(--mk-color-teal)"],["Blue","var(--mk-color-blue)"],["Purple","var(--mk-color-purple)"],["Brown","var(--mk-color-brown)"],["Charcoal","var(--mk-color-charcoal)"],["Gray","var(--mk-color-gray)"]],OB=[["Base 0","var(--mk-color-base-0)"],["Base 10","var(--mk-color-base-10)"],["Base 20","var(--mk-color-base-20)"],["Base 30","var(--mk-color-base-30)"],["Base 40","var(--mk-color-base-40)"],["Base 50","var(--mk-color-base-50)"],["Base 60","var(--mk-color-base-60)"],["Base 70","var(--mk-color-base-70)"],["Base 100","var(--mk-color-base-100)"]],tbe=[["Background","var(--mk-ui-background)"],["Background Variant","var(--mk-ui-background-variant)"],["Background Contrast","var(--mk-ui-background-contrast)"],["Background Active","var(--mk-ui-background-active)"],["Background Selected","var(--mk-ui-background-selected)"]],rbe=[["Text Primary","var(--mk-ui-text-primary)"],["Text Secondary","var(--mk-ui-text-secondary)"],["Text Tertiary","var(--mk-ui-text-tertiary)"]];var $Ve=e=>{let[t,r]=(0,ia.useState)(null),[n,i]=(0,ia.useState)(null),[a,o]=(0,ia.useState)(e.color??"#eb3b5a"),[s,l]=(0,ia.useState)(a),u=(0,ia.useRef)(null),c=p=>{if(l(p),t){let h={...t};h.values.find(g=>g.id==n).color=p,r(h);let m=yG(h);o(m),e.saveValue(m);return}o(p),e.saveValue(p),e.stayOpen||e.hide()},f=p=>{let h=yG(p);o(h),e.saveValue(h)},d=p=>{p&&(o(p),l(p));let h;try{h=ebe(p);let m=h.values.map(g=>{let A=t?.values.find(b=>b.position==g.position&&b.color==g.color);return A?{...g,id:A.id??(0,bG.uniqueId)()}:{...g,id:(0,bG.uniqueId)()}});h.values=m}catch(m){console.log(m)}h?(r(h),l(h.values[0].color)):l(p)};return(0,ia.useEffect)(()=>{l(t?.values.find(p=>p.id==n)?.color)},[n,t]),ia.default.createElement("div",{className:"mk-ui-color-picker"},ia.default.createElement("div",{className:"mk-ui-color-picker-palette"},ia.default.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",marginBottom:"12px"}},ia.default.createElement("div",{onMouseDown:()=>{e.saveValue("")},className:"mk-color",style:{background:`linear-gradient(to top left, rgba(0,0,0,0) 0%, rgba(255,0,0,0) calc(50% - 1px), rgba(255,0,0,1) 50%, rgba(255,0,0,0) calc(50% + 1px), @@ -211,7 +211,7 @@ function print() { __p += __j.call(arguments, '') } \`||(x==="+"?h++:x==="-"?y++:x==="i"||x==="I"?(h+y===0&&i(),d[v+1]!==" "&&!isNaN(d[v+1])?(m.im+=parseFloat((y%2?"-":"")+d[v+1]),v++):m.im+=parseFloat((y%2?"-":"")+"1"),h=y=0):((h+y===0||isNaN(x))&&i(),d[v+1]==="i"||d[v+1]==="I"?(m.im+=parseFloat((y%2?"-":"")+x),v++):m.re+=parseFloat((y%2?"-":"")+x),h=y=0))}h+y>0&&i();break;case"number":m.im=0,m.re=o;break;default:i()}return isNaN(m.re)||isNaN(m.im),m};function c(o,u){if(!(this instanceof c))return new c(o,u);var m=l(o,u);this.re=m.re,this.im=m.im}c.prototype={re:0,im:0,sign:function(){var o=this.abs();return new c(this.re/o,this.im/o)},add:function(o,u){var m=new c(o,u);return this.isInfinite()&&m.isInfinite()?c.NAN:this.isInfinite()||m.isInfinite()?c.INFINITY:new c(this.re+m.re,this.im+m.im)},sub:function(o,u){var m=new c(o,u);return this.isInfinite()&&m.isInfinite()?c.NAN:this.isInfinite()||m.isInfinite()?c.INFINITY:new c(this.re-m.re,this.im-m.im)},mul:function(o,u){var m=new c(o,u);return this.isInfinite()&&m.isZero()||this.isZero()&&m.isInfinite()?c.NAN:this.isInfinite()||m.isInfinite()?c.INFINITY:m.im===0&&this.im===0?new c(this.re*m.re,0):new c(this.re*m.re-this.im*m.im,this.re*m.im+this.im*m.re)},div:function(o,u){var m=new c(o,u);if(this.isZero()&&m.isZero()||this.isInfinite()&&m.isInfinite())return c.NAN;if(this.isInfinite()||m.isZero())return c.INFINITY;if(this.isZero()||m.isInfinite())return c.ZERO;o=this.re,u=this.im;var d=m.re,h=m.im,y,v;return h===0?new c(o/d,u/d):Math.abs(d)0)return new c(Math.pow(o,m.re),0);if(o===0)switch((m.re%4+4)%4){case 0:return new c(Math.pow(u,m.re),0);case 1:return new c(0,Math.pow(u,m.re));case 2:return new c(-Math.pow(u,m.re),0);case 3:return new c(0,-Math.pow(u,m.re))}}if(o===0&&u===0&&m.re>0&&m.im>=0)return c.ZERO;var d=Math.atan2(u,o),h=s(o,u);return o=Math.exp(m.re*h-m.im*d),u=m.im*h+m.re*d,new c(o*Math.cos(u),o*Math.sin(u))},sqrt:function(){var o=this.re,u=this.im,m=this.abs(),d,h;if(o>=0){if(u===0)return new c(Math.sqrt(o),0);d=.5*Math.sqrt(2*(m+o))}else d=Math.abs(u)/Math.sqrt(2*(m-o));return o<=0?h=.5*Math.sqrt(2*(m-o)):h=Math.abs(u)/Math.sqrt(2*(m+o)),new c(d,u<0?-h:h)},exp:function(){var o=Math.exp(this.re);return this.im,new c(o*Math.cos(this.im),o*Math.sin(this.im))},expm1:function(){var o=this.re,u=this.im;return new c(Math.expm1(o)*Math.cos(u)+a(u),Math.exp(o)*Math.sin(u))},log:function(){var o=this.re,u=this.im;return u===0&&o>0,new c(s(o,u),Math.atan2(u,o))},abs:function(){return n(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){var o=this.re,u=this.im;return new c(Math.sin(o)*r(u),Math.cos(o)*t(u))},cos:function(){var o=this.re,u=this.im;return new c(Math.cos(o)*r(u),-Math.sin(o)*t(u))},tan:function(){var o=2*this.re,u=2*this.im,m=Math.cos(o)+r(u);return new c(Math.sin(o)/m,t(u)/m)},cot:function(){var o=2*this.re,u=2*this.im,m=Math.cos(o)-r(u);return new c(-Math.sin(o)/m,t(u)/m)},sec:function(){var o=this.re,u=this.im,m=.5*r(2*u)+.5*Math.cos(2*o);return new c(Math.cos(o)*r(u)/m,Math.sin(o)*t(u)/m)},csc:function(){var o=this.re,u=this.im,m=.5*r(2*u)-.5*Math.cos(2*o);return new c(Math.sin(o)*r(u)/m,-Math.cos(o)*t(u)/m)},asin:function(){var o=this.re,u=this.im,m=new c(u*u-o*o+1,-2*o*u).sqrt(),d=new c(m.re-u,m.im+o).log();return new c(d.im,-d.re)},acos:function(){var o=this.re,u=this.im,m=new c(u*u-o*o+1,-2*o*u).sqrt(),d=new c(m.re-u,m.im+o).log();return new c(Math.PI/2-d.im,d.re)},atan:function(){var o=this.re,u=this.im;if(o===0){if(u===1)return new c(0,1/0);if(u===-1)return new c(0,-1/0)}var m=o*o+(1-u)*(1-u),d=new c((1-u*u-o*o)/m,-2*o/m).log();return new c(-.5*d.im,.5*d.re)},acot:function(){var o=this.re,u=this.im;if(u===0)return new c(Math.atan2(1,o),0);var m=o*o+u*u;return m!==0?new c(o/m,-u/m).atan():new c(o!==0?o/0:0,u!==0?-u/0:0).atan()},asec:function(){var o=this.re,u=this.im;if(o===0&&u===0)return new c(0,1/0);var m=o*o+u*u;return m!==0?new c(o/m,-u/m).acos():new c(o!==0?o/0:0,u!==0?-u/0:0).acos()},acsc:function(){var o=this.re,u=this.im;if(o===0&&u===0)return new c(Math.PI/2,1/0);var m=o*o+u*u;return m!==0?new c(o/m,-u/m).asin():new c(o!==0?o/0:0,u!==0?-u/0:0).asin()},sinh:function(){var o=this.re,u=this.im;return new c(t(o)*Math.cos(u),r(o)*Math.sin(u))},cosh:function(){var o=this.re,u=this.im;return new c(r(o)*Math.cos(u),t(o)*Math.sin(u))},tanh:function(){var o=2*this.re,u=2*this.im,m=r(o)+Math.cos(u);return new c(t(o)/m,Math.sin(u)/m)},coth:function(){var o=2*this.re,u=2*this.im,m=r(o)-Math.cos(u);return new c(t(o)/m,-Math.sin(u)/m)},csch:function(){var o=this.re,u=this.im,m=Math.cos(2*u)-r(2*o);return new c(-2*t(o)*Math.cos(u)/m,2*r(o)*Math.sin(u)/m)},sech:function(){var o=this.re,u=this.im,m=Math.cos(2*u)+r(2*o);return new c(2*r(o)*Math.cos(u)/m,-2*t(o)*Math.sin(u)/m)},asinh:function(){var o=this.im;this.im=-this.re,this.re=o;var u=this.asin();return this.re=-this.im,this.im=o,o=u.re,u.re=-u.im,u.im=o,u},acosh:function(){var o=this.acos();if(o.im<=0){var u=o.re;o.re=-o.im,o.im=u}else{var u=o.im;o.im=-o.re,o.re=u}return o},atanh:function(){var o=this.re,u=this.im,m=o>1&&u===0,d=1-o,h=1+o,y=d*d+u*u,v=y!==0?new c((h*d-u*u)/y,(u*d+h*u)/y):new c(o!==-1?o/0:0,u!==0?u/0:0),x=v.re;return v.re=s(v.re,v.im)/2,v.im=Math.atan2(v.im,x)/2,m&&(v.im=-v.im),v},acoth:function(){var o=this.re,u=this.im;if(o===0&&u===0)return new c(0,Math.PI/2);var m=o*o+u*u;return m!==0?new c(o/m,-u/m).atanh():new c(o!==0?o/0:0,u!==0?-u/0:0).atanh()},acsch:function(){var o=this.re,u=this.im;if(u===0)return new c(o!==0?Math.log(o+Math.sqrt(o*o+1)):1/0,0);var m=o*o+u*u;return m!==0?new c(o/m,-u/m).asinh():new c(o!==0?o/0:0,u!==0?-u/0:0).asinh()},asech:function(){var o=this.re,u=this.im;if(this.isZero())return c.INFINITY;var m=o*o+u*u;return m!==0?new c(o/m,-u/m).acosh():new c(o!==0?o/0:0,u!==0?-u/0:0).acosh()},inverse:function(){if(this.isZero())return c.INFINITY;if(this.isInfinite())return c.ZERO;var o=this.re,u=this.im,m=o*o+u*u;return new c(o/m,-u/m)},conjugate:function(){return new c(this.re,-this.im)},neg:function(){return new c(-this.re,-this.im)},ceil:function(o){return o=Math.pow(10,o||0),new c(Math.ceil(this.re*o)/o,Math.ceil(this.im*o)/o)},floor:function(o){return o=Math.pow(10,o||0),new c(Math.floor(this.re*o)/o,Math.floor(this.im*o)/o)},round:function(o){return o=Math.pow(10,o||0),new c(Math.round(this.re*o)/o,Math.round(this.im*o)/o)},equals:function(o,u){var m=new c(o,u);return Math.abs(m.re-this.re)<=c.EPSILON&&Math.abs(m.im-this.im)<=c.EPSILON},clone:function(){return new c(this.re,this.im)},toString:function(){var o=this.re,u=this.im,m="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(o){(function(e){"use strict";var r=2e3,t={s:1,n:0,d:1};function a(v,x){if(isNaN(v=parseInt(v,10)))throw h();return v*x}function n(v,x){if(x===0)throw d();var w=Object.create(m.prototype);w.s=v<0?-1:1,v=v<0?-v:v;var C=u(v,x);return w.n=v/C,w.d=x/C,w}function i(v){for(var x={},w=v,C=2,b=4;b<=w;){for(;w%C===0;)w/=C,x[C]=(x[C]||0)+1;b+=1+2*C++}return w!==v?w>1&&(x[w]=(x[w]||0)+1):x[v]=(x[v]||0)+1,x}var s=function(v,x){var w=0,C=1,b=1,A=0,M=0,D=0,O=1,_=1,E=0,T=1,R=1,L=1,H=1e7,G;if(v!=null)if(x!==void 0){if(w=v,C=x,b=w*C,w%1!==0||C%1!==0)throw y()}else switch(typeof v){case"object":{if("d"in v&&"n"in v)w=v.n,C=v.d,"s"in v&&(w*=v.s);else if(0 in v)w=v[0],1 in v&&(C=v[1]);else throw h();b=w*C;break}case"number":{if(v<0&&(b=v,v=-v),v%1===0)w=v;else if(v>0){for(v>=1&&(_=Math.pow(10,Math.floor(1+Math.log(v)/Math.LN10)),v/=_);T<=H&&L<=H;)if(G=(E+R)/(T+L),v===G){T+L<=H?(w=E+R,C=T+L):L>T?(w=R,C=L):(w=E,C=T);break}else v>G?(E+=R,T+=L):(R+=E,L+=T),T>H?(w=R,C=L):(w=E,C=T);w*=_}else(isNaN(v)||isNaN(x))&&(C=w=NaN);break}case"string":{if(T=v.match(/\\d+|./g),T===null)throw h();if(T[E]==="-"?(b=-1,E++):T[E]==="+"&&E++,T.length===E+1?M=a(T[E++],b):T[E+1]==="."||T[E]==="."?(T[E]!=="."&&(A=a(T[E++],b)),E++,(E+1===T.length||T[E+1]==="("&&T[E+3]===")"||T[E+1]==="'"&&T[E+3]==="'")&&(M=a(T[E],b),O=Math.pow(10,T[E].length),E++),(T[E]==="("&&T[E+2]===")"||T[E]==="'"&&T[E+2]==="'")&&(D=a(T[E+1],b),_=Math.pow(10,T[E+1].length)-1,E+=3)):T[E+1]==="/"||T[E+1]===":"?(M=a(T[E],b),O=a(T[E+2],1),E+=3):T[E+3]==="/"&&T[E+1]===" "&&(A=a(T[E],b),M=a(T[E+2],b),O=a(T[E+4],1),E+=5),T.length<=E){C=O*_,b=w=D+C*A+_*M;break}}default:throw h()}if(C===0)throw d();t.s=b<0?-1:1,t.n=Math.abs(w),t.d=Math.abs(C)};function l(v,x,w){for(var C=1;x>0;v=v*v%w,x>>=1)x&1&&(C=C*v%w);return C}function c(v,x){for(;x%2===0;x/=2);for(;x%5===0;x/=5);if(x===1)return 0;for(var w=10%x,C=1;w!==1;C++)if(w=w*10%x,C>r)return 0;return C}function o(v,x,w){for(var C=1,b=l(10,w,x),A=0;A<300;A++){if(C===b)return A;C=C*10%x,b=b*10%x}return 0}function u(v,x){if(!v)return x;if(!x)return v;for(;;){if(v%=x,!v)return x;if(x%=v,!x)return v}}function m(v,x){if(s(v,x),this instanceof m)v=u(t.d,t.n),this.s=t.s,this.n=t.n/v,this.d=t.d/v;else return n(t.s*t.n,t.d)}var d=function(){return new Error("Division by Zero")},h=function(){return new Error("Invalid argument")},y=function(){return new Error("Parameters must be integer")};m.prototype={s:1,n:0,d:1,abs:function(){return n(this.n,this.d)},neg:function(){return n(-this.s*this.n,this.d)},add:function(v,x){return s(v,x),n(this.s*this.n*t.d+t.s*this.d*t.n,this.d*t.d)},sub:function(v,x){return s(v,x),n(this.s*this.n*t.d-t.s*this.d*t.n,this.d*t.d)},mul:function(v,x){return s(v,x),n(this.s*t.s*this.n*t.n,this.d*t.d)},div:function(v,x){return s(v,x),n(this.s*t.s*this.n*t.d,this.d*t.n)},clone:function(){return n(this.s*this.n,this.d)},mod:function(v,x){if(isNaN(this.n)||isNaN(this.d))return new m(NaN);if(v===void 0)return n(this.s*this.n%this.d,1);if(s(v,x),t.n===0&&this.d===0)throw d();return n(this.s*(t.d*this.n)%(t.n*this.d),t.d*this.d)},gcd:function(v,x){return s(v,x),n(u(t.n,this.n)*u(t.d,this.d),t.d*this.d)},lcm:function(v,x){return s(v,x),t.n===0&&this.n===0?n(0,1):n(t.n*this.n,u(t.n,this.n)*u(t.d,this.d))},ceil:function(v){return v=Math.pow(10,v||0),isNaN(this.n)||isNaN(this.d)?new m(NaN):n(Math.ceil(v*this.s*this.n/this.d),v)},floor:function(v){return v=Math.pow(10,v||0),isNaN(this.n)||isNaN(this.d)?new m(NaN):n(Math.floor(v*this.s*this.n/this.d),v)},round:function(v){return v=Math.pow(10,v||0),isNaN(this.n)||isNaN(this.d)?new m(NaN):n(Math.round(v*this.s*this.n/this.d),v)},inverse:function(){return n(this.s*this.d,this.n)},pow:function(v,x){if(s(v,x),t.d===1)return t.s<0?n(Math.pow(this.s*this.d,t.n),Math.pow(this.n,t.n)):n(Math.pow(this.s*this.n,t.n),Math.pow(this.d,t.n));if(this.s<0)return null;var w=i(this.n),C=i(this.d),b=1,A=1;for(var M in w)if(M!=="1"){if(M==="0"){b=0;break}if(w[M]*=t.n,w[M]%t.d===0)w[M]/=t.d;else return null;b*=Math.pow(M,w[M])}for(var M in C)if(M!=="1"){if(C[M]*=t.n,C[M]%t.d===0)C[M]/=t.d;else return null;A*=Math.pow(M,C[M])}return t.s<0?n(A,b):n(b,A)},equals:function(v,x){return s(v,x),this.s*this.n*t.d===t.s*t.n*this.d},compare:function(v,x){s(v,x);var w=this.s*this.n*t.d-t.s*t.n*this.d;return(0=0;A--)b=b.inverse().add(w[A]);if(Math.abs(b.sub(x).valueOf())0&&(w+=x,w+=" ",C%=b),w+=C,w+="/",w+=b),w},toLatex:function(v){var x,w="",C=this.n,b=this.d;return this.s<0&&(w+="-"),b===1?w+=C:(v&&(x=Math.floor(C/b))>0&&(w+=x,C%=b),w+="\\\\frac{",w+=C,w+="}{",w+=b,w+="}"),w},toContinued:function(){var v,x=this.n,w=this.d,C=[];if(isNaN(x)||isNaN(w))return C;do C.push(Math.floor(x/w)),v=x%w,x=w,w=v;while(x!==1);return C},toString:function(v){var x=this.n,w=this.d;if(isNaN(x)||isNaN(w))return"NaN";v=v||15;var C=c(x,w),b=o(x,w,C),A=this.s<0?"-":"";if(A+=x/w|0,x%=w,x*=10,x&&(A+="."),C){for(var M=b;M--;)A+=x/w|0,x%=w,x*=10;A+="(";for(var M=C;M--;)A+=x/w|0,x%=w,x*=10;A+=")"}else for(var M=v;x&&M--;)A+=x/w|0,x%=w,x*=10;return A}},typeof dw=="object"?(Object.defineProperty(m,"__esModule",{value:!0}),m.default=m,m.Fraction=m,YM.exports=m):e.Fraction=m})(dw)});var iE=vn((Bce,aE)=>{aE.exports=function e(r,t){"use strict";var a=/(^([+\\-]?(?:0|[1-9]\\d*)(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)?$|^0x[0-9a-f]+$|\\d+)/gi,n=/(^[ ]*|[ ]*$)/g,i=/(^([\\w ]+,?[\\w ]+)?[\\w ]+,?[\\w ]+\\d+:\\d+(:\\d+)?[\\w ]?|^\\d{1,4}[\\/\\-]\\d{1,4}[\\/\\-]\\d{1,4}|^\\w+, \\w+ \\d+, \\d{4})/,s=/^0x[0-9a-f]+$/i,l=/^0/,c=function(b){return e.insensitive&&(""+b).toLowerCase()||""+b},o=c(r).replace(n,"")||"",u=c(t).replace(n,"")||"",m=o.replace(a,"\\0$1\\0").replace(/\\0$/,"").replace(/^\\0/,"").split("\\0"),d=u.replace(a,"\\0$1\\0").replace(/\\0$/,"").replace(/^\\0/,"").split("\\0"),h=parseInt(o.match(s),16)||m.length!==1&&o.match(i)&&Date.parse(o),y=parseInt(u.match(s),16)||h&&u.match(i)&&Date.parse(u)||null,v,x;if(y){if(hy)return 1}for(var w=0,C=Math.max(m.length,d.length);wx)return 1}return 0}});var uT=vn((Xhe,sT)=>{"use strict";var xD=Object.assign||function(e){for(var r=1;r1&&arguments[1]!==void 0?arguments[1]:{},t=r.preserveFormatting,a=t===void 0?!1:t,n=r.escapeMapFn,i=n===void 0?L$:n,s=String(e),l="",c=i(xD({},k$),a?xD({},q$):{}),o=Object.keys(c),u=function(){var d=!1;o.forEach(function(h,y){d||s.length>=h.length&&s.slice(0,h.length)===h&&(l+=c[o[y]],s=s.slice(h.length,s.length),d=!0)}),d||(l+=s.slice(0,1),s=s.slice(1,s.length))};s;)u();return l}});var qB=vn((kB,CD)=>{(function(e,r,t){function a(l){var c=this,o=s();c.next=function(){var u=2091639*c.s0+c.c*23283064365386963e-26;return c.s0=c.s1,c.s1=c.s2,c.s2=u-(c.c=u|0)},c.c=1,c.s0=o(" "),c.s1=o(" "),c.s2=o(" "),c.s0-=o(l),c.s0<0&&(c.s0+=1),c.s1-=o(l),c.s1<0&&(c.s1+=1),c.s2-=o(l),c.s2<0&&(c.s2+=1),o=null}function n(l,c){return c.c=l.c,c.s0=l.s0,c.s1=l.s1,c.s2=l.s2,c}function i(l,c){var o=new a(l),u=c&&c.state,m=o.next;return m.int32=function(){return o.next()*4294967296|0},m.double=function(){return m()+(m()*2097152|0)*11102230246251565e-32},m.quick=m,u&&(typeof u=="object"&&n(u,o),m.state=function(){return n(o,{})}),m}function s(){var l=4022871197,c=function(o){o=String(o);for(var u=0;u>>0,m-=l,m*=l,l=m>>>0,m-=l,l+=m*4294967296}return(l>>>0)*23283064365386963e-26};return c}r&&r.exports?r.exports=i:t&&t.amd?t(function(){return i}):this.alea=i})(kB,typeof CD=="object"&&CD,typeof define=="function"&&define)});var zB=vn((LB,ED)=>{(function(e,r,t){function a(s){var l=this,c="";l.x=0,l.y=0,l.z=0,l.w=0,l.next=function(){var u=l.x^l.x<<11;return l.x=l.y,l.y=l.z,l.z=l.w,l.w^=l.w>>>19^u^u>>>8},s===(s|0)?l.x=s:c+=s;for(var o=0;o>>0)/4294967296};return u.double=function(){do var m=c.next()>>>11,d=(c.next()>>>0)/4294967296,h=(m+d)/(1<<21);while(h===0);return h},u.int32=c.next,u.quick=u,o&&(typeof o=="object"&&n(o,c),u.state=function(){return n(c,{})}),u}r&&r.exports?r.exports=i:t&&t.amd?t(function(){return i}):this.xor128=i})(LB,typeof ED=="object"&&ED,typeof define=="function"&&define)});var WB=vn((UB,TD)=>{(function(e,r,t){function a(s){var l=this,c="";l.next=function(){var u=l.x^l.x>>>2;return l.x=l.y,l.y=l.z,l.z=l.w,l.w=l.v,(l.d=l.d+362437|0)+(l.v=l.v^l.v<<4^(u^u<<1))|0},l.x=0,l.y=0,l.z=0,l.w=0,l.v=0,s===(s|0)?l.x=s:c+=s;for(var o=0;o>>4),l.next()}function n(s,l){return l.x=s.x,l.y=s.y,l.z=s.z,l.w=s.w,l.v=s.v,l.d=s.d,l}function i(s,l){var c=new a(s),o=l&&l.state,u=function(){return(c.next()>>>0)/4294967296};return u.double=function(){do var m=c.next()>>>11,d=(c.next()>>>0)/4294967296,h=(m+d)/(1<<21);while(h===0);return h},u.int32=c.next,u.quick=u,o&&(typeof o=="object"&&n(o,c),u.state=function(){return n(c,{})}),u}r&&r.exports?r.exports=i:t&&t.amd?t(function(){return i}):this.xorwow=i})(UB,typeof TD=="object"&&TD,typeof define=="function"&&define)});var HB=vn((YB,FD)=>{(function(e,r,t){function a(s){var l=this;l.next=function(){var o=l.x,u=l.i,m,d,h;return m=o[u],m^=m>>>7,d=m^m<<24,m=o[u+1&7],d^=m^m>>>10,m=o[u+3&7],d^=m^m>>>3,m=o[u+4&7],d^=m^m<<7,m=o[u+7&7],m=m^m<<13,d^=m^m<<9,o[u]=d,l.i=u+1&7,d};function c(o,u){var m,d,h=[];if(u===(u|0))d=h[0]=u;else for(u=""+u,m=0;m0;--m)o.next()}c(l,s)}function n(s,l){return l.x=s.x.slice(),l.i=s.i,l}function i(s,l){s==null&&(s=+new Date);var c=new a(s),o=l&&l.state,u=function(){return(c.next()>>>0)/4294967296};return u.double=function(){do var m=c.next()>>>11,d=(c.next()>>>0)/4294967296,h=(m+d)/(1<<21);while(h===0);return h},u.int32=c.next,u.quick=u,o&&(o.x&&n(o,c),u.state=function(){return n(c,{})}),u}r&&r.exports?r.exports=i:t&&t.amd?t(function(){return i}):this.xorshift7=i})(YB,typeof FD=="object"&&FD,typeof define=="function"&&define)});var GB=vn(($B,_D)=>{(function(e,r,t){function a(s){var l=this;l.next=function(){var o=l.w,u=l.X,m=l.i,d,h;return l.w=o=o+1640531527|0,h=u[m+34&127],d=u[m=m+1&127],h^=h<<13,d^=d<<17,h^=h>>>15,d^=d>>>12,h=u[m]=h^d,l.i=m,h+(o^o>>>16)|0};function c(o,u){var m,d,h,y,v,x=[],w=128;for(u===(u|0)?(d=u,u=null):(u=u+"\\0",d=0,w=Math.max(w,u.length)),h=0,y=-32;y>>15,d^=d<<4,d^=d>>>13,y>=0&&(v=v+1640531527|0,m=x[y&127]^=d+v,h=m==0?h+1:0);for(h>=128&&(x[(u&&u.length||0)&127]=-1),h=127,y=4*128;y>0;--y)d=x[h+34&127],m=x[h=h+1&127],d^=d<<13,m^=m<<17,d^=d>>>15,m^=m>>>12,x[h]=d^m;o.w=v,o.X=x,o.i=h}c(l,s)}function n(s,l){return l.i=s.i,l.w=s.w,l.X=s.X.slice(),l}function i(s,l){s==null&&(s=+new Date);var c=new a(s),o=l&&l.state,u=function(){return(c.next()>>>0)/4294967296};return u.double=function(){do var m=c.next()>>>11,d=(c.next()>>>0)/4294967296,h=(m+d)/(1<<21);while(h===0);return h},u.int32=c.next,u.quick=u,o&&(o.X&&n(o,c),u.state=function(){return n(c,{})}),u}r&&r.exports?r.exports=i:t&&t.amd?t(function(){return i}):this.xor4096=i})($B,typeof _D=="object"&&_D,typeof define=="function"&&define)});var ZB=vn((VB,OD)=>{(function(e,r,t){function a(s){var l=this,c="";l.next=function(){var u=l.b,m=l.c,d=l.d,h=l.a;return u=u<<25^u>>>7^m,m=m-d|0,d=d<<24^d>>>8^h,h=h-u|0,l.b=u=u<<20^u>>>12^m,l.c=m=m-d|0,l.d=d<<16^m>>>16^h,l.a=h-u|0},l.a=0,l.b=0,l.c=-1640531527,l.d=1367130551,s===Math.floor(s)?(l.a=s/4294967296|0,l.b=s|0):c+=s;for(var o=0;o>>0)/4294967296};return u.double=function(){do var m=c.next()>>>11,d=(c.next()>>>0)/4294967296,h=(m+d)/(1<<21);while(h===0);return h},u.int32=c.next,u.quick=u,o&&(typeof o=="object"&&n(o,c),u.state=function(){return n(c,{})}),u}r&&r.exports?r.exports=i:t&&t.amd?t(function(){return i}):this.tychei=i})(VB,typeof OD=="object"&&OD,typeof define=="function"&&define)});var QB=vn(()=>{});var JB=vn((XB,Wg)=>{(function(e,r,t){var a=256,n=6,i=52,s="random",l=t.pow(a,n),c=t.pow(2,i),o=c*2,u=a-1,m;function d(b,A,M){var D=[];A=A==!0?{entropy:!0}:A||{};var O=x(v(A.entropy?[b,C(r)]:b??w(),3),D),_=new h(D),E=function(){for(var T=_.g(n),R=l,L=0;T=o;)T/=2,R/=2,L>>>=1;return(T+L)/R};return E.int32=function(){return _.g(4)|0},E.quick=function(){return _.g(4)/4294967296},E.double=E,x(C(_.S),r),(A.pass||M||function(T,R,L,H){return H&&(H.S&&y(H,_),T.state=function(){return y(_,{})}),L?(t[s]=T,R):T})(E,O,"global"in A?A.global:this==t,A.state)}function h(b){var A,M=b.length,D=this,O=0,_=D.i=D.j=0,E=D.S=[];for(M||(b=[M++]);O{var tV=qB(),nV=zB(),aV=WB(),iV=HB(),oV=GB(),sV=ZB(),Bs=JB();Bs.alea=tV;Bs.xor128=nV;Bs.xorwow=aV;Bs.xorshift7=iV;Bs.xor4096=oV;Bs.tychei=sV;KB.exports=Bs});var e5=vn((RIe,TS)=>{function ES(){}ES.prototype={on:function(e,r,t){var a=this.e||(this.e={});return(a[e]||(a[e]=[])).push({fn:r,ctx:t}),this},once:function(e,r,t){var a=this;function n(){a.off(e,n),r.apply(t,arguments)}return n._=r,this.on(e,n,t)},emit:function(e){var r=[].slice.call(arguments,1),t=((this.e||(this.e={}))[e]||[]).slice(),a=0,n=t.length;for(a;a{(function(e,r){typeof FS=="object"&&typeof Nf<"u"?Nf.exports=r():typeof define=="function"&&define.amd?define(r):e.moment=r()})(FS,function(){"use strict";var e;function r(){return e.apply(null,arguments)}function t(g){e=g}function a(g){return g instanceof Array||Object.prototype.toString.call(g)==="[object Array]"}function n(g){return g!=null&&Object.prototype.toString.call(g)==="[object Object]"}function i(g,N){return Object.prototype.hasOwnProperty.call(g,N)}function s(g){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(g).length===0;var N;for(N in g)if(i(g,N))return!1;return!0}function l(g){return g===void 0}function c(g){return typeof g=="number"||Object.prototype.toString.call(g)==="[object Number]"}function o(g){return g instanceof Date||Object.prototype.toString.call(g)==="[object Date]"}function u(g,N){var I=[],U,V=g.length;for(U=0;U>>0,U;for(U=0;U0)for(I=0;I=0;return(se?I?"+":"":"-")+Math.pow(10,Math.max(0,V)).toString().substr(1)+U}var z=/(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,oe=/(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,pe={},ae={};function $(g,N,I,U){var V=U;typeof U=="string"&&(V=function(){return this[U]()}),g&&(ae[g]=V),N&&(ae[N[0]]=function(){return K(V.apply(this,arguments),N[1],N[2])}),I&&(ae[I]=function(){return this.localeData().ordinal(V.apply(this,arguments),g)})}function le(g){return g.match(/\\[[\\s\\S]/)?g.replace(/^\\[|\\]$/g,""):g.replace(/\\\\/g,"")}function Ee(g){var N=g.match(z),I,U;for(I=0,U=N.length;I=0&&oe.test(g);)g=g.replace(oe,U),oe.lastIndex=0,I-=1;return g}var Se={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function ye(g){var N=this._longDateFormat[g],I=this._longDateFormat[g.toUpperCase()];return N||!I?N:(this._longDateFormat[g]=I.match(z).map(function(U){return U==="MMMM"||U==="MM"||U==="DD"||U==="dddd"?U.slice(1):U}).join(""),this._longDateFormat[g])}var be="Invalid date";function De(){return this._invalidDate}var Ae="%d",We=/\\d{1,2}/;function Je(g){return this._ordinal.replace("%d",g)}var J={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function re(g,N,I,U){var V=this._relativeTime[I];return R(V)?V(g,N,I,U):V.replace(/%d/i,g)}function xe(g,N){var I=this._relativeTime[g>0?"future":"past"];return R(I)?I(N):I.replace(/%s/i,N)}var j={};function ne(g,N){var I=g.toLowerCase();j[I]=j[I+"s"]=j[N]=g}function ue(g){return typeof g=="string"?j[g]||j[g.toLowerCase()]:void 0}function Me(g){var N={},I,U;for(U in g)i(g,U)&&(I=ue(U),I&&(N[I]=g[U]));return N}var Ce={};function Le(g,N){Ce[g]=N}function Ie(g){var N=[],I;for(I in g)i(g,I)&&N.push({unit:I,priority:Ce[I]});return N.sort(function(U,V){return U.priority-V.priority}),N}function fr(g){return g%4===0&&g%100!==0||g%400===0}function or(g){return g<0?Math.ceil(g)||0:Math.floor(g)}function Ke(g){var N=+g,I=0;return N!==0&&isFinite(N)&&(I=or(N)),I}function Br(g,N){return function(I){return I!=null?(ce(this,g,I),r.updateOffset(this,N),this):ee(this,g)}}function ee(g,N){return g.isValid()?g._d["get"+(g._isUTC?"UTC":"")+N]():NaN}function ce(g,N,I){g.isValid()&&!isNaN(I)&&(N==="FullYear"&&fr(g.year())&&g.month()===1&&g.date()===29?(I=Ke(I),g._d["set"+(g._isUTC?"UTC":"")+N](I,g.month(),fo(I,g.month()))):g._d["set"+(g._isUTC?"UTC":"")+N](I))}function we(g){return g=ue(g),R(this[g])?this[g]():this}function Be(g,N){if(typeof g=="object"){g=Me(g);var I=Ie(g),U,V=I.length;for(U=0;U68?1900:2e3)};var zf=Br("FullYear",!0);function yx(){return fr(this.year())}function Zc(g,N,I,U,V,se,Fe){var dr;return g<100&&g>=0?(dr=new Date(g+400,N,I,U,V,se,Fe),isFinite(dr.getFullYear())&&dr.setFullYear(g)):dr=new Date(g,N,I,U,V,se,Fe),dr}function co(g){var N,I;return g<100&&g>=0?(I=Array.prototype.slice.call(arguments),I[0]=g+400,N=new Date(Date.UTC.apply(null,I)),isFinite(N.getUTCFullYear())&&N.setUTCFullYear(g)):N=new Date(Date.UTC.apply(null,arguments)),N}function lo(g,N,I){var U=7+N-I,V=(7+co(g,0,U).getUTCDay()-N)%7;return-V+U-1}function Qc(g,N,I,U,V){var se=(7+I-U)%7,Fe=lo(g,U,V),dr=1+7*(N-1)+se+Fe,_r,tt;return dr<=0?(_r=g-1,tt=di(_r)+dr):dr>di(g)?(_r=g+1,tt=dr-di(g)):(_r=g,tt=dr),{year:_r,dayOfYear:tt}}function mo(g,N,I){var U=lo(g.year(),N,I),V=Math.floor((g.dayOfYear()-U-1)/7)+1,se,Fe;return V<1?(Fe=g.year()-1,se=V+ia(Fe,N,I)):V>ia(g.year(),N,I)?(se=V-ia(g.year(),N,I),Fe=g.year()+1):(Fe=g.year(),se=V),{week:se,year:Fe}}function ia(g,N,I){var U=lo(g,N,I),V=lo(g+1,N,I);return(di(g)-U+V)/7}$("w",["ww",2],"wo","week"),$("W",["WW",2],"Wo","isoWeek"),ne("week","w"),ne("isoWeek","W"),Le("week",5),Le("isoWeek",5),nr("w",Q),nr("ww",Q,Te),nr("W",Q),nr("WW",Q,Te),Ii(["w","ww","W","WW"],function(g,N,I,U){N[U.substr(0,1)]=Ke(g)});function Uf(g){return mo(g,this._week.dow,this._week.doy).week}var po={dow:0,doy:6};function Xc(){return this._week.dow}function Jc(){return this._week.doy}function xx(g){var N=this.localeData().week(this);return g==null?N:this.add((g-N)*7,"d")}function Kc(g){var N=mo(this,1,4).week;return g==null?N:this.add((g-N)*7,"d")}$("d",0,"do","day"),$("dd",0,0,function(g){return this.localeData().weekdaysMin(this,g)}),$("ddd",0,0,function(g){return this.localeData().weekdaysShort(this,g)}),$("dddd",0,0,function(g){return this.localeData().weekdays(this,g)}),$("e",0,0,"weekday"),$("E",0,0,"isoWeekday"),ne("day","d"),ne("weekday","e"),ne("isoWeekday","E"),Le("day",11),Le("weekday",11),Le("isoWeekday",11),nr("d",Q),nr("e",Q),nr("E",Q),nr("dd",function(g,N){return N.weekdaysMinRegex(g)}),nr("ddd",function(g,N){return N.weekdaysShortRegex(g)}),nr("dddd",function(g,N){return N.weekdaysRegex(g)}),Ii(["dd","ddd","dddd"],function(g,N,I,U){var V=I._locale.weekdaysParse(g,U,I._strict);V!=null?N.d=V:y(I).invalidWeekday=g}),Ii(["d","e","E"],function(g,N,I,U){N[U]=Ke(g)});function jc(g,N){return typeof g!="string"?g:isNaN(g)?(g=N.weekdaysParse(g),typeof g=="number"?g:null):parseInt(g,10)}function el(g,N){return typeof g=="string"?N.weekdaysParse(g)%7||7:isNaN(g)?null:g}function Ys(g,N){return g.slice(N,7).concat(g.slice(0,N))}var bx="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),rl="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),wx="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),tl=Ha,Dx=Ha,Sx=Ha;function Nx(g,N){var I=a(this._weekdays)?this._weekdays:this._weekdays[g&&g!==!0&&this._weekdays.isFormat.test(N)?"format":"standalone"];return g===!0?Ys(I,this._week.dow):g?I[g.day()]:I}function Ax(g){return g===!0?Ys(this._weekdaysShort,this._week.dow):g?this._weekdaysShort[g.day()]:this._weekdaysShort}function Wf(g){return g===!0?Ys(this._weekdaysMin,this._week.dow):g?this._weekdaysMin[g.day()]:this._weekdaysMin}function Mx(g,N,I){var U,V,se,Fe=g.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],U=0;U<7;++U)se=d([2e3,1]).day(U),this._minWeekdaysParse[U]=this.weekdaysMin(se,"").toLocaleLowerCase(),this._shortWeekdaysParse[U]=this.weekdaysShort(se,"").toLocaleLowerCase(),this._weekdaysParse[U]=this.weekdays(se,"").toLocaleLowerCase();return I?N==="dddd"?(V=vt.call(this._weekdaysParse,Fe),V!==-1?V:null):N==="ddd"?(V=vt.call(this._shortWeekdaysParse,Fe),V!==-1?V:null):(V=vt.call(this._minWeekdaysParse,Fe),V!==-1?V:null):N==="dddd"?(V=vt.call(this._weekdaysParse,Fe),V!==-1||(V=vt.call(this._shortWeekdaysParse,Fe),V!==-1)?V:(V=vt.call(this._minWeekdaysParse,Fe),V!==-1?V:null)):N==="ddd"?(V=vt.call(this._shortWeekdaysParse,Fe),V!==-1||(V=vt.call(this._weekdaysParse,Fe),V!==-1)?V:(V=vt.call(this._minWeekdaysParse,Fe),V!==-1?V:null)):(V=vt.call(this._minWeekdaysParse,Fe),V!==-1||(V=vt.call(this._weekdaysParse,Fe),V!==-1)?V:(V=vt.call(this._shortWeekdaysParse,Fe),V!==-1?V:null))}function Cx(g,N,I){var U,V,se;if(this._weekdaysParseExact)return Mx.call(this,g,N,I);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),U=0;U<7;U++){if(V=d([2e3,1]).day(U),I&&!this._fullWeekdaysParse[U]&&(this._fullWeekdaysParse[U]=new RegExp("^"+this.weekdays(V,"").replace(".","\\\\.?")+"$","i"),this._shortWeekdaysParse[U]=new RegExp("^"+this.weekdaysShort(V,"").replace(".","\\\\.?")+"$","i"),this._minWeekdaysParse[U]=new RegExp("^"+this.weekdaysMin(V,"").replace(".","\\\\.?")+"$","i")),this._weekdaysParse[U]||(se="^"+this.weekdays(V,"")+"|^"+this.weekdaysShort(V,"")+"|^"+this.weekdaysMin(V,""),this._weekdaysParse[U]=new RegExp(se.replace(".",""),"i")),I&&N==="dddd"&&this._fullWeekdaysParse[U].test(g))return U;if(I&&N==="ddd"&&this._shortWeekdaysParse[U].test(g))return U;if(I&&N==="dd"&&this._minWeekdaysParse[U].test(g))return U;if(!I&&this._weekdaysParse[U].test(g))return U}}function Ex(g){if(!this.isValid())return g!=null?this:NaN;var N=this._isUTC?this._d.getUTCDay():this._d.getDay();return g!=null?(g=jc(g,this.localeData()),this.add(g-N,"d")):N}function Tx(g){if(!this.isValid())return g!=null?this:NaN;var N=(this.day()+7-this.localeData()._week.dow)%7;return g==null?N:this.add(g-N,"d")}function Fx(g){if(!this.isValid())return g!=null?this:NaN;if(g!=null){var N=el(g,this.localeData());return this.day(this.day()%7?N:N-7)}else return this.day()||7}function xt(g){return this._weekdaysParseExact?(i(this,"_weekdaysRegex")||Yf.call(this),g?this._weekdaysStrictRegex:this._weekdaysRegex):(i(this,"_weekdaysRegex")||(this._weekdaysRegex=tl),this._weekdaysStrictRegex&&g?this._weekdaysStrictRegex:this._weekdaysRegex)}function gt(g){return this._weekdaysParseExact?(i(this,"_weekdaysRegex")||Yf.call(this),g?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(i(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Dx),this._weekdaysShortStrictRegex&&g?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function _x(g){return this._weekdaysParseExact?(i(this,"_weekdaysRegex")||Yf.call(this),g?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(i(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Sx),this._weekdaysMinStrictRegex&&g?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Yf(){function g(hn,Ca){return Ca.length-hn.length}var N=[],I=[],U=[],V=[],se,Fe,dr,_r,tt;for(se=0;se<7;se++)Fe=d([2e3,1]).day(se),dr=mn(this.weekdaysMin(Fe,"")),_r=mn(this.weekdaysShort(Fe,"")),tt=mn(this.weekdays(Fe,"")),N.push(dr),I.push(_r),U.push(tt),V.push(dr),V.push(_r),V.push(tt);N.sort(g),I.sort(g),U.sort(g),V.sort(g),this._weekdaysRegex=new RegExp("^("+V.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+U.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+I.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+N.join("|")+")","i")}function Hf(){return this.hours()%12||12}function Ox(){return this.hours()||24}$("H",["HH",2],0,"hour"),$("h",["hh",2],0,Hf),$("k",["kk",2],0,Ox),$("hmm",0,0,function(){return""+Hf.apply(this)+K(this.minutes(),2)}),$("hmmss",0,0,function(){return""+Hf.apply(this)+K(this.minutes(),2)+K(this.seconds(),2)}),$("Hmm",0,0,function(){return""+this.hours()+K(this.minutes(),2)}),$("Hmmss",0,0,function(){return""+this.hours()+K(this.minutes(),2)+K(this.seconds(),2)});function nl(g,N){$(g,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),N)})}nl("a",!0),nl("A",!1),ne("hour","h"),Le("hour",13);function al(g,N){return N._meridiemParse}nr("a",al),nr("A",al),nr("H",Q),nr("h",Q),nr("k",Q),nr("HH",Q,Te),nr("hh",Q,Te),nr("kk",Q,Te),nr("hmm",ve),nr("hmmss",Pe),nr("Hmm",ve),nr("Hmmss",Pe),ot(["H","HH"],Tt),ot(["k","kk"],function(g,N,I){var U=Ke(g);N[Tt]=U===24?0:U}),ot(["a","A"],function(g,N,I){I._isPm=I._locale.isPM(g),I._meridiem=g}),ot(["h","hh"],function(g,N,I){N[Tt]=Ke(g),y(I).bigHour=!0}),ot("hmm",function(g,N,I){var U=g.length-2;N[Tt]=Ke(g.substr(0,U)),N[On]=Ke(g.substr(U)),y(I).bigHour=!0}),ot("hmmss",function(g,N,I){var U=g.length-4,V=g.length-2;N[Tt]=Ke(g.substr(0,U)),N[On]=Ke(g.substr(U,2)),N[aa]=Ke(g.substr(V)),y(I).bigHour=!0}),ot("Hmm",function(g,N,I){var U=g.length-2;N[Tt]=Ke(g.substr(0,U)),N[On]=Ke(g.substr(U))}),ot("Hmmss",function(g,N,I){var U=g.length-4,V=g.length-2;N[Tt]=Ke(g.substr(0,U)),N[On]=Ke(g.substr(U,2)),N[aa]=Ke(g.substr(V))});function il(g){return(g+"").toLowerCase().charAt(0)==="p"}var Bx=/[ap]\\.?m?\\.?/i,Vt=Br("Hours",!0);function $f(g,N,I){return g>11?I?"pm":"PM":I?"am":"AM"}var hi={calendar:q,longDateFormat:Se,invalidDate:be,ordinal:Ae,dayOfMonthOrdinalParse:We,relativeTime:J,months:Rf,monthsShort:Ls,week:po,weekdays:bx,weekdaysMin:wx,weekdaysShort:rl,meridiemParse:Bx},bt={},ki={},sn;function ol(g,N){var I,U=Math.min(g.length,N.length);for(I=0;I0;){if(V=es(se.slice(0,I).join("-")),V)return V;if(U&&U.length>=I&&ol(se,U)>=I-1)break;I--}N++}return sn}function ul(g){return g.match("^[^/\\\\\\\\]*$")!=null}function es(g){var N=null,I;if(bt[g]===void 0&&typeof Nf<"u"&&Nf&&Nf.exports&&ul(g))try{N=sn._abbr,I=require,I("./locale/"+g),Va(N)}catch{bt[g]=null}return bt[g]}function Va(g,N){var I;return g&&(l(N)?I=It(g):I=pn(g,N),I?sn=I:typeof console<"u"&&console.warn&&console.warn("Locale "+g+" not found. Did you forget to load it?")),sn._abbr}function pn(g,N){if(N!==null){var I,U=hi;if(N.abbr=g,bt[g]!=null)T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),U=bt[g]._config;else if(N.parentLocale!=null)if(bt[N.parentLocale]!=null)U=bt[N.parentLocale]._config;else if(I=es(N.parentLocale),I!=null)U=I._config;else return ki[N.parentLocale]||(ki[N.parentLocale]=[]),ki[N.parentLocale].push({name:g,config:N}),null;return bt[g]=new G(H(U,N)),ki[g]&&ki[g].forEach(function(V){pn(V.name,V.config)}),Va(g),bt[g]}else return delete bt[g],null}function Px(g,N){if(N!=null){var I,U,V=hi;bt[g]!=null&&bt[g].parentLocale!=null?bt[g].set(H(bt[g]._config,N)):(U=es(g),U!=null&&(V=U._config),N=H(V,N),U==null&&(N.abbr=g),I=new G(N),I.parentLocale=bt[g],bt[g]=I),Va(g)}else bt[g]!=null&&(bt[g].parentLocale!=null?(bt[g]=bt[g].parentLocale,g===Va()&&Va(g)):bt[g]!=null&&delete bt[g]);return bt[g]}function It(g){var N;if(g&&g._locale&&g._locale._abbr&&(g=g._locale._abbr),!g)return sn;if(!a(g)){if(N=es(g),N)return N;g=[g]}return sl(g)}function Ix(){return W(bt)}function Hs(g){var N,I=g._a;return I&&y(g).overflow===-2&&(N=I[Wn]<0||I[Wn]>11?Wn:I[Yn]<1||I[Yn]>fo(I[Gt],I[Wn])?Yn:I[Tt]<0||I[Tt]>24||I[Tt]===24&&(I[On]!==0||I[aa]!==0||I[$a]!==0)?Tt:I[On]<0||I[On]>59?On:I[aa]<0||I[aa]>59?aa:I[$a]<0||I[$a]>999?$a:-1,y(g)._overflowDayOfYear&&(NYn)&&(N=Yn),y(g)._overflowWeeks&&N===-1&&(N=Pf),y(g)._overflowWeekday&&N===-1&&(N=uo),y(g).overflow=N),g}var vi=/^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,$s=/^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,Vf=/Z|[+-]\\d\\d(?::?\\d\\d)?/,dt=[["YYYYYY-MM-DD",/[+-]\\d{6}-\\d\\d-\\d\\d/],["YYYY-MM-DD",/\\d{4}-\\d\\d-\\d\\d/],["GGGG-[W]WW-E",/\\d{4}-W\\d\\d-\\d/],["GGGG-[W]WW",/\\d{4}-W\\d\\d/,!1],["YYYY-DDD",/\\d{4}-\\d{3}/],["YYYY-MM",/\\d{4}-\\d\\d/,!1],["YYYYYYMMDD",/[+-]\\d{10}/],["YYYYMMDD",/\\d{8}/],["GGGG[W]WWE",/\\d{4}W\\d{3}/],["GGGG[W]WW",/\\d{4}W\\d{2}/,!1],["YYYYDDD",/\\d{7}/],["YYYYMM",/\\d{6}/,!1],["YYYY",/\\d{4}/,!1]],Da=[["HH:mm:ss.SSSS",/\\d\\d:\\d\\d:\\d\\d\\.\\d+/],["HH:mm:ss,SSSS",/\\d\\d:\\d\\d:\\d\\d,\\d+/],["HH:mm:ss",/\\d\\d:\\d\\d:\\d\\d/],["HH:mm",/\\d\\d:\\d\\d/],["HHmmss.SSSS",/\\d\\d\\d\\d\\d\\d\\.\\d+/],["HHmmss,SSSS",/\\d\\d\\d\\d\\d\\d,\\d+/],["HHmmss",/\\d\\d\\d\\d\\d\\d/],["HHmm",/\\d\\d\\d\\d/],["HH",/\\d\\d/]],Zf=/^\\/?Date\\((-?\\d+)/i,Rx=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,Qf={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function fl(g){var N,I,U=g._i,V=vi.exec(U)||$s.exec(U),se,Fe,dr,_r,tt=dt.length,hn=Da.length;if(V){for(y(g).iso=!0,N=0,I=tt;Ndi(Fe)||g._dayOfYear===0)&&(y(g)._overflowDayOfYear=!0),I=co(Fe,0,g._dayOfYear),g._a[Wn]=I.getUTCMonth(),g._a[Yn]=I.getUTCDate()),N=0;N<3&&g._a[N]==null;++N)g._a[N]=U[N]=V[N];for(;N<7;N++)g._a[N]=U[N]=g._a[N]==null?N===2?1:0:g._a[N];g._a[Tt]===24&&g._a[On]===0&&g._a[aa]===0&&g._a[$a]===0&&(g._nextDay=!0,g._a[Tt]=0),g._d=(g._useUTC?co:Zc).apply(null,U),se=g._useUTC?g._d.getUTCDay():g._d.getDay(),g._tzm!=null&&g._d.setUTCMinutes(g._d.getUTCMinutes()-g._tzm),g._nextDay&&(g._a[Tt]=24),g._w&&typeof g._w.d<"u"&&g._w.d!==se&&(y(g).weekdayMismatch=!0)}}function pl(g){var N,I,U,V,se,Fe,dr,_r,tt;N=g._w,N.GG!=null||N.W!=null||N.E!=null?(se=1,Fe=4,I=qi(N.GG,g._a[Gt],mo(yt(),1,4).year),U=qi(N.W,1),V=qi(N.E,1),(V<1||V>7)&&(_r=!0)):(se=g._locale._week.dow,Fe=g._locale._week.doy,tt=mo(yt(),se,Fe),I=qi(N.gg,g._a[Gt],tt.year),U=qi(N.w,tt.week),N.d!=null?(V=N.d,(V<0||V>6)&&(_r=!0)):N.e!=null?(V=N.e+se,(N.e<0||N.e>6)&&(_r=!0)):V=se),U<1||U>ia(I,se,Fe)?y(g)._overflowWeeks=!0:_r!=null?y(g)._overflowWeekday=!0:(dr=Qc(I,U,V,se,Fe),g._a[Gt]=dr.year,g._dayOfYear=dr.dayOfYear)}r.ISO_8601=function(){},r.RFC_2822=function(){};function Jf(g){if(g._f===r.ISO_8601){fl(g);return}if(g._f===r.RFC_2822){ll(g);return}g._a=[],y(g).empty=!0;var N=""+g._i,I,U,V,se,Fe,dr=N.length,_r=0,tt,hn;for(V=ge(g._f,g._locale).match(z)||[],hn=V.length,I=0;I0&&y(g).unusedInput.push(Fe),N=N.slice(N.indexOf(U)+U.length),_r+=U.length),ae[se]?(U?y(g).empty=!1:y(g).unusedTokens.push(se),Bf(se,U,g)):g._strict&&!U&&y(g).unusedTokens.push(se);y(g).charsLeftOver=dr-_r,N.length>0&&y(g).unusedInput.push(N),g._a[Tt]<=12&&y(g).bigHour===!0&&g._a[Tt]>0&&(y(g).bigHour=void 0),y(g).parsedDateParts=g._a.slice(0),y(g).meridiem=g._meridiem,g._a[Tt]=Kf(g._locale,g._a[Tt],g._meridiem),tt=y(g).era,tt!==null&&(g._a[Gt]=g._locale.erasConvertYear(tt,g._a[Gt])),rs(g),Hs(g)}function Kf(g,N,I){var U;return I==null?N:g.meridiemHour!=null?g.meridiemHour(N,I):(g.isPM!=null&&(U=g.isPM(I),U&&N<12&&(N+=12),!U&&N===12&&(N=0)),N)}function jf(g){var N,I,U,V,se,Fe,dr=!1,_r=g._f.length;if(_r===0){y(g).invalidFormat=!0,g._d=new Date(NaN);return}for(V=0;V<_r;V++)se=0,Fe=!1,N=A({},g),g._useUTC!=null&&(N._useUTC=g._useUTC),N._f=g._f[V],Jf(N),x(N)&&(Fe=!0),se+=y(N).charsLeftOver,se+=y(N).unusedTokens.length*10,y(N).score=se,dr?sethis?this:g:w()});function vl(g,N){var I,U;if(N.length===1&&a(N[0])&&(N=N[0]),!N.length)return yt();for(I=N[0],U=1;Uthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function _e(){if(!l(this._isDSTShifted))return this._isDSTShifted;var g={},N;return A(g,this),g=wn(g),g._a?(N=g._isUTC?d(g._a):yt(g._a),this._isDSTShifted=this.isValid()&&Gx(g._a,N.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Ne(){return this.isValid()?!this._isUTC:!1}function ir(){return this.isValid()?this._isUTC:!1}function Ar(){return this.isValid()?this._isUTC&&this._offset===0:!1}var rt=/^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,zt=/^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Lr(g,N){var I=g,U=null,V,se,Fe;return oa(g)?I={ms:g._milliseconds,d:g._days,M:g._months}:c(g)||!isNaN(+g)?(I={},N?I[N]=+g:I.milliseconds=+g):(U=rt.exec(g))?(V=U[1]==="-"?-1:1,I={y:0,d:Ke(U[Yn])*V,h:Ke(U[Tt])*V,m:Ke(U[On])*V,s:Ke(U[aa])*V,ms:Ke(go(U[$a]*1e3))*V}):(U=zt.exec(g))?(V=U[1]==="-"?-1:1,I={y:Za(U[2],V),M:Za(U[3],V),w:Za(U[4],V),d:Za(U[5],V),h:Za(U[6],V),m:Za(U[7],V),s:Za(U[8],V)}):I==null?I={}:typeof I=="object"&&("from"in I||"to"in I)&&(Fe=Hn(yt(I.from),yt(I.to)),I={},I.ms=Fe.milliseconds,I.M=Fe.months),se=new ts(I),oa(g)&&i(g,"_locale")&&(se._locale=g._locale),oa(g)&&i(g,"_isValid")&&(se._isValid=g._isValid),se}Lr.fn=ts.prototype,Lr.invalid=rc;function Za(g,N){var I=g&&parseFloat(g.replace(",","."));return(isNaN(I)?0:I)*N}function yl(g,N){var I={};return I.months=N.month()-g.month()+(N.year()-g.year())*12,g.clone().add(I.months,"M").isAfter(N)&&--I.months,I.milliseconds=+N-+g.clone().add(I.months,"M"),I}function Hn(g,N){var I;return g.isValid()&&N.isValid()?(N=Bn(N,g),g.isBefore(N)?I=yl(g,N):(I=yl(N,g),I.milliseconds=-I.milliseconds,I.months=-I.months),I):{milliseconds:0,months:0}}function ns(g,N){return function(I,U){var V,se;return U!==null&&!isNaN(+U)&&(T(N,"moment()."+N+"(period, number) is deprecated. Please use moment()."+N+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),se=I,I=U,U=se),V=Lr(I,U),xl(this,V,g),this}}function xl(g,N,I,U){var V=N._milliseconds,se=go(N._days),Fe=go(N._months);!g.isValid()||(U=U??!0,Fe&&pi(g,ee(g,"Month")+Fe*I),se&&ce(g,"Date",ee(g,"Date")+se*I),V&&g._d.setTime(g._d.valueOf()+V*I),U&&r.updateOffset(g,se||Fe))}var yo=ns(1,"add"),Zs=ns(-1,"subtract");function as(g){return typeof g=="string"||g instanceof String}function ut(g){return D(g)||o(g)||as(g)||c(g)||bl(g)||jx(g)||g===null||g===void 0}function jx(g){var N=n(g)&&!s(g),I=!1,U=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],V,se,Fe=U.length;for(V=0;VI.valueOf():I.valueOf()9999?me(I,N?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):R(Date.prototype.toISOString)?N?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",me(I,"Z")):me(I,N?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function zi(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var g="moment",N="",I,U,V,se;return this.isLocal()||(g=this.utcOffset()===0?"moment.utc":"moment.parseZone",N="Z"),I="["+g+'("]',U=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",V="-MM-DD[T]HH:mm:ss.SSS",se=N+'[")]',this.format(I+U+V+se)}function js(g){g||(g=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var N=me(this,g);return this.localeData().postformat(N)}function n1(g,N){return this.isValid()&&(D(g)&&g.isValid()||yt(g).isValid())?Lr({to:this,from:g}).locale(this.locale()).humanize(!N):this.localeData().invalidDate()}function a1(g){return this.from(yt(),g)}function i1(g,N){return this.isValid()&&(D(g)&&g.isValid()||yt(g).isValid())?Lr({from:this,to:g}).locale(this.locale()).humanize(!N):this.localeData().invalidDate()}function eu(g){return this.to(yt(),g)}function os(g){var N;return g===void 0?this._locale._abbr:(N=It(g),N!=null&&(this._locale=N),this)}var ru=_("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(g){return g===void 0?this.localeData():this.locale(g)});function Al(){return this._locale}var ss=1e3,xo=60*ss,tu=60*xo,Rt=(365*400+97)*24*tu;function Ft(g,N){return(g%N+N)%N}function Ml(g,N,I){return g<100&&g>=0?new Date(g+400,N,I)-Rt:new Date(g,N,I).valueOf()}function Cl(g,N,I){return g<100&&g>=0?Date.UTC(g+400,N,I)-Rt:Date.UTC(g,N,I)}function El(g){var N,I;if(g=ue(g),g===void 0||g==="millisecond"||!this.isValid())return this;switch(I=this._isUTC?Cl:Ml,g){case"year":N=I(this.year(),0,1);break;case"quarter":N=I(this.year(),this.month()-this.month()%3,1);break;case"month":N=I(this.year(),this.month(),1);break;case"week":N=I(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":N=I(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":N=I(this.year(),this.month(),this.date());break;case"hour":N=this._d.valueOf(),N-=Ft(N+(this._isUTC?0:this.utcOffset()*xo),tu);break;case"minute":N=this._d.valueOf(),N-=Ft(N,xo);break;case"second":N=this._d.valueOf(),N-=Ft(N,ss);break}return this._d.setTime(N),r.updateOffset(this,!0),this}function o1(g){var N,I;if(g=ue(g),g===void 0||g==="millisecond"||!this.isValid())return this;switch(I=this._isUTC?Cl:Ml,g){case"year":N=I(this.year()+1,0,1)-1;break;case"quarter":N=I(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":N=I(this.year(),this.month()+1,1)-1;break;case"week":N=I(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":N=I(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":N=I(this.year(),this.month(),this.date()+1)-1;break;case"hour":N=this._d.valueOf(),N+=tu-Ft(N+(this._isUTC?0:this.utcOffset()*xo),tu)-1;break;case"minute":N=this._d.valueOf(),N+=xo-Ft(N,xo)-1;break;case"second":N=this._d.valueOf(),N+=ss-Ft(N,ss)-1;break}return this._d.setTime(N),r.updateOffset(this,!0),this}function tc(){return this._d.valueOf()-(this._offset||0)*6e4}function us(){return Math.floor(this.valueOf()/1e3)}function nc(){return new Date(this.valueOf())}function bo(){var g=this;return[g.year(),g.month(),g.date(),g.hour(),g.minute(),g.second(),g.millisecond()]}function fs(){var g=this;return{years:g.year(),months:g.month(),date:g.date(),hours:g.hours(),minutes:g.minutes(),seconds:g.seconds(),milliseconds:g.milliseconds()}}function cs(){return this.isValid()?this.toISOString():null}function nu(){return x(this)}function wo(){return m({},y(this))}function s1(){return y(this).overflow}function u1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}$("N",0,0,"eraAbbr"),$("NN",0,0,"eraAbbr"),$("NNN",0,0,"eraAbbr"),$("NNNN",0,0,"eraName"),$("NNNNN",0,0,"eraNarrow"),$("y",["y",1],"yo","eraYear"),$("y",["yy",2],0,"eraYear"),$("y",["yyy",3],0,"eraYear"),$("y",["yyyy",4],0,"eraYear"),nr("N",Rr),nr("NN",Rr),nr("NNN",Rr),nr("NNNN",m1),nr("NNNNN",p1),ot(["N","NN","NNN","NNNN","NNNNN"],function(g,N,I,U){var V=I._locale.erasParse(g,U,I._strict);V?y(I).era=V:y(I).invalidEra=g}),nr("y",Pt),nr("yy",Pt),nr("yyy",Pt),nr("yyyy",Pt),nr("yo",d1),ot(["y","yy","yyy","yyyy"],Gt),ot(["yo"],function(g,N,I,U){var V;I._locale._eraYearOrdinalRegex&&(V=g.match(I._locale._eraYearOrdinalRegex)),I._locale.eraYearOrdinalParse?N[Gt]=I._locale.eraYearOrdinalParse(g,V):N[Gt]=parseInt(g,10)});function f1(g,N){var I,U,V,se=this._eras||It("en")._eras;for(I=0,U=se.length;I=0)return se[U]}function l1(g,N){var I=g.since<=g.until?1:-1;return N===void 0?r(g.since).year():r(g.since).year()+(N-g.offset)*I}function au(){var g,N,I,U=this.localeData().eras();for(g=0,N=U.length;gse&&(N=se),b1.call(this,g,N,I,U,V))}function b1(g,N,I,U,V){var se=Qc(g,N,I,U,V),Fe=co(se.year,0,se.dayOfYear);return this.year(Fe.getUTCFullYear()),this.month(Fe.getUTCMonth()),this.date(Fe.getUTCDate()),this}$("Q",0,"Qo","quarter"),ne("quarter","Q"),Le("quarter",7),nr("Q",ke),ot("Q",function(g,N){N[Wn]=(Ke(g)-1)*3});function w1(g){return g==null?Math.ceil((this.month()+1)/3):this.month((g-1)*3+this.month()%3)}$("D",["DD",2],"Do","date"),ne("date","D"),Le("date",9),nr("D",Q),nr("DD",Q,Te),nr("Do",function(g,N){return g?N._dayOfMonthOrdinalParse||N._ordinalParse:N._dayOfMonthOrdinalParseLenient}),ot(["D","DD"],Yn),ot("Do",function(g,N){N[Yn]=Ke(g.match(Q)[0])});var _l=Br("Date",!0);$("DDD",["DDDD",3],"DDDo","dayOfYear"),ne("dayOfYear","DDD"),Le("dayOfYear",4),nr("DDD",tr),nr("DDDD",Re),ot(["DDD","DDDD"],function(g,N,I){I._dayOfYear=Ke(g)});function Ja(g){var N=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return g==null?N:this.add(g-N,"d")}$("m",["mm",2],0,"minute"),ne("minute","m"),Le("minute",14),nr("m",Q),nr("mm",Q,Te),ot(["m","mm"],On);var D1=Br("Minutes",!1);$("s",["ss",2],0,"second"),ne("second","s"),Le("second",15),nr("s",Q),nr("ss",Q,Te),ot(["s","ss"],aa);var S1=Br("Seconds",!1);$("S",0,0,function(){return~~(this.millisecond()/100)}),$(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),$(0,["SSS",3],0,"millisecond"),$(0,["SSSS",4],0,function(){return this.millisecond()*10}),$(0,["SSSSS",5],0,function(){return this.millisecond()*100}),$(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),$(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),$(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),$(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),ne("millisecond","ms"),Le("millisecond",16),nr("S",tr,ke),nr("SS",tr,Te),nr("SSS",tr,Re);var bi,Ol;for(bi="SSSS";bi.length<=9;bi+="S")nr(bi,Pt);function N1(g,N){N[$a]=Ke(("0."+g)*1e3)}for(bi="S";bi.length<=9;bi+="S")ot(bi,N1);Ol=Br("Milliseconds",!1),$("z",0,0,"zoneAbbr"),$("zz",0,0,"zoneName");function Ui(){return this._isUTC?"UTC":""}function A1(){return this._isUTC?"Coordinated Universal Time":""}var Ve=M.prototype;Ve.add=yo,Ve.calendar=r1,Ve.clone=t1,Ve.diff=Sl,Ve.endOf=o1,Ve.format=js,Ve.from=n1,Ve.fromNow=a1,Ve.to=i1,Ve.toNow=eu,Ve.get=we,Ve.invalidAt=s1,Ve.isAfter=Xs,Ve.isBefore=xi,Ve.isBetween=Js,Ve.isSame=wl,Ve.isSameOrAfter=Ks,Ve.isSameOrBefore=Dl,Ve.isValid=nu,Ve.lang=ru,Ve.locale=os,Ve.localeData=Al,Ve.max=zx,Ve.min=hl,Ve.parsingFlags=wo,Ve.set=Be,Ve.startOf=El,Ve.subtract=Zs,Ve.toArray=bo,Ve.toObject=fs,Ve.toDate=nc,Ve.toISOString=is,Ve.inspect=zi,typeof Symbol<"u"&&Symbol.for!=null&&(Ve[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Ve.toJSON=cs,Ve.toString=Nl,Ve.unix=us,Ve.valueOf=tc,Ve.creationData=u1,Ve.eraName=au,Ve.eraNarrow=ls,Ve.eraAbbr=Tl,Ve.eraYear=Z,Ve.year=zf,Ve.isLeapYear=yx,Ve.weekYear=h1,Ve.isoWeekYear=v1,Ve.quarter=Ve.quarters=w1,Ve.month=Ga,Ve.daysInMonth=Ws,Ve.week=Ve.weeks=xx,Ve.isoWeek=Ve.isoWeeks=Kc,Ve.weeksInYear=Xa,Ve.weeksInWeekYear=x1,Ve.isoWeeksInYear=g1,Ve.isoWeeksInISOWeekYear=y1,Ve.date=_l,Ve.day=Ve.days=Ex,Ve.weekday=Tx,Ve.isoWeekday=Fx,Ve.dayOfYear=Ja,Ve.hour=Ve.hours=Vt,Ve.minute=Ve.minutes=D1,Ve.second=Ve.seconds=S1,Ve.millisecond=Ve.milliseconds=Ol,Ve.utcOffset=Zx,Ve.utc=Xx,Ve.local=Jx,Ve.parseZone=Kx,Ve.hasAlignedHourOffset=yi,Ve.isDST=de,Ve.isLocal=Ne,Ve.isUtcOffset=ir,Ve.isUtc=Ar,Ve.isUTC=Ar,Ve.zoneAbbr=Ui,Ve.zoneName=A1,Ve.dates=_("dates accessor is deprecated. Use date instead.",_l),Ve.months=_("months accessor is deprecated. Use month instead",Ga),Ve.years=_("years accessor is deprecated. Use year instead",zf),Ve.zone=_("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Qx),Ve.isDSTShifted=_("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",_e);function sa(g){return yt(g*1e3)}function M1(){return yt.apply(null,arguments).parseZone()}function Bl(g){return g}var Jr=G.prototype;Jr.calendar=k,Jr.longDateFormat=ye,Jr.invalidDate=De,Jr.ordinal=Je,Jr.preparse=Bl,Jr.postformat=Bl,Jr.relativeTime=re,Jr.pastFuture=xe,Jr.set=L,Jr.eras=f1,Jr.erasParse=c1,Jr.erasConvertYear=l1,Jr.erasAbbrRegex=iu,Jr.erasNameRegex=Do,Jr.erasNarrowRegex=$n,Jr.months=Ri,Jr.monthsShort=et,Jr.monthsParse=kf,Jr.monthsRegex=gx,Jr.monthsShortRegex=qf,Jr.week=Uf,Jr.firstDayOfYear=Jc,Jr.firstDayOfWeek=Xc,Jr.weekdays=Nx,Jr.weekdaysMin=Wf,Jr.weekdaysShort=Ax,Jr.weekdaysParse=Cx,Jr.weekdaysRegex=xt,Jr.weekdaysShortRegex=gt,Jr.weekdaysMinRegex=_x,Jr.isPM=il,Jr.meridiem=$f;function su(g,N,I,U){var V=It(),se=d().set(U,N);return V[I](se,g)}function Pl(g,N,I){if(c(g)&&(N=g,g=void 0),g=g||"",N!=null)return su(g,N,I,"month");var U,V=[];for(U=0;U<12;U++)V[U]=su(g,U,I,"month");return V}function uu(g,N,I,U){typeof g=="boolean"?(c(N)&&(I=N,N=void 0),N=N||""):(N=g,I=N,g=!1,c(N)&&(I=N,N=void 0),N=N||"");var V=It(),se=g?V._week.dow:0,Fe,dr=[];if(I!=null)return su(N,(I+se)%7,U,"day");for(Fe=0;Fe<7;Fe++)dr[Fe]=su(N,(Fe+se)%7,U,"day");return dr}function Il(g,N){return Pl(g,N,"months")}function C1(g,N){return Pl(g,N,"monthsShort")}function E1(g,N,I){return uu(g,N,I,"weekdays")}function ac(g,N,I){return uu(g,N,I,"weekdaysShort")}function ms(g,N,I){return uu(g,N,I,"weekdaysMin")}Va("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\\d{1,2}(th|st|nd|rd)/,ordinal:function(g){var N=g%10,I=Ke(g%100/10)===1?"th":N===1?"st":N===2?"nd":N===3?"rd":"th";return g+I}}),r.lang=_("moment.lang is deprecated. Use moment.locale instead.",Va),r.langData=_("moment.langData is deprecated. Use moment.localeData instead.",It);var Gn=Math.abs;function T1(){var g=this._data;return this._milliseconds=Gn(this._milliseconds),this._days=Gn(this._days),this._months=Gn(this._months),g.milliseconds=Gn(g.milliseconds),g.seconds=Gn(g.seconds),g.minutes=Gn(g.minutes),g.hours=Gn(g.hours),g.months=Gn(g.months),g.years=Gn(g.years),this}function ic(g,N,I,U){var V=Lr(N,I);return g._milliseconds+=U*V._milliseconds,g._days+=U*V._days,g._months+=U*V._months,g._bubble()}function F1(g,N){return ic(this,g,N,1)}function Ka(g,N){return ic(this,g,N,-1)}function fu(g){return g<0?Math.floor(g):Math.ceil(g)}function Wi(){var g=this._milliseconds,N=this._days,I=this._months,U=this._data,V,se,Fe,dr,_r;return g>=0&&N>=0&&I>=0||g<=0&&N<=0&&I<=0||(g+=fu(oc(I)+N)*864e5,N=0,I=0),U.milliseconds=g%1e3,V=or(g/1e3),U.seconds=V%60,se=or(V/60),U.minutes=se%60,Fe=or(se/60),U.hours=Fe%24,N+=or(Fe/24),_r=or(Pn(N)),I+=_r,N-=fu(oc(_r)),dr=or(I/12),I%=12,U.days=N,U.months=I,U.years=dr,this}function Pn(g){return g*4800/146097}function oc(g){return g*146097/4800}function Rl(g){if(!this.isValid())return NaN;var N,I,U=this._milliseconds;if(g=ue(g),g==="month"||g==="quarter"||g==="year")switch(N=this._days+U/864e5,I=this._months+Pn(N),g){case"month":return I;case"quarter":return I/3;case"year":return I/12}else switch(N=this._days+Math.round(oc(this._months)),g){case"week":return N/7+U/6048e5;case"day":return N+U/864e5;case"hour":return N*24+U/36e5;case"minute":return N*1440+U/6e4;case"second":return N*86400+U/1e3;case"millisecond":return Math.floor(N*864e5)+U;default:throw new Error("Unknown unit "+g)}}function kl(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+Ke(this._months/12)*31536e6:NaN}function In(g){return function(){return this.as(g)}}var wi=In("ms"),ql=In("s"),_1=In("m"),cu=In("h"),O1=In("d"),Ll=In("w"),Jt=In("M"),sc=In("Q"),zl=In("y");function Na(){return Lr(this)}function uc(g){return g=ue(g),this.isValid()?this[g+"s"]():NaN}function Aa(g){return function(){return this.isValid()?this._data[g]:NaN}}var Yi=Aa("milliseconds"),Ul=Aa("seconds"),dn=Aa("minutes"),fc=Aa("hours"),B1=Aa("days"),P1=Aa("months"),I1=Aa("years");function cc(){return or(this.days()/7)}var ja=Math.round,Ma={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Wl(g,N,I,U,V){return V.relativeTime(N||1,!!I,g,U)}function R1(g,N,I,U){var V=Lr(g).abs(),se=ja(V.as("s")),Fe=ja(V.as("m")),dr=ja(V.as("h")),_r=ja(V.as("d")),tt=ja(V.as("M")),hn=ja(V.as("w")),Ca=ja(V.as("y")),ei=se<=I.ss&&["s",se]||se0,ei[4]=U,Wl.apply(null,ei)}function k1(g){return g===void 0?ja:typeof g=="function"?(ja=g,!0):!1}function ps(g,N){return Ma[g]===void 0?!1:N===void 0?Ma[g]:(Ma[g]=N,g==="s"&&(Ma.ss=N-1),!0)}function q1(g,N){if(!this.isValid())return this.localeData().invalidDate();var I=!1,U=Ma,V,se;return typeof g=="object"&&(N=g,g=!1),typeof g=="boolean"&&(I=g),typeof N=="object"&&(U=Object.assign({},Ma,N),N.s!=null&&N.ss==null&&(U.ss=N.s-1)),V=this.localeData(),se=R1(this,!I,U,V),I&&(se=V.pastFuture(+this,se)),V.postformat(se)}var lc=Math.abs;function Di(g){return(g>0)-(g<0)||+g}function ds(){if(!this.isValid())return this.localeData().invalidDate();var g=lc(this._milliseconds)/1e3,N=lc(this._days),I=lc(this._months),U,V,se,Fe,dr=this.asSeconds(),_r,tt,hn,Ca;return dr?(U=or(g/60),V=or(U/60),g%=60,U%=60,se=or(I/12),I%=12,Fe=g?g.toFixed(3).replace(/\\.?0+$/,""):"",_r=dr<0?"-":"",tt=Di(this._months)!==Di(dr)?"-":"",hn=Di(this._days)!==Di(dr)?"-":"",Ca=Di(this._milliseconds)!==Di(dr)?"-":"",_r+"P"+(se?tt+se+"Y":"")+(I?tt+I+"M":"")+(N?hn+N+"D":"")+(V||U||g?"T":"")+(V?Ca+V+"H":"")+(U?Ca+U+"M":"")+(g?Ca+Fe+"S":"")):"P0D"}var Vr=ts.prototype;Vr.isValid=$x,Vr.abs=T1,Vr.add=F1,Vr.subtract=Ka,Vr.as=Rl,Vr.asMilliseconds=wi,Vr.asSeconds=ql,Vr.asMinutes=_1,Vr.asHours=cu,Vr.asDays=O1,Vr.asWeeks=Ll,Vr.asMonths=Jt,Vr.asQuarters=sc,Vr.asYears=zl,Vr.valueOf=kl,Vr._bubble=Wi,Vr.clone=Na,Vr.get=uc,Vr.milliseconds=Yi,Vr.seconds=Ul,Vr.minutes=dn,Vr.hours=fc,Vr.days=B1,Vr.weeks=cc,Vr.months=P1,Vr.years=I1,Vr.humanize=q1,Vr.toISOString=ds,Vr.toString=ds,Vr.toJSON=ds,Vr.locale=os,Vr.localeData=Al,Vr.toIsoString=_("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ds),Vr.lang=ru,$("X",0,0,"unix"),$("x",0,0,"valueOf"),nr("x",Xt),nr("X",Ff),ot("X",function(g,N,I){I._d=new Date(parseFloat(g)*1e3)}),ot("x",function(g,N,I){I._d=new Date(Ke(g))});return r.version="2.29.4",t(yt),r.fn=Ve,r.min=Ux,r.max=Wx,r.now=Yx,r.utc=d,r.unix=sa,r.months=Il,r.isDate=o,r.locale=Va,r.invalid=w,r.duration=Lr,r.isMoment=D,r.weekdays=E1,r.parseZone=M1,r.localeData=It,r.isDuration=oa,r.monthsShort=C1,r.weekdaysMin=ms,r.defineLocale=pn,r.updateLocale=Px,r.locales=Ix,r.weekdaysShort=ac,r.normalizeUnits=ue,r.relativeTimeRounding=k1,r.relativeTimeThreshold=ps,r.calendarFormat=e1,r.prototype=Ve,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r})});function _a(e){return _a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_a(e)}function Sn(e){if(e===null||e===!0||e===!1)return NaN;var r=Number(e);return isNaN(r)?r:r<0?Math.ceil(r):Math.floor(r)}function nt(e,r){if(r.length1?"s":"")+" required, but only "+r.length+" present")}function Yt(e){nt(1,arguments);var r=Object.prototype.toString.call(e);return e instanceof Date||_a(e)==="object"&&r==="[object Date]"?new Date(e.getTime()):typeof e=="number"||r==="[object Number]"?new Date(e):((typeof e=="string"||r==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use \`parseISO\` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function wb(e,r){nt(2,arguments);var t=Yt(e).getTime(),a=Sn(r);return new Date(t+a)}var Bk={};function Co(){return Bk}function Db(e){var r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),e.getTime()-r.getTime()}var Pk=365.2425,Ik=Math.pow(10,8)*24*60*60*1e3,Sb=6e4,Nb=36e5;var oQ=-Ik;var Rk=3600;var uA=Rk*24,sQ=uA*7,kk=uA*Pk,qk=kk/12,uQ=qk*3;function Ab(e){return nt(1,arguments),e instanceof Date||_a(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Mb(e){if(nt(1,arguments),!Ab(e)&&typeof e!="number")return!1;var r=Yt(e);return!isNaN(Number(r))}function Cb(e,r){nt(2,arguments);var t=Sn(r);return wb(e,-t)}var Lk=864e5;function Eb(e){nt(1,arguments);var r=Yt(e),t=r.getTime();r.setUTCMonth(0,1),r.setUTCHours(0,0,0,0);var a=r.getTime(),n=t-a;return Math.floor(n/Lk)+1}function Eo(e){nt(1,arguments);var r=1,t=Yt(e),a=t.getUTCDay(),n=(a=n.getTime()?t+1:r.getTime()>=s.getTime()?t:t-1}function Tb(e){nt(1,arguments);var r=gc(e),t=new Date(0);t.setUTCFullYear(r,0,4),t.setUTCHours(0,0,0,0);var a=Eo(t);return a}var zk=6048e5;function Fb(e){nt(1,arguments);var r=Yt(e),t=Eo(r).getTime()-Tb(r).getTime();return Math.round(t/zk)+1}function To(e,r){var t,a,n,i,s,l,c,o;nt(1,arguments);var u=Co(),m=Sn((t=(a=(n=(i=r?.weekStartsOn)!==null&&i!==void 0?i:r==null||(s=r.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&n!==void 0?n:u.weekStartsOn)!==null&&a!==void 0?a:(c=u.locale)===null||c===void 0||(o=c.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&t!==void 0?t:0);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Yt(e),h=d.getUTCDay(),y=(h=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(m+1,0,h),y.setUTCHours(0,0,0,0);var v=To(y,r),x=new Date(0);x.setUTCFullYear(m,0,h),x.setUTCHours(0,0,0,0);var w=To(x,r);return u.getTime()>=v.getTime()?m+1:u.getTime()>=w.getTime()?m:m-1}function _b(e,r){var t,a,n,i,s,l,c,o;nt(1,arguments);var u=Co(),m=Sn((t=(a=(n=(i=r?.firstWeekContainsDate)!==null&&i!==void 0?i:r==null||(s=r.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&n!==void 0?n:u.firstWeekContainsDate)!==null&&a!==void 0?a:(c=u.locale)===null||c===void 0||(o=c.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&t!==void 0?t:1),d=yc(e,r),h=new Date(0);h.setUTCFullYear(d,0,m),h.setUTCHours(0,0,0,0);var y=To(h,r);return y}var Uk=6048e5;function Ob(e,r){nt(1,arguments);var t=Yt(e),a=To(t,r).getTime()-_b(t,r).getTime();return Math.round(a/Uk)+1}function st(e,r){for(var t=e<0?"-":"",a=Math.abs(e).toString();a.length0?a:1-a;return st(t==="yy"?n%100:n,t.length)},M:function(r,t){var a=r.getUTCMonth();return t==="M"?String(a+1):st(a+1,2)},d:function(r,t){return st(r.getUTCDate(),t.length)},a:function(r,t){var a=r.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h:function(r,t){return st(r.getUTCHours()%12||12,t.length)},H:function(r,t){return st(r.getUTCHours(),t.length)},m:function(r,t){return st(r.getUTCMinutes(),t.length)},s:function(r,t){return st(r.getUTCSeconds(),t.length)},S:function(r,t){var a=t.length,n=r.getUTCMilliseconds(),i=Math.floor(n*Math.pow(10,a-3));return st(i,t.length)}},Xi=Wk;var vu={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Yk={G:function(r,t,a){var n=r.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return a.era(n,{width:"abbreviated"});case"GGGGG":return a.era(n,{width:"narrow"});case"GGGG":default:return a.era(n,{width:"wide"})}},y:function(r,t,a){if(t==="yo"){var n=r.getUTCFullYear(),i=n>0?n:1-n;return a.ordinalNumber(i,{unit:"year"})}return Xi.y(r,t)},Y:function(r,t,a,n){var i=yc(r,n),s=i>0?i:1-i;if(t==="YY"){var l=s%100;return st(l,2)}return t==="Yo"?a.ordinalNumber(s,{unit:"year"}):st(s,t.length)},R:function(r,t){var a=gc(r);return st(a,t.length)},u:function(r,t){var a=r.getUTCFullYear();return st(a,t.length)},Q:function(r,t,a){var n=Math.ceil((r.getUTCMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return st(n,2);case"Qo":return a.ordinalNumber(n,{unit:"quarter"});case"QQQ":return a.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(n,{width:"wide",context:"formatting"})}},q:function(r,t,a){var n=Math.ceil((r.getUTCMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return st(n,2);case"qo":return a.ordinalNumber(n,{unit:"quarter"});case"qqq":return a.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(n,{width:"wide",context:"standalone"})}},M:function(r,t,a){var n=r.getUTCMonth();switch(t){case"M":case"MM":return Xi.M(r,t);case"Mo":return a.ordinalNumber(n+1,{unit:"month"});case"MMM":return a.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(n,{width:"wide",context:"formatting"})}},L:function(r,t,a){var n=r.getUTCMonth();switch(t){case"L":return String(n+1);case"LL":return st(n+1,2);case"Lo":return a.ordinalNumber(n+1,{unit:"month"});case"LLL":return a.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(n,{width:"wide",context:"standalone"})}},w:function(r,t,a,n){var i=Ob(r,n);return t==="wo"?a.ordinalNumber(i,{unit:"week"}):st(i,t.length)},I:function(r,t,a){var n=Fb(r);return t==="Io"?a.ordinalNumber(n,{unit:"week"}):st(n,t.length)},d:function(r,t,a){return t==="do"?a.ordinalNumber(r.getUTCDate(),{unit:"date"}):Xi.d(r,t)},D:function(r,t,a){var n=Eb(r);return t==="Do"?a.ordinalNumber(n,{unit:"dayOfYear"}):st(n,t.length)},E:function(r,t,a){var n=r.getUTCDay();switch(t){case"E":case"EE":case"EEE":return a.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(n,{width:"short",context:"formatting"});case"EEEE":default:return a.day(n,{width:"wide",context:"formatting"})}},e:function(r,t,a,n){var i=r.getUTCDay(),s=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return st(s,2);case"eo":return a.ordinalNumber(s,{unit:"day"});case"eee":return a.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(i,{width:"short",context:"formatting"});case"eeee":default:return a.day(i,{width:"wide",context:"formatting"})}},c:function(r,t,a,n){var i=r.getUTCDay(),s=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return st(s,t.length);case"co":return a.ordinalNumber(s,{unit:"day"});case"ccc":return a.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(i,{width:"narrow",context:"standalone"});case"cccccc":return a.day(i,{width:"short",context:"standalone"});case"cccc":default:return a.day(i,{width:"wide",context:"standalone"})}},i:function(r,t,a){var n=r.getUTCDay(),i=n===0?7:n;switch(t){case"i":return String(i);case"ii":return st(i,t.length);case"io":return a.ordinalNumber(i,{unit:"day"});case"iii":return a.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(n,{width:"short",context:"formatting"});case"iiii":default:return a.day(n,{width:"wide",context:"formatting"})}},a:function(r,t,a){var n=r.getUTCHours(),i=n/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(r,t,a){var n=r.getUTCHours(),i;switch(n===12?i=vu.noon:n===0?i=vu.midnight:i=n/12>=1?"pm":"am",t){case"b":case"bb":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(r,t,a){var n=r.getUTCHours(),i;switch(n>=17?i=vu.evening:n>=12?i=vu.afternoon:n>=4?i=vu.morning:i=vu.night,t){case"B":case"BB":case"BBB":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(r,t,a){if(t==="ho"){var n=r.getUTCHours()%12;return n===0&&(n=12),a.ordinalNumber(n,{unit:"hour"})}return Xi.h(r,t)},H:function(r,t,a){return t==="Ho"?a.ordinalNumber(r.getUTCHours(),{unit:"hour"}):Xi.H(r,t)},K:function(r,t,a){var n=r.getUTCHours()%12;return t==="Ko"?a.ordinalNumber(n,{unit:"hour"}):st(n,t.length)},k:function(r,t,a){var n=r.getUTCHours();return n===0&&(n=24),t==="ko"?a.ordinalNumber(n,{unit:"hour"}):st(n,t.length)},m:function(r,t,a){return t==="mo"?a.ordinalNumber(r.getUTCMinutes(),{unit:"minute"}):Xi.m(r,t)},s:function(r,t,a){return t==="so"?a.ordinalNumber(r.getUTCSeconds(),{unit:"second"}):Xi.s(r,t)},S:function(r,t){return Xi.S(r,t)},X:function(r,t,a,n){var i=n._originalDate||r,s=i.getTimezoneOffset();if(s===0)return"Z";switch(t){case"X":return cA(s);case"XXXX":case"XX":return ys(s);case"XXXXX":case"XXX":default:return ys(s,":")}},x:function(r,t,a,n){var i=n._originalDate||r,s=i.getTimezoneOffset();switch(t){case"x":return cA(s);case"xxxx":case"xx":return ys(s);case"xxxxx":case"xxx":default:return ys(s,":")}},O:function(r,t,a,n){var i=n._originalDate||r,s=i.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+fA(s,":");case"OOOO":default:return"GMT"+ys(s,":")}},z:function(r,t,a,n){var i=n._originalDate||r,s=i.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+fA(s,":");case"zzzz":default:return"GMT"+ys(s,":")}},t:function(r,t,a,n){var i=n._originalDate||r,s=Math.floor(i.getTime()/1e3);return st(s,t.length)},T:function(r,t,a,n){var i=n._originalDate||r,s=i.getTime();return st(s,t.length)}};function fA(e,r){var t=e>0?"-":"+",a=Math.abs(e),n=Math.floor(a/60),i=a%60;if(i===0)return t+String(n);var s=r||"";return t+String(n)+s+st(i,2)}function cA(e,r){if(e%60===0){var t=e>0?"-":"+";return t+st(Math.abs(e)/60,2)}return ys(e,r)}function ys(e,r){var t=r||"",a=e>0?"-":"+",n=Math.abs(e),i=st(Math.floor(n/60),2),s=st(n%60,2);return a+i+t+s}var lA=Yk;var mA=function(r,t){switch(r){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},pA=function(r,t){switch(r){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Hk=function(r,t){var a=r.match(/(P+)(p+)?/)||[],n=a[1],i=a[2];if(!i)return mA(r,t);var s;switch(n){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",mA(n,t)).replace("{{time}}",pA(i,t))},$k={p:pA,P:Hk},dA=$k;var Gk=["D","DD"],Vk=["YY","YYYY"];function hA(e){return Gk.indexOf(e)!==-1}function vA(e){return Vk.indexOf(e)!==-1}function Bb(e,r,t){if(e==="YYYY")throw new RangeError("Use \`yyyy\` instead of \`YYYY\` (in \`".concat(r,"\`) for formatting years to the input \`").concat(t,"\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use \`yy\` instead of \`YY\` (in \`".concat(r,"\`) for formatting years to the input \`").concat(t,"\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use \`d\` instead of \`D\` (in \`".concat(r,"\`) for formatting days of the month to the input \`").concat(t,"\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use \`dd\` instead of \`DD\` (in \`".concat(r,"\`) for formatting days of the month to the input \`").concat(t,"\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Zk={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Qk=function(r,t,a){var n,i=Zk[r];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",t.toString()),a!=null&&a.addSuffix?a.comparison&&a.comparison>0?"in "+n:n+" ago":n},gA=Qk;function xc(e){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=r.width?String(r.width):e.defaultWidth,a=e.formats[t]||e.formats[e.defaultWidth];return a}}var Xk={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Jk={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Kk={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},jk={date:xc({formats:Xk,defaultWidth:"full"}),time:xc({formats:Jk,defaultWidth:"full"}),dateTime:xc({formats:Kk,defaultWidth:"full"})},yA=jk;var eq={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},rq=function(r,t,a,n){return eq[r]},xA=rq;function xs(e){return function(r,t){var a=t!=null&&t.context?String(t.context):"standalone",n;if(a==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,s=t!=null&&t.width?String(t.width):i;n=e.formattingValues[s]||e.formattingValues[i]}else{var l=e.defaultWidth,c=t!=null&&t.width?String(t.width):e.defaultWidth;n=e.values[c]||e.values[l]}var o=e.argumentCallback?e.argumentCallback(r):r;return n[o]}}var tq={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},nq={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},aq={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},iq={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},oq={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},sq={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},uq=function(r,t){var a=Number(r),n=a%100;if(n>20||n<10)switch(n%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},fq={ordinalNumber:uq,era:xs({values:tq,defaultWidth:"wide"}),quarter:xs({values:nq,defaultWidth:"wide",argumentCallback:function(r){return r-1}}),month:xs({values:aq,defaultWidth:"wide"}),day:xs({values:iq,defaultWidth:"wide"}),dayPeriod:xs({values:oq,defaultWidth:"wide",formattingValues:sq,defaultFormattingWidth:"wide"})},bA=fq;function bs(e){return function(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=t.width,n=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],i=r.match(n);if(!i)return null;var s=i[0],l=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?lq(l,function(m){return m.test(s)}):cq(l,function(m){return m.test(s)}),o;o=e.valueCallback?e.valueCallback(c):c,o=t.valueCallback?t.valueCallback(o):o;var u=r.slice(s.length);return{value:o,rest:u}}}function cq(e,r){for(var t in e)if(e.hasOwnProperty(t)&&r(e[t]))return t}function lq(e,r){for(var t=0;t1&&arguments[1]!==void 0?arguments[1]:{},a=r.match(e.matchPattern);if(!a)return null;var n=a[0],i=r.match(e.parsePattern);if(!i)return null;var s=e.valueCallback?e.valueCallback(i[0]):i[0];s=t.valueCallback?t.valueCallback(s):s;var l=r.slice(n.length);return{value:s,rest:l}}}var mq=/^(\\d+)(th|st|nd|rd)?/i,pq=/\\d+/i,dq={narrow:/^(b|a)/i,abbreviated:/^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},hq={any:[/^b/i,/^(a|c)/i]},vq={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},gq={any:[/1/i,/2/i,/3/i,/4/i]},yq={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},xq={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},bq={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},wq={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Dq={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Sq={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Nq={ordinalNumber:Pb({matchPattern:mq,parsePattern:pq,valueCallback:function(r){return parseInt(r,10)}}),era:bs({matchPatterns:dq,defaultMatchWidth:"wide",parsePatterns:hq,defaultParseWidth:"any"}),quarter:bs({matchPatterns:vq,defaultMatchWidth:"wide",parsePatterns:gq,defaultParseWidth:"any",valueCallback:function(r){return r+1}}),month:bs({matchPatterns:yq,defaultMatchWidth:"wide",parsePatterns:xq,defaultParseWidth:"any"}),day:bs({matchPatterns:bq,defaultMatchWidth:"wide",parsePatterns:wq,defaultParseWidth:"any"}),dayPeriod:bs({matchPatterns:Dq,defaultMatchWidth:"any",parsePatterns:Sq,defaultParseWidth:"any"})},wA=Nq;var Aq={code:"en-US",formatDistance:gA,formatLong:yA,formatRelative:xA,localize:bA,match:wA,options:{weekStartsOn:0,firstWeekContainsDate:1}},DA=Aq;var SA=DA;var Mq=/[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g,Cq=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Eq=/^'([^]*?)'?$/,Tq=/''/g,Fq=/[a-zA-Z]/;function Ai(e,r,t){var a,n,i,s,l,c,o,u,m,d,h,y,v,x,w,C,b,A;nt(2,arguments);var M=String(r),D=Co(),O=(a=(n=t?.locale)!==null&&n!==void 0?n:D.locale)!==null&&a!==void 0?a:SA,_=Sn((i=(s=(l=(c=t?.firstWeekContainsDate)!==null&&c!==void 0?c:t==null||(o=t.locale)===null||o===void 0||(u=o.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&l!==void 0?l:D.firstWeekContainsDate)!==null&&s!==void 0?s:(m=D.locale)===null||m===void 0||(d=m.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(_>=1&&_<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var E=Sn((h=(y=(v=(x=t?.weekStartsOn)!==null&&x!==void 0?x:t==null||(w=t.locale)===null||w===void 0||(C=w.options)===null||C===void 0?void 0:C.weekStartsOn)!==null&&v!==void 0?v:D.weekStartsOn)!==null&&y!==void 0?y:(b=D.locale)===null||b===void 0||(A=b.options)===null||A===void 0?void 0:A.weekStartsOn)!==null&&h!==void 0?h:0);if(!(E>=0&&E<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!O.localize)throw new RangeError("locale must contain localize property");if(!O.formatLong)throw new RangeError("locale must contain formatLong property");var T=Yt(e);if(!Mb(T))throw new RangeError("Invalid time value");var R=Db(T),L=Cb(T,R),H={firstWeekContainsDate:_,weekStartsOn:E,locale:O,_originalDate:T},G=M.match(Cq).map(function(W){var q=W[0];if(q==="p"||q==="P"){var k=dA[q];return k(W,O.formatLong)}return W}).join("").match(Mq).map(function(W){if(W==="''")return"'";var q=W[0];if(q==="'")return _q(W);var k=lA[q];if(k)return!(t!=null&&t.useAdditionalWeekYearTokens)&&vA(W)&&Bb(W,r,String(e)),!(t!=null&&t.useAdditionalDayOfYearTokens)&&hA(W)&&Bb(W,r,String(e)),k(L,W,O.localize,H);if(q.match(Fq))throw new RangeError("Format string contains an unescaped latin alphabet character \`"+q+"\`");return W}).join("");return G}function _q(e){var r=e.match(Eq);return r?r[1].replace(Tq,"'"):e}function Ib(e,r){if(_a(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var a=t.call(e,r||"default");if(_a(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Rb(e){var r=Ib(e,"string");return _a(r)=="symbol"?r:r+""}function Hr(e,r,t){return r=Rb(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function um(e,r){var t;nt(1,arguments);var a=Sn((t=r?.additionalDigits)!==null&&t!==void 0?t:2);if(a!==2&&a!==1&&a!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var n=Iq(e),i;if(n.date){var s=Rq(n.date,a);i=kq(s.restDateString,s.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);var l=i.getTime(),c=0,o;if(n.time&&(c=qq(n.time),isNaN(c)))return new Date(NaN);if(n.timezone){if(o=Lq(n.timezone),isNaN(o))return new Date(NaN)}else{var u=new Date(l+c),m=new Date(0);return m.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),m.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),m}return new Date(l+c+o)}var sm={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Oq=/^-?(?:(\\d{3})|(\\d{2})(?:-?(\\d{2}))?|W(\\d{2})(?:-?(\\d{1}))?|)$/,Bq=/^(\\d{2}(?:[.,]\\d*)?)(?::?(\\d{2}(?:[.,]\\d*)?))?(?::?(\\d{2}(?:[.,]\\d*)?))?$/,Pq=/^([+-])(\\d{2})(?::?(\\d{2}))?$/;function Iq(e){var r={},t=e.split(sm.dateTimeDelimiter),a;if(t.length>2)return r;if(/:/.test(t[0])?a=t[0]:(r.date=t[0],a=t[1],sm.timeZoneDelimiter.test(r.date)&&(r.date=e.split(sm.timeZoneDelimiter)[0],a=e.substr(r.date.length,e.length))),a){var n=sm.timezone.exec(a);n?(r.time=a.replace(n[1],""),r.timezone=n[1]):r.time=a}return r}function Rq(e,r){var t=new RegExp("^(?:(\\\\d{4}|[+-]\\\\d{"+(4+r)+"})|(\\\\d{2}|[+-]\\\\d{"+(2+r)+"})$)"),a=e.match(t);if(!a)return{year:NaN,restDateString:""};var n=a[1]?parseInt(a[1]):null,i=a[2]?parseInt(a[2]):null;return{year:i===null?n:i*100,restDateString:e.slice((a[1]||a[2]).length)}}function kq(e,r){if(r===null)return new Date(NaN);var t=e.match(Oq);if(!t)return new Date(NaN);var a=!!t[4],n=bc(t[1]),i=bc(t[2])-1,s=bc(t[3]),l=bc(t[4]),c=bc(t[5])-1;if(a)return Hq(r,l,c)?zq(r,l,c):new Date(NaN);var o=new Date(0);return!Wq(r,i,s)||!Yq(r,n)?new Date(NaN):(o.setUTCFullYear(r,i,Math.max(n,s)),o)}function bc(e){return e?parseInt(e):1}function qq(e){var r=e.match(Bq);if(!r)return NaN;var t=kb(r[1]),a=kb(r[2]),n=kb(r[3]);return $q(t,a,n)?t*Nb+a*Sb+n*1e3:NaN}function kb(e){return e&&parseFloat(e.replace(",","."))||0}function Lq(e){if(e==="Z")return 0;var r=e.match(Pq);if(!r)return 0;var t=r[1]==="+"?-1:1,a=parseInt(r[2]),n=r[3]&&parseInt(r[3])||0;return Gq(a,n)?t*(a*Nb+n*Sb):NaN}function zq(e,r,t){var a=new Date(0);a.setUTCFullYear(e,0,4);var n=a.getUTCDay()||7,i=(r-1)*7+t+1-n;return a.setUTCDate(a.getUTCDate()+i),a}var Uq=[31,null,31,30,31,30,31,31,30,31,30,31];function NA(e){return e%400===0||e%4===0&&e%100!==0}function Wq(e,r,t){return r>=0&&r<=11&&t>=1&&t<=(Uq[r]||(NA(e)?29:28))}function Yq(e,r){return r>=1&&r<=(NA(e)?366:365)}function Hq(e,r,t){return r>=1&&r<=53&&t>=0&&t<=6}function $q(e,r,t){return e===24?r===0&&t===0:t>=0&&t<60&&r>=0&&r<60&&e>=0&&e<25}function Gq(e,r){return r>=0&&r<=59}var pa=e=>[...new Set(e)];var AA=(e,r)=>e.sort(function(t,a){let n=r.indexOf(t),i=r.indexOf(a);return n>i?n!=-1&&i==-1?-1:1:i!=-1&&n==-1?1:-1});var qn="File";function fm(e){return Array.isArray(e)?e:typeof e=="string"?[e]:[]}var MA=(e,r)=>r.indexOf(e)>0?r.indexOf(e):r.length;var wc=e=>"spaces://"+e;var CA=e=>e.charAt(0)=="/"?e.substring(1):e;var qb=(e,r)=>{if(e instanceof Date)return"date";if(typeof e=="string"){if(/\\/\\/(\\S+?(?:jpe?g|png|gif|svg))/gi.test(e)||e.includes("unsplash"))return"image";if(/^\\d{4}-\\d{2}-\\d{2}$/.test(e))return"date";if(r=="tag"||r=="tags")return"tags-multi";if(/\\[\\[.*?\\]\\]/.test(e))return"link"}else{if(typeof e=="number")return"number";if(typeof e=="boolean")return"boolean";if(e)if(Array.isArray(e)||typeof e=="string"&&e.indexOf(",")>-1){let t=Array.isArray(e)?e:[];if(typeof e=="string"&&e.indexOf(",")>-1&&(t=gn(e)),r=="tag"||r=="tags")return"tags-multi";if(t.length==1&&Array.isArray(t[0])&&t[0].length==1&&typeof t[0][0]=="string")return"link";let a=pa(t.map(n=>qb(n,r)));return a.length==1&&a[0]=="link"?"link-multi":a.some(n=>n=="object")?"object-multi":"option-multi"}else return e.isLuxonDateTime?"date":e.isLuxonDuration?"duration":e.type=="file"?"link":typeof e=="object"&&!Array.isArray(e)&&e!==null?"object":"unknown";else return"unknown"}return"text"};var Lb=(e,r,t)=>e=="object"||e=="object-multi"?JSON.parse(r):e=="number"?parseFloat(r):e=="boolean"?r=="true":e.includes("-multi")?gn(r).map(a=>Lb(e.replace("-multi",""),a,t)):(e.includes("link")||e.includes("context"))&&t?\`[[\${r}]]\`:r;var EA=e=>e.map(r=>r.replace(",","\\\\,")).join(", "),ws=e=>JSON.stringify(e);var gn=e=>e?.startsWith("[")?fm(Dc(e)):Vq(e),Vq=e=>(e?.replace("\\\\,",",")?.match(/(\\\\.|[^,])+/g)??[]).map(r=>r.trim()),Ds=(e,r,t)=>{let a=t??qb(r,e);if(!r)return"";switch(a){case"tags-multi":return r;case"object":case"object-multi":return JSON.stringify(r);case"number":return r.toString();case"boolean":return r?"true":"false";case"date":{if(r instanceof Date){let n=Ai(r,"yyyy-MM-dd");return typeof n=="string"?n:""}return typeof r!="string"?"":r}break;case"duration":return EA(Object.keys(r.values).reduce((n,i)=>[...n,...r.values[i]>0?[r.values[i]+" "+i]:[]],[]));case"option-multi":case"link-multi":case"context-multi":return typeof r=="string"?Sc(r):ws(r.map(n=>n?typeof n=="string"?Sc(n):n.path?n.path:Array.isArray(r)&&n.length==1&&Array.isArray(n[0])&&n[0].length==1&&typeof n[0][0]=="string"?n[0][0]:JSON.stringify(n):""));case"link":case"context":return Array.isArray(r)&&r.length==1&&Array.isArray(r[0])&&r[0].length==1&&typeof r[0][0]=="string"?r[0][0]:typeof r=="string"?Sc(r):r.path;case"text":case"tag":case"option":case"image":return r}return""};var Dc=e=>{let r;try{r=JSON.parse(e)}catch{}return r};var Sc=e=>{if(!e)return"";let r=/\\[\\[(.*?)\\]\\]/g.exec(e),t=r?.length>1?r[1].substring(0,MA("|",r[1])):e;return t||e};var yu=ma(cm());var zb=e=>e?(0,yu.isFinite)(e)?new Date(e):(0,yu.isString)(e)?um(e):(0,yu.isDate)(e)?e:null:null;var TA=(e,r,t)=>{let a=e[0];if(!a.isSymbolNode||e.length!==3)return"";let n=a.name,i=e[1];return r.evaluate(\`\${n} = \${i.toString()}\`,t),e[2].compile().evaluate(t)};TA.rawArgs=!0;var FA=(e,r,t)=>{if(e.length%2!==1)return"";for(let n=0;n{if(e.length!==1)return"";let a=e.map(function(i){return i.compile().evaluate(t)});return t.get("$paths").get(a[0])};_A.rawArgs=!0;var OA=(e,r,t)=>t?.get("$current");OA.rawArgs=!0;var BA=(e,r,t)=>t?.get("$index");BA.rawArgs=!0;var PA=(e,r,t)=>{if(e.length!==2)return"";let a=e[0].compile().evaluate?e[0].compile().evaluate(t):e[0];return Array.isArray(a)?a.find((n,i)=>{t.set("$current",n),t.set("$index",i),r.evaluate("current = _current(); index = _index()",t);let s=e[1].compile().evaluate?e[1].compile().evaluate(t):e[1];return n===s})??"":""};PA.rawArgs=!0;var IA=(e,r,t)=>{if(e.length!==2)return"";let a=e[0].compile().evaluate?e[0].compile().evaluate(t):e[0];return Array.isArray(a)?a.findIndex((n,i)=>{t.set("$current",n),t.set("$index",i),r.evaluate("current = _current(); index = _index()",t);let s=e[1].compile().evaluate?e[1].compile().evaluate(t):e[1];return n===s}):""};IA.rawArgs=!0;var RA=(e,r,t)=>{if(e.length!==2)return"";let a=e[0].compile().evaluate?e[0].compile().evaluate(t):e[0];return Array.isArray(a)?a.filter((n,i)=>(t.set("$current",n),t.set("$index",i),r.evaluate("current = _current(); index = _index()",t),e[1].compile().evaluate(t))):""};RA.rawArgs=!0;var kA=(e,r,t)=>{if(e.length!==2)return"";let a=e[0].compile().evaluate?e[0].compile().evaluate(t):e[0];return Array.isArray(a)?a.map((n,i)=>(t.set("$current",n),t.set("$index",i),r.evaluate("current = _current(); index = _index()",t),e[1].compile().evaluate(t))):[]};kA.rawArgs=!0;var qA=(e,r,t)=>{if(e.length!==2)return"";let a=e[0].compile().evaluate?e[0].compile().evaluate(t):e[0];return Array.isArray(a)?a.some((n,i)=>(t.set("$current",n),t.set("$index",i),r.evaluate("current = _current(); index = _index()",t),e[1].compile().evaluate(t))):""};qA.rawArgs=!0;var LA=(e,r,t)=>{if(e.length!==2)return"";let a=e[0].compile().evaluate?e[0].compile().evaluate(t):e[0];return Array.isArray(a)?a.every((n,i)=>(t.set("$current",n),t.set("$index",i),r.evaluate("current = _current(); index = _index()",t),e[1].compile().evaluate(t))):""};LA.rawArgs=!0;var zA=(e,r,t)=>{if(e.length!==1)return"";let a=e[0].compile().evaluate?e[0].compile().evaluate(t):e[0];return Array.isArray(a)?a.flat():""};zA.rawArgs=!0;var UA=(e,r,t)=>{if(e.length!==1)return"";let a=e.map(function(s){return s.compile().evaluate(t)}),n=t.get("$properties")?.[a[0]]?.type,i=Lb(n,t.get(a[0]));return(n=="file"||n=="link"||n=="context")&&(n.includes("multi")?i=gn(i).map(s=>t.get("$paths").get(s)??s):i=t.get("$paths").get(i)??i),n=="date"&&(i=zb(i)),i??""};UA.rawArgs=!0;var WA=(e,r,t)=>{if((e.length-1)%2!==0)return"";for(let a=0;a{if(e.length<1||e.length>2)return"";let a=e[0].compile().evaluate(t);a instanceof Date||(a=new Date(a));let n=e[1]?.compile().evaluate(t);return n?.length>0?Ai(a,n):Ai(a,t.get("$settings")?.dateFormat??"yyyy-MM-dd")};YA.rawArgs=!0;var Ln=e=>typeof e=="string"||e instanceof String?e:e instanceof Date?Ai(e,"yyyy-MM-dd"):typeof e=="number"?e.toFixed(0):e?.path?e.path:"",Ub={prop:UA,_current:OA,_index:BA,slice:(e,r,t)=>(e=Ln(e),e.slice(r,t)),if:(e,r,t)=>e===!0?r:t,ifs:WA,empty:e=>e.length!==1?"":Array.isArray(e[0])?e[0].length===0:e[0]===""?"true":"false",length:e=>e.length,values:e=>e.flat().length,uniques:e=>pa(e.flat()).length,substring:(e,r,t)=>(e=Ln(e),t?e.substring(r,t):e.substring(r)),startsWith:(e,r)=>(e=Ln(e),r=Ln(r),e.startsWith(r)),contains:(e,r)=>(e=Ln(e),r=Ln(r),e.includes(r)),test:(e,r)=>(e=Ln(e),new RegExp(r).test(e)),match:(e,r)=>(e=Ln(e),e.match(new RegExp(r))),replace:(e,r,t)=>(e=Ln(e),e.replace(new RegExp(r),t)),replaceAll:(e,r,t)=>(e=Ln(e),r=Ln(r),t=Ln(t),e.replace(new RegExp(r,"g"),t)),lower:e=>(e=Ln(e),e.toLowerCase()),upper:e=>(e=Ln(e),e.toUpperCase()),repeat:(e,r)=>e.repeat(r),format:Ln,toNumber:e=>e instanceof Date?e.getTime():typeof e=="string"?parseFloat(e):e,now:()=>new Date,minute:e=>e.getMinutes(),hour:e=>e.getHours(),day:e=>e.getDay(),date:e=>e.getDate(),week:e=>Ai(e,"w"),month:e=>e.getMonth()+1,year:e=>e.getFullYear(),pad:(e,r,t)=>e.padStart(r,t),range:e=>Math.max(...e)-Math.min(...e),latest:e=>new Date(Math.max(...e.map(r=>r.getTime()))),earliest:e=>new Date(Math.min(...e.map(r=>r.getTime()))),dateRange:(e,r)=>{let t=Math.abs(Math.max(...e.map(a=>a.getTime()))-Math.min(...e.map(a=>a.getTime())));return r.startsWith("day")?t/(1e3*60*60*24):r.startsWith("month")?t/(1e3*60*60*24*30):r.startsWith("year")?t/(1e3*60*60*24*365):r.startsWith("hour")?t/(1e3*60*60):r.startsWith("minute")?t/(1e3*60):r.startsWith("second")?t/1e3:r.startsWith("week")?t/(1e3*60*60*24*7):r.startsWith("quarter")?t/(1e3*60*60*24*30*3):t/(1e3*60*60*24)},dateAdd:(e,r,t)=>(t.startsWith("day")&&e.setDate(e.getDate()+r),t.startsWith("month")&&e.setMonth(e.getMonth()+r),t.startsWith("year")&&e.setFullYear(e.getFullYear()+r),t.startsWith("quarter")&&e.setMonth(e.getMonth()+r*3),t.startsWith("week")&&e.setDate(e.getDate()+r*7),t.startsWith("hour")&&e.setHours(e.getHours()+r),t.startsWith("minute")&&e.setMinutes(e.getMinutes()+r),t.startsWith("second")&&e.setSeconds(e.getSeconds()+r),e),dateSubtract:(e,r,t)=>(t.startsWith("day")&&e.setDate(e.getDate()-r),t.startsWith("month")&&e.setMonth(e.getMonth()-r),t.startsWith("year")&&e.setFullYear(e.getFullYear()-r),t.startsWith("quarter")&&e.setMonth(e.getMonth()-r*3),t.startsWith("week")&&e.setDate(e.getDate()-r*7),t.startsWith("hour")&&e.setHours(e.getHours()-r),t.startsWith("minute")&&e.setMinutes(e.getMinutes()-r),t.startsWith("second")&&e.setSeconds(e.getSeconds()-r),e),dateBetween:(e,r,t)=>{let s=Math.abs(r.getTime()-e.getTime());switch(t){case"days":return Math.round(s/864e5);case"months":return Math.round(s/2592e6);case"years":return Math.round(s/31536e6);case"hours":return Math.round(s/(60*60*1e3));case"minutes":return Math.round(s/(60*1e3));case"seconds":return Math.round(s/1e3);case"weeks":return Math.round(s/(864e5*7));case"quarters":return Math.round(s/(2592e6*3));default:return Math.round(s/864e5)}},style:(e,r)=>e,timeStamp:e=>e.getTime(),at:(e,r)=>e[r],first:e=>e[0],last:e=>e[e.length-1],concat:(e,r)=>e.concat(r),sort:e=>e.sort((r,t)=>t-r),reverse:e=>e.reverse(),join:(e,r)=>e.join(r),includes:(e,r)=>e.includes(r),split:(e,r)=>e.split(r),formatDate:YA,parseDate:e=>zb(e),find:PA,findIndex:IA,filter:RA,map:kA,some:qA,every:LA,flat:zA,path:_A,let:TA,lets:FA};function ht(){return ht=Object.assign?Object.assign.bind():function(e){for(var r=1;re[r])}var Nm=["Matrix","Array"],Am=["number","BigNumber","Fraction"];function QA(e,r){function t(a){if(a){var n=wu(e,ar);ZA(a,"matrix",Nm),ZA(a,"number",Am),Wb(e,a);var i=wu(e,ar),s=wu(a,ar);return r("config",i,n,s),i}else return wu(e,ar)}return t.MATRIX_OPTIONS=Nm,t.NUMBER_OPTIONS=Am,Object.keys(Ss).forEach(a=>{Object.defineProperty(t,a,{get:()=>e[a],enumerable:!0,configurable:!0})}),t}function Zq(e,r){return e.indexOf(r)!==-1}function ZA(e,r,t){e[r]!==void 0&&!Zq(t,e[r])&&console.warn('Warning: Unknown value "'+e[r]+'" for configuration option "'+r+'". Available options: '+t.map(a=>JSON.stringify(a)).join(", ")+".")}var Oe=function(r){if(r)throw new Error(\`The global config is readonly. +\`+new Error().stack),I=!1}return N.apply(this,arguments)},N)}var E={};function T(g,N){r.deprecationHandler!=null&&r.deprecationHandler(g,N),E[g]||(O(N),E[g]=!0)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null;function R(g){return typeof Function<"u"&&g instanceof Function||Object.prototype.toString.call(g)==="[object Function]"}function L(g){var N,I;for(I in g)i(g,I)&&(N=g[I],R(N)?this[I]=N:this["_"+I]=N);this._config=g,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\\d{1,2}/.source)}function H(g,N){var I=m({},g),U;for(U in N)i(N,U)&&(n(g[U])&&n(N[U])?(I[U]={},m(I[U],g[U]),m(I[U],N[U])):N[U]!=null?I[U]=N[U]:delete I[U]);for(U in g)i(g,U)&&!i(N,U)&&n(g[U])&&(I[U]=m({},I[U]));return I}function G(g){g!=null&&this.set(g)}var W;Object.keys?W=Object.keys:W=function(g){var N,I=[];for(N in g)i(g,N)&&I.push(N);return I};var q={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function k(g,N,I){var U=this._calendar[g]||this._calendar.sameElse;return R(U)?U.call(N,I):U}function K(g,N,I){var U=""+Math.abs(g),V=N-U.length,se=g>=0;return(se?I?"+":"":"-")+Math.pow(10,Math.max(0,V)).toString().substr(1)+U}var z=/(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,oe=/(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,pe={},ae={};function $(g,N,I,U){var V=U;typeof U=="string"&&(V=function(){return this[U]()}),g&&(ae[g]=V),N&&(ae[N[0]]=function(){return K(V.apply(this,arguments),N[1],N[2])}),I&&(ae[I]=function(){return this.localeData().ordinal(V.apply(this,arguments),g)})}function le(g){return g.match(/\\[[\\s\\S]/)?g.replace(/^\\[|\\]$/g,""):g.replace(/\\\\/g,"")}function Ee(g){var N=g.match(z),I,U;for(I=0,U=N.length;I=0&&oe.test(g);)g=g.replace(oe,U),oe.lastIndex=0,I-=1;return g}var Se={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function ye(g){var N=this._longDateFormat[g],I=this._longDateFormat[g.toUpperCase()];return N||!I?N:(this._longDateFormat[g]=I.match(z).map(function(U){return U==="MMMM"||U==="MM"||U==="DD"||U==="dddd"?U.slice(1):U}).join(""),this._longDateFormat[g])}var be="Invalid date";function De(){return this._invalidDate}var Ae="%d",We=/\\d{1,2}/;function Je(g){return this._ordinal.replace("%d",g)}var J={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function re(g,N,I,U){var V=this._relativeTime[I];return R(V)?V(g,N,I,U):V.replace(/%d/i,g)}function xe(g,N){var I=this._relativeTime[g>0?"future":"past"];return R(I)?I(N):I.replace(/%s/i,N)}var j={};function ne(g,N){var I=g.toLowerCase();j[I]=j[I+"s"]=j[N]=g}function ue(g){return typeof g=="string"?j[g]||j[g.toLowerCase()]:void 0}function Me(g){var N={},I,U;for(U in g)i(g,U)&&(I=ue(U),I&&(N[I]=g[U]));return N}var Ce={};function Le(g,N){Ce[g]=N}function Ie(g){var N=[],I;for(I in g)i(g,I)&&N.push({unit:I,priority:Ce[I]});return N.sort(function(U,V){return U.priority-V.priority}),N}function fr(g){return g%4===0&&g%100!==0||g%400===0}function or(g){return g<0?Math.ceil(g)||0:Math.floor(g)}function Ke(g){var N=+g,I=0;return N!==0&&isFinite(N)&&(I=or(N)),I}function Br(g,N){return function(I){return I!=null?(ce(this,g,I),r.updateOffset(this,N),this):ee(this,g)}}function ee(g,N){return g.isValid()?g._d["get"+(g._isUTC?"UTC":"")+N]():NaN}function ce(g,N,I){g.isValid()&&!isNaN(I)&&(N==="FullYear"&&fr(g.year())&&g.month()===1&&g.date()===29?(I=Ke(I),g._d["set"+(g._isUTC?"UTC":"")+N](I,g.month(),fo(I,g.month()))):g._d["set"+(g._isUTC?"UTC":"")+N](I))}function we(g){return g=ue(g),R(this[g])?this[g]():this}function Be(g,N){if(typeof g=="object"){g=Me(g);var I=Ie(g),U,V=I.length;for(U=0;U68?1900:2e3)};var zf=Br("FullYear",!0);function yx(){return fr(this.year())}function Zc(g,N,I,U,V,se,Fe){var dr;return g<100&&g>=0?(dr=new Date(g+400,N,I,U,V,se,Fe),isFinite(dr.getFullYear())&&dr.setFullYear(g)):dr=new Date(g,N,I,U,V,se,Fe),dr}function co(g){var N,I;return g<100&&g>=0?(I=Array.prototype.slice.call(arguments),I[0]=g+400,N=new Date(Date.UTC.apply(null,I)),isFinite(N.getUTCFullYear())&&N.setUTCFullYear(g)):N=new Date(Date.UTC.apply(null,arguments)),N}function lo(g,N,I){var U=7+N-I,V=(7+co(g,0,U).getUTCDay()-N)%7;return-V+U-1}function Qc(g,N,I,U,V){var se=(7+I-U)%7,Fe=lo(g,U,V),dr=1+7*(N-1)+se+Fe,_r,tt;return dr<=0?(_r=g-1,tt=di(_r)+dr):dr>di(g)?(_r=g+1,tt=dr-di(g)):(_r=g,tt=dr),{year:_r,dayOfYear:tt}}function mo(g,N,I){var U=lo(g.year(),N,I),V=Math.floor((g.dayOfYear()-U-1)/7)+1,se,Fe;return V<1?(Fe=g.year()-1,se=V+ia(Fe,N,I)):V>ia(g.year(),N,I)?(se=V-ia(g.year(),N,I),Fe=g.year()+1):(Fe=g.year(),se=V),{week:se,year:Fe}}function ia(g,N,I){var U=lo(g,N,I),V=lo(g+1,N,I);return(di(g)-U+V)/7}$("w",["ww",2],"wo","week"),$("W",["WW",2],"Wo","isoWeek"),ne("week","w"),ne("isoWeek","W"),Le("week",5),Le("isoWeek",5),nr("w",Q),nr("ww",Q,Te),nr("W",Q),nr("WW",Q,Te),Ii(["w","ww","W","WW"],function(g,N,I,U){N[U.substr(0,1)]=Ke(g)});function Uf(g){return mo(g,this._week.dow,this._week.doy).week}var po={dow:0,doy:6};function Xc(){return this._week.dow}function Jc(){return this._week.doy}function xx(g){var N=this.localeData().week(this);return g==null?N:this.add((g-N)*7,"d")}function Kc(g){var N=mo(this,1,4).week;return g==null?N:this.add((g-N)*7,"d")}$("d",0,"do","day"),$("dd",0,0,function(g){return this.localeData().weekdaysMin(this,g)}),$("ddd",0,0,function(g){return this.localeData().weekdaysShort(this,g)}),$("dddd",0,0,function(g){return this.localeData().weekdays(this,g)}),$("e",0,0,"weekday"),$("E",0,0,"isoWeekday"),ne("day","d"),ne("weekday","e"),ne("isoWeekday","E"),Le("day",11),Le("weekday",11),Le("isoWeekday",11),nr("d",Q),nr("e",Q),nr("E",Q),nr("dd",function(g,N){return N.weekdaysMinRegex(g)}),nr("ddd",function(g,N){return N.weekdaysShortRegex(g)}),nr("dddd",function(g,N){return N.weekdaysRegex(g)}),Ii(["dd","ddd","dddd"],function(g,N,I,U){var V=I._locale.weekdaysParse(g,U,I._strict);V!=null?N.d=V:y(I).invalidWeekday=g}),Ii(["d","e","E"],function(g,N,I,U){N[U]=Ke(g)});function jc(g,N){return typeof g!="string"?g:isNaN(g)?(g=N.weekdaysParse(g),typeof g=="number"?g:null):parseInt(g,10)}function el(g,N){return typeof g=="string"?N.weekdaysParse(g)%7||7:isNaN(g)?null:g}function Ys(g,N){return g.slice(N,7).concat(g.slice(0,N))}var bx="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),rl="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),wx="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),tl=Ha,Dx=Ha,Sx=Ha;function Nx(g,N){var I=a(this._weekdays)?this._weekdays:this._weekdays[g&&g!==!0&&this._weekdays.isFormat.test(N)?"format":"standalone"];return g===!0?Ys(I,this._week.dow):g?I[g.day()]:I}function Ax(g){return g===!0?Ys(this._weekdaysShort,this._week.dow):g?this._weekdaysShort[g.day()]:this._weekdaysShort}function Wf(g){return g===!0?Ys(this._weekdaysMin,this._week.dow):g?this._weekdaysMin[g.day()]:this._weekdaysMin}function Mx(g,N,I){var U,V,se,Fe=g.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],U=0;U<7;++U)se=d([2e3,1]).day(U),this._minWeekdaysParse[U]=this.weekdaysMin(se,"").toLocaleLowerCase(),this._shortWeekdaysParse[U]=this.weekdaysShort(se,"").toLocaleLowerCase(),this._weekdaysParse[U]=this.weekdays(se,"").toLocaleLowerCase();return I?N==="dddd"?(V=vt.call(this._weekdaysParse,Fe),V!==-1?V:null):N==="ddd"?(V=vt.call(this._shortWeekdaysParse,Fe),V!==-1?V:null):(V=vt.call(this._minWeekdaysParse,Fe),V!==-1?V:null):N==="dddd"?(V=vt.call(this._weekdaysParse,Fe),V!==-1||(V=vt.call(this._shortWeekdaysParse,Fe),V!==-1)?V:(V=vt.call(this._minWeekdaysParse,Fe),V!==-1?V:null)):N==="ddd"?(V=vt.call(this._shortWeekdaysParse,Fe),V!==-1||(V=vt.call(this._weekdaysParse,Fe),V!==-1)?V:(V=vt.call(this._minWeekdaysParse,Fe),V!==-1?V:null)):(V=vt.call(this._minWeekdaysParse,Fe),V!==-1||(V=vt.call(this._weekdaysParse,Fe),V!==-1)?V:(V=vt.call(this._shortWeekdaysParse,Fe),V!==-1?V:null))}function Cx(g,N,I){var U,V,se;if(this._weekdaysParseExact)return Mx.call(this,g,N,I);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),U=0;U<7;U++){if(V=d([2e3,1]).day(U),I&&!this._fullWeekdaysParse[U]&&(this._fullWeekdaysParse[U]=new RegExp("^"+this.weekdays(V,"").replace(".","\\\\.?")+"$","i"),this._shortWeekdaysParse[U]=new RegExp("^"+this.weekdaysShort(V,"").replace(".","\\\\.?")+"$","i"),this._minWeekdaysParse[U]=new RegExp("^"+this.weekdaysMin(V,"").replace(".","\\\\.?")+"$","i")),this._weekdaysParse[U]||(se="^"+this.weekdays(V,"")+"|^"+this.weekdaysShort(V,"")+"|^"+this.weekdaysMin(V,""),this._weekdaysParse[U]=new RegExp(se.replace(".",""),"i")),I&&N==="dddd"&&this._fullWeekdaysParse[U].test(g))return U;if(I&&N==="ddd"&&this._shortWeekdaysParse[U].test(g))return U;if(I&&N==="dd"&&this._minWeekdaysParse[U].test(g))return U;if(!I&&this._weekdaysParse[U].test(g))return U}}function Ex(g){if(!this.isValid())return g!=null?this:NaN;var N=this._isUTC?this._d.getUTCDay():this._d.getDay();return g!=null?(g=jc(g,this.localeData()),this.add(g-N,"d")):N}function Tx(g){if(!this.isValid())return g!=null?this:NaN;var N=(this.day()+7-this.localeData()._week.dow)%7;return g==null?N:this.add(g-N,"d")}function Fx(g){if(!this.isValid())return g!=null?this:NaN;if(g!=null){var N=el(g,this.localeData());return this.day(this.day()%7?N:N-7)}else return this.day()||7}function xt(g){return this._weekdaysParseExact?(i(this,"_weekdaysRegex")||Yf.call(this),g?this._weekdaysStrictRegex:this._weekdaysRegex):(i(this,"_weekdaysRegex")||(this._weekdaysRegex=tl),this._weekdaysStrictRegex&&g?this._weekdaysStrictRegex:this._weekdaysRegex)}function gt(g){return this._weekdaysParseExact?(i(this,"_weekdaysRegex")||Yf.call(this),g?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(i(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Dx),this._weekdaysShortStrictRegex&&g?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function _x(g){return this._weekdaysParseExact?(i(this,"_weekdaysRegex")||Yf.call(this),g?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(i(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Sx),this._weekdaysMinStrictRegex&&g?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Yf(){function g(hn,Ca){return Ca.length-hn.length}var N=[],I=[],U=[],V=[],se,Fe,dr,_r,tt;for(se=0;se<7;se++)Fe=d([2e3,1]).day(se),dr=mn(this.weekdaysMin(Fe,"")),_r=mn(this.weekdaysShort(Fe,"")),tt=mn(this.weekdays(Fe,"")),N.push(dr),I.push(_r),U.push(tt),V.push(dr),V.push(_r),V.push(tt);N.sort(g),I.sort(g),U.sort(g),V.sort(g),this._weekdaysRegex=new RegExp("^("+V.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+U.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+I.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+N.join("|")+")","i")}function Hf(){return this.hours()%12||12}function Ox(){return this.hours()||24}$("H",["HH",2],0,"hour"),$("h",["hh",2],0,Hf),$("k",["kk",2],0,Ox),$("hmm",0,0,function(){return""+Hf.apply(this)+K(this.minutes(),2)}),$("hmmss",0,0,function(){return""+Hf.apply(this)+K(this.minutes(),2)+K(this.seconds(),2)}),$("Hmm",0,0,function(){return""+this.hours()+K(this.minutes(),2)}),$("Hmmss",0,0,function(){return""+this.hours()+K(this.minutes(),2)+K(this.seconds(),2)});function nl(g,N){$(g,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),N)})}nl("a",!0),nl("A",!1),ne("hour","h"),Le("hour",13);function al(g,N){return N._meridiemParse}nr("a",al),nr("A",al),nr("H",Q),nr("h",Q),nr("k",Q),nr("HH",Q,Te),nr("hh",Q,Te),nr("kk",Q,Te),nr("hmm",ve),nr("hmmss",Pe),nr("Hmm",ve),nr("Hmmss",Pe),ot(["H","HH"],Tt),ot(["k","kk"],function(g,N,I){var U=Ke(g);N[Tt]=U===24?0:U}),ot(["a","A"],function(g,N,I){I._isPm=I._locale.isPM(g),I._meridiem=g}),ot(["h","hh"],function(g,N,I){N[Tt]=Ke(g),y(I).bigHour=!0}),ot("hmm",function(g,N,I){var U=g.length-2;N[Tt]=Ke(g.substr(0,U)),N[On]=Ke(g.substr(U)),y(I).bigHour=!0}),ot("hmmss",function(g,N,I){var U=g.length-4,V=g.length-2;N[Tt]=Ke(g.substr(0,U)),N[On]=Ke(g.substr(U,2)),N[aa]=Ke(g.substr(V)),y(I).bigHour=!0}),ot("Hmm",function(g,N,I){var U=g.length-2;N[Tt]=Ke(g.substr(0,U)),N[On]=Ke(g.substr(U))}),ot("Hmmss",function(g,N,I){var U=g.length-4,V=g.length-2;N[Tt]=Ke(g.substr(0,U)),N[On]=Ke(g.substr(U,2)),N[aa]=Ke(g.substr(V))});function il(g){return(g+"").toLowerCase().charAt(0)==="p"}var Bx=/[ap]\\.?m?\\.?/i,Vt=Br("Hours",!0);function $f(g,N,I){return g>11?I?"pm":"PM":I?"am":"AM"}var hi={calendar:q,longDateFormat:Se,invalidDate:be,ordinal:Ae,dayOfMonthOrdinalParse:We,relativeTime:J,months:Rf,monthsShort:Ls,week:po,weekdays:bx,weekdaysMin:wx,weekdaysShort:rl,meridiemParse:Bx},bt={},ki={},sn;function ol(g,N){var I,U=Math.min(g.length,N.length);for(I=0;I0;){if(V=es(se.slice(0,I).join("-")),V)return V;if(U&&U.length>=I&&ol(se,U)>=I-1)break;I--}N++}return sn}function ul(g){return g.match("^[^/\\\\\\\\]*$")!=null}function es(g){var N=null,I;if(bt[g]===void 0&&typeof Nf<"u"&&Nf&&Nf.exports&&ul(g))try{N=sn._abbr,I=require,I("./locale/"+g),Va(N)}catch{bt[g]=null}return bt[g]}function Va(g,N){var I;return g&&(l(N)?I=It(g):I=pn(g,N),I?sn=I:typeof console<"u"&&console.warn&&console.warn("Locale "+g+" not found. Did you forget to load it?")),sn._abbr}function pn(g,N){if(N!==null){var I,U=hi;if(N.abbr=g,bt[g]!=null)T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),U=bt[g]._config;else if(N.parentLocale!=null)if(bt[N.parentLocale]!=null)U=bt[N.parentLocale]._config;else if(I=es(N.parentLocale),I!=null)U=I._config;else return ki[N.parentLocale]||(ki[N.parentLocale]=[]),ki[N.parentLocale].push({name:g,config:N}),null;return bt[g]=new G(H(U,N)),ki[g]&&ki[g].forEach(function(V){pn(V.name,V.config)}),Va(g),bt[g]}else return delete bt[g],null}function Px(g,N){if(N!=null){var I,U,V=hi;bt[g]!=null&&bt[g].parentLocale!=null?bt[g].set(H(bt[g]._config,N)):(U=es(g),U!=null&&(V=U._config),N=H(V,N),U==null&&(N.abbr=g),I=new G(N),I.parentLocale=bt[g],bt[g]=I),Va(g)}else bt[g]!=null&&(bt[g].parentLocale!=null?(bt[g]=bt[g].parentLocale,g===Va()&&Va(g)):bt[g]!=null&&delete bt[g]);return bt[g]}function It(g){var N;if(g&&g._locale&&g._locale._abbr&&(g=g._locale._abbr),!g)return sn;if(!a(g)){if(N=es(g),N)return N;g=[g]}return sl(g)}function Ix(){return W(bt)}function Hs(g){var N,I=g._a;return I&&y(g).overflow===-2&&(N=I[Wn]<0||I[Wn]>11?Wn:I[Yn]<1||I[Yn]>fo(I[Gt],I[Wn])?Yn:I[Tt]<0||I[Tt]>24||I[Tt]===24&&(I[On]!==0||I[aa]!==0||I[$a]!==0)?Tt:I[On]<0||I[On]>59?On:I[aa]<0||I[aa]>59?aa:I[$a]<0||I[$a]>999?$a:-1,y(g)._overflowDayOfYear&&(NYn)&&(N=Yn),y(g)._overflowWeeks&&N===-1&&(N=Pf),y(g)._overflowWeekday&&N===-1&&(N=uo),y(g).overflow=N),g}var vi=/^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,$s=/^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,Vf=/Z|[+-]\\d\\d(?::?\\d\\d)?/,dt=[["YYYYYY-MM-DD",/[+-]\\d{6}-\\d\\d-\\d\\d/],["YYYY-MM-DD",/\\d{4}-\\d\\d-\\d\\d/],["GGGG-[W]WW-E",/\\d{4}-W\\d\\d-\\d/],["GGGG-[W]WW",/\\d{4}-W\\d\\d/,!1],["YYYY-DDD",/\\d{4}-\\d{3}/],["YYYY-MM",/\\d{4}-\\d\\d/,!1],["YYYYYYMMDD",/[+-]\\d{10}/],["YYYYMMDD",/\\d{8}/],["GGGG[W]WWE",/\\d{4}W\\d{3}/],["GGGG[W]WW",/\\d{4}W\\d{2}/,!1],["YYYYDDD",/\\d{7}/],["YYYYMM",/\\d{6}/,!1],["YYYY",/\\d{4}/,!1]],Da=[["HH:mm:ss.SSSS",/\\d\\d:\\d\\d:\\d\\d\\.\\d+/],["HH:mm:ss,SSSS",/\\d\\d:\\d\\d:\\d\\d,\\d+/],["HH:mm:ss",/\\d\\d:\\d\\d:\\d\\d/],["HH:mm",/\\d\\d:\\d\\d/],["HHmmss.SSSS",/\\d\\d\\d\\d\\d\\d\\.\\d+/],["HHmmss,SSSS",/\\d\\d\\d\\d\\d\\d,\\d+/],["HHmmss",/\\d\\d\\d\\d\\d\\d/],["HHmm",/\\d\\d\\d\\d/],["HH",/\\d\\d/]],Zf=/^\\/?Date\\((-?\\d+)/i,Rx=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,Qf={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function fl(g){var N,I,U=g._i,V=vi.exec(U)||$s.exec(U),se,Fe,dr,_r,tt=dt.length,hn=Da.length;if(V){for(y(g).iso=!0,N=0,I=tt;Ndi(Fe)||g._dayOfYear===0)&&(y(g)._overflowDayOfYear=!0),I=co(Fe,0,g._dayOfYear),g._a[Wn]=I.getUTCMonth(),g._a[Yn]=I.getUTCDate()),N=0;N<3&&g._a[N]==null;++N)g._a[N]=U[N]=V[N];for(;N<7;N++)g._a[N]=U[N]=g._a[N]==null?N===2?1:0:g._a[N];g._a[Tt]===24&&g._a[On]===0&&g._a[aa]===0&&g._a[$a]===0&&(g._nextDay=!0,g._a[Tt]=0),g._d=(g._useUTC?co:Zc).apply(null,U),se=g._useUTC?g._d.getUTCDay():g._d.getDay(),g._tzm!=null&&g._d.setUTCMinutes(g._d.getUTCMinutes()-g._tzm),g._nextDay&&(g._a[Tt]=24),g._w&&typeof g._w.d<"u"&&g._w.d!==se&&(y(g).weekdayMismatch=!0)}}function pl(g){var N,I,U,V,se,Fe,dr,_r,tt;N=g._w,N.GG!=null||N.W!=null||N.E!=null?(se=1,Fe=4,I=qi(N.GG,g._a[Gt],mo(yt(),1,4).year),U=qi(N.W,1),V=qi(N.E,1),(V<1||V>7)&&(_r=!0)):(se=g._locale._week.dow,Fe=g._locale._week.doy,tt=mo(yt(),se,Fe),I=qi(N.gg,g._a[Gt],tt.year),U=qi(N.w,tt.week),N.d!=null?(V=N.d,(V<0||V>6)&&(_r=!0)):N.e!=null?(V=N.e+se,(N.e<0||N.e>6)&&(_r=!0)):V=se),U<1||U>ia(I,se,Fe)?y(g)._overflowWeeks=!0:_r!=null?y(g)._overflowWeekday=!0:(dr=Qc(I,U,V,se,Fe),g._a[Gt]=dr.year,g._dayOfYear=dr.dayOfYear)}r.ISO_8601=function(){},r.RFC_2822=function(){};function Jf(g){if(g._f===r.ISO_8601){fl(g);return}if(g._f===r.RFC_2822){ll(g);return}g._a=[],y(g).empty=!0;var N=""+g._i,I,U,V,se,Fe,dr=N.length,_r=0,tt,hn;for(V=ge(g._f,g._locale).match(z)||[],hn=V.length,I=0;I0&&y(g).unusedInput.push(Fe),N=N.slice(N.indexOf(U)+U.length),_r+=U.length),ae[se]?(U?y(g).empty=!1:y(g).unusedTokens.push(se),Bf(se,U,g)):g._strict&&!U&&y(g).unusedTokens.push(se);y(g).charsLeftOver=dr-_r,N.length>0&&y(g).unusedInput.push(N),g._a[Tt]<=12&&y(g).bigHour===!0&&g._a[Tt]>0&&(y(g).bigHour=void 0),y(g).parsedDateParts=g._a.slice(0),y(g).meridiem=g._meridiem,g._a[Tt]=Kf(g._locale,g._a[Tt],g._meridiem),tt=y(g).era,tt!==null&&(g._a[Gt]=g._locale.erasConvertYear(tt,g._a[Gt])),rs(g),Hs(g)}function Kf(g,N,I){var U;return I==null?N:g.meridiemHour!=null?g.meridiemHour(N,I):(g.isPM!=null&&(U=g.isPM(I),U&&N<12&&(N+=12),!U&&N===12&&(N=0)),N)}function jf(g){var N,I,U,V,se,Fe,dr=!1,_r=g._f.length;if(_r===0){y(g).invalidFormat=!0,g._d=new Date(NaN);return}for(V=0;V<_r;V++)se=0,Fe=!1,N=A({},g),g._useUTC!=null&&(N._useUTC=g._useUTC),N._f=g._f[V],Jf(N),x(N)&&(Fe=!0),se+=y(N).charsLeftOver,se+=y(N).unusedTokens.length*10,y(N).score=se,dr?sethis?this:g:w()});function vl(g,N){var I,U;if(N.length===1&&a(N[0])&&(N=N[0]),!N.length)return yt();for(I=N[0],U=1;Uthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function _e(){if(!l(this._isDSTShifted))return this._isDSTShifted;var g={},N;return A(g,this),g=wn(g),g._a?(N=g._isUTC?d(g._a):yt(g._a),this._isDSTShifted=this.isValid()&&Gx(g._a,N.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Ne(){return this.isValid()?!this._isUTC:!1}function ir(){return this.isValid()?this._isUTC:!1}function Ar(){return this.isValid()?this._isUTC&&this._offset===0:!1}var rt=/^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,zt=/^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Lr(g,N){var I=g,U=null,V,se,Fe;return oa(g)?I={ms:g._milliseconds,d:g._days,M:g._months}:c(g)||!isNaN(+g)?(I={},N?I[N]=+g:I.milliseconds=+g):(U=rt.exec(g))?(V=U[1]==="-"?-1:1,I={y:0,d:Ke(U[Yn])*V,h:Ke(U[Tt])*V,m:Ke(U[On])*V,s:Ke(U[aa])*V,ms:Ke(go(U[$a]*1e3))*V}):(U=zt.exec(g))?(V=U[1]==="-"?-1:1,I={y:Za(U[2],V),M:Za(U[3],V),w:Za(U[4],V),d:Za(U[5],V),h:Za(U[6],V),m:Za(U[7],V),s:Za(U[8],V)}):I==null?I={}:typeof I=="object"&&("from"in I||"to"in I)&&(Fe=Hn(yt(I.from),yt(I.to)),I={},I.ms=Fe.milliseconds,I.M=Fe.months),se=new ts(I),oa(g)&&i(g,"_locale")&&(se._locale=g._locale),oa(g)&&i(g,"_isValid")&&(se._isValid=g._isValid),se}Lr.fn=ts.prototype,Lr.invalid=rc;function Za(g,N){var I=g&&parseFloat(g.replace(",","."));return(isNaN(I)?0:I)*N}function yl(g,N){var I={};return I.months=N.month()-g.month()+(N.year()-g.year())*12,g.clone().add(I.months,"M").isAfter(N)&&--I.months,I.milliseconds=+N-+g.clone().add(I.months,"M"),I}function Hn(g,N){var I;return g.isValid()&&N.isValid()?(N=Bn(N,g),g.isBefore(N)?I=yl(g,N):(I=yl(N,g),I.milliseconds=-I.milliseconds,I.months=-I.months),I):{milliseconds:0,months:0}}function ns(g,N){return function(I,U){var V,se;return U!==null&&!isNaN(+U)&&(T(N,"moment()."+N+"(period, number) is deprecated. Please use moment()."+N+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),se=I,I=U,U=se),V=Lr(I,U),xl(this,V,g),this}}function xl(g,N,I,U){var V=N._milliseconds,se=go(N._days),Fe=go(N._months);!g.isValid()||(U=U??!0,Fe&&pi(g,ee(g,"Month")+Fe*I),se&&ce(g,"Date",ee(g,"Date")+se*I),V&&g._d.setTime(g._d.valueOf()+V*I),U&&r.updateOffset(g,se||Fe))}var yo=ns(1,"add"),Zs=ns(-1,"subtract");function as(g){return typeof g=="string"||g instanceof String}function ut(g){return D(g)||o(g)||as(g)||c(g)||bl(g)||jx(g)||g===null||g===void 0}function jx(g){var N=n(g)&&!s(g),I=!1,U=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],V,se,Fe=U.length;for(V=0;VI.valueOf():I.valueOf()9999?me(I,N?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):R(Date.prototype.toISOString)?N?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",me(I,"Z")):me(I,N?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function zi(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var g="moment",N="",I,U,V,se;return this.isLocal()||(g=this.utcOffset()===0?"moment.utc":"moment.parseZone",N="Z"),I="["+g+'("]',U=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",V="-MM-DD[T]HH:mm:ss.SSS",se=N+'[")]',this.format(I+U+V+se)}function js(g){g||(g=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var N=me(this,g);return this.localeData().postformat(N)}function n1(g,N){return this.isValid()&&(D(g)&&g.isValid()||yt(g).isValid())?Lr({to:this,from:g}).locale(this.locale()).humanize(!N):this.localeData().invalidDate()}function a1(g){return this.from(yt(),g)}function i1(g,N){return this.isValid()&&(D(g)&&g.isValid()||yt(g).isValid())?Lr({from:this,to:g}).locale(this.locale()).humanize(!N):this.localeData().invalidDate()}function eu(g){return this.to(yt(),g)}function os(g){var N;return g===void 0?this._locale._abbr:(N=It(g),N!=null&&(this._locale=N),this)}var ru=_("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(g){return g===void 0?this.localeData():this.locale(g)});function Al(){return this._locale}var ss=1e3,xo=60*ss,tu=60*xo,Rt=(365*400+97)*24*tu;function Ft(g,N){return(g%N+N)%N}function Ml(g,N,I){return g<100&&g>=0?new Date(g+400,N,I)-Rt:new Date(g,N,I).valueOf()}function Cl(g,N,I){return g<100&&g>=0?Date.UTC(g+400,N,I)-Rt:Date.UTC(g,N,I)}function El(g){var N,I;if(g=ue(g),g===void 0||g==="millisecond"||!this.isValid())return this;switch(I=this._isUTC?Cl:Ml,g){case"year":N=I(this.year(),0,1);break;case"quarter":N=I(this.year(),this.month()-this.month()%3,1);break;case"month":N=I(this.year(),this.month(),1);break;case"week":N=I(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":N=I(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":N=I(this.year(),this.month(),this.date());break;case"hour":N=this._d.valueOf(),N-=Ft(N+(this._isUTC?0:this.utcOffset()*xo),tu);break;case"minute":N=this._d.valueOf(),N-=Ft(N,xo);break;case"second":N=this._d.valueOf(),N-=Ft(N,ss);break}return this._d.setTime(N),r.updateOffset(this,!0),this}function o1(g){var N,I;if(g=ue(g),g===void 0||g==="millisecond"||!this.isValid())return this;switch(I=this._isUTC?Cl:Ml,g){case"year":N=I(this.year()+1,0,1)-1;break;case"quarter":N=I(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":N=I(this.year(),this.month()+1,1)-1;break;case"week":N=I(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":N=I(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":N=I(this.year(),this.month(),this.date()+1)-1;break;case"hour":N=this._d.valueOf(),N+=tu-Ft(N+(this._isUTC?0:this.utcOffset()*xo),tu)-1;break;case"minute":N=this._d.valueOf(),N+=xo-Ft(N,xo)-1;break;case"second":N=this._d.valueOf(),N+=ss-Ft(N,ss)-1;break}return this._d.setTime(N),r.updateOffset(this,!0),this}function tc(){return this._d.valueOf()-(this._offset||0)*6e4}function us(){return Math.floor(this.valueOf()/1e3)}function nc(){return new Date(this.valueOf())}function bo(){var g=this;return[g.year(),g.month(),g.date(),g.hour(),g.minute(),g.second(),g.millisecond()]}function fs(){var g=this;return{years:g.year(),months:g.month(),date:g.date(),hours:g.hours(),minutes:g.minutes(),seconds:g.seconds(),milliseconds:g.milliseconds()}}function cs(){return this.isValid()?this.toISOString():null}function nu(){return x(this)}function wo(){return m({},y(this))}function s1(){return y(this).overflow}function u1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}$("N",0,0,"eraAbbr"),$("NN",0,0,"eraAbbr"),$("NNN",0,0,"eraAbbr"),$("NNNN",0,0,"eraName"),$("NNNNN",0,0,"eraNarrow"),$("y",["y",1],"yo","eraYear"),$("y",["yy",2],0,"eraYear"),$("y",["yyy",3],0,"eraYear"),$("y",["yyyy",4],0,"eraYear"),nr("N",Rr),nr("NN",Rr),nr("NNN",Rr),nr("NNNN",m1),nr("NNNNN",p1),ot(["N","NN","NNN","NNNN","NNNNN"],function(g,N,I,U){var V=I._locale.erasParse(g,U,I._strict);V?y(I).era=V:y(I).invalidEra=g}),nr("y",Pt),nr("yy",Pt),nr("yyy",Pt),nr("yyyy",Pt),nr("yo",d1),ot(["y","yy","yyy","yyyy"],Gt),ot(["yo"],function(g,N,I,U){var V;I._locale._eraYearOrdinalRegex&&(V=g.match(I._locale._eraYearOrdinalRegex)),I._locale.eraYearOrdinalParse?N[Gt]=I._locale.eraYearOrdinalParse(g,V):N[Gt]=parseInt(g,10)});function f1(g,N){var I,U,V,se=this._eras||It("en")._eras;for(I=0,U=se.length;I=0)return se[U]}function l1(g,N){var I=g.since<=g.until?1:-1;return N===void 0?r(g.since).year():r(g.since).year()+(N-g.offset)*I}function au(){var g,N,I,U=this.localeData().eras();for(g=0,N=U.length;gse&&(N=se),b1.call(this,g,N,I,U,V))}function b1(g,N,I,U,V){var se=Qc(g,N,I,U,V),Fe=co(se.year,0,se.dayOfYear);return this.year(Fe.getUTCFullYear()),this.month(Fe.getUTCMonth()),this.date(Fe.getUTCDate()),this}$("Q",0,"Qo","quarter"),ne("quarter","Q"),Le("quarter",7),nr("Q",ke),ot("Q",function(g,N){N[Wn]=(Ke(g)-1)*3});function w1(g){return g==null?Math.ceil((this.month()+1)/3):this.month((g-1)*3+this.month()%3)}$("D",["DD",2],"Do","date"),ne("date","D"),Le("date",9),nr("D",Q),nr("DD",Q,Te),nr("Do",function(g,N){return g?N._dayOfMonthOrdinalParse||N._ordinalParse:N._dayOfMonthOrdinalParseLenient}),ot(["D","DD"],Yn),ot("Do",function(g,N){N[Yn]=Ke(g.match(Q)[0])});var _l=Br("Date",!0);$("DDD",["DDDD",3],"DDDo","dayOfYear"),ne("dayOfYear","DDD"),Le("dayOfYear",4),nr("DDD",tr),nr("DDDD",Re),ot(["DDD","DDDD"],function(g,N,I){I._dayOfYear=Ke(g)});function Ja(g){var N=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return g==null?N:this.add(g-N,"d")}$("m",["mm",2],0,"minute"),ne("minute","m"),Le("minute",14),nr("m",Q),nr("mm",Q,Te),ot(["m","mm"],On);var D1=Br("Minutes",!1);$("s",["ss",2],0,"second"),ne("second","s"),Le("second",15),nr("s",Q),nr("ss",Q,Te),ot(["s","ss"],aa);var S1=Br("Seconds",!1);$("S",0,0,function(){return~~(this.millisecond()/100)}),$(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),$(0,["SSS",3],0,"millisecond"),$(0,["SSSS",4],0,function(){return this.millisecond()*10}),$(0,["SSSSS",5],0,function(){return this.millisecond()*100}),$(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),$(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),$(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),$(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),ne("millisecond","ms"),Le("millisecond",16),nr("S",tr,ke),nr("SS",tr,Te),nr("SSS",tr,Re);var bi,Ol;for(bi="SSSS";bi.length<=9;bi+="S")nr(bi,Pt);function N1(g,N){N[$a]=Ke(("0."+g)*1e3)}for(bi="S";bi.length<=9;bi+="S")ot(bi,N1);Ol=Br("Milliseconds",!1),$("z",0,0,"zoneAbbr"),$("zz",0,0,"zoneName");function Ui(){return this._isUTC?"UTC":""}function A1(){return this._isUTC?"Coordinated Universal Time":""}var Ve=M.prototype;Ve.add=yo,Ve.calendar=r1,Ve.clone=t1,Ve.diff=Sl,Ve.endOf=o1,Ve.format=js,Ve.from=n1,Ve.fromNow=a1,Ve.to=i1,Ve.toNow=eu,Ve.get=we,Ve.invalidAt=s1,Ve.isAfter=Xs,Ve.isBefore=xi,Ve.isBetween=Js,Ve.isSame=wl,Ve.isSameOrAfter=Ks,Ve.isSameOrBefore=Dl,Ve.isValid=nu,Ve.lang=ru,Ve.locale=os,Ve.localeData=Al,Ve.max=zx,Ve.min=hl,Ve.parsingFlags=wo,Ve.set=Be,Ve.startOf=El,Ve.subtract=Zs,Ve.toArray=bo,Ve.toObject=fs,Ve.toDate=nc,Ve.toISOString=is,Ve.inspect=zi,typeof Symbol<"u"&&Symbol.for!=null&&(Ve[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Ve.toJSON=cs,Ve.toString=Nl,Ve.unix=us,Ve.valueOf=tc,Ve.creationData=u1,Ve.eraName=au,Ve.eraNarrow=ls,Ve.eraAbbr=Tl,Ve.eraYear=Z,Ve.year=zf,Ve.isLeapYear=yx,Ve.weekYear=h1,Ve.isoWeekYear=v1,Ve.quarter=Ve.quarters=w1,Ve.month=Ga,Ve.daysInMonth=Ws,Ve.week=Ve.weeks=xx,Ve.isoWeek=Ve.isoWeeks=Kc,Ve.weeksInYear=Xa,Ve.weeksInWeekYear=x1,Ve.isoWeeksInYear=g1,Ve.isoWeeksInISOWeekYear=y1,Ve.date=_l,Ve.day=Ve.days=Ex,Ve.weekday=Tx,Ve.isoWeekday=Fx,Ve.dayOfYear=Ja,Ve.hour=Ve.hours=Vt,Ve.minute=Ve.minutes=D1,Ve.second=Ve.seconds=S1,Ve.millisecond=Ve.milliseconds=Ol,Ve.utcOffset=Zx,Ve.utc=Xx,Ve.local=Jx,Ve.parseZone=Kx,Ve.hasAlignedHourOffset=yi,Ve.isDST=de,Ve.isLocal=Ne,Ve.isUtcOffset=ir,Ve.isUtc=Ar,Ve.isUTC=Ar,Ve.zoneAbbr=Ui,Ve.zoneName=A1,Ve.dates=_("dates accessor is deprecated. Use date instead.",_l),Ve.months=_("months accessor is deprecated. Use month instead",Ga),Ve.years=_("years accessor is deprecated. Use year instead",zf),Ve.zone=_("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Qx),Ve.isDSTShifted=_("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",_e);function sa(g){return yt(g*1e3)}function M1(){return yt.apply(null,arguments).parseZone()}function Bl(g){return g}var Jr=G.prototype;Jr.calendar=k,Jr.longDateFormat=ye,Jr.invalidDate=De,Jr.ordinal=Je,Jr.preparse=Bl,Jr.postformat=Bl,Jr.relativeTime=re,Jr.pastFuture=xe,Jr.set=L,Jr.eras=f1,Jr.erasParse=c1,Jr.erasConvertYear=l1,Jr.erasAbbrRegex=iu,Jr.erasNameRegex=Do,Jr.erasNarrowRegex=$n,Jr.months=Ri,Jr.monthsShort=et,Jr.monthsParse=kf,Jr.monthsRegex=gx,Jr.monthsShortRegex=qf,Jr.week=Uf,Jr.firstDayOfYear=Jc,Jr.firstDayOfWeek=Xc,Jr.weekdays=Nx,Jr.weekdaysMin=Wf,Jr.weekdaysShort=Ax,Jr.weekdaysParse=Cx,Jr.weekdaysRegex=xt,Jr.weekdaysShortRegex=gt,Jr.weekdaysMinRegex=_x,Jr.isPM=il,Jr.meridiem=$f;function su(g,N,I,U){var V=It(),se=d().set(U,N);return V[I](se,g)}function Pl(g,N,I){if(c(g)&&(N=g,g=void 0),g=g||"",N!=null)return su(g,N,I,"month");var U,V=[];for(U=0;U<12;U++)V[U]=su(g,U,I,"month");return V}function uu(g,N,I,U){typeof g=="boolean"?(c(N)&&(I=N,N=void 0),N=N||""):(N=g,I=N,g=!1,c(N)&&(I=N,N=void 0),N=N||"");var V=It(),se=g?V._week.dow:0,Fe,dr=[];if(I!=null)return su(N,(I+se)%7,U,"day");for(Fe=0;Fe<7;Fe++)dr[Fe]=su(N,(Fe+se)%7,U,"day");return dr}function Il(g,N){return Pl(g,N,"months")}function C1(g,N){return Pl(g,N,"monthsShort")}function E1(g,N,I){return uu(g,N,I,"weekdays")}function ac(g,N,I){return uu(g,N,I,"weekdaysShort")}function ms(g,N,I){return uu(g,N,I,"weekdaysMin")}Va("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\\d{1,2}(th|st|nd|rd)/,ordinal:function(g){var N=g%10,I=Ke(g%100/10)===1?"th":N===1?"st":N===2?"nd":N===3?"rd":"th";return g+I}}),r.lang=_("moment.lang is deprecated. Use moment.locale instead.",Va),r.langData=_("moment.langData is deprecated. Use moment.localeData instead.",It);var Gn=Math.abs;function T1(){var g=this._data;return this._milliseconds=Gn(this._milliseconds),this._days=Gn(this._days),this._months=Gn(this._months),g.milliseconds=Gn(g.milliseconds),g.seconds=Gn(g.seconds),g.minutes=Gn(g.minutes),g.hours=Gn(g.hours),g.months=Gn(g.months),g.years=Gn(g.years),this}function ic(g,N,I,U){var V=Lr(N,I);return g._milliseconds+=U*V._milliseconds,g._days+=U*V._days,g._months+=U*V._months,g._bubble()}function F1(g,N){return ic(this,g,N,1)}function Ka(g,N){return ic(this,g,N,-1)}function fu(g){return g<0?Math.floor(g):Math.ceil(g)}function Wi(){var g=this._milliseconds,N=this._days,I=this._months,U=this._data,V,se,Fe,dr,_r;return g>=0&&N>=0&&I>=0||g<=0&&N<=0&&I<=0||(g+=fu(oc(I)+N)*864e5,N=0,I=0),U.milliseconds=g%1e3,V=or(g/1e3),U.seconds=V%60,se=or(V/60),U.minutes=se%60,Fe=or(se/60),U.hours=Fe%24,N+=or(Fe/24),_r=or(Pn(N)),I+=_r,N-=fu(oc(_r)),dr=or(I/12),I%=12,U.days=N,U.months=I,U.years=dr,this}function Pn(g){return g*4800/146097}function oc(g){return g*146097/4800}function Rl(g){if(!this.isValid())return NaN;var N,I,U=this._milliseconds;if(g=ue(g),g==="month"||g==="quarter"||g==="year")switch(N=this._days+U/864e5,I=this._months+Pn(N),g){case"month":return I;case"quarter":return I/3;case"year":return I/12}else switch(N=this._days+Math.round(oc(this._months)),g){case"week":return N/7+U/6048e5;case"day":return N+U/864e5;case"hour":return N*24+U/36e5;case"minute":return N*1440+U/6e4;case"second":return N*86400+U/1e3;case"millisecond":return Math.floor(N*864e5)+U;default:throw new Error("Unknown unit "+g)}}function kl(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+Ke(this._months/12)*31536e6:NaN}function In(g){return function(){return this.as(g)}}var wi=In("ms"),ql=In("s"),_1=In("m"),cu=In("h"),O1=In("d"),Ll=In("w"),Jt=In("M"),sc=In("Q"),zl=In("y");function Na(){return Lr(this)}function uc(g){return g=ue(g),this.isValid()?this[g+"s"]():NaN}function Aa(g){return function(){return this.isValid()?this._data[g]:NaN}}var Yi=Aa("milliseconds"),Ul=Aa("seconds"),dn=Aa("minutes"),fc=Aa("hours"),B1=Aa("days"),P1=Aa("months"),I1=Aa("years");function cc(){return or(this.days()/7)}var ja=Math.round,Ma={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Wl(g,N,I,U,V){return V.relativeTime(N||1,!!I,g,U)}function R1(g,N,I,U){var V=Lr(g).abs(),se=ja(V.as("s")),Fe=ja(V.as("m")),dr=ja(V.as("h")),_r=ja(V.as("d")),tt=ja(V.as("M")),hn=ja(V.as("w")),Ca=ja(V.as("y")),ei=se<=I.ss&&["s",se]||se0,ei[4]=U,Wl.apply(null,ei)}function k1(g){return g===void 0?ja:typeof g=="function"?(ja=g,!0):!1}function ps(g,N){return Ma[g]===void 0?!1:N===void 0?Ma[g]:(Ma[g]=N,g==="s"&&(Ma.ss=N-1),!0)}function q1(g,N){if(!this.isValid())return this.localeData().invalidDate();var I=!1,U=Ma,V,se;return typeof g=="object"&&(N=g,g=!1),typeof g=="boolean"&&(I=g),typeof N=="object"&&(U=Object.assign({},Ma,N),N.s!=null&&N.ss==null&&(U.ss=N.s-1)),V=this.localeData(),se=R1(this,!I,U,V),I&&(se=V.pastFuture(+this,se)),V.postformat(se)}var lc=Math.abs;function Di(g){return(g>0)-(g<0)||+g}function ds(){if(!this.isValid())return this.localeData().invalidDate();var g=lc(this._milliseconds)/1e3,N=lc(this._days),I=lc(this._months),U,V,se,Fe,dr=this.asSeconds(),_r,tt,hn,Ca;return dr?(U=or(g/60),V=or(U/60),g%=60,U%=60,se=or(I/12),I%=12,Fe=g?g.toFixed(3).replace(/\\.?0+$/,""):"",_r=dr<0?"-":"",tt=Di(this._months)!==Di(dr)?"-":"",hn=Di(this._days)!==Di(dr)?"-":"",Ca=Di(this._milliseconds)!==Di(dr)?"-":"",_r+"P"+(se?tt+se+"Y":"")+(I?tt+I+"M":"")+(N?hn+N+"D":"")+(V||U||g?"T":"")+(V?Ca+V+"H":"")+(U?Ca+U+"M":"")+(g?Ca+Fe+"S":"")):"P0D"}var Vr=ts.prototype;Vr.isValid=$x,Vr.abs=T1,Vr.add=F1,Vr.subtract=Ka,Vr.as=Rl,Vr.asMilliseconds=wi,Vr.asSeconds=ql,Vr.asMinutes=_1,Vr.asHours=cu,Vr.asDays=O1,Vr.asWeeks=Ll,Vr.asMonths=Jt,Vr.asQuarters=sc,Vr.asYears=zl,Vr.valueOf=kl,Vr._bubble=Wi,Vr.clone=Na,Vr.get=uc,Vr.milliseconds=Yi,Vr.seconds=Ul,Vr.minutes=dn,Vr.hours=fc,Vr.days=B1,Vr.weeks=cc,Vr.months=P1,Vr.years=I1,Vr.humanize=q1,Vr.toISOString=ds,Vr.toString=ds,Vr.toJSON=ds,Vr.locale=os,Vr.localeData=Al,Vr.toIsoString=_("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ds),Vr.lang=ru,$("X",0,0,"unix"),$("x",0,0,"valueOf"),nr("x",Xt),nr("X",Ff),ot("X",function(g,N,I){I._d=new Date(parseFloat(g)*1e3)}),ot("x",function(g,N,I){I._d=new Date(Ke(g))});return r.version="2.29.4",t(yt),r.fn=Ve,r.min=Ux,r.max=Wx,r.now=Yx,r.utc=d,r.unix=sa,r.months=Il,r.isDate=o,r.locale=Va,r.invalid=w,r.duration=Lr,r.isMoment=D,r.weekdays=E1,r.parseZone=M1,r.localeData=It,r.isDuration=oa,r.monthsShort=C1,r.weekdaysMin=ms,r.defineLocale=pn,r.updateLocale=Px,r.locales=Ix,r.weekdaysShort=ac,r.normalizeUnits=ue,r.relativeTimeRounding=k1,r.relativeTimeThreshold=ps,r.calendarFormat=e1,r.prototype=Ve,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r})});function _a(e){return _a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_a(e)}function Sn(e){if(e===null||e===!0||e===!1)return NaN;var r=Number(e);return isNaN(r)?r:r<0?Math.ceil(r):Math.floor(r)}function nt(e,r){if(r.length1?"s":"")+" required, but only "+r.length+" present")}function Yt(e){nt(1,arguments);var r=Object.prototype.toString.call(e);return e instanceof Date||_a(e)==="object"&&r==="[object Date]"?new Date(e.getTime()):typeof e=="number"||r==="[object Number]"?new Date(e):((typeof e=="string"||r==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use \`parseISO\` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function wb(e,r){nt(2,arguments);var t=Yt(e).getTime(),a=Sn(r);return new Date(t+a)}var Bk={};function Co(){return Bk}function Db(e){var r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),e.getTime()-r.getTime()}var Pk=365.2425,Ik=Math.pow(10,8)*24*60*60*1e3,Sb=6e4,Nb=36e5;var oQ=-Ik;var Rk=3600;var uA=Rk*24,sQ=uA*7,kk=uA*Pk,qk=kk/12,uQ=qk*3;function Ab(e){return nt(1,arguments),e instanceof Date||_a(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Mb(e){if(nt(1,arguments),!Ab(e)&&typeof e!="number")return!1;var r=Yt(e);return!isNaN(Number(r))}function Cb(e,r){nt(2,arguments);var t=Sn(r);return wb(e,-t)}var Lk=864e5;function Eb(e){nt(1,arguments);var r=Yt(e),t=r.getTime();r.setUTCMonth(0,1),r.setUTCHours(0,0,0,0);var a=r.getTime(),n=t-a;return Math.floor(n/Lk)+1}function Eo(e){nt(1,arguments);var r=1,t=Yt(e),a=t.getUTCDay(),n=(a=n.getTime()?t+1:r.getTime()>=s.getTime()?t:t-1}function Tb(e){nt(1,arguments);var r=gc(e),t=new Date(0);t.setUTCFullYear(r,0,4),t.setUTCHours(0,0,0,0);var a=Eo(t);return a}var zk=6048e5;function Fb(e){nt(1,arguments);var r=Yt(e),t=Eo(r).getTime()-Tb(r).getTime();return Math.round(t/zk)+1}function To(e,r){var t,a,n,i,s,l,c,o;nt(1,arguments);var u=Co(),m=Sn((t=(a=(n=(i=r?.weekStartsOn)!==null&&i!==void 0?i:r==null||(s=r.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&n!==void 0?n:u.weekStartsOn)!==null&&a!==void 0?a:(c=u.locale)===null||c===void 0||(o=c.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&t!==void 0?t:0);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Yt(e),h=d.getUTCDay(),y=(h=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(m+1,0,h),y.setUTCHours(0,0,0,0);var v=To(y,r),x=new Date(0);x.setUTCFullYear(m,0,h),x.setUTCHours(0,0,0,0);var w=To(x,r);return u.getTime()>=v.getTime()?m+1:u.getTime()>=w.getTime()?m:m-1}function _b(e,r){var t,a,n,i,s,l,c,o;nt(1,arguments);var u=Co(),m=Sn((t=(a=(n=(i=r?.firstWeekContainsDate)!==null&&i!==void 0?i:r==null||(s=r.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&n!==void 0?n:u.firstWeekContainsDate)!==null&&a!==void 0?a:(c=u.locale)===null||c===void 0||(o=c.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&t!==void 0?t:1),d=yc(e,r),h=new Date(0);h.setUTCFullYear(d,0,m),h.setUTCHours(0,0,0,0);var y=To(h,r);return y}var Uk=6048e5;function Ob(e,r){nt(1,arguments);var t=Yt(e),a=To(t,r).getTime()-_b(t,r).getTime();return Math.round(a/Uk)+1}function st(e,r){for(var t=e<0?"-":"",a=Math.abs(e).toString();a.length0?a:1-a;return st(t==="yy"?n%100:n,t.length)},M:function(r,t){var a=r.getUTCMonth();return t==="M"?String(a+1):st(a+1,2)},d:function(r,t){return st(r.getUTCDate(),t.length)},a:function(r,t){var a=r.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h:function(r,t){return st(r.getUTCHours()%12||12,t.length)},H:function(r,t){return st(r.getUTCHours(),t.length)},m:function(r,t){return st(r.getUTCMinutes(),t.length)},s:function(r,t){return st(r.getUTCSeconds(),t.length)},S:function(r,t){var a=t.length,n=r.getUTCMilliseconds(),i=Math.floor(n*Math.pow(10,a-3));return st(i,t.length)}},Xi=Wk;var vu={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Yk={G:function(r,t,a){var n=r.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return a.era(n,{width:"abbreviated"});case"GGGGG":return a.era(n,{width:"narrow"});case"GGGG":default:return a.era(n,{width:"wide"})}},y:function(r,t,a){if(t==="yo"){var n=r.getUTCFullYear(),i=n>0?n:1-n;return a.ordinalNumber(i,{unit:"year"})}return Xi.y(r,t)},Y:function(r,t,a,n){var i=yc(r,n),s=i>0?i:1-i;if(t==="YY"){var l=s%100;return st(l,2)}return t==="Yo"?a.ordinalNumber(s,{unit:"year"}):st(s,t.length)},R:function(r,t){var a=gc(r);return st(a,t.length)},u:function(r,t){var a=r.getUTCFullYear();return st(a,t.length)},Q:function(r,t,a){var n=Math.ceil((r.getUTCMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return st(n,2);case"Qo":return a.ordinalNumber(n,{unit:"quarter"});case"QQQ":return a.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(n,{width:"wide",context:"formatting"})}},q:function(r,t,a){var n=Math.ceil((r.getUTCMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return st(n,2);case"qo":return a.ordinalNumber(n,{unit:"quarter"});case"qqq":return a.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(n,{width:"wide",context:"standalone"})}},M:function(r,t,a){var n=r.getUTCMonth();switch(t){case"M":case"MM":return Xi.M(r,t);case"Mo":return a.ordinalNumber(n+1,{unit:"month"});case"MMM":return a.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(n,{width:"wide",context:"formatting"})}},L:function(r,t,a){var n=r.getUTCMonth();switch(t){case"L":return String(n+1);case"LL":return st(n+1,2);case"Lo":return a.ordinalNumber(n+1,{unit:"month"});case"LLL":return a.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(n,{width:"wide",context:"standalone"})}},w:function(r,t,a,n){var i=Ob(r,n);return t==="wo"?a.ordinalNumber(i,{unit:"week"}):st(i,t.length)},I:function(r,t,a){var n=Fb(r);return t==="Io"?a.ordinalNumber(n,{unit:"week"}):st(n,t.length)},d:function(r,t,a){return t==="do"?a.ordinalNumber(r.getUTCDate(),{unit:"date"}):Xi.d(r,t)},D:function(r,t,a){var n=Eb(r);return t==="Do"?a.ordinalNumber(n,{unit:"dayOfYear"}):st(n,t.length)},E:function(r,t,a){var n=r.getUTCDay();switch(t){case"E":case"EE":case"EEE":return a.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(n,{width:"short",context:"formatting"});case"EEEE":default:return a.day(n,{width:"wide",context:"formatting"})}},e:function(r,t,a,n){var i=r.getUTCDay(),s=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return st(s,2);case"eo":return a.ordinalNumber(s,{unit:"day"});case"eee":return a.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(i,{width:"short",context:"formatting"});case"eeee":default:return a.day(i,{width:"wide",context:"formatting"})}},c:function(r,t,a,n){var i=r.getUTCDay(),s=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return st(s,t.length);case"co":return a.ordinalNumber(s,{unit:"day"});case"ccc":return a.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(i,{width:"narrow",context:"standalone"});case"cccccc":return a.day(i,{width:"short",context:"standalone"});case"cccc":default:return a.day(i,{width:"wide",context:"standalone"})}},i:function(r,t,a){var n=r.getUTCDay(),i=n===0?7:n;switch(t){case"i":return String(i);case"ii":return st(i,t.length);case"io":return a.ordinalNumber(i,{unit:"day"});case"iii":return a.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(n,{width:"short",context:"formatting"});case"iiii":default:return a.day(n,{width:"wide",context:"formatting"})}},a:function(r,t,a){var n=r.getUTCHours(),i=n/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(r,t,a){var n=r.getUTCHours(),i;switch(n===12?i=vu.noon:n===0?i=vu.midnight:i=n/12>=1?"pm":"am",t){case"b":case"bb":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(r,t,a){var n=r.getUTCHours(),i;switch(n>=17?i=vu.evening:n>=12?i=vu.afternoon:n>=4?i=vu.morning:i=vu.night,t){case"B":case"BB":case"BBB":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(r,t,a){if(t==="ho"){var n=r.getUTCHours()%12;return n===0&&(n=12),a.ordinalNumber(n,{unit:"hour"})}return Xi.h(r,t)},H:function(r,t,a){return t==="Ho"?a.ordinalNumber(r.getUTCHours(),{unit:"hour"}):Xi.H(r,t)},K:function(r,t,a){var n=r.getUTCHours()%12;return t==="Ko"?a.ordinalNumber(n,{unit:"hour"}):st(n,t.length)},k:function(r,t,a){var n=r.getUTCHours();return n===0&&(n=24),t==="ko"?a.ordinalNumber(n,{unit:"hour"}):st(n,t.length)},m:function(r,t,a){return t==="mo"?a.ordinalNumber(r.getUTCMinutes(),{unit:"minute"}):Xi.m(r,t)},s:function(r,t,a){return t==="so"?a.ordinalNumber(r.getUTCSeconds(),{unit:"second"}):Xi.s(r,t)},S:function(r,t){return Xi.S(r,t)},X:function(r,t,a,n){var i=n._originalDate||r,s=i.getTimezoneOffset();if(s===0)return"Z";switch(t){case"X":return cA(s);case"XXXX":case"XX":return ys(s);case"XXXXX":case"XXX":default:return ys(s,":")}},x:function(r,t,a,n){var i=n._originalDate||r,s=i.getTimezoneOffset();switch(t){case"x":return cA(s);case"xxxx":case"xx":return ys(s);case"xxxxx":case"xxx":default:return ys(s,":")}},O:function(r,t,a,n){var i=n._originalDate||r,s=i.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+fA(s,":");case"OOOO":default:return"GMT"+ys(s,":")}},z:function(r,t,a,n){var i=n._originalDate||r,s=i.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+fA(s,":");case"zzzz":default:return"GMT"+ys(s,":")}},t:function(r,t,a,n){var i=n._originalDate||r,s=Math.floor(i.getTime()/1e3);return st(s,t.length)},T:function(r,t,a,n){var i=n._originalDate||r,s=i.getTime();return st(s,t.length)}};function fA(e,r){var t=e>0?"-":"+",a=Math.abs(e),n=Math.floor(a/60),i=a%60;if(i===0)return t+String(n);var s=r||"";return t+String(n)+s+st(i,2)}function cA(e,r){if(e%60===0){var t=e>0?"-":"+";return t+st(Math.abs(e)/60,2)}return ys(e,r)}function ys(e,r){var t=r||"",a=e>0?"-":"+",n=Math.abs(e),i=st(Math.floor(n/60),2),s=st(n%60,2);return a+i+t+s}var lA=Yk;var mA=function(r,t){switch(r){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},pA=function(r,t){switch(r){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Hk=function(r,t){var a=r.match(/(P+)(p+)?/)||[],n=a[1],i=a[2];if(!i)return mA(r,t);var s;switch(n){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",mA(n,t)).replace("{{time}}",pA(i,t))},$k={p:pA,P:Hk},dA=$k;var Gk=["D","DD"],Vk=["YY","YYYY"];function hA(e){return Gk.indexOf(e)!==-1}function vA(e){return Vk.indexOf(e)!==-1}function Bb(e,r,t){if(e==="YYYY")throw new RangeError("Use \`yyyy\` instead of \`YYYY\` (in \`".concat(r,"\`) for formatting years to the input \`").concat(t,"\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use \`yy\` instead of \`YY\` (in \`".concat(r,"\`) for formatting years to the input \`").concat(t,"\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use \`d\` instead of \`D\` (in \`".concat(r,"\`) for formatting days of the month to the input \`").concat(t,"\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use \`dd\` instead of \`DD\` (in \`".concat(r,"\`) for formatting days of the month to the input \`").concat(t,"\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Zk={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Qk=function(r,t,a){var n,i=Zk[r];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",t.toString()),a!=null&&a.addSuffix?a.comparison&&a.comparison>0?"in "+n:n+" ago":n},gA=Qk;function xc(e){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=r.width?String(r.width):e.defaultWidth,a=e.formats[t]||e.formats[e.defaultWidth];return a}}var Xk={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Jk={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Kk={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},jk={date:xc({formats:Xk,defaultWidth:"full"}),time:xc({formats:Jk,defaultWidth:"full"}),dateTime:xc({formats:Kk,defaultWidth:"full"})},yA=jk;var eq={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},rq=function(r,t,a,n){return eq[r]},xA=rq;function xs(e){return function(r,t){var a=t!=null&&t.context?String(t.context):"standalone",n;if(a==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,s=t!=null&&t.width?String(t.width):i;n=e.formattingValues[s]||e.formattingValues[i]}else{var l=e.defaultWidth,c=t!=null&&t.width?String(t.width):e.defaultWidth;n=e.values[c]||e.values[l]}var o=e.argumentCallback?e.argumentCallback(r):r;return n[o]}}var tq={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},nq={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},aq={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},iq={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},oq={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},sq={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},uq=function(r,t){var a=Number(r),n=a%100;if(n>20||n<10)switch(n%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},fq={ordinalNumber:uq,era:xs({values:tq,defaultWidth:"wide"}),quarter:xs({values:nq,defaultWidth:"wide",argumentCallback:function(r){return r-1}}),month:xs({values:aq,defaultWidth:"wide"}),day:xs({values:iq,defaultWidth:"wide"}),dayPeriod:xs({values:oq,defaultWidth:"wide",formattingValues:sq,defaultFormattingWidth:"wide"})},bA=fq;function bs(e){return function(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=t.width,n=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],i=r.match(n);if(!i)return null;var s=i[0],l=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?lq(l,function(m){return m.test(s)}):cq(l,function(m){return m.test(s)}),o;o=e.valueCallback?e.valueCallback(c):c,o=t.valueCallback?t.valueCallback(o):o;var u=r.slice(s.length);return{value:o,rest:u}}}function cq(e,r){for(var t in e)if(e.hasOwnProperty(t)&&r(e[t]))return t}function lq(e,r){for(var t=0;t1&&arguments[1]!==void 0?arguments[1]:{},a=r.match(e.matchPattern);if(!a)return null;var n=a[0],i=r.match(e.parsePattern);if(!i)return null;var s=e.valueCallback?e.valueCallback(i[0]):i[0];s=t.valueCallback?t.valueCallback(s):s;var l=r.slice(n.length);return{value:s,rest:l}}}var mq=/^(\\d+)(th|st|nd|rd)?/i,pq=/\\d+/i,dq={narrow:/^(b|a)/i,abbreviated:/^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},hq={any:[/^b/i,/^(a|c)/i]},vq={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},gq={any:[/1/i,/2/i,/3/i,/4/i]},yq={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},xq={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},bq={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},wq={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Dq={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Sq={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Nq={ordinalNumber:Pb({matchPattern:mq,parsePattern:pq,valueCallback:function(r){return parseInt(r,10)}}),era:bs({matchPatterns:dq,defaultMatchWidth:"wide",parsePatterns:hq,defaultParseWidth:"any"}),quarter:bs({matchPatterns:vq,defaultMatchWidth:"wide",parsePatterns:gq,defaultParseWidth:"any",valueCallback:function(r){return r+1}}),month:bs({matchPatterns:yq,defaultMatchWidth:"wide",parsePatterns:xq,defaultParseWidth:"any"}),day:bs({matchPatterns:bq,defaultMatchWidth:"wide",parsePatterns:wq,defaultParseWidth:"any"}),dayPeriod:bs({matchPatterns:Dq,defaultMatchWidth:"any",parsePatterns:Sq,defaultParseWidth:"any"})},wA=Nq;var Aq={code:"en-US",formatDistance:gA,formatLong:yA,formatRelative:xA,localize:bA,match:wA,options:{weekStartsOn:0,firstWeekContainsDate:1}},DA=Aq;var SA=DA;var Mq=/[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g,Cq=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Eq=/^'([^]*?)'?$/,Tq=/''/g,Fq=/[a-zA-Z]/;function Ai(e,r,t){var a,n,i,s,l,c,o,u,m,d,h,y,v,x,w,C,b,A;nt(2,arguments);var M=String(r),D=Co(),O=(a=(n=t?.locale)!==null&&n!==void 0?n:D.locale)!==null&&a!==void 0?a:SA,_=Sn((i=(s=(l=(c=t?.firstWeekContainsDate)!==null&&c!==void 0?c:t==null||(o=t.locale)===null||o===void 0||(u=o.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&l!==void 0?l:D.firstWeekContainsDate)!==null&&s!==void 0?s:(m=D.locale)===null||m===void 0||(d=m.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(_>=1&&_<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var E=Sn((h=(y=(v=(x=t?.weekStartsOn)!==null&&x!==void 0?x:t==null||(w=t.locale)===null||w===void 0||(C=w.options)===null||C===void 0?void 0:C.weekStartsOn)!==null&&v!==void 0?v:D.weekStartsOn)!==null&&y!==void 0?y:(b=D.locale)===null||b===void 0||(A=b.options)===null||A===void 0?void 0:A.weekStartsOn)!==null&&h!==void 0?h:0);if(!(E>=0&&E<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!O.localize)throw new RangeError("locale must contain localize property");if(!O.formatLong)throw new RangeError("locale must contain formatLong property");var T=Yt(e);if(!Mb(T))throw new RangeError("Invalid time value");var R=Db(T),L=Cb(T,R),H={firstWeekContainsDate:_,weekStartsOn:E,locale:O,_originalDate:T},G=M.match(Cq).map(function(W){var q=W[0];if(q==="p"||q==="P"){var k=dA[q];return k(W,O.formatLong)}return W}).join("").match(Mq).map(function(W){if(W==="''")return"'";var q=W[0];if(q==="'")return _q(W);var k=lA[q];if(k)return!(t!=null&&t.useAdditionalWeekYearTokens)&&vA(W)&&Bb(W,r,String(e)),!(t!=null&&t.useAdditionalDayOfYearTokens)&&hA(W)&&Bb(W,r,String(e)),k(L,W,O.localize,H);if(q.match(Fq))throw new RangeError("Format string contains an unescaped latin alphabet character \`"+q+"\`");return W}).join("");return G}function _q(e){var r=e.match(Eq);return r?r[1].replace(Tq,"'"):e}function Ib(e,r){if(_a(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var a=t.call(e,r||"default");if(_a(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Rb(e){var r=Ib(e,"string");return _a(r)=="symbol"?r:r+""}function Hr(e,r,t){return r=Rb(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function um(e,r){var t;nt(1,arguments);var a=Sn((t=r?.additionalDigits)!==null&&t!==void 0?t:2);if(a!==2&&a!==1&&a!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var n=Iq(e),i;if(n.date){var s=Rq(n.date,a);i=kq(s.restDateString,s.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);var l=i.getTime(),c=0,o;if(n.time&&(c=qq(n.time),isNaN(c)))return new Date(NaN);if(n.timezone){if(o=Lq(n.timezone),isNaN(o))return new Date(NaN)}else{var u=new Date(l+c),m=new Date(0);return m.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),m.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),m}return new Date(l+c+o)}var sm={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Oq=/^-?(?:(\\d{3})|(\\d{2})(?:-?(\\d{2}))?|W(\\d{2})(?:-?(\\d{1}))?|)$/,Bq=/^(\\d{2}(?:[.,]\\d*)?)(?::?(\\d{2}(?:[.,]\\d*)?))?(?::?(\\d{2}(?:[.,]\\d*)?))?$/,Pq=/^([+-])(\\d{2})(?::?(\\d{2}))?$/;function Iq(e){var r={},t=e.split(sm.dateTimeDelimiter),a;if(t.length>2)return r;if(/:/.test(t[0])?a=t[0]:(r.date=t[0],a=t[1],sm.timeZoneDelimiter.test(r.date)&&(r.date=e.split(sm.timeZoneDelimiter)[0],a=e.substr(r.date.length,e.length))),a){var n=sm.timezone.exec(a);n?(r.time=a.replace(n[1],""),r.timezone=n[1]):r.time=a}return r}function Rq(e,r){var t=new RegExp("^(?:(\\\\d{4}|[+-]\\\\d{"+(4+r)+"})|(\\\\d{2}|[+-]\\\\d{"+(2+r)+"})$)"),a=e.match(t);if(!a)return{year:NaN,restDateString:""};var n=a[1]?parseInt(a[1]):null,i=a[2]?parseInt(a[2]):null;return{year:i===null?n:i*100,restDateString:e.slice((a[1]||a[2]).length)}}function kq(e,r){if(r===null)return new Date(NaN);var t=e.match(Oq);if(!t)return new Date(NaN);var a=!!t[4],n=bc(t[1]),i=bc(t[2])-1,s=bc(t[3]),l=bc(t[4]),c=bc(t[5])-1;if(a)return Hq(r,l,c)?zq(r,l,c):new Date(NaN);var o=new Date(0);return!Wq(r,i,s)||!Yq(r,n)?new Date(NaN):(o.setUTCFullYear(r,i,Math.max(n,s)),o)}function bc(e){return e?parseInt(e):1}function qq(e){var r=e.match(Bq);if(!r)return NaN;var t=kb(r[1]),a=kb(r[2]),n=kb(r[3]);return $q(t,a,n)?t*Nb+a*Sb+n*1e3:NaN}function kb(e){return e&&parseFloat(e.replace(",","."))||0}function Lq(e){if(e==="Z")return 0;var r=e.match(Pq);if(!r)return 0;var t=r[1]==="+"?-1:1,a=parseInt(r[2]),n=r[3]&&parseInt(r[3])||0;return Gq(a,n)?t*(a*Nb+n*Sb):NaN}function zq(e,r,t){var a=new Date(0);a.setUTCFullYear(e,0,4);var n=a.getUTCDay()||7,i=(r-1)*7+t+1-n;return a.setUTCDate(a.getUTCDate()+i),a}var Uq=[31,null,31,30,31,30,31,31,30,31,30,31];function NA(e){return e%400===0||e%4===0&&e%100!==0}function Wq(e,r,t){return r>=0&&r<=11&&t>=1&&t<=(Uq[r]||(NA(e)?29:28))}function Yq(e,r){return r>=1&&r<=(NA(e)?366:365)}function Hq(e,r,t){return r>=1&&r<=53&&t>=0&&t<=6}function $q(e,r,t){return e===24?r===0&&t===0:t>=0&&t<60&&r>=0&&r<60&&e>=0&&e<25}function Gq(e,r){return r>=0&&r<=59}var pa=e=>[...new Set(e)];var AA=(e,r)=>e.sort(function(t,a){let n=r.indexOf(t),i=r.indexOf(a);return n>i?n!=-1&&i==-1?-1:1:i!=-1&&n==-1?1:-1});var qn="File";function fm(e){return Array.isArray(e)?e:typeof e=="string"?[e]:[]}var MA=(e,r)=>r.indexOf(e)>0?r.indexOf(e):r.length;var wc=e=>"spaces://"+e;var CA=e=>e.charAt(0)=="/"?e.substring(1):e;var qb=(e,r)=>{if(e instanceof Date)return"date";if(typeof e=="string"){if(/\\/\\/(\\S+?(?:jpe?g|png|gif|svg))/gi.test(e)||e.includes("unsplash"))return"image";if(/^\\d{4}-\\d{2}-\\d{2}$/.test(e))return"date";if(r=="tag"||r=="tags")return"tags-multi";if(/\\[\\[.*?\\]\\]/.test(e))return"link"}else{if(typeof e=="number")return"number";if(typeof e=="boolean")return"boolean";if(e)if(Array.isArray(e)||typeof e=="string"&&e.indexOf(",")>-1){let t=Array.isArray(e)?e:[];if(typeof e=="string"&&e.indexOf(",")>-1&&(t=gn(e)),r=="tag"||r=="tags")return"tags-multi";if(t.length==1&&Array.isArray(t[0])&&t[0].length==1&&typeof t[0][0]=="string")return"link";let a=pa(t.map(n=>qb(n,r)));return a.length==1&&a[0]=="link"?"link-multi":a.some(n=>n=="object")?"object-multi":"option-multi"}else return e.isLuxonDateTime?"date":e.isLuxonDuration?"duration":e.type=="file"?"link":typeof e=="object"&&!Array.isArray(e)&&e!==null?"object":"unknown";else return"unknown"}return"text"};var Lb=(e,r,t)=>e?e=="object"||e=="object-multi"?JSON.parse(r):e=="number"?parseFloat(r):e=="boolean"?r=="true":e.includes("-multi")?gn(r).map(a=>Lb(e.replace("-multi",""),a,t)):(e.includes("link")||e.includes("context"))&&t?\`[[\${r}]]\`:r:r;var EA=e=>e.map(r=>r.replace(",","\\\\,")).join(", "),ws=e=>JSON.stringify(e);var gn=e=>e?.startsWith("[")?fm(Dc(e)):Vq(e),Vq=e=>(e?.replace("\\\\,",",")?.match(/(\\\\.|[^,])+/g)??[]).map(r=>r.trim()),Ds=(e,r,t)=>{let a=t??qb(r,e);if(!r)return"";switch(a){case"tags-multi":return r;case"object":case"object-multi":return JSON.stringify(r);case"number":return r.toString();case"boolean":return r?"true":"false";case"date":{if(r instanceof Date){let n=Ai(r,"yyyy-MM-dd");return typeof n=="string"?n:""}return typeof r!="string"?"":r}break;case"duration":return EA(Object.keys(r.values).reduce((n,i)=>[...n,...r.values[i]>0?[r.values[i]+" "+i]:[]],[]));case"option-multi":case"link-multi":case"context-multi":return typeof r=="string"?Sc(r):ws(r.map(n=>n?typeof n=="string"?Sc(n):n.path?n.path:Array.isArray(r)&&n.length==1&&Array.isArray(n[0])&&n[0].length==1&&typeof n[0][0]=="string"?n[0][0]:JSON.stringify(n):""));case"link":case"context":return Array.isArray(r)&&r.length==1&&Array.isArray(r[0])&&r[0].length==1&&typeof r[0][0]=="string"?r[0][0]:typeof r=="string"?Sc(r):r.path;case"text":case"tag":case"option":case"image":return r}return""};var Dc=e=>{let r;try{r=JSON.parse(e)}catch{}return r};var Sc=e=>{if(!e)return"";let r=/\\[\\[(.*?)\\]\\]/g.exec(e),t=r?.length>1?r[1].substring(0,MA("|",r[1])):e;return t||e};var yu=ma(cm());var zb=e=>e?(0,yu.isFinite)(e)?new Date(e):(0,yu.isString)(e)?um(e):(0,yu.isDate)(e)?e:null:null;var TA=(e,r,t)=>{let a=e[0];if(!a.isSymbolNode||e.length!==3)return"";let n=a.name,i=e[1];return r.evaluate(\`\${n} = \${i.toString()}\`,t),e[2].compile().evaluate(t)};TA.rawArgs=!0;var FA=(e,r,t)=>{if(e.length%2!==1)return"";for(let n=0;n{if(e.length!==1)return"";let a=e.map(function(i){return i.compile().evaluate(t)});return t.get("$paths").get(a[0])};_A.rawArgs=!0;var OA=(e,r,t)=>t?.get("$current");OA.rawArgs=!0;var BA=(e,r,t)=>t?.get("$index");BA.rawArgs=!0;var PA=(e,r,t)=>{if(e.length!==2)return"";let a=e[0].compile().evaluate?e[0].compile().evaluate(t):e[0];return Array.isArray(a)?a.find((n,i)=>{t.set("$current",n),t.set("$index",i),r.evaluate("current = _current(); index = _index()",t);let s=e[1].compile().evaluate?e[1].compile().evaluate(t):e[1];return n===s})??"":""};PA.rawArgs=!0;var IA=(e,r,t)=>{if(e.length!==2)return"";let a=e[0].compile().evaluate?e[0].compile().evaluate(t):e[0];return Array.isArray(a)?a.findIndex((n,i)=>{t.set("$current",n),t.set("$index",i),r.evaluate("current = _current(); index = _index()",t);let s=e[1].compile().evaluate?e[1].compile().evaluate(t):e[1];return n===s}):""};IA.rawArgs=!0;var RA=(e,r,t)=>{if(e.length!==2)return"";let a=e[0].compile().evaluate?e[0].compile().evaluate(t):e[0];return Array.isArray(a)?a.filter((n,i)=>(t.set("$current",n),t.set("$index",i),r.evaluate("current = _current(); index = _index()",t),e[1].compile().evaluate(t))):""};RA.rawArgs=!0;var kA=(e,r,t)=>{if(e.length!==2)return"";let a=e[0].compile().evaluate?e[0].compile().evaluate(t):e[0];return Array.isArray(a)?a.map((n,i)=>(t.set("$current",n),t.set("$index",i),r.evaluate("current = _current(); index = _index()",t),e[1].compile().evaluate(t))):[]};kA.rawArgs=!0;var qA=(e,r,t)=>{if(e.length!==2)return"";let a=e[0].compile().evaluate?e[0].compile().evaluate(t):e[0];return Array.isArray(a)?a.some((n,i)=>(t.set("$current",n),t.set("$index",i),r.evaluate("current = _current(); index = _index()",t),e[1].compile().evaluate(t))):""};qA.rawArgs=!0;var LA=(e,r,t)=>{if(e.length!==2)return"";let a=e[0].compile().evaluate?e[0].compile().evaluate(t):e[0];return Array.isArray(a)?a.every((n,i)=>(t.set("$current",n),t.set("$index",i),r.evaluate("current = _current(); index = _index()",t),e[1].compile().evaluate(t))):""};LA.rawArgs=!0;var zA=(e,r,t)=>{if(e.length!==1)return"";let a=e[0].compile().evaluate?e[0].compile().evaluate(t):e[0];return Array.isArray(a)?a.flat():""};zA.rawArgs=!0;var UA=(e,r,t)=>{if(e.length!==1)return"";let a=e.map(function(s){return s.compile().evaluate(t)}),n=t.get("$properties")?.[a[0]]?.type,i=Lb(n,t.get(a[0]));return(n=="file"||n=="link"||n=="context")&&(n.includes("multi")?i=gn(i).map(s=>t.get("$paths").get(s)??s):i=t.get("$paths").get(i)??i),n=="date"&&(i=zb(i)),i??""};UA.rawArgs=!0;var WA=(e,r,t)=>{if((e.length-1)%2!==0)return"";for(let a=0;a{if(e.length<1||e.length>2)return"";let a=e[0].compile().evaluate(t);a instanceof Date||(a=new Date(a));let n=e[1]?.compile().evaluate(t);return n?.length>0?Ai(a,n):Ai(a,t.get("$settings")?.dateFormat??"yyyy-MM-dd")};YA.rawArgs=!0;var Ln=e=>typeof e=="string"||e instanceof String?e:e instanceof Date?Ai(e,"yyyy-MM-dd"):typeof e=="number"?e.toFixed(0):e?.path?e.path:"",Ub={prop:UA,_current:OA,_index:BA,slice:(e,r,t)=>(e=Ln(e),e.slice(r,t)),if:(e,r,t)=>e===!0?r:t,ifs:WA,empty:e=>e.length!==1?"":Array.isArray(e[0])?e[0].length===0:e[0]===""?"true":"false",length:e=>e.length,values:e=>e.flat().length,uniques:e=>pa(e.flat()).length,substring:(e,r,t)=>(e=Ln(e),t?e.substring(r,t):e.substring(r)),startsWith:(e,r)=>(e=Ln(e),r=Ln(r),e.startsWith(r)),contains:(e,r)=>(e=Ln(e),r=Ln(r),e.includes(r)),test:(e,r)=>(e=Ln(e),new RegExp(r).test(e)),match:(e,r)=>(e=Ln(e),e.match(new RegExp(r))),replace:(e,r,t)=>(e=Ln(e),e.replace(new RegExp(r),t)),replaceAll:(e,r,t)=>(e=Ln(e),r=Ln(r),t=Ln(t),e.replace(new RegExp(r,"g"),t)),lower:e=>(e=Ln(e),e.toLowerCase()),upper:e=>(e=Ln(e),e.toUpperCase()),repeat:(e,r)=>e.repeat(r),format:Ln,toNumber:e=>e instanceof Date?e.getTime():typeof e=="string"?parseFloat(e):e,now:()=>new Date,minute:e=>e.getMinutes(),hour:e=>e.getHours(),day:e=>e.getDay(),date:e=>e.getDate(),week:e=>Ai(e,"w"),month:e=>e.getMonth()+1,year:e=>e.getFullYear(),pad:(e,r,t)=>e.padStart(r,t),range:e=>Math.max(...e)-Math.min(...e),latest:e=>new Date(Math.max(...e.map(r=>r.getTime()))),earliest:e=>new Date(Math.min(...e.map(r=>r.getTime()))),dateRange:(e,r)=>{let t=Math.abs(Math.max(...e.map(a=>a.getTime()))-Math.min(...e.map(a=>a.getTime())));return r.startsWith("day")?t/(1e3*60*60*24):r.startsWith("month")?t/(1e3*60*60*24*30):r.startsWith("year")?t/(1e3*60*60*24*365):r.startsWith("hour")?t/(1e3*60*60):r.startsWith("minute")?t/(1e3*60):r.startsWith("second")?t/1e3:r.startsWith("week")?t/(1e3*60*60*24*7):r.startsWith("quarter")?t/(1e3*60*60*24*30*3):t/(1e3*60*60*24)},dateAdd:(e,r,t)=>(t.startsWith("day")&&e.setDate(e.getDate()+r),t.startsWith("month")&&e.setMonth(e.getMonth()+r),t.startsWith("year")&&e.setFullYear(e.getFullYear()+r),t.startsWith("quarter")&&e.setMonth(e.getMonth()+r*3),t.startsWith("week")&&e.setDate(e.getDate()+r*7),t.startsWith("hour")&&e.setHours(e.getHours()+r),t.startsWith("minute")&&e.setMinutes(e.getMinutes()+r),t.startsWith("second")&&e.setSeconds(e.getSeconds()+r),e),dateSubtract:(e,r,t)=>(t.startsWith("day")&&e.setDate(e.getDate()-r),t.startsWith("month")&&e.setMonth(e.getMonth()-r),t.startsWith("year")&&e.setFullYear(e.getFullYear()-r),t.startsWith("quarter")&&e.setMonth(e.getMonth()-r*3),t.startsWith("week")&&e.setDate(e.getDate()-r*7),t.startsWith("hour")&&e.setHours(e.getHours()-r),t.startsWith("minute")&&e.setMinutes(e.getMinutes()-r),t.startsWith("second")&&e.setSeconds(e.getSeconds()-r),e),dateBetween:(e,r,t)=>{let s=Math.abs(r.getTime()-e.getTime());switch(t){case"days":return Math.round(s/864e5);case"months":return Math.round(s/2592e6);case"years":return Math.round(s/31536e6);case"hours":return Math.round(s/(60*60*1e3));case"minutes":return Math.round(s/(60*1e3));case"seconds":return Math.round(s/1e3);case"weeks":return Math.round(s/(864e5*7));case"quarters":return Math.round(s/(2592e6*3));default:return Math.round(s/864e5)}},style:(e,r)=>e,timeStamp:e=>e.getTime(),at:(e,r)=>e[r],first:e=>e[0],last:e=>e[e.length-1],concat:(e,r)=>e.concat(r),sort:e=>e.sort((r,t)=>t-r),reverse:e=>e.reverse(),join:(e,r)=>e.join(r),includes:(e,r)=>e.includes(r),split:(e,r)=>e.split(r),formatDate:YA,parseDate:e=>zb(e),find:PA,findIndex:IA,filter:RA,map:kA,some:qA,every:LA,flat:zA,path:_A,let:TA,lets:FA};function ht(){return ht=Object.assign?Object.assign.bind():function(e){for(var r=1;re[r])}var Nm=["Matrix","Array"],Am=["number","BigNumber","Fraction"];function QA(e,r){function t(a){if(a){var n=wu(e,ar);ZA(a,"matrix",Nm),ZA(a,"number",Am),Wb(e,a);var i=wu(e,ar),s=wu(a,ar);return r("config",i,n,s),i}else return wu(e,ar)}return t.MATRIX_OPTIONS=Nm,t.NUMBER_OPTIONS=Am,Object.keys(Ss).forEach(a=>{Object.defineProperty(t,a,{get:()=>e[a],enumerable:!0,configurable:!0})}),t}function Zq(e,r){return e.indexOf(r)!==-1}function ZA(e,r,t){e[r]!==void 0&&!Zq(t,e[r])&&console.warn('Warning: Unknown value "'+e[r]+'" for configuration option "'+r+'". Available options: '+t.map(a=>JSON.stringify(a)).join(", ")+".")}var Oe=function(r){if(r)throw new Error(\`The global config is readonly. Please create a mathjs instance if you want to change the default configuration. Example: @@ -263,7 +263,7 @@ q: \`+this.q.toString():"")+\` \`),a.seealso&&a.seealso.length&&(n+="See also: "+a.seealso.join(", ")+\` \`),n},t.prototype.toJSON=function(){var a=ar(this.doc);return a.mathjs="Help",a},t.fromJSON=function(a){var n={};return Object.keys(a).filter(i=>i!=="mathjs").forEach(i=>{n[i]=a[i]}),new t(n)},t.prototype.valueOf=t.prototype.toString,t},{isClass:!0});var bG="Chain",wG=["?on","math","typed"],hg=F(bG,wG,e=>{var{on:r,math:t,typed:a}=e;function n(o){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");bu(o)?this.value=o.value:this.value=o}n.prototype.type="Chain",n.prototype.isChain=!0,n.prototype.done=function(){return this.value},n.prototype.valueOf=function(){return this.value},n.prototype.toString=function(){return lr(this.value)},n.prototype.toJSON=function(){return{mathjs:"Chain",value:this.value}},n.fromJSON=function(o){return new n(o.value)};function i(o,u){typeof u=="function"&&(n.prototype[o]=l(u))}function s(o,u){Du(n.prototype,o,function(){var d=u();if(typeof d=="function")return l(d)})}function l(o){return function(){if(arguments.length===0)return new n(o(this.value));for(var u=[this.value],m=0;mo[y])};for(var d in o)m(d)}};var c={expression:!0,docs:!0,type:!0,classes:!0,json:!0,error:!0,isChain:!0};return n.createProxy(t),r&&r("import",function(o,u,m){m||s(o,u)}),n},{isClass:!0});var ND={name:"e",category:"Constants",syntax:["e"],description:"Euler's number, the base of the natural logarithm. Approximately equal to 2.71828",examples:["e","e ^ 2","exp(2)","log(e)"],seealso:["exp"]};var BT={name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]};var PT={name:"i",category:"Constants",syntax:["i"],description:"Imaginary unit, defined as i*i=-1. A complex number is described as a + b*i, where a is the real part, and b is the imaginary part.",examples:["i","i * i","sqrt(-1)"],seealso:[]};var IT={name:"Infinity",category:"Constants",syntax:["Infinity"],description:"Infinity, a number which is larger than the maximum number that can be handled by a floating point number.",examples:["Infinity","1 / 0"],seealso:[]};var RT={name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]};var kT={name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]};var qT={name:"LOG10E",category:"Constants",syntax:["LOG10E"],description:"Returns the base-10 logarithm of E, approximately equal to 0.434",examples:["LOG10E","log(e, 10)"],seealso:[]};var LT={name:"LOG2E",category:"Constants",syntax:["LOG2E"],description:"Returns the base-2 logarithm of E, approximately equal to 1.442",examples:["LOG2E","log(e, 2)"],seealso:[]};var zT={name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]};var UT={name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]};var WT={name:"phi",category:"Constants",syntax:["phi"],description:"Phi is the golden ratio. Two quantities are in the golden ratio if their ratio is the same as the ratio of their sum to the larger of the two quantities. Phi is defined as \`(1 + sqrt(5)) / 2\` and is approximately 1.618034...",examples:["phi"],seealso:[]};var AD={name:"pi",category:"Constants",syntax:["pi"],description:"The number pi is a mathematical constant that is the ratio of a circle's circumference to its diameter, and is approximately equal to 3.14159",examples:["pi","sin(pi/2)"],seealso:["tau"]};var YT={name:"SQRT1_2",category:"Constants",syntax:["SQRT1_2"],description:"Returns the square root of 1/2, approximately equal to 0.707",examples:["SQRT1_2","sqrt(1/2)"],seealso:[]};var HT={name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]};var $T={name:"tau",category:"Constants",syntax:["tau"],description:"Tau is the ratio constant of a circle's circumference to radius, equal to 2 * pi, approximately 6.2832.",examples:["tau","2 * pi"],seealso:["pi"]};var GT={name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]};var VT={name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]};var ZT={name:"bignumber",category:"Construction",syntax:["bignumber(x)"],description:"Create a big number from a number or string.",examples:["0.1 + 0.2","bignumber(0.1) + bignumber(0.2)",'bignumber("7.2")','bignumber("7.2e500")',"bignumber([0.1, 0.2, 0.3])"],seealso:["boolean","complex","fraction","index","matrix","string","unit"]};var QT={name:"boolean",category:"Construction",syntax:["x","boolean(x)"],description:"Convert a string or number into a boolean.",examples:["boolean(0)","boolean(1)","boolean(3)",'boolean("true")','boolean("false")',"boolean([1, 0, 1, 1])"],seealso:["bignumber","complex","index","matrix","number","string","unit"]};var XT={name:"complex",category:"Construction",syntax:["complex()","complex(re, im)","complex(string)"],description:"Create a complex number.",examples:["complex()","complex(2, 3)",'complex("7 - 2i")'],seealso:["bignumber","boolean","index","matrix","number","string","unit"]};var JT={name:"createUnit",category:"Construction",syntax:["createUnit(definitions)","createUnit(name, definition)"],description:"Create a user-defined unit and register it with the Unit type.",examples:['createUnit("foo")','createUnit("knot", {definition: "0.514444444 m/s", aliases: ["knots", "kt", "kts"]})','createUnit("mph", "1 mile/hour")'],seealso:["unit","splitUnit"]};var KT={name:"fraction",category:"Construction",syntax:["fraction(num)","fraction(matrix)","fraction(num,den)","fraction({n: num, d: den})"],description:"Create a fraction from a number or from integer numerator and denominator.",examples:["fraction(0.125)","fraction(1, 3) + fraction(2, 5)","fraction({n: 333, d: 53})","fraction([sqrt(9), sqrt(10), sqrt(11)])"],seealso:["bignumber","boolean","complex","index","matrix","string","unit"]};var jT={name:"index",category:"Construction",syntax:["[start]","[start:end]","[start:step:end]","[start1, start 2, ...]","[start1:end1, start2:end2, ...]","[start1:step1:end1, start2:step2:end2, ...]"],description:"Create an index to get or replace a subset of a matrix",examples:["A = [1, 2, 3; 4, 5, 6]","A[1, :]","A[1, 2] = 50","A[1:2, 1:2] = 1","B = [1, 2, 3]","B[B>1 and B<3]"],seealso:["bignumber","boolean","complex","matrix,","number","range","string","unit"]};var eF={name:"matrix",category:"Construction",syntax:["[]","[a1, b1, ...; a2, b2, ...]","matrix()",'matrix("dense")',"matrix([...])"],description:"Create a matrix.",examples:["[]","[1, 2, 3]","[1, 2, 3; 4, 5, 6]","matrix()","matrix([3, 4])",'matrix([3, 4; 5, 6], "sparse")','matrix([3, 4; 5, 6], "sparse", "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","sparse"]};var rF={name:"number",category:"Construction",syntax:["x","number(x)","number(unit, valuelessUnit)"],description:"Create a number or convert a string or boolean into a number.",examples:["2","2e3","4.05","number(2)",'number("7.2")',"number(true)","number([true, false, true, true])",'number(unit("52cm"), "m")'],seealso:["bignumber","boolean","complex","fraction","index","matrix","string","unit"]};var tF={name:"sparse",category:"Construction",syntax:["sparse()","sparse([a1, b1, ...; a1, b2, ...])",'sparse([a1, b1, ...; a1, b2, ...], "number")'],description:"Create a sparse matrix.",examples:["sparse()","sparse([3, 4; 5, 6])",'sparse([3, 0; 5, 0], "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","matrix"]};var nF={name:"splitUnit",category:"Construction",syntax:["splitUnit(unit: Unit, parts: Unit[])"],description:"Split a unit in an array of units whose sum is equal to the original unit.",examples:['splitUnit(1 m, ["feet", "inch"])'],seealso:["unit","createUnit"]};var aF={name:"string",category:"Construction",syntax:['"text"',"string(x)"],description:"Create a string or convert a value to a string",examples:['"Hello World!"',"string(4.2)","string(3 + 2i)"],seealso:["bignumber","boolean","complex","index","matrix","number","unit"]};var iF={name:"unit",category:"Construction",syntax:["value unit","unit(value, unit)","unit(string)"],description:"Create a unit.",examples:["5.5 mm","3 inch",'unit(7.1, "kilogram")','unit("23 deg")'],seealso:["bignumber","boolean","complex","index","matrix","number","string"]};var oF={name:"config",category:"Core",syntax:["config()","config(options)"],description:"Get configuration or change configuration.",examples:["config()","1/3 + 1/4",'config({number: "Fraction"})',"1/3 + 1/4"],seealso:[]};var sF={name:"import",category:"Core",syntax:["import(functions)","import(functions, options)"],description:"Import functions or constants from an object.",examples:["import({myFn: f(x)=x^2, myConstant: 32 })","myFn(2)","myConstant"],seealso:[]};var uF={name:"typed",category:"Core",syntax:["typed(signatures)","typed(name, signatures)"],description:"Create a typed function.",examples:['double = typed({ "number": f(x)=x+x, "string": f(x)=concat(x,x) })',"double(2)",'double("hello")'],seealso:[]};var fF={name:"derivative",category:"Algebra",syntax:["derivative(expr, variable)","derivative(expr, variable, {simplify: boolean})"],description:"Takes the derivative of an expression expressed in parser Nodes. The derivative will be taken over the supplied variable in the second parameter. If there are multiple variables in the expression, it will return a partial derivative.",examples:['derivative("2x^3", "x")','derivative("2x^3", "x", {simplify: false})','derivative("2x^2 + 3x + 4", "x")','derivative("sin(2x)", "x")','f = parse("x^2 + x")','x = parse("x")',"df = derivative(f, x)","df.evaluate({x: 3})"],seealso:["simplify","parse","evaluate"]};var cF={name:"leafCount",category:"Algebra",syntax:["leafCount(expr)"],description:"Computes the number of leaves in the parse tree of the given expression",examples:['leafCount("e^(i*pi)-1")','leafCount(parse("{a: 22/7, b: 10^(1/2)}"))'],seealso:["simplify"]};var lF={name:"lsolve",category:"Algebra",syntax:["x=lsolve(L, b)"],description:"Finds one solution of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolveAll","lup","lusolve","usolve","matrix","sparse"]};var mF={name:"lsolveAll",category:"Algebra",syntax:["x=lsolveAll(L, b)"],description:"Finds all solutions of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolve","lup","lusolve","usolve","matrix","sparse"]};var pF={name:"lup",category:"Algebra",syntax:["lup(m)"],description:"Calculate the Matrix LU decomposition with partial pivoting. Matrix A is decomposed in three matrices (L, U, P) where P * A = L * U",examples:["lup([[2, 1], [1, 4]])","lup(matrix([[2, 1], [1, 4]]))","lup(sparse([[2, 1], [1, 4]]))"],seealso:["lusolve","lsolve","usolve","matrix","sparse","slu","qr"]};var dF={name:"lusolve",category:"Algebra",syntax:["x=lusolve(A, b)","x=lusolve(lu, b)"],description:"Solves the linear system A * x = b where A is an [n x n] matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lusolve(a, b)"],seealso:["lup","slu","lsolve","usolve","matrix","sparse"]};var hF={name:"polynomialRoot",category:"Algebra",syntax:["x=polynomialRoot(-6, 3)","x=polynomialRoot(4, -4, 1)","x=polynomialRoot(-8, 12, -6, 1)"],description:"Finds the roots of a univariate polynomial given by its coefficients starting from constant, linear, and so on, increasing in degree.",examples:["a = polynomialRoot(-6, 11, -6, 1)"],seealso:["cbrt","sqrt"]};var vF={name:"qr",category:"Algebra",syntax:["qr(A)"],description:"Calculates the Matrix QR decomposition. Matrix \`A\` is decomposed in two matrices (\`Q\`, \`R\`) where \`Q\` is an orthogonal matrix and \`R\` is an upper triangular matrix.",examples:["qr([[1, -1, 4], [1, 4, -2], [1, 4, 2], [1, -1, 0]])"],seealso:["lup","slu","matrix"]};var gF={name:"rationalize",category:"Algebra",syntax:["rationalize(expr)","rationalize(expr, scope)","rationalize(expr, scope, detailed)"],description:"Transform a rationalizable expression in a rational fraction. If rational fraction is one variable polynomial then converts the numerator and denominator in canonical form, with decreasing exponents, returning the coefficients of numerator.",examples:['rationalize("2x/y - y/(x+1)")','rationalize("2x/y - y/(x+1)", true)'],seealso:["simplify"]};var yF={name:"resolve",category:"Algebra",syntax:["resolve(node, scope)"],description:"Recursively substitute variables in an expression tree.",examples:['resolve(parse("1 + x"), { x: 7 })','resolve(parse("size(text)"), { text: "Hello World" })','resolve(parse("x + y"), { x: parse("3z") })','resolve(parse("3x"), { x: parse("y+z"), z: parse("w^y") })'],seealso:["simplify","evaluate"],mayThrow:["ReferenceError"]};var xF={name:"simplify",category:"Algebra",syntax:["simplify(expr)","simplify(expr, rules)"],description:"Simplify an expression tree.",examples:['simplify("3 + 2 / 4")','simplify("2x + x")','f = parse("x * (x + 2 + x)")',"simplified = simplify(f)","simplified.evaluate({x: 2})"],seealso:["simplifyCore","derivative","evaluate","parse","rationalize","resolve"]};var bF={name:"simplifyConstant",category:"Algebra",syntax:["simplifyConstant(expr)","simplifyConstant(expr, options)"],description:"Replace constant subexpressions of node with their values.",examples:['simplifyConstant("(3-3)*x")','simplifyConstant(parse("z-cos(tau/8)"))'],seealso:["simplify","simplifyCore","evaluate"]};var wF={name:"simplifyCore",category:"Algebra",syntax:["simplifyCore(node)"],description:"Perform simple one-pass simplifications on an expression tree.",examples:['simplifyCore(parse("0*x"))','simplifyCore(parse("(x+0)*2"))'],seealso:["simplify","simplifyConstant","evaluate"]};var DF={name:"slu",category:"Algebra",syntax:["slu(A, order, threshold)"],description:"Calculate the Matrix LU decomposition with full pivoting. Matrix A is decomposed in two matrices (L, U) and two permutation vectors (pinv, q) where P * A * Q = L * U",examples:["slu(sparse([4.5, 0, 3.2, 0; 3.1, 2.9, 0, 0.9; 0, 1.7, 3, 0; 3.5, 0.4, 0, 1]), 1, 0.001)"],seealso:["lusolve","lsolve","usolve","matrix","sparse","lup","qr"]};var SF={name:"symbolicEqual",category:"Algebra",syntax:["symbolicEqual(expr1, expr2)","symbolicEqual(expr1, expr2, options)"],description:"Returns true if the difference of the expressions simplifies to 0",examples:['symbolicEqual("x*y","y*x")','symbolicEqual("abs(x^2)", "x^2")','symbolicEqual("abs(x)", "x", {context: {abs: {trivial: true}}})'],seealso:["simplify","evaluate"]};var NF={name:"usolve",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds one solution of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolveAll","lup","lusolve","lsolve","matrix","sparse"]};var AF={name:"usolveAll",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds all solutions of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolve","lup","lusolve","lsolve","matrix","sparse"]};var MF={name:"abs",category:"Arithmetic",syntax:["abs(x)"],description:"Compute the absolute value.",examples:["abs(3.5)","abs(-4.2)"],seealso:["sign"]};var CF={name:"add",category:"Operators",syntax:["x + y","add(x, y)"],description:"Add two values.",examples:["a = 2.1 + 3.6","a - 3.6","3 + 2i","3 cm + 2 inch",'"2.3" + "4"'],seealso:["subtract"]};var EF={name:"cbrt",category:"Arithmetic",syntax:["cbrt(x)","cbrt(x, allRoots)"],description:"Compute the cubic root value. If x = y * y * y, then y is the cubic root of x. When \`x\` is a number or complex number, an optional second argument \`allRoots\` can be provided to return all three cubic roots. If not provided, the principal root is returned",examples:["cbrt(64)","cube(4)","cbrt(-8)","cbrt(2 + 3i)","cbrt(8i)","cbrt(8i, true)","cbrt(27 m^3)"],seealso:["square","sqrt","cube","multiply"]};var TF={name:"ceil",category:"Arithmetic",syntax:["ceil(x)"],description:"Round a value towards plus infinity. If x is complex, both real and imaginary part are rounded towards plus infinity.",examples:["ceil(3.2)","ceil(3.8)","ceil(-4.2)"],seealso:["floor","fix","round"]};var FF={name:"cube",category:"Arithmetic",syntax:["cube(x)"],description:"Compute the cube of a value. The cube of x is x * x * x.",examples:["cube(2)","2^3","2 * 2 * 2"],seealso:["multiply","square","pow"]};var _F={name:"divide",category:"Operators",syntax:["x / y","divide(x, y)"],description:"Divide two values.",examples:["a = 2 / 3","a * 3","4.5 / 2","3 + 4 / 2","(3 + 4) / 2","18 km / 4.5"],seealso:["multiply"]};var OF={name:"dotDivide",category:"Operators",syntax:["x ./ y","dotDivide(x, y)"],description:"Divide two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a ./ b"],seealso:["multiply","dotMultiply","divide"]};var BF={name:"dotMultiply",category:"Operators",syntax:["x .* y","dotMultiply(x, y)"],description:"Multiply two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a .* b"],seealso:["multiply","divide","dotDivide"]};var PF={name:"dotPow",category:"Operators",syntax:["x .^ y","dotPow(x, y)"],description:"Calculates the power of x to y element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","a .^ 2"],seealso:["pow"]};var IF={name:"exp",category:"Arithmetic",syntax:["exp(x)"],description:"Calculate the exponent of a value.",examples:["exp(1.3)","e ^ 1.3","log(exp(1.3))","x = 2.4","(exp(i*x) == cos(x) + i*sin(x)) # Euler's formula"],seealso:["expm","expm1","pow","log"]};var RF={name:"expm",category:"Arithmetic",syntax:["exp(x)"],description:"Compute the matrix exponential, expm(A) = e^A. The matrix must be square. Not to be confused with exp(a), which performs element-wise exponentiation.",examples:["expm([[0,2],[0,0]])"],seealso:["exp"]};var kF={name:"expm1",category:"Arithmetic",syntax:["expm1(x)"],description:"Calculate the value of subtracting 1 from the exponential value.",examples:["expm1(2)","pow(e, 2) - 1","log(expm1(2) + 1)"],seealso:["exp","pow","log"]};var qF={name:"fix",category:"Arithmetic",syntax:["fix(x)"],description:"Round a value towards zero. If x is complex, both real and imaginary part are rounded towards zero.",examples:["fix(3.2)","fix(3.8)","fix(-4.2)","fix(-4.8)"],seealso:["ceil","floor","round"]};var LF={name:"floor",category:"Arithmetic",syntax:["floor(x)"],description:"Round a value towards minus infinity.If x is complex, both real and imaginary part are rounded towards minus infinity.",examples:["floor(3.2)","floor(3.8)","floor(-4.2)"],seealso:["ceil","fix","round"]};var zF={name:"gcd",category:"Arithmetic",syntax:["gcd(a, b)","gcd(a, b, c, ...)"],description:"Compute the greatest common divisor.",examples:["gcd(8, 12)","gcd(-4, 6)","gcd(25, 15, -10)"],seealso:["lcm","xgcd"]};var UF={name:"hypot",category:"Arithmetic",syntax:["hypot(a, b, c, ...)","hypot([a, b, c, ...])"],description:"Calculate the hypotenusa of a list with values. ",examples:["hypot(3, 4)","sqrt(3^2 + 4^2)","hypot(-2)","hypot([3, 4, 5])"],seealso:["abs","norm"]};var WF={name:"invmod",category:"Arithmetic",syntax:["invmod(a, b)"],description:"Calculate the (modular) multiplicative inverse of a modulo b. Solution to the equation ax \\u2263 1 (mod b)",examples:["invmod(8, 12)","invmod(7, 13)","invmod(15151, 15122)"],seealso:["gcd","xgcd"]};var YF={name:"lcm",category:"Arithmetic",syntax:["lcm(x, y)"],description:"Compute the least common multiple.",examples:["lcm(4, 6)","lcm(6, 21)","lcm(6, 21, 5)"],seealso:["gcd"]};var HF={name:"log",category:"Arithmetic",syntax:["log(x)","log(x, base)"],description:"Compute the logarithm of a value. If no base is provided, the natural logarithm of x is calculated. If base if provided, the logarithm is calculated for the specified base. log(x, base) is defined as log(x) / log(base).",examples:["log(3.5)","a = log(2.4)","exp(a)","10 ^ 4","log(10000, 10)","log(10000) / log(10)","b = log(1024, 2)","2 ^ b"],seealso:["exp","log1p","log2","log10"]};var $F={name:"log10",category:"Arithmetic",syntax:["log10(x)"],description:"Compute the 10-base logarithm of a value.",examples:["log10(0.00001)","log10(10000)","10 ^ 4","log(10000) / log(10)","log(10000, 10)"],seealso:["exp","log"]};var GF={name:"log1p",category:"Arithmetic",syntax:["log1p(x)","log1p(x, base)"],description:"Calculate the logarithm of a \`value+1\`",examples:["log1p(2.5)","exp(log1p(1.4))","pow(10, 4)","log1p(9999, 10)","log1p(9999) / log(10)"],seealso:["exp","log","log2","log10"]};var VF={name:"log2",category:"Arithmetic",syntax:["log2(x)"],description:"Calculate the 2-base of a value. This is the same as calculating \`log(x, 2)\`.",examples:["log2(0.03125)","log2(16)","log2(16) / log2(2)","pow(2, 4)"],seealso:["exp","log1p","log","log10"]};var ZF={name:"mod",category:"Operators",syntax:["x % y","x mod y","mod(x, y)"],description:"Calculates the modulus, the remainder of an integer division.",examples:["7 % 3","11 % 2","10 mod 4","isOdd(x) = x % 2","isOdd(2)","isOdd(3)"],seealso:["divide"]};var QF={name:"multiply",category:"Operators",syntax:["x * y","multiply(x, y)"],description:"multiply two values.",examples:["a = 2.1 * 3.4","a / 3.4","2 * 3 + 4","2 * (3 + 4)","3 * 2.1 km"],seealso:["divide"]};var XF={name:"norm",category:"Arithmetic",syntax:["norm(x)","norm(x, p)"],description:"Calculate the norm of a number, vector or matrix.",examples:["abs(-3.5)","norm(-3.5)","norm(3 - 4i)","norm([1, 2, -3], Infinity)","norm([1, 2, -3], -Infinity)","norm([3, 4], 2)","norm([[1, 2], [3, 4]], 1)",'norm([[1, 2], [3, 4]], "inf")','norm([[1, 2], [3, 4]], "fro")']};var JF={name:"nthRoot",category:"Arithmetic",syntax:["nthRoot(a)","nthRoot(a, root)"],description:'Calculate the nth root of a value. The principal nth root of a positive real number A, is the positive real solution of the equation "x^root = A".',examples:["4 ^ 3","nthRoot(64, 3)","nthRoot(9, 2)","sqrt(9)"],seealso:["nthRoots","pow","sqrt"]};var KF={name:"nthRoots",category:"Arithmetic",syntax:["nthRoots(A)","nthRoots(A, root)"],description:'Calculate the nth roots of a value. An nth root of a positive real number A, is a positive real solution of the equation "x^root = A". This function returns an array of complex values.',examples:["nthRoots(1)","nthRoots(1, 3)"],seealso:["sqrt","pow","nthRoot"]};var jF={name:"pow",category:"Operators",syntax:["x ^ y","pow(x, y)"],description:"Calculates the power of x to y, x^y.",examples:["2^3","2*2*2","1 + e ^ (pi * i)","pow([[1, 2], [4, 3]], 2)","pow([[1, 2], [4, 3]], -1)"],seealso:["multiply","nthRoot","nthRoots","sqrt"]};var e_={name:"round",category:"Arithmetic",syntax:["round(x)","round(x, n)","round(unit, valuelessUnit)","round(unit, n, valuelessUnit)"],description:"round a value towards the nearest integer.If x is complex, both real and imaginary part are rounded towards the nearest integer. When n is specified, the value is rounded to n decimals.",examples:["round(3.2)","round(3.8)","round(-4.2)","round(-4.8)","round(pi, 3)","round(123.45678, 2)","round(3.241cm, 2, cm)","round([3.2, 3.8, -4.7])"],seealso:["ceil","floor","fix"]};var r_={name:"sign",category:"Arithmetic",syntax:["sign(x)"],description:"Compute the sign of a value. The sign of a value x is 1 when x>1, -1 when x<0, and 0 when x=0.",examples:["sign(3.5)","sign(-4.2)","sign(0)"],seealso:["abs"]};var t_={name:"sqrt",category:"Arithmetic",syntax:["sqrt(x)"],description:"Compute the square root value. If x = y * y, then y is the square root of x.",examples:["sqrt(25)","5 * 5","sqrt(-1)"],seealso:["square","sqrtm","multiply","nthRoot","nthRoots","pow"]};var n_={name:"sqrtm",category:"Arithmetic",syntax:["sqrtm(x)"],description:"Calculate the principal square root of a square matrix. The principal square root matrix \`X\` of another matrix \`A\` is such that \`X * X = A\`.",examples:["sqrtm([[33, 24], [48, 57]])"],seealso:["sqrt","abs","square","multiply"]};var a_={name:"sylvester",category:"Algebra",syntax:["sylvester(A,B,C)"],description:"Solves the real-valued Sylvester equation AX+XB=C for X",examples:["sylvester([[-1, -2], [1, 1]], [[-2, 1], [-1, 2]], [[-3, 2], [3, 0]])","A = [[-1, -2], [1, 1]]; B = [[2, -1], [1, -2]]; C = [[-3, 2], [3, 0]]","sylvester(A, B, C)"],seealso:["schur","lyap"]};var i_={name:"schur",category:"Algebra",syntax:["schur(A)"],description:"Performs a real Schur decomposition of the real matrix A = UTU'",examples:["schur([[1, 0], [-4, 3]])","A = [[1, 0], [-4, 3]]","schur(A)"],seealso:["lyap","sylvester"]};var o_={name:"lyap",category:"Algebra",syntax:["lyap(A,Q)"],description:"Solves the Continuous-time Lyapunov equation AP+PA'+Q=0 for P",examples:["lyap([[-2, 0], [1, -4]], [[3, 1], [1, 3]])","A = [[-2, 0], [1, -4]]","Q = [[3, 1], [1, 3]]","lyap(A,Q)"],seealso:["schur","sylvester"]};var s_={name:"square",category:"Arithmetic",syntax:["square(x)"],description:"Compute the square of a value. The square of x is x * x.",examples:["square(3)","sqrt(9)","3^2","3 * 3"],seealso:["multiply","pow","sqrt","cube"]};var u_={name:"subtract",category:"Operators",syntax:["x - y","subtract(x, y)"],description:"subtract two values.",examples:["a = 5.3 - 2","a + 2","2/3 - 1/6","2 * 3 - 3","2.1 km - 500m"],seealso:["add"]};var f_={name:"unaryMinus",category:"Operators",syntax:["-x","unaryMinus(x)"],description:"Inverse the sign of a value. Converts booleans and strings to numbers.",examples:["-4.5","-(-5.6)",'-"22"'],seealso:["add","subtract","unaryPlus"]};var c_={name:"unaryPlus",category:"Operators",syntax:["+x","unaryPlus(x)"],description:"Converts booleans and strings to numbers.",examples:["+true",'+"2"'],seealso:["add","subtract","unaryMinus"]};var l_={name:"xgcd",category:"Arithmetic",syntax:["xgcd(a, b)"],description:"Calculate the extended greatest common divisor for two values. The result is an array [d, x, y] with 3 entries, where d is the greatest common divisor, and d = x * a + y * b.",examples:["xgcd(8, 12)","gcd(8, 12)","xgcd(36163, 21199)"],seealso:["gcd","lcm"]};var m_={name:"bitAnd",category:"Bitwise",syntax:["x & y","bitAnd(x, y)"],description:"Bitwise AND operation. Performs the logical AND operation on each pair of the corresponding bits of the two given values by multiplying them. If both bits in the compared position are 1, the bit in the resulting binary representation is 1, otherwise, the result is 0",examples:["5 & 3","bitAnd(53, 131)","[1, 12, 31] & 42"],seealso:["bitNot","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]};var p_={name:"bitNot",category:"Bitwise",syntax:["~x","bitNot(x)"],description:"Bitwise NOT operation. Performs a logical negation on each bit of the given value. Bits that are 0 become 1, and those that are 1 become 0.",examples:["~1","~2","bitNot([2, -3, 4])"],seealso:["bitAnd","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]};var d_={name:"bitOr",category:"Bitwise",syntax:["x | y","bitOr(x, y)"],description:"Bitwise OR operation. Performs the logical inclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if the first bit is 1 or the second bit is 1 or both bits are 1, otherwise, the result is 0.",examples:["5 | 3","bitOr([1, 2, 3], 4)"],seealso:["bitAnd","bitNot","bitXor","leftShift","rightArithShift","rightLogShift"]};var h_={name:"bitXor",category:"Bitwise",syntax:["bitXor(x, y)"],description:"Bitwise XOR operation, exclusive OR. Performs the logical exclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if only the first bit is 1 or only the second bit is 1, but will be 0 if both are 0 or both are 1.",examples:["bitOr(1, 2)","bitXor([2, 3, 4], 4)"],seealso:["bitAnd","bitNot","bitOr","leftShift","rightArithShift","rightLogShift"]};var v_={name:"leftShift",category:"Bitwise",syntax:["x << y","leftShift(x, y)"],description:"Bitwise left logical shift of a value x by y number of bits.",examples:["4 << 1","8 >> 1"],seealso:["bitAnd","bitNot","bitOr","bitXor","rightArithShift","rightLogShift"]};var g_={name:"rightArithShift",category:"Bitwise",syntax:["x >> y","rightArithShift(x, y)"],description:"Bitwise right arithmetic shift of a value x by y number of bits.",examples:["8 >> 1","4 << 1","-12 >> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightLogShift"]};var y_={name:"rightLogShift",category:"Bitwise",syntax:["x >>> y","rightLogShift(x, y)"],description:"Bitwise right logical shift of a value x by y number of bits.",examples:["8 >>> 1","4 << 1","-12 >>> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightArithShift"]};var x_={name:"bellNumbers",category:"Combinatorics",syntax:["bellNumbers(n)"],description:"The Bell Numbers count the number of partitions of a set. A partition is a pairwise disjoint subset of S whose union is S. \`bellNumbers\` only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["bellNumbers(3)","bellNumbers(8)"],seealso:["stirlingS2"]};var b_={name:"catalan",category:"Combinatorics",syntax:["catalan(n)"],description:"The Catalan Numbers enumerate combinatorial structures of many different types. catalan only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["catalan(3)","catalan(8)"],seealso:["bellNumbers"]};var w_={name:"composition",category:"Combinatorics",syntax:["composition(n, k)"],description:"The composition counts of n into k parts. composition only takes integer arguments. The following condition must be enforced: k <= n.",examples:["composition(5, 3)"],seealso:["combinations"]};var D_={name:"stirlingS2",category:"Combinatorics",syntax:["stirlingS2(n, k)"],description:"he Stirling numbers of the second kind, counts the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets. \`stirlingS2\` only takes integer arguments. The following condition must be enforced: k <= n. If n = k or k = 1, then s(n,k) = 1.",examples:["stirlingS2(5, 3)"],seealso:["bellNumbers"]};var S_={name:"arg",category:"Complex",syntax:["arg(x)"],description:"Compute the argument of a complex value. If x = a+bi, the argument is computed as atan2(b, a).",examples:["arg(2 + 2i)","atan2(3, 2)","arg(2 + 3i)"],seealso:["re","im","conj","abs"]};var N_={name:"conj",category:"Complex",syntax:["conj(x)"],description:"Compute the complex conjugate of a complex value. If x = a+bi, the complex conjugate is a-bi.",examples:["conj(2 + 3i)","conj(2 - 3i)","conj(-5.2i)"],seealso:["re","im","abs","arg"]};var A_={name:"im",category:"Complex",syntax:["im(x)"],description:"Get the imaginary part of a complex number.",examples:["im(2 + 3i)","re(2 + 3i)","im(-5.2i)","im(2.4)"],seealso:["re","conj","abs","arg"]};var M_={name:"re",category:"Complex",syntax:["re(x)"],description:"Get the real part of a complex number.",examples:["re(2 + 3i)","im(2 + 3i)","re(-5.2i)","re(2.4)"],seealso:["im","conj","abs","arg"]};var C_={name:"evaluate",category:"Expression",syntax:["evaluate(expression)","evaluate(expression, scope)","evaluate([expr1, expr2, expr3, ...])","evaluate([expr1, expr2, expr3, ...], scope)"],description:"Evaluate an expression or an array with expressions.",examples:['evaluate("2 + 3")','evaluate("sqrt(16)")','evaluate("2 inch to cm")','evaluate("sin(x * pi)", { "x": 1/2 })','evaluate(["width=2", "height=4","width*height"])'],seealso:[]};var E_={name:"help",category:"Expression",syntax:["help(object)","help(string)"],description:"Display documentation on a function or data type.",examples:["help(sqrt)",'help("complex")'],seealso:[]};var T_={name:"distance",category:"Geometry",syntax:["distance([x1, y1], [x2, y2])","distance([[x1, y1], [x2, y2]])"],description:"Calculates the Euclidean distance between two points.",examples:["distance([0,0], [4,4])","distance([[0,0], [4,4]])"],seealso:[]};var F_={name:"intersect",category:"Geometry",syntax:["intersect(expr1, expr2, expr3, expr4)","intersect(expr1, expr2, expr3)"],description:"Computes the intersection point of lines and/or planes.",examples:["intersect([0, 0], [10, 10], [10, 0], [0, 10])","intersect([1, 0, 1], [4, -2, 2], [1, 1, 1, 6])"],seealso:[]};var __={name:"and",category:"Logical",syntax:["x and y","and(x, y)"],description:"Logical and. Test whether two values are both defined with a nonzero/nonempty value.",examples:["true and false","true and true","2 and 4"],seealso:["not","or","xor"]};var O_={name:"not",category:"Logical",syntax:["not x","not(x)"],description:"Logical not. Flips the boolean value of given argument.",examples:["not true","not false","not 2","not 0"],seealso:["and","or","xor"]};var B_={name:"or",category:"Logical",syntax:["x or y","or(x, y)"],description:"Logical or. Test if at least one value is defined with a nonzero/nonempty value.",examples:["true or false","false or false","0 or 4"],seealso:["not","and","xor"]};var P_={name:"xor",category:"Logical",syntax:["x xor y","xor(x, y)"],description:"Logical exclusive or, xor. Test whether one and only one value is defined with a nonzero/nonempty value.",examples:["true xor false","false xor false","true xor true","0 xor 4"],seealso:["not","and","or"]};var I_={name:"column",category:"Matrix",syntax:["column(x, index)"],description:"Return a column from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","column(A, 1)","column(A, 2)"],seealso:["row","matrixFromColumns"]};var R_={name:"concat",category:"Matrix",syntax:["concat(A, B, C, ...)","concat(A, B, C, ..., dim)"],description:"Concatenate matrices. By default, the matrices are concatenated by the last dimension. The dimension on which to concatenate can be provided as last argument.",examples:["A = [1, 2; 5, 6]","B = [3, 4; 7, 8]","concat(A, B)","concat(A, B, 1)","concat(A, B, 2)"],seealso:["det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]};var k_={name:"count",category:"Matrix",syntax:["count(x)"],description:"Count the number of elements of a matrix, array or string.",examples:["a = [1, 2; 3, 4; 5, 6]","count(a)","size(a)",'count("hello world")'],seealso:["size"]};var q_={name:"cross",category:"Matrix",syntax:["cross(A, B)"],description:"Calculate the cross product for two vectors in three dimensional space.",examples:["cross([1, 1, 0], [0, 1, 1])","cross([3, -3, 1], [4, 9, 2])","cross([2, 3, 4], [5, 6, 7])"],seealso:["multiply","dot"]};var L_={name:"ctranspose",category:"Matrix",syntax:["x'","ctranspose(x)"],description:"Complex Conjugate and Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","ctranspose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]};var z_={name:"det",category:"Matrix",syntax:["det(x)"],description:"Calculate the determinant of a matrix",examples:["det([1, 2; 3, 4])","det([-2, 2, 3; -1, 1, 3; 2, 0, -1])"],seealso:["concat","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]};var U_={name:"diag",category:"Matrix",syntax:["diag(x)","diag(x, k)"],description:"Create a diagonal matrix or retrieve the diagonal of a matrix. When x is a vector, a matrix with the vector values on the diagonal will be returned. When x is a matrix, a vector with the diagonal values of the matrix is returned. When k is provided, the k-th diagonal will be filled in or retrieved, if k is positive, the values are placed on the super diagonal. When k is negative, the values are placed on the sub diagonal.",examples:["diag(1:3)","diag(1:3, 1)","a = [1, 2, 3; 4, 5, 6; 7, 8, 9]","diag(a)"],seealso:["concat","det","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]};var W_={name:"diff",category:"Matrix",syntax:["diff(arr)","diff(arr, dim)"],description:["Create a new matrix or array with the difference of the passed matrix or array.","Dim parameter is optional and used to indicant the dimension of the array/matrix to apply the difference","If no dimension parameter is passed it is assumed as dimension 0","Dimension is zero-based in javascript and one-based in the parser","Arrays must be 'rectangular' meaning arrays like [1, 2]","If something is passed as a matrix it will be returned as a matrix but other than that all matrices are converted to arrays"],examples:["A = [1, 2, 4, 7, 0]","diff(A)","diff(A, 1)","B = [[1, 2], [3, 4]]","diff(B)","diff(B, 1)","diff(B, 2)","diff(B, bignumber(2))","diff([[1, 2], matrix([3, 4])], 2)"],seealso:["subtract","partitionSelect"]};var Y_={name:"dot",category:"Matrix",syntax:["dot(A, B)","A * B"],description:"Calculate the dot product of two vectors. The dot product of A = [a1, a2, a3, ..., an] and B = [b1, b2, b3, ..., bn] is defined as dot(A, B) = a1 * b1 + a2 * b2 + a3 * b3 + ... + an * bn",examples:["dot([2, 4, 1], [2, 2, 3])","[2, 4, 1] * [2, 2, 3]"],seealso:["multiply","cross"]};var H_={name:"eigs",category:"Matrix",syntax:["eigs(x)"],description:"Calculate the eigenvalues and optionally eigenvectors of a square matrix",examples:["eigs([[5, 2.3], [2.3, 1]])","eigs([[1, 2, 3], [4, 5, 6], [7, 8, 9]], { precision: 1e-6, eigenvectors: false })"],seealso:["inv"]};var $_={name:"filter",category:"Matrix",syntax:["filter(x, test)"],description:"Filter items in a matrix.",examples:["isPositive(x) = x > 0","filter([6, -2, -1, 4, 3], isPositive)","filter([6, -2, 0, 1, 0], x != 0)"],seealso:["sort","map","forEach"]};var G_={name:"flatten",category:"Matrix",syntax:["flatten(x)"],description:"Flatten a multi dimensional matrix into a single dimensional matrix.",examples:["a = [1, 2, 3; 4, 5, 6]","size(a)","b = flatten(a)","size(b)"],seealso:["concat","resize","size","squeeze"]};var V_={name:"forEach",category:"Matrix",syntax:["forEach(x, callback)"],description:"Iterates over all elements of a matrix/array, and executes the given callback function.",examples:["numberOfPets = {}","addPet(n) = numberOfPets[n] = (numberOfPets[n] ? numberOfPets[n]:0 ) + 1;",'forEach(["Dog","Cat","Cat"], addPet)',"numberOfPets"],seealso:["map","sort","filter"]};var Z_={name:"getMatrixDataType",category:"Matrix",syntax:["getMatrixDataType(x)"],description:'Find the data type of all elements in a matrix or array, for example "number" if all items are a number and "Complex" if all values are complex numbers. If a matrix contains more than one data type, it will return "mixed".',examples:["getMatrixDataType([1, 2, 3])","getMatrixDataType([[5 cm], [2 inch]])",'getMatrixDataType([1, "text"])',"getMatrixDataType([1, bignumber(4)])"],seealso:["matrix","sparse","typeOf"]};var Q_={name:"identity",category:"Matrix",syntax:["identity(n)","identity(m, n)","identity([m, n])"],description:"Returns the identity matrix with size m-by-n. The matrix has ones on the diagonal and zeros elsewhere.",examples:["identity(3)","identity(3, 5)","a = [1, 2, 3; 4, 5, 6]","identity(size(a))"],seealso:["concat","det","diag","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]};var X_={name:"inv",category:"Matrix",syntax:["inv(x)"],description:"Calculate the inverse of a matrix",examples:["inv([1, 2; 3, 4])","inv(4)","1 / 4"],seealso:["concat","det","diag","identity","ones","range","size","squeeze","subset","trace","transpose","zeros"]};var J_={name:"pinv",category:"Matrix",syntax:["pinv(x)"],description:"Calculate the Moore\\u2013Penrose inverse of a matrix",examples:["pinv([1, 2; 3, 4])","pinv([[1, 0], [0, 1], [0, 1]])","pinv(4)"],seealso:["inv"]};var K_={name:"kron",category:"Matrix",syntax:["kron(x, y)"],description:"Calculates the kronecker product of 2 matrices or vectors.",examples:["kron([[1, 0], [0, 1]], [[1, 2], [3, 4]])","kron([1,1], [2,3,4])"],seealso:["multiply","dot","cross"]};var j_={name:"map",category:"Matrix",syntax:["map(x, callback)"],description:"Create a new matrix or array with the results of the callback function executed on each entry of the matrix/array.",examples:["map([1, 2, 3], square)"],seealso:["filter","forEach"]};var eO={name:"matrixFromColumns",category:"Matrix",syntax:["matrixFromColumns(...arr)","matrixFromColumns(row1, row2)","matrixFromColumns(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual columns.",examples:["matrixFromColumns([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromRows","matrixFromFunction","zeros"]};var rO={name:"matrixFromFunction",category:"Matrix",syntax:["matrixFromFunction(size, fn)","matrixFromFunction(size, fn, format)","matrixFromFunction(size, fn, format, datatype)","matrixFromFunction(size, format, fn)","matrixFromFunction(size, format, datatype, fn)"],description:"Create a matrix by evaluating a generating function at each index.",examples:["f(I) = I[1] - I[2]","matrixFromFunction([3,3], f)","g(I) = I[1] - I[2] == 1 ? 4 : 0",'matrixFromFunction([100, 100], "sparse", g)',"matrixFromFunction([5], random)"],seealso:["matrix","matrixFromRows","matrixFromColumns","zeros"]};var tO={name:"matrixFromRows",category:"Matrix",syntax:["matrixFromRows(...arr)","matrixFromRows(row1, row2)","matrixFromRows(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual rows.",examples:["matrixFromRows([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromColumns","matrixFromFunction","zeros"]};var nO={name:"ones",category:"Matrix",syntax:["ones(m)","ones(m, n)","ones(m, n, p, ...)","ones([m])","ones([m, n])","ones([m, n, p, ...])"],description:"Create a matrix containing ones.",examples:["ones(3)","ones(3, 5)","ones([2,3]) * 4.5","a = [1, 2, 3; 4, 5, 6]","ones(size(a))"],seealso:["concat","det","diag","identity","inv","range","size","squeeze","subset","trace","transpose","zeros"]};var aO={name:"partitionSelect",category:"Matrix",syntax:["partitionSelect(x, k)","partitionSelect(x, k, compare)"],description:"Partition-based selection of an array or 1D matrix. Will find the kth smallest value, and mutates the input array. Uses Quickselect.",examples:["partitionSelect([5, 10, 1], 2)",'partitionSelect(["C", "B", "A", "D"], 1, compareText)',"arr = [5, 2, 1]","partitionSelect(arr, 0) # returns 1, arr is now: [1, 2, 5]","arr","partitionSelect(arr, 1, 'desc') # returns 2, arr is now: [5, 2, 1]","arr"],seealso:["sort"]};var iO={name:"range",category:"Type",syntax:["start:end","start:step:end","range(start, end)","range(start, end, step)","range(string)"],description:"Create a range. Lower bound of the range is included, upper bound is excluded.",examples:["1:5","3:-1:-3","range(3, 7)","range(0, 12, 2)",'range("4:10")',"range(1m, 1m, 3m)","a = [1, 2, 3, 4; 5, 6, 7, 8]","a[1:2, 1:2]"],seealso:["concat","det","diag","identity","inv","ones","size","squeeze","subset","trace","transpose","zeros"]};var oO={name:"reshape",category:"Matrix",syntax:["reshape(x, sizes)"],description:"Reshape a multi dimensional array to fit the specified dimensions.",examples:["reshape([1, 2, 3, 4, 5, 6], [2, 3])","reshape([[1, 2], [3, 4]], [1, 4])","reshape([[1, 2], [3, 4]], [4])","reshape([1, 2, 3, 4], [-1, 2])"],seealso:["size","squeeze","resize"]};var sO={name:"resize",category:"Matrix",syntax:["resize(x, size)","resize(x, size, defaultValue)"],description:"Resize a matrix.",examples:["resize([1,2,3,4,5], [3])","resize([1,2,3], [5])","resize([1,2,3], [5], -1)","resize(2, [2, 3])",'resize("hello", [8], "!")'],seealso:["size","subset","squeeze","reshape"]};var uO={name:"rotate",category:"Matrix",syntax:["rotate(w, theta)","rotate(w, theta, v)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotate([1, 0], pi / 2)",'rotate(matrix([1, 0]), unit("35deg"))','rotate([1, 0, 0], unit("90deg"), [0, 0, 1])','rotate(matrix([1, 0, 0]), unit("90deg"), matrix([0, 0, 1]))'],seealso:["matrix","rotationMatrix"]};var fO={name:"rotationMatrix",category:"Matrix",syntax:["rotationMatrix(theta)","rotationMatrix(theta, v)","rotationMatrix(theta, v, format)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotationMatrix(pi / 2)",'rotationMatrix(unit("45deg"), [0, 0, 1])','rotationMatrix(1, matrix([0, 0, 1]), "sparse")'],seealso:["cos","sin"]};var cO={name:"row",category:"Matrix",syntax:["row(x, index)"],description:"Return a row from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","row(A, 1)","row(A, 2)"],seealso:["column","matrixFromRows"]};var lO={name:"size",category:"Matrix",syntax:["size(x)"],description:"Calculate the size of a matrix.",examples:["size(2.3)",'size("hello world")',"a = [1, 2; 3, 4; 5, 6]","size(a)","size(1:6)"],seealso:["concat","count","det","diag","identity","inv","ones","range","squeeze","subset","trace","transpose","zeros"]};var mO={name:"sort",category:"Matrix",syntax:["sort(x)","sort(x, compare)"],description:'Sort the items in a matrix. Compare can be a string "asc", "desc", "natural", or a custom sort function.',examples:["sort([5, 10, 1])",'sort(["C", "B", "A", "D"], "natural")',"sortByLength(a, b) = size(a)[1] - size(b)[1]",'sort(["Langdon", "Tom", "Sara"], sortByLength)','sort(["10", "1", "2"], "natural")'],seealso:["map","filter","forEach"]};var pO={name:"squeeze",category:"Matrix",syntax:["squeeze(x)"],description:"Remove inner and outer singleton dimensions from a matrix.",examples:["a = zeros(3,2,1)","size(squeeze(a))","b = zeros(1,1,3)","size(squeeze(b))"],seealso:["concat","det","diag","identity","inv","ones","range","size","subset","trace","transpose","zeros"]};var dO={name:"subset",category:"Matrix",syntax:["value(index)","value(index) = replacement","subset(value, [index])","subset(value, [index], replacement)"],description:"Get or set a subset of the entries of a matrix or characters of a string. Indexes are one-based. There should be one index specification for each dimension of the target. Each specification can be a single index, a list of indices, or a range in colon notation \`l:u\`. In a range, both the lower bound l and upper bound u are included; and if a bound is omitted it defaults to the most extreme valid value. The cartesian product of the indices specified in each dimension determines the target of the operation.",examples:["d = [1, 2; 3, 4]","e = []","e[1, 1:2] = [5, 6]","e[2, :] = [7, 8]","f = d * e","f[2, 1]","f[:, 1]","f[[1,2], [1,3]] = [9, 10; 11, 12]","f"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","trace","transpose","zeros"]};var hO={name:"trace",category:"Matrix",syntax:["trace(A)"],description:"Calculate the trace of a matrix: the sum of the elements on the main diagonal of a square matrix.",examples:["A = [1, 2, 3; -1, 2, 3; 2, 0, 3]","trace(A)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","transpose","zeros"]};var vO={name:"transpose",category:"Matrix",syntax:["x'","transpose(x)"],description:"Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","transpose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]};var gO={name:"zeros",category:"Matrix",syntax:["zeros(m)","zeros(m, n)","zeros(m, n, p, ...)","zeros([m])","zeros([m, n])","zeros([m, n, p, ...])"],description:"Create a matrix containing zeros.",examples:["zeros(3)","zeros(3, 5)","a = [1, 2, 3; 4, 5, 6]","zeros(size(a))"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose"]};var yO={name:"fft",category:"Matrix",syntax:["fft(x)"],description:"Calculate N-dimensional fourier transform",examples:["fft([[1, 0], [1, 0]])"],seealso:["ifft"]};var xO={name:"ifft",category:"Matrix",syntax:["ifft(x)"],description:"Calculate N-dimensional inverse fourier transform",examples:["ifft([[2, 2], [0, 0]])"],seealso:["fft"]};var bO={name:"combinations",category:"Probability",syntax:["combinations(n, k)"],description:"Compute the number of combinations of n items taken k at a time",examples:["combinations(7, 5)"],seealso:["combinationsWithRep","permutations","factorial"]};var wO={name:"combinationsWithRep",category:"Probability",syntax:["combinationsWithRep(n, k)"],description:"Compute the number of combinations of n items taken k at a time with replacements.",examples:["combinationsWithRep(7, 5)"],seealso:["combinations","permutations","factorial"]};var DO={name:"factorial",category:"Probability",syntax:["n!","factorial(n)"],description:"Compute the factorial of a value",examples:["5!","5 * 4 * 3 * 2 * 1","3!"],seealso:["combinations","combinationsWithRep","permutations","gamma"]};var SO={name:"gamma",category:"Probability",syntax:["gamma(n)"],description:"Compute the gamma function. For small values, the Lanczos approximation is used, and for large values the extended Stirling approximation.",examples:["gamma(4)","3!","gamma(1/2)","sqrt(pi)"],seealso:["factorial"]};var NO={name:"lgamma",category:"Probability",syntax:["lgamma(n)"],description:"Logarithm of the gamma function for real, positive numbers and complex numbers, using Lanczos approximation for numbers and Stirling series for complex numbers.",examples:["lgamma(4)","lgamma(1/2)","lgamma(i)","lgamma(complex(1.1, 2))"],seealso:["gamma"]};var AO={name:"kldivergence",category:"Probability",syntax:["kldivergence(x, y)"],description:"Calculate the Kullback-Leibler (KL) divergence between two distributions.",examples:["kldivergence([0.7,0.5,0.4], [0.2,0.9,0.5])"],seealso:[]};var MO={name:"multinomial",category:"Probability",syntax:["multinomial(A)"],description:"Multinomial Coefficients compute the number of ways of picking a1, a2, ..., ai unordered outcomes from \`n\` possibilities. multinomial takes one array of integers as an argument. The following condition must be enforced: every ai > 0.",examples:["multinomial([1, 2, 1])"],seealso:["combinations","factorial"]};var CO={name:"permutations",category:"Probability",syntax:["permutations(n)","permutations(n, k)"],description:"Compute the number of permutations of n items taken k at a time",examples:["permutations(5)","permutations(5, 3)"],seealso:["combinations","combinationsWithRep","factorial"]};var EO={name:"pickRandom",category:"Probability",syntax:["pickRandom(array)","pickRandom(array, number)","pickRandom(array, weights)","pickRandom(array, number, weights)","pickRandom(array, weights, number)"],description:"Pick a random entry from a given array.",examples:["pickRandom(0:10)","pickRandom([1, 3, 1, 6])","pickRandom([1, 3, 1, 6], 2)","pickRandom([1, 3, 1, 6], [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], 2, [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], [2, 3, 2, 1], 2)"],seealso:["random","randomInt"]};var TO={name:"random",category:"Probability",syntax:["random()","random(max)","random(min, max)","random(size)","random(size, max)","random(size, min, max)"],description:"Return a random number.",examples:["random()","random(10, 20)","random([2, 3])"],seealso:["pickRandom","randomInt"]};var FO={name:"randomInt",category:"Probability",syntax:["randomInt(max)","randomInt(min, max)","randomInt(size)","randomInt(size, max)","randomInt(size, min, max)"],description:"Return a random integer number",examples:["randomInt(10, 20)","randomInt([2, 3], 10)"],seealso:["pickRandom","random"]};var _O={name:"compare",category:"Relational",syntax:["compare(x, y)"],description:"Compare two values. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compare(2, 3)","compare(3, 2)","compare(2, 2)","compare(5cm, 40mm)","compare(2, [1, 2, 3])"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compareNatural","compareText"]};var OO={name:"compareNatural",category:"Relational",syntax:["compareNatural(x, y)"],description:"Compare two values of any type in a deterministic, natural way. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compareNatural(2, 3)","compareNatural(3, 2)","compareNatural(2, 2)","compareNatural(5cm, 40mm)",'compareNatural("2", "10")',"compareNatural(2 + 3i, 2 + 4i)","compareNatural([1, 2, 4], [1, 2, 3])","compareNatural([1, 5], [1, 2, 3])","compareNatural([1, 2], [1, 2])","compareNatural({a: 2}, {a: 4})"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare","compareText"]};var BO={name:"compareText",category:"Relational",syntax:["compareText(x, y)"],description:"Compare two strings lexically. Comparison is case sensitive. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:['compareText("B", "A")','compareText("A", "B")','compareText("A", "A")','compareText("2", "10")','compare("2", "10")',"compare(2, 10)",'compareNatural("2", "10")','compareText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural"]};var PO={name:"deepEqual",category:"Relational",syntax:["deepEqual(x, y)"],description:"Check equality of two matrices element wise. Returns true if the size of both matrices is equal and when and each of the elements are equal.",examples:["deepEqual([1,3,4], [1,3,4])","deepEqual([1,3,4], [1,3])"],seealso:["equal","unequal","smaller","larger","smallerEq","largerEq","compare"]};var IO={name:"equal",category:"Relational",syntax:["x == y","equal(x, y)"],description:"Check equality of two values. Returns true if the values are equal, and false if not.",examples:["2+2 == 3","2+2 == 4","a = 3.2","b = 6-2.8","a == b","50cm == 0.5m"],seealso:["unequal","smaller","larger","smallerEq","largerEq","compare","deepEqual","equalText"]};var RO={name:"equalText",category:"Relational",syntax:["equalText(x, y)"],description:"Check equality of two strings. Comparison is case sensitive. Returns true if the values are equal, and false if not.",examples:['equalText("Hello", "Hello")','equalText("a", "A")','equal("2e3", "2000")','equalText("2e3", "2000")','equalText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural","compareText","equal"]};var kO={name:"larger",category:"Relational",syntax:["x > y","larger(x, y)"],description:"Check if value x is larger than y. Returns true if x is larger than y, and false if not.",examples:["2 > 3","5 > 2*2","a = 3.3","b = 6-2.8","(a > b)","(b < a)","5 cm > 2 inch"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare"]};var qO={name:"largerEq",category:"Relational",syntax:["x >= y","largerEq(x, y)"],description:"Check if value x is larger or equal to y. Returns true if x is larger or equal to y, and false if not.",examples:["2 >= 1+1","2 > 1+1","a = 3.2","b = 6-2.8","(a >= b)"],seealso:["equal","unequal","smallerEq","smaller","compare"]};var LO={name:"smaller",category:"Relational",syntax:["x < y","smaller(x, y)"],description:"Check if value x is smaller than value y. Returns true if x is smaller than y, and false if not.",examples:["2 < 3","5 < 2*2","a = 3.3","b = 6-2.8","(a < b)","5 cm < 2 inch"],seealso:["equal","unequal","larger","smallerEq","largerEq","compare"]};var zO={name:"smallerEq",category:"Relational",syntax:["x <= y","smallerEq(x, y)"],description:"Check if value x is smaller or equal to value y. Returns true if x is smaller than y, and false if not.",examples:["2 <= 1+1","2 < 1+1","a = 3.2","b = 6-2.8","(a <= b)"],seealso:["equal","unequal","larger","smaller","largerEq","compare"]};var UO={name:"unequal",category:"Relational",syntax:["x != y","unequal(x, y)"],description:"Check unequality of two values. Returns true if the values are unequal, and false if they are equal.",examples:["2+2 != 3","2+2 != 4","a = 3.2","b = 6-2.8","a != b","50cm != 0.5m","5 cm != 2 inch"],seealso:["equal","smaller","larger","smallerEq","largerEq","compare","deepEqual"]};var WO={name:"setCartesian",category:"Set",syntax:["setCartesian(set1, set2)"],description:"Create the cartesian product of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays and the values will be sorted in ascending order before the operation.",examples:["setCartesian([1, 2], [3, 4])"],seealso:["setUnion","setIntersect","setDifference","setPowerset"]};var YO={name:"setDifference",category:"Set",syntax:["setDifference(set1, set2)"],description:"Create the difference of two (multi)sets: every element of set1, that is not the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setDifference([1, 2, 3, 4], [3, 4, 5, 6])","setDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setSymDifference"]};var HO={name:"setDistinct",category:"Set",syntax:["setDistinct(set)"],description:"Collect the distinct elements of a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setDistinct([1, 1, 1, 2, 2, 3])"],seealso:["setMultiplicity"]};var $O={name:"setIntersect",category:"Set",syntax:["setIntersect(set1, set2)"],description:"Create the intersection of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIntersect([1, 2, 3, 4], [3, 4, 5, 6])","setIntersect([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setDifference"]};var GO={name:"setIsSubset",category:"Set",syntax:["setIsSubset(set1, set2)"],description:"Check whether a (multi)set is a subset of another (multi)set: every element of set1 is the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIsSubset([1, 2], [3, 4, 5, 6])","setIsSubset([3, 4], [3, 4, 5, 6])"],seealso:["setUnion","setIntersect","setDifference"]};var VO={name:"setMultiplicity",category:"Set",syntax:["setMultiplicity(element, set)"],description:"Count the multiplicity of an element in a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setMultiplicity(1, [1, 2, 2, 4])","setMultiplicity(2, [1, 2, 2, 4])"],seealso:["setDistinct","setSize"]};var ZO={name:"setPowerset",category:"Set",syntax:["setPowerset(set)"],description:"Create the powerset of a (multi)set: the powerset contains very possible subsets of a (multi)set. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setPowerset([1, 2, 3])"],seealso:["setCartesian"]};var QO={name:"setSize",category:"Set",syntax:["setSize(set)","setSize(set, unique)"],description:'Count the number of elements of a (multi)set. When the second parameter "unique" is true, count only the unique values. A multi-dimension array will be converted to a single-dimension array before the operation.',examples:["setSize([1, 2, 2, 4])","setSize([1, 2, 2, 4], true)"],seealso:["setUnion","setIntersect","setDifference"]};var XO={name:"setSymDifference",category:"Set",syntax:["setSymDifference(set1, set2)"],description:"Create the symmetric difference of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setSymDifference([1, 2, 3, 4], [3, 4, 5, 6])","setSymDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setDifference"]};var JO={name:"setUnion",category:"Set",syntax:["setUnion(set1, set2)"],description:"Create the union of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setUnion([1, 2, 3, 4], [3, 4, 5, 6])","setUnion([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setIntersect","setDifference"]};var KO={name:"zpk2tf",category:"Signal",syntax:["zpk2tf(z, p, k)"],description:"Compute the transfer function of a zero-pole-gain model.",examples:["zpk2tf([1, 2], [-1, -2], 1)","zpk2tf([1, 2], [-1, -2])","zpk2tf([1 - 3i, 2 + 2i], [-1, -2])"],seealso:[]};var jO={name:"freqz",category:"Signal",syntax:["freqz(b, a)","freqz(b, a, w)"],description:"Calculates the frequency response of a filter given its numerator and denominator coefficients.",examples:["freqz([1, 2], [1, 2, 3])","freqz([1, 2], [1, 2, 3], [0, 1])","freqz([1, 2], [1, 2, 3], 512)"],seealso:[]};var e3={name:"erf",category:"Special",syntax:["erf(x)"],description:"Compute the erf function of a value using a rational Chebyshev approximations for different intervals of x",examples:["erf(0.2)","erf(-0.5)","erf(4)"],seealso:[]};var r3={name:"zeta",category:"Special",syntax:["zeta(s)"],description:"Compute the Riemann Zeta Function using an infinite series and Riemanns Functional Equation for the entire complex plane",examples:["zeta(0.2)","zeta(-0.5)","zeta(4)"],seealso:[]};var t3={name:"mad",category:"Statistics",syntax:["mad(a, b, c, ...)","mad(A)"],description:"Compute the median absolute deviation of a matrix or a list with values. The median absolute deviation is defined as the median of the absolute deviations from the median.",examples:["mad(10, 20, 30)","mad([1, 2, 3])"],seealso:["mean","median","std","abs"]};var n3={name:"max",category:"Statistics",syntax:["max(a, b, c, ...)","max(A)","max(A, dimension)"],description:"Compute the maximum value of a list of values.",examples:["max(2, 3, 4, 1)","max([2, 3, 4, 1])","max([2, 5; 4, 3])","max([2, 5; 4, 3], 1)","max([2, 5; 4, 3], 2)","max(2.7, 7.1, -4.5, 2.0, 4.1)","min(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["mean","median","min","prod","std","sum","variance"]};var a3={name:"mean",category:"Statistics",syntax:["mean(a, b, c, ...)","mean(A)","mean(A, dimension)"],description:"Compute the arithmetic mean of a list of values.",examples:["mean(2, 3, 4, 1)","mean([2, 3, 4, 1])","mean([2, 5; 4, 3])","mean([2, 5; 4, 3], 1)","mean([2, 5; 4, 3], 2)","mean([1.0, 2.7, 3.2, 4.0])"],seealso:["max","median","min","prod","std","sum","variance"]};var i3={name:"median",category:"Statistics",syntax:["median(a, b, c, ...)","median(A)"],description:"Compute the median of all values. The values are sorted and the middle value is returned. In case of an even number of values, the average of the two middle values is returned.",examples:["median(5, 2, 7)","median([3, -1, 5, 7])"],seealso:["max","mean","min","prod","std","sum","variance","quantileSeq"]};var o3={name:"min",category:"Statistics",syntax:["min(a, b, c, ...)","min(A)","min(A, dimension)"],description:"Compute the minimum value of a list of values.",examples:["min(2, 3, 4, 1)","min([2, 3, 4, 1])","min([2, 5; 4, 3])","min([2, 5; 4, 3], 1)","min([2, 5; 4, 3], 2)","min(2.7, 7.1, -4.5, 2.0, 4.1)","max(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["max","mean","median","prod","std","sum","variance"]};var s3={name:"mode",category:"Statistics",syntax:["mode(a, b, c, ...)","mode(A)","mode(A, a, b, B, c, ...)"],description:"Computes the mode of all values as an array. In case mode being more than one, multiple values are returned in an array.",examples:["mode(2, 1, 4, 3, 1)","mode([1, 2.7, 3.2, 4, 2.7])","mode(1, 4, 6, 1, 6)"],seealso:["max","mean","min","median","prod","std","sum","variance"]};var u3={name:"prod",category:"Statistics",syntax:["prod(a, b, c, ...)","prod(A)"],description:"Compute the product of all values.",examples:["prod(2, 3, 4)","prod([2, 3, 4])","prod([2, 5; 4, 3])"],seealso:["max","mean","min","median","min","std","sum","variance"]};var f3={name:"quantileSeq",category:"Statistics",syntax:["quantileSeq(A, prob[, sorted])","quantileSeq(A, [prob1, prob2, ...][, sorted])","quantileSeq(A, N[, sorted])"],description:\`Compute the prob order quantile of a matrix or a list with values. The sequence is sorted and the middle value is returned. Supported types of sequence values are: Number, BigNumber, Unit Supported types of probablity are: Number, BigNumber. -In case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated.\`,examples:["quantileSeq([3, -1, 5, 7], 0.5)","quantileSeq([3, -1, 5, 7], [1/3, 2/3])","quantileSeq([3, -1, 5, 7], 2)","quantileSeq([-1, 3, 5, 7], 0.5, true)"],seealso:["mean","median","min","max","prod","std","sum","variance"]};var c3={name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, dimension)","std(A, normalization)","std(A, dimension, normalization)"],description:'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["std(2, 4, 6)","std([2, 4, 6, 8])",'std([2, 4, 6, 8], "uncorrected")','std([2, 4, 6, 8], "biased")',"std([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","prod","sum","variance"]};var l3={name:"cumsum",category:"Statistics",syntax:["cumsum(a, b, c, ...)","cumsum(A)"],description:"Compute the cumulative sum of all values.",examples:["cumsum(2, 3, 4, 1)","cumsum([2, 3, 4, 1])","cumsum([1, 2; 3, 4])","cumsum([1, 2; 3, 4], 1)","cumsum([1, 2; 3, 4], 2)"],seealso:["max","mean","median","min","prod","std","sum","variance"]};var m3={name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)","sum(A, dimension)"],description:"Compute the sum of all values.",examples:["sum(2, 3, 4, 1)","sum([2, 3, 4, 1])","sum([2, 5; 4, 3])"],seealso:["max","mean","median","min","prod","std","sum","variance"]};var p3={name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, dimension)","variance(A, normalization)","variance(A, dimension, normalization)"],description:'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["variance(2, 4, 6)","variance([2, 4, 6, 8])",'variance([2, 4, 6, 8], "uncorrected")','variance([2, 4, 6, 8], "biased")',"variance([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","std","sum"]};var d3={name:"corr",category:"Statistics",syntax:["corr(A,B)"],description:"Compute the correlation coefficient of a two list with values, For matrices, the matrix correlation coefficient is calculated.",examples:["corr([2, 4, 6, 8],[1, 2, 3, 6])","corr(matrix([[1, 2.2, 3, 4.8, 5], [1, 2, 3, 4, 5]]), matrix([[4, 5.3, 6.6, 7, 8], [1, 2, 3, 4, 5]]))"],seealso:["max","mean","min","median","min","prod","std","sum"]};var h3={name:"acos",category:"Trigonometry",syntax:["acos(x)"],description:"Compute the inverse cosine of a value in radians.",examples:["acos(0.5)","acos(cos(2.3))"],seealso:["cos","atan","asin"]};var v3={name:"acosh",category:"Trigonometry",syntax:["acosh(x)"],description:"Calculate the hyperbolic arccos of a value, defined as \`acosh(x) = ln(sqrt(x^2 - 1) + x)\`.",examples:["acosh(1.5)"],seealso:["cosh","asinh","atanh"]};var g3={name:"acot",category:"Trigonometry",syntax:["acot(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acot(0.5)","acot(cot(0.5))","acot(2)"],seealso:["cot","atan"]};var y3={name:"acoth",category:"Trigonometry",syntax:["acoth(x)"],description:"Calculate the hyperbolic arccotangent of a value, defined as \`acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2\`.",examples:["acoth(2)","acoth(0.5)"],seealso:["acsch","asech"]};var x3={name:"acsc",category:"Trigonometry",syntax:["acsc(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acsc(2)","acsc(csc(0.5))","acsc(0.5)"],seealso:["csc","asin","asec"]};var b3={name:"acsch",category:"Trigonometry",syntax:["acsch(x)"],description:"Calculate the hyperbolic arccosecant of a value, defined as \`acsch(x) = ln(1/x + sqrt(1/x^2 + 1))\`.",examples:["acsch(0.5)"],seealso:["asech","acoth"]};var w3={name:"asec",category:"Trigonometry",syntax:["asec(x)"],description:"Calculate the inverse secant of a value.",examples:["asec(0.5)","asec(sec(0.5))","asec(2)"],seealso:["acos","acot","acsc"]};var D3={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]};var S3={name:"asin",category:"Trigonometry",syntax:["asin(x)"],description:"Compute the inverse sine of a value in radians.",examples:["asin(0.5)","asin(sin(0.5))"],seealso:["sin","acos","atan"]};var N3={name:"asinh",category:"Trigonometry",syntax:["asinh(x)"],description:"Calculate the hyperbolic arcsine of a value, defined as \`asinh(x) = ln(x + sqrt(x^2 + 1))\`.",examples:["asinh(0.5)"],seealso:["acosh","atanh"]};var A3={name:"atan",category:"Trigonometry",syntax:["atan(x)"],description:"Compute the inverse tangent of a value in radians.",examples:["atan(0.5)","atan(tan(0.5))"],seealso:["tan","acos","asin"]};var M3={name:"atan2",category:"Trigonometry",syntax:["atan2(y, x)"],description:"Computes the principal value of the arc tangent of y/x in radians.",examples:["atan2(2, 2) / pi","angle = 60 deg in rad","x = cos(angle)","y = sin(angle)","atan2(y, x)"],seealso:["sin","cos","tan"]};var C3={name:"atanh",category:"Trigonometry",syntax:["atanh(x)"],description:"Calculate the hyperbolic arctangent of a value, defined as \`atanh(x) = ln((1 + x)/(1 - x)) / 2\`.",examples:["atanh(0.5)"],seealso:["acosh","asinh"]};var E3={name:"cos",category:"Trigonometry",syntax:["cos(x)"],description:"Compute the cosine of x in radians.",examples:["cos(2)","cos(pi / 4) ^ 2","cos(180 deg)","cos(60 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["acos","sin","tan"]};var T3={name:"cosh",category:"Trigonometry",syntax:["cosh(x)"],description:"Compute the hyperbolic cosine of x in radians.",examples:["cosh(0.5)"],seealso:["sinh","tanh","coth"]};var F3={name:"cot",category:"Trigonometry",syntax:["cot(x)"],description:"Compute the cotangent of x in radians. Defined as 1/tan(x)",examples:["cot(2)","1 / tan(2)"],seealso:["sec","csc","tan"]};var _3={name:"coth",category:"Trigonometry",syntax:["coth(x)"],description:"Compute the hyperbolic cotangent of x in radians.",examples:["coth(2)","1 / tanh(2)"],seealso:["sech","csch","tanh"]};var O3={name:"csc",category:"Trigonometry",syntax:["csc(x)"],description:"Compute the cosecant of x in radians. Defined as 1/sin(x)",examples:["csc(2)","1 / sin(2)"],seealso:["sec","cot","sin"]};var B3={name:"csch",category:"Trigonometry",syntax:["csch(x)"],description:"Compute the hyperbolic cosecant of x in radians. Defined as 1/sinh(x)",examples:["csch(2)","1 / sinh(2)"],seealso:["sech","coth","sinh"]};var P3={name:"sec",category:"Trigonometry",syntax:["sec(x)"],description:"Compute the secant of x in radians. Defined as 1/cos(x)",examples:["sec(2)","1 / cos(2)"],seealso:["cot","csc","cos"]};var I3={name:"sech",category:"Trigonometry",syntax:["sech(x)"],description:"Compute the hyperbolic secant of x in radians. Defined as 1/cosh(x)",examples:["sech(2)","1 / cosh(2)"],seealso:["coth","csch","cosh"]};var R3={name:"sin",category:"Trigonometry",syntax:["sin(x)"],description:"Compute the sine of x in radians.",examples:["sin(2)","sin(pi / 4) ^ 2","sin(90 deg)","sin(30 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["asin","cos","tan"]};var k3={name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]};var q3={name:"tan",category:"Trigonometry",syntax:["tan(x)"],description:"Compute the tangent of x in radians.",examples:["tan(0.5)","sin(0.5) / cos(0.5)","tan(pi / 4)","tan(45 deg)"],seealso:["atan","sin","cos"]};var L3={name:"tanh",category:"Trigonometry",syntax:["tanh(x)"],description:"Compute the hyperbolic tangent of x in radians.",examples:["tanh(0.5)","sinh(0.5) / cosh(0.5)"],seealso:["sinh","cosh"]};var z3={name:"to",category:"Units",syntax:["x to unit","to(x, unit)"],description:"Change the unit of a value.",examples:["5 inch to cm","3.2kg to g","16 bytes in bits"],seealso:[]};var U3={name:"bin",category:"Utils",syntax:["bin(value)"],description:"Format a number as binary",examples:["bin(2)"],seealso:["oct","hex"]};var W3={name:"clone",category:"Utils",syntax:["clone(x)"],description:"Clone a variable. Creates a copy of primitive variables,and a deep copy of matrices",examples:["clone(3.5)","clone(2 - 4i)","clone(45 deg)","clone([1, 2; 3, 4])",'clone("hello world")'],seealso:[]};var Y3={name:"format",category:"Utils",syntax:["format(value)","format(value, precision)"],description:"Format a value of any type as string.",examples:["format(2.3)","format(3 - 4i)","format([])","format(pi, 3)"],seealso:["print"]};var H3={name:"hasNumericValue",category:"Utils",syntax:["hasNumericValue(x)"],description:"Test whether a value is an numeric value. In case of a string, true is returned if the string contains a numeric value.",examples:["hasNumericValue(2)",'hasNumericValue("2")','isNumeric("2")',"hasNumericValue(0)","hasNumericValue(bignumber(500))","hasNumericValue(fraction(0.125))","hasNumericValue(2 + 3i)",'hasNumericValue([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","isNumeric"]};var $3={name:"hex",category:"Utils",syntax:["hex(value)"],description:"Format a number as hexadecimal",examples:["hex(240)"],seealso:["bin","oct"]};var G3={name:"isInteger",category:"Utils",syntax:["isInteger(x)"],description:"Test whether a value is an integer number.",examples:["isInteger(2)","isInteger(3.5)","isInteger([3, 0.5, -2])"],seealso:["isNegative","isNumeric","isPositive","isZero"]};var V3={name:"isNaN",category:"Utils",syntax:["isNaN(x)"],description:"Test whether a value is NaN (not a number)",examples:["isNaN(2)","isNaN(0 / 0)","isNaN(NaN)","isNaN(Infinity)"],seealso:["isNegative","isNumeric","isPositive","isZero"]};var Z3={name:"isNegative",category:"Utils",syntax:["isNegative(x)"],description:"Test whether a value is negative: smaller than zero.",examples:["isNegative(2)","isNegative(0)","isNegative(-4)","isNegative([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isPositive","isZero"]};var Q3={name:"isNumeric",category:"Utils",syntax:["isNumeric(x)"],description:"Test whether a value is a numeric value. Returns true when the input is a number, BigNumber, Fraction, or boolean.",examples:["isNumeric(2)",'isNumeric("2")','hasNumericValue("2")',"isNumeric(0)","isNumeric(bignumber(500))","isNumeric(fraction(0.125))","isNumeric(2 + 3i)",'isNumeric([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","hasNumericValue"]};var X3={name:"isPositive",category:"Utils",syntax:["isPositive(x)"],description:"Test whether a value is positive: larger than zero.",examples:["isPositive(2)","isPositive(0)","isPositive(-4)","isPositive([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isNegative","isZero"]};var J3={name:"isPrime",category:"Utils",syntax:["isPrime(x)"],description:"Test whether a value is prime: has no divisors other than itself and one.",examples:["isPrime(3)","isPrime(-2)","isPrime([2, 17, 100])"],seealso:["isInteger","isNumeric","isNegative","isZero"]};var K3={name:"isZero",category:"Utils",syntax:["isZero(x)"],description:"Test whether a value is zero.",examples:["isZero(2)","isZero(0)","isZero(-4)","isZero([3, 0, -2, 0])"],seealso:["isInteger","isNumeric","isNegative","isPositive"]};var j3={name:"numeric",category:"Utils",syntax:["numeric(x)"],description:"Convert a numeric input to a specific numeric type: number, BigNumber, or Fraction.",examples:['numeric("4")','numeric("4", "number")','numeric("4", "BigNumber")','numeric("4", "Fraction")','numeric(4, "Fraction")','numeric(fraction(2, 5), "number")'],seealso:["number","fraction","bignumber","string","format"]};var eB={name:"oct",category:"Utils",syntax:["oct(value)"],description:"Format a number as octal",examples:["oct(56)"],seealso:["bin","hex"]};var rB={name:"print",category:"Utils",syntax:["print(template, values)","print(template, values, precision)"],description:"Interpolate values into a string template.",examples:['print("Lucy is $age years old", {age: 5})','print("The value of pi is $pi", {pi: pi}, 3)','print("Hello, $user.name!", {user: {name: "John"}})','print("Values: $1, $2, $3", [6, 9, 4])'],seealso:["format"]};var tB={name:"typeOf",category:"Utils",syntax:["typeOf(x)"],description:"Get the type of a variable.",examples:["typeOf(3.5)","typeOf(2 - 4i)","typeOf(45 deg)",'typeOf("hello world")'],seealso:["getMatrixDataType"]};var nB={name:"solveODE",category:"Numeric",syntax:["solveODE(func, tspan, y0)","solveODE(func, tspan, y0, options)"],description:"Numerical Integration of Ordinary Differential Equations.",examples:["f(t,y) = y","tspan = [0, 4]","solveODE(f, tspan, 1)","solveODE(f, tspan, [1, 2])",'solveODE(f, tspan, 1, { method:"RK23", maxStep:0.1 })'],seealso:["derivative","simplifyCore"]};var aB={bignumber:ZT,boolean:QT,complex:XT,createUnit:JT,fraction:KT,index:jT,matrix:eF,number:rF,sparse:tF,splitUnit:nF,string:aF,unit:iF,e:ND,E:ND,false:BT,i:PT,Infinity:IT,LN2:kT,LN10:RT,LOG2E:LT,LOG10E:qT,NaN:zT,null:UT,pi:AD,PI:AD,phi:WT,SQRT1_2:YT,SQRT2:HT,tau:$T,true:GT,version:VT,speedOfLight:{description:"Speed of light in vacuum",examples:["speedOfLight"]},gravitationConstant:{description:"Newtonian constant of gravitation",examples:["gravitationConstant"]},planckConstant:{description:"Planck constant",examples:["planckConstant"]},reducedPlanckConstant:{description:"Reduced Planck constant",examples:["reducedPlanckConstant"]},magneticConstant:{description:"Magnetic constant (vacuum permeability)",examples:["magneticConstant"]},electricConstant:{description:"Electric constant (vacuum permeability)",examples:["electricConstant"]},vacuumImpedance:{description:"Characteristic impedance of vacuum",examples:["vacuumImpedance"]},coulomb:{description:"Coulomb's constant",examples:["coulomb"]},elementaryCharge:{description:"Elementary charge",examples:["elementaryCharge"]},bohrMagneton:{description:"Borh magneton",examples:["bohrMagneton"]},conductanceQuantum:{description:"Conductance quantum",examples:["conductanceQuantum"]},inverseConductanceQuantum:{description:"Inverse conductance quantum",examples:["inverseConductanceQuantum"]},magneticFluxQuantum:{description:"Magnetic flux quantum",examples:["magneticFluxQuantum"]},nuclearMagneton:{description:"Nuclear magneton",examples:["nuclearMagneton"]},klitzing:{description:"Von Klitzing constant",examples:["klitzing"]},bohrRadius:{description:"Borh radius",examples:["bohrRadius"]},classicalElectronRadius:{description:"Classical electron radius",examples:["classicalElectronRadius"]},electronMass:{description:"Electron mass",examples:["electronMass"]},fermiCoupling:{description:"Fermi coupling constant",examples:["fermiCoupling"]},fineStructure:{description:"Fine-structure constant",examples:["fineStructure"]},hartreeEnergy:{description:"Hartree energy",examples:["hartreeEnergy"]},protonMass:{description:"Proton mass",examples:["protonMass"]},deuteronMass:{description:"Deuteron Mass",examples:["deuteronMass"]},neutronMass:{description:"Neutron mass",examples:["neutronMass"]},quantumOfCirculation:{description:"Quantum of circulation",examples:["quantumOfCirculation"]},rydberg:{description:"Rydberg constant",examples:["rydberg"]},thomsonCrossSection:{description:"Thomson cross section",examples:["thomsonCrossSection"]},weakMixingAngle:{description:"Weak mixing angle",examples:["weakMixingAngle"]},efimovFactor:{description:"Efimov factor",examples:["efimovFactor"]},atomicMass:{description:"Atomic mass constant",examples:["atomicMass"]},avogadro:{description:"Avogadro's number",examples:["avogadro"]},boltzmann:{description:"Boltzmann constant",examples:["boltzmann"]},faraday:{description:"Faraday constant",examples:["faraday"]},firstRadiation:{description:"First radiation constant",examples:["firstRadiation"]},loschmidt:{description:"Loschmidt constant at T=273.15 K and p=101.325 kPa",examples:["loschmidt"]},gasConstant:{description:"Gas constant",examples:["gasConstant"]},molarPlanckConstant:{description:"Molar Planck constant",examples:["molarPlanckConstant"]},molarVolume:{description:"Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa",examples:["molarVolume"]},sackurTetrode:{description:"Sackur-Tetrode constant at T=1 K and p=101.325 kPa",examples:["sackurTetrode"]},secondRadiation:{description:"Second radiation constant",examples:["secondRadiation"]},stefanBoltzmann:{description:"Stefan-Boltzmann constant",examples:["stefanBoltzmann"]},wienDisplacement:{description:"Wien displacement law constant",examples:["wienDisplacement"]},molarMass:{description:"Molar mass constant",examples:["molarMass"]},molarMassC12:{description:"Molar mass constant of carbon-12",examples:["molarMassC12"]},gravity:{description:"Standard acceleration of gravity (standard acceleration of free-fall on Earth)",examples:["gravity"]},planckLength:{description:"Planck length",examples:["planckLength"]},planckMass:{description:"Planck mass",examples:["planckMass"]},planckTime:{description:"Planck time",examples:["planckTime"]},planckCharge:{description:"Planck charge",examples:["planckCharge"]},planckTemperature:{description:"Planck temperature",examples:["planckTemperature"]},derivative:fF,lsolve:lF,lsolveAll:mF,lup:pF,lusolve:dF,leafCount:cF,polynomialRoot:hF,resolve:yF,simplify:xF,simplifyConstant:bF,simplifyCore:wF,symbolicEqual:SF,rationalize:gF,slu:DF,usolve:NF,usolveAll:AF,qr:vF,abs:MF,add:CF,cbrt:EF,ceil:TF,cube:FF,divide:_F,dotDivide:OF,dotMultiply:BF,dotPow:PF,exp:IF,expm:RF,expm1:kF,fix:qF,floor:LF,gcd:zF,hypot:UF,lcm:YF,log:HF,log2:VF,log1p:GF,log10:$F,mod:ZF,multiply:QF,norm:XF,nthRoot:JF,nthRoots:KF,pow:jF,round:e_,sign:r_,sqrt:t_,sqrtm:n_,square:s_,subtract:u_,unaryMinus:f_,unaryPlus:c_,xgcd:l_,invmod:WF,bitAnd:m_,bitNot:p_,bitOr:d_,bitXor:h_,leftShift:v_,rightArithShift:g_,rightLogShift:y_,bellNumbers:x_,catalan:b_,composition:w_,stirlingS2:D_,config:oF,import:sF,typed:uF,arg:S_,conj:N_,re:M_,im:A_,evaluate:C_,help:E_,distance:T_,intersect:F_,and:__,not:O_,or:B_,xor:P_,concat:R_,count:k_,cross:q_,column:I_,ctranspose:L_,det:z_,diag:U_,diff:W_,dot:Y_,getMatrixDataType:Z_,identity:Q_,filter:$_,flatten:G_,forEach:V_,inv:X_,pinv:J_,eigs:H_,kron:K_,matrixFromFunction:rO,matrixFromRows:tO,matrixFromColumns:eO,map:j_,ones:nO,partitionSelect:aO,range:iO,resize:sO,reshape:oO,rotate:uO,rotationMatrix:fO,row:cO,size:lO,sort:mO,squeeze:pO,subset:dO,trace:hO,transpose:vO,zeros:gO,fft:yO,ifft:xO,sylvester:a_,schur:i_,lyap:o_,solveODE:nB,combinations:bO,combinationsWithRep:wO,factorial:DO,gamma:SO,kldivergence:AO,lgamma:NO,multinomial:MO,permutations:CO,pickRandom:EO,random:TO,randomInt:FO,compare:_O,compareNatural:OO,compareText:BO,deepEqual:PO,equal:IO,equalText:RO,larger:kO,largerEq:qO,smaller:LO,smallerEq:zO,unequal:UO,setCartesian:WO,setDifference:YO,setDistinct:HO,setIntersect:$O,setIsSubset:GO,setMultiplicity:VO,setPowerset:ZO,setSize:QO,setSymDifference:XO,setUnion:JO,zpk2tf:KO,freqz:jO,erf:e3,zeta:r3,cumsum:l3,mad:t3,max:n3,mean:a3,median:i3,min:o3,mode:s3,prod:u3,quantileSeq:f3,std:c3,sum:m3,variance:p3,corr:d3,acos:h3,acosh:v3,acot:g3,acoth:y3,acsc:x3,acsch:b3,asec:w3,asech:D3,asin:S3,asinh:N3,atan:A3,atanh:C3,atan2:M3,cos:E3,cosh:T3,cot:F3,coth:_3,csc:O3,csch:B3,sec:P3,sech:I3,sin:R3,sinh:k3,tan:q3,tanh:L3,to:z3,clone:W3,format:Y3,bin:U3,oct:eB,hex:$3,isNaN:V3,isInteger:G3,isNegative:Z3,isNumeric:Q3,hasNumericValue:H3,isPositive:X3,isPrime:J3,isZero:K3,print:rB,typeOf:tB,numeric:j3};var iB="help",DG=["typed","mathWithTransform","Help"],vg=F(iB,DG,e=>{var{typed:r,mathWithTransform:t,Help:a}=e;return r(iB,{any:function(i){var s,l=i;if(typeof i!="string"){for(s in t)if(Xe(t,s)&&i===t[s]){l=s;break}}var c=wt(aB,l);if(!c){var o=typeof l=="function"?l.name:l;throw new Error('No documentation found on "'+o+'"')}return new a(c)}})});var oB="chain",SG=["typed","Chain"],gg=F(oB,SG,e=>{var{typed:r,Chain:t}=e;return r(oB,{"":function(){return new t},any:function(n){return new t(n)}})});var sB="det",NG=["typed","matrix","subtractScalar","multiply","divideScalar","isZero","unaryMinus"],yg=F(sB,NG,e=>{var{typed:r,matrix:t,subtractScalar:a,multiply:n,divideScalar:i,isZero:s,unaryMinus:l}=e;return r(sB,{any:function(u){return ar(u)},"Array | Matrix":function(u){var m;switch(Qe(u)?m=u.size():Array.isArray(u)?(u=t(u),m=u.size()):m=[],m.length){case 0:return ar(u);case 1:if(m[0]===1)return ar(u.valueOf()[0]);if(m[0]===0)return 1;throw new RangeError("Matrix must be square (size: "+lr(m)+")");case 2:{var d=m[0],h=m[1];if(d===h)return c(u.clone().valueOf(),d,h);if(h===0)return 1;throw new RangeError("Matrix must be square (size: "+lr(m)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+lr(m)+")")}}});function c(o,u,m){if(u===1)return ar(o[0][0]);if(u===2)return a(n(o[0][0],o[1][1]),n(o[1][0],o[0][1]));for(var d=!1,h=new Array(u).fill(0).map((O,_)=>_),y=0;y{var{typed:r,matrix:t,divideScalar:a,addScalar:n,multiply:i,unaryMinus:s,det:l,identity:c,abs:o}=e;return r(uB,{"Array | Matrix":function(d){var h=Qe(d)?d.size():ur(d);switch(h.length){case 1:if(h[0]===1)return Qe(d)?t([a(1,d.valueOf()[0])]):[a(1,d[0])];throw new RangeError("Matrix must be square (size: "+lr(h)+")");case 2:{var y=h[0],v=h[1];if(y===v)return Qe(d)?t(u(d.valueOf(),y,v),d.storage()):u(d,y,v);throw new RangeError("Matrix must be square (size: "+lr(h)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+lr(h)+")")}},any:function(d){return a(1,d)}});function u(m,d,h){var y,v,x,w,C;if(d===1){if(w=m[0][0],w===0)throw Error("Cannot calculate inverse, determinant is zero");return[[a(1,w)]]}else if(d===2){var b=l(m);if(b===0)throw Error("Cannot calculate inverse, determinant is zero");return[[a(m[1][1],b),a(s(m[0][1]),b)],[a(s(m[1][0]),b),a(m[0][0],b)]]}else{var A=m.concat();for(y=0;yO&&(O=o(A[y][D]),_=y),y++;if(O===0)throw Error("Cannot calculate inverse, determinant is zero");y=_,y!==D&&(C=A[D],A[D]=A[y],A[y]=C,C=M[D],M[D]=M[y],M[y]=C);var E=A[D],T=M[D];for(y=0;y{var{typed:r,matrix:t,inv:a,deepEqual:n,equal:i,dotDivide:s,dot:l,ctranspose:c,divideScalar:o,multiply:u,add:m,Complex:d}=e;return r(fB,{"Array | Matrix":function(b){var A=Qe(b)?b.size():ur(b);switch(A.length){case 1:return w(b)?c(b):A[0]===1?a(b):s(c(b),l(b,b));case 2:{if(w(b))return c(b);var M=A[0],D=A[1];if(M===D)try{return a(b)}catch(O){if(!(O instanceof Error&&O.message.match(/Cannot calculate inverse, determinant is zero/)))throw O}return Qe(b)?t(h(b.valueOf(),M,D),b.storage()):h(b,M,D)}default:throw new RangeError("Matrix must be two dimensional (size: "+lr(A)+")")}},any:function(b){return i(b,0)?ar(b):o(1,b)}});function h(C,b,A){var{C:M,F:D}=v(C,b,A),O=u(a(u(c(M),M)),c(M)),_=u(c(D),a(u(D,c(D))));return u(_,O)}function y(C,b,A){for(var M=ar(C),D=0,O=0;O_.filter((T,R)=>R!x(l(M[E],M[E])));return{C:D,F:O}}function x(C){return i(m(C,d(1,1)),m(0,d(1,1)))}function w(C){return n(m(C,d(1,1)),m(u(C,0),d(1,1)))}});function cB(e){var{addScalar:r,subtract:t,flatten:a,multiply:n,multiplyScalar:i,divideScalar:s,sqrt:l,abs:c,bignumber:o,diag:u,size:m,reshape:d,inv:h,qr:y,usolve:v,usolveAll:x,equal:w,complex:C,larger:b,smaller:A,matrixFromColumns:M,dot:D}=e;function O(ae,$,le,Ee){var me=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,ge=_(ae,$,le,Ee,me);E(ae,$,le,Ee,me,ge);var{values:Se,C:ye}=T(ae,$,le,Ee,me);if(me){var be=R(ae,$,ye,ge,Se,le,Ee);return{values:Se,eigenvectors:be}}return{values:Se}}function _(ae,$,le,Ee,me){var ge=Ee==="BigNumber",Se=Ee==="Complex",ye=ge?o(0):0,be=ge?o(1):Se?C(1):1,De=ge?o(1):1,Ae=ge?o(10):2,We=i(Ae,Ae),Je;me&&(Je=Array($).fill(be));for(var J=!1;!J;){J=!0;for(var re=0;re<$;re++){for(var xe=ye,j=ye,ne=0;ne<$;ne++)re!==ne&&(xe=r(xe,c(ae[ne][re])),j=r(j,c(ae[re][ne])));if(!w(xe,0)&&!w(j,0)){for(var ue=De,Me=xe,Ce=s(j,Ae),Le=i(j,Ae);A(Me,Ce);)Me=i(Me,We),ue=i(ue,Ae);for(;b(Me,Le);)Me=s(Me,We),ue=s(ue,Ae);var Ie=A(s(r(Me,j),ue),i(r(xe,j),.95));if(Ie){J=!1;for(var fr=s(1,ue),or=0;or<$;or++)re!==or&&(ae[re][or]=i(ae[re][or],fr),ae[or][re]=i(ae[or][re],ue));me&&(Je[re]=i(Je[re],fr))}}}}return me?u(Je):null}function E(ae,$,le,Ee,me,ge){var Se=Ee==="BigNumber",ye=Ee==="Complex",be=Se?o(0):ye?C(0):0;Se&&(le=o(le));for(var De=0;De<$-2;De++){for(var Ae=0,We=be,Je=De+1;Je<$;Je++){var J=ae[Je][De];A(c(We),c(J))&&(We=J,Ae=Je)}if(!A(c(We),le)){if(Ae!==De+1){var re=ae[Ae];ae[Ae]=ae[De+1],ae[De+1]=re;for(var xe=0;xe<$;xe++){var j=ae[xe][Ae];ae[xe][Ae]=ae[xe][De+1],ae[xe][De+1]=j}if(me){var ne=ge[Ae];ge[Ae]=ge[De+1],ge[De+1]=ne}}for(var ue=De+2;ue<$;ue++){var Me=s(ae[ue][De],We);if(Me!==0){for(var Ce=0;Ce<$;Ce++)ae[ue][Ce]=t(ae[ue][Ce],i(Me,ae[De+1][Ce]));for(var Le=0;Le<$;Le++)ae[Le][De+1]=r(ae[Le][De+1],i(Me,ae[Le][ue]));if(me)for(var Ie=0;Ie<$;Ie++)ge[ue][Ie]=t(ge[ue][Ie],i(Me,ge[De+1][Ie]))}}}}return ge}function T(ae,$,le,Ee,me){var ge=Ee==="BigNumber",Se=Ee==="Complex",ye=ge?o(1):Se?C(1):1;ge&&(le=o(le));for(var be=ar(ae),De=[],Ae=$,We=[],Je=me?u(Array($).fill(ye)):void 0,J=me?u(Array(Ae).fill(ye)):void 0,re=0;re<=100;){re+=1;for(var xe=be[Ae-1][Ae-1],j=0;j1&&(J=u(Array(Ae-1).fill(ye)))),Ae-=1,be.pop();for(var Ce=0;Ce2&&(J=u(Array(Ae-2).fill(ye)))),Ae-=2,be.pop(),be.pop();for(var Ie=0;Ie+t(c(Ke),c(Br))),re>100){var fr=Error("The eigenvalues failed to converge. Only found these eigenvalues: "+De.join(", "));throw fr.values=De,fr.vectors=[],fr}var or=me?n(Je,W(We,$)):void 0;return{values:De,C:or}}function R(ae,$,le,Ee,me,ge,Se){var ye=h(le),be=n(ye,ae,le),De=Se==="BigNumber",Ae=Se==="Complex",We=De?o(0):Ae?C(0):0,Je=De?o(1):Ae?C(1):1,J=[],re=[];for(var xe of me){var j=q(J,xe,w);j===-1?(J.push(xe),re.push(1)):re[j]+=1}for(var ne=[],ue=J.length,Me=Array($).fill(We),Ce=u(Array($).fill(Je)),Le=function(){var or=J[Ie],Ke=t(be,n(or,Ce)),Br=x(Ke,Me);for(Br.shift();Br.lengthn(ce,we)),ne.push(...Br.map(we=>({value:or,vector:a(we)})))},Ie=0;Ie=5)return null;for(ye=0;;){var be=v(ae,Se);if(A(oe(z(Se,[be])),Ee))break;if(++ye>=10)return null;Se=pe(be)}return Se}function K(ae,$,le){var Ee=le==="BigNumber",me=le==="Complex",ge=Array(ae).fill(0).map(Se=>2*Math.random()-1);return Ee&&(ge=ge.map(Se=>o(Se))),me&&(ge=ge.map(Se=>C(Se))),ge=z(ge,$),pe(ge,le)}function z(ae,$){var le=m(ae);for(var Ee of $)Ee=d(Ee,le),ae=t(ae,n(s(D(Ee,ae),D(Ee,Ee)),Ee));return ae}function oe(ae){return c(l(D(ae,ae)))}function pe(ae,$){var le=$==="BigNumber",Ee=$==="Complex",me=le?o(1):Ee?C(1):1;return n(s(me,oe(ae)),ae)}return O}function lB(e){var{config:r,addScalar:t,subtract:a,abs:n,atan:i,cos:s,sin:l,multiplyScalar:c,inv:o,bignumber:u,multiply:m,add:d}=e;function h(E,T){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:r.epsilon,L=arguments.length>3?arguments[3]:void 0,H=arguments.length>4?arguments[4]:void 0;if(L==="number")return y(E,R,H);if(L==="BigNumber")return v(E,R,H);throw TypeError("Unsupported data type: "+L)}function y(E,T,R){var L=E.length,H=Math.abs(T/L),G,W;if(R){W=new Array(L);for(var q=0;q=Math.abs(H);){var K=k[0][0],z=k[0][1];G=x(E[K][K],E[z][z],E[K][z]),E=M(E,G,K,z),R&&(W=C(W,G,K,z)),k=D(E)}for(var oe=Array(L).fill(0),pe=0;pe=n(H);){var K=k[0][0],z=k[0][1];G=w(E[K][K],E[z][z],E[K][z]),E=A(E,G,K,z),R&&(W=b(W,G,K,z)),k=O(E)}for(var oe=Array(L).fill(0),pe=0;pe({value:H[$],vector:ae}));return{values:H,eigenvectors:pe}}return h}var CG="eigs",EG=["config","typed","matrix","addScalar","equal","subtract","abs","atan","cos","sin","multiplyScalar","divideScalar","inv","bignumber","multiply","add","larger","column","flatten","number","complex","sqrt","diag","size","reshape","qr","usolve","usolveAll","im","re","smaller","matrixFromColumns","dot"],wg=F(CG,EG,e=>{var{config:r,typed:t,matrix:a,addScalar:n,subtract:i,equal:s,abs:l,atan:c,cos:o,sin:u,multiplyScalar:m,divideScalar:d,inv:h,bignumber:y,multiply:v,add:x,larger:w,column:C,flatten:b,number:A,complex:M,sqrt:D,diag:O,size:_,reshape:E,qr:T,usolve:R,usolveAll:L,im:H,re:G,smaller:W,matrixFromColumns:q,dot:k}=e,K=lB({config:r,addScalar:n,subtract:i,column:C,flatten:b,equal:s,abs:l,atan:c,cos:o,sin:u,multiplyScalar:m,inv:h,bignumber:y,complex:M,multiply:v,add:x}),z=cB({config:r,addScalar:n,subtract:i,multiply:v,multiplyScalar:m,flatten:b,divideScalar:d,sqrt:D,abs:l,bignumber:y,diag:O,size:_,reshape:E,qr:T,inv:h,usolve:R,usolveAll:L,equal:s,complex:M,larger:w,smaller:W,matrixFromColumns:q,dot:k});return t("eigs",{Array:function(ge){return oe(a(ge))},"Array, number|BigNumber":function(ge,Se){return oe(a(ge),{precision:Se})},"Array, Object"(me,ge){return oe(a(me),ge)},Matrix:function(ge){return oe(ge,{matricize:!0})},"Matrix, number|BigNumber":function(ge,Se){return oe(ge,{precision:Se,matricize:!0})},"Matrix, Object":function(ge,Se){var ye={matricize:!0};return ht(ye,Se),oe(ge,ye)}});function oe(me){var ge,Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ye="eigenvectors"in Se?Se.eigenvectors:!0,be=(ge=Se.precision)!==null&&ge!==void 0?ge:r.epsilon,De=pe(me,be,ye);return Se.matricize&&(De.values=a(De.values),ye&&(De.eigenvectors=De.eigenvectors.map(Ae=>{var{value:We,vector:Je}=Ae;return{value:We,vector:a(Je)}}))),ye&&Object.defineProperty(De,"vectors",{enumerable:!1,get:()=>{throw new Error("eigs(M).vectors replaced with eigs(M).eigenvectors")}}),De}function pe(me,ge,Se){var ye=me.toArray(),be=me.size();if(be.length!==2||be[0]!==be[1])throw new RangeError("Matrix must be square (size: ".concat(lr(be),")"));var De=be[0];if($(ye,De,ge)&&(le(ye,De),ae(ye,De,ge))){var Ae=Ee(me,ye,De);return K(ye,De,ge,Ae,Se)}var We=Ee(me,ye,De);return z(ye,De,ge,We,Se)}function ae(me,ge,Se){for(var ye=0;ye{var{typed:r,abs:t,add:a,identity:n,inv:i,multiply:s}=e;return r(mB,{Matrix:function(m){var d=m.size();if(d.length!==2||d[0]!==d[1])throw new RangeError("Matrix must be square (size: "+lr(d)+")");for(var h=d[0],y=1e-15,v=l(m),x=c(v,y),w=x.q,C=x.j,b=s(m,Math.pow(2,-C)),A=n(h),M=n(h),D=1,O=b,_=-1,E=1;E<=w;E++)E>1&&(O=s(O,b),_=-_),D=D*(w-E+1)/((2*w-E+1)*E),A=a(A,s(D,O)),M=a(M,s(D*_,O));for(var T=s(i(M),A),R=0;R{var{typed:r,abs:t,add:a,multiply:n,map:i,sqrt:s,subtract:l,inv:c,size:o,max:u,identity:m}=e,d=1e3,h=1e-6;function y(v){var x,w=0,C=v,b=m(o(v));do{var A=C;if(C=n(.5,a(A,c(b))),b=n(.5,a(b,c(A))),x=u(t(l(C,A))),x>h&&++w>d)throw new Error("computing square root of matrix: iterative method could not converge")}while(x>h);return C}return r(pB,{"Array | Matrix":function(x){var w=Qe(x)?x.size():ur(x);switch(w.length){case 1:if(w[0]===1)return i(x,s);throw new RangeError("Matrix must be square (size: "+lr(w)+")");case 2:{var C=w[0],b=w[1];if(C===b)return y(x);throw new RangeError("Matrix must be square (size: "+lr(w)+")")}default:throw new RangeError("Matrix must be at most two dimensional (size: "+lr(w)+")")}}})});var dB="sylvester",_G=["typed","schur","matrixFromColumns","matrix","multiply","range","concat","transpose","index","subset","add","subtract","identity","lusolve","abs"],Ng=F(dB,_G,e=>{var{typed:r,schur:t,matrixFromColumns:a,matrix:n,multiply:i,range:s,concat:l,transpose:c,index:o,subset:u,add:m,subtract:d,identity:h,lusolve:y,abs:v}=e;return r(dB,{"Matrix, Matrix, Matrix":x,"Array, Matrix, Matrix":function(C,b,A){return x(n(C),b,A)},"Array, Array, Matrix":function(C,b,A){return x(n(C),n(b),A)},"Array, Matrix, Array":function(C,b,A){return x(n(C),b,n(A))},"Matrix, Array, Matrix":function(C,b,A){return x(C,n(b),A)},"Matrix, Array, Array":function(C,b,A){return x(C,n(b),n(A))},"Matrix, Matrix, Array":function(C,b,A){return x(C,b,n(A))},"Array, Array, Array":function(C,b,A){return x(n(C),n(b),n(A)).toArray()}});function x(w,C,b){for(var A=C.size()[0],M=w.size()[0],D=t(w),O=D.T,_=D.U,E=t(i(-1,C)),T=E.T,R=E.U,L=i(i(c(_),b),R),H=s(0,M),G=[],W=(Ae,We)=>l(Ae,We,1),q=(Ae,We)=>l(Ae,We,0),k=0;k1e-5){for(var K=q(u(L,o(H,k)),u(L,o(H,k+1))),z=0;z{var{typed:r,matrix:t,identity:a,multiply:n,qr:i,norm:s,subtract:l}=e;return r(hB,{Array:function(u){var m=c(t(u));return{U:m.U.valueOf(),T:m.T.valueOf()}},Matrix:function(u){return c(u)}});function c(o){var u=o.size()[0],m=o,d=a(u),h=0,y;do{y=m;var v=i(m),x=v.Q,w=v.R;if(m=n(w,x),d=n(d,x),h++>100)break}while(s(l(m,y))>1e-4);return{U:d,T:m}}});var vB="lyap",BG=["typed","matrix","sylvester","multiply","transpose"],Mg=F(vB,BG,e=>{var{typed:r,matrix:t,sylvester:a,multiply:n,transpose:i}=e;return r(vB,{"Matrix, Matrix":function(l,c){return a(l,i(l),n(-1,c))},"Array, Matrix":function(l,c){return a(t(l),i(t(l)),n(-1,c))},"Matrix, Array":function(l,c){return a(l,i(t(l)),t(n(-1,c)))},"Array, Array":function(l,c){return a(t(l),i(t(l)),t(n(-1,c))).toArray()}})});var PG="divide",IG=["typed","matrix","multiply","equalScalar","divideScalar","inv"],Cg=F(PG,IG,e=>{var{typed:r,matrix:t,multiply:a,equalScalar:n,divideScalar:i,inv:s}=e,l=jr({typed:r,equalScalar:n}),c=qt({typed:r});return r("divide",Sm({"Array | Matrix, Array | Matrix":function(u,m){return a(u,s(m))},"DenseMatrix, any":function(u,m){return c(u,m,i,!1)},"SparseMatrix, any":function(u,m){return l(u,m,i,!1)},"Array, any":function(u,m){return c(t(u),m,i,!1).valueOf()},"any, Array | Matrix":function(u,m){return a(u,s(m))}},i.signatures))});var gB="distance",RG=["typed","addScalar","subtractScalar","divideScalar","multiplyScalar","deepEqual","sqrt","abs"],Eg=F(gB,RG,e=>{var{typed:r,addScalar:t,subtractScalar:a,multiplyScalar:n,divideScalar:i,deepEqual:s,sqrt:l,abs:c}=e;return r(gB,{"Array, Array, Array":function(M,D,O){if(M.length===2&&D.length===2&&O.length===2){if(!u(M))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!u(D))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!u(O))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(s(D,O))throw new TypeError("LinePoint1 should not be same with LinePoint2");var _=a(O[1],D[1]),E=a(D[0],O[0]),T=a(n(O[0],D[1]),n(D[0],O[1]));return x(M[0],M[1],_,E,T)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object, Object":function(M,D,O){if(Object.keys(M).length===2&&Object.keys(D).length===2&&Object.keys(O).length===2){if(!u(M))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!u(D))throw new TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!u(O))throw new TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");if(s(y(D),y(O)))throw new TypeError("LinePoint1 should not be same with LinePoint2");if("pointX"in M&&"pointY"in M&&"lineOnePtX"in D&&"lineOnePtY"in D&&"lineTwoPtX"in O&&"lineTwoPtY"in O){var _=a(O.lineTwoPtY,D.lineOnePtY),E=a(D.lineOnePtX,O.lineTwoPtX),T=a(n(O.lineTwoPtX,D.lineOnePtY),n(D.lineOnePtX,O.lineTwoPtY));return x(M.pointX,M.pointY,_,E,T)}else throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},"Array, Array":function(M,D){if(M.length===2&&D.length===3){if(!u(M))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!m(D))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return x(M[0],M[1],D[0],D[1],D[2])}else if(M.length===3&&D.length===6){if(!m(M))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!h(D))throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument");return w(M[0],M[1],M[2],D[0],D[1],D[2],D[3],D[4],D[5])}else if(M.length===D.length&&M.length>0){if(!d(M))throw new TypeError("All values of an array should be numbers or BigNumbers");if(!d(D))throw new TypeError("All values of an array should be numbers or BigNumbers");return C(M,D)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object":function(M,D){if(Object.keys(M).length===2&&Object.keys(D).length===3){if(!u(M))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!m(D))throw new TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if("pointX"in M&&"pointY"in M&&"xCoeffLine"in D&&"yCoeffLine"in D&&"constant"in D)return x(M.pointX,M.pointY,D.xCoeffLine,D.yCoeffLine,D.constant);throw new TypeError("Key names do not match")}else if(Object.keys(M).length===3&&Object.keys(D).length===6){if(!m(M))throw new TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!h(D))throw new TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if("pointX"in M&&"pointY"in M&&"x0"in D&&"y0"in D&&"z0"in D&&"a"in D&&"b"in D&&"c"in D)return w(M.pointX,M.pointY,M.pointZ,D.x0,D.y0,D.z0,D.a,D.b,D.c);throw new TypeError("Key names do not match")}else if(Object.keys(M).length===2&&Object.keys(D).length===2){if(!u(M))throw new TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!u(D))throw new TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if("pointOneX"in M&&"pointOneY"in M&&"pointTwoX"in D&&"pointTwoY"in D)return C([M.pointOneX,M.pointOneY],[D.pointTwoX,D.pointTwoY]);throw new TypeError("Key names do not match")}else if(Object.keys(M).length===3&&Object.keys(D).length===3){if(!m(M))throw new TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!m(D))throw new TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if("pointOneX"in M&&"pointOneY"in M&&"pointOneZ"in M&&"pointTwoX"in D&&"pointTwoY"in D&&"pointTwoZ"in D)return C([M.pointOneX,M.pointOneY,M.pointOneZ],[D.pointTwoX,D.pointTwoY,D.pointTwoZ]);throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},Array:function(M){if(!v(M))throw new TypeError("Incorrect array format entered for pairwise distance calculation");return b(M)}});function o(A){return typeof A=="number"||rr(A)}function u(A){return A.constructor!==Array&&(A=y(A)),o(A[0])&&o(A[1])}function m(A){return A.constructor!==Array&&(A=y(A)),o(A[0])&&o(A[1])&&o(A[2])}function d(A){return Array.isArray(A)||(A=y(A)),A.every(o)}function h(A){return A.constructor!==Array&&(A=y(A)),o(A[0])&&o(A[1])&&o(A[2])&&o(A[3])&&o(A[4])&&o(A[5])}function y(A){for(var M=Object.keys(A),D=[],O=0;OM.length!==2||!o(M[0])||!o(M[1])))return!1}else if(A[0].length===3&&o(A[0][0])&&o(A[0][1])&&o(A[0][2])){if(A.some(M=>M.length!==3||!o(M[0])||!o(M[1])||!o(M[2])))return!1}else return!1;return!0}function x(A,M,D,O,_){var E=c(t(t(n(D,A),n(O,M)),_)),T=l(t(n(D,D),n(O,O)));return i(E,T)}function w(A,M,D,O,_,E,T,R,L){var H=[a(n(a(_,M),L),n(a(E,D),R)),a(n(a(E,D),T),n(a(O,A),L)),a(n(a(O,A),R),n(a(_,M),T))];H=l(t(t(n(H[0],H[0]),n(H[1],H[1])),n(H[2],H[2])));var G=l(t(t(n(T,T),n(R,R)),n(L,L)));return i(H,G)}function C(A,M){for(var D=A.length,O=0,_=0,E=0;E{var{typed:r,config:t,abs:a,add:n,addScalar:i,matrix:s,multiply:l,multiplyScalar:c,divideScalar:o,subtract:u,smaller:m,equalScalar:d,flatten:h,isZero:y,isNumeric:v}=e;return r("intersect",{"Array, Array, Array":x,"Array, Array, Array, Array":w,"Matrix, Matrix, Matrix":function(R,L,H){var G=x(R.valueOf(),L.valueOf(),H.valueOf());return G===null?null:s(G)},"Matrix, Matrix, Matrix, Matrix":function(R,L,H,G){var W=w(R.valueOf(),L.valueOf(),H.valueOf(),G.valueOf());return W===null?null:s(W)}});function x(T,R,L){if(T=C(T),R=C(R),L=C(L),!A(T))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!A(R))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!M(L))throw new TypeError("Array with 4 numbers expected as third argument");return E(T[0],T[1],T[2],R[0],R[1],R[2],L[0],L[1],L[2],L[3])}function w(T,R,L,H){if(T=C(T),R=C(R),L=C(L),H=C(H),T.length===2){if(!b(T))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!b(R))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!b(L))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(!b(H))throw new TypeError("Array with 2 numbers or BigNumbers expected for fourth argument");return D(T,R,L,H)}else if(T.length===3){if(!A(T))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!A(R))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!A(L))throw new TypeError("Array with 3 numbers or BigNumbers expected for third argument");if(!A(H))throw new TypeError("Array with 3 numbers or BigNumbers expected for fourth argument");return _(T[0],T[1],T[2],R[0],R[1],R[2],L[0],L[1],L[2],H[0],H[1],H[2])}else throw new TypeError("Arrays with two or thee dimensional points expected")}function C(T){return T.length===1?T[0]:T.length>1&&Array.isArray(T[0])&&T.every(R=>Array.isArray(R)&&R.length===1)?h(T):T}function b(T){return T.length===2&&v(T[0])&&v(T[1])}function A(T){return T.length===3&&v(T[0])&&v(T[1])&&v(T[2])}function M(T){return T.length===4&&v(T[0])&&v(T[1])&&v(T[2])&&v(T[3])}function D(T,R,L,H){var G=T,W=L,q=u(G,R),k=u(W,H),K=u(c(q[0],k[1]),c(k[0],q[1]));if(y(K)||m(a(K),t.epsilon))return null;var z=c(k[0],G[1]),oe=c(k[1],G[0]),pe=c(k[0],W[1]),ae=c(k[1],W[0]),$=o(i(u(u(z,oe),pe),ae),K);return n(l(q,$),G)}function O(T,R,L,H,G,W,q,k,K,z,oe,pe){var ae=c(u(T,R),u(L,H)),$=c(u(G,W),u(q,k)),le=c(u(K,z),u(oe,pe));return i(i(ae,$),le)}function _(T,R,L,H,G,W,q,k,K,z,oe,pe){var ae=O(T,q,z,q,R,k,oe,k,L,K,pe,K),$=O(z,q,H,T,oe,k,G,R,pe,K,W,L),le=O(T,q,H,T,R,k,G,R,L,K,W,L),Ee=O(z,q,z,q,oe,k,oe,k,pe,K,pe,K),me=O(H,T,H,T,G,R,G,R,W,L,W,L),ge=u(c(ae,$),c(le,Ee)),Se=u(c(me,Ee),c($,$));if(y(Se))return null;var ye=o(ge,Se),be=o(i(ae,c(ye,$)),Ee),De=i(T,c(ye,u(H,T))),Ae=i(R,c(ye,u(G,R))),We=i(L,c(ye,u(W,L))),Je=i(q,c(be,u(z,q))),J=i(k,c(be,u(oe,k))),re=i(K,c(be,u(pe,K)));return d(De,Je)&&d(Ae,J)&&d(We,re)?[De,Ae,We]:null}function E(T,R,L,H,G,W,q,k,K,z){var oe=c(T,q),pe=c(H,q),ae=c(R,k),$=c(G,k),le=c(L,K),Ee=c(W,K),me=u(u(u(z,oe),ae),le),ge=u(u(u(i(i(pe,$),Ee),oe),ae),le),Se=o(me,ge),ye=i(T,c(Se,u(H,T))),be=i(R,c(Se,u(G,R))),De=i(L,c(Se,u(W,L)));return[ye,be,De]}});var yB="sum",LG=["typed","config","add","numeric"],nf=F(yB,LG,e=>{var{typed:r,config:t,add:a,numeric:n}=e;return r(yB,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":s,"...":function(c){if(Pa(c))throw new TypeError("Scalar values expected in function sum");return i(c)}});function i(l){var c;return An(l,function(o){try{c=c===void 0?o:a(c,o)}catch(u){throw Et(u,"sum",o)}}),c===void 0&&(c=n(0,t.number)),typeof c=="string"&&(c=n(c,t.number)),c}function s(l,c){try{var o=qo(l,c,a);return o}catch(u){throw Et(u,"sum")}}});var Fg="cumsum",zG=["typed","add","unaryPlus"],af=F(Fg,zG,e=>{var{typed:r,add:t,unaryPlus:a}=e;return r(Fg,{Array:n,Matrix:function(o){return o.create(n(o.valueOf()))},"Array, number | BigNumber":s,"Matrix, number | BigNumber":function(o,u){return o.create(s(o.valueOf(),u))},"...":function(o){if(Pa(o))throw new TypeError("All values expected to be scalar in function cumsum");return n(o)}});function n(c){try{return i(c)}catch(o){throw Et(o,Fg)}}function i(c){if(c.length===0)return[];for(var o=[a(c[0])],u=1;u=u.length)throw new tn(o,u.length);try{return l(c,o)}catch(m){throw Et(m,Fg)}}function l(c,o){var u,m,d;if(o<=0){var h=c[0][0];if(Array.isArray(h)){for(d=jm(c),m=[],u=0;u{var{typed:r,add:t,divide:a}=e;return r(xB,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":n,"...":function(l){if(Pa(l))throw new TypeError("Scalar values expected in function mean");return i(l)}});function n(s,l){try{var c=qo(s,l,t),o=Array.isArray(s)?ur(s):s.size();return a(c,o[l])}catch(u){throw Et(u,"mean")}}function i(s){var l,c=0;if(An(s,function(o){try{l=l===void 0?o:t(l,o),c++}catch(u){throw Et(u,"mean",o)}}),c===0)throw new Error("Cannot calculate the mean of an empty array");return a(l,c)}});var bB="median",WG=["typed","add","divide","compare","partitionSelect"],_g=F(bB,WG,e=>{var{typed:r,add:t,divide:a,compare:n,partitionSelect:i}=e;function s(o){try{o=gr(o.valueOf());var u=o.length;if(u===0)throw new Error("Cannot calculate median of an empty array");if(u%2===0){for(var m=u/2-1,d=i(o,m+1),h=o[m],y=0;y0&&(h=o[y]);return c(h,d)}else{var v=i(o,(u-1)/2);return l(v)}}catch(x){throw Et(x,"median")}}var l=r({"number | BigNumber | Complex | Unit":function(u){return u}}),c=r({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(u,m){return a(t(u,m),2)}});return r(bB,{"Array | Matrix":s,"Array | Matrix, number | BigNumber":function(u,m){throw new Error("median(A, dim) is not yet supported")},"...":function(u){if(Pa(u))throw new TypeError("Scalar values expected in function median");return s(u)}})});var wB="mad",YG=["typed","abs","map","median","subtract"],Og=F(wB,YG,e=>{var{typed:r,abs:t,map:a,median:n,subtract:i}=e;return r(wB,{"Array | Matrix":s,"...":function(c){return s(c)}});function s(l){if(l=gr(l.valueOf()),l.length===0)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var c=n(l);return n(a(l,function(o){return t(i(o,c))}))}catch(o){throw o instanceof TypeError&&o.message.indexOf("median")!==-1?new TypeError(o.message.replace("median","mad")):Et(o,"mad")}}});var MD="unbiased",DB="variance",HG=["typed","add","subtract","multiply","divide","apply","isNaN"],sf=F(DB,HG,e=>{var{typed:r,add:t,subtract:a,multiply:n,divide:i,apply:s,isNaN:l}=e;return r(DB,{"Array | Matrix":function(m){return c(m,MD)},"Array | Matrix, string":c,"Array | Matrix, number | BigNumber":function(m,d){return o(m,d,MD)},"Array | Matrix, number | BigNumber, string":o,"...":function(m){return c(m,MD)}});function c(u,m){var d,h=0;if(u.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");if(An(u,function(x){try{d=d===void 0?x:t(d,x),h++}catch(w){throw Et(w,"variance",x)}}),h===0)throw new Error("Cannot calculate variance of an empty array");var y=i(d,h);if(d=void 0,An(u,function(x){var w=a(x,y);d=d===void 0?n(w,w):t(d,n(w,w))}),l(d))return d;switch(m){case"uncorrected":return i(d,h);case"biased":return i(d,h+1);case"unbiased":{var v=rr(d)?d.mul(0):0;return h===1?v:i(d,h-1)}default:throw new Error('Unknown normalization "'+m+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function o(u,m,d){try{if(u.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");return s(u,m,h=>c(h,d))}catch(h){throw Et(h,"variance")}}});var SB="quantileSeq",$G=["typed","?bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger"],uf=F(SB,$G,e=>{var{typed:r,bignumber:t,add:a,subtract:n,divide:i,multiply:s,partitionSelect:l,compare:c,isInteger:o,smaller:u,smallerEq:m,larger:d}=e,h=Lo({typed:r,isInteger:o});return r(SB,{"Array | Matrix, number | BigNumber":(C,b)=>v(C,b,!1),"Array | Matrix, number | BigNumber, number":(C,b,A)=>y(C,b,!1,A,v),"Array | Matrix, number | BigNumber, boolean":v,"Array | Matrix, number | BigNumber, boolean, number":(C,b,A,M)=>y(C,b,A,M,v),"Array | Matrix, Array | Matrix":(C,b)=>x(C,b,!1),"Array | Matrix, Array | Matrix, number":(C,b,A)=>y(C,b,!1,A,x),"Array | Matrix, Array | Matrix, boolean":x,"Array | Matrix, Array | Matrix, boolean, number":(C,b,A,M)=>y(C,b,A,M,x)});function y(C,b,A,M,D){return h(C,M,O=>D(O,b,A))}function v(C,b,A){var M,D=C.valueOf();if(u(b,0))throw new Error("N/prob must be non-negative");if(m(b,1))return sr(b)?w(D,b,A):t(w(D,b,A));if(d(b,1)){if(!o(b))throw new Error("N must be a positive integer");if(d(b,4294967295))throw new Error("N must be less than or equal to 2^32-1, as that is the maximum length of an Array");var O=a(b,1);M=[];for(var _=0;u(_,b);_++){var E=i(_+1,O);M.push(w(D,E,A))}return sr(b)?M:t(M)}}function x(C,b,A){for(var M=C.valueOf(),D=b.valueOf(),O=[],_=0;_0&&(T=M[L])}return a(s(T,n(1,E)),s(R,E))}});var NB="std",GG=["typed","map","sqrt","variance"],ff=F(NB,GG,e=>{var{typed:r,map:t,sqrt:a,variance:n}=e;return r(NB,{"Array | Matrix":i,"Array | Matrix, string":i,"Array | Matrix, number | BigNumber":i,"Array | Matrix, number | BigNumber, string":i,"...":function(l){return i(l)}});function i(s,l){if(s.length===0)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{var c=n.apply(null,arguments);return Nt(c)?t(c,a):a(c)}catch(o){throw o instanceof TypeError&&o.message.indexOf(" variance")!==-1?new TypeError(o.message.replace(" variance"," std")):o}}});var AB="corr",VG=["typed","matrix","mean","sqrt","sum","add","subtract","multiply","pow","divide"],Bg=F(AB,VG,e=>{var{typed:r,matrix:t,sqrt:a,sum:n,add:i,subtract:s,multiply:l,pow:c,divide:o}=e;return r(AB,{"Array, Array":function(h,y){return u(h,y)},"Matrix, Matrix":function(h,y){var v=u(h.toArray(),y.toArray());return Array.isArray(v)?t(v):v}});function u(d,h){var y=[];if(Array.isArray(d[0])&&Array.isArray(h[0])){if(d.length!==h.length)throw new SyntaxError("Dimension mismatch. Array A and B must have the same length.");for(var v=0;vi(D,l(O,h[_])),0),C=n(d.map(D=>c(D,2))),b=n(h.map(D=>c(D,2))),A=s(l(y,w),l(v,x)),M=a(l(s(l(y,C),c(v,2)),s(l(y,b),c(x,2))));return o(A,M)}});var MB="combinations",ZG=["typed"],Pg=F(MB,ZG,e=>{var{typed:r}=e;return r(MB,{"number, number":Lw,"BigNumber, BigNumber":function(a,n){var i=a.constructor,s,l,c=a.minus(n),o=new i(1);if(!CB(a)||!CB(n))throw new TypeError("Positive integer value expected in function combinations");if(n.gt(a))throw new TypeError("k must be less than n in function combinations");if(s=o,n.lt(c))for(l=o;l.lte(c);l=l.plus(o))s=s.times(n.plus(l)).dividedBy(l);else for(l=o;l.lte(n);l=l.plus(o))s=s.times(c.plus(l)).dividedBy(l);return s}})});function CB(e){return e.isInteger()&&e.gte(0)}var EB="combinationsWithRep",QG=["typed"],Ig=F(EB,QG,e=>{var{typed:r}=e;return r(EB,{"number, number":function(a,n){if(!Ze(a)||a<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(!Ze(n)||n<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(a<1)throw new TypeError("k must be less than or equal to n + k - 1");if(n{var{typed:r,config:t,multiplyScalar:a,pow:n,BigNumber:i,Complex:s}=e;function l(o){if(o.im===0)return Oc(o.re);if(o.re<.5){var u=new s(1-o.re,-o.im),m=new s(Math.PI*o.re,Math.PI*o.im);return new s(Math.PI).div(m.sin()).div(l(u))}o=new s(o.re-1,o.im);for(var d=new s(Fs[0],0),h=1;h2;)d-=2,y+=d,h=h.times(y);return new i(h.toPrecision(i.precision))}});var _B="lgamma",JG=["Complex","typed"],kg=F(_B,JG,e=>{var{Complex:r,typed:t}=e,a=7,n=7,i=[-.029550653594771242,.00641025641025641,-.0019175269175269176,.0008417508417508417,-.0005952380952380953,.0007936507936507937,-.002777777777777778,.08333333333333333];return t(_B,{number:Bc,Complex:s,BigNumber:function(){throw new Error("mathjs doesn't yet provide an implementation of the algorithm lgamma for BigNumber")}});function s(o){var u=6.283185307179586,m=1.1447298858494002,d=.1;if(o.isNaN())return new r(NaN,NaN);if(o.im===0)return new r(Bc(o.re),0);if(o.re>=a||Math.abs(o.im)>=n)return l(o);if(o.re<=d){var h=uM(u,o.im)*Math.floor(.5*o.re+.25),y=o.mul(Math.PI).sin().log(),v=s(new r(1-o.re,-o.im));return new r(m,h).sub(y).sub(v)}else return o.im>=0?c(o):c(o.conjugate()).conjugate()}function l(o){for(var u=o.sub(.5).mul(o.log()).sub(o).add(Gw),m=new r(1,0).div(o),d=m.div(o),h=i[0],y=i[1],v=2*d.re,x=d.re*d.re+d.im*d.im,w=2;w<8;w++){var C=y;y=-x*h+i[w],h=v*h+C}var b=m.mul(d.mul(h).add(y));return u.add(b)}function c(o){var u=0,m=0,d=o;for(o=o.add(1);o.re<=a;){d=d.mul(o);var h=d.im<0?1:0;h!==0&&m===0&&u++,m=h,o=o.add(1)}return l(o).sub(d.log()).sub(new r(0,u*2*Math.PI*1))}});var OB="factorial",KG=["typed","gamma"],qg=F(OB,KG,e=>{var{typed:r,gamma:t}=e;return r(OB,{number:function(n){if(n<0)throw new Error("Value must be non-negative");return t(n+1)},BigNumber:function(n){if(n.isNegative())throw new Error("Value must be non-negative");return t(n.plus(1))},"Array | Matrix":r.referToSelf(a=>n=>je(n,a))})});var BB="kldivergence",jG=["typed","matrix","divide","sum","multiply","map","dotDivide","log","isNumeric"],Lg=F(BB,jG,e=>{var{typed:r,matrix:t,divide:a,sum:n,multiply:i,map:s,dotDivide:l,log:c,isNumeric:o}=e;return r(BB,{"Array, Array":function(d,h){return u(t(d),t(h))},"Matrix, Array":function(d,h){return u(d,t(h))},"Array, Matrix":function(d,h){return u(t(d),h)},"Matrix, Matrix":function(d,h){return u(d,h)}});function u(m,d){var h=d.size().length,y=m.size().length;if(h>1)throw new Error("first object must be one dimensional");if(y>1)throw new Error("second object must be one dimensional");if(h!==y)throw new Error("Length of two vectors must be equal");var v=n(m);if(v===0)throw new Error("Sum of elements in first object must be non zero");var x=n(d);if(x===0)throw new Error("Sum of elements in second object must be non zero");var w=a(m,n(m)),C=a(d,n(d)),b=n(i(w,s(l(w,C),A=>c(A))));return o(b)?b:Number.NaN}});var PB="multinomial",eV=["typed","add","divide","multiply","factorial","isInteger","isPositive"],zg=F(PB,eV,e=>{var{typed:r,add:t,divide:a,multiply:n,factorial:i,isInteger:s,isPositive:l}=e;return r(PB,{"Array | Matrix":function(o){var u=0,m=1;return An(o,function(d){if(!s(d)||!l(d))throw new TypeError("Positive integer value expected in function multinomial");u=t(u,d),m=n(m,i(d))}),a(i(u),m)}})});var IB="permutations",rV=["typed","factorial"],Ug=F(IB,rV,e=>{var{typed:r,factorial:t}=e;return r(IB,{"number | BigNumber":t,"number, number":function(n,i){if(!Ze(n)||n<0)throw new TypeError("Positive integer value expected in function permutations");if(!Ze(i)||i<0)throw new TypeError("Positive integer value expected in function permutations");if(i>n)throw new TypeError("second argument k must be less than or equal to first argument n");return va(n-i+1,n)},"BigNumber, BigNumber":function(n,i){var s,l;if(!RB(n)||!RB(i))throw new TypeError("Positive integer value expected in function permutations");if(i.gt(n))throw new TypeError("second argument k must be less than or equal to first argument n");var c=n.mul(0).add(1);for(s=c,l=n.minus(i).plus(1);l.lte(n);l=l.plus(1))s=s.times(l);return s}})});function RB(e){return e.isInteger()&&e.gte(0)}var BD=ma(jB(),1),uV=(0,BD.default)(Date.now());function no(e){var r;function t(n){r=n===null?uV:(0,BD.default)(String(n))}t(e);function a(){return r()}return a}var eP="pickRandom",fV=["typed","config","?on"],Yg=F(eP,fV,e=>{var{typed:r,config:t,on:a}=e,n=no(t.randomSeed);return a&&a("config",function(s,l){s.randomSeed!==l.randomSeed&&(n=no(s.randomSeed))}),r(eP,{"Array | Matrix":function(l){return i(l,{})},"Array | Matrix, Object":function(l,c){return i(l,c)},"Array | Matrix, number":function(l,c){return i(l,{number:c})},"Array | Matrix, Array | Matrix":function(l,c){return i(l,{weights:c})},"Array | Matrix, Array | Matrix, number":function(l,c,o){return i(l,{number:o,weights:c})},"Array | Matrix, number, Array | Matrix":function(l,c,o){return i(l,{number:c,weights:o})}});function i(s,l){var{number:c,weights:o,elementWise:u=!0}=l,m=typeof c>"u";m&&(c=1);var d=Qe(s)?s.create:Qe(o)?o.create:null;s=s.valueOf(),o&&(o=o.valueOf()),u===!0&&(s=gr(s),o=gr(o));var h=0;if(typeof o<"u"){if(o.length!==s.length)throw new Error("Weights must have the same length as possibles");for(var y=0,v=o.length;y"u")C=s[Math.floor(n()*x)];else for(var b=n()*h,A=0,M=s.length;A1)for(var a=0,n=e.shift();a{var{typed:r,config:t,on:a}=e,n=no(t.randomSeed);return a&&a("config",function(l,c){l.randomSeed!==c.randomSeed&&(n=no(l.randomSeed))}),r(rP,{"":()=>s(0,1),number:l=>s(0,l),"number, number":(l,c)=>s(l,c),"Array | Matrix":l=>i(l,0,1),"Array | Matrix, number":(l,c)=>i(l,0,c),"Array | Matrix, number, number":(l,c,o)=>i(l,c,o)});function i(l,c,o){var u=qc(l.valueOf(),()=>s(c,o));return Qe(l)?l.create(u):u}function s(l,c){return l+n()*(c-l)}});var tP="randomInt",lV=["typed","config","?on"],$g=F(tP,lV,e=>{var{typed:r,config:t,on:a}=e,n=no(t.randomSeed);return a&&a("config",function(l,c){l.randomSeed!==c.randomSeed&&(n=no(l.randomSeed))}),r(tP,{"":()=>s(0,1),number:l=>s(0,l),"number, number":(l,c)=>s(l,c),"Array | Matrix":l=>i(l,0,1),"Array | Matrix, number":(l,c)=>i(l,0,c),"Array | Matrix, number, number":(l,c,o)=>i(l,c,o)});function i(l,c,o){var u=qc(l.valueOf(),()=>s(c,o));return Qe(l)?l.create(u):u}function s(l,c){return Math.floor(l+n()*(c-l))}});var nP="stirlingS2",mV=["typed","addScalar","subtractScalar","multiplyScalar","divideScalar","pow","factorial","combinations","isNegative","isInteger","number","?bignumber","larger"],Gg=F(nP,mV,e=>{var{typed:r,addScalar:t,subtractScalar:a,multiplyScalar:n,divideScalar:i,pow:s,factorial:l,combinations:c,isNegative:o,isInteger:u,number:m,bignumber:d,larger:h}=e,y=[],v=[];return r(nP,{"number | BigNumber, number | BigNumber":function(w,C){if(!u(w)||o(w)||!u(C)||o(C))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(h(C,w))throw new TypeError("k must be less than or equal to n in function stirlingS2");var b=!(sr(w)&&sr(C)),A=b?v:y,M=b?d:m,D=m(w),O=m(C);if(A[D]&&A[D].length>O)return A[D][O];for(var _=0;_<=D;++_)if(A[_]||(A[_]=[M(_===0?1:0)]),_!==0)for(var E=A[_],T=A[_-1],R=E.length;R<=_&&R<=O;++R)R===_?E[R]=1:E[R]=t(n(M(R),T[R]),T[R-1]);return A[D][O]}})});var aP="bellNumbers",pV=["typed","addScalar","isNegative","isInteger","stirlingS2"],Vg=F(aP,pV,e=>{var{typed:r,addScalar:t,isNegative:a,isInteger:n,stirlingS2:i}=e;return r(aP,{"number | BigNumber":function(l){if(!n(l)||a(l))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var c=0,o=0;o<=l;o++)c=t(c,i(l,o));return c}})});var iP="catalan",dV=["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],Zg=F(iP,dV,e=>{var{typed:r,addScalar:t,divideScalar:a,multiplyScalar:n,combinations:i,isNegative:s,isInteger:l}=e;return r(iP,{"number | BigNumber":function(o){if(!l(o)||s(o))throw new TypeError("Non-negative integer value expected in function catalan");return a(i(n(o,2),o),t(o,1))}})});var oP="composition",hV=["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],Qg=F(oP,hV,e=>{var{typed:r,addScalar:t,combinations:a,isPositive:n,isNegative:i,isInteger:s,larger:l}=e;return r(oP,{"number | BigNumber, number | BigNumber":function(o,u){if(!s(o)||!n(o)||!s(u)||!n(u))throw new TypeError("Positive integer value expected in function composition");if(l(u,o))throw new TypeError("k must be less than or equal to n in function composition");return a(t(o,-1),t(u,-1))}})});var sP="leafCount",vV=["parse","typed"],Xg=F(sP,vV,e=>{var{parse:r,typed:t}=e;function a(n){var i=0;return n.forEach(s=>{i+=a(s)}),i||1}return t(sP,{Node:function(i){return a(i)}})});function PD(e){return xr(e)||ct(e)&&e.isUnary()&&xr(e.args[0])}function Lc(e){return!!(xr(e)||(yn(e)||ct(e))&&e.args.every(Lc)||en(e)&&Lc(e.content))}function uP(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ID(e){for(var r=1;r{var{FunctionNode:r,OperatorNode:t,SymbolNode:a}=e,n=!0,i=!1,s="defaultF",l={add:{trivial:n,total:n,commutative:n,associative:n},unaryPlus:{trivial:n,total:n,commutative:n,associative:n},subtract:{trivial:i,total:n,commutative:i,associative:i},multiply:{trivial:n,total:n,commutative:n,associative:n},divide:{trivial:i,total:n,commutative:i,associative:i},paren:{trivial:n,total:n,commutative:n,associative:i},defaultF:{trivial:i,total:n,commutative:i,associative:i}},c={divide:{total:i},log:{total:i}},o={subtract:{total:i},abs:{trivial:n},log:{total:n}};function u(b,A){var M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:l,D=s;if(typeof b=="string"?D=b:ct(b)?D=b.fn.toString():yn(b)?D=b.name:en(b)&&(D="paren"),Xe(M,D)){var O=M[D];if(Xe(O,A))return O[A];if(Xe(l,D))return l[D][A]}if(Xe(M,s)){var _=M[s];return Xe(_,A)?_[A]:l[s][A]}if(Xe(l,D)){var E=l[D];if(Xe(E,A))return E[A]}return l[s][A]}function m(b){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;return u(b,"commutative",A)}function d(b){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;return u(b,"associative",A)}function h(b,A){var M=ID({},b);for(var D in A)Xe(b,D)?M[D]=ID(ID({},A[D]),b[D]):M[D]=A[D];return M}function y(b,A){if(!b.args||b.args.length===0)return b;b.args=v(b,A);for(var M=0;M2&&d(b,A)){for(var _=b.args.pop();b.args.length>0;)_=M([b.args.pop(),_]);b.args=_.args}}}function w(b,A){if(!(!b.args||b.args.length===0)){for(var M=C(b),D=b.args.length,O=0;O2&&d(b,A)){for(var _=b.args.shift();b.args.length>0;)_=M([_,b.args.shift()]);b.args=_.args}}}function C(b){return ct(b)?function(A){try{return new t(b.op,b.fn,A,b.implicit)}catch(M){return console.error(M),[]}}:function(A){return new r(new a(b.name),A)}}return{createMakeNodeFunction:C,hasProperty:u,isCommutative:m,isAssociative:d,mergeContext:h,flatten:y,allChildren:v,unflattenr:x,unflattenl:w,defaultContext:l,realContext:c,positiveContext:o}});var xV="simplify",bV=["config","typed","parse","add","subtract","multiply","divide","pow","isZero","equal","resolve","simplifyConstant","simplifyCore","?fraction","?bignumber","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],Jg=F(xV,bV,e=>{var{config:r,typed:t,parse:a,add:n,subtract:i,multiply:s,divide:l,pow:c,isZero:o,equal:u,resolve:m,simplifyConstant:d,simplifyCore:h,fraction:y,bignumber:v,mathWithTransform:x,matrix:w,AccessorNode:C,ArrayNode:b,ConstantNode:A,FunctionNode:M,IndexNode:D,ObjectNode:O,OperatorNode:_,ParenthesisNode:E,SymbolNode:T}=e,{hasProperty:R,isCommutative:L,isAssociative:H,mergeContext:G,flatten:W,unflattenr:q,unflattenl:k,createMakeNodeFunction:K,defaultContext:z,realContext:oe,positiveContext:pe}=cf({FunctionNode:M,OperatorNode:_,SymbolNode:T});t.addConversion({from:"Object",to:"Map",convert:ji});var ae=t("simplify",{Node:ye,"Node, Map":(j,ne)=>ye(j,!1,ne),"Node, Map, Object":(j,ne,ue)=>ye(j,!1,ne,ue),"Node, Array":ye,"Node, Array, Map":ye,"Node, Array, Map, Object":ye});t.removeConversion({from:"Object",to:"Map",convert:ji}),ae.defaultContext=z,ae.realContext=oe,ae.positiveContext=pe;function $(j){return j.transform(function(ne,ue,Me){return en(ne)?$(ne.content):ne})}var le={true:!0,false:!0,e:!0,i:!0,Infinity:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,NaN:!0,phi:!0,pi:!0,SQRT1_2:!0,SQRT2:!0,tau:!0};ae.rules=[h,{l:"log(e)",r:"1"},{s:"n-n1 -> n+-n1",assuming:{subtract:{total:!0}}},{s:"n-n -> 0",assuming:{subtract:{total:!1}}},{s:"-(cl*v) -> v * (-cl)",assuming:{multiply:{commutative:!0},subtract:{total:!0}}},{s:"-(cl*v) -> (-cl) * v",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{s:"-(v*cl) -> v * (-cl)",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{l:"-(n1/n2)",r:"-n1/n2"},{l:"-v",r:"v * (-1)"},{l:"(n1 + n2)*(-1)",r:"n1*(-1) + n2*(-1)",repeat:!0},{l:"n/n1^n2",r:"n*n1^-n2"},{l:"n/n1",r:"n*n1^-1"},{s:"(n1*n2)^n3 -> n1^n3 * n2^n3",assuming:{multiply:{commutative:!0}}},{s:"(n1*n2)^(-1) -> n2^(-1) * n1^(-1)",assuming:{multiply:{commutative:!1}}},{s:"(n ^ n1) ^ n2 -> n ^ (n1 * n2)",assuming:{divide:{total:!0}}},{l:" vd * ( vd * n1 + n2)",r:"vd^2 * n1 + vd * n2"},{s:" vd * (vd^n4 * n1 + n2) -> vd^(1+n4) * n1 + vd * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * ( vd * n1 + n2) -> vd^(n3+1) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * (vd^n4 * n1 + n2) -> vd^(n3+n4) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{l:"n*n",r:"n^2"},{s:"n * n^n1 -> n^(n1+1)",assuming:{divide:{total:!0}}},{s:"n^n1 * n^n2 -> n^(n1+n2)",assuming:{divide:{total:!0}}},d,{s:"n+n -> 2*n",assuming:{add:{total:!0}}},{l:"n+-n",r:"0"},{l:"vd*n + vd",r:"vd*(n+1)"},{l:"n3*n1 + n3*n2",r:"n3*(n1+n2)"},{l:"n3^(-n4)*n1 + n3 * n2",r:"n3^(-n4)*(n1 + n3^(n4+1) *n2)"},{l:"n3^(-n4)*n1 + n3^n5 * n2",r:"n3^(-n4)*(n1 + n3^(n4+n5)*n2)"},{s:"n*vd + vd -> (n+1)*vd",assuming:{multiply:{commutative:!1}}},{s:"vd + n*vd -> (1+n)*vd",assuming:{multiply:{commutative:!1}}},{s:"n1*n3 + n2*n3 -> (n1+n2)*n3",assuming:{multiply:{commutative:!1}}},{s:"n^n1 * n -> n^(n1+1)",assuming:{divide:{total:!0},multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3 -> (n1 + n2*n3^(n4 + 1))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3^n5 -> (n1 + n2*n3^(n4 + n5))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{l:"n*cd + cd",r:"(n+1)*cd"},{s:"cd*n + cd -> cd*(n+1)",assuming:{multiply:{commutative:!1}}},{s:"cd + cd*n -> cd*(1+n)",assuming:{multiply:{commutative:!1}}},d,{s:"(-n)*n1 -> -(n*n1)",assuming:{subtract:{total:!0}}},{s:"n1*(-n) -> -(n1*n)",assuming:{subtract:{total:!0},multiply:{commutative:!1}}},{s:"ce+ve -> ve+ce",assuming:{add:{commutative:!0}},imposeContext:{add:{commutative:!1}}},{s:"vd*cd -> cd*vd",assuming:{multiply:{commutative:!0}},imposeContext:{multiply:{commutative:!1}}},{l:"n+-n1",r:"n-n1"},{l:"n+-(n1)",r:"n-(n1)"},{s:"n*(n1^-1) -> n/n1",assuming:{multiply:{commutative:!0}}},{s:"n*n1^-n2 -> n/n1^n2",assuming:{multiply:{commutative:!0}}},{s:"n^-1 -> 1/n",assuming:{multiply:{commutative:!0}}},{l:"n^1",r:"n"},{s:"n*(n1/n2) -> (n*n1)/n2",assuming:{multiply:{associative:!0}}},{s:"n-(n1+n2) -> n-n1-n2",assuming:{addition:{associative:!0,commutative:!0}}},{l:"1*n",r:"n",imposeContext:{multiply:{commutative:!0}}},{s:"n1/(n2/n3) -> (n1*n3)/n2",assuming:{multiply:{associative:!0}}},{l:"n1/(-n2)",r:"-n1/n2"}];function Ee(j,ne){var ue={};if(j.s){var Me=j.s.split("->");if(Me.length===2)ue.l=Me[0],ue.r=Me[1];else throw SyntaxError("Could not parse rule: "+j.s)}else ue.l=j.l,ue.r=j.r;ue.l=$(a(ue.l)),ue.r=$(a(ue.r));for(var Ce of["imposeContext","repeat","assuming"])Ce in j&&(ue[Ce]=j[Ce]);if(j.evaluate&&(ue.evaluate=a(j.evaluate)),H(ue.l,ne)){var Le=!L(ue.l,ne),Ie;Le&&(Ie=Se());var fr=K(ue.l),or=Se();ue.expanded={},ue.expanded.l=fr([ue.l,or]),W(ue.expanded.l,ne),q(ue.expanded.l,ne),ue.expanded.r=fr([ue.r,or]),Le&&(ue.expandedNC1={},ue.expandedNC1.l=fr([Ie,ue.l]),ue.expandedNC1.r=fr([Ie,ue.r]),ue.expandedNC2={},ue.expandedNC2.l=fr([Ie,ue.expanded.l]),ue.expandedNC2.r=fr([Ie,ue.expanded.r]))}return ue}function me(j,ne){for(var ue=[],Me=0;Me2&&arguments[2]!==void 0?arguments[2]:Bo(),Me=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},Ce=Me.consoleDebug;ne=me(ne||ae.rules,Me.context);var Le=m(j,ue);Le=$(Le);for(var Ie={},fr=Le.toString({parenthesis:"all"});!Ie[fr];){Ie[fr]=!0,ge=0;var or=fr;Ce&&console.log("Working on: ",fr);for(var Ke=0;Ke ").concat(ne[Ke].r.toString()))),Ce){var ee=Le.toString({parenthesis:"all"});ee!==or&&(console.log("Applying",Br,"produced",ee),or=ee)}k(Le,Me.context)}fr=Le.toString({parenthesis:"all"})}return Le}function be(j,ne,ue){var Me=j;if(j)for(var Ce=0;Ce1&&(or=Le(j.args.slice(0,fr))),Ce=j.args.slice(fr),Me=Ce.length===1?Ce[0]:Le(Ce),ue.push(Le([or,Me]))}return ue}function We(j,ne){var ue={placeholders:{}};if(!j.placeholders&&!ne.placeholders)return ue;if(j.placeholders){if(!ne.placeholders)return j}else return ne;for(var Me in j.placeholders)if(Xe(j.placeholders,Me)&&(ue.placeholders[Me]=j.placeholders[Me],Xe(ne.placeholders,Me)&&!xe(j.placeholders[Me],ne.placeholders[Me])))return null;for(var Ce in ne.placeholders)Xe(ne.placeholders,Ce)&&(ue.placeholders[Ce]=ne.placeholders[Ce]);return ue}function Je(j,ne){var ue=[];if(j.length===0||ne.length===0)return ue;for(var Me,Ce=0;Ce2)throw new Error("permuting >2 commutative non-associative rule arguments not yet implemented");var or=re(j.args[0],ne.args[1],ue);if(or.length===0)return[];var Ke=re(j.args[1],ne.args[0],ue);if(Ke.length===0)return[];Le=[or,Ke]}Ce=J(Le)}else if(ne.args.length>=2&&j.args.length===2){for(var Br=Ae(ne,ue),ee=[],ce=0;ce2)throw Error("Unexpected non-binary associative function: "+j.toString());return[]}}else if(j instanceof T){if(j.name.length===0)throw new Error("Symbol in rule has 0 length...!?");if(le[j.name]){if(j.name!==ne.name)return[]}else switch(j.name[1]>="a"&&j.name[1]<="z"?j.name.substring(0,2):j.name[0]){case"n":case"_p":Ce[0].placeholders[j.name]=ne;break;case"c":case"cl":if(xr(ne))Ce[0].placeholders[j.name]=ne;else return[];break;case"v":if(!xr(ne))Ce[0].placeholders[j.name]=ne;else return[];break;case"vl":if(at(ne))Ce[0].placeholders[j.name]=ne;else return[];break;case"cd":if(PD(ne))Ce[0].placeholders[j.name]=ne;else return[];break;case"vd":if(!PD(ne))Ce[0].placeholders[j.name]=ne;else return[];break;case"ce":if(Lc(ne))Ce[0].placeholders[j.name]=ne;else return[];break;case"ve":if(!Lc(ne))Ce[0].placeholders[j.name]=ne;else return[];break;default:throw new Error("Invalid symbol in rule: "+j.name)}}else if(j instanceof A){if(!u(j.value,ne.value))return[]}else return[];return Ce}function xe(j,ne){if(j instanceof A&&ne instanceof A){if(!u(j.value,ne.value))return!1}else if(j instanceof T&&ne instanceof T){if(j.name!==ne.name)return!1}else if(j instanceof _&&ne instanceof _||j instanceof M&&ne instanceof M){if(j instanceof _){if(j.op!==ne.op||j.fn!==ne.fn)return!1}else if(j instanceof M&&j.name!==ne.name)return!1;if(j.args.length!==ne.args.length)return!1;for(var ue=0;ue{var{typed:r,config:t,mathWithTransform:a,matrix:n,fraction:i,bignumber:s,AccessorNode:l,ArrayNode:c,ConstantNode:o,FunctionNode:u,IndexNode:m,ObjectNode:d,OperatorNode:h,SymbolNode:y}=e,{isCommutative:v,isAssociative:x,allChildren:w,createMakeNodeFunction:C}=cf({FunctionNode:u,OperatorNode:h,SymbolNode:y}),b=r("simplifyConstant",{Node:W=>O(G(W,{})),"Node, Object":function(q,k){return O(G(q,k))}});function A(W){return da(W)?W.valueOf():W instanceof Array?W.map(A):Qe(W)?n(A(W.valueOf())):W}function M(W,q,k){try{return a[W].apply(null,q)}catch{return q=q.map(A),E(a[W].apply(null,q),k)}}var D=r({Fraction:R,number:function(q){return q<0?T(new o(-q)):new o(q)},BigNumber:function(q){return q<0?T(new o(-q)):new o(q)},Complex:function(q){throw new Error("Cannot convert Complex number to Node")},string:function(q){return new o(q)},Matrix:function(q){return new c(q.valueOf().map(k=>D(k)))}});function O(W){return Nr(W)?W:D(W)}function _(W,q){var k=q&&q.exactFractions!==!1;if(k&&isFinite(W)&&i){var K=i(W),z=q&&typeof q.fractionsLimit=="number"?q.fractionsLimit:1/0;if(K.valueOf()===W&&K.n0;)if(xr(K[0])&&typeof K[0].value!="string"){var z=E(K.shift().value,k);jt(W)?W=W.items[z-1]:(W=W.valueOf()[z-1],W instanceof Array&&(W=n(W)))}else if(K.length>1&&xr(K[1])&&typeof K[1].value!="string"){var oe=E(K[1].value,k),pe=[],ae=jt(W)?W.items:W.valueOf();for(var $ of ae)if(jt($))pe.push($.items[oe-1]);else if(Qe(W))pe.push($[oe-1]);else break;if(pe.length===ae.length)jt(W)?W=new c(pe):W=n(pe),K.splice(1,1);else break}else break;return K.length===q.dimensions.length?new l(O(W),q):K.length>0?(q=new m(K),new l(O(W),q)):W}if(Ei(W)&&q.dimensions.length===1&&xr(q.dimensions[0])){var le=q.dimensions[0].value;return le in W.properties?W.properties[le]:new o}return new l(O(W),q)}function H(W,q,k,K){var z=q.shift(),oe=q.reduce((pe,ae)=>{if(!Nr(ae)){var $=pe.pop();if(Nr($))return[$,ae];try{return pe.push(M(W,[$,ae],K)),pe}catch{pe.push($)}}pe.push(O(pe.pop()));var le=pe.length===1?pe[0]:k(pe);return[k([le,O(ae)])]},[z]);return oe.length===1?oe[0]:k([oe[0],D(oe[1])])}function G(W,q){switch(W.type){case"SymbolNode":return W;case"ConstantNode":switch(typeof W.value){case"number":return E(W.value,q);case"string":return W.value;default:if(!isNaN(W.value))return E(W.value,q)}return W;case"FunctionNode":if(a[W.name]&&a[W.name].rawArgs)return W;{var k=["add","multiply"];if(k.indexOf(W.name)===-1){var K=W.args.map(De=>G(De,q));if(!K.some(Nr))try{return M(W.name,K,q)}catch{}if(W.name==="size"&&K.length===1&&jt(K[0])){for(var z=[],oe=K[0];jt(oe);)z.push(oe.items.length),oe=oe.items[0];return n(z)}return new u(W.name,K.map(O))}}case"OperatorNode":{var pe=W.fn.toString(),ae,$,le=C(W);if(ct(W)&&W.isUnary())ae=[G(W.args[0],q)],Nr(ae[0])?$=le(ae):$=M(pe,ae,q);else if(x(W,q.context))if(ae=w(W,q.context),ae=ae.map(De=>G(De,q)),v(pe,q.context)){for(var Ee=[],me=[],ge=0;ge1?($=H(pe,Ee,le,q),me.unshift($),$=H(pe,me,le,q)):$=H(pe,ae,le,q)}else $=H(pe,ae,le,q);else ae=W.args.map(De=>G(De,q)),$=H(pe,ae,le,q);return $}case"ParenthesisNode":return G(W.content,q);case"AccessorNode":return L(G(W.object,q),G(W.index,q),q);case"ArrayNode":{var Se=W.items.map(De=>G(De,q));return Se.some(Nr)?new c(Se.map(O)):n(Se)}case"IndexNode":return new m(W.dimensions.map(De=>b(De,q)));case"ObjectNode":{var ye={};for(var be in W.properties)ye[be]=b(W.properties[be],q);return new d(ye)}case"AssignmentNode":case"BlockNode":case"FunctionAssignmentNode":case"RangeNode":case"ConditionalNode":default:throw new Error("Unimplemented node type in simplifyConstant: ".concat(W.type))}}return b});var fP="simplifyCore",SV=["typed","parse","equal","isZero","add","subtract","multiply","divide","pow","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],jg=F(fP,SV,e=>{var{typed:r,parse:t,equal:a,isZero:n,add:i,subtract:s,multiply:l,divide:c,pow:o,AccessorNode:u,ArrayNode:m,ConstantNode:d,FunctionNode:h,IndexNode:y,ObjectNode:v,OperatorNode:x,ParenthesisNode:w,SymbolNode:C}=e,b=new d(0),A=new d(1),M=new d(!0),D=new d(!1);function O(R){return ct(R)&&["and","not","or"].includes(R.op)}var{hasProperty:_,isCommutative:E}=cf({FunctionNode:h,OperatorNode:x,SymbolNode:C});function T(R){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H=L?L.context:void 0;if(_(R,"trivial",H)){if(yn(R)&&R.args.length===1)return T(R.args[0],L);var G=!1,W=0;if(R.forEach(me=>{++W,W===1&&(G=T(me,L))}),W===1)return G}var q=R;if(yn(q)){var k=oT(q.name);if(k){if(q.args.length>2&&_(q,"associative",H))for(;q.args.length>2;){var K=q.args.pop(),z=q.args.pop();q.args.push(new x(k,q.name,[K,z]))}q=new x(k,q.name,q.args)}else return new h(T(q.fn),q.args.map(me=>T(me,L)))}if(ct(q)&&q.isUnary()){var oe=T(q.args[0],L);if(q.op==="~"&&ct(oe)&&oe.isUnary()&&oe.op==="~"||q.op==="not"&&ct(oe)&&oe.isUnary()&&oe.op==="not"&&O(oe.args[0]))return oe.args[0];var pe=!0;if(q.op==="-"&&ct(oe)&&(oe.isBinary()&&oe.fn==="subtract"&&(q=new x("-","subtract",[oe.args[1],oe.args[0]]),pe=!1),oe.isUnary()&&oe.op==="-"))return oe.args[0];if(pe)return new x(q.op,q.fn,[oe])}if(ct(q)&&q.isBinary()){var ae=T(q.args[0],L),$=T(q.args[1],L);if(q.op==="+"){if(xr(ae)&&n(ae.value))return $;if(xr($)&&n($.value))return ae;ct($)&&$.isUnary()&&$.op==="-"&&($=$.args[0],q=new x("-","subtract",[ae,$]))}if(q.op==="-")return ct($)&&$.isUnary()&&$.op==="-"?T(new x("+","add",[ae,$.args[0]]),L):xr(ae)&&n(ae.value)?T(new x("-","unaryMinus",[$])):xr($)&&n($.value)?ae:new x(q.op,q.fn,[ae,$]);if(q.op==="*"){if(xr(ae)){if(n(ae.value))return b;if(a(ae.value,1))return $}if(xr($)){if(n($.value))return b;if(a($.value,1))return ae;if(E(q,H))return new x(q.op,q.fn,[$,ae],q.implicit)}return new x(q.op,q.fn,[ae,$],q.implicit)}if(q.op==="/")return xr(ae)&&n(ae.value)?b:xr($)&&a($.value,1)?ae:new x(q.op,q.fn,[ae,$]);if(q.op==="^"&&xr($)){if(n($.value))return A;if(a($.value,1))return ae}if(q.op==="and"){if(xr(ae))if(ae.value){if(O($))return $;if(xr($))return $.value?M:D}else return D;if(xr($))if($.value){if(O(ae))return ae}else return D}if(q.op==="or"){if(xr(ae)){if(ae.value)return M;if(O($))return $}if(xr($)){if($.value)return M;if(O(ae))return ae}}return new x(q.op,q.fn,[ae,$])}if(ct(q))return new x(q.op,q.fn,q.args.map(me=>T(me,L)));if(jt(q))return new m(q.items.map(me=>T(me,L)));if(zn(q))return new u(T(q.object,L),T(q.index,L));if(Jn(q))return new y(q.dimensions.map(me=>T(me,L)));if(Ei(q)){var le={};for(var Ee in q.properties)le[Ee]=T(q.properties[Ee],L);return new v(le)}return q}return r(fP,{Node:T,"Node,Object":T})});var NV="resolve",AV=["typed","parse","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode"],e0=F(NV,AV,e=>{var{typed:r,parse:t,ConstantNode:a,FunctionNode:n,OperatorNode:i,ParenthesisNode:s}=e;function l(c,o){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Set;if(!o)return c;if(at(c)){if(u.has(c.name)){var m=Array.from(u).join(", ");throw new ReferenceError("recursive loop of variable definitions among {".concat(m,"}"))}var d=o.get(c.name);if(Nr(d)){var h=new Set(u);return h.add(c.name),l(d,o,h)}else return typeof d=="number"?t(String(d)):d!==void 0?new a(d):c}else if(ct(c)){var y=c.args.map(function(x){return l(x,o,u)});return new i(c.op,c.fn,y,c.implicit)}else{if(en(c))return new s(l(c.content,o,u));if(yn(c)){var v=c.args.map(function(x){return l(x,o,u)});return new n(c.name,v)}}return c.map(x=>l(x,o,u))}return r("resolve",{Node:l,"Node, Map | null | undefined":l,"Node, Object":(c,o)=>l(c,ji(o)),"Array | Matrix":r.referToSelf(c=>o=>o.map(u=>c(u))),"Array | Matrix, null | undefined":r.referToSelf(c=>o=>o.map(u=>c(u))),"Array, Object":r.referTo("Array,Map",c=>(o,u)=>c(o,ji(u))),"Matrix, Object":r.referTo("Matrix,Map",c=>(o,u)=>c(o,ji(u))),"Array | Matrix, Map":r.referToSelf(c=>(o,u)=>o.map(m=>c(m,u)))})});var cP="symbolicEqual",MV=["parse","simplify","typed","OperatorNode"],r0=F(cP,MV,e=>{var{parse:r,simplify:t,typed:a,OperatorNode:n}=e;function i(s,l){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=new n("-","subtract",[s,l]),u=t(o,{},c);return xr(u)&&!u.value}return a(cP,{"Node, Node":i,"Node, Node, Object":i})});var lP="derivative",CV=["typed","config","parse","simplify","equal","isZero","numeric","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],t0=F(lP,CV,e=>{var{typed:r,config:t,parse:a,simplify:n,equal:i,isZero:s,numeric:l,ConstantNode:c,FunctionNode:o,OperatorNode:u,ParenthesisNode:m,SymbolNode:d}=e;function h(b,A){var M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{simplify:!0},D={};x(D,b,A.name);var O=w(b,D);return M.simplify?n(O):O}r.addConversion({from:"identifier",to:"SymbolNode",convert:a});var y=r(lP,{"Node, SymbolNode":h,"Node, SymbolNode, Object":h});r.removeConversion({from:"identifier",to:"SymbolNode",convert:a}),y._simplify=!0,y.toTex=function(b){return v.apply(null,b.args)};var v=r("_derivTex",{"Node, SymbolNode":function(A,M){return xr(A)&&Tr(A.value)==="string"?v(a(A.value).toString(),M.toString(),1):v(A.toTex(),M.toString(),1)},"Node, ConstantNode":function(A,M){if(Tr(M.value)==="string")return v(A,a(M.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(A,M,D){return v(A.toString(),M.name,D.value)},"string, string, number":function(A,M,D){var O;return D===1?O="{d\\\\over d"+M+"}":O="{d^{"+D+"}\\\\over d"+M+"^{"+D+"}}",O+"\\\\left[".concat(A,"\\\\right]")}}),x=r("constTag",{"Object, ConstantNode, string":function(A,M){return A[M]=!0,!0},"Object, SymbolNode, string":function(A,M,D){return M.name!==D?(A[M]=!0,!0):!1},"Object, ParenthesisNode, string":function(A,M,D){return x(A,M.content,D)},"Object, FunctionAssignmentNode, string":function(A,M,D){return M.params.indexOf(D)===-1?(A[M]=!0,!0):x(A,M.expr,D)},"Object, FunctionNode | OperatorNode, string":function(A,M,D){if(M.args.length>0){for(var O=x(A,M.args[0],D),_=1;_0){var O=A.args.filter(function(W){return M[W]===void 0}),_=O.length===1?O[0]:new u("*","multiply",O),E=D.concat(w(_,M));return new u("*","multiply",E)}return new u("+","add",A.args.map(function(W){return new u("*","multiply",A.args.map(function(q){return q===W?w(q,M):q.clone()}))}))}if(A.op==="/"&&A.isBinary()){var T=A.args[0],R=A.args[1];return M[R]!==void 0?new u("/","divide",[w(T,M),R]):M[T]!==void 0?new u("*","multiply",[new u("-","unaryMinus",[T]),new u("/","divide",[w(R,M),new u("^","pow",[R.clone(),C(2)])])]):new u("/","divide",[new u("-","subtract",[new u("*","multiply",[w(T,M),R.clone()]),new u("*","multiply",[T.clone(),w(R,M)])]),new u("^","pow",[R.clone(),C(2)])])}if(A.op==="^"&&A.isBinary()){var L=A.args[0],H=A.args[1];if(M[L]!==void 0)return xr(L)&&(s(L.value)||i(L.value,1))?C(0):new u("*","multiply",[A,new u("*","multiply",[new o("log",[L.clone()]),w(H.clone(),M)])]);if(M[H]!==void 0){if(xr(H)){if(s(H.value))return C(0);if(i(H.value,1))return w(L,M)}var G=new u("^","pow",[L.clone(),new u("-","subtract",[H,C(1)])]);return new u("*","multiply",[H.clone(),new u("*","multiply",[w(L,M),G])])}return new u("*","multiply",[new u("^","pow",[L.clone(),H.clone()]),new u("+","add",[new u("*","multiply",[w(L,M),new u("/","divide",[H.clone(),L.clone()])]),new u("*","multiply",[w(H,M),new o("log",[L.clone()])])])])}throw new Error('Cannot process operator "'+A.op+'" in derivative: the operator is not supported, undefined, or the number of arguments passed to it are not supported')}});function C(b,A){return new c(l(b,A||t.number))}return y});var mP="rationalize",EV=["config","typed","equal","isZero","add","subtract","multiply","divide","pow","parse","simplifyConstant","simplifyCore","simplify","?bignumber","?fraction","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","SymbolNode","ParenthesisNode"],n0=F(mP,EV,e=>{var{config:r,typed:t,equal:a,isZero:n,add:i,subtract:s,multiply:l,divide:c,pow:o,parse:u,simplifyConstant:m,simplifyCore:d,simplify:h,fraction:y,bignumber:v,mathWithTransform:x,matrix:w,AccessorNode:C,ArrayNode:b,ConstantNode:A,FunctionNode:M,IndexNode:D,ObjectNode:O,OperatorNode:_,SymbolNode:E,ParenthesisNode:T}=e;function R(q){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,z=H(),oe=L(q,k,!0,z.firstRules),pe=oe.variables.length,ae={exactFractions:!1},$={exactFractions:!0};if(q=oe.expression,pe>=1){q=G(q);var le,Ee,me=!0,ge=!1;q=h(q,z.firstRules,{},ae);for(var Se;Ee=me?z.distrDivRules:z.sucDivRules,q=h(q,Ee,{},$),me=!me,Se=q.toString(),Se!==le;)ge=!0,le=Se;ge&&(q=h(q,z.firstRulesAgain,{},ae)),q=h(q,z.finalRules,{},ae)}var ye=[],be={};return q.type==="OperatorNode"&&q.isBinary()&&q.op==="/"?(pe===1&&(q.args[0]=W(q.args[0],ye),q.args[1]=W(q.args[1])),K&&(be.numerator=q.args[0],be.denominator=q.args[1])):(pe===1&&(q=W(q,ye)),K&&(be.numerator=q,be.denominator=null)),K?(be.coefficients=ye,be.variables=oe.variables,be.expression=q,be):q}return t(mP,{Node:R,"Node, boolean":(q,k)=>R(q,{},k),"Node, Object":R,"Node, Object, boolean":R});function L(q,k,K,z){var oe=[],pe=h(q,z,k,{exactFractions:!1});K=!!K;var ae="+-*"+(K?"/":"");le(pe);var $={};return $.expression=pe,$.variables=oe,$;function le(Ee){var me=Ee.type;if(me==="FunctionNode")throw new Error("There is an unsolved function call");if(me==="OperatorNode")if(Ee.op==="^"){if(Ee.args[1].type!=="ConstantNode"||!Ze(parseFloat(Ee.args[1].value)))throw new Error("There is a non-integer exponent");le(Ee.args[0])}else{if(ae.indexOf(Ee.op)===-1)throw new Error("Operator "+Ee.op+" invalid in polynomial expression");for(var ge=0;ge1;if(z==="OperatorNode"&&q.isBinary()){var pe=!1,ae;if(q.op==="^"&&(q.args[0].type==="ParenthesisNode"||q.args[0].type==="OperatorNode")&&q.args[1].type==="ConstantNode"&&(ae=parseFloat(q.args[1].value),pe=ae>=2&&Ze(ae)),pe){if(ae>2){var $=q.args[0],le=new _("^","pow",[q.args[0].cloneDeep(),new A(ae-1)]);q=new _("*","multiply",[$,le])}else q=new _("*","multiply",[q.args[0],q.args[0].cloneDeep()]);oe&&(K==="content"?k.content=q:k.args[K]=q)}}if(z==="ParenthesisNode")G(q.content,q,"content");else if(z!=="ConstantNode"&&z!=="SymbolNode")for(var Ee=0;Ee=0;$--)if(k[$]!==0){var le=new A(pe?k[$]:Math.abs(k[$])),Ee=k[$]<0?"-":"+";if($>0){var me=new E(oe);if($>1){var ge=new A($);me=new _("^","pow",[me,ge])}k[$]===-1&&pe?le=new _("-","unaryMinus",[me]):Math.abs(k[$])===1?le=me:le=new _("*","multiply",[le,me])}pe?ae=le:Ee==="+"?ae=new _("+","add",[ae,le]):ae=new _("-","subtract",[ae,le]),pe=!1}if(pe)return new A(0);return ae;function Se(ye,be,De){var Ae=ye.type;if(Ae==="FunctionNode")throw new Error("There is an unsolved function call");if(Ae==="OperatorNode"){if("+-*^".indexOf(ye.op)===-1)throw new Error("Operator "+ye.op+" invalid");if(be!==null){if((ye.fn==="unaryMinus"||ye.fn==="pow")&&be.fn!=="add"&&be.fn!=="subtract"&&be.fn!=="multiply")throw new Error("Invalid "+ye.op+" placing");if((ye.fn==="subtract"||ye.fn==="add"||ye.fn==="multiply")&&be.fn!=="add"&&be.fn!=="subtract")throw new Error("Invalid "+ye.op+" placing");if((ye.fn==="subtract"||ye.fn==="add"||ye.fn==="unaryMinus")&&De.noFil!==0)throw new Error("Invalid "+ye.op+" placing")}(ye.op==="^"||ye.op==="*")&&(De.fire=ye.op);for(var We=0;Wez&&(k[Je]=0),k[Je]+=De.cte*(De.oper==="+"?1:-1),z=Math.max(Je,z);return}De.cte=Je,De.fire===""&&(k[0]+=De.cte*(De.oper==="+"?1:-1))}else throw new Error("Type "+Ae+" is not allowed")}}});var pP="zpk2tf",TV=["typed","add","multiply","Complex","number"],a0=F(pP,TV,e=>{var{typed:r,add:t,multiply:a,Complex:n,number:i}=e;return r(pP,{"Array,Array,number":function(o,u,m){return s(o,u,m)},"Array,Array":function(o,u){return s(o,u,1)},"Matrix,Matrix,number":function(o,u,m){return s(o.valueOf(),u.valueOf(),m)},"Matrix,Matrix":function(o,u){return s(o.valueOf(),u.valueOf(),1)}});function s(c,o,u){c.some(C=>C.type==="BigNumber")&&(c=c.map(C=>i(C))),o.some(C=>C.type==="BigNumber")&&(o=o.map(C=>i(C)));for(var m=[n(1,0)],d=[n(1,0)],h=0;h=0&&m-d{var{typed:r,add:t,multiply:a,Complex:n,divide:i,matrix:s}=e;return r(dP,{"Array, Array":function(u,m){var d=c(512);return l(u,m,d)},"Array, Array, Array":function(u,m,d){return l(u,m,d)},"Array, Array, number":function(u,m,d){if(d<0)throw new Error("w must be a positive number");var h=c(d);return l(u,m,h)},"Matrix, Matrix":function(u,m){var d=c(512),{w:h,h:y}=l(u.valueOf(),m.valueOf(),d);return{w:s(h),h:s(y)}},"Matrix, Matrix, Matrix":function(u,m,d){var{h}=l(u.valueOf(),m.valueOf(),d.valueOf());return{h:s(h),w:s(d)}},"Matrix, Matrix, number":function(u,m,d){if(d<0)throw new Error("w must be a positive number");var h=c(d),{h:y}=l(u.valueOf(),m.valueOf(),h);return{h:s(y),w:s(h)}}});function l(o,u,m){for(var d=[],h=[],y=0;y{var{classes:r}=e;return function(a,n){var i=r[n&&n.mathjs];return i&&typeof i.fromJSON=="function"?i.fromJSON(n):n}});var BV="replacer",PV=[],s0=F(BV,PV,()=>function(r,t){return typeof t=="number"&&(!isFinite(t)||isNaN(t))?{mathjs:"number",value:String(t)}:t});var hP="12.4.1";var u0=F("true",[],()=>!0),f0=F("false",[],()=>!1),c0=F("null",[],()=>null),l0=ya("Infinity",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(1/0):1/0}),m0=ya("NaN",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(NaN):NaN}),p0=ya("pi",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?Rc(t):QM}),d0=ya("tau",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?gE(t):XM}),h0=ya("e",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?hE(t):JM}),v0=ya("phi",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?vE(t):KM}),g0=ya("LN2",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(2).ln():Math.LN2}),y0=ya("LN10",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(10).ln():Math.LN10}),x0=ya("LOG2E",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(1).div(new t(2).ln()):Math.LOG2E}),b0=ya("LOG10E",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(1).div(new t(10).ln()):Math.LOG10E}),w0=ya("SQRT1_2",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t("0.5").sqrt():Math.SQRT1_2}),D0=ya("SQRT2",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(2).sqrt():Math.SQRT2}),S0=ya("i",["Complex"],e=>{var{Complex:r}=e;return r.I}),vP=F("PI",["pi"],e=>{var{pi:r}=e;return r}),gP=F("E",["e"],e=>{var{e:r}=e;return r}),N0=F("version",[],()=>hP);function ya(e,r,t){return F(e,r,t,{recreateOnConfigChange:!0})}var A0=Er("speedOfLight","299792458","m s^-1"),M0=Er("gravitationConstant","6.67430e-11","m^3 kg^-1 s^-2"),C0=Er("planckConstant","6.62607015e-34","J s"),E0=Er("reducedPlanckConstant","1.0545718176461565e-34","J s"),T0=Er("magneticConstant","1.25663706212e-6","N A^-2"),F0=Er("electricConstant","8.8541878128e-12","F m^-1"),_0=Er("vacuumImpedance","376.730313667","ohm"),O0=Er("coulomb","8.987551792261171e9","N m^2 C^-2"),B0=Er("elementaryCharge","1.602176634e-19","C"),P0=Er("bohrMagneton","9.2740100783e-24","J T^-1"),I0=Er("conductanceQuantum","7.748091729863649e-5","S"),R0=Er("inverseConductanceQuantum","12906.403729652257","ohm"),k0=Er("magneticFluxQuantum","2.0678338484619295e-15","Wb"),q0=Er("nuclearMagneton","5.0507837461e-27","J T^-1"),L0=Er("klitzing","25812.807459304513","ohm");var z0=Er("bohrRadius","5.29177210903e-11","m"),U0=Er("classicalElectronRadius","2.8179403262e-15","m"),W0=Er("electronMass","9.1093837015e-31","kg"),Y0=Er("fermiCoupling","1.1663787e-5","GeV^-2"),H0=wy("fineStructure",.0072973525693),$0=Er("hartreeEnergy","4.3597447222071e-18","J"),G0=Er("protonMass","1.67262192369e-27","kg"),V0=Er("deuteronMass","3.3435830926e-27","kg"),Z0=Er("neutronMass","1.6749271613e-27","kg"),Q0=Er("quantumOfCirculation","3.6369475516e-4","m^2 s^-1"),X0=Er("rydberg","10973731.568160","m^-1"),J0=Er("thomsonCrossSection","6.6524587321e-29","m^2"),K0=wy("weakMixingAngle",.2229),j0=wy("efimovFactor",22.7),ey=Er("atomicMass","1.66053906660e-27","kg"),ry=Er("avogadro","6.02214076e23","mol^-1"),ty=Er("boltzmann","1.380649e-23","J K^-1"),ny=Er("faraday","96485.33212331001","C mol^-1"),ay=Er("firstRadiation","3.7417718521927573e-16","W m^2"),iy=Er("loschmidt","2.686780111798444e25","m^-3"),oy=Er("gasConstant","8.31446261815324","J K^-1 mol^-1"),sy=Er("molarPlanckConstant","3.990312712893431e-10","J s mol^-1"),uy=Er("molarVolume","0.022413969545014137","m^3 mol^-1"),fy=wy("sackurTetrode",-1.16487052358),cy=Er("secondRadiation","0.014387768775039337","m K"),ly=Er("stefanBoltzmann","5.67037441918443e-8","W m^-2 K^-4"),my=Er("wienDisplacement","2.897771955e-3","m K"),py=Er("molarMass","0.99999999965e-3","kg mol^-1"),dy=Er("molarMassC12","11.9999999958e-3","kg mol^-1"),hy=Er("gravity","9.80665","m s^-2"),vy=Er("planckLength","1.616255e-35","m"),gy=Er("planckMass","2.176435e-8","kg"),yy=Er("planckTime","5.391245e-44","s"),xy=Er("planckCharge","1.87554603778e-18","C"),by=Er("planckTemperature","1.416785e+32","K");function Er(e,r,t){var a=["config","Unit","BigNumber"];return F(e,a,n=>{var{config:i,Unit:s,BigNumber:l}=n,c=i.number==="BigNumber"?new l(r):parseFloat(r),o=new s(c,t);return o.fixPrefix=!0,o})}function wy(e,r){var t=["config","BigNumber"];return F(e,t,a=>{var{config:n,BigNumber:i}=a;return n.number==="BigNumber"?new i(r):r})}var IV="apply",RV=["typed","isInteger"],Dy=F(IV,RV,e=>{var{typed:r,isInteger:t}=e,a=Lo({typed:r,isInteger:t});return r("apply",{"...any":function(i){var s=i[1];sr(s)?i[1]=s-1:rr(s)&&(i[1]=s.minus(1));try{return a.apply(null,i)}catch(l){throw mt(l)}}})},{isTransformFunction:!0});var kV="column",qV=["typed","Index","matrix","range"],Sy=F(kV,qV,e=>{var{typed:r,Index:t,matrix:a,range:n}=e,i=Wu({typed:r,Index:t,matrix:a,range:n});return r("column",{"...any":function(l){var c=l.length-1,o=l[c];sr(o)&&(l[c]=o-1);try{return i.apply(null,l)}catch(u){throw mt(u)}}})},{isTransformFunction:!0});function lf(e,r,t){var a=e.filter(function(c){return at(c)&&!(c.name in r)&&!t.has(c.name)})[0];if(!a)throw new Error('No undefined variable found in inline expression "'+e+'"');var n=a.name,i=new Map,s=new Eu(t,i,new Set([n])),l=e.compile();return function(o){return i.set(n,o),l.evaluate(s)}}var LV="filter",zV=["typed"],Ny=F(LV,zV,e=>{var{typed:r}=e;function t(n,i,s){var l,c;return n[0]&&(l=n[0].compile().evaluate(s)),n[1]&&(at(n[1])||Oa(n[1])?c=n[1].compile().evaluate(s):c=lf(n[1],i,s)),a(l,c)}t.rawArgs=!0;var a=r("filter",{"Array, function":yP,"Matrix, function":function(i,s){return i.create(yP(i.toArray(),s))},"Array, RegExp":Mu,"Matrix, RegExp":function(i,s){return i.create(Mu(i.toArray(),s))}});return t},{isTransformFunction:!0});function yP(e,r){return Bm(e,function(t,a,n){return Ra(r,t,[a+1],n,"filter")})}var UV="forEach",WV=["typed"],Ay=F(UV,WV,e=>{var{typed:r}=e;function t(n,i,s){var l,c;return n[0]&&(l=n[0].compile().evaluate(s)),n[1]&&(at(n[1])||Oa(n[1])?c=n[1].compile().evaluate(s):c=lf(n[1],i,s)),a(l,c)}t.rawArgs=!0;var a=r("forEach",{"Array | Matrix, function":function(i,s){var l=function c(o,u){if(Array.isArray(o))_o(o,function(m,d){c(m,u.concat(d+1))});else return Ra(s,o,u,i,"forEach")};l(i.valueOf(),[])}});return t},{isTransformFunction:!0});var YV="index",HV=["Index","getMatrixDataType"],My=F(YV,HV,e=>{var{Index:r,getMatrixDataType:t}=e;return function(){for(var n=[],i=0,s=arguments.length;i0?0:2;else if(l&&l.isSet===!0)l=l.map(function(o){return o-1});else if(Mr(l)||Qe(l))t(l)!=="boolean"&&(l=l.map(function(o){return o-1}));else if(sr(l))l--;else if(rr(l))l=l.toNumber()-1;else if(typeof l!="string")throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");n[i]=l}var c=new r;return r.apply(c,n),c}},{isTransformFunction:!0});var $V="map",GV=["typed"],Cy=F($V,GV,e=>{var{typed:r}=e;function t(n,i,s){var l,c;return n[0]&&(l=n[0].compile().evaluate(s)),n[1]&&(at(n[1])||Oa(n[1])?c=n[1].compile().evaluate(s):c=lf(n[1],i,s)),a(l,c)}t.rawArgs=!0;var a=r("map",{"Array, function":function(i,s){return xP(i,s,i)},"Matrix, function":function(i,s){return i.create(xP(i.valueOf(),s,i))}});return t},{isTransformFunction:!0});function xP(e,r,t){function a(n,i){return Array.isArray(n)?Kn(n,function(s,l){return a(s,i.concat(l+1))}):Ra(r,n,i,t,"map")}return a(e,[])}function Cn(e){if(e.length===2&&Nt(e[0])){e=e.slice();var r=e[1];sr(r)?e[1]=r-1:rr(r)&&(e[1]=r.minus(1))}return e}var VV="max",ZV=["typed","config","numeric","larger"],Ey=F(VV,ZV,e=>{var{typed:r,config:t,numeric:a,larger:n}=e,i=ef({typed:r,config:t,numeric:a,larger:n});return r("max",{"...any":function(l){l=Cn(l);try{return i.apply(null,l)}catch(c){throw mt(c)}}})},{isTransformFunction:!0});var QV="mean",XV=["typed","add","divide"],Ty=F(QV,XV,e=>{var{typed:r,add:t,divide:a}=e,n=of({typed:r,add:t,divide:a});return r("mean",{"...any":function(s){s=Cn(s);try{return n.apply(null,s)}catch(l){throw mt(l)}}})},{isTransformFunction:!0});var JV="min",KV=["typed","config","numeric","smaller"],Fy=F(JV,KV,e=>{var{typed:r,config:t,numeric:a,smaller:n}=e,i=rf({typed:r,config:t,numeric:a,smaller:n});return r("min",{"...any":function(l){l=Cn(l);try{return i.apply(null,l)}catch(c){throw mt(c)}}})},{isTransformFunction:!0});var jV="range",eZ=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq","add","isPositive"],_y=F(jV,eZ,e=>{var{typed:r,config:t,matrix:a,bignumber:n,smaller:i,smallerEq:s,larger:l,largerEq:c,add:o,isPositive:u}=e,m=$u({typed:r,config:t,matrix:a,bignumber:n,smaller:i,smallerEq:s,larger:l,largerEq:c,add:o,isPositive:u});return r("range",{"...any":function(h){var y=h.length-1,v=h[y];return typeof v!="boolean"&&h.push(!0),m.apply(null,h)}})},{isTransformFunction:!0});var rZ="row",tZ=["typed","Index","matrix","range"],Oy=F(rZ,tZ,e=>{var{typed:r,Index:t,matrix:a,range:n}=e,i=Gu({typed:r,Index:t,matrix:a,range:n});return r("row",{"...any":function(l){var c=l.length-1,o=l[c];sr(o)&&(l[c]=o-1);try{return i.apply(null,l)}catch(u){throw mt(u)}}})},{isTransformFunction:!0});var nZ="subset",aZ=["typed","matrix","zeros","add"],By=F(nZ,aZ,e=>{var{typed:r,matrix:t,zeros:a,add:n}=e,i=Vu({typed:r,matrix:t,zeros:a,add:n});return r("subset",{"...any":function(l){try{return i.apply(null,l)}catch(c){throw mt(c)}}})},{isTransformFunction:!0});var iZ="concat",oZ=["typed","matrix","isInteger"],Py=F(iZ,oZ,e=>{var{typed:r,matrix:t,isInteger:a}=e,n=Uu({typed:r,matrix:t,isInteger:a});return r("concat",{"...any":function(s){var l=s.length-1,c=s[l];sr(c)?s[l]=c-1:rr(c)&&(s[l]=c.minus(1));try{return n.apply(null,s)}catch(o){throw mt(o)}}})},{isTransformFunction:!0});var bP="diff",sZ=["typed","matrix","subtract","number","bignumber"],Iy=F(bP,sZ,e=>{var{typed:r,matrix:t,subtract:a,number:n,bignumber:i}=e,s=Yu({typed:r,matrix:t,subtract:a,number:n,bignumber:i});return r(bP,{"...any":function(c){c=Cn(c);try{return s.apply(null,c)}catch(o){throw mt(o)}}})},{isTransformFunction:!0});var uZ="std",fZ=["typed","map","sqrt","variance"],Ry=F(uZ,fZ,e=>{var{typed:r,map:t,sqrt:a,variance:n}=e,i=ff({typed:r,map:t,sqrt:a,variance:n});return r("std",{"...any":function(l){l=Cn(l);try{return i.apply(null,l)}catch(c){throw mt(c)}}})},{isTransformFunction:!0});var wP="sum",cZ=["typed","config","add","numeric"],ky=F(wP,cZ,e=>{var{typed:r,config:t,add:a,numeric:n}=e,i=nf({typed:r,config:t,add:a,numeric:n});return r(wP,{"...any":function(l){l=Cn(l);try{return i.apply(null,l)}catch(c){throw mt(c)}}})},{isTransformFunction:!0});var lZ="quantileSeq",mZ=["typed","bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger"],qy=F(lZ,mZ,e=>{var{typed:r,bignumber:t,add:a,subtract:n,divide:i,multiply:s,partitionSelect:l,compare:c,isInteger:o,smaller:u,smallerEq:m,larger:d}=e,h=uf({typed:r,bignumber:t,add:a,subtract:n,divide:i,multiply:s,partitionSelect:l,compare:c,isInteger:o,smaller:u,smallerEq:m,larger:d});return r("quantileSeq",{"Array | Matrix, number | BigNumber":h,"Array | Matrix, number | BigNumber, number":(v,x,w)=>h(v,x,y(w)),"Array | Matrix, number | BigNumber, boolean":h,"Array | Matrix, number | BigNumber, boolean, number":(v,x,w,C)=>h(v,x,w,y(C)),"Array | Matrix, Array | Matrix":h,"Array | Matrix, Array | Matrix, number":(v,x,w)=>h(v,x,y(w)),"Array | Matrix, Array | Matrix, boolean":h,"Array | Matrix, Array | Matrix, boolean, number":(v,x,w,C)=>h(v,x,w,y(C))});function y(v){return Cn([[],v])[1]}},{isTransformFunction:!0});var DP="cumsum",pZ=["typed","add","unaryPlus"],Ly=F(DP,pZ,e=>{var{typed:r,add:t,unaryPlus:a}=e,n=af({typed:r,add:t,unaryPlus:a});return r(DP,{"...any":function(s){if(s.length===2&&Nt(s[0])){var l=s[1];sr(l)?s[1]=l-1:rr(l)&&(s[1]=l.minus(1))}try{return n.apply(null,s)}catch(c){throw mt(c)}}})},{isTransformFunction:!0});var SP="variance",dZ=["typed","add","subtract","multiply","divide","apply","isNaN"],zy=F(SP,dZ,e=>{var{typed:r,add:t,subtract:a,multiply:n,divide:i,apply:s,isNaN:l}=e,c=sf({typed:r,add:t,subtract:a,multiply:n,divide:i,apply:s,isNaN:l});return r(SP,{"...any":function(u){u=Cn(u);try{return c.apply(null,u)}catch(m){throw mt(m)}}})},{isTransformFunction:!0});var NP="print",hZ=["typed","matrix","zeros","add"],Uy=F(NP,hZ,e=>{var{typed:r,matrix:t,zeros:a,add:n}=e,i=Qu({typed:r,matrix:t,zeros:a,add:n});return r(NP,{"string, Object | Array":function(c,o){return i(s(c),o)},"string, Object | Array, number | Object":function(c,o,u){return i(s(c),o,u)}});function s(l){return l.replace(Ld,c=>{var o=c.slice(1).split("."),u=o.map(function(m){return!isNaN(m)&&m.length>0?parseInt(m)-1:m});return"$"+u.join(".")})}},{isTransformFunction:!0});var vZ="and",gZ=["typed","matrix","zeros","add","equalScalar","not","concat"],Wy=F(vZ,gZ,e=>{var{typed:r,matrix:t,equalScalar:a,zeros:n,not:i,concat:s}=e,l=ju({typed:r,matrix:t,equalScalar:a,zeros:n,not:i,concat:s});function c(o,u,m){var d=o[0].compile().evaluate(m);if(!Nt(d)&&!l(d,!0))return!1;var h=o[1].compile().evaluate(m);return l(d,h)}return c.rawArgs=!0,c},{isTransformFunction:!0});var yZ="or",xZ=["typed","matrix","equalScalar","DenseMatrix","concat"],Yy=F(yZ,xZ,e=>{var{typed:r,matrix:t,equalScalar:a,DenseMatrix:n,concat:i}=e,s=zu({typed:r,matrix:t,equalScalar:a,DenseMatrix:n,concat:i});function l(c,o,u){var m=c[0].compile().evaluate(u);if(!Nt(m)&&s(m,!1))return!0;var d=c[1].compile().evaluate(u);return s(m,d)}return l.rawArgs=!0,l},{isTransformFunction:!0});var bZ="bitAnd",wZ=["typed","matrix","zeros","add","equalScalar","not","concat"],Hy=F(bZ,wZ,e=>{var{typed:r,matrix:t,equalScalar:a,zeros:n,not:i,concat:s}=e,l=qu({typed:r,matrix:t,equalScalar:a,zeros:n,not:i,concat:s});function c(o,u,m){var d=o[0].compile().evaluate(m);if(!Nt(d)){if(isNaN(d))return NaN;if(d===0||d===!1)return 0}var h=o[1].compile().evaluate(m);return l(d,h)}return c.rawArgs=!0,c},{isTransformFunction:!0});var DZ="bitOr",SZ=["typed","matrix","equalScalar","DenseMatrix","concat"],$y=F(DZ,SZ,e=>{var{typed:r,matrix:t,equalScalar:a,DenseMatrix:n,concat:i}=e,s=Lu({typed:r,matrix:t,equalScalar:a,DenseMatrix:n,concat:i});function l(c,o,u){var m=c[0].compile().evaluate(u);if(!Nt(m)){if(isNaN(m))return NaN;if(m===-1)return-1;if(m===!0)return 1}var d=c[1].compile().evaluate(u);return s(m,d)}return l.rawArgs=!0,l},{isTransformFunction:!0});var Ge=$m({config:Oe}),pt=Gm({}),kD=h0({BigNumber:Ge,config:Oe}),AP=f0({}),MP=H0({BigNumber:Ge,config:Oe}),Wo=Vm({}),qD=S0({Complex:pt}),CP=l0({BigNumber:Ge,config:Oe}),EP=y0({BigNumber:Ge,config:Oe}),TP=b0({BigNumber:Ge,config:Oe}),zc=Qm({}),FP=m0({BigNumber:Ge,config:Oe}),_P=c0({}),OP=v0({BigNumber:Ge,config:Oe}),BP=Zm({}),LD=km({}),PP=w0({BigNumber:Ge,config:Oe}),IP=fy({BigNumber:Ge,config:Oe}),zD=d0({BigNumber:Ge,config:Oe}),RP=u0({}),kP=N0({}),Fr=Jm({Matrix:zc}),qP=j0({BigNumber:Ge,config:Oe}),LP=g0({BigNumber:Ge,config:Oe}),Gy=p0({BigNumber:Ge,config:Oe}),zP=s0({}),UP=D0({BigNumber:Ge,config:Oe}),te=Rm({BigNumber:Ge,Complex:pt,DenseMatrix:Fr,Fraction:Wo}),Vy=Ap({BigNumber:Ge,config:Oe,typed:te}),WP=K0({BigNumber:Ge,config:Oe}),En=Mp({typed:te}),YP=Bh({Complex:pt,config:Oe,typed:te}),HP=Ih({BigNumber:Ge,typed:te}),$P=kh({BigNumber:Ge,Complex:pt,config:Oe,typed:te}),Qt=Ep({typed:te}),GP=ed({typed:te}),VP=zh({BigNumber:Ge,Complex:pt,config:Oe,typed:te}),ZP=Wh({typed:te}),UD=Yh({typed:te}),QP=$h({Complex:pt,config:Oe,typed:te}),ta=vp({BigNumber:Ge,typed:te}),XP=Kp({typed:te}),JP=hp({typed:te}),KP=Km({typed:te}),Uc=Pg({typed:te}),Wc=gp({Complex:pt,typed:te}),Yo=rd({typed:te}),Zy=Gh({typed:te}),jP=Zh({BigNumber:Ge,typed:te}),eI=Xh({BigNumber:Ge,typed:te}),rI=Op({typed:te}),Pr=lp({config:Oe,typed:te}),tI=_d({typed:te}),WD=Bp({typed:te}),nI=Pp({Complex:pt,typed:te}),aI=fd({typed:te}),iI=ld({typed:te}),mf=Id({typed:te}),Qy=md({typed:te}),oI=qd({format:mf,typed:te}),Xy=td({typed:te}),Un=rp({typed:te}),ao=np({typed:te}),Ho=op({typed:te}),La=sp({typed:te}),sI=x0({BigNumber:Ge,config:Oe}),uI=kg({Complex:pt,typed:te}),fI=qp({Complex:pt,config:Oe,typed:te}),YD=Lp({Complex:pt,config:Oe,typed:te}),$o=hd({typed:te}),Ot=zp({typed:te}),Yc=ad({typed:te}),Bi=pp({typed:te}),cI=kd({format:mf,typed:te}),lI=Yg({config:Oe,typed:te}),mI=Qu({typed:te}),pI=Hg({config:Oe,typed:te}),Jy=nd({typed:te}),dI=Kh({BigNumber:Ge,typed:te}),HD=Yp({BigNumber:Ge,Fraction:Wo,complex:Wc,typed:te}),Hc=ev({typed:te}),Pi=mp({Matrix:zc,equalScalar:Pr,typed:te}),hI=Sp({typed:te}),vI=$p({typed:te}),gI=dp({typed:te}),xa=Tp({typed:te}),yI=tv({typed:te}),$D=fp({typed:te}),xI=Ph({Complex:pt,config:Oe,typed:te}),bI=qh({BigNumber:Ge,typed:te}),Ky=Lo({isInteger:Un,typed:te}),wI=Lh({BigNumber:Ge,Complex:pt,config:Oe,typed:te}),DI=Rd({format:mf,typed:te}),SI=Ig({typed:te}),NI=Vh({typed:te}),AI=Jh({BigNumber:Ge,typed:te}),pf=up({typed:te}),MI=Ud({typed:te}),CI=$g({config:Oe,typed:te}),EI=jh({BigNumber:Ge,typed:te}),TI=rv({typed:te}),FI=_h({SparseMatrix:Pi,typed:te}),za=Hp({Complex:pt,config:Oe,typed:te}),_I=nv({typed:te}),fi=Np({typed:te}),OI=Rh({BigNumber:Ge,Complex:pt,config:Oe,typed:te}),BI=Qh({BigNumber:Ge,typed:te}),Ps=yp({Fraction:Wo,typed:te}),Go=ap({typed:te}),$e=xp({DenseMatrix:Fr,Matrix:zc,SparseMatrix:Pi,typed:te}),PI=bp({isZero:La,matrix:$e,typed:te}),II=Bd({isNaN:pf,isNumeric:Go,typed:te}),Ua=Wd({bignumber:ta,fraction:Ps,number:Bi}),GD=Pd({config:Oe,multiplyScalar:Ot,numeric:Ua,typed:te}),VD=xd({isInteger:Un,matrix:$e,typed:te}),cn=Sd({matrix:$e,config:Oe,typed:te}),RI=Nd({matrix:$e,typed:te}),df=Ad({matrix:$e,typed:te}),ZD=Vp({BigNumber:Ge,config:Oe,matrix:$e,typed:te}),ln=Cd({BigNumber:Ge,config:Oe,matrix:$e,typed:te}),kI=Uh({Complex:pt,config:Oe,typed:te}),QD=Fp({BigNumber:Ge,Complex:pt,Fraction:Wo,config:Oe,isNegative:ao,matrix:$e,typed:te,unaryMinus:fi}),Gr=Uu({isInteger:Un,matrix:$e,typed:te}),qI=od({prod:GD,size:cn,typed:te}),jy=Md({conj:Yo,transpose:df,typed:te}),XD=ud({DenseMatrix:Fr,SparseMatrix:Pi,matrix:$e,typed:te}),Mt=Yd({numeric:Ua,typed:te}),hf=Xd({DenseMatrix:Fr,concat:Gr,divideScalar:Mt,equalScalar:Pr,matrix:$e,typed:te}),ba=fh({DenseMatrix:Fr,concat:Gr,equalScalar:Pr,matrix:$e,typed:te}),vf=cd({matrix:$e,typed:te}),LI=ip({isNumeric:Go,typed:te}),io=pd({BigNumber:Ge,DenseMatrix:Fr,SparseMatrix:Pi,config:Oe,matrix:$e,typed:te}),zI=dd({matrix:$e,multiplyScalar:Ot,typed:te}),$c=yh({DenseMatrix:Fr,concat:Gr,config:Oe,matrix:$e,typed:te}),UI=rh({DenseMatrix:Fr,concat:Gr,equalScalar:Pr,matrix:$e,typed:te,zeros:ln}),JD=Jd({DenseMatrix:Fr,divideScalar:Mt,equalScalar:Pr,matrix:$e,multiplyScalar:Ot,subtractScalar:xa,typed:te}),ex=Dp({flatten:vf,matrix:$e,size:cn,typed:te}),WI=Wp({BigNumber:Ge,concat:Gr,equalScalar:Pr,matrix:$e,typed:te}),YI=vd({BigNumber:Ge,config:Oe,matrix:$e,typed:te}),rx=ug({addScalar:Qt,complex:Wc,conj:Yo,divideScalar:Mt,equal:ba,identity:io,isZero:La,matrix:$e,multiplyScalar:Ot,sign:HD,sqrt:za,subtractScalar:xa,typed:te,unaryMinus:fi,zeros:ln}),HI=bd({config:Oe,matrix:$e}),$I=th({DenseMatrix:Fr,concat:Gr,equalScalar:Pr,matrix:$e,typed:te,zeros:ln}),Is=$d({BigNumber:Ge,DenseMatrix:Fr,config:Oe,equalScalar:Pr,matrix:$e,typed:te,zeros:ln}),Tn=mh({DenseMatrix:Fr,concat:Gr,config:Oe,matrix:$e,typed:te}),Bt=Gp({DenseMatrix:Fr,concat:Gr,equalScalar:Pr,matrix:$e,subtractScalar:xa,typed:te,unaryMinus:fi}),GI=zd({concat:Gr,matrix:$e,typed:te}),VI=wh({DenseMatrix:Fr,concat:Gr,config:Oe,equalScalar:Pr,matrix:$e,typed:te}),tx=Kd({DenseMatrix:Fr,divideScalar:Mt,equalScalar:Pr,matrix:$e,multiplyScalar:Ot,subtractScalar:xa,typed:te}),ZI=id({DenseMatrix:Fr,concat:Gr,matrix:$e,typed:te}),qr=dv({DenseMatrix:Fr,SparseMatrix:Pi,addScalar:Qt,concat:Gr,equalScalar:Pr,matrix:$e,typed:te}),QI=Hh({BigNumber:Ge,DenseMatrix:Fr,concat:Gr,equalScalar:Pr,matrix:$e,typed:te}),XI=qu({concat:Gr,equalScalar:Pr,matrix:$e,typed:te}),JI=Lu({DenseMatrix:Fr,concat:Gr,equalScalar:Pr,matrix:$e,typed:te}),KI=jp({DenseMatrix:Fr,concat:Gr,matrix:$e,typed:te}),jI=Zg({addScalar:Qt,combinations:Uc,divideScalar:Mt,isInteger:Un,isNegative:ao,multiplyScalar:Ot,typed:te}),Vo=ih({BigNumber:Ge,DenseMatrix:Fr,Fraction:Wo,concat:Gr,config:Oe,equalScalar:Pr,matrix:$e,typed:te}),KD=sh({concat:Gr,matrix:$e,typed:te}),e4=af({add:qr,typed:te,unaryPlus:Vy}),nx=xh({equal:ba,typed:te}),r4=Yu({matrix:$e,number:Bi,subtract:Bt,typed:te}),t4=Eg({abs:En,addScalar:Qt,deepEqual:nx,divideScalar:Mt,multiplyScalar:Ot,sqrt:za,subtractScalar:xa,typed:te}),Gc=gv({addScalar:Qt,conj:Yo,multiplyScalar:Ot,size:cn,typed:te}),n4=ch({compareText:KD,isZero:La,typed:te}),jD=Pu({DenseMatrix:Fr,config:Oe,equalScalar:Pr,matrix:$e,round:Is,typed:te,zeros:ln}),a4=Rp({BigNumber:Ge,DenseMatrix:Fr,concat:Gr,config:Oe,equalScalar:Pr,matrix:$e,round:Is,typed:te,zeros:ln}),i4=hv({abs:En,addScalar:Qt,divideScalar:Mt,isPositive:Ho,multiplyScalar:Ot,smaller:Tn,sqrt:za,typed:te}),eS=Nh({DenseMatrix:Fr,smaller:Tn}),bn=Ah({ImmutableDenseMatrix:eS,getMatrixDataType:Qy}),Fn=vh({DenseMatrix:Fr,concat:Gr,config:Oe,matrix:$e,typed:te}),ax=Gd({Complex:pt,config:Oe,divideScalar:Mt,typed:te}),o4=jd({DenseMatrix:Fr,divideScalar:Mt,equalScalar:Pr,matrix:$e,multiplyScalar:Ot,subtractScalar:xa,typed:te}),s4=wp({flatten:vf,matrix:$e,size:cn,typed:te}),u4=rf({config:Oe,numeric:Ua,smaller:Tn,typed:te}),rS=Iu({DenseMatrix:Fr,concat:Gr,config:Oe,equalScalar:Pr,matrix:$e,round:Is,typed:te,zeros:ln}),it=Up({addScalar:Qt,dot:Gc,equalScalar:Pr,matrix:$e,multiplyScalar:Ot,typed:te}),f4=Zd({Complex:pt,config:Oe,divideScalar:Mt,typed:te}),c4=zu({DenseMatrix:Fr,concat:Gr,equalScalar:Pr,matrix:$e,typed:te}),Vc=Dh({compare:Vo,isNaN:pf,isNumeric:Go,typed:te}),l4=nh({DenseMatrix:Fr,concat:Gr,equalScalar:Pr,matrix:$e,typed:te,zeros:ln}),tS=lg({SparseMatrix:Pi,abs:En,add:qr,divideScalar:Mt,larger:Fn,largerEq:$c,multiply:it,subtract:Bt,transpose:df,typed:te}),na=Vu({add:qr,matrix:$e,typed:te,zeros:ln}),ix=nf({add:qr,config:Oe,numeric:Ua,typed:te}),m4=yv({add:qr,matrix:$e,typed:te}),nS=eh({DenseMatrix:Fr,divideScalar:Mt,equalScalar:Pr,matrix:$e,multiplyScalar:Ot,subtractScalar:xa,typed:te}),p4=a0({Complex:pt,add:qr,multiply:it,number:Bi,typed:te}),ox=_p({DenseMatrix:Fr,config:Oe,equalScalar:Pr,matrix:$e,round:Is,typed:te,zeros:ln}),ci=oh({compare:Vo,typed:te}),d4=Qg({addScalar:Qt,combinations:Uc,isInteger:Un,isNegative:ao,isPositive:Ho,larger:Fn,typed:te}),h4=sd({matrix:$e,multiply:it,subtract:Bt,typed:te}),aS=yg({divideScalar:Mt,isZero:La,matrix:$e,multiply:it,subtractScalar:xa,typed:te,unaryMinus:fi}),v4=Xp({concat:Gr,equalScalar:Pr,matrix:$e,multiplyScalar:Ot,typed:te}),iS=Mh({larger:Fn,smaller:Tn}),oS=Ip({Complex:pt,DenseMatrix:Fr,ceil:ox,equalScalar:Pr,floor:jD,matrix:$e,typed:te,zeros:ln}),sS=xv({Index:bn,typed:te}),g4=Tg({abs:En,add:qr,addScalar:Qt,config:Oe,divideScalar:Mt,equalScalar:Pr,flatten:vf,isNumeric:Go,isZero:La,matrix:$e,multiply:it,multiplyScalar:Ot,smaller:Tn,subtract:Bt,typed:te}),y4=Zp({BigNumber:Ge,add:qr,config:Oe,equal:ba,isInteger:Un,mod:rS,smaller:Tn,typed:te,xgcd:ZD}),x4=kp({concat:Gr,equalScalar:Pr,matrix:$e,typed:te}),b4=Vd({Complex:pt,config:Oe,divideScalar:Mt,log:ax,typed:te}),sx=ef({config:Oe,larger:Fn,numeric:Ua,typed:te}),w4=av({DenseMatrix:Fr,Index:bn,compareNatural:ci,size:cn,subset:na,typed:te}),D4=ov({DenseMatrix:Fr,Index:bn,compareNatural:ci,size:cn,subset:na,typed:te}),S4=uv({Index:bn,compareNatural:ci,size:cn,subset:na,typed:te}),N4=cv({Index:bn,compareNatural:ci,size:cn,subset:na,typed:te}),Rs=dh({DenseMatrix:Fr,concat:Gr,config:Oe,matrix:$e,typed:te}),A4=Sh({compare:Vo,compareNatural:ci,matrix:$e,typed:te}),M4=ju({concat:Gr,equalScalar:Pr,matrix:$e,not:Yc,typed:te,zeros:ln}),ks=$u({bignumber:ta,matrix:$e,add:qr,config:Oe,isPositive:Ho,larger:Fn,largerEq:$c,smaller:Tn,smallerEq:Rs,typed:te}),C4=Gu({Index:bn,matrix:$e,range:ks,typed:te}),uS=iv({DenseMatrix:Fr,Index:bn,compareNatural:ci,size:cn,subset:na,typed:te}),E4=fv({Index:bn,compareNatural:ci,size:cn,subset:na,typed:te}),fS=mv({Index:bn,concat:Gr,setDifference:uS,size:cn,subset:na,typed:te}),cS=Ch({FibonacciHeap:iS,addScalar:Qt,equalScalar:Pr}),lS=Wu({Index:bn,matrix:$e,range:ks,typed:te}),Zo=xg({abs:En,addScalar:Qt,det:aS,divideScalar:Mt,identity:io,matrix:$e,multiply:it,typed:te,unaryMinus:fi}),mS=sg({DenseMatrix:Fr,Spa:cS,SparseMatrix:Pi,abs:En,addScalar:Qt,divideScalar:Mt,equalScalar:Pr,larger:Fn,matrix:$e,multiplyScalar:Ot,subtractScalar:xa,typed:te,unaryMinus:fi}),T4=bg({Complex:pt,add:qr,ctranspose:jy,deepEqual:nx,divideScalar:Mt,dot:Gc,dotDivide:hf,equal:ba,inv:Zo,matrix:$e,multiply:it,typed:te}),wa=Hd({Complex:pt,config:Oe,fraction:Ps,identity:io,inv:Zo,matrix:$e,multiply:it,number:Bi,typed:te}),pS=sv({DenseMatrix:Fr,Index:bn,compareNatural:ci,size:cn,subset:na,typed:te}),F4=pv({Index:bn,concat:Gr,setIntersect:pS,setSymDifference:fS,size:cn,subset:na,typed:te}),_4=Sg({abs:En,add:qr,identity:io,inv:Zo,map:$o,max:sx,multiply:it,size:cn,sqrt:za,subtract:Bt,typed:te}),wr=Th({BigNumber:Ge,Complex:pt,Fraction:Wo,abs:En,addScalar:Qt,config:Oe,divideScalar:Mt,equal:ba,fix:oS,format:mf,isNumeric:Go,multiplyScalar:Ot,number:Bi,pow:wa,round:Is,subtractScalar:xa}),O4=_0({BigNumber:Ge,Unit:wr,config:Oe}),B4=my({BigNumber:Ge,Unit:wr,config:Oe}),P4=ey({BigNumber:Ge,Unit:wr,config:Oe}),I4=P0({BigNumber:Ge,Unit:wr,config:Oe}),R4=ty({BigNumber:Ge,Unit:wr,config:Oe}),k4=I0({BigNumber:Ge,Unit:wr,config:Oe}),q4=O0({BigNumber:Ge,Unit:wr,config:Oe}),L4=V0({BigNumber:Ge,Unit:wr,config:Oe}),z4=Qd({DenseMatrix:Fr,concat:Gr,equalScalar:Pr,matrix:$e,pow:wa,typed:te}),U4=F0({BigNumber:Ge,Unit:wr,config:Oe}),W4=B0({BigNumber:Ge,Unit:wr,config:Oe}),Y4=Dg({abs:En,add:qr,identity:io,inv:Zo,multiply:it,typed:te}),H4=ny({BigNumber:Ge,Unit:wr,config:Oe}),dS=Ed({addScalar:Qt,ceil:ox,conj:Yo,divideScalar:Mt,dotDivide:hf,exp:WD,i:qD,log2:YD,matrix:$e,multiplyScalar:Ot,pow:wa,tau:zD,typed:te}),ux=Rg({BigNumber:Ge,Complex:pt,config:Oe,multiplyScalar:Ot,pow:wa,typed:te}),$4=M0({BigNumber:Ge,Unit:wr,config:Oe}),G4=$0({BigNumber:Ge,Unit:wr,config:Oe}),V4=Td({conj:Yo,dotDivide:hf,fft:dS,typed:te}),Z4=L0({BigNumber:Ge,Unit:wr,config:Oe}),Q4=iy({BigNumber:Ge,Unit:wr,config:Oe}),X4=T0({BigNumber:Ge,Unit:wr,config:Oe}),J4=py({BigNumber:Ge,Unit:wr,config:Oe}),K4=sy({BigNumber:Ge,Unit:wr,config:Oe}),j4=Z0({BigNumber:Ge,Unit:wr,config:Oe}),eR=q0({BigNumber:Ge,Unit:wr,config:Oe}),rR=xy({BigNumber:Ge,Unit:wr,config:Oe}),tR=vy({BigNumber:Ge,Unit:wr,config:Oe}),nR=by({BigNumber:Ge,Unit:wr,config:Oe}),aR=G0({BigNumber:Ge,Unit:wr,config:Oe}),iR=Q0({BigNumber:Ge,Unit:wr,config:Oe}),oR=E0({BigNumber:Ge,Unit:wr,config:Oe}),sR=X0({BigNumber:Ge,Unit:wr,config:Oe}),uR=cy({BigNumber:Ge,Unit:wr,config:Oe}),fR=A0({BigNumber:Ge,Unit:wr,config:Oe}),cR=ly({BigNumber:Ge,Unit:wr,config:Oe}),lR=J0({BigNumber:Ge,Unit:wr,config:Oe}),mR=ry({BigNumber:Ge,Unit:wr,config:Oe}),pR=z0({BigNumber:Ge,Unit:wr,config:Oe}),dR=Oh({Unit:wr,typed:te}),an=Cg({divideScalar:Mt,equalScalar:Pr,inv:Zo,matrix:$e,multiply:it,typed:te}),hR=W0({BigNumber:Ge,Unit:wr,config:Oe}),gf=qg({gamma:ux,typed:te}),vR=ay({BigNumber:Ge,Unit:wr,config:Oe}),gR=hy({BigNumber:Ge,Unit:wr,config:Oe}),yR=R0({BigNumber:Ge,Unit:wr,config:Oe}),hS=mg({DenseMatrix:Fr,lsolve:JD,lup:mS,matrix:$e,slu:tS,typed:te,usolve:tx}),xR=k0({BigNumber:Ge,Unit:wr,config:Oe}),bR=dy({BigNumber:Ge,Unit:wr,config:Oe}),wR=zg({add:qr,divide:an,factorial:gf,isInteger:Un,isPositive:Ho,multiply:it,typed:te}),DR=Ug({factorial:gf,typed:te}),SR=gy({BigNumber:Ge,Unit:wr,config:Oe}),NR=pg({add:qr,cbrt:QD,divide:an,equalScalar:Pr,im:Xy,isZero:La,multiply:it,re:Jy,sqrt:za,subtract:Bt,typeOf:$D,typed:te,unaryMinus:fi}),AR=lv({compareNatural:ci,typed:te}),MR=Fd({abs:En,add:qr,bignumber:ta,divide:an,isNegative:ao,isPositive:Ho,larger:Fn,map:$o,matrix:$e,max:sx,multiply:it,smaller:Tn,subtract:Bt,typed:te,unaryMinus:fi}),vS=Gg({bignumber:ta,addScalar:Qt,combinations:Uc,divideScalar:Mt,factorial:gf,isInteger:Un,isNegative:ao,larger:Fn,multiplyScalar:Ot,number:Bi,pow:wa,subtractScalar:xa,typed:te}),CR=Fh({Unit:wr,typed:te}),ER=Vg({addScalar:Qt,isInteger:Un,isNegative:ao,stirlingS2:vS,typed:te}),gS=wg({abs:En,add:qr,addScalar:Qt,atan:UD,bignumber:ta,column:lS,complex:Wc,config:Oe,cos:Zy,diag:XD,divideScalar:Mt,dot:Gc,equal:ba,flatten:vf,im:Xy,inv:Zo,larger:Fn,matrix:$e,matrixFromColumns:ex,multiply:it,multiplyScalar:Ot,number:Bi,qr:rx,re:Jy,reshape:VD,sin:Hc,size:cn,smaller:Tn,sqrt:za,subtract:Bt,typed:te,usolve:tx,usolveAll:nS}),TR=Y0({BigNumber:Ge,Unit:wr,config:Oe}),FR=oy({BigNumber:Ge,Unit:wr,config:Oe}),_R=Lg({divide:an,dotDivide:hf,isNumeric:Go,log:ax,map:$o,matrix:$e,multiply:it,sum:ix,typed:te}),yS=of({add:qr,divide:an,typed:te}),OR=uy({BigNumber:Ge,Unit:wr,config:Oe}),BR=C0({BigNumber:Ge,Unit:wr,config:Oe}),PR=uf({bignumber:ta,add:qr,compare:Vo,divide:an,isInteger:Un,larger:Fn,multiply:it,partitionSelect:Vc,smaller:Tn,smallerEq:Rs,subtract:Bt,typed:te}),fx=sf({add:qr,apply:Ky,divide:an,isNaN:pf,multiply:it,subtract:Bt,typed:te}),IR=U0({BigNumber:Ge,Unit:wr,config:Oe}),xS=_g({add:qr,compare:Vo,divide:an,partitionSelect:Vc,typed:te}),RR=Bg({add:qr,divide:an,matrix:$e,mean:yS,multiply:it,pow:wa,sqrt:za,subtract:Bt,sum:ix,typed:te}),kR=i0({Complex:pt,add:qr,divide:an,matrix:$e,multiply:it,typed:te}),qR=Og({abs:En,map:$o,median:xS,subtract:Bt,typed:te}),LR=ff({map:$o,sqrt:za,typed:te,variance:fx}),zR=Od({BigNumber:Ge,Complex:pt,add:qr,config:Oe,divide:an,equal:ba,factorial:gf,gamma:ux,isNegative:ao,multiply:it,pi:Gy,pow:wa,sin:Hc,smallerEq:Rs,subtract:Bt,typed:te}),cx=vv({abs:En,add:qr,conj:Yo,ctranspose:jy,eigs:gS,equalScalar:Pr,larger:Fn,matrix:$e,multiply:it,pow:wa,smaller:Tn,sqrt:za,typed:te}),bS=Dd({BigNumber:Ge,DenseMatrix:Fr,SparseMatrix:Pi,addScalar:Qt,config:Oe,cos:Zy,matrix:$e,multiplyScalar:Ot,norm:cx,sin:Hc,typed:te,unaryMinus:fi}),UR=yy({BigNumber:Ge,Unit:wr,config:Oe}),wS=Ag({identity:io,matrix:$e,multiply:it,norm:cx,qr:rx,subtract:Bt,typed:te}),WR=wd({multiply:it,rotationMatrix:bS,typed:te}),DS=Ng({abs:En,add:qr,concat:Gr,identity:io,index:sS,lusolve:hS,matrix:$e,matrixFromColumns:ex,multiply:it,range:ks,schur:wS,subset:na,subtract:Bt,transpose:df,typed:te}),YR=Mg({matrix:$e,multiply:it,sylvester:DS,transpose:df,typed:te});var yf={},xf={},HR={},_n=wv({mathWithTransform:xf}),bf=Hv({Node:_n}),oo=Gv({Node:_n}),qs=Zv({Node:_n}),$R=Kv({Node:_n}),wf=Mv({Node:_n}),GR=Ov({Node:_n,ResultSet:LD}),VR=Pv({Node:_n}),Qo=qv({Node:_n}),ZR=Xv({Node:_n}),NZ=o0({classes:HR}),SS=hg({math:yf,typed:te}),QR=zv({Node:_n,typed:te}),AZ=gg({Chain:SS,typed:te}),Df=Wv({Node:_n,size:cn}),Sf=Nv({Node:_n,subset:na}),XR=Fv({matrix:$e,Node:_n,subset:na}),Xo=jv({Unit:wr,Node:_n,math:yf}),Jo=rg({Node:_n,SymbolNode:Xo,math:yf}),Wa=tg({AccessorNode:Sf,ArrayNode:wf,AssignmentNode:XR,BlockNode:GR,ConditionalNode:VR,ConstantNode:Qo,FunctionAssignmentNode:QR,FunctionNode:Jo,IndexNode:Df,ObjectNode:bf,OperatorNode:oo,ParenthesisNode:qs,RangeNode:ZR,RelationalNode:$R,SymbolNode:Xo,config:Oe,numeric:Ua,typed:te}),JR=e0({ConstantNode:Qo,FunctionNode:Jo,OperatorNode:oo,ParenthesisNode:qs,parse:Wa,typed:te}),NS=Kg({bignumber:ta,fraction:Ps,AccessorNode:Sf,ArrayNode:wf,ConstantNode:Qo,FunctionNode:Jo,IndexNode:Df,ObjectNode:bf,OperatorNode:oo,SymbolNode:Xo,config:Oe,mathWithTransform:xf,matrix:$e,typed:te}),MZ=ng({parse:Wa,typed:te}),AS=jg({AccessorNode:Sf,ArrayNode:wf,ConstantNode:Qo,FunctionNode:Jo,IndexNode:Df,ObjectNode:bf,OperatorNode:oo,ParenthesisNode:qs,SymbolNode:Xo,add:qr,divide:an,equal:ba,isZero:La,multiply:it,parse:Wa,pow:wa,subtract:Bt,typed:te}),MS=ag({parse:Wa,typed:te}),KR=dg({evaluate:MS}),jR=ig({evaluate:MS}),lx=Jg({bignumber:ta,fraction:Ps,AccessorNode:Sf,ArrayNode:wf,ConstantNode:Qo,FunctionNode:Jo,IndexNode:Df,ObjectNode:bf,OperatorNode:oo,ParenthesisNode:qs,SymbolNode:Xo,add:qr,config:Oe,divide:an,equal:ba,isZero:La,mathWithTransform:xf,matrix:$e,multiply:it,parse:Wa,pow:wa,resolve:JR,simplifyConstant:NS,simplifyCore:AS,subtract:Bt,typed:te}),CZ=r0({OperatorNode:oo,parse:Wa,simplify:lx,typed:te}),EZ=Xg({parse:Wa,typed:te}),TZ=og({Parser:jR,typed:te}),FZ=n0({bignumber:ta,fraction:Ps,AccessorNode:Sf,ArrayNode:wf,ConstantNode:Qo,FunctionNode:Jo,IndexNode:Df,ObjectNode:bf,OperatorNode:oo,ParenthesisNode:qs,SymbolNode:Xo,add:qr,config:Oe,divide:an,equal:ba,isZero:La,mathWithTransform:xf,matrix:$e,multiply:it,parse:Wa,pow:wa,simplify:lx,simplifyConstant:NS,simplifyCore:AS,subtract:Bt,typed:te}),_Z=t0({ConstantNode:Qo,FunctionNode:Jo,OperatorNode:oo,ParenthesisNode:qs,SymbolNode:Xo,config:Oe,equal:ba,isZero:La,numeric:Ua,parse:Wa,simplify:lx,typed:te}),OZ=vg({Help:KR,mathWithTransform:xf,typed:te});ht(yf,{e:kD,false:AP,fineStructure:MP,i:qD,Infinity:CP,LN10:EP,LOG10E:TP,NaN:FP,null:_P,phi:OP,SQRT1_2:PP,sackurTetrode:IP,tau:zD,true:RP,E:kD,version:kP,efimovFactor:qP,LN2:LP,pi:Gy,replacer:zP,reviver:NZ,SQRT2:UP,typed:te,unaryPlus:Vy,PI:Gy,weakMixingAngle:WP,abs:En,acos:YP,acot:HP,acsc:$P,addScalar:Qt,arg:GP,asech:VP,asinh:ZP,atan:UD,atanh:QP,bignumber:ta,bitNot:XP,boolean:JP,clone:KP,combinations:Uc,complex:Wc,conj:Yo,cos:Zy,cot:jP,csc:eI,cube:rI,equalScalar:Pr,erf:tI,exp:WD,expm1:nI,filter:aI,forEach:iI,format:mf,getMatrixDataType:Qy,hex:oI,im:Xy,isInteger:Un,isNegative:ao,isPositive:Ho,isZero:La,LOG2E:sI,lgamma:uI,log10:fI,log2:YD,map:$o,multiplyScalar:Ot,not:Yc,number:Bi,oct:cI,pickRandom:lI,print:mI,random:pI,re:Jy,sec:dI,sign:HD,sin:Hc,splitUnit:hI,square:vI,string:gI,subtractScalar:xa,tan:yI,typeOf:$D,acosh:xI,acsch:bI,apply:Ky,asec:wI,bin:DI,chain:AZ,combinationsWithRep:SI,cosh:NI,csch:AI,isNaN:pf,isPrime:MI,randomInt:CI,sech:EI,sinh:TI,sparse:FI,sqrt:za,tanh:_I,unaryMinus:fi,acoth:OI,coth:BI,fraction:Ps,isNumeric:Go,matrix:$e,matrixFromFunction:PI,mode:II,numeric:Ua,prod:GD,reshape:VD,size:cn,squeeze:RI,transpose:df,xgcd:ZD,zeros:ln,asin:kI,cbrt:QD,concat:Gr,count:qI,ctranspose:jy,diag:XD,divideScalar:Mt,dotDivide:hf,equal:ba,flatten:vf,hasNumericValue:LI,identity:io,kron:zI,largerEq:$c,leftShift:UI,lsolve:JD,matrixFromColumns:ex,nthRoot:WI,ones:YI,qr:rx,resize:HI,rightArithShift:$I,round:Is,smaller:Tn,subtract:Bt,to:GI,unequal:VI,usolve:tx,xor:ZI,add:qr,atan2:QI,bitAnd:XI,bitOr:JI,bitXor:KI,catalan:jI,compare:Vo,compareText:KD,cumsum:e4,deepEqual:nx,diff:r4,distance:t4,dot:Gc,equalText:n4,floor:jD,gcd:a4,hypot:i4,larger:Fn,log:ax,lsolveAll:o4,matrixFromRows:s4,min:u4,mod:rS,multiply:it,nthRoots:f4,or:c4,partitionSelect:Vc,rightLogShift:l4,slu:tS,subset:na,sum:ix,trace:m4,usolveAll:nS,zpk2tf:p4,ceil:ox,compareNatural:ci,composition:d4,cross:h4,det:aS,dotMultiply:v4,fix:oS,index:sS,intersect:g4,invmod:y4,lcm:x4,log1p:b4,max:sx,setCartesian:w4,setDistinct:D4,setIsSubset:S4,setPowerset:N4,smallerEq:Rs,sort:A4,and:M4,range:ks,row:C4,setDifference:uS,setMultiplicity:E4,setSymDifference:fS,column:lS,inv:Zo,lup:mS,pinv:T4,pow:wa,setIntersect:pS,setUnion:F4,sqrtm:_4,vacuumImpedance:O4,wienDisplacement:B4,atomicMass:P4,bohrMagneton:I4,boltzmann:R4,conductanceQuantum:k4,coulomb:q4,deuteronMass:L4,dotPow:z4,electricConstant:U4,elementaryCharge:W4,expm:Y4,faraday:H4,fft:dS,gamma:ux,gravitationConstant:$4,hartreeEnergy:G4,ifft:V4,klitzing:Z4,loschmidt:Q4,magneticConstant:X4,molarMass:J4,molarPlanckConstant:K4,neutronMass:j4,nuclearMagneton:eR,planckCharge:rR,planckLength:tR,planckTemperature:nR,protonMass:aR,quantumOfCirculation:iR,reducedPlanckConstant:oR,rydberg:sR,secondRadiation:uR,speedOfLight:fR,stefanBoltzmann:cR,thomsonCrossSection:lR,avogadro:mR,bohrRadius:pR,createUnit:dR,divide:an,electronMass:hR,factorial:gf,firstRadiation:vR,gravity:gR,inverseConductanceQuantum:yR,lusolve:hS,magneticFluxQuantum:xR,molarMassC12:bR,multinomial:wR,parse:Wa,permutations:DR,planckMass:SR,polynomialRoot:NR,resolve:JR,setSize:AR,simplifyConstant:NS,solveODE:MR,stirlingS2:vS,unit:CR,bellNumbers:ER,compile:MZ,eigs:gS,fermiCoupling:TR,gasConstant:FR,kldivergence:_R,mean:yS,molarVolume:OR,planckConstant:BR,quantileSeq:PR,simplifyCore:AS,variance:fx,classicalElectronRadius:IR,evaluate:MS,median:xS,simplify:lx,symbolicEqual:CZ,corr:RR,freqz:kR,leafCount:EZ,mad:qR,parser:TZ,rationalize:FZ,std:LR,zeta:zR,derivative:_Z,norm:cx,rotationMatrix:bS,help:OZ,planckTime:UR,schur:wS,rotate:WR,sylvester:DS,lyap:YR,config:Oe});ht(xf,yf,{filter:Ny({typed:te}),forEach:Ay({typed:te}),map:Cy({typed:te}),apply:Dy({isInteger:Un,typed:te}),or:Yy({DenseMatrix:Fr,concat:Gr,equalScalar:Pr,matrix:$e,typed:te}),and:Wy({add:qr,concat:Gr,equalScalar:Pr,matrix:$e,not:Yc,typed:te,zeros:ln}),concat:Py({isInteger:Un,matrix:$e,typed:te}),max:Ey({config:Oe,larger:Fn,numeric:Ua,typed:te}),print:Uy({add:qr,matrix:$e,typed:te,zeros:ln}),bitAnd:Hy({add:qr,concat:Gr,equalScalar:Pr,matrix:$e,not:Yc,typed:te,zeros:ln}),diff:Iy({bignumber:ta,matrix:$e,number:Bi,subtract:Bt,typed:te}),min:Fy({config:Oe,numeric:Ua,smaller:Tn,typed:te}),subset:By({add:qr,matrix:$e,typed:te,zeros:ln}),bitOr:$y({DenseMatrix:Fr,concat:Gr,equalScalar:Pr,matrix:$e,typed:te}),cumsum:Ly({add:qr,typed:te,unaryPlus:Vy}),index:My({Index:bn,getMatrixDataType:Qy}),sum:ky({add:qr,config:Oe,numeric:Ua,typed:te}),range:_y({bignumber:ta,matrix:$e,add:qr,config:Oe,isPositive:Ho,larger:Fn,largerEq:$c,smaller:Tn,smallerEq:Rs,typed:te}),row:Oy({Index:bn,matrix:$e,range:ks,typed:te}),column:Sy({Index:bn,matrix:$e,range:ks,typed:te}),mean:Ty({add:qr,divide:an,typed:te}),quantileSeq:qy({add:qr,bignumber:ta,compare:Vo,divide:an,isInteger:Un,larger:Fn,multiply:it,partitionSelect:Vc,smaller:Tn,smallerEq:Rs,subtract:Bt,typed:te}),variance:zy({add:qr,apply:Ky,divide:an,isNaN:pf,multiply:it,subtract:Bt,typed:te}),std:Ry({map:$o,sqrt:za,typed:te,variance:fx})});ht(HR,{BigNumber:Ge,Complex:pt,Fraction:Wo,Matrix:zc,Node:_n,ObjectNode:bf,OperatorNode:oo,ParenthesisNode:qs,Range:BP,RelationalNode:$R,ResultSet:LD,ArrayNode:wf,BlockNode:GR,ConditionalNode:VR,ConstantNode:Qo,DenseMatrix:Fr,RangeNode:ZR,Chain:SS,FunctionAssignmentNode:QR,SparseMatrix:Pi,IndexNode:Df,ImmutableDenseMatrix:eS,Index:bn,AccessorNode:Sf,AssignmentNode:XR,FibonacciHeap:iS,Spa:cS,Unit:wr,SymbolNode:Xo,FunctionNode:Jo,Help:KR,Parser:jR});SS.createProxy(yf);var CS=RD;var a5=ma(Mm(),1);var r5=ma(e5(),1);function t5(e){var r=new r5.default;return e.on=r.on.bind(r),e.off=r.off.bind(r),e.once=r.once.bind(r),e.emit=r.emit.bind(r),e}function n5(e,r,t,a){function n(x,w){var C=arguments.length;if(C!==1&&C!==2)throw new ga("import",C,1,2);w||(w={});function b(O,_,E){if(Array.isArray(_))_.forEach(L=>b(O,L));else if(typeof _=="object")for(var T in _)Xe(_,T)&&b(O,_[T],T);else if(Ms(_)||E!==void 0){var R=Ms(_)?y(_)?_.fn+".transform":_.fn:E;if(Xe(O,R)&&O[R]!==_&&!w.silent)throw new Error('Cannot import "'+R+'" twice');O[R]=_}else if(!w.silent)throw new TypeError("Factory, Object, or Array expected")}var A={};b(A,x);for(var M in A)if(Xe(A,M)){var D=A[M];if(Ms(D))o(D,w);else if(u(D))i(M,D,w);else if(!w.silent)throw new TypeError("Factory, Object, or Array expected")}}function i(x,w,C){if(C.wrap&&typeof w=="function"&&(w=c(w)),m(w)&&(w=e(x,{[w.signature]:w})),e.isTypedFunction(t[x])&&e.isTypedFunction(w)){C.override?w=e(x,w.signatures):w=e(t[x],w),t[x]=w,delete a[x],s(x,w),t.emit("import",x,function(){return w});return}if(t[x]===void 0||C.override){t[x]=w,delete a[x],s(x,w),t.emit("import",x,function(){return w});return}if(!C.silent)throw new Error('Cannot import "'+x+'": already exists')}function s(x,w){w&&typeof w.transform=="function"?(t.expression.transform[x]=w.transform,d(x)&&(t.expression.mathWithTransform[x]=w.transform)):(delete t.expression.transform[x],d(x)&&(t.expression.mathWithTransform[x]=w))}function l(x){delete t.expression.transform[x],d(x)?t.expression.mathWithTransform[x]=t[x]:delete t.expression.mathWithTransform[x]}function c(x){var w=function(){for(var b=[],A=0,M=arguments.length;A2&&arguments[2]!==void 0?arguments[2]:x.fn;if(jb(C,"."))throw new Error("Factory name should not contain a nested path. Name: "+JSON.stringify(C));var b=y(x)?t.expression.transform:t,A=C in t.expression.transform,M=Xe(b,C)?b[C]:void 0,D=function(){var _={};x.dependencies.map(tw).forEach(T=>{if(jb(T,"."))throw new Error("Factory dependency should not contain a nested path. Name: "+JSON.stringify(T));T==="math"?_.math=t:T==="mathWithTransform"?_.mathWithTransform=t.expression.mathWithTransform:T==="classes"?_.classes=t:_[T]=t[T]});var E=x(_);if(E&&typeof E.transform=="function")throw new Error('Transforms cannot be attached to factory functions. Please create a separate function for it with exports.path="expression.transform"');if(M===void 0||w.override)return E;if(e.isTypedFunction(M)&&e.isTypedFunction(E))return e(M,E);if(w.silent)return M;throw new Error('Cannot import "'+C+'": already exists')};!x.meta||x.meta.lazy!==!1?(Du(b,C,D),M&&A?l(C):(y(x)||h(x))&&Du(t.expression.mathWithTransform,C,()=>b[C])):(b[C]=D(),M&&A?l(C):(y(x)||h(x))&&Du(t.expression.mathWithTransform,C,()=>b[C])),a[C]=x,t.emit("import",C,D)}function u(x){return typeof x=="function"||typeof x=="number"||typeof x=="string"||typeof x=="boolean"||x===null||Ht(x)||Kt(x)||rr(x)||da(x)||Qe(x)||Array.isArray(x)}function m(x){return typeof x=="function"&&typeof x.signature=="string"}function d(x){return!Xe(v,x)}function h(x){return x.fn.indexOf(".")===-1&&!Xe(v,x.fn)&&(!x.meta||!x.meta.isClass)}function y(x){return x!==void 0&&x.meta!==void 0&&x.meta.isTransformFunction===!0||!1}var v={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return n}function mx(e,r){var t=ht({},Ss,r);if(typeof Object.create!="function")throw new Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var a=t5({isNumber:sr,isComplex:Kt,isBigNumber:rr,isFraction:da,isUnit:Ht,isString:St,isArray:Mr,isMatrix:Qe,isCollection:Nt,isDenseMatrix:Ji,isSparseMatrix:ha,isRange:Fo,isIndex:Mi,isBoolean:lm,isResultSet:mm,isHelp:xu,isFunction:pm,isDate:dm,isRegExp:hm,isObject:Ci,isNull:vm,isUndefined:gm,isAccessorNode:zn,isArrayNode:jt,isAssignmentNode:ym,isBlockNode:xm,isConditionalNode:bm,isConstantNode:xr,isFunctionAssignmentNode:Oa,isFunctionNode:yn,isIndexNode:Jn,isNode:Nr,isObjectNode:Ei,isOperatorNode:ct,isParenthesisNode:en,isRangeNode:wm,isRelationalNode:Dm,isSymbolNode:at,isChain:bu});a.config=QA(t,a.emit),a.expression={transform:{},mathWithTransform:{config:a.config}};var n=[],i=[];function s(u){if(Ms(u))return u(a);var m=u[Object.keys(u)[0]];if(Ms(m))return m(a);if(!GA(u))throw console.warn("Factory object with properties \`type\`, \`name\`, and \`factory\` expected",u),new Error("Factory object with properties \`type\`, \`name\`, and \`factory\` expected");var d=n.indexOf(u),h;return d===-1?(u.math===!0?h=u.factory(a.type,t,s,a.typed,a):h=u.factory(a.type,t,s,a.typed),n.push(u),i.push(h)):h=i[d],h}var l={};function c(){for(var u=arguments.length,m=new Array(u),d=0;d{Yb(l).forEach(u=>{u&&u.meta&&u.meta.recreateOnConfigChange&&o(u,{override:!0})})}),a.create=mx.bind(null,e),a.factory=F,a.import(Yb(HA(e))),a.ArgumentsError=ga,a.DimensionError=pr,a.IndexError=tn,a}var zS=ma(cm());var o5=ma(i5()),_S=class{constructor(){this.lang="en";this.all={en:{hintText:{fileName:"Enter File Name",alias:"Enter Display Name",dragDropModifierKeys:"Hold \${1} to Pin and \${2} to Copy",createListItem:"Select/Create List Item Frame",dragDropProperties:"Drag and drop properties to link them into the list",newItem:"+ New",selectNote:"Select Note...",newFrame:"New"},defaults:{spaceNote:"Current Note",spaceContext:"Current Space"},commands:{h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6",columns:"Columns",tabs:"Tabs",button:"Button",label:"Label",column:"Column",idea:"New",group:"Group",paragraph:"Text",card:"Card",progress:"Progress",rating:"Rating",circularProgress:"Circular Progress",list:"Bullet List","ordered-list":"Numbered List",todo:"To-do List",quote:"Quote",internal:"Link to Note",context:"Embed Existing Context",flow:"Embed Note or Space",board:"New Board",divider:"Divider",note:"Note Block",link:"Web Link",callout:"Callout",bookmark:"Bookmark",table:"New Table",codeblock:"Code Block",toggle:"Toggle",emoji:"Emoji",image:"Image",newNote:"New Note",tag:"Tag",makeMenu:"Flow Menu",selectStyle:"Style",toggleKeyboard:"Toggle Keyboard",rows:"Rows",masonry:"Gallery"},styles:{bold:"Bold",italics:"Italics",strikethrough:"Strikethrough",code:"Code",link:"Web Link",blocklink:"Link to Note",textColor:"Text Color",highlight:"Highlight"},commandsSuggest:{noResult:"No result"},commandPalette:{enable:"Enable",disabled:"Disable",openFlow:"Open Flow Blocks in Selection",closeFlow:"Close Flow Blocks in Selection",toggleBold:"Toggle Bold",toggleItalics:"Toggle Italics",openSpaces:"Open Spaces",blink:"Blink",openFileContext:"Open Explorer",convertPathToSpace:"Convert to Space",revealFile:"Reveal File in Spaces",releaseNotes:"Release Notes",toggleBacklinks:"Toggle Backlinks",collapseAllFolders:"Collapse All Folders",addFileSpace:"Add File to Space",removeFileSpace:"Remove File from Space"},frames:{sections:{kit:"Kit",paths:"Paths"},label:{label:"Label",description:"Label"},note:{label:"Note",description:"Link to a note"},table:{label:"Table",description:"Table"},context:{label:"Context",description:"Display a context view from another space"},calendar:{label:"Calendar View"},field:{label:"Field",description:"Dynamic node that displays a value based on property type"},event:{label:"Event"},divider:{label:"Divider",description:"Divider to separate your content"},button:{label:"Button",description:"Buttons can perform actions and open links"},callout:{label:"Callout",description:"Callout to highlight important information"},toggle:{label:"Toggle",description:"Toggle to show/hide content"}},menu:{layout:"Layout",enterFlowState:"Enter Flow State",exitFlowState:"Exit Flow State",newView:"New View",calendarView:"Calendar View",dayView:"Day View",closeSpace:"Close Space in Focus",customView:"Custom View",detailsView:"Details View",catalogView:"Catalog View",galleryView:"Gallery View",deleteContext:"Delete Context",openSpace:"Open",revealInDefault:"Reveal in Finder",revealInExplorer:"Reveal in Explorer",setNone:"None",fileMetadataDescription:"This note only",openFilePane:"Open in a new pane",rename:"Rename",changeToFolderNote:"New Space from Note",moveFile:"Move file to...",moveFolder:"Move folder to...",duplicate:"Make a copy",edit:"Edit",delete:"Delete",getHelp:"Make.md Community",vault:"Vault",openVault:"Open Another Vault",openVaultInFolder:"Open Vault Folder",obSettings:"Obsidian Settings",commandPalette:"Command Palette",backToSpace:"Back to Spaces",collapseAllSections:"Collapse All Spaces",expandAllSections:"Expand All Spaces",collapseAllFolders:"Collapse All Folders",expandAllFolders:"Expand All Folders",spaceTitle:"Add/Remove in Space",home:"Home",none:"None",tableView:"Table View",cardView:"Card View",boardView:"Board View",listView:"List View",flowView:"Flow View",groupBy:"Group",sortBy:"Sort",filters:"Filters",newFilter:"New Filter",clearFilters:"Clear Filters",hide:"Hide",unhideFields:"Unhide All Properties",importDataview:"Import All Dataview Properties",saveAllProperties:"Save All Properties to Files",mergeProperties:"Merge Properties",removeFromSpace:"Unpin from Space",editCode:"Edit Code",editProperties:"Edit Properties",properties:"Properties",deleteProperty:"Delete Property",hideProperty:"Hide Property",unhideProperty:"Unhide Property",saveProperty:"Save Property",sortAscending:"Sort Ascending",sortDescending:"Sort Descending",deleteRow:"Delete Item",collapseAll:"Collapse All",customSort:"Custom Sort",groupSpaces:"Group Spaces",recurisveSort:"Apply to Subfolders",fileNameSortAlphaAsc:"File Name (A to Z)",fileNameSortAlphaDesc:"File Name (Z to A)",fileNameSortNumericalAsc:"File Name (1 to 9)",fileNameSortNumericalDesc:"File Name (9 to 1)",createdTimeSortAsc:"Created Time (new to old)",createdTimeSortDesc:"Created Time (old to new)",modifiedTimeSortAsc:"Modified Time (new to old)",modifiedTimeSortDesc:"Modified Time (old to new)",sizeSortAsc:"Size (smallest to largest)",sizeSortDesc:"Size (largest to smallest)",spaces:"Spaces",tags:"Tags",manageHiddenFiles:"Manage Hidden Files",manageActions:"Manage Actions",deleteSpace:"Delete",changeColor:"Change Color",changePropertyType:"Change Type",deleteFiles:"Delete Files",createFolderSpace:"Create Space from Folder",folder:"Folder",syncToContext:"Add Property to Context",setIcon:"Set Icon",copyEmbedLink:"Copy Embed Link",moveUp:"Move Up",moveDown:"Move Down",moveTo:"Move To",groupNodes:"Group Nodes",moveFrame:"Move Frame",renameFrame:"Rename Frame",deleteFrame:"Delete Frame",insertAbove:"Insert Above",insertBelow:"Insert Below"},editor:{rows:"Rows",columns:"Columns",catalog:"Catalog",gallery:"Gallery",grid:"Grid",scaleToFit:"Change to Fit",scaleToFill:"Change to Fill",fit:"Fit",strokeNone:"None",strokeSolid:"Solid",strokeDotted:"Dotted",strokeDashed:"Dashed",size:"Size",gap:"Gap",marginLeft:"Left",marginTop:"Top",marginRight:"Right",marginBottom:"Bottom",minimize:"Minimize",paddingLeft:"Left",paddingTop:"Top",paddingRight:"Right",paddingBottom:"Bottom",unlinkProperty:"Unlink Property",linkedProperty:"Linked Property",linkProperty:"Link Property",currentSpace:"Current Space",linkName:"\${1} Link",linkThumbnail:"\${1} Thumbnail",linkSticker:"\${1} Sticker",opacity:"Opacity",shadowSpread:"Spread",shadowBlur:"Blur",width:"Width",height:"Height",margin:"Margin",padding:"Padding",bold:"Bold",italic:"Italic",underline:"Underline",alignLeft:"Align Left",alignCenter:"Align Center",alignRight:"Align Right",alignJustify:"Align Justify",numberOfLines:"Lines",createVerticalSection:"Create Vertical Section",createHorizontalSection:"Create Horizontal Section",themeColors:"Theme Colors",uiColors:"UI Colors",hex:"Hex"},buttons:{add:"Add",togglePin:"Toggle Pin",refresh:"Refresh",showHidden:"Show Hidden",alias:"Alias",addFilter:"Add Filter",loadMore:"Load More",addCondition:"Add Condition",customize:"Customize",moreOptions:"More Options",saveProperty:"Save Property",newNote:"New Note",changeIcon:"Change Sticker",removeIcon:"Remove Sticker",addIcon:"Add Sticker",addCover:"Add Cover",addDisplay:"Display Name",changeBanner:"Change Cover",changeBannerShort:"Cover",saveChanges:"Save Changes",removeBanner:"Remove Cover",rename:"Change Name",editFrame:"Edit Frame",saveSpace:"Save Space",createSpace:"New Space",createFolder:"New Folder",createNote:"New Note",createCanvas:"New Canvas",addIntoSpace:"New Pin",addSmartSearch:"Add Live Search",subFolders:"Sub Folders",addItem:"Add Item",addProperty:"Add Property",editProperty:"Edit Property",addContext:"Add Context",cancel:"Cancel",search:"Search",delete:"Delete",toggleFlow:"Toggle Flow",openFlow:"Open Flow",hideFlow:"Hide Flow",openLink:"Open Link",addToSpace:"Add to Space",addToSpaceShort:"Pin",addTag:"Add Tag",tag:"Tag",syncFields:"Sync Properties",convertTable:"Convert to Markdown",cutTable:"Cut Table",deleteTable:"Delete From Note",blink:"Blink",addFile:"Add Item",merge:"Merge",saveView:"Save View",saveTable:"Save Table",renameView:"Rename View",deleteView:"Delete View",renameTable:"Rename Table",renameTag:"Rename Tag",createTag:"Create Tag",currentFolder:"Current Folder",sync:"Sync",pasteCSS:"Paste CSS",save:"Save",run:"Run"},metadataTypes:{fileName:"File Name",contexts:"Contexts",path:"Path",folder:"Folder",sticker:"Sticker",color:"Color",created:"Created",lastModified:"Last Modified",extension:"Extension",size:"Size",tags:"Tags",inlinks:"Linked Mentions",outlinks:"Links",label:"Label",fileMetadata:"File Metadata",frontmatter:"Frontmatter"},filterTypes:{contains:"contains",notContains:"does not contain",is:"is",isNot:"is not",before:"before",after:"on or after",anyOf:"is any of",noneOf:"is none of",checked:"is checked",unchecked:"is unchecked",isEmpty:"is empty",isNotEmpty:"is not empty",isSameDate:"is same date",isSameDateAsToday:"today"},sortTypes:{alphaAsc:"A to Z",alphaDesc:"Z to A",earliest:"Earliest",latest:"Latest",checkAsc:"Checked \\u2192 Unchecked",checkDesc:"Unchecked \\u2192 Checked",itemsAsc:"Least Items",itemsDesc:"Most Items"},properties:{defaultField:"Name",audio:{label:"Audio",description:"Audio"},text:{label:"Text",description:"Text field"},number:{label:"Number",description:"Number field with optional unit"},boolean:{label:"Yes/No",description:"Yes or No toggle to indicate the status"},date:{label:"Date",description:"Select a date from a calendar"},option:{label:"Option",description:"Select one or multiple option from a list"},file:{label:"File"},link:{label:"Link",description:"Link to another note or a website"},tags:{label:"Tags",description:"Use tags to quickly organize your items"},object:{label:"Object",description:"Store any complex objects"},context:{label:"Relation",description:"Connect to another context property and create a relation"},image:{label:"Image",description:"Select any image from your system or from the internet"},color:{label:"Color",description:"Use colors to label your items or status"},space:{label:"Context",description:"Link to a context"},icon:{label:"Sticker",description:"Use stickers to uniquely label your items or status"},super:{label:"Super Property",links:"Open Link",properties:"Update Property",api:"API",obsidianCommands:"Run Command",runCommand:"Run Command",performAction:"Perform Action",whenClicked:"When Clicked"},fileProperty:{name:"Name",label:"Formula",createdTime:"Created",modifiedTime:"Last Edited",sticker:"Sticker",links:"Links",tags:"Tags",spaces:"Spaces",extension:"Extension",size:"Size",preview:"Note Preview",parentFolder:"Folder",description:"Use a formula to dynamically display a property"}},views:{navigator:"Navigator",explorer:"Explorer",space:"Space"},subViews:{spaceItems:"Items",spaceContext:"Context",spaceLists:"Lists",spaceActions:"Actions",spaceTemplates:"Templates",smartSearch:"Live Searches",filesAndFolders:"Files and Folders"},labels:{duplicateTable:"Duplicate Table",pinned:"Pinned",live:"Pinned by Live Search",moveTable:"Move Table",editFormula:"Edit Formula",editObject:"Edit Object",properties:"Properties",newAction:"Action",newTable:"List",template:"Template",createFolder:"New Folder Name",rename:"Rename",createNew:"New",default:"Default",done:"Done",changeCoverShort:"Change",reposition:"Reposition",tables:"Tables",selectDateFormat:"Select/Type Date Format",renameSection:"Edit Space",createSection:"New Folder",createNote:"New Note",contextMaker:"Context Maker",select:"Select",pinnedItems:"Pinned Items",collapse:"Collapse",expand:"Expand",all:"All",none:"None",view:"View",findStickers:"Find Sticker",mergeProperties:"Merge Properties",placeholder:"Type '\${1}' for commands",notePlaceholder:"New Note for \${1}",itemsSelected:"\${1} Selected",selectNote:"Select Note",selectIcon:"Select Icon",selectImage:"Select Image",selectSpace:"Select Space",styleSmall:"Small",styleMedium:"Medium",styleLarge:"Large",hiddenFilePattern:"Name, Suffixes and Extension",hiddenFileSpecific:"Exclude specific files and folders",textPlaceholder:"Enter Text",noFile:"is not created yet. Click to create.",navigatorSearchPlaceholder:"Search by Text or Filters",blinkPlaceholder:"Search for notes, spaces...",searchPlaceholder:"Type to search...",contextItemSelectPlaceholder:"Find Item",linkItemSelectPlaceholder:"Find or Create Note",pinNotePlaceholder:"Select a Note or Space to Pin",optionItemSelectPlaceholder:"Select Option",viewItemSelectPlaceholder:"Select View",tagItemSelectPlaceholder:"Find Tag",spaceSelectPlaceholder:"Select any Folder or Tag",propertyItemSelectPlaceholder:"Select Property",sortItemSelectPlaceholder:"Select Sort",filterItemSelectPlaceholder:"Select Filter",imageSelectPlaceholder:"Select an image or paste a URL",imageNotFoundPlaceholder:"No Images Found",syncFrontmatterProperty:"Sync Frontmatter Property",newProperty:"New Property",newPropertyShort:"New Property",propertyType:"Type",propertyDynamic:"Dyanmic",propertyValueSpace:"Space",propertyValueProperty:"Property",propertyLookup:"Edit Formula",existingFrontmatter:"Existing Property",dateFormat:"Date Format",propertyFileProp:"Property",multiple:"Multiple",filesCount:"{$1} Files",hiddenFiles:"Hidden Files",addExtension:"Add Rule",saveView:"Save View",saveTable:"Save Table",renameView:"Rename View",renameTable:"Rename Table",syncMetadata:"Sync Metadata",syncProperties:"Sync Properties",selectContext:"Select Context",metadata:"Metadata",backlinks:"Backlinks",spaces:"Spaces",contexts:"Contexts",content:"Content",deleteSpace:"Delete Space",deleteFiles:"Delete Files",outgoingLinks:"Outgoing Links",moveTo:"Move to",addTo:"Pin to",copyTo:"Copy to",reorderIn:"Reorder in",border:"Border",corners:"Corners",color:"Color",backgroundColor:"Background",cornerRadius:"Radius",onClick:"On Click",layout:"Layout",element:"Element",name:"Name",display:"Display",alignment:"Alignment",margin:"Margin",padding:"Padding",gap:"Gap",width:"Width",height:"Height",opacity:"Opacity",shadow:"Shadow",shadowBlur:"Blur",shadowSpread:"Spread",typography:"Typography",layers:"Layers",fontSize:"Size",props:"Props",styles:"Styles",events:"Events",code:"Code",selectedLayers:"\${1} Layers"},descriptions:{spaceActions:"Create actions that runs when you press a button",spaceLists:"Create lists to track data and organize them in your space",spaceItems:"Add new items to the space or pin items to the space",spaceTemplates:"Create templates to quickly add items to your space",smartSearch:"Automatically pin notes to this space based on a set of searches",hiddenFileOptions:"Exclude any files and folders by name, suffix or extension.",deleteSpace:"Deleting the space will also delete the folder and its contents.",deleteFiles:"Delete \${1} files/folders and their contents?",addContext:"Contexts lets you connect properties from your tags",spaceProperties:"Define Properties for your Space Items",syncMetadata:"Select which fields from your notes to start syncing with the context.",syncProperties:"Contexts defines and syncs the same fields across your notes depending on their folder or tag.",selectContext:"Select which folder or tag context you want to sync the fields."},flowView:{emptyDoc:"Empty Document",itemsCount:" Items",emptyFolder:"This Folder is Empty"},notice:{duplicateFile:"Folder already contains note with same name",addedToSection:"Added to Space",fileExists:"File Already Exists",folderExists:"Folder Already Exists",noPropertyName:"Property Name is Required",noPropertiesFound:"No Properties Found",duplicatePropertyName:"Duplicate Property Name",newSpaceName:"Enter a name for your space",duplicateSpaceName:"Space name already exists",cantConvertNoteToSpace:"The view is not a note",templateSaved:"Template saved to space: ",tableDeleted:"Table removed from note, you can find the table in the folder space"},settings:{layoutVertical:"Vertical",layoutHorizontal:"Horizontal",sectionSidebar:"Spaces",sectionEditor:"Maker Mode",sectionFlow:"Flow",sectionAdvanced:"Advanced",sectionDataview:"Dataview",sectionContext:"Context",sectionStickers:"Stickers",sectionNavigator:"Navigator",sectionDefault:"Default Spaces",sectionSpaceView:"Space View",sectionBlink:"Blink",sectionInlineContext:"Inline Context",sectionFlowBlock:"Flow Block",sectionFlowMenu:"Flow Menu",sectionFlowStyler:"Flow Styler",experimental:{name:"Experimental",desc:"Experimental features that are subject to change and may not be optimized for performance"},generateThumbnails:{name:"Generate Thumbnails",desc:"Create thumbnails for images to speed up performance"},minimalThemeFix:{name:"Minimal Theme Fix",description:"Apply fixes for the popular theme Minimal"},inlineStickerMenu:{name:"Inline Stickers",desc:"Add inline stickers by typing :"},openSpacesOnLaunch:{name:"Open Spaces as Default Tab",desc:"Open the Spaces tab when Obsidian launches"},defaultSpaceTemplate:{name:"Default Space Template",desc:"Select the default template for new spaces"},defaultDateFormat:{name:"Default Date Format",desc:"Set the default date format, example: yyyy-MM-dd (see https://date-fns.org/v2.30.0/docs/format)"},newNotePlaceholder:{name:"New Note Placeholder",desc:"Default name for new notes"},folderIndentationLines:{name:"Show Folder Indentation Lines",desc:"Turn on to show a line on the left of folders to indicate indentation"},folderNoteLocation:{name:"Folder Note Location Inside Folder",desc:"Turn on to have folder notes inside the folder, turn off to have it outside"},folderViewDefault:{name:"Show Folder Note by Default",desc:"Show the folder note by default when opening a folder"},internalLinkFlowEditor:{name:"Show Toggles to Open Flow Editor on Links",desc:"Turn on to toggle Flow Blocks directly in inline links"},internalLinkSticker:{name:"Show Stickers on Links",desc:"Turn on to toggle stickers shown directly by beside internal links"},syncContextToFrontmatter:{name:"Sync Context Fields to Frontmatter",desc:"Turn on to automatically save all context fields to frontmatter fields, not just existing frontmatter fields."},syncFormulaToFrontmatter:{name:"Sync Formula Fields to Frontmatter",desc:"Turn on to save calculated formula values to frontmatter fields."},inlineBacklinks:{name:"Show Inline Backlinks (Inline Context required)",desc:"Show editable backlinks at the bottom of your notes"},dataviewInlineContext:{name:"Show Dataview in Inline Context",desc:"Show dataview when inline context is enabled"},inlineContextExplorer:{name:"Inline Context",desc:"Display the context and a banner at the top of your notes"},inlineContextProperties:{name:"Inline Context Properties",desc:"Show the properties in the inline context"},inlineContextExpanded:{name:"Auto Expand Inline Context",desc:"Expand the inline context sections when opening a note"},inlineContextHorizontal:{name:"Inline Title and Sticker Layout",desc:"Layout for inline title and sticker in Inline Context"},hideFrontmatter:{name:"Hide Context Properties",desc:"Hide properties you have added in context from the Obsidian properties panel"},openFileContext:{name:"Auto Open Explorer",desc:"Automatically open explorer panel in the right panel"},folderNote:{name:"Enable Folder Note",desc:"Access the folder note in the folder page and hide the folder note from spaces"},folderNoteName:{name:"Folder Note Name",desc:"Name of the folder note, keep blank to use the same name as the folder"},expandFolder:{name:"Auto Expand Folder",desc:"Auto expand folders on click"},hoverPreview:{name:"Preview on Hover",desc:"Preview on Hover while holding Control/Command key"},activeFile:{name:"Reveal Active File",desc:"Automatically reveal the active file in Spaces"},contexts:{name:"Contexts",desc:"Contexts allows you to have full control over the metadata of your files"},spaces:{name:"Navigator",desc:"The navigator lets you create and organize your spaces"},spacesStickers:{name:"Stickers",desc:"Use Emojis to make it easier to find your notes"},spacesAlias:{name:"Alias",desc:"Use the alias metadata to show in Spaces"},spacesFileExplorerDual:{name:"Compatibility Mode",desc:"This will improve the compatibility of plugins while using Spaces"},spacesDeleteOption:{name:"Delete File Option",desc:"Select how you want files to be deleted"},spacesDeleteOptions:{permanant:"Delete Permanently",trash:"Move to Obsidian Trash","system-trash":"Move to System Trash"},flowState:{name:"Flow State",desc:"Toggle the flow state"},hideRibbon:{name:"App Ribbon",desc:"Show/hide the left menu aka. ribbon"},spaceView:{name:"Space View",desc:"Open the space view when you click on a space"},defaultSpaces:{name:"Default Spaces",desc:"Recommended spaces for quickly organizing your vault"},homeSpace:{name:"Home Space",desc:"An easy-to-access space where you can add/organize your other spaces"},tagSpaces:{name:"Tag Spaces",desc:"Automatically create spaces for each of your tags"},readableLineWidth:{name:"Readable Line Width",desc:"Use Readable Line Width"},sidebarTabs:{name:"Sidebar Tabs",desc:"Show/hide other sidebar tabs"},spacesPerformance:{name:"Performance Mode",desc:"Turn on performance mode for Spaces, may affect scrolling appearance. Requires Restart"},indexSVG:{name:"Use SVGs as Stickers",desc:"Use any svg file in your vault as a sticker"},inlineStyler:{name:"Flow Styler",desc:"Select text to add styling"},inlineStylerColor:{name:"Text and Highlight Colors \\u{1F9EA}",desc:"Select text color and highlight color, (this may change in the future because of the limitations with HTML and Obsidian)"},spaceRowHeight:{name:"Row Height",desc:"The height for each row in spaces (in pixels), default is 29"},contextPagination:{name:"Table View Pagination",desc:"Number of items per page in table view"},coverHeight:{name:"Cover Height",desc:"The height for the cover of the note or space, default is 200"},makeChar:{name:"Flow Menu Trigger",desc:"Character to open the Flow Menu"},mobileMakeBar:{name:"Flow Styler (Mobile)",desc:"Replaces the mobile toolbar"},editorMarkSans:{name:"Mark Sans \\u{1F9EA}",desc:"Use the editor without Markdown."},editorMakerMode:{name:"Flow (Beta)",desc:"An integrated and intuitive editor experience"},editorMakePlacholder:{name:"Flow Menu Hint Text",desc:"Show a hint text on how to open the Flow Menu Shortcut"},blink:{name:"Blink",desc:"A faster way to search and edit your notes"},editorMakeMenu:{name:"Flow Menu",desc:"Open the Flow menu to quickly add content"},editorMakeMenuTrigger:{name:"Flow Menu Shortcut",desc:"Trigger key to use flow menu"},editorFlowReplace:{name:"Flow Block",desc:"Open your internal links or toggle your embeds in the flow block."},editorFlowStyle:{name:"Flow Block Style",desc:"Select a theme for your flow block",seamless:"Seamless",minimal:"Minimal"}}}};this.lang="en";let r=o5.default.locale();["en"].includes(r)&&(this.lang=r)}get texts(){return this.all.en}},Ur=new _S().texts;var OS=e=>e.lastIndexOf("/")!=-1?e.lastIndexOf(".")!=-1?CA(e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("."))):e.substring(e.lastIndexOf("/")+1):e.lastIndexOf(".")!=-1?e.substring(0,e.lastIndexOf(".")):e;var zZ=ma(cm());var IZ=(e,r)=>{let t=a=>a=="builtin"?"Builtin":a=="api"?"Spaces":"Action";return[...(e.actionsIndex.get(r)??[]).map(a=>({name:a.schema.name,description:"Action",value:\`\${r}/#;\${a.schema.id}\`,section:"Action"}))??[],...[...e.cli.allCommands()].map(a=>({name:a.schema.name,description:t(a.schema.type),value:a.path,section:t(a.schema.type)}))]};var s5=({field:e,value:r})=>r=="ctime"?{value:"parseDate(prop('File')['metadata']['ctime'])",type:"date"}:{value:"",type:"string"},px=(e,r,t,a)=>{let n=Dc(e);if(n)return r=="fileprop"&&n.field?s5(n):(r=="option"&&n.source?.length>0&&(n.source=="$commands"?n.options=t.cli.allCommands():n.source=="$links"?n.options=t.spaceManager.allPaths().map(i=>({name:i,value:i})):n.source=="$super"?n.options=IZ(t,a):n.source=="$properties"&&(n.options=t.contextsIndex.get(a)?.contextTable?.cols?.map(i=>({name:i.name,value:i.name}))??[])),[...u5(r).configKeys??[],"alias","default"].reduce((i,s)=>({...i,[s]:n[s]}),{}));if(!r)return{};if(!n)if(r=="context")e?.length>0?n={space:e}:n={};else if(r.startsWith("date"))e?.length>0?n={format:e}:n={};else if(r.startsWith("fileprop"))if(e?.length>0){let[i,s]=e.split(".");n=s5({field:i,value:s})}else n={};else r.startsWith("option")&&(e?.length>0?n={options:gn(e).map(s=>({name:s,value:s}))}:n={});return n??{}};var u5=(e,r)=>r==qn?Af.find(t=>t.type=="file"):r=="tags"?Af.find(t=>t.type=="tags-multi"):r=="aliases"?Af.find(t=>t.type=="option-multi"):r=="sticker"?Af.find(t=>e=="icon"):Af.find(t=>e==t.type)||Af.find(t=>e==t.multiType),Af=[{type:"unknown",label:"",restricted:!0,icon:"ui//file-question"},{type:"any",label:"",restricted:!0,icon:"ui//wildcard",multi:!0,multiType:"any-multi"},{type:"text",label:Ur.properties.text.label,metadata:!0,icon:"ui//text",primative:!0,description:Ur.properties.text.description},{type:"number",label:Ur.properties.number.label,metadata:!0,icon:"ui//binary",configKeys:["unit"],primative:!0,description:Ur.properties.number.description},{type:"boolean",label:Ur.properties.boolean.label,metadata:!0,icon:"ui//check-square",primative:!0,description:Ur.properties.boolean.description},{type:"date",label:Ur.properties.date.label,metadata:!0,icon:"ui//calendar",configKeys:["format"],primative:!0,description:Ur.properties.date.description},{type:"option",label:Ur.properties.option.label,multi:!0,multiType:"option-multi",icon:"ui//list",configKeys:["options","source"],description:Ur.properties.option.description},{type:"tags-multi",label:Ur.properties.tags.label,icon:"ui//tags",description:Ur.properties.tags.description},{type:"file",label:Ur.properties.file.label,restricted:!0,icon:"ui//mk-make-h3"},{type:"fileprop",label:Ur.properties.fileProperty.label,icon:"ui//formula",configKeys:["field","value","type"],description:Ur.properties.fileProperty.description},{type:"link",label:Ur.properties.link.label,multi:!0,multiType:"link-multi",metadata:!0,icon:"ui//file-text",primative:!0,description:Ur.properties.link.description},{type:"context",label:Ur.properties.context.label,icon:"ui//mk-make-note",multi:!0,multiType:"context-multi",configKeys:["space"],description:Ur.properties.context.description},{type:"object",label:Ur.properties.object.label,multi:!0,multiType:"object-multi",metadata:!0,icon:"ui//list-tree",configKeys:["type","typeName"],description:Ur.properties.object.description},{type:"icon",label:Ur.properties.icon.label,multi:!0,multiType:"icon-multi",icon:"ui//gem",restricted:!0,primative:!0,description:Ur.properties.icon.description},{type:"image",label:Ur.properties.image.label,multi:!0,multiType:"image-multi",metadata:!0,icon:"ui//mk-make-image",primative:!0,description:Ur.properties.image.description},{type:"color",label:Ur.properties.color.label,icon:"ui//mk-make-image",restricted:!0,description:Ur.properties.color.description},{type:"space",label:Ur.properties.space.label,icon:"ui//layout-grid",restricted:!0,description:Ur.properties.space.description},{type:"table",label:Ur.properties.space.label,icon:"ui//layout-grid",restricted:!0,description:Ur.properties.space.description},{type:"super",label:Ur.properties.super.label,icon:"ui//zap",restricted:!0,configKeys:["dynamic","field"]},{type:"input",label:Ur.properties.super.label,icon:"ui//input",restricted:!0}];var li="files",Cf={id:li,name:"Items",type:"db",primary:"true"},RZ="filesView",kZ={id:RZ,name:"All",type:"view",def:JSON.stringify({db:li,icon:"ui//file-stack"})},qZ="main",LZ=e=>({id:e,name:e,type:"frame",def:"",predicate:"",primary:"true"}),F4e={uniques:[],cols:["id","name","type","def","predicate","primary"],rows:[LZ(qZ),kZ]},dx={uniques:[],cols:["id","name","type","def","predicate","primary"],rows:[Cf]},f5={uniques:["name,schemaId"],cols:["name","schemaId","type","value","attrs","hidden","unique","primary"]},Mf={...f5,rows:[{name:qn,schemaId:li,type:"file",primary:"true",hidden:"",unique:"",attrs:"",value:""},{name:Ur.properties.fileProperty.createdTime,schemaId:li,type:"fileprop",value:qn+".ctime",hidden:"",unique:"",attrs:"",primary:"true"}]};var _4e=[{name:Ur.properties.defaultField,schemaId:"",type:"text",primary:"true"}],BS={...f5,rows:[{name:qn,schemaId:li,type:"file",primary:"true",hidden:"",unique:"",attrs:"",value:""}]};var O4e={schema:Cf,cols:Mf.rows,rows:[]},B4e={schema:Cf,cols:Mf.rows,rows:[]},P4e={schema:Cf,cols:BS.rows,rows:[]},c5=(e,r)=>e.filter(t=>r.find(a=>a.id==t.schemaId&&a.type=="db")).reduce((t,a)=>({...t,...t[a.schemaId]?{[a.schemaId]:{uniques:a.unique=="true"?[...t[a.schemaId].uniques,a.name]:t[a.schemaId].uniques,cols:[...t[a.schemaId].cols,a.name],rows:[]}}:{[a.schemaId]:{uniques:a.unique=="true"?[a.name]:[],cols:[a.name],rows:[]}}}),{});var I4e={m_schema:dx,m_fields:Mf,...c5(Mf.rows,dx.rows)},R4e={m_schema:dx,m_fields:BS,...c5(BS.rows,dx.rows)};var hx="spaces://$",l5="spaces://$tags";var gRe={name:Ur.menu.vault,readOnly:!1,path:"/",label:{thumbnail:"",name:Ur.menu.vault,sticker:"ui//vault",color:""},type:"default"},vx={tags:{name:"Tags",icon:"ui//tags",readOnly:!1,hidden:!1},overview:{name:"Overview",icon:"ui//overview",readOnly:!0,hidden:!0}};var m5=(e,r,t,a,n,i,s)=>{if(!t)return"";let l=new Map;Object.keys(n).forEach(o=>l.set(o,n[o])),l.set("$properties",a),l.set("$paths",r),i&&l.set("$current",i);let c;try{e.evaluate("current = _current()",l),c=e.evaluate(t,l),c=Ds("",c)}catch(o){if(c="",s)throw o;console.log(i,t,o)}return c};var PS=e=>{let r=new Map;e.filter(s=>s.type=="fileprop"||s.name.startsWith("tags")).forEach(s=>{let{value:l}=px(s.value,s.type),c=[];try{let u=Wa(l).filter(m=>m.type=="FunctionNode").filter(m=>m.fn.name=="prop"&&m.args[0].type=="ConstantNode").map(m=>m.args[0]?.value);c.push(...u)}catch{}let o=s.name;r.has(o)||r.set(o,new Set);for(let u of c){let m=u;m!==o&&r.get(o).add(m)}});let t=new Set,a=[],n=new Set,i=s=>{if(n.has(s))throw new Error("Circular dependency detected");if(!t.has(s)){n.add(s);let l=r.get(s)||new Set;for(let c of l)i(c);t.add(s),n.delete(s),a.push(s)}};for(let s of e)t.has(s.name)||i(s.name);return a},p5=(e,r,t,a,n,i)=>{if(!t)return{};let s=i??PS(a),l=r.get(t[qn])?.metadata?.property??{},c=Object.keys(l).filter(m=>a.some(d=>d.name==m)&&m!=qn).reduce((m,d)=>({...m,[d]:Ds(d,l[d])}),{}),o=s.map(m=>a.find(d=>d.name==m)).filter(m=>m&&(m.type=="fileprop"||m.name=="tags")),u=a.reduce((m,d)=>({...m,[d.name]:d}),{});return{...t,...c,...o.reduce((m,d)=>{let{value:h}=px(d.value,d.type);return{...m,[d.name]:m5(e,r,h,u,{...t,...m},n)}},{})}};var d5=(e,r)=>{let t=e?gn(e):[],a=r?gn(r):[];return a.every(n=>t.some(i=>i==n))&&t.every(n=>a.some(i=>i==n))},Ef=(e,r)=>e==r,IS=(e,r)=>(e??"").length==0,RS=(e,r)=>(e??"").toLowerCase().includes((r??"").toLowerCase()),kS=(e,r)=>parseFloat(e)>parseFloat(r),qS=(e,r)=>parseInt(e){let t=isNaN(Date.parse(e))?new Date(parseInt(e)):new Date(e),a=isNaN(Date.parse(r))?new Date(parseInt(r)):new Date(r);return t.valueOf()>=a.valueOf()},v5=(e,r)=>{let t=isNaN(Date.parse(e))?new Date(parseInt(e)):new Date(e),a=isNaN(Date.parse(r))?new Date(parseInt(r)):new Date(r);return t.valueOf(){let t=e?gn(e):[],a=r?gn(r):[];return t.length==0?!1:a.some(n=>t.some(i=>i==n))},g5=(e,r)=>{if(!e)return!1;let t=new Date(\`\${e.toString().replace(".",":")}\`),a=new Date(\`\${r}\`);return t.getMonth()===a.getMonth()&&t.getDate()===a.getDate()},y5=e=>{if(!e)return!1;let r=new Date(\`\${e.toString()}T00:00\`),t=new Date;return r.getMonth()===t.getMonth()&&r.getDate()===t.getDate()};var Tf={isNotEmpty:{type:["text","file","number","option","option-multi","link","link-multi","image"],fn:(e,r)=>!IS(e,""),valueType:"none"},isEmpty:{type:["text","file","number","option","option-multi","link","link-multi","image"],fn:(e,r)=>IS(e,""),valueType:"none"},include:{fn:(e,r)=>RS(e,r),type:["text","file","link","image"],valueType:"text"},notInclude:{type:["text","file","link","image"],fn:(e,r)=>!RS(e,r),valueType:"text"},is:{type:["text"],fn:(e,r)=>Ef(e,r),valueType:"text"},isNot:{type:["text"],fn:(e,r)=>!Ef(e,r),valueType:"text"},equal:{type:["number"],fn:(e,r)=>Ef(e,r),valueType:"number"},isLink:{type:["link","context"],fn:(e,r)=>Ef(e,r),valueType:"link"},isNotLink:{type:["link","context"],fn:(e,r)=>!Ef(e,r),valueType:"link"},isGreatThan:{type:["number"],fn:(e,r)=>kS(e,r),valueType:"number"},isLessThan:{type:["number"],fn:(e,r)=>qS(e,r),valueType:"number"},isLessThanOrEqual:{type:["number"],fn:(e,r)=>!kS(e,r),valueType:"number"},isGreatThanOrEqual:{type:["number"],fn:(e,r)=>!qS(e,r),valueType:"number"},dateBefore:{type:["date"],fn:(e,r)=>v5(e,r),valueType:"date"},dateAfter:{type:["date"],fn:(e,r)=>h5(e,r),valueType:"date"},isSameDate:{type:["date"],fn:(e,r)=>g5(e,r),valueType:"date"},isSameDateAsToday:{type:["date"],fn:(e,r)=>y5(e,r),valueType:"none"},isExactList:{type:["option","option-multi","link-multi","context-multi","tags-multi"],fn:(e,r)=>d5(e,r),valueType:"list"},isAnyInList:{type:["option","context","link","option-multi","link-multi","context-multi","tags-multi"],fn:(e,r)=>LS(e,r),valueType:"list"},isNoneInList:{type:["option","context","link","option-multi","link-multi","context-multi","tags-multi"],fn:(e,r)=>!LS(e,r),valueType:"list"},isTrue:{type:["boolean"],fn:(e,r)=>e=="true",valueType:"none"},isFalse:{type:["boolean"],fn:(e,r)=>e!="true",valueType:"none"}};var WZ=(e,r,t)=>r.reduce((n,i)=>{let[s,l]=n,c=i.type=="context"?x5(l,i,t):i.type=="path"?w5(l,i,t):i.type=="frontmatter"?b5(l,i,t):D5(l,i,t),o=l.filter(u=>!c.includes(u));return[[...s,...c],o]},[[],e])[0],YZ=(e,r,t)=>r.reduce((a,n)=>n.type=="context"?x5(a,n,t):n.type=="path"?w5(a,n,t):n.type=="frontmatter"?b5(a,n,t):D5(a,n,t),e),x5=(e,r,t)=>{let a=Tf[r.fn];return!a||a.valueType!="none"&&r.value.length==0?[]:e.filter(n=>{let[i,s]=r.field.split("."),l=n.metadata?.property;if(!n.spaces?.includes(i)||!l||!l[s])return!1;let c=!0;if(a){let o=r.fType=="property"?t[r.value]:r.value;c=a.fn(Ds(s,l[s]),o)}return c})},b5=(e,r,t)=>{let a=Tf[r.fn];return!a||a.valueType!="none"&&r.value.length==0?[]:e.filter(n=>{let i=n.metadata?.property;if(!i||i[r.field]===void 0)return!1;let s=!0;if(a){let l=r.fType=="property"?t[r.value]:r.value;s=a.fn(Ds(r.field,i[r.field]),l)}return s})},w5=(e,r,t)=>{let a=Tf[r.fn];return!a||a.valueType!="none"&&r.value.length==0?[]:e.filter(n=>{let i="";r.field=="outlinks"?i=ws(n.outlinks??[]):r.field=="inlinks"?i=ws(n.metadata?.inlinks??[]):r.field=="tags"&&(i=ws(n.tags??[]));let s=!0;if(a){let l=r.fType=="property"?t[r.value]:r.value;s=a.fn(i,l)}return s})},D5=(e,r,t)=>{let a=Tf[r.fn];return!a||a.valueType!="none"&&r.value.length==0?[]:e.filter(n=>{let i=!0;if(a){let s=r.fType=="property"?t[r.value]:r.value;i=a.fn(n.metadata?.[r.type]?.[r.field],s)}return i})},S5=(e,r,t)=>e.reduce((n,i)=>!n||i.filters.length==0?!1:i.type=="any"?WZ([r],i.filters,t).length>0:YZ([r],i.filters,t).length>0,!0);var N5=(e,r)=>e.hiddenExtensions.some(t=>r.endsWith(t))||r.endsWith("/"+e.spaceSubFolder)||r==e.spaceSubFolder||r.split("/").pop()==e.spaceSubFolder||r.startsWith(e.spacesFolder+"/#")||e.hiddenFiles.some(t=>t==r);var A5=(e,r,t,a,n,i)=>{let s={};if(!e)return{changed:!1,cache:null};if(!r)return{changed:!1,cache:{path:e.path,schemas:[],outlinks:[],contexts:[],paths:[],contextTable:null,spaceMap:s,dbExists:!1}};let l=Object.values(r).map(D=>D.schema),c=r[li]?.cols;(!c||c.length==0)&&(c=Mf.rows);let o=r[li]?.schema??Cf,u=r[li]?.rows?.map(D=>D[qn])??[],m=t.filter(D=>!u.includes(D)),d=[...AA(t??[],u),...m],h=PS(c),y=[...(r[li]?.rows??[]).filter(D=>t.includes(D[qn])),...m.map(D=>({[qn]:D}))].map(D=>p5(i,n,D,c,n.get(e.path),h)),v={schema:o,cols:c,rows:y},x=v.cols?.filter(D=>D.type.startsWith("context"))??[],w=v.cols?.filter(D=>D.type.startsWith("link"))??[],C=pa(x.map(D=>D.value));x.forEach(D=>{s[D.name]={},v.rows.forEach(O=>{gn(O[D.name]).forEach(_=>s[D.name][_]=[...s[D.name][_]??[],O[qn]])})});let b=pa(v.rows.reduce((D,O)=>pa([...D,...[...x,...w].flatMap(_=>gn(O[_.name]).map(E=>Sc(E)))]),[])),A={contextTable:v,path:e.path,contexts:C,outlinks:b,paths:d,schemas:l,spaceMap:s,dbExists:a},M=!1;return zS.default.isEqual(v,r[li])||(M=!0),{changed:M,cache:A}},M5=(e,r,t,a)=>{let n={};for(let[i,s]of e){let l=r.enableFolderNote?t.get(i)?.space.notePath??i:i,c=e.get(l)??s;if(!s)continue;let o=s?.parent??"",u=s?.type??"",m=s?.subtype??"",d=t.has(i)?t.get(i).space.name:s?.label?.name,h=a?.get(i),{changed:y,cache:v}=US(i,r,t,c,d,u,m,o,h);n[i]={changed:y,cache:v}}return n},US=(e,r,t,a,n,i,s,l,c)=>{let o=(G,W,q)=>G?.length>0||G?.length>0?G:W=="space"?q=="Spaces/Home"?"ui//home":q=="/"?"ui//vault":q.startsWith("spaces://")?"ui//tags":"ui//folder":"ui//file",u={label:a?.label,path:e,name:OS(e),readOnly:a?.readOnly},m=[],d=a?.tags?.map(G=>G)??[],h=N5(r,e);if(e.startsWith(hx)){let G=e.replace(hx,"");h=vx[G]?.hidden,u.readOnly=vx[G]?.readOnly}let y=(G,W,q=new Set)=>{let k=[];for(let K of W){let z=G.get(K)?.contexts??[];for(let oe of z)q.has(oe)||(k.push(oe),q.add(oe),k.push(...y(G,[wc(oe)],q)))}return k};if(t.has(l))for(let G of t.get(l).contexts??[])m.push(G);m.push(...d),e=="/"&&(n=r.systemName);let v=a?.property?fm(a.property[r.fmKeyAlias]):[],x=o(a?.label?.sticker,i,e),w=a?.label?.color??"",C=a?.resolvedLinks??[],b=!1,A,M={...u,name:n,tags:pa(m),type:i,subtype:s,parent:l,label:{name:r.spacesUseAlias&&v?.length>0?v[0]:n,sticker:x,color:w,thumbnail:a?.label?.thumbnail??"",preview:a?.label?.preview??""},metadata:{...a},outlinks:C},D=[],O=[],_=[];s=="tag"&&D.push(l5);for(let G of m)D.push(wc(G));let E=new Set,T=(G,W)=>{if(!E.has(G)){if(E.add(G),W.dependencies?.length>0)for(let q of W.dependencies)t.has(q)&&T(q,t.get(q));if(W.metadata.recursive?.length>0&&M.path.startsWith(W.path+"/")){if(W.metadata.recursive=="all"){D.push(G);return}else if(W.metadata.recursive=="file"&&M.type!="space"){D.push(G);return}}if(W.space.notePath==e&&W.path!=W.space.notePath&&(b=!0,A=W.path,h=!0),s!="tag"&&s!="default"&&W.space&&W.space.path==l){D.push(G);return}if(W.metadata?.filters?.length>0&&S5(W.metadata.filters,{...M,spaces:D},W.properties)){D.push(G),_.push(G);return}if(W.metadata?.links?.length>0&&(W.metadata?.links??[]).find(k=>k==M.path)){D.push(G),O.push(G);return}}};for(let[G,W]of t)T(G,W);let R=y(t,D);D.push(...R.map(G=>wc(G))),M.tags.push(...R),b&&(M.metadata.spacePath=A);let L=h?{...M,spaces:[],hidden:h}:{...M,spaces:pa(D),linkedSpaces:O,liveSpaces:_,hidden:h},H=!0;return c&&zS.default.isEqual(L,c)&&(H=!1),{changed:H,cache:L}};function C5(e){let{path:r,settings:t,spacesCache:a,pathMetadata:n,name:i,type:s,subtype:l,parent:c,oldMetadata:o}=e;return US(r,t,a,n,i,s,l,c,o)}function WS(e,r){let{space:t,mdb:a,paths:n,dbExists:i,pathsIndex:s}=e;return A5(t,a,n,i,s,r)}function E5(e,r){let{map:t,pathsIndex:a}=e,n=new Map;for(let[i,s]of t)n.set(i,WS({...s,pathsIndex:a},r));return n}function T5(e){let{pathCache:r,settings:t,spacesCache:a,oldMetadata:n}=e;return M5(r,t,a,n)}var HZ=self,$Z={...CS,createAdd:F("add",[],()=>function(r,t){return r+t}),createEqual:F("equal",[],()=>function(r,t){return r==t}),createUnequal:F("unequal",[],()=>function(r,t){return r!=t})},GZ={matrix:"Array"},YS=mx($Z,GZ);YS.import(Ub,{override:!0});HZ.onmessage=async e=>{let{payload:r,job:t}=e.data,a;t.type=="path"?a=C5(r):t.type=="context"?a=WS(r,YS):t.type=="contexts"?a=E5(r,YS):t.type=="paths"&&(a=T5(r));try{postMessage({job:t,result:a})}catch(n){console.log(n),postMessage({job:t,result:{$error:\`Failed to index \${t.type} \${t.path}: \${n}\`}})}}; +In case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated.\`,examples:["quantileSeq([3, -1, 5, 7], 0.5)","quantileSeq([3, -1, 5, 7], [1/3, 2/3])","quantileSeq([3, -1, 5, 7], 2)","quantileSeq([-1, 3, 5, 7], 0.5, true)"],seealso:["mean","median","min","max","prod","std","sum","variance"]};var c3={name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, dimension)","std(A, normalization)","std(A, dimension, normalization)"],description:'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["std(2, 4, 6)","std([2, 4, 6, 8])",'std([2, 4, 6, 8], "uncorrected")','std([2, 4, 6, 8], "biased")',"std([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","prod","sum","variance"]};var l3={name:"cumsum",category:"Statistics",syntax:["cumsum(a, b, c, ...)","cumsum(A)"],description:"Compute the cumulative sum of all values.",examples:["cumsum(2, 3, 4, 1)","cumsum([2, 3, 4, 1])","cumsum([1, 2; 3, 4])","cumsum([1, 2; 3, 4], 1)","cumsum([1, 2; 3, 4], 2)"],seealso:["max","mean","median","min","prod","std","sum","variance"]};var m3={name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)","sum(A, dimension)"],description:"Compute the sum of all values.",examples:["sum(2, 3, 4, 1)","sum([2, 3, 4, 1])","sum([2, 5; 4, 3])"],seealso:["max","mean","median","min","prod","std","sum","variance"]};var p3={name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, dimension)","variance(A, normalization)","variance(A, dimension, normalization)"],description:'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["variance(2, 4, 6)","variance([2, 4, 6, 8])",'variance([2, 4, 6, 8], "uncorrected")','variance([2, 4, 6, 8], "biased")',"variance([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","std","sum"]};var d3={name:"corr",category:"Statistics",syntax:["corr(A,B)"],description:"Compute the correlation coefficient of a two list with values, For matrices, the matrix correlation coefficient is calculated.",examples:["corr([2, 4, 6, 8],[1, 2, 3, 6])","corr(matrix([[1, 2.2, 3, 4.8, 5], [1, 2, 3, 4, 5]]), matrix([[4, 5.3, 6.6, 7, 8], [1, 2, 3, 4, 5]]))"],seealso:["max","mean","min","median","min","prod","std","sum"]};var h3={name:"acos",category:"Trigonometry",syntax:["acos(x)"],description:"Compute the inverse cosine of a value in radians.",examples:["acos(0.5)","acos(cos(2.3))"],seealso:["cos","atan","asin"]};var v3={name:"acosh",category:"Trigonometry",syntax:["acosh(x)"],description:"Calculate the hyperbolic arccos of a value, defined as \`acosh(x) = ln(sqrt(x^2 - 1) + x)\`.",examples:["acosh(1.5)"],seealso:["cosh","asinh","atanh"]};var g3={name:"acot",category:"Trigonometry",syntax:["acot(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acot(0.5)","acot(cot(0.5))","acot(2)"],seealso:["cot","atan"]};var y3={name:"acoth",category:"Trigonometry",syntax:["acoth(x)"],description:"Calculate the hyperbolic arccotangent of a value, defined as \`acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2\`.",examples:["acoth(2)","acoth(0.5)"],seealso:["acsch","asech"]};var x3={name:"acsc",category:"Trigonometry",syntax:["acsc(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acsc(2)","acsc(csc(0.5))","acsc(0.5)"],seealso:["csc","asin","asec"]};var b3={name:"acsch",category:"Trigonometry",syntax:["acsch(x)"],description:"Calculate the hyperbolic arccosecant of a value, defined as \`acsch(x) = ln(1/x + sqrt(1/x^2 + 1))\`.",examples:["acsch(0.5)"],seealso:["asech","acoth"]};var w3={name:"asec",category:"Trigonometry",syntax:["asec(x)"],description:"Calculate the inverse secant of a value.",examples:["asec(0.5)","asec(sec(0.5))","asec(2)"],seealso:["acos","acot","acsc"]};var D3={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]};var S3={name:"asin",category:"Trigonometry",syntax:["asin(x)"],description:"Compute the inverse sine of a value in radians.",examples:["asin(0.5)","asin(sin(0.5))"],seealso:["sin","acos","atan"]};var N3={name:"asinh",category:"Trigonometry",syntax:["asinh(x)"],description:"Calculate the hyperbolic arcsine of a value, defined as \`asinh(x) = ln(x + sqrt(x^2 + 1))\`.",examples:["asinh(0.5)"],seealso:["acosh","atanh"]};var A3={name:"atan",category:"Trigonometry",syntax:["atan(x)"],description:"Compute the inverse tangent of a value in radians.",examples:["atan(0.5)","atan(tan(0.5))"],seealso:["tan","acos","asin"]};var M3={name:"atan2",category:"Trigonometry",syntax:["atan2(y, x)"],description:"Computes the principal value of the arc tangent of y/x in radians.",examples:["atan2(2, 2) / pi","angle = 60 deg in rad","x = cos(angle)","y = sin(angle)","atan2(y, x)"],seealso:["sin","cos","tan"]};var C3={name:"atanh",category:"Trigonometry",syntax:["atanh(x)"],description:"Calculate the hyperbolic arctangent of a value, defined as \`atanh(x) = ln((1 + x)/(1 - x)) / 2\`.",examples:["atanh(0.5)"],seealso:["acosh","asinh"]};var E3={name:"cos",category:"Trigonometry",syntax:["cos(x)"],description:"Compute the cosine of x in radians.",examples:["cos(2)","cos(pi / 4) ^ 2","cos(180 deg)","cos(60 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["acos","sin","tan"]};var T3={name:"cosh",category:"Trigonometry",syntax:["cosh(x)"],description:"Compute the hyperbolic cosine of x in radians.",examples:["cosh(0.5)"],seealso:["sinh","tanh","coth"]};var F3={name:"cot",category:"Trigonometry",syntax:["cot(x)"],description:"Compute the cotangent of x in radians. Defined as 1/tan(x)",examples:["cot(2)","1 / tan(2)"],seealso:["sec","csc","tan"]};var _3={name:"coth",category:"Trigonometry",syntax:["coth(x)"],description:"Compute the hyperbolic cotangent of x in radians.",examples:["coth(2)","1 / tanh(2)"],seealso:["sech","csch","tanh"]};var O3={name:"csc",category:"Trigonometry",syntax:["csc(x)"],description:"Compute the cosecant of x in radians. Defined as 1/sin(x)",examples:["csc(2)","1 / sin(2)"],seealso:["sec","cot","sin"]};var B3={name:"csch",category:"Trigonometry",syntax:["csch(x)"],description:"Compute the hyperbolic cosecant of x in radians. Defined as 1/sinh(x)",examples:["csch(2)","1 / sinh(2)"],seealso:["sech","coth","sinh"]};var P3={name:"sec",category:"Trigonometry",syntax:["sec(x)"],description:"Compute the secant of x in radians. Defined as 1/cos(x)",examples:["sec(2)","1 / cos(2)"],seealso:["cot","csc","cos"]};var I3={name:"sech",category:"Trigonometry",syntax:["sech(x)"],description:"Compute the hyperbolic secant of x in radians. Defined as 1/cosh(x)",examples:["sech(2)","1 / cosh(2)"],seealso:["coth","csch","cosh"]};var R3={name:"sin",category:"Trigonometry",syntax:["sin(x)"],description:"Compute the sine of x in radians.",examples:["sin(2)","sin(pi / 4) ^ 2","sin(90 deg)","sin(30 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["asin","cos","tan"]};var k3={name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]};var q3={name:"tan",category:"Trigonometry",syntax:["tan(x)"],description:"Compute the tangent of x in radians.",examples:["tan(0.5)","sin(0.5) / cos(0.5)","tan(pi / 4)","tan(45 deg)"],seealso:["atan","sin","cos"]};var L3={name:"tanh",category:"Trigonometry",syntax:["tanh(x)"],description:"Compute the hyperbolic tangent of x in radians.",examples:["tanh(0.5)","sinh(0.5) / cosh(0.5)"],seealso:["sinh","cosh"]};var z3={name:"to",category:"Units",syntax:["x to unit","to(x, unit)"],description:"Change the unit of a value.",examples:["5 inch to cm","3.2kg to g","16 bytes in bits"],seealso:[]};var U3={name:"bin",category:"Utils",syntax:["bin(value)"],description:"Format a number as binary",examples:["bin(2)"],seealso:["oct","hex"]};var W3={name:"clone",category:"Utils",syntax:["clone(x)"],description:"Clone a variable. Creates a copy of primitive variables,and a deep copy of matrices",examples:["clone(3.5)","clone(2 - 4i)","clone(45 deg)","clone([1, 2; 3, 4])",'clone("hello world")'],seealso:[]};var Y3={name:"format",category:"Utils",syntax:["format(value)","format(value, precision)"],description:"Format a value of any type as string.",examples:["format(2.3)","format(3 - 4i)","format([])","format(pi, 3)"],seealso:["print"]};var H3={name:"hasNumericValue",category:"Utils",syntax:["hasNumericValue(x)"],description:"Test whether a value is an numeric value. In case of a string, true is returned if the string contains a numeric value.",examples:["hasNumericValue(2)",'hasNumericValue("2")','isNumeric("2")',"hasNumericValue(0)","hasNumericValue(bignumber(500))","hasNumericValue(fraction(0.125))","hasNumericValue(2 + 3i)",'hasNumericValue([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","isNumeric"]};var $3={name:"hex",category:"Utils",syntax:["hex(value)"],description:"Format a number as hexadecimal",examples:["hex(240)"],seealso:["bin","oct"]};var G3={name:"isInteger",category:"Utils",syntax:["isInteger(x)"],description:"Test whether a value is an integer number.",examples:["isInteger(2)","isInteger(3.5)","isInteger([3, 0.5, -2])"],seealso:["isNegative","isNumeric","isPositive","isZero"]};var V3={name:"isNaN",category:"Utils",syntax:["isNaN(x)"],description:"Test whether a value is NaN (not a number)",examples:["isNaN(2)","isNaN(0 / 0)","isNaN(NaN)","isNaN(Infinity)"],seealso:["isNegative","isNumeric","isPositive","isZero"]};var Z3={name:"isNegative",category:"Utils",syntax:["isNegative(x)"],description:"Test whether a value is negative: smaller than zero.",examples:["isNegative(2)","isNegative(0)","isNegative(-4)","isNegative([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isPositive","isZero"]};var Q3={name:"isNumeric",category:"Utils",syntax:["isNumeric(x)"],description:"Test whether a value is a numeric value. Returns true when the input is a number, BigNumber, Fraction, or boolean.",examples:["isNumeric(2)",'isNumeric("2")','hasNumericValue("2")',"isNumeric(0)","isNumeric(bignumber(500))","isNumeric(fraction(0.125))","isNumeric(2 + 3i)",'isNumeric([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","hasNumericValue"]};var X3={name:"isPositive",category:"Utils",syntax:["isPositive(x)"],description:"Test whether a value is positive: larger than zero.",examples:["isPositive(2)","isPositive(0)","isPositive(-4)","isPositive([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isNegative","isZero"]};var J3={name:"isPrime",category:"Utils",syntax:["isPrime(x)"],description:"Test whether a value is prime: has no divisors other than itself and one.",examples:["isPrime(3)","isPrime(-2)","isPrime([2, 17, 100])"],seealso:["isInteger","isNumeric","isNegative","isZero"]};var K3={name:"isZero",category:"Utils",syntax:["isZero(x)"],description:"Test whether a value is zero.",examples:["isZero(2)","isZero(0)","isZero(-4)","isZero([3, 0, -2, 0])"],seealso:["isInteger","isNumeric","isNegative","isPositive"]};var j3={name:"numeric",category:"Utils",syntax:["numeric(x)"],description:"Convert a numeric input to a specific numeric type: number, BigNumber, or Fraction.",examples:['numeric("4")','numeric("4", "number")','numeric("4", "BigNumber")','numeric("4", "Fraction")','numeric(4, "Fraction")','numeric(fraction(2, 5), "number")'],seealso:["number","fraction","bignumber","string","format"]};var eB={name:"oct",category:"Utils",syntax:["oct(value)"],description:"Format a number as octal",examples:["oct(56)"],seealso:["bin","hex"]};var rB={name:"print",category:"Utils",syntax:["print(template, values)","print(template, values, precision)"],description:"Interpolate values into a string template.",examples:['print("Lucy is $age years old", {age: 5})','print("The value of pi is $pi", {pi: pi}, 3)','print("Hello, $user.name!", {user: {name: "John"}})','print("Values: $1, $2, $3", [6, 9, 4])'],seealso:["format"]};var tB={name:"typeOf",category:"Utils",syntax:["typeOf(x)"],description:"Get the type of a variable.",examples:["typeOf(3.5)","typeOf(2 - 4i)","typeOf(45 deg)",'typeOf("hello world")'],seealso:["getMatrixDataType"]};var nB={name:"solveODE",category:"Numeric",syntax:["solveODE(func, tspan, y0)","solveODE(func, tspan, y0, options)"],description:"Numerical Integration of Ordinary Differential Equations.",examples:["f(t,y) = y","tspan = [0, 4]","solveODE(f, tspan, 1)","solveODE(f, tspan, [1, 2])",'solveODE(f, tspan, 1, { method:"RK23", maxStep:0.1 })'],seealso:["derivative","simplifyCore"]};var aB={bignumber:ZT,boolean:QT,complex:XT,createUnit:JT,fraction:KT,index:jT,matrix:eF,number:rF,sparse:tF,splitUnit:nF,string:aF,unit:iF,e:ND,E:ND,false:BT,i:PT,Infinity:IT,LN2:kT,LN10:RT,LOG2E:LT,LOG10E:qT,NaN:zT,null:UT,pi:AD,PI:AD,phi:WT,SQRT1_2:YT,SQRT2:HT,tau:$T,true:GT,version:VT,speedOfLight:{description:"Speed of light in vacuum",examples:["speedOfLight"]},gravitationConstant:{description:"Newtonian constant of gravitation",examples:["gravitationConstant"]},planckConstant:{description:"Planck constant",examples:["planckConstant"]},reducedPlanckConstant:{description:"Reduced Planck constant",examples:["reducedPlanckConstant"]},magneticConstant:{description:"Magnetic constant (vacuum permeability)",examples:["magneticConstant"]},electricConstant:{description:"Electric constant (vacuum permeability)",examples:["electricConstant"]},vacuumImpedance:{description:"Characteristic impedance of vacuum",examples:["vacuumImpedance"]},coulomb:{description:"Coulomb's constant",examples:["coulomb"]},elementaryCharge:{description:"Elementary charge",examples:["elementaryCharge"]},bohrMagneton:{description:"Borh magneton",examples:["bohrMagneton"]},conductanceQuantum:{description:"Conductance quantum",examples:["conductanceQuantum"]},inverseConductanceQuantum:{description:"Inverse conductance quantum",examples:["inverseConductanceQuantum"]},magneticFluxQuantum:{description:"Magnetic flux quantum",examples:["magneticFluxQuantum"]},nuclearMagneton:{description:"Nuclear magneton",examples:["nuclearMagneton"]},klitzing:{description:"Von Klitzing constant",examples:["klitzing"]},bohrRadius:{description:"Borh radius",examples:["bohrRadius"]},classicalElectronRadius:{description:"Classical electron radius",examples:["classicalElectronRadius"]},electronMass:{description:"Electron mass",examples:["electronMass"]},fermiCoupling:{description:"Fermi coupling constant",examples:["fermiCoupling"]},fineStructure:{description:"Fine-structure constant",examples:["fineStructure"]},hartreeEnergy:{description:"Hartree energy",examples:["hartreeEnergy"]},protonMass:{description:"Proton mass",examples:["protonMass"]},deuteronMass:{description:"Deuteron Mass",examples:["deuteronMass"]},neutronMass:{description:"Neutron mass",examples:["neutronMass"]},quantumOfCirculation:{description:"Quantum of circulation",examples:["quantumOfCirculation"]},rydberg:{description:"Rydberg constant",examples:["rydberg"]},thomsonCrossSection:{description:"Thomson cross section",examples:["thomsonCrossSection"]},weakMixingAngle:{description:"Weak mixing angle",examples:["weakMixingAngle"]},efimovFactor:{description:"Efimov factor",examples:["efimovFactor"]},atomicMass:{description:"Atomic mass constant",examples:["atomicMass"]},avogadro:{description:"Avogadro's number",examples:["avogadro"]},boltzmann:{description:"Boltzmann constant",examples:["boltzmann"]},faraday:{description:"Faraday constant",examples:["faraday"]},firstRadiation:{description:"First radiation constant",examples:["firstRadiation"]},loschmidt:{description:"Loschmidt constant at T=273.15 K and p=101.325 kPa",examples:["loschmidt"]},gasConstant:{description:"Gas constant",examples:["gasConstant"]},molarPlanckConstant:{description:"Molar Planck constant",examples:["molarPlanckConstant"]},molarVolume:{description:"Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa",examples:["molarVolume"]},sackurTetrode:{description:"Sackur-Tetrode constant at T=1 K and p=101.325 kPa",examples:["sackurTetrode"]},secondRadiation:{description:"Second radiation constant",examples:["secondRadiation"]},stefanBoltzmann:{description:"Stefan-Boltzmann constant",examples:["stefanBoltzmann"]},wienDisplacement:{description:"Wien displacement law constant",examples:["wienDisplacement"]},molarMass:{description:"Molar mass constant",examples:["molarMass"]},molarMassC12:{description:"Molar mass constant of carbon-12",examples:["molarMassC12"]},gravity:{description:"Standard acceleration of gravity (standard acceleration of free-fall on Earth)",examples:["gravity"]},planckLength:{description:"Planck length",examples:["planckLength"]},planckMass:{description:"Planck mass",examples:["planckMass"]},planckTime:{description:"Planck time",examples:["planckTime"]},planckCharge:{description:"Planck charge",examples:["planckCharge"]},planckTemperature:{description:"Planck temperature",examples:["planckTemperature"]},derivative:fF,lsolve:lF,lsolveAll:mF,lup:pF,lusolve:dF,leafCount:cF,polynomialRoot:hF,resolve:yF,simplify:xF,simplifyConstant:bF,simplifyCore:wF,symbolicEqual:SF,rationalize:gF,slu:DF,usolve:NF,usolveAll:AF,qr:vF,abs:MF,add:CF,cbrt:EF,ceil:TF,cube:FF,divide:_F,dotDivide:OF,dotMultiply:BF,dotPow:PF,exp:IF,expm:RF,expm1:kF,fix:qF,floor:LF,gcd:zF,hypot:UF,lcm:YF,log:HF,log2:VF,log1p:GF,log10:$F,mod:ZF,multiply:QF,norm:XF,nthRoot:JF,nthRoots:KF,pow:jF,round:e_,sign:r_,sqrt:t_,sqrtm:n_,square:s_,subtract:u_,unaryMinus:f_,unaryPlus:c_,xgcd:l_,invmod:WF,bitAnd:m_,bitNot:p_,bitOr:d_,bitXor:h_,leftShift:v_,rightArithShift:g_,rightLogShift:y_,bellNumbers:x_,catalan:b_,composition:w_,stirlingS2:D_,config:oF,import:sF,typed:uF,arg:S_,conj:N_,re:M_,im:A_,evaluate:C_,help:E_,distance:T_,intersect:F_,and:__,not:O_,or:B_,xor:P_,concat:R_,count:k_,cross:q_,column:I_,ctranspose:L_,det:z_,diag:U_,diff:W_,dot:Y_,getMatrixDataType:Z_,identity:Q_,filter:$_,flatten:G_,forEach:V_,inv:X_,pinv:J_,eigs:H_,kron:K_,matrixFromFunction:rO,matrixFromRows:tO,matrixFromColumns:eO,map:j_,ones:nO,partitionSelect:aO,range:iO,resize:sO,reshape:oO,rotate:uO,rotationMatrix:fO,row:cO,size:lO,sort:mO,squeeze:pO,subset:dO,trace:hO,transpose:vO,zeros:gO,fft:yO,ifft:xO,sylvester:a_,schur:i_,lyap:o_,solveODE:nB,combinations:bO,combinationsWithRep:wO,factorial:DO,gamma:SO,kldivergence:AO,lgamma:NO,multinomial:MO,permutations:CO,pickRandom:EO,random:TO,randomInt:FO,compare:_O,compareNatural:OO,compareText:BO,deepEqual:PO,equal:IO,equalText:RO,larger:kO,largerEq:qO,smaller:LO,smallerEq:zO,unequal:UO,setCartesian:WO,setDifference:YO,setDistinct:HO,setIntersect:$O,setIsSubset:GO,setMultiplicity:VO,setPowerset:ZO,setSize:QO,setSymDifference:XO,setUnion:JO,zpk2tf:KO,freqz:jO,erf:e3,zeta:r3,cumsum:l3,mad:t3,max:n3,mean:a3,median:i3,min:o3,mode:s3,prod:u3,quantileSeq:f3,std:c3,sum:m3,variance:p3,corr:d3,acos:h3,acosh:v3,acot:g3,acoth:y3,acsc:x3,acsch:b3,asec:w3,asech:D3,asin:S3,asinh:N3,atan:A3,atanh:C3,atan2:M3,cos:E3,cosh:T3,cot:F3,coth:_3,csc:O3,csch:B3,sec:P3,sech:I3,sin:R3,sinh:k3,tan:q3,tanh:L3,to:z3,clone:W3,format:Y3,bin:U3,oct:eB,hex:$3,isNaN:V3,isInteger:G3,isNegative:Z3,isNumeric:Q3,hasNumericValue:H3,isPositive:X3,isPrime:J3,isZero:K3,print:rB,typeOf:tB,numeric:j3};var iB="help",DG=["typed","mathWithTransform","Help"],vg=F(iB,DG,e=>{var{typed:r,mathWithTransform:t,Help:a}=e;return r(iB,{any:function(i){var s,l=i;if(typeof i!="string"){for(s in t)if(Xe(t,s)&&i===t[s]){l=s;break}}var c=wt(aB,l);if(!c){var o=typeof l=="function"?l.name:l;throw new Error('No documentation found on "'+o+'"')}return new a(c)}})});var oB="chain",SG=["typed","Chain"],gg=F(oB,SG,e=>{var{typed:r,Chain:t}=e;return r(oB,{"":function(){return new t},any:function(n){return new t(n)}})});var sB="det",NG=["typed","matrix","subtractScalar","multiply","divideScalar","isZero","unaryMinus"],yg=F(sB,NG,e=>{var{typed:r,matrix:t,subtractScalar:a,multiply:n,divideScalar:i,isZero:s,unaryMinus:l}=e;return r(sB,{any:function(u){return ar(u)},"Array | Matrix":function(u){var m;switch(Qe(u)?m=u.size():Array.isArray(u)?(u=t(u),m=u.size()):m=[],m.length){case 0:return ar(u);case 1:if(m[0]===1)return ar(u.valueOf()[0]);if(m[0]===0)return 1;throw new RangeError("Matrix must be square (size: "+lr(m)+")");case 2:{var d=m[0],h=m[1];if(d===h)return c(u.clone().valueOf(),d,h);if(h===0)return 1;throw new RangeError("Matrix must be square (size: "+lr(m)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+lr(m)+")")}}});function c(o,u,m){if(u===1)return ar(o[0][0]);if(u===2)return a(n(o[0][0],o[1][1]),n(o[1][0],o[0][1]));for(var d=!1,h=new Array(u).fill(0).map((O,_)=>_),y=0;y{var{typed:r,matrix:t,divideScalar:a,addScalar:n,multiply:i,unaryMinus:s,det:l,identity:c,abs:o}=e;return r(uB,{"Array | Matrix":function(d){var h=Qe(d)?d.size():ur(d);switch(h.length){case 1:if(h[0]===1)return Qe(d)?t([a(1,d.valueOf()[0])]):[a(1,d[0])];throw new RangeError("Matrix must be square (size: "+lr(h)+")");case 2:{var y=h[0],v=h[1];if(y===v)return Qe(d)?t(u(d.valueOf(),y,v),d.storage()):u(d,y,v);throw new RangeError("Matrix must be square (size: "+lr(h)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+lr(h)+")")}},any:function(d){return a(1,d)}});function u(m,d,h){var y,v,x,w,C;if(d===1){if(w=m[0][0],w===0)throw Error("Cannot calculate inverse, determinant is zero");return[[a(1,w)]]}else if(d===2){var b=l(m);if(b===0)throw Error("Cannot calculate inverse, determinant is zero");return[[a(m[1][1],b),a(s(m[0][1]),b)],[a(s(m[1][0]),b),a(m[0][0],b)]]}else{var A=m.concat();for(y=0;yO&&(O=o(A[y][D]),_=y),y++;if(O===0)throw Error("Cannot calculate inverse, determinant is zero");y=_,y!==D&&(C=A[D],A[D]=A[y],A[y]=C,C=M[D],M[D]=M[y],M[y]=C);var E=A[D],T=M[D];for(y=0;y{var{typed:r,matrix:t,inv:a,deepEqual:n,equal:i,dotDivide:s,dot:l,ctranspose:c,divideScalar:o,multiply:u,add:m,Complex:d}=e;return r(fB,{"Array | Matrix":function(b){var A=Qe(b)?b.size():ur(b);switch(A.length){case 1:return w(b)?c(b):A[0]===1?a(b):s(c(b),l(b,b));case 2:{if(w(b))return c(b);var M=A[0],D=A[1];if(M===D)try{return a(b)}catch(O){if(!(O instanceof Error&&O.message.match(/Cannot calculate inverse, determinant is zero/)))throw O}return Qe(b)?t(h(b.valueOf(),M,D),b.storage()):h(b,M,D)}default:throw new RangeError("Matrix must be two dimensional (size: "+lr(A)+")")}},any:function(b){return i(b,0)?ar(b):o(1,b)}});function h(C,b,A){var{C:M,F:D}=v(C,b,A),O=u(a(u(c(M),M)),c(M)),_=u(c(D),a(u(D,c(D))));return u(_,O)}function y(C,b,A){for(var M=ar(C),D=0,O=0;O_.filter((T,R)=>R!x(l(M[E],M[E])));return{C:D,F:O}}function x(C){return i(m(C,d(1,1)),m(0,d(1,1)))}function w(C){return n(m(C,d(1,1)),m(u(C,0),d(1,1)))}});function cB(e){var{addScalar:r,subtract:t,flatten:a,multiply:n,multiplyScalar:i,divideScalar:s,sqrt:l,abs:c,bignumber:o,diag:u,size:m,reshape:d,inv:h,qr:y,usolve:v,usolveAll:x,equal:w,complex:C,larger:b,smaller:A,matrixFromColumns:M,dot:D}=e;function O(ae,$,le,Ee){var me=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,ge=_(ae,$,le,Ee,me);E(ae,$,le,Ee,me,ge);var{values:Se,C:ye}=T(ae,$,le,Ee,me);if(me){var be=R(ae,$,ye,ge,Se,le,Ee);return{values:Se,eigenvectors:be}}return{values:Se}}function _(ae,$,le,Ee,me){var ge=Ee==="BigNumber",Se=Ee==="Complex",ye=ge?o(0):0,be=ge?o(1):Se?C(1):1,De=ge?o(1):1,Ae=ge?o(10):2,We=i(Ae,Ae),Je;me&&(Je=Array($).fill(be));for(var J=!1;!J;){J=!0;for(var re=0;re<$;re++){for(var xe=ye,j=ye,ne=0;ne<$;ne++)re!==ne&&(xe=r(xe,c(ae[ne][re])),j=r(j,c(ae[re][ne])));if(!w(xe,0)&&!w(j,0)){for(var ue=De,Me=xe,Ce=s(j,Ae),Le=i(j,Ae);A(Me,Ce);)Me=i(Me,We),ue=i(ue,Ae);for(;b(Me,Le);)Me=s(Me,We),ue=s(ue,Ae);var Ie=A(s(r(Me,j),ue),i(r(xe,j),.95));if(Ie){J=!1;for(var fr=s(1,ue),or=0;or<$;or++)re!==or&&(ae[re][or]=i(ae[re][or],fr),ae[or][re]=i(ae[or][re],ue));me&&(Je[re]=i(Je[re],fr))}}}}return me?u(Je):null}function E(ae,$,le,Ee,me,ge){var Se=Ee==="BigNumber",ye=Ee==="Complex",be=Se?o(0):ye?C(0):0;Se&&(le=o(le));for(var De=0;De<$-2;De++){for(var Ae=0,We=be,Je=De+1;Je<$;Je++){var J=ae[Je][De];A(c(We),c(J))&&(We=J,Ae=Je)}if(!A(c(We),le)){if(Ae!==De+1){var re=ae[Ae];ae[Ae]=ae[De+1],ae[De+1]=re;for(var xe=0;xe<$;xe++){var j=ae[xe][Ae];ae[xe][Ae]=ae[xe][De+1],ae[xe][De+1]=j}if(me){var ne=ge[Ae];ge[Ae]=ge[De+1],ge[De+1]=ne}}for(var ue=De+2;ue<$;ue++){var Me=s(ae[ue][De],We);if(Me!==0){for(var Ce=0;Ce<$;Ce++)ae[ue][Ce]=t(ae[ue][Ce],i(Me,ae[De+1][Ce]));for(var Le=0;Le<$;Le++)ae[Le][De+1]=r(ae[Le][De+1],i(Me,ae[Le][ue]));if(me)for(var Ie=0;Ie<$;Ie++)ge[ue][Ie]=t(ge[ue][Ie],i(Me,ge[De+1][Ie]))}}}}return ge}function T(ae,$,le,Ee,me){var ge=Ee==="BigNumber",Se=Ee==="Complex",ye=ge?o(1):Se?C(1):1;ge&&(le=o(le));for(var be=ar(ae),De=[],Ae=$,We=[],Je=me?u(Array($).fill(ye)):void 0,J=me?u(Array(Ae).fill(ye)):void 0,re=0;re<=100;){re+=1;for(var xe=be[Ae-1][Ae-1],j=0;j1&&(J=u(Array(Ae-1).fill(ye)))),Ae-=1,be.pop();for(var Ce=0;Ce2&&(J=u(Array(Ae-2).fill(ye)))),Ae-=2,be.pop(),be.pop();for(var Ie=0;Ie+t(c(Ke),c(Br))),re>100){var fr=Error("The eigenvalues failed to converge. Only found these eigenvalues: "+De.join(", "));throw fr.values=De,fr.vectors=[],fr}var or=me?n(Je,W(We,$)):void 0;return{values:De,C:or}}function R(ae,$,le,Ee,me,ge,Se){var ye=h(le),be=n(ye,ae,le),De=Se==="BigNumber",Ae=Se==="Complex",We=De?o(0):Ae?C(0):0,Je=De?o(1):Ae?C(1):1,J=[],re=[];for(var xe of me){var j=q(J,xe,w);j===-1?(J.push(xe),re.push(1)):re[j]+=1}for(var ne=[],ue=J.length,Me=Array($).fill(We),Ce=u(Array($).fill(Je)),Le=function(){var or=J[Ie],Ke=t(be,n(or,Ce)),Br=x(Ke,Me);for(Br.shift();Br.lengthn(ce,we)),ne.push(...Br.map(we=>({value:or,vector:a(we)})))},Ie=0;Ie=5)return null;for(ye=0;;){var be=v(ae,Se);if(A(oe(z(Se,[be])),Ee))break;if(++ye>=10)return null;Se=pe(be)}return Se}function K(ae,$,le){var Ee=le==="BigNumber",me=le==="Complex",ge=Array(ae).fill(0).map(Se=>2*Math.random()-1);return Ee&&(ge=ge.map(Se=>o(Se))),me&&(ge=ge.map(Se=>C(Se))),ge=z(ge,$),pe(ge,le)}function z(ae,$){var le=m(ae);for(var Ee of $)Ee=d(Ee,le),ae=t(ae,n(s(D(Ee,ae),D(Ee,Ee)),Ee));return ae}function oe(ae){return c(l(D(ae,ae)))}function pe(ae,$){var le=$==="BigNumber",Ee=$==="Complex",me=le?o(1):Ee?C(1):1;return n(s(me,oe(ae)),ae)}return O}function lB(e){var{config:r,addScalar:t,subtract:a,abs:n,atan:i,cos:s,sin:l,multiplyScalar:c,inv:o,bignumber:u,multiply:m,add:d}=e;function h(E,T){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:r.epsilon,L=arguments.length>3?arguments[3]:void 0,H=arguments.length>4?arguments[4]:void 0;if(L==="number")return y(E,R,H);if(L==="BigNumber")return v(E,R,H);throw TypeError("Unsupported data type: "+L)}function y(E,T,R){var L=E.length,H=Math.abs(T/L),G,W;if(R){W=new Array(L);for(var q=0;q=Math.abs(H);){var K=k[0][0],z=k[0][1];G=x(E[K][K],E[z][z],E[K][z]),E=M(E,G,K,z),R&&(W=C(W,G,K,z)),k=D(E)}for(var oe=Array(L).fill(0),pe=0;pe=n(H);){var K=k[0][0],z=k[0][1];G=w(E[K][K],E[z][z],E[K][z]),E=A(E,G,K,z),R&&(W=b(W,G,K,z)),k=O(E)}for(var oe=Array(L).fill(0),pe=0;pe({value:H[$],vector:ae}));return{values:H,eigenvectors:pe}}return h}var CG="eigs",EG=["config","typed","matrix","addScalar","equal","subtract","abs","atan","cos","sin","multiplyScalar","divideScalar","inv","bignumber","multiply","add","larger","column","flatten","number","complex","sqrt","diag","size","reshape","qr","usolve","usolveAll","im","re","smaller","matrixFromColumns","dot"],wg=F(CG,EG,e=>{var{config:r,typed:t,matrix:a,addScalar:n,subtract:i,equal:s,abs:l,atan:c,cos:o,sin:u,multiplyScalar:m,divideScalar:d,inv:h,bignumber:y,multiply:v,add:x,larger:w,column:C,flatten:b,number:A,complex:M,sqrt:D,diag:O,size:_,reshape:E,qr:T,usolve:R,usolveAll:L,im:H,re:G,smaller:W,matrixFromColumns:q,dot:k}=e,K=lB({config:r,addScalar:n,subtract:i,column:C,flatten:b,equal:s,abs:l,atan:c,cos:o,sin:u,multiplyScalar:m,inv:h,bignumber:y,complex:M,multiply:v,add:x}),z=cB({config:r,addScalar:n,subtract:i,multiply:v,multiplyScalar:m,flatten:b,divideScalar:d,sqrt:D,abs:l,bignumber:y,diag:O,size:_,reshape:E,qr:T,inv:h,usolve:R,usolveAll:L,equal:s,complex:M,larger:w,smaller:W,matrixFromColumns:q,dot:k});return t("eigs",{Array:function(ge){return oe(a(ge))},"Array, number|BigNumber":function(ge,Se){return oe(a(ge),{precision:Se})},"Array, Object"(me,ge){return oe(a(me),ge)},Matrix:function(ge){return oe(ge,{matricize:!0})},"Matrix, number|BigNumber":function(ge,Se){return oe(ge,{precision:Se,matricize:!0})},"Matrix, Object":function(ge,Se){var ye={matricize:!0};return ht(ye,Se),oe(ge,ye)}});function oe(me){var ge,Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ye="eigenvectors"in Se?Se.eigenvectors:!0,be=(ge=Se.precision)!==null&&ge!==void 0?ge:r.epsilon,De=pe(me,be,ye);return Se.matricize&&(De.values=a(De.values),ye&&(De.eigenvectors=De.eigenvectors.map(Ae=>{var{value:We,vector:Je}=Ae;return{value:We,vector:a(Je)}}))),ye&&Object.defineProperty(De,"vectors",{enumerable:!1,get:()=>{throw new Error("eigs(M).vectors replaced with eigs(M).eigenvectors")}}),De}function pe(me,ge,Se){var ye=me.toArray(),be=me.size();if(be.length!==2||be[0]!==be[1])throw new RangeError("Matrix must be square (size: ".concat(lr(be),")"));var De=be[0];if($(ye,De,ge)&&(le(ye,De),ae(ye,De,ge))){var Ae=Ee(me,ye,De);return K(ye,De,ge,Ae,Se)}var We=Ee(me,ye,De);return z(ye,De,ge,We,Se)}function ae(me,ge,Se){for(var ye=0;ye{var{typed:r,abs:t,add:a,identity:n,inv:i,multiply:s}=e;return r(mB,{Matrix:function(m){var d=m.size();if(d.length!==2||d[0]!==d[1])throw new RangeError("Matrix must be square (size: "+lr(d)+")");for(var h=d[0],y=1e-15,v=l(m),x=c(v,y),w=x.q,C=x.j,b=s(m,Math.pow(2,-C)),A=n(h),M=n(h),D=1,O=b,_=-1,E=1;E<=w;E++)E>1&&(O=s(O,b),_=-_),D=D*(w-E+1)/((2*w-E+1)*E),A=a(A,s(D,O)),M=a(M,s(D*_,O));for(var T=s(i(M),A),R=0;R{var{typed:r,abs:t,add:a,multiply:n,map:i,sqrt:s,subtract:l,inv:c,size:o,max:u,identity:m}=e,d=1e3,h=1e-6;function y(v){var x,w=0,C=v,b=m(o(v));do{var A=C;if(C=n(.5,a(A,c(b))),b=n(.5,a(b,c(A))),x=u(t(l(C,A))),x>h&&++w>d)throw new Error("computing square root of matrix: iterative method could not converge")}while(x>h);return C}return r(pB,{"Array | Matrix":function(x){var w=Qe(x)?x.size():ur(x);switch(w.length){case 1:if(w[0]===1)return i(x,s);throw new RangeError("Matrix must be square (size: "+lr(w)+")");case 2:{var C=w[0],b=w[1];if(C===b)return y(x);throw new RangeError("Matrix must be square (size: "+lr(w)+")")}default:throw new RangeError("Matrix must be at most two dimensional (size: "+lr(w)+")")}}})});var dB="sylvester",_G=["typed","schur","matrixFromColumns","matrix","multiply","range","concat","transpose","index","subset","add","subtract","identity","lusolve","abs"],Ng=F(dB,_G,e=>{var{typed:r,schur:t,matrixFromColumns:a,matrix:n,multiply:i,range:s,concat:l,transpose:c,index:o,subset:u,add:m,subtract:d,identity:h,lusolve:y,abs:v}=e;return r(dB,{"Matrix, Matrix, Matrix":x,"Array, Matrix, Matrix":function(C,b,A){return x(n(C),b,A)},"Array, Array, Matrix":function(C,b,A){return x(n(C),n(b),A)},"Array, Matrix, Array":function(C,b,A){return x(n(C),b,n(A))},"Matrix, Array, Matrix":function(C,b,A){return x(C,n(b),A)},"Matrix, Array, Array":function(C,b,A){return x(C,n(b),n(A))},"Matrix, Matrix, Array":function(C,b,A){return x(C,b,n(A))},"Array, Array, Array":function(C,b,A){return x(n(C),n(b),n(A)).toArray()}});function x(w,C,b){for(var A=C.size()[0],M=w.size()[0],D=t(w),O=D.T,_=D.U,E=t(i(-1,C)),T=E.T,R=E.U,L=i(i(c(_),b),R),H=s(0,M),G=[],W=(Ae,We)=>l(Ae,We,1),q=(Ae,We)=>l(Ae,We,0),k=0;k1e-5){for(var K=q(u(L,o(H,k)),u(L,o(H,k+1))),z=0;z{var{typed:r,matrix:t,identity:a,multiply:n,qr:i,norm:s,subtract:l}=e;return r(hB,{Array:function(u){var m=c(t(u));return{U:m.U.valueOf(),T:m.T.valueOf()}},Matrix:function(u){return c(u)}});function c(o){var u=o.size()[0],m=o,d=a(u),h=0,y;do{y=m;var v=i(m),x=v.Q,w=v.R;if(m=n(w,x),d=n(d,x),h++>100)break}while(s(l(m,y))>1e-4);return{U:d,T:m}}});var vB="lyap",BG=["typed","matrix","sylvester","multiply","transpose"],Mg=F(vB,BG,e=>{var{typed:r,matrix:t,sylvester:a,multiply:n,transpose:i}=e;return r(vB,{"Matrix, Matrix":function(l,c){return a(l,i(l),n(-1,c))},"Array, Matrix":function(l,c){return a(t(l),i(t(l)),n(-1,c))},"Matrix, Array":function(l,c){return a(l,i(t(l)),t(n(-1,c)))},"Array, Array":function(l,c){return a(t(l),i(t(l)),t(n(-1,c))).toArray()}})});var PG="divide",IG=["typed","matrix","multiply","equalScalar","divideScalar","inv"],Cg=F(PG,IG,e=>{var{typed:r,matrix:t,multiply:a,equalScalar:n,divideScalar:i,inv:s}=e,l=jr({typed:r,equalScalar:n}),c=qt({typed:r});return r("divide",Sm({"Array | Matrix, Array | Matrix":function(u,m){return a(u,s(m))},"DenseMatrix, any":function(u,m){return c(u,m,i,!1)},"SparseMatrix, any":function(u,m){return l(u,m,i,!1)},"Array, any":function(u,m){return c(t(u),m,i,!1).valueOf()},"any, Array | Matrix":function(u,m){return a(u,s(m))}},i.signatures))});var gB="distance",RG=["typed","addScalar","subtractScalar","divideScalar","multiplyScalar","deepEqual","sqrt","abs"],Eg=F(gB,RG,e=>{var{typed:r,addScalar:t,subtractScalar:a,multiplyScalar:n,divideScalar:i,deepEqual:s,sqrt:l,abs:c}=e;return r(gB,{"Array, Array, Array":function(M,D,O){if(M.length===2&&D.length===2&&O.length===2){if(!u(M))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!u(D))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!u(O))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(s(D,O))throw new TypeError("LinePoint1 should not be same with LinePoint2");var _=a(O[1],D[1]),E=a(D[0],O[0]),T=a(n(O[0],D[1]),n(D[0],O[1]));return x(M[0],M[1],_,E,T)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object, Object":function(M,D,O){if(Object.keys(M).length===2&&Object.keys(D).length===2&&Object.keys(O).length===2){if(!u(M))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!u(D))throw new TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!u(O))throw new TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");if(s(y(D),y(O)))throw new TypeError("LinePoint1 should not be same with LinePoint2");if("pointX"in M&&"pointY"in M&&"lineOnePtX"in D&&"lineOnePtY"in D&&"lineTwoPtX"in O&&"lineTwoPtY"in O){var _=a(O.lineTwoPtY,D.lineOnePtY),E=a(D.lineOnePtX,O.lineTwoPtX),T=a(n(O.lineTwoPtX,D.lineOnePtY),n(D.lineOnePtX,O.lineTwoPtY));return x(M.pointX,M.pointY,_,E,T)}else throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},"Array, Array":function(M,D){if(M.length===2&&D.length===3){if(!u(M))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!m(D))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return x(M[0],M[1],D[0],D[1],D[2])}else if(M.length===3&&D.length===6){if(!m(M))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!h(D))throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument");return w(M[0],M[1],M[2],D[0],D[1],D[2],D[3],D[4],D[5])}else if(M.length===D.length&&M.length>0){if(!d(M))throw new TypeError("All values of an array should be numbers or BigNumbers");if(!d(D))throw new TypeError("All values of an array should be numbers or BigNumbers");return C(M,D)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object":function(M,D){if(Object.keys(M).length===2&&Object.keys(D).length===3){if(!u(M))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!m(D))throw new TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if("pointX"in M&&"pointY"in M&&"xCoeffLine"in D&&"yCoeffLine"in D&&"constant"in D)return x(M.pointX,M.pointY,D.xCoeffLine,D.yCoeffLine,D.constant);throw new TypeError("Key names do not match")}else if(Object.keys(M).length===3&&Object.keys(D).length===6){if(!m(M))throw new TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!h(D))throw new TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if("pointX"in M&&"pointY"in M&&"x0"in D&&"y0"in D&&"z0"in D&&"a"in D&&"b"in D&&"c"in D)return w(M.pointX,M.pointY,M.pointZ,D.x0,D.y0,D.z0,D.a,D.b,D.c);throw new TypeError("Key names do not match")}else if(Object.keys(M).length===2&&Object.keys(D).length===2){if(!u(M))throw new TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!u(D))throw new TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if("pointOneX"in M&&"pointOneY"in M&&"pointTwoX"in D&&"pointTwoY"in D)return C([M.pointOneX,M.pointOneY],[D.pointTwoX,D.pointTwoY]);throw new TypeError("Key names do not match")}else if(Object.keys(M).length===3&&Object.keys(D).length===3){if(!m(M))throw new TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!m(D))throw new TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if("pointOneX"in M&&"pointOneY"in M&&"pointOneZ"in M&&"pointTwoX"in D&&"pointTwoY"in D&&"pointTwoZ"in D)return C([M.pointOneX,M.pointOneY,M.pointOneZ],[D.pointTwoX,D.pointTwoY,D.pointTwoZ]);throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},Array:function(M){if(!v(M))throw new TypeError("Incorrect array format entered for pairwise distance calculation");return b(M)}});function o(A){return typeof A=="number"||rr(A)}function u(A){return A.constructor!==Array&&(A=y(A)),o(A[0])&&o(A[1])}function m(A){return A.constructor!==Array&&(A=y(A)),o(A[0])&&o(A[1])&&o(A[2])}function d(A){return Array.isArray(A)||(A=y(A)),A.every(o)}function h(A){return A.constructor!==Array&&(A=y(A)),o(A[0])&&o(A[1])&&o(A[2])&&o(A[3])&&o(A[4])&&o(A[5])}function y(A){for(var M=Object.keys(A),D=[],O=0;OM.length!==2||!o(M[0])||!o(M[1])))return!1}else if(A[0].length===3&&o(A[0][0])&&o(A[0][1])&&o(A[0][2])){if(A.some(M=>M.length!==3||!o(M[0])||!o(M[1])||!o(M[2])))return!1}else return!1;return!0}function x(A,M,D,O,_){var E=c(t(t(n(D,A),n(O,M)),_)),T=l(t(n(D,D),n(O,O)));return i(E,T)}function w(A,M,D,O,_,E,T,R,L){var H=[a(n(a(_,M),L),n(a(E,D),R)),a(n(a(E,D),T),n(a(O,A),L)),a(n(a(O,A),R),n(a(_,M),T))];H=l(t(t(n(H[0],H[0]),n(H[1],H[1])),n(H[2],H[2])));var G=l(t(t(n(T,T),n(R,R)),n(L,L)));return i(H,G)}function C(A,M){for(var D=A.length,O=0,_=0,E=0;E{var{typed:r,config:t,abs:a,add:n,addScalar:i,matrix:s,multiply:l,multiplyScalar:c,divideScalar:o,subtract:u,smaller:m,equalScalar:d,flatten:h,isZero:y,isNumeric:v}=e;return r("intersect",{"Array, Array, Array":x,"Array, Array, Array, Array":w,"Matrix, Matrix, Matrix":function(R,L,H){var G=x(R.valueOf(),L.valueOf(),H.valueOf());return G===null?null:s(G)},"Matrix, Matrix, Matrix, Matrix":function(R,L,H,G){var W=w(R.valueOf(),L.valueOf(),H.valueOf(),G.valueOf());return W===null?null:s(W)}});function x(T,R,L){if(T=C(T),R=C(R),L=C(L),!A(T))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!A(R))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!M(L))throw new TypeError("Array with 4 numbers expected as third argument");return E(T[0],T[1],T[2],R[0],R[1],R[2],L[0],L[1],L[2],L[3])}function w(T,R,L,H){if(T=C(T),R=C(R),L=C(L),H=C(H),T.length===2){if(!b(T))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!b(R))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!b(L))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(!b(H))throw new TypeError("Array with 2 numbers or BigNumbers expected for fourth argument");return D(T,R,L,H)}else if(T.length===3){if(!A(T))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!A(R))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!A(L))throw new TypeError("Array with 3 numbers or BigNumbers expected for third argument");if(!A(H))throw new TypeError("Array with 3 numbers or BigNumbers expected for fourth argument");return _(T[0],T[1],T[2],R[0],R[1],R[2],L[0],L[1],L[2],H[0],H[1],H[2])}else throw new TypeError("Arrays with two or thee dimensional points expected")}function C(T){return T.length===1?T[0]:T.length>1&&Array.isArray(T[0])&&T.every(R=>Array.isArray(R)&&R.length===1)?h(T):T}function b(T){return T.length===2&&v(T[0])&&v(T[1])}function A(T){return T.length===3&&v(T[0])&&v(T[1])&&v(T[2])}function M(T){return T.length===4&&v(T[0])&&v(T[1])&&v(T[2])&&v(T[3])}function D(T,R,L,H){var G=T,W=L,q=u(G,R),k=u(W,H),K=u(c(q[0],k[1]),c(k[0],q[1]));if(y(K)||m(a(K),t.epsilon))return null;var z=c(k[0],G[1]),oe=c(k[1],G[0]),pe=c(k[0],W[1]),ae=c(k[1],W[0]),$=o(i(u(u(z,oe),pe),ae),K);return n(l(q,$),G)}function O(T,R,L,H,G,W,q,k,K,z,oe,pe){var ae=c(u(T,R),u(L,H)),$=c(u(G,W),u(q,k)),le=c(u(K,z),u(oe,pe));return i(i(ae,$),le)}function _(T,R,L,H,G,W,q,k,K,z,oe,pe){var ae=O(T,q,z,q,R,k,oe,k,L,K,pe,K),$=O(z,q,H,T,oe,k,G,R,pe,K,W,L),le=O(T,q,H,T,R,k,G,R,L,K,W,L),Ee=O(z,q,z,q,oe,k,oe,k,pe,K,pe,K),me=O(H,T,H,T,G,R,G,R,W,L,W,L),ge=u(c(ae,$),c(le,Ee)),Se=u(c(me,Ee),c($,$));if(y(Se))return null;var ye=o(ge,Se),be=o(i(ae,c(ye,$)),Ee),De=i(T,c(ye,u(H,T))),Ae=i(R,c(ye,u(G,R))),We=i(L,c(ye,u(W,L))),Je=i(q,c(be,u(z,q))),J=i(k,c(be,u(oe,k))),re=i(K,c(be,u(pe,K)));return d(De,Je)&&d(Ae,J)&&d(We,re)?[De,Ae,We]:null}function E(T,R,L,H,G,W,q,k,K,z){var oe=c(T,q),pe=c(H,q),ae=c(R,k),$=c(G,k),le=c(L,K),Ee=c(W,K),me=u(u(u(z,oe),ae),le),ge=u(u(u(i(i(pe,$),Ee),oe),ae),le),Se=o(me,ge),ye=i(T,c(Se,u(H,T))),be=i(R,c(Se,u(G,R))),De=i(L,c(Se,u(W,L)));return[ye,be,De]}});var yB="sum",LG=["typed","config","add","numeric"],nf=F(yB,LG,e=>{var{typed:r,config:t,add:a,numeric:n}=e;return r(yB,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":s,"...":function(c){if(Pa(c))throw new TypeError("Scalar values expected in function sum");return i(c)}});function i(l){var c;return An(l,function(o){try{c=c===void 0?o:a(c,o)}catch(u){throw Et(u,"sum",o)}}),c===void 0&&(c=n(0,t.number)),typeof c=="string"&&(c=n(c,t.number)),c}function s(l,c){try{var o=qo(l,c,a);return o}catch(u){throw Et(u,"sum")}}});var Fg="cumsum",zG=["typed","add","unaryPlus"],af=F(Fg,zG,e=>{var{typed:r,add:t,unaryPlus:a}=e;return r(Fg,{Array:n,Matrix:function(o){return o.create(n(o.valueOf()))},"Array, number | BigNumber":s,"Matrix, number | BigNumber":function(o,u){return o.create(s(o.valueOf(),u))},"...":function(o){if(Pa(o))throw new TypeError("All values expected to be scalar in function cumsum");return n(o)}});function n(c){try{return i(c)}catch(o){throw Et(o,Fg)}}function i(c){if(c.length===0)return[];for(var o=[a(c[0])],u=1;u=u.length)throw new tn(o,u.length);try{return l(c,o)}catch(m){throw Et(m,Fg)}}function l(c,o){var u,m,d;if(o<=0){var h=c[0][0];if(Array.isArray(h)){for(d=jm(c),m=[],u=0;u{var{typed:r,add:t,divide:a}=e;return r(xB,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":n,"...":function(l){if(Pa(l))throw new TypeError("Scalar values expected in function mean");return i(l)}});function n(s,l){try{var c=qo(s,l,t),o=Array.isArray(s)?ur(s):s.size();return a(c,o[l])}catch(u){throw Et(u,"mean")}}function i(s){var l,c=0;if(An(s,function(o){try{l=l===void 0?o:t(l,o),c++}catch(u){throw Et(u,"mean",o)}}),c===0)throw new Error("Cannot calculate the mean of an empty array");return a(l,c)}});var bB="median",WG=["typed","add","divide","compare","partitionSelect"],_g=F(bB,WG,e=>{var{typed:r,add:t,divide:a,compare:n,partitionSelect:i}=e;function s(o){try{o=gr(o.valueOf());var u=o.length;if(u===0)throw new Error("Cannot calculate median of an empty array");if(u%2===0){for(var m=u/2-1,d=i(o,m+1),h=o[m],y=0;y0&&(h=o[y]);return c(h,d)}else{var v=i(o,(u-1)/2);return l(v)}}catch(x){throw Et(x,"median")}}var l=r({"number | BigNumber | Complex | Unit":function(u){return u}}),c=r({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(u,m){return a(t(u,m),2)}});return r(bB,{"Array | Matrix":s,"Array | Matrix, number | BigNumber":function(u,m){throw new Error("median(A, dim) is not yet supported")},"...":function(u){if(Pa(u))throw new TypeError("Scalar values expected in function median");return s(u)}})});var wB="mad",YG=["typed","abs","map","median","subtract"],Og=F(wB,YG,e=>{var{typed:r,abs:t,map:a,median:n,subtract:i}=e;return r(wB,{"Array | Matrix":s,"...":function(c){return s(c)}});function s(l){if(l=gr(l.valueOf()),l.length===0)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var c=n(l);return n(a(l,function(o){return t(i(o,c))}))}catch(o){throw o instanceof TypeError&&o.message.indexOf("median")!==-1?new TypeError(o.message.replace("median","mad")):Et(o,"mad")}}});var MD="unbiased",DB="variance",HG=["typed","add","subtract","multiply","divide","apply","isNaN"],sf=F(DB,HG,e=>{var{typed:r,add:t,subtract:a,multiply:n,divide:i,apply:s,isNaN:l}=e;return r(DB,{"Array | Matrix":function(m){return c(m,MD)},"Array | Matrix, string":c,"Array | Matrix, number | BigNumber":function(m,d){return o(m,d,MD)},"Array | Matrix, number | BigNumber, string":o,"...":function(m){return c(m,MD)}});function c(u,m){var d,h=0;if(u.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");if(An(u,function(x){try{d=d===void 0?x:t(d,x),h++}catch(w){throw Et(w,"variance",x)}}),h===0)throw new Error("Cannot calculate variance of an empty array");var y=i(d,h);if(d=void 0,An(u,function(x){var w=a(x,y);d=d===void 0?n(w,w):t(d,n(w,w))}),l(d))return d;switch(m){case"uncorrected":return i(d,h);case"biased":return i(d,h+1);case"unbiased":{var v=rr(d)?d.mul(0):0;return h===1?v:i(d,h-1)}default:throw new Error('Unknown normalization "'+m+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function o(u,m,d){try{if(u.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");return s(u,m,h=>c(h,d))}catch(h){throw Et(h,"variance")}}});var SB="quantileSeq",$G=["typed","?bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger"],uf=F(SB,$G,e=>{var{typed:r,bignumber:t,add:a,subtract:n,divide:i,multiply:s,partitionSelect:l,compare:c,isInteger:o,smaller:u,smallerEq:m,larger:d}=e,h=Lo({typed:r,isInteger:o});return r(SB,{"Array | Matrix, number | BigNumber":(C,b)=>v(C,b,!1),"Array | Matrix, number | BigNumber, number":(C,b,A)=>y(C,b,!1,A,v),"Array | Matrix, number | BigNumber, boolean":v,"Array | Matrix, number | BigNumber, boolean, number":(C,b,A,M)=>y(C,b,A,M,v),"Array | Matrix, Array | Matrix":(C,b)=>x(C,b,!1),"Array | Matrix, Array | Matrix, number":(C,b,A)=>y(C,b,!1,A,x),"Array | Matrix, Array | Matrix, boolean":x,"Array | Matrix, Array | Matrix, boolean, number":(C,b,A,M)=>y(C,b,A,M,x)});function y(C,b,A,M,D){return h(C,M,O=>D(O,b,A))}function v(C,b,A){var M,D=C.valueOf();if(u(b,0))throw new Error("N/prob must be non-negative");if(m(b,1))return sr(b)?w(D,b,A):t(w(D,b,A));if(d(b,1)){if(!o(b))throw new Error("N must be a positive integer");if(d(b,4294967295))throw new Error("N must be less than or equal to 2^32-1, as that is the maximum length of an Array");var O=a(b,1);M=[];for(var _=0;u(_,b);_++){var E=i(_+1,O);M.push(w(D,E,A))}return sr(b)?M:t(M)}}function x(C,b,A){for(var M=C.valueOf(),D=b.valueOf(),O=[],_=0;_0&&(T=M[L])}return a(s(T,n(1,E)),s(R,E))}});var NB="std",GG=["typed","map","sqrt","variance"],ff=F(NB,GG,e=>{var{typed:r,map:t,sqrt:a,variance:n}=e;return r(NB,{"Array | Matrix":i,"Array | Matrix, string":i,"Array | Matrix, number | BigNumber":i,"Array | Matrix, number | BigNumber, string":i,"...":function(l){return i(l)}});function i(s,l){if(s.length===0)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{var c=n.apply(null,arguments);return Nt(c)?t(c,a):a(c)}catch(o){throw o instanceof TypeError&&o.message.indexOf(" variance")!==-1?new TypeError(o.message.replace(" variance"," std")):o}}});var AB="corr",VG=["typed","matrix","mean","sqrt","sum","add","subtract","multiply","pow","divide"],Bg=F(AB,VG,e=>{var{typed:r,matrix:t,sqrt:a,sum:n,add:i,subtract:s,multiply:l,pow:c,divide:o}=e;return r(AB,{"Array, Array":function(h,y){return u(h,y)},"Matrix, Matrix":function(h,y){var v=u(h.toArray(),y.toArray());return Array.isArray(v)?t(v):v}});function u(d,h){var y=[];if(Array.isArray(d[0])&&Array.isArray(h[0])){if(d.length!==h.length)throw new SyntaxError("Dimension mismatch. Array A and B must have the same length.");for(var v=0;vi(D,l(O,h[_])),0),C=n(d.map(D=>c(D,2))),b=n(h.map(D=>c(D,2))),A=s(l(y,w),l(v,x)),M=a(l(s(l(y,C),c(v,2)),s(l(y,b),c(x,2))));return o(A,M)}});var MB="combinations",ZG=["typed"],Pg=F(MB,ZG,e=>{var{typed:r}=e;return r(MB,{"number, number":Lw,"BigNumber, BigNumber":function(a,n){var i=a.constructor,s,l,c=a.minus(n),o=new i(1);if(!CB(a)||!CB(n))throw new TypeError("Positive integer value expected in function combinations");if(n.gt(a))throw new TypeError("k must be less than n in function combinations");if(s=o,n.lt(c))for(l=o;l.lte(c);l=l.plus(o))s=s.times(n.plus(l)).dividedBy(l);else for(l=o;l.lte(n);l=l.plus(o))s=s.times(c.plus(l)).dividedBy(l);return s}})});function CB(e){return e.isInteger()&&e.gte(0)}var EB="combinationsWithRep",QG=["typed"],Ig=F(EB,QG,e=>{var{typed:r}=e;return r(EB,{"number, number":function(a,n){if(!Ze(a)||a<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(!Ze(n)||n<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(a<1)throw new TypeError("k must be less than or equal to n + k - 1");if(n{var{typed:r,config:t,multiplyScalar:a,pow:n,BigNumber:i,Complex:s}=e;function l(o){if(o.im===0)return Oc(o.re);if(o.re<.5){var u=new s(1-o.re,-o.im),m=new s(Math.PI*o.re,Math.PI*o.im);return new s(Math.PI).div(m.sin()).div(l(u))}o=new s(o.re-1,o.im);for(var d=new s(Fs[0],0),h=1;h2;)d-=2,y+=d,h=h.times(y);return new i(h.toPrecision(i.precision))}});var _B="lgamma",JG=["Complex","typed"],kg=F(_B,JG,e=>{var{Complex:r,typed:t}=e,a=7,n=7,i=[-.029550653594771242,.00641025641025641,-.0019175269175269176,.0008417508417508417,-.0005952380952380953,.0007936507936507937,-.002777777777777778,.08333333333333333];return t(_B,{number:Bc,Complex:s,BigNumber:function(){throw new Error("mathjs doesn't yet provide an implementation of the algorithm lgamma for BigNumber")}});function s(o){var u=6.283185307179586,m=1.1447298858494002,d=.1;if(o.isNaN())return new r(NaN,NaN);if(o.im===0)return new r(Bc(o.re),0);if(o.re>=a||Math.abs(o.im)>=n)return l(o);if(o.re<=d){var h=uM(u,o.im)*Math.floor(.5*o.re+.25),y=o.mul(Math.PI).sin().log(),v=s(new r(1-o.re,-o.im));return new r(m,h).sub(y).sub(v)}else return o.im>=0?c(o):c(o.conjugate()).conjugate()}function l(o){for(var u=o.sub(.5).mul(o.log()).sub(o).add(Gw),m=new r(1,0).div(o),d=m.div(o),h=i[0],y=i[1],v=2*d.re,x=d.re*d.re+d.im*d.im,w=2;w<8;w++){var C=y;y=-x*h+i[w],h=v*h+C}var b=m.mul(d.mul(h).add(y));return u.add(b)}function c(o){var u=0,m=0,d=o;for(o=o.add(1);o.re<=a;){d=d.mul(o);var h=d.im<0?1:0;h!==0&&m===0&&u++,m=h,o=o.add(1)}return l(o).sub(d.log()).sub(new r(0,u*2*Math.PI*1))}});var OB="factorial",KG=["typed","gamma"],qg=F(OB,KG,e=>{var{typed:r,gamma:t}=e;return r(OB,{number:function(n){if(n<0)throw new Error("Value must be non-negative");return t(n+1)},BigNumber:function(n){if(n.isNegative())throw new Error("Value must be non-negative");return t(n.plus(1))},"Array | Matrix":r.referToSelf(a=>n=>je(n,a))})});var BB="kldivergence",jG=["typed","matrix","divide","sum","multiply","map","dotDivide","log","isNumeric"],Lg=F(BB,jG,e=>{var{typed:r,matrix:t,divide:a,sum:n,multiply:i,map:s,dotDivide:l,log:c,isNumeric:o}=e;return r(BB,{"Array, Array":function(d,h){return u(t(d),t(h))},"Matrix, Array":function(d,h){return u(d,t(h))},"Array, Matrix":function(d,h){return u(t(d),h)},"Matrix, Matrix":function(d,h){return u(d,h)}});function u(m,d){var h=d.size().length,y=m.size().length;if(h>1)throw new Error("first object must be one dimensional");if(y>1)throw new Error("second object must be one dimensional");if(h!==y)throw new Error("Length of two vectors must be equal");var v=n(m);if(v===0)throw new Error("Sum of elements in first object must be non zero");var x=n(d);if(x===0)throw new Error("Sum of elements in second object must be non zero");var w=a(m,n(m)),C=a(d,n(d)),b=n(i(w,s(l(w,C),A=>c(A))));return o(b)?b:Number.NaN}});var PB="multinomial",eV=["typed","add","divide","multiply","factorial","isInteger","isPositive"],zg=F(PB,eV,e=>{var{typed:r,add:t,divide:a,multiply:n,factorial:i,isInteger:s,isPositive:l}=e;return r(PB,{"Array | Matrix":function(o){var u=0,m=1;return An(o,function(d){if(!s(d)||!l(d))throw new TypeError("Positive integer value expected in function multinomial");u=t(u,d),m=n(m,i(d))}),a(i(u),m)}})});var IB="permutations",rV=["typed","factorial"],Ug=F(IB,rV,e=>{var{typed:r,factorial:t}=e;return r(IB,{"number | BigNumber":t,"number, number":function(n,i){if(!Ze(n)||n<0)throw new TypeError("Positive integer value expected in function permutations");if(!Ze(i)||i<0)throw new TypeError("Positive integer value expected in function permutations");if(i>n)throw new TypeError("second argument k must be less than or equal to first argument n");return va(n-i+1,n)},"BigNumber, BigNumber":function(n,i){var s,l;if(!RB(n)||!RB(i))throw new TypeError("Positive integer value expected in function permutations");if(i.gt(n))throw new TypeError("second argument k must be less than or equal to first argument n");var c=n.mul(0).add(1);for(s=c,l=n.minus(i).plus(1);l.lte(n);l=l.plus(1))s=s.times(l);return s}})});function RB(e){return e.isInteger()&&e.gte(0)}var BD=ma(jB(),1),uV=(0,BD.default)(Date.now());function no(e){var r;function t(n){r=n===null?uV:(0,BD.default)(String(n))}t(e);function a(){return r()}return a}var eP="pickRandom",fV=["typed","config","?on"],Yg=F(eP,fV,e=>{var{typed:r,config:t,on:a}=e,n=no(t.randomSeed);return a&&a("config",function(s,l){s.randomSeed!==l.randomSeed&&(n=no(s.randomSeed))}),r(eP,{"Array | Matrix":function(l){return i(l,{})},"Array | Matrix, Object":function(l,c){return i(l,c)},"Array | Matrix, number":function(l,c){return i(l,{number:c})},"Array | Matrix, Array | Matrix":function(l,c){return i(l,{weights:c})},"Array | Matrix, Array | Matrix, number":function(l,c,o){return i(l,{number:o,weights:c})},"Array | Matrix, number, Array | Matrix":function(l,c,o){return i(l,{number:c,weights:o})}});function i(s,l){var{number:c,weights:o,elementWise:u=!0}=l,m=typeof c>"u";m&&(c=1);var d=Qe(s)?s.create:Qe(o)?o.create:null;s=s.valueOf(),o&&(o=o.valueOf()),u===!0&&(s=gr(s),o=gr(o));var h=0;if(typeof o<"u"){if(o.length!==s.length)throw new Error("Weights must have the same length as possibles");for(var y=0,v=o.length;y"u")C=s[Math.floor(n()*x)];else for(var b=n()*h,A=0,M=s.length;A1)for(var a=0,n=e.shift();a{var{typed:r,config:t,on:a}=e,n=no(t.randomSeed);return a&&a("config",function(l,c){l.randomSeed!==c.randomSeed&&(n=no(l.randomSeed))}),r(rP,{"":()=>s(0,1),number:l=>s(0,l),"number, number":(l,c)=>s(l,c),"Array | Matrix":l=>i(l,0,1),"Array | Matrix, number":(l,c)=>i(l,0,c),"Array | Matrix, number, number":(l,c,o)=>i(l,c,o)});function i(l,c,o){var u=qc(l.valueOf(),()=>s(c,o));return Qe(l)?l.create(u):u}function s(l,c){return l+n()*(c-l)}});var tP="randomInt",lV=["typed","config","?on"],$g=F(tP,lV,e=>{var{typed:r,config:t,on:a}=e,n=no(t.randomSeed);return a&&a("config",function(l,c){l.randomSeed!==c.randomSeed&&(n=no(l.randomSeed))}),r(tP,{"":()=>s(0,1),number:l=>s(0,l),"number, number":(l,c)=>s(l,c),"Array | Matrix":l=>i(l,0,1),"Array | Matrix, number":(l,c)=>i(l,0,c),"Array | Matrix, number, number":(l,c,o)=>i(l,c,o)});function i(l,c,o){var u=qc(l.valueOf(),()=>s(c,o));return Qe(l)?l.create(u):u}function s(l,c){return Math.floor(l+n()*(c-l))}});var nP="stirlingS2",mV=["typed","addScalar","subtractScalar","multiplyScalar","divideScalar","pow","factorial","combinations","isNegative","isInteger","number","?bignumber","larger"],Gg=F(nP,mV,e=>{var{typed:r,addScalar:t,subtractScalar:a,multiplyScalar:n,divideScalar:i,pow:s,factorial:l,combinations:c,isNegative:o,isInteger:u,number:m,bignumber:d,larger:h}=e,y=[],v=[];return r(nP,{"number | BigNumber, number | BigNumber":function(w,C){if(!u(w)||o(w)||!u(C)||o(C))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(h(C,w))throw new TypeError("k must be less than or equal to n in function stirlingS2");var b=!(sr(w)&&sr(C)),A=b?v:y,M=b?d:m,D=m(w),O=m(C);if(A[D]&&A[D].length>O)return A[D][O];for(var _=0;_<=D;++_)if(A[_]||(A[_]=[M(_===0?1:0)]),_!==0)for(var E=A[_],T=A[_-1],R=E.length;R<=_&&R<=O;++R)R===_?E[R]=1:E[R]=t(n(M(R),T[R]),T[R-1]);return A[D][O]}})});var aP="bellNumbers",pV=["typed","addScalar","isNegative","isInteger","stirlingS2"],Vg=F(aP,pV,e=>{var{typed:r,addScalar:t,isNegative:a,isInteger:n,stirlingS2:i}=e;return r(aP,{"number | BigNumber":function(l){if(!n(l)||a(l))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var c=0,o=0;o<=l;o++)c=t(c,i(l,o));return c}})});var iP="catalan",dV=["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],Zg=F(iP,dV,e=>{var{typed:r,addScalar:t,divideScalar:a,multiplyScalar:n,combinations:i,isNegative:s,isInteger:l}=e;return r(iP,{"number | BigNumber":function(o){if(!l(o)||s(o))throw new TypeError("Non-negative integer value expected in function catalan");return a(i(n(o,2),o),t(o,1))}})});var oP="composition",hV=["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],Qg=F(oP,hV,e=>{var{typed:r,addScalar:t,combinations:a,isPositive:n,isNegative:i,isInteger:s,larger:l}=e;return r(oP,{"number | BigNumber, number | BigNumber":function(o,u){if(!s(o)||!n(o)||!s(u)||!n(u))throw new TypeError("Positive integer value expected in function composition");if(l(u,o))throw new TypeError("k must be less than or equal to n in function composition");return a(t(o,-1),t(u,-1))}})});var sP="leafCount",vV=["parse","typed"],Xg=F(sP,vV,e=>{var{parse:r,typed:t}=e;function a(n){var i=0;return n.forEach(s=>{i+=a(s)}),i||1}return t(sP,{Node:function(i){return a(i)}})});function PD(e){return xr(e)||ct(e)&&e.isUnary()&&xr(e.args[0])}function Lc(e){return!!(xr(e)||(yn(e)||ct(e))&&e.args.every(Lc)||en(e)&&Lc(e.content))}function uP(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ID(e){for(var r=1;r{var{FunctionNode:r,OperatorNode:t,SymbolNode:a}=e,n=!0,i=!1,s="defaultF",l={add:{trivial:n,total:n,commutative:n,associative:n},unaryPlus:{trivial:n,total:n,commutative:n,associative:n},subtract:{trivial:i,total:n,commutative:i,associative:i},multiply:{trivial:n,total:n,commutative:n,associative:n},divide:{trivial:i,total:n,commutative:i,associative:i},paren:{trivial:n,total:n,commutative:n,associative:i},defaultF:{trivial:i,total:n,commutative:i,associative:i}},c={divide:{total:i},log:{total:i}},o={subtract:{total:i},abs:{trivial:n},log:{total:n}};function u(b,A){var M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:l,D=s;if(typeof b=="string"?D=b:ct(b)?D=b.fn.toString():yn(b)?D=b.name:en(b)&&(D="paren"),Xe(M,D)){var O=M[D];if(Xe(O,A))return O[A];if(Xe(l,D))return l[D][A]}if(Xe(M,s)){var _=M[s];return Xe(_,A)?_[A]:l[s][A]}if(Xe(l,D)){var E=l[D];if(Xe(E,A))return E[A]}return l[s][A]}function m(b){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;return u(b,"commutative",A)}function d(b){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;return u(b,"associative",A)}function h(b,A){var M=ID({},b);for(var D in A)Xe(b,D)?M[D]=ID(ID({},A[D]),b[D]):M[D]=A[D];return M}function y(b,A){if(!b.args||b.args.length===0)return b;b.args=v(b,A);for(var M=0;M2&&d(b,A)){for(var _=b.args.pop();b.args.length>0;)_=M([b.args.pop(),_]);b.args=_.args}}}function w(b,A){if(!(!b.args||b.args.length===0)){for(var M=C(b),D=b.args.length,O=0;O2&&d(b,A)){for(var _=b.args.shift();b.args.length>0;)_=M([_,b.args.shift()]);b.args=_.args}}}function C(b){return ct(b)?function(A){try{return new t(b.op,b.fn,A,b.implicit)}catch(M){return console.error(M),[]}}:function(A){return new r(new a(b.name),A)}}return{createMakeNodeFunction:C,hasProperty:u,isCommutative:m,isAssociative:d,mergeContext:h,flatten:y,allChildren:v,unflattenr:x,unflattenl:w,defaultContext:l,realContext:c,positiveContext:o}});var xV="simplify",bV=["config","typed","parse","add","subtract","multiply","divide","pow","isZero","equal","resolve","simplifyConstant","simplifyCore","?fraction","?bignumber","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],Jg=F(xV,bV,e=>{var{config:r,typed:t,parse:a,add:n,subtract:i,multiply:s,divide:l,pow:c,isZero:o,equal:u,resolve:m,simplifyConstant:d,simplifyCore:h,fraction:y,bignumber:v,mathWithTransform:x,matrix:w,AccessorNode:C,ArrayNode:b,ConstantNode:A,FunctionNode:M,IndexNode:D,ObjectNode:O,OperatorNode:_,ParenthesisNode:E,SymbolNode:T}=e,{hasProperty:R,isCommutative:L,isAssociative:H,mergeContext:G,flatten:W,unflattenr:q,unflattenl:k,createMakeNodeFunction:K,defaultContext:z,realContext:oe,positiveContext:pe}=cf({FunctionNode:M,OperatorNode:_,SymbolNode:T});t.addConversion({from:"Object",to:"Map",convert:ji});var ae=t("simplify",{Node:ye,"Node, Map":(j,ne)=>ye(j,!1,ne),"Node, Map, Object":(j,ne,ue)=>ye(j,!1,ne,ue),"Node, Array":ye,"Node, Array, Map":ye,"Node, Array, Map, Object":ye});t.removeConversion({from:"Object",to:"Map",convert:ji}),ae.defaultContext=z,ae.realContext=oe,ae.positiveContext=pe;function $(j){return j.transform(function(ne,ue,Me){return en(ne)?$(ne.content):ne})}var le={true:!0,false:!0,e:!0,i:!0,Infinity:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,NaN:!0,phi:!0,pi:!0,SQRT1_2:!0,SQRT2:!0,tau:!0};ae.rules=[h,{l:"log(e)",r:"1"},{s:"n-n1 -> n+-n1",assuming:{subtract:{total:!0}}},{s:"n-n -> 0",assuming:{subtract:{total:!1}}},{s:"-(cl*v) -> v * (-cl)",assuming:{multiply:{commutative:!0},subtract:{total:!0}}},{s:"-(cl*v) -> (-cl) * v",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{s:"-(v*cl) -> v * (-cl)",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{l:"-(n1/n2)",r:"-n1/n2"},{l:"-v",r:"v * (-1)"},{l:"(n1 + n2)*(-1)",r:"n1*(-1) + n2*(-1)",repeat:!0},{l:"n/n1^n2",r:"n*n1^-n2"},{l:"n/n1",r:"n*n1^-1"},{s:"(n1*n2)^n3 -> n1^n3 * n2^n3",assuming:{multiply:{commutative:!0}}},{s:"(n1*n2)^(-1) -> n2^(-1) * n1^(-1)",assuming:{multiply:{commutative:!1}}},{s:"(n ^ n1) ^ n2 -> n ^ (n1 * n2)",assuming:{divide:{total:!0}}},{l:" vd * ( vd * n1 + n2)",r:"vd^2 * n1 + vd * n2"},{s:" vd * (vd^n4 * n1 + n2) -> vd^(1+n4) * n1 + vd * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * ( vd * n1 + n2) -> vd^(n3+1) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * (vd^n4 * n1 + n2) -> vd^(n3+n4) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{l:"n*n",r:"n^2"},{s:"n * n^n1 -> n^(n1+1)",assuming:{divide:{total:!0}}},{s:"n^n1 * n^n2 -> n^(n1+n2)",assuming:{divide:{total:!0}}},d,{s:"n+n -> 2*n",assuming:{add:{total:!0}}},{l:"n+-n",r:"0"},{l:"vd*n + vd",r:"vd*(n+1)"},{l:"n3*n1 + n3*n2",r:"n3*(n1+n2)"},{l:"n3^(-n4)*n1 + n3 * n2",r:"n3^(-n4)*(n1 + n3^(n4+1) *n2)"},{l:"n3^(-n4)*n1 + n3^n5 * n2",r:"n3^(-n4)*(n1 + n3^(n4+n5)*n2)"},{s:"n*vd + vd -> (n+1)*vd",assuming:{multiply:{commutative:!1}}},{s:"vd + n*vd -> (1+n)*vd",assuming:{multiply:{commutative:!1}}},{s:"n1*n3 + n2*n3 -> (n1+n2)*n3",assuming:{multiply:{commutative:!1}}},{s:"n^n1 * n -> n^(n1+1)",assuming:{divide:{total:!0},multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3 -> (n1 + n2*n3^(n4 + 1))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3^n5 -> (n1 + n2*n3^(n4 + n5))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{l:"n*cd + cd",r:"(n+1)*cd"},{s:"cd*n + cd -> cd*(n+1)",assuming:{multiply:{commutative:!1}}},{s:"cd + cd*n -> cd*(1+n)",assuming:{multiply:{commutative:!1}}},d,{s:"(-n)*n1 -> -(n*n1)",assuming:{subtract:{total:!0}}},{s:"n1*(-n) -> -(n1*n)",assuming:{subtract:{total:!0},multiply:{commutative:!1}}},{s:"ce+ve -> ve+ce",assuming:{add:{commutative:!0}},imposeContext:{add:{commutative:!1}}},{s:"vd*cd -> cd*vd",assuming:{multiply:{commutative:!0}},imposeContext:{multiply:{commutative:!1}}},{l:"n+-n1",r:"n-n1"},{l:"n+-(n1)",r:"n-(n1)"},{s:"n*(n1^-1) -> n/n1",assuming:{multiply:{commutative:!0}}},{s:"n*n1^-n2 -> n/n1^n2",assuming:{multiply:{commutative:!0}}},{s:"n^-1 -> 1/n",assuming:{multiply:{commutative:!0}}},{l:"n^1",r:"n"},{s:"n*(n1/n2) -> (n*n1)/n2",assuming:{multiply:{associative:!0}}},{s:"n-(n1+n2) -> n-n1-n2",assuming:{addition:{associative:!0,commutative:!0}}},{l:"1*n",r:"n",imposeContext:{multiply:{commutative:!0}}},{s:"n1/(n2/n3) -> (n1*n3)/n2",assuming:{multiply:{associative:!0}}},{l:"n1/(-n2)",r:"-n1/n2"}];function Ee(j,ne){var ue={};if(j.s){var Me=j.s.split("->");if(Me.length===2)ue.l=Me[0],ue.r=Me[1];else throw SyntaxError("Could not parse rule: "+j.s)}else ue.l=j.l,ue.r=j.r;ue.l=$(a(ue.l)),ue.r=$(a(ue.r));for(var Ce of["imposeContext","repeat","assuming"])Ce in j&&(ue[Ce]=j[Ce]);if(j.evaluate&&(ue.evaluate=a(j.evaluate)),H(ue.l,ne)){var Le=!L(ue.l,ne),Ie;Le&&(Ie=Se());var fr=K(ue.l),or=Se();ue.expanded={},ue.expanded.l=fr([ue.l,or]),W(ue.expanded.l,ne),q(ue.expanded.l,ne),ue.expanded.r=fr([ue.r,or]),Le&&(ue.expandedNC1={},ue.expandedNC1.l=fr([Ie,ue.l]),ue.expandedNC1.r=fr([Ie,ue.r]),ue.expandedNC2={},ue.expandedNC2.l=fr([Ie,ue.expanded.l]),ue.expandedNC2.r=fr([Ie,ue.expanded.r]))}return ue}function me(j,ne){for(var ue=[],Me=0;Me2&&arguments[2]!==void 0?arguments[2]:Bo(),Me=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},Ce=Me.consoleDebug;ne=me(ne||ae.rules,Me.context);var Le=m(j,ue);Le=$(Le);for(var Ie={},fr=Le.toString({parenthesis:"all"});!Ie[fr];){Ie[fr]=!0,ge=0;var or=fr;Ce&&console.log("Working on: ",fr);for(var Ke=0;Ke ").concat(ne[Ke].r.toString()))),Ce){var ee=Le.toString({parenthesis:"all"});ee!==or&&(console.log("Applying",Br,"produced",ee),or=ee)}k(Le,Me.context)}fr=Le.toString({parenthesis:"all"})}return Le}function be(j,ne,ue){var Me=j;if(j)for(var Ce=0;Ce1&&(or=Le(j.args.slice(0,fr))),Ce=j.args.slice(fr),Me=Ce.length===1?Ce[0]:Le(Ce),ue.push(Le([or,Me]))}return ue}function We(j,ne){var ue={placeholders:{}};if(!j.placeholders&&!ne.placeholders)return ue;if(j.placeholders){if(!ne.placeholders)return j}else return ne;for(var Me in j.placeholders)if(Xe(j.placeholders,Me)&&(ue.placeholders[Me]=j.placeholders[Me],Xe(ne.placeholders,Me)&&!xe(j.placeholders[Me],ne.placeholders[Me])))return null;for(var Ce in ne.placeholders)Xe(ne.placeholders,Ce)&&(ue.placeholders[Ce]=ne.placeholders[Ce]);return ue}function Je(j,ne){var ue=[];if(j.length===0||ne.length===0)return ue;for(var Me,Ce=0;Ce2)throw new Error("permuting >2 commutative non-associative rule arguments not yet implemented");var or=re(j.args[0],ne.args[1],ue);if(or.length===0)return[];var Ke=re(j.args[1],ne.args[0],ue);if(Ke.length===0)return[];Le=[or,Ke]}Ce=J(Le)}else if(ne.args.length>=2&&j.args.length===2){for(var Br=Ae(ne,ue),ee=[],ce=0;ce2)throw Error("Unexpected non-binary associative function: "+j.toString());return[]}}else if(j instanceof T){if(j.name.length===0)throw new Error("Symbol in rule has 0 length...!?");if(le[j.name]){if(j.name!==ne.name)return[]}else switch(j.name[1]>="a"&&j.name[1]<="z"?j.name.substring(0,2):j.name[0]){case"n":case"_p":Ce[0].placeholders[j.name]=ne;break;case"c":case"cl":if(xr(ne))Ce[0].placeholders[j.name]=ne;else return[];break;case"v":if(!xr(ne))Ce[0].placeholders[j.name]=ne;else return[];break;case"vl":if(at(ne))Ce[0].placeholders[j.name]=ne;else return[];break;case"cd":if(PD(ne))Ce[0].placeholders[j.name]=ne;else return[];break;case"vd":if(!PD(ne))Ce[0].placeholders[j.name]=ne;else return[];break;case"ce":if(Lc(ne))Ce[0].placeholders[j.name]=ne;else return[];break;case"ve":if(!Lc(ne))Ce[0].placeholders[j.name]=ne;else return[];break;default:throw new Error("Invalid symbol in rule: "+j.name)}}else if(j instanceof A){if(!u(j.value,ne.value))return[]}else return[];return Ce}function xe(j,ne){if(j instanceof A&&ne instanceof A){if(!u(j.value,ne.value))return!1}else if(j instanceof T&&ne instanceof T){if(j.name!==ne.name)return!1}else if(j instanceof _&&ne instanceof _||j instanceof M&&ne instanceof M){if(j instanceof _){if(j.op!==ne.op||j.fn!==ne.fn)return!1}else if(j instanceof M&&j.name!==ne.name)return!1;if(j.args.length!==ne.args.length)return!1;for(var ue=0;ue{var{typed:r,config:t,mathWithTransform:a,matrix:n,fraction:i,bignumber:s,AccessorNode:l,ArrayNode:c,ConstantNode:o,FunctionNode:u,IndexNode:m,ObjectNode:d,OperatorNode:h,SymbolNode:y}=e,{isCommutative:v,isAssociative:x,allChildren:w,createMakeNodeFunction:C}=cf({FunctionNode:u,OperatorNode:h,SymbolNode:y}),b=r("simplifyConstant",{Node:W=>O(G(W,{})),"Node, Object":function(q,k){return O(G(q,k))}});function A(W){return da(W)?W.valueOf():W instanceof Array?W.map(A):Qe(W)?n(A(W.valueOf())):W}function M(W,q,k){try{return a[W].apply(null,q)}catch{return q=q.map(A),E(a[W].apply(null,q),k)}}var D=r({Fraction:R,number:function(q){return q<0?T(new o(-q)):new o(q)},BigNumber:function(q){return q<0?T(new o(-q)):new o(q)},Complex:function(q){throw new Error("Cannot convert Complex number to Node")},string:function(q){return new o(q)},Matrix:function(q){return new c(q.valueOf().map(k=>D(k)))}});function O(W){return Nr(W)?W:D(W)}function _(W,q){var k=q&&q.exactFractions!==!1;if(k&&isFinite(W)&&i){var K=i(W),z=q&&typeof q.fractionsLimit=="number"?q.fractionsLimit:1/0;if(K.valueOf()===W&&K.n0;)if(xr(K[0])&&typeof K[0].value!="string"){var z=E(K.shift().value,k);jt(W)?W=W.items[z-1]:(W=W.valueOf()[z-1],W instanceof Array&&(W=n(W)))}else if(K.length>1&&xr(K[1])&&typeof K[1].value!="string"){var oe=E(K[1].value,k),pe=[],ae=jt(W)?W.items:W.valueOf();for(var $ of ae)if(jt($))pe.push($.items[oe-1]);else if(Qe(W))pe.push($[oe-1]);else break;if(pe.length===ae.length)jt(W)?W=new c(pe):W=n(pe),K.splice(1,1);else break}else break;return K.length===q.dimensions.length?new l(O(W),q):K.length>0?(q=new m(K),new l(O(W),q)):W}if(Ei(W)&&q.dimensions.length===1&&xr(q.dimensions[0])){var le=q.dimensions[0].value;return le in W.properties?W.properties[le]:new o}return new l(O(W),q)}function H(W,q,k,K){var z=q.shift(),oe=q.reduce((pe,ae)=>{if(!Nr(ae)){var $=pe.pop();if(Nr($))return[$,ae];try{return pe.push(M(W,[$,ae],K)),pe}catch{pe.push($)}}pe.push(O(pe.pop()));var le=pe.length===1?pe[0]:k(pe);return[k([le,O(ae)])]},[z]);return oe.length===1?oe[0]:k([oe[0],D(oe[1])])}function G(W,q){switch(W.type){case"SymbolNode":return W;case"ConstantNode":switch(typeof W.value){case"number":return E(W.value,q);case"string":return W.value;default:if(!isNaN(W.value))return E(W.value,q)}return W;case"FunctionNode":if(a[W.name]&&a[W.name].rawArgs)return W;{var k=["add","multiply"];if(k.indexOf(W.name)===-1){var K=W.args.map(De=>G(De,q));if(!K.some(Nr))try{return M(W.name,K,q)}catch{}if(W.name==="size"&&K.length===1&&jt(K[0])){for(var z=[],oe=K[0];jt(oe);)z.push(oe.items.length),oe=oe.items[0];return n(z)}return new u(W.name,K.map(O))}}case"OperatorNode":{var pe=W.fn.toString(),ae,$,le=C(W);if(ct(W)&&W.isUnary())ae=[G(W.args[0],q)],Nr(ae[0])?$=le(ae):$=M(pe,ae,q);else if(x(W,q.context))if(ae=w(W,q.context),ae=ae.map(De=>G(De,q)),v(pe,q.context)){for(var Ee=[],me=[],ge=0;ge1?($=H(pe,Ee,le,q),me.unshift($),$=H(pe,me,le,q)):$=H(pe,ae,le,q)}else $=H(pe,ae,le,q);else ae=W.args.map(De=>G(De,q)),$=H(pe,ae,le,q);return $}case"ParenthesisNode":return G(W.content,q);case"AccessorNode":return L(G(W.object,q),G(W.index,q),q);case"ArrayNode":{var Se=W.items.map(De=>G(De,q));return Se.some(Nr)?new c(Se.map(O)):n(Se)}case"IndexNode":return new m(W.dimensions.map(De=>b(De,q)));case"ObjectNode":{var ye={};for(var be in W.properties)ye[be]=b(W.properties[be],q);return new d(ye)}case"AssignmentNode":case"BlockNode":case"FunctionAssignmentNode":case"RangeNode":case"ConditionalNode":default:throw new Error("Unimplemented node type in simplifyConstant: ".concat(W.type))}}return b});var fP="simplifyCore",SV=["typed","parse","equal","isZero","add","subtract","multiply","divide","pow","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],jg=F(fP,SV,e=>{var{typed:r,parse:t,equal:a,isZero:n,add:i,subtract:s,multiply:l,divide:c,pow:o,AccessorNode:u,ArrayNode:m,ConstantNode:d,FunctionNode:h,IndexNode:y,ObjectNode:v,OperatorNode:x,ParenthesisNode:w,SymbolNode:C}=e,b=new d(0),A=new d(1),M=new d(!0),D=new d(!1);function O(R){return ct(R)&&["and","not","or"].includes(R.op)}var{hasProperty:_,isCommutative:E}=cf({FunctionNode:h,OperatorNode:x,SymbolNode:C});function T(R){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H=L?L.context:void 0;if(_(R,"trivial",H)){if(yn(R)&&R.args.length===1)return T(R.args[0],L);var G=!1,W=0;if(R.forEach(me=>{++W,W===1&&(G=T(me,L))}),W===1)return G}var q=R;if(yn(q)){var k=oT(q.name);if(k){if(q.args.length>2&&_(q,"associative",H))for(;q.args.length>2;){var K=q.args.pop(),z=q.args.pop();q.args.push(new x(k,q.name,[K,z]))}q=new x(k,q.name,q.args)}else return new h(T(q.fn),q.args.map(me=>T(me,L)))}if(ct(q)&&q.isUnary()){var oe=T(q.args[0],L);if(q.op==="~"&&ct(oe)&&oe.isUnary()&&oe.op==="~"||q.op==="not"&&ct(oe)&&oe.isUnary()&&oe.op==="not"&&O(oe.args[0]))return oe.args[0];var pe=!0;if(q.op==="-"&&ct(oe)&&(oe.isBinary()&&oe.fn==="subtract"&&(q=new x("-","subtract",[oe.args[1],oe.args[0]]),pe=!1),oe.isUnary()&&oe.op==="-"))return oe.args[0];if(pe)return new x(q.op,q.fn,[oe])}if(ct(q)&&q.isBinary()){var ae=T(q.args[0],L),$=T(q.args[1],L);if(q.op==="+"){if(xr(ae)&&n(ae.value))return $;if(xr($)&&n($.value))return ae;ct($)&&$.isUnary()&&$.op==="-"&&($=$.args[0],q=new x("-","subtract",[ae,$]))}if(q.op==="-")return ct($)&&$.isUnary()&&$.op==="-"?T(new x("+","add",[ae,$.args[0]]),L):xr(ae)&&n(ae.value)?T(new x("-","unaryMinus",[$])):xr($)&&n($.value)?ae:new x(q.op,q.fn,[ae,$]);if(q.op==="*"){if(xr(ae)){if(n(ae.value))return b;if(a(ae.value,1))return $}if(xr($)){if(n($.value))return b;if(a($.value,1))return ae;if(E(q,H))return new x(q.op,q.fn,[$,ae],q.implicit)}return new x(q.op,q.fn,[ae,$],q.implicit)}if(q.op==="/")return xr(ae)&&n(ae.value)?b:xr($)&&a($.value,1)?ae:new x(q.op,q.fn,[ae,$]);if(q.op==="^"&&xr($)){if(n($.value))return A;if(a($.value,1))return ae}if(q.op==="and"){if(xr(ae))if(ae.value){if(O($))return $;if(xr($))return $.value?M:D}else return D;if(xr($))if($.value){if(O(ae))return ae}else return D}if(q.op==="or"){if(xr(ae)){if(ae.value)return M;if(O($))return $}if(xr($)){if($.value)return M;if(O(ae))return ae}}return new x(q.op,q.fn,[ae,$])}if(ct(q))return new x(q.op,q.fn,q.args.map(me=>T(me,L)));if(jt(q))return new m(q.items.map(me=>T(me,L)));if(zn(q))return new u(T(q.object,L),T(q.index,L));if(Jn(q))return new y(q.dimensions.map(me=>T(me,L)));if(Ei(q)){var le={};for(var Ee in q.properties)le[Ee]=T(q.properties[Ee],L);return new v(le)}return q}return r(fP,{Node:T,"Node,Object":T})});var NV="resolve",AV=["typed","parse","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode"],e0=F(NV,AV,e=>{var{typed:r,parse:t,ConstantNode:a,FunctionNode:n,OperatorNode:i,ParenthesisNode:s}=e;function l(c,o){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Set;if(!o)return c;if(at(c)){if(u.has(c.name)){var m=Array.from(u).join(", ");throw new ReferenceError("recursive loop of variable definitions among {".concat(m,"}"))}var d=o.get(c.name);if(Nr(d)){var h=new Set(u);return h.add(c.name),l(d,o,h)}else return typeof d=="number"?t(String(d)):d!==void 0?new a(d):c}else if(ct(c)){var y=c.args.map(function(x){return l(x,o,u)});return new i(c.op,c.fn,y,c.implicit)}else{if(en(c))return new s(l(c.content,o,u));if(yn(c)){var v=c.args.map(function(x){return l(x,o,u)});return new n(c.name,v)}}return c.map(x=>l(x,o,u))}return r("resolve",{Node:l,"Node, Map | null | undefined":l,"Node, Object":(c,o)=>l(c,ji(o)),"Array | Matrix":r.referToSelf(c=>o=>o.map(u=>c(u))),"Array | Matrix, null | undefined":r.referToSelf(c=>o=>o.map(u=>c(u))),"Array, Object":r.referTo("Array,Map",c=>(o,u)=>c(o,ji(u))),"Matrix, Object":r.referTo("Matrix,Map",c=>(o,u)=>c(o,ji(u))),"Array | Matrix, Map":r.referToSelf(c=>(o,u)=>o.map(m=>c(m,u)))})});var cP="symbolicEqual",MV=["parse","simplify","typed","OperatorNode"],r0=F(cP,MV,e=>{var{parse:r,simplify:t,typed:a,OperatorNode:n}=e;function i(s,l){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=new n("-","subtract",[s,l]),u=t(o,{},c);return xr(u)&&!u.value}return a(cP,{"Node, Node":i,"Node, Node, Object":i})});var lP="derivative",CV=["typed","config","parse","simplify","equal","isZero","numeric","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],t0=F(lP,CV,e=>{var{typed:r,config:t,parse:a,simplify:n,equal:i,isZero:s,numeric:l,ConstantNode:c,FunctionNode:o,OperatorNode:u,ParenthesisNode:m,SymbolNode:d}=e;function h(b,A){var M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{simplify:!0},D={};x(D,b,A.name);var O=w(b,D);return M.simplify?n(O):O}r.addConversion({from:"identifier",to:"SymbolNode",convert:a});var y=r(lP,{"Node, SymbolNode":h,"Node, SymbolNode, Object":h});r.removeConversion({from:"identifier",to:"SymbolNode",convert:a}),y._simplify=!0,y.toTex=function(b){return v.apply(null,b.args)};var v=r("_derivTex",{"Node, SymbolNode":function(A,M){return xr(A)&&Tr(A.value)==="string"?v(a(A.value).toString(),M.toString(),1):v(A.toTex(),M.toString(),1)},"Node, ConstantNode":function(A,M){if(Tr(M.value)==="string")return v(A,a(M.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(A,M,D){return v(A.toString(),M.name,D.value)},"string, string, number":function(A,M,D){var O;return D===1?O="{d\\\\over d"+M+"}":O="{d^{"+D+"}\\\\over d"+M+"^{"+D+"}}",O+"\\\\left[".concat(A,"\\\\right]")}}),x=r("constTag",{"Object, ConstantNode, string":function(A,M){return A[M]=!0,!0},"Object, SymbolNode, string":function(A,M,D){return M.name!==D?(A[M]=!0,!0):!1},"Object, ParenthesisNode, string":function(A,M,D){return x(A,M.content,D)},"Object, FunctionAssignmentNode, string":function(A,M,D){return M.params.indexOf(D)===-1?(A[M]=!0,!0):x(A,M.expr,D)},"Object, FunctionNode | OperatorNode, string":function(A,M,D){if(M.args.length>0){for(var O=x(A,M.args[0],D),_=1;_0){var O=A.args.filter(function(W){return M[W]===void 0}),_=O.length===1?O[0]:new u("*","multiply",O),E=D.concat(w(_,M));return new u("*","multiply",E)}return new u("+","add",A.args.map(function(W){return new u("*","multiply",A.args.map(function(q){return q===W?w(q,M):q.clone()}))}))}if(A.op==="/"&&A.isBinary()){var T=A.args[0],R=A.args[1];return M[R]!==void 0?new u("/","divide",[w(T,M),R]):M[T]!==void 0?new u("*","multiply",[new u("-","unaryMinus",[T]),new u("/","divide",[w(R,M),new u("^","pow",[R.clone(),C(2)])])]):new u("/","divide",[new u("-","subtract",[new u("*","multiply",[w(T,M),R.clone()]),new u("*","multiply",[T.clone(),w(R,M)])]),new u("^","pow",[R.clone(),C(2)])])}if(A.op==="^"&&A.isBinary()){var L=A.args[0],H=A.args[1];if(M[L]!==void 0)return xr(L)&&(s(L.value)||i(L.value,1))?C(0):new u("*","multiply",[A,new u("*","multiply",[new o("log",[L.clone()]),w(H.clone(),M)])]);if(M[H]!==void 0){if(xr(H)){if(s(H.value))return C(0);if(i(H.value,1))return w(L,M)}var G=new u("^","pow",[L.clone(),new u("-","subtract",[H,C(1)])]);return new u("*","multiply",[H.clone(),new u("*","multiply",[w(L,M),G])])}return new u("*","multiply",[new u("^","pow",[L.clone(),H.clone()]),new u("+","add",[new u("*","multiply",[w(L,M),new u("/","divide",[H.clone(),L.clone()])]),new u("*","multiply",[w(H,M),new o("log",[L.clone()])])])])}throw new Error('Cannot process operator "'+A.op+'" in derivative: the operator is not supported, undefined, or the number of arguments passed to it are not supported')}});function C(b,A){return new c(l(b,A||t.number))}return y});var mP="rationalize",EV=["config","typed","equal","isZero","add","subtract","multiply","divide","pow","parse","simplifyConstant","simplifyCore","simplify","?bignumber","?fraction","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","SymbolNode","ParenthesisNode"],n0=F(mP,EV,e=>{var{config:r,typed:t,equal:a,isZero:n,add:i,subtract:s,multiply:l,divide:c,pow:o,parse:u,simplifyConstant:m,simplifyCore:d,simplify:h,fraction:y,bignumber:v,mathWithTransform:x,matrix:w,AccessorNode:C,ArrayNode:b,ConstantNode:A,FunctionNode:M,IndexNode:D,ObjectNode:O,OperatorNode:_,SymbolNode:E,ParenthesisNode:T}=e;function R(q){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,z=H(),oe=L(q,k,!0,z.firstRules),pe=oe.variables.length,ae={exactFractions:!1},$={exactFractions:!0};if(q=oe.expression,pe>=1){q=G(q);var le,Ee,me=!0,ge=!1;q=h(q,z.firstRules,{},ae);for(var Se;Ee=me?z.distrDivRules:z.sucDivRules,q=h(q,Ee,{},$),me=!me,Se=q.toString(),Se!==le;)ge=!0,le=Se;ge&&(q=h(q,z.firstRulesAgain,{},ae)),q=h(q,z.finalRules,{},ae)}var ye=[],be={};return q.type==="OperatorNode"&&q.isBinary()&&q.op==="/"?(pe===1&&(q.args[0]=W(q.args[0],ye),q.args[1]=W(q.args[1])),K&&(be.numerator=q.args[0],be.denominator=q.args[1])):(pe===1&&(q=W(q,ye)),K&&(be.numerator=q,be.denominator=null)),K?(be.coefficients=ye,be.variables=oe.variables,be.expression=q,be):q}return t(mP,{Node:R,"Node, boolean":(q,k)=>R(q,{},k),"Node, Object":R,"Node, Object, boolean":R});function L(q,k,K,z){var oe=[],pe=h(q,z,k,{exactFractions:!1});K=!!K;var ae="+-*"+(K?"/":"");le(pe);var $={};return $.expression=pe,$.variables=oe,$;function le(Ee){var me=Ee.type;if(me==="FunctionNode")throw new Error("There is an unsolved function call");if(me==="OperatorNode")if(Ee.op==="^"){if(Ee.args[1].type!=="ConstantNode"||!Ze(parseFloat(Ee.args[1].value)))throw new Error("There is a non-integer exponent");le(Ee.args[0])}else{if(ae.indexOf(Ee.op)===-1)throw new Error("Operator "+Ee.op+" invalid in polynomial expression");for(var ge=0;ge1;if(z==="OperatorNode"&&q.isBinary()){var pe=!1,ae;if(q.op==="^"&&(q.args[0].type==="ParenthesisNode"||q.args[0].type==="OperatorNode")&&q.args[1].type==="ConstantNode"&&(ae=parseFloat(q.args[1].value),pe=ae>=2&&Ze(ae)),pe){if(ae>2){var $=q.args[0],le=new _("^","pow",[q.args[0].cloneDeep(),new A(ae-1)]);q=new _("*","multiply",[$,le])}else q=new _("*","multiply",[q.args[0],q.args[0].cloneDeep()]);oe&&(K==="content"?k.content=q:k.args[K]=q)}}if(z==="ParenthesisNode")G(q.content,q,"content");else if(z!=="ConstantNode"&&z!=="SymbolNode")for(var Ee=0;Ee=0;$--)if(k[$]!==0){var le=new A(pe?k[$]:Math.abs(k[$])),Ee=k[$]<0?"-":"+";if($>0){var me=new E(oe);if($>1){var ge=new A($);me=new _("^","pow",[me,ge])}k[$]===-1&&pe?le=new _("-","unaryMinus",[me]):Math.abs(k[$])===1?le=me:le=new _("*","multiply",[le,me])}pe?ae=le:Ee==="+"?ae=new _("+","add",[ae,le]):ae=new _("-","subtract",[ae,le]),pe=!1}if(pe)return new A(0);return ae;function Se(ye,be,De){var Ae=ye.type;if(Ae==="FunctionNode")throw new Error("There is an unsolved function call");if(Ae==="OperatorNode"){if("+-*^".indexOf(ye.op)===-1)throw new Error("Operator "+ye.op+" invalid");if(be!==null){if((ye.fn==="unaryMinus"||ye.fn==="pow")&&be.fn!=="add"&&be.fn!=="subtract"&&be.fn!=="multiply")throw new Error("Invalid "+ye.op+" placing");if((ye.fn==="subtract"||ye.fn==="add"||ye.fn==="multiply")&&be.fn!=="add"&&be.fn!=="subtract")throw new Error("Invalid "+ye.op+" placing");if((ye.fn==="subtract"||ye.fn==="add"||ye.fn==="unaryMinus")&&De.noFil!==0)throw new Error("Invalid "+ye.op+" placing")}(ye.op==="^"||ye.op==="*")&&(De.fire=ye.op);for(var We=0;Wez&&(k[Je]=0),k[Je]+=De.cte*(De.oper==="+"?1:-1),z=Math.max(Je,z);return}De.cte=Je,De.fire===""&&(k[0]+=De.cte*(De.oper==="+"?1:-1))}else throw new Error("Type "+Ae+" is not allowed")}}});var pP="zpk2tf",TV=["typed","add","multiply","Complex","number"],a0=F(pP,TV,e=>{var{typed:r,add:t,multiply:a,Complex:n,number:i}=e;return r(pP,{"Array,Array,number":function(o,u,m){return s(o,u,m)},"Array,Array":function(o,u){return s(o,u,1)},"Matrix,Matrix,number":function(o,u,m){return s(o.valueOf(),u.valueOf(),m)},"Matrix,Matrix":function(o,u){return s(o.valueOf(),u.valueOf(),1)}});function s(c,o,u){c.some(C=>C.type==="BigNumber")&&(c=c.map(C=>i(C))),o.some(C=>C.type==="BigNumber")&&(o=o.map(C=>i(C)));for(var m=[n(1,0)],d=[n(1,0)],h=0;h=0&&m-d{var{typed:r,add:t,multiply:a,Complex:n,divide:i,matrix:s}=e;return r(dP,{"Array, Array":function(u,m){var d=c(512);return l(u,m,d)},"Array, Array, Array":function(u,m,d){return l(u,m,d)},"Array, Array, number":function(u,m,d){if(d<0)throw new Error("w must be a positive number");var h=c(d);return l(u,m,h)},"Matrix, Matrix":function(u,m){var d=c(512),{w:h,h:y}=l(u.valueOf(),m.valueOf(),d);return{w:s(h),h:s(y)}},"Matrix, Matrix, Matrix":function(u,m,d){var{h}=l(u.valueOf(),m.valueOf(),d.valueOf());return{h:s(h),w:s(d)}},"Matrix, Matrix, number":function(u,m,d){if(d<0)throw new Error("w must be a positive number");var h=c(d),{h:y}=l(u.valueOf(),m.valueOf(),h);return{h:s(y),w:s(h)}}});function l(o,u,m){for(var d=[],h=[],y=0;y{var{classes:r}=e;return function(a,n){var i=r[n&&n.mathjs];return i&&typeof i.fromJSON=="function"?i.fromJSON(n):n}});var BV="replacer",PV=[],s0=F(BV,PV,()=>function(r,t){return typeof t=="number"&&(!isFinite(t)||isNaN(t))?{mathjs:"number",value:String(t)}:t});var hP="12.4.1";var u0=F("true",[],()=>!0),f0=F("false",[],()=>!1),c0=F("null",[],()=>null),l0=ya("Infinity",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(1/0):1/0}),m0=ya("NaN",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(NaN):NaN}),p0=ya("pi",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?Rc(t):QM}),d0=ya("tau",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?gE(t):XM}),h0=ya("e",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?hE(t):JM}),v0=ya("phi",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?vE(t):KM}),g0=ya("LN2",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(2).ln():Math.LN2}),y0=ya("LN10",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(10).ln():Math.LN10}),x0=ya("LOG2E",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(1).div(new t(2).ln()):Math.LOG2E}),b0=ya("LOG10E",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(1).div(new t(10).ln()):Math.LOG10E}),w0=ya("SQRT1_2",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t("0.5").sqrt():Math.SQRT1_2}),D0=ya("SQRT2",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(2).sqrt():Math.SQRT2}),S0=ya("i",["Complex"],e=>{var{Complex:r}=e;return r.I}),vP=F("PI",["pi"],e=>{var{pi:r}=e;return r}),gP=F("E",["e"],e=>{var{e:r}=e;return r}),N0=F("version",[],()=>hP);function ya(e,r,t){return F(e,r,t,{recreateOnConfigChange:!0})}var A0=Er("speedOfLight","299792458","m s^-1"),M0=Er("gravitationConstant","6.67430e-11","m^3 kg^-1 s^-2"),C0=Er("planckConstant","6.62607015e-34","J s"),E0=Er("reducedPlanckConstant","1.0545718176461565e-34","J s"),T0=Er("magneticConstant","1.25663706212e-6","N A^-2"),F0=Er("electricConstant","8.8541878128e-12","F m^-1"),_0=Er("vacuumImpedance","376.730313667","ohm"),O0=Er("coulomb","8.987551792261171e9","N m^2 C^-2"),B0=Er("elementaryCharge","1.602176634e-19","C"),P0=Er("bohrMagneton","9.2740100783e-24","J T^-1"),I0=Er("conductanceQuantum","7.748091729863649e-5","S"),R0=Er("inverseConductanceQuantum","12906.403729652257","ohm"),k0=Er("magneticFluxQuantum","2.0678338484619295e-15","Wb"),q0=Er("nuclearMagneton","5.0507837461e-27","J T^-1"),L0=Er("klitzing","25812.807459304513","ohm");var z0=Er("bohrRadius","5.29177210903e-11","m"),U0=Er("classicalElectronRadius","2.8179403262e-15","m"),W0=Er("electronMass","9.1093837015e-31","kg"),Y0=Er("fermiCoupling","1.1663787e-5","GeV^-2"),H0=wy("fineStructure",.0072973525693),$0=Er("hartreeEnergy","4.3597447222071e-18","J"),G0=Er("protonMass","1.67262192369e-27","kg"),V0=Er("deuteronMass","3.3435830926e-27","kg"),Z0=Er("neutronMass","1.6749271613e-27","kg"),Q0=Er("quantumOfCirculation","3.6369475516e-4","m^2 s^-1"),X0=Er("rydberg","10973731.568160","m^-1"),J0=Er("thomsonCrossSection","6.6524587321e-29","m^2"),K0=wy("weakMixingAngle",.2229),j0=wy("efimovFactor",22.7),ey=Er("atomicMass","1.66053906660e-27","kg"),ry=Er("avogadro","6.02214076e23","mol^-1"),ty=Er("boltzmann","1.380649e-23","J K^-1"),ny=Er("faraday","96485.33212331001","C mol^-1"),ay=Er("firstRadiation","3.7417718521927573e-16","W m^2"),iy=Er("loschmidt","2.686780111798444e25","m^-3"),oy=Er("gasConstant","8.31446261815324","J K^-1 mol^-1"),sy=Er("molarPlanckConstant","3.990312712893431e-10","J s mol^-1"),uy=Er("molarVolume","0.022413969545014137","m^3 mol^-1"),fy=wy("sackurTetrode",-1.16487052358),cy=Er("secondRadiation","0.014387768775039337","m K"),ly=Er("stefanBoltzmann","5.67037441918443e-8","W m^-2 K^-4"),my=Er("wienDisplacement","2.897771955e-3","m K"),py=Er("molarMass","0.99999999965e-3","kg mol^-1"),dy=Er("molarMassC12","11.9999999958e-3","kg mol^-1"),hy=Er("gravity","9.80665","m s^-2"),vy=Er("planckLength","1.616255e-35","m"),gy=Er("planckMass","2.176435e-8","kg"),yy=Er("planckTime","5.391245e-44","s"),xy=Er("planckCharge","1.87554603778e-18","C"),by=Er("planckTemperature","1.416785e+32","K");function Er(e,r,t){var a=["config","Unit","BigNumber"];return F(e,a,n=>{var{config:i,Unit:s,BigNumber:l}=n,c=i.number==="BigNumber"?new l(r):parseFloat(r),o=new s(c,t);return o.fixPrefix=!0,o})}function wy(e,r){var t=["config","BigNumber"];return F(e,t,a=>{var{config:n,BigNumber:i}=a;return n.number==="BigNumber"?new i(r):r})}var IV="apply",RV=["typed","isInteger"],Dy=F(IV,RV,e=>{var{typed:r,isInteger:t}=e,a=Lo({typed:r,isInteger:t});return r("apply",{"...any":function(i){var s=i[1];sr(s)?i[1]=s-1:rr(s)&&(i[1]=s.minus(1));try{return a.apply(null,i)}catch(l){throw mt(l)}}})},{isTransformFunction:!0});var kV="column",qV=["typed","Index","matrix","range"],Sy=F(kV,qV,e=>{var{typed:r,Index:t,matrix:a,range:n}=e,i=Wu({typed:r,Index:t,matrix:a,range:n});return r("column",{"...any":function(l){var c=l.length-1,o=l[c];sr(o)&&(l[c]=o-1);try{return i.apply(null,l)}catch(u){throw mt(u)}}})},{isTransformFunction:!0});function lf(e,r,t){var a=e.filter(function(c){return at(c)&&!(c.name in r)&&!t.has(c.name)})[0];if(!a)throw new Error('No undefined variable found in inline expression "'+e+'"');var n=a.name,i=new Map,s=new Eu(t,i,new Set([n])),l=e.compile();return function(o){return i.set(n,o),l.evaluate(s)}}var LV="filter",zV=["typed"],Ny=F(LV,zV,e=>{var{typed:r}=e;function t(n,i,s){var l,c;return n[0]&&(l=n[0].compile().evaluate(s)),n[1]&&(at(n[1])||Oa(n[1])?c=n[1].compile().evaluate(s):c=lf(n[1],i,s)),a(l,c)}t.rawArgs=!0;var a=r("filter",{"Array, function":yP,"Matrix, function":function(i,s){return i.create(yP(i.toArray(),s))},"Array, RegExp":Mu,"Matrix, RegExp":function(i,s){return i.create(Mu(i.toArray(),s))}});return t},{isTransformFunction:!0});function yP(e,r){return Bm(e,function(t,a,n){return Ra(r,t,[a+1],n,"filter")})}var UV="forEach",WV=["typed"],Ay=F(UV,WV,e=>{var{typed:r}=e;function t(n,i,s){var l,c;return n[0]&&(l=n[0].compile().evaluate(s)),n[1]&&(at(n[1])||Oa(n[1])?c=n[1].compile().evaluate(s):c=lf(n[1],i,s)),a(l,c)}t.rawArgs=!0;var a=r("forEach",{"Array | Matrix, function":function(i,s){var l=function c(o,u){if(Array.isArray(o))_o(o,function(m,d){c(m,u.concat(d+1))});else return Ra(s,o,u,i,"forEach")};l(i.valueOf(),[])}});return t},{isTransformFunction:!0});var YV="index",HV=["Index","getMatrixDataType"],My=F(YV,HV,e=>{var{Index:r,getMatrixDataType:t}=e;return function(){for(var n=[],i=0,s=arguments.length;i0?0:2;else if(l&&l.isSet===!0)l=l.map(function(o){return o-1});else if(Mr(l)||Qe(l))t(l)!=="boolean"&&(l=l.map(function(o){return o-1}));else if(sr(l))l--;else if(rr(l))l=l.toNumber()-1;else if(typeof l!="string")throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");n[i]=l}var c=new r;return r.apply(c,n),c}},{isTransformFunction:!0});var $V="map",GV=["typed"],Cy=F($V,GV,e=>{var{typed:r}=e;function t(n,i,s){var l,c;return n[0]&&(l=n[0].compile().evaluate(s)),n[1]&&(at(n[1])||Oa(n[1])?c=n[1].compile().evaluate(s):c=lf(n[1],i,s)),a(l,c)}t.rawArgs=!0;var a=r("map",{"Array, function":function(i,s){return xP(i,s,i)},"Matrix, function":function(i,s){return i.create(xP(i.valueOf(),s,i))}});return t},{isTransformFunction:!0});function xP(e,r,t){function a(n,i){return Array.isArray(n)?Kn(n,function(s,l){return a(s,i.concat(l+1))}):Ra(r,n,i,t,"map")}return a(e,[])}function Cn(e){if(e.length===2&&Nt(e[0])){e=e.slice();var r=e[1];sr(r)?e[1]=r-1:rr(r)&&(e[1]=r.minus(1))}return e}var VV="max",ZV=["typed","config","numeric","larger"],Ey=F(VV,ZV,e=>{var{typed:r,config:t,numeric:a,larger:n}=e,i=ef({typed:r,config:t,numeric:a,larger:n});return r("max",{"...any":function(l){l=Cn(l);try{return i.apply(null,l)}catch(c){throw mt(c)}}})},{isTransformFunction:!0});var QV="mean",XV=["typed","add","divide"],Ty=F(QV,XV,e=>{var{typed:r,add:t,divide:a}=e,n=of({typed:r,add:t,divide:a});return r("mean",{"...any":function(s){s=Cn(s);try{return n.apply(null,s)}catch(l){throw mt(l)}}})},{isTransformFunction:!0});var JV="min",KV=["typed","config","numeric","smaller"],Fy=F(JV,KV,e=>{var{typed:r,config:t,numeric:a,smaller:n}=e,i=rf({typed:r,config:t,numeric:a,smaller:n});return r("min",{"...any":function(l){l=Cn(l);try{return i.apply(null,l)}catch(c){throw mt(c)}}})},{isTransformFunction:!0});var jV="range",eZ=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq","add","isPositive"],_y=F(jV,eZ,e=>{var{typed:r,config:t,matrix:a,bignumber:n,smaller:i,smallerEq:s,larger:l,largerEq:c,add:o,isPositive:u}=e,m=$u({typed:r,config:t,matrix:a,bignumber:n,smaller:i,smallerEq:s,larger:l,largerEq:c,add:o,isPositive:u});return r("range",{"...any":function(h){var y=h.length-1,v=h[y];return typeof v!="boolean"&&h.push(!0),m.apply(null,h)}})},{isTransformFunction:!0});var rZ="row",tZ=["typed","Index","matrix","range"],Oy=F(rZ,tZ,e=>{var{typed:r,Index:t,matrix:a,range:n}=e,i=Gu({typed:r,Index:t,matrix:a,range:n});return r("row",{"...any":function(l){var c=l.length-1,o=l[c];sr(o)&&(l[c]=o-1);try{return i.apply(null,l)}catch(u){throw mt(u)}}})},{isTransformFunction:!0});var nZ="subset",aZ=["typed","matrix","zeros","add"],By=F(nZ,aZ,e=>{var{typed:r,matrix:t,zeros:a,add:n}=e,i=Vu({typed:r,matrix:t,zeros:a,add:n});return r("subset",{"...any":function(l){try{return i.apply(null,l)}catch(c){throw mt(c)}}})},{isTransformFunction:!0});var iZ="concat",oZ=["typed","matrix","isInteger"],Py=F(iZ,oZ,e=>{var{typed:r,matrix:t,isInteger:a}=e,n=Uu({typed:r,matrix:t,isInteger:a});return r("concat",{"...any":function(s){var l=s.length-1,c=s[l];sr(c)?s[l]=c-1:rr(c)&&(s[l]=c.minus(1));try{return n.apply(null,s)}catch(o){throw mt(o)}}})},{isTransformFunction:!0});var bP="diff",sZ=["typed","matrix","subtract","number","bignumber"],Iy=F(bP,sZ,e=>{var{typed:r,matrix:t,subtract:a,number:n,bignumber:i}=e,s=Yu({typed:r,matrix:t,subtract:a,number:n,bignumber:i});return r(bP,{"...any":function(c){c=Cn(c);try{return s.apply(null,c)}catch(o){throw mt(o)}}})},{isTransformFunction:!0});var uZ="std",fZ=["typed","map","sqrt","variance"],Ry=F(uZ,fZ,e=>{var{typed:r,map:t,sqrt:a,variance:n}=e,i=ff({typed:r,map:t,sqrt:a,variance:n});return r("std",{"...any":function(l){l=Cn(l);try{return i.apply(null,l)}catch(c){throw mt(c)}}})},{isTransformFunction:!0});var wP="sum",cZ=["typed","config","add","numeric"],ky=F(wP,cZ,e=>{var{typed:r,config:t,add:a,numeric:n}=e,i=nf({typed:r,config:t,add:a,numeric:n});return r(wP,{"...any":function(l){l=Cn(l);try{return i.apply(null,l)}catch(c){throw mt(c)}}})},{isTransformFunction:!0});var lZ="quantileSeq",mZ=["typed","bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger"],qy=F(lZ,mZ,e=>{var{typed:r,bignumber:t,add:a,subtract:n,divide:i,multiply:s,partitionSelect:l,compare:c,isInteger:o,smaller:u,smallerEq:m,larger:d}=e,h=uf({typed:r,bignumber:t,add:a,subtract:n,divide:i,multiply:s,partitionSelect:l,compare:c,isInteger:o,smaller:u,smallerEq:m,larger:d});return r("quantileSeq",{"Array | Matrix, number | BigNumber":h,"Array | Matrix, number | BigNumber, number":(v,x,w)=>h(v,x,y(w)),"Array | Matrix, number | BigNumber, boolean":h,"Array | Matrix, number | BigNumber, boolean, number":(v,x,w,C)=>h(v,x,w,y(C)),"Array | Matrix, Array | Matrix":h,"Array | Matrix, Array | Matrix, number":(v,x,w)=>h(v,x,y(w)),"Array | Matrix, Array | Matrix, boolean":h,"Array | Matrix, Array | Matrix, boolean, number":(v,x,w,C)=>h(v,x,w,y(C))});function y(v){return Cn([[],v])[1]}},{isTransformFunction:!0});var DP="cumsum",pZ=["typed","add","unaryPlus"],Ly=F(DP,pZ,e=>{var{typed:r,add:t,unaryPlus:a}=e,n=af({typed:r,add:t,unaryPlus:a});return r(DP,{"...any":function(s){if(s.length===2&&Nt(s[0])){var l=s[1];sr(l)?s[1]=l-1:rr(l)&&(s[1]=l.minus(1))}try{return n.apply(null,s)}catch(c){throw mt(c)}}})},{isTransformFunction:!0});var SP="variance",dZ=["typed","add","subtract","multiply","divide","apply","isNaN"],zy=F(SP,dZ,e=>{var{typed:r,add:t,subtract:a,multiply:n,divide:i,apply:s,isNaN:l}=e,c=sf({typed:r,add:t,subtract:a,multiply:n,divide:i,apply:s,isNaN:l});return r(SP,{"...any":function(u){u=Cn(u);try{return c.apply(null,u)}catch(m){throw mt(m)}}})},{isTransformFunction:!0});var NP="print",hZ=["typed","matrix","zeros","add"],Uy=F(NP,hZ,e=>{var{typed:r,matrix:t,zeros:a,add:n}=e,i=Qu({typed:r,matrix:t,zeros:a,add:n});return r(NP,{"string, Object | Array":function(c,o){return i(s(c),o)},"string, Object | Array, number | Object":function(c,o,u){return i(s(c),o,u)}});function s(l){return l.replace(Ld,c=>{var o=c.slice(1).split("."),u=o.map(function(m){return!isNaN(m)&&m.length>0?parseInt(m)-1:m});return"$"+u.join(".")})}},{isTransformFunction:!0});var vZ="and",gZ=["typed","matrix","zeros","add","equalScalar","not","concat"],Wy=F(vZ,gZ,e=>{var{typed:r,matrix:t,equalScalar:a,zeros:n,not:i,concat:s}=e,l=ju({typed:r,matrix:t,equalScalar:a,zeros:n,not:i,concat:s});function c(o,u,m){var d=o[0].compile().evaluate(m);if(!Nt(d)&&!l(d,!0))return!1;var h=o[1].compile().evaluate(m);return l(d,h)}return c.rawArgs=!0,c},{isTransformFunction:!0});var yZ="or",xZ=["typed","matrix","equalScalar","DenseMatrix","concat"],Yy=F(yZ,xZ,e=>{var{typed:r,matrix:t,equalScalar:a,DenseMatrix:n,concat:i}=e,s=zu({typed:r,matrix:t,equalScalar:a,DenseMatrix:n,concat:i});function l(c,o,u){var m=c[0].compile().evaluate(u);if(!Nt(m)&&s(m,!1))return!0;var d=c[1].compile().evaluate(u);return s(m,d)}return l.rawArgs=!0,l},{isTransformFunction:!0});var bZ="bitAnd",wZ=["typed","matrix","zeros","add","equalScalar","not","concat"],Hy=F(bZ,wZ,e=>{var{typed:r,matrix:t,equalScalar:a,zeros:n,not:i,concat:s}=e,l=qu({typed:r,matrix:t,equalScalar:a,zeros:n,not:i,concat:s});function c(o,u,m){var d=o[0].compile().evaluate(m);if(!Nt(d)){if(isNaN(d))return NaN;if(d===0||d===!1)return 0}var h=o[1].compile().evaluate(m);return l(d,h)}return c.rawArgs=!0,c},{isTransformFunction:!0});var DZ="bitOr",SZ=["typed","matrix","equalScalar","DenseMatrix","concat"],$y=F(DZ,SZ,e=>{var{typed:r,matrix:t,equalScalar:a,DenseMatrix:n,concat:i}=e,s=Lu({typed:r,matrix:t,equalScalar:a,DenseMatrix:n,concat:i});function l(c,o,u){var m=c[0].compile().evaluate(u);if(!Nt(m)){if(isNaN(m))return NaN;if(m===-1)return-1;if(m===!0)return 1}var d=c[1].compile().evaluate(u);return s(m,d)}return l.rawArgs=!0,l},{isTransformFunction:!0});var Ge=$m({config:Oe}),pt=Gm({}),kD=h0({BigNumber:Ge,config:Oe}),AP=f0({}),MP=H0({BigNumber:Ge,config:Oe}),Wo=Vm({}),qD=S0({Complex:pt}),CP=l0({BigNumber:Ge,config:Oe}),EP=y0({BigNumber:Ge,config:Oe}),TP=b0({BigNumber:Ge,config:Oe}),zc=Qm({}),FP=m0({BigNumber:Ge,config:Oe}),_P=c0({}),OP=v0({BigNumber:Ge,config:Oe}),BP=Zm({}),LD=km({}),PP=w0({BigNumber:Ge,config:Oe}),IP=fy({BigNumber:Ge,config:Oe}),zD=d0({BigNumber:Ge,config:Oe}),RP=u0({}),kP=N0({}),Fr=Jm({Matrix:zc}),qP=j0({BigNumber:Ge,config:Oe}),LP=g0({BigNumber:Ge,config:Oe}),Gy=p0({BigNumber:Ge,config:Oe}),zP=s0({}),UP=D0({BigNumber:Ge,config:Oe}),te=Rm({BigNumber:Ge,Complex:pt,DenseMatrix:Fr,Fraction:Wo}),Vy=Ap({BigNumber:Ge,config:Oe,typed:te}),WP=K0({BigNumber:Ge,config:Oe}),En=Mp({typed:te}),YP=Bh({Complex:pt,config:Oe,typed:te}),HP=Ih({BigNumber:Ge,typed:te}),$P=kh({BigNumber:Ge,Complex:pt,config:Oe,typed:te}),Qt=Ep({typed:te}),GP=ed({typed:te}),VP=zh({BigNumber:Ge,Complex:pt,config:Oe,typed:te}),ZP=Wh({typed:te}),UD=Yh({typed:te}),QP=$h({Complex:pt,config:Oe,typed:te}),ta=vp({BigNumber:Ge,typed:te}),XP=Kp({typed:te}),JP=hp({typed:te}),KP=Km({typed:te}),Uc=Pg({typed:te}),Wc=gp({Complex:pt,typed:te}),Yo=rd({typed:te}),Zy=Gh({typed:te}),jP=Zh({BigNumber:Ge,typed:te}),eI=Xh({BigNumber:Ge,typed:te}),rI=Op({typed:te}),Pr=lp({config:Oe,typed:te}),tI=_d({typed:te}),WD=Bp({typed:te}),nI=Pp({Complex:pt,typed:te}),aI=fd({typed:te}),iI=ld({typed:te}),mf=Id({typed:te}),Qy=md({typed:te}),oI=qd({format:mf,typed:te}),Xy=td({typed:te}),Un=rp({typed:te}),ao=np({typed:te}),Ho=op({typed:te}),La=sp({typed:te}),sI=x0({BigNumber:Ge,config:Oe}),uI=kg({Complex:pt,typed:te}),fI=qp({Complex:pt,config:Oe,typed:te}),YD=Lp({Complex:pt,config:Oe,typed:te}),$o=hd({typed:te}),Ot=zp({typed:te}),Yc=ad({typed:te}),Bi=pp({typed:te}),cI=kd({format:mf,typed:te}),lI=Yg({config:Oe,typed:te}),mI=Qu({typed:te}),pI=Hg({config:Oe,typed:te}),Jy=nd({typed:te}),dI=Kh({BigNumber:Ge,typed:te}),HD=Yp({BigNumber:Ge,Fraction:Wo,complex:Wc,typed:te}),Hc=ev({typed:te}),Pi=mp({Matrix:zc,equalScalar:Pr,typed:te}),hI=Sp({typed:te}),vI=$p({typed:te}),gI=dp({typed:te}),xa=Tp({typed:te}),yI=tv({typed:te}),$D=fp({typed:te}),xI=Ph({Complex:pt,config:Oe,typed:te}),bI=qh({BigNumber:Ge,typed:te}),Ky=Lo({isInteger:Un,typed:te}),wI=Lh({BigNumber:Ge,Complex:pt,config:Oe,typed:te}),DI=Rd({format:mf,typed:te}),SI=Ig({typed:te}),NI=Vh({typed:te}),AI=Jh({BigNumber:Ge,typed:te}),pf=up({typed:te}),MI=Ud({typed:te}),CI=$g({config:Oe,typed:te}),EI=jh({BigNumber:Ge,typed:te}),TI=rv({typed:te}),FI=_h({SparseMatrix:Pi,typed:te}),za=Hp({Complex:pt,config:Oe,typed:te}),_I=nv({typed:te}),fi=Np({typed:te}),OI=Rh({BigNumber:Ge,Complex:pt,config:Oe,typed:te}),BI=Qh({BigNumber:Ge,typed:te}),Ps=yp({Fraction:Wo,typed:te}),Go=ap({typed:te}),$e=xp({DenseMatrix:Fr,Matrix:zc,SparseMatrix:Pi,typed:te}),PI=bp({isZero:La,matrix:$e,typed:te}),II=Bd({isNaN:pf,isNumeric:Go,typed:te}),Ua=Wd({bignumber:ta,fraction:Ps,number:Bi}),GD=Pd({config:Oe,multiplyScalar:Ot,numeric:Ua,typed:te}),VD=xd({isInteger:Un,matrix:$e,typed:te}),cn=Sd({matrix:$e,config:Oe,typed:te}),RI=Nd({matrix:$e,typed:te}),df=Ad({matrix:$e,typed:te}),ZD=Vp({BigNumber:Ge,config:Oe,matrix:$e,typed:te}),ln=Cd({BigNumber:Ge,config:Oe,matrix:$e,typed:te}),kI=Uh({Complex:pt,config:Oe,typed:te}),QD=Fp({BigNumber:Ge,Complex:pt,Fraction:Wo,config:Oe,isNegative:ao,matrix:$e,typed:te,unaryMinus:fi}),Gr=Uu({isInteger:Un,matrix:$e,typed:te}),qI=od({prod:GD,size:cn,typed:te}),jy=Md({conj:Yo,transpose:df,typed:te}),XD=ud({DenseMatrix:Fr,SparseMatrix:Pi,matrix:$e,typed:te}),Mt=Yd({numeric:Ua,typed:te}),hf=Xd({DenseMatrix:Fr,concat:Gr,divideScalar:Mt,equalScalar:Pr,matrix:$e,typed:te}),ba=fh({DenseMatrix:Fr,concat:Gr,equalScalar:Pr,matrix:$e,typed:te}),vf=cd({matrix:$e,typed:te}),LI=ip({isNumeric:Go,typed:te}),io=pd({BigNumber:Ge,DenseMatrix:Fr,SparseMatrix:Pi,config:Oe,matrix:$e,typed:te}),zI=dd({matrix:$e,multiplyScalar:Ot,typed:te}),$c=yh({DenseMatrix:Fr,concat:Gr,config:Oe,matrix:$e,typed:te}),UI=rh({DenseMatrix:Fr,concat:Gr,equalScalar:Pr,matrix:$e,typed:te,zeros:ln}),JD=Jd({DenseMatrix:Fr,divideScalar:Mt,equalScalar:Pr,matrix:$e,multiplyScalar:Ot,subtractScalar:xa,typed:te}),ex=Dp({flatten:vf,matrix:$e,size:cn,typed:te}),WI=Wp({BigNumber:Ge,concat:Gr,equalScalar:Pr,matrix:$e,typed:te}),YI=vd({BigNumber:Ge,config:Oe,matrix:$e,typed:te}),rx=ug({addScalar:Qt,complex:Wc,conj:Yo,divideScalar:Mt,equal:ba,identity:io,isZero:La,matrix:$e,multiplyScalar:Ot,sign:HD,sqrt:za,subtractScalar:xa,typed:te,unaryMinus:fi,zeros:ln}),HI=bd({config:Oe,matrix:$e}),$I=th({DenseMatrix:Fr,concat:Gr,equalScalar:Pr,matrix:$e,typed:te,zeros:ln}),Is=$d({BigNumber:Ge,DenseMatrix:Fr,config:Oe,equalScalar:Pr,matrix:$e,typed:te,zeros:ln}),Tn=mh({DenseMatrix:Fr,concat:Gr,config:Oe,matrix:$e,typed:te}),Bt=Gp({DenseMatrix:Fr,concat:Gr,equalScalar:Pr,matrix:$e,subtractScalar:xa,typed:te,unaryMinus:fi}),GI=zd({concat:Gr,matrix:$e,typed:te}),VI=wh({DenseMatrix:Fr,concat:Gr,config:Oe,equalScalar:Pr,matrix:$e,typed:te}),tx=Kd({DenseMatrix:Fr,divideScalar:Mt,equalScalar:Pr,matrix:$e,multiplyScalar:Ot,subtractScalar:xa,typed:te}),ZI=id({DenseMatrix:Fr,concat:Gr,matrix:$e,typed:te}),qr=dv({DenseMatrix:Fr,SparseMatrix:Pi,addScalar:Qt,concat:Gr,equalScalar:Pr,matrix:$e,typed:te}),QI=Hh({BigNumber:Ge,DenseMatrix:Fr,concat:Gr,equalScalar:Pr,matrix:$e,typed:te}),XI=qu({concat:Gr,equalScalar:Pr,matrix:$e,typed:te}),JI=Lu({DenseMatrix:Fr,concat:Gr,equalScalar:Pr,matrix:$e,typed:te}),KI=jp({DenseMatrix:Fr,concat:Gr,matrix:$e,typed:te}),jI=Zg({addScalar:Qt,combinations:Uc,divideScalar:Mt,isInteger:Un,isNegative:ao,multiplyScalar:Ot,typed:te}),Vo=ih({BigNumber:Ge,DenseMatrix:Fr,Fraction:Wo,concat:Gr,config:Oe,equalScalar:Pr,matrix:$e,typed:te}),KD=sh({concat:Gr,matrix:$e,typed:te}),e4=af({add:qr,typed:te,unaryPlus:Vy}),nx=xh({equal:ba,typed:te}),r4=Yu({matrix:$e,number:Bi,subtract:Bt,typed:te}),t4=Eg({abs:En,addScalar:Qt,deepEqual:nx,divideScalar:Mt,multiplyScalar:Ot,sqrt:za,subtractScalar:xa,typed:te}),Gc=gv({addScalar:Qt,conj:Yo,multiplyScalar:Ot,size:cn,typed:te}),n4=ch({compareText:KD,isZero:La,typed:te}),jD=Pu({DenseMatrix:Fr,config:Oe,equalScalar:Pr,matrix:$e,round:Is,typed:te,zeros:ln}),a4=Rp({BigNumber:Ge,DenseMatrix:Fr,concat:Gr,config:Oe,equalScalar:Pr,matrix:$e,round:Is,typed:te,zeros:ln}),i4=hv({abs:En,addScalar:Qt,divideScalar:Mt,isPositive:Ho,multiplyScalar:Ot,smaller:Tn,sqrt:za,typed:te}),eS=Nh({DenseMatrix:Fr,smaller:Tn}),bn=Ah({ImmutableDenseMatrix:eS,getMatrixDataType:Qy}),Fn=vh({DenseMatrix:Fr,concat:Gr,config:Oe,matrix:$e,typed:te}),ax=Gd({Complex:pt,config:Oe,divideScalar:Mt,typed:te}),o4=jd({DenseMatrix:Fr,divideScalar:Mt,equalScalar:Pr,matrix:$e,multiplyScalar:Ot,subtractScalar:xa,typed:te}),s4=wp({flatten:vf,matrix:$e,size:cn,typed:te}),u4=rf({config:Oe,numeric:Ua,smaller:Tn,typed:te}),rS=Iu({DenseMatrix:Fr,concat:Gr,config:Oe,equalScalar:Pr,matrix:$e,round:Is,typed:te,zeros:ln}),it=Up({addScalar:Qt,dot:Gc,equalScalar:Pr,matrix:$e,multiplyScalar:Ot,typed:te}),f4=Zd({Complex:pt,config:Oe,divideScalar:Mt,typed:te}),c4=zu({DenseMatrix:Fr,concat:Gr,equalScalar:Pr,matrix:$e,typed:te}),Vc=Dh({compare:Vo,isNaN:pf,isNumeric:Go,typed:te}),l4=nh({DenseMatrix:Fr,concat:Gr,equalScalar:Pr,matrix:$e,typed:te,zeros:ln}),tS=lg({SparseMatrix:Pi,abs:En,add:qr,divideScalar:Mt,larger:Fn,largerEq:$c,multiply:it,subtract:Bt,transpose:df,typed:te}),na=Vu({add:qr,matrix:$e,typed:te,zeros:ln}),ix=nf({add:qr,config:Oe,numeric:Ua,typed:te}),m4=yv({add:qr,matrix:$e,typed:te}),nS=eh({DenseMatrix:Fr,divideScalar:Mt,equalScalar:Pr,matrix:$e,multiplyScalar:Ot,subtractScalar:xa,typed:te}),p4=a0({Complex:pt,add:qr,multiply:it,number:Bi,typed:te}),ox=_p({DenseMatrix:Fr,config:Oe,equalScalar:Pr,matrix:$e,round:Is,typed:te,zeros:ln}),ci=oh({compare:Vo,typed:te}),d4=Qg({addScalar:Qt,combinations:Uc,isInteger:Un,isNegative:ao,isPositive:Ho,larger:Fn,typed:te}),h4=sd({matrix:$e,multiply:it,subtract:Bt,typed:te}),aS=yg({divideScalar:Mt,isZero:La,matrix:$e,multiply:it,subtractScalar:xa,typed:te,unaryMinus:fi}),v4=Xp({concat:Gr,equalScalar:Pr,matrix:$e,multiplyScalar:Ot,typed:te}),iS=Mh({larger:Fn,smaller:Tn}),oS=Ip({Complex:pt,DenseMatrix:Fr,ceil:ox,equalScalar:Pr,floor:jD,matrix:$e,typed:te,zeros:ln}),sS=xv({Index:bn,typed:te}),g4=Tg({abs:En,add:qr,addScalar:Qt,config:Oe,divideScalar:Mt,equalScalar:Pr,flatten:vf,isNumeric:Go,isZero:La,matrix:$e,multiply:it,multiplyScalar:Ot,smaller:Tn,subtract:Bt,typed:te}),y4=Zp({BigNumber:Ge,add:qr,config:Oe,equal:ba,isInteger:Un,mod:rS,smaller:Tn,typed:te,xgcd:ZD}),x4=kp({concat:Gr,equalScalar:Pr,matrix:$e,typed:te}),b4=Vd({Complex:pt,config:Oe,divideScalar:Mt,log:ax,typed:te}),sx=ef({config:Oe,larger:Fn,numeric:Ua,typed:te}),w4=av({DenseMatrix:Fr,Index:bn,compareNatural:ci,size:cn,subset:na,typed:te}),D4=ov({DenseMatrix:Fr,Index:bn,compareNatural:ci,size:cn,subset:na,typed:te}),S4=uv({Index:bn,compareNatural:ci,size:cn,subset:na,typed:te}),N4=cv({Index:bn,compareNatural:ci,size:cn,subset:na,typed:te}),Rs=dh({DenseMatrix:Fr,concat:Gr,config:Oe,matrix:$e,typed:te}),A4=Sh({compare:Vo,compareNatural:ci,matrix:$e,typed:te}),M4=ju({concat:Gr,equalScalar:Pr,matrix:$e,not:Yc,typed:te,zeros:ln}),ks=$u({bignumber:ta,matrix:$e,add:qr,config:Oe,isPositive:Ho,larger:Fn,largerEq:$c,smaller:Tn,smallerEq:Rs,typed:te}),C4=Gu({Index:bn,matrix:$e,range:ks,typed:te}),uS=iv({DenseMatrix:Fr,Index:bn,compareNatural:ci,size:cn,subset:na,typed:te}),E4=fv({Index:bn,compareNatural:ci,size:cn,subset:na,typed:te}),fS=mv({Index:bn,concat:Gr,setDifference:uS,size:cn,subset:na,typed:te}),cS=Ch({FibonacciHeap:iS,addScalar:Qt,equalScalar:Pr}),lS=Wu({Index:bn,matrix:$e,range:ks,typed:te}),Zo=xg({abs:En,addScalar:Qt,det:aS,divideScalar:Mt,identity:io,matrix:$e,multiply:it,typed:te,unaryMinus:fi}),mS=sg({DenseMatrix:Fr,Spa:cS,SparseMatrix:Pi,abs:En,addScalar:Qt,divideScalar:Mt,equalScalar:Pr,larger:Fn,matrix:$e,multiplyScalar:Ot,subtractScalar:xa,typed:te,unaryMinus:fi}),T4=bg({Complex:pt,add:qr,ctranspose:jy,deepEqual:nx,divideScalar:Mt,dot:Gc,dotDivide:hf,equal:ba,inv:Zo,matrix:$e,multiply:it,typed:te}),wa=Hd({Complex:pt,config:Oe,fraction:Ps,identity:io,inv:Zo,matrix:$e,multiply:it,number:Bi,typed:te}),pS=sv({DenseMatrix:Fr,Index:bn,compareNatural:ci,size:cn,subset:na,typed:te}),F4=pv({Index:bn,concat:Gr,setIntersect:pS,setSymDifference:fS,size:cn,subset:na,typed:te}),_4=Sg({abs:En,add:qr,identity:io,inv:Zo,map:$o,max:sx,multiply:it,size:cn,sqrt:za,subtract:Bt,typed:te}),wr=Th({BigNumber:Ge,Complex:pt,Fraction:Wo,abs:En,addScalar:Qt,config:Oe,divideScalar:Mt,equal:ba,fix:oS,format:mf,isNumeric:Go,multiplyScalar:Ot,number:Bi,pow:wa,round:Is,subtractScalar:xa}),O4=_0({BigNumber:Ge,Unit:wr,config:Oe}),B4=my({BigNumber:Ge,Unit:wr,config:Oe}),P4=ey({BigNumber:Ge,Unit:wr,config:Oe}),I4=P0({BigNumber:Ge,Unit:wr,config:Oe}),R4=ty({BigNumber:Ge,Unit:wr,config:Oe}),k4=I0({BigNumber:Ge,Unit:wr,config:Oe}),q4=O0({BigNumber:Ge,Unit:wr,config:Oe}),L4=V0({BigNumber:Ge,Unit:wr,config:Oe}),z4=Qd({DenseMatrix:Fr,concat:Gr,equalScalar:Pr,matrix:$e,pow:wa,typed:te}),U4=F0({BigNumber:Ge,Unit:wr,config:Oe}),W4=B0({BigNumber:Ge,Unit:wr,config:Oe}),Y4=Dg({abs:En,add:qr,identity:io,inv:Zo,multiply:it,typed:te}),H4=ny({BigNumber:Ge,Unit:wr,config:Oe}),dS=Ed({addScalar:Qt,ceil:ox,conj:Yo,divideScalar:Mt,dotDivide:hf,exp:WD,i:qD,log2:YD,matrix:$e,multiplyScalar:Ot,pow:wa,tau:zD,typed:te}),ux=Rg({BigNumber:Ge,Complex:pt,config:Oe,multiplyScalar:Ot,pow:wa,typed:te}),$4=M0({BigNumber:Ge,Unit:wr,config:Oe}),G4=$0({BigNumber:Ge,Unit:wr,config:Oe}),V4=Td({conj:Yo,dotDivide:hf,fft:dS,typed:te}),Z4=L0({BigNumber:Ge,Unit:wr,config:Oe}),Q4=iy({BigNumber:Ge,Unit:wr,config:Oe}),X4=T0({BigNumber:Ge,Unit:wr,config:Oe}),J4=py({BigNumber:Ge,Unit:wr,config:Oe}),K4=sy({BigNumber:Ge,Unit:wr,config:Oe}),j4=Z0({BigNumber:Ge,Unit:wr,config:Oe}),eR=q0({BigNumber:Ge,Unit:wr,config:Oe}),rR=xy({BigNumber:Ge,Unit:wr,config:Oe}),tR=vy({BigNumber:Ge,Unit:wr,config:Oe}),nR=by({BigNumber:Ge,Unit:wr,config:Oe}),aR=G0({BigNumber:Ge,Unit:wr,config:Oe}),iR=Q0({BigNumber:Ge,Unit:wr,config:Oe}),oR=E0({BigNumber:Ge,Unit:wr,config:Oe}),sR=X0({BigNumber:Ge,Unit:wr,config:Oe}),uR=cy({BigNumber:Ge,Unit:wr,config:Oe}),fR=A0({BigNumber:Ge,Unit:wr,config:Oe}),cR=ly({BigNumber:Ge,Unit:wr,config:Oe}),lR=J0({BigNumber:Ge,Unit:wr,config:Oe}),mR=ry({BigNumber:Ge,Unit:wr,config:Oe}),pR=z0({BigNumber:Ge,Unit:wr,config:Oe}),dR=Oh({Unit:wr,typed:te}),an=Cg({divideScalar:Mt,equalScalar:Pr,inv:Zo,matrix:$e,multiply:it,typed:te}),hR=W0({BigNumber:Ge,Unit:wr,config:Oe}),gf=qg({gamma:ux,typed:te}),vR=ay({BigNumber:Ge,Unit:wr,config:Oe}),gR=hy({BigNumber:Ge,Unit:wr,config:Oe}),yR=R0({BigNumber:Ge,Unit:wr,config:Oe}),hS=mg({DenseMatrix:Fr,lsolve:JD,lup:mS,matrix:$e,slu:tS,typed:te,usolve:tx}),xR=k0({BigNumber:Ge,Unit:wr,config:Oe}),bR=dy({BigNumber:Ge,Unit:wr,config:Oe}),wR=zg({add:qr,divide:an,factorial:gf,isInteger:Un,isPositive:Ho,multiply:it,typed:te}),DR=Ug({factorial:gf,typed:te}),SR=gy({BigNumber:Ge,Unit:wr,config:Oe}),NR=pg({add:qr,cbrt:QD,divide:an,equalScalar:Pr,im:Xy,isZero:La,multiply:it,re:Jy,sqrt:za,subtract:Bt,typeOf:$D,typed:te,unaryMinus:fi}),AR=lv({compareNatural:ci,typed:te}),MR=Fd({abs:En,add:qr,bignumber:ta,divide:an,isNegative:ao,isPositive:Ho,larger:Fn,map:$o,matrix:$e,max:sx,multiply:it,smaller:Tn,subtract:Bt,typed:te,unaryMinus:fi}),vS=Gg({bignumber:ta,addScalar:Qt,combinations:Uc,divideScalar:Mt,factorial:gf,isInteger:Un,isNegative:ao,larger:Fn,multiplyScalar:Ot,number:Bi,pow:wa,subtractScalar:xa,typed:te}),CR=Fh({Unit:wr,typed:te}),ER=Vg({addScalar:Qt,isInteger:Un,isNegative:ao,stirlingS2:vS,typed:te}),gS=wg({abs:En,add:qr,addScalar:Qt,atan:UD,bignumber:ta,column:lS,complex:Wc,config:Oe,cos:Zy,diag:XD,divideScalar:Mt,dot:Gc,equal:ba,flatten:vf,im:Xy,inv:Zo,larger:Fn,matrix:$e,matrixFromColumns:ex,multiply:it,multiplyScalar:Ot,number:Bi,qr:rx,re:Jy,reshape:VD,sin:Hc,size:cn,smaller:Tn,sqrt:za,subtract:Bt,typed:te,usolve:tx,usolveAll:nS}),TR=Y0({BigNumber:Ge,Unit:wr,config:Oe}),FR=oy({BigNumber:Ge,Unit:wr,config:Oe}),_R=Lg({divide:an,dotDivide:hf,isNumeric:Go,log:ax,map:$o,matrix:$e,multiply:it,sum:ix,typed:te}),yS=of({add:qr,divide:an,typed:te}),OR=uy({BigNumber:Ge,Unit:wr,config:Oe}),BR=C0({BigNumber:Ge,Unit:wr,config:Oe}),PR=uf({bignumber:ta,add:qr,compare:Vo,divide:an,isInteger:Un,larger:Fn,multiply:it,partitionSelect:Vc,smaller:Tn,smallerEq:Rs,subtract:Bt,typed:te}),fx=sf({add:qr,apply:Ky,divide:an,isNaN:pf,multiply:it,subtract:Bt,typed:te}),IR=U0({BigNumber:Ge,Unit:wr,config:Oe}),xS=_g({add:qr,compare:Vo,divide:an,partitionSelect:Vc,typed:te}),RR=Bg({add:qr,divide:an,matrix:$e,mean:yS,multiply:it,pow:wa,sqrt:za,subtract:Bt,sum:ix,typed:te}),kR=i0({Complex:pt,add:qr,divide:an,matrix:$e,multiply:it,typed:te}),qR=Og({abs:En,map:$o,median:xS,subtract:Bt,typed:te}),LR=ff({map:$o,sqrt:za,typed:te,variance:fx}),zR=Od({BigNumber:Ge,Complex:pt,add:qr,config:Oe,divide:an,equal:ba,factorial:gf,gamma:ux,isNegative:ao,multiply:it,pi:Gy,pow:wa,sin:Hc,smallerEq:Rs,subtract:Bt,typed:te}),cx=vv({abs:En,add:qr,conj:Yo,ctranspose:jy,eigs:gS,equalScalar:Pr,larger:Fn,matrix:$e,multiply:it,pow:wa,smaller:Tn,sqrt:za,typed:te}),bS=Dd({BigNumber:Ge,DenseMatrix:Fr,SparseMatrix:Pi,addScalar:Qt,config:Oe,cos:Zy,matrix:$e,multiplyScalar:Ot,norm:cx,sin:Hc,typed:te,unaryMinus:fi}),UR=yy({BigNumber:Ge,Unit:wr,config:Oe}),wS=Ag({identity:io,matrix:$e,multiply:it,norm:cx,qr:rx,subtract:Bt,typed:te}),WR=wd({multiply:it,rotationMatrix:bS,typed:te}),DS=Ng({abs:En,add:qr,concat:Gr,identity:io,index:sS,lusolve:hS,matrix:$e,matrixFromColumns:ex,multiply:it,range:ks,schur:wS,subset:na,subtract:Bt,transpose:df,typed:te}),YR=Mg({matrix:$e,multiply:it,sylvester:DS,transpose:df,typed:te});var yf={},xf={},HR={},_n=wv({mathWithTransform:xf}),bf=Hv({Node:_n}),oo=Gv({Node:_n}),qs=Zv({Node:_n}),$R=Kv({Node:_n}),wf=Mv({Node:_n}),GR=Ov({Node:_n,ResultSet:LD}),VR=Pv({Node:_n}),Qo=qv({Node:_n}),ZR=Xv({Node:_n}),NZ=o0({classes:HR}),SS=hg({math:yf,typed:te}),QR=zv({Node:_n,typed:te}),AZ=gg({Chain:SS,typed:te}),Df=Wv({Node:_n,size:cn}),Sf=Nv({Node:_n,subset:na}),XR=Fv({matrix:$e,Node:_n,subset:na}),Xo=jv({Unit:wr,Node:_n,math:yf}),Jo=rg({Node:_n,SymbolNode:Xo,math:yf}),Wa=tg({AccessorNode:Sf,ArrayNode:wf,AssignmentNode:XR,BlockNode:GR,ConditionalNode:VR,ConstantNode:Qo,FunctionAssignmentNode:QR,FunctionNode:Jo,IndexNode:Df,ObjectNode:bf,OperatorNode:oo,ParenthesisNode:qs,RangeNode:ZR,RelationalNode:$R,SymbolNode:Xo,config:Oe,numeric:Ua,typed:te}),JR=e0({ConstantNode:Qo,FunctionNode:Jo,OperatorNode:oo,ParenthesisNode:qs,parse:Wa,typed:te}),NS=Kg({bignumber:ta,fraction:Ps,AccessorNode:Sf,ArrayNode:wf,ConstantNode:Qo,FunctionNode:Jo,IndexNode:Df,ObjectNode:bf,OperatorNode:oo,SymbolNode:Xo,config:Oe,mathWithTransform:xf,matrix:$e,typed:te}),MZ=ng({parse:Wa,typed:te}),AS=jg({AccessorNode:Sf,ArrayNode:wf,ConstantNode:Qo,FunctionNode:Jo,IndexNode:Df,ObjectNode:bf,OperatorNode:oo,ParenthesisNode:qs,SymbolNode:Xo,add:qr,divide:an,equal:ba,isZero:La,multiply:it,parse:Wa,pow:wa,subtract:Bt,typed:te}),MS=ag({parse:Wa,typed:te}),KR=dg({evaluate:MS}),jR=ig({evaluate:MS}),lx=Jg({bignumber:ta,fraction:Ps,AccessorNode:Sf,ArrayNode:wf,ConstantNode:Qo,FunctionNode:Jo,IndexNode:Df,ObjectNode:bf,OperatorNode:oo,ParenthesisNode:qs,SymbolNode:Xo,add:qr,config:Oe,divide:an,equal:ba,isZero:La,mathWithTransform:xf,matrix:$e,multiply:it,parse:Wa,pow:wa,resolve:JR,simplifyConstant:NS,simplifyCore:AS,subtract:Bt,typed:te}),CZ=r0({OperatorNode:oo,parse:Wa,simplify:lx,typed:te}),EZ=Xg({parse:Wa,typed:te}),TZ=og({Parser:jR,typed:te}),FZ=n0({bignumber:ta,fraction:Ps,AccessorNode:Sf,ArrayNode:wf,ConstantNode:Qo,FunctionNode:Jo,IndexNode:Df,ObjectNode:bf,OperatorNode:oo,ParenthesisNode:qs,SymbolNode:Xo,add:qr,config:Oe,divide:an,equal:ba,isZero:La,mathWithTransform:xf,matrix:$e,multiply:it,parse:Wa,pow:wa,simplify:lx,simplifyConstant:NS,simplifyCore:AS,subtract:Bt,typed:te}),_Z=t0({ConstantNode:Qo,FunctionNode:Jo,OperatorNode:oo,ParenthesisNode:qs,SymbolNode:Xo,config:Oe,equal:ba,isZero:La,numeric:Ua,parse:Wa,simplify:lx,typed:te}),OZ=vg({Help:KR,mathWithTransform:xf,typed:te});ht(yf,{e:kD,false:AP,fineStructure:MP,i:qD,Infinity:CP,LN10:EP,LOG10E:TP,NaN:FP,null:_P,phi:OP,SQRT1_2:PP,sackurTetrode:IP,tau:zD,true:RP,E:kD,version:kP,efimovFactor:qP,LN2:LP,pi:Gy,replacer:zP,reviver:NZ,SQRT2:UP,typed:te,unaryPlus:Vy,PI:Gy,weakMixingAngle:WP,abs:En,acos:YP,acot:HP,acsc:$P,addScalar:Qt,arg:GP,asech:VP,asinh:ZP,atan:UD,atanh:QP,bignumber:ta,bitNot:XP,boolean:JP,clone:KP,combinations:Uc,complex:Wc,conj:Yo,cos:Zy,cot:jP,csc:eI,cube:rI,equalScalar:Pr,erf:tI,exp:WD,expm1:nI,filter:aI,forEach:iI,format:mf,getMatrixDataType:Qy,hex:oI,im:Xy,isInteger:Un,isNegative:ao,isPositive:Ho,isZero:La,LOG2E:sI,lgamma:uI,log10:fI,log2:YD,map:$o,multiplyScalar:Ot,not:Yc,number:Bi,oct:cI,pickRandom:lI,print:mI,random:pI,re:Jy,sec:dI,sign:HD,sin:Hc,splitUnit:hI,square:vI,string:gI,subtractScalar:xa,tan:yI,typeOf:$D,acosh:xI,acsch:bI,apply:Ky,asec:wI,bin:DI,chain:AZ,combinationsWithRep:SI,cosh:NI,csch:AI,isNaN:pf,isPrime:MI,randomInt:CI,sech:EI,sinh:TI,sparse:FI,sqrt:za,tanh:_I,unaryMinus:fi,acoth:OI,coth:BI,fraction:Ps,isNumeric:Go,matrix:$e,matrixFromFunction:PI,mode:II,numeric:Ua,prod:GD,reshape:VD,size:cn,squeeze:RI,transpose:df,xgcd:ZD,zeros:ln,asin:kI,cbrt:QD,concat:Gr,count:qI,ctranspose:jy,diag:XD,divideScalar:Mt,dotDivide:hf,equal:ba,flatten:vf,hasNumericValue:LI,identity:io,kron:zI,largerEq:$c,leftShift:UI,lsolve:JD,matrixFromColumns:ex,nthRoot:WI,ones:YI,qr:rx,resize:HI,rightArithShift:$I,round:Is,smaller:Tn,subtract:Bt,to:GI,unequal:VI,usolve:tx,xor:ZI,add:qr,atan2:QI,bitAnd:XI,bitOr:JI,bitXor:KI,catalan:jI,compare:Vo,compareText:KD,cumsum:e4,deepEqual:nx,diff:r4,distance:t4,dot:Gc,equalText:n4,floor:jD,gcd:a4,hypot:i4,larger:Fn,log:ax,lsolveAll:o4,matrixFromRows:s4,min:u4,mod:rS,multiply:it,nthRoots:f4,or:c4,partitionSelect:Vc,rightLogShift:l4,slu:tS,subset:na,sum:ix,trace:m4,usolveAll:nS,zpk2tf:p4,ceil:ox,compareNatural:ci,composition:d4,cross:h4,det:aS,dotMultiply:v4,fix:oS,index:sS,intersect:g4,invmod:y4,lcm:x4,log1p:b4,max:sx,setCartesian:w4,setDistinct:D4,setIsSubset:S4,setPowerset:N4,smallerEq:Rs,sort:A4,and:M4,range:ks,row:C4,setDifference:uS,setMultiplicity:E4,setSymDifference:fS,column:lS,inv:Zo,lup:mS,pinv:T4,pow:wa,setIntersect:pS,setUnion:F4,sqrtm:_4,vacuumImpedance:O4,wienDisplacement:B4,atomicMass:P4,bohrMagneton:I4,boltzmann:R4,conductanceQuantum:k4,coulomb:q4,deuteronMass:L4,dotPow:z4,electricConstant:U4,elementaryCharge:W4,expm:Y4,faraday:H4,fft:dS,gamma:ux,gravitationConstant:$4,hartreeEnergy:G4,ifft:V4,klitzing:Z4,loschmidt:Q4,magneticConstant:X4,molarMass:J4,molarPlanckConstant:K4,neutronMass:j4,nuclearMagneton:eR,planckCharge:rR,planckLength:tR,planckTemperature:nR,protonMass:aR,quantumOfCirculation:iR,reducedPlanckConstant:oR,rydberg:sR,secondRadiation:uR,speedOfLight:fR,stefanBoltzmann:cR,thomsonCrossSection:lR,avogadro:mR,bohrRadius:pR,createUnit:dR,divide:an,electronMass:hR,factorial:gf,firstRadiation:vR,gravity:gR,inverseConductanceQuantum:yR,lusolve:hS,magneticFluxQuantum:xR,molarMassC12:bR,multinomial:wR,parse:Wa,permutations:DR,planckMass:SR,polynomialRoot:NR,resolve:JR,setSize:AR,simplifyConstant:NS,solveODE:MR,stirlingS2:vS,unit:CR,bellNumbers:ER,compile:MZ,eigs:gS,fermiCoupling:TR,gasConstant:FR,kldivergence:_R,mean:yS,molarVolume:OR,planckConstant:BR,quantileSeq:PR,simplifyCore:AS,variance:fx,classicalElectronRadius:IR,evaluate:MS,median:xS,simplify:lx,symbolicEqual:CZ,corr:RR,freqz:kR,leafCount:EZ,mad:qR,parser:TZ,rationalize:FZ,std:LR,zeta:zR,derivative:_Z,norm:cx,rotationMatrix:bS,help:OZ,planckTime:UR,schur:wS,rotate:WR,sylvester:DS,lyap:YR,config:Oe});ht(xf,yf,{filter:Ny({typed:te}),forEach:Ay({typed:te}),map:Cy({typed:te}),apply:Dy({isInteger:Un,typed:te}),or:Yy({DenseMatrix:Fr,concat:Gr,equalScalar:Pr,matrix:$e,typed:te}),and:Wy({add:qr,concat:Gr,equalScalar:Pr,matrix:$e,not:Yc,typed:te,zeros:ln}),concat:Py({isInteger:Un,matrix:$e,typed:te}),max:Ey({config:Oe,larger:Fn,numeric:Ua,typed:te}),print:Uy({add:qr,matrix:$e,typed:te,zeros:ln}),bitAnd:Hy({add:qr,concat:Gr,equalScalar:Pr,matrix:$e,not:Yc,typed:te,zeros:ln}),diff:Iy({bignumber:ta,matrix:$e,number:Bi,subtract:Bt,typed:te}),min:Fy({config:Oe,numeric:Ua,smaller:Tn,typed:te}),subset:By({add:qr,matrix:$e,typed:te,zeros:ln}),bitOr:$y({DenseMatrix:Fr,concat:Gr,equalScalar:Pr,matrix:$e,typed:te}),cumsum:Ly({add:qr,typed:te,unaryPlus:Vy}),index:My({Index:bn,getMatrixDataType:Qy}),sum:ky({add:qr,config:Oe,numeric:Ua,typed:te}),range:_y({bignumber:ta,matrix:$e,add:qr,config:Oe,isPositive:Ho,larger:Fn,largerEq:$c,smaller:Tn,smallerEq:Rs,typed:te}),row:Oy({Index:bn,matrix:$e,range:ks,typed:te}),column:Sy({Index:bn,matrix:$e,range:ks,typed:te}),mean:Ty({add:qr,divide:an,typed:te}),quantileSeq:qy({add:qr,bignumber:ta,compare:Vo,divide:an,isInteger:Un,larger:Fn,multiply:it,partitionSelect:Vc,smaller:Tn,smallerEq:Rs,subtract:Bt,typed:te}),variance:zy({add:qr,apply:Ky,divide:an,isNaN:pf,multiply:it,subtract:Bt,typed:te}),std:Ry({map:$o,sqrt:za,typed:te,variance:fx})});ht(HR,{BigNumber:Ge,Complex:pt,Fraction:Wo,Matrix:zc,Node:_n,ObjectNode:bf,OperatorNode:oo,ParenthesisNode:qs,Range:BP,RelationalNode:$R,ResultSet:LD,ArrayNode:wf,BlockNode:GR,ConditionalNode:VR,ConstantNode:Qo,DenseMatrix:Fr,RangeNode:ZR,Chain:SS,FunctionAssignmentNode:QR,SparseMatrix:Pi,IndexNode:Df,ImmutableDenseMatrix:eS,Index:bn,AccessorNode:Sf,AssignmentNode:XR,FibonacciHeap:iS,Spa:cS,Unit:wr,SymbolNode:Xo,FunctionNode:Jo,Help:KR,Parser:jR});SS.createProxy(yf);var CS=RD;var a5=ma(Mm(),1);var r5=ma(e5(),1);function t5(e){var r=new r5.default;return e.on=r.on.bind(r),e.off=r.off.bind(r),e.once=r.once.bind(r),e.emit=r.emit.bind(r),e}function n5(e,r,t,a){function n(x,w){var C=arguments.length;if(C!==1&&C!==2)throw new ga("import",C,1,2);w||(w={});function b(O,_,E){if(Array.isArray(_))_.forEach(L=>b(O,L));else if(typeof _=="object")for(var T in _)Xe(_,T)&&b(O,_[T],T);else if(Ms(_)||E!==void 0){var R=Ms(_)?y(_)?_.fn+".transform":_.fn:E;if(Xe(O,R)&&O[R]!==_&&!w.silent)throw new Error('Cannot import "'+R+'" twice');O[R]=_}else if(!w.silent)throw new TypeError("Factory, Object, or Array expected")}var A={};b(A,x);for(var M in A)if(Xe(A,M)){var D=A[M];if(Ms(D))o(D,w);else if(u(D))i(M,D,w);else if(!w.silent)throw new TypeError("Factory, Object, or Array expected")}}function i(x,w,C){if(C.wrap&&typeof w=="function"&&(w=c(w)),m(w)&&(w=e(x,{[w.signature]:w})),e.isTypedFunction(t[x])&&e.isTypedFunction(w)){C.override?w=e(x,w.signatures):w=e(t[x],w),t[x]=w,delete a[x],s(x,w),t.emit("import",x,function(){return w});return}if(t[x]===void 0||C.override){t[x]=w,delete a[x],s(x,w),t.emit("import",x,function(){return w});return}if(!C.silent)throw new Error('Cannot import "'+x+'": already exists')}function s(x,w){w&&typeof w.transform=="function"?(t.expression.transform[x]=w.transform,d(x)&&(t.expression.mathWithTransform[x]=w.transform)):(delete t.expression.transform[x],d(x)&&(t.expression.mathWithTransform[x]=w))}function l(x){delete t.expression.transform[x],d(x)?t.expression.mathWithTransform[x]=t[x]:delete t.expression.mathWithTransform[x]}function c(x){var w=function(){for(var b=[],A=0,M=arguments.length;A2&&arguments[2]!==void 0?arguments[2]:x.fn;if(jb(C,"."))throw new Error("Factory name should not contain a nested path. Name: "+JSON.stringify(C));var b=y(x)?t.expression.transform:t,A=C in t.expression.transform,M=Xe(b,C)?b[C]:void 0,D=function(){var _={};x.dependencies.map(tw).forEach(T=>{if(jb(T,"."))throw new Error("Factory dependency should not contain a nested path. Name: "+JSON.stringify(T));T==="math"?_.math=t:T==="mathWithTransform"?_.mathWithTransform=t.expression.mathWithTransform:T==="classes"?_.classes=t:_[T]=t[T]});var E=x(_);if(E&&typeof E.transform=="function")throw new Error('Transforms cannot be attached to factory functions. Please create a separate function for it with exports.path="expression.transform"');if(M===void 0||w.override)return E;if(e.isTypedFunction(M)&&e.isTypedFunction(E))return e(M,E);if(w.silent)return M;throw new Error('Cannot import "'+C+'": already exists')};!x.meta||x.meta.lazy!==!1?(Du(b,C,D),M&&A?l(C):(y(x)||h(x))&&Du(t.expression.mathWithTransform,C,()=>b[C])):(b[C]=D(),M&&A?l(C):(y(x)||h(x))&&Du(t.expression.mathWithTransform,C,()=>b[C])),a[C]=x,t.emit("import",C,D)}function u(x){return typeof x=="function"||typeof x=="number"||typeof x=="string"||typeof x=="boolean"||x===null||Ht(x)||Kt(x)||rr(x)||da(x)||Qe(x)||Array.isArray(x)}function m(x){return typeof x=="function"&&typeof x.signature=="string"}function d(x){return!Xe(v,x)}function h(x){return x.fn.indexOf(".")===-1&&!Xe(v,x.fn)&&(!x.meta||!x.meta.isClass)}function y(x){return x!==void 0&&x.meta!==void 0&&x.meta.isTransformFunction===!0||!1}var v={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return n}function mx(e,r){var t=ht({},Ss,r);if(typeof Object.create!="function")throw new Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var a=t5({isNumber:sr,isComplex:Kt,isBigNumber:rr,isFraction:da,isUnit:Ht,isString:St,isArray:Mr,isMatrix:Qe,isCollection:Nt,isDenseMatrix:Ji,isSparseMatrix:ha,isRange:Fo,isIndex:Mi,isBoolean:lm,isResultSet:mm,isHelp:xu,isFunction:pm,isDate:dm,isRegExp:hm,isObject:Ci,isNull:vm,isUndefined:gm,isAccessorNode:zn,isArrayNode:jt,isAssignmentNode:ym,isBlockNode:xm,isConditionalNode:bm,isConstantNode:xr,isFunctionAssignmentNode:Oa,isFunctionNode:yn,isIndexNode:Jn,isNode:Nr,isObjectNode:Ei,isOperatorNode:ct,isParenthesisNode:en,isRangeNode:wm,isRelationalNode:Dm,isSymbolNode:at,isChain:bu});a.config=QA(t,a.emit),a.expression={transform:{},mathWithTransform:{config:a.config}};var n=[],i=[];function s(u){if(Ms(u))return u(a);var m=u[Object.keys(u)[0]];if(Ms(m))return m(a);if(!GA(u))throw console.warn("Factory object with properties \`type\`, \`name\`, and \`factory\` expected",u),new Error("Factory object with properties \`type\`, \`name\`, and \`factory\` expected");var d=n.indexOf(u),h;return d===-1?(u.math===!0?h=u.factory(a.type,t,s,a.typed,a):h=u.factory(a.type,t,s,a.typed),n.push(u),i.push(h)):h=i[d],h}var l={};function c(){for(var u=arguments.length,m=new Array(u),d=0;d{Yb(l).forEach(u=>{u&&u.meta&&u.meta.recreateOnConfigChange&&o(u,{override:!0})})}),a.create=mx.bind(null,e),a.factory=F,a.import(Yb(HA(e))),a.ArgumentsError=ga,a.DimensionError=pr,a.IndexError=tn,a}var zS=ma(cm());var o5=ma(i5()),_S=class{constructor(){this.lang="en";this.all={en:{hintText:{fileName:"Enter File Name",alias:"Enter Display Name",dragDropModifierKeys:"Hold \${1} to Pin and \${2} to Copy",createListItem:"Select/Create List Item Frame",dragDropProperties:"Drag and drop properties to link them into the list",newItem:"+ New",selectNote:"Select Note...",newFrame:"New"},defaults:{spaceNote:"Current Note",spaceContext:"Current Space"},commands:{h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6",columns:"Columns",tabs:"Tabs",button:"Button",label:"Label",column:"Column",idea:"New",group:"Group",paragraph:"Text",card:"Card",progress:"Progress",rating:"Rating",circularProgress:"Circular Progress",list:"Bullet List","ordered-list":"Numbered List",todo:"To-do List",quote:"Quote",internal:"Link to Note",context:"Embed Existing Context",flow:"Embed Note or Space",board:"New Board",divider:"Divider",note:"Note Block",link:"Web Link",callout:"Callout",bookmark:"Bookmark",table:"New Table",codeblock:"Code Block",toggle:"Toggle",emoji:"Emoji",image:"Image",newNote:"New Note",tag:"Tag",makeMenu:"Flow Menu",selectStyle:"Style",toggleKeyboard:"Toggle Keyboard",rows:"Rows",masonry:"Gallery"},styles:{bold:"Bold",italics:"Italics",strikethrough:"Strikethrough",code:"Code",link:"Web Link",blocklink:"Link to Note",textColor:"Text Color",highlight:"Highlight"},commandsSuggest:{noResult:"No result"},commandPalette:{enable:"Enable",disabled:"Disable",openFlow:"Open Flow Blocks in Selection",closeFlow:"Close Flow Blocks in Selection",toggleBold:"Toggle Bold",toggleItalics:"Toggle Italics",openSpaces:"Open Spaces",blink:"Blink",openFileContext:"Open Explorer",convertPathToSpace:"Convert to Space",revealFile:"Reveal File in Spaces",releaseNotes:"Release Notes",toggleBacklinks:"Toggle Backlinks",collapseAllFolders:"Collapse All Folders",addFileSpace:"Add File to Space",removeFileSpace:"Remove File from Space"},frames:{sections:{kit:"Kit",paths:"Paths"},label:{label:"Label",description:"Label"},note:{label:"Note",description:"Link to a note"},table:{label:"Table",description:"Table"},context:{label:"Context",description:"Display a context view from another space"},calendar:{label:"Calendar View"},field:{label:"Field",description:"Dynamic node that displays a value based on property type"},event:{label:"Event"},divider:{label:"Divider",description:"Divider to separate your content"},button:{label:"Button",description:"Buttons can perform actions and open links"},callout:{label:"Callout",description:"Callout to highlight important information"},toggle:{label:"Toggle",description:"Toggle to show/hide content"}},menu:{layout:"Layout",enterFlowState:"Enter Flow State",exitFlowState:"Exit Flow State",newView:"New View",calendarView:"Calendar View",dayView:"Day View",closeSpace:"Close Space in Focus",customView:"Custom View",detailsView:"Details View",catalogView:"Catalog View",galleryView:"Gallery View",deleteContext:"Delete Context",openSpace:"Open",revealInDefault:"Reveal in Finder",revealInExplorer:"Reveal in Explorer",setNone:"None",fileMetadataDescription:"This note only",openFilePane:"Open in a new pane",rename:"Rename",changeToFolderNote:"New Space from Note",moveFile:"Move file to...",moveFolder:"Move folder to...",duplicate:"Make a copy",edit:"Edit",delete:"Delete",getHelp:"Make.md Community",vault:"Vault",openVault:"Open Another Vault",openVaultInFolder:"Open Vault Folder",obSettings:"Obsidian Settings",commandPalette:"Command Palette",backToSpace:"Back to Spaces",collapseAllSections:"Collapse All Spaces",expandAllSections:"Expand All Spaces",collapseAllFolders:"Collapse All Folders",expandAllFolders:"Expand All Folders",spaceTitle:"Add/Remove in Space",home:"Home",none:"None",tableView:"Table View",cardView:"Card View",boardView:"Board View",listView:"List View",flowView:"Flow View",groupBy:"Group",sortBy:"Sort",filters:"Filters",newFilter:"New Filter",clearFilters:"Clear Filters",hide:"Hide",unhideFields:"Unhide All Properties",importDataview:"Import All Dataview Properties",saveAllProperties:"Save All Properties to Files",mergeProperties:"Merge Properties",removeFromSpace:"Unpin from Space",editCode:"Edit Code",editProperties:"Edit Properties",properties:"Properties",deleteProperty:"Delete Property",hideProperty:"Hide Property",unhideProperty:"Unhide Property",saveProperty:"Save Property",sortAscending:"Sort Ascending",sortDescending:"Sort Descending",deleteRow:"Delete Item",collapseAll:"Collapse All",customSort:"Custom Sort",groupSpaces:"Group Spaces",recurisveSort:"Apply to Subfolders",fileNameSortAlphaAsc:"File Name (A to Z)",fileNameSortAlphaDesc:"File Name (Z to A)",fileNameSortNumericalAsc:"File Name (1 to 9)",fileNameSortNumericalDesc:"File Name (9 to 1)",createdTimeSortAsc:"Created Time (new to old)",createdTimeSortDesc:"Created Time (old to new)",modifiedTimeSortAsc:"Modified Time (new to old)",modifiedTimeSortDesc:"Modified Time (old to new)",sizeSortAsc:"Size (smallest to largest)",sizeSortDesc:"Size (largest to smallest)",spaces:"Spaces",tags:"Tags",manageHiddenFiles:"Manage Hidden Files",manageActions:"Manage Actions",deleteSpace:"Delete",changeColor:"Change Color",changePropertyType:"Change Type",deleteFiles:"Delete Files",createFolderSpace:"Create Space from Folder",folder:"Folder",syncToContext:"Add Property to Context",setIcon:"Set Icon",copyEmbedLink:"Copy Embed Link",moveUp:"Move Up",moveDown:"Move Down",moveTo:"Move To",groupNodes:"Group Nodes",moveFrame:"Move Frame",renameFrame:"Rename Frame",deleteFrame:"Delete Frame",insertAbove:"Insert Above",insertBelow:"Insert Below"},editor:{rows:"Rows",columns:"Columns",catalog:"Catalog",gallery:"Gallery",grid:"Grid",scaleToFit:"Change to Fit",scaleToFill:"Change to Fill",fit:"Fit",strokeNone:"None",strokeSolid:"Solid",strokeDotted:"Dotted",strokeDashed:"Dashed",size:"Size",gap:"Gap",marginLeft:"Left",marginTop:"Top",marginRight:"Right",marginBottom:"Bottom",minimize:"Minimize",paddingLeft:"Left",paddingTop:"Top",paddingRight:"Right",paddingBottom:"Bottom",unlinkProperty:"Unlink Property",linkedProperty:"Linked Property",linkProperty:"Link Property",currentSpace:"Current Space",linkName:"\${1} Link",linkThumbnail:"\${1} Thumbnail",linkSticker:"\${1} Sticker",opacity:"Opacity",shadowSpread:"Spread",shadowBlur:"Blur",width:"Width",height:"Height",margin:"Margin",padding:"Padding",bold:"Bold",italic:"Italic",underline:"Underline",alignLeft:"Align Left",alignCenter:"Align Center",alignRight:"Align Right",alignJustify:"Align Justify",numberOfLines:"Lines",createVerticalSection:"Create Vertical Section",createHorizontalSection:"Create Horizontal Section",themeColors:"Theme Colors",uiColors:"UI Colors",hex:"Hex"},buttons:{add:"Add",togglePin:"Toggle Pin",refresh:"Refresh",showHidden:"Show Hidden",alias:"Alias",addFilter:"Add Filter",loadMore:"Load More",addCondition:"Add Condition",customize:"Customize",moreOptions:"More Options",saveProperty:"Save Property",newNote:"New Note",changeIcon:"Change Sticker",removeIcon:"Remove Sticker",addIcon:"Add Sticker",addCover:"Add Cover",addDisplay:"Display Name",changeBanner:"Change Cover",changeBannerShort:"Cover",saveChanges:"Save Changes",removeBanner:"Remove Cover",rename:"Change Name",editFrame:"Edit Frame",saveSpace:"Save Space",createSpace:"New Space",createFolder:"New Folder",createNote:"New Note",createCanvas:"New Canvas",addIntoSpace:"New Pin",addSmartSearch:"Add Live Search",subFolders:"Sub Folders",addItem:"Add Item",addProperty:"Add Property",editProperty:"Edit Property",addContext:"Add Context",cancel:"Cancel",search:"Search",delete:"Delete",toggleFlow:"Toggle Flow",openFlow:"Open Flow",hideFlow:"Hide Flow",openLink:"Open Link",addToSpace:"Add to Space",addToSpaceShort:"Pin",addTag:"Add Tag",tag:"Tag",syncFields:"Sync Properties",convertTable:"Convert to Markdown",cutTable:"Cut Table",deleteTable:"Delete From Note",blink:"Blink",addFile:"Add Item",merge:"Merge",saveView:"Save View",saveTable:"Save Table",renameView:"Rename View",deleteView:"Delete View",renameTable:"Rename Table",renameTag:"Rename Tag",createTag:"Create Tag",currentFolder:"Current Folder",sync:"Sync",pasteCSS:"Paste CSS",save:"Save",run:"Run"},metadataTypes:{fileName:"File Name",contexts:"Contexts",path:"Path",folder:"Folder",sticker:"Sticker",color:"Color",created:"Created",lastModified:"Last Modified",extension:"Extension",size:"Size",tags:"Tags",inlinks:"Linked Mentions",outlinks:"Links",label:"Label",fileMetadata:"File Metadata",frontmatter:"Frontmatter"},filterTypes:{contains:"contains",notContains:"does not contain",is:"is",isNot:"is not",before:"before",after:"on or after",anyOf:"is any of",noneOf:"is none of",checked:"is checked",unchecked:"is unchecked",isEmpty:"is empty",isNotEmpty:"is not empty",isSameDate:"is same date",isSameDateAsToday:"today"},sortTypes:{alphaAsc:"A to Z",alphaDesc:"Z to A",earliest:"Earliest",latest:"Latest",checkAsc:"Checked \\u2192 Unchecked",checkDesc:"Unchecked \\u2192 Checked",itemsAsc:"Least Items",itemsDesc:"Most Items"},properties:{defaultField:"Name",audio:{label:"Audio",description:"Audio"},text:{label:"Text",description:"Text field"},number:{label:"Number",description:"Number field with optional unit"},boolean:{label:"Yes/No",description:"Yes or No toggle to indicate the status"},date:{label:"Date",description:"Select a date from a calendar"},option:{label:"Option",description:"Select one or multiple option from a list"},file:{label:"File"},link:{label:"Link",description:"Link to another note or a website"},tags:{label:"Tags",description:"Use tags to quickly organize your items"},object:{label:"Object",description:"Store any complex objects"},context:{label:"Relation",description:"Connect to another context property and create a relation"},image:{label:"Image",description:"Select any image from your system or from the internet"},color:{label:"Color",description:"Use colors to label your items or status"},space:{label:"Context",description:"Link to a context"},icon:{label:"Sticker",description:"Use stickers to uniquely label your items or status"},super:{label:"Super Property",links:"Open Link",properties:"Update Property",api:"API",obsidianCommands:"Run Command",runCommand:"Run Command",performAction:"Perform Action",whenClicked:"When Clicked"},fileProperty:{name:"Name",label:"Formula",createdTime:"Created",modifiedTime:"Last Edited",sticker:"Sticker",links:"Links",tags:"Tags",spaces:"Spaces",extension:"Extension",size:"Size",preview:"Note Preview",parentFolder:"Folder",description:"Use a formula to dynamically display a property"}},views:{navigator:"Navigator",explorer:"Explorer",space:"Space"},subViews:{spaceItems:"Items",spaceContext:"Context",spaceLists:"Lists",spaceActions:"Actions",spaceTemplates:"Templates",smartSearch:"Live Searches",filesAndFolders:"Files and Folders"},labels:{duplicateTable:"Duplicate Table",pinned:"Pinned",live:"Pinned by Live Search",moveTable:"Move Table",editFormula:"Edit Formula",editObject:"Edit Object",properties:"Properties",newAction:"Action",newTable:"List",template:"Template",createFolder:"New Folder Name",rename:"Rename",createNew:"New",default:"Default",done:"Done",changeCoverShort:"Change",reposition:"Reposition",tables:"Tables",selectDateFormat:"Select/Type Date Format",renameSection:"Edit Space",createSection:"New Folder",createNote:"New Note",contextMaker:"Context Maker",select:"Select",pinnedItems:"Pinned Items",collapse:"Collapse",expand:"Expand",all:"All",none:"None",view:"View",findStickers:"Find Sticker",mergeProperties:"Merge Properties",placeholder:"Type '\${1}' for commands",notePlaceholder:"New Note for \${1}",itemsSelected:"\${1} Selected",selectNote:"Select Note",selectIcon:"Select Icon",selectImage:"Select Image",selectSpace:"Select Space",styleSmall:"Small",styleMedium:"Medium",styleLarge:"Large",hiddenFilePattern:"Name, Suffixes and Extension",hiddenFileSpecific:"Exclude specific files and folders",textPlaceholder:"Enter Text",noFile:"is not created yet. Click to create.",navigatorSearchPlaceholder:"Search by Text or Filters",blinkPlaceholder:"Search for notes, spaces...",searchPlaceholder:"Type to search...",contextItemSelectPlaceholder:"Find Item",linkItemSelectPlaceholder:"Find or Create Note",pinNotePlaceholder:"Select a Note or Space to Pin",optionItemSelectPlaceholder:"Select Option",viewItemSelectPlaceholder:"Select View",tagItemSelectPlaceholder:"Find Tag",spaceSelectPlaceholder:"Select any Folder or Tag",propertyItemSelectPlaceholder:"Select Property",sortItemSelectPlaceholder:"Select Sort",filterItemSelectPlaceholder:"Select Filter",imageSelectPlaceholder:"Select an image or paste a URL",imageNotFoundPlaceholder:"No Images Found",syncFrontmatterProperty:"Sync Frontmatter Property",newProperty:"New Property",newPropertyShort:"New Property",propertyType:"Type",propertyDynamic:"Dyanmic",propertyValueSpace:"Space",propertyValueProperty:"Property",propertyLookup:"Edit Formula",existingFrontmatter:"Existing Property",dateFormat:"Date Format",propertyFileProp:"Property",multiple:"Multiple",filesCount:"{$1} Files",hiddenFiles:"Hidden Files",addExtension:"Add Rule",saveView:"Save View",saveTable:"Save Table",renameView:"Rename View",renameTable:"Rename Table",syncMetadata:"Sync Metadata",syncProperties:"Sync Properties",selectContext:"Select Context",metadata:"Metadata",backlinks:"Backlinks",spaces:"Spaces",contexts:"Contexts",content:"Content",deleteSpace:"Delete Space",deleteFiles:"Delete Files",outgoingLinks:"Outgoing Links",moveTo:"Move to",addTo:"Pin to",copyTo:"Copy to",reorderIn:"Reorder in",border:"Border",corners:"Corners",color:"Color",backgroundColor:"Background",cornerRadius:"Radius",onClick:"On Click",layout:"Layout",element:"Element",name:"Name",display:"Display",alignment:"Alignment",margin:"Margin",padding:"Padding",gap:"Gap",width:"Width",height:"Height",opacity:"Opacity",shadow:"Shadow",shadowBlur:"Blur",shadowSpread:"Spread",typography:"Typography",layers:"Layers",fontSize:"Size",props:"Props",styles:"Styles",events:"Events",code:"Code",selectedLayers:"\${1} Layers"},descriptions:{spaceActions:"Create actions that runs when you press a button",spaceLists:"Create lists to track data and organize them in your space",spaceItems:"Add new items to the space or pin items to the space",spaceTemplates:"Create templates to quickly add items to your space",smartSearch:"Automatically pin notes to this space based on a set of searches",hiddenFileOptions:"Exclude any files and folders by name, suffix or extension.",deleteSpace:"Deleting the space will also delete the folder and its contents.",deleteFiles:"Delete \${1} files/folders and their contents?",addContext:"Contexts lets you connect properties from your tags",spaceProperties:"Define Properties for your Space Items",syncMetadata:"Select which fields from your notes to start syncing with the context.",syncProperties:"Contexts defines and syncs the same fields across your notes depending on their folder or tag.",selectContext:"Select which folder or tag context you want to sync the fields."},flowView:{emptyDoc:"Empty Document",itemsCount:" Items",emptyFolder:"This Folder is Empty"},notice:{duplicateFile:"Folder already contains note with same name",addedToSection:"Added to Space",fileExists:"File Already Exists",folderExists:"Folder Already Exists",noPropertyName:"Property Name is Required",noPropertiesFound:"No Properties Found",duplicatePropertyName:"Duplicate Property Name",newSpaceName:"Enter a name for your space",duplicateSpaceName:"Space name already exists",cantConvertNoteToSpace:"The view is not a note",templateSaved:"Template saved to space: ",tableDeleted:"Table removed from note, you can find the table in the folder space"},settings:{layoutVertical:"Vertical",layoutHorizontal:"Horizontal",sectionSidebar:"Spaces",sectionEditor:"Maker Mode",sectionFlow:"Flow",sectionAdvanced:"Advanced",sectionDataview:"Dataview",sectionContext:"Context",sectionStickers:"Stickers",sectionNavigator:"Navigator",sectionDefault:"Default Spaces",sectionSpaceView:"Space View",sectionBlink:"Blink",sectionInlineContext:"Inline Context",sectionFlowBlock:"Flow Block",sectionFlowMenu:"Flow Menu",sectionFlowStyler:"Flow Styler",experimental:{name:"Experimental",desc:"Experimental features that are subject to change and may not be optimized for performance"},generateThumbnails:{name:"Generate Thumbnails",desc:"Create thumbnails for images to speed up performance"},minimalThemeFix:{name:"Minimal Theme Fix",description:"Apply fixes for the popular theme Minimal"},inlineStickerMenu:{name:"Inline Stickers",desc:"Add inline stickers by typing :"},openSpacesOnLaunch:{name:"Open Spaces as Default Tab",desc:"Open the Spaces tab when Obsidian launches"},defaultSpaceTemplate:{name:"Default Space Template",desc:"Select the default template for new spaces"},defaultDateFormat:{name:"Default Date Format",desc:"Set the default date format, example: yyyy-MM-dd (see https://date-fns.org/v2.30.0/docs/format)"},newNotePlaceholder:{name:"New Note Placeholder",desc:"Default name for new notes"},folderIndentationLines:{name:"Show Folder Indentation Lines",desc:"Turn on to show a line on the left of folders to indicate indentation"},folderNoteLocation:{name:"Folder Note Location Inside Folder",desc:"Turn on to have folder notes inside the folder, turn off to have it outside"},folderViewDefault:{name:"Show Folder Note by Default",desc:"Show the folder note by default when opening a folder"},internalLinkFlowEditor:{name:"Show Toggles to Open Flow Editor on Links",desc:"Turn on to toggle Flow Blocks directly in inline links"},internalLinkSticker:{name:"Show Stickers on Links",desc:"Turn on to toggle stickers shown directly by beside internal links"},syncContextToFrontmatter:{name:"Sync Context Fields to Frontmatter",desc:"Turn on to automatically save all context fields to frontmatter fields, not just existing frontmatter fields."},syncFormulaToFrontmatter:{name:"Sync Formula Fields to Frontmatter",desc:"Turn on to save calculated formula values to frontmatter fields."},inlineBacklinks:{name:"Show Inline Backlinks (Inline Context required)",desc:"Show editable backlinks at the bottom of your notes"},dataviewInlineContext:{name:"Show Dataview in Inline Context",desc:"Show dataview when inline context is enabled"},inlineContextExplorer:{name:"Inline Context",desc:"Display the context and a banner at the top of your notes"},inlineContextProperties:{name:"Inline Context Properties",desc:"Show the properties in the inline context"},inlineContextExpanded:{name:"Auto Expand Inline Context",desc:"Expand the inline context sections when opening a note"},inlineContextHorizontal:{name:"Inline Title and Sticker Layout",desc:"Layout for inline title and sticker in Inline Context"},hideFrontmatter:{name:"Hide Context Properties",desc:"Hide properties you have added in context from the Obsidian properties panel"},openFileContext:{name:"Auto Open Explorer",desc:"Automatically open explorer panel in the right panel"},folderNote:{name:"Enable Folder Note",desc:"Access the folder note in the folder page and hide the folder note from spaces"},folderNoteName:{name:"Folder Note Name",desc:"Name of the folder note, keep blank to use the same name as the folder"},expandFolder:{name:"Auto Expand Folder",desc:"Auto expand folders on click"},hoverPreview:{name:"Preview on Hover",desc:"Preview on Hover while holding Control/Command key"},activeFile:{name:"Reveal Active File",desc:"Automatically reveal the active file in Spaces"},contexts:{name:"Contexts",desc:"Contexts allows you to have full control over the metadata of your files"},spaces:{name:"Navigator",desc:"The navigator lets you create and organize your spaces"},spacesStickers:{name:"Stickers",desc:"Use Emojis to make it easier to find your notes"},spacesAlias:{name:"Alias",desc:"Use the alias metadata to show in Spaces"},spacesFileExplorerDual:{name:"Compatibility Mode",desc:"This will improve the compatibility of plugins while using Spaces"},spacesDeleteOption:{name:"Delete File Option",desc:"Select how you want files to be deleted"},spacesDeleteOptions:{permanant:"Delete Permanently",trash:"Move to Obsidian Trash","system-trash":"Move to System Trash"},flowState:{name:"Flow State",desc:"Toggle the flow state"},hideRibbon:{name:"App Ribbon",desc:"Show/hide the left menu aka. ribbon"},spaceView:{name:"Space View",desc:"Open the space view when you click on a space"},defaultSpaces:{name:"Default Spaces",desc:"Recommended spaces for quickly organizing your vault"},homeSpace:{name:"Home Space",desc:"An easy-to-access space where you can add/organize your other spaces"},tagSpaces:{name:"Tag Spaces",desc:"Automatically create spaces for each of your tags"},readableLineWidth:{name:"Readable Line Width",desc:"Use Readable Line Width"},sidebarTabs:{name:"Sidebar Tabs",desc:"Show/hide other sidebar tabs"},spacesPerformance:{name:"Performance Mode",desc:"Turn on performance mode for Spaces, may affect scrolling appearance. Requires Restart"},indexSVG:{name:"Use SVGs as Stickers",desc:"Use any svg file in your vault as a sticker"},inlineStyler:{name:"Flow Styler",desc:"Select text to add styling"},inlineStylerColor:{name:"Text and Highlight Colors \\u{1F9EA}",desc:"Select text color and highlight color, (this may change in the future because of the limitations with HTML and Obsidian)"},spaceRowHeight:{name:"Row Height",desc:"The height for each row in spaces (in pixels), default is 29"},contextPagination:{name:"Table View Pagination",desc:"Number of items per page in table view"},coverHeight:{name:"Cover Height",desc:"The height for the cover of the note or space, default is 200"},makeChar:{name:"Flow Menu Trigger",desc:"Character to open the Flow Menu"},mobileMakeBar:{name:"Flow Styler (Mobile)",desc:"Replaces the mobile toolbar"},editorMarkSans:{name:"Mark Sans \\u{1F9EA}",desc:"Use the editor without Markdown."},editorMakerMode:{name:"Flow (Beta)",desc:"An integrated and intuitive editor experience"},editorMakePlacholder:{name:"Flow Menu Hint Text",desc:"Show a hint text on how to open the Flow Menu Shortcut"},blink:{name:"Blink",desc:"A faster way to search and edit your notes"},editorMakeMenu:{name:"Flow Menu",desc:"Open the Flow menu to quickly add content"},editorMakeMenuTrigger:{name:"Flow Menu Shortcut",desc:"Trigger key to use flow menu"},editorFlowReplace:{name:"Flow Block",desc:"Open your internal links or toggle your embeds in the flow block."},editorFlowStyle:{name:"Flow Block Style",desc:"Select a theme for your flow block",seamless:"Seamless",minimal:"Minimal"}}}};this.lang="en";let r=o5.default.locale();["en"].includes(r)&&(this.lang=r)}get texts(){return this.all.en}},Ur=new _S().texts;var OS=e=>e.lastIndexOf("/")!=-1?e.lastIndexOf(".")!=-1?CA(e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("."))):e.substring(e.lastIndexOf("/")+1):e.lastIndexOf(".")!=-1?e.substring(0,e.lastIndexOf(".")):e;var zZ=ma(cm());var IZ=(e,r)=>{let t=a=>a=="builtin"?"Builtin":a=="api"?"Spaces":"Action";return[...(e.actionsIndex.get(r)??[]).map(a=>({name:a.schema.name,description:"Action",value:\`\${r}/#;\${a.schema.id}\`,section:"Action"}))??[],...[...e.cli.allCommands()].map(a=>({name:a.schema.name,description:t(a.schema.type),value:a.path,section:t(a.schema.type)}))]};var s5=({field:e,value:r})=>r=="ctime"?{value:"parseDate(prop('File')['metadata']['ctime'])",type:"date"}:{value:"",type:"string"},px=(e,r,t,a)=>{let n=Dc(e);if(n)return r=="fileprop"&&n.field?s5(n):(r=="option"&&n.source?.length>0&&(n.source=="$commands"?n.options=t.cli.allCommands():n.source=="$links"?n.options=t.spaceManager.allPaths().map(i=>({name:i,value:i})):n.source=="$super"?n.options=IZ(t,a):n.source=="$properties"&&(n.options=t.contextsIndex.get(a)?.contextTable?.cols?.map(i=>({name:i.name,value:i.name}))??[])),[...u5(r).configKeys??[],"alias","default"].reduce((i,s)=>({...i,[s]:n[s]}),{}));if(!r)return{};if(!n)if(r=="context")e?.length>0?n={space:e}:n={};else if(r.startsWith("date"))e?.length>0?n={format:e}:n={};else if(r.startsWith("fileprop"))if(e?.length>0){let[i,s]=e.split(".");n=s5({field:i,value:s})}else n={};else r.startsWith("option")&&(e?.length>0?n={options:gn(e).map(s=>({name:s,value:s}))}:n={});return n??{}};var u5=(e,r)=>r==qn?Af.find(t=>t.type=="file"):r=="tags"?Af.find(t=>t.type=="tags-multi"):r=="aliases"?Af.find(t=>t.type=="option-multi"):r=="sticker"?Af.find(t=>e=="icon"):Af.find(t=>e==t.type)||Af.find(t=>e==t.multiType),Af=[{type:"unknown",label:"",restricted:!0,icon:"ui//file-question"},{type:"any",label:"",restricted:!0,icon:"ui//wildcard",multi:!0,multiType:"any-multi"},{type:"text",label:Ur.properties.text.label,metadata:!0,icon:"ui//text",primative:!0,description:Ur.properties.text.description},{type:"number",label:Ur.properties.number.label,metadata:!0,icon:"ui//binary",configKeys:["unit"],primative:!0,description:Ur.properties.number.description},{type:"boolean",label:Ur.properties.boolean.label,metadata:!0,icon:"ui//check-square",primative:!0,description:Ur.properties.boolean.description},{type:"date",label:Ur.properties.date.label,metadata:!0,icon:"ui//calendar",configKeys:["format"],primative:!0,description:Ur.properties.date.description},{type:"option",label:Ur.properties.option.label,multi:!0,multiType:"option-multi",icon:"ui//list",configKeys:["options","source"],description:Ur.properties.option.description},{type:"tags-multi",label:Ur.properties.tags.label,icon:"ui//tags",description:Ur.properties.tags.description},{type:"file",label:Ur.properties.file.label,restricted:!0,icon:"ui//mk-make-h3"},{type:"fileprop",label:Ur.properties.fileProperty.label,icon:"ui//formula",configKeys:["field","value","type"],description:Ur.properties.fileProperty.description},{type:"link",label:Ur.properties.link.label,multi:!0,multiType:"link-multi",metadata:!0,icon:"ui//file-text",primative:!0,description:Ur.properties.link.description},{type:"context",label:Ur.properties.context.label,icon:"ui//mk-make-note",multi:!0,multiType:"context-multi",configKeys:["space"],description:Ur.properties.context.description},{type:"object",label:Ur.properties.object.label,multi:!0,multiType:"object-multi",metadata:!0,icon:"ui//list-tree",configKeys:["type","typeName"],description:Ur.properties.object.description},{type:"icon",label:Ur.properties.icon.label,multi:!0,multiType:"icon-multi",icon:"ui//gem",restricted:!0,primative:!0,description:Ur.properties.icon.description},{type:"image",label:Ur.properties.image.label,multi:!0,multiType:"image-multi",metadata:!0,icon:"ui//mk-make-image",primative:!0,description:Ur.properties.image.description},{type:"color",label:Ur.properties.color.label,icon:"ui//mk-make-image",restricted:!0,description:Ur.properties.color.description},{type:"space",label:Ur.properties.space.label,icon:"ui//layout-grid",restricted:!0,description:Ur.properties.space.description},{type:"table",label:Ur.properties.space.label,icon:"ui//layout-grid",restricted:!0,description:Ur.properties.space.description},{type:"super",label:Ur.properties.super.label,icon:"ui//zap",restricted:!0,configKeys:["dynamic","field"]},{type:"input",label:Ur.properties.super.label,icon:"ui//input",restricted:!0}];var li="files",Cf={id:li,name:"Items",type:"db",primary:"true"},RZ="filesView",kZ={id:RZ,name:"All",type:"view",def:JSON.stringify({db:li,icon:"ui//file-stack"})},qZ="main",LZ=e=>({id:e,name:e,type:"frame",def:"",predicate:"",primary:"true"}),F4e={uniques:[],cols:["id","name","type","def","predicate","primary"],rows:[LZ(qZ),kZ]},dx={uniques:[],cols:["id","name","type","def","predicate","primary"],rows:[Cf]},f5={uniques:["name,schemaId"],cols:["name","schemaId","type","value","attrs","hidden","unique","primary"]},Mf={...f5,rows:[{name:qn,schemaId:li,type:"file",primary:"true",hidden:"",unique:"",attrs:"",value:""},{name:Ur.properties.fileProperty.createdTime,schemaId:li,type:"fileprop",value:qn+".ctime",hidden:"",unique:"",attrs:"",primary:"true"}]};var _4e=[{name:Ur.properties.defaultField,schemaId:"",type:"text",primary:"true"}],BS={...f5,rows:[{name:qn,schemaId:li,type:"file",primary:"true",hidden:"",unique:"",attrs:"",value:""}]};var O4e={schema:Cf,cols:Mf.rows,rows:[]},B4e={schema:Cf,cols:Mf.rows,rows:[]},P4e={schema:Cf,cols:BS.rows,rows:[]},c5=(e,r)=>e.filter(t=>r.find(a=>a.id==t.schemaId&&a.type=="db")).reduce((t,a)=>({...t,...t[a.schemaId]?{[a.schemaId]:{uniques:a.unique=="true"?[...t[a.schemaId].uniques,a.name]:t[a.schemaId].uniques,cols:[...t[a.schemaId].cols,a.name],rows:[]}}:{[a.schemaId]:{uniques:a.unique=="true"?[a.name]:[],cols:[a.name],rows:[]}}}),{});var I4e={m_schema:dx,m_fields:Mf,...c5(Mf.rows,dx.rows)},R4e={m_schema:dx,m_fields:BS,...c5(BS.rows,dx.rows)};var hx="spaces://$",l5="spaces://$tags";var gRe={name:Ur.menu.vault,readOnly:!1,path:"/",label:{thumbnail:"",name:Ur.menu.vault,sticker:"ui//vault",color:""},type:"default"},vx={tags:{name:"Tags",icon:"ui//tags",readOnly:!1,hidden:!1},overview:{name:"Overview",icon:"ui//overview",readOnly:!0,hidden:!0}};var m5=(e,r,t,a,n,i,s)=>{if(!t)return"";let l=new Map;Object.keys(n).forEach(o=>l.set(o,n[o])),l.set("$properties",a),l.set("$paths",r),i&&l.set("$current",i);let c;try{e.evaluate("current = _current()",l),c=e.evaluate(t,l),c=Ds("",c)}catch(o){if(c="",s)throw o;console.log(t,o)}return c};var PS=e=>{let r=new Map;e.filter(s=>s.type=="fileprop"||s.name.startsWith("tags")).forEach(s=>{let{value:l}=px(s.value,s.type),c=[];try{let u=Wa(l).filter(m=>m.type=="FunctionNode").filter(m=>m.fn.name=="prop"&&m.args[0].type=="ConstantNode").map(m=>m.args[0]?.value);c.push(...u)}catch{}let o=s.name;r.has(o)||r.set(o,new Set);for(let u of c){let m=u;m!==o&&r.get(o).add(m)}});let t=new Set,a=[],n=new Set,i=s=>{if(n.has(s))throw new Error("Circular dependency detected");if(!t.has(s)){n.add(s);let l=r.get(s)||new Set;for(let c of l)i(c);t.add(s),n.delete(s),a.push(s)}};for(let s of e)t.has(s.name)||i(s.name);return a},p5=(e,r,t,a,n,i)=>{if(!t)return{};let s=i??PS(a),l=r.get(t[qn])?.metadata?.property??{},c=Object.keys(l).filter(m=>a.some(d=>d.name==m)&&m!=qn).reduce((m,d)=>({...m,[d]:Ds(d,l[d])}),{}),o=s.map(m=>a.find(d=>d.name==m)).filter(m=>m&&(m.type=="fileprop"||m.name=="tags")),u=a.reduce((m,d)=>({...m,[d.name]:d}),{});return{...t,...c,...o.reduce((m,d)=>{let{value:h}=px(d.value,d.type);return{...m,[d.name]:m5(e,r,h,u,{...t,...m},n)}},{})}};var d5=(e,r)=>{let t=e?gn(e):[],a=r?gn(r):[];return a.every(n=>t.some(i=>i==n))&&t.every(n=>a.some(i=>i==n))},Ef=(e,r)=>e==r,IS=(e,r)=>(e??"").length==0,RS=(e,r)=>(e??"").toLowerCase().includes((r??"").toLowerCase()),kS=(e,r)=>parseFloat(e)>parseFloat(r),qS=(e,r)=>parseInt(e){let t=isNaN(Date.parse(e))?new Date(parseInt(e)):new Date(e),a=isNaN(Date.parse(r))?new Date(parseInt(r)):new Date(r);return t.valueOf()>=a.valueOf()},v5=(e,r)=>{let t=isNaN(Date.parse(e))?new Date(parseInt(e)):new Date(e),a=isNaN(Date.parse(r))?new Date(parseInt(r)):new Date(r);return t.valueOf(){let t=e?gn(e):[],a=r?gn(r):[];return t.length==0?!1:a.some(n=>t.some(i=>i==n))},g5=(e,r)=>{if(!e)return!1;let t=new Date(\`\${e.toString().replace(".",":")}\`),a=new Date(\`\${r}\`);return t.getMonth()===a.getMonth()&&t.getDate()===a.getDate()},y5=e=>{if(!e)return!1;let r=new Date(\`\${e.toString()}T00:00\`),t=new Date;return r.getMonth()===t.getMonth()&&r.getDate()===t.getDate()};var Tf={isNotEmpty:{type:["text","file","number","option","option-multi","link","link-multi","image"],fn:(e,r)=>!IS(e,""),valueType:"none"},isEmpty:{type:["text","file","number","option","option-multi","link","link-multi","image"],fn:(e,r)=>IS(e,""),valueType:"none"},include:{fn:(e,r)=>RS(e,r),type:["text","file","link","image"],valueType:"text"},notInclude:{type:["text","file","link","image"],fn:(e,r)=>!RS(e,r),valueType:"text"},is:{type:["text"],fn:(e,r)=>Ef(e,r),valueType:"text"},isNot:{type:["text"],fn:(e,r)=>!Ef(e,r),valueType:"text"},equal:{type:["number"],fn:(e,r)=>Ef(e,r),valueType:"number"},isLink:{type:["link","context"],fn:(e,r)=>Ef(e,r),valueType:"link"},isNotLink:{type:["link","context"],fn:(e,r)=>!Ef(e,r),valueType:"link"},isGreatThan:{type:["number"],fn:(e,r)=>kS(e,r),valueType:"number"},isLessThan:{type:["number"],fn:(e,r)=>qS(e,r),valueType:"number"},isLessThanOrEqual:{type:["number"],fn:(e,r)=>!kS(e,r),valueType:"number"},isGreatThanOrEqual:{type:["number"],fn:(e,r)=>!qS(e,r),valueType:"number"},dateBefore:{type:["date"],fn:(e,r)=>v5(e,r),valueType:"date"},dateAfter:{type:["date"],fn:(e,r)=>h5(e,r),valueType:"date"},isSameDate:{type:["date"],fn:(e,r)=>g5(e,r),valueType:"date"},isSameDateAsToday:{type:["date"],fn:(e,r)=>y5(e,r),valueType:"none"},isExactList:{type:["option","option-multi","link-multi","context-multi","tags-multi"],fn:(e,r)=>d5(e,r),valueType:"list"},isAnyInList:{type:["option","context","link","option-multi","link-multi","context-multi","tags-multi"],fn:(e,r)=>LS(e,r),valueType:"list"},isNoneInList:{type:["option","context","link","option-multi","link-multi","context-multi","tags-multi"],fn:(e,r)=>!LS(e,r),valueType:"list"},isTrue:{type:["boolean"],fn:(e,r)=>e=="true",valueType:"none"},isFalse:{type:["boolean"],fn:(e,r)=>e!="true",valueType:"none"}};var WZ=(e,r,t)=>r.reduce((n,i)=>{let[s,l]=n,c=i.type=="context"?x5(l,i,t):i.type=="path"?w5(l,i,t):i.type=="frontmatter"?b5(l,i,t):D5(l,i,t),o=l.filter(u=>!c.includes(u));return[[...s,...c],o]},[[],e])[0],YZ=(e,r,t)=>r.reduce((a,n)=>n.type=="context"?x5(a,n,t):n.type=="path"?w5(a,n,t):n.type=="frontmatter"?b5(a,n,t):D5(a,n,t),e),x5=(e,r,t)=>{let a=Tf[r.fn];return!a||a.valueType!="none"&&r.value.length==0?[]:e.filter(n=>{let[i,s]=r.field.split("."),l=n.metadata?.property;if(!n.spaces?.includes(i)||!l||!l[s])return!1;let c=!0;if(a){let o=r.fType=="property"?t[r.value]:r.value;c=a.fn(Ds(s,l[s]),o)}return c})},b5=(e,r,t)=>{let a=Tf[r.fn];return!a||a.valueType!="none"&&r.value.length==0?[]:e.filter(n=>{let i=n.metadata?.property;if(!i||i[r.field]===void 0)return!1;let s=!0;if(a){let l=r.fType=="property"?t[r.value]:r.value;s=a.fn(Ds(r.field,i[r.field]),l)}return s})},w5=(e,r,t)=>{let a=Tf[r.fn];return!a||a.valueType!="none"&&r.value.length==0?[]:e.filter(n=>{let i="";r.field=="outlinks"?i=ws(n.outlinks??[]):r.field=="inlinks"?i=ws(n.metadata?.inlinks??[]):r.field=="tags"&&(i=ws(n.tags??[]));let s=!0;if(a){let l=r.fType=="property"?t[r.value]:r.value;s=a.fn(i,l)}return s})},D5=(e,r,t)=>{let a=Tf[r.fn];return!a||a.valueType!="none"&&r.value.length==0?[]:e.filter(n=>{let i=!0;if(a){let s=r.fType=="property"?t[r.value]:r.value;i=a.fn(n.metadata?.[r.type]?.[r.field],s)}return i})},S5=(e,r,t)=>e.reduce((n,i)=>!n||i.filters.length==0?!1:i.type=="any"?WZ([r],i.filters,t).length>0:YZ([r],i.filters,t).length>0,!0);var N5=(e,r)=>e.hiddenExtensions.some(t=>r.endsWith(t))||r.endsWith("/"+e.spaceSubFolder)||r==e.spaceSubFolder||r.split("/").pop()==e.spaceSubFolder||r.startsWith(e.spacesFolder+"/#")||e.hiddenFiles.some(t=>t==r);var A5=(e,r,t,a,n,i)=>{let s={};if(!e)return{changed:!1,cache:null};if(!r)return{changed:!1,cache:{path:e.path,schemas:[],outlinks:[],contexts:[],paths:[],contextTable:null,spaceMap:s,dbExists:!1}};let l=Object.values(r).map(D=>D.schema),c=r[li]?.cols;(!c||c.length==0)&&(c=Mf.rows);let o=r[li]?.schema??Cf,u=r[li]?.rows?.map(D=>D[qn])??[],m=t.filter(D=>!u.includes(D)),d=[...AA(t??[],u),...m],h=PS(c),y=[...(r[li]?.rows??[]).filter(D=>t.includes(D[qn])),...m.map(D=>({[qn]:D}))].map(D=>p5(i,n,D,c,n.get(e.path),h)),v={schema:o,cols:c,rows:y},x=v.cols?.filter(D=>D.type.startsWith("context"))??[],w=v.cols?.filter(D=>D.type.startsWith("link"))??[],C=pa(x.map(D=>D.value));x.forEach(D=>{s[D.name]={},v.rows.forEach(O=>{gn(O[D.name]).forEach(_=>s[D.name][_]=[...s[D.name][_]??[],O[qn]])})});let b=pa(v.rows.reduce((D,O)=>pa([...D,...[...x,...w].flatMap(_=>gn(O[_.name]).map(E=>Sc(E)))]),[])),A={contextTable:v,path:e.path,contexts:C,outlinks:b,paths:d,schemas:l,spaceMap:s,dbExists:a},M=!1;return zS.default.isEqual(v,r[li])||(M=!0),{changed:M,cache:A}},M5=(e,r,t,a)=>{let n={};for(let[i,s]of e){let l=r.enableFolderNote?t.get(i)?.space.notePath??i:i,c=e.get(l)??s;if(!s)continue;let o=s?.parent??"",u=s?.type??"",m=s?.subtype??"",d=t.has(i)?t.get(i).space.name:s?.label?.name,h=a?.get(i),{changed:y,cache:v}=US(i,r,t,c,d,u,m,o,h);n[i]={changed:y,cache:v}}return n},US=(e,r,t,a,n,i,s,l,c)=>{let o=(G,W,q)=>G?.length>0||G?.length>0?G:W=="space"?q=="Spaces/Home"?"ui//home":q=="/"?"ui//vault":q.startsWith("spaces://")?"ui//tags":"ui//folder":"ui//file",u={label:a?.label,path:e,name:OS(e),readOnly:a?.readOnly},m=[],d=a?.tags?.map(G=>G)??[],h=N5(r,e);if(e.startsWith(hx)){let G=e.replace(hx,"");h=vx[G]?.hidden,u.readOnly=vx[G]?.readOnly}let y=(G,W,q=new Set)=>{let k=[];for(let K of W){let z=G.get(K)?.contexts??[];for(let oe of z)q.has(oe)||(k.push(oe),q.add(oe),k.push(...y(G,[wc(oe)],q)))}return k};if(t.has(l))for(let G of t.get(l).contexts??[])m.push(G);m.push(...d),e=="/"&&(n=r.systemName);let v=a?.property?fm(a.property[r.fmKeyAlias]):[],x=o(a?.label?.sticker,i,e),w=a?.label?.color??"",C=a?.resolvedLinks??[],b=!1,A,M={...u,name:n,tags:pa(m),type:i,subtype:s,parent:l,label:{name:r.spacesUseAlias&&v?.length>0?v[0]:n,sticker:x,color:w,thumbnail:a?.label?.thumbnail??"",preview:a?.label?.preview??""},metadata:{...a},outlinks:C},D=[],O=[],_=[];s=="tag"&&D.push(l5);for(let G of m)D.push(wc(G));let E=new Set,T=(G,W)=>{if(!E.has(G)){if(E.add(G),W.dependencies?.length>0)for(let q of W.dependencies)t.has(q)&&T(q,t.get(q));if(W.metadata.recursive?.length>0&&M.path.startsWith(W.path+"/")){if(W.metadata.recursive=="all"){D.push(G);return}else if(W.metadata.recursive=="file"&&M.type!="space"){D.push(G);return}}if(W.space.notePath==e&&W.path!=W.space.notePath&&(b=!0,A=W.path,h=!0),s!="tag"&&s!="default"&&W.space&&W.space.path==l){D.push(G);return}if(W.metadata?.filters?.length>0&&S5(W.metadata.filters,{...M,spaces:D},W.properties)){D.push(G),_.push(G);return}if(W.metadata?.links?.length>0&&(W.metadata?.links??[]).find(k=>k==M.path)){D.push(G),O.push(G);return}}};for(let[G,W]of t)T(G,W);let R=y(t,D);D.push(...R.map(G=>wc(G))),M.tags.push(...R),b&&(M.metadata.spacePath=A);let L=h?{...M,spaces:[],hidden:h}:{...M,spaces:pa(D),linkedSpaces:O,liveSpaces:_,hidden:h},H=!0;return c&&zS.default.isEqual(L,c)&&(H=!1),{changed:H,cache:L}};function C5(e){let{path:r,settings:t,spacesCache:a,pathMetadata:n,name:i,type:s,subtype:l,parent:c,oldMetadata:o}=e;return US(r,t,a,n,i,s,l,c,o)}function WS(e,r){let{space:t,mdb:a,paths:n,dbExists:i,pathsIndex:s}=e;return A5(t,a,n,i,s,r)}function E5(e,r){let{map:t,pathsIndex:a}=e,n=new Map;for(let[i,s]of t)n.set(i,WS({...s,pathsIndex:a},r));return n}function T5(e){let{pathCache:r,settings:t,spacesCache:a,oldMetadata:n}=e;return M5(r,t,a,n)}var HZ=self,$Z={...CS,createAdd:F("add",[],()=>function(r,t){return r+t}),createEqual:F("equal",[],()=>function(r,t){return r==t}),createUnequal:F("unequal",[],()=>function(r,t){return r!=t})},GZ={matrix:"Array"},YS=mx($Z,GZ);YS.import(Ub,{override:!0});HZ.onmessage=async e=>{let{payload:r,job:t}=e.data,a;t.type=="path"?a=C5(r):t.type=="context"?a=WS(r,YS):t.type=="contexts"?a=E5(r,YS):t.type=="paths"&&(a=T5(r));try{postMessage({job:t,result:a})}catch(n){console.log(n),postMessage({job:t,result:{$error:\`Failed to index \${t.type} \${t.path}: \${n}\`}})}}; /*! * decimal.js v10.4.3 * An arbitrary-precision Decimal type for JavaScript. @@ -297,7 +297,7 @@ In case of a (multi dimensional) array or matrix, the prob order quantile of all //! moment.js //! momentjs.com //! version : 2.29.4 -`,{name:"Superstate Indexer"})}var A5=class{constructor(t,r){this.numWorkers=t;this.cache=r;this.workers=[],this.busy=[],this.reloadQueue=[],this.reloadSet=new Set,this.callbacks=new Map;for(let n=0;nthis.finish(a.data.job,a.data.result,n),this.workers.push(i),this.busy.push(!1)}}reload(t){let r=F2(t),n=new Promise((a,o)=>{this.callbacks.has(r)?this.callbacks.get(r)?.push([a,o]):this.callbacks.set(r,[[a,o]])});if(this.reloadSet.has(r))return n;this.reloadSet.add(r);let i=this.nextAvailableWorker();return i!==void 0?this.send(t,i):this.reloadQueue.push(t),n}finish(t,r,n){let i=F2(t),a=[].concat(this.callbacks.get(i)??[]);this.reloadSet.delete(i),this.callbacks.delete(i),this.busy[n]=!1;let o=this.reloadQueue.shift();if(o!==void 0&&this.send(o,n),"$error"in r)for(let[s,l]of a)l(r.$error);else for(let[s,l]of a)s(r)}async send(t,r){if(t.type=="paths"){let n=await this.cache.spaceManager.allCaches(),i={settings:this.cache.settings,spacesCache:this.cache.spacesIndex,pathCache:n,oldMetadata:this.cache.pathsIndex};this.message(r,{job:t,payload:i}),this.busy[r]=!0;return}if(t.type=="path"){let n=this.cache.spacesIndex.get(t.path),i=t.path,a;n&&(a=n.space.name,this.cache.settings.enableFolderNote?i=n.space.notePath:i=n.space.defPath);let o=await this.cache.spaceManager.readPathCache(i)??await this.cache.spaceManager.readPathCache(t.path);a=a??o?.label.name;let s=await this.cache.spaceManager.parentPathForPath(t.path),l=n?"space":o.type,u=n?n.type:o?.subtype,c={path:t.path,settings:this.cache.settings,spacesCache:this.cache.spacesIndex,pathMetadata:o,name:a,parent:s,type:l,subtype:u,oldMetadata:this.cache.pathsIndex.get(t.path)};this.message(r,{job:t,payload:c}),this.busy[r]=!0;return}if(t.type=="context"){let n=this.cache.spacesIndex.get(t.path)?.space;if(!n||!n.path){this.message(r,{job:t,payload:{space:n,mdb:null,paths:[...this.cache.spacesMap.getInverse(t.path)],pathsIndex:this.cache.pathsIndex}}),this.busy[r]=!0;return}let i=await this.cache.spaceManager.contextInitiated(n.path);this.cache.spaceManager.readAllTables(n.path).then(a=>{this.message(r,{job:t,payload:{space:n,mdb:a,paths:[...this.cache.spacesMap.getInverse(t.path)],dbExists:i,pathsIndex:this.cache.pathsIndex}}),this.busy[r]=!0});return}if(t.type=="contexts"){let n=this.cache.allSpaces().filter(a=>a.type!="default").map(a=>a.space),i=new Map;for(let a of n){let o=await this.cache.spaceManager.contextInitiated(a.path);await this.cache.spaceManager.readAllTables(a.path).then(s=>{i.set(a.path,{space:a,mdb:s,paths:[...this.cache.spacesMap.getInverse(a.path)],dbExists:o})})}this.message(r,{job:t,payload:{map:i,pathsIndex:this.cache.pathsIndex}}),this.busy[r]=!0}}message(t,r){this.workers[t].postMessage(r)}nextAvailableWorker(){let t=this.busy.indexOf(!1);return t==-1?void 0:t}};function BH(){return pC('"use strict";function Xe(t){return Array.isArray(t)?t:typeof t=="string"?[t]:[]}var Je=(t,e)=>e.indexOf(t)>0?e.indexOf(t):e.length;function H(t){return H=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},H(t)}function O(t){if(t===null||t===!0||t===!1)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function x(t,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}function y(t){x(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||H(t)==="object"&&e==="[object Date]"?new Date(t.getTime()):typeof t=="number"||e==="[object Number]"?new Date(t):((typeof t=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn\'t accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function me(t,e){x(2,arguments);var r=y(t).getTime(),n=O(e);return new Date(r+n)}var Lt={};function R(){return Lt}function pe(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function he(t){return x(1,arguments),t instanceof Date||H(t)==="object"&&Object.prototype.toString.call(t)==="[object Date]"}function ge(t){if(x(1,arguments),!he(t)&&typeof t!="number")return!1;var e=y(t);return!isNaN(Number(e))}function xe(t,e){x(2,arguments);var r=O(e);return me(t,-r)}var Ut=864e5;function ye(t){x(1,arguments);var e=y(t),r=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var n=e.getTime(),a=r-n;return Math.floor(a/Ut)+1}function $(t){x(1,arguments);var e=1,r=y(t),n=r.getUTCDay(),a=(n=a.getTime()?r+1:e.getTime()>=s.getTime()?r:r-1}function ve(t){x(1,arguments);var e=te(t),r=new Date(0);r.setUTCFullYear(e,0,4),r.setUTCHours(0,0,0,0);var n=$(r);return n}var Rt=6048e5;function be(t){x(1,arguments);var e=y(t),r=$(e).getTime()-ve(e).getTime();return Math.round(r/Rt)+1}function j(t,e){var r,n,a,o,s,i,u,f;x(1,arguments);var l=R(),c=O((r=(n=(a=(o=e?.weekStartsOn)!==null&&o!==void 0?o:e==null||(s=e.locale)===null||s===void 0||(i=s.options)===null||i===void 0?void 0:i.weekStartsOn)!==null&&a!==void 0?a:l.weekStartsOn)!==null&&n!==void 0?n:(u=l.locale)===null||u===void 0||(f=u.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&r!==void 0?r:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=y(t),p=d.getUTCDay(),g=(p=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(c+1,0,p),g.setUTCHours(0,0,0,0);var v=j(g,e),T=new Date(0);T.setUTCFullYear(c,0,p),T.setUTCHours(0,0,0,0);var S=j(T,e);return l.getTime()>=v.getTime()?c+1:l.getTime()>=S.getTime()?c:c-1}function we(t,e){var r,n,a,o,s,i,u,f;x(1,arguments);var l=R(),c=O((r=(n=(a=(o=e?.firstWeekContainsDate)!==null&&o!==void 0?o:e==null||(s=e.locale)===null||s===void 0||(i=s.options)===null||i===void 0?void 0:i.firstWeekContainsDate)!==null&&a!==void 0?a:l.firstWeekContainsDate)!==null&&n!==void 0?n:(u=l.locale)===null||u===void 0||(f=u.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=re(t,e),p=new Date(0);p.setUTCFullYear(d,0,c),p.setUTCHours(0,0,0,0);var g=j(p,e);return g}var $t=6048e5;function Te(t,e){x(1,arguments);var r=y(t),n=j(r,e).getTime()-we(r,e).getTime();return Math.round(n/$t)+1}function h(t,e){for(var r=t<0?"-":"",n=Math.abs(t).toString();n.length0?n:1-n;return h(r==="yy"?a%100:a,r.length)},M:function(e,r){var n=e.getUTCMonth();return r==="M"?String(n+1):h(n+1,2)},d:function(e,r){return h(e.getUTCDate(),r.length)},a:function(e,r){var n=e.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(e,r){return h(e.getUTCHours()%12||12,r.length)},H:function(e,r){return h(e.getUTCHours(),r.length)},m:function(e,r){return h(e.getUTCMinutes(),r.length)},s:function(e,r){return h(e.getUTCSeconds(),r.length)},S:function(e,r){var n=r.length,a=e.getUTCMilliseconds(),o=Math.floor(a*Math.pow(10,n-3));return h(o,r.length)}},A=jt;var J={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},qt={G:function(e,r,n){var a=e.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(e,r,n){if(r==="yo"){var a=e.getUTCFullYear(),o=a>0?a:1-a;return n.ordinalNumber(o,{unit:"year"})}return A.y(e,r)},Y:function(e,r,n,a){var o=re(e,a),s=o>0?o:1-o;if(r==="YY"){var i=s%100;return h(i,2)}return r==="Yo"?n.ordinalNumber(s,{unit:"year"}):h(s,r.length)},R:function(e,r){var n=te(e);return h(n,r.length)},u:function(e,r){var n=e.getUTCFullYear();return h(n,r.length)},Q:function(e,r,n){var a=Math.ceil((e.getUTCMonth()+1)/3);switch(r){case"Q":return String(a);case"QQ":return h(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(e,r,n){var a=Math.ceil((e.getUTCMonth()+1)/3);switch(r){case"q":return String(a);case"qq":return h(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(e,r,n){var a=e.getUTCMonth();switch(r){case"M":case"MM":return A.M(e,r);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(e,r,n){var a=e.getUTCMonth();switch(r){case"L":return String(a+1);case"LL":return h(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(e,r,n,a){var o=Te(e,a);return r==="wo"?n.ordinalNumber(o,{unit:"week"}):h(o,r.length)},I:function(e,r,n){var a=be(e);return r==="Io"?n.ordinalNumber(a,{unit:"week"}):h(a,r.length)},d:function(e,r,n){return r==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):A.d(e,r)},D:function(e,r,n){var a=ye(e);return r==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):h(a,r.length)},E:function(e,r,n){var a=e.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(e,r,n,a){var o=e.getUTCDay(),s=(o-a.weekStartsOn+8)%7||7;switch(r){case"e":return String(s);case"ee":return h(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,r,n,a){var o=e.getUTCDay(),s=(o-a.weekStartsOn+8)%7||7;switch(r){case"c":return String(s);case"cc":return h(s,r.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,r,n){var a=e.getUTCDay(),o=a===0?7:a;switch(r){case"i":return String(o);case"ii":return h(o,r.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(e,r,n){var a=e.getUTCHours(),o=a/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,r,n){var a=e.getUTCHours(),o;switch(a===12?o=J.noon:a===0?o=J.midnight:o=a/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,r,n){var a=e.getUTCHours(),o;switch(a>=17?o=J.evening:a>=12?o=J.afternoon:a>=4?o=J.morning:o=J.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,r,n){if(r==="ho"){var a=e.getUTCHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return A.h(e,r)},H:function(e,r,n){return r==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):A.H(e,r)},K:function(e,r,n){var a=e.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(a,{unit:"hour"}):h(a,r.length)},k:function(e,r,n){var a=e.getUTCHours();return a===0&&(a=24),r==="ko"?n.ordinalNumber(a,{unit:"hour"}):h(a,r.length)},m:function(e,r,n){return r==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):A.m(e,r)},s:function(e,r,n){return r==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):A.s(e,r)},S:function(e,r){return A.S(e,r)},X:function(e,r,n,a){var o=a._originalDate||e,s=o.getTimezoneOffset();if(s===0)return"Z";switch(r){case"X":return Ze(s);case"XXXX":case"XX":return Q(s);case"XXXXX":case"XXX":default:return Q(s,":")}},x:function(e,r,n,a){var o=a._originalDate||e,s=o.getTimezoneOffset();switch(r){case"x":return Ze(s);case"xxxx":case"xx":return Q(s);case"xxxxx":case"xxx":default:return Q(s,":")}},O:function(e,r,n,a){var o=a._originalDate||e,s=o.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Ke(s,":");case"OOOO":default:return"GMT"+Q(s,":")}},z:function(e,r,n,a){var o=a._originalDate||e,s=o.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Ke(s,":");case"zzzz":default:return"GMT"+Q(s,":")}},t:function(e,r,n,a){var o=a._originalDate||e,s=Math.floor(o.getTime()/1e3);return h(s,r.length)},T:function(e,r,n,a){var o=a._originalDate||e,s=o.getTime();return h(s,r.length)}};function Ke(t,e){var r=t>0?"-":"+",n=Math.abs(t),a=Math.floor(n/60),o=n%60;if(o===0)return r+String(a);var s=e||"";return r+String(a)+s+h(o,2)}function Ze(t,e){if(t%60===0){var r=t>0?"-":"+";return r+h(Math.abs(t)/60,2)}return Q(t,e)}function Q(t,e){var r=e||"",n=t>0?"-":"+",a=Math.abs(t),o=h(Math.floor(a/60),2),s=h(a%60,2);return n+o+r+s}var et=qt;var tt=function(e,r){switch(e){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},rt=function(e,r){switch(e){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},Ht=function(e,r){var n=e.match(/(P+)(p+)?/)||[],a=n[1],o=n[2];if(!o)return tt(e,r);var s;switch(a){case"P":s=r.dateTime({width:"short"});break;case"PP":s=r.dateTime({width:"medium"});break;case"PPP":s=r.dateTime({width:"long"});break;case"PPPP":default:s=r.dateTime({width:"full"});break}return s.replace("{{date}}",tt(a,r)).replace("{{time}}",rt(o,r))},Qt={p:rt,P:Ht},nt=Qt;var Bt=["D","DD"],Gt=["YY","YYYY"];function at(t){return Bt.indexOf(t)!==-1}function ot(t){return Gt.indexOf(t)!==-1}function Se(t,e,r){if(t==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Vt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Xt=function(e,r,n){var a,o=Vt[e];return typeof o=="string"?a=o:r===1?a=o.one:a=o.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a},st=Xt;function ne(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.width?String(e.width):t.defaultWidth,n=t.formats[r]||t.formats[t.defaultWidth];return n}}var Jt={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zt={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Kt={full:"{{date}} \'at\' {{time}}",long:"{{date}} \'at\' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Zt={date:ne({formats:Jt,defaultWidth:"full"}),time:ne({formats:zt,defaultWidth:"full"}),dateTime:ne({formats:Kt,defaultWidth:"full"})},it=Zt;var er={lastWeek:"\'last\' eeee \'at\' p",yesterday:"\'yesterday at\' p",today:"\'today at\' p",tomorrow:"\'tomorrow at\' p",nextWeek:"eeee \'at\' p",other:"P"},tr=function(e,r,n,a){return er[e]},ut=tr;function B(t){return function(e,r){var n=r!=null&&r.context?String(r.context):"standalone",a;if(n==="formatting"&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,s=r!=null&&r.width?String(r.width):o;a=t.formattingValues[s]||t.formattingValues[o]}else{var i=t.defaultWidth,u=r!=null&&r.width?String(r.width):t.defaultWidth;a=t.values[u]||t.values[i]}var f=t.argumentCallback?t.argumentCallback(e):e;return a[f]}}var rr={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},nr={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ar={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},or={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},sr={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ir={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ur=function(e,r){var n=Number(e),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},fr={ordinalNumber:ur,era:B({values:rr,defaultWidth:"wide"}),quarter:B({values:nr,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:B({values:ar,defaultWidth:"wide"}),day:B({values:or,defaultWidth:"wide"}),dayPeriod:B({values:sr,defaultWidth:"wide",formattingValues:ir,defaultFormattingWidth:"wide"})},ft=fr;function G(t){return function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,a=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],o=e.match(a);if(!o)return null;var s=o[0],i=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],u=Array.isArray(i)?cr(i,function(c){return c.test(s)}):lr(i,function(c){return c.test(s)}),f;f=t.valueCallback?t.valueCallback(u):u,f=r.valueCallback?r.valueCallback(f):f;var l=e.slice(s.length);return{value:f,rest:l}}}function lr(t,e){for(var r in t)if(t.hasOwnProperty(r)&&e(t[r]))return r}function cr(t,e){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},n=e.match(t.matchPattern);if(!n)return null;var a=n[0],o=e.match(t.parsePattern);if(!o)return null;var s=t.valueCallback?t.valueCallback(o[0]):o[0];s=r.valueCallback?r.valueCallback(s):s;var i=e.slice(a.length);return{value:s,rest:i}}}var dr=/^(\\d+)(th|st|nd|rd)?/i,mr=/\\d+/i,pr={narrow:/^(b|a)/i,abbreviated:/^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},hr={any:[/^b/i,/^(a|c)/i]},gr={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},xr={any:[/1/i,/2/i,/3/i,/4/i]},yr={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},vr={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},br={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},wr={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Tr={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Sr={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Or={ordinalNumber:Oe({matchPattern:dr,parsePattern:mr,valueCallback:function(e){return parseInt(e,10)}}),era:G({matchPatterns:pr,defaultMatchWidth:"wide",parsePatterns:hr,defaultParseWidth:"any"}),quarter:G({matchPatterns:gr,defaultMatchWidth:"wide",parsePatterns:xr,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:G({matchPatterns:yr,defaultMatchWidth:"wide",parsePatterns:vr,defaultParseWidth:"any"}),day:G({matchPatterns:br,defaultMatchWidth:"wide",parsePatterns:wr,defaultParseWidth:"any"}),dayPeriod:G({matchPatterns:Tr,defaultMatchWidth:"any",parsePatterns:Sr,defaultParseWidth:"any"})},lt=Or;var Mr={code:"en-US",formatDistance:st,formatLong:it,formatRelative:ut,localize:ft,match:lt,options:{weekStartsOn:0,firstWeekContainsDate:1}},ct=Mr;var dt=ct;var Dr=/[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|\'\'|\'(\'\'|[^\'])+(\'|$)|./g,kr=/P+p+|P+|p+|\'\'|\'(\'\'|[^\'])+(\'|$)|./g,Cr=/^\'([^]*?)\'?$/,Wr=/\'\'/g,Ir=/[a-zA-Z]/;function se(t,e,r){var n,a,o,s,i,u,f,l,c,d,p,g,v,T,S,P,W,L;x(2,arguments);var de=String(e),E=R(),b=(n=(a=r?.locale)!==null&&a!==void 0?a:E.locale)!==null&&n!==void 0?n:dt,k=O((o=(s=(i=(u=r?.firstWeekContainsDate)!==null&&u!==void 0?u:r==null||(f=r.locale)===null||f===void 0||(l=f.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&i!==void 0?i:E.firstWeekContainsDate)!==null&&s!==void 0?s:(c=E.locale)===null||c===void 0||(d=c.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(k>=1&&k<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var C=O((p=(g=(v=(T=r?.weekStartsOn)!==null&&T!==void 0?T:r==null||(S=r.locale)===null||S===void 0||(P=S.options)===null||P===void 0?void 0:P.weekStartsOn)!==null&&v!==void 0?v:E.weekStartsOn)!==null&&g!==void 0?g:(W=E.locale)===null||W===void 0||(L=W.options)===null||L===void 0?void 0:L.weekStartsOn)!==null&&p!==void 0?p:0);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!b.localize)throw new RangeError("locale must contain localize property");if(!b.formatLong)throw new RangeError("locale must contain formatLong property");var q=y(t);if(!ge(q))throw new RangeError("Invalid time value");var ee=pe(q),U=xe(q,ee),Ve={firstWeekContainsDate:k,weekStartsOn:C,locale:b,_originalDate:q},M=de.match(kr).map(function(w){var I=w[0];if(I==="p"||I==="P"){var oe=nt[I];return oe(w,b.formatLong)}return w}).join("").match(Dr).map(function(w){if(w==="\'\'")return"\'";var I=w[0];if(I==="\'")return Pr(w);var oe=et[I];if(oe)return!(r!=null&&r.useAdditionalWeekYearTokens)&&ot(w)&&Se(w,e,String(t)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&at(w)&&Se(w,e,String(t)),oe(U,w,b.localize,Ve);if(I.match(Ir))throw new RangeError("Format string contains an unescaped latin alphabet character `"+I+"`");return w}).join("");return M}function Pr(t){var e=t.match(Cr);return e?e[1].replace(Wr,"\'"):t}var mt=t=>[...new Set(t)];var Me=(t,e)=>{if(t instanceof Date)return"date";if(typeof t=="string"){if(/\\/\\/(\\S+?(?:jpe?g|png|gif|svg))/gi.test(t)||t.includes("unsplash"))return"image";if(/^\\d{4}-\\d{2}-\\d{2}$/.test(t))return"date";if(e=="tag"||e=="tags")return"tags-multi";if(/\\[\\[.*?\\]\\]/.test(t))return"link"}else{if(typeof t=="number")return"number";if(typeof t=="boolean")return"boolean";if(t)if(Array.isArray(t)||typeof t=="string"&&t.indexOf(",")>-1){let r=Array.isArray(t)?t:[];if(typeof t=="string"&&t.indexOf(",")>-1&&(r=V(t)),e=="tag"||e=="tags")return"tags-multi";if(r.length==1&&Array.isArray(r[0])&&r[0].length==1&&typeof r[0][0]=="string")return"link";let n=mt(r.map(a=>Me(a,e)));return n.length==1&&n[0]=="link"?"link-multi":n.some(a=>a=="object")?"object-multi":"option-multi"}else return t.isLuxonDateTime?"date":t.isLuxonDuration?"duration":t.type=="file"?"link":typeof t=="object"&&!Array.isArray(t)&&t!==null?"object":"unknown";else return"unknown"}return"text"};var pt=t=>t.map(e=>e.replace(",","\\\\,")).join(", "),z=t=>JSON.stringify(t);var V=t=>t?.startsWith("[")?Xe(ze(t)):Fr(t),Fr=t=>(t?.replace("\\\\,",",")?.match(/(\\\\.|[^,])+/g)??[]).map(e=>e.trim()),ke=(t,e,r)=>{let n=r??Me(e,t);if(!e)return"";switch(n){case"tags-multi":return e;case"object":case"object-multi":return JSON.stringify(e);case"number":return e.toString();case"boolean":return e?"true":"false";case"date":{if(e instanceof Date){let a=se(e,"yyyy-MM-dd");return typeof a=="string"?a:""}return typeof e!="string"?"":e}break;case"duration":return pt(Object.keys(e.values).reduce((a,o)=>[...a,...e.values[o]>0?[e.values[o]+" "+o]:[]],[]));case"option-multi":case"link-multi":case"context-multi":return typeof e=="string"?De(e):z(e.map(a=>a?typeof a=="string"?De(a):a.path?a.path:Array.isArray(e)&&a.length==1&&Array.isArray(a[0])&&a[0].length==1&&typeof a[0][0]=="string"?a[0][0]:JSON.stringify(a):""));case"link":case"context":return Array.isArray(e)&&e.length==1&&Array.isArray(e[0])&&e[0].length==1&&typeof e[0][0]=="string"?e[0][0]:typeof e=="string"?De(e):e.path;case"text":case"tag":case"option":case"image":return e}return""};var ze=t=>{let e;try{e=JSON.parse(t)}catch{}return e};var De=t=>{if(!t)return"";let e=/\\[\\[(.*?)\\]\\]/g.exec(t),r=e?.length>1?e[1].substring(0,Je("|",e[1])):t;return r||t};var ht=(t,e)=>{let r=t?V(t):[],n=e?V(e):[];return n.every(a=>r.some(o=>o==a))&&r.every(a=>n.some(o=>o==a))},K=(t,e)=>t==e,Ce=(t,e)=>(t??"").length==0,We=(t,e)=>(t??"").toLowerCase().includes((e??"").toLowerCase()),Ie=(t,e)=>parseFloat(t)>parseFloat(e),Pe=(t,e)=>parseInt(t){let r=isNaN(Date.parse(t))?new Date(parseInt(t)):new Date(t),n=isNaN(Date.parse(e))?new Date(parseInt(e)):new Date(e);return r.valueOf()>=n.valueOf()},xt=(t,e)=>{let r=isNaN(Date.parse(t))?new Date(parseInt(t)):new Date(t),n=isNaN(Date.parse(e))?new Date(parseInt(e)):new Date(e);return r.valueOf(){let r=t?V(t):[],n=e?V(e):[];return r.length==0?!1:n.some(a=>r.some(o=>o==a))},yt=(t,e)=>{if(!t)return!1;let r=new Date(`${t.toString().replace(".",":")}`),n=new Date(`${e}`);return r.getMonth()===n.getMonth()&&r.getDate()===n.getDate()},vt=t=>{if(!t)return!1;let e=new Date(`${t.toString()}T00:00`),r=new Date;return e.getMonth()===r.getMonth()&&e.getDate()===r.getDate()};var Z={isNotEmpty:{type:["text","file","number","option","option-multi","link","link-multi","image"],fn:(t,e)=>!Ce(t,""),valueType:"none"},isEmpty:{type:["text","file","number","option","option-multi","link","link-multi","image"],fn:(t,e)=>Ce(t,""),valueType:"none"},include:{fn:(t,e)=>We(t,e),type:["text","file","link","image"],valueType:"text"},notInclude:{type:["text","file","link","image"],fn:(t,e)=>!We(t,e),valueType:"text"},is:{type:["text"],fn:(t,e)=>K(t,e),valueType:"text"},isNot:{type:["text"],fn:(t,e)=>!K(t,e),valueType:"text"},equal:{type:["number"],fn:(t,e)=>K(t,e),valueType:"number"},isLink:{type:["link","context"],fn:(t,e)=>K(t,e),valueType:"link"},isNotLink:{type:["link","context"],fn:(t,e)=>!K(t,e),valueType:"link"},isGreatThan:{type:["number"],fn:(t,e)=>Ie(t,e),valueType:"number"},isLessThan:{type:["number"],fn:(t,e)=>Pe(t,e),valueType:"number"},isLessThanOrEqual:{type:["number"],fn:(t,e)=>!Ie(t,e),valueType:"number"},isGreatThanOrEqual:{type:["number"],fn:(t,e)=>!Pe(t,e),valueType:"number"},dateBefore:{type:["date"],fn:(t,e)=>xt(t,e),valueType:"date"},dateAfter:{type:["date"],fn:(t,e)=>gt(t,e),valueType:"date"},isSameDate:{type:["date"],fn:(t,e)=>yt(t,e),valueType:"date"},isSameDateAsToday:{type:["date"],fn:(t,e)=>vt(t,e),valueType:"none"},isExactList:{type:["option","option-multi","link-multi","context-multi","tags-multi"],fn:(t,e)=>ht(t,e),valueType:"list"},isAnyInList:{type:["option","context","link","option-multi","link-multi","context-multi","tags-multi"],fn:(t,e)=>Fe(t,e),valueType:"list"},isNoneInList:{type:["option","context","link","option-multi","link-multi","context-multi","tags-multi"],fn:(t,e)=>!Fe(t,e),valueType:"list"},isTrue:{type:["boolean"],fn:(t,e)=>t=="true",valueType:"none"},isFalse:{type:["boolean"],fn:(t,e)=>t!="true",valueType:"none"}};var _r=(t,e,r)=>e.reduce((a,o)=>{let[s,i]=a,u=o.type=="context"?bt(i,o,r):o.type=="path"?Tt(i,o,r):o.type=="frontmatter"?wt(i,o,r):St(i,o,r),f=i.filter(l=>!u.includes(l));return[[...s,...u],f]},[[],t])[0],Er=(t,e,r)=>e.reduce((n,a)=>a.type=="context"?bt(n,a,r):a.type=="path"?Tt(n,a,r):a.type=="frontmatter"?wt(n,a,r):St(n,a,r),t),bt=(t,e,r)=>{let n=Z[e.fn];return!n||n.valueType!="none"&&e.value.length==0?[]:t.filter(a=>{let[o,s]=e.field.split("."),i=a.metadata?.property;if(!a.spaces?.includes(o)||!i||!i[s])return!1;let u=!0;if(n){let f=e.fType=="property"?r[e.value]:e.value;u=n.fn(ke(s,i[s]),f)}return u})},wt=(t,e,r)=>{let n=Z[e.fn];return!n||n.valueType!="none"&&e.value.length==0?[]:t.filter(a=>{let o=a.metadata?.property;if(!o||o[e.field]===void 0)return!1;let s=!0;if(n){let i=e.fType=="property"?r[e.value]:e.value;s=n.fn(ke(e.field,o[e.field]),i)}return s})},Tt=(t,e,r)=>{let n=Z[e.fn];return!n||n.valueType!="none"&&e.value.length==0?[]:t.filter(a=>{let o="";e.field=="outlinks"?o=z(a.outlinks??[]):e.field=="inlinks"?o=z(a.metadata?.inlinks??[]):e.field=="tags"&&(o=z(a.tags??[]));let s=!0;if(n){let i=e.fType=="property"?r[e.value]:e.value;s=n.fn(o,i)}return s})},St=(t,e,r)=>{let n=Z[e.fn];return!n||n.valueType!="none"&&e.value.length==0?[]:t.filter(a=>{let o=!0;if(n){let s=e.fType=="property"?r[e.value]:e.value;o=n.fn(a.metadata?.[e.type]?.[e.field],s)}return o})},Ot=(t,e,r)=>t.reduce((a,o)=>!a||o.filters.length==0?!1:o.type=="any"?_r([e],o.filters,r).length>0:Er([e],o.filters,r).length>0,!0);function Y(t){return Array.isArray?Array.isArray(t):Ft(t)==="[object Array]"}var Ar=1/0;function Yr(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-Ar?"-0":e}function Nr(t){return t==null?"":Yr(t)}function F(t){return typeof t=="string"}function It(t){return typeof t=="number"}function Lr(t){return t===!0||t===!1||Ur(t)&&Ft(t)=="[object Boolean]"}function Pt(t){return typeof t=="object"}function Ur(t){return Pt(t)&&t!==null}function D(t){return t!=null}function _e(t){return!t.trim().length}function Ft(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}var Rr="Incorrect \'index\' type",$r=t=>`Invalid value for key ${t}`,jr=t=>`Pattern length exceeds max of ${t}.`,qr=t=>`Missing ${t} property in key`,Hr=t=>`Property \'weight\' in key \'${t}\' must be a positive integer`,Mt=Object.prototype.hasOwnProperty,Ee=class{constructor(e){this._keys=[],this._keyMap={};let r=0;e.forEach(n=>{let a=_t(n);this._keys.push(a),this._keyMap[a.id]=a,r+=a.weight}),this._keys.forEach(n=>{n.weight/=r})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function _t(t){let e=null,r=null,n=null,a=1,o=null;if(F(t)||Y(t))n=t,e=Dt(t),r=Ae(t);else{if(!Mt.call(t,"name"))throw new Error(qr("name"));let s=t.name;if(n=s,Mt.call(t,"weight")&&(a=t.weight,a<=0))throw new Error(Hr(s));e=Dt(s),r=Ae(s),o=t.getFn}return{path:e,id:r,weight:a,src:n,getFn:o}}function Dt(t){return Y(t)?t:t.split(".")}function Ae(t){return Y(t)?t.join("."):t}function Qr(t,e){let r=[],n=!1,a=(o,s,i)=>{if(!!D(o))if(!s[i])r.push(o);else{let u=s[i],f=o[u];if(!D(f))return;if(i===s.length-1&&(F(f)||It(f)||Lr(f)))r.push(Nr(f));else if(Y(f)){n=!0;for(let l=0,c=f.length;lt.score===e.score?t.idx{this._keysMap[r.id]=n})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,F(this.docs[0])?this.docs.forEach((e,r)=>{this._addString(e,r)}):this.docs.forEach((e,r)=>{this._addObject(e,r)}),this.norm.clear())}add(e){let r=this.size();F(e)?this._addString(e,r):this._addObject(e,r)}removeAt(e){this.records.splice(e,1);for(let r=e,n=this.size();r{let s=a.getFn?a.getFn(e):this.getFn(e,a.path);if(!!D(s)){if(Y(s)){let i=[],u=[{nestedArrIndex:-1,value:s}];for(;u.length;){let{nestedArrIndex:f,value:l}=u.pop();if(!!D(l))if(F(l)&&!_e(l)){let c={v:l,i:f,n:this.norm.get(l)};i.push(c)}else Y(l)&&l.forEach((c,d)=>{u.push({nestedArrIndex:d,value:c})})}n.$[o]=i}else if(F(s)&&!_e(s)){let i={v:s,n:this.norm.get(s)};n.$[o]=i}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}};function Et(t,e,{getFn:r=m.getFn,fieldNormWeight:n=m.fieldNormWeight}={}){let a=new ae({getFn:r,fieldNormWeight:n});return a.setKeys(t.map(_t)),a.setSources(e),a.create(),a}function Kr(t,{getFn:e=m.getFn,fieldNormWeight:r=m.fieldNormWeight}={}){let{keys:n,records:a}=t,o=new ae({getFn:e,fieldNormWeight:r});return o.setKeys(n),o.setIndexRecords(a),o}function ie(t,{errors:e=0,currentLocation:r=0,expectedLocation:n=0,distance:a=m.distance,ignoreLocation:o=m.ignoreLocation}={}){let s=e/t.length;if(o)return s;let i=Math.abs(n-r);return a?s+i/a:i?1:s}function Zr(t=[],e=m.minMatchCharLength){let r=[],n=-1,a=-1,o=0;for(let s=t.length;o=e&&r.push([n,a]),n=-1)}return t[o-1]&&o-n>=e&&r.push([n,o-1]),r}var X=32;function en(t,e,r,{location:n=m.location,distance:a=m.distance,threshold:o=m.threshold,findAllMatches:s=m.findAllMatches,minMatchCharLength:i=m.minMatchCharLength,includeMatches:u=m.includeMatches,ignoreLocation:f=m.ignoreLocation}={}){if(e.length>X)throw new Error(jr(X));let l=e.length,c=t.length,d=Math.max(0,Math.min(n,c)),p=o,g=d,v=i>1||u,T=v?Array(c):[],S;for(;(S=t.indexOf(e,g))>-1;){let b=ie(e,{currentLocation:S,expectedLocation:d,distance:a,ignoreLocation:f});if(p=Math.min(b,p),g=S+l,v){let k=0;for(;k=q;M-=1){let w=M-1,I=r[t.charAt(w)];if(v&&(T[w]=+!!I),U[M]=(U[M+1]<<1|1)&I,b&&(U[M]|=(P[M+1]|P[M])<<1|1|P[M+1]),U[M]&de&&(W=ie(e,{errors:b,currentLocation:w,expectedLocation:d,distance:a,ignoreLocation:f}),W<=p)){if(p=W,g=w,g<=d)break;q=Math.max(1,2*d-g)}}if(ie(e,{errors:b+1,currentLocation:d,expectedLocation:d,distance:a,ignoreLocation:f})>p)break;P=U}let E={isMatch:g>=0,score:Math.max(.001,W)};if(v){let b=Zr(T,i);b.length?u&&(E.indices=b):E.isMatch=!1}return E}function tn(t){let e={};for(let r=0,n=t.length;r{this.chunks.push({pattern:d,alphabet:tn(d),startIndex:p})},c=this.pattern.length;if(c>X){let d=0,p=c%X,g=c-p;for(;d{let{isMatch:S,score:P,indices:W}=en(e,g,v,{location:a+T,distance:o,threshold:s,findAllMatches:i,minMatchCharLength:u,includeMatches:n,ignoreLocation:f});S&&(d=!0),c+=P,S&&W&&(l=[...l,...W])});let p={isMatch:d,score:d?c/this.chunks.length:1};return d&&n&&(p.indices=l),p}},_=class{constructor(e){this.pattern=e}static isMultiMatch(e){return kt(e,this.multiRegex)}static isSingleMatch(e){return kt(e,this.singleRegex)}search(){}};function kt(t,e){let r=t.match(e);return r?r[1]:null}var Ye=class extends _{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let r=e===this.pattern;return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}},Ne=class extends _{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let n=e.indexOf(this.pattern)===-1;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}},Le=class extends _{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\\^"(.*)"$/}static get singleRegex(){return/^\\^(.*)$/}search(e){let r=e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}},Ue=class extends _{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\\^"(.*)"$/}static get singleRegex(){return/^!\\^(.*)$/}search(e){let r=!e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}},Re=class extends _{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\\$$/}static get singleRegex(){return/^(.*)\\$$/}search(e){let r=e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},$e=class extends _{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\\$$/}static get singleRegex(){return/^!(.*)\\$$/}search(e){let r=!e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}},fe=class extends _{constructor(e,{location:r=m.location,threshold:n=m.threshold,distance:a=m.distance,includeMatches:o=m.includeMatches,findAllMatches:s=m.findAllMatches,minMatchCharLength:i=m.minMatchCharLength,isCaseSensitive:u=m.isCaseSensitive,ignoreLocation:f=m.ignoreLocation}={}){super(e),this._bitapSearch=new ue(e,{location:r,threshold:n,distance:a,includeMatches:o,findAllMatches:s,minMatchCharLength:i,isCaseSensitive:u,ignoreLocation:f})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}},le=class extends _{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^\'"(.*)"$/}static get singleRegex(){return/^\'(.*)$/}search(e){let r=0,n,a=[],o=this.pattern.length;for(;(n=e.indexOf(this.pattern,r))>-1;)r=n+o,a.push([n,r-1]);let s=!!a.length;return{isMatch:s,score:s?0:1,indices:a}}},je=[Ye,le,Le,Ue,$e,Re,Ne,fe],Ct=je.length,rn=/ +(?=(?:[^\\"]*\\"[^\\"]*\\")*[^\\"]*$)/,nn="|";function an(t,e={}){return t.split(nn).map(r=>{let n=r.trim().split(rn).filter(o=>o&&!!o.trim()),a=[];for(let o=0,s=n.length;o!!(t[ce.AND]||t[ce.OR]),un=t=>!!t[Be.PATH],fn=t=>!Y(t)&&Pt(t)&&!Ge(t),Wt=t=>({[ce.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function At(t,e,{auto:r=!0}={}){let n=a=>{let o=Object.keys(a),s=un(a);if(!s&&o.length>1&&!Ge(a))return n(Wt(a));if(fn(a)){let u=s?a[Be.PATH]:o[0],f=s?a[Be.PATTERN]:a[u];if(!F(f))throw new Error($r(u));let l={keyId:Ae(u),pattern:f};return r&&(l.searcher=Qe(f,e)),l}let i={children:[],operator:o[0]};return o.forEach(u=>{let f=a[u];Y(f)&&f.forEach(l=>{i.children.push(n(l))})}),i};return Ge(t)||(t=Wt(t)),n(t)}function ln(t,{ignoreFieldNorm:e=m.ignoreFieldNorm}){t.forEach(r=>{let n=1;r.matches.forEach(({key:a,norm:o,score:s})=>{let i=a?a.weight:null;n*=Math.pow(s===0&&i?Number.EPSILON:s,(i||1)*(e?1:o))}),r.score=n})}function cn(t,e){let r=t.matches;e.matches=[],D(r)&&r.forEach(n=>{if(!D(n.indices)||!n.indices.length)return;let{indices:a,value:o}=n,s={indices:a,value:o};n.key&&(s.key=n.key.src),n.idx>-1&&(s.refIndex=n.idx),e.matches.push(s)})}function dn(t,e){e.score=t.score}function mn(t,e,{includeMatches:r=m.includeMatches,includeScore:n=m.includeScore}={}){let a=[];return r&&a.push(cn),n&&a.push(dn),t.map(o=>{let{idx:s}=o,i={item:e[s],refIndex:s};return a.length&&a.forEach(u=>{u(o,i)}),i})}var N=class{constructor(e,r={},n){this.options={...m,...r},this.options.useExtendedSearch,this._keyStore=new Ee(this.options.keys),this.setCollection(e,n)}setCollection(e,r){if(this._docs=e,r&&!(r instanceof ae))throw new Error(Rr);this._myIndex=r||Et(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){!D(e)||(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){let r=[];for(let n=0,a=this._docs.length;n-1&&(u=u.slice(0,r)),mn(u,this._docs,{includeMatches:n,includeScore:a})}_searchStringList(e){let r=Qe(e,this.options),{records:n}=this._myIndex,a=[];return n.forEach(({v:o,i:s,n:i})=>{if(!D(o))return;let{isMatch:u,score:f,indices:l}=r.searchIn(o);u&&a.push({item:o,idx:s,matches:[{score:f,value:o,norm:i,indices:l}]})}),a}_searchLogical(e){let r=At(e,this.options),n=(i,u,f)=>{if(!i.children){let{keyId:c,searcher:d}=i,p=this._findMatches({key:this._keyStore.get(c),value:this._myIndex.getValueForItemAtKeyId(u,c),searcher:d});return p&&p.length?[{idx:f,item:u,matches:p}]:[]}let l=[];for(let c=0,d=i.children.length;c{if(D(i)){let f=n(r,i,u);f.length&&(o[u]||(o[u]={idx:u,item:i,matches:[]},s.push(o[u])),f.forEach(({matches:l})=>{o[u].matches.push(...l)}))}}),s}_searchObjectList(e){let r=Qe(e,this.options),{keys:n,records:a}=this._myIndex,o=[];return a.forEach(({$:s,i})=>{if(!D(s))return;let u=[];n.forEach((f,l)=>{u.push(...this._findMatches({key:f,value:s[l],searcher:r}))}),u.length&&o.push({idx:i,item:s,matches:u})}),o}_findMatches({key:e,value:r,searcher:n}){if(!D(r))return[];let a=[];if(Y(r))r.forEach(({v:o,i:s,n:i})=>{if(!D(o))return;let{isMatch:u,score:f,indices:l}=n.searchIn(o);u&&a.push({score:f,key:e,value:o,idx:s,norm:i,indices:l})});else{let{v:o,n:s}=r,{isMatch:i,score:u,indices:f}=n.searchIn(o);i&&a.push({score:u,key:e,value:o,norm:s,indices:f})}return a}};N.version="7.0.0";N.createIndex=Et;N.parseIndex=Kr;N.config=m;N.parseQuery=At;sn(qe);function Yt(t){let{query:e,pathsIndex:r,count:n}=t,a=[],o={shouldSort:!0,threshold:0,ignoreLocation:!0,keys:["name","path","label.preview"]};return new N([...r.values()].filter(i=>i.hidden==!1),o).search(e).map(i=>i.item).slice(0,n)}function Nt(t){let{queries:e,pathsIndex:r,count:n}=t,a=[];for(let[o,s]of r)!s.hidden&&Ot(e,s,{})&&a.push(s);return a.slice(0,n)}var pn=self;pn.onmessage=async t=>{let{payload:e,job:r}=t.data,n;r.type=="search"&&(n=Nt(e)),r.type=="fastSearch"&&(n=Yt(e));try{postMessage({job:r,result:n})}catch(a){console.log(a),postMessage({job:r,result:{$error:`Failed to run ${r.type} ${r.path}: ${a}`}})}};\n',{name:"Superstate Search"})}var g5=class{constructor(t,r){this.numWorkers=t;this.cache=r;this.workers=[],this.busy=[],this.reloadQueue=[],this.reloadSet=new Set,this.callbacks=new Map;for(let n=0;nthis.finish(a.data.job,a.data.result,n),this.workers.push(i),this.busy.push(!1)}}run(t){let r=F2(t),n=new Promise((a,o)=>{this.callbacks.has(r)?this.callbacks.get(r)?.push([a,o]):this.callbacks.set(r,[[a,o]])});if(this.reloadSet.has(r))return n;this.reloadSet.add(r);let i=this.nextAvailableWorker();return i!==void 0?this.send(t,i):this.reloadQueue.push(t),n}finish(t,r,n){let i=F2(t),a=[].concat(this.callbacks.get(i)??[]);this.reloadSet.delete(i),this.callbacks.delete(i),this.busy[n]=!1;let o=this.reloadQueue.shift();if(o!==void 0&&this.send(o,n),"$error"in r)for(let[s,l]of a)l(r.$error);else for(let[s,l]of a)s(r)}async send(t,r){t.type=="search"&&(this.message(r,{job:t,payload:{queries:t.payload.queries,pathsIndex:this.cache.pathsIndex,count:t.payload.count}}),this.busy[r]=!0),t.type=="fastSearch"&&(this.message(r,{job:t,payload:{query:t.payload.query,pathsIndex:this.cache.pathsIndex,count:t.payload.count}}),this.busy[r]=!0)}message(t,r){this.workers[t].postMessage(r)}nextAvailableWorker(){let t=this.busy.indexOf(!1);return t==-1?void 0:t}};var gy=class{constructor(t,r,n,i,a){this.indexVersion=t;this.onChange=r;this.loadouts=[];this.kit=[Um,_2,$2,B2,R2,jwe,q2,cC,Dwe,Twe,Rwe,Bwe,Fwe,Pwe,_we,Iwe,$we,qwe,Uwe,Wwe,Mwe,Owe,P2,Wm,zwe,p5,I2,fC,Lwe,Nwe,Vwe];this.eventsDispatcher=new l0;let o={...lG,createAdd:G("add",[],()=>function(f,d){return f+d}),createEqual:G("equal",[],()=>function(f,d){return f==d}),createUnequal:G("unequal",[],()=>function(f,d){return f!=d})},l=yB(o,{matrix:"Array"});l.import(P6,{override:!0}),this.formulaContext=l,this.initialized=!1,this.spaceManager=n,this.spaceManager.superstate=this,this.ui=i,this.ui.superstate=this,this.cli=a;let u=new m5(this.cli,this);this.cli.superstate=this,this.cli.terminals.splice(0,0,u),this.cli.mainTerminal=u,this.allMetadata={},this.api=new uC(this),this.pathsIndex=new Map,this.spacesIndex=new Map,this.contextsIndex=new Map,this.actionsIndex=new Map,this.kitFrames=new Map,this.kits=new Map,this.actions=new Map,this.templateCache=new Map,this.focuses=[],this.spacesMap=new vd,this.linksMap=new vd,this.tagsMap=new vd,this.liveSpaceLinkMap=new vd,this.iconsCache=new Map,this.imagesCache=new Map,this.contextStateQueue=Promise.resolve(),this.vaultDBCache=[],this.indexer=new A5(2,this),this.searcher=new g5(1,this)}static create(t,r,n,i,a){return new gy(t,r,n,i,a)}refreshMetadata(){this.allMetadata=h5(this)}async initializeIndex(){await this.loadFromCache()}addToContextStateQueue(t){this.contextStateQueue=this.contextStateQueue.then(t).catch(()=>{})}async initialize(){if(!this.persister){console.log("Cache Persister Not Found");return}let t=Date.now();this.initializeActions(),this.initializeFocuses(),this.initializeKits(),this.initializeTemplates(),this.settings.spacesEnabled&&await this.initializeSpaces(),await this.initializeBuiltins(),await this.initializeTags(),await this.initializePaths(),await this.initializeContexts(),await this.initializeFrames(),this.refreshMetadata(),this.dispatchEvent("superstateUpdated",null),this.ui.notify(`Make.md - Superstate Loaded in ${(Date.now()-t)/1e3} seconds`,"console"),this.persister.cleanType("space"),this.persister.cleanType("path"),this.persister.cleanType("context"),this.persister.cleanType("frame")}async reloadSystemActions(){(await this.spaceManager.readSystemCommands()).forEach(r=>this.actions.set(r.name,r.commands)),this.dispatchEvent("actionStateUpdated",{path:"spaces://$actions"})}async initializeActions(){await this.reloadSystemActions();let t=this.allSpaces().filter(r=>r.type!="default").map(r=>r.space).map(r=>this.reloadActions(r));await Promise.all(t)}async initializeKits(){let t=await this.spaceManager.readAllKits();t.forEach(r=>this.kits.set(r.id,r)),t.length==0&&this.kits.set("default",{id:"default",name:"Default",colors:{},frames:[]}),this.selectedKit=this.kits.get(this.settings.selectedKit)??this.kits.get("default"),this.selectedKit.frames=[...this.selectedKit.frames,...this.kit.map(r=>AN(r)).filter(r=>!this.selectedKit.frames.some(n=>n.schema.id==r.schema.id))];for(let r of this.selectedKit.frames){let n=to(r.schema).def.id,i=await hN(this,r,{...u0,screenType:this.ui.getScreenType()});this.kitFrames.set(n,i)}this.dispatchEvent("frameStateUpdated",{path:"spaces://$kit"})}async initializeTemplates(){let t=await this.spaceManager.readAllTemplates();Object.keys(t).forEach(r=>{this.templateCache.set(r,t[r])})}async initializeSpaces(){let t=[...this.spaceManager.allSpaces().values()],r=t.map(n=>this.reloadSpace(n,null,!0));[...this.spacesIndex.keys()].filter(n=>!t.some(i=>i.path==n)).forEach(n=>this.onSpaceDeleted(n)),await Promise.all(r)}getSpaceItems(t,r){let n=[...this.spacesMap.getInverse(t)],i=this.contextsIndex.get(t)?.paths??[];return n.map((a,o)=>({...this.pathsIndex.get(a),rank:i.indexOf(a)})).filter(a=>a?.hidden!=!0&&a.path!=t)}async initializeFrames(){await this.initializeTemplates()}async initializeContexts(){await this.indexer.reload({type:"contexts",path:""}).then(async t=>{let r=[...t.entries()].map(([n,{cache:i,changed:a}])=>this.contextReloaded(n,i,a,!0));await Promise.all(r)})}async loadFromCache(){if(this.dispatchEvent("superstateReindex",null),this.settings.indexSVG){let i=await this.persister.loadAll("icon");this.spaceManager.allPaths(["svg"]).forEach(a=>{let o=i.find(s=>s.path==a);o?.cache.length>0&&this.iconsCache.set(a,o.cache)})}let t=await this.persister.loadAll("path"),r=await this.persister.loadAll("space"),n=await this.persister.loadAll("context");r.forEach(i=>{let a=dr(i.cache);a&&a.type&&this.spacesIndex.set(i.path,a)}),n.forEach(i=>{let a=dr(i.cache);a&&this.contextsIndex.set(i.path,a)}),t.forEach(i=>{let a=c5(i.cache);this.pathsIndex.set(i.path,a),this.tagsMap.set(i.path,new Set(a.tags)),this.spacesMap.set(i.path,new Set(a.spaces)),this.linksMap.set(i.path,new Set(a.outlinks))}),this.dispatchEvent("superstateUpdated",null)}dispatchEvent(t,r){this.eventsDispatcher.dispatchEvent(t,r)}async initializeBuiltins(){let r=Object.keys(cm).map(n=>this.reloadPath("spaces://$"+n,!0));await Promise.all(r)}async initializeTags(){let r=[...this.spaceManager.readTags().map(n=>$c(n))].map(n=>this.reloadPath(n,!0));await Promise.all(r)}async onSpaceDefinitionChanged(t,r){if(t.space.readOnly)return;let n=this.spacesMap.getInverse(t.path),i=[];if(t.metadata?.links&&!K0.default.isEqual(t.metadata.links,r?.links)&&i.push(...t.metadata.links),t.metadata?.filters?.length>0){let s=t.metadata.filters.some(l=>l.filters.some(u=>u.fType=="property"));if(!K0.default.isEqual(t.metadata?.filters,r?.filters)||s)for(let[l,u]of this.pathsIndex)!u.hidden&&u5(t.metadata?.filters,u,t.properties)&&i.push(l)}let o=[...K0.default.difference(i,[...n]),...K0.default.difference([...n],i)].map(s=>this.reloadPath(s,!0).then(l=>this.dispatchEvent("pathStateUpdated",{path:s})));await Promise.all(o)}async initializeFocuses(){let t=await this.spaceManager.readFocuses();if(t.length==0){this.spaceManager.saveFocuses([{name:"Home",sticker:"ui//home",paths:["/"]}]);return}this.focuses=t,this.dispatchEvent("focusesChanged",null)}async initializePaths(){this.dispatchEvent("superstateReindex",null);let t=this.spaceManager.allPaths(),r=Date.now();await this.indexer.reload({type:"paths",path:""}).then(async i=>{for await(let[a,{cache:o,changed:s}]of Object.entries(i))await this.pathReloaded(a,o,s,!1)}),this.ui.notify(`Make.md - ${t.length} Paths Cached in ${(Date.now()-r)/1e3} seconds`,"console");let n=Mr([...this.spaceManager.allSpaces().map(i=>i.path),...t]);[...this.pathsIndex.keys()].filter(i=>!n.some(a=>a==i)).forEach(i=>this.onPathDeleted(i)),this.dispatchEvent("superstateUpdated",null)}async onTagRenamed(t,r){let n=iJ(t),i=n1(this.spaceManager,r);await this.onSpaceRenamed(n,i),await this.onPathRename(n,i.path),this.dispatchEvent("spaceChanged",{path:n,newPath:i.path});let a=[];for(let[o,s]of this.spacesIndex)this.contextsIndex.get(o)?.contexts.includes(t)&&this.addToContextStateQueue(()=>Lye(this.spaceManager,t,r,a)),s.metadata?.contexts.includes(t)&&sf(this,s.space,{...s.metadata,contexts:s.metadata.contexts.map(u=>u==t?r:u)});this.dispatchEvent("spaceStateUpdated",{path:mx})}async onTagDeleted(t){this.tagsMap.getInverse(t).forEach(i=>{this.deleteTagInPath(t,i)});let r=_j(t,this.settings);await this.spaceManager.deletePath(r),this.onSpaceDeleted($c(t));for(let[i,a]of this.spacesIndex)a.metadata?.contexts.includes(t)&&sf(this,a.space,{...a.metadata,contexts:a.metadata.contexts.filter(o=>o!=t)});let n=[];for(let[i,a]of this.contextsIndex)a.contexts.includes(t)&&n.push(this.spaceManager.spaceInfoForPath(a.path));this.addToContextStateQueue(()=>zye(this.spaceManager,t,n)),this.dispatchEvent("spaceStateUpdated",{path:mx})}async deleteTagInPath(t,r){let n;if(this.pathsIndex.has(r)&&(n=this.pathsIndex.get(r)),n){let i={...n,tags:n.tags.filter(a=>a!=t),spaces:n.spaces.filter(a=>a!=$c(t))};this.pathsIndex.set(r,i),this.tagsMap.set(r,new Set(i.tags)),this.spacesMap.set(r,new Set(i.spaces))}else await this.reloadPath(r);this.onPathReloaded(r),this.dispatchEvent("pathStateUpdated",{path:r})}onMetadataChange(t){!this.pathsIndex.has(t)||this.reloadPath(t).then(r=>{let n=this.pathsIndex.get(t),i=this.spacesIndex.get(t);i&&this.reloadSpace(i.space).then(o=>this.onSpaceDefinitionChanged(o,i.metadata));let a=n.spaces.map(o=>this.spacesIndex.get(o)?.space).filter(o=>o);this.addToContextStateQueue(()=>gG(this,t,a)),this.dispatchEvent("pathStateUpdated",{path:t})})}reloadSpaceByPath(t,r){return this.reloadSpace(this.spaceManager.spaceInfoForPath(t),r)}async onPathRename(t,r){let n=r,i=this.pathsIndex.get(t),a=i?.spaces??[];if(i){this.spacesMap.delete(t),this.spacesMap.deleteInverse(t),this.linksMap.delete(t),this.linksMap.deleteInverse(t),this.pathsIndex.delete(t);let u=a.map(f=>this.spacesIndex.get(f)).filter(f=>f);await Hye(this.spaceManager,t,n,u.map(f=>f.space));for(let f of u)f.metadata?.links?.includes(t)&&this.addToContextStateQueue(()=>sy(this,f.path,"links",f.metadata.links.map(d=>d==t?r:d))),await this.reloadContext(f.space,!0);let c=[];for(let[f,d]of this.contextsIndex)d.outlinks.includes(t)&&c.push(this.spacesIndex.get(d.path).space);this.addToContextStateQueue(()=>Vye(this.spaceManager,t,n,c).then(f=>Promise.all(c.map(d=>this.reloadContext(d,!0)))))}let o=!1;this.focuses.forEach(u=>{u.paths.includes(t)&&(u.paths=u.paths.map(c=>c==t?r:c),o=!0)}),o&&(await this.spaceManager.saveFocuses(this.focuses),this.dispatchEvent("focusesChanged",null)),await this.reloadPath(r,!0);let s=Mr([...this.spacesMap.get(r)??[],...a]),l=s.map(u=>this.reloadContext(this.spacesIndex.get(u)?.space));await Promise.all(l),s.forEach(u=>this.dispatchEvent("spaceStateUpdated",{path:u})),this.dispatchEvent("pathChanged",{path:t,newPath:r}),this.ui.viewsByPath(t).forEach(u=>{u.openPath(r)})}async onPathCreated(t){await this.reloadPath(t,!0);let r=uu(t);this.spacesIndex.has(r)&&this.spacesIndex.get(r).space.notePath==t&&await this.reloadSpace(this.spacesIndex.get(r).space),this.dispatchEvent("pathCreated",{path:t})}onPathDeleted(t){this.spacesMap.delete(t),this.linksMap.delete(t),this.linksMap.deleteInverse(t),this.persister.remove(t,"path");let r=this.pathsIndex.get(t);if(!r)return;let n=(r.spaces??[]).map(a=>this.spacesIndex.get(a)?.space).filter(a=>a);this.addToContextStateQueue(()=>Qye(this.spaceManager,t,n).then(a=>n.forEach(o=>this.reloadContext(o))));let i=[];for(let[a,o]of this.contextsIndex)o.outlinks.includes(t)&&this.spacesIndex.has(o.path)&&i.push(this.spacesIndex.get(o.path).space);this.addToContextStateQueue(()=>Gye(this.spaceManager,t,i).then(a=>n.forEach(o=>this.reloadContext(o)))),(r.spaces??[]).forEach(a=>{this.dispatchEvent("spaceStateUpdated",{path:a})}),this.pathsIndex.delete(t),this.dispatchEvent("pathDeleted",{path:t})}async onSpaceRenamed(t,r){if(this.spacesIndex.has(t)){let n=this.spacesIndex.get(t).metadata;this.spacesIndex.set(r.path,{...this.spacesIndex.get(t),path:r.path,name:r.name,space:r}),this.spacesMap.rename(t,r.path),this.spacesMap.renameInverse(t,r.path),this.spacesIndex.delete(t),this.contextsIndex.delete(t),this.actionsIndex.delete(t),await this.reloadSpace(r,n).then(i=>this.onSpaceDefinitionChanged(i,n)),await this.reloadContext(r,!0),await this.reloadActions(r)}}onSpaceDeleted(t){this.spacesIndex.has(t)&&(this.spacesIndex.delete(t),this.contextsIndex.delete(t)),this.spacesMap.delete(t),this.spacesMap.deleteInverse(t),this.persister.remove(t,"space"),this.dispatchEvent("spaceDeleted",{path:t})}async reloadActions(t){if(!t)return!1;this.spaceManager.commandsForSpace(t.path).then(r=>{this.actionsIndex.set(t.path,r),this.dispatchEvent("actionStateUpdated",{path:t.path})})}async reloadContextByPath(t,r){return this.reloadContext(this.spaceManager.spaceInfoForPath(t),r)}async reloadContext(t,r){return t?this.indexer.reload({type:"context",path:t.path}).then(n=>this.contextReloaded(t.path,n.cache,n.changed,r)):!1}async contextReloaded(t,r,n,i){if(!n&&!i)return!1;this.contextsIndex.set(t,r);let a=this.pathsIndex.get(t);if(a&&r.dbExists&&!a.readOnly&&this.settings.syncFormulaToFrontmatter){let o=r.contextTable?.rows??[],s=r.contextTable?.cols??[],l=o.filter(u=>{let c=u[It],f=this.pathsIndex.get(c);return!f||f.type=="file"&&f.subtype!="md"?!1:s.reduce((d,p,h)=>d||p.type!="fileprop"||p.primary=="true"?d:u[p.name]?.length>0&&f.metadata?.property?.[p.name]!=u[p.name]?!0:d,!1)});l.length>0&&l.forEach(u=>Di(this,u[It],s.reduce((c,f,d)=>f.type=="fileprop"&&f.primary!="true"?{...c,[f.name]:u[f.name]}:c,{})))}return r.dbExists&&n&&await this.spaceManager.saveTable(t,r.contextTable),this.persister.store(t,JSON.stringify(r),"context"),this.dispatchEvent("contextStateUpdated",{path:t}),!0}allSpaces(t){return t?KK([...this.spacesIndex.values()],this.spaceOrder(),"path"):[...this.spacesIndex.values()]}spaceOrder(){return[...this.focuses.flatMap(t=>t.paths)]}async updateSpaceMetadata(t,r){let n=this.spacesIndex.get(t),i=n?.metadata;if(!n)return this.reloadSpaceByPath(t);let a=!1,s=(r?.sort??{field:"rank",asc:!0,group:!0}).field=="rank";(!K0.default.isEqual(n.metadata.links,r.links)||!K0.default.isEqual(n.metadata.filters,r.filters))&&(a=!0);let l={...n,metadata:r,contexts:r?.contexts??[],sortable:s};return this.spacesIndex.set(t,l),a&&await this.onSpaceDefinitionChanged(l,i),this.dispatchEvent("spaceStateUpdated",{path:n.path}),l}async reloadSpace(t,r,n=!0){if(!t)return;let i=r??await this.spaceManager.spaceDefForSpace(t.path),a=this.pathsIndex.get(t.path),o=this.spaceManager.uriByString(t.path);if(!o)return null;let s=this.spaceManager.spaceTypeByString(o);(s=="default"||s=="tag")&&(i.filters=[],i.links=[]);let l=[],u={},c=await this.spaceManager.readFrame(t.path,r1).then(b=>b?.cols??[]);if(l.push(...c),l.length>0){if(!a)if(this.settings.enableFolderNote){let b=await this.spaceManager.readPathCache(t.notePath);a={path:t.path,name:t.name,tags:[],spaces:[],outlinks:[],readOnly:t.readOnly,hidden:!1,metadata:b?.metadata,type:"space",subtype:s,label:b?.label}}else{let b=await this.spaceManager.readPathCache(t.path);a={path:t.path,name:t.name,tags:[],spaces:[],outlinks:[],readOnly:t.readOnly,hidden:!1,metadata:b?.metadata,type:"space",subtype:s,label:b?.label}}u=await this.spaceManager.readProperties(t.notePath).then(b=>Vm(this.formulaContext,this.pathsIndex,b,l,a))}[...this.spacesMap.get(t.path)].map(b=>this.contextsIndex.get(b)).forEach(b=>{if(b){let v=b.contextTable?.cols??[];l.push(...v),u={...u,...b.contextTable?.rows.find(x=>x[It]==t.path)??{}}}});let f=i?.sort??{field:"rank",asc:!0,group:!0},d=f.field=="rank"||!f,p=i?.contexts??[],h=Mr((i.filters??[]).flatMap(b=>b.filters).flatMap(b=>b.type=="context"?[b.field.split(".")[0]]:b.type=="path"&&b.field=="space"?mr(b.value):[])),m=Mr((i.filters??[]).flatMap(b=>b.filters).flatMap(b=>b.type.startsWith("link")?mr(b.value):[]));if(s=="tag"&&this.settings.autoAddContextsToSubtags){let b=SJ(t.name);p.push(...b)}let g=await this.spaceManager.readTemplates(t.path),A={name:t.name,space:t,path:t.path,type:s,templates:g,contexts:p.map(b=>Tg(b)),metadata:i,dependencies:h,sortable:d,properties:u,propertyTypes:l};if(this.spacesIndex.set(t.path,A),this.persister.store(t.path,JSON.stringify(A),"space"),A.metadata?.links?.forEach(b=>{_K(this,b)&&this.spacesMap.set(b,new Set([...this.spacesMap.get(b),t.path]))}),n)return this.dispatchEvent("spaceStateUpdated",{path:t.path}),A}async pathReloaded(t,r,n,i){if(this.pathsIndex.set(t,r),await this.onPathReloaded(t),(r.subtype=="image"||r.metadata?.file?.extension=="svg")&&this.imagesCache.set(r.metadata.file.filename,t),!n&&!i)return!1;if(this.tagsMap.set(t,new Set(r.tags)),this.linksMap.set(t,new Set(r.outlinks)),!K0.default.isEqual(r.spaces,Array.from(this.spacesMap.get(t)))){this.spacesMap.set(t,new Set(r.spaces));let a=r.tags.map(s=>this.spacesIndex.has($c(s))?null:n1(this.spaceManager,s)).filter(s=>s).map(async s=>{await this.reloadSpace(s),this.reloadContext(s),await this.reloadPath(s.path)});Promise.all(a).then(s=>{this.dispatchEvent("spaceStateUpdated",{path:mx})})}if(i){let a=r.spaces.map(o=>this.spacesIndex.get(o)?.space).filter(o=>o);this.addToContextStateQueue(()=>gG(this,t,a).then(o=>{a.forEach(s=>{this.dispatchEvent("spaceStateUpdated",{path:s.path})})}))}r.metadata?.file?.extension=="svg"&&this.settings.indexSVG&&this.spaceManager.readPath(t).then(a=>{this.iconsCache.set(t,a),this.persister.store(t,a,"icon")})}async reloadPath(t,r){return t?this.indexer.reload({type:"path",path:t}).then(async n=>(await this.pathReloaded(t,n.cache,n.changed,r),!0)):!1}async onPathReloaded(t){let r;if(this.pathsIndex.has(t)&&(r=this.pathsIndex.get(t)),!r)return!1;await this.persister.store(t,kwe(r),"path")}};var vy=class{constructor(){this.filesystems=[];this.filetypes=[];this.eventDispatch=new l0}static create(){return new vy}resolvePath(t,r){return this.primary.resolvePath(t,r)}keysForCacheType(t){return this.primary.keysForCacheType(t)}allTags(){return this.primary.readAllTags()}fileFragmentChanged(t){this.eventDispatch.dispatchEvent("onFileFragmentChanged",{file:t})}initiateFileSystemAdapter(t,r){t.initiate(this),r&&(this.primary=t),this.filesystems.push(t)}initiateFiletypeAdapter(t){t.initiate(this),this.filetypes.push(t)}filetypeAdaptersForFile(t){return t?this.filetypes.filter(r=>r.supportedFileTypes.includes(t.extension)):[]}filetypeAdaptersForFileFragments(t,r){return this.filetypeAdaptersForFile(t).filter(n=>n.contentTypes?n.contentTypes(t).includes(r):!1)}getFileCacheTypeByRefString(t,r){return this.filetypeAdaptersForFile(t).reduce((i,a)=>i||a.getCacheTypeByRefString(t,r),null)}allCaches(){return this.primary.cache}allFiles(){return this.primary.allFiles()}resourcePathForPath(t){return this.adapterForPath(t).resourcePathForPath(t)}parentPathForPath(t){return this.adapterForPath(t).parentPathForPath(t)}async createFileCache(t){let r=await this.getFile(t);for(let n of this.filetypeAdaptersForFile(r))n.parseCache&&await n.parseCache(r,!1)}getFileCache(t){return this.adapterForPath(t).getFileCache(t)}getFileContent(t,r,n){let i=this.filetypeAdaptersForFile(t).filter(a=>a.contentTypes(t).includes(r));if(i.length>=1)return i[0].readContent(t,r,n)}updateFileCache(t,r,n){this.adapterForPath(t).updateFileCache(t,r,n)}readFileFragments(t,r,n){let i=this.filetypeAdaptersForFileFragments(t,r);if(i.length>=1)return i[0].readContent(t,r,n)}async newFile(t,r,n,i){let a=this.filetypes.find(o=>o.supportedFileTypes.includes(n));if(a)return a.newFile(t,r,n,i)}newFileFragment(t,r,n,i,a){let o=this.filetypeAdaptersForFileFragments(t,r);if(o.length>=1)return o[0].newContent(t,r,n,i,a)}saveFileLabel(t,r,n){let i=this.filetypeAdaptersForFileFragments(t,"label");return i.length>=1?i[0].saveContent(t,"label",r,()=>n):this.primary.updateFileLabel(t.path,r,n)}saveFileFragment(t,r,n,i){let a=this.filetypeAdaptersForFileFragments(t,r);return a.length>=1?a[0].saveContent(t,r,n,i):!1}deleteFileFragment(t,r,n){let i=this.filetypeAdaptersForFileFragments(t,r);if(i.length>=1)return i[0].deleteContent(t,r,n)}onCreate(t){this.eventDispatch.dispatchEvent("onCreate",{file:t})}onModify(t){this.eventDispatch.dispatchEvent("onModify",{file:t})}onRename(t,r){this.eventDispatch.dispatchEvent("onRename",{file:t,oldPath:r})}onDelete(t){this.eventDispatch.dispatchEvent("onDelete",{file:t})}onSpaceUpdated(t,r){this.eventDispatch.dispatchEvent("onSpaceUpdated",{path:t,type:r})}onFocusesUpdated(){this.eventDispatch.dispatchEvent("onFocusesUpdated",null)}adapterForPath(t){return this.primary}async getRoot(){return this.adapterForPath().getRoot()}async copyFile(t,r,n){return this.adapterForPath(t).copyFile(t,r,n)}async writeTextToFile(t,r){return this.adapterForPath(t).writeTextToFile(t,r)}async readTextFromFile(t){return this.adapterForPath(t).readTextFromFile(t)}async writeBinaryToFile(t,r){return this.adapterForPath(t).writeBinaryToFile(t,r)}async readBinaryToFile(t){return this.adapterForPath(t).readBinaryToFile(t)}async renameFile(t,r){return this.adapterForPath(t).renameFile(t,r)}async createFolder(t){return this.adapterForPath(t).createFolder(t)}async childrenForFolder(t,r){return this.adapterForPath(t).childrenForFolder(t,r)}async fileExists(t){return this.adapterForPath(t).fileExists(t)}async getFile(t,r){return this.adapterForPath(t).getFile(t,r)}async deleteFile(t){return this.adapterForPath(t).deleteFile(t)}async addTagToFile(t,r){return this.adapterForPath(t).addTagToFile(t,r)}async renameTagForFile(t,r,n){return this.adapterForPath(t).renameTagForFile(t,r,n)}async removeTagFromFile(t,r){return this.adapterForPath(t).removeTagFromFile(t,r)}filesForTag(t){return this.primary.filesForTag(t)}};var RH=(e,t)=>e.skipFolderNames.some(r=>t.endsWith(r))||t.endsWith("/"+e.spaceSubFolder)||t==e.spaceSubFolder||t.split("/").pop()==e.spaceSubFolder||t.startsWith(e.spacesFolder+"/#")||t.startsWith(e.spacesFolder+"/$")||e.skipFolders.some(r=>r==t);var mC="templates",hC="kits",AC="actions",gC="waypoints.json",vC=class{constructor(t,r){this.fileSystem=t;this.dataPath=r;this.schemes=["spaces","vault"];this.onFocusesUpdated=()=>{this.spaceManager.onFocusesUpdated()};this.onSpaceUpdated=t=>{t.type=="views.mdb"?this.spaceManager.onSpaceUpdated(t.path,"frame"):t.type=="context.mdb"?this.spaceManager.onSpaceUpdated(t.path,"context"):t.type=="commands.mdb"&&this.spaceManager.onSpaceUpdated(t.path,"action")};this.onCreate=async t=>{t.file.isFolder?this.spaceManager.onSpaceCreated(t.file.path):this.spaceManager.onPathCreated(t.file.path)};this.onDelete=t=>{!t.file||(!t.file.isFolder&&t.file.extension!="mdb"?this.spaceManager.onPathDeleted(t.file.path):t.file.isFolder&&this.spaceManager.onSpaceDeleted(t.file.path))};this.onRename=t=>{!t.file||(!t.file.isFolder&&t.file.extension!="mdb"?this.spaceManager.onPathChanged(t.file.path,t.oldPath):t.file.isFolder&&this.spaceManager.onSpaceRenamed(t.file.path,t.oldPath))};this.authorities=["vault"];t.eventDispatch.addListener("onCreate",this.onCreate,0,this),t.eventDispatch.addListener("onRename",this.onRename,0,this),t.eventDispatch.addListener("onDelete",this.onDelete,0,this),t.eventDispatch.addListener("onFocusesUpdated",this.onFocusesUpdated,0,this),t.eventDispatch.addListener("onSpaceUpdated",this.onSpaceUpdated,0,this),t.eventDispatch.addListener("onCacheUpdated",this.onMetadataChange,0,this)}initiateAdapter(t){this.spaceManager=t}async readTemplates(t){return(await this.childrenForPath(`${t}/${this.spaceManager.superstate.settings.spaceSubFolder}/templates`)).filter(r=>!r.startsWith(".")).map(r=>r.split("/").pop())}async saveTemplate(t,r){return this.copyPath(t,`${r}/${this.spaceManager.superstate.settings.spaceSubFolder}/templates`)}deleteTemplate(t,r){return this.deletePath(`${r}/${this.spaceManager.superstate.settings.spaceSubFolder}/templates/${t}`)}async readFocuses(){return await this.fileSystem.fileExists(this.dataPath)||await this.fileSystem.createFolder(this.dataPath),await this.fileSystem.fileExists(`${this.dataPath}/${gC}`)?this.fileSystem.readTextFromFile(`${this.dataPath}/${gC}`).then(t=>Zs(dr(t))):[]}async saveFocuses(t){return await this.fileSystem.fileExists(this.dataPath)||await this.fileSystem.createFolder(this.dataPath),this.fileSystem.writeTextToFile(`${this.dataPath}/${gC}`,JSON.stringify(t))}async readTemplate(t){let r=`${this.dataPath}/${mC}/${t}`;if(await this.fileSystem.fileExists(r))return this.fileSystem.readFileFragments({path:`${r}/${this.spaceManager.superstate.settings.spaceSubFolder}/views.mdb`,name:"views",filename:"views.mdb",parent:r,isFolder:!1,extension:"mdb"},"mdbTables")}async readAllKits(){let t=(await this.childrenForPath(`${this.dataPath}/${hC}`)).map(n=>n.split("/").pop());return Promise.all(t.map(async n=>{let i=await this.readKitFrames(n);return{id:n,name:n,colors:{},frames:Object.values(i??{})}}))}async readAllTemplates(){let t=(await this.childrenForPath(`${this.dataPath}/${mC}`)).map(n=>n.split("/").pop()),r={};for(let n of t){let i=await this.readTemplate(n);i&&(r[n]=i)}return r}async readKitFrames(t){return this.fileSystem.readFileFragments({path:`${this.dataPath}/${hC}/${t}/kit.mdb`,name:"kit",filename:"kit.mdb",parent:`${this.dataPath}/${hC}/${t}`,isFolder:!1,extension:"mdb"},"mdbTables")}async saveFrameKit(t,r){let n={path:`${this.dataPath}/${hC}/${r}/kit.mdb`,name:"kit",filename:"kit.mdb",parent:`${this.dataPath}/${hC}/${r}`,isFolder:!1,extension:"mdb"};await this.fileSystem.saveFileFragment(n,"schema",t.schema.id,()=>t.schema),this.fileSystem.saveFileFragment(n,"mdbFrame",t.schema.id,()=>t)}async saveSpaceTemplate(t,r){let n=r;if(await this.fileSystem.fileExists(`${this.dataPath}/${mC}`)){let i=await this.childrenForPath(`${this.dataPath}/${mC}/${r}`);n=Mi(n,i)}await this.fileSystem.newFile(`${this.dataPath}/${mC}/${n}/${this.spaceManager.superstate.settings.spaceSubFolder}`,"view","mdb",t)}async onMetadataChange(t){if(!t.path)return;if(t.path.endsWith(".json")){let n=t.path.split("/").slice(0,-2).join("/");this.spaceManager.onPathPropertyChanged(n);return}let r=this.spaceManager.superstate.pathsIndex.get(t.path);if(r?.metadata.spacePath?.length>0){this.spaceManager.onPathPropertyChanged(r?.metadata.spacePath);return}this.spaceManager.onPathPropertyChanged(t.path)}uriByPath(t){return this.spaceManager.uriByString(t)}allPaths(t){return[...this.fileSystem.allFiles().filter(r=>t?t.some(n=>n=="folder"?r.isFolder:r.extension==n):!0).map(r=>r.path).filter(r=>!RH(this.spaceManager.superstate.settings,r))]}async pathExists(t){return this.fileSystem.fileExists(t)}async createItemAtPath(t,r,n,i){let a=await this.getPathInfo(t);if(!a)await this.fileSystem.createFolder(t);else if(!a?.isFolder){let o=await this.fileSystem.getFile(t);return o?this.fileSystem.newFileFragment(o,r,n,i)?.then(s=>o.path):null}return this.fileSystem.newFile(t,n,r,i).then(o=>o?.path)}async renamePath(t,r){let n=this.uriByPath(t),i=this.uriByPath(r),a=await this.fileSystem.getFile(n.path);if(n.refStr){let o=await this.fileSystem.getFileCacheTypeByRefString(a,n.refStr);return await this.fileSystem.saveFileFragment(a,o,n.refStr,()=>i.refStr),r}return await this.fileSystem.renameFile(t,r)}async deletePath(t){let r=this.uriByPath(t);if(r.refStr){let n=await this.fileSystem.getFile(r.path),i=await this.fileSystem.getFileCacheTypeByRefString(n,r.refStr);return this.fileSystem.deleteFileFragment(n,i,r.refStr)}return this.fileSystem.deleteFile(t)}async getPathInfo(t){let r=this.uriByPath(t),n=await this.fileSystem.getFile(r.path);if(r.refStr){let i=this.fileSystem.getFileCacheTypeByRefString(n,r.refStr)}return n}keysForCacheType(t){return this.fileSystem.keysForCacheType(t)}async readPathCache(t){let r=this.uriByPath(t);if(r.scheme=="spaces"){if(r.authority.charAt(0)=="$"){let n=Object.keys(cm).find(i=>i==r.authority.slice(1));if(n)return{file:null,metadata:null,label:{name:cm[n].name,sticker:cm[n].icon,color:""},readOnly:!1,type:"space",parent:"",tags:[]}}if(r.authority.charAt(0)=="#")return{file:null,metadata:null,label:{name:r.authority,sticker:"",color:""},type:"space",parent:"",tags:[],readOnly:!1}}return t=="/"?{file:{name:this.spaceManager.superstate.settings.systemName,path:"/",isFolder:!0},metadata:{},label:{name:this.spaceManager.superstate.settings.systemName,sticker:"",color:""},type:"space",subtype:"folder",parent:"",tags:[],readOnly:!1}:this.fileSystem.getFileCache(t)}async readPath(t){let r=this.uriByPath(t),n=await this.fileSystem.getFile(r.path);if(r.refStr){let i=this.fileSystem.getFileCacheTypeByRefString(n,r.refStr);this.fileSystem.getFileContent(n,i,r.refStr)}return this.fileSystem.readTextFromFile(t)}async copyPath(t,r,n){let i=this.uriByPath(t),a=await this.fileSystem.getFile(i.path);return this.fileSystem.copyFile(a.path,r,n)}async writeToPath(t,r,n){let i=this.uriByPath(t),a=await this.fileSystem.getFile(i.path);if(i.refStr){let o=this.fileSystem.getFileCacheTypeByRefString(a,i.refStr);this.fileSystem.saveFileFragment(a,o,i.refStr,()=>r)}return n?this.fileSystem.writeBinaryToFile(t,r):this.fileSystem.writeTextToFile(t,r)}async childrenForPath(t,r){return await this.fileSystem.fileExists(t)?this.fileSystem.childrenForFolder(t,r):[]}parentPathForPath(t){return this.fileSystem.parentPathForPath(t)}async readFrame(t,r){let n=await this.fileSystem.getFile(this.spaceInfoForPath(t).framePath);if(!n){let i=this.defaultFrame(t);if(Object.keys(i).some(a=>a==r))return i[r]}return this.fileSystem.readFileFragments(n,"mdbTable",r)}async readAllFrames(t){let r=await this.fileSystem.getFile(this.spaceInfoForPath(t).framePath);return r?this.fileSystem.readFileFragments(r,"mdbTables"):this.defaultFrame(t)}async readTable(t,r){let n=this.spaceInfoForPath(t),i=await this.fileSystem.getFile(n.dbPath);if(!i&&r==um.id){let o=px(this.spaceManager.superstate,n),s=dC(o.cols),l=o.rows.map(u=>Vm(this.spaceManager.superstate.formulaContext,this.spaceManager.superstate.pathsIndex,u,o.cols,this.spaceManager.superstate.pathsIndex.get(t),s));return{...o,rows:l}}let a=await this.fileSystem.readFileFragments(i,"mdbTable",r);if(a&&a.schema.id!=um.id){let o=dC(a.cols),s=a.rows.map(l=>Vm(this.spaceManager.superstate.formulaContext,this.spaceManager.superstate.pathsIndex,l,a.cols,this.spaceManager.superstate.pathsIndex.get(t),o));return{...a,rows:s}}else if(!a&&r==um.id){let o=px(this.spaceManager.superstate,n),s=dC(o.cols),l=o.rows.map(u=>Vm(this.spaceManager.superstate.formulaContext,this.spaceManager.superstate.pathsIndex,u,o.cols,this.spaceManager.superstate.pathsIndex.get(t),s));return{...o,rows:l}}return a}async spaceInitiated(t){return!0}async contextInitiated(t){let r=this.spaceInfoForPath(t);return!!await this.fileSystem.getFile(r.dbPath)}async tablesForSpace(t){let r=this.spaceInfoForPath(t),n=await this.fileSystem.getFile(r.dbPath);if(!n)return Gh.rows;let i=await this.fileSystem.readFileFragments(n,"schemas",null);return i.length==0?Gh.rows:i}defaultDBTablesForContext(t){let r=px(this.spaceManager.superstate,t),n=P$(t);return{...gJ(t),m_fields:{uniques:n.uniques,cols:n.cols,rows:[...n.rows??[],...r.cols]},[r.schema.id]:{uniques:r.cols.filter(a=>a.unique=="true").map(a=>a.name),cols:r.cols.map(a=>a.name),rows:r.rows}}}defaultFrame(t){return t.startsWith(Fg)&&t==Fg+"overview"?Voe:this.spaceManager.superstate.settings.defaultSpaceTemplate.length>0&&this.spaceManager.superstate.templateCache.has(this.spaceManager.superstate.settings.defaultSpaceTemplate)?this.spaceManager.superstate.templateCache.get(this.spaceManager.superstate.settings.defaultSpaceTemplate):this.spaceManager.superstate.settings.enableFolderNote?Goe:Hoe}async createDefaultTable(t){let r=this.spaceInfoForPath(t),n=this.spaceInfoForPath(t).dbPath,i=n.split(".").pop(),a=n.split("/").slice(0,-1).join("/"),o=n.split("/").pop().split(".")[0];return this.fileSystem.newFile(a,o,i,this.defaultDBTablesForContext(r))}async createDefaultFrames(t){let r=this.defaultFrame(t),n={...l6(r),m_schema:mJ},i=this.spaceInfoForPath(t).framePath,a=i.split(".").pop(),o=i.split("/").slice(0,-1).join("/"),s=i.split("/").pop().split(".")[0];return this.fileSystem.newFile(o,s,a,n)}async createTable(t,r){let n=await this.fileSystem.getFile(this.spaceInfoForPath(t).dbPath);return n||(n=await this.createDefaultTable(t)),this.fileSystem.newFileFragment(n,"schema",r.id,r)}async saveTableSchema(t,r,n){let i=await this.fileSystem.getFile(this.spaceInfoForPath(t).dbPath);return i||(i=await this.createDefaultTable(t)),this.fileSystem.saveFileFragment(i,"schema",r,n)}async saveTable(t,r,n){let i=await this.fileSystem.getFile(this.spaceInfoForPath(t).dbPath);if(!i)if(n)i=await this.createDefaultTable(t);else return!1;return this.fileSystem.saveFileFragment(i,"mdbTable",r.schema.id,()=>r)}async deleteTable(t,r){let n=await this.fileSystem.getFile(this.spaceInfoForPath(t).dbPath);return this.fileSystem.deleteFileFragment(n,"schema",r)}async readAllTables(t){let r=this.spaceInfoForPath(t),n=await this.fileSystem.getFile(r.dbPath);if(!n){let i=px(this.spaceManager.superstate,r);return{[i.schema.id]:i}}return this.fileSystem.readFileFragments(n,"mdbTables",null)}async framesForSpace(t){let r=await this.fileSystem.getFile(this.spaceInfoForPath(t).framePath);if(!r){let n=this.defaultFrame(t);return Object.values(n).map(i=>i.schema)}return this.fileSystem.readFileFragments(r,"schemas",null)}async createFrame(t,r){let n=await this.fileSystem.getFile(this.spaceInfoForPath(t).framePath);return n||(n=await this.createDefaultFrames(t)),this.fileSystem.newFileFragment(n,"schema",r.id,r)}async deleteFrame(t,r){let n=await this.fileSystem.getFile(this.spaceInfoForPath(t).framePath);return this.fileSystem.deleteFileFragment(n,"schema",r)}async saveFrameSchema(t,r,n){let i=await this.fileSystem.getFile(this.spaceInfoForPath(t).framePath);return i||(i=await this.createDefaultFrames(t)),this.fileSystem.saveFileFragment(i,"schema",r,n)}async saveFrame(t,r){let n=await this.fileSystem.getFile(this.spaceInfoForPath(t).framePath);return n||(n=await this.createDefaultFrames(t)),this.fileSystem.saveFileFragment(n,"mdbFrame",r.schema.id,()=>r)}async createDefaultCommands(t){let r={m_fields:{uniques:Ji.uniques,cols:Ji.cols,rows:[]},m_schema:{uniques:[],cols:["id","name","type","def","predicate","primary"],rows:[]}},n=this.spaceInfoForPath(t).commandsPath,i=n.split(".").pop(),a=n.split("/").slice(0,-1).join("/"),o=n.split("/").pop().split(".")[0];return this.fileSystem.newFile(a,o,i,r)}async commandsForSpace(t){let r=await this.fileSystem.getFile(this.spaceInfoForPath(t).commandsPath);return r?this.fileSystem.readFileFragments(r,"mdbCommands",null):[]}async runCommand(t,r,n){let i=await this.fileSystem.getFile(this.spaceInfoForPath(t).commandsPath);if(!i)return{result:null,error:"No commands file found"};let a=await this.fileSystem.readFileFragments(i,"mdbCommand",r);if(!a)return{result:null,error:"No command found"};let o,s;try{a.schema.type=="script"&&(o=C2(a.code,n)),a.schema.type=="formula"&&(o=md(this.spaceManager.superstate.formulaContext,this.spaceManager.superstate.pathsIndex,a.code,a.fields.reduce((l,u)=>({...l,[u.name]:u}),{}),n,this.spaceManager.superstate.pathsIndex.get(t)))}catch(l){s=l}return{result:o,error:s}}async createCommand(t,r){let n=await this.fileSystem.getFile(this.spaceInfoForPath(t).commandsPath);return n||(n=await this.createDefaultCommands(t)),this.fileSystem.newFileFragment(n,"schema",r.id,r)}async readSystemCommands(){let t=(await this.childrenForPath(`${this.dataPath}/${AC}`,"folder")).map(n=>n.split("/").pop());return Promise.all(t.map(async n=>{let i=await this.readLibraryCommands(n);return{name:n,commands:Object.values(i??{})}}))}async readLibraryCommands(t){return this.fileSystem.readFileFragments({path:`${this.dataPath}/${AC}/${t}/commands.mdb`,name:"commands",filename:"commands.mdb",parent:`${this.dataPath}/${AC}/${t}`,isFolder:!1,extension:"mdb"},"mdbCommands")}async saveSystemCommand(t,r){let n={path:`${this.dataPath}/${AC}/${t}/commands.mdb`,name:"commands",filename:"commands.mdb",parent:`${this.dataPath}/${AC}/${t}`,isFolder:!1,extension:"mdb"};if(r)await this.fileSystem.saveFileFragment(n,"schema",r.schema.id,()=>r.schema),await this.fileSystem.saveFileFragment(n,"mdbCommand",r.schema.id,()=>r);else{let i={m_fields:{uniques:Ji.uniques,cols:Ji.cols,rows:[]},m_schema:{uniques:[],cols:["id","name","type","def","predicate","primary"],rows:[]}},a=n.path,o=a.split(".").pop(),s=a.split("/").slice(0,-1).join("/"),l=a.split("/").pop().split(".")[0];await this.fileSystem.newFile(s,l,o,i)}}async deleteCommand(t,r){let n=await this.fileSystem.getFile(this.spaceInfoForPath(t).commandsPath);return this.fileSystem.deleteFileFragment(n,"mdbCommand",r)}async saveCommand(t,r,n){let i=await this.fileSystem.getFile(this.spaceInfoForPath(t).commandsPath);return i||(i=await this.createDefaultCommands(t)),this.fileSystem.saveFileFragment(i,"mdbCommand",r,n)}async contextForSpace(t){let r=await this.fileSystem.getFile(this.spaceInfoForPath(t).dbPath);return r?this.fileSystem.readFileFragments(r,"mdbTable",Nr):px(this.spaceManager.superstate,this.spaceInfoForPath(t))}async addSpaceProperty(t,r){let n=await this.fileSystem.getFile(this.spaceInfoForPath(t)?.dbPath);return n||await this.createDefaultTable(t),this.fileSystem.newFileFragment(n,"field",r.name,r)}async deleteSpaceProperty(t,r){let n=await this.fileSystem.getFile(this.spaceInfoForPath(t).dbPath);return this.fileSystem.deleteFileFragment(n,"field",r)}async saveSpaceProperty(t,r,n){let i=await this.fileSystem.getFile(this.spaceInfoForPath(t).dbPath);return i||await this.createDefaultTable(t),this.fileSystem.saveFileFragment(i,"field",n,a=>({...a,...r}))}async addProperty(t,r){let n=await this.fileSystem.getFile(t);this.fileSystem.newFileFragment(n,"property",r.name,r)}async saveProperties(t,r){let n=await this.fileSystem.getFile(t);return this.fileSystem.saveFileFragment(n,"property",null,i=>({...i,...r}))}async readLabel(t){let r=this.fileSystem.getFileCache(t)?.label;if(!r){let n=await this.fileSystem.getFile(t);return n?this.fileSystem.readFileFragments(n,"label",null):{}}return r}async saveLabel(t,r,n){if(this.spaceManager.superstate.spacesIndex.has(t)){let a=this.spaceInfoForPath(t),o=await this.fileSystem.getFile(a.defPath),s=await this.fileSystem.getFile(a.notePath);if(this.spaceManager.superstate.settings.enableFolderNote)s||(s=await this.fileSystem.newFile(a.folderPath,a.name,"md"));else{if(!o){let l=this.spaceInfoForPath(t).defPath,u=l.split(".").pop(),c=l.split("/").slice(0,-1).join("/"),f=l.split("/").pop().split(".")[0];o=await this.fileSystem.newFile(c,f,u)}s=o}await this.fileSystem.saveFileLabel(s,r,n);return}let i=await this.fileSystem.getFile(t);this.fileSystem.saveFileLabel(i,r,n)}async renameProperty(t,r,n){let i=await this.fileSystem.getFile(t);this.fileSystem.saveFileFragment(i,"property",null,a=>{let{[r]:o,...s}=a;return o?{...s,[n]:o}:a})}async readProperties(t){let r=await this.fileSystem.getFile(t);return this.fileSystem.readFileFragments(r,"property",null)}async deleteProperty(t,r){let n=await this.fileSystem.getFile(t);this.fileSystem.deleteFileFragment(n,"property",r)}allSpaces(){let t=Object.keys(cm).map(o=>this.spaceManager.spaceInfoForPath(`spaces://$${o}`)),r=()=>this.readTags().map(o=>n1(this.spaceManager,Jj(o)))??[],n=()=>this.allPaths(["folder"]).filter(s=>!RH(this.spaceManager.superstate.settings,s)).map(s=>IE(this.spaceManager,s)),i=this.spaceManager.superstate.settings.enableDefaultSpaces?r():[],a=n();return[...t,...i,...a]}readTags(){return this.fileSystem.allTags()}spaceInfoForPath(t){return kJ(this.spaceManager,t)}allCaches(){return this.fileSystem.allCaches()}async spaceDefForSpace(t){let r=this.spaceInfoForPath(t);if(!r)return null;let n=r.defPath?await this.fileSystem.readTextFromFile(r.defPath):null;if(!n){let a=await this.fileSystem.getFile(r.notePath),s=(a?this.fileSystem.getFileCache(a.path)?.frontmatter:null)??{};return B6(s,this.spaceManager.superstate.settings)}let i=dr(n)??{};return B6(i,this.spaceManager.superstate.settings)}async createSpace(t,r,n){let i=this.spaceInfoForPath(r),a=i.folderPath=="/"?t:i.folderPath+"/"+t;if(await this.fileSystem.createFolder(a),Object.keys(n??{}).length>0)return this.saveSpace(a,()=>n)}async saveSpace(t,r,n){let i=r(await this.spaceDefForSpace(t))??{},a=this.spaceInfoForPath(t),o=await this.fileSystem.getFile(a.defPath);if(!o){let l=this.spaceInfoForPath(t).defPath,u=l.split(".").pop(),c=l.split("/").slice(0,-1).join("/"),f=l.split("/").pop().split(".")[0];o=await this.fileSystem.newFile(c,f,u)}let s=await this.fileSystem.getFile(a.notePath);this.spaceManager.superstate.settings.enableFolderNote?s||(s=await this.fileSystem.newFile(a.folderPath,Lc(a.notePath),"md")):s=o,n&&await this.fileSystem.saveFileFragment(s,"property",null,l=>({...l,...n??{}})),await this.fileSystem.saveFileFragment(o,"definition",null,l=>({[qE]:i.filters,[BE]:i.contexts,[LE]:i.links,[zE]:i.sort,[RE]:i.template,[$E]:i.templateName,[eO]:i.recursive}))}renameSpace(t,r){let n=this.spaceInfoForPath(t),i=this.spaceInfoForPath(r);return this.fileSystem.renameFile(n.folderPath,i.folderPath).then(a=>(this.spaceManager.superstate.settings.enableFolderNote&&this.fileSystem.renameFile(Rf(n.notePath,i.path),i.notePath),a))}deleteSpace(t){let r=this.spaceInfoForPath(t),n=n1(this.spaceManager,r.name);this.fileSystem.deleteFile(n.folderPath)}childrenForSpace(t){return this.fileSystem.allFiles().filter(r=>r.parent==t).map(r=>r.path)}addTag(t,r){this.fileSystem.addTagToFile(t,r)}renameTag(t,r,n){this.fileSystem.renameTagForFile(t,r,n)}deleteTag(t,r){this.fileSystem.removeTagFromFile(t,r)}pathsForTag(t){return this.fileSystem.filesForTag(t)}resolvePath(t,r){return this.fileSystem.resolvePath(t,r)}};var pf=ge(Te());function _A(e){return Array.isArray?Array.isArray(e):r2e(e)==="[object Array]"}var lYe=1/0;function uYe(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-lYe?"-0":t}function cYe(e){return e==null?"":uYe(e)}function Gm(e){return typeof e=="string"}function e2e(e){return typeof e=="number"}function fYe(e){return e===!0||e===!1||dYe(e)&&r2e(e)=="[object Boolean]"}function t2e(e){return typeof e=="object"}function dYe(e){return t2e(e)&&e!==null}function df(e){return e!=null}function $H(e){return!e.trim().length}function r2e(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var pYe="Incorrect 'index' type",mYe=e=>`Invalid value for key ${e}`,hYe=e=>`Pattern length exceeds max of ${e}.`,AYe=e=>`Missing ${e} property in key`,gYe=e=>`Property 'weight' in key '${e}' must be a positive integer`,Ywe=Object.prototype.hasOwnProperty,qH=class{constructor(t){this._keys=[],this._keyMap={};let r=0;t.forEach(n=>{let i=n2e(n);this._keys.push(i),this._keyMap[i.id]=i,r+=i.weight}),this._keys.forEach(n=>{n.weight/=r})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function n2e(e){let t=null,r=null,n=null,i=1,a=null;if(Gm(e)||_A(e))n=e,t=Zwe(e),r=LH(e);else{if(!Ywe.call(e,"name"))throw new Error(AYe("name"));let o=e.name;if(n=o,Ywe.call(e,"weight")&&(i=e.weight,i<=0))throw new Error(gYe(o));t=Zwe(o),r=LH(o),a=e.getFn}return{path:t,id:r,weight:i,src:n,getFn:a}}function Zwe(e){return _A(e)?e:e.split(".")}function LH(e){return _A(e)?e.join("."):e}function vYe(e,t){let r=[],n=!1,i=(a,o,s)=>{if(!!df(a))if(!o[s])r.push(a);else{let l=o[s],u=a[l];if(!df(u))return;if(s===o.length-1&&(Gm(u)||e2e(u)||fYe(u)))r.push(cYe(u));else if(_A(u)){n=!0;for(let c=0,f=u.length;ce.score===t.score?e.idx{this._keysMap[r.id]=n})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Gm(this.docs[0])?this.docs.forEach((t,r)=>{this._addString(t,r)}):this.docs.forEach((t,r)=>{this._addObject(t,r)}),this.norm.clear())}add(t){let r=this.size();Gm(t)?this._addString(t,r):this._addObject(t,r)}removeAt(t){this.records.splice(t,1);for(let r=t,n=this.size();r{let o=i.getFn?i.getFn(t):this.getFn(t,i.path);if(!!df(o)){if(_A(o)){let s=[],l=[{nestedArrIndex:-1,value:o}];for(;l.length;){let{nestedArrIndex:u,value:c}=l.pop();if(!!df(c))if(Gm(c)&&!$H(c)){let f={v:c,i:u,n:this.norm.get(c)};s.push(f)}else _A(c)&&c.forEach((f,d)=>{l.push({nestedArrIndex:d,value:f})})}n.$[a]=s}else if(Gm(o)&&!$H(o)){let s={v:o,n:this.norm.get(o)};n.$[a]=s}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}};function i2e(e,t,{getFn:r=$r.getFn,fieldNormWeight:n=$r.fieldNormWeight}={}){let i=new yC({getFn:r,fieldNormWeight:n});return i.setKeys(e.map(n2e)),i.setSources(t),i.create(),i}function kYe(e,{getFn:t=$r.getFn,fieldNormWeight:r=$r.fieldNormWeight}={}){let{keys:n,records:i}=e,a=new yC({getFn:t,fieldNormWeight:r});return a.setKeys(n),a.setIndexRecords(i),a}function v5(e,{errors:t=0,currentLocation:r=0,expectedLocation:n=0,distance:i=$r.distance,ignoreLocation:a=$r.ignoreLocation}={}){let o=t/e.length;if(a)return o;let s=Math.abs(n-r);return i?o+s/i:s?1:o}function CYe(e=[],t=$r.minMatchCharLength){let r=[],n=-1,i=-1,a=0;for(let o=e.length;a=t&&r.push([n,i]),n=-1)}return e[a-1]&&a-n>=t&&r.push([n,a-1]),r}var yy=32;function DYe(e,t,r,{location:n=$r.location,distance:i=$r.distance,threshold:a=$r.threshold,findAllMatches:o=$r.findAllMatches,minMatchCharLength:s=$r.minMatchCharLength,includeMatches:l=$r.includeMatches,ignoreLocation:u=$r.ignoreLocation}={}){if(t.length>yy)throw new Error(hYe(yy));let c=t.length,f=e.length,d=Math.max(0,Math.min(n,f)),p=a,h=d,m=s>1||l,g=m?Array(f):[],A;for(;(A=e.indexOf(t,h))>-1;){let k=v5(t,{currentLocation:A,expectedLocation:d,distance:i,ignoreLocation:u});if(p=Math.min(k,p),h=A+c,m){let M=0;for(;M=C;R-=1){let q=R-1,B=r[e.charAt(q)];if(m&&(g[q]=+!!B),D[R]=(D[R+1]<<1|1)&B,k&&(D[R]|=(b[R+1]|b[R])<<1|1|b[R+1]),D[R]&w&&(v=v5(t,{errors:k,currentLocation:q,expectedLocation:d,distance:i,ignoreLocation:u}),v<=p)){if(p=v,h=q,h<=d)break;C=Math.max(1,2*d-h)}}if(v5(t,{errors:k+1,currentLocation:d,expectedLocation:d,distance:i,ignoreLocation:u})>p)break;b=D}let S={isMatch:h>=0,score:Math.max(.001,v)};if(m){let k=CYe(g,s);k.length?l&&(S.indices=k):S.isMatch=!1}return S}function jYe(e){let t={};for(let r=0,n=e.length;r{this.chunks.push({pattern:d,alphabet:jYe(d),startIndex:p})},f=this.pattern.length;if(f>yy){let d=0,p=f%yy,h=f-p;for(;d{let{isMatch:A,score:b,indices:v}=DYe(t,h,m,{location:i+g,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:l,includeMatches:n,ignoreLocation:u});A&&(d=!0),f+=b,A&&v&&(c=[...c,...v])});let p={isMatch:d,score:d?f/this.chunks.length:1};return d&&n&&(p.indices=c),p}},Hm=class{constructor(t){this.pattern=t}static isMultiMatch(t){return Xwe(t,this.multiRegex)}static isSingleMatch(t){return Xwe(t,this.singleRegex)}search(){}};function Xwe(e,t){let r=e.match(t);return r?r[1]:null}var zH=class extends Hm{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){let r=t===this.pattern;return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}},UH=class extends Hm{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){let n=t.indexOf(this.pattern)===-1;return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}},WH=class extends Hm{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){let r=t.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}},VH=class extends Hm{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){let r=!t.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,t.length-1]}}},GH=class extends Hm{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){let r=t.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[t.length-this.pattern.length,t.length-1]}}},HH=class extends Hm{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){let r=!t.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,t.length-1]}}},b5=class extends Hm{constructor(t,{location:r=$r.location,threshold:n=$r.threshold,distance:i=$r.distance,includeMatches:a=$r.includeMatches,findAllMatches:o=$r.findAllMatches,minMatchCharLength:s=$r.minMatchCharLength,isCaseSensitive:l=$r.isCaseSensitive,ignoreLocation:u=$r.ignoreLocation}={}){super(t),this._bitapSearch=new y5(t,{location:r,threshold:n,distance:i,includeMatches:a,findAllMatches:o,minMatchCharLength:s,isCaseSensitive:l,ignoreLocation:u})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}},x5=class extends Hm{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let r=0,n,i=[],a=this.pattern.length;for(;(n=t.indexOf(this.pattern,r))>-1;)r=n+a,i.push([n,r-1]);let o=!!i.length;return{isMatch:o,score:o?0:1,indices:i}}},QH=[zH,x5,WH,VH,HH,GH,UH,b5],Kwe=QH.length,OYe=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,MYe="|";function NYe(e,t={}){return e.split(MYe).map(r=>{let n=r.trim().split(OYe).filter(a=>a&&!!a.trim()),i=[];for(let a=0,o=n.length;a!!(e[w5.AND]||e[w5.OR]),_Ye=e=>!!e[KH.PATH],PYe=e=>!_A(e)&&t2e(e)&&!JH(e),Jwe=e=>({[w5.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function a2e(e,t,{auto:r=!0}={}){let n=i=>{let a=Object.keys(i),o=_Ye(i);if(!o&&a.length>1&&!JH(i))return n(Jwe(i));if(PYe(i)){let l=o?i[KH.PATH]:a[0],u=o?i[KH.PATTERN]:i[l];if(!Gm(u))throw new Error(mYe(l));let c={keyId:LH(l),pattern:u};return r&&(c.searcher=XH(u,t)),c}let s={children:[],operator:a[0]};return a.forEach(l=>{let u=i[l];_A(u)&&u.forEach(c=>{s.children.push(n(c))})}),s};return JH(e)||(e=Jwe(e)),n(e)}function IYe(e,{ignoreFieldNorm:t=$r.ignoreFieldNorm}){e.forEach(r=>{let n=1;r.matches.forEach(({key:i,norm:a,score:o})=>{let s=i?i.weight:null;n*=Math.pow(o===0&&s?Number.EPSILON:o,(s||1)*(t?1:a))}),r.score=n})}function BYe(e,t){let r=e.matches;t.matches=[],df(r)&&r.forEach(n=>{if(!df(n.indices)||!n.indices.length)return;let{indices:i,value:a}=n,o={indices:i,value:a};n.key&&(o.key=n.key.src),n.idx>-1&&(o.refIndex=n.idx),t.matches.push(o)})}function RYe(e,t){t.score=e.score}function $Ye(e,t,{includeMatches:r=$r.includeMatches,includeScore:n=$r.includeScore}={}){let i=[];return r&&i.push(BYe),n&&i.push(RYe),e.map(a=>{let{idx:o}=a,s={item:t[o],refIndex:o};return i.length&&i.forEach(l=>{l(a,s)}),s})}var yc=class{constructor(t,r={},n){this.options={...$r,...r},this.options.useExtendedSearch,this._keyStore=new qH(this.options.keys),this.setCollection(t,n)}setCollection(t,r){if(this._docs=t,r&&!(r instanceof yC))throw new Error(pYe);this._myIndex=r||i2e(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){!df(t)||(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){let r=[];for(let n=0,i=this._docs.length;n-1&&(l=l.slice(0,r)),$Ye(l,this._docs,{includeMatches:n,includeScore:i})}_searchStringList(t){let r=XH(t,this.options),{records:n}=this._myIndex,i=[];return n.forEach(({v:a,i:o,n:s})=>{if(!df(a))return;let{isMatch:l,score:u,indices:c}=r.searchIn(a);l&&i.push({item:a,idx:o,matches:[{score:u,value:a,norm:s,indices:c}]})}),i}_searchLogical(t){let r=a2e(t,this.options),n=(s,l,u)=>{if(!s.children){let{keyId:f,searcher:d}=s,p=this._findMatches({key:this._keyStore.get(f),value:this._myIndex.getValueForItemAtKeyId(l,f),searcher:d});return p&&p.length?[{idx:u,item:l,matches:p}]:[]}let c=[];for(let f=0,d=s.children.length;f{if(df(s)){let u=n(r,s,l);u.length&&(a[l]||(a[l]={idx:l,item:s,matches:[]},o.push(a[l])),u.forEach(({matches:c})=>{a[l].matches.push(...c)}))}}),o}_searchObjectList(t){let r=XH(t,this.options),{keys:n,records:i}=this._myIndex,a=[];return i.forEach(({$:o,i:s})=>{if(!df(o))return;let l=[];n.forEach((u,c)=>{l.push(...this._findMatches({key:u,value:o[c],searcher:r}))}),l.length&&a.push({idx:s,item:o,matches:l})}),a}_findMatches({key:t,value:r,searcher:n}){if(!df(r))return[];let i=[];if(_A(r))r.forEach(({v:a,i:o,n:s})=>{if(!df(a))return;let{isMatch:l,score:u,indices:c}=n.searchIn(a);l&&i.push({score:u,key:t,value:a,idx:o,norm:s,indices:c})});else{let{v:a,n:o}=r,{isMatch:s,score:l,indices:u}=n.searchIn(a);s&&i.push({score:l,key:t,value:a,norm:o,indices:u})}return i}};yc.version="7.0.0";yc.createIndex=i2e;yc.parseIndex=kYe;yc.config=$r;yc.parseQuery=a2e;FYe(YH);var vi=ge(Te());var cl=ge(Te()),qYe={position:"absolute",width:0,height:0,visibility:"hidden",overflow:"scroll",whiteSpace:"pre"},LYe=["fontSize","fontFamily","fontWeight","fontStyle","letterSpacing","textTransform"],o2e=(0,cl.forwardRef)((e,t)=>{let{classNames:r,inputAttributes:n,inputEventHandlers:i,index:a}=e,o=(0,cl.useRef)(null),[s,l]=(0,cl.useState)(null),[u,c]=(0,cl.useState)("");(0,cl.useEffect)(()=>{f(),d(),setTimeout(()=>{t.current?.focus()},50)},[]),(0,cl.useEffect)(()=>{u!==e.placeholderText&&(c(e.placeholderText),d())},[e.query,e.placeholderText]);let f=()=>{let p=window.getComputedStyle(t.current);LYe.forEach(h=>{o.current.style[h]=p[h]})},d=()=>{let p=Math.ceil(o.current.scrollWidth)+2;p!==s&&l(p)};return cl.default.createElement("div",{className:r.search},cl.default.createElement("div",{className:r.searchWrapper},cl.default.createElement("div",{className:"mk-icon-xsmall",dangerouslySetInnerHTML:{__html:e.ui.getSticker("ui//search")}}),cl.default.createElement("input",{...n,...i,ref:t,value:e.query,placeholder:u,className:r.searchInput,role:"combobox",style:{width:"100%"},onClick:p=>p.stopPropagation()}),cl.default.createElement("div",{ref:o,style:qYe},e.query||u),cl.default.createElement("span",null)))}),s2e=o2e;o2e.displayName="SelectMenuSearch";var eQ=ge(Te()),zYe=e=>eQ.default.createElement("button",{type:"button",className:e.classNames.selectedTag,onClick:e.onDelete},eQ.default.createElement("span",{className:e.classNames.selectedTagName},e.tag.name)),l2e=zYe;var u2e=ge(Te()),c2e=e=>u2e.default.createElement("div",{className:"mk-sticker",dangerouslySetInnerHTML:{__html:e.ui.getSticker(e.sticker)}});var ui=ge(Te());function f2e(e,t){let r=j2(t);return e?.replace(r,"$&")}var UYe=e=>{let t=(0,ui.useRef)(null);return(0,ui.useEffect)(()=>{e.active&&t?.current?.scrollIntoViewIfNeeded()},[e.active]),ui.default.createElement(ui.default.Fragment,null,e.item.icon&&ui.default.createElement(c2e,{ui:e.ui,sticker:e.item.icon}),ui.default.createElement("div",{ref:t,className:"mk-menu-options-inner"},e.item.onToggle&&ui.default.createElement("div",null,"Toggle"),ui.default.createElement("span",{style:e.item.color?.length>0?{background:e.item.color,padding:"2px 4px",borderRadius:"4px",color:e.item.color=="var(--mk-color-none)"?"inherit":"var(--mk-color-white)"}:{},dangerouslySetInnerHTML:{__html:f2e(e.item.name,e.query)}}),e.item.description&&ui.default.createElement("span",{"aria-label":e.item.description,className:"mk-menu-options-description",dangerouslySetInnerHTML:{__html:f2e(e.item.description,e.query)}})),e.item.type==1&&ui.default.createElement("span",null,e.item.value),e.item.type==3&&e.item.value&&ui.default.createElement("div",{className:"mk-icon-small",dangerouslySetInnerHTML:{__html:e.ui.getSticker("ui//check")}}),e.item.onMoreOptions||e.onMoreOption&&e.item.removeable?ui.default.createElement("div",{onClick:r=>{r.stopPropagation(),r.preventDefault(),e.item.onMoreOptions?e.item.onMoreOptions(r):e.onMoreOption(r,e.item.value)},className:"mk-icon-small",dangerouslySetInnerHTML:{__html:e.ui.getSticker("ui//options")}}):null,e.item.removeable&&e.onDeleteOption&&ui.default.createElement("div",{onClick:r=>{r.stopPropagation(),r.preventDefault(),e.onDeleteOption(e.item.value)},className:"mk-icon-small",dangerouslySetInnerHTML:{__html:e.ui.getSticker("ui//close")}}),e.item.type==6&&ui.default.createElement("div",{className:"mk-icon-small",dangerouslySetInnerHTML:{__html:e.ui.getSticker("ui//chevron-right")}}))},WYe=e=>{let[t,r]=(0,ui.useState)(e.value);return ui.default.createElement("input",{type:"text",value:t,onKeyDown:n=>{n.key=="Enter"&&e.setValue(t)},onMouseDown:n=>n.stopPropagation(),onClick:n=>n.stopPropagation(),onFocus:n=>{n.stopPropagation()},onChange:n=>r(n.target.value),onBlur:n=>e.setValue(t)})},VYe=e=>{let t=e.options.map((r,n)=>{let i=`${e.id}-${n}`,a=r.type==-1?"mk-menu-separator":r.type==2?"mk-menu-input":r.type==5?"mk-menu-custom":`mk-menu-option ${e.index===n&&e.classNames.suggestionActive} ${r.disabled&&e.classNames.suggestionDisabled}`;return ui.default.createElement("div",{ref:o=>{e.refs?.current&&(e.refs.current[n]=o)},onMouseDown:o=>{e.isDisclosureMenu||o.stopPropagation(),o.preventDefault()},onClick:o=>{if(r.onSubmenu&&e.openSubmenu){let s=e.refs?.current[n].getBoundingClientRect();e.openSubmenu(r.onSubmenu(s,()=>{e.onHide&&e.onHide(),e.hide()}))}else r.onClick?(r.onClick(o),r.type!=6&&r.type!=1&&e.hide()):(r.type==null||r.type==0||r.type==1)&&(e.selectOption(r,{ctrlKey:o.ctrlKey,metaKey:o.metaKey,altKey:o.altKey,shiftKey:o.shiftKey,doubleClick:o.detail==2}),e.isDisclosureMenu||o.stopPropagation())},id:i,key:i,className:a},r.type==-1?ui.default.createElement(ui.default.Fragment,null):r.type==-2?ui.default.createElement("div",{className:"mk-menu-options-section"},r.name):r.type==2?ui.default.createElement(WYe,{value:r.value,setValue:r.onValueChange}):r.type==5?ui.default.createElement(r.fragment,{hide:e.hide,onSubmenu:o=>{if(e.openSubmenu){let s=e.refs?.current[n].getBoundingClientRect();e.openSubmenu(o(s,()=>{e.onHide&&e.onHide(),e.hide()}))}}}):ui.default.createElement(UYe,{ui:e.ui,item:r,query:e.query,active:n==e.index,onMoreOption:e.moreOption,onDeleteOption:e.deleteOption}))});return ui.default.createElement("div",{className:"mk-menu-suggestions"},t,e.query&&e.allowNew&&ui.default.createElement("div",{className:"mk-menu-option",onMouseDown:r=>r.preventDefault(),onClick:r=>e.selectOption({name:e.query,value:e.query},{ctrlKey:r.ctrlKey,metaKey:r.metaKey,altKey:r.altKey,shiftKey:r.shiftKey})},ui.default.createElement("div",{className:"mk-sticker",dangerouslySetInnerHTML:{__html:e.ui.getSticker("ui//plus")}}),ui.default.createElement("div",{className:"mk-menu-options-inner"},e.addKeyword??"Add"," ",e.query)))},S5=VYe;function d2e(e,t){let r=e.querySelectorAll("a,button,input"),n=Array.prototype.findIndex.call(r,a=>a===t),i=r[n-1]||r[n+1];i&&i.focus()}var by={ENTER:"Enter",TAB:"Tab",BACKSPACE:"Backspace",UP_ARROW:"ArrowUp",UP_ARROW_COMPAT:"Up",DOWN_ARROW:"ArrowDown",DOWN_ARROW_COMPAT:"Down",LEFT_ARROW:"ArrowLeft",RIGHT_ARROW:"ArrowRight"},m2e={root:"mk-menu-container",rootFocused:"mk-focused",selected:"mk-menu-input-wrapper",selectedTagWrapper:"mk-menu-selected-tag-wrapper",selectedTag:"mk-menu-selected-tag",selectedTagName:"mk-menu-selected-tag-name",search:"mk-menu-search",searchWrapper:"mk-menu-search-container",searchInput:"mk-menu-search-input",suggestions:"mk-menu-suggestions",suggestionActive:"mk-active",suggestionDisabled:"mk-disabled"},GYe={ui:null,id:"SelectMenu",tags:[],hide:()=>null,onHide:()=>null,suggestionsOnly:!1,placeholderText:z.labels.optionItemSelectPlaceholder,noSuggestionsText:null,newTagText:null,suggestions:[],suggestionsFilter:HYe,suggestionsTransform:null,classNames:m2e,delimiters:[by.ENTER],minQueryLength:2,maxSuggestionsLength:8,inputAttributes:{}},h2e=(e,t)=>e.findIndex(r=>oxe(t).test(r.name)),p2e=(e,t,r,n,i,a)=>{if(t.length>=e.minQueryLength){let o=h2e(n,t),s=r===-1?o:r,l=s>-1?n[s]:null;i(l||{name:t,value:t},a)}};function HYe(e,t){return j2(t).test(e.name)}function QYe(e,t,r){let n,i=e.suggestions;r.length>0&&(i=e.suggestions.filter(s=>s.section==r));let a={threshold:0,ignoreLocation:!0,keys:["name","value"]},o=new yc(i,a);return n=t.length==0?i:o.search(t).map(s=>s.item),n=n.slice(0,e.maxSuggestionsLength),e.newTagText&&h2e(n,t)===-1?n.push({id:0,name:t,value:t}):e.noSuggestionsText&&n.length===0&&n.push({id:0,name:e.noSuggestionsText,value:"",disabled:!0}),n}var A2e=vi.default.forwardRef((e,t)=>{let r={...GYe,...e},[n,i]=(0,vi.useState)([]),a=(0,vi.useRef)([]),o=(0,vi.useMemo)(()=>r.showSections?[{name:"All",value:""},...r.sections??Mr(r.suggestions.map(re=>re.section)).filter(re=>re)]:[],[r.showSections,r.sections,r.suggestions]),s=(0,vi.useRef)(null),[l,u]=(0,vi.useState)(""),[c,f]=(0,vi.useState)(""),[d,p]=(0,vi.useState)(!1),[h,m]=(0,vi.useState)(0),g=(0,vi.useRef)(!1);(0,vi.useEffect)(()=>{t&&(t.current=()=>d?!0:(s?.current?.focus(),p(!0),!1))},[d]),(0,vi.useEffect)(()=>{if(c.length==0&&r.defaultSuggestions){i(r.defaultSuggestions);return}i(QYe(r,c,l))},[c,r.defaultSuggestions,l,r.suggestions]);let A=(0,vi.useRef)(null),b=re=>{if(re.type==="compositionstart"){g.current=!0;return}if(re.type==="compositionend"){g.current=!1;return}let Q=re.target.value;r.onInput&&r.onInput(Q),Q.length===c.length+1&&r.delimiters.indexOf(c.slice(-1))>-1?p2e(r,c,h,n,k,{}):Q!==c&&f(Q)},v=re=>{g.current||(r.delimiters.indexOf(re.key)>-1&&((c||h>-1)&&re.preventDefault(),p2e(r,c,h,n,k,{ctrlKey:re.ctrlKey,metaKey:re.metaKey,altKey:re.altKey,shiftKey:re.shiftKey})),re.key!="Escape"&&(re.key===by.TAB&&R(re),re.key===by.BACKSPACE&&P(),(re.key===by.UP_ARROW||re.key===by.UP_ARROW_COMPAT)&&T(re),(re.key===by.DOWN_ARROW||re.key===by.DOWN_ARROW_COMPAT)&&D(re),re.stopPropagation()))},x=()=>{p(!1),r.onBlur&&r.onBlur()},w=()=>{p(!0),r.onFocus&&r.onFocus()},S=(re,Q)=>{A.current&&d2e(A.current,Q.currentTarget),M(re)},k=(re,Q)=>{re.disabled||r.onValidate&&!r.onValidate(re)||(r.onAddition(re,Q),O())},M=re=>{r.onDelete(re)},O=()=>{f(""),m(-1)},C=()=>{m(-1)},T=re=>{re.preventDefault();let Q=n.length-1,he=h<=0?Q:h-1;n[he].disabled?m(he<=0?Q:he-1):m(he)},D=re=>{re.preventDefault();let Q=n.length-1,he=h>=Q?0:h+1;n[he].disabled?m(he>=Q?0:he+1):m(he)};function P(){c.length||M(r.tags.length-1)}function R(re){r.showSections&&(re.preventDefault(),re.stopPropagation(),u(Q=>{let he=o.findIndex(Ie=>Ie.value==Q);return re.shiftKey?he==0?Q:(r.onSelectSection&&r.onSelectSection(o[he-1].value),o[he-1].value):he==o.length-1?Q:(r.onSelectSection&&r.onSelectSection(o[he+1].value),o[he+1].value)}))}let q=()=>{s.current.focus()},B={onChange:b,onCompositionEnd:b,onCompositionStart:b};(0,vi.useEffect)(()=>(r.ui.inputManager.on("keydown",v),()=>{r.ui.inputManager.off("keydown",v)}),[n,h]);let N=d&&c.length>=r.minQueryLength,W=Object.assign({},m2e,r.classNames);r.wrapperClass&&(W.root=`${W.root} ${r.wrapperClass}`);let _=[W.root];d&&_.push(W.rootFocused);let X=(0,vi.useRef)(null),oe=re=>{X.current&&X.current.hide(!0),X.current=re};return vi.default.createElement("div",{ref:A,className:_.join(" "),style:r.suggestionsOnly?{}:{"--mk-menu-max-height":"200px"}},r.suggestionsOnly?null:vi.default.createElement("div",{className:W.selected,"aria-relevant":"additions removals","aria-live":"polite"},r.tags.length>0&&vi.default.createElement("div",{className:W.selectedTagWrapper},r.tags.map((re,Q)=>vi.default.createElement(l2e,{key:Q,tag:re,classNames:W,onDelete:he=>S(Q,he)}))),vi.default.createElement(s2e,{ui:r.ui,ref:s,query:c,index:h,id:r.id,currentSection:o.find(re=>re.value==l),classNames:W,inputAttributes:r.inputAttributes,inputEventHandlers:B,expanded:N,placeholderText:r.placeholderText})),r.showSections?vi.default.createElement("div",{className:"mk-menu-sections"},o.map((re,Q)=>vi.default.createElement("div",{key:Q,onClick:he=>{he.stopPropagation(),u(re.value)},className:`${l==re.value?"is-active":""} mk-menu-section`},re.name==""?z.labels.all:re.name))):vi.default.createElement(vi.default.Fragment,null),n.length||r.allowNew?vi.default.createElement(S5,{ui:r.ui,hide:()=>{r.hide()},addKeyword:r.addKeyword,refs:a,options:n,query:c,setIndex:m,index:h,onHide:r.onHide,id:r.id,classNames:W,expanded:N,selectOption:k,allowNew:r.allowNew,moreOption:r.onMoreOption,deleteOption:r.onDeleteOption,isDisclosureMenu:r.isDisclosure,openSubmenu:oe}):null,r.previewComponent)});A2e.displayName="SelectMenuComponent";var g2e=A2e;var v2e=pf.default.forwardRef((e,t)=>{let r=e.options.map((f,d)=>({...f,id:d+1}));(0,pf.useEffect)(()=>{i(e.options.map((f,d)=>({...f,id:d+1})))},[e.options]);let[n,i]=(0,pf.useState)(r),[a,o]=(0,pf.useState)(e.value.map(f=>r.find(d=>d.value==f)??{id:0,name:f,value:f})),s=(0,pf.useCallback)(f=>{let d=a.filter((p,h)=>h!==f);o(d),e.saveOptions&&e.saveOptions(n.map(p=>p.value),d.map(p=>p.value),!1)},[n,a,e]),l=(0,pf.useCallback)(f=>{let d=n.filter(h=>h.value!=f),p=a.filter(h=>h.value!=f);i(d),o(p),e.removeOption&&e.removeOption(f),e.hide()},[a,n,e]),u=(0,pf.useCallback)((f,d)=>{let p=f,h=n,m=a;n.find(g=>g.value==f.value)||(p={id:n.length+1,name:f.name,value:f.value??f.name},h=[...n,p],i(h)),e.multi?a.find(g=>g.value==p.value)||(m=[...a,p],o(m)):(m=[p],o(m)),e.saveOptions&&e.saveOptions(h.map(g=>g.value),m.map(g=>g.value),!0),!e.multi&&f.type!=1&&e.hide()},[a,n]),c=(0,pf.useCallback)(f=>!(!e.editable&&!n.find(d=>d.value==f.value)||f.name.length==0),[n]);return pf.default.createElement(g2e,{tags:e.multi?a:[],suggestions:n,ui:e.ui,ref:t,addKeyword:e.addKeyword,hide:e.hide,onDelete:s,wrapperClass:e.wrapperClass,onMoreOption:e.onMoreOption,onDeleteOption:l,onAddition:u,onValidate:c,onSelectSection:e.onSelectSection,defaultSuggestions:e.defaultOptions,placeholderText:e.placeholder??"",minQueryLength:0,onHover:e.onHover,showSections:e.showSections,sections:e.sections,maxSuggestionsLength:e.showAll?Math.min(50,e.options.length):25,suggestionsOnly:!e.searchable&&!e.editable,allowNew:e.editable,previewComponent:e.previewComponent,isDisclosure:e.isDisclosure})});v2e.displayName="SelectMenu";var Kz=v2e;var To=ge(Te());var fl=ge(Te());var yd=(0,fl.forwardRef)((e,t)=>{let r=(0,fl.useRef)(null),[n,i]=(0,fl.useState)(!1),[a,o]=(0,fl.useState)(!1),s=async u=>{let c=r.current,f=e.superstate.spaceManager.uriByString(e.path,e.source),d=e.properties,p=e.superstate.pathsIndex.get(f.basePath),h=p?.type=="space"&&e.forceNote?e.superstate.spacesIndex.get(e.path)?.space.notePath:p?f.fullPath:null;if(h)i(!1),e.superstate.ui.openPath(h,!1,c,d);else if(u){let m=e.superstate.spaceManager.parentPathForPath(f.basePath);if(!m)return;let g=await e.superstate.spaceManager.createItemAtPath(m,"md",Lc(e.path));i(!1),await e.superstate.ui.openPath(g,!1,c,d)}else{i(!0),o(!1);return}o(!0)},l=()=>{e.load?s():r?.current&&(r.current.innerHTML="")};return(0,fl.useEffect)(()=>{l()},[e.load,e.path]),(0,fl.useEffect)(()=>{let u=()=>{r.current&&!r.current.hasChildNodes()&&e.load&&!n&&s()};return e.superstate.ui.eventsDispatch.addListener("activeStateChanged",u),()=>{e.superstate.ui.eventsDispatch.removeListener("activeStateChanged",u)}},[]),fl.default.createElement(fl.default.Fragment,null,fl.default.createElement("div",{className:`${e.classname??""} mk-flowspace-editor`,ref:r,onClick:u=>u.stopPropagation()}),n?fl.default.createElement("div",{onClick:()=>s(!0),className:"mk-placeholder",style:{color:"var(--mk-ui-text-tertiary)"}},z.labels.notePlaceholder.replace("${1}",Lc(e.path))):fl.default.createElement(fl.default.Fragment,null))});yd.displayName="FlowView";var y2e=(e,t,r,n,i,a,o,s)=>{let l=[];l.push(Pm(n?.name??"",u=>o(n.name,u))),l.push(Ut),l.push({name:z.menu.changePropertyType,icon:"ui//list",onClick:u=>{s(u,n.name)}}),n.type!="object"&&l.push({name:z.menu.syncToContext,icon:"ui//sync",onClick:u=>{a(n)}}),l.push({name:z.menu.deleteProperty,icon:"ui//trash",onClick:u=>{i(n)}}),e.ui.openMenu(t,Yt(e.ui,l),r)};var os=ge(Te());var b2e=e=>{let{pathState:t}=(0,os.useContext)(Ir),[r,n]=(0,os.useState)({}),[i,a]=(0,os.useState)([]),[o,s]=(0,os.useState)([]),{tableData:l,saveProperty:u,delProperty:c,saveFrame:f}=(0,os.useContext)(aa),d=async()=>{let D=e.superstate.spacesMap.get(t.path)??new Set,P=(await Promise.all([...D].map(async _=>e.superstate.spaceManager.readTable(_,Nr).then(X=>X.cols??[])))).reduce((_,X)=>[..._,...X],[]),R=[],q={},B=t?.metadata?.property??{},N=Gj([...Object.keys(B),...l?.cols?.map(_=>_.name)??[]]).filter(_=>!P.some(X=>X.name==_)),W=N.map(_=>l?.cols?.find(X=>X.name==_)??{table:"",name:_,schemaId:"",type:Uh(B[_],_)});B&&(R.push(...W),N.forEach(_=>{q[_]=Ki(_,B[_])})),a(R.filter(_=>!e.excludeKeys?.some(X=>X==_.name))),s([...e.superstate.settings.hideFrontmatter?P.map(_=>_.name):[]]),n(Vm(e.superstate.formulaContext,e.superstate.pathsIndex,q,W,t))},p=D=>{e.spaces.find(P=>P==D.path)&&d()};(0,os.useEffect)(()=>(d(),e.superstate.eventsDispatcher.addListener("contextStateUpdated",p),()=>{e.superstate.eventsDispatcher.removeListener("contextStateUpdated",p)}),[e.spaces,l]);let h=(D,P)=>{if(u){let R=l?.cols?.find(q=>q.name==P.name);R&&u(P,R)}Di(e.superstate,t.path,{[P.name]:Sa(P.type,D,!0)})},m=D=>{c&&D&&c(D),Pye(e.superstate,t.path,D.name)},g=async(D,P)=>{let R={...D,schemaId:Nr},q=e.superstate.spacesIndex.get(P)?.space;!q||(await e.superstate.spaceManager.addSpaceProperty(P,R),await CB(e.superstate.spaceManager,q,t.path,R.name,r[R.name]))},A=(D,P)=>{let R=D.target.getBoundingClientRect(),q=[...e.superstate.spacesMap.get(t.path)].map(B=>e.superstate.pathsIndex.get(B)).filter(B=>B).map(B=>({name:B.name,value:B.path,icon:B.label?.sticker,description:B.path}));e.superstate.ui.openMenu(R,{ui:e.superstate.ui,multi:!1,editable:!1,value:[],options:q,saveOptions:(B,N)=>{g(P,N[0])},placeholder:z.labels.spaceSelectPlaceholder,detail:!0,searchable:!0,showAll:!0},je(D.view.document),"bottom")},b=(D,P)=>{if(u){let R=l?.cols?.find(q=>q.name==D);R&&u({...R,name:P},R)}AG(e.superstate,t.path,D,P)},v=(D,P)=>{if(u){let R=l?.cols?.find(q=>q.name==P);R&&u({...R,type:D[0]},R)}Di(e.superstate,t.path,{[P]:nx(D[0])})},x=(D,P)=>{let R=D.target.getBoundingClientRect();e.superstate.ui.openMenu(R,{ui:e.superstate.ui,multi:!1,editable:!1,searchable:!1,saveOptions:(q,B)=>v(B,P),value:[],showAll:!0,options:Xs.filter(q=>q.metadata).map((q,B)=>({id:B+1,name:q.label,value:q.type,icon:q.icon}))},je(D.view.document))},[w,S]=(0,os.useState)(null),[k,M]=(0,os.useState)(null),O=()=>{M(null),S(null)};Vo({onDragStart({active:D}){D.data.current.type=="property"&&S(D.data.current.property)},onDragOver({active:D,over:P}){let R=P?.data.current.id;P?.data.current.type=="property"&&R&&M(R)},onDragCancel(){O()},onDragEnd({active:D,over:P}){if(!D||!k){O();return}O()}});let C=(D,P)=>{if(u){let R=l?.cols?.find(q=>q.name==P.name);R&&u(D,R)}D.name!=P.name&&AG(e.superstate,t.path,P.name,D.name)},T=(D,P)=>{let R=D.target.getBoundingClientRect();if(t.type=="space"){Lm({superstate:e.superstate,rect:R,win:je(D.view.document),editable:!0,options:[],field:P,fields:i,contextPath:null,saveField:q=>C(q,P),deleteColumn:m,anchor:"bottom"});return}y2e(e.superstate,R,je(D.view.document),P,m,()=>A(D,P),b,x)};return os.default.createElement(os.default.Fragment,null,e.compactMode?i.map((D,P)=>os.default.createElement(as,{key:P,path:t.path,propertyMenu:R=>T(R,D),superstate:e.superstate,initialValue:r[D.name],row:r,compactMode:e.compactMode,column:{...D,table:""},columns:[],editMode:e.editable?5:2,updateValue:R=>h(R,D),updateFieldValue:(R,q)=>h(q,{...D,value:R}),contextTable:{},source:t.path})):e.force?i.map((D,P)=>os.default.createElement(as,{key:P,path:t.path,propertyMenu:R=>T(R,D),superstate:e.superstate,initialValue:r[D.name],row:r,compactMode:e.compactMode,column:{...D,table:""},columns:[],editMode:e.editable?5:2,updateValue:R=>h(R,D),updateFieldValue:(R,q)=>h(q,{...D,value:R}),contextTable:{},source:t.path})):os.default.createElement(os.default.Fragment,null),o.length>0&&os.default.createElement("style",null,`${o.map(D=>`.metadata-property[data-property-key="${D}"]`).join(", ")} +`,{name:"Superstate Indexer"})}var A5=class{constructor(t,r){this.numWorkers=t;this.cache=r;this.workers=[],this.busy=[],this.reloadQueue=[],this.reloadSet=new Set,this.callbacks=new Map;for(let n=0;nthis.finish(a.data.job,a.data.result,n),this.workers.push(i),this.busy.push(!1)}}reload(t){let r=F2(t),n=new Promise((a,o)=>{this.callbacks.has(r)?this.callbacks.get(r)?.push([a,o]):this.callbacks.set(r,[[a,o]])});if(this.reloadSet.has(r))return n;this.reloadSet.add(r);let i=this.nextAvailableWorker();return i!==void 0?this.send(t,i):this.reloadQueue.push(t),n}finish(t,r,n){let i=F2(t),a=[].concat(this.callbacks.get(i)??[]);this.reloadSet.delete(i),this.callbacks.delete(i),this.busy[n]=!1;let o=this.reloadQueue.shift();if(o!==void 0&&this.send(o,n),"$error"in r)for(let[s,l]of a)l(r.$error);else for(let[s,l]of a)s(r)}async send(t,r){if(t.type=="paths"){let n=await this.cache.spaceManager.allCaches(),i={settings:this.cache.settings,spacesCache:this.cache.spacesIndex,pathCache:n,oldMetadata:this.cache.pathsIndex};this.message(r,{job:t,payload:i}),this.busy[r]=!0;return}if(t.type=="path"){let n=this.cache.spacesIndex.get(t.path),i=t.path,a;n&&(a=n.space.name,this.cache.settings.enableFolderNote?i=n.space.notePath:i=n.space.defPath);let o=await this.cache.spaceManager.readPathCache(i)??await this.cache.spaceManager.readPathCache(t.path);a=a??o?.label.name;let s=await this.cache.spaceManager.parentPathForPath(t.path),l=n?"space":o.type,u=n?n.type:o?.subtype,c={path:t.path,settings:this.cache.settings,spacesCache:this.cache.spacesIndex,pathMetadata:o,name:a,parent:s,type:l,subtype:u,oldMetadata:this.cache.pathsIndex.get(t.path)};this.message(r,{job:t,payload:c}),this.busy[r]=!0;return}if(t.type=="context"){let n=this.cache.spacesIndex.get(t.path)?.space;if(!n||!n.path){this.message(r,{job:t,payload:{space:n,mdb:null,paths:[...this.cache.spacesMap.getInverse(t.path)],pathsIndex:this.cache.pathsIndex}}),this.busy[r]=!0;return}let i=await this.cache.spaceManager.contextInitiated(n.path);this.cache.spaceManager.readAllTables(n.path).then(a=>{this.message(r,{job:t,payload:{space:n,mdb:a,paths:[...this.cache.spacesMap.getInverse(t.path)],dbExists:i,pathsIndex:this.cache.pathsIndex}}),this.busy[r]=!0});return}if(t.type=="contexts"){let n=this.cache.allSpaces().filter(a=>a.type!="default").map(a=>a.space),i=new Map;for(let a of n){let o=await this.cache.spaceManager.contextInitiated(a.path);await this.cache.spaceManager.readAllTables(a.path).then(s=>{i.set(a.path,{space:a,mdb:s,paths:[...this.cache.spacesMap.getInverse(a.path)],dbExists:o})})}this.message(r,{job:t,payload:{map:i,pathsIndex:this.cache.pathsIndex}}),this.busy[r]=!0}}message(t,r){this.workers[t].postMessage(r)}nextAvailableWorker(){let t=this.busy.indexOf(!1);return t==-1?void 0:t}};function BH(){return pC('"use strict";function Xe(t){return Array.isArray(t)?t:typeof t=="string"?[t]:[]}var Je=(t,e)=>e.indexOf(t)>0?e.indexOf(t):e.length;function H(t){return H=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},H(t)}function O(t){if(t===null||t===!0||t===!1)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function x(t,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}function y(t){x(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||H(t)==="object"&&e==="[object Date]"?new Date(t.getTime()):typeof t=="number"||e==="[object Number]"?new Date(t):((typeof t=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn\'t accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function me(t,e){x(2,arguments);var r=y(t).getTime(),n=O(e);return new Date(r+n)}var Lt={};function R(){return Lt}function pe(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function he(t){return x(1,arguments),t instanceof Date||H(t)==="object"&&Object.prototype.toString.call(t)==="[object Date]"}function ge(t){if(x(1,arguments),!he(t)&&typeof t!="number")return!1;var e=y(t);return!isNaN(Number(e))}function xe(t,e){x(2,arguments);var r=O(e);return me(t,-r)}var Ut=864e5;function ye(t){x(1,arguments);var e=y(t),r=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var n=e.getTime(),a=r-n;return Math.floor(a/Ut)+1}function $(t){x(1,arguments);var e=1,r=y(t),n=r.getUTCDay(),a=(n=a.getTime()?r+1:e.getTime()>=i.getTime()?r:r-1}function ve(t){x(1,arguments);var e=te(t),r=new Date(0);r.setUTCFullYear(e,0,4),r.setUTCHours(0,0,0,0);var n=$(r);return n}var Rt=6048e5;function be(t){x(1,arguments);var e=y(t),r=$(e).getTime()-ve(e).getTime();return Math.round(r/Rt)+1}function j(t,e){var r,n,a,o,i,s,u,f;x(1,arguments);var l=R(),c=O((r=(n=(a=(o=e?.weekStartsOn)!==null&&o!==void 0?o:e==null||(i=e.locale)===null||i===void 0||(s=i.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:l.weekStartsOn)!==null&&n!==void 0?n:(u=l.locale)===null||u===void 0||(f=u.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&r!==void 0?r:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=y(t),p=d.getUTCDay(),g=(p=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(c+1,0,p),g.setUTCHours(0,0,0,0);var v=j(g,e),T=new Date(0);T.setUTCFullYear(c,0,p),T.setUTCHours(0,0,0,0);var S=j(T,e);return l.getTime()>=v.getTime()?c+1:l.getTime()>=S.getTime()?c:c-1}function we(t,e){var r,n,a,o,i,s,u,f;x(1,arguments);var l=R(),c=O((r=(n=(a=(o=e?.firstWeekContainsDate)!==null&&o!==void 0?o:e==null||(i=e.locale)===null||i===void 0||(s=i.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:l.firstWeekContainsDate)!==null&&n!==void 0?n:(u=l.locale)===null||u===void 0||(f=u.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=re(t,e),p=new Date(0);p.setUTCFullYear(d,0,c),p.setUTCHours(0,0,0,0);var g=j(p,e);return g}var $t=6048e5;function Te(t,e){x(1,arguments);var r=y(t),n=j(r,e).getTime()-we(r,e).getTime();return Math.round(n/$t)+1}function h(t,e){for(var r=t<0?"-":"",n=Math.abs(t).toString();n.length0?n:1-n;return h(r==="yy"?a%100:a,r.length)},M:function(e,r){var n=e.getUTCMonth();return r==="M"?String(n+1):h(n+1,2)},d:function(e,r){return h(e.getUTCDate(),r.length)},a:function(e,r){var n=e.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(e,r){return h(e.getUTCHours()%12||12,r.length)},H:function(e,r){return h(e.getUTCHours(),r.length)},m:function(e,r){return h(e.getUTCMinutes(),r.length)},s:function(e,r){return h(e.getUTCSeconds(),r.length)},S:function(e,r){var n=r.length,a=e.getUTCMilliseconds(),o=Math.floor(a*Math.pow(10,n-3));return h(o,r.length)}},A=jt;var J={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},qt={G:function(e,r,n){var a=e.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(e,r,n){if(r==="yo"){var a=e.getUTCFullYear(),o=a>0?a:1-a;return n.ordinalNumber(o,{unit:"year"})}return A.y(e,r)},Y:function(e,r,n,a){var o=re(e,a),i=o>0?o:1-o;if(r==="YY"){var s=i%100;return h(s,2)}return r==="Yo"?n.ordinalNumber(i,{unit:"year"}):h(i,r.length)},R:function(e,r){var n=te(e);return h(n,r.length)},u:function(e,r){var n=e.getUTCFullYear();return h(n,r.length)},Q:function(e,r,n){var a=Math.ceil((e.getUTCMonth()+1)/3);switch(r){case"Q":return String(a);case"QQ":return h(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(e,r,n){var a=Math.ceil((e.getUTCMonth()+1)/3);switch(r){case"q":return String(a);case"qq":return h(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(e,r,n){var a=e.getUTCMonth();switch(r){case"M":case"MM":return A.M(e,r);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(e,r,n){var a=e.getUTCMonth();switch(r){case"L":return String(a+1);case"LL":return h(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(e,r,n,a){var o=Te(e,a);return r==="wo"?n.ordinalNumber(o,{unit:"week"}):h(o,r.length)},I:function(e,r,n){var a=be(e);return r==="Io"?n.ordinalNumber(a,{unit:"week"}):h(a,r.length)},d:function(e,r,n){return r==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):A.d(e,r)},D:function(e,r,n){var a=ye(e);return r==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):h(a,r.length)},E:function(e,r,n){var a=e.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(e,r,n,a){var o=e.getUTCDay(),i=(o-a.weekStartsOn+8)%7||7;switch(r){case"e":return String(i);case"ee":return h(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,r,n,a){var o=e.getUTCDay(),i=(o-a.weekStartsOn+8)%7||7;switch(r){case"c":return String(i);case"cc":return h(i,r.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,r,n){var a=e.getUTCDay(),o=a===0?7:a;switch(r){case"i":return String(o);case"ii":return h(o,r.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(e,r,n){var a=e.getUTCHours(),o=a/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,r,n){var a=e.getUTCHours(),o;switch(a===12?o=J.noon:a===0?o=J.midnight:o=a/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,r,n){var a=e.getUTCHours(),o;switch(a>=17?o=J.evening:a>=12?o=J.afternoon:a>=4?o=J.morning:o=J.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,r,n){if(r==="ho"){var a=e.getUTCHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return A.h(e,r)},H:function(e,r,n){return r==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):A.H(e,r)},K:function(e,r,n){var a=e.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(a,{unit:"hour"}):h(a,r.length)},k:function(e,r,n){var a=e.getUTCHours();return a===0&&(a=24),r==="ko"?n.ordinalNumber(a,{unit:"hour"}):h(a,r.length)},m:function(e,r,n){return r==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):A.m(e,r)},s:function(e,r,n){return r==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):A.s(e,r)},S:function(e,r){return A.S(e,r)},X:function(e,r,n,a){var o=a._originalDate||e,i=o.getTimezoneOffset();if(i===0)return"Z";switch(r){case"X":return Ze(i);case"XXXX":case"XX":return Q(i);case"XXXXX":case"XXX":default:return Q(i,":")}},x:function(e,r,n,a){var o=a._originalDate||e,i=o.getTimezoneOffset();switch(r){case"x":return Ze(i);case"xxxx":case"xx":return Q(i);case"xxxxx":case"xxx":default:return Q(i,":")}},O:function(e,r,n,a){var o=a._originalDate||e,i=o.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Ke(i,":");case"OOOO":default:return"GMT"+Q(i,":")}},z:function(e,r,n,a){var o=a._originalDate||e,i=o.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Ke(i,":");case"zzzz":default:return"GMT"+Q(i,":")}},t:function(e,r,n,a){var o=a._originalDate||e,i=Math.floor(o.getTime()/1e3);return h(i,r.length)},T:function(e,r,n,a){var o=a._originalDate||e,i=o.getTime();return h(i,r.length)}};function Ke(t,e){var r=t>0?"-":"+",n=Math.abs(t),a=Math.floor(n/60),o=n%60;if(o===0)return r+String(a);var i=e||"";return r+String(a)+i+h(o,2)}function Ze(t,e){if(t%60===0){var r=t>0?"-":"+";return r+h(Math.abs(t)/60,2)}return Q(t,e)}function Q(t,e){var r=e||"",n=t>0?"-":"+",a=Math.abs(t),o=h(Math.floor(a/60),2),i=h(a%60,2);return n+o+r+i}var et=qt;var tt=function(e,r){switch(e){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},rt=function(e,r){switch(e){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},Ht=function(e,r){var n=e.match(/(P+)(p+)?/)||[],a=n[1],o=n[2];if(!o)return tt(e,r);var i;switch(a){case"P":i=r.dateTime({width:"short"});break;case"PP":i=r.dateTime({width:"medium"});break;case"PPP":i=r.dateTime({width:"long"});break;case"PPPP":default:i=r.dateTime({width:"full"});break}return i.replace("{{date}}",tt(a,r)).replace("{{time}}",rt(o,r))},Qt={p:rt,P:Ht},nt=Qt;var Bt=["D","DD"],Gt=["YY","YYYY"];function at(t){return Bt.indexOf(t)!==-1}function ot(t){return Gt.indexOf(t)!==-1}function Se(t,e,r){if(t==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Vt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Xt=function(e,r,n){var a,o=Vt[e];return typeof o=="string"?a=o:r===1?a=o.one:a=o.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a},it=Xt;function ne(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.width?String(e.width):t.defaultWidth,n=t.formats[r]||t.formats[t.defaultWidth];return n}}var Jt={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zt={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Kt={full:"{{date}} \'at\' {{time}}",long:"{{date}} \'at\' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Zt={date:ne({formats:Jt,defaultWidth:"full"}),time:ne({formats:zt,defaultWidth:"full"}),dateTime:ne({formats:Kt,defaultWidth:"full"})},st=Zt;var er={lastWeek:"\'last\' eeee \'at\' p",yesterday:"\'yesterday at\' p",today:"\'today at\' p",tomorrow:"\'tomorrow at\' p",nextWeek:"eeee \'at\' p",other:"P"},tr=function(e,r,n,a){return er[e]},ut=tr;function B(t){return function(e,r){var n=r!=null&&r.context?String(r.context):"standalone",a;if(n==="formatting"&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,i=r!=null&&r.width?String(r.width):o;a=t.formattingValues[i]||t.formattingValues[o]}else{var s=t.defaultWidth,u=r!=null&&r.width?String(r.width):t.defaultWidth;a=t.values[u]||t.values[s]}var f=t.argumentCallback?t.argumentCallback(e):e;return a[f]}}var rr={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},nr={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ar={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},or={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ir={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},sr={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ur=function(e,r){var n=Number(e),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},fr={ordinalNumber:ur,era:B({values:rr,defaultWidth:"wide"}),quarter:B({values:nr,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:B({values:ar,defaultWidth:"wide"}),day:B({values:or,defaultWidth:"wide"}),dayPeriod:B({values:ir,defaultWidth:"wide",formattingValues:sr,defaultFormattingWidth:"wide"})},ft=fr;function G(t){return function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,a=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],o=e.match(a);if(!o)return null;var i=o[0],s=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],u=Array.isArray(s)?cr(s,function(c){return c.test(i)}):lr(s,function(c){return c.test(i)}),f;f=t.valueCallback?t.valueCallback(u):u,f=r.valueCallback?r.valueCallback(f):f;var l=e.slice(i.length);return{value:f,rest:l}}}function lr(t,e){for(var r in t)if(t.hasOwnProperty(r)&&e(t[r]))return r}function cr(t,e){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},n=e.match(t.matchPattern);if(!n)return null;var a=n[0],o=e.match(t.parsePattern);if(!o)return null;var i=t.valueCallback?t.valueCallback(o[0]):o[0];i=r.valueCallback?r.valueCallback(i):i;var s=e.slice(a.length);return{value:i,rest:s}}}var dr=/^(\\d+)(th|st|nd|rd)?/i,mr=/\\d+/i,pr={narrow:/^(b|a)/i,abbreviated:/^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},hr={any:[/^b/i,/^(a|c)/i]},gr={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},xr={any:[/1/i,/2/i,/3/i,/4/i]},yr={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},vr={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},br={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},wr={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Tr={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Sr={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Or={ordinalNumber:Oe({matchPattern:dr,parsePattern:mr,valueCallback:function(e){return parseInt(e,10)}}),era:G({matchPatterns:pr,defaultMatchWidth:"wide",parsePatterns:hr,defaultParseWidth:"any"}),quarter:G({matchPatterns:gr,defaultMatchWidth:"wide",parsePatterns:xr,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:G({matchPatterns:yr,defaultMatchWidth:"wide",parsePatterns:vr,defaultParseWidth:"any"}),day:G({matchPatterns:br,defaultMatchWidth:"wide",parsePatterns:wr,defaultParseWidth:"any"}),dayPeriod:G({matchPatterns:Tr,defaultMatchWidth:"any",parsePatterns:Sr,defaultParseWidth:"any"})},lt=Or;var Mr={code:"en-US",formatDistance:it,formatLong:st,formatRelative:ut,localize:ft,match:lt,options:{weekStartsOn:0,firstWeekContainsDate:1}},ct=Mr;var dt=ct;var Dr=/[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|\'\'|\'(\'\'|[^\'])+(\'|$)|./g,kr=/P+p+|P+|p+|\'\'|\'(\'\'|[^\'])+(\'|$)|./g,Cr=/^\'([^]*?)\'?$/,Wr=/\'\'/g,Ir=/[a-zA-Z]/;function ie(t,e,r){var n,a,o,i,s,u,f,l,c,d,p,g,v,T,S,P,W,L;x(2,arguments);var de=String(e),E=R(),b=(n=(a=r?.locale)!==null&&a!==void 0?a:E.locale)!==null&&n!==void 0?n:dt,k=O((o=(i=(s=(u=r?.firstWeekContainsDate)!==null&&u!==void 0?u:r==null||(f=r.locale)===null||f===void 0||(l=f.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&s!==void 0?s:E.firstWeekContainsDate)!==null&&i!==void 0?i:(c=E.locale)===null||c===void 0||(d=c.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(k>=1&&k<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var C=O((p=(g=(v=(T=r?.weekStartsOn)!==null&&T!==void 0?T:r==null||(S=r.locale)===null||S===void 0||(P=S.options)===null||P===void 0?void 0:P.weekStartsOn)!==null&&v!==void 0?v:E.weekStartsOn)!==null&&g!==void 0?g:(W=E.locale)===null||W===void 0||(L=W.options)===null||L===void 0?void 0:L.weekStartsOn)!==null&&p!==void 0?p:0);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!b.localize)throw new RangeError("locale must contain localize property");if(!b.formatLong)throw new RangeError("locale must contain formatLong property");var q=y(t);if(!ge(q))throw new RangeError("Invalid time value");var ee=pe(q),U=xe(q,ee),Ve={firstWeekContainsDate:k,weekStartsOn:C,locale:b,_originalDate:q},M=de.match(kr).map(function(w){var I=w[0];if(I==="p"||I==="P"){var oe=nt[I];return oe(w,b.formatLong)}return w}).join("").match(Dr).map(function(w){if(w==="\'\'")return"\'";var I=w[0];if(I==="\'")return Pr(w);var oe=et[I];if(oe)return!(r!=null&&r.useAdditionalWeekYearTokens)&&ot(w)&&Se(w,e,String(t)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&at(w)&&Se(w,e,String(t)),oe(U,w,b.localize,Ve);if(I.match(Ir))throw new RangeError("Format string contains an unescaped latin alphabet character `"+I+"`");return w}).join("");return M}function Pr(t){var e=t.match(Cr);return e?e[1].replace(Wr,"\'"):t}var mt=t=>[...new Set(t)];var Me=(t,e)=>{if(t instanceof Date)return"date";if(typeof t=="string"){if(/\\/\\/(\\S+?(?:jpe?g|png|gif|svg))/gi.test(t)||t.includes("unsplash"))return"image";if(/^\\d{4}-\\d{2}-\\d{2}$/.test(t))return"date";if(e=="tag"||e=="tags")return"tags-multi";if(/\\[\\[.*?\\]\\]/.test(t))return"link"}else{if(typeof t=="number")return"number";if(typeof t=="boolean")return"boolean";if(t)if(Array.isArray(t)||typeof t=="string"&&t.indexOf(",")>-1){let r=Array.isArray(t)?t:[];if(typeof t=="string"&&t.indexOf(",")>-1&&(r=V(t)),e=="tag"||e=="tags")return"tags-multi";if(r.length==1&&Array.isArray(r[0])&&r[0].length==1&&typeof r[0][0]=="string")return"link";let n=mt(r.map(a=>Me(a,e)));return n.length==1&&n[0]=="link"?"link-multi":n.some(a=>a=="object")?"object-multi":"option-multi"}else return t.isLuxonDateTime?"date":t.isLuxonDuration?"duration":t.type=="file"?"link":typeof t=="object"&&!Array.isArray(t)&&t!==null?"object":"unknown";else return"unknown"}return"text"};var pt=t=>t.map(e=>e.replace(",","\\\\,")).join(", "),z=t=>JSON.stringify(t);var V=t=>t?.startsWith("[")?Xe(ze(t)):Fr(t),Fr=t=>(t?.replace("\\\\,",",")?.match(/(\\\\.|[^,])+/g)??[]).map(e=>e.trim()),ke=(t,e,r)=>{let n=r??Me(e,t);if(!e)return"";switch(n){case"tags-multi":return e;case"object":case"object-multi":return JSON.stringify(e);case"number":return e.toString();case"boolean":return e?"true":"false";case"date":{if(e instanceof Date){let a=ie(e,"yyyy-MM-dd");return typeof a=="string"?a:""}return typeof e!="string"?"":e}break;case"duration":return pt(Object.keys(e.values).reduce((a,o)=>[...a,...e.values[o]>0?[e.values[o]+" "+o]:[]],[]));case"option-multi":case"link-multi":case"context-multi":return typeof e=="string"?De(e):z(e.map(a=>a?typeof a=="string"?De(a):a.path?a.path:Array.isArray(e)&&a.length==1&&Array.isArray(a[0])&&a[0].length==1&&typeof a[0][0]=="string"?a[0][0]:JSON.stringify(a):""));case"link":case"context":return Array.isArray(e)&&e.length==1&&Array.isArray(e[0])&&e[0].length==1&&typeof e[0][0]=="string"?e[0][0]:typeof e=="string"?De(e):e.path;case"text":case"tag":case"option":case"image":return e}return""};var ze=t=>{let e;try{e=JSON.parse(t)}catch{}return e};var De=t=>{if(!t)return"";let e=/\\[\\[(.*?)\\]\\]/g.exec(t),r=e?.length>1?e[1].substring(0,Je("|",e[1])):t;return r||t};var ht=(t,e)=>{let r=t?V(t):[],n=e?V(e):[];return n.every(a=>r.some(o=>o==a))&&r.every(a=>n.some(o=>o==a))},K=(t,e)=>t==e,Ce=(t,e)=>(t??"").length==0,We=(t,e)=>(t??"").toLowerCase().includes((e??"").toLowerCase()),Ie=(t,e)=>parseFloat(t)>parseFloat(e),Pe=(t,e)=>parseInt(t){let r=isNaN(Date.parse(t))?new Date(parseInt(t)):new Date(t),n=isNaN(Date.parse(e))?new Date(parseInt(e)):new Date(e);return r.valueOf()>=n.valueOf()},xt=(t,e)=>{let r=isNaN(Date.parse(t))?new Date(parseInt(t)):new Date(t),n=isNaN(Date.parse(e))?new Date(parseInt(e)):new Date(e);return r.valueOf(){let r=t?V(t):[],n=e?V(e):[];return r.length==0?!1:n.some(a=>r.some(o=>o==a))},yt=(t,e)=>{if(!t)return!1;let r=new Date(`${t.toString().replace(".",":")}`),n=new Date(`${e}`);return r.getMonth()===n.getMonth()&&r.getDate()===n.getDate()},vt=t=>{if(!t)return!1;let e=new Date(`${t.toString()}T00:00`),r=new Date;return e.getMonth()===r.getMonth()&&e.getDate()===r.getDate()};var Z={isNotEmpty:{type:["text","file","number","option","option-multi","link","link-multi","image"],fn:(t,e)=>!Ce(t,""),valueType:"none"},isEmpty:{type:["text","file","number","option","option-multi","link","link-multi","image"],fn:(t,e)=>Ce(t,""),valueType:"none"},include:{fn:(t,e)=>We(t,e),type:["text","file","link","image"],valueType:"text"},notInclude:{type:["text","file","link","image"],fn:(t,e)=>!We(t,e),valueType:"text"},is:{type:["text"],fn:(t,e)=>K(t,e),valueType:"text"},isNot:{type:["text"],fn:(t,e)=>!K(t,e),valueType:"text"},equal:{type:["number"],fn:(t,e)=>K(t,e),valueType:"number"},isLink:{type:["link","context"],fn:(t,e)=>K(t,e),valueType:"link"},isNotLink:{type:["link","context"],fn:(t,e)=>!K(t,e),valueType:"link"},isGreatThan:{type:["number"],fn:(t,e)=>Ie(t,e),valueType:"number"},isLessThan:{type:["number"],fn:(t,e)=>Pe(t,e),valueType:"number"},isLessThanOrEqual:{type:["number"],fn:(t,e)=>!Ie(t,e),valueType:"number"},isGreatThanOrEqual:{type:["number"],fn:(t,e)=>!Pe(t,e),valueType:"number"},dateBefore:{type:["date"],fn:(t,e)=>xt(t,e),valueType:"date"},dateAfter:{type:["date"],fn:(t,e)=>gt(t,e),valueType:"date"},isSameDate:{type:["date"],fn:(t,e)=>yt(t,e),valueType:"date"},isSameDateAsToday:{type:["date"],fn:(t,e)=>vt(t,e),valueType:"none"},isExactList:{type:["option","option-multi","link-multi","context-multi","tags-multi"],fn:(t,e)=>ht(t,e),valueType:"list"},isAnyInList:{type:["option","context","link","option-multi","link-multi","context-multi","tags-multi"],fn:(t,e)=>Fe(t,e),valueType:"list"},isNoneInList:{type:["option","context","link","option-multi","link-multi","context-multi","tags-multi"],fn:(t,e)=>!Fe(t,e),valueType:"list"},isTrue:{type:["boolean"],fn:(t,e)=>t=="true",valueType:"none"},isFalse:{type:["boolean"],fn:(t,e)=>t!="true",valueType:"none"}};var _r=(t,e,r)=>e.reduce((a,o)=>{let[i,s]=a,u=o.type=="context"?bt(s,o,r):o.type=="path"?Tt(s,o,r):o.type=="frontmatter"?wt(s,o,r):St(s,o,r),f=s.filter(l=>!u.includes(l));return[[...i,...u],f]},[[],t])[0],Er=(t,e,r)=>e.reduce((n,a)=>a.type=="context"?bt(n,a,r):a.type=="path"?Tt(n,a,r):a.type=="frontmatter"?wt(n,a,r):St(n,a,r),t),bt=(t,e,r)=>{let n=Z[e.fn];return!n||n.valueType!="none"&&e.value.length==0?[]:t.filter(a=>{let[o,i]=e.field.split("."),s=a.metadata?.property;if(!a.spaces?.includes(o)||!s||!s[i])return!1;let u=!0;if(n){let f=e.fType=="property"?r[e.value]:e.value;u=n.fn(ke(i,s[i]),f)}return u})},wt=(t,e,r)=>{let n=Z[e.fn];return!n||n.valueType!="none"&&e.value.length==0?[]:t.filter(a=>{let o=a.metadata?.property;if(!o||o[e.field]===void 0)return!1;let i=!0;if(n){let s=e.fType=="property"?r[e.value]:e.value;i=n.fn(ke(e.field,o[e.field]),s)}return i})},Tt=(t,e,r)=>{let n=Z[e.fn];return!n||n.valueType!="none"&&e.value.length==0?[]:t.filter(a=>{let o="";e.field=="outlinks"?o=z(a.outlinks??[]):e.field=="inlinks"?o=z(a.metadata?.inlinks??[]):e.field=="tags"&&(o=z(a.tags??[]));let i=!0;if(n){let s=e.fType=="property"?r[e.value]:e.value;i=n.fn(o,s)}return i})},St=(t,e,r)=>{let n=Z[e.fn];return!n||n.valueType!="none"&&e.value.length==0?[]:t.filter(a=>{let o=!0;if(n){let i=e.fType=="property"?r[e.value]:e.value;o=n.fn(a.metadata?.[e.type]?.[e.field],i)}return o})},Ot=(t,e,r)=>t.reduce((a,o)=>!a||o.filters.length==0?!1:o.type=="any"?_r([e],o.filters,r).length>0:Er([e],o.filters,r).length>0,!0);function Y(t){return Array.isArray?Array.isArray(t):Ft(t)==="[object Array]"}var Ar=1/0;function Yr(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-Ar?"-0":e}function Nr(t){return t==null?"":Yr(t)}function F(t){return typeof t=="string"}function It(t){return typeof t=="number"}function Lr(t){return t===!0||t===!1||Ur(t)&&Ft(t)=="[object Boolean]"}function Pt(t){return typeof t=="object"}function Ur(t){return Pt(t)&&t!==null}function D(t){return t!=null}function _e(t){return!t.trim().length}function Ft(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}var Rr="Incorrect \'index\' type",$r=t=>`Invalid value for key ${t}`,jr=t=>`Pattern length exceeds max of ${t}.`,qr=t=>`Missing ${t} property in key`,Hr=t=>`Property \'weight\' in key \'${t}\' must be a positive integer`,Mt=Object.prototype.hasOwnProperty,Ee=class{constructor(e){this._keys=[],this._keyMap={};let r=0;e.forEach(n=>{let a=_t(n);this._keys.push(a),this._keyMap[a.id]=a,r+=a.weight}),this._keys.forEach(n=>{n.weight/=r})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function _t(t){let e=null,r=null,n=null,a=1,o=null;if(F(t)||Y(t))n=t,e=Dt(t),r=Ae(t);else{if(!Mt.call(t,"name"))throw new Error(qr("name"));let i=t.name;if(n=i,Mt.call(t,"weight")&&(a=t.weight,a<=0))throw new Error(Hr(i));e=Dt(i),r=Ae(i),o=t.getFn}return{path:e,id:r,weight:a,src:n,getFn:o}}function Dt(t){return Y(t)?t:t.split(".")}function Ae(t){return Y(t)?t.join("."):t}function Qr(t,e){let r=[],n=!1,a=(o,i,s)=>{if(!!D(o))if(!i[s])r.push(o);else{let u=i[s],f=o[u];if(!D(f))return;if(s===i.length-1&&(F(f)||It(f)||Lr(f)))r.push(Nr(f));else if(Y(f)){n=!0;for(let l=0,c=f.length;lt.score===e.score?t.idx{this._keysMap[r.id]=n})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,F(this.docs[0])?this.docs.forEach((e,r)=>{this._addString(e,r)}):this.docs.forEach((e,r)=>{this._addObject(e,r)}),this.norm.clear())}add(e){let r=this.size();F(e)?this._addString(e,r):this._addObject(e,r)}removeAt(e){this.records.splice(e,1);for(let r=e,n=this.size();r{let i=a.getFn?a.getFn(e):this.getFn(e,a.path);if(!!D(i)){if(Y(i)){let s=[],u=[{nestedArrIndex:-1,value:i}];for(;u.length;){let{nestedArrIndex:f,value:l}=u.pop();if(!!D(l))if(F(l)&&!_e(l)){let c={v:l,i:f,n:this.norm.get(l)};s.push(c)}else Y(l)&&l.forEach((c,d)=>{u.push({nestedArrIndex:d,value:c})})}n.$[o]=s}else if(F(i)&&!_e(i)){let s={v:i,n:this.norm.get(i)};n.$[o]=s}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}};function Et(t,e,{getFn:r=m.getFn,fieldNormWeight:n=m.fieldNormWeight}={}){let a=new ae({getFn:r,fieldNormWeight:n});return a.setKeys(t.map(_t)),a.setSources(e),a.create(),a}function Kr(t,{getFn:e=m.getFn,fieldNormWeight:r=m.fieldNormWeight}={}){let{keys:n,records:a}=t,o=new ae({getFn:e,fieldNormWeight:r});return o.setKeys(n),o.setIndexRecords(a),o}function se(t,{errors:e=0,currentLocation:r=0,expectedLocation:n=0,distance:a=m.distance,ignoreLocation:o=m.ignoreLocation}={}){let i=e/t.length;if(o)return i;let s=Math.abs(n-r);return a?i+s/a:s?1:i}function Zr(t=[],e=m.minMatchCharLength){let r=[],n=-1,a=-1,o=0;for(let i=t.length;o=e&&r.push([n,a]),n=-1)}return t[o-1]&&o-n>=e&&r.push([n,o-1]),r}var X=32;function en(t,e,r,{location:n=m.location,distance:a=m.distance,threshold:o=m.threshold,findAllMatches:i=m.findAllMatches,minMatchCharLength:s=m.minMatchCharLength,includeMatches:u=m.includeMatches,ignoreLocation:f=m.ignoreLocation}={}){if(e.length>X)throw new Error(jr(X));let l=e.length,c=t.length,d=Math.max(0,Math.min(n,c)),p=o,g=d,v=s>1||u,T=v?Array(c):[],S;for(;(S=t.indexOf(e,g))>-1;){let b=se(e,{currentLocation:S,expectedLocation:d,distance:a,ignoreLocation:f});if(p=Math.min(b,p),g=S+l,v){let k=0;for(;k=q;M-=1){let w=M-1,I=r[t.charAt(w)];if(v&&(T[w]=+!!I),U[M]=(U[M+1]<<1|1)&I,b&&(U[M]|=(P[M+1]|P[M])<<1|1|P[M+1]),U[M]&de&&(W=se(e,{errors:b,currentLocation:w,expectedLocation:d,distance:a,ignoreLocation:f}),W<=p)){if(p=W,g=w,g<=d)break;q=Math.max(1,2*d-g)}}if(se(e,{errors:b+1,currentLocation:d,expectedLocation:d,distance:a,ignoreLocation:f})>p)break;P=U}let E={isMatch:g>=0,score:Math.max(.001,W)};if(v){let b=Zr(T,s);b.length?u&&(E.indices=b):E.isMatch=!1}return E}function tn(t){let e={};for(let r=0,n=t.length;r{this.chunks.push({pattern:d,alphabet:tn(d),startIndex:p})},c=this.pattern.length;if(c>X){let d=0,p=c%X,g=c-p;for(;d{let{isMatch:S,score:P,indices:W}=en(e,g,v,{location:a+T,distance:o,threshold:i,findAllMatches:s,minMatchCharLength:u,includeMatches:n,ignoreLocation:f});S&&(d=!0),c+=P,S&&W&&(l=[...l,...W])});let p={isMatch:d,score:d?c/this.chunks.length:1};return d&&n&&(p.indices=l),p}},_=class{constructor(e){this.pattern=e}static isMultiMatch(e){return kt(e,this.multiRegex)}static isSingleMatch(e){return kt(e,this.singleRegex)}search(){}};function kt(t,e){let r=t.match(e);return r?r[1]:null}var Ye=class extends _{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let r=e===this.pattern;return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}},Ne=class extends _{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let n=e.indexOf(this.pattern)===-1;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}},Le=class extends _{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\\^"(.*)"$/}static get singleRegex(){return/^\\^(.*)$/}search(e){let r=e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}},Ue=class extends _{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\\^"(.*)"$/}static get singleRegex(){return/^!\\^(.*)$/}search(e){let r=!e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}},Re=class extends _{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\\$$/}static get singleRegex(){return/^(.*)\\$$/}search(e){let r=e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},$e=class extends _{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\\$$/}static get singleRegex(){return/^!(.*)\\$$/}search(e){let r=!e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}},fe=class extends _{constructor(e,{location:r=m.location,threshold:n=m.threshold,distance:a=m.distance,includeMatches:o=m.includeMatches,findAllMatches:i=m.findAllMatches,minMatchCharLength:s=m.minMatchCharLength,isCaseSensitive:u=m.isCaseSensitive,ignoreLocation:f=m.ignoreLocation}={}){super(e),this._bitapSearch=new ue(e,{location:r,threshold:n,distance:a,includeMatches:o,findAllMatches:i,minMatchCharLength:s,isCaseSensitive:u,ignoreLocation:f})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}},le=class extends _{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^\'"(.*)"$/}static get singleRegex(){return/^\'(.*)$/}search(e){let r=0,n,a=[],o=this.pattern.length;for(;(n=e.indexOf(this.pattern,r))>-1;)r=n+o,a.push([n,r-1]);let i=!!a.length;return{isMatch:i,score:i?0:1,indices:a}}},je=[Ye,le,Le,Ue,$e,Re,Ne,fe],Ct=je.length,rn=/ +(?=(?:[^\\"]*\\"[^\\"]*\\")*[^\\"]*$)/,nn="|";function an(t,e={}){return t.split(nn).map(r=>{let n=r.trim().split(rn).filter(o=>o&&!!o.trim()),a=[];for(let o=0,i=n.length;o!!(t[ce.AND]||t[ce.OR]),un=t=>!!t[Be.PATH],fn=t=>!Y(t)&&Pt(t)&&!Ge(t),Wt=t=>({[ce.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function At(t,e,{auto:r=!0}={}){let n=a=>{let o=Object.keys(a),i=un(a);if(!i&&o.length>1&&!Ge(a))return n(Wt(a));if(fn(a)){let u=i?a[Be.PATH]:o[0],f=i?a[Be.PATTERN]:a[u];if(!F(f))throw new Error($r(u));let l={keyId:Ae(u),pattern:f};return r&&(l.searcher=Qe(f,e)),l}let s={children:[],operator:o[0]};return o.forEach(u=>{let f=a[u];Y(f)&&f.forEach(l=>{s.children.push(n(l))})}),s};return Ge(t)||(t=Wt(t)),n(t)}function ln(t,{ignoreFieldNorm:e=m.ignoreFieldNorm}){t.forEach(r=>{let n=1;r.matches.forEach(({key:a,norm:o,score:i})=>{let s=a?a.weight:null;n*=Math.pow(i===0&&s?Number.EPSILON:i,(s||1)*(e?1:o))}),r.score=n})}function cn(t,e){let r=t.matches;e.matches=[],D(r)&&r.forEach(n=>{if(!D(n.indices)||!n.indices.length)return;let{indices:a,value:o}=n,i={indices:a,value:o};n.key&&(i.key=n.key.src),n.idx>-1&&(i.refIndex=n.idx),e.matches.push(i)})}function dn(t,e){e.score=t.score}function mn(t,e,{includeMatches:r=m.includeMatches,includeScore:n=m.includeScore}={}){let a=[];return r&&a.push(cn),n&&a.push(dn),t.map(o=>{let{idx:i}=o,s={item:e[i],refIndex:i};return a.length&&a.forEach(u=>{u(o,s)}),s})}var N=class{constructor(e,r={},n){this.options={...m,...r},this.options.useExtendedSearch,this._keyStore=new Ee(this.options.keys),this.setCollection(e,n)}setCollection(e,r){if(this._docs=e,r&&!(r instanceof ae))throw new Error(Rr);this._myIndex=r||Et(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){!D(e)||(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){let r=[];for(let n=0,a=this._docs.length;n-1&&(u=u.slice(0,r)),mn(u,this._docs,{includeMatches:n,includeScore:a})}_searchStringList(e){let r=Qe(e,this.options),{records:n}=this._myIndex,a=[];return n.forEach(({v:o,i,n:s})=>{if(!D(o))return;let{isMatch:u,score:f,indices:l}=r.searchIn(o);u&&a.push({item:o,idx:i,matches:[{score:f,value:o,norm:s,indices:l}]})}),a}_searchLogical(e){let r=At(e,this.options),n=(s,u,f)=>{if(!s.children){let{keyId:c,searcher:d}=s,p=this._findMatches({key:this._keyStore.get(c),value:this._myIndex.getValueForItemAtKeyId(u,c),searcher:d});return p&&p.length?[{idx:f,item:u,matches:p}]:[]}let l=[];for(let c=0,d=s.children.length;c{if(D(s)){let f=n(r,s,u);f.length&&(o[u]||(o[u]={idx:u,item:s,matches:[]},i.push(o[u])),f.forEach(({matches:l})=>{o[u].matches.push(...l)}))}}),i}_searchObjectList(e){let r=Qe(e,this.options),{keys:n,records:a}=this._myIndex,o=[];return a.forEach(({$:i,i:s})=>{if(!D(i))return;let u=[];n.forEach((f,l)=>{u.push(...this._findMatches({key:f,value:i[l],searcher:r}))}),u.length&&o.push({idx:s,item:i,matches:u})}),o}_findMatches({key:e,value:r,searcher:n}){if(!D(r))return[];let a=[];if(Y(r))r.forEach(({v:o,i,n:s})=>{if(!D(o))return;let{isMatch:u,score:f,indices:l}=n.searchIn(o);u&&a.push({score:f,key:e,value:o,idx:i,norm:s,indices:l})});else{let{v:o,n:i}=r,{isMatch:s,score:u,indices:f}=n.searchIn(o);s&&a.push({score:u,key:e,value:o,norm:i,indices:f})}return a}};N.version="7.0.0";N.createIndex=Et;N.parseIndex=Kr;N.config=m;N.parseQuery=At;sn(qe);function Yt(t){let{query:e,pathsIndex:r,count:n}=t,a=[],o={shouldSort:!0,threshold:0,ignoreLocation:!0,keys:["name","path","label.preview"]};return new N([...r.values()].filter(s=>s.hidden==!1),o).search(e).map(s=>s.item).slice(0,n)}function Nt(t){let{queries:e,pathsIndex:r,count:n}=t,a=[];for(let[o,i]of r)!i.hidden&&Ot(e,i,{})&&a.push(i);return a.slice(0,n)}var pn=self;pn.onmessage=async t=>{let{payload:e,job:r}=t.data,n;r.type=="search"&&(n=Nt(e)),r.type=="fastSearch"&&(n=Yt(e));try{postMessage({job:r,result:n})}catch(a){console.log(a),postMessage({job:r,result:{$error:`Failed to run ${r.type} ${r.path}: ${a}`}})}};\n',{name:"Superstate Search"})}var g5=class{constructor(t,r){this.numWorkers=t;this.cache=r;this.workers=[],this.busy=[],this.reloadQueue=[],this.reloadSet=new Set,this.callbacks=new Map;for(let n=0;nthis.finish(a.data.job,a.data.result,n),this.workers.push(i),this.busy.push(!1)}}run(t){let r=F2(t),n=new Promise((a,o)=>{this.callbacks.has(r)?this.callbacks.get(r)?.push([a,o]):this.callbacks.set(r,[[a,o]])});if(this.reloadSet.has(r))return n;this.reloadSet.add(r);let i=this.nextAvailableWorker();return i!==void 0?this.send(t,i):this.reloadQueue.push(t),n}finish(t,r,n){let i=F2(t),a=[].concat(this.callbacks.get(i)??[]);this.reloadSet.delete(i),this.callbacks.delete(i),this.busy[n]=!1;let o=this.reloadQueue.shift();if(o!==void 0&&this.send(o,n),"$error"in r)for(let[s,l]of a)l(r.$error);else for(let[s,l]of a)s(r)}async send(t,r){t.type=="search"&&(this.message(r,{job:t,payload:{queries:t.payload.queries,pathsIndex:this.cache.pathsIndex,count:t.payload.count}}),this.busy[r]=!0),t.type=="fastSearch"&&(this.message(r,{job:t,payload:{query:t.payload.query,pathsIndex:this.cache.pathsIndex,count:t.payload.count}}),this.busy[r]=!0)}message(t,r){this.workers[t].postMessage(r)}nextAvailableWorker(){let t=this.busy.indexOf(!1);return t==-1?void 0:t}};var gy=class{constructor(t,r,n,i,a){this.indexVersion=t;this.onChange=r;this.loadouts=[];this.kit=[Um,_2,$2,B2,R2,jwe,q2,cC,Dwe,Twe,Rwe,Bwe,Fwe,Pwe,_we,Iwe,$we,qwe,Uwe,Wwe,Mwe,Owe,P2,Wm,zwe,p5,I2,fC,Lwe,Nwe,Vwe];this.eventsDispatcher=new l0;let o={...lG,createAdd:G("add",[],()=>function(f,d){return f+d}),createEqual:G("equal",[],()=>function(f,d){return f==d}),createUnequal:G("unequal",[],()=>function(f,d){return f!=d})},l=yB(o,{matrix:"Array"});l.import(P6,{override:!0}),this.formulaContext=l,this.initialized=!1,this.spaceManager=n,this.spaceManager.superstate=this,this.ui=i,this.ui.superstate=this,this.cli=a;let u=new m5(this.cli,this);this.cli.superstate=this,this.cli.terminals.splice(0,0,u),this.cli.mainTerminal=u,this.allMetadata={},this.api=new uC(this),this.pathsIndex=new Map,this.spacesIndex=new Map,this.contextsIndex=new Map,this.actionsIndex=new Map,this.kitFrames=new Map,this.kits=new Map,this.actions=new Map,this.templateCache=new Map,this.focuses=[],this.spacesMap=new vd,this.linksMap=new vd,this.tagsMap=new vd,this.liveSpaceLinkMap=new vd,this.iconsCache=new Map,this.imagesCache=new Map,this.contextStateQueue=Promise.resolve(),this.vaultDBCache=[],this.indexer=new A5(2,this),this.searcher=new g5(1,this)}static create(t,r,n,i,a){return new gy(t,r,n,i,a)}refreshMetadata(){this.allMetadata=h5(this)}async initializeIndex(){await this.loadFromCache()}addToContextStateQueue(t){this.contextStateQueue=this.contextStateQueue.then(t).catch(()=>{})}async initialize(){if(!this.persister){console.log("Cache Persister Not Found");return}let t=Date.now();this.initializeActions(),this.initializeFocuses(),this.initializeKits(),this.initializeTemplates(),this.settings.spacesEnabled&&await this.initializeSpaces(),await this.initializeBuiltins(),await this.initializeTags(),await this.initializePaths(),await this.initializeContexts(),await this.initializeFrames(),this.refreshMetadata(),this.dispatchEvent("superstateUpdated",null),this.ui.notify(`Make.md - Superstate Loaded in ${(Date.now()-t)/1e3} seconds`,"console"),this.persister.cleanType("space"),this.persister.cleanType("path"),this.persister.cleanType("context"),this.persister.cleanType("frame")}async reloadSystemActions(){(await this.spaceManager.readSystemCommands()).forEach(r=>this.actions.set(r.name,r.commands)),this.dispatchEvent("actionStateUpdated",{path:"spaces://$actions"})}async initializeActions(){await this.reloadSystemActions();let t=this.allSpaces().filter(r=>r.type!="default").map(r=>r.space).map(r=>this.reloadActions(r));await Promise.all(t)}async initializeKits(){let t=await this.spaceManager.readAllKits();t.forEach(r=>this.kits.set(r.id,r)),t.length==0&&this.kits.set("default",{id:"default",name:"Default",colors:{},frames:[]}),this.selectedKit=this.kits.get(this.settings.selectedKit)??this.kits.get("default"),this.selectedKit.frames=[...this.selectedKit.frames,...this.kit.map(r=>AN(r)).filter(r=>!this.selectedKit.frames.some(n=>n.schema.id==r.schema.id))];for(let r of this.selectedKit.frames){let n=to(r.schema).def.id,i=await hN(this,r,{...u0,screenType:this.ui.getScreenType()});this.kitFrames.set(n,i)}this.dispatchEvent("frameStateUpdated",{path:"spaces://$kit"})}async initializeTemplates(){let t=await this.spaceManager.readAllTemplates();Object.keys(t).forEach(r=>{this.templateCache.set(r,t[r])})}async initializeSpaces(){let t=[...this.spaceManager.allSpaces().values()],r=t.map(n=>this.reloadSpace(n,null,!0));[...this.spacesIndex.keys()].filter(n=>!t.some(i=>i.path==n)).forEach(n=>this.onSpaceDeleted(n)),await Promise.all(r)}getSpaceItems(t,r){let n=[...this.spacesMap.getInverse(t)],i=this.contextsIndex.get(t)?.paths??[];return n.map((a,o)=>({...this.pathsIndex.get(a),rank:i.indexOf(a)})).filter(a=>a?.hidden!=!0&&a.path!=t)}async initializeFrames(){await this.initializeTemplates()}async initializeContexts(){await this.indexer.reload({type:"contexts",path:""}).then(async t=>{let r=[...t.entries()].map(([n,{cache:i,changed:a}])=>this.contextReloaded(n,i,a,!0));await Promise.all(r)})}async loadFromCache(){if(this.dispatchEvent("superstateReindex",null),this.settings.indexSVG){let i=await this.persister.loadAll("icon");this.spaceManager.allPaths(["svg"]).forEach(a=>{let o=i.find(s=>s.path==a);o?.cache.length>0&&this.iconsCache.set(a,o.cache)})}let t=await this.persister.loadAll("path"),r=await this.persister.loadAll("space"),n=await this.persister.loadAll("context");r.forEach(i=>{let a=dr(i.cache);a&&a.type&&this.spacesIndex.set(i.path,a)}),n.forEach(i=>{let a=dr(i.cache);a&&this.contextsIndex.set(i.path,a)}),t.forEach(i=>{let a=c5(i.cache);this.pathsIndex.set(i.path,a),this.tagsMap.set(i.path,new Set(a.tags)),this.spacesMap.set(i.path,new Set(a.spaces)),this.linksMap.set(i.path,new Set(a.outlinks))}),this.dispatchEvent("superstateUpdated",null)}dispatchEvent(t,r){this.eventsDispatcher.dispatchEvent(t,r)}async initializeBuiltins(){let r=Object.keys(cm).map(n=>this.reloadPath("spaces://$"+n,!0));await Promise.all(r)}async initializeTags(){let r=[...this.spaceManager.readTags().map(n=>$c(n))].map(n=>this.reloadPath(n,!0));await Promise.all(r)}async onSpaceDefinitionChanged(t,r){if(t.space.readOnly)return;let n=this.spacesMap.getInverse(t.path),i=[];if(t.metadata?.links&&!K0.default.isEqual(t.metadata.links,r?.links)&&i.push(...t.metadata.links),t.metadata?.filters?.length>0){let s=t.metadata.filters.some(l=>l.filters.some(u=>u.fType=="property"));if(!K0.default.isEqual(t.metadata?.filters,r?.filters)||s)for(let[l,u]of this.pathsIndex)!u.hidden&&u5(t.metadata?.filters,u,t.properties)&&i.push(l)}let o=[...K0.default.difference(i,[...n]),...K0.default.difference([...n],i)].map(s=>this.reloadPath(s,!0).then(l=>this.dispatchEvent("pathStateUpdated",{path:s})));await Promise.all(o)}async initializeFocuses(){let t=await this.spaceManager.readFocuses();if(t.length==0){this.spaceManager.saveFocuses([{name:"Home",sticker:"ui//home",paths:["/"]}]);return}this.focuses=t,this.dispatchEvent("focusesChanged",null)}async initializePaths(){this.dispatchEvent("superstateReindex",null);let t=this.spaceManager.allPaths(),r=Date.now();await this.indexer.reload({type:"paths",path:""}).then(async i=>{for await(let[a,{cache:o,changed:s}]of Object.entries(i))await this.pathReloaded(a,o,s,!1)}),this.ui.notify(`Make.md - ${t.length} Paths Cached in ${(Date.now()-r)/1e3} seconds`,"console");let n=Mr([...this.spaceManager.allSpaces().map(i=>i.path),...t]);[...this.pathsIndex.keys()].filter(i=>!n.some(a=>a==i)).forEach(i=>this.onPathDeleted(i)),this.dispatchEvent("superstateUpdated",null)}async onTagRenamed(t,r){let n=iJ(t),i=n1(this.spaceManager,r);await this.onSpaceRenamed(n,i),await this.onPathRename(n,i.path),this.dispatchEvent("spaceChanged",{path:n,newPath:i.path});let a=[];for(let[o,s]of this.spacesIndex)this.contextsIndex.get(o)?.contexts.includes(t)&&this.addToContextStateQueue(()=>Lye(this.spaceManager,t,r,a)),s.metadata?.contexts.includes(t)&&sf(this,s.space,{...s.metadata,contexts:s.metadata.contexts.map(u=>u==t?r:u)});this.dispatchEvent("spaceStateUpdated",{path:mx})}async onTagDeleted(t){this.tagsMap.getInverse(t).forEach(i=>{this.deleteTagInPath(t,i)});let r=_j(t,this.settings);await this.spaceManager.deletePath(r),this.onSpaceDeleted($c(t));for(let[i,a]of this.spacesIndex)a.metadata?.contexts.includes(t)&&sf(this,a.space,{...a.metadata,contexts:a.metadata.contexts.filter(o=>o!=t)});let n=[];for(let[i,a]of this.contextsIndex)a.contexts.includes(t)&&n.push(this.spaceManager.spaceInfoForPath(a.path));this.addToContextStateQueue(()=>zye(this.spaceManager,t,n)),this.dispatchEvent("spaceStateUpdated",{path:mx})}async deleteTagInPath(t,r){let n;if(this.pathsIndex.has(r)&&(n=this.pathsIndex.get(r)),n){let i={...n,tags:n.tags.filter(a=>a!=t),spaces:n.spaces.filter(a=>a!=$c(t))};this.pathsIndex.set(r,i),this.tagsMap.set(r,new Set(i.tags)),this.spacesMap.set(r,new Set(i.spaces))}else await this.reloadPath(r);this.onPathReloaded(r),this.dispatchEvent("pathStateUpdated",{path:r})}onMetadataChange(t){!this.pathsIndex.has(t)||this.reloadPath(t).then(r=>{let n=this.pathsIndex.get(t),i=this.spacesIndex.get(t);i&&this.reloadSpace(i.space).then(o=>this.onSpaceDefinitionChanged(o,i.metadata));let a=n.spaces.map(o=>this.spacesIndex.get(o)?.space).filter(o=>o);this.addToContextStateQueue(()=>gG(this,t,a)),this.dispatchEvent("pathStateUpdated",{path:t})})}reloadSpaceByPath(t,r){return this.reloadSpace(this.spaceManager.spaceInfoForPath(t),r)}async onPathRename(t,r){let n=r,i=this.pathsIndex.get(t),a=i?.spaces??[];if(i){this.spacesMap.delete(t),this.spacesMap.deleteInverse(t),this.linksMap.delete(t),this.linksMap.deleteInverse(t),this.pathsIndex.delete(t);let u=a.map(f=>this.spacesIndex.get(f)).filter(f=>f);await Hye(this.spaceManager,t,n,u.map(f=>f.space));for(let f of u)f.metadata?.links?.includes(t)&&this.addToContextStateQueue(()=>sy(this,f.path,"links",f.metadata.links.map(d=>d==t?r:d))),await this.reloadContext(f.space,!0);let c=[];for(let[f,d]of this.contextsIndex)d.outlinks.includes(t)&&c.push(this.spacesIndex.get(d.path).space);this.addToContextStateQueue(()=>Vye(this.spaceManager,t,n,c).then(f=>Promise.all(c.map(d=>this.reloadContext(d,!0)))))}let o=!1;this.focuses.forEach(u=>{u.paths.includes(t)&&(u.paths=u.paths.map(c=>c==t?r:c),o=!0)}),o&&(await this.spaceManager.saveFocuses(this.focuses),this.dispatchEvent("focusesChanged",null)),await this.reloadPath(r,!0);let s=Mr([...this.spacesMap.get(r)??[],...a]),l=s.map(u=>this.reloadContext(this.spacesIndex.get(u)?.space));await Promise.all(l),s.forEach(u=>this.dispatchEvent("spaceStateUpdated",{path:u})),this.dispatchEvent("pathChanged",{path:t,newPath:r}),this.ui.viewsByPath(t).forEach(u=>{u.openPath(r)})}async onPathCreated(t){await this.reloadPath(t,!0);let r=uu(t);this.spacesIndex.has(r)&&this.spacesIndex.get(r).space.notePath==t&&await this.reloadSpace(this.spacesIndex.get(r).space),this.dispatchEvent("pathCreated",{path:t})}onPathDeleted(t){this.spacesMap.delete(t),this.linksMap.delete(t),this.linksMap.deleteInverse(t),this.persister.remove(t,"path");let r=this.pathsIndex.get(t);if(!r)return;let n=(r.spaces??[]).map(a=>this.spacesIndex.get(a)?.space).filter(a=>a);this.addToContextStateQueue(()=>Qye(this.spaceManager,t,n).then(a=>n.forEach(o=>this.reloadContext(o))));let i=[];for(let[a,o]of this.contextsIndex)o.outlinks.includes(t)&&this.spacesIndex.has(o.path)&&i.push(this.spacesIndex.get(o.path).space);this.addToContextStateQueue(()=>Gye(this.spaceManager,t,i).then(a=>n.forEach(o=>this.reloadContext(o)))),(r.spaces??[]).forEach(a=>{this.dispatchEvent("spaceStateUpdated",{path:a})}),this.pathsIndex.delete(t),this.dispatchEvent("pathDeleted",{path:t})}async onSpaceRenamed(t,r){if(this.spacesIndex.has(t)){let n=this.spacesIndex.get(t).metadata;this.spacesIndex.set(r.path,{...this.spacesIndex.get(t),path:r.path,name:r.name,space:r}),this.spacesMap.rename(t,r.path),this.spacesMap.renameInverse(t,r.path),this.spacesIndex.delete(t),this.contextsIndex.delete(t),this.actionsIndex.delete(t),await this.reloadSpace(r,n).then(i=>this.onSpaceDefinitionChanged(i,n)),await this.reloadContext(r,!0),await this.reloadActions(r)}}onSpaceDeleted(t){this.spacesIndex.has(t)&&(this.spacesIndex.delete(t),this.contextsIndex.delete(t)),this.spacesMap.delete(t),this.spacesMap.deleteInverse(t),this.persister.remove(t,"space"),this.dispatchEvent("spaceDeleted",{path:t})}async reloadActions(t){if(!t)return!1;this.spaceManager.commandsForSpace(t.path).then(r=>{this.actionsIndex.set(t.path,r),this.dispatchEvent("actionStateUpdated",{path:t.path})})}async reloadContextByPath(t,r){return this.reloadContext(this.spaceManager.spaceInfoForPath(t),r)}async reloadContext(t,r){return t?this.indexer.reload({type:"context",path:t.path}).then(n=>this.contextReloaded(t.path,n.cache,n.changed,r)):!1}async contextReloaded(t,r,n,i){if(!n&&!i)return!1;this.contextsIndex.set(t,r);let a=this.pathsIndex.get(t);if(a&&r.dbExists&&!a.readOnly&&this.settings.syncFormulaToFrontmatter){let o=r.contextTable?.rows??[],s=r.contextTable?.cols??[],l=o.filter(u=>{let c=u[It],f=this.pathsIndex.get(c);return!f||f.type=="file"&&f.subtype!="md"?!1:s.reduce((d,p,h)=>d||p.type!="fileprop"||p.primary=="true"?d:u[p.name]?.length>0&&f.metadata?.property?.[p.name]!=u[p.name]?!0:d,!1)});l.length>0&&l.forEach(u=>Di(this,u[It],s.reduce((c,f,d)=>f.type=="fileprop"&&f.primary!="true"?{...c,[f.name]:u[f.name]}:c,{})))}return r.dbExists&&n&&await this.spaceManager.saveTable(t,r.contextTable),this.persister.store(t,JSON.stringify(r),"context"),this.dispatchEvent("contextStateUpdated",{path:t}),!0}allSpaces(t){return t?KK([...this.spacesIndex.values()],this.spaceOrder(),"path"):[...this.spacesIndex.values()]}spaceOrder(){return[...this.focuses.flatMap(t=>t.paths)]}async updateSpaceMetadata(t,r){let n=this.spacesIndex.get(t),i=n?.metadata;if(!n)return this.reloadSpaceByPath(t);let a=!1,s=(r?.sort??{field:"rank",asc:!0,group:!0}).field=="rank";(!K0.default.isEqual(n.metadata.links,r.links)||!K0.default.isEqual(n.metadata.filters,r.filters))&&(a=!0);let l={...n,metadata:r,contexts:r?.contexts??[],sortable:s};return this.spacesIndex.set(t,l),a&&await this.onSpaceDefinitionChanged(l,i),this.dispatchEvent("spaceStateUpdated",{path:n.path}),l}async reloadSpace(t,r,n=!0){if(!t)return;let i=r??await this.spaceManager.spaceDefForSpace(t.path),a=this.pathsIndex.get(t.path),o=this.spaceManager.uriByString(t.path);if(!o)return null;let s=this.spaceManager.spaceTypeByString(o);(s=="default"||s=="tag")&&(i.filters=[],i.links=[]);let l=[],u={},c=await this.spaceManager.readFrame(t.path,r1).then(b=>b?.cols??[]);if(l.push(...c),l.length>0){if(!a)if(this.settings.enableFolderNote){let b=await this.spaceManager.readPathCache(t.notePath);a={path:t.path,name:t.name,tags:[],spaces:[],outlinks:[],readOnly:t.readOnly,hidden:!1,metadata:b?.metadata,type:"space",subtype:s,label:b?.label}}else{let b=await this.spaceManager.readPathCache(t.path);a={path:t.path,name:t.name,tags:[],spaces:[],outlinks:[],readOnly:t.readOnly,hidden:!1,metadata:b?.metadata,type:"space",subtype:s,label:b?.label}}u=await this.spaceManager.readProperties(t.notePath).then(b=>Vm(this.formulaContext,this.pathsIndex,b,l,a))}[...this.spacesMap.get(t.path)].map(b=>this.contextsIndex.get(b)).forEach(b=>{if(b){let v=b.contextTable?.cols??[];l.push(...v),u={...u,...b.contextTable?.rows.find(x=>x[It]==t.path)??{}}}});let f=i?.sort??{field:"rank",asc:!0,group:!0},d=f.field=="rank"||!f,p=i?.contexts??[],h=Mr((i.filters??[]).flatMap(b=>b.filters).flatMap(b=>b.type=="context"?[b.field.split(".")[0]]:b.type=="path"&&b.field=="space"?mr(b.value):[])),m=Mr((i.filters??[]).flatMap(b=>b.filters).flatMap(b=>b.type.startsWith("link")?mr(b.value):[]));if(s=="tag"&&this.settings.autoAddContextsToSubtags){let b=SJ(t.name);p.push(...b)}let g=await this.spaceManager.readTemplates(t.path),A={name:t.name,space:t,path:t.path,type:s,templates:g,contexts:p.map(b=>Tg(b)),metadata:i,dependencies:h,sortable:d,properties:u,propertyTypes:l};if(this.spacesIndex.set(t.path,A),this.persister.store(t.path,JSON.stringify(A),"space"),A.metadata?.links?.forEach(b=>{_K(this,b)&&this.spacesMap.set(b,new Set([...this.spacesMap.get(b),t.path]))}),n)return this.dispatchEvent("spaceStateUpdated",{path:t.path}),A}async pathReloaded(t,r,n,i){if(this.pathsIndex.set(t,r),await this.onPathReloaded(t),(r.subtype=="image"||r.metadata?.file?.extension=="svg")&&this.imagesCache.set(r.metadata.file.filename,t),!n&&!i)return!1;if(this.tagsMap.set(t,new Set(r.tags)),this.linksMap.set(t,new Set(r.outlinks)),!K0.default.isEqual(r.spaces,Array.from(this.spacesMap.get(t)))){this.spacesMap.set(t,new Set(r.spaces));let a=r.tags.map(s=>this.spacesIndex.has($c(s))?null:n1(this.spaceManager,s)).filter(s=>s).map(async s=>{await this.reloadSpace(s),this.reloadContext(s),await this.reloadPath(s.path)});Promise.all(a).then(s=>{this.dispatchEvent("spaceStateUpdated",{path:mx})})}if(i){let a=r.spaces.map(o=>this.spacesIndex.get(o)?.space).filter(o=>o);this.addToContextStateQueue(()=>gG(this,t,a).then(o=>{a.forEach(s=>{this.dispatchEvent("spaceStateUpdated",{path:s.path})})}))}r.metadata?.file?.extension=="svg"&&this.settings.indexSVG&&this.spaceManager.readPath(t).then(a=>{this.iconsCache.set(t,a),this.persister.store(t,a,"icon")})}async reloadPath(t,r){return t?this.indexer.reload({type:"path",path:t}).then(async n=>(await this.pathReloaded(t,n.cache,n.changed,r),!0)):!1}async onPathReloaded(t){let r;if(this.pathsIndex.has(t)&&(r=this.pathsIndex.get(t)),!r)return!1;await this.persister.store(t,kwe(r),"path")}};var vy=class{constructor(){this.filesystems=[];this.filetypes=[];this.eventDispatch=new l0}static create(){return new vy}resolvePath(t,r){return this.primary.resolvePath(t,r)}keysForCacheType(t){return this.primary.keysForCacheType(t)}allTags(){return this.primary.readAllTags()}fileFragmentChanged(t){this.eventDispatch.dispatchEvent("onFileFragmentChanged",{file:t})}initiateFileSystemAdapter(t,r){t.initiate(this),r&&(this.primary=t),this.filesystems.push(t)}initiateFiletypeAdapter(t){t.initiate(this),this.filetypes.push(t)}filetypeAdaptersForFile(t){return t?this.filetypes.filter(r=>r.supportedFileTypes.includes(t.extension)):[]}filetypeAdaptersForFileFragments(t,r){return this.filetypeAdaptersForFile(t).filter(n=>n.contentTypes?n.contentTypes(t).includes(r):!1)}getFileCacheTypeByRefString(t,r){return this.filetypeAdaptersForFile(t).reduce((i,a)=>i||a.getCacheTypeByRefString(t,r),null)}allCaches(){return this.primary.cache}allFiles(){return this.primary.allFiles()}resourcePathForPath(t){return this.adapterForPath(t).resourcePathForPath(t)}parentPathForPath(t){return this.adapterForPath(t).parentPathForPath(t)}async createFileCache(t){let r=await this.getFile(t);for(let n of this.filetypeAdaptersForFile(r))n.parseCache&&await n.parseCache(r,!1)}getFileCache(t){return this.adapterForPath(t).getFileCache(t)}getFileContent(t,r,n){let i=this.filetypeAdaptersForFile(t).filter(a=>a.contentTypes(t).includes(r));if(i.length>=1)return i[0].readContent(t,r,n)}updateFileCache(t,r,n){this.adapterForPath(t).updateFileCache(t,r,n)}readFileFragments(t,r,n){let i=this.filetypeAdaptersForFileFragments(t,r);if(i.length>=1)return i[0].readContent(t,r,n)}async newFile(t,r,n,i){let a=this.filetypes.find(o=>o.supportedFileTypes.includes(n));if(a)return a.newFile(t,r,n,i)}newFileFragment(t,r,n,i,a){let o=this.filetypeAdaptersForFileFragments(t,r);if(o.length>=1)return o[0].newContent(t,r,n,i,a)}saveFileLabel(t,r,n){let i=this.filetypeAdaptersForFileFragments(t,"label");return i.length>=1?i[0].saveContent(t,"label",r,()=>n):this.primary.updateFileLabel(t.path,r,n)}saveFileFragment(t,r,n,i){let a=this.filetypeAdaptersForFileFragments(t,r);return a.length>=1?a[0].saveContent(t,r,n,i):!1}deleteFileFragment(t,r,n){let i=this.filetypeAdaptersForFileFragments(t,r);if(i.length>=1)return i[0].deleteContent(t,r,n)}onCreate(t){this.eventDispatch.dispatchEvent("onCreate",{file:t})}onModify(t){this.eventDispatch.dispatchEvent("onModify",{file:t})}onRename(t,r){this.eventDispatch.dispatchEvent("onRename",{file:t,oldPath:r})}onDelete(t){this.eventDispatch.dispatchEvent("onDelete",{file:t})}onSpaceUpdated(t,r){this.eventDispatch.dispatchEvent("onSpaceUpdated",{path:t,type:r})}onFocusesUpdated(){this.eventDispatch.dispatchEvent("onFocusesUpdated",null)}adapterForPath(t){return this.primary}async getRoot(){return this.adapterForPath().getRoot()}async copyFile(t,r,n){return this.adapterForPath(t).copyFile(t,r,n)}async writeTextToFile(t,r){return this.adapterForPath(t).writeTextToFile(t,r)}async readTextFromFile(t){return this.adapterForPath(t).readTextFromFile(t)}async writeBinaryToFile(t,r){return this.adapterForPath(t).writeBinaryToFile(t,r)}async readBinaryToFile(t){return this.adapterForPath(t).readBinaryToFile(t)}async renameFile(t,r){return this.adapterForPath(t).renameFile(t,r)}async createFolder(t){return this.adapterForPath(t).createFolder(t)}async childrenForFolder(t,r){return this.adapterForPath(t).childrenForFolder(t,r)}async fileExists(t){return this.adapterForPath(t).fileExists(t)}async getFile(t,r){return this.adapterForPath(t).getFile(t,r)}async deleteFile(t){return this.adapterForPath(t).deleteFile(t)}async addTagToFile(t,r){return this.adapterForPath(t).addTagToFile(t,r)}async renameTagForFile(t,r,n){return this.adapterForPath(t).renameTagForFile(t,r,n)}async removeTagFromFile(t,r){return this.adapterForPath(t).removeTagFromFile(t,r)}filesForTag(t){return this.primary.filesForTag(t)}};var RH=(e,t)=>e.skipFolderNames.some(r=>t.endsWith(r))||t.endsWith("/"+e.spaceSubFolder)||t==e.spaceSubFolder||t.split("/").pop()==e.spaceSubFolder||t.startsWith(e.spacesFolder+"/#")||t.startsWith(e.spacesFolder+"/$")||e.skipFolders.some(r=>r==t);var mC="templates",hC="kits",AC="actions",gC="waypoints.json",vC=class{constructor(t,r){this.fileSystem=t;this.dataPath=r;this.schemes=["spaces","vault"];this.onFocusesUpdated=()=>{this.spaceManager.onFocusesUpdated()};this.onSpaceUpdated=t=>{t.type=="views.mdb"?this.spaceManager.onSpaceUpdated(t.path,"frame"):t.type=="context.mdb"?this.spaceManager.onSpaceUpdated(t.path,"context"):t.type=="commands.mdb"&&this.spaceManager.onSpaceUpdated(t.path,"action")};this.onCreate=async t=>{t.file.isFolder?this.spaceManager.onSpaceCreated(t.file.path):this.spaceManager.onPathCreated(t.file.path)};this.onDelete=t=>{!t.file||(!t.file.isFolder&&t.file.extension!="mdb"?this.spaceManager.onPathDeleted(t.file.path):t.file.isFolder&&this.spaceManager.onSpaceDeleted(t.file.path))};this.onRename=t=>{!t.file||(!t.file.isFolder&&t.file.extension!="mdb"?this.spaceManager.onPathChanged(t.file.path,t.oldPath):t.file.isFolder&&this.spaceManager.onSpaceRenamed(t.file.path,t.oldPath))};this.authorities=["vault"];t.eventDispatch.addListener("onCreate",this.onCreate,0,this),t.eventDispatch.addListener("onRename",this.onRename,0,this),t.eventDispatch.addListener("onDelete",this.onDelete,0,this),t.eventDispatch.addListener("onFocusesUpdated",this.onFocusesUpdated,0,this),t.eventDispatch.addListener("onSpaceUpdated",this.onSpaceUpdated,0,this),t.eventDispatch.addListener("onCacheUpdated",this.onMetadataChange,0,this)}initiateAdapter(t){this.spaceManager=t}async readTemplates(t){return(await this.childrenForPath(`${t}/${this.spaceManager.superstate.settings.spaceSubFolder}/templates`)).filter(r=>!r.startsWith(".")).map(r=>r.split("/").pop())}async saveTemplate(t,r){return this.copyPath(t,`${r}/${this.spaceManager.superstate.settings.spaceSubFolder}/templates`)}deleteTemplate(t,r){return this.deletePath(`${r}/${this.spaceManager.superstate.settings.spaceSubFolder}/templates/${t}`)}async readFocuses(){return await this.fileSystem.fileExists(this.dataPath)||await this.fileSystem.createFolder(this.dataPath),await this.fileSystem.fileExists(`${this.dataPath}/${gC}`)?this.fileSystem.readTextFromFile(`${this.dataPath}/${gC}`).then(t=>Zs(dr(t))):[]}async saveFocuses(t){return await this.fileSystem.fileExists(this.dataPath)||await this.fileSystem.createFolder(this.dataPath),this.fileSystem.writeTextToFile(`${this.dataPath}/${gC}`,JSON.stringify(t))}async readTemplate(t){let r=`${this.dataPath}/${mC}/${t}`;if(await this.fileSystem.fileExists(r))return this.fileSystem.readFileFragments({path:`${r}/${this.spaceManager.superstate.settings.spaceSubFolder}/views.mdb`,name:"views",filename:"views.mdb",parent:r,isFolder:!1,extension:"mdb"},"mdbTables")}async readAllKits(){let t=(await this.childrenForPath(`${this.dataPath}/${hC}`)).map(n=>n.split("/").pop());return Promise.all(t.map(async n=>{let i=await this.readKitFrames(n);return{id:n,name:n,colors:{},frames:Object.values(i??{})}}))}async readAllTemplates(){let t=(await this.childrenForPath(`${this.dataPath}/${mC}`)).map(n=>n.split("/").pop()),r={};for(let n of t){let i=await this.readTemplate(n);i&&(r[n]=i)}return r}async readKitFrames(t){return this.fileSystem.readFileFragments({path:`${this.dataPath}/${hC}/${t}/kit.mdb`,name:"kit",filename:"kit.mdb",parent:`${this.dataPath}/${hC}/${t}`,isFolder:!1,extension:"mdb"},"mdbTables")}async saveFrameKit(t,r){let n={path:`${this.dataPath}/${hC}/${r}/kit.mdb`,name:"kit",filename:"kit.mdb",parent:`${this.dataPath}/${hC}/${r}`,isFolder:!1,extension:"mdb"};await this.fileSystem.saveFileFragment(n,"schema",t.schema.id,()=>t.schema),this.fileSystem.saveFileFragment(n,"mdbFrame",t.schema.id,()=>t)}async saveSpaceTemplate(t,r){let n=r;if(await this.fileSystem.fileExists(`${this.dataPath}/${mC}`)){let i=await this.childrenForPath(`${this.dataPath}/${mC}/${r}`);n=Mi(n,i)}await this.fileSystem.newFile(`${this.dataPath}/${mC}/${n}/${this.spaceManager.superstate.settings.spaceSubFolder}`,"view","mdb",t)}async onMetadataChange(t){if(!t.path)return;if(t.path.endsWith(".json")){let n=t.path.split("/").slice(0,-2).join("/");this.spaceManager.onPathPropertyChanged(n);return}let r=this.spaceManager.superstate.pathsIndex.get(t.path);if(r?.metadata.spacePath?.length>0){this.spaceManager.onPathPropertyChanged(r?.metadata.spacePath);return}this.spaceManager.onPathPropertyChanged(t.path)}uriByPath(t){return this.spaceManager.uriByString(t)}allPaths(t){return[...this.fileSystem.allFiles().filter(r=>t?t.some(n=>n=="folder"?r.isFolder:r.extension==n):!0).map(r=>r.path).filter(r=>!RH(this.spaceManager.superstate.settings,r))]}async pathExists(t){return this.fileSystem.fileExists(t)}async createItemAtPath(t,r,n,i){let a=await this.getPathInfo(t);if(!a)await this.fileSystem.createFolder(t);else if(!a?.isFolder){let o=await this.fileSystem.getFile(t);return o?this.fileSystem.newFileFragment(o,r,n,i)?.then(s=>o.path):null}return this.fileSystem.newFile(t,n,r,i).then(o=>o?.path)}async renamePath(t,r){let n=this.uriByPath(t),i=this.uriByPath(r),a=await this.fileSystem.getFile(n.path);if(n.refStr){let o=await this.fileSystem.getFileCacheTypeByRefString(a,n.refStr);return await this.fileSystem.saveFileFragment(a,o,n.refStr,()=>i.refStr),r}return await this.fileSystem.renameFile(t,r)}async deletePath(t){let r=this.uriByPath(t);if(r.refStr){let n=await this.fileSystem.getFile(r.path),i=await this.fileSystem.getFileCacheTypeByRefString(n,r.refStr);return this.fileSystem.deleteFileFragment(n,i,r.refStr)}return this.fileSystem.deleteFile(t)}async getPathInfo(t){let r=this.uriByPath(t),n=await this.fileSystem.getFile(r.path);if(r.refStr){let i=this.fileSystem.getFileCacheTypeByRefString(n,r.refStr)}return n}keysForCacheType(t){return this.fileSystem.keysForCacheType(t)}async readPathCache(t){let r=this.uriByPath(t);if(r.scheme=="spaces"){if(r.authority.charAt(0)=="$"){let n=Object.keys(cm).find(i=>i==r.authority.slice(1));if(n)return{file:null,metadata:null,label:{name:cm[n].name,sticker:cm[n].icon,color:""},readOnly:!1,type:"space",parent:"",tags:[]}}if(r.authority.charAt(0)=="#")return{file:null,metadata:null,label:{name:r.authority,sticker:"",color:""},type:"space",parent:"",tags:[],readOnly:!1}}return t=="/"?{file:{name:this.spaceManager.superstate.settings.systemName,path:"/",isFolder:!0},metadata:{},label:{name:this.spaceManager.superstate.settings.systemName,sticker:"",color:""},type:"space",subtype:"folder",parent:"",tags:[],readOnly:!1}:this.fileSystem.getFileCache(t)}async readPath(t){let r=this.uriByPath(t),n=await this.fileSystem.getFile(r.path);if(r.refStr){let i=this.fileSystem.getFileCacheTypeByRefString(n,r.refStr);this.fileSystem.getFileContent(n,i,r.refStr)}return this.fileSystem.readTextFromFile(t)}async copyPath(t,r,n){let i=this.uriByPath(t),a=await this.fileSystem.getFile(i.path);return this.fileSystem.copyFile(a.path,r,n)}async writeToPath(t,r,n){let i=this.uriByPath(t),a=await this.fileSystem.getFile(i.path);if(i.refStr){let o=this.fileSystem.getFileCacheTypeByRefString(a,i.refStr);this.fileSystem.saveFileFragment(a,o,i.refStr,()=>r)}return n?this.fileSystem.writeBinaryToFile(t,r):this.fileSystem.writeTextToFile(t,r)}async childrenForPath(t,r){return await this.fileSystem.fileExists(t)?this.fileSystem.childrenForFolder(t,r):[]}parentPathForPath(t){return this.fileSystem.parentPathForPath(t)}async readFrame(t,r){let n=await this.fileSystem.getFile(this.spaceInfoForPath(t).framePath);if(!n){let i=this.defaultFrame(t);if(Object.keys(i).some(a=>a==r))return i[r]}return this.fileSystem.readFileFragments(n,"mdbTable",r)}async readAllFrames(t){let r=await this.fileSystem.getFile(this.spaceInfoForPath(t).framePath);return r?this.fileSystem.readFileFragments(r,"mdbTables"):this.defaultFrame(t)}async readTable(t,r){let n=this.spaceInfoForPath(t),i=await this.fileSystem.getFile(n.dbPath);if(!i&&r==um.id){let o=px(this.spaceManager.superstate,n),s=dC(o.cols),l=o.rows.map(u=>Vm(this.spaceManager.superstate.formulaContext,this.spaceManager.superstate.pathsIndex,u,o.cols,this.spaceManager.superstate.pathsIndex.get(t),s));return{...o,rows:l}}let a=await this.fileSystem.readFileFragments(i,"mdbTable",r);if(a&&a.schema.id!=um.id){let o=dC(a.cols),s=a.rows.map(l=>Vm(this.spaceManager.superstate.formulaContext,this.spaceManager.superstate.pathsIndex,l,a.cols,this.spaceManager.superstate.pathsIndex.get(t),o));return{...a,rows:s}}else if(!a&&r==um.id){let o=px(this.spaceManager.superstate,n),s=dC(o.cols),l=o.rows.map(u=>Vm(this.spaceManager.superstate.formulaContext,this.spaceManager.superstate.pathsIndex,u,o.cols,this.spaceManager.superstate.pathsIndex.get(t),s));return{...o,rows:l}}return a}async spaceInitiated(t){return!0}async contextInitiated(t){let r=this.spaceInfoForPath(t);return!!await this.fileSystem.getFile(r.dbPath)}async tablesForSpace(t){let r=this.spaceInfoForPath(t),n=await this.fileSystem.getFile(r.dbPath);if(!n)return Gh.rows;let i=await this.fileSystem.readFileFragments(n,"schemas",null);return i.length==0?Gh.rows:i}defaultDBTablesForContext(t){let r=px(this.spaceManager.superstate,t),n=P$(t);return{...gJ(t),m_fields:{uniques:n.uniques,cols:n.cols,rows:[...n.rows??[],...r.cols]},[r.schema.id]:{uniques:r.cols.filter(a=>a.unique=="true").map(a=>a.name),cols:r.cols.map(a=>a.name),rows:r.rows}}}defaultFrame(t){return t.startsWith(Fg)&&t==Fg+"overview"?Voe:this.spaceManager.superstate.settings.defaultSpaceTemplate.length>0&&this.spaceManager.superstate.templateCache.has(this.spaceManager.superstate.settings.defaultSpaceTemplate)?this.spaceManager.superstate.templateCache.get(this.spaceManager.superstate.settings.defaultSpaceTemplate):this.spaceManager.superstate.settings.enableFolderNote?Goe:Hoe}async createDefaultTable(t){let r=this.spaceInfoForPath(t),n=this.spaceInfoForPath(t).dbPath,i=n.split(".").pop(),a=n.split("/").slice(0,-1).join("/"),o=n.split("/").pop().split(".")[0];return this.fileSystem.newFile(a,o,i,this.defaultDBTablesForContext(r))}async createDefaultFrames(t){let r=this.defaultFrame(t),n={...l6(r),m_schema:mJ},i=this.spaceInfoForPath(t).framePath,a=i.split(".").pop(),o=i.split("/").slice(0,-1).join("/"),s=i.split("/").pop().split(".")[0];return this.fileSystem.newFile(o,s,a,n)}async createTable(t,r){let n=await this.fileSystem.getFile(this.spaceInfoForPath(t).dbPath);return n||(n=await this.createDefaultTable(t)),this.fileSystem.newFileFragment(n,"schema",r.id,r)}async saveTableSchema(t,r,n){let i=await this.fileSystem.getFile(this.spaceInfoForPath(t).dbPath);return i||(i=await this.createDefaultTable(t)),this.fileSystem.saveFileFragment(i,"schema",r,n)}async saveTable(t,r,n){let i=await this.fileSystem.getFile(this.spaceInfoForPath(t).dbPath);if(!i)if(n)i=await this.createDefaultTable(t);else return!1;return this.fileSystem.saveFileFragment(i,"mdbTable",r.schema.id,()=>r)}async deleteTable(t,r){let n=await this.fileSystem.getFile(this.spaceInfoForPath(t).dbPath);return this.fileSystem.deleteFileFragment(n,"schema",r)}async readAllTables(t){let r=this.spaceInfoForPath(t),n=await this.fileSystem.getFile(r.dbPath);if(!n){let i=px(this.spaceManager.superstate,r);return{[i.schema.id]:i}}return this.fileSystem.readFileFragments(n,"mdbTables",null)}async framesForSpace(t){let r=await this.fileSystem.getFile(this.spaceInfoForPath(t).framePath);if(!r){let n=this.defaultFrame(t);return Object.values(n).map(i=>i.schema)}return this.fileSystem.readFileFragments(r,"schemas",null)}async createFrame(t,r){let n=await this.fileSystem.getFile(this.spaceInfoForPath(t).framePath);return n||(n=await this.createDefaultFrames(t)),this.fileSystem.newFileFragment(n,"schema",r.id,r)}async deleteFrame(t,r){let n=await this.fileSystem.getFile(this.spaceInfoForPath(t).framePath);return this.fileSystem.deleteFileFragment(n,"schema",r)}async saveFrameSchema(t,r,n){let i=await this.fileSystem.getFile(this.spaceInfoForPath(t).framePath);return i||(i=await this.createDefaultFrames(t)),this.fileSystem.saveFileFragment(i,"schema",r,n)}async saveFrame(t,r){let n=await this.fileSystem.getFile(this.spaceInfoForPath(t).framePath);return n||(n=await this.createDefaultFrames(t)),this.fileSystem.saveFileFragment(n,"mdbFrame",r.schema.id,()=>r)}async createDefaultCommands(t){let r={m_fields:{uniques:Ji.uniques,cols:Ji.cols,rows:[]},m_schema:{uniques:[],cols:["id","name","type","def","predicate","primary"],rows:[]}},n=this.spaceInfoForPath(t).commandsPath,i=n.split(".").pop(),a=n.split("/").slice(0,-1).join("/"),o=n.split("/").pop().split(".")[0];return this.fileSystem.newFile(a,o,i,r)}async commandsForSpace(t){let r=await this.fileSystem.getFile(this.spaceInfoForPath(t).commandsPath);return r?this.fileSystem.readFileFragments(r,"mdbCommands",null):[]}async runCommand(t,r,n){let i=await this.fileSystem.getFile(this.spaceInfoForPath(t).commandsPath);if(!i)return{result:null,error:"No commands file found"};let a=await this.fileSystem.readFileFragments(i,"mdbCommand",r);if(!a)return{result:null,error:"No command found"};let o,s;try{a.schema.type=="script"&&(o=C2(a.code,n)),a.schema.type=="formula"&&(o=md(this.spaceManager.superstate.formulaContext,this.spaceManager.superstate.pathsIndex,a.code,a.fields.reduce((l,u)=>({...l,[u.name]:u}),{}),n,this.spaceManager.superstate.pathsIndex.get(t)))}catch(l){s=l}return{result:o,error:s}}async createCommand(t,r){let n=await this.fileSystem.getFile(this.spaceInfoForPath(t).commandsPath);return n||(n=await this.createDefaultCommands(t)),this.fileSystem.newFileFragment(n,"schema",r.id,r)}async readSystemCommands(){let t=(await this.childrenForPath(`${this.dataPath}/${AC}`,"folder")).map(n=>n.split("/").pop());return Promise.all(t.map(async n=>{let i=await this.readLibraryCommands(n);return{name:n,commands:Object.values(i??{})}}))}async readLibraryCommands(t){return this.fileSystem.readFileFragments({path:`${this.dataPath}/${AC}/${t}/commands.mdb`,name:"commands",filename:"commands.mdb",parent:`${this.dataPath}/${AC}/${t}`,isFolder:!1,extension:"mdb"},"mdbCommands")}async saveSystemCommand(t,r){let n={path:`${this.dataPath}/${AC}/${t}/commands.mdb`,name:"commands",filename:"commands.mdb",parent:`${this.dataPath}/${AC}/${t}`,isFolder:!1,extension:"mdb"};if(r)await this.fileSystem.saveFileFragment(n,"schema",r.schema.id,()=>r.schema),await this.fileSystem.saveFileFragment(n,"mdbCommand",r.schema.id,()=>r);else{let i={m_fields:{uniques:Ji.uniques,cols:Ji.cols,rows:[]},m_schema:{uniques:[],cols:["id","name","type","def","predicate","primary"],rows:[]}},a=n.path,o=a.split(".").pop(),s=a.split("/").slice(0,-1).join("/"),l=a.split("/").pop().split(".")[0];await this.fileSystem.newFile(s,l,o,i)}}async deleteCommand(t,r){let n=await this.fileSystem.getFile(this.spaceInfoForPath(t).commandsPath);return this.fileSystem.deleteFileFragment(n,"mdbCommand",r)}async saveCommand(t,r,n){let i=await this.fileSystem.getFile(this.spaceInfoForPath(t).commandsPath);return i||(i=await this.createDefaultCommands(t)),this.fileSystem.saveFileFragment(i,"mdbCommand",r,n)}async contextForSpace(t){let r=await this.fileSystem.getFile(this.spaceInfoForPath(t).dbPath);return r?this.fileSystem.readFileFragments(r,"mdbTable",Nr):px(this.spaceManager.superstate,this.spaceInfoForPath(t))}async addSpaceProperty(t,r){let n=await this.fileSystem.getFile(this.spaceInfoForPath(t)?.dbPath);return n||await this.createDefaultTable(t),this.fileSystem.newFileFragment(n,"field",r.name,r)}async deleteSpaceProperty(t,r){let n=await this.fileSystem.getFile(this.spaceInfoForPath(t).dbPath);return this.fileSystem.deleteFileFragment(n,"field",r)}async saveSpaceProperty(t,r,n){let i=await this.fileSystem.getFile(this.spaceInfoForPath(t).dbPath);return i||await this.createDefaultTable(t),this.fileSystem.saveFileFragment(i,"field",n,a=>({...a,...r}))}async addProperty(t,r){let n=await this.fileSystem.getFile(t);this.fileSystem.newFileFragment(n,"property",r.name,r)}async saveProperties(t,r){let n=await this.fileSystem.getFile(t);return this.fileSystem.saveFileFragment(n,"property",null,i=>({...i,...r}))}async readLabel(t){let r=this.fileSystem.getFileCache(t)?.label;if(!r){let n=await this.fileSystem.getFile(t);return n?this.fileSystem.readFileFragments(n,"label",null):{}}return r}async saveLabel(t,r,n){if(this.spaceManager.superstate.spacesIndex.has(t)){let a=this.spaceInfoForPath(t),o=await this.fileSystem.getFile(a.defPath),s=await this.fileSystem.getFile(a.notePath);if(this.spaceManager.superstate.settings.enableFolderNote)s||(s=await this.fileSystem.newFile(a.folderPath,a.name,"md"));else{if(!o){let l=this.spaceInfoForPath(t).defPath,u=l.split(".").pop(),c=l.split("/").slice(0,-1).join("/"),f=l.split("/").pop().split(".")[0];o=await this.fileSystem.newFile(c,f,u)}s=o}await this.fileSystem.saveFileLabel(s,r,n);return}let i=await this.fileSystem.getFile(t);this.fileSystem.saveFileLabel(i,r,n)}async renameProperty(t,r,n){let i=await this.fileSystem.getFile(t);this.fileSystem.saveFileFragment(i,"property",null,a=>{let{[r]:o,...s}=a;return o?{...s,[n]:o}:a})}async readProperties(t){let r=await this.fileSystem.getFile(t);return this.fileSystem.readFileFragments(r,"property",null)}async deleteProperty(t,r){let n=await this.fileSystem.getFile(t);this.fileSystem.deleteFileFragment(n,"property",r)}allSpaces(){let t=Object.keys(cm).map(o=>this.spaceManager.spaceInfoForPath(`spaces://$${o}`)),r=()=>this.readTags().map(o=>n1(this.spaceManager,Jj(o)))??[],n=()=>this.allPaths(["folder"]).filter(s=>!RH(this.spaceManager.superstate.settings,s)).map(s=>IE(this.spaceManager,s)),i=this.spaceManager.superstate.settings.enableDefaultSpaces?r():[],a=n();return[...t,...i,...a]}readTags(){return this.fileSystem.allTags()}spaceInfoForPath(t){return kJ(this.spaceManager,t)}allCaches(){return this.fileSystem.allCaches()}async spaceDefForSpace(t){let r=this.spaceInfoForPath(t);if(!r)return null;let n=r.defPath?await this.fileSystem.readTextFromFile(r.defPath):null;if(!n){let a=await this.fileSystem.getFile(r.notePath),s=(a?this.fileSystem.getFileCache(a.path)?.frontmatter:null)??{};return B6(s,this.spaceManager.superstate.settings)}let i=dr(n)??{};return B6(i,this.spaceManager.superstate.settings)}async createSpace(t,r,n){let i=this.spaceInfoForPath(r),a=i.folderPath=="/"?t:i.folderPath+"/"+t;if(await this.fileSystem.createFolder(a),Object.keys(n??{}).length>0)return this.saveSpace(a,()=>n)}async saveSpace(t,r,n){let i=r(await this.spaceDefForSpace(t))??{},a=this.spaceInfoForPath(t),o=await this.fileSystem.getFile(a.defPath);if(!o){let l=this.spaceInfoForPath(t).defPath,u=l.split(".").pop(),c=l.split("/").slice(0,-1).join("/"),f=l.split("/").pop().split(".")[0];o=await this.fileSystem.newFile(c,f,u)}let s=await this.fileSystem.getFile(a.notePath);this.spaceManager.superstate.settings.enableFolderNote?s||(s=await this.fileSystem.newFile(a.folderPath,Lc(a.notePath),"md")):s=o,n&&await this.fileSystem.saveFileFragment(s,"property",null,l=>({...l,...n??{}})),await this.fileSystem.saveFileFragment(o,"definition",null,l=>({[qE]:i.filters,[BE]:i.contexts,[LE]:i.links,[zE]:i.sort,[RE]:i.template,[$E]:i.templateName,[eO]:i.recursive}))}renameSpace(t,r){let n=this.spaceInfoForPath(t),i=this.spaceInfoForPath(r);return this.fileSystem.renameFile(n.folderPath,i.folderPath).then(a=>(this.spaceManager.superstate.settings.enableFolderNote&&this.fileSystem.renameFile(Rf(n.notePath,i.path),i.notePath),a))}deleteSpace(t){let r=this.spaceInfoForPath(t),n=n1(this.spaceManager,r.name);this.fileSystem.deleteFile(n.folderPath)}childrenForSpace(t){return this.fileSystem.allFiles().filter(r=>r.parent==t).map(r=>r.path)}addTag(t,r){this.fileSystem.addTagToFile(t,r)}renameTag(t,r,n){this.fileSystem.renameTagForFile(t,r,n)}deleteTag(t,r){this.fileSystem.removeTagFromFile(t,r)}pathsForTag(t){return this.fileSystem.filesForTag(t)}resolvePath(t,r){return this.fileSystem.resolvePath(t,r)}};var pf=ge(Te());function _A(e){return Array.isArray?Array.isArray(e):r2e(e)==="[object Array]"}var lYe=1/0;function uYe(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-lYe?"-0":t}function cYe(e){return e==null?"":uYe(e)}function Gm(e){return typeof e=="string"}function e2e(e){return typeof e=="number"}function fYe(e){return e===!0||e===!1||dYe(e)&&r2e(e)=="[object Boolean]"}function t2e(e){return typeof e=="object"}function dYe(e){return t2e(e)&&e!==null}function df(e){return e!=null}function $H(e){return!e.trim().length}function r2e(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var pYe="Incorrect 'index' type",mYe=e=>`Invalid value for key ${e}`,hYe=e=>`Pattern length exceeds max of ${e}.`,AYe=e=>`Missing ${e} property in key`,gYe=e=>`Property 'weight' in key '${e}' must be a positive integer`,Ywe=Object.prototype.hasOwnProperty,qH=class{constructor(t){this._keys=[],this._keyMap={};let r=0;t.forEach(n=>{let i=n2e(n);this._keys.push(i),this._keyMap[i.id]=i,r+=i.weight}),this._keys.forEach(n=>{n.weight/=r})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function n2e(e){let t=null,r=null,n=null,i=1,a=null;if(Gm(e)||_A(e))n=e,t=Zwe(e),r=LH(e);else{if(!Ywe.call(e,"name"))throw new Error(AYe("name"));let o=e.name;if(n=o,Ywe.call(e,"weight")&&(i=e.weight,i<=0))throw new Error(gYe(o));t=Zwe(o),r=LH(o),a=e.getFn}return{path:t,id:r,weight:i,src:n,getFn:a}}function Zwe(e){return _A(e)?e:e.split(".")}function LH(e){return _A(e)?e.join("."):e}function vYe(e,t){let r=[],n=!1,i=(a,o,s)=>{if(!!df(a))if(!o[s])r.push(a);else{let l=o[s],u=a[l];if(!df(u))return;if(s===o.length-1&&(Gm(u)||e2e(u)||fYe(u)))r.push(cYe(u));else if(_A(u)){n=!0;for(let c=0,f=u.length;ce.score===t.score?e.idx{this._keysMap[r.id]=n})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Gm(this.docs[0])?this.docs.forEach((t,r)=>{this._addString(t,r)}):this.docs.forEach((t,r)=>{this._addObject(t,r)}),this.norm.clear())}add(t){let r=this.size();Gm(t)?this._addString(t,r):this._addObject(t,r)}removeAt(t){this.records.splice(t,1);for(let r=t,n=this.size();r{let o=i.getFn?i.getFn(t):this.getFn(t,i.path);if(!!df(o)){if(_A(o)){let s=[],l=[{nestedArrIndex:-1,value:o}];for(;l.length;){let{nestedArrIndex:u,value:c}=l.pop();if(!!df(c))if(Gm(c)&&!$H(c)){let f={v:c,i:u,n:this.norm.get(c)};s.push(f)}else _A(c)&&c.forEach((f,d)=>{l.push({nestedArrIndex:d,value:f})})}n.$[a]=s}else if(Gm(o)&&!$H(o)){let s={v:o,n:this.norm.get(o)};n.$[a]=s}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}};function i2e(e,t,{getFn:r=$r.getFn,fieldNormWeight:n=$r.fieldNormWeight}={}){let i=new yC({getFn:r,fieldNormWeight:n});return i.setKeys(e.map(n2e)),i.setSources(t),i.create(),i}function kYe(e,{getFn:t=$r.getFn,fieldNormWeight:r=$r.fieldNormWeight}={}){let{keys:n,records:i}=e,a=new yC({getFn:t,fieldNormWeight:r});return a.setKeys(n),a.setIndexRecords(i),a}function v5(e,{errors:t=0,currentLocation:r=0,expectedLocation:n=0,distance:i=$r.distance,ignoreLocation:a=$r.ignoreLocation}={}){let o=t/e.length;if(a)return o;let s=Math.abs(n-r);return i?o+s/i:s?1:o}function CYe(e=[],t=$r.minMatchCharLength){let r=[],n=-1,i=-1,a=0;for(let o=e.length;a=t&&r.push([n,i]),n=-1)}return e[a-1]&&a-n>=t&&r.push([n,a-1]),r}var yy=32;function DYe(e,t,r,{location:n=$r.location,distance:i=$r.distance,threshold:a=$r.threshold,findAllMatches:o=$r.findAllMatches,minMatchCharLength:s=$r.minMatchCharLength,includeMatches:l=$r.includeMatches,ignoreLocation:u=$r.ignoreLocation}={}){if(t.length>yy)throw new Error(hYe(yy));let c=t.length,f=e.length,d=Math.max(0,Math.min(n,f)),p=a,h=d,m=s>1||l,g=m?Array(f):[],A;for(;(A=e.indexOf(t,h))>-1;){let k=v5(t,{currentLocation:A,expectedLocation:d,distance:i,ignoreLocation:u});if(p=Math.min(k,p),h=A+c,m){let M=0;for(;M=C;R-=1){let q=R-1,B=r[e.charAt(q)];if(m&&(g[q]=+!!B),D[R]=(D[R+1]<<1|1)&B,k&&(D[R]|=(b[R+1]|b[R])<<1|1|b[R+1]),D[R]&w&&(v=v5(t,{errors:k,currentLocation:q,expectedLocation:d,distance:i,ignoreLocation:u}),v<=p)){if(p=v,h=q,h<=d)break;C=Math.max(1,2*d-h)}}if(v5(t,{errors:k+1,currentLocation:d,expectedLocation:d,distance:i,ignoreLocation:u})>p)break;b=D}let S={isMatch:h>=0,score:Math.max(.001,v)};if(m){let k=CYe(g,s);k.length?l&&(S.indices=k):S.isMatch=!1}return S}function jYe(e){let t={};for(let r=0,n=e.length;r{this.chunks.push({pattern:d,alphabet:jYe(d),startIndex:p})},f=this.pattern.length;if(f>yy){let d=0,p=f%yy,h=f-p;for(;d{let{isMatch:A,score:b,indices:v}=DYe(t,h,m,{location:i+g,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:l,includeMatches:n,ignoreLocation:u});A&&(d=!0),f+=b,A&&v&&(c=[...c,...v])});let p={isMatch:d,score:d?f/this.chunks.length:1};return d&&n&&(p.indices=c),p}},Hm=class{constructor(t){this.pattern=t}static isMultiMatch(t){return Xwe(t,this.multiRegex)}static isSingleMatch(t){return Xwe(t,this.singleRegex)}search(){}};function Xwe(e,t){let r=e.match(t);return r?r[1]:null}var zH=class extends Hm{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){let r=t===this.pattern;return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}},UH=class extends Hm{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){let n=t.indexOf(this.pattern)===-1;return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}},WH=class extends Hm{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){let r=t.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}},VH=class extends Hm{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){let r=!t.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,t.length-1]}}},GH=class extends Hm{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){let r=t.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[t.length-this.pattern.length,t.length-1]}}},HH=class extends Hm{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){let r=!t.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,t.length-1]}}},b5=class extends Hm{constructor(t,{location:r=$r.location,threshold:n=$r.threshold,distance:i=$r.distance,includeMatches:a=$r.includeMatches,findAllMatches:o=$r.findAllMatches,minMatchCharLength:s=$r.minMatchCharLength,isCaseSensitive:l=$r.isCaseSensitive,ignoreLocation:u=$r.ignoreLocation}={}){super(t),this._bitapSearch=new y5(t,{location:r,threshold:n,distance:i,includeMatches:a,findAllMatches:o,minMatchCharLength:s,isCaseSensitive:l,ignoreLocation:u})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}},x5=class extends Hm{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let r=0,n,i=[],a=this.pattern.length;for(;(n=t.indexOf(this.pattern,r))>-1;)r=n+a,i.push([n,r-1]);let o=!!i.length;return{isMatch:o,score:o?0:1,indices:i}}},QH=[zH,x5,WH,VH,HH,GH,UH,b5],Kwe=QH.length,OYe=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,MYe="|";function NYe(e,t={}){return e.split(MYe).map(r=>{let n=r.trim().split(OYe).filter(a=>a&&!!a.trim()),i=[];for(let a=0,o=n.length;a!!(e[w5.AND]||e[w5.OR]),_Ye=e=>!!e[KH.PATH],PYe=e=>!_A(e)&&t2e(e)&&!JH(e),Jwe=e=>({[w5.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function a2e(e,t,{auto:r=!0}={}){let n=i=>{let a=Object.keys(i),o=_Ye(i);if(!o&&a.length>1&&!JH(i))return n(Jwe(i));if(PYe(i)){let l=o?i[KH.PATH]:a[0],u=o?i[KH.PATTERN]:i[l];if(!Gm(u))throw new Error(mYe(l));let c={keyId:LH(l),pattern:u};return r&&(c.searcher=XH(u,t)),c}let s={children:[],operator:a[0]};return a.forEach(l=>{let u=i[l];_A(u)&&u.forEach(c=>{s.children.push(n(c))})}),s};return JH(e)||(e=Jwe(e)),n(e)}function IYe(e,{ignoreFieldNorm:t=$r.ignoreFieldNorm}){e.forEach(r=>{let n=1;r.matches.forEach(({key:i,norm:a,score:o})=>{let s=i?i.weight:null;n*=Math.pow(o===0&&s?Number.EPSILON:o,(s||1)*(t?1:a))}),r.score=n})}function BYe(e,t){let r=e.matches;t.matches=[],df(r)&&r.forEach(n=>{if(!df(n.indices)||!n.indices.length)return;let{indices:i,value:a}=n,o={indices:i,value:a};n.key&&(o.key=n.key.src),n.idx>-1&&(o.refIndex=n.idx),t.matches.push(o)})}function RYe(e,t){t.score=e.score}function $Ye(e,t,{includeMatches:r=$r.includeMatches,includeScore:n=$r.includeScore}={}){let i=[];return r&&i.push(BYe),n&&i.push(RYe),e.map(a=>{let{idx:o}=a,s={item:t[o],refIndex:o};return i.length&&i.forEach(l=>{l(a,s)}),s})}var yc=class{constructor(t,r={},n){this.options={...$r,...r},this.options.useExtendedSearch,this._keyStore=new qH(this.options.keys),this.setCollection(t,n)}setCollection(t,r){if(this._docs=t,r&&!(r instanceof yC))throw new Error(pYe);this._myIndex=r||i2e(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){!df(t)||(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){let r=[];for(let n=0,i=this._docs.length;n-1&&(l=l.slice(0,r)),$Ye(l,this._docs,{includeMatches:n,includeScore:i})}_searchStringList(t){let r=XH(t,this.options),{records:n}=this._myIndex,i=[];return n.forEach(({v:a,i:o,n:s})=>{if(!df(a))return;let{isMatch:l,score:u,indices:c}=r.searchIn(a);l&&i.push({item:a,idx:o,matches:[{score:u,value:a,norm:s,indices:c}]})}),i}_searchLogical(t){let r=a2e(t,this.options),n=(s,l,u)=>{if(!s.children){let{keyId:f,searcher:d}=s,p=this._findMatches({key:this._keyStore.get(f),value:this._myIndex.getValueForItemAtKeyId(l,f),searcher:d});return p&&p.length?[{idx:u,item:l,matches:p}]:[]}let c=[];for(let f=0,d=s.children.length;f{if(df(s)){let u=n(r,s,l);u.length&&(a[l]||(a[l]={idx:l,item:s,matches:[]},o.push(a[l])),u.forEach(({matches:c})=>{a[l].matches.push(...c)}))}}),o}_searchObjectList(t){let r=XH(t,this.options),{keys:n,records:i}=this._myIndex,a=[];return i.forEach(({$:o,i:s})=>{if(!df(o))return;let l=[];n.forEach((u,c)=>{l.push(...this._findMatches({key:u,value:o[c],searcher:r}))}),l.length&&a.push({idx:s,item:o,matches:l})}),a}_findMatches({key:t,value:r,searcher:n}){if(!df(r))return[];let i=[];if(_A(r))r.forEach(({v:a,i:o,n:s})=>{if(!df(a))return;let{isMatch:l,score:u,indices:c}=n.searchIn(a);l&&i.push({score:u,key:t,value:a,idx:o,norm:s,indices:c})});else{let{v:a,n:o}=r,{isMatch:s,score:l,indices:u}=n.searchIn(a);s&&i.push({score:l,key:t,value:a,norm:o,indices:u})}return i}};yc.version="7.0.0";yc.createIndex=i2e;yc.parseIndex=kYe;yc.config=$r;yc.parseQuery=a2e;FYe(YH);var vi=ge(Te());var cl=ge(Te()),qYe={position:"absolute",width:0,height:0,visibility:"hidden",overflow:"scroll",whiteSpace:"pre"},LYe=["fontSize","fontFamily","fontWeight","fontStyle","letterSpacing","textTransform"],o2e=(0,cl.forwardRef)((e,t)=>{let{classNames:r,inputAttributes:n,inputEventHandlers:i,index:a}=e,o=(0,cl.useRef)(null),[s,l]=(0,cl.useState)(null),[u,c]=(0,cl.useState)("");(0,cl.useEffect)(()=>{f(),d(),setTimeout(()=>{t.current?.focus()},50)},[]),(0,cl.useEffect)(()=>{u!==e.placeholderText&&(c(e.placeholderText),d())},[e.query,e.placeholderText]);let f=()=>{let p=window.getComputedStyle(t.current);LYe.forEach(h=>{o.current.style[h]=p[h]})},d=()=>{let p=Math.ceil(o.current.scrollWidth)+2;p!==s&&l(p)};return cl.default.createElement("div",{className:r.search},cl.default.createElement("div",{className:r.searchWrapper},cl.default.createElement("div",{className:"mk-icon-xsmall",dangerouslySetInnerHTML:{__html:e.ui.getSticker("ui//search")}}),cl.default.createElement("input",{...n,...i,ref:t,value:e.query,placeholder:u,className:r.searchInput,role:"combobox",style:{width:"100%"},onClick:p=>p.stopPropagation()}),cl.default.createElement("div",{ref:o,style:qYe},e.query||u),cl.default.createElement("span",null)))}),s2e=o2e;o2e.displayName="SelectMenuSearch";var eQ=ge(Te()),zYe=e=>eQ.default.createElement("button",{type:"button",className:e.classNames.selectedTag,onClick:e.onDelete},eQ.default.createElement("span",{className:e.classNames.selectedTagName},e.tag.name)),l2e=zYe;var u2e=ge(Te()),c2e=e=>u2e.default.createElement("div",{className:"mk-sticker",dangerouslySetInnerHTML:{__html:e.ui.getSticker(e.sticker)}});var ui=ge(Te());function f2e(e,t){let r=j2(t);return e?.replace(r,"$&")}var UYe=e=>{let t=(0,ui.useRef)(null);return(0,ui.useEffect)(()=>{e.active&&t?.current?.scrollIntoViewIfNeeded()},[e.active]),ui.default.createElement(ui.default.Fragment,null,e.item.icon&&ui.default.createElement(c2e,{ui:e.ui,sticker:e.item.icon}),ui.default.createElement("div",{ref:t,className:"mk-menu-options-inner"},e.item.onToggle&&ui.default.createElement("div",null,"Toggle"),ui.default.createElement("span",{style:e.item.color?.length>0?{background:e.item.color,padding:"2px 4px",borderRadius:"4px",color:e.item.color=="var(--mk-color-none)"?"inherit":"var(--mk-color-white)"}:{},dangerouslySetInnerHTML:{__html:f2e(e.item.name,e.query)}}),e.item.description&&ui.default.createElement("span",{"aria-label":e.item.description,className:"mk-menu-options-description",dangerouslySetInnerHTML:{__html:f2e(e.item.description,e.query)}})),e.item.type==1&&ui.default.createElement("span",null,e.item.value),e.item.type==3&&e.item.value&&ui.default.createElement("div",{className:"mk-icon-small",dangerouslySetInnerHTML:{__html:e.ui.getSticker("ui//check")}}),e.item.onMoreOptions||e.onMoreOption&&e.item.removeable?ui.default.createElement("div",{onClick:r=>{r.stopPropagation(),r.preventDefault(),e.item.onMoreOptions?e.item.onMoreOptions(r):e.onMoreOption(r,e.item.value)},className:"mk-icon-small",dangerouslySetInnerHTML:{__html:e.ui.getSticker("ui//options")}}):null,e.item.removeable&&e.onDeleteOption&&ui.default.createElement("div",{onClick:r=>{r.stopPropagation(),r.preventDefault(),e.onDeleteOption(e.item.value)},className:"mk-icon-small",dangerouslySetInnerHTML:{__html:e.ui.getSticker("ui//close")}}),e.item.type==6&&ui.default.createElement("div",{className:"mk-icon-small",dangerouslySetInnerHTML:{__html:e.ui.getSticker("ui//chevron-right")}}))},WYe=e=>{let[t,r]=(0,ui.useState)(e.value);return ui.default.createElement("input",{type:"text",value:t,onKeyDown:n=>{n.key=="Enter"&&e.setValue(t)},onMouseDown:n=>n.stopPropagation(),onClick:n=>n.stopPropagation(),onFocus:n=>{n.stopPropagation()},onChange:n=>r(n.target.value),onBlur:n=>e.setValue(t)})},VYe=e=>{let t=e.options.map((r,n)=>{let i=`${e.id}-${n}`,a=r.type==-1?"mk-menu-separator":r.type==2?"mk-menu-input":r.type==5?"mk-menu-custom":`mk-menu-option ${e.index===n&&e.classNames.suggestionActive} ${r.disabled&&e.classNames.suggestionDisabled}`;return ui.default.createElement("div",{ref:o=>{e.refs?.current&&(e.refs.current[n]=o)},onMouseDown:o=>{e.isDisclosureMenu||o.stopPropagation(),o.preventDefault()},onClick:o=>{if(r.onSubmenu&&e.openSubmenu){let s=e.refs?.current[n].getBoundingClientRect();e.openSubmenu(r.onSubmenu(s,()=>{e.onHide&&e.onHide(),e.hide()}))}else r.onClick?(r.onClick(o),r.type!=6&&r.type!=1&&e.hide()):(r.type==null||r.type==0||r.type==1)&&(e.selectOption(r,{ctrlKey:o.ctrlKey,metaKey:o.metaKey,altKey:o.altKey,shiftKey:o.shiftKey,doubleClick:o.detail==2}),e.isDisclosureMenu||o.stopPropagation())},id:i,key:i,className:a},r.type==-1?ui.default.createElement(ui.default.Fragment,null):r.type==-2?ui.default.createElement("div",{className:"mk-menu-options-section"},r.name):r.type==2?ui.default.createElement(WYe,{value:r.value,setValue:r.onValueChange}):r.type==5?ui.default.createElement(r.fragment,{hide:e.hide,onSubmenu:o=>{if(e.openSubmenu){let s=e.refs?.current[n].getBoundingClientRect();e.openSubmenu(o(s,()=>{e.onHide&&e.onHide(),e.hide()}))}}}):ui.default.createElement(UYe,{ui:e.ui,item:r,query:e.query,active:n==e.index,onMoreOption:e.moreOption,onDeleteOption:e.deleteOption}))});return ui.default.createElement("div",{className:"mk-menu-suggestions"},t,e.query&&e.allowNew&&ui.default.createElement("div",{className:"mk-menu-option",onMouseDown:r=>r.preventDefault(),onClick:r=>e.selectOption({name:e.query,value:e.query},{ctrlKey:r.ctrlKey,metaKey:r.metaKey,altKey:r.altKey,shiftKey:r.shiftKey})},ui.default.createElement("div",{className:"mk-sticker",dangerouslySetInnerHTML:{__html:e.ui.getSticker("ui//plus")}}),ui.default.createElement("div",{className:"mk-menu-options-inner"},e.addKeyword??"Add"," ",e.query)))},S5=VYe;function d2e(e,t){let r=e.querySelectorAll("a,button,input"),n=Array.prototype.findIndex.call(r,a=>a===t),i=r[n-1]||r[n+1];i&&i.focus()}var by={ENTER:"Enter",TAB:"Tab",BACKSPACE:"Backspace",UP_ARROW:"ArrowUp",UP_ARROW_COMPAT:"Up",DOWN_ARROW:"ArrowDown",DOWN_ARROW_COMPAT:"Down",LEFT_ARROW:"ArrowLeft",RIGHT_ARROW:"ArrowRight"},m2e={root:"mk-menu-container",rootFocused:"mk-focused",selected:"mk-menu-input-wrapper",selectedTagWrapper:"mk-menu-selected-tag-wrapper",selectedTag:"mk-menu-selected-tag",selectedTagName:"mk-menu-selected-tag-name",search:"mk-menu-search",searchWrapper:"mk-menu-search-container",searchInput:"mk-menu-search-input",suggestions:"mk-menu-suggestions",suggestionActive:"mk-active",suggestionDisabled:"mk-disabled"},GYe={ui:null,id:"SelectMenu",tags:[],hide:()=>null,onHide:()=>null,suggestionsOnly:!1,placeholderText:z.labels.optionItemSelectPlaceholder,noSuggestionsText:null,newTagText:null,suggestions:[],suggestionsFilter:HYe,suggestionsTransform:null,classNames:m2e,delimiters:[by.ENTER],minQueryLength:2,maxSuggestionsLength:8,inputAttributes:{}},h2e=(e,t)=>e.findIndex(r=>oxe(t).test(r.name)),p2e=(e,t,r,n,i,a)=>{if(t.length>=e.minQueryLength){let o=h2e(n,t),s=r===-1?o:r,l=s>-1?n[s]:null;i(l||{name:t,value:t},a)}};function HYe(e,t){return j2(t).test(e.name)}function QYe(e,t,r){let n,i=e.suggestions;r.length>0&&(i=e.suggestions.filter(s=>s.section==r));let a={threshold:0,ignoreLocation:!0,keys:["name","value"]},o=new yc(i,a);return n=t.length==0?i:o.search(t).map(s=>s.item),n=n.slice(0,e.maxSuggestionsLength),e.newTagText&&h2e(n,t)===-1?n.push({id:0,name:t,value:t}):e.noSuggestionsText&&n.length===0&&n.push({id:0,name:e.noSuggestionsText,value:"",disabled:!0}),n}var A2e=vi.default.forwardRef((e,t)=>{let r={...GYe,...e},[n,i]=(0,vi.useState)([]),a=(0,vi.useRef)([]),o=(0,vi.useMemo)(()=>r.showSections?[{name:"All",value:""},...r.sections??Mr(r.suggestions.map(re=>re.section)).filter(re=>re)]:[],[r.showSections,r.sections,r.suggestions]),s=(0,vi.useRef)(null),[l,u]=(0,vi.useState)(""),[c,f]=(0,vi.useState)(""),[d,p]=(0,vi.useState)(!1),[h,m]=(0,vi.useState)(0),g=(0,vi.useRef)(!1);(0,vi.useEffect)(()=>{t&&(t.current=()=>d?!0:(s?.current?.focus(),p(!0),!1))},[d]),(0,vi.useEffect)(()=>{if(c.length==0&&r.defaultSuggestions){i(r.defaultSuggestions);return}i(QYe(r,c,l))},[c,r.defaultSuggestions,l,r.suggestions]);let A=(0,vi.useRef)(null),b=re=>{if(re.type==="compositionstart"){g.current=!0;return}if(re.type==="compositionend"){g.current=!1;return}let Q=re.target.value;r.onInput&&r.onInput(Q),Q.length===c.length+1&&r.delimiters.indexOf(c.slice(-1))>-1?p2e(r,c,h,n,k,{}):Q!==c&&f(Q)},v=re=>{g.current||(r.delimiters.indexOf(re.key)>-1&&((c||h>-1)&&re.preventDefault(),p2e(r,c,h,n,k,{ctrlKey:re.ctrlKey,metaKey:re.metaKey,altKey:re.altKey,shiftKey:re.shiftKey})),re.key!="Escape"&&(re.key===by.TAB&&R(re),re.key===by.BACKSPACE&&P(),(re.key===by.UP_ARROW||re.key===by.UP_ARROW_COMPAT)&&T(re),(re.key===by.DOWN_ARROW||re.key===by.DOWN_ARROW_COMPAT)&&D(re),re.stopPropagation()))},x=()=>{p(!1),r.onBlur&&r.onBlur()},w=()=>{p(!0),r.onFocus&&r.onFocus()},S=(re,Q)=>{A.current&&d2e(A.current,Q.currentTarget),M(re)},k=(re,Q)=>{re.disabled||r.onValidate&&!r.onValidate(re)||(r.onAddition(re,Q),O())},M=re=>{r.onDelete(re)},O=()=>{f(""),m(-1)},C=()=>{m(-1)},T=re=>{re.preventDefault();let Q=n.length-1,he=h<=0?Q:h-1;n[he].disabled?m(he<=0?Q:he-1):m(he)},D=re=>{re.preventDefault();let Q=n.length-1,he=h>=Q?0:h+1;n[he].disabled?m(he>=Q?0:he+1):m(he)};function P(){c.length||M(r.tags.length-1)}function R(re){r.showSections&&(re.preventDefault(),re.stopPropagation(),u(Q=>{let he=o.findIndex(Ie=>Ie.value==Q);return re.shiftKey?he==0?Q:(r.onSelectSection&&r.onSelectSection(o[he-1].value),o[he-1].value):he==o.length-1?Q:(r.onSelectSection&&r.onSelectSection(o[he+1].value),o[he+1].value)}))}let q=()=>{s.current.focus()},B={onChange:b,onCompositionEnd:b,onCompositionStart:b};(0,vi.useEffect)(()=>(r.ui.inputManager.on("keydown",v),()=>{r.ui.inputManager.off("keydown",v)}),[n,h]);let N=d&&c.length>=r.minQueryLength,W=Object.assign({},m2e,r.classNames);r.wrapperClass&&(W.root=`${W.root} ${r.wrapperClass}`);let _=[W.root];d&&_.push(W.rootFocused);let X=(0,vi.useRef)(null),oe=re=>{X.current&&X.current.hide(!0),X.current=re};return vi.default.createElement("div",{ref:A,className:_.join(" "),style:r.suggestionsOnly?{}:{"--mk-menu-max-height":"200px"}},r.suggestionsOnly?null:vi.default.createElement("div",{className:W.selected,"aria-relevant":"additions removals","aria-live":"polite"},r.tags.length>0&&vi.default.createElement("div",{className:W.selectedTagWrapper},r.tags.map((re,Q)=>vi.default.createElement(l2e,{key:Q,tag:re,classNames:W,onDelete:he=>S(Q,he)}))),vi.default.createElement(s2e,{ui:r.ui,ref:s,query:c,index:h,id:r.id,currentSection:o.find(re=>re.value==l),classNames:W,inputAttributes:r.inputAttributes,inputEventHandlers:B,expanded:N,placeholderText:r.placeholderText})),r.showSections?vi.default.createElement("div",{className:"mk-menu-sections"},o.map((re,Q)=>vi.default.createElement("div",{key:Q,onClick:he=>{he.stopPropagation(),u(re.value)},className:`${l==re.value?"is-active":""} mk-menu-section`},re.name==""?z.labels.all:re.name))):vi.default.createElement(vi.default.Fragment,null),n.length||r.allowNew?vi.default.createElement(S5,{ui:r.ui,hide:()=>{r.hide()},addKeyword:r.addKeyword,refs:a,options:n,query:c,setIndex:m,index:h,onHide:r.onHide,id:r.id,classNames:W,expanded:N,selectOption:k,allowNew:r.allowNew,moreOption:r.onMoreOption,deleteOption:r.onDeleteOption,isDisclosureMenu:r.isDisclosure,openSubmenu:oe}):null,r.previewComponent)});A2e.displayName="SelectMenuComponent";var g2e=A2e;var v2e=pf.default.forwardRef((e,t)=>{let r=e.options.map((f,d)=>({...f,id:d+1}));(0,pf.useEffect)(()=>{i(e.options.map((f,d)=>({...f,id:d+1})))},[e.options]);let[n,i]=(0,pf.useState)(r),[a,o]=(0,pf.useState)(e.value.map(f=>r.find(d=>d.value==f)??{id:0,name:f,value:f})),s=(0,pf.useCallback)(f=>{let d=a.filter((p,h)=>h!==f);o(d),e.saveOptions&&e.saveOptions(n.map(p=>p.value),d.map(p=>p.value),!1)},[n,a,e]),l=(0,pf.useCallback)(f=>{let d=n.filter(h=>h.value!=f),p=a.filter(h=>h.value!=f);i(d),o(p),e.removeOption&&e.removeOption(f),e.hide()},[a,n,e]),u=(0,pf.useCallback)((f,d)=>{let p=f,h=n,m=a;n.find(g=>g.value==f.value)||(p={id:n.length+1,name:f.name,value:f.value??f.name},h=[...n,p],i(h)),e.multi?a.find(g=>g.value==p.value)||(m=[...a,p],o(m)):(m=[p],o(m)),e.saveOptions&&e.saveOptions(h.map(g=>g.value),m.map(g=>g.value),!0),!e.multi&&f.type!=1&&e.hide()},[a,n]),c=(0,pf.useCallback)(f=>!(!e.editable&&!n.find(d=>d.value==f.value)||f.name.length==0),[n]);return pf.default.createElement(g2e,{tags:e.multi?a:[],suggestions:n,ui:e.ui,ref:t,addKeyword:e.addKeyword,hide:e.hide,onDelete:s,wrapperClass:e.wrapperClass,onMoreOption:e.onMoreOption,onDeleteOption:l,onAddition:u,onValidate:c,onSelectSection:e.onSelectSection,defaultSuggestions:e.defaultOptions,placeholderText:e.placeholder??"",minQueryLength:0,onHover:e.onHover,showSections:e.showSections,sections:e.sections,maxSuggestionsLength:e.showAll?Math.min(50,e.options.length):25,suggestionsOnly:!e.searchable&&!e.editable,allowNew:e.editable,previewComponent:e.previewComponent,isDisclosure:e.isDisclosure})});v2e.displayName="SelectMenu";var Kz=v2e;var To=ge(Te());var fl=ge(Te());var yd=(0,fl.forwardRef)((e,t)=>{let r=(0,fl.useRef)(null),[n,i]=(0,fl.useState)(!1),[a,o]=(0,fl.useState)(!1),s=async u=>{let c=r.current,f=e.superstate.spaceManager.uriByString(e.path,e.source),d=e.properties,p=e.superstate.pathsIndex.get(f.basePath),h=p?.type=="space"&&e.forceNote?e.superstate.spacesIndex.get(e.path)?.space.notePath:p?f.fullPath:null;if(h)i(!1),e.superstate.ui.openPath(h,!1,c,d);else if(u){let m=e.superstate.spaceManager.parentPathForPath(f.basePath);if(!m)return;let g=await e.superstate.spaceManager.createItemAtPath(m,"md",Lc(e.path));i(!1),await e.superstate.ui.openPath(g,!1,c,d)}else{i(!0),o(!1);return}o(!0)},l=()=>{e.load?s():r?.current&&(r.current.innerHTML="")};return(0,fl.useEffect)(()=>{l()},[e.load,e.path]),(0,fl.useEffect)(()=>{let u=()=>{r.current&&!r.current.hasChildNodes()&&e.load&&!n&&s()};return e.superstate.ui.eventsDispatch.addListener("activeStateChanged",u),()=>{r.current=null,e.superstate.ui.eventsDispatch.removeListener("activeStateChanged",u)}},[]),fl.default.createElement(fl.default.Fragment,null,fl.default.createElement("div",{className:`${e.classname??""} mk-flowspace-editor`,ref:r,onClick:u=>u.stopPropagation()}),n?fl.default.createElement("div",{onClick:()=>s(!0),className:"mk-placeholder",style:{color:"var(--mk-ui-text-tertiary)"}},z.labels.notePlaceholder.replace("${1}",Lc(e.path))):fl.default.createElement(fl.default.Fragment,null))});yd.displayName="FlowView";var y2e=(e,t,r,n,i,a,o,s)=>{let l=[];l.push(Pm(n?.name??"",u=>o(n.name,u))),l.push(Ut),l.push({name:z.menu.changePropertyType,icon:"ui//list",onClick:u=>{s(u,n.name)}}),n.type!="object"&&l.push({name:z.menu.syncToContext,icon:"ui//sync",onClick:u=>{a(n)}}),l.push({name:z.menu.deleteProperty,icon:"ui//trash",onClick:u=>{i(n)}}),e.ui.openMenu(t,Yt(e.ui,l),r)};var os=ge(Te());var b2e=e=>{let{pathState:t}=(0,os.useContext)(Ir),[r,n]=(0,os.useState)({}),[i,a]=(0,os.useState)([]),[o,s]=(0,os.useState)([]),{tableData:l,saveProperty:u,delProperty:c,saveFrame:f}=(0,os.useContext)(aa),d=async()=>{let D=e.superstate.spacesMap.get(t.path)??new Set,P=(await Promise.all([...D].map(async _=>e.superstate.spaceManager.readTable(_,Nr).then(X=>X.cols??[])))).reduce((_,X)=>[..._,...X],[]),R=[],q={},B=t?.metadata?.property??{},N=Gj([...Object.keys(B),...l?.cols?.map(_=>_.name)??[]]).filter(_=>!P.some(X=>X.name==_)),W=N.map(_=>l?.cols?.find(X=>X.name==_)??{table:"",name:_,schemaId:"",type:Uh(B[_],_)});B&&(R.push(...W),N.forEach(_=>{q[_]=Ki(_,B[_])})),a(R.filter(_=>!e.excludeKeys?.some(X=>X==_.name))),s([...e.superstate.settings.hideFrontmatter?P.map(_=>_.name):[]]),n(Vm(e.superstate.formulaContext,e.superstate.pathsIndex,q,W,t))},p=D=>{e.spaces.find(P=>P==D.path)&&d()};(0,os.useEffect)(()=>(d(),e.superstate.eventsDispatcher.addListener("contextStateUpdated",p),()=>{e.superstate.eventsDispatcher.removeListener("contextStateUpdated",p)}),[e.spaces,l]);let h=(D,P)=>{if(u){let R=l?.cols?.find(q=>q.name==P.name);R&&u(P,R)}Di(e.superstate,t.path,{[P.name]:Sa(P.type,D,!0)})},m=D=>{c&&D&&c(D),Pye(e.superstate,t.path,D.name)},g=async(D,P)=>{let R={...D,schemaId:Nr},q=e.superstate.spacesIndex.get(P)?.space;!q||(await e.superstate.spaceManager.addSpaceProperty(P,R),await CB(e.superstate.spaceManager,q,t.path,R.name,r[R.name]))},A=(D,P)=>{let R=D.target.getBoundingClientRect(),q=[...e.superstate.spacesMap.get(t.path)].map(B=>e.superstate.pathsIndex.get(B)).filter(B=>B).map(B=>({name:B.name,value:B.path,icon:B.label?.sticker,description:B.path}));e.superstate.ui.openMenu(R,{ui:e.superstate.ui,multi:!1,editable:!1,value:[],options:q,saveOptions:(B,N)=>{g(P,N[0])},placeholder:z.labels.spaceSelectPlaceholder,detail:!0,searchable:!0,showAll:!0},je(D.view.document),"bottom")},b=(D,P)=>{if(u){let R=l?.cols?.find(q=>q.name==D);R&&u({...R,name:P},R)}AG(e.superstate,t.path,D,P)},v=(D,P)=>{if(u){let R=l?.cols?.find(q=>q.name==P);R&&u({...R,type:D[0]},R)}Di(e.superstate,t.path,{[P]:nx(D[0])})},x=(D,P)=>{let R=D.target.getBoundingClientRect();e.superstate.ui.openMenu(R,{ui:e.superstate.ui,multi:!1,editable:!1,searchable:!1,saveOptions:(q,B)=>v(B,P),value:[],showAll:!0,options:Xs.filter(q=>q.metadata).map((q,B)=>({id:B+1,name:q.label,value:q.type,icon:q.icon}))},je(D.view.document))},[w,S]=(0,os.useState)(null),[k,M]=(0,os.useState)(null),O=()=>{M(null),S(null)};Vo({onDragStart({active:D}){D.data.current.type=="property"&&S(D.data.current.property)},onDragOver({active:D,over:P}){let R=P?.data.current.id;P?.data.current.type=="property"&&R&&M(R)},onDragCancel(){O()},onDragEnd({active:D,over:P}){if(!D||!k){O();return}O()}});let C=(D,P)=>{if(u){let R=l?.cols?.find(q=>q.name==P.name);R&&u(D,R)}D.name!=P.name&&AG(e.superstate,t.path,P.name,D.name)},T=(D,P)=>{let R=D.target.getBoundingClientRect();if(t.type=="space"){Lm({superstate:e.superstate,rect:R,win:je(D.view.document),editable:!0,options:[],field:P,fields:i,contextPath:null,saveField:q=>C(q,P),deleteColumn:m,anchor:"bottom"});return}y2e(e.superstate,R,je(D.view.document),P,m,()=>A(D,P),b,x)};return os.default.createElement(os.default.Fragment,null,e.compactMode?i.map((D,P)=>os.default.createElement(as,{key:P,path:t.path,propertyMenu:R=>T(R,D),superstate:e.superstate,initialValue:r[D.name],row:r,compactMode:e.compactMode,column:{...D,table:""},columns:[],editMode:e.editable?5:2,updateValue:R=>h(R,D),updateFieldValue:(R,q)=>h(q,{...D,value:R}),contextTable:{},source:t.path})):e.force?i.map((D,P)=>os.default.createElement(as,{key:P,path:t.path,propertyMenu:R=>T(R,D),superstate:e.superstate,initialValue:r[D.name],row:r,compactMode:e.compactMode,column:{...D,table:""},columns:[],editMode:e.editable?5:2,updateValue:R=>h(R,D),updateFieldValue:(R,q)=>h(q,{...D,value:R}),contextTable:{},source:t.path})):os.default.createElement(os.default.Fragment,null),o.length>0&&os.default.createElement("style",null,`${o.map(D=>`.metadata-property[data-property-key="${D}"]`).join(", ")} { display: none; }`))};var Ul=ge(Te());var J0={isEmpty:z.filterTypes.isEmpty,isNotEmpty:z.filterTypes.isNotEmpty,include:z.filterTypes.contains,notInclude:z.filterTypes.notContains,is:z.filterTypes.is,isNot:z.filterTypes.isNot,isLink:z.filterTypes.is,isNotLink:z.filterTypes.isNot,equal:"=",isGreatThan:">",isLessThan:"<",isLessThanOrEqual:"\u2264",isGreatThanOrEqual:"\u2265",dateBefore:z.filterTypes.before,dateAfter:z.filterTypes.after,isSameDate:z.filterTypes.isSameDate,isSameDateAsToday:z.filterTypes.isSameDateAsToday,isExactList:z.filterTypes.is,isAnyInList:z.filterTypes.anyOf,isNoneInList:z.filterTypes.noneOf,isTrue:z.filterTypes.checked,isFalse:z.filterTypes.unchecked};var yi=ge(Te());var C2e=ge($a());var E5=(e,t,r,n,i,a)=>{if(!!n&&n.type!="text"){if(n.type=="number"){let o=Pm("",s=>i(s));r.ui.openMenu(e,{...Yt(r.ui,[o])},t)}else if(n.type=="date")Q0(r.ui,e,t,new Date,o=>i(o.toISOString()),0);else if(n.type=="option"){let o=Lr(n.value,n.type,r,a)?.options??[];r.ui.openMenu(e,{...Yt(r.ui,o),saveOptions:(s,l)=>{i(l[0])}},t)}else if(n.type=="boolean"){let o=[{name:"Yes",value:"true"},{name:"No",value:"false"}];r.ui.openMenu(e,{...Yt(r.ui,o),saveOptions:(s,l)=>{i(l[0])}},t)}}};var Xt=ge(Te());var YYe=(e,t)=>e.type=="folder"?`${e.path}/#*${t}`:e.type=="vault"?`/#*${t}`:`${e.path}/#*${t}`,tQ=(e,t)=>e.type=="folder"?`${e.path}/#;${t}`:e.type=="vault"?`/#;${t}`:`${e.path}/#;${t}`,xy=(e,t)=>e.type=="folder"?`${e.path}/#^${t}`:e.type=="vault"?`/#^${t}`:`${e.path}/#^${t}`,k5=(e,t)=>`![![${YYe(e,t)}]]`,C5=(e,t)=>`![![${xy(e,t)}]]`;var ev=ge(Te());var x2e=e=>{let{dbSchema:t,source:r}=(0,ev.useContext)(ts),n=u=>{e.superstate.ui.openPalette(ev.default.createElement(va,{ui:e.superstate.ui,selectedSticker:c=>e.superstate.spaceManager.saveTableSchema(r,t.id,()=>({...t,def:JSON.stringify({...dr(t?.def)??{},icon:c})}))}),je(u.view.document))},i=t?.name,a=u=>{let c=u.target.innerText;c!=i&&e.superstate.spaceManager.saveTableSchema(r,t.id,()=>({...t,name:c}))},o=u=>{u.stopPropagation()},s=u=>{u.stopPropagation()},l=u=>{if(u.stopPropagation(),u.key=="a"&&u.metaKey){u.preventDefault();let c=window.getSelection(),f=document.createRange();f.selectNodeContents(u.target),c.removeAllRanges(),c.addRange(f)}u.key=="Enter"&&(u.target.blur(),u.preventDefault()),u.key=="Escape"&&(u.target.blur(),u.preventDefault())};return ev.default.createElement("div",{className:"mk-context-title"},ev.default.createElement("div",{className:"mk-path-icon",onClick:u=>n(u),dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker(pJ(t))}}),ev.default.createElement("div",{contentEditable:!0,dangerouslySetInnerHTML:{__html:t?.name},onBlur:a,onKeyPress:o,onKeyUp:s,onKeyDown:l}),ev.default.createElement("button",{className:"mk-toolbar-button",onClick:()=>e.superstate.ui.openPath(xy(e.superstate.spacesIndex.get(r),t.id)),dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//expand")}}))};var w2e=ge(Te()),S2e=e=>w2e.default.createElement("div",{onClick:t=>e.onSelect(t),onContextMenu:t=>e.onContextMenu(t,e.schema),className:`mk-context ${e.active?"mk-active":""}`},Hj(e.schema.name,"Untitled"),e.children);var E2e=ge(Te()),bc=e=>E2e.default.createElement("button",{className:`mk-collapse ${e.collapsed?"mk-collapsed":""}`,onClick:t=>{!e.onToggle||(t.stopPropagation(),e.onToggle(!e.collapsed,t))},dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//collapse")}});var Is=ge(Te());var k2e=e=>{let{views:t,dbSchema:r,source:n}=(0,Is.useContext)(ts),{readMode:i}=(0,Is.useContext)(Ir),{spaceState:a}=(0,Is.useContext)(sr),{frameSchema:o,setFrameSchema:s,saveSchema:l,deleteSchema:u}=(0,Is.useContext)(aa),c=(m,g)=>{let A=[];A.push({name:z.menu.copyEmbedLink,icon:"ui//link",onClick:b=>{navigator.clipboard.writeText(k5(a,g.id))}}),A.push({name:z.buttons.renameView,icon:"ui//edit",onClick:b=>{e.superstate.ui.openModal(z.labels.renameView,Is.default.createElement(ji,{value:g.name,saveLabel:z.labels.renameView,saveValue:v=>l({...g,name:v})}),je(b.view.document))}}),t.length>1&&A.push({name:z.buttons.delete,icon:"ui//trash",onClick:b=>{o.id==g.id&&e.setView&&(t[0].id==g.id?(e.setView(t[1].id),s(t[1])):(e.setView(t[0].id),s(t[0]))),u(g)}}),e.superstate.ui.openMenu(m.target.getBoundingClientRect(),Yt(e.superstate.ui,A),je(m.view.document))},f=m=>{s(t.find(g=>g.id==m)),e.setView&&e.setView(m)},d=(0,Is.useRef)(null),p=m=>{e.superstate.ui.openModal(z.labels.saveView,Is.default.createElement(ji,{value:"",saveLabel:z.labels.saveView,saveValue:g=>{let A={...o??{name:r.name,def:{db:r.id},type:"view"},id:g.replace(/ /g,"_"),name:g};l(A).then(b=>f(A.id))}}),je(m.view.document))},h=m=>{let g=[];(t??[]).forEach(A=>{g.push({name:Hj(A.name,"Untitled"),value:A.id,icon:cx(A),onClick:()=>f(A.id),onMoreOptions:i?null:b=>c(b,A)})}),i||(g.push(Ut),g.push({name:z.menu.newView,icon:"ui//plus",value:"",onClick:A=>p(A)})),e.superstate.ui.openMenu(m.target.getBoundingClientRect(),Yt(e.superstate.ui,g),je(m.view.document),"bottom")};return r&&(o?Is.default.createElement(Is.default.Fragment,null,Is.default.createElement("div",{className:"mk-view-selector",ref:d},t.map((m,g)=>Is.default.createElement(S2e,{key:g,active:o.id==m.id,superstate:e.superstate,schema:m,onSelect:()=>s(t.find(A=>A.id==m.id)),onContextMenu:c})),Is.default.createElement("button",{className:"mk-toolbar-button",onClick:m=>p(m),dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//plus")}}))):Is.default.createElement("div",{onClick:m=>h(m),className:"mk-context"},Is.default.createElement("div",{className:"mk-path-icon",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//table")}}),r.name,Is.default.createElement(bc,{collapsed:!1,onToggle:null,superstate:e.superstate})))};var Mp=ge(Te()),D5=e=>{let[t,r]=Mp.default.useState(!1),n=()=>{r(!1),e.setSearchString("")},i=Mp.default.useRef(null);return(0,Mp.useEffect)(()=>{t&&i.current?.focus()},[t]),Mp.default.createElement("div",{className:"mk-view-search"},Mp.default.createElement("button",{className:"mk-toolbar-button",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//search")}}),Mp.default.createElement(Mp.default.Fragment,null,Mp.default.createElement("input",{onChange:a=>e.setSearchString(a.target.value),placeholder:z.labels.searchPlaceholder,className:"mk-search-bar",ref:i}),e.closeSearch&&Mp.default.createElement("button",{className:"mk-toolbar-button",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//clear")},onClick:a=>{a.stopPropagation(),n(),e.closeSearch()}})))};var j5=e=>{let{spaceState:t}=(0,Xt.useContext)(sr),{readMode:r}=(0,Xt.useContext)(Ir),{source:n,dbSchema:i,cols:a,setSearchString:o,setEditMode:s,predicate:l,savePredicate:u,hideColumn:c,delColumn:f,saveColumn:d}=(0,Xt.useContext)(ts),{frameSchema:p,saveSchema:h,setFrameSchema:m}=(0,Xt.useContext)(aa),[g,A]=(0,Xt.useState)(!1),b=t?.propertyTypes??[],v=async se=>{if(!se)return[];let L=e.superstate.spaceManager.uriByString(se);if(L.authority=="$kit"){let ue=e.superstate.kitFrames.get(L.ref).node;return Object.keys(ue.types).map(ce=>({type:ue.types[ce],name:ce,attrs:JSON.stringify(ue.propsAttrs?.[ce]),schemaId:ue.schemaId,value:JSON.stringify(ue.propsValue?.[ce])})).filter(ce=>!ce.name.startsWith("_"))}else return e.superstate.spaceManager.readFrame(L.path,L.ref).then(ue=>ue?.cols.filter(ce=>!ce.name.startsWith("_"))??[])},x=a.filter(se=>se.hidden!="true"),[w,S]=(0,Xt.useState)(!1),k=se=>{se=="table"&&u({view:"table",listView:"",listGroup:"",listItem:""}),se=="flow"&&u({view:"list",listView:"spaces://$kit/#*listView",listGroup:"spaces://$kit/#*listGroup",listItem:"spaces://$kit/#*flowListItem"}),se=="list"&&u({view:"list",listView:"spaces://$kit/#*listView",listGroup:"spaces://$kit/#*listGroup",listItem:"spaces://$kit/#*rowItem"}),se=="details"&&u({view:"list",listView:"spaces://$kit/#*listView",listGroup:"spaces://$kit/#*listGroup",listItem:"spaces://$kit/#*detailItem"}),se=="board"&&u({view:"list",listView:"spaces://$kit/#*columnView",listGroup:"spaces://$kit/#*columnGroup",listItem:"spaces://$kit/#*cardListItem"}),se=="cards"&&u({view:"list",listView:"spaces://$kit/#*listView",listGroup:"spaces://$kit/#*gridGroup",listItem:"spaces://$kit/#*cardsListItem"}),se=="catalog"&&u({view:"list",listView:"spaces://$kit/#*listView",listGroup:"spaces://$kit/#*rowGroup",listItem:"spaces://$kit/#*coverListItem"}),se=="gallery"&&u({view:"list",listView:"spaces://$kit/#*listView",listGroup:"spaces://$kit/#*masonryGroup",listItem:"spaces://$kit/#*imageListItem"}),se=="calendar"&&u({view:"list",listView:"spaces://$kit/#*calendarView",listGroup:"spaces://$kit/#*dateGroup",listItem:"spaces://$kit/#*eventItem"})},M=()=>{u({filters:[],sort:[]})},O=()=>{u({colsHidden:[]})},C=(se,L)=>{let ce=[...(l??Y6(i)).filters.filter((U,$)=>$!=L)];u({filters:ce})},T={table:{name:z.menu.tableView,icon:"ui//table",view:"table",listView:"",listGroup:"",listItem:""},list:{name:z.menu.listView,icon:"ui//list",view:"list",listView:"spaces://$kit/#*listView",listGroup:"spaces://$kit/#*listGroup",listItem:"spaces://$kit/#*rowItem"},details:{name:z.menu.detailsView,icon:"ui//layout-grid",view:"list",listView:"spaces://$kit/#*listView",listGroup:"spaces://$kit/#*listGroup",listItem:"spaces://$kit/#*detailItem"},board:{name:z.menu.boardView,icon:"ui//square-kanban",view:"list",listView:"spaces://$kit/#*columnView",listGroup:"spaces://$kit/#*columnGroup",listItem:"spaces://$kit/#*cardListItem"},cards:{name:z.menu.cardView,icon:"ui//layout-dashboard",view:"list",listView:"spaces://$kit/#*listView",listGroup:"spaces://$kit/#*gridGroup",listItem:"spaces://$kit/#*cardsListItem"},catalog:{name:z.menu.catalogView,icon:"ui//gallery-horizontal-end",view:"list",listView:"spaces://$kit/#*listView",listGroup:"spaces://$kit/#*rowGroup",listItem:"spaces://$kit/#*coverListItem"},gallery:{name:z.menu.galleryView,icon:"ui//layout-dashboard",view:"list",listView:"spaces://$kit/#*listView",listGroup:"spaces://$kit/#*masonryGroup",listItem:"spaces://$kit/#*imageListItem"},flow:{name:z.menu.flowView,icon:"ui//edit",view:"list",listView:"spaces://$kit/#*listView",listGroup:"spaces://$kit/#*listGroup",listItem:"spaces://$kit/#*flowListItem"}},D=se=>{let L=se.target.getBoundingClientRect(),ue=[];return Object.keys(T).forEach(ce=>{let U=T[ce];ue.push({name:U.name,icon:U.icon,onClick:$=>{u({view:U.view,listView:U.listView,listGroup:U.listGroup,listItem:U.listItem})}})}),e.superstate.settings.experimental&&ue.push({name:z.menu.customView,icon:"ui//brush",onClick:ce=>{s(3)}}),e.superstate.ui.openMenu(L,Yt(e.superstate.ui,ue),je(se.view.document))},P=(se,L)=>Wa(se,L,e.superstate,ue=>{let ce={...p,name:p.name,def:{db:i.id,context:ue},type:"view"};h(ce).then(U=>m(ce))}),R=async se=>{let L=[];if(r||(L.push(Pm(p.name??"",Y=>h({...p,name:Y}))),L.push(Ut),L.push({name:z.menu.properties,icon:"ui//list",type:6,onSubmenu:(Y,te)=>Re(Y,je(se.view.document),te)})),L.push({name:z.menu.groupBy,icon:"ui//columns",type:6,onSubmenu:(Y,te)=>_e(Y,je(se.view.document),te)}),L.push({name:z.menu.sortBy,icon:"ui//sort-desc",type:6,onSubmenu:(Y,te)=>re(Y,je(se.view.document),te)}),L.push({name:z.menu.filters,icon:"ui//filter",type:6,onSubmenu:(Y,te)=>oe(Y,je(se.view.document),te)}),L.push(Ut),i?.primary=="true"){let Y=e.superstate.spacesIndex.get(n);L.push({name:"Source",icon:"ui//table",type:1,value:Y.name,onSubmenu:(te,ie)=>P(te,je(se.view.document))}),L.push({name:z.labels.contexts,icon:"ui//tags",type:6,onSubmenu:(te,ie)=>Oe(te,je(se.view.document),ie)}),L.push(Ut)}let ue=await v(l?.listView),ce=await v(l?.listGroup),U=await v(l?.listItem),$=(Y,te,ie)=>{u({[Y]:{...l[Y],[te]:ie}})};ue.forEach(Y=>{L.push({name:Ds(Y,e.superstate),icon:Li(Y),type:1,onClick:te=>{E5(te.target.getBoundingClientRect(),je(te.view.document),e.superstate,Y,ie=>$("listViewProps",Y.name,Sa(Y.type,ie,!0)),t.path)}})}),ce.forEach(Y=>{L.push({name:Ds(Y,e.superstate),icon:Li(Y),type:1,onClick:te=>{E5(te.target.getBoundingClientRect(),je(te.view.document),e.superstate,Y,ie=>$("listGroupProps",Y.name,Sa(Y.type,ie,!0)),t.path)}})}),U.forEach(Y=>{L.push({name:Ds(Y,e.superstate),icon:Li(Y),type:1,onClick:te=>{E5(te.target.getBoundingClientRect(),je(te.view.document),e.superstate,Y,ie=>$("listItemProps",Y.name,Sa(Y.type,ie,!0)),t.path)}})});let ee=se.target.getBoundingClientRect();e.superstate.ui.openMenu(ee,Yt(e.superstate.ui,L),je(se.view.document))},q=(se,L)=>{let ue=L[0],ce=x.find($=>$.name+$.table==ue),U=Hu(ce);if(U){let $=KG(U,kp),ee={field:ue,fn:$};u({sort:[...l?.sort.filter(Y=>Y.field!=ee.field)??[],ee]})}},B=(se,L)=>{u({groupBy:L})},N=se=>{let L=[...(l?.sort??[]).filter(ue=>ue.field!=se.field)];u({sort:L})},W=se=>{let L=x.find(ce=>ce.name+ce.table==se),ue=Hu(L);if(ue){let ce=KG(ue,_i);if(!ce)return;let U=ue=="boolean"?{field:se,fn:ce,fType:_i[ce].valueType,value:"true"}:{field:se,fn:ce,fType:_i[ce].valueType,value:""};u({filters:[...l?.filters??[],U]})}},_=(se,L)=>{let ue=se.target.getBoundingClientRect(),ce=(Y,te)=>{let ie=te[0],Se={...L,fn:ie};u({sort:[...(l?.sort??[]).filter(ke=>ke.field!=Se.field),Se]})},U=x.find(Y=>Y.name+Y.table==L.field),$=Hu(U),ee=M2($,kp);e.superstate.ui.openMenu(ue,{ui:e.superstate.ui,multi:!1,editable:!1,value:[],options:ee.map(Y=>({name:kp[Y].label,value:Y})),saveOptions:ce,placeholder:z.labels.sortItemSelectPlaceholder,searchable:!1,showAll:!0},je(se.view.document))},X=(se,L,ue)=>{let ce=se.target.getBoundingClientRect(),U=(te,ie)=>{let Se=ie[0],ke={...L,fn:Se,fType:_i[Se].valueType};u({filters:(l?.filters??[]).map((Me,me)=>me==ue?ke:Me)})},$=x.find(te=>te.name+te.table==L.field),ee=Hu($),Y=M2(ee,_i);e.superstate.ui.openMenu(ce,{ui:e.superstate.ui,multi:!1,editable:!1,value:[],options:Y.map(te=>({name:J0[te],value:te})),saveOptions:U,placeholder:z.labels.filterItemSelectPlaceholder,searchable:!1,showAll:!0},je(se.view.document))},oe=(se,L,ue)=>{let ce=x.filter(U=>U.type=="fileprop"||M2(U.type,_i).length>0).map(U=>({name:U.name+U.table,value:U.name+U.table,icon:Li(U),onClick:$=>{W(U.name+U.table)}}));return ce.push(Ut),ce.push({name:z.menu.clearFilters,icon:"ui//x-square",onClick:U=>{M()}}),e.superstate.ui.openMenu(se,{ui:e.superstate.ui,multi:!1,editable:!1,value:[],options:ce,placeholder:z.labels.propertyItemSelectPlaceholder,searchable:!0,showAll:!0},L,null,ue)},re=(se,L,ue)=>e.superstate.ui.openMenu(se,{ui:e.superstate.ui,multi:!1,editable:!1,value:[],options:x.map(ce=>({name:ce.name+ce.table,icon:Li(ce),value:ce.name+ce.table})),saveOptions:q,placeholder:z.labels.sortItemSelectPlaceholder,searchable:!0,showAll:!0},L,"right",ue),Q=(se,L)=>{if(se.name.length>0&&(se.name!=L.name||se.type!=L.type||se.value!=L.value||se.attrs!=L.attrs)){let ue=d(se,L)}},he=(se,L)=>d({...L,table:""}),Ie=(se,L)=>{let ue=e.superstate.spacesIndex.get(se);sf(e.superstate,ue.space,{...ue.metadata,contexts:L})},xe=(se,L,ue)=>{let ce=e.superstate.spacesIndex.get(n),U=e.superstate.spaceManager.readTags(),$=async ee=>{let Y=Tg(ee);Ie(ce.path,[...ce.metadata.contexts.filter(te=>te!=Y),Y])};return e.superstate.ui.openMenu(se,{ui:e.superstate.ui,multi:!1,editable:!0,value:[],options:U.map(ee=>({name:ee,value:ee})),saveOptions:(ee,Y)=>$(Y[0]),placeholder:z.labels.contextItemSelectPlaceholder,searchable:!0,showAll:!0},L,null,ue)},Oe=(se,L,ue)=>{let ce=[];ce.push({name:z.buttons.addContext,icon:"ui//plus",type:6,onSubmenu:($,ee)=>xe($,L,ee)}),ce.push(Ut);let U=e.superstate.spacesIndex.get(n);return U.contexts.forEach($=>{ce.push({name:$,icon:"ui//tags",onClick:ee=>{e.superstate.ui.openPath($c($))},onMoreOptions:ee=>{let Y=ee.target.getBoundingClientRect(),te=[];return te.push({name:z.menu.deleteContext,icon:"ui//trash",onClick:ie=>{Ie(U.path,U.contexts.filter(Se=>Se!=$))}}),e.superstate.ui.openMenu(Y,{ui:e.superstate.ui,multi:!1,editable:!1,value:[],options:te,placeholder:z.labels.contextItemSelectPlaceholder,searchable:!1,showAll:!0},L)}})}),e.superstate.ui.openMenu(se,{ui:e.superstate.ui,multi:!1,editable:!1,value:[],options:ce,placeholder:z.labels.contextItemSelectPlaceholder,searchable:!1,showAll:!0},L,null,ue)},Re=(se,L,ue)=>{let ce=($,ee,Y)=>Lm({superstate:e.superstate,rect:ee,editable:$.primary!="true",win:L,options:[],field:$,fields:x,contextPath:t.path,saveField:te=>Q(te,$),hide:c,deleteColumn:f,hidden:l?.colsHidden.includes($.name+$.table)},Y,!0),U=[];return U.push({name:z.labels.newProperty,icon:"ui//plus",type:6,onSubmenu:($,ee)=>cf(e.superstate,$,L,{spaces:[],fields:[],saveField:he,schemaId:i.id,contextPath:t.path},ee)}),U.push(Ut),U.push(...x.filter($=>l.colsHidden.some(ee=>ee==$.name+$.table)==!1).map($=>({name:$.name+$.table,icon:Li($),value:$.name+$.table,type:6,onSubmenu:(ee,Y)=>ce($,ee,Y)}))),U.push(Ut),U.push(...x.filter($=>l.colsHidden.some(ee=>ee==$.name+$.table)).map($=>({name:$.name+$.table,icon:Li($),value:$.name+$.table,type:6,onSubmenu:(ee,Y)=>ce($,ee,Y)}))),U.push(Ut),U.push({name:z.menu.unhideFields,icon:"ui//eye",onClick:$=>{O()}}),e.superstate.ui.openMenu(se,{ui:e.superstate.ui,multi:!1,editable:!1,value:[],options:U,placeholder:z.labels.propertyItemSelectPlaceholder,searchable:!1,showAll:!0},L,"right",ue)},_e=(se,L,ue)=>e.superstate.ui.openMenu(se,{ui:e.superstate.ui,multi:!1,editable:!1,value:[],options:x.map(ce=>({name:ce.name+ce.table,icon:Li(ce),value:ce.name+ce.table})),saveOptions:B,placeholder:z.labels.propertyItemSelectPlaceholder,searchable:!1,showAll:!0},L,"right",ue),we=(se,L,ue)=>{switch(L.fType??_i[L.fn].valueType){case"property":u({filters:(l?.filters??[]).map((ce,U)=>U==ue?L:ce)});break;case"text":case"number":u({filters:(l?.filters??[]).map((ce,U)=>U==ue?L:ce)});break;case"date":{let ce=ee=>{let Y={...L,value:ee?Qu(e.superstate,ee):""};u({filters:(l?.filters??[]).map((te,ie)=>ie==ue?Y:te)})},U=se.target.getBoundingClientRect(),$=new Date(L.value);Q0(e.superstate.ui,U,je(se.view.document),$.getTime()?$:null,ce,0);break}case"link":{let ce=a.find(ee=>ee.name+ee.table==L.field);if(ce?.type.startsWith("context")){let ee=Lr(ce.value,ce.type)?.space;if(!ee)return;let Y=e.superstate.getSpaceItems(ee)??[],te=se.target.getBoundingClientRect();e.superstate.ui.openMenu(te,{ui:e.superstate.ui,multi:!1,editable:!1,value:mr(L.value),options:Y.map(ie=>({name:ie.name,value:ie.path}))??[],saveOptions:(ie,Se)=>{let ke={...L,value:Se[0]};u({filters:(l?.filters??[]).map((Me,me)=>me==ue?ke:Me)})},placeholder:z.labels.optionItemSelectPlaceholder,searchable:!0,showAll:!0},je(se.view.document));return}let U=ee=>{let Y={...L,value:ee};u({filters:(l?.filters??[]).map((te,ie)=>ie==ue?Y:te)})},$=se.target.getBoundingClientRect();Ns($,je(se.view.document),e.superstate,ee=>{U(ee)},{multi:!0}),se.stopPropagation()}break;case"list":{let ce=a.find($=>$.name+$.table==L.field),U=($,ee)=>{let Y={...L,value:Ni(ee)};u({filters:(l?.filters??[]).map((te,ie)=>ie==ue?Y:te)})};if(ce.type.startsWith("option")){let $=se.target.getBoundingClientRect(),ee=Lr(ce.value,ce.type).options;e.superstate.ui.openMenu($,{ui:e.superstate.ui,multi:!0,editable:!1,value:mr(L.value),options:ee??[],saveOptions:U,placeholder:z.labels.optionItemSelectPlaceholder,searchable:!0,showAll:!0},je(se.view.document))}else if(ce.type.startsWith("context")){let $=Lr(ce.value,ce.type)?.space;if(!$)return;let ee=e.superstate.getSpaceItems($)??[],Y=se.target.getBoundingClientRect();e.superstate.ui.openMenu(Y,{ui:e.superstate.ui,multi:!0,editable:!1,value:mr(L.value),options:ee.map(te=>({name:te.name,value:te.path}))??[],saveOptions:U,placeholder:z.labels.optionItemSelectPlaceholder,searchable:!0,showAll:!0},je(se.view.document))}else if(ce.type.startsWith("link")){let $=se.target.getBoundingClientRect();Ns($,je(se.view.document),e.superstate,ee=>{U([ee],[ee])},{multi:!0}),se.stopPropagation()}else if(ce.type.startsWith("tags")){let $=e.superstate.spaceManager.readTags(),ee=se.target.getBoundingClientRect();e.superstate.ui.openMenu(ee,{ui:e.superstate.ui,multi:!0,editable:!1,value:mr(L.value),options:$.map(Y=>({name:Y,value:Y}))??[],saveOptions:U,placeholder:z.labels.tagItemSelectPlaceholder,searchable:!0,showAll:!0},je(se.view.document))}}break}};return Xt.default.createElement(Xt.default.Fragment,null,e.minMode?Xt.default.createElement("div",{className:"mk-view-config"},Xt.default.createElement(D5,{superstate:e.superstate,setSearchString:o,closeSearch:()=>A(!1)}),Xt.default.createElement("button",{className:"mk-toolbar-button",onClick:se=>{let L=se.target.getBoundingClientRect();re(L,je(se.view.document),null)},dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//sort-desc")}}),Xt.default.createElement("button",{className:"mk-toolbar-button",onClick:se=>{let L=se.target.getBoundingClientRect();oe(L,je(se.view.document),null)},dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//filter")}})):Xt.default.createElement(Xt.default.Fragment,null,e.showTitle&&Xt.default.createElement("div",{className:"mk-context-config"},Xt.default.createElement(x2e,{superstate:e.superstate}),Xt.default.createElement("span",null),i?.id==Nr&&!t.space.readOnly&&Xt.default.createElement(Xt.default.Fragment,null,Xt.default.createElement("button",{className:"mk-button-new",onClick:se=>NB(e.superstate,se.target.getBoundingClientRect(),je(se.view.document),t,!0),dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//plus")}}))),Xt.default.createElement("div",{className:"mk-view-config"},!w&&Xt.default.createElement(k2e,{superstate:e.superstate,expanded:!1,setView:e.setView}),Xt.default.createElement("div",{className:"mk-view-options"},Xt.default.createElement("span",null),(tc(e.superstate.ui)||!g)&&Xt.default.createElement("button",{className:(0,C2e.default)("mk-toolbar-button",g&&"mk-active"),onClick:se=>{se.stopPropagation(),A(L=>!L)},dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//search")}}),!tc(e.superstate.ui)&&g&&Xt.default.createElement(D5,{superstate:e.superstate,setSearchString:o,closeSearch:()=>A(!1)}),Xt.default.createElement("button",{className:"mk-toolbar-button",onClick:se=>D(se),dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//layout")}}),Xt.default.createElement("button",{className:"mk-toolbar-button",onClick:se=>R(se),dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//view-options")}}))),tc(e.superstate.ui)&&g&&Xt.default.createElement(D5,{superstate:e.superstate,setSearchString:o})),(l?.filters.length>0||l?.sort.length>0||l?.groupBy.length>0)&&Xt.default.createElement("div",{className:"mk-filter-bar"},l.groupBy.length>0&&Xt.default.createElement("div",{className:"mk-filter"},Xt.default.createElement("span",null,z.menu.groupBy),Xt.default.createElement("span",{onClick:se=>_e(se.target.getBoundingClientRect(),je(se.view.document),null)},l.groupBy[0]),Xt.default.createElement("div",{onClick:()=>B(null,[]),dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//close")}})),(l?.sort??[]).map((se,L)=>Xt.default.createElement("div",{key:L,className:"mk-filter"},Xt.default.createElement("span",null,se.field),Xt.default.createElement("span",{onClick:ue=>_(ue,se)},kp[se.fn].label),Xt.default.createElement("div",{onClick:()=>N(se),dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//close")}}))),(l?.filters??[]??[]).map((se,L)=>Xt.default.createElement("div",{key:L,className:"mk-filter"},Xt.default.createElement("span",null,se.field),Xt.default.createElement("span",{onClick:ue=>X(ue,se,L)},J0[se.fn]),Xt.default.createElement(rQ,{superstate:e.superstate,fieldType:a.find(ue=>ue.name+ue.table==se.field)?.type,filter:se,selectFilterValue:(ue,ce)=>we(ue,ce,L)}),b.length>0&&Xt.default.createElement("span",{onClick:ue=>{ue.stopPropagation(),e.superstate.ui.openMenu(ue.currentTarget.getBoundingClientRect(),{ui:e.superstate.ui,multi:!1,editable:!1,value:[],options:b.map(ce=>({name:ce.name,value:ce.name,section:ce.type})),saveOptions:(ce,U)=>we(ue,{...se,fType:"property",value:U[0]},L),placeholder:z.labels.contextItemSelectPlaceholder,searchable:!0,showAll:!0,sections:[],showSections:!1},je(ue.view.document))}},Xt.default.createElement("div",{className:"mk-icon-xsmall",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//plug")}})),Xt.default.createElement("div",{onClick:()=>C(se,L),dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//close")}}))),(l?.filters??[]).length>0&&Xt.default.createElement("div",{className:"mk-filter-add",onClick:se=>{let L=se.target.getBoundingClientRect();oe(L,je(se.view.document),null)}},Xt.default.createElement("span",null,Xt.default.createElement("span",{className:"mk-icon-xsmall",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//plus")}}),z.buttons.addFilter)),Xt.default.createElement("span",null)))},rQ=e=>{let{filter:t,selectFilterValue:r,fieldType:n}=e,i=_i[t.fn],[a,o]=(0,Xt.useState)(t.value);if((0,Xt.useEffect)(()=>o(t.value),[t.value]),t.fType=="property")return Xt.default.createElement("span",null,t.value);if(!n||!i||i.valueType=="none")return Xt.default.createElement(Xt.default.Fragment,null);if(i.valueType=="text"||i.valueType=="number")return Xt.default.createElement("input",{type:"text",onChange:s=>o(s.currentTarget.value),onBlur:s=>{r(null,{...t,value:a})},onKeyDown:s=>{s.key=="Escape"&&(o(t.value),s.currentTarget.blur()),s.key=="Enter"&&s.currentTarget.blur()},value:a});if(n.startsWith("option")||n.startsWith("context")||n.startsWith("link")||n.startsWith("tag")){let s=mr(t.value);return Xt.default.createElement("span",{onClick:l=>r(l,t)},s.length==0?z.labels.select:s.map((l,u)=>n.startsWith("option")?Xt.default.createElement("span",{key:u},l):Xt.default.createElement(ns,{superstate:e.superstate,key:u,path:l})))}else if(!t.value||t.value.length==0)return Xt.default.createElement("span",{onClick:s=>r(s,t)},z.labels.select);return Xt.default.createElement("span",{onClick:s=>r(s,t)},t.value)};var L2=e=>{(0,yi.useEffect)(()=>{e.superstate.refreshMetadata()},[]);let{filters:t,setFilters:r}=e,n=(h,m,g,A)=>{let b=v=>{l(v,g,A)};if(m.fType=="property"){r(t.map((v,x)=>g==x?{...v,filters:v.filters.map((w,S)=>A==S?{...w,fType:"property",value:m.value}:w)}:v));return}switch(_i[m.fn]?.valueType){case"text":case"number":b(m.value);break;case"date":{let v=S=>{b(Pa(S,"yyyy-MM-dd"))},x=h.target.getBoundingClientRect(),w=new Date(m.value);Q0(e.superstate.ui,x,je(h.view.document),w.getTime()?w:null,v,0);break}case"link":{let v=w=>{b(w)},x=h.target.getBoundingClientRect();Ns(x,je(h.view.document),e.superstate,v),h.stopPropagation();break}case"space":{let v=w=>{b(w)},x=h.target.getBoundingClientRect();Wa(x,je(h.view.document),e.superstate,v);break}case"list":{let v=m.fType,x=(k,M)=>{b(Ni(M))},w=[];v.startsWith("option")?w=mr(m.value).map(k=>({name:k,value:k})):v.startsWith("tags")?w=e.superstate.spaceManager.readTags().map(k=>({value:k,name:k})):v.startsWith("link")&&(w=e.superstate.spaceManager.allPaths().map(k=>({name:sx(k),value:k,description:k})));let S=h.target.getBoundingClientRect();e.superstate.ui.openMenu(S,{ui:e.superstate.ui,multi:!0,editable:!0,value:mr(m.value),options:w,saveOptions:x,placeholder:z.labels.optionItemSelectPlaceholder,searchable:!1,showAll:!0},je(h.view.document))}break}},i=()=>{r(h=>[...h,{type:"any",trueFalse:!0,filters:[]}])},a=h=>{r(t.filter((m,g)=>g!=h))},o=(h,m,g)=>{if(!!h){if(t.length==0){r([{type:"all",trueFalse:!0,filters:[{type:h.type,field:h.field,fType:h.vType,fn:h.defaultFilter,value:""}]}]);return}if(t[m]?.filters.length==0){r(t.map((A,b)=>b==m?{...A,filters:[{type:h.type,field:h.field,fType:h.vType,fn:h.defaultFilter,value:""}]}:A));return}r(t.map((A,b)=>b==m?{...A,filters:!A.filters||g==A.filters.length?[...A.filters??[],{type:h.type,field:h.field,fType:h.vType,fn:h.defaultFilter,value:""}]:A.filters.map((v,x)=>x==g?{...v,type:h.type,field:h.field,fType:h.vType,fn:h.defaultFilter}:v)}:A))}},s=(h,m,g)=>{r(t.map((A,b)=>b==m?{...A,filters:A.filters.map((v,x)=>x==g?{...v,fn:h}:v)}:A))},l=(h,m,g)=>{r(t.map((A,b)=>b==m?{...A,filters:A.filters.map((v,x)=>x==g?{...v,value:h}:v)}:A))},u=(h,m)=>{r(t.map((g,A)=>A==m?{...g,filters:g.filters.filter((b,v)=>v!=h)}:g))},c=(h,m)=>{h==0&&t.length==0?r([{type:m,trueFalse:!0,filters:[]}]):r(t.map((g,A)=>A==h?{...g,type:m}:g))},f=(h,m)=>{let g=h.target.getBoundingClientRect(),A=["any","all"];e.superstate.ui.openMenu(g,{ui:e.superstate.ui,multi:!1,editable:!1,value:[],options:A.map(b=>({name:b=="any"?"or":"and",value:b})),saveOptions:(b,v)=>c(m,v[0]),searchable:!1,showAll:!0},je(h.view.document))},d=(h,m,g)=>{let A=h.target.getBoundingClientRect(),{type:b,field:v,fType:x}=t[m].filters[g],w=x=="any"?pxe(_i):M2(x,_i);e.superstate.ui.openMenu(A,{ui:e.superstate.ui,multi:!1,editable:!0,value:[],options:w.map(S=>({name:J0[S],value:S})),saveOptions:(S,k)=>s(k[0],m,g),placeholder:z.labels.contextItemSelectPlaceholder,searchable:!0,showAll:!0},je(h.view.document))},p=async(h,m,g)=>{let A=h.target.getBoundingClientRect();e.superstate.ui.openMenu(A,{ui:e.superstate.ui,multi:!1,editable:!1,value:[],options:e.fields.map(b=>({name:b.label,value:b,section:b.type,description:b.description})),saveOptions:(b,v)=>o(v[0],m,g),placeholder:z.labels.contextItemSelectPlaceholder,searchable:!0,showAll:!0,sections:e.sections,showSections:!0},je(h.view.document))};return yi.default.createElement("div",{className:"mk-query"},t.length==0?yi.default.createElement(D2e,{superstate:e.superstate,selectGroupType:f,group:null,addDefGroup:i,selectField:p,i:0,removeable:e.removeable,removeDefGroup:a}):t.map((h,m)=>yi.default.createElement(D2e,{superstate:e.superstate,key:m,group:h,selectGroupType:f,addDefGroup:i,selectField:p,removeable:e.removeable,i:m,removeDefGroup:a},h.filters.map((g,A,b)=>yi.default.createElement(yi.default.Fragment,{key:A},yi.default.createElement(ZYe,{superstate:e.superstate,key:A,filter:g,i:m,k:A,selectField:p,selectFilter:d,selectFilterValue:n,removeDefFilter:u,linkProps:e.linkProps}),A!=b.length-1&&yi.default.createElement("div",{className:"mk-filter",onClick:v=>f(v,m)},yi.default.createElement("span",null,h.type=="any"?"or":"and")))))))},ZYe=e=>{let{filter:t,selectField:r,selectFilter:n,selectFilterValue:i,removeDefFilter:a,i:o,k:s}=e,l=e.superstate.allMetadata[t.type]?.properties.find(u=>u.field==t.field)?.label??t.field;return yi.default.createElement("div",{className:"mk-filter"},yi.default.createElement("span",{onClick:u=>r(u,o,s)},t.field.length==0?z.labels.select:l),t.field.length>0&&yi.default.createElement("span",{onClick:u=>n(u,o,s)},J0[t.fn]?J0[t.fn]:z.labels.select),t.field.length>0&&J0[t.fn]&&_i[t.fn]?.valueType!="none"&&yi.default.createElement(yi.default.Fragment,null,yi.default.createElement("span",null,yi.default.createElement(rQ,{superstate:e.superstate,fieldType:t.fType,filter:t,selectFilterValue:(u,c)=>i(u,c,o,s)})),e.linkProps&&e.linkProps.length>0&&yi.default.createElement("span",{onClick:u=>{u.stopPropagation(),e.superstate.ui.openMenu(u.currentTarget.getBoundingClientRect(),{ui:e.superstate.ui,multi:!1,editable:!1,value:[],options:e.linkProps.map(c=>({name:c.name,value:c.name,section:c.type})),saveOptions:(c,f)=>i(u,{...t,fType:"property",value:f[0]},o,s),placeholder:z.labels.contextItemSelectPlaceholder,searchable:!0,showAll:!0,sections:[],showSections:!1},je(u.view.document))}},yi.default.createElement("div",{className:"mk-icon-xsmall",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//plug")}}))),yi.default.createElement("span",{onClick:u=>{a(s,o),u.stopPropagation()}},yi.default.createElement("div",{className:"mk-icon-xsmall",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//close")}})))},D2e=e=>{let{group:t,selectGroupType:r,addDefGroup:n,selectField:i,i:a,removeDefGroup:o}=e;return yi.default.createElement("div",{className:"mk-query-group"},yi.default.createElement("div",{className:"mk-filter-bar mk-query-filters"},e.children,yi.default.createElement("div",{className:"mk-filter-add",onClick:s=>i(s,a,t?.filters.length??0)},yi.default.createElement("span",null,yi.default.createElement("span",{className:"mk-icon-xsmall",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//plus")}}),z.buttons.addCondition))),e.removeable&&yi.default.createElement("div",{className:"mk-filter-add",onClick:s=>{o(a),s.stopPropagation()}},yi.default.createElement("span",null,yi.default.createElement("span",{className:"mk-icon-small",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//close")}}))))};var j2e=e=>{let[t,r]=(0,Ul.useState)(e.space.metadata??{}),n=l=>{i({...t,filters:l})},i=l=>{r(l),sf(e.superstate,e.space.space,l)},a=e.superstate.allMetadata,o=[];Object.keys(a).forEach(l=>{a[l].properties.forEach(u=>{o.push(u)})});let s=Object.keys(a).map(l=>({name:a[l].name,value:l}));return(0,Ul.useEffect)(()=>{let l=u=>{if(u.path==e.space.path){let c=e.superstate.spacesIndex.get(e.space.path)?.metadata;c&&r(c)}};return e.superstate.eventsDispatcher.addListener("spaceStateUpdated",l),()=>{e.superstate.eventsDispatcher.removeListener("spaceStateUpdated",l)}},[e.space]),t?.filters?.length>0&&Ul.default.createElement("div",{className:"mk-path-context-row"},Ul.default.createElement("div",{className:"mk-path-context-field"},Ul.default.createElement("div",{className:"mk-path-context-field-icon",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//live")}}),Ul.default.createElement("div",{className:"mk-path-context-field-key"},z.subViews.smartSearch)),Ul.default.createElement("div",{className:"mk-path-context-value"},Ul.default.createElement("div",{className:"mk-props-value"},Ul.default.createElement("div",{className:"mk-props-list"},Ul.default.createElement("div",{className:"mk-space-editor-smart"},t?.filters?.length>0&&Ul.default.createElement(L2,{superstate:e.superstate,filters:t.filters??[],setFilters:n,removeable:!0,fields:o,sections:s,linkProps:e.space.propertyTypes}),Ul.default.createElement("button",{className:"mk-filter-add","aria-label":z.buttons.addSmartSearch,onClick:l=>i({...t,filters:[...t.filters??[],{type:"any",trueFalse:!0,filters:[]}]})},Ul.default.createElement("div",{className:"mk-icon-xsmall",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//plus")}}),z.buttons.addSmartSearch))))))};var ya=ge(Te());var O2e=e=>{let{pathState:t}=(0,ya.useContext)(Ir),{spaceState:r}=(0,ya.useContext)(sr),[n,i]=(0,ya.useState)(!0),[a,o]=ya.default.useState([]);(0,ya.useEffect)(()=>{s({path:t.path})},[]);let s=c=>{c.path==t?.path&&e.superstate.spaceManager.commandsForSpace(t.path).then(f=>o(f))};(0,ya.useEffect)(()=>(e.superstate.eventsDispatcher.addListener("actionStateUpdated",s),()=>{e.superstate.eventsDispatcher.removeListener("actionStateUpdated",s)}),[t]);let l=c=>{e.superstate.ui.openModal(z.labels.newAction,ya.default.createElement(ji,{value:"",saveLabel:z.buttons.save,saveValue:f=>{e.superstate.spaceManager.createCommand(r.path,{id:f,name:f,type:"actions"})}}),je(c.view.document))},u=(c,f)=>{c.preventDefault();let d=c.target.getBoundingClientRect(),p=[];p.push({name:"Run Action",icon:"lucide//play",onClick:()=>e.superstate.cli.runCommand(tQ(r,f.schema.id),{iterations:0,instanceProps:{},props:{}})}),p.push({name:"Delete Action",icon:"ui//trash",onClick:()=>e.superstate.spaceManager.deleteCommand(r.path,f.schema.id)}),e.superstate.ui.openMenu(d,Yt(e.superstate.ui,p),je(c.view.document))};return a.length>0?e.compactMode?ya.default.createElement("div",{className:"mk-props-pill",onClick:()=>i(c=>!c)},a.length," Actions"):ya.default.createElement("div",{className:"mk-path-context-row"},ya.default.createElement("div",{className:"mk-path-context-field"},ya.default.createElement("div",{className:"mk-path-context-field-icon",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//mouse-pointer-click")}}),ya.default.createElement("div",{className:"mk-path-context-field-key"},"Actions")),ya.default.createElement("div",{className:"mk-path-context-value"},ya.default.createElement("div",{className:"mk-props-pill",onClick:()=>i(c=>!c)},a.length," Actions",ya.default.createElement(Bm,{superstate:e.superstate,collapsed:n})),!n&&ya.default.createElement("div",{className:"mk-props-list"},a.map((c,f)=>ya.default.createElement("div",{key:f,className:"mk-path",onContextMenu:d=>u(d,c)},ya.default.createElement("div",{className:"mk-path-icon",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker(cx(c.schema))}}),ya.default.createElement("div",{onClick:d=>{e.superstate.ui.openPath(tQ(r,c.schema.id),d.metaKey)}},c.schema.name)))))):ya.default.createElement(ya.default.Fragment,null)};var ja=ge(Te());var M2e=e=>{let[t,r]=(0,ja.useState)(!0),[n,i]=(0,ja.useState)(e.space.metadata??{}),a=l=>{i(l),sf(e.superstate,e.space.space,l)},o=(0,ja.useMemo)(()=>(n?.links??[]).map(l=>e.superstate.pathsIndex.get(l)).filter(l=>l),[n]),s=(0,ja.useMemo)(()=>[...e.superstate.spacesMap.getInverse(e.space.path)].map(l=>e.superstate.pathsIndex.get(l)).filter(l=>l.parent==e.space.path),[e.space]);return(0,ja.useEffect)(()=>{let l=u=>{if(u.path==e.space.path){let c=e.superstate.spacesIndex.get(e.space.path)?.metadata;c&&i(c)}};return e.superstate.eventsDispatcher.addListener("spaceStateUpdated",l),()=>{e.superstate.eventsDispatcher.removeListener("spaceStateUpdated",l)}},[e.space]),e.compactMode?ja.default.createElement("div",{className:"mk-props-pill",onClick:()=>r(l=>!l)},ja.default.createElement("div",{className:"mk-path-context-field-icon",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//file-stack")}}),o.length+s.length," Items"):ja.default.createElement("div",{className:"mk-path-context-row"},ja.default.createElement("div",{className:"mk-path-context-field"},ja.default.createElement("div",{className:"mk-path-context-field-icon",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//file-stack")}}),ja.default.createElement("div",{className:"mk-path-context-field-key","aria-label":z.descriptions.spaceItems},"Items")),ja.default.createElement("div",{className:"mk-path-context-value"},ja.default.createElement("div",{className:"mk-props-value"},ja.default.createElement("div",{className:"mk-props-list"},ja.default.createElement("div",{className:"mk-props-pill",onClick:()=>r(l=>!l)},o.length+s.length," Items",ja.default.createElement(Bm,{superstate:e.superstate,collapsed:t})),ja.default.createElement("button",{className:"mk-toolbar-button","aria-label":z.buttons.addSmartSearch,onClick:l=>{let u=[];u.push({name:z.buttons.addSmartSearch,icon:"ui//live",onClick:()=>{a({...n,filters:[...n.filters??[],{type:"any",trueFalse:!0,filters:[]}]})}}),u.push({name:z.buttons.subFolders,icon:"ui//folder",type:6,onSubmenu:(f,d)=>{let p=[];return p.push({name:"Include all items in subfolders",onClick:()=>{a({...n,recursive:"file"})}}),p.push({name:"Include all folders and items in subfolders",onClick:()=>{a({...n,recursive:"all"})}}),p.push({name:"Don't include items in subfolder",onClick:()=>{a({...n,recursive:""})}}),e.superstate.ui.openMenu(f,Yt(e.superstate.ui,p),je(l.view.document),null,d)}});let c=l.currentTarget.getBoundingClientRect();e.superstate.ui.openMenu(c,Yt(e.superstate.ui,u),je(l.view.document))},dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//plus")}})),!t&&ja.default.createElement("div",{className:"mk-props-list"},o.map((l,u)=>ja.default.createElement(ns,{key:u,superstate:e.superstate,path:l.path,source:e.space.path})),s.map((l,u)=>ja.default.createElement(ns,{key:u,superstate:e.superstate,path:l.path,source:e.space.path}))))))};var PA=ge(Te()),N2e=e=>{let{setDragNode:t}=(0,PA.useContext)(qm),{spaceInfo:r}=(0,PA.useContext)(sr),n=r.path+e.schema?.id,{attributes:i,listeners:a,setNodeRef:o,transform:s}=gm({id:n,data:{id:n,type:"context",space:r?.path,schema:e.schema?.id}}),l=(0,PA.useRef)(null);return Vo({onDragStart:u=>{u.active.data.current.id==n&&t(PA.default.createElement("div",{dangerouslySetInnerHTML:{__html:l.current.innerHTML}}))}}),PA.default.createElement("div",{className:"mk-path",onClick:u=>e.onClick(u),ref:u=>{o(u),l.current=u},onContextMenu:u=>e.onContextMenu(u),...i,...a},PA.default.createElement("div",{className:"mk-path-icon",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker(e.schema?.primary=="true"?"ui//layout-list":"ui//table")}}),e.schema?.name)};var Ii=ge(Te());var T2e=e=>{let{pathState:t}=(0,Ii.useContext)(Ir),{spaceState:r}=(0,Ii.useContext)(sr),[n,i]=(0,Ii.useState)(!0),[a,o]=(0,Ii.useState)([]);(0,Ii.useEffect)(()=>{s({path:t.path})},[]);let s=c=>{c.path==t?.path&&e.superstate.spaceManager.readAllTables(t?.path)?.then(f=>f?(Object.values(f).map(d=>d.schema)??[]).filter(d=>d.primary!="true"):null).then(f=>{f&&o(f)})};(0,Ii.useEffect)(()=>(e.superstate.eventsDispatcher.addListener("contextStateUpdated",s),()=>{e.superstate.eventsDispatcher.removeListener("contextStateUpdated",s)}),[t]);let l=c=>{e.superstate.ui.openModal(z.labels.newTable,Ii.default.createElement(ji,{value:"",saveLabel:z.buttons.save,saveValue:f=>{e.superstate.spaceManager.tablesForSpace(r.path).then(d=>{if(d){let p={id:Mi(Tm(f),d.map(h=>h.id)),name:f,type:"db"};return e.superstate.spaceManager.createTable(r.path,p).then(h=>e.superstate.spaceManager.addSpaceProperty(r.path,{...fx[0],schemaId:p.id}))}})}}),je(c.view.document))},u=(c,f)=>{let d=[];d.push({name:z.menu.copyEmbedLink,icon:"ui//link",onClick:p=>{navigator.clipboard.writeText(C5(r,f.id))}}),d.push({name:z.menu.moveFile,icon:"ui//move",onClick:p=>{let h=p.target.getBoundingClientRect();Wa(h,je(p.view.document),e.superstate,async m=>{let g=await e.superstate.spaceManager.readTable(r.path,f.id),A=await e.superstate.spaceManager.readAllTables(r.path);g.schema.id=Mi(Tm(g.schema.id),Object.keys(A)),g.cols=g.cols.map(b=>({...b,schemaId:g.schema.id})),e.superstate.spaceManager.createTable(m,g.schema).then(b=>e.superstate.spaceManager.saveTable(m,g))})}}),d.push({name:z.menu.duplicate,icon:"ui//copy",onClick:p=>{e.superstate.ui.openModal("Duplicate Table",Ii.default.createElement(ji,{value:"",saveLabel:"Save",saveValue:async h=>{let m=await e.superstate.spaceManager.readTable(r.path,f.id),g=await e.superstate.spaceManager.readAllTables(r.path);m.schema.id=Mi(Tm(h),Object.keys(g)),m.cols=m.cols.map(A=>({...A,schemaId:m.schema.id})),e.superstate.spaceManager.createTable(r.path,m.schema).then(A=>e.superstate.spaceManager.saveTable(r.path,m)).then(A=>A&&e.superstate.reloadContextByPath(r.path,!0))}}),je(p.view.document))}}),d.push({name:z.buttons.renameView,icon:"ui//edit",onClick:p=>{e.superstate.ui.openModal(z.labels.renameView,Ii.default.createElement(ji,{value:f.name,saveLabel:z.labels.renameView,saveValue:h=>{e.superstate.spaceManager.saveTableSchema(t.path,f.id,()=>({...f,name:h}))}}),je(p.view.document))}}),d.push({name:z.buttons.delete,icon:"ui//trash",onClick:p=>{e.superstate.spaceManager.deleteTable(t.path,f.id)}}),e.superstate.ui.openMenu(c.target.getBoundingClientRect(),Yt(e.superstate.ui,d),je(c.view.document))};return a.length>0?e.compactMode?Ii.default.createElement("div",{className:"mk-props-pill",onClick:()=>i(c=>!c)},a.length," Lists"):Ii.default.createElement("div",{className:"mk-path-context-row"},Ii.default.createElement("div",{className:"mk-path-context-field"},Ii.default.createElement("div",{className:"mk-path-context-field-icon",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//layout-list")}}),Ii.default.createElement("div",{className:"mk-path-context-field-key"},"Lists")),Ii.default.createElement("div",{className:"mk-props-value"},Ii.default.createElement("div",{className:"mk-props-pill",onClick:()=>i(c=>!c)},a.length," Lists",Ii.default.createElement(Bm,{superstate:e.superstate,collapsed:n})),!n&&Ii.default.createElement(Ii.default.Fragment,null,Ii.default.createElement("div",{className:"mk-props-list"},a.map((c,f)=>Ii.default.createElement(N2e,{key:f,superstate:e.superstate,schema:c,onClick:d=>{e.superstate.ui.openPath(xy(r,c.id),d.metaKey)},onContextMenu:d=>{u(d,c)}})),Ii.default.createElement("button",{className:"mk-toolbar-button","aria-label":z.labels.newTable,onClick:c=>l(c),dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//plus")}}))))):Ii.default.createElement(Ii.default.Fragment,null)};var Bi=ge(Te());var F2e=e=>{let{pathState:t}=(0,Bi.useContext)(Ir),{spaceState:r}=(0,Bi.useContext)(sr),[n,i]=(0,Bi.useState)(!0),[a,o]=Bi.default.useState([]);(0,Bi.useEffect)(()=>{s({path:t.path})},[]);let s=f=>{f.path==t?.path&&o(e.superstate.spacesIndex.get(r.path)?.templates)};(0,Bi.useEffect)(()=>(e.superstate.eventsDispatcher.addListener("spaceStateUpdated",s),()=>{e.superstate.eventsDispatcher.removeListener("spaceStateUpdated",s)}),[t]);let l=f=>{let d=f.target.getBoundingClientRect();Ns(d,je(f.view.document),e.superstate,p=>{I0(e.superstate,t.path,p)}),f.stopPropagation()},u=(f,d)=>{let p=f.target.getBoundingClientRect(),h=[];h.push({name:"Set as Default",icon:"ui//clipboard-pen",onClick:()=>Tye(e.superstate,t.path,d)}),h.push({name:"Delete",icon:"ui//trash",onClick:()=>e.superstate.spaceManager.deleteTemplate(d,r.path)}),e.superstate.ui.openMenu(p,Yt(e.superstate.ui,h),je(f.view.document),"bottom")},c=f=>{let d={superstate:e.superstate,saveFormula:p=>Fye(e.superstate,t.path,p),formula:r.metadata.templateName,value:{},fields:[],description:"Automatically set a template name using a formula",path:t.path};e.superstate.ui.openCustomMenu(f.target.getBoundingClientRect(),Bi.default.createElement(Im,{...d}),{...d},je(f.view.document),"bottom")};return a?.length>0?e.compactMode?Bi.default.createElement("div",{className:"mk-props-pill",onClick:()=>i(f=>!f)},a.length," Templates"):Bi.default.createElement("div",{className:"mk-path-context-row"},Bi.default.createElement("div",{className:"mk-path-context-field"},Bi.default.createElement("div",{className:"mk-path-context-field-icon",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//clipboard-pen")}}),Bi.default.createElement("div",{className:"mk-path-context-field-key"},"Templates")),Bi.default.createElement("div",{className:"mk-path-context-value"},Bi.default.createElement("div",{className:"mk-props-pill",onClick:()=>i(f=>!f)},a.length," Templates",Bi.default.createElement(Bm,{superstate:e.superstate,collapsed:n})),Bi.default.createElement("button",{className:"mk-toolbar-button","aria-label":z.labels.editFormula,onClick:f=>c(f),dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//formula")}}),!n&&Bi.default.createElement("div",{className:"mk-props-list"},a.map((f,d)=>Bi.default.createElement("div",{key:d,className:"mk-path",onContextMenu:p=>u(p,f)},Bi.default.createElement("div",{className:"mk-path-icon",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//clipboard-pen")}}),Bi.default.createElement("div",null,f),r.metadata.template==f&&Bi.default.createElement("div",{className:"mk-path-icon","aria-label":"Default",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//check")}}))),Bi.default.createElement("button",{className:"mk-toolbar-button","aria-label":z.labels.newAction,onClick:f=>l(f),dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//plus")}})))):Bi.default.createElement(Bi.default.Fragment,null)};var pr=ge(Te());var z2=e=>{let[t,r]=(0,pr.useState)(!e.superstate.settings.inlineContextExpanded||!e.collapseSpaces);(0,pr.useEffect)(()=>{e.superstate.settings.inlineContextExpanded=!t,e.superstate.saveSettings()},[t]);let{spaceState:n}=(0,pr.useContext)(sr),{addToSpace:i,readMode:a,removeFromSpace:o,pathState:s}=(0,pr.useContext)(Ir),l=s.type=="space",u=(R,q)=>{let B=e.superstate.spacesIndex.get(q);if(!B)return;R.preventDefault();let N=[];N.push({name:z.menu.openSpace,icon:"ui//layout-grid",onClick:_=>{e.superstate.ui.openPath(B.path,_.metaKey)}}),N.push({name:z.labels.newProperty,icon:"ui//plus",onClick:_=>{h(_,B.path)}}),o&&N.push({name:z.menu.removeFromSpace,icon:"ui//trash",onClick:_=>{o(B.path)}});let W=R.target.getBoundingClientRect();e.superstate.ui.openMenu(W,Yt(e.superstate.ui,N),je(R.view.document))},c=R=>[...e.superstate.spacesMap.get(R)].map(q=>e.superstate.spacesIndex.get(q)).filter(q=>q&&q.type!="default"&&q.path!="/").map(q=>e.superstate.pathsIndex.get(q.path)).sort((q,B)=>R.startsWith(q.path)?-1:R.startsWith(B.path)?1:0).filter(q=>q),f=(0,pr.useMemo)(()=>c(s.path),[s]),d=(0,pr.useMemo)(()=>[...e.superstate.spacesMap.get(s?.path)??[]].map(R=>e.superstate.spacesIndex.get(R)?.space).filter(R=>R),[s]),p=(R,q)=>R=="$fm"?(_ye(e.superstate,s.path,q),!0):(e.superstate.spaceManager.addSpaceProperty(R,q),!0),h=(R,q)=>{let B=R.target.getBoundingClientRect();cf(e.superstate,B,je(R.view.document),{spaces:f.map(N=>N.path),fields:[],saveField:(N,W)=>p(q,W),schemaId:Nr,contextPath:q,fileMetadata:!l})},m=R=>{let q=R.target.getBoundingClientRect();Wa(q,je(R.view.document),e.superstate,(B,N)=>{N?B.charAt(0)=="#"?Fm(e.superstate,s.path,B):Sp(e.superstate,B,{links:[s.path]}):i(B)},!1,!0)},g=R=>{e.superstate.ui.openModal(z.labels.newAction,pr.default.createElement(ji,{value:"",saveLabel:z.buttons.save,saveValue:q=>{e.superstate.spaceManager.createCommand(n.path,{id:q,name:q,type:"actions"})}}),je(R.view.document))},A=R=>{e.superstate.ui.openModal(z.labels.newTable,pr.default.createElement(ji,{value:"",saveLabel:z.buttons.save,saveValue:q=>{e.superstate.spaceManager.tablesForSpace(n.path).then(B=>{if(B){let N={id:Mi(Tm(q),B.map(W=>W.id)),name:q,type:"db"};return e.superstate.spaceManager.createTable(n.path,N).then(W=>e.superstate.spaceManager.addSpaceProperty(n.path,{...fx[0],schemaId:N.id}))}})}}),je(R.view.document))},b=(R,q)=>Ns(R,q,e.superstate,B=>{I0(e.superstate,s.path,B)}),v=R=>{let q=R.target.getBoundingClientRect(),B=je(R.view.document);e.superstate.ui.openMenu(q,Yt(e.superstate.ui,[{name:z.labels.newTable,description:z.descriptions.spaceLists,icon:"ui//table",onClick:N=>A(N)},{name:z.labels.template,description:z.descriptions.spaceTemplates,icon:"ui//clipboard-pen",onClick:N=>b(q,B)},{name:z.labels.newAction,description:z.descriptions.spaceActions,icon:"ui//mouse-pointer-click",onClick:N=>g(N)}]),B)},[x,w]=(0,pr.useState)([]);(0,pr.useEffect)(()=>{S()},[s]),(0,pr.useEffect)(()=>{let R=q=>{![...e.superstate.spacesMap.get(s?.path)??[]].includes(q.path)||S()};return e.superstate.eventsDispatcher.addListener("contextStateUpdated",R),()=>{e.superstate.eventsDispatcher.removeListener("contextStateUpdated",R)}},[s]);let S=async()=>{let R=[...e.superstate.spacesMap.get(s?.path)??[]],q=await Promise.all(R.map(async N=>e.superstate.spaceManager.readTable(N,Nr).then(W=>({path:N,cols:W.cols,rows:W.rows})))),B=[];q.forEach(N=>{let W=N.rows.find(_=>_[It]==s.path);N.cols.filter(_=>_.primary!="true").forEach(_=>{let X=B.findIndex(oe=>oe.property.name==_.name);X==-1?B.push({property:_,contexts:[N.path],value:W?.[_.name]??""}):B[X].contexts.push(N.path)})},[]),w(B)},k=(R,q)=>{Di(e.superstate,s.path,{[q.property.name]:Sa(q.property.type,R,!0)})},M=(R,q,B)=>{Di(e.superstate,s.path,{[B.property.name]:Sa(B.property.type,q,!0)}),e.superstate.spaceManager.saveSpaceProperty(B.contexts[0],{...B.property,value:R},B.property)},O=(R,q)=>{let B=R.target.getBoundingClientRect();Lm({superstate:e.superstate,field:q.property,rect:B,win:je(R.view.document),options:[],fields:x.map(N=>N.property),contextPath:s.path,saveField:N=>{e.superstate.spaceManager.saveSpaceProperty(q.contexts[0],N,q.property)},anchor:"bottom",deleteColumn:N=>{e.superstate.spaceManager.deleteSpaceProperty(q.contexts[0],q.property)},editable:!0})},[C,T]=(0,pr.useTransition)();(0,pr.useEffect)(()=>{T(()=>null)},[]);let D=()=>{T(()=>r(R=>!R))},P=[..._g(e.superstate.settings)];return pr.default.createElement("div",{className:"mk-props-contexts"},!a&&e.collapseSpaces&&pr.default.createElement("div",{style:{position:"relative"}},pr.default.createElement("div",{className:"mk-fold"},pr.default.createElement(bc,{superstate:e.superstate,collapsed:t,onToggle:R=>D()}))),e.collapseSpaces&&pr.default.createElement("div",{className:"mk-path-context-row"},pr.default.createElement("div",{className:"mk-props-contexts-space-list"},f.map((R,q)=>pr.default.createElement("div",{key:q,className:"mk-props-contexts-space-name",onContextMenu:B=>u(B,R.path),onClick:B=>e.superstate.ui.openPath(R.path,B.metaKey),style:R.label?.color?.length>0?{"--tag-background":R.label?.color,"--tag-color":"var(--color-white)"}:{}},pr.default.createElement("div",{className:"mk-icon-xsmall",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker(R.label?.sticker)}}),R.name)),pr.default.createElement("div",{className:"mk-props-contexts-space-name",onClick:R=>m(R),style:{opacity:.5}},pr.default.createElement("span",{className:"mk-icon-xsmall",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//space-add")}}),z.labels.spaces))),(!t||!e.collapseSpaces||C)&&pr.default.createElement("div",{className:"mk-header-space",style:{transition:"all 0.3s ease-in-out",maxHeight:C?"0px":"unset"}},!e.collapseSpaces&&pr.default.createElement("div",{className:"mk-path-context-row"},pr.default.createElement("div",{className:"mk-path-context-field"},pr.default.createElement("div",{className:"mk-path-context-field-icon",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//file-stack")}}),pr.default.createElement("div",{className:"mk-path-context-field-key"},"Spaces")),pr.default.createElement("div",{className:"mk-path-context-value"},pr.default.createElement("div",{className:"mk-props-value"},pr.default.createElement("div",{className:"mk-props-list"},f.map((R,q)=>pr.default.createElement(ns,{key:q,superstate:e.superstate,path:R.path})))))),l&&n&&pr.default.createElement(pr.default.Fragment,null,pr.default.createElement(M2e,{superstate:e.superstate,space:n,compactMode:!1}),pr.default.createElement(j2e,{superstate:e.superstate,space:n}),pr.default.createElement(T2e,{superstate:e.superstate,compactMode:!1}),pr.default.createElement(F2e,{superstate:e.superstate,compactMode:!1}),pr.default.createElement(O2e,{superstate:e.superstate,compactMode:!1})),x.map((R,q)=>pr.default.createElement(as,{key:q,superstate:e.superstate,initialValue:R.value,row:s.metadata.property,compactMode:!1,column:{...R.property,table:""},editMode:5,updateValue:B=>k(B,R),updateFieldValue:(B,N)=>M(B,N,R),contextTable:{},source:s.path,path:s.path,contexts:R.contexts,propertyMenu:B=>O(B,R)})),pr.default.createElement(b2e,{superstate:e.superstate,spaces:d.map(R=>R.path),force:!0,compactMode:!1,excludeKeys:[...P,e.superstate.settings.fmKeyAlias],editable:!0}),pr.default.createElement("div",{className:"mk-path-context-row-new"},pr.default.createElement("div",{className:"mk-path-context-new",onClick:R=>h(R,"$fm")},pr.default.createElement("div",{className:"mk-path-context-field-icon",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//plus")}}),pr.default.createElement("div",{className:"mk-path-context-field-key"},z.labels.newProperty)),l&&pr.default.createElement("div",{className:"mk-path-context-new",onClick:R=>v(R)},pr.default.createElement("div",{className:"mk-path-context-field-icon",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//options")}})))),P.length>0&&pr.default.createElement("style",null,`${P.map(R=>`.metadata-property[data-property-key="${R}"]`).join(", ")} @@ -325,7 +325,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,r?.key)}return(l=r?.onChange)==null||l.call(r,i),i}}function R9(e,t){if(e===void 0)throw new Error(`Unexpected undefined${t?`: ${t}`:""}`);return e}var Pke=(e,t)=>Math.abs(e-t)<1;var UKe=e=>e,WKe=e=>{let t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let i=t;i<=r;i++)n.push(i);return n},Ike=(e,t)=>{let r=e.scrollElement;if(!r)return;let n=a=>{let{width:o,height:s}=a;t({width:Math.round(o),height:Math.round(s)})};if(n(r.getBoundingClientRect()),typeof ResizeObserver>"u")return()=>{};let i=new ResizeObserver(a=>{let o=a[0];if(o?.borderBoxSize){let s=o.borderBoxSize[0];if(s){n({width:s.inlineSize,height:s.blockSize});return}}n(r.getBoundingClientRect())});return i.observe(r,{box:"border-box"}),()=>{i.unobserve(r)}};var Bke=(e,t)=>{let r=e.scrollElement;if(!r)return;let n=()=>{t(r[e.options.horizontal?"scrollLeft":"scrollTop"])};return n(),r.addEventListener("scroll",n,{passive:!0}),()=>{r.removeEventListener("scroll",n)}};var VKe=(e,t,r)=>{if(t?.borderBoxSize){let n=t.borderBoxSize[0];if(n)return Math.round(n[r.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[r.options.horizontal?"width":"height"])};var Rke=(e,{adjustments:t=0,behavior:r},n)=>{var i,a;let o=e+t;(a=(i=n.scrollElement)==null?void 0:i.scrollTo)==null||a.call(i,{[n.options.horizontal?"left":"top"]:o,behavior:r})},$9=class{constructor(t){this.unsubs=[],this.scrollElement=null,this.isScrolling=!1,this.isScrollingTimeoutId=null,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=(()=>{let r=null,n=()=>r||(typeof ResizeObserver<"u"?r=new ResizeObserver(i=>{i.forEach(a=>{this._measureElement(a.target,a)})}):null);return{disconnect:()=>{var i;return(i=n())==null?void 0:i.disconnect()},observe:i=>{var a;return(a=n())==null?void 0:a.observe(i,{box:"border-box"})},unobserve:i=>{var a;return(a=n())==null?void 0:a.unobserve(i)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([n,i])=>{typeof i>"u"&&delete r[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:UKe,rangeExtractor:WKe,onChange:()=>{},measureElement:VKe,initialRect:{width:0,height:0},scrollMargin:0,gap:0,scrollingDelay:150,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,...r}},this.notify=r=>{var n,i;(i=(n=this.options).onChange)==null||i.call(n,this,r)},this.maybeNotify=qy(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),r=>{this.notify(r)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.scrollElement=null},this._didMount=()=>(this.measureElementCache.forEach(this.observer.observe),()=>{this.observer.disconnect(),this.cleanup()}),this._willUpdate=()=>{let r=this.options.getScrollElement();this.scrollElement!==r&&(this.cleanup(),this.scrollElement=r,this._scrollToOffset(this.scrollOffset,{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,n=>{this.scrollRect=n,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,n=>{this.scrollAdjustments=0,this.scrollOffset!==n&&(this.isScrollingTimeoutId!==null&&(clearTimeout(this.isScrollingTimeoutId),this.isScrollingTimeoutId=null),this.isScrolling=!0,this.scrollDirection=this.scrollOffset{this.isScrollingTimeoutId=null,this.isScrolling=!1,this.scrollDirection=null,this.maybeNotify()},this.options.scrollingDelay))})))},this.getSize=()=>this.scrollRect[this.options.horizontal?"width":"height"],this.memoOptions=qy(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey],(r,n,i,a)=>(this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:n,scrollMargin:i,getItemKey:a}),{key:!1}),this.getFurthestMeasurement=(r,n)=>{let i=new Map,a=new Map;for(let o=n-1;o>=0;o--){let s=r[o];if(i.has(s.lane))continue;let l=a.get(s.lane);if(l==null||s.end>l.end?a.set(s.lane,s):s.endo.end===s.end?o.index-s.index:o.end-s.end)[0]:void 0},this.getMeasurements=qy(()=>[this.memoOptions(),this.itemSizeCache],({count:r,paddingStart:n,scrollMargin:i,getItemKey:a},o)=>{let s=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];let l=this.measurementsCache.slice(0,s);for(let u=s;uthis.options.debug}),this.calculateRange=qy(()=>[this.getMeasurements(),this.getSize(),this.scrollOffset],(r,n,i)=>this.range=r.length>0&&n>0?GKe({measurements:r,outerSize:n,scrollOffset:i}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=qy(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(r,n,i,a)=>n===null?[]:r({...n,overscan:i,count:a}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=r=>{let n=this.options.indexAttribute,i=r.getAttribute(n);return i?parseInt(i,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(r,n)=>{let i=this.measurementsCache[this.indexFromElement(r)];if(!i||!r.isConnected){this.measureElementCache.forEach((s,l)=>{s===r&&(this.observer.unobserve(r),this.measureElementCache.delete(l))});return}let a=this.measureElementCache.get(i.key);a!==r&&(a&&this.observer.unobserve(a),this.observer.observe(r),this.measureElementCache.set(i.key,r));let o=this.options.measureElement(r,n,this);this.resizeItem(i,o)},this.resizeItem=(r,n)=>{let i=this.itemSizeCache.get(r.key)??r.size,a=n-i;a!==0&&(r.start{!r||this._measureElement(r,void 0)},this.getVirtualItems=qy(()=>[this.getIndexes(),this.getMeasurements()],(r,n)=>{let i=[];for(let a=0,o=r.length;athis.options.debug}),this.getVirtualItemForOffset=r=>{let n=this.getMeasurements();return R9(n[$ke(0,n.length-1,i=>R9(n[i]).start,r)])},this.getOffsetForAlignment=(r,n)=>{let i=this.getSize();n==="auto"&&(r<=this.scrollOffset?n="start":r>=this.scrollOffset+i?n="end":n="start"),n==="start"?r=r:n==="end"?r=r-i:n==="center"&&(r=r-i/2);let a=this.options.horizontal?"scrollWidth":"scrollHeight",s=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[a]:this.scrollElement[a]:0)-this.getSize();return Math.max(Math.min(s,r),0)},this.getOffsetForIndex=(r,n="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));let i=R9(this.getMeasurements()[r]);if(n==="auto")if(i.end>=this.scrollOffset+this.getSize()-this.options.scrollPaddingEnd)n="end";else if(i.start<=this.scrollOffset+this.options.scrollPaddingStart)n="start";else return[this.scrollOffset,n];let a=n==="end"?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,n),n]},this.isDynamicMode=()=>this.measureElementCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&(clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(r,{align:n="start",behavior:i}={})=>{this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(r,n),{adjustments:void 0,behavior:i})},this.scrollToIndex=(r,{align:n="auto",behavior:i}={})=>{r=Math.max(0,Math.min(r,this.options.count-1)),this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");let[a,o]=this.getOffsetForIndex(r,n);this._scrollToOffset(a,{adjustments:void 0,behavior:i}),i!=="smooth"&&this.isDynamicMode()&&(this.scrollToIndexTimeoutId=setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.measureElementCache.has(this.options.getItemKey(r))){let[l]=this.getOffsetForIndex(r,o);Pke(l,this.scrollOffset)||this.scrollToIndex(r,{align:o,behavior:i})}else this.scrollToIndex(r,{align:o,behavior:i})}))},this.scrollBy=(r,{behavior:n}={})=>{this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.scrollOffset+r,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var r;let n=this.getMeasurements(),i;return n.length===0?i=this.options.paddingStart:i=this.options.lanes===1?((r=n[n.length-1])==null?void 0:r.end)??0:Math.max(...n.slice(-this.options.lanes).map(a=>a.end)),i-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(r,{adjustments:n,behavior:i})=>{this.options.scrollToFn(r,{behavior:i,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t),this.scrollRect=this.options.initialRect,this.scrollOffset=this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(r=>{this.itemSizeCache.set(r.key,r.size)}),this.maybeNotify()}},$ke=(e,t,r,n)=>{for(;e<=t;){let i=(e+t)/2|0,a=r(i);if(an)t=i-1;else return i}return e>0?e-1:0};function GKe({measurements:e,outerSize:t,scrollOffset:r}){let n=e.length-1,a=$ke(0,n,s=>e[s].start,r),o=a;for(;o({}),{})[1],r={...e,onChange:(i,a)=>{var o;a?(0,qke.flushSync)(t):t(),(o=e.onChange)==null||o.call(e,i,a)}},[n]=HA.useState(()=>new $9(r));return n.setOptions(r),HA.useEffect(()=>n._didMount(),[]),HKe(()=>n._willUpdate()),n}function Lke(e){return QKe({observeElementRect:Ike,observeElementOffset:Bke,scrollToFn:Rke,...e})}var kc=ge(Te());var zke=kc.default.memo(function(t){let{flattenedTree:r,rowHeights:n,projected:i,vRef:a,selectedPaths:o,activePath:s,selectRange:l,handleCollapse:u,superstate:c,overIndex:f,activeIndex:d,indentationWidth:p}=t,h=kc.default.useRef(null),m=Lke({count:r.length,paddingEnd:24,getScrollElement:()=>h.current,estimateSize:kc.default.useCallback(w=>n[w],[n]),overscan:0});a.current=m;let{saveActiveSpace:g}=(0,kc.useContext)(qs),A=w=>f==w&&i&&i.insert,b=w=>!i||!r[w]||!i?.droppable?!1:!i.sortable&&!i.insert&&r[w].parentId&&r[w].parentId.startsWith(i.parentId)||r[w].id==i.parentId,v=(w,S)=>w>S?n.slice(S,w).reduce((k,M)=>k+M,0):-n.slice(w,S).reduce((k,M)=>k+M,0),x=w=>{if(!i)return 0;if(i.insert)return i.copy&&!i.reorder?0:w>d?-n[w]:w==d?v(f,d):0;if(i.sortable){let S=(f=S?n[w]:0:w==d?v(S,d):w>d&&w<=S?-n[w]:w=S?n[w]:0}};return kc.default.createElement("div",{ref:h,style:{width:"100%",height:"100%",overflow:"auto"}},kc.default.createElement("div",{style:{height:`${m.getTotalSize()}px`,width:"100%",position:"relative"}},m.getVirtualItems().map(w=>kc.default.createElement("div",{key:r[w.index].id,"data-index":w.index,className:"mk-tree-node",style:{"--row-height":`${n[w.index]}px`,"--node-offset":`${w.start}px`}},r[w.index].type=="new"?kc.default.createElement("div",{className:"mk-tree-wrapper mk-tree-section",onClick:S=>{xS(t.superstate,2,je(S.view.document),k=>{g(k)})}},kc.default.createElement("div",{className:"mk-tree-item tree-item-self nav-folder-title mk-tree-new"},kc.default.createElement("div",{className:"mk-path-icon mk-path-icon-placeholder",dangerouslySetInnerHTML:{__html:t.superstate.ui.getSticker("ui//plus")}}),kc.default.createElement("div",{className:"mk-tree-text nav-folder-title-content"},z.menu.openSpace))):kc.default.createElement(gY,{key:r[w.index].id,id:r[w.index].id,data:r[w.index],disabled:!1,depth:r[w.index].depth,childCount:r[w.index].childrenCount,indentationWidth:p,dragStarted:t.dragStarted,dragOver:t.dragOver,dragEnded:t.dragEnded,dragActive:d!=-1,indicator:A(w.index),superstate:c,ghost:f!=-1&&d==w.index,style:{opacity:i&&i.insert&&!i.copy&&w.index==d?0:1,transform:pu.Translate.toString({x:i&&i.sortable&&w.index==d&&i?(i.depth-r[w.index].depth)*p:0,y:x(w.index),scaleX:0,scaleY:0})},onSelectRange:l,active:s==r[w.index].item?.path,highlighted:b(w.index),selected:o.some(S=>S.id==r[w.index].id),collapsed:r[w.index].collapsed,onCollapse:u})))))});var Vke=(e,t,r,n,i,a,o,s,l,u,c)=>{let f=[],d=i?i+"/"+t.path:t.path,p=!c.includes(d)||a==d,h=t.metadata?.sort?.field&&!u.recursive?t.metadata?.sort:u??{field:"rank",asc:!0,group:!0,recursive:!1},m=e.getSpaceItems(t.path)??[];return(!p||s)&&m.sort(pG(h)).forEach(g=>{let A=i?i+"/"+t.path:t.path;g.type!="space"?f.push(SB(e,g,t.path,g.path,n+1,0,!0,t.sortable,0,A)):e.spacesIndex.has(g.path)&&f.push(...Vke(e,e.spacesIndex.get(g.path),g,n+1,A,a,t.sortable,!1,t.path,h,c))}),s||f.splice(0,0,Nye(r,p,o,n,i,l,f.length)),f},YKe=(e,t,r,n)=>{let i=[],a=e.pathsIndex.get(t.path);a&&i.push({id:t.path,parentId:null,depth:0,index:0,space:t.path,path:t.path,item:a,rank:null,collapsed:!n.includes(t.path),sortable:t.sortable,childrenCount:[...e.spacesMap.getInverse(t.path)??[]].length,type:"group"});let o=t.metadata?.sort??{field:"rank",asc:!0,group:!0,recursive:!1};return!n.includes(t.path)||r&&!r.parentId||(e.getSpaceItems(t.path)??[]).sort(pG(o)).forEach(l=>{let u=t.path;if(l.type!="space"){let c=u+"/"+l.path,f=!n.includes(c);i.push(SB(e,l,t.path,l.path,1,0,f,t.sortable,0,u))}else e.spacesIndex.has(l.path)&&i.push(...Vke(e,e.spacesIndex.get(l.path),l,1,u,r?.id,t.sortable,!1,t.path,o,n))}),i},Uke=(e,t,r,n)=>{let i=[];return t.filter(a=>a).forEach(a=>{e.spacesIndex.has(a.path)?i.push(...YKe(e,e.spacesIndex.get(a.path),r,n)):i.push({...SB(e,a,null,a.path,0,0,!1,!1,0,null),type:"group"})}),i.push({id:"placeholder",parentId:null,depth:0,index:0,space:null,type:"new",path:null,childrenCount:0,collapsed:!1,rank:0}),i},Gke=e=>{let{superstate:t}=e,r=ar(e.superstate.ui)?20:16,[n,i]=(0,Xr.useState)(t.settings.expandedSpaces),{activePath:a,activeViewSpaces:o,setActivePath:s,selectedPaths:l,setSelectedPaths:u,activeFocus:c,focuses:f,setFocuses:d,dragPaths:p,setDragPaths:h,modifier:m,setModifier:g,editFocus:A,setEditFocus:b}=(0,Xr.useContext)(qs),[v,x]=(0,Xr.useState)(null),[w,S]=(0,Xr.useState)(null),[k,M]=(0,Xr.useState)([]),O=(0,Xr.useRef)(null),[C,T]=(0,Xr.useState)(ar(e.superstate.ui)?e.superstate.settings.mobileSpaceRowHeight:e.superstate.settings.spaceRowHeight),[D,P]=(0,Xr.useState)({x:0,y:0}),R=(0,Xr.useRef)(null),q=(0,Xr.useMemo)(()=>[...o.filter(U=>U).map(U=>U.path),...k.filter(U=>U.type=="space").map(U=>U.path)].filter(U=>U),[o,k]);(0,Xr.useEffect)(()=>(l.length<=1&&((!l[0]||l[0].item.path!=a)&&u([]),t.settings.revealActiveFile&&a&&B(a)),e.superstate.ui.eventsDispatch.addListener("activePathChanged",N),()=>{e.superstate.ui.eventsDispatch.removeListener("activePathChanged",N)}),[a]),(0,Xr.useEffect)(()=>(window.addEventListener("dragend",we),()=>{window.removeEventListener("dragend",we)})),(0,Xr.useEffect)(()=>{let U=()=>{i(t.settings.expandedSpaces),T(ar(e.superstate.ui)?e.superstate.settings.mobileSpaceRowHeight:e.superstate.settings.spaceRowHeight)};return t.eventsDispatcher.addListener("settingsChanged",U),()=>{t.eventsDispatcher.removeListener("settingsChanged",U)}},[]);let B=(0,Xr.useCallback)(U=>{let $=o?.filter(Y=>U?.startsWith(Y?.path)||Y?.path=="/")??[];if(!U||$.length==0)return;let ee=n;$.forEach(Y=>{let te=U.split("/"),ie=Y.path.split("/").filter(ke=>ke.length>0).length,Se=te.reduce((ke,Me,me)=>[...ke,...me!Se.find(Me=>Me==ke))??[],...Se]}),t.settings.expandedSpaces=ee,O.current="/"+U,t.saveSettings()},[n,o]);(0,Xr.useEffect)(()=>{let U=$=>{$.detail.path&&B($.detail.path)};return window.addEventListener(_p.revealPath,U),()=>{window.removeEventListener(_p.revealPath,U)}},[B]),(0,Xr.useEffect)(()=>{let U=()=>{M(Uke(t,o,v,n))},$=ee=>{q.some(Y=>Y==ee.path)&&U()};return e.superstate.eventsDispatcher.addListener("spaceStateUpdated",$),()=>{e.superstate.eventsDispatcher.removeListener("spaceStateUpdated",$)}},[n,o,v,n,q,M]),(0,Xr.useEffect)(()=>{M(Uke(t,o,v,n))},[n,o,v]);let N=U=>{s(U)},W=(0,Xr.useMemo)(()=>k.findIndex(U=>U.id==w),[w,k]),_=(0,Xr.useMemo)(()=>v?.id?k.findIndex(U=>U.id==v.id):-1,[v,k]),X=(0,Xr.useMemo)(()=>k.map(({id:U})=>U),[k]),oe=(0,Xr.useCallback)(U=>{let $=X.findIndex(te=>te==U),ee=X.findIndex(te=>te==l[0]?.id),Y=X.findIndex(te=>te==l[l.length-1]?.id);$te.item)):u(k.slice(ee,$+1).filter(te=>te.item))},[X,l,u,k]),[re,Q]=(0,Xr.useState)(null);(0,Xr.useEffect)(()=>{let U=WEe(D.x,r),$=w?VEe(v,k,p,W,U,D.y,_(0,Wke.isEqual)(ee,$)?ee:$)},[v,k,w,W,p,D,_,m,r,o]);let he=U=>{let $=k.find(({id:ee})=>ee===U);x($),S(U),$&&(l.length>1?h(l.map(ee=>ee.path)):h([$.path])),document.body.style.setProperty("cursor","grabbing")},Ie=(0,Xr.useMemo)(()=>re?k.find(U=>U.id==re.parentId)?.item?.name:null,[k,re]),xe=(0,Xr.useMemo)(()=>re&&k.find(U=>U.id==re.overId)?.item?.name,[k,re]),Oe=(U,$,ee)=>{let Y=XC(U);if(g(Y),U.dataTransfer.dropEffect=Y,re&&t.ui.setDragLabel(`${re.reorder&&!re.insert?z.labels.reorderIn:Y=="move"||!Y?z.labels.moveTo:Y=="link"?z.labels.addTo:z.labels.copyTo} ${re.insert?xe:Ie??"Spaces"}`),p.length>1){$&&$!=w&&S($);return}$&&$!=w&&S($);let te=D.x,ie=D.y,Se=2*Math.round(Math.max(1,ee.x-r-20)),ke=2*Math.round(ee.y/2);(te!=Se||ie!=ke)&&P({x:Se,y:ke})};(0,Xr.useEffect)(()=>{p.length==0&&(S(null),x(null),P({x:0,y:0}),g(null),Q(null),se.current=0,document.body.style.setProperty("cursor",""))},[p]);let Re=(U,$)=>{let ee=XC(U);Xye(t,p,v?.id,$,re,k,o,ee),we()},_e=(0,Xr.useCallback)((U,$)=>{let Y=!n?.includes(U.id)||$?[...n,U.id]:n.filter(te=>U.id!==te);t.settings.expandedSpaces=Y,t.saveSettings()},[t,n]);function we(){h([]),S(null),x(null),P({x:0,y:0}),g(null),Q(null),se.current=0,document.body.style.setProperty("cursor","")}let se=(0,Xr.useRef)(0),L=()=>{se.current++},ue=()=>{se.current--,se.current==0&&(S(null),P({x:0,y:0}),Q(null),se.current=0)},ce=(0,Xr.useMemo)(()=>k.map(U=>d2(t,C,U.type=="group")),[k]);return Xr.default.createElement("div",{className:"mk-path-tree",onDragEnter:()=>L(),onDragLeave:()=>ue(),onDragOver:U=>U.preventDefault(),style:{"--spaceRowHeight":d2(t,C,!1)+"px","--spaceSectionHeight":d2(t,C,!0)+"px"},onDrop:U=>{w?Re(U,w):we()}},k.length==1||A?Xr.default.createElement(JEe,{superstate:t,focus:f[c],saveFocus:U=>{b(!1),d(f.map(($,ee)=>ee==c?U:$))}}):Xr.default.createElement(zke,{vRef:R,rowHeights:ce,flattenedTree:k,projected:re,handleCollapse:_e,activePath:a,superstate:t,selectedPaths:l,selectRange:oe,indentationWidth:r,dragStarted:he,dragOver:Oe,dragEnded:Re,overIndex:W,activeIndex:_}),m&&!ar(e.superstate.ui)&&Xr.default.createElement("div",{className:"mk-hint-dnd",style:{position:"absolute",bottom:"10px",left:"10px",background:"var(--mk-ui-active)",boxShadow:"var(--background-modifier-box-shadow)",padding:"4px 8px",borderRadius:"4px",color:"var(--text-on-accent)",fontSize:"12px"}},Xr.default.createElement("div",null,z.hintText.dragDropModifierKeys.replace("${1}","shift").replace("${2}",GEe()))))};var gl=ge(Te());var dh=ge(Hke(),1);var Na=ge(Te()),Yke=ge(rl());var bY=ge($a());var jd=ge(Te());var L9=({id:e,index:t,...r})=>jd.default.createElement(Qke,{index:t,...r}),Qke=(0,jd.forwardRef)(({pin:e,indicator:t,highlighted:r,superstate:n,style:i,clone:a,ghost:o,dragStart:s,dragOver:l,dragEnded:u,index:c},f)=>{let d=(0,jd.useRef)(null),{activePath:p,focuses:h,setEditFocus:m,setFocuses:g,setModifier:A}=(0,jd.useContext)(qs),b=k=>{s&&e&&s(c)};UC(d,()=>{let k=d.current.getBoundingClientRect();S(k)});let x=k=>{u&&u()},w={draggable:!0,onDragStart:b,onDragEnd:x,onDrop:x},S=k=>{let M=[{name:"Edit Focus",icon:"ui//edit",onClick:O=>{m(!0)}},{name:"Close",icon:"ui//close",value:"close",onClick:()=>{g(h.filter((O,C)=>C!=c)),n.saveSettings()}}];n.ui.openMenu(k,Yt(n.ui,M),je(d.current.ownerDocument))};return e?jd.default.createElement("div",{onContextMenu:k=>{k.preventDefault();let M=k.target.getBoundingClientRect();S(M)},ref:d,className:"mk-waypoint",onClick:k=>{n.settings.currentWaypoint=c,n.saveSettings()},onDragOver:k=>{if(k.preventDefault(),A(XC(k)),!d.current)return;let M=d.current.getBoundingClientRect(),O=k.clientX-M.left;l&&e&&l(c,O)},...w},jd.default.createElement("div",{ref:f,"aria-label":e.name,className:(0,bY.default)("mk-focuses-item","clickable-icon","nav-action-button",(n.settings.currentWaypoint==c||r)&&"mk-active",t&&"mk-indicator",a&&"mk-clone",o&&"mk-ghost"),style:{...i},dangerouslySetInnerHTML:{__html:n.ui.getSticker(e.sticker)}})):jd.default.createElement("div",{ref:d,className:"mk-waypoint"},jd.default.createElement("div",{ref:f,onClick:k=>{g([...h,{sticker:"ui//spaces",name:"Waypoint",paths:[]}]),n.saveSettings()},className:(0,bY.default)("mk-focuses-item","clickable-icon","nav-action-button",r&&"mk-active",t&&"mk-indicator",a&&"mk-clone",o&&"mk-ghost")}))});Qke.displayName="PinnedSpace";var Zke=e=>{let{focuses:t,modifier:r,setModifier:n,setFocuses:i}=(0,Na.useContext)(qs),{superstate:a}=e,{dragPaths:o,setDragPaths:s}=(0,Na.useContext)(qs),[l,u]=(0,Na.useState)(null),[c,f]=(0,Na.useState)(null),d=(0,Na.useRef)(0),[p,h]=(0,Na.useState)(0),[m,g]=(0,Na.useState)(null),[A,b]=(0,Na.useState)(null);(0,Na.useEffect)(()=>{if(c===null||o.length==0){g(null);return}if(!t.find((_,X)=>X==c))return;g({depth:0,overId:c,parentId:null,sortable:!1,insert:!0,droppable:!0,copy:!1,reorder:!1})},[c,o,p,r,t,l]);let v=()=>{n(null),f(null),s([]),u(null),g(null),h(0),d.current=0},x=()=>{v()},w=()=>{d.current++},S=()=>{d.current--,d.current==0&&(f(null),g(null),h(0),d.current=0)},k=({transform:N})=>({...N,x:N.x,y:N.y-10}),M=N=>{u(N)},O=(N,W)=>{if(h(W),l==null)f(N);else{if(N==l)return;i(Cs(t,l,N)),u(N)}},C=()=>{if(m&&m.insert){let N=e.superstate.spacesIndex.get(c);N&&g2(e.superstate,o,N.path,0,"link")}else if(o.length==1){let N=c;i(l!==null?Cs(t,l,N):t.map((W,_)=>_==N?{...W,paths:[...W.paths,o[0]]}:W))}v()};function T(N){let{active:{id:W}}=N;N.active.data.current.type=="path"&&M(W)}function D({delta:N}){}function P({over:N}){let W=N?.id;W!==null&&(l==null?f(W):i(Cs(t,W,parseInt(l))))}function R({active:N,over:W}){C()}(0,Na.useEffect)(()=>(window.addEventListener("dragend",v),()=>{window.removeEventListener("dragend",v)}));let q=ar(e.superstate.ui)?48:32,B=N=>{if(!m||m.insert)return 0;let W=l,_=c;return l===null?N>=_?q:0:N==W?q*(_-W):N>W&&N<=_?-q:N=_?q:0};return Na.default.createElement(Na.default.Fragment,null,Na.default.createElement("div",{className:"mk-focuses nav-header",onDragEnter:()=>w(),onDragLeave:()=>S(),onDragOver:N=>N.preventDefault()},Na.default.createElement("div",{className:"mk-focuses-inner nav-buttons-container"},t.map((N,W)=>Na.default.createElement(L9,{id:W,superstate:e.superstate,highlighted:c==W&&m&&m.insert&&m.droppable,style:{transform:pu.Translate.toString({x:B(W),y:0,scaleX:0,scaleY:0})},index:W,pin:N,key:W,dragStart:M,dragOver:O,dragEnded:C,dragActive:l!==null,ghost:l===W})),Na.default.createElement("div",{className:"mk-waypoint-new",onClick:N=>{let W=[...t,{sticker:"ui//spaces",name:"",paths:[]}];e.superstate.settings.currentWaypoint=W.length-1,i(W)},dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//plus")}}),c!=null&&l===null&&Na.default.createElement(L9,{id:t.length,superstate:e.superstate,highlighted:!1,index:t.length,pin:null})),(0,Yke.createPortal)(Na.default.createElement(a0,{dropAnimation:null,modifiers:[k],zIndex:1600},l!==null?Na.default.createElement(L9,{id:-1,superstate:e.superstate,highlighted:!1,clone:!0,index:l,indicator:!1,pin:t[l]}):null),document.body)))};var Xke=ge($a());var cs=ge(Te());var Kke=e=>{let{superstate:t}=e,{setActivePath:r,setDragPaths:n}=(0,cs.useContext)(qs),i=(0,cs.useRef)(),[a,o]=cs.default.useState([]);(0,cs.useEffect)(()=>{setTimeout(()=>{e.superstate.ui.getWarnings().filter(l=>!e.superstate.settings.suppressedWarnings.some(u=>l.id==u))},1e3)},[]);let s=()=>{o(e.superstate.ui.getWarnings().filter(l=>!e.superstate.settings.suppressedWarnings.some(u=>l.id==u)))};return(0,cs.useEffect)(()=>(e.superstate.eventsDispatcher.addListener("superstateUpdated",s),e.superstate.eventsDispatcher.addListener("settingsChanged",s),e.superstate.eventsDispatcher.addListener("warningsChanged",s),()=>{e.superstate.eventsDispatcher.removeListener("superstateUpdated",s),e.superstate.eventsDispatcher.removeListener("settingsChanged",s),e.superstate.eventsDispatcher.removeListener("warningsChanged",s)}),[]),cs.default.createElement("div",{className:"mk-main-menu-container"},cs.default.createElement("div",{className:"mk-main-menu-inner"},cs.default.createElement("div",{className:(0,Xke.default)("mk-main-menu")},cs.default.createElement("div",{className:"mk-main-menu-button mk-main-menu-button-primary",ref:i,onClick:l=>{e.superstate.ui.mainMenu(i.current,t)}},e.superstate.settings.systemName,a.length>0&&cs.default.createElement("div",{className:"mk-icon-xsmall",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//warning")}}),cs.default.createElement("div",{className:"mk-icon-xsmall",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//chevrons-up-down")}})),cs.default.createElement("div",{className:"mk-main-menu-button",onClick:l=>e.superstate.ui.quickOpen(t)},cs.default.createElement("div",{className:"mk-icon-small",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//search")}}))),cs.default.createElement("button",{"aria-label":z.buttons.newNote,className:"mk-main-menu-button",onClick:l=>w2(t,null,je(l.view.document),l.metaKey?"tab":!1)},cs.default.createElement("div",{className:"mk-icon-small",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//new-note")}}))))};var Jke=e=>{let[t,r]=gl.default.useState(!1);return(0,gl.useEffect)(()=>{let n=async()=>{r(!0)},i=async()=>{r(!1)};return e.superstate.eventsDispatcher.addListener("superstateReindex",n),e.superstate.eventsDispatcher.addListener("superstateUpdated",i),()=>{e.superstate.eventsDispatcher.removeListener("superstateReindex",n),e.superstate.eventsDispatcher.removeListener("superstateUpdated",i)}},[]),gl.default.createElement(gl.default.Fragment,null,gl.default.createElement(dh.ErrorBoundary,{FallbackComponent:xY},gl.default.createElement("div",{className:"mk-progress-bar"},t&&gl.default.createElement("div",{className:"mk-progress-bar-value"})),!ar(e.superstate.ui)&&gl.default.createElement(Kke,{superstate:e.superstate}),gl.default.createElement(Zke,{superstate:e.superstate}),gl.default.createElement(Gke,{superstate:e.superstate})))};function xY({error:e}){let{resetBoundary:t}=(0,dh.useErrorBoundary)(),r=()=>{navigator.clipboard.writeText(e.message)};return gl.default.createElement("div",{role:"alert"},gl.default.createElement("p",null,"Something went wrong:"),gl.default.createElement("p",{style:{color:"red"}},e.message),gl.default.createElement("button",{onClick:r},"Copy Error"),gl.default.createElement("button",{onClick:t},"Reload"))}var wY=e=>z9.default.createElement("div",{className:"mk-sidebar"},z9.default.createElement(_9,{superstate:e.superstate},z9.default.createElement(Jke,{superstate:e.superstate})));var Bp=ge(Te());var KC=e=>Bp.default.createElement(dh.ErrorBoundary,{FallbackComponent:xY},Bp.default.createElement(Ts,{superstate:e.superstate,path:e.path,readMode:!1},Bp.default.createElement($m,{superstate:e.superstate},Bp.default.createElement(eJe,{superstate:e.superstate},Bp.default.createElement(rv,{id:"main",superstate:e.superstate,editMode:e.readOnly?0:1},e.children))))),eJe=e=>{let{pathState:t}=(0,Bp.useContext)(Ir),{spaceInfo:r}=(0,Bp.useContext)(sr),{tableData:n}=(0,Bp.useContext)(aa),i=[...[...e.superstate.spacesMap.get(t.path)??[]].flatMap(a=>e.superstate.contextsIndex.get(a)?.contextTable?.cols.map(o=>({...o,table:a}))),...n?.cols.map(a=>({...a,table:""}))??[]];return Bp.default.createElement(Ry,{uri:e.superstate.spaceManager.uriByString(`${r.path}#*main`),superstate:e.superstate,editMode:r.readOnly?0:1,cols:i},e.children)};var Od=ge(Te()),e6e=ge($a());var U9=ge(Te()),tJe=e=>{let{pathState:t}=(0,U9.useContext)(Ir),r=(0,U9.useRef)(null),n=!0,i=l=>{let u=l.target.innerHTML;u!=e.name&&e.saveName(u)},a=l=>{l.stopPropagation()},o=l=>{l.stopPropagation()},s=l=>{if(l.stopPropagation(),l.key=="a"&&l.metaKey){l.preventDefault();let u=window.getSelection(),c=document.createRange();c.selectNodeContents(l.target),u.removeAllRanges(),u.addRange(c)}l.key=="Enter"&&(l.target.blur(),l.preventDefault()),l.key=="Escape"&&(l.target.blur(),l.preventDefault())};return Od.default.createElement("div",null,Od.default.createElement("div",{className:"mk-header-icon"}),Od.default.createElement("div",{className:"mk-title-container"},t?.subtype=="tag"?Od.default.createElement("div",{className:"mk-title-prefix"},"#"):"",Od.default.createElement("div",{className:"mk-inline-title inline-title",ref:r,contentEditable:n,onBlur:i,onDrop:l=>l.preventDefault(),onKeyDown:s,onKeyPress:a,onKeyUp:o,dangerouslySetInnerHTML:{__html:e.name}})))},SY=e=>{let[t,r]=Od.default.useState(null);(0,Od.useEffect)(()=>{wB(e.superstate,e.path).then(a=>r(a))},[e.path]);let n=a=>{t.type=="context"&&e.superstate.spaceManager.saveTableSchema(t.path,t.id,o=>({...o,name:a})),t.type=="frame"&&e.superstate.spaceManager.saveFrameSchema(t.path,t.id,o=>({...o,name:a})),t.type=="action"&&e.superstate.spaceManager.saveCommand(t.path,t.id,o=>({...o,schema:{...o.schema,name:a}}))},i=a=>{t.type=="frame"&&e.superstate.spaceManager.saveFrameSchema(t.path,t.id,o=>{let s=to(o),l={...s,def:{...s.def,icon:a}};return dA(l)}),t.type=="action"&&e.superstate.spaceManager.saveCommand(t.path,t.id,o=>({...o,schema:{...o.schema,def:{...o.schema?.def??{},icon:a}}}))};return Od.default.createElement("div",{className:(0,e6e.default)("mk-editor-space-fragment markdown-source-view mod-cm6",e.superstate.settings.readableLineWidth?"is-readable-line-width":"")},Od.default.createElement("div",{className:"mk-editor-header"},t&&Od.default.createElement(tJe,{superstate:e.superstate,readOnly:!0,name:t.name,sticker:t.sticker,saveName:n,saveSticker:i})),e.children)};var EY=(e,t)=>{let r=t.map(a=>a.name),n="|",i=n+r.join(n)+`| `;return t.forEach(a=>{i+=n+"----"}),i+=n+` `,e.forEach(a=>{i+=r.map(o=>n+a[o]).join("")+`| -`}),i};var Md=ge(Te());var W9=e=>{let t=e.superstate.spaceManager.resolvePath(e.path,e.source),[r,n]=Md.default.useState();(0,Md.useMemo)(()=>wB(e.superstate,t).then(u=>n(u)),[t]);let i=async()=>{if(r.type=="frame"){let u=await e.superstate.spaceManager.readFrame(r.path,r.id).then(c=>c?.schema);if(u){let c=to(u);e.superstate.spaceManager.readTable(r.path,c.def.db).then(f=>{if(!f)return;let d=EY(f.rows,f.cols);e.view.dispatch({changes:{from:e.pos.from-4,to:e.pos.to+2,insert:d}})})}}else e.superstate.spaceManager.readTable(r.path,r.id).then(u=>{if(!u)return;let c=EY(u.rows,u.cols);e.view.dispatch({changes:{from:e.pos.from-4,to:e.pos.to+2,insert:c}})})},a=()=>{navigator.clipboard.writeText(`![![${e.path}]]`),e.view.dispatch({changes:{from:e.pos.from-4,to:e.pos.to+2}})},o=()=>{e.view.dispatch({changes:{from:e.pos.from-4,to:e.pos.to+2}}),e.superstate.ui.notify(z.notice.tableDeleted)},s=()=>{let u=e.view.posAtDOM(e.dom),f=e.view.state.doc.lineAt(u).from;e.toggleState?e.view.dispatch({changes:{from:f,to:f+1}}):e.view.dispatch({changes:{from:f,to:f,insert:"!"}})},l=u=>{let c=[];c.push({name:z.buttons.convertTable,icon:"ui//sync",onClick:d=>{i()}}),c.push({name:z.buttons.cutTable,icon:"ui//cut",onClick:d=>{a()}}),c.push({name:z.buttons.deleteTable,icon:"ui//close",onClick:d=>{o()}});let f=u.target.getBoundingClientRect();e.superstate.ui.openMenu(f,Yt(e.superstate.ui,c),je(u.view.document))};return Md.default.createElement("div",{className:"mk-flowblock-menu"},r?r.type=="context"||r.frameType=="view"?Md.default.createElement("button",{className:"mk-toolbar-button",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//options")},onClick:u=>{l(u)}}):Md.default.createElement(Md.default.Fragment,null):Md.default.createElement(Md.default.Fragment,null,Md.default.createElement(ns,{superstate:e.superstate,path:t}),e.toggle&&Md.default.createElement("button",{"aria-label":z.buttons.toggleFlow,onClick:s,className:`mk-toolbar-button ${e.toggleState?"mk-toggle-on":""}`,dangerouslySetInnerHTML:{__html:e.toggleState?e.superstate.ui.getSticker("ui//book-open"):e.superstate.ui.getSticker("ui//edit-3")}})))};var Av=require("obsidian");var Nd=ph.Annotation.define(),Rp=ph.Annotation.define(),n6e=ph.EditorState.transactionFilter.of(e=>{let t=[],r=e.state.field(Td,!1);return r&&!e.annotation(Nd)&&t.push(...r.filter(n=>n.expandedState==1).map(n=>e.state.field(Yv,!1)=="doc"?{annotations:Nd.of([n.id,2])}:{annotations:Nd.of([n.id,0])})),[e,...t]}),i6e=Nu.ViewPlugin.fromClass(class{constructor(e){}},{eventHandlers:{mousedown:(e,t)=>{if(!e.shiftKey)return;let r=t.posAtDOM(e.target),{from:n,to:i,text:a}=t.state.doc.lineAt(r);for(let o of a.matchAll(/(?!!)\[\[([^\]]+)\]\]/g)){let l=t.state.field(Td,!1).find(u=>u.to==n+o.index+o[1].length+2&&r>=u.from&&r<=u.to);l&&(e.preventDefault(),t.dispatch({annotations:Nd.of([l.id,2])}))}}}}),a6e=e=>OX((t,r,n)=>{let{from:i,to:a}=t.state.doc.lineAt(r),o=null;return wE({from:i,to:a},t.state,{enter:({name:s,from:l,to:u})=>{if(s.includes("hmd-internal-link")&&r<=u&&r>=l){let f=t.state.field(Td,!1).find(d=>d.to==u);if(f)return o={pos:r,end:u,above:!0,create(d){let p=document.createElement("div");p.classList.add("mk-flow-hover"),p.classList.add("menu");let h=p.createDiv();h.setAttribute("aria-label",f.expandedState==0?z.buttons.openFlow:z.buttons.hideFlow),h.addEventListener("click",()=>{d.dispatch({annotations:Nd.of([f.id,2])})});let m=h.createDiv();return m.innerHTML=e.superstate.ui.getSticker("ui//mk-ui-flow-hover"),h.insertAdjacentText("beforeend",f.expandedState==0?z.buttons.openFlow:z.buttons.hideFlow),{dom:p}}},!1}}}),o}),Td=ph.StateField.define({create(){return[]},update(e,t){let r=[],n=e,i=[],a=t.newDoc.sliceString(0),o=s=>s!=2?2:0;for(let s of a.matchAll(/(?:!\[!\[|!!\[\[)([^\]]+)\]\]/g)){let l=s[1],u=n.filter(h=>h.link==l),c=i.filter(h=>h==l).length,f=u[c],d=f?f.id:U0();i.push(l);let p={id:d,link:s[1],from:s.index+4,to:s.index+4+s[1].length,type:1,height:f?t.annotation(Rp)?.[0]==d&&t.annotation(Rp)?.[1]!=0?t.annotation(Rp)?.[1]:f.height:-1,expandedState:f?t.annotation(Nd)?.[0]==d?o(f.expandedState):f.expandedState:1};r.push(p)}for(let s of a.matchAll(/\[\[([^\]]+)\]\]/g))if(a.charAt(s.index-1)!="!"){let l=s[1],u=n.filter(h=>h.link==l),c=i.filter(h=>h==l).length,f=u[c],d=f?f.id:U0();i.push(l);let p={id:d,link:s[1],from:s.index+2,to:s.index+2+s[1].length,type:0,height:f?t.annotation(Rp)?.[0]==d&&t.annotation(Rp)?.[1]!=0?t.annotation(Rp)?.[1]:f.height:-1,expandedState:f?t.annotation(Nd)?.[0]==d?o(f.expandedState):f.expandedState:0};r.push(p)}else if(a.charAt(s.index-2)!="!"){let l=s[1],u=n.filter(h=>h.link==l),c=i.filter(h=>h==l).length,f=u[c],d=f?f.id:U0();i.push(l);let p={id:d,link:s[1],from:s.index+3,to:s.index+3+s[1].length,type:2,height:f?t.annotation(Rp)?.[0]==d&&t.annotation(Rp)?.[1]!=0?t.annotation(Rp)?.[1]:f.height:-1,expandedState:f?t.annotation(Nd)?.[0]==d?o(f.expandedState):f.expandedState:1};r.push(p)}return r.sort(I6("from",!0)),r}}),t6e=(e,t)=>{let r=new ph.RangeSetBuilder,n=e.field(Td,!1),i=[];for(let o of n){let{from:s,to:l,type:u,expandedState:c}=o,f=s-3==e.doc.lineAt(s).from&&l+2==e.doc.lineAt(s).to;u==0?(t.superstate.settings.internalLinkSticker&&i.push({start:s-2,end:s-2,decoration:Nu.Decoration.widget({widget:new kY(o,t),side:-1})}),t.superstate.settings.internalLinkClickFlow&&i.push({start:l+2,end:l+2,decoration:Nu.Decoration.widget({widget:new CY(o,t),side:-1})}),c==2&&i.push({start:l+2,end:l+2,decoration:r6e(o,t)})):c==2&&u==1&&(e.selection.main.from==s-4&&e.selection.main.to==l+2||e.selection.main.from>=s-3&&e.selection.main.to<=l+1||(i.push({start:s-4,end:s-3,decoration:rJe(o,t)}),f?i.push({start:s-3,end:l+2,decoration:nJe(o,t)}):i.push({start:s-3,end:l+2,decoration:r6e(o,t)})))}i.sort(I6("start",!0));for(let o of i)r.add(o.start,o.end,o.decoration);return r.finish()},o6e=e=>ph.StateField.define({create(t){return t6e(t,e)},update(t,r){return t6e(r.state,e)},provide:t=>Nu.EditorView.decorations.from(t)}),V9=class extends Nu.WidgetType{constructor(r,n){super();this.info=r;this.plugin=n}eq(r){return r.info.id===this.info.id}toDOM(r){let n=document.createElement("div");if(n.classList.add("mk-floweditor-container"),n.setAttribute("id","mk-flow-"+this.info.id),n.style.setProperty("height",this.info.height+"px"),this.info.link&&r.state.field(Av.editorInfoField,!1)){let a=r.state.field(Av.editorInfoField,!1).file;this.plugin.superstate.ui.createRoot(n).render(JC.default.createElement(yd,{load:!0,superstate:this.plugin.superstate,path:this.info.link,source:a.path}))}return n}get estimatedHeight(){return this.info.height}},kY=class extends Nu.WidgetType{constructor(r,n){super();this.info=r;this.flowInfo=r,this.plugin=n}eq(r){return r.info.id===this.info.id}toDOM(r){let n=document.createElement("div");n.classList.add("mk-floweditor-sticker");let i=this.plugin.ui.createRoot(n);if(this.info.link&&r.state.field(Av.editorInfoField,!1)){let o=r.state.field(Av.editorInfoField,!1).file,s=this.plugin.superstate.spaceManager.uriByString(this.info.link,o?.path);i.render(JC.default.createElement(e5,{superstate:this.plugin.superstate,path:s.basePath}))}return n}},CY=class extends Nu.WidgetType{constructor(r,n){super();this.info=r;this.flowInfo=r,this.plugin=n}eq(r){return r.info.id===this.info.id&&r.info.expandedState==this.info.expandedState}toDOM(r){let n=document.createElement("div");n.classList.add("mk-floweditor-toggle");let i=this.plugin.ui.createRoot(n);return this.info.link&&r.state.field(Av.editorInfoField,!1)&&i.render(JC.default.createElement(bc,{superstate:this.plugin.superstate,collapsed:this.info.expandedState==0,onToggle:a=>{r.dispatch({annotations:Nd.of([this.info.id,a?2:0])})}})),n}},DY=class extends Nu.WidgetType{constructor(r,n){super();this.info=r;this.flowInfo=r,this.plugin=n}eq(r){return r.info.id===this.info.id}toDOM(r){let n=document.createElement("div");n.classList.add("mk-floweditor-selector");let i=this.plugin.ui.createRoot(n);if(this.info.link&&r.state.field(Av.editorInfoField,!1)){let o=r.state.field(Av.editorInfoField,!1).file;i.render(JC.default.createElement(W9,{app:this.plugin.app,superstate:this.plugin.superstate,toggle:!0,path:this.info.link,source:o?.path,toggleState:!0,view:r,pos:{from:this.info.from,to:this.info.to},dom:n}))}return n}},rJe=(e,t)=>Nu.Decoration.replace({widget:new DY(e,t),inclusive:!0,block:!1}),r6e=(e,t)=>Nu.Decoration.replace({widget:new V9(e,t),inclusive:!0,block:!1}),nJe=(e,t)=>Nu.Decoration.widget({widget:new V9(e,t),inclusiveStart:!0,block:!0});var s6e=require("@codemirror/view");var l6e=e=>s6e.EditorView.updateListener.of(t=>{if(t.heightChanged&&e.app.workspace.iterateRootLeaves(r=>{let n=r.view.editor?.cm;n&&t.view.dom==n.dom&&n.state.field(Yv,!1)&&r.containerEl.parentElement?.hasClass("workspace-tab-container")&&n.state.field(Yv,!1)!="doc"&&n.dispatch({annotations:Tj.of("doc")})}),t.heightChanged){let r=t.state.field(Fj,!1);r&&e.app.workspace.iterateLeaves(n=>{let i=n.view.editor?.cm;if(i){let a=i.state.field(Td,!1);a&&a.find(o=>o.id==r)&&i.dispatch({annotations:Rp.of([r,t.view.contentHeight])})}},e.app.workspace.rootSplit)}});var Yl=require("@codemirror/state"),eD=require("@codemirror/view");var OY=(e,t)=>{let r=e?.[0]?t?.[0]?Math.max(e?.[0],t?.[0]):e[0]:t[0],n=e?.[1]?t?.[1]?Math.min(e?.[1],t?.[1]):e[1]:t[1];return[isNaN(r)?null:r,isNaN(n)?null:n]},QA=Yl.Annotation.define(),Ly=Yl.Annotation.define(),u6e=eD.Decoration.replace({inclusive:!0,block:!0}),iJe=Yl.StateField.define({create(){return eD.Decoration.none},update(e,t){let r=new Yl.RangeSetBuilder,n=OY(t.state.field(H9,!1),t.state.field(G9,!1));if(n?.[0]!=null){let a=Math.min(t.state.doc.lines,n[0]);r.add(t.state.doc.line(1).from,t.state.doc.line(a).from-1,u6e),t.newDoc.lines!=n[1]&&r.add(t.state.doc.line(Math.min(t.newDoc.lines,n[1])).to,t.state.doc.line(t.newDoc.lines).to,u6e)}return r.finish()},provide:e=>eD.EditorView.decorations.from(e)}),G9=Yl.StateField.define({create:()=>[void 0,void 0],update(e,t){return t.annotation(Ly)?t.annotation(Ly)[0]?[t.annotation(Ly)[0],Math.min(t.state.doc.lines,t.annotation(Ly)[1])]:t.annotation(Ly):e}}),H9=Yl.StateField.define({create:()=>[void 0,void 0],update(e,t){return t.annotation(QA)?t.annotation(QA)[0]?[t.annotation(QA)[0],Math.min(t.state.doc.lines,t.annotation(QA)[1])]:t.annotation(QA):e}}),jY=(e,t)=>({from:e.doc.line(t[0]).from,to:e.doc.line(Math.min(e.doc.lines,t[1])).to}),aJe=Yl.EditorState.transactionFilter.of(e=>{if(e.isUserEvent("delete")&&!e.annotation(Yl.Transaction.userEvent).endsWith(".smart")){let t=e.startState.selection.ranges.map(n=>({from:n.from,to:n.to})),r=OY(e.startState.field(H9,!1),e.startState.field(G9,!1));if(t.length>0&&r?.[0]){let n=jY(e.startState,r);if(e.changes.touchesRange(0,n.from-1)){let i=Math.max(n.from,t[0].from),a=Math.min(n.to,t[0].to);return[{changes:{from:Math.min(i,a),to:Math.max(i,a)},annotations:Yl.Transaction.userEvent.of(`${e.annotation(Yl.Transaction.userEvent)}.smart`)}]}}}return e}),oJe=Yl.EditorState.transactionFilter.of(e=>{let t=[];try{let r=e.startState.field(H9,!1),n=e.startState.field(G9,!1),i=OY(r,n);if((e.isUserEvent("input")||e.isUserEvent("delete")||e.isUserEvent("move"))&&i?.[0]){let a=jY(e.startState,i);if(!e.changes.touchesRange(a.from,a.to))return[]}if(e.state.doc.lines!=e.startState.doc.lines){let a=e.state.doc.lines-e.startState.doc.lines;if(i?.[0]){let o=jY(e.startState,i);if(e.changes.touchesRange(0,o.from-1)){let s=[];r[0]&&s.push(QA.of([r[0]+a,r[1]+a])),n[0]&&s.push(Ly.of([n[0]+a,n[1]+a])),t.push({annotations:s})}else if(e.changes.touchesRange(o.from-1,o.to)){let s=[];r[0]&&s.push(QA.of([r[0],r[1]+a])),n[0]&&s.push(Ly.of([n[0],n[1]+a])),t.push({annotations:s})}}}}catch{return[]}return[e,...t]});var sJe=[aJe,oJe],c6e=()=>[sJe,iJe,H9,G9];var x6e=require("@codemirror/state");var Z9=require("@codemirror/state");var Q9=[{mark:"em",formatting:"formatting-em",altFormatting:"em_formatting_formatting-strong",formatChar:"*"},{mark:"strong",formatting:"formatting-strong",formatChar:"**"},{mark:"strikethrough",formatting:"formatting-strikethrough",formatChar:"~~"},{mark:"inline-code",formatting:"formatting-code",formatChar:"`"}];var zy=Z9.Annotation.define(),f6e=(e,t,r)=>t&&r.sliceDoc(e,e+1)==" "?e+1:!t&&r.sliceDoc(e-1,e)==" "?e-1:e,d6e=(e,t,r)=>{let n=r.doc.lineAt(e),i=t?n.from:e,a=t?e:n.to,o=i,s=i,l=!1;return wE({from:i,to:a},r,{enter:u=>{if(l)return!1;if(u.name.includes("formatting")){if(!t&&u.from>i)return!1;t?(o=u.from,s=u.to):o=u.to}}}),t&&s{let r=f6e(d6e(e.from,!0,t),!0,t),n=f6e(d6e(e.to,!1,t),!1,t);return{from:r,to:n}},gv=(e,t)=>({changes:{from:e,to:e,insert:t.formatChar}}),TY=(e,t,r)=>tD(r.from,e,t.mark)&&tD(r.to,e,t.mark),tD=(e,t,r)=>{let n=!1;return vK(e,t,{enter:({name:i,from:a,to:o})=>{MY(i,r)&&(n=!0)}}),n},MY=(e,t)=>e.includes(t),Y9=(e,t,r)=>tD(e,t,r.mark),ES=(e,t,r)=>tD(e,t,r.formatting)?!0:r.altFormatting?tD(e,t,r.altFormatting):!1,lJe=(e,t,r)=>{let n=[];return TY(r,t,e)?(ES(e.from,r,t)&&!ES(e.to,r,t)&&n.push(gv(e.to,t)),ES(e.to,r,t)&&!ES(e.from,r,t)&&n.push(gv(e.from,t))):Y9(e.from,r,t)?(ES(e.from,r,t)&&!Y9(e.from-1,r,t)&&n.push(gv(e.from,t)),n.push(gv(e.to,t))):Y9(e.to,r,t)?(ES(e.to,r,t)&&!Y9(e.to+1,r,t)&&n.push(gv(e.to,t)),n.push(gv(e.from,t))):(n.push(gv(e.to,t)),n.push(gv(e.from,t))),n},uJe=(e,t,r)=>{let n=[];return wE({from:e.from,to:e.to},t,{enter:({name:i,from:a,to:o})=>{(MY(i,r.formatting)||(r.altFormatting?MY(i,r.altFormatting):!1))&&n.push({from:a,to:a+r.formatChar.length})}}),{changes:n}},p6e=Z9.EditorState.transactionFilter.of(e=>{if(!e.annotation(zy))return e;let t=e.annotation(zy),r=Q9.find(l=>l.mark==t);if(!r)return e;let n=e.startState.selection.main,i=[];if(n.head==n.anchor)return e.startState.sliceDoc(n.head-r.formatChar.length,n.head)==r.formatChar&&e.startState.sliceDoc(n.head,n.head+r.formatChar.length)==r.formatChar?i.push({changes:{from:n.head-r.formatChar.length,to:n.head+r.formatChar.length}}):i.push({changes:{from:n.head,insert:r.formatChar+r.formatChar},selection:{anchor:n.head+r.formatChar.length,head:n.head+r.formatChar.length}}),[e,...i];let a=NY(n,e.startState);i.push(uJe(a,e.startState,r));let o=a.from,s=a.to;return i.push(...lJe(a,r,e.startState)),[e,...i,{selection:{anchor:o,head:s}}]});var v6e=ge($a());var FY=require("obsidian"),Rn=ge(Te());var m6e=ge(Te()),h6e=e=>{let{i:t,style:r,active:n,toggleMarkAction:i}=e;return m6e.default.createElement("div",{key:t,"aria-label":ar(e.plugin.superstate.ui)?void 0:z.styles[r.label],className:`mk-mark ${r.mark&&n?"mk-mark-active":""}`,dangerouslySetInnerHTML:{__html:e.plugin.superstate.ui.getSticker(`ui//${r.icon}`)},onMouseDown:a=>i(a,r)})};var A6e=[{label:"bold",value:"****",insertOffset:2,icon:"mk-mark-strong",mark:"strong"},{label:"italics",value:"**",insertOffset:1,icon:"mk-mark-em",mark:"em"},{label:"strikethrough",value:"~~~~",insertOffset:2,icon:"mk-mark-strikethrough",mark:"strikethrough"},{label:"code",value:"``",insertOffset:1,icon:"mk-mark-code",mark:"inline-code"},{label:"link",value:"[]()",insertOffset:1,cursorOffset:2,icon:"mk-mark-link"}];function g6e(){return A6e}var y6e=(e,t)=>{t.ui.createRoot(e).render(Rn.default.createElement(kS,{mobile:!0,activeMarks:[],plugin:t}))},kS=e=>{let[t,r]=(0,Rn.useState)(e.mobile?0:1),[n,i]=(0,Rn.useState)(null),a=g=>{g.preventDefault();let A=e.cm??qh(e.plugin);if(!A)return;let b=A.state.selection.main.to,v=A.state.sliceDoc(b-1,b)==A.state.lineBreak?e.plugin.superstate.settings.menuTriggerChar:A.state.lineBreak+e.plugin.superstate.settings.menuTriggerChar;A.dispatch({changes:{from:b,to:b,insert:v},selection:{head:b+v.length,anchor:b+v.length}})},o=(g,A)=>{g.preventDefault();let b=e.cm??qh(e.plugin);if(!b)return;if(A.mark){b.dispatch({annotations:zy.of(A.mark)});return}let v=b.state.selection.main,x=b.state.sliceDoc(v.from,v.to);b.dispatch({changes:{from:v.from,to:v.to,insert:A.value.substring(0,A.insertOffset)+x+A.value.substring(A.insertOffset)},selection:A.cursorOffset?{anchor:v.from+A.value.substring(0,A.insertOffset).length+x.length+A.cursorOffset,head:v.from+A.value.substring(0,A.insertOffset).length+x.length+A.cursorOffset}:{anchor:v.from+A.value.substring(0,A.insertOffset).length,head:v.from+A.value.substring(0,A.insertOffset).length+x.length}})},s=()=>Rn.default.createElement(Rn.default.Fragment,null,Rn.default.createElement("div",{"aria-label":ar(e.plugin.superstate.ui)?void 0:z.commands.makeMenu,onMouseDown:g=>{a(g)},className:"mk-mark",dangerouslySetInnerHTML:{__html:e.plugin.superstate.ui.getSticker("ui//mk-make-slash")}}),Rn.default.createElement("div",{"aria-label":ar(e.plugin.superstate.ui)?void 0:z.commands.selectStyle,onMouseDown:()=>{r(1)},className:"mk-mark",dangerouslySetInnerHTML:{__html:e.plugin.superstate.ui.getSticker("ui//mk-make-style")}}),Rn.default.createElement("div",{"aria-label":ar(e.plugin.superstate.ui)?void 0:z.commands.image,onMouseDown:()=>{let g=xE(e.plugin);e.plugin.app.commands.commands["editor:attach-file"].editorCallback(g.editor,g)},className:"mk-mark",dangerouslySetInnerHTML:{__html:e.plugin.superstate.ui.getSticker("ui//mk-make-attach")}}),Rn.default.createElement("div",{"aria-label":ar(e.plugin.superstate.ui)?void 0:z.commands.toggleKeyboard,onMouseDown:()=>{let g=xE(e.plugin);e.plugin.app.commands.commands["editor:indent-list"].editorCallback(g.editor,g)},className:"mk-mark",dangerouslySetInnerHTML:{__html:e.plugin.superstate.ui.getSticker("ui//mk-make-indent")}}),Rn.default.createElement("div",{"aria-label":ar(e.plugin.superstate.ui)?void 0:z.commands.toggleKeyboard,onMouseDown:()=>{let g=xE(e.plugin);e.plugin.app.commands.commands["editor:unindent-list"].editorCallback(g.editor,g)},className:"mk-mark",dangerouslySetInnerHTML:{__html:e.plugin.superstate.ui.getSticker("ui//mk-make-unindent")}}),Rn.default.createElement("div",{"aria-label":ar(e.plugin.superstate.ui)?void 0:z.commands.toggleKeyboard,onMouseDown:()=>{let g=xE(e.plugin);e.plugin.app.commands.commands["editor:toggle-keyboard"].editorCallback(g.editor,g)},className:"mk-mark",dangerouslySetInnerHTML:{__html:e.plugin.superstate.ui.getSticker("ui//mk-make-keyboard")}})),l=()=>Rn.default.createElement(Rn.default.Fragment,null,Rn.default.createElement("div",{className:"mk-mark",onMouseDown:()=>{i(null),r(1)},dangerouslySetInnerHTML:{__html:e.plugin.superstate.ui.getSticker("ui//close")}}),R0.map((g,A)=>Rn.default.createElement("div",{key:A,onMouseDown:()=>{r(1),i(null);let b=e.cm??qh(e.plugin);if(!b)return;let v=b.state.selection.main,x=b.state.sliceDoc(v.from,v.to);b.dispatch({changes:{from:v.from,to:v.to,insert:n.prefix+g[1]+n.suffix+x+n.closeTag}})},className:"mk-color",style:{background:g[1]}})));function u(g){let A=/^(\s*)(-|\d+\.)\s+(\[[ x]\]\s+)?/,b=g.match(A);return b?b[1].length:-1}function c(g,A){let v=(x=>new RegExp(`^([\\t]|[ ]{2,4}){0,${x}}`,"gm"))(A);return g.replace(v,"")}function f(g){let A=/^(\s*)([-*+]|\d+\.)\s+(\[[ x]\]\s+)?/gm;return g.replace(A,"")}let d=async()=>{let g=e.cm.state.doc.lineAt(e.cm.state.selection.main.from),A=u(e.cm.state.sliceDoc(g.from,g.to)),b=e.cm.state.doc.lineAt(e.cm.state.selection.main.from).number,v=e.cm.state.doc.lineAt(e.cm.state.selection.main.to).number,x=[],S=e.cm.state.field(FY.editorInfoField,!1).file;if(S&&e.plugin.superstate.spacesIndex.get(S.parent.path)){for(let M=b;M<=v;M++){let O=e.cm.state.doc.line(M),C=u(O.text),T=f(O.text),D=e.plugin.superstate.spacesIndex.get(S.parent.path),P=await zn(e.plugin.superstate,D,"md",T,!0);x.push({from:O.to-T.length,to:O.to,insert:`[[${P}|${T}]]`})}e.cm.dispatch({changes:x})}},p=g=>{let A=g.currentTarget.getBoundingClientRect();Ns(A,je(g.view.document),e.plugin.superstate,b=>{let v=e.cm.state.selection.main,x=e.cm.state.sliceDoc(v.from,v.to),w=[{from:v.from,to:v.to,insert:`[[${b}|${x}]]`}];e.cm.dispatch({changes:w})})},h=g=>{let A=e.cm.state.doc.lineAt(e.cm.state.selection.main.from),b=[],v=null;if(g>0){let O=e.cm.state.doc.lineAt(e.cm.state.selection.main.from).number,C=u(A.text),T=O+1;for(;T<=e.cm.state.doc.lines;){let D=e.cm.state.doc.line(T);if(u(D.text)>C&&b.push(D),u(D.text)<=C)break;T++}g==1&&(v=b.map(D=>c(D.text,C+1)).join(` +`}),i};var Md=ge(Te());var W9=e=>{let t=e.superstate.spaceManager.resolvePath(e.path,e.source),[r,n]=Md.default.useState();(0,Md.useMemo)(()=>wB(e.superstate,t).then(u=>n(u)),[t]);let i=async()=>{if(r.type=="frame"){let u=await e.superstate.spaceManager.readFrame(r.path,r.id).then(c=>c?.schema);if(u){let c=to(u);e.superstate.spaceManager.readTable(r.path,c.def.db).then(f=>{if(!f)return;let d=EY(f.rows,f.cols);e.view.dispatch({changes:{from:e.pos.from-4,to:e.pos.to+2,insert:d}})})}}else e.superstate.spaceManager.readTable(r.path,r.id).then(u=>{if(!u)return;let c=EY(u.rows,u.cols);e.view.dispatch({changes:{from:e.pos.from-4,to:e.pos.to+2,insert:c}})})},a=()=>{navigator.clipboard.writeText(`![![${e.path}]]`),e.view.dispatch({changes:{from:e.pos.from-4,to:e.pos.to+2}})},o=()=>{e.view.dispatch({changes:{from:e.pos.from-4,to:e.pos.to+2}}),e.superstate.ui.notify(z.notice.tableDeleted)},s=()=>{let u=e.view.posAtDOM(e.dom),f=e.view.state.doc.lineAt(u).from;e.toggleState?e.view.dispatch({changes:{from:f,to:f+1}}):e.view.dispatch({changes:{from:f,to:f,insert:"!"}})},l=u=>{let c=[];c.push({name:z.buttons.convertTable,icon:"ui//sync",onClick:d=>{i()}}),c.push({name:z.buttons.cutTable,icon:"ui//cut",onClick:d=>{a()}}),c.push({name:z.buttons.deleteTable,icon:"ui//close",onClick:d=>{o()}});let f=u.target.getBoundingClientRect();e.superstate.ui.openMenu(f,Yt(e.superstate.ui,c),je(u.view.document))};return Md.default.createElement("div",{className:"mk-flowblock-menu"},r?r.type=="context"||r.frameType=="view"?Md.default.createElement("button",{className:"mk-toolbar-button",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//options")},onClick:u=>{l(u)}}):Md.default.createElement(Md.default.Fragment,null):Md.default.createElement(Md.default.Fragment,null,Md.default.createElement(ns,{superstate:e.superstate,path:t}),e.toggle&&Md.default.createElement("button",{"aria-label":z.buttons.toggleFlow,onClick:s,className:`mk-toolbar-button ${e.toggleState?"mk-toggle-on":""}`,dangerouslySetInnerHTML:{__html:e.toggleState?e.superstate.ui.getSticker("ui//book-open"):e.superstate.ui.getSticker("ui//edit-3")}})))};var Av=require("obsidian");var Nd=ph.Annotation.define(),Rp=ph.Annotation.define(),n6e=ph.EditorState.transactionFilter.of(e=>{let t=[],r=e.state.field(Td,!1);return r&&!e.annotation(Nd)&&t.push(...r.filter(n=>n.expandedState==1).map(n=>e.state.field(Yv,!1)=="doc"?{annotations:Nd.of([n.id,2])}:{annotations:Nd.of([n.id,0])})),[e,...t]}),i6e=Nu.ViewPlugin.fromClass(class{constructor(e){}},{eventHandlers:{mousedown:(e,t)=>{if(!e.shiftKey)return;let r=t.posAtDOM(e.target),{from:n,to:i,text:a}=t.state.doc.lineAt(r);for(let o of a.matchAll(/(?!!)\[\[([^\]]+)\]\]/g)){let l=t.state.field(Td,!1).find(u=>u.to==n+o.index+o[1].length+2&&r>=u.from&&r<=u.to);l&&(e.preventDefault(),t.dispatch({annotations:Nd.of([l.id,2])}))}}}}),a6e=e=>OX((t,r,n)=>{let{from:i,to:a}=t.state.doc.lineAt(r),o=null;return wE({from:i,to:a},t.state,{enter:({name:s,from:l,to:u})=>{if(s.includes("hmd-internal-link")&&r<=u&&r>=l){let f=t.state.field(Td,!1).find(d=>d.to==u);if(f)return o={pos:r,end:u,above:!0,create(d){let p=document.createElement("div");p.classList.add("mk-flow-hover"),p.classList.add("menu");let h=p.createDiv();h.setAttribute("aria-label",f.expandedState==0?z.buttons.openFlow:z.buttons.hideFlow),h.addEventListener("click",()=>{d.dispatch({annotations:Nd.of([f.id,2])})});let m=h.createDiv();return m.innerHTML=e.superstate.ui.getSticker("ui//mk-ui-flow-hover"),h.insertAdjacentText("beforeend",f.expandedState==0?z.buttons.openFlow:z.buttons.hideFlow),{dom:p}}},!1}}}),o}),Td=ph.StateField.define({create(){return[]},update(e,t){let r=[],n=e,i=[],a=t.newDoc.sliceString(0),o=s=>s!=2?2:0;for(let s of a.matchAll(/(?:!\[!\[|!!\[\[)([^\]]+)\]\]/g)){let l=s[1],u=n.filter(h=>h.link==l),c=i.filter(h=>h==l).length,f=u[c],d=f?f.id:U0();i.push(l);let p={id:d,link:s[1],from:s.index+4,to:s.index+4+s[1].length,type:1,height:f?t.annotation(Rp)?.[0]==d&&t.annotation(Rp)?.[1]!=0?t.annotation(Rp)?.[1]:f.height:-1,expandedState:f?t.annotation(Nd)?.[0]==d?o(f.expandedState):f.expandedState:1};r.push(p)}for(let s of a.matchAll(/\[\[([^\]]+)\]\]/g))if(a.charAt(s.index-1)!="!"){let l=s[1],u=n.filter(h=>h.link==l),c=i.filter(h=>h==l).length,f=u[c],d=f?f.id:U0();i.push(l);let p={id:d,link:s[1],from:s.index+2,to:s.index+2+s[1].length,type:0,height:f?t.annotation(Rp)?.[0]==d&&t.annotation(Rp)?.[1]!=0?t.annotation(Rp)?.[1]:f.height:-1,expandedState:f?t.annotation(Nd)?.[0]==d?o(f.expandedState):f.expandedState:0};r.push(p)}else if(a.charAt(s.index-2)!="!"){let l=s[1],u=n.filter(h=>h.link==l),c=i.filter(h=>h==l).length,f=u[c],d=f?f.id:U0();i.push(l);let p={id:d,link:s[1],from:s.index+3,to:s.index+3+s[1].length,type:2,height:f?t.annotation(Rp)?.[0]==d&&t.annotation(Rp)?.[1]!=0?t.annotation(Rp)?.[1]:f.height:-1,expandedState:f?t.annotation(Nd)?.[0]==d?o(f.expandedState):f.expandedState:1};r.push(p)}return r.sort(I6("from",!0)),r}}),t6e=(e,t)=>{let r=new ph.RangeSetBuilder,n=e.field(Td,!1),i=[];for(let o of n){let{from:s,to:l,type:u,expandedState:c}=o,f=s-3==e.doc.lineAt(s).from&&l+2==e.doc.lineAt(s).to;u==0?(t.superstate.settings.internalLinkSticker&&i.push({start:s-2,end:s-2,decoration:Nu.Decoration.widget({widget:new kY(o,t),side:-1})}),t.superstate.settings.internalLinkClickFlow&&i.push({start:l+2,end:l+2,decoration:Nu.Decoration.widget({widget:new CY(o,t),side:-1})}),c==2&&i.push({start:l+2,end:l+2,decoration:r6e(o,t)})):c==2&&u==1&&(e.selection.main.from==s-4&&e.selection.main.to==l+2||e.selection.main.from>=s-3&&e.selection.main.to<=l+1||(i.push({start:s-4,end:s-3,decoration:rJe(o,t)}),f?i.push({start:s-3,end:l+2,decoration:nJe(o,t)}):i.push({start:s-3,end:l+2,decoration:r6e(o,t)})))}i.sort(I6("start",!0));for(let o of i)r.add(o.start,o.end,o.decoration);return r.finish()},o6e=e=>ph.StateField.define({create(t){return t6e(t,e)},update(t,r){return t6e(r.state,e)},provide:t=>Nu.EditorView.decorations.from(t)}),V9=class extends Nu.WidgetType{constructor(r,n){super();this.info=r;this.plugin=n}eq(r){return r.info.id===this.info.id}toDOM(r){let n=document.createElement("div");if(n.classList.add("mk-floweditor-container"),n.setAttribute("id","mk-flow-"+this.info.id),n.style.setProperty("height",this.info.height+"px"),this.info.link&&r.state.field(Av.editorInfoField,!1)){let a=r.state.field(Av.editorInfoField,!1).file;this.root=this.plugin.superstate.ui.createRoot(n),this.root.render(JC.default.createElement(yd,{load:!0,superstate:this.plugin.superstate,path:this.info.link,source:a.path}))}return n}get estimatedHeight(){return this.info.height}destroy(r){this.root&&this.root.unmount()}},kY=class extends Nu.WidgetType{constructor(r,n){super();this.info=r;this.flowInfo=r,this.plugin=n}eq(r){return r.info.id===this.info.id}toDOM(r){let n=document.createElement("div");n.classList.add("mk-floweditor-sticker");let i=this.plugin.ui.createRoot(n);if(this.info.link&&r.state.field(Av.editorInfoField,!1)){let o=r.state.field(Av.editorInfoField,!1).file,s=this.plugin.superstate.spaceManager.uriByString(this.info.link,o?.path);i.render(JC.default.createElement(e5,{superstate:this.plugin.superstate,path:s.basePath}))}return n}},CY=class extends Nu.WidgetType{constructor(r,n){super();this.info=r;this.flowInfo=r,this.plugin=n}eq(r){return r.info.id===this.info.id&&r.info.expandedState==this.info.expandedState}toDOM(r){let n=document.createElement("div");n.classList.add("mk-floweditor-toggle");let i=this.plugin.ui.createRoot(n);return this.info.link&&r.state.field(Av.editorInfoField,!1)&&i.render(JC.default.createElement(bc,{superstate:this.plugin.superstate,collapsed:this.info.expandedState==0,onToggle:a=>{r.dispatch({annotations:Nd.of([this.info.id,a?2:0])})}})),n}},DY=class extends Nu.WidgetType{constructor(r,n){super();this.info=r;this.flowInfo=r,this.plugin=n}eq(r){return r.info.id===this.info.id}toDOM(r){let n=document.createElement("div");n.classList.add("mk-floweditor-selector");let i=this.plugin.ui.createRoot(n);if(this.info.link&&r.state.field(Av.editorInfoField,!1)){let o=r.state.field(Av.editorInfoField,!1).file;i.render(JC.default.createElement(W9,{app:this.plugin.app,superstate:this.plugin.superstate,toggle:!0,path:this.info.link,source:o?.path,toggleState:!0,view:r,pos:{from:this.info.from,to:this.info.to},dom:n}))}return n}},rJe=(e,t)=>Nu.Decoration.replace({widget:new DY(e,t),inclusive:!0,block:!1}),r6e=(e,t)=>Nu.Decoration.replace({widget:new V9(e,t),inclusive:!0,block:!1}),nJe=(e,t)=>Nu.Decoration.widget({widget:new V9(e,t),inclusiveStart:!0,block:!0});var s6e=require("@codemirror/view");var l6e=e=>s6e.EditorView.updateListener.of(t=>{if(t.heightChanged&&e.app.workspace.iterateRootLeaves(r=>{let n=r.view.editor?.cm;n&&t.view.dom==n.dom&&n.state.field(Yv,!1)&&r.containerEl.parentElement?.hasClass("workspace-tab-container")&&n.state.field(Yv,!1)!="doc"&&n.dispatch({annotations:Tj.of("doc")})}),t.heightChanged){let r=t.state.field(Fj,!1);r&&e.app.workspace.iterateLeaves(n=>{let i=n.view.editor?.cm;if(i){let a=i.state.field(Td,!1);a&&a.find(o=>o.id==r)&&i.dispatch({annotations:Rp.of([r,t.view.contentHeight])})}},e.app.workspace.rootSplit)}});var Yl=require("@codemirror/state"),eD=require("@codemirror/view");var OY=(e,t)=>{let r=e?.[0]?t?.[0]?Math.max(e?.[0],t?.[0]):e[0]:t[0],n=e?.[1]?t?.[1]?Math.min(e?.[1],t?.[1]):e[1]:t[1];return[isNaN(r)?null:r,isNaN(n)?null:n]},QA=Yl.Annotation.define(),Ly=Yl.Annotation.define(),u6e=eD.Decoration.replace({inclusive:!0,block:!0}),iJe=Yl.StateField.define({create(){return eD.Decoration.none},update(e,t){let r=new Yl.RangeSetBuilder,n=OY(t.state.field(H9,!1),t.state.field(G9,!1));if(n?.[0]!=null){let a=Math.min(t.state.doc.lines,n[0]);r.add(t.state.doc.line(1).from,t.state.doc.line(a).from-1,u6e),t.newDoc.lines!=n[1]&&r.add(t.state.doc.line(Math.min(t.newDoc.lines,n[1])).to,t.state.doc.line(t.newDoc.lines).to,u6e)}return r.finish()},provide:e=>eD.EditorView.decorations.from(e)}),G9=Yl.StateField.define({create:()=>[void 0,void 0],update(e,t){return t.annotation(Ly)?t.annotation(Ly)[0]?[t.annotation(Ly)[0],Math.min(t.state.doc.lines,t.annotation(Ly)[1])]:t.annotation(Ly):e}}),H9=Yl.StateField.define({create:()=>[void 0,void 0],update(e,t){return t.annotation(QA)?t.annotation(QA)[0]?[t.annotation(QA)[0],Math.min(t.state.doc.lines,t.annotation(QA)[1])]:t.annotation(QA):e}}),jY=(e,t)=>({from:e.doc.line(t[0]).from,to:e.doc.line(Math.min(e.doc.lines,t[1])).to}),aJe=Yl.EditorState.transactionFilter.of(e=>{if(e.isUserEvent("delete")&&!e.annotation(Yl.Transaction.userEvent).endsWith(".smart")){let t=e.startState.selection.ranges.map(n=>({from:n.from,to:n.to})),r=OY(e.startState.field(H9,!1),e.startState.field(G9,!1));if(t.length>0&&r?.[0]){let n=jY(e.startState,r);if(e.changes.touchesRange(0,n.from-1)){let i=Math.max(n.from,t[0].from),a=Math.min(n.to,t[0].to);return[{changes:{from:Math.min(i,a),to:Math.max(i,a)},annotations:Yl.Transaction.userEvent.of(`${e.annotation(Yl.Transaction.userEvent)}.smart`)}]}}}return e}),oJe=Yl.EditorState.transactionFilter.of(e=>{let t=[];try{let r=e.startState.field(H9,!1),n=e.startState.field(G9,!1),i=OY(r,n);if((e.isUserEvent("input")||e.isUserEvent("delete")||e.isUserEvent("move"))&&i?.[0]){let a=jY(e.startState,i);if(!e.changes.touchesRange(a.from,a.to))return[]}if(e.state.doc.lines!=e.startState.doc.lines){let a=e.state.doc.lines-e.startState.doc.lines;if(i?.[0]){let o=jY(e.startState,i);if(e.changes.touchesRange(0,o.from-1)){let s=[];r[0]&&s.push(QA.of([r[0]+a,r[1]+a])),n[0]&&s.push(Ly.of([n[0]+a,n[1]+a])),t.push({annotations:s})}else if(e.changes.touchesRange(o.from-1,o.to)){let s=[];r[0]&&s.push(QA.of([r[0],r[1]+a])),n[0]&&s.push(Ly.of([n[0],n[1]+a])),t.push({annotations:s})}}}}catch{return[]}return[e,...t]});var sJe=[aJe,oJe],c6e=()=>[sJe,iJe,H9,G9];var x6e=require("@codemirror/state");var Z9=require("@codemirror/state");var Q9=[{mark:"em",formatting:"formatting-em",altFormatting:"em_formatting_formatting-strong",formatChar:"*"},{mark:"strong",formatting:"formatting-strong",formatChar:"**"},{mark:"strikethrough",formatting:"formatting-strikethrough",formatChar:"~~"},{mark:"inline-code",formatting:"formatting-code",formatChar:"`"}];var zy=Z9.Annotation.define(),f6e=(e,t,r)=>t&&r.sliceDoc(e,e+1)==" "?e+1:!t&&r.sliceDoc(e-1,e)==" "?e-1:e,d6e=(e,t,r)=>{let n=r.doc.lineAt(e),i=t?n.from:e,a=t?e:n.to,o=i,s=i,l=!1;return wE({from:i,to:a},r,{enter:u=>{if(l)return!1;if(u.name.includes("formatting")){if(!t&&u.from>i)return!1;t?(o=u.from,s=u.to):o=u.to}}}),t&&s{let r=f6e(d6e(e.from,!0,t),!0,t),n=f6e(d6e(e.to,!1,t),!1,t);return{from:r,to:n}},gv=(e,t)=>({changes:{from:e,to:e,insert:t.formatChar}}),TY=(e,t,r)=>tD(r.from,e,t.mark)&&tD(r.to,e,t.mark),tD=(e,t,r)=>{let n=!1;return vK(e,t,{enter:({name:i,from:a,to:o})=>{MY(i,r)&&(n=!0)}}),n},MY=(e,t)=>e.includes(t),Y9=(e,t,r)=>tD(e,t,r.mark),ES=(e,t,r)=>tD(e,t,r.formatting)?!0:r.altFormatting?tD(e,t,r.altFormatting):!1,lJe=(e,t,r)=>{let n=[];return TY(r,t,e)?(ES(e.from,r,t)&&!ES(e.to,r,t)&&n.push(gv(e.to,t)),ES(e.to,r,t)&&!ES(e.from,r,t)&&n.push(gv(e.from,t))):Y9(e.from,r,t)?(ES(e.from,r,t)&&!Y9(e.from-1,r,t)&&n.push(gv(e.from,t)),n.push(gv(e.to,t))):Y9(e.to,r,t)?(ES(e.to,r,t)&&!Y9(e.to+1,r,t)&&n.push(gv(e.to,t)),n.push(gv(e.from,t))):(n.push(gv(e.to,t)),n.push(gv(e.from,t))),n},uJe=(e,t,r)=>{let n=[];return wE({from:e.from,to:e.to},t,{enter:({name:i,from:a,to:o})=>{(MY(i,r.formatting)||(r.altFormatting?MY(i,r.altFormatting):!1))&&n.push({from:a,to:a+r.formatChar.length})}}),{changes:n}},p6e=Z9.EditorState.transactionFilter.of(e=>{if(!e.annotation(zy))return e;let t=e.annotation(zy),r=Q9.find(l=>l.mark==t);if(!r)return e;let n=e.startState.selection.main,i=[];if(n.head==n.anchor)return e.startState.sliceDoc(n.head-r.formatChar.length,n.head)==r.formatChar&&e.startState.sliceDoc(n.head,n.head+r.formatChar.length)==r.formatChar?i.push({changes:{from:n.head-r.formatChar.length,to:n.head+r.formatChar.length}}):i.push({changes:{from:n.head,insert:r.formatChar+r.formatChar},selection:{anchor:n.head+r.formatChar.length,head:n.head+r.formatChar.length}}),[e,...i];let a=NY(n,e.startState);i.push(uJe(a,e.startState,r));let o=a.from,s=a.to;return i.push(...lJe(a,r,e.startState)),[e,...i,{selection:{anchor:o,head:s}}]});var v6e=ge($a());var FY=require("obsidian"),Rn=ge(Te());var m6e=ge(Te()),h6e=e=>{let{i:t,style:r,active:n,toggleMarkAction:i}=e;return m6e.default.createElement("div",{key:t,"aria-label":ar(e.plugin.superstate.ui)?void 0:z.styles[r.label],className:`mk-mark ${r.mark&&n?"mk-mark-active":""}`,dangerouslySetInnerHTML:{__html:e.plugin.superstate.ui.getSticker(`ui//${r.icon}`)},onMouseDown:a=>i(a,r)})};var A6e=[{label:"bold",value:"****",insertOffset:2,icon:"mk-mark-strong",mark:"strong"},{label:"italics",value:"**",insertOffset:1,icon:"mk-mark-em",mark:"em"},{label:"strikethrough",value:"~~~~",insertOffset:2,icon:"mk-mark-strikethrough",mark:"strikethrough"},{label:"code",value:"``",insertOffset:1,icon:"mk-mark-code",mark:"inline-code"},{label:"link",value:"[]()",insertOffset:1,cursorOffset:2,icon:"mk-mark-link"}];function g6e(){return A6e}var y6e=(e,t)=>{t.ui.createRoot(e).render(Rn.default.createElement(kS,{mobile:!0,activeMarks:[],plugin:t}))},kS=e=>{let[t,r]=(0,Rn.useState)(e.mobile?0:1),[n,i]=(0,Rn.useState)(null),a=g=>{g.preventDefault();let A=e.cm??qh(e.plugin);if(!A)return;let b=A.state.selection.main.to,v=A.state.sliceDoc(b-1,b)==A.state.lineBreak?e.plugin.superstate.settings.menuTriggerChar:A.state.lineBreak+e.plugin.superstate.settings.menuTriggerChar;A.dispatch({changes:{from:b,to:b,insert:v},selection:{head:b+v.length,anchor:b+v.length}})},o=(g,A)=>{g.preventDefault();let b=e.cm??qh(e.plugin);if(!b)return;if(A.mark){b.dispatch({annotations:zy.of(A.mark)});return}let v=b.state.selection.main,x=b.state.sliceDoc(v.from,v.to);b.dispatch({changes:{from:v.from,to:v.to,insert:A.value.substring(0,A.insertOffset)+x+A.value.substring(A.insertOffset)},selection:A.cursorOffset?{anchor:v.from+A.value.substring(0,A.insertOffset).length+x.length+A.cursorOffset,head:v.from+A.value.substring(0,A.insertOffset).length+x.length+A.cursorOffset}:{anchor:v.from+A.value.substring(0,A.insertOffset).length,head:v.from+A.value.substring(0,A.insertOffset).length+x.length}})},s=()=>Rn.default.createElement(Rn.default.Fragment,null,Rn.default.createElement("div",{"aria-label":ar(e.plugin.superstate.ui)?void 0:z.commands.makeMenu,onMouseDown:g=>{a(g)},className:"mk-mark",dangerouslySetInnerHTML:{__html:e.plugin.superstate.ui.getSticker("ui//mk-make-slash")}}),Rn.default.createElement("div",{"aria-label":ar(e.plugin.superstate.ui)?void 0:z.commands.selectStyle,onMouseDown:()=>{r(1)},className:"mk-mark",dangerouslySetInnerHTML:{__html:e.plugin.superstate.ui.getSticker("ui//mk-make-style")}}),Rn.default.createElement("div",{"aria-label":ar(e.plugin.superstate.ui)?void 0:z.commands.image,onMouseDown:()=>{let g=xE(e.plugin);e.plugin.app.commands.commands["editor:attach-file"].editorCallback(g.editor,g)},className:"mk-mark",dangerouslySetInnerHTML:{__html:e.plugin.superstate.ui.getSticker("ui//mk-make-attach")}}),Rn.default.createElement("div",{"aria-label":ar(e.plugin.superstate.ui)?void 0:z.commands.toggleKeyboard,onMouseDown:()=>{let g=xE(e.plugin);e.plugin.app.commands.commands["editor:indent-list"].editorCallback(g.editor,g)},className:"mk-mark",dangerouslySetInnerHTML:{__html:e.plugin.superstate.ui.getSticker("ui//mk-make-indent")}}),Rn.default.createElement("div",{"aria-label":ar(e.plugin.superstate.ui)?void 0:z.commands.toggleKeyboard,onMouseDown:()=>{let g=xE(e.plugin);e.plugin.app.commands.commands["editor:unindent-list"].editorCallback(g.editor,g)},className:"mk-mark",dangerouslySetInnerHTML:{__html:e.plugin.superstate.ui.getSticker("ui//mk-make-unindent")}}),Rn.default.createElement("div",{"aria-label":ar(e.plugin.superstate.ui)?void 0:z.commands.toggleKeyboard,onMouseDown:()=>{let g=xE(e.plugin);e.plugin.app.commands.commands["editor:toggle-keyboard"].editorCallback(g.editor,g)},className:"mk-mark",dangerouslySetInnerHTML:{__html:e.plugin.superstate.ui.getSticker("ui//mk-make-keyboard")}})),l=()=>Rn.default.createElement(Rn.default.Fragment,null,Rn.default.createElement("div",{className:"mk-mark",onMouseDown:()=>{i(null),r(1)},dangerouslySetInnerHTML:{__html:e.plugin.superstate.ui.getSticker("ui//close")}}),R0.map((g,A)=>Rn.default.createElement("div",{key:A,onMouseDown:()=>{r(1),i(null);let b=e.cm??qh(e.plugin);if(!b)return;let v=b.state.selection.main,x=b.state.sliceDoc(v.from,v.to);b.dispatch({changes:{from:v.from,to:v.to,insert:n.prefix+g[1]+n.suffix+x+n.closeTag}})},className:"mk-color",style:{background:g[1]}})));function u(g){let A=/^(\s*)(-|\d+\.)\s+(\[[ x]\]\s+)?/,b=g.match(A);return b?b[1].length:-1}function c(g,A){let v=(x=>new RegExp(`^([\\t]|[ ]{2,4}){0,${x}}`,"gm"))(A);return g.replace(v,"")}function f(g){let A=/^(\s*)([-*+]|\d+\.)\s+(\[[ x]\]\s+)?/gm;return g.replace(A,"")}let d=async()=>{let g=e.cm.state.doc.lineAt(e.cm.state.selection.main.from),A=u(e.cm.state.sliceDoc(g.from,g.to)),b=e.cm.state.doc.lineAt(e.cm.state.selection.main.from).number,v=e.cm.state.doc.lineAt(e.cm.state.selection.main.to).number,x=[],S=e.cm.state.field(FY.editorInfoField,!1).file;if(S&&e.plugin.superstate.spacesIndex.get(S.parent.path)){for(let M=b;M<=v;M++){let O=e.cm.state.doc.line(M),C=u(O.text),T=f(O.text),D=e.plugin.superstate.spacesIndex.get(S.parent.path),P=await zn(e.plugin.superstate,D,"md",T,!0);x.push({from:O.to-T.length,to:O.to,insert:`[[${P}|${T}]]`})}e.cm.dispatch({changes:x})}},p=g=>{let A=g.currentTarget.getBoundingClientRect();Ns(A,je(g.view.document),e.plugin.superstate,b=>{let v=e.cm.state.selection.main,x=e.cm.state.sliceDoc(v.from,v.to),w=[{from:v.from,to:v.to,insert:`[[${b}|${x}]]`}];e.cm.dispatch({changes:w})})},h=g=>{let A=e.cm.state.doc.lineAt(e.cm.state.selection.main.from),b=[],v=null;if(g>0){let O=e.cm.state.doc.lineAt(e.cm.state.selection.main.from).number,C=u(A.text),T=O+1;for(;T<=e.cm.state.doc.lines;){let D=e.cm.state.doc.line(T);if(u(D.text)>C&&b.push(D),u(D.text)<=C)break;T++}g==1&&(v=b.map(D=>c(D.text,C+1)).join(` `))}let x=e.cm.state.selection.main.to,w=e.cm.state.selection.main,k=e.cm.state.field(FY.editorInfoField,!1).file,M=e.cm.state.sliceDoc(w.from,w.to);if(k){let O=e.plugin.superstate.spacesIndex.get(k.parent.path);if(O){let C=P0(M).trim();zn(e.plugin.superstate,O,"md",C,!0,v).then(T=>{if(T){let D=[{from:w.from,to:w.to,insert:`[[${T}|${M}]]`}];g==1&&D.push({from:e.cm.state.doc.lineAt(w.from+1).to,to:e.cm.state.doc.line(A.number+b.length).to,insert:""}),e.cm.dispatch({changes:D})}})}}},m=()=>Rn.default.createElement(Rn.default.Fragment,null,e.mobile?Rn.default.createElement("div",{className:"mk-mark",onMouseDown:()=>{r(0)},dangerouslySetInnerHTML:{__html:e.plugin.superstate.ui.getSticker("ui//close")}}):Rn.default.createElement(Rn.default.Fragment,null),g6e().map((g,A)=>Rn.default.createElement(h6e,{plugin:e.plugin,key:A,i:A,style:g,active:!!e.activeMarks.find(b=>b==g.mark),toggleMarkAction:o})),Rn.default.createElement("div",{className:"mk-divider"}),Rn.default.createElement("div",{"aria-label":z.styles.blocklink,onClick:g=>{p(g)},className:"mk-mark",dangerouslySetInnerHTML:{__html:e.plugin.superstate.ui.getSticker("ui//mk-mark-blocklink")}}),Rn.default.createElement("div",{className:"mk-mark-group"},Rn.default.createElement("div",{"aria-label":"New Note",onMouseDown:()=>{h(0)},className:"mk-mark",dangerouslySetInnerHTML:{__html:e.plugin.superstate.ui.getSticker("ui//new-note")}})),e.plugin.superstate.settings.inlineStylerColors?Rn.default.createElement(Rn.default.Fragment,null,Rn.default.createElement("div",{className:"mk-divider"}),Rn.default.createElement("div",{"aria-label":ar(e.plugin.superstate.ui)?void 0:z.styles.textColor,onMouseDown:()=>{r(2),i({prefix:"",closeTag:""})},className:"mk-mark",dangerouslySetInnerHTML:{__html:e.plugin.superstate.ui.getSticker("ui//mk-mark-color")}}),Rn.default.createElement("div",{"aria-label":ar(e.plugin.superstate.ui)?void 0:z.styles.highlight,onMouseDown:()=>{r(2),i({prefix:"",closeTag:""})},className:"mk-mark",dangerouslySetInnerHTML:{__html:e.plugin.superstate.ui.getSticker("ui//mk-mark-highlight")}})):Rn.default.createElement(Rn.default.Fragment,null));return Rn.default.createElement("div",{className:(0,v6e.default)(e.mobile?"mk-style-toolbar":"mk-style-menu"),onMouseDown:g=>g.preventDefault()},t==0&&e.mobile?s():t==2?l():m())};var X9=ge(Te());var cJe=e=>x6e.StateField.define({create:b6e(e),update(t,r){return!r.docChanged&&!r.selection?t:b6e(e)(r.state)},provide:t=>mj.computeN([t],r=>r.field(t))}),b6e=e=>t=>t.selection.ranges.filter(r=>!r.empty).map(r=>{let n=NY(r,t),i=t.doc.lineAt(r.head),a=Q9.map(o=>TY(t,o,n)?o.mark:"").filter(o=>o!="");return{pos:Math.min(r.head,r.anchor),above:!0,strictSide:!0,arrow:!1,create:o=>{let s=document.createElement("div");return s.className="cm-tooltip-cursor",e.ui.createRoot(s).render(X9.default.createElement(X9.default.Fragment,null,X9.default.createElement(kS,{plugin:e,cm:o,activeMarks:a,mobile:!1}))),{dom:s}}}});function w6e(e){return cJe(e)}var K9=require("@codemirror/state"),rD=require("@codemirror/view");var fJe=e=>rD.Decoration.line({attributes:{"data-ph":z.labels.placeholder.replace("${1}",e.superstate.settings.menuTriggerChar)},class:"mk-placeholder"}),S6e=e=>K9.StateField.define({create(){return rD.Decoration.none},update(t,r){let n=new K9.RangeSetBuilder,i=r.state.doc.lineAt(r.state.selection.main.head);return i?.length==0&&n.add(i.from,i.from,fJe(e)),n.finish()},provide:t=>rD.EditorView.decorations.from(t)});var E6e=(e,t)=>{let r=[...c6e()];return e.superstate.settings.makerMode&&(r.push(p6e,jX({parent:document.body})),!t&&e.superstate.settings.inlineStyler&&r.push(w6e(e)),e.superstate.settings.flowMenuEnabled&&e.superstate.settings.makeMenuPlaceholder&&r.push(S6e(e)),e.superstate.settings.editorFlow&&(r.push(Yv,n6e,o6e(e),Td,Fj,l6e(e)),e.superstate.settings.internalLinkClickFlow?r.push(i6e):r.push(a6e(e)))),r};var V6e=ge($a());var Bo=ge(Te());var J9={rows:'',close:` `,"flow-hover":` @@ -926,7 +926,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `;if(r=="ui")return J9[n];if(r=="lucide")return wCe(n);{let i=t.superstate.iconsCache.get(n);if(!i){let a=t.superstate.imagesCache.get(n);a&&(i=t.superstate.iconsCache.get(a))}return i}};var uDe=require("obsidian"),cDe=ge(Te());var sDe=[{label:"todo",value:"- [ ] ",icon:"ui//mk-make-todo"},{label:"list",value:"- ",icon:"ui//mk-make-list"},{label:"ordered-list",value:"1. ",icon:"ui//mk-make-ordered"},{label:"h1",value:"# ",icon:"ui//mk-make-h1"},{label:"h2",value:"## ",icon:"ui//mk-make-h2"},{label:"h3",value:"### ",icon:"ui//mk-make-h3"},{label:"quote",value:"> ",icon:"ui//mk-make-quote"},{label:"divider",value:` --- `,icon:"ui//mk-make-hr",section:"Basic"},{label:"codeblock",value:"\n```\nType/Paste Your Code\n```",offset:[-4,5],icon:"ui//mk-make-codeblock"},{label:"callout",value:`> [!NOTE] -> Content`,offset:[-7,12],icon:"ui//mk-make-callout"},{label:"internal",value:"link",icon:"ui//mk-make-note"},{label:"link",value:"",offset:[-1,1],icon:"ui//mk-make-link"},{label:"image",value:"image",icon:"ui//mk-make-image"},{label:"flow",value:"note",offset:[-2,4],icon:"ui//mk-make-flow"},{label:"context",value:"context",icon:"ui//layout-list"},{label:"table",value:"table",icon:"ui//mk-make-table"},{label:"board",value:"board",icon:"ui//square-kanban"},{label:"tag",value:"#tag",offset:[0,1],icon:"ui//mk-make-tag"}];function lDe(e){return[...sDe].map(t=>({...t,type:1}))}var uD=class extends uDe.EditorSuggest{constructor(r,n){super(r);this.inCmd=!1;this.cmdStartCh=0;this.plugin=n}resetInfos(){this.cmdStartCh=0,this.inCmd=!1}onTrigger(r,n,i){let a=n.getLine(r.line).slice(0,r.ch),o=this.plugin.superstate.settings.menuTriggerChar.length;if(this.file=i,!this.inCmd&&a.slice(0,o)!==this.plugin.superstate.settings.menuTriggerChar&&a.slice(-2-o)!=="- "+this.plugin.superstate.settings.menuTriggerChar)return this.resetInfos(),null;this.inCmd||(this.cmdStartCh=a.length-o,this.inCmd=!0);let s=a.slice(this.cmdStartCh,r.ch);return s.length>1&&s.includes(" ")||!s.includes(this.plugin.superstate.settings.menuTriggerChar)?(this.resetInfos(),null):{start:r,end:r,query:s.slice(o)}}getSuggestions(r){let n=lDe(this.plugin).filter(({label:i})=>i.toLowerCase().includes(r.query.toLowerCase())||z.commands[i]&&z.commands[i].toLowerCase().includes(r.query.toLowerCase()));return n.length>0?n:[{label:z.commandsSuggest.noResult,value:"",icon:"",type:0}]}renderSuggestion(r,n){if(r.value==""){n.setText(z.commandsSuggest.noResult);return}let i=n.createDiv("mk-slash-item"),a=i.createDiv("mk-slash-icon");a.innerHTML=Xy(r.icon,this.plugin),i.createDiv().setText(z.commands[r.label]??r.label)}selectSuggestion(r,n){let i=this.context.start,a=this.context.end,o=this.cmdStartCh,s=this.context.editor;if(r.label!==z.commandsSuggest.noResult)if(r.value=="note"){let l=n.target.getBoundingClientRect();Ns(l,je(n.view.document),this.plugin.superstate,u=>{s.replaceRange(`![![${u}]]`,{...i,ch:o},a),this.resetInfos(),this.close()})}else if(r.value=="context"){let l=n.target.getBoundingClientRect();Wa(l,je(n.view.document),this.plugin.superstate,u=>{s.replaceRange(C5(this.plugin.superstate.spacesIndex.get(u),"files"),{...i,ch:o},a),s.setSelection({line:i.line,ch:0}),this.resetInfos(),this.close()})}else if(r.value=="link"){let l=n.target.getBoundingClientRect();Ns(l,je(n.view.document),this.plugin.superstate,u=>{s.replaceRange(`[[${u}]]`,{...i,ch:o},a),this.resetInfos(),this.close()})}else r.value=="image"?this.plugin.superstate.ui.openPalette(cDe.default.createElement(Eu,{superstate:this.plugin.superstate,selectedPath:l=>{s.replaceRange(`![[${l}]]`,{...i,ch:o},a),this.resetInfos(),this.close()}}),s.cm.dom.win):r.value=="table"||r.value=="board"||r.value=="calendar"?W2(this.plugin.superstate,this.file.parent.path,r.value).then(l=>{s.replaceRange(k5(this.plugin.superstate.spacesIndex.get(this.file.parent.path),l),{...i,ch:o},a),s.setSelection({line:i.line,ch:0})}):(this.context.editor.replaceRange(r.value,{...this.context.start,ch:this.cmdStartCh},this.context.end),r.offset&&this.context.editor.setSelection({...this.context.start,ch:this.cmdStartCh+r.offset[1]},{...this.context.end,ch:this.cmdStartCh+r.value.length+r.offset[0]}),this.resetInfos(),this.close())}};var fDe=require("obsidian"),ZY=ge(Te());var BS={smileys_people:[{n:["grinning","grinning face"],u:"1f600"},{n:["smiley","smiling face with open mouth"],u:"1f603"},{n:["smile","smiling face with open mouth and smiling eyes"],u:"1f604"},{n:["grin","grinning face with smiling eyes"],u:"1f601"},{n:["laughing","satisfied","smiling face with open mouth and tightly-closed eyes"],u:"1f606"},{n:["sweat smile","smiling face with open mouth and cold sweat"],u:"1f605"},{n:["rolling on the floor laughing"],u:"1f923"},{n:["joy","face with tears of joy"],u:"1f602"},{n:["slightly smiling face"],u:"1f642"},{n:["upside-down face","upside down face"],u:"1f643"},{n:["melting face"],u:"1fae0"},{n:["wink","winking face"],u:"1f609"},{n:["blush","smiling face with smiling eyes"],u:"1f60a"},{n:["innocent","smiling face with halo"],u:"1f607"},{n:["smiling face with 3 hearts","smiling face with smiling eyes and three hearts"],u:"1f970"},{n:["heart eyes","smiling face with heart-shaped eyes"],u:"1f60d"},{n:["star-struck","grinning face with star eyes"],u:"1f929"},{n:["kissing heart","face throwing a kiss"],u:"1f618"},{n:["kissing","kissing face"],u:"1f617"},{n:["relaxed","white smiling face"],u:"263a-fe0f"},{n:["kissing closed eyes","kissing face with closed eyes"],u:"1f61a"},{n:["kissing smiling eyes","kissing face with smiling eyes"],u:"1f619"},{n:["smiling face with tear"],u:"1f972"},{n:["yum","face savouring delicious food"],u:"1f60b"},{n:["stuck out tongue","face with stuck-out tongue"],u:"1f61b"},{n:["stuck out tongue winking eye","face with stuck-out tongue and winking eye"],u:"1f61c"},{n:["zany face","grinning face with one large and one small eye"],u:"1f92a"},{n:["stuck out tongue closed eyes","face with stuck-out tongue and tightly-closed eyes"],u:"1f61d"},{n:["money-mouth face","money mouth face"],u:"1f911"},{n:["hugging face"],u:"1f917"},{n:["face with hand over mouth","smiling face with smiling eyes and hand covering mouth"],u:"1f92d"},{n:["face with open eyes and hand over mouth"],u:"1fae2"},{n:["face with peeking eye"],u:"1fae3"},{n:["shushing face","face with finger covering closed lips"],u:"1f92b"},{n:["thinking face"],u:"1f914"},{n:["saluting face"],u:"1fae1"},{n:["zipper-mouth face","zipper mouth face"],u:"1f910"},{n:["face with raised eyebrow","face with one eyebrow raised"],u:"1f928"},{n:["neutral face"],u:"1f610"},{n:["expressionless","expressionless face"],u:"1f611"},{n:["no mouth","face without mouth"],u:"1f636"},{n:["dotted line face"],u:"1fae5"},{n:["face in clouds"],u:"1f636-200d-1f32b-fe0f"},{n:["smirk","smirking face"],u:"1f60f"},{n:["unamused","unamused face"],u:"1f612"},{n:["face with rolling eyes"],u:"1f644"},{n:["grimacing","grimacing face"],u:"1f62c"},{n:["face exhaling"],u:"1f62e-200d-1f4a8"},{n:["lying face"],u:"1f925"},{n:["relieved","relieved face"],u:"1f60c"},{n:["pensive","pensive face"],u:"1f614"},{n:["sleepy","sleepy face"],u:"1f62a"},{n:["drooling face"],u:"1f924"},{n:["sleeping","sleeping face"],u:"1f634"},{n:["mask","face with medical mask"],u:"1f637"},{n:["face with thermometer"],u:"1f912"},{n:["face with head-bandage","face with head bandage"],u:"1f915"},{n:["nauseated face"],u:"1f922"},{n:["face vomiting","face with open mouth vomiting"],u:"1f92e"},{n:["sneezing face"],u:"1f927"},{n:["hot face","overheated face"],u:"1f975"},{n:["cold face","freezing face"],u:"1f976"},{n:["woozy face","face with uneven eyes and wavy mouth"],u:"1f974"},{n:["dizzy face"],u:"1f635"},{n:["face with spiral eyes"],u:"1f635-200d-1f4ab"},{n:["exploding head","shocked face with exploding head"],u:"1f92f"},{n:["face with cowboy hat"],u:"1f920"},{n:["partying face","face with party horn and party hat"],u:"1f973"},{n:["disguised face"],u:"1f978"},{n:["sunglasses","smiling face with sunglasses"],u:"1f60e"},{n:["nerd face"],u:"1f913"},{n:["face with monocle"],u:"1f9d0"},{n:["confused","confused face"],u:"1f615"},{n:["face with diagonal mouth"],u:"1fae4"},{n:["worried","worried face"],u:"1f61f"},{n:["slightly frowning face"],u:"1f641"},{n:["frowning face","white frowning face"],u:"2639-fe0f"},{n:["open mouth","face with open mouth"],u:"1f62e"},{n:["hushed","hushed face"],u:"1f62f"},{n:["astonished","astonished face"],u:"1f632"},{n:["flushed","flushed face"],u:"1f633"},{n:["pleading face","face with pleading eyes"],u:"1f97a"},{n:["face holding back tears"],u:"1f979"},{n:["frowning","frowning face with open mouth"],u:"1f626"},{n:["anguished","anguished face"],u:"1f627"},{n:["fearful","fearful face"],u:"1f628"},{n:["cold sweat","face with open mouth and cold sweat"],u:"1f630"},{n:["disappointed relieved","disappointed but relieved face"],u:"1f625"},{n:["cry","crying face"],u:"1f622"},{n:["sob","loudly crying face"],u:"1f62d"},{n:["scream","face screaming in fear"],u:"1f631"},{n:["confounded","confounded face"],u:"1f616"},{n:["persevere","persevering face"],u:"1f623"},{n:["disappointed","disappointed face"],u:"1f61e"},{n:["sweat","face with cold sweat"],u:"1f613"},{n:["weary","weary face"],u:"1f629"},{n:["tired face"],u:"1f62b"},{n:["yawning face"],u:"1f971"},{n:["triumph","face with look of triumph"],u:"1f624"},{n:["rage","pouting face"],u:"1f621"},{n:["angry","angry face"],u:"1f620"},{n:["face with symbols on mouth","serious face with symbols covering mouth"],u:"1f92c"},{n:["smiling imp","smiling face with horns"],u:"1f608"},{n:["imp"],u:"1f47f"},{n:["skull"],u:"1f480"},{n:["skull and crossbones"],u:"2620-fe0f"},{n:["poop","shit","hankey","pile of poo"],u:"1f4a9"},{n:["clown face"],u:"1f921"},{n:["japanese ogre"],u:"1f479"},{n:["japanese goblin"],u:"1f47a"},{n:["ghost"],u:"1f47b"},{n:["alien","extraterrestrial alien"],u:"1f47d"},{n:["alien monster","space invader"],u:"1f47e"},{n:["robot face"],u:"1f916"},{n:["smiley cat","smiling cat face with open mouth"],u:"1f63a"},{n:["smile cat","grinning cat face with smiling eyes"],u:"1f638"},{n:["joy cat","cat face with tears of joy"],u:"1f639"},{n:["heart eyes cat","smiling cat face with heart-shaped eyes"],u:"1f63b"},{n:["smirk cat","cat face with wry smile"],u:"1f63c"},{n:["kissing cat","kissing cat face with closed eyes"],u:"1f63d"},{n:["scream cat","weary cat face"],u:"1f640"},{n:["crying cat face"],u:"1f63f"},{n:["pouting cat","pouting cat face"],u:"1f63e"},{n:["see no evil","see-no-evil monkey"],u:"1f648"},{n:["hear no evil","hear-no-evil monkey"],u:"1f649"},{n:["speak no evil","speak-no-evil monkey"],u:"1f64a"},{n:["kiss","kiss mark"],u:"1f48b"},{n:["love letter"],u:"1f48c"},{n:["cupid","heart with arrow"],u:"1f498"},{n:["gift heart","heart with ribbon"],u:"1f49d"},{n:["sparkling heart"],u:"1f496"},{n:["heartpulse","growing heart"],u:"1f497"},{n:["heartbeat","beating heart"],u:"1f493"},{n:["revolving hearts"],u:"1f49e"},{n:["two hearts"],u:"1f495"},{n:["heart decoration"],u:"1f49f"},{n:["heart exclamation","heavy heart exclamation mark ornament"],u:"2763-fe0f"},{n:["broken heart"],u:"1f494"},{n:["heart on fire"],u:"2764-fe0f-200d-1f525"},{n:["mending heart"],u:"2764-fe0f-200d-1fa79"},{n:["heart","heavy black heart"],u:"2764-fe0f"},{n:["orange heart"],u:"1f9e1"},{n:["yellow heart"],u:"1f49b"},{n:["green heart"],u:"1f49a"},{n:["blue heart"],u:"1f499"},{n:["purple heart"],u:"1f49c"},{n:["brown heart"],u:"1f90e"},{n:["black heart"],u:"1f5a4"},{n:["white heart"],u:"1f90d"},{n:["100","hundred points symbol"],u:"1f4af"},{n:["anger","anger symbol"],u:"1f4a2"},{n:["boom","collision","collision symbol"],u:"1f4a5"},{n:["dizzy","dizzy symbol"],u:"1f4ab"},{n:["sweat drops","splashing sweat symbol"],u:"1f4a6"},{n:["dash","dash symbol"],u:"1f4a8"},{n:["hole"],u:"1f573-fe0f"},{n:["bomb"],u:"1f4a3"},{n:["speech balloon"],u:"1f4ac"},{n:["eye in speech bubble","eye-in-speech-bubble"],u:"1f441-fe0f-200d-1f5e8-fe0f"},{n:["left speech bubble"],u:"1f5e8-fe0f"},{n:["right anger bubble"],u:"1f5ef-fe0f"},{n:["thought balloon"],u:"1f4ad"},{n:["zzz","sleeping symbol"],u:"1f4a4"},{n:["wave","waving hand sign"],u:"1f44b",v:["1f44b-1f3fb","1f44b-1f3fc","1f44b-1f3fd","1f44b-1f3fe","1f44b-1f3ff"]},{n:["raised back of hand"],u:"1f91a",v:["1f91a-1f3fb","1f91a-1f3fc","1f91a-1f3fd","1f91a-1f3fe","1f91a-1f3ff"]},{n:["hand with fingers splayed","raised hand with fingers splayed"],u:"1f590-fe0f",v:["1f590-1f3fb","1f590-1f3fc","1f590-1f3fd","1f590-1f3fe","1f590-1f3ff"]},{n:["hand","raised hand"],u:"270b",v:["270b-1f3fb","270b-1f3fc","270b-1f3fd","270b-1f3fe","270b-1f3ff"]},{n:["spock-hand","raised hand with part between middle and ring fingers"],u:"1f596",v:["1f596-1f3fb","1f596-1f3fc","1f596-1f3fd","1f596-1f3fe","1f596-1f3ff"]},{n:["rightwards hand"],u:"1faf1",v:["1faf1-1f3fb","1faf1-1f3fc","1faf1-1f3fd","1faf1-1f3fe","1faf1-1f3ff"]},{n:["leftwards hand"],u:"1faf2",v:["1faf2-1f3fb","1faf2-1f3fc","1faf2-1f3fd","1faf2-1f3fe","1faf2-1f3ff"]},{n:["palm down hand"],u:"1faf3",v:["1faf3-1f3fb","1faf3-1f3fc","1faf3-1f3fd","1faf3-1f3fe","1faf3-1f3ff"]},{n:["palm up hand"],u:"1faf4",v:["1faf4-1f3fb","1faf4-1f3fc","1faf4-1f3fd","1faf4-1f3fe","1faf4-1f3ff"]},{n:["ok hand","ok hand sign"],u:"1f44c",v:["1f44c-1f3fb","1f44c-1f3fc","1f44c-1f3fd","1f44c-1f3fe","1f44c-1f3ff"]},{n:["pinched fingers"],u:"1f90c",v:["1f90c-1f3fb","1f90c-1f3fc","1f90c-1f3fd","1f90c-1f3fe","1f90c-1f3ff"]},{n:["pinching hand"],u:"1f90f",v:["1f90f-1f3fb","1f90f-1f3fc","1f90f-1f3fd","1f90f-1f3fe","1f90f-1f3ff"]},{n:["v","victory hand"],u:"270c-fe0f",v:["270c-1f3fb","270c-1f3fc","270c-1f3fd","270c-1f3fe","270c-1f3ff"]},{n:["crossed fingers","hand with index and middle fingers crossed"],u:"1f91e",v:["1f91e-1f3fb","1f91e-1f3fc","1f91e-1f3fd","1f91e-1f3fe","1f91e-1f3ff"]},{n:["hand with index finger and thumb crossed"],u:"1faf0",v:["1faf0-1f3fb","1faf0-1f3fc","1faf0-1f3fd","1faf0-1f3fe","1faf0-1f3ff"]},{n:["i love you hand sign"],u:"1f91f",v:["1f91f-1f3fb","1f91f-1f3fc","1f91f-1f3fd","1f91f-1f3fe","1f91f-1f3ff"]},{n:["the horns","sign of the horns"],u:"1f918",v:["1f918-1f3fb","1f918-1f3fc","1f918-1f3fd","1f918-1f3fe","1f918-1f3ff"]},{n:["call me hand"],u:"1f919",v:["1f919-1f3fb","1f919-1f3fc","1f919-1f3fd","1f919-1f3fe","1f919-1f3ff"]},{n:["point left","white left pointing backhand index"],u:"1f448",v:["1f448-1f3fb","1f448-1f3fc","1f448-1f3fd","1f448-1f3fe","1f448-1f3ff"]},{n:["point right","white right pointing backhand index"],u:"1f449",v:["1f449-1f3fb","1f449-1f3fc","1f449-1f3fd","1f449-1f3fe","1f449-1f3ff"]},{n:["point up 2","white up pointing backhand index"],u:"1f446",v:["1f446-1f3fb","1f446-1f3fc","1f446-1f3fd","1f446-1f3fe","1f446-1f3ff"]},{n:["middle finger","reversed hand with middle finger extended"],u:"1f595",v:["1f595-1f3fb","1f595-1f3fc","1f595-1f3fd","1f595-1f3fe","1f595-1f3ff"]},{n:["point down","white down pointing backhand index"],u:"1f447",v:["1f447-1f3fb","1f447-1f3fc","1f447-1f3fd","1f447-1f3fe","1f447-1f3ff"]},{n:["point up","white up pointing index"],u:"261d-fe0f",v:["261d-1f3fb","261d-1f3fc","261d-1f3fd","261d-1f3fe","261d-1f3ff"]},{n:["index pointing at the viewer"],u:"1faf5",v:["1faf5-1f3fb","1faf5-1f3fc","1faf5-1f3fd","1faf5-1f3fe","1faf5-1f3ff"]},{n:["+1","thumbsup","thumbs up sign"],u:"1f44d",v:["1f44d-1f3fb","1f44d-1f3fc","1f44d-1f3fd","1f44d-1f3fe","1f44d-1f3ff"]},{n:["-1","thumbsdown","thumbs down sign"],u:"1f44e",v:["1f44e-1f3fb","1f44e-1f3fc","1f44e-1f3fd","1f44e-1f3fe","1f44e-1f3ff"]},{n:["fist","raised fist"],u:"270a",v:["270a-1f3fb","270a-1f3fc","270a-1f3fd","270a-1f3fe","270a-1f3ff"]},{n:["punch","facepunch","fisted hand sign"],u:"1f44a",v:["1f44a-1f3fb","1f44a-1f3fc","1f44a-1f3fd","1f44a-1f3fe","1f44a-1f3ff"]},{n:["left-facing fist"],u:"1f91b",v:["1f91b-1f3fb","1f91b-1f3fc","1f91b-1f3fd","1f91b-1f3fe","1f91b-1f3ff"]},{n:["right-facing fist"],u:"1f91c",v:["1f91c-1f3fb","1f91c-1f3fc","1f91c-1f3fd","1f91c-1f3fe","1f91c-1f3ff"]},{n:["clap","clapping hands sign"],u:"1f44f",v:["1f44f-1f3fb","1f44f-1f3fc","1f44f-1f3fd","1f44f-1f3fe","1f44f-1f3ff"]},{n:["raised hands","person raising both hands in celebration"],u:"1f64c",v:["1f64c-1f3fb","1f64c-1f3fc","1f64c-1f3fd","1f64c-1f3fe","1f64c-1f3ff"]},{n:["heart hands"],u:"1faf6",v:["1faf6-1f3fb","1faf6-1f3fc","1faf6-1f3fd","1faf6-1f3fe","1faf6-1f3ff"]},{n:["open hands","open hands sign"],u:"1f450",v:["1f450-1f3fb","1f450-1f3fc","1f450-1f3fd","1f450-1f3fe","1f450-1f3ff"]},{n:["palms up together"],u:"1f932",v:["1f932-1f3fb","1f932-1f3fc","1f932-1f3fd","1f932-1f3fe","1f932-1f3ff"]},{n:["handshake"],u:"1f91d",v:["1f91d-1f3fb","1f91d-1f3fc","1f91d-1f3fd","1f91d-1f3fe","1f91d-1f3ff","1faf1-1f3fb-200d-1faf2-1f3fc","1faf1-1f3fb-200d-1faf2-1f3fd","1faf1-1f3fb-200d-1faf2-1f3fe","1faf1-1f3fb-200d-1faf2-1f3ff","1faf1-1f3fc-200d-1faf2-1f3fb","1faf1-1f3fc-200d-1faf2-1f3fd","1faf1-1f3fc-200d-1faf2-1f3fe","1faf1-1f3fc-200d-1faf2-1f3ff","1faf1-1f3fd-200d-1faf2-1f3fb","1faf1-1f3fd-200d-1faf2-1f3fc","1faf1-1f3fd-200d-1faf2-1f3fe","1faf1-1f3fd-200d-1faf2-1f3ff","1faf1-1f3fe-200d-1faf2-1f3fb","1faf1-1f3fe-200d-1faf2-1f3fc","1faf1-1f3fe-200d-1faf2-1f3fd","1faf1-1f3fe-200d-1faf2-1f3ff","1faf1-1f3ff-200d-1faf2-1f3fb","1faf1-1f3ff-200d-1faf2-1f3fc","1faf1-1f3ff-200d-1faf2-1f3fd","1faf1-1f3ff-200d-1faf2-1f3fe"]},{n:["pray","person with folded hands"],u:"1f64f",v:["1f64f-1f3fb","1f64f-1f3fc","1f64f-1f3fd","1f64f-1f3fe","1f64f-1f3ff"]},{n:["writing hand"],u:"270d-fe0f",v:["270d-1f3fb","270d-1f3fc","270d-1f3fd","270d-1f3fe","270d-1f3ff"]},{n:["nail care","nail polish"],u:"1f485",v:["1f485-1f3fb","1f485-1f3fc","1f485-1f3fd","1f485-1f3fe","1f485-1f3ff"]},{n:["selfie"],u:"1f933",v:["1f933-1f3fb","1f933-1f3fc","1f933-1f3fd","1f933-1f3fe","1f933-1f3ff"]},{n:["muscle","flexed biceps"],u:"1f4aa",v:["1f4aa-1f3fb","1f4aa-1f3fc","1f4aa-1f3fd","1f4aa-1f3fe","1f4aa-1f3ff"]},{n:["mechanical arm"],u:"1f9be"},{n:["mechanical leg"],u:"1f9bf"},{n:["leg"],u:"1f9b5",v:["1f9b5-1f3fb","1f9b5-1f3fc","1f9b5-1f3fd","1f9b5-1f3fe","1f9b5-1f3ff"]},{n:["foot"],u:"1f9b6",v:["1f9b6-1f3fb","1f9b6-1f3fc","1f9b6-1f3fd","1f9b6-1f3fe","1f9b6-1f3ff"]},{n:["ear"],u:"1f442",v:["1f442-1f3fb","1f442-1f3fc","1f442-1f3fd","1f442-1f3fe","1f442-1f3ff"]},{n:["ear with hearing aid"],u:"1f9bb",v:["1f9bb-1f3fb","1f9bb-1f3fc","1f9bb-1f3fd","1f9bb-1f3fe","1f9bb-1f3ff"]},{n:["nose"],u:"1f443",v:["1f443-1f3fb","1f443-1f3fc","1f443-1f3fd","1f443-1f3fe","1f443-1f3ff"]},{n:["brain"],u:"1f9e0"},{n:["anatomical heart"],u:"1fac0"},{n:["lungs"],u:"1fac1"},{n:["tooth"],u:"1f9b7"},{n:["bone"],u:"1f9b4"},{n:["eyes"],u:"1f440"},{n:["eye"],u:"1f441-fe0f"},{n:["tongue"],u:"1f445"},{n:["lips","mouth"],u:"1f444"},{n:["biting lip"],u:"1fae6"},{n:["baby"],u:"1f476",v:["1f476-1f3fb","1f476-1f3fc","1f476-1f3fd","1f476-1f3fe","1f476-1f3ff"]},{n:["child"],u:"1f9d2",v:["1f9d2-1f3fb","1f9d2-1f3fc","1f9d2-1f3fd","1f9d2-1f3fe","1f9d2-1f3ff"]},{n:["boy"],u:"1f466",v:["1f466-1f3fb","1f466-1f3fc","1f466-1f3fd","1f466-1f3fe","1f466-1f3ff"]},{n:["girl"],u:"1f467",v:["1f467-1f3fb","1f467-1f3fc","1f467-1f3fd","1f467-1f3fe","1f467-1f3ff"]},{n:["adult"],u:"1f9d1",v:["1f9d1-1f3fb","1f9d1-1f3fc","1f9d1-1f3fd","1f9d1-1f3fe","1f9d1-1f3ff"]},{n:["person with blond hair"],u:"1f471",v:["1f471-1f3fb","1f471-1f3fc","1f471-1f3fd","1f471-1f3fe","1f471-1f3ff"]},{n:["man"],u:"1f468",v:["1f468-1f3fb","1f468-1f3fc","1f468-1f3fd","1f468-1f3fe","1f468-1f3ff"]},{n:["bearded person"],u:"1f9d4",v:["1f9d4-1f3fb","1f9d4-1f3fc","1f9d4-1f3fd","1f9d4-1f3fe","1f9d4-1f3ff"]},{n:["man: beard","man with beard"],u:"1f9d4-200d-2642-fe0f",v:["1f9d4-1f3fb-200d-2642-fe0f","1f9d4-1f3fc-200d-2642-fe0f","1f9d4-1f3fd-200d-2642-fe0f","1f9d4-1f3fe-200d-2642-fe0f","1f9d4-1f3ff-200d-2642-fe0f"]},{n:["woman: beard","woman with beard"],u:"1f9d4-200d-2640-fe0f",v:["1f9d4-1f3fb-200d-2640-fe0f","1f9d4-1f3fc-200d-2640-fe0f","1f9d4-1f3fd-200d-2640-fe0f","1f9d4-1f3fe-200d-2640-fe0f","1f9d4-1f3ff-200d-2640-fe0f"]},{n:["man: red hair","red haired man"],u:"1f468-200d-1f9b0",v:["1f468-1f3fb-200d-1f9b0","1f468-1f3fc-200d-1f9b0","1f468-1f3fd-200d-1f9b0","1f468-1f3fe-200d-1f9b0","1f468-1f3ff-200d-1f9b0"]},{n:["man: curly hair","curly haired man"],u:"1f468-200d-1f9b1",v:["1f468-1f3fb-200d-1f9b1","1f468-1f3fc-200d-1f9b1","1f468-1f3fd-200d-1f9b1","1f468-1f3fe-200d-1f9b1","1f468-1f3ff-200d-1f9b1"]},{n:["man: white hair","white haired man"],u:"1f468-200d-1f9b3",v:["1f468-1f3fb-200d-1f9b3","1f468-1f3fc-200d-1f9b3","1f468-1f3fd-200d-1f9b3","1f468-1f3fe-200d-1f9b3","1f468-1f3ff-200d-1f9b3"]},{n:["bald man","man: bald"],u:"1f468-200d-1f9b2",v:["1f468-1f3fb-200d-1f9b2","1f468-1f3fc-200d-1f9b2","1f468-1f3fd-200d-1f9b2","1f468-1f3fe-200d-1f9b2","1f468-1f3ff-200d-1f9b2"]},{n:["woman"],u:"1f469",v:["1f469-1f3fb","1f469-1f3fc","1f469-1f3fd","1f469-1f3fe","1f469-1f3ff"]},{n:["woman: red hair","red haired woman"],u:"1f469-200d-1f9b0",v:["1f469-1f3fb-200d-1f9b0","1f469-1f3fc-200d-1f9b0","1f469-1f3fd-200d-1f9b0","1f469-1f3fe-200d-1f9b0","1f469-1f3ff-200d-1f9b0"]},{n:["person: red hair","red haired person"],u:"1f9d1-200d-1f9b0",v:["1f9d1-1f3fb-200d-1f9b0","1f9d1-1f3fc-200d-1f9b0","1f9d1-1f3fd-200d-1f9b0","1f9d1-1f3fe-200d-1f9b0","1f9d1-1f3ff-200d-1f9b0"]},{n:["woman: curly hair","curly haired woman"],u:"1f469-200d-1f9b1",v:["1f469-1f3fb-200d-1f9b1","1f469-1f3fc-200d-1f9b1","1f469-1f3fd-200d-1f9b1","1f469-1f3fe-200d-1f9b1","1f469-1f3ff-200d-1f9b1"]},{n:["person: curly hair","curly haired person"],u:"1f9d1-200d-1f9b1",v:["1f9d1-1f3fb-200d-1f9b1","1f9d1-1f3fc-200d-1f9b1","1f9d1-1f3fd-200d-1f9b1","1f9d1-1f3fe-200d-1f9b1","1f9d1-1f3ff-200d-1f9b1"]},{n:["woman: white hair","white haired woman"],u:"1f469-200d-1f9b3",v:["1f469-1f3fb-200d-1f9b3","1f469-1f3fc-200d-1f9b3","1f469-1f3fd-200d-1f9b3","1f469-1f3fe-200d-1f9b3","1f469-1f3ff-200d-1f9b3"]},{n:["person: white hair","white haired person"],u:"1f9d1-200d-1f9b3",v:["1f9d1-1f3fb-200d-1f9b3","1f9d1-1f3fc-200d-1f9b3","1f9d1-1f3fd-200d-1f9b3","1f9d1-1f3fe-200d-1f9b3","1f9d1-1f3ff-200d-1f9b3"]},{n:["bald woman","woman: bald"],u:"1f469-200d-1f9b2",v:["1f469-1f3fb-200d-1f9b2","1f469-1f3fc-200d-1f9b2","1f469-1f3fd-200d-1f9b2","1f469-1f3fe-200d-1f9b2","1f469-1f3ff-200d-1f9b2"]},{n:["bald person","person: bald"],u:"1f9d1-200d-1f9b2",v:["1f9d1-1f3fb-200d-1f9b2","1f9d1-1f3fc-200d-1f9b2","1f9d1-1f3fd-200d-1f9b2","1f9d1-1f3fe-200d-1f9b2","1f9d1-1f3ff-200d-1f9b2"]},{n:["woman: blond hair","blond-haired-woman"],u:"1f471-200d-2640-fe0f",v:["1f471-1f3fb-200d-2640-fe0f","1f471-1f3fc-200d-2640-fe0f","1f471-1f3fd-200d-2640-fe0f","1f471-1f3fe-200d-2640-fe0f","1f471-1f3ff-200d-2640-fe0f"]},{n:["man: blond hair","blond-haired-man"],u:"1f471-200d-2642-fe0f",v:["1f471-1f3fb-200d-2642-fe0f","1f471-1f3fc-200d-2642-fe0f","1f471-1f3fd-200d-2642-fe0f","1f471-1f3fe-200d-2642-fe0f","1f471-1f3ff-200d-2642-fe0f"]},{n:["older adult"],u:"1f9d3",v:["1f9d3-1f3fb","1f9d3-1f3fc","1f9d3-1f3fd","1f9d3-1f3fe","1f9d3-1f3ff"]},{n:["older man"],u:"1f474",v:["1f474-1f3fb","1f474-1f3fc","1f474-1f3fd","1f474-1f3fe","1f474-1f3ff"]},{n:["older woman"],u:"1f475",v:["1f475-1f3fb","1f475-1f3fc","1f475-1f3fd","1f475-1f3fe","1f475-1f3ff"]},{n:["person frowning"],u:"1f64d",v:["1f64d-1f3fb","1f64d-1f3fc","1f64d-1f3fd","1f64d-1f3fe","1f64d-1f3ff"]},{n:["man frowning","man-frowning"],u:"1f64d-200d-2642-fe0f",v:["1f64d-1f3fb-200d-2642-fe0f","1f64d-1f3fc-200d-2642-fe0f","1f64d-1f3fd-200d-2642-fe0f","1f64d-1f3fe-200d-2642-fe0f","1f64d-1f3ff-200d-2642-fe0f"]},{n:["woman frowning","woman-frowning"],u:"1f64d-200d-2640-fe0f",v:["1f64d-1f3fb-200d-2640-fe0f","1f64d-1f3fc-200d-2640-fe0f","1f64d-1f3fd-200d-2640-fe0f","1f64d-1f3fe-200d-2640-fe0f","1f64d-1f3ff-200d-2640-fe0f"]},{n:["person with pouting face"],u:"1f64e",v:["1f64e-1f3fb","1f64e-1f3fc","1f64e-1f3fd","1f64e-1f3fe","1f64e-1f3ff"]},{n:["man pouting","man-pouting"],u:"1f64e-200d-2642-fe0f",v:["1f64e-1f3fb-200d-2642-fe0f","1f64e-1f3fc-200d-2642-fe0f","1f64e-1f3fd-200d-2642-fe0f","1f64e-1f3fe-200d-2642-fe0f","1f64e-1f3ff-200d-2642-fe0f"]},{n:["woman pouting","woman-pouting"],u:"1f64e-200d-2640-fe0f",v:["1f64e-1f3fb-200d-2640-fe0f","1f64e-1f3fc-200d-2640-fe0f","1f64e-1f3fd-200d-2640-fe0f","1f64e-1f3fe-200d-2640-fe0f","1f64e-1f3ff-200d-2640-fe0f"]},{n:["no good","face with no good gesture"],u:"1f645",v:["1f645-1f3fb","1f645-1f3fc","1f645-1f3fd","1f645-1f3fe","1f645-1f3ff"]},{n:["man gesturing no","man-gesturing-no"],u:"1f645-200d-2642-fe0f",v:["1f645-1f3fb-200d-2642-fe0f","1f645-1f3fc-200d-2642-fe0f","1f645-1f3fd-200d-2642-fe0f","1f645-1f3fe-200d-2642-fe0f","1f645-1f3ff-200d-2642-fe0f"]},{n:["woman gesturing no","woman-gesturing-no"],u:"1f645-200d-2640-fe0f",v:["1f645-1f3fb-200d-2640-fe0f","1f645-1f3fc-200d-2640-fe0f","1f645-1f3fd-200d-2640-fe0f","1f645-1f3fe-200d-2640-fe0f","1f645-1f3ff-200d-2640-fe0f"]},{n:["ok woman","face with ok gesture"],u:"1f646",v:["1f646-1f3fb","1f646-1f3fc","1f646-1f3fd","1f646-1f3fe","1f646-1f3ff"]},{n:["man gesturing ok","man-gesturing-ok"],u:"1f646-200d-2642-fe0f",v:["1f646-1f3fb-200d-2642-fe0f","1f646-1f3fc-200d-2642-fe0f","1f646-1f3fd-200d-2642-fe0f","1f646-1f3fe-200d-2642-fe0f","1f646-1f3ff-200d-2642-fe0f"]},{n:["woman gesturing ok","woman-gesturing-ok"],u:"1f646-200d-2640-fe0f",v:["1f646-1f3fb-200d-2640-fe0f","1f646-1f3fc-200d-2640-fe0f","1f646-1f3fd-200d-2640-fe0f","1f646-1f3fe-200d-2640-fe0f","1f646-1f3ff-200d-2640-fe0f"]},{n:["information desk person"],u:"1f481",v:["1f481-1f3fb","1f481-1f3fc","1f481-1f3fd","1f481-1f3fe","1f481-1f3ff"]},{n:["man tipping hand","man-tipping-hand"],u:"1f481-200d-2642-fe0f",v:["1f481-1f3fb-200d-2642-fe0f","1f481-1f3fc-200d-2642-fe0f","1f481-1f3fd-200d-2642-fe0f","1f481-1f3fe-200d-2642-fe0f","1f481-1f3ff-200d-2642-fe0f"]},{n:["woman tipping hand","woman-tipping-hand"],u:"1f481-200d-2640-fe0f",v:["1f481-1f3fb-200d-2640-fe0f","1f481-1f3fc-200d-2640-fe0f","1f481-1f3fd-200d-2640-fe0f","1f481-1f3fe-200d-2640-fe0f","1f481-1f3ff-200d-2640-fe0f"]},{n:["raising hand","happy person raising one hand"],u:"1f64b",v:["1f64b-1f3fb","1f64b-1f3fc","1f64b-1f3fd","1f64b-1f3fe","1f64b-1f3ff"]},{n:["man raising hand","man-raising-hand"],u:"1f64b-200d-2642-fe0f",v:["1f64b-1f3fb-200d-2642-fe0f","1f64b-1f3fc-200d-2642-fe0f","1f64b-1f3fd-200d-2642-fe0f","1f64b-1f3fe-200d-2642-fe0f","1f64b-1f3ff-200d-2642-fe0f"]},{n:["woman raising hand","woman-raising-hand"],u:"1f64b-200d-2640-fe0f",v:["1f64b-1f3fb-200d-2640-fe0f","1f64b-1f3fc-200d-2640-fe0f","1f64b-1f3fd-200d-2640-fe0f","1f64b-1f3fe-200d-2640-fe0f","1f64b-1f3ff-200d-2640-fe0f"]},{n:["deaf person"],u:"1f9cf",v:["1f9cf-1f3fb","1f9cf-1f3fc","1f9cf-1f3fd","1f9cf-1f3fe","1f9cf-1f3ff"]},{n:["deaf man"],u:"1f9cf-200d-2642-fe0f",v:["1f9cf-1f3fb-200d-2642-fe0f","1f9cf-1f3fc-200d-2642-fe0f","1f9cf-1f3fd-200d-2642-fe0f","1f9cf-1f3fe-200d-2642-fe0f","1f9cf-1f3ff-200d-2642-fe0f"]},{n:["deaf woman"],u:"1f9cf-200d-2640-fe0f",v:["1f9cf-1f3fb-200d-2640-fe0f","1f9cf-1f3fc-200d-2640-fe0f","1f9cf-1f3fd-200d-2640-fe0f","1f9cf-1f3fe-200d-2640-fe0f","1f9cf-1f3ff-200d-2640-fe0f"]},{n:["bow","person bowing deeply"],u:"1f647",v:["1f647-1f3fb","1f647-1f3fc","1f647-1f3fd","1f647-1f3fe","1f647-1f3ff"]},{n:["man bowing","man-bowing"],u:"1f647-200d-2642-fe0f",v:["1f647-1f3fb-200d-2642-fe0f","1f647-1f3fc-200d-2642-fe0f","1f647-1f3fd-200d-2642-fe0f","1f647-1f3fe-200d-2642-fe0f","1f647-1f3ff-200d-2642-fe0f"]},{n:["woman bowing","woman-bowing"],u:"1f647-200d-2640-fe0f",v:["1f647-1f3fb-200d-2640-fe0f","1f647-1f3fc-200d-2640-fe0f","1f647-1f3fd-200d-2640-fe0f","1f647-1f3fe-200d-2640-fe0f","1f647-1f3ff-200d-2640-fe0f"]},{n:["face palm"],u:"1f926",v:["1f926-1f3fb","1f926-1f3fc","1f926-1f3fd","1f926-1f3fe","1f926-1f3ff"]},{n:["man facepalming","man-facepalming"],u:"1f926-200d-2642-fe0f",v:["1f926-1f3fb-200d-2642-fe0f","1f926-1f3fc-200d-2642-fe0f","1f926-1f3fd-200d-2642-fe0f","1f926-1f3fe-200d-2642-fe0f","1f926-1f3ff-200d-2642-fe0f"]},{n:["woman facepalming","woman-facepalming"],u:"1f926-200d-2640-fe0f",v:["1f926-1f3fb-200d-2640-fe0f","1f926-1f3fc-200d-2640-fe0f","1f926-1f3fd-200d-2640-fe0f","1f926-1f3fe-200d-2640-fe0f","1f926-1f3ff-200d-2640-fe0f"]},{n:["shrug"],u:"1f937",v:["1f937-1f3fb","1f937-1f3fc","1f937-1f3fd","1f937-1f3fe","1f937-1f3ff"]},{n:["man shrugging","man-shrugging"],u:"1f937-200d-2642-fe0f",v:["1f937-1f3fb-200d-2642-fe0f","1f937-1f3fc-200d-2642-fe0f","1f937-1f3fd-200d-2642-fe0f","1f937-1f3fe-200d-2642-fe0f","1f937-1f3ff-200d-2642-fe0f"]},{n:["woman shrugging","woman-shrugging"],u:"1f937-200d-2640-fe0f",v:["1f937-1f3fb-200d-2640-fe0f","1f937-1f3fc-200d-2640-fe0f","1f937-1f3fd-200d-2640-fe0f","1f937-1f3fe-200d-2640-fe0f","1f937-1f3ff-200d-2640-fe0f"]},{n:["health worker"],u:"1f9d1-200d-2695-fe0f",v:["1f9d1-1f3fb-200d-2695-fe0f","1f9d1-1f3fc-200d-2695-fe0f","1f9d1-1f3fd-200d-2695-fe0f","1f9d1-1f3fe-200d-2695-fe0f","1f9d1-1f3ff-200d-2695-fe0f"]},{n:["male-doctor","man health worker"],u:"1f468-200d-2695-fe0f",v:["1f468-1f3fb-200d-2695-fe0f","1f468-1f3fc-200d-2695-fe0f","1f468-1f3fd-200d-2695-fe0f","1f468-1f3fe-200d-2695-fe0f","1f468-1f3ff-200d-2695-fe0f"]},{n:["female-doctor","woman health worker"],u:"1f469-200d-2695-fe0f",v:["1f469-1f3fb-200d-2695-fe0f","1f469-1f3fc-200d-2695-fe0f","1f469-1f3fd-200d-2695-fe0f","1f469-1f3fe-200d-2695-fe0f","1f469-1f3ff-200d-2695-fe0f"]},{n:["student"],u:"1f9d1-200d-1f393",v:["1f9d1-1f3fb-200d-1f393","1f9d1-1f3fc-200d-1f393","1f9d1-1f3fd-200d-1f393","1f9d1-1f3fe-200d-1f393","1f9d1-1f3ff-200d-1f393"]},{n:["man student","male-student"],u:"1f468-200d-1f393",v:["1f468-1f3fb-200d-1f393","1f468-1f3fc-200d-1f393","1f468-1f3fd-200d-1f393","1f468-1f3fe-200d-1f393","1f468-1f3ff-200d-1f393"]},{n:["woman student","female-student"],u:"1f469-200d-1f393",v:["1f469-1f3fb-200d-1f393","1f469-1f3fc-200d-1f393","1f469-1f3fd-200d-1f393","1f469-1f3fe-200d-1f393","1f469-1f3ff-200d-1f393"]},{n:["teacher"],u:"1f9d1-200d-1f3eb",v:["1f9d1-1f3fb-200d-1f3eb","1f9d1-1f3fc-200d-1f3eb","1f9d1-1f3fd-200d-1f3eb","1f9d1-1f3fe-200d-1f3eb","1f9d1-1f3ff-200d-1f3eb"]},{n:["man teacher","male-teacher"],u:"1f468-200d-1f3eb",v:["1f468-1f3fb-200d-1f3eb","1f468-1f3fc-200d-1f3eb","1f468-1f3fd-200d-1f3eb","1f468-1f3fe-200d-1f3eb","1f468-1f3ff-200d-1f3eb"]},{n:["woman teacher","female-teacher"],u:"1f469-200d-1f3eb",v:["1f469-1f3fb-200d-1f3eb","1f469-1f3fc-200d-1f3eb","1f469-1f3fd-200d-1f3eb","1f469-1f3fe-200d-1f3eb","1f469-1f3ff-200d-1f3eb"]},{n:["judge"],u:"1f9d1-200d-2696-fe0f",v:["1f9d1-1f3fb-200d-2696-fe0f","1f9d1-1f3fc-200d-2696-fe0f","1f9d1-1f3fd-200d-2696-fe0f","1f9d1-1f3fe-200d-2696-fe0f","1f9d1-1f3ff-200d-2696-fe0f"]},{n:["man judge","male-judge"],u:"1f468-200d-2696-fe0f",v:["1f468-1f3fb-200d-2696-fe0f","1f468-1f3fc-200d-2696-fe0f","1f468-1f3fd-200d-2696-fe0f","1f468-1f3fe-200d-2696-fe0f","1f468-1f3ff-200d-2696-fe0f"]},{n:["woman judge","female-judge"],u:"1f469-200d-2696-fe0f",v:["1f469-1f3fb-200d-2696-fe0f","1f469-1f3fc-200d-2696-fe0f","1f469-1f3fd-200d-2696-fe0f","1f469-1f3fe-200d-2696-fe0f","1f469-1f3ff-200d-2696-fe0f"]},{n:["farmer"],u:"1f9d1-200d-1f33e",v:["1f9d1-1f3fb-200d-1f33e","1f9d1-1f3fc-200d-1f33e","1f9d1-1f3fd-200d-1f33e","1f9d1-1f3fe-200d-1f33e","1f9d1-1f3ff-200d-1f33e"]},{n:["man farmer","male-farmer"],u:"1f468-200d-1f33e",v:["1f468-1f3fb-200d-1f33e","1f468-1f3fc-200d-1f33e","1f468-1f3fd-200d-1f33e","1f468-1f3fe-200d-1f33e","1f468-1f3ff-200d-1f33e"]},{n:["woman farmer","female-farmer"],u:"1f469-200d-1f33e",v:["1f469-1f3fb-200d-1f33e","1f469-1f3fc-200d-1f33e","1f469-1f3fd-200d-1f33e","1f469-1f3fe-200d-1f33e","1f469-1f3ff-200d-1f33e"]},{n:["cook"],u:"1f9d1-200d-1f373",v:["1f9d1-1f3fb-200d-1f373","1f9d1-1f3fc-200d-1f373","1f9d1-1f3fd-200d-1f373","1f9d1-1f3fe-200d-1f373","1f9d1-1f3ff-200d-1f373"]},{n:["man cook","male-cook"],u:"1f468-200d-1f373",v:["1f468-1f3fb-200d-1f373","1f468-1f3fc-200d-1f373","1f468-1f3fd-200d-1f373","1f468-1f3fe-200d-1f373","1f468-1f3ff-200d-1f373"]},{n:["woman cook","female-cook"],u:"1f469-200d-1f373",v:["1f469-1f3fb-200d-1f373","1f469-1f3fc-200d-1f373","1f469-1f3fd-200d-1f373","1f469-1f3fe-200d-1f373","1f469-1f3ff-200d-1f373"]},{n:["mechanic"],u:"1f9d1-200d-1f527",v:["1f9d1-1f3fb-200d-1f527","1f9d1-1f3fc-200d-1f527","1f9d1-1f3fd-200d-1f527","1f9d1-1f3fe-200d-1f527","1f9d1-1f3ff-200d-1f527"]},{n:["man mechanic","male-mechanic"],u:"1f468-200d-1f527",v:["1f468-1f3fb-200d-1f527","1f468-1f3fc-200d-1f527","1f468-1f3fd-200d-1f527","1f468-1f3fe-200d-1f527","1f468-1f3ff-200d-1f527"]},{n:["woman mechanic","female-mechanic"],u:"1f469-200d-1f527",v:["1f469-1f3fb-200d-1f527","1f469-1f3fc-200d-1f527","1f469-1f3fd-200d-1f527","1f469-1f3fe-200d-1f527","1f469-1f3ff-200d-1f527"]},{n:["factory worker"],u:"1f9d1-200d-1f3ed",v:["1f9d1-1f3fb-200d-1f3ed","1f9d1-1f3fc-200d-1f3ed","1f9d1-1f3fd-200d-1f3ed","1f9d1-1f3fe-200d-1f3ed","1f9d1-1f3ff-200d-1f3ed"]},{n:["man factory worker","male-factory-worker"],u:"1f468-200d-1f3ed",v:["1f468-1f3fb-200d-1f3ed","1f468-1f3fc-200d-1f3ed","1f468-1f3fd-200d-1f3ed","1f468-1f3fe-200d-1f3ed","1f468-1f3ff-200d-1f3ed"]},{n:["woman factory worker","female-factory-worker"],u:"1f469-200d-1f3ed",v:["1f469-1f3fb-200d-1f3ed","1f469-1f3fc-200d-1f3ed","1f469-1f3fd-200d-1f3ed","1f469-1f3fe-200d-1f3ed","1f469-1f3ff-200d-1f3ed"]},{n:["office worker"],u:"1f9d1-200d-1f4bc",v:["1f9d1-1f3fb-200d-1f4bc","1f9d1-1f3fc-200d-1f4bc","1f9d1-1f3fd-200d-1f4bc","1f9d1-1f3fe-200d-1f4bc","1f9d1-1f3ff-200d-1f4bc"]},{n:["man office worker","male-office-worker"],u:"1f468-200d-1f4bc",v:["1f468-1f3fb-200d-1f4bc","1f468-1f3fc-200d-1f4bc","1f468-1f3fd-200d-1f4bc","1f468-1f3fe-200d-1f4bc","1f468-1f3ff-200d-1f4bc"]},{n:["woman office worker","female-office-worker"],u:"1f469-200d-1f4bc",v:["1f469-1f3fb-200d-1f4bc","1f469-1f3fc-200d-1f4bc","1f469-1f3fd-200d-1f4bc","1f469-1f3fe-200d-1f4bc","1f469-1f3ff-200d-1f4bc"]},{n:["scientist"],u:"1f9d1-200d-1f52c",v:["1f9d1-1f3fb-200d-1f52c","1f9d1-1f3fc-200d-1f52c","1f9d1-1f3fd-200d-1f52c","1f9d1-1f3fe-200d-1f52c","1f9d1-1f3ff-200d-1f52c"]},{n:["man scientist","male-scientist"],u:"1f468-200d-1f52c",v:["1f468-1f3fb-200d-1f52c","1f468-1f3fc-200d-1f52c","1f468-1f3fd-200d-1f52c","1f468-1f3fe-200d-1f52c","1f468-1f3ff-200d-1f52c"]},{n:["woman scientist","female-scientist"],u:"1f469-200d-1f52c",v:["1f469-1f3fb-200d-1f52c","1f469-1f3fc-200d-1f52c","1f469-1f3fd-200d-1f52c","1f469-1f3fe-200d-1f52c","1f469-1f3ff-200d-1f52c"]},{n:["technologist"],u:"1f9d1-200d-1f4bb",v:["1f9d1-1f3fb-200d-1f4bb","1f9d1-1f3fc-200d-1f4bb","1f9d1-1f3fd-200d-1f4bb","1f9d1-1f3fe-200d-1f4bb","1f9d1-1f3ff-200d-1f4bb"]},{n:["man technologist","male-technologist"],u:"1f468-200d-1f4bb",v:["1f468-1f3fb-200d-1f4bb","1f468-1f3fc-200d-1f4bb","1f468-1f3fd-200d-1f4bb","1f468-1f3fe-200d-1f4bb","1f468-1f3ff-200d-1f4bb"]},{n:["woman technologist","female-technologist"],u:"1f469-200d-1f4bb",v:["1f469-1f3fb-200d-1f4bb","1f469-1f3fc-200d-1f4bb","1f469-1f3fd-200d-1f4bb","1f469-1f3fe-200d-1f4bb","1f469-1f3ff-200d-1f4bb"]},{n:["singer"],u:"1f9d1-200d-1f3a4",v:["1f9d1-1f3fb-200d-1f3a4","1f9d1-1f3fc-200d-1f3a4","1f9d1-1f3fd-200d-1f3a4","1f9d1-1f3fe-200d-1f3a4","1f9d1-1f3ff-200d-1f3a4"]},{n:["man singer","male-singer"],u:"1f468-200d-1f3a4",v:["1f468-1f3fb-200d-1f3a4","1f468-1f3fc-200d-1f3a4","1f468-1f3fd-200d-1f3a4","1f468-1f3fe-200d-1f3a4","1f468-1f3ff-200d-1f3a4"]},{n:["woman singer","female-singer"],u:"1f469-200d-1f3a4",v:["1f469-1f3fb-200d-1f3a4","1f469-1f3fc-200d-1f3a4","1f469-1f3fd-200d-1f3a4","1f469-1f3fe-200d-1f3a4","1f469-1f3ff-200d-1f3a4"]},{n:["artist"],u:"1f9d1-200d-1f3a8",v:["1f9d1-1f3fb-200d-1f3a8","1f9d1-1f3fc-200d-1f3a8","1f9d1-1f3fd-200d-1f3a8","1f9d1-1f3fe-200d-1f3a8","1f9d1-1f3ff-200d-1f3a8"]},{n:["man artist","male-artist"],u:"1f468-200d-1f3a8",v:["1f468-1f3fb-200d-1f3a8","1f468-1f3fc-200d-1f3a8","1f468-1f3fd-200d-1f3a8","1f468-1f3fe-200d-1f3a8","1f468-1f3ff-200d-1f3a8"]},{n:["woman artist","female-artist"],u:"1f469-200d-1f3a8",v:["1f469-1f3fb-200d-1f3a8","1f469-1f3fc-200d-1f3a8","1f469-1f3fd-200d-1f3a8","1f469-1f3fe-200d-1f3a8","1f469-1f3ff-200d-1f3a8"]},{n:["pilot"],u:"1f9d1-200d-2708-fe0f",v:["1f9d1-1f3fb-200d-2708-fe0f","1f9d1-1f3fc-200d-2708-fe0f","1f9d1-1f3fd-200d-2708-fe0f","1f9d1-1f3fe-200d-2708-fe0f","1f9d1-1f3ff-200d-2708-fe0f"]},{n:["man pilot","male-pilot"],u:"1f468-200d-2708-fe0f",v:["1f468-1f3fb-200d-2708-fe0f","1f468-1f3fc-200d-2708-fe0f","1f468-1f3fd-200d-2708-fe0f","1f468-1f3fe-200d-2708-fe0f","1f468-1f3ff-200d-2708-fe0f"]},{n:["woman pilot","female-pilot"],u:"1f469-200d-2708-fe0f",v:["1f469-1f3fb-200d-2708-fe0f","1f469-1f3fc-200d-2708-fe0f","1f469-1f3fd-200d-2708-fe0f","1f469-1f3fe-200d-2708-fe0f","1f469-1f3ff-200d-2708-fe0f"]},{n:["astronaut"],u:"1f9d1-200d-1f680",v:["1f9d1-1f3fb-200d-1f680","1f9d1-1f3fc-200d-1f680","1f9d1-1f3fd-200d-1f680","1f9d1-1f3fe-200d-1f680","1f9d1-1f3ff-200d-1f680"]},{n:["man astronaut","male-astronaut"],u:"1f468-200d-1f680",v:["1f468-1f3fb-200d-1f680","1f468-1f3fc-200d-1f680","1f468-1f3fd-200d-1f680","1f468-1f3fe-200d-1f680","1f468-1f3ff-200d-1f680"]},{n:["woman astronaut","female-astronaut"],u:"1f469-200d-1f680",v:["1f469-1f3fb-200d-1f680","1f469-1f3fc-200d-1f680","1f469-1f3fd-200d-1f680","1f469-1f3fe-200d-1f680","1f469-1f3ff-200d-1f680"]},{n:["firefighter"],u:"1f9d1-200d-1f692",v:["1f9d1-1f3fb-200d-1f692","1f9d1-1f3fc-200d-1f692","1f9d1-1f3fd-200d-1f692","1f9d1-1f3fe-200d-1f692","1f9d1-1f3ff-200d-1f692"]},{n:["man firefighter","male-firefighter"],u:"1f468-200d-1f692",v:["1f468-1f3fb-200d-1f692","1f468-1f3fc-200d-1f692","1f468-1f3fd-200d-1f692","1f468-1f3fe-200d-1f692","1f468-1f3ff-200d-1f692"]},{n:["woman firefighter","female-firefighter"],u:"1f469-200d-1f692",v:["1f469-1f3fb-200d-1f692","1f469-1f3fc-200d-1f692","1f469-1f3fd-200d-1f692","1f469-1f3fe-200d-1f692","1f469-1f3ff-200d-1f692"]},{n:["cop","police officer"],u:"1f46e",v:["1f46e-1f3fb","1f46e-1f3fc","1f46e-1f3fd","1f46e-1f3fe","1f46e-1f3ff"]},{n:["man police officer","male-police-officer"],u:"1f46e-200d-2642-fe0f",v:["1f46e-1f3fb-200d-2642-fe0f","1f46e-1f3fc-200d-2642-fe0f","1f46e-1f3fd-200d-2642-fe0f","1f46e-1f3fe-200d-2642-fe0f","1f46e-1f3ff-200d-2642-fe0f"]},{n:["woman police officer","female-police-officer"],u:"1f46e-200d-2640-fe0f",v:["1f46e-1f3fb-200d-2640-fe0f","1f46e-1f3fc-200d-2640-fe0f","1f46e-1f3fd-200d-2640-fe0f","1f46e-1f3fe-200d-2640-fe0f","1f46e-1f3ff-200d-2640-fe0f"]},{n:["detective","sleuth or spy"],u:"1f575-fe0f",v:["1f575-1f3fb","1f575-1f3fc","1f575-1f3fd","1f575-1f3fe","1f575-1f3ff"]},{n:["man detective","male-detective"],u:"1f575-fe0f-200d-2642-fe0f",v:["1f575-1f3fb-200d-2642-fe0f","1f575-1f3fc-200d-2642-fe0f","1f575-1f3fd-200d-2642-fe0f","1f575-1f3fe-200d-2642-fe0f","1f575-1f3ff-200d-2642-fe0f"]},{n:["woman detective","female-detective"],u:"1f575-fe0f-200d-2640-fe0f",v:["1f575-1f3fb-200d-2640-fe0f","1f575-1f3fc-200d-2640-fe0f","1f575-1f3fd-200d-2640-fe0f","1f575-1f3fe-200d-2640-fe0f","1f575-1f3ff-200d-2640-fe0f"]},{n:["guardsman"],u:"1f482",v:["1f482-1f3fb","1f482-1f3fc","1f482-1f3fd","1f482-1f3fe","1f482-1f3ff"]},{n:["man guard","male-guard"],u:"1f482-200d-2642-fe0f",v:["1f482-1f3fb-200d-2642-fe0f","1f482-1f3fc-200d-2642-fe0f","1f482-1f3fd-200d-2642-fe0f","1f482-1f3fe-200d-2642-fe0f","1f482-1f3ff-200d-2642-fe0f"]},{n:["woman guard","female-guard"],u:"1f482-200d-2640-fe0f",v:["1f482-1f3fb-200d-2640-fe0f","1f482-1f3fc-200d-2640-fe0f","1f482-1f3fd-200d-2640-fe0f","1f482-1f3fe-200d-2640-fe0f","1f482-1f3ff-200d-2640-fe0f"]},{n:["ninja"],u:"1f977",v:["1f977-1f3fb","1f977-1f3fc","1f977-1f3fd","1f977-1f3fe","1f977-1f3ff"]},{n:["construction worker"],u:"1f477",v:["1f477-1f3fb","1f477-1f3fc","1f477-1f3fd","1f477-1f3fe","1f477-1f3ff"]},{n:["man construction worker","male-construction-worker"],u:"1f477-200d-2642-fe0f",v:["1f477-1f3fb-200d-2642-fe0f","1f477-1f3fc-200d-2642-fe0f","1f477-1f3fd-200d-2642-fe0f","1f477-1f3fe-200d-2642-fe0f","1f477-1f3ff-200d-2642-fe0f"]},{n:["woman construction worker","female-construction-worker"],u:"1f477-200d-2640-fe0f",v:["1f477-1f3fb-200d-2640-fe0f","1f477-1f3fc-200d-2640-fe0f","1f477-1f3fd-200d-2640-fe0f","1f477-1f3fe-200d-2640-fe0f","1f477-1f3ff-200d-2640-fe0f"]},{n:["person with crown"],u:"1fac5",v:["1fac5-1f3fb","1fac5-1f3fc","1fac5-1f3fd","1fac5-1f3fe","1fac5-1f3ff"]},{n:["prince"],u:"1f934",v:["1f934-1f3fb","1f934-1f3fc","1f934-1f3fd","1f934-1f3fe","1f934-1f3ff"]},{n:["princess"],u:"1f478",v:["1f478-1f3fb","1f478-1f3fc","1f478-1f3fd","1f478-1f3fe","1f478-1f3ff"]},{n:["man with turban"],u:"1f473",v:["1f473-1f3fb","1f473-1f3fc","1f473-1f3fd","1f473-1f3fe","1f473-1f3ff"]},{n:["man wearing turban","man-wearing-turban"],u:"1f473-200d-2642-fe0f",v:["1f473-1f3fb-200d-2642-fe0f","1f473-1f3fc-200d-2642-fe0f","1f473-1f3fd-200d-2642-fe0f","1f473-1f3fe-200d-2642-fe0f","1f473-1f3ff-200d-2642-fe0f"]},{n:["woman wearing turban","woman-wearing-turban"],u:"1f473-200d-2640-fe0f",v:["1f473-1f3fb-200d-2640-fe0f","1f473-1f3fc-200d-2640-fe0f","1f473-1f3fd-200d-2640-fe0f","1f473-1f3fe-200d-2640-fe0f","1f473-1f3ff-200d-2640-fe0f"]},{n:["man with gua pi mao"],u:"1f472",v:["1f472-1f3fb","1f472-1f3fc","1f472-1f3fd","1f472-1f3fe","1f472-1f3ff"]},{n:["person with headscarf"],u:"1f9d5",v:["1f9d5-1f3fb","1f9d5-1f3fc","1f9d5-1f3fd","1f9d5-1f3fe","1f9d5-1f3ff"]},{n:["man in tuxedo","person in tuxedo"],u:"1f935",v:["1f935-1f3fb","1f935-1f3fc","1f935-1f3fd","1f935-1f3fe","1f935-1f3ff"]},{n:["man in tuxedo"],u:"1f935-200d-2642-fe0f",v:["1f935-1f3fb-200d-2642-fe0f","1f935-1f3fc-200d-2642-fe0f","1f935-1f3fd-200d-2642-fe0f","1f935-1f3fe-200d-2642-fe0f","1f935-1f3ff-200d-2642-fe0f"]},{n:["woman in tuxedo"],u:"1f935-200d-2640-fe0f",v:["1f935-1f3fb-200d-2640-fe0f","1f935-1f3fc-200d-2640-fe0f","1f935-1f3fd-200d-2640-fe0f","1f935-1f3fe-200d-2640-fe0f","1f935-1f3ff-200d-2640-fe0f"]},{n:["bride with veil"],u:"1f470",v:["1f470-1f3fb","1f470-1f3fc","1f470-1f3fd","1f470-1f3fe","1f470-1f3ff"]},{n:["man with veil"],u:"1f470-200d-2642-fe0f",v:["1f470-1f3fb-200d-2642-fe0f","1f470-1f3fc-200d-2642-fe0f","1f470-1f3fd-200d-2642-fe0f","1f470-1f3fe-200d-2642-fe0f","1f470-1f3ff-200d-2642-fe0f"]},{n:["woman with veil"],u:"1f470-200d-2640-fe0f",v:["1f470-1f3fb-200d-2640-fe0f","1f470-1f3fc-200d-2640-fe0f","1f470-1f3fd-200d-2640-fe0f","1f470-1f3fe-200d-2640-fe0f","1f470-1f3ff-200d-2640-fe0f"]},{n:["pregnant woman"],u:"1f930",v:["1f930-1f3fb","1f930-1f3fc","1f930-1f3fd","1f930-1f3fe","1f930-1f3ff"]},{n:["pregnant man"],u:"1fac3",v:["1fac3-1f3fb","1fac3-1f3fc","1fac3-1f3fd","1fac3-1f3fe","1fac3-1f3ff"]},{n:["pregnant person"],u:"1fac4",v:["1fac4-1f3fb","1fac4-1f3fc","1fac4-1f3fd","1fac4-1f3fe","1fac4-1f3ff"]},{n:["breast-feeding"],u:"1f931",v:["1f931-1f3fb","1f931-1f3fc","1f931-1f3fd","1f931-1f3fe","1f931-1f3ff"]},{n:["woman feeding baby"],u:"1f469-200d-1f37c",v:["1f469-1f3fb-200d-1f37c","1f469-1f3fc-200d-1f37c","1f469-1f3fd-200d-1f37c","1f469-1f3fe-200d-1f37c","1f469-1f3ff-200d-1f37c"]},{n:["man feeding baby"],u:"1f468-200d-1f37c",v:["1f468-1f3fb-200d-1f37c","1f468-1f3fc-200d-1f37c","1f468-1f3fd-200d-1f37c","1f468-1f3fe-200d-1f37c","1f468-1f3ff-200d-1f37c"]},{n:["person feeding baby"],u:"1f9d1-200d-1f37c",v:["1f9d1-1f3fb-200d-1f37c","1f9d1-1f3fc-200d-1f37c","1f9d1-1f3fd-200d-1f37c","1f9d1-1f3fe-200d-1f37c","1f9d1-1f3ff-200d-1f37c"]},{n:["angel","baby angel"],u:"1f47c",v:["1f47c-1f3fb","1f47c-1f3fc","1f47c-1f3fd","1f47c-1f3fe","1f47c-1f3ff"]},{n:["santa","father christmas"],u:"1f385",v:["1f385-1f3fb","1f385-1f3fc","1f385-1f3fd","1f385-1f3fe","1f385-1f3ff"]},{n:["mrs claus","mother christmas"],u:"1f936",v:["1f936-1f3fb","1f936-1f3fc","1f936-1f3fd","1f936-1f3fe","1f936-1f3ff"]},{n:["mx claus"],u:"1f9d1-200d-1f384",v:["1f9d1-1f3fb-200d-1f384","1f9d1-1f3fc-200d-1f384","1f9d1-1f3fd-200d-1f384","1f9d1-1f3fe-200d-1f384","1f9d1-1f3ff-200d-1f384"]},{n:["superhero"],u:"1f9b8",v:["1f9b8-1f3fb","1f9b8-1f3fc","1f9b8-1f3fd","1f9b8-1f3fe","1f9b8-1f3ff"]},{n:["man superhero","male superhero"],u:"1f9b8-200d-2642-fe0f",v:["1f9b8-1f3fb-200d-2642-fe0f","1f9b8-1f3fc-200d-2642-fe0f","1f9b8-1f3fd-200d-2642-fe0f","1f9b8-1f3fe-200d-2642-fe0f","1f9b8-1f3ff-200d-2642-fe0f"]},{n:["woman superhero","female superhero"],u:"1f9b8-200d-2640-fe0f",v:["1f9b8-1f3fb-200d-2640-fe0f","1f9b8-1f3fc-200d-2640-fe0f","1f9b8-1f3fd-200d-2640-fe0f","1f9b8-1f3fe-200d-2640-fe0f","1f9b8-1f3ff-200d-2640-fe0f"]},{n:["supervillain"],u:"1f9b9",v:["1f9b9-1f3fb","1f9b9-1f3fc","1f9b9-1f3fd","1f9b9-1f3fe","1f9b9-1f3ff"]},{n:["man supervillain","male supervillain"],u:"1f9b9-200d-2642-fe0f",v:["1f9b9-1f3fb-200d-2642-fe0f","1f9b9-1f3fc-200d-2642-fe0f","1f9b9-1f3fd-200d-2642-fe0f","1f9b9-1f3fe-200d-2642-fe0f","1f9b9-1f3ff-200d-2642-fe0f"]},{n:["woman supervillain","female supervillain"],u:"1f9b9-200d-2640-fe0f",v:["1f9b9-1f3fb-200d-2640-fe0f","1f9b9-1f3fc-200d-2640-fe0f","1f9b9-1f3fd-200d-2640-fe0f","1f9b9-1f3fe-200d-2640-fe0f","1f9b9-1f3ff-200d-2640-fe0f"]},{n:["mage"],u:"1f9d9",v:["1f9d9-1f3fb","1f9d9-1f3fc","1f9d9-1f3fd","1f9d9-1f3fe","1f9d9-1f3ff"]},{n:["man mage","male mage"],u:"1f9d9-200d-2642-fe0f",v:["1f9d9-1f3fb-200d-2642-fe0f","1f9d9-1f3fc-200d-2642-fe0f","1f9d9-1f3fd-200d-2642-fe0f","1f9d9-1f3fe-200d-2642-fe0f","1f9d9-1f3ff-200d-2642-fe0f"]},{n:["woman mage","female mage"],u:"1f9d9-200d-2640-fe0f",v:["1f9d9-1f3fb-200d-2640-fe0f","1f9d9-1f3fc-200d-2640-fe0f","1f9d9-1f3fd-200d-2640-fe0f","1f9d9-1f3fe-200d-2640-fe0f","1f9d9-1f3ff-200d-2640-fe0f"]},{n:["fairy"],u:"1f9da",v:["1f9da-1f3fb","1f9da-1f3fc","1f9da-1f3fd","1f9da-1f3fe","1f9da-1f3ff"]},{n:["man fairy","male fairy"],u:"1f9da-200d-2642-fe0f",v:["1f9da-1f3fb-200d-2642-fe0f","1f9da-1f3fc-200d-2642-fe0f","1f9da-1f3fd-200d-2642-fe0f","1f9da-1f3fe-200d-2642-fe0f","1f9da-1f3ff-200d-2642-fe0f"]},{n:["woman fairy","female fairy"],u:"1f9da-200d-2640-fe0f",v:["1f9da-1f3fb-200d-2640-fe0f","1f9da-1f3fc-200d-2640-fe0f","1f9da-1f3fd-200d-2640-fe0f","1f9da-1f3fe-200d-2640-fe0f","1f9da-1f3ff-200d-2640-fe0f"]},{n:["vampire"],u:"1f9db",v:["1f9db-1f3fb","1f9db-1f3fc","1f9db-1f3fd","1f9db-1f3fe","1f9db-1f3ff"]},{n:["man vampire","male vampire"],u:"1f9db-200d-2642-fe0f",v:["1f9db-1f3fb-200d-2642-fe0f","1f9db-1f3fc-200d-2642-fe0f","1f9db-1f3fd-200d-2642-fe0f","1f9db-1f3fe-200d-2642-fe0f","1f9db-1f3ff-200d-2642-fe0f"]},{n:["woman vampire","female vampire"],u:"1f9db-200d-2640-fe0f",v:["1f9db-1f3fb-200d-2640-fe0f","1f9db-1f3fc-200d-2640-fe0f","1f9db-1f3fd-200d-2640-fe0f","1f9db-1f3fe-200d-2640-fe0f","1f9db-1f3ff-200d-2640-fe0f"]},{n:["merperson"],u:"1f9dc",v:["1f9dc-1f3fb","1f9dc-1f3fc","1f9dc-1f3fd","1f9dc-1f3fe","1f9dc-1f3ff"]},{n:["merman"],u:"1f9dc-200d-2642-fe0f",v:["1f9dc-1f3fb-200d-2642-fe0f","1f9dc-1f3fc-200d-2642-fe0f","1f9dc-1f3fd-200d-2642-fe0f","1f9dc-1f3fe-200d-2642-fe0f","1f9dc-1f3ff-200d-2642-fe0f"]},{n:["mermaid"],u:"1f9dc-200d-2640-fe0f",v:["1f9dc-1f3fb-200d-2640-fe0f","1f9dc-1f3fc-200d-2640-fe0f","1f9dc-1f3fd-200d-2640-fe0f","1f9dc-1f3fe-200d-2640-fe0f","1f9dc-1f3ff-200d-2640-fe0f"]},{n:["elf"],u:"1f9dd",v:["1f9dd-1f3fb","1f9dd-1f3fc","1f9dd-1f3fd","1f9dd-1f3fe","1f9dd-1f3ff"]},{n:["man elf","male elf"],u:"1f9dd-200d-2642-fe0f",v:["1f9dd-1f3fb-200d-2642-fe0f","1f9dd-1f3fc-200d-2642-fe0f","1f9dd-1f3fd-200d-2642-fe0f","1f9dd-1f3fe-200d-2642-fe0f","1f9dd-1f3ff-200d-2642-fe0f"]},{n:["woman elf","female elf"],u:"1f9dd-200d-2640-fe0f",v:["1f9dd-1f3fb-200d-2640-fe0f","1f9dd-1f3fc-200d-2640-fe0f","1f9dd-1f3fd-200d-2640-fe0f","1f9dd-1f3fe-200d-2640-fe0f","1f9dd-1f3ff-200d-2640-fe0f"]},{n:["genie"],u:"1f9de"},{n:["man genie","male genie"],u:"1f9de-200d-2642-fe0f"},{n:["woman genie","female genie"],u:"1f9de-200d-2640-fe0f"},{n:["zombie"],u:"1f9df"},{n:["man zombie","male zombie"],u:"1f9df-200d-2642-fe0f"},{n:["woman zombie","female zombie"],u:"1f9df-200d-2640-fe0f"},{n:["troll"],u:"1f9cc"},{n:["massage","face massage"],u:"1f486",v:["1f486-1f3fb","1f486-1f3fc","1f486-1f3fd","1f486-1f3fe","1f486-1f3ff"]},{n:["man getting massage","man-getting-massage"],u:"1f486-200d-2642-fe0f",v:["1f486-1f3fb-200d-2642-fe0f","1f486-1f3fc-200d-2642-fe0f","1f486-1f3fd-200d-2642-fe0f","1f486-1f3fe-200d-2642-fe0f","1f486-1f3ff-200d-2642-fe0f"]},{n:["woman getting massage","woman-getting-massage"],u:"1f486-200d-2640-fe0f",v:["1f486-1f3fb-200d-2640-fe0f","1f486-1f3fc-200d-2640-fe0f","1f486-1f3fd-200d-2640-fe0f","1f486-1f3fe-200d-2640-fe0f","1f486-1f3ff-200d-2640-fe0f"]},{n:["haircut"],u:"1f487",v:["1f487-1f3fb","1f487-1f3fc","1f487-1f3fd","1f487-1f3fe","1f487-1f3ff"]},{n:["man getting haircut","man-getting-haircut"],u:"1f487-200d-2642-fe0f",v:["1f487-1f3fb-200d-2642-fe0f","1f487-1f3fc-200d-2642-fe0f","1f487-1f3fd-200d-2642-fe0f","1f487-1f3fe-200d-2642-fe0f","1f487-1f3ff-200d-2642-fe0f"]},{n:["woman getting haircut","woman-getting-haircut"],u:"1f487-200d-2640-fe0f",v:["1f487-1f3fb-200d-2640-fe0f","1f487-1f3fc-200d-2640-fe0f","1f487-1f3fd-200d-2640-fe0f","1f487-1f3fe-200d-2640-fe0f","1f487-1f3ff-200d-2640-fe0f"]},{n:["walking","pedestrian"],u:"1f6b6",v:["1f6b6-1f3fb","1f6b6-1f3fc","1f6b6-1f3fd","1f6b6-1f3fe","1f6b6-1f3ff"]},{n:["man walking","man-walking"],u:"1f6b6-200d-2642-fe0f",v:["1f6b6-1f3fb-200d-2642-fe0f","1f6b6-1f3fc-200d-2642-fe0f","1f6b6-1f3fd-200d-2642-fe0f","1f6b6-1f3fe-200d-2642-fe0f","1f6b6-1f3ff-200d-2642-fe0f"]},{n:["woman walking","woman-walking"],u:"1f6b6-200d-2640-fe0f",v:["1f6b6-1f3fb-200d-2640-fe0f","1f6b6-1f3fc-200d-2640-fe0f","1f6b6-1f3fd-200d-2640-fe0f","1f6b6-1f3fe-200d-2640-fe0f","1f6b6-1f3ff-200d-2640-fe0f"]},{n:["standing person"],u:"1f9cd",v:["1f9cd-1f3fb","1f9cd-1f3fc","1f9cd-1f3fd","1f9cd-1f3fe","1f9cd-1f3ff"]},{n:["man standing"],u:"1f9cd-200d-2642-fe0f",v:["1f9cd-1f3fb-200d-2642-fe0f","1f9cd-1f3fc-200d-2642-fe0f","1f9cd-1f3fd-200d-2642-fe0f","1f9cd-1f3fe-200d-2642-fe0f","1f9cd-1f3ff-200d-2642-fe0f"]},{n:["woman standing"],u:"1f9cd-200d-2640-fe0f",v:["1f9cd-1f3fb-200d-2640-fe0f","1f9cd-1f3fc-200d-2640-fe0f","1f9cd-1f3fd-200d-2640-fe0f","1f9cd-1f3fe-200d-2640-fe0f","1f9cd-1f3ff-200d-2640-fe0f"]},{n:["kneeling person"],u:"1f9ce",v:["1f9ce-1f3fb","1f9ce-1f3fc","1f9ce-1f3fd","1f9ce-1f3fe","1f9ce-1f3ff"]},{n:["man kneeling"],u:"1f9ce-200d-2642-fe0f",v:["1f9ce-1f3fb-200d-2642-fe0f","1f9ce-1f3fc-200d-2642-fe0f","1f9ce-1f3fd-200d-2642-fe0f","1f9ce-1f3fe-200d-2642-fe0f","1f9ce-1f3ff-200d-2642-fe0f"]},{n:["woman kneeling"],u:"1f9ce-200d-2640-fe0f",v:["1f9ce-1f3fb-200d-2640-fe0f","1f9ce-1f3fc-200d-2640-fe0f","1f9ce-1f3fd-200d-2640-fe0f","1f9ce-1f3fe-200d-2640-fe0f","1f9ce-1f3ff-200d-2640-fe0f"]},{n:["person with white cane","person with probing cane"],u:"1f9d1-200d-1f9af",v:["1f9d1-1f3fb-200d-1f9af","1f9d1-1f3fc-200d-1f9af","1f9d1-1f3fd-200d-1f9af","1f9d1-1f3fe-200d-1f9af","1f9d1-1f3ff-200d-1f9af"]},{n:["man with white cane","man with probing cane"],u:"1f468-200d-1f9af",v:["1f468-1f3fb-200d-1f9af","1f468-1f3fc-200d-1f9af","1f468-1f3fd-200d-1f9af","1f468-1f3fe-200d-1f9af","1f468-1f3ff-200d-1f9af"]},{n:["woman with white cane","woman with probing cane"],u:"1f469-200d-1f9af",v:["1f469-1f3fb-200d-1f9af","1f469-1f3fc-200d-1f9af","1f469-1f3fd-200d-1f9af","1f469-1f3fe-200d-1f9af","1f469-1f3ff-200d-1f9af"]},{n:["person in motorized wheelchair"],u:"1f9d1-200d-1f9bc",v:["1f9d1-1f3fb-200d-1f9bc","1f9d1-1f3fc-200d-1f9bc","1f9d1-1f3fd-200d-1f9bc","1f9d1-1f3fe-200d-1f9bc","1f9d1-1f3ff-200d-1f9bc"]},{n:["man in motorized wheelchair"],u:"1f468-200d-1f9bc",v:["1f468-1f3fb-200d-1f9bc","1f468-1f3fc-200d-1f9bc","1f468-1f3fd-200d-1f9bc","1f468-1f3fe-200d-1f9bc","1f468-1f3ff-200d-1f9bc"]},{n:["woman in motorized wheelchair"],u:"1f469-200d-1f9bc",v:["1f469-1f3fb-200d-1f9bc","1f469-1f3fc-200d-1f9bc","1f469-1f3fd-200d-1f9bc","1f469-1f3fe-200d-1f9bc","1f469-1f3ff-200d-1f9bc"]},{n:["person in manual wheelchair"],u:"1f9d1-200d-1f9bd",v:["1f9d1-1f3fb-200d-1f9bd","1f9d1-1f3fc-200d-1f9bd","1f9d1-1f3fd-200d-1f9bd","1f9d1-1f3fe-200d-1f9bd","1f9d1-1f3ff-200d-1f9bd"]},{n:["man in manual wheelchair"],u:"1f468-200d-1f9bd",v:["1f468-1f3fb-200d-1f9bd","1f468-1f3fc-200d-1f9bd","1f468-1f3fd-200d-1f9bd","1f468-1f3fe-200d-1f9bd","1f468-1f3ff-200d-1f9bd"]},{n:["woman in manual wheelchair"],u:"1f469-200d-1f9bd",v:["1f469-1f3fb-200d-1f9bd","1f469-1f3fc-200d-1f9bd","1f469-1f3fd-200d-1f9bd","1f469-1f3fe-200d-1f9bd","1f469-1f3ff-200d-1f9bd"]},{n:["runner","running"],u:"1f3c3",v:["1f3c3-1f3fb","1f3c3-1f3fc","1f3c3-1f3fd","1f3c3-1f3fe","1f3c3-1f3ff"]},{n:["man running","man-running"],u:"1f3c3-200d-2642-fe0f",v:["1f3c3-1f3fb-200d-2642-fe0f","1f3c3-1f3fc-200d-2642-fe0f","1f3c3-1f3fd-200d-2642-fe0f","1f3c3-1f3fe-200d-2642-fe0f","1f3c3-1f3ff-200d-2642-fe0f"]},{n:["woman running","woman-running"],u:"1f3c3-200d-2640-fe0f",v:["1f3c3-1f3fb-200d-2640-fe0f","1f3c3-1f3fc-200d-2640-fe0f","1f3c3-1f3fd-200d-2640-fe0f","1f3c3-1f3fe-200d-2640-fe0f","1f3c3-1f3ff-200d-2640-fe0f"]},{n:["dancer"],u:"1f483",v:["1f483-1f3fb","1f483-1f3fc","1f483-1f3fd","1f483-1f3fe","1f483-1f3ff"]},{n:["man dancing"],u:"1f57a",v:["1f57a-1f3fb","1f57a-1f3fc","1f57a-1f3fd","1f57a-1f3fe","1f57a-1f3ff"]},{n:["person in suit levitating","man in business suit levitating"],u:"1f574-fe0f",v:["1f574-1f3fb","1f574-1f3fc","1f574-1f3fd","1f574-1f3fe","1f574-1f3ff"]},{n:["dancers","woman with bunny ears"],u:"1f46f"},{n:["men with bunny ears","men-with-bunny-ears-partying","man-with-bunny-ears-partying"],u:"1f46f-200d-2642-fe0f"},{n:["women with bunny ears","women-with-bunny-ears-partying","woman-with-bunny-ears-partying"],u:"1f46f-200d-2640-fe0f"},{n:["person in steamy room"],u:"1f9d6",v:["1f9d6-1f3fb","1f9d6-1f3fc","1f9d6-1f3fd","1f9d6-1f3fe","1f9d6-1f3ff"]},{n:["man in steamy room"],u:"1f9d6-200d-2642-fe0f",v:["1f9d6-1f3fb-200d-2642-fe0f","1f9d6-1f3fc-200d-2642-fe0f","1f9d6-1f3fd-200d-2642-fe0f","1f9d6-1f3fe-200d-2642-fe0f","1f9d6-1f3ff-200d-2642-fe0f"]},{n:["woman in steamy room"],u:"1f9d6-200d-2640-fe0f",v:["1f9d6-1f3fb-200d-2640-fe0f","1f9d6-1f3fc-200d-2640-fe0f","1f9d6-1f3fd-200d-2640-fe0f","1f9d6-1f3fe-200d-2640-fe0f","1f9d6-1f3ff-200d-2640-fe0f"]},{n:["person climbing"],u:"1f9d7",v:["1f9d7-1f3fb","1f9d7-1f3fc","1f9d7-1f3fd","1f9d7-1f3fe","1f9d7-1f3ff"]},{n:["man climbing"],u:"1f9d7-200d-2642-fe0f",v:["1f9d7-1f3fb-200d-2642-fe0f","1f9d7-1f3fc-200d-2642-fe0f","1f9d7-1f3fd-200d-2642-fe0f","1f9d7-1f3fe-200d-2642-fe0f","1f9d7-1f3ff-200d-2642-fe0f"]},{n:["woman climbing"],u:"1f9d7-200d-2640-fe0f",v:["1f9d7-1f3fb-200d-2640-fe0f","1f9d7-1f3fc-200d-2640-fe0f","1f9d7-1f3fd-200d-2640-fe0f","1f9d7-1f3fe-200d-2640-fe0f","1f9d7-1f3ff-200d-2640-fe0f"]},{n:["fencer"],u:"1f93a"},{n:["horse racing"],u:"1f3c7",v:["1f3c7-1f3fb","1f3c7-1f3fc","1f3c7-1f3fd","1f3c7-1f3fe","1f3c7-1f3ff"]},{n:["skier"],u:"26f7-fe0f"},{n:["snowboarder"],u:"1f3c2",v:["1f3c2-1f3fb","1f3c2-1f3fc","1f3c2-1f3fd","1f3c2-1f3fe","1f3c2-1f3ff"]},{n:["golfer","person golfing"],u:"1f3cc-fe0f",v:["1f3cc-1f3fb","1f3cc-1f3fc","1f3cc-1f3fd","1f3cc-1f3fe","1f3cc-1f3ff"]},{n:["man golfing","man-golfing"],u:"1f3cc-fe0f-200d-2642-fe0f",v:["1f3cc-1f3fb-200d-2642-fe0f","1f3cc-1f3fc-200d-2642-fe0f","1f3cc-1f3fd-200d-2642-fe0f","1f3cc-1f3fe-200d-2642-fe0f","1f3cc-1f3ff-200d-2642-fe0f"]},{n:["woman golfing","woman-golfing"],u:"1f3cc-fe0f-200d-2640-fe0f",v:["1f3cc-1f3fb-200d-2640-fe0f","1f3cc-1f3fc-200d-2640-fe0f","1f3cc-1f3fd-200d-2640-fe0f","1f3cc-1f3fe-200d-2640-fe0f","1f3cc-1f3ff-200d-2640-fe0f"]},{n:["surfer"],u:"1f3c4",v:["1f3c4-1f3fb","1f3c4-1f3fc","1f3c4-1f3fd","1f3c4-1f3fe","1f3c4-1f3ff"]},{n:["man surfing","man-surfing"],u:"1f3c4-200d-2642-fe0f",v:["1f3c4-1f3fb-200d-2642-fe0f","1f3c4-1f3fc-200d-2642-fe0f","1f3c4-1f3fd-200d-2642-fe0f","1f3c4-1f3fe-200d-2642-fe0f","1f3c4-1f3ff-200d-2642-fe0f"]},{n:["woman surfing","woman-surfing"],u:"1f3c4-200d-2640-fe0f",v:["1f3c4-1f3fb-200d-2640-fe0f","1f3c4-1f3fc-200d-2640-fe0f","1f3c4-1f3fd-200d-2640-fe0f","1f3c4-1f3fe-200d-2640-fe0f","1f3c4-1f3ff-200d-2640-fe0f"]},{n:["rowboat"],u:"1f6a3",v:["1f6a3-1f3fb","1f6a3-1f3fc","1f6a3-1f3fd","1f6a3-1f3fe","1f6a3-1f3ff"]},{n:["man rowing boat","man-rowing-boat"],u:"1f6a3-200d-2642-fe0f",v:["1f6a3-1f3fb-200d-2642-fe0f","1f6a3-1f3fc-200d-2642-fe0f","1f6a3-1f3fd-200d-2642-fe0f","1f6a3-1f3fe-200d-2642-fe0f","1f6a3-1f3ff-200d-2642-fe0f"]},{n:["woman rowing boat","woman-rowing-boat"],u:"1f6a3-200d-2640-fe0f",v:["1f6a3-1f3fb-200d-2640-fe0f","1f6a3-1f3fc-200d-2640-fe0f","1f6a3-1f3fd-200d-2640-fe0f","1f6a3-1f3fe-200d-2640-fe0f","1f6a3-1f3ff-200d-2640-fe0f"]},{n:["swimmer"],u:"1f3ca",v:["1f3ca-1f3fb","1f3ca-1f3fc","1f3ca-1f3fd","1f3ca-1f3fe","1f3ca-1f3ff"]},{n:["man swimming","man-swimming"],u:"1f3ca-200d-2642-fe0f",v:["1f3ca-1f3fb-200d-2642-fe0f","1f3ca-1f3fc-200d-2642-fe0f","1f3ca-1f3fd-200d-2642-fe0f","1f3ca-1f3fe-200d-2642-fe0f","1f3ca-1f3ff-200d-2642-fe0f"]},{n:["woman swimming","woman-swimming"],u:"1f3ca-200d-2640-fe0f",v:["1f3ca-1f3fb-200d-2640-fe0f","1f3ca-1f3fc-200d-2640-fe0f","1f3ca-1f3fd-200d-2640-fe0f","1f3ca-1f3fe-200d-2640-fe0f","1f3ca-1f3ff-200d-2640-fe0f"]},{n:["person with ball","person bouncing ball"],u:"26f9-fe0f",v:["26f9-1f3fb","26f9-1f3fc","26f9-1f3fd","26f9-1f3fe","26f9-1f3ff"]},{n:["man bouncing ball","man-bouncing-ball"],u:"26f9-fe0f-200d-2642-fe0f",v:["26f9-1f3fb-200d-2642-fe0f","26f9-1f3fc-200d-2642-fe0f","26f9-1f3fd-200d-2642-fe0f","26f9-1f3fe-200d-2642-fe0f","26f9-1f3ff-200d-2642-fe0f"]},{n:["woman bouncing ball","woman-bouncing-ball"],u:"26f9-fe0f-200d-2640-fe0f",v:["26f9-1f3fb-200d-2640-fe0f","26f9-1f3fc-200d-2640-fe0f","26f9-1f3fd-200d-2640-fe0f","26f9-1f3fe-200d-2640-fe0f","26f9-1f3ff-200d-2640-fe0f"]},{n:["weight lifter","person lifting weights"],u:"1f3cb-fe0f",v:["1f3cb-1f3fb","1f3cb-1f3fc","1f3cb-1f3fd","1f3cb-1f3fe","1f3cb-1f3ff"]},{n:["man lifting weights","man-lifting-weights"],u:"1f3cb-fe0f-200d-2642-fe0f",v:["1f3cb-1f3fb-200d-2642-fe0f","1f3cb-1f3fc-200d-2642-fe0f","1f3cb-1f3fd-200d-2642-fe0f","1f3cb-1f3fe-200d-2642-fe0f","1f3cb-1f3ff-200d-2642-fe0f"]},{n:["woman lifting weights","woman-lifting-weights"],u:"1f3cb-fe0f-200d-2640-fe0f",v:["1f3cb-1f3fb-200d-2640-fe0f","1f3cb-1f3fc-200d-2640-fe0f","1f3cb-1f3fd-200d-2640-fe0f","1f3cb-1f3fe-200d-2640-fe0f","1f3cb-1f3ff-200d-2640-fe0f"]},{n:["bicyclist"],u:"1f6b4",v:["1f6b4-1f3fb","1f6b4-1f3fc","1f6b4-1f3fd","1f6b4-1f3fe","1f6b4-1f3ff"]},{n:["man biking","man-biking"],u:"1f6b4-200d-2642-fe0f",v:["1f6b4-1f3fb-200d-2642-fe0f","1f6b4-1f3fc-200d-2642-fe0f","1f6b4-1f3fd-200d-2642-fe0f","1f6b4-1f3fe-200d-2642-fe0f","1f6b4-1f3ff-200d-2642-fe0f"]},{n:["woman biking","woman-biking"],u:"1f6b4-200d-2640-fe0f",v:["1f6b4-1f3fb-200d-2640-fe0f","1f6b4-1f3fc-200d-2640-fe0f","1f6b4-1f3fd-200d-2640-fe0f","1f6b4-1f3fe-200d-2640-fe0f","1f6b4-1f3ff-200d-2640-fe0f"]},{n:["mountain bicyclist"],u:"1f6b5",v:["1f6b5-1f3fb","1f6b5-1f3fc","1f6b5-1f3fd","1f6b5-1f3fe","1f6b5-1f3ff"]},{n:["man mountain biking","man-mountain-biking"],u:"1f6b5-200d-2642-fe0f",v:["1f6b5-1f3fb-200d-2642-fe0f","1f6b5-1f3fc-200d-2642-fe0f","1f6b5-1f3fd-200d-2642-fe0f","1f6b5-1f3fe-200d-2642-fe0f","1f6b5-1f3ff-200d-2642-fe0f"]},{n:["woman mountain biking","woman-mountain-biking"],u:"1f6b5-200d-2640-fe0f",v:["1f6b5-1f3fb-200d-2640-fe0f","1f6b5-1f3fc-200d-2640-fe0f","1f6b5-1f3fd-200d-2640-fe0f","1f6b5-1f3fe-200d-2640-fe0f","1f6b5-1f3ff-200d-2640-fe0f"]},{n:["person doing cartwheel"],u:"1f938",v:["1f938-1f3fb","1f938-1f3fc","1f938-1f3fd","1f938-1f3fe","1f938-1f3ff"]},{n:["man cartwheeling","man-cartwheeling"],u:"1f938-200d-2642-fe0f",v:["1f938-1f3fb-200d-2642-fe0f","1f938-1f3fc-200d-2642-fe0f","1f938-1f3fd-200d-2642-fe0f","1f938-1f3fe-200d-2642-fe0f","1f938-1f3ff-200d-2642-fe0f"]},{n:["woman cartwheeling","woman-cartwheeling"],u:"1f938-200d-2640-fe0f",v:["1f938-1f3fb-200d-2640-fe0f","1f938-1f3fc-200d-2640-fe0f","1f938-1f3fd-200d-2640-fe0f","1f938-1f3fe-200d-2640-fe0f","1f938-1f3ff-200d-2640-fe0f"]},{n:["wrestlers"],u:"1f93c"},{n:["men wrestling","man-wrestling"],u:"1f93c-200d-2642-fe0f"},{n:["women wrestling","woman-wrestling"],u:"1f93c-200d-2640-fe0f"},{n:["water polo"],u:"1f93d",v:["1f93d-1f3fb","1f93d-1f3fc","1f93d-1f3fd","1f93d-1f3fe","1f93d-1f3ff"]},{n:["man playing water polo","man-playing-water-polo"],u:"1f93d-200d-2642-fe0f",v:["1f93d-1f3fb-200d-2642-fe0f","1f93d-1f3fc-200d-2642-fe0f","1f93d-1f3fd-200d-2642-fe0f","1f93d-1f3fe-200d-2642-fe0f","1f93d-1f3ff-200d-2642-fe0f"]},{n:["woman playing water polo","woman-playing-water-polo"],u:"1f93d-200d-2640-fe0f",v:["1f93d-1f3fb-200d-2640-fe0f","1f93d-1f3fc-200d-2640-fe0f","1f93d-1f3fd-200d-2640-fe0f","1f93d-1f3fe-200d-2640-fe0f","1f93d-1f3ff-200d-2640-fe0f"]},{n:["handball"],u:"1f93e",v:["1f93e-1f3fb","1f93e-1f3fc","1f93e-1f3fd","1f93e-1f3fe","1f93e-1f3ff"]},{n:["man playing handball","man-playing-handball"],u:"1f93e-200d-2642-fe0f",v:["1f93e-1f3fb-200d-2642-fe0f","1f93e-1f3fc-200d-2642-fe0f","1f93e-1f3fd-200d-2642-fe0f","1f93e-1f3fe-200d-2642-fe0f","1f93e-1f3ff-200d-2642-fe0f"]},{n:["woman playing handball","woman-playing-handball"],u:"1f93e-200d-2640-fe0f",v:["1f93e-1f3fb-200d-2640-fe0f","1f93e-1f3fc-200d-2640-fe0f","1f93e-1f3fd-200d-2640-fe0f","1f93e-1f3fe-200d-2640-fe0f","1f93e-1f3ff-200d-2640-fe0f"]},{n:["juggling"],u:"1f939",v:["1f939-1f3fb","1f939-1f3fc","1f939-1f3fd","1f939-1f3fe","1f939-1f3ff"]},{n:["man juggling","man-juggling"],u:"1f939-200d-2642-fe0f",v:["1f939-1f3fb-200d-2642-fe0f","1f939-1f3fc-200d-2642-fe0f","1f939-1f3fd-200d-2642-fe0f","1f939-1f3fe-200d-2642-fe0f","1f939-1f3ff-200d-2642-fe0f"]},{n:["woman juggling","woman-juggling"],u:"1f939-200d-2640-fe0f",v:["1f939-1f3fb-200d-2640-fe0f","1f939-1f3fc-200d-2640-fe0f","1f939-1f3fd-200d-2640-fe0f","1f939-1f3fe-200d-2640-fe0f","1f939-1f3ff-200d-2640-fe0f"]},{n:["person in lotus position"],u:"1f9d8",v:["1f9d8-1f3fb","1f9d8-1f3fc","1f9d8-1f3fd","1f9d8-1f3fe","1f9d8-1f3ff"]},{n:["man in lotus position"],u:"1f9d8-200d-2642-fe0f",v:["1f9d8-1f3fb-200d-2642-fe0f","1f9d8-1f3fc-200d-2642-fe0f","1f9d8-1f3fd-200d-2642-fe0f","1f9d8-1f3fe-200d-2642-fe0f","1f9d8-1f3ff-200d-2642-fe0f"]},{n:["woman in lotus position"],u:"1f9d8-200d-2640-fe0f",v:["1f9d8-1f3fb-200d-2640-fe0f","1f9d8-1f3fc-200d-2640-fe0f","1f9d8-1f3fd-200d-2640-fe0f","1f9d8-1f3fe-200d-2640-fe0f","1f9d8-1f3ff-200d-2640-fe0f"]},{n:["bath"],u:"1f6c0",v:["1f6c0-1f3fb","1f6c0-1f3fc","1f6c0-1f3fd","1f6c0-1f3fe","1f6c0-1f3ff"]},{n:["sleeping accommodation"],u:"1f6cc",v:["1f6cc-1f3fb","1f6cc-1f3fc","1f6cc-1f3fd","1f6cc-1f3fe","1f6cc-1f3ff"]},{n:["people holding hands"],u:"1f9d1-200d-1f91d-200d-1f9d1",v:["1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fb","1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fc","1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fd","1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fe","1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3ff","1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fb","1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fc","1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fd","1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fe","1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3ff","1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fb","1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fc","1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fd","1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fe","1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3ff","1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fb","1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fc","1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fd","1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fe","1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3ff","1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fb","1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fc","1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fd","1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fe","1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3ff"]},{n:["women holding hands","two women holding hands"],u:"1f46d",v:["1f46d-1f3fb","1f46d-1f3fc","1f46d-1f3fd","1f46d-1f3fe","1f46d-1f3ff","1f469-1f3fb-200d-1f91d-200d-1f469-1f3fc","1f469-1f3fb-200d-1f91d-200d-1f469-1f3fd","1f469-1f3fb-200d-1f91d-200d-1f469-1f3fe","1f469-1f3fb-200d-1f91d-200d-1f469-1f3ff","1f469-1f3fc-200d-1f91d-200d-1f469-1f3fb","1f469-1f3fc-200d-1f91d-200d-1f469-1f3fd","1f469-1f3fc-200d-1f91d-200d-1f469-1f3fe","1f469-1f3fc-200d-1f91d-200d-1f469-1f3ff","1f469-1f3fd-200d-1f91d-200d-1f469-1f3fb","1f469-1f3fd-200d-1f91d-200d-1f469-1f3fc","1f469-1f3fd-200d-1f91d-200d-1f469-1f3fe","1f469-1f3fd-200d-1f91d-200d-1f469-1f3ff","1f469-1f3fe-200d-1f91d-200d-1f469-1f3fb","1f469-1f3fe-200d-1f91d-200d-1f469-1f3fc","1f469-1f3fe-200d-1f91d-200d-1f469-1f3fd","1f469-1f3fe-200d-1f91d-200d-1f469-1f3ff","1f469-1f3ff-200d-1f91d-200d-1f469-1f3fb","1f469-1f3ff-200d-1f91d-200d-1f469-1f3fc","1f469-1f3ff-200d-1f91d-200d-1f469-1f3fd","1f469-1f3ff-200d-1f91d-200d-1f469-1f3fe"]},{n:["couple","man and woman holding hands","woman and man holding hands"],u:"1f46b",v:["1f46b-1f3fb","1f46b-1f3fc","1f46b-1f3fd","1f46b-1f3fe","1f46b-1f3ff","1f469-1f3fb-200d-1f91d-200d-1f468-1f3fc","1f469-1f3fb-200d-1f91d-200d-1f468-1f3fd","1f469-1f3fb-200d-1f91d-200d-1f468-1f3fe","1f469-1f3fb-200d-1f91d-200d-1f468-1f3ff","1f469-1f3fc-200d-1f91d-200d-1f468-1f3fb","1f469-1f3fc-200d-1f91d-200d-1f468-1f3fd","1f469-1f3fc-200d-1f91d-200d-1f468-1f3fe","1f469-1f3fc-200d-1f91d-200d-1f468-1f3ff","1f469-1f3fd-200d-1f91d-200d-1f468-1f3fb","1f469-1f3fd-200d-1f91d-200d-1f468-1f3fc","1f469-1f3fd-200d-1f91d-200d-1f468-1f3fe","1f469-1f3fd-200d-1f91d-200d-1f468-1f3ff","1f469-1f3fe-200d-1f91d-200d-1f468-1f3fb","1f469-1f3fe-200d-1f91d-200d-1f468-1f3fc","1f469-1f3fe-200d-1f91d-200d-1f468-1f3fd","1f469-1f3fe-200d-1f91d-200d-1f468-1f3ff","1f469-1f3ff-200d-1f91d-200d-1f468-1f3fb","1f469-1f3ff-200d-1f91d-200d-1f468-1f3fc","1f469-1f3ff-200d-1f91d-200d-1f468-1f3fd","1f469-1f3ff-200d-1f91d-200d-1f468-1f3fe"]},{n:["men holding hands","two men holding hands"],u:"1f46c",v:["1f46c-1f3fb","1f46c-1f3fc","1f46c-1f3fd","1f46c-1f3fe","1f46c-1f3ff","1f468-1f3fb-200d-1f91d-200d-1f468-1f3fc","1f468-1f3fb-200d-1f91d-200d-1f468-1f3fd","1f468-1f3fb-200d-1f91d-200d-1f468-1f3fe","1f468-1f3fb-200d-1f91d-200d-1f468-1f3ff","1f468-1f3fc-200d-1f91d-200d-1f468-1f3fb","1f468-1f3fc-200d-1f91d-200d-1f468-1f3fd","1f468-1f3fc-200d-1f91d-200d-1f468-1f3fe","1f468-1f3fc-200d-1f91d-200d-1f468-1f3ff","1f468-1f3fd-200d-1f91d-200d-1f468-1f3fb","1f468-1f3fd-200d-1f91d-200d-1f468-1f3fc","1f468-1f3fd-200d-1f91d-200d-1f468-1f3fe","1f468-1f3fd-200d-1f91d-200d-1f468-1f3ff","1f468-1f3fe-200d-1f91d-200d-1f468-1f3fb","1f468-1f3fe-200d-1f91d-200d-1f468-1f3fc","1f468-1f3fe-200d-1f91d-200d-1f468-1f3fd","1f468-1f3fe-200d-1f91d-200d-1f468-1f3ff","1f468-1f3ff-200d-1f91d-200d-1f468-1f3fb","1f468-1f3ff-200d-1f91d-200d-1f468-1f3fc","1f468-1f3ff-200d-1f91d-200d-1f468-1f3fd","1f468-1f3ff-200d-1f91d-200d-1f468-1f3fe"]},{n:["kiss","couplekiss"],u:"1f48f",v:["1f48f-1f3fb","1f48f-1f3fc","1f48f-1f3fd","1f48f-1f3fe","1f48f-1f3ff","1f9d1-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fc","1f9d1-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fd","1f9d1-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fe","1f9d1-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3ff","1f9d1-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fb","1f9d1-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fd","1f9d1-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fe","1f9d1-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3ff","1f9d1-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fb","1f9d1-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fc","1f9d1-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fe","1f9d1-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3ff","1f9d1-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fb","1f9d1-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fc","1f9d1-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fd","1f9d1-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3ff","1f9d1-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fb","1f9d1-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fc","1f9d1-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fd","1f9d1-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fe"]},{n:["woman-kiss-man","kiss: woman, man"],u:"1f469-200d-2764-fe0f-200d-1f48b-200d-1f468",v:["1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff"]},{n:["man-kiss-man","kiss: man, man"],u:"1f468-200d-2764-fe0f-200d-1f48b-200d-1f468",v:["1f468-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f468-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f468-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f468-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f468-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f468-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f468-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f468-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f468-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f468-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f468-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f468-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f468-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f468-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f468-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f468-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f468-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f468-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f468-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f468-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f468-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f468-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f468-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f468-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f468-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff"]},{n:["woman-kiss-woman","kiss: woman, woman"],u:"1f469-200d-2764-fe0f-200d-1f48b-200d-1f469",v:["1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fb","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fc","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fd","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fe","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3ff","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fb","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fc","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fd","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fe","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3ff","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fb","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fc","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fd","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fe","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3ff","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fb","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fc","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fd","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fe","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3ff","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fb","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fc","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fd","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fe","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3ff"]},{n:["couple with heart"],u:"1f491",v:["1f491-1f3fb","1f491-1f3fc","1f491-1f3fd","1f491-1f3fe","1f491-1f3ff","1f9d1-1f3fb-200d-2764-fe0f-200d-1f9d1-1f3fc","1f9d1-1f3fb-200d-2764-fe0f-200d-1f9d1-1f3fd","1f9d1-1f3fb-200d-2764-fe0f-200d-1f9d1-1f3fe","1f9d1-1f3fb-200d-2764-fe0f-200d-1f9d1-1f3ff","1f9d1-1f3fc-200d-2764-fe0f-200d-1f9d1-1f3fb","1f9d1-1f3fc-200d-2764-fe0f-200d-1f9d1-1f3fd","1f9d1-1f3fc-200d-2764-fe0f-200d-1f9d1-1f3fe","1f9d1-1f3fc-200d-2764-fe0f-200d-1f9d1-1f3ff","1f9d1-1f3fd-200d-2764-fe0f-200d-1f9d1-1f3fb","1f9d1-1f3fd-200d-2764-fe0f-200d-1f9d1-1f3fc","1f9d1-1f3fd-200d-2764-fe0f-200d-1f9d1-1f3fe","1f9d1-1f3fd-200d-2764-fe0f-200d-1f9d1-1f3ff","1f9d1-1f3fe-200d-2764-fe0f-200d-1f9d1-1f3fb","1f9d1-1f3fe-200d-2764-fe0f-200d-1f9d1-1f3fc","1f9d1-1f3fe-200d-2764-fe0f-200d-1f9d1-1f3fd","1f9d1-1f3fe-200d-2764-fe0f-200d-1f9d1-1f3ff","1f9d1-1f3ff-200d-2764-fe0f-200d-1f9d1-1f3fb","1f9d1-1f3ff-200d-2764-fe0f-200d-1f9d1-1f3fc","1f9d1-1f3ff-200d-2764-fe0f-200d-1f9d1-1f3fd","1f9d1-1f3ff-200d-2764-fe0f-200d-1f9d1-1f3fe"]},{n:["woman-heart-man","couple with heart: woman, man"],u:"1f469-200d-2764-fe0f-200d-1f468",v:["1f469-1f3fb-200d-2764-fe0f-200d-1f468-1f3fb","1f469-1f3fb-200d-2764-fe0f-200d-1f468-1f3fc","1f469-1f3fb-200d-2764-fe0f-200d-1f468-1f3fd","1f469-1f3fb-200d-2764-fe0f-200d-1f468-1f3fe","1f469-1f3fb-200d-2764-fe0f-200d-1f468-1f3ff","1f469-1f3fc-200d-2764-fe0f-200d-1f468-1f3fb","1f469-1f3fc-200d-2764-fe0f-200d-1f468-1f3fc","1f469-1f3fc-200d-2764-fe0f-200d-1f468-1f3fd","1f469-1f3fc-200d-2764-fe0f-200d-1f468-1f3fe","1f469-1f3fc-200d-2764-fe0f-200d-1f468-1f3ff","1f469-1f3fd-200d-2764-fe0f-200d-1f468-1f3fb","1f469-1f3fd-200d-2764-fe0f-200d-1f468-1f3fc","1f469-1f3fd-200d-2764-fe0f-200d-1f468-1f3fd","1f469-1f3fd-200d-2764-fe0f-200d-1f468-1f3fe","1f469-1f3fd-200d-2764-fe0f-200d-1f468-1f3ff","1f469-1f3fe-200d-2764-fe0f-200d-1f468-1f3fb","1f469-1f3fe-200d-2764-fe0f-200d-1f468-1f3fc","1f469-1f3fe-200d-2764-fe0f-200d-1f468-1f3fd","1f469-1f3fe-200d-2764-fe0f-200d-1f468-1f3fe","1f469-1f3fe-200d-2764-fe0f-200d-1f468-1f3ff","1f469-1f3ff-200d-2764-fe0f-200d-1f468-1f3fb","1f469-1f3ff-200d-2764-fe0f-200d-1f468-1f3fc","1f469-1f3ff-200d-2764-fe0f-200d-1f468-1f3fd","1f469-1f3ff-200d-2764-fe0f-200d-1f468-1f3fe","1f469-1f3ff-200d-2764-fe0f-200d-1f468-1f3ff"]},{n:["man-heart-man","couple with heart: man, man"],u:"1f468-200d-2764-fe0f-200d-1f468",v:["1f468-1f3fb-200d-2764-fe0f-200d-1f468-1f3fb","1f468-1f3fb-200d-2764-fe0f-200d-1f468-1f3fc","1f468-1f3fb-200d-2764-fe0f-200d-1f468-1f3fd","1f468-1f3fb-200d-2764-fe0f-200d-1f468-1f3fe","1f468-1f3fb-200d-2764-fe0f-200d-1f468-1f3ff","1f468-1f3fc-200d-2764-fe0f-200d-1f468-1f3fb","1f468-1f3fc-200d-2764-fe0f-200d-1f468-1f3fc","1f468-1f3fc-200d-2764-fe0f-200d-1f468-1f3fd","1f468-1f3fc-200d-2764-fe0f-200d-1f468-1f3fe","1f468-1f3fc-200d-2764-fe0f-200d-1f468-1f3ff","1f468-1f3fd-200d-2764-fe0f-200d-1f468-1f3fb","1f468-1f3fd-200d-2764-fe0f-200d-1f468-1f3fc","1f468-1f3fd-200d-2764-fe0f-200d-1f468-1f3fd","1f468-1f3fd-200d-2764-fe0f-200d-1f468-1f3fe","1f468-1f3fd-200d-2764-fe0f-200d-1f468-1f3ff","1f468-1f3fe-200d-2764-fe0f-200d-1f468-1f3fb","1f468-1f3fe-200d-2764-fe0f-200d-1f468-1f3fc","1f468-1f3fe-200d-2764-fe0f-200d-1f468-1f3fd","1f468-1f3fe-200d-2764-fe0f-200d-1f468-1f3fe","1f468-1f3fe-200d-2764-fe0f-200d-1f468-1f3ff","1f468-1f3ff-200d-2764-fe0f-200d-1f468-1f3fb","1f468-1f3ff-200d-2764-fe0f-200d-1f468-1f3fc","1f468-1f3ff-200d-2764-fe0f-200d-1f468-1f3fd","1f468-1f3ff-200d-2764-fe0f-200d-1f468-1f3fe","1f468-1f3ff-200d-2764-fe0f-200d-1f468-1f3ff"]},{n:["woman-heart-woman","couple with heart: woman, woman"],u:"1f469-200d-2764-fe0f-200d-1f469",v:["1f469-1f3fb-200d-2764-fe0f-200d-1f469-1f3fb","1f469-1f3fb-200d-2764-fe0f-200d-1f469-1f3fc","1f469-1f3fb-200d-2764-fe0f-200d-1f469-1f3fd","1f469-1f3fb-200d-2764-fe0f-200d-1f469-1f3fe","1f469-1f3fb-200d-2764-fe0f-200d-1f469-1f3ff","1f469-1f3fc-200d-2764-fe0f-200d-1f469-1f3fb","1f469-1f3fc-200d-2764-fe0f-200d-1f469-1f3fc","1f469-1f3fc-200d-2764-fe0f-200d-1f469-1f3fd","1f469-1f3fc-200d-2764-fe0f-200d-1f469-1f3fe","1f469-1f3fc-200d-2764-fe0f-200d-1f469-1f3ff","1f469-1f3fd-200d-2764-fe0f-200d-1f469-1f3fb","1f469-1f3fd-200d-2764-fe0f-200d-1f469-1f3fc","1f469-1f3fd-200d-2764-fe0f-200d-1f469-1f3fd","1f469-1f3fd-200d-2764-fe0f-200d-1f469-1f3fe","1f469-1f3fd-200d-2764-fe0f-200d-1f469-1f3ff","1f469-1f3fe-200d-2764-fe0f-200d-1f469-1f3fb","1f469-1f3fe-200d-2764-fe0f-200d-1f469-1f3fc","1f469-1f3fe-200d-2764-fe0f-200d-1f469-1f3fd","1f469-1f3fe-200d-2764-fe0f-200d-1f469-1f3fe","1f469-1f3fe-200d-2764-fe0f-200d-1f469-1f3ff","1f469-1f3ff-200d-2764-fe0f-200d-1f469-1f3fb","1f469-1f3ff-200d-2764-fe0f-200d-1f469-1f3fc","1f469-1f3ff-200d-2764-fe0f-200d-1f469-1f3fd","1f469-1f3ff-200d-2764-fe0f-200d-1f469-1f3fe","1f469-1f3ff-200d-2764-fe0f-200d-1f469-1f3ff"]},{n:["family"],u:"1f46a"},{n:["man-woman-boy","family: man, woman, boy"],u:"1f468-200d-1f469-200d-1f466"},{n:["man-woman-girl","family: man, woman, girl"],u:"1f468-200d-1f469-200d-1f467"},{n:["man-woman-girl-boy","family: man, woman, girl, boy"],u:"1f468-200d-1f469-200d-1f467-200d-1f466"},{n:["man-woman-boy-boy","family: man, woman, boy, boy"],u:"1f468-200d-1f469-200d-1f466-200d-1f466"},{n:["man-woman-girl-girl","family: man, woman, girl, girl"],u:"1f468-200d-1f469-200d-1f467-200d-1f467"},{n:["man-man-boy","family: man, man, boy"],u:"1f468-200d-1f468-200d-1f466"},{n:["man-man-girl","family: man, man, girl"],u:"1f468-200d-1f468-200d-1f467"},{n:["man-man-girl-boy","family: man, man, girl, boy"],u:"1f468-200d-1f468-200d-1f467-200d-1f466"},{n:["man-man-boy-boy","family: man, man, boy, boy"],u:"1f468-200d-1f468-200d-1f466-200d-1f466"},{n:["man-man-girl-girl","family: man, man, girl, girl"],u:"1f468-200d-1f468-200d-1f467-200d-1f467"},{n:["woman-woman-boy","family: woman, woman, boy"],u:"1f469-200d-1f469-200d-1f466"},{n:["woman-woman-girl","family: woman, woman, girl"],u:"1f469-200d-1f469-200d-1f467"},{n:["woman-woman-girl-boy","family: woman, woman, girl, boy"],u:"1f469-200d-1f469-200d-1f467-200d-1f466"},{n:["woman-woman-boy-boy","family: woman, woman, boy, boy"],u:"1f469-200d-1f469-200d-1f466-200d-1f466"},{n:["woman-woman-girl-girl","family: woman, woman, girl, girl"],u:"1f469-200d-1f469-200d-1f467-200d-1f467"},{n:["man-boy","family: man, boy"],u:"1f468-200d-1f466"},{n:["man-boy-boy","family: man, boy, boy"],u:"1f468-200d-1f466-200d-1f466"},{n:["man-girl","family: man, girl"],u:"1f468-200d-1f467"},{n:["man-girl-boy","family: man, girl, boy"],u:"1f468-200d-1f467-200d-1f466"},{n:["man-girl-girl","family: man, girl, girl"],u:"1f468-200d-1f467-200d-1f467"},{n:["woman-boy","family: woman, boy"],u:"1f469-200d-1f466"},{n:["woman-boy-boy","family: woman, boy, boy"],u:"1f469-200d-1f466-200d-1f466"},{n:["woman-girl","family: woman, girl"],u:"1f469-200d-1f467"},{n:["woman-girl-boy","family: woman, girl, boy"],u:"1f469-200d-1f467-200d-1f466"},{n:["woman-girl-girl","family: woman, girl, girl"],u:"1f469-200d-1f467-200d-1f467"},{n:["speaking head","speaking head in silhouette"],u:"1f5e3-fe0f"},{n:["bust in silhouette"],u:"1f464"},{n:["busts in silhouette"],u:"1f465"},{n:["people hugging"],u:"1fac2"},{n:["footprints"],u:"1f463"}],animals_nature:[{n:["monkey face"],u:"1f435"},{n:["monkey"],u:"1f412"},{n:["gorilla"],u:"1f98d"},{n:["orangutan"],u:"1f9a7"},{n:["dog","dog face"],u:"1f436"},{n:["dog","dog2"],u:"1f415"},{n:["guide dog"],u:"1f9ae"},{n:["service dog"],u:"1f415-200d-1f9ba"},{n:["poodle"],u:"1f429"},{n:["wolf","wolf face"],u:"1f43a"},{n:["fox face"],u:"1f98a"},{n:["raccoon"],u:"1f99d"},{n:["cat","cat face"],u:"1f431"},{n:["cat","cat2"],u:"1f408"},{n:["black cat"],u:"1f408-200d-2b1b"},{n:["lion face"],u:"1f981"},{n:["tiger","tiger face"],u:"1f42f"},{n:["tiger","tiger2"],u:"1f405"},{n:["leopard"],u:"1f406"},{n:["horse","horse face"],u:"1f434"},{n:["horse","racehorse"],u:"1f40e"},{n:["unicorn face"],u:"1f984"},{n:["zebra face"],u:"1f993"},{n:["deer"],u:"1f98c"},{n:["bison"],u:"1f9ac"},{n:["cow","cow face"],u:"1f42e"},{n:["ox"],u:"1f402"},{n:["water buffalo"],u:"1f403"},{n:["cow","cow2"],u:"1f404"},{n:["pig","pig face"],u:"1f437"},{n:["pig","pig2"],u:"1f416"},{n:["boar"],u:"1f417"},{n:["pig nose"],u:"1f43d"},{n:["ram"],u:"1f40f"},{n:["sheep"],u:"1f411"},{n:["goat"],u:"1f410"},{n:["dromedary camel"],u:"1f42a"},{n:["camel","bactrian camel"],u:"1f42b"},{n:["llama"],u:"1f999"},{n:["giraffe face"],u:"1f992"},{n:["elephant"],u:"1f418"},{n:["mammoth"],u:"1f9a3"},{n:["rhinoceros"],u:"1f98f"},{n:["hippopotamus"],u:"1f99b"},{n:["mouse","mouse face"],u:"1f42d"},{n:["mouse","mouse2"],u:"1f401"},{n:["rat"],u:"1f400"},{n:["hamster","hamster face"],u:"1f439"},{n:["rabbit","rabbit face"],u:"1f430"},{n:["rabbit","rabbit2"],u:"1f407"},{n:["chipmunk"],u:"1f43f-fe0f"},{n:["beaver"],u:"1f9ab"},{n:["hedgehog"],u:"1f994"},{n:["bat"],u:"1f987"},{n:["bear","bear face"],u:"1f43b"},{n:["polar bear"],u:"1f43b-200d-2744-fe0f"},{n:["koala"],u:"1f428"},{n:["panda face"],u:"1f43c"},{n:["sloth"],u:"1f9a5"},{n:["otter"],u:"1f9a6"},{n:["skunk"],u:"1f9a8"},{n:["kangaroo"],u:"1f998"},{n:["badger"],u:"1f9a1"},{n:["feet","paw prints"],u:"1f43e"},{n:["turkey"],u:"1f983"},{n:["chicken"],u:"1f414"},{n:["rooster"],u:"1f413"},{n:["hatching chick"],u:"1f423"},{n:["baby chick"],u:"1f424"},{n:["hatched chick","front-facing baby chick"],u:"1f425"},{n:["bird"],u:"1f426"},{n:["penguin"],u:"1f427"},{n:["dove","dove of peace"],u:"1f54a-fe0f"},{n:["eagle"],u:"1f985"},{n:["duck"],u:"1f986"},{n:["swan"],u:"1f9a2"},{n:["owl"],u:"1f989"},{n:["dodo"],u:"1f9a4"},{n:["feather"],u:"1fab6"},{n:["flamingo"],u:"1f9a9"},{n:["peacock"],u:"1f99a"},{n:["parrot"],u:"1f99c"},{n:["frog","frog face"],u:"1f438"},{n:["crocodile"],u:"1f40a"},{n:["turtle"],u:"1f422"},{n:["lizard"],u:"1f98e"},{n:["snake"],u:"1f40d"},{n:["dragon face"],u:"1f432"},{n:["dragon"],u:"1f409"},{n:["sauropod"],u:"1f995"},{n:["t-rex"],u:"1f996"},{n:["whale","spouting whale"],u:"1f433"},{n:["whale","whale2"],u:"1f40b"},{n:["dolphin","flipper"],u:"1f42c"},{n:["seal"],u:"1f9ad"},{n:["fish"],u:"1f41f"},{n:["tropical fish"],u:"1f420"},{n:["blowfish"],u:"1f421"},{n:["shark"],u:"1f988"},{n:["octopus"],u:"1f419"},{n:["shell","spiral shell"],u:"1f41a"},{n:["coral"],u:"1fab8"},{n:["snail"],u:"1f40c"},{n:["butterfly"],u:"1f98b"},{n:["bug"],u:"1f41b"},{n:["ant"],u:"1f41c"},{n:["bee","honeybee"],u:"1f41d"},{n:["beetle"],u:"1fab2"},{n:["ladybug","lady beetle"],u:"1f41e"},{n:["cricket"],u:"1f997"},{n:["cockroach"],u:"1fab3"},{n:["spider"],u:"1f577-fe0f"},{n:["spider web"],u:"1f578-fe0f"},{n:["scorpion"],u:"1f982"},{n:["mosquito"],u:"1f99f"},{n:["fly"],u:"1fab0"},{n:["worm"],u:"1fab1"},{n:["microbe"],u:"1f9a0"},{n:["bouquet"],u:"1f490"},{n:["cherry blossom"],u:"1f338"},{n:["white flower"],u:"1f4ae"},{n:["lotus"],u:"1fab7"},{n:["rosette"],u:"1f3f5-fe0f"},{n:["rose"],u:"1f339"},{n:["wilted flower"],u:"1f940"},{n:["hibiscus"],u:"1f33a"},{n:["sunflower"],u:"1f33b"},{n:["blossom"],u:"1f33c"},{n:["tulip"],u:"1f337"},{n:["seedling"],u:"1f331"},{n:["potted plant"],u:"1fab4"},{n:["evergreen tree"],u:"1f332"},{n:["deciduous tree"],u:"1f333"},{n:["palm tree"],u:"1f334"},{n:["cactus"],u:"1f335"},{n:["ear of rice"],u:"1f33e"},{n:["herb"],u:"1f33f"},{n:["shamrock"],u:"2618-fe0f"},{n:["four leaf clover"],u:"1f340"},{n:["maple leaf"],u:"1f341"},{n:["fallen leaf"],u:"1f342"},{n:["leaves","leaf fluttering in wind"],u:"1f343"},{n:["empty nest"],u:"1fab9"},{n:["nest with eggs"],u:"1faba"}],food_drink:[{n:["grapes"],u:"1f347"},{n:["melon"],u:"1f348"},{n:["watermelon"],u:"1f349"},{n:["tangerine"],u:"1f34a"},{n:["lemon"],u:"1f34b"},{n:["banana"],u:"1f34c"},{n:["pineapple"],u:"1f34d"},{n:["mango"],u:"1f96d"},{n:["apple","red apple"],u:"1f34e"},{n:["green apple"],u:"1f34f"},{n:["pear"],u:"1f350"},{n:["peach"],u:"1f351"},{n:["cherries"],u:"1f352"},{n:["strawberry"],u:"1f353"},{n:["blueberries"],u:"1fad0"},{n:["kiwifruit"],u:"1f95d"},{n:["tomato"],u:"1f345"},{n:["olive"],u:"1fad2"},{n:["coconut"],u:"1f965"},{n:["avocado"],u:"1f951"},{n:["eggplant","aubergine"],u:"1f346"},{n:["potato"],u:"1f954"},{n:["carrot"],u:"1f955"},{n:["corn","ear of maize"],u:"1f33d"},{n:["hot pepper"],u:"1f336-fe0f"},{n:["bell pepper"],u:"1fad1"},{n:["cucumber"],u:"1f952"},{n:["leafy green"],u:"1f96c"},{n:["broccoli"],u:"1f966"},{n:["garlic"],u:"1f9c4"},{n:["onion"],u:"1f9c5"},{n:["mushroom"],u:"1f344"},{n:["peanuts"],u:"1f95c"},{n:["beans"],u:"1fad8"},{n:["chestnut"],u:"1f330"},{n:["bread"],u:"1f35e"},{n:["croissant"],u:"1f950"},{n:["baguette bread"],u:"1f956"},{n:["flatbread"],u:"1fad3"},{n:["pretzel"],u:"1f968"},{n:["bagel"],u:"1f96f"},{n:["pancakes"],u:"1f95e"},{n:["waffle"],u:"1f9c7"},{n:["cheese wedge"],u:"1f9c0"},{n:["meat on bone"],u:"1f356"},{n:["poultry leg"],u:"1f357"},{n:["cut of meat"],u:"1f969"},{n:["bacon"],u:"1f953"},{n:["hamburger"],u:"1f354"},{n:["fries","french fries"],u:"1f35f"},{n:["pizza","slice of pizza"],u:"1f355"},{n:["hotdog","hot dog"],u:"1f32d"},{n:["sandwich"],u:"1f96a"},{n:["taco"],u:"1f32e"},{n:["burrito"],u:"1f32f"},{n:["tamale"],u:"1fad4"},{n:["stuffed flatbread"],u:"1f959"},{n:["falafel"],u:"1f9c6"},{n:["egg"],u:"1f95a"},{n:["cooking","fried egg"],u:"1f373"},{n:["shallow pan of food"],u:"1f958"},{n:["stew","pot of food"],u:"1f372"},{n:["fondue"],u:"1fad5"},{n:["bowl with spoon"],u:"1f963"},{n:["green salad"],u:"1f957"},{n:["popcorn"],u:"1f37f"},{n:["butter"],u:"1f9c8"},{n:["salt","salt shaker"],u:"1f9c2"},{n:["canned food"],u:"1f96b"},{n:["bento","bento box"],u:"1f371"},{n:["rice cracker"],u:"1f358"},{n:["rice ball"],u:"1f359"},{n:["rice","cooked rice"],u:"1f35a"},{n:["curry","curry and rice"],u:"1f35b"},{n:["ramen","steaming bowl"],u:"1f35c"},{n:["spaghetti"],u:"1f35d"},{n:["sweet potato","roasted sweet potato"],u:"1f360"},{n:["oden"],u:"1f362"},{n:["sushi"],u:"1f363"},{n:["fried shrimp"],u:"1f364"},{n:["fish cake","fish cake with swirl design"],u:"1f365"},{n:["moon cake"],u:"1f96e"},{n:["dango"],u:"1f361"},{n:["dumpling"],u:"1f95f"},{n:["fortune cookie"],u:"1f960"},{n:["takeout box"],u:"1f961"},{n:["crab"],u:"1f980"},{n:["lobster"],u:"1f99e"},{n:["shrimp"],u:"1f990"},{n:["squid"],u:"1f991"},{n:["oyster"],u:"1f9aa"},{n:["icecream","soft ice cream"],u:"1f366"},{n:["shaved ice"],u:"1f367"},{n:["ice cream"],u:"1f368"},{n:["doughnut"],u:"1f369"},{n:["cookie"],u:"1f36a"},{n:["birthday","birthday cake"],u:"1f382"},{n:["cake","shortcake"],u:"1f370"},{n:["cupcake"],u:"1f9c1"},{n:["pie"],u:"1f967"},{n:["chocolate bar"],u:"1f36b"},{n:["candy"],u:"1f36c"},{n:["lollipop"],u:"1f36d"},{n:["custard"],u:"1f36e"},{n:["honey pot"],u:"1f36f"},{n:["baby bottle"],u:"1f37c"},{n:["glass of milk"],u:"1f95b"},{n:["coffee","hot beverage"],u:"2615"},{n:["teapot"],u:"1fad6"},{n:["tea","teacup without handle"],u:"1f375"},{n:["sake","sake bottle and cup"],u:"1f376"},{n:["champagne","bottle with popping cork"],u:"1f37e"},{n:["wine glass"],u:"1f377"},{n:["cocktail","cocktail glass"],u:"1f378"},{n:["tropical drink"],u:"1f379"},{n:["beer","beer mug"],u:"1f37a"},{n:["beers","clinking beer mugs"],u:"1f37b"},{n:["clinking glasses"],u:"1f942"},{n:["tumbler glass"],u:"1f943"},{n:["pouring liquid"],u:"1fad7"},{n:["cup with straw"],u:"1f964"},{n:["bubble tea"],u:"1f9cb"},{n:["beverage box"],u:"1f9c3"},{n:["mate drink"],u:"1f9c9"},{n:["ice cube"],u:"1f9ca"},{n:["chopsticks"],u:"1f962"},{n:["knife fork plate","fork and knife with plate"],u:"1f37d-fe0f"},{n:["fork and knife"],u:"1f374"},{n:["spoon"],u:"1f944"},{n:["hocho","knife"],u:"1f52a"},{n:["jar"],u:"1fad9"},{n:["amphora"],u:"1f3fa"}],travel_places:[{n:["earth africa","earth globe europe-africa"],u:"1f30d"},{n:["earth americas","earth globe americas"],u:"1f30e"},{n:["earth asia","earth globe asia-australia"],u:"1f30f"},{n:["globe with meridians"],u:"1f310"},{n:["world map"],u:"1f5fa-fe0f"},{n:["japan","silhouette of japan"],u:"1f5fe"},{n:["compass"],u:"1f9ed"},{n:["snow-capped mountain","snow capped mountain"],u:"1f3d4-fe0f"},{n:["mountain"],u:"26f0-fe0f"},{n:["volcano"],u:"1f30b"},{n:["mount fuji"],u:"1f5fb"},{n:["camping"],u:"1f3d5-fe0f"},{n:["beach with umbrella"],u:"1f3d6-fe0f"},{n:["desert"],u:"1f3dc-fe0f"},{n:["desert island"],u:"1f3dd-fe0f"},{n:["national park"],u:"1f3de-fe0f"},{n:["stadium"],u:"1f3df-fe0f"},{n:["classical building"],u:"1f3db-fe0f"},{n:["building construction"],u:"1f3d7-fe0f"},{n:["brick","bricks"],u:"1f9f1"},{n:["rock"],u:"1faa8"},{n:["wood"],u:"1fab5"},{n:["hut"],u:"1f6d6"},{n:["houses","house buildings"],u:"1f3d8-fe0f"},{n:["derelict house","derelict house building"],u:"1f3da-fe0f"},{n:["house","house building"],u:"1f3e0"},{n:["house with garden"],u:"1f3e1"},{n:["office","office building"],u:"1f3e2"},{n:["post office","japanese post office"],u:"1f3e3"},{n:["european post office"],u:"1f3e4"},{n:["hospital"],u:"1f3e5"},{n:["bank"],u:"1f3e6"},{n:["hotel"],u:"1f3e8"},{n:["love hotel"],u:"1f3e9"},{n:["convenience store"],u:"1f3ea"},{n:["school"],u:"1f3eb"},{n:["department store"],u:"1f3ec"},{n:["factory"],u:"1f3ed"},{n:["japanese castle"],u:"1f3ef"},{n:["european castle"],u:"1f3f0"},{n:["wedding"],u:"1f492"},{n:["tokyo tower"],u:"1f5fc"},{n:["statue of liberty"],u:"1f5fd"},{n:["church"],u:"26ea"},{n:["mosque"],u:"1f54c"},{n:["hindu temple"],u:"1f6d5"},{n:["synagogue"],u:"1f54d"},{n:["shinto shrine"],u:"26e9-fe0f"},{n:["kaaba"],u:"1f54b"},{n:["fountain"],u:"26f2"},{n:["tent"],u:"26fa"},{n:["foggy"],u:"1f301"},{n:["night with stars"],u:"1f303"},{n:["cityscape"],u:"1f3d9-fe0f"},{n:["sunrise over mountains"],u:"1f304"},{n:["sunrise"],u:"1f305"},{n:["city sunset","cityscape at dusk"],u:"1f306"},{n:["city sunrise","sunset over buildings"],u:"1f307"},{n:["bridge at night"],u:"1f309"},{n:["hotsprings","hot springs"],u:"2668-fe0f"},{n:["carousel horse"],u:"1f3a0"},{n:["playground slide"],u:"1f6dd"},{n:["ferris wheel"],u:"1f3a1"},{n:["roller coaster"],u:"1f3a2"},{n:["barber","barber pole"],u:"1f488"},{n:["circus tent"],u:"1f3aa"},{n:["steam locomotive"],u:"1f682"},{n:["railway car"],u:"1f683"},{n:["high-speed train","bullettrain side"],u:"1f684"},{n:["bullettrain front","high-speed train with bullet nose"],u:"1f685"},{n:["train","train2"],u:"1f686"},{n:["metro"],u:"1f687"},{n:["light rail"],u:"1f688"},{n:["station"],u:"1f689"},{n:["tram"],u:"1f68a"},{n:["monorail"],u:"1f69d"},{n:["mountain railway"],u:"1f69e"},{n:["train","tram car"],u:"1f68b"},{n:["bus"],u:"1f68c"},{n:["oncoming bus"],u:"1f68d"},{n:["trolleybus"],u:"1f68e"},{n:["minibus"],u:"1f690"},{n:["ambulance"],u:"1f691"},{n:["fire engine"],u:"1f692"},{n:["police car"],u:"1f693"},{n:["oncoming police car"],u:"1f694"},{n:["taxi"],u:"1f695"},{n:["oncoming taxi"],u:"1f696"},{n:["car","red car","automobile"],u:"1f697"},{n:["oncoming automobile"],u:"1f698"},{n:["blue car","recreational vehicle"],u:"1f699"},{n:["pickup truck"],u:"1f6fb"},{n:["truck","delivery truck"],u:"1f69a"},{n:["articulated lorry"],u:"1f69b"},{n:["tractor"],u:"1f69c"},{n:["racing car"],u:"1f3ce-fe0f"},{n:["motorcycle","racing motorcycle"],u:"1f3cd-fe0f"},{n:["motor scooter"],u:"1f6f5"},{n:["manual wheelchair"],u:"1f9bd"},{n:["motorized wheelchair"],u:"1f9bc"},{n:["auto rickshaw"],u:"1f6fa"},{n:["bike","bicycle"],u:"1f6b2"},{n:["scooter"],u:"1f6f4"},{n:["skateboard"],u:"1f6f9"},{n:["roller skate"],u:"1f6fc"},{n:["busstop","bus stop"],u:"1f68f"},{n:["motorway"],u:"1f6e3-fe0f"},{n:["railway track"],u:"1f6e4-fe0f"},{n:["oil drum"],u:"1f6e2-fe0f"},{n:["fuelpump","fuel pump"],u:"26fd"},{n:["wheel"],u:"1f6de"},{n:["rotating light","police cars revolving light"],u:"1f6a8"},{n:["traffic light","horizontal traffic light"],u:"1f6a5"},{n:["vertical traffic light"],u:"1f6a6"},{n:["octagonal sign"],u:"1f6d1"},{n:["construction","construction sign"],u:"1f6a7"},{n:["anchor"],u:"2693"},{n:["ring buoy"],u:"1f6df"},{n:["boat","sailboat"],u:"26f5"},{n:["canoe"],u:"1f6f6"},{n:["speedboat"],u:"1f6a4"},{n:["passenger ship"],u:"1f6f3-fe0f"},{n:["ferry"],u:"26f4-fe0f"},{n:["motor boat"],u:"1f6e5-fe0f"},{n:["ship"],u:"1f6a2"},{n:["airplane"],u:"2708-fe0f"},{n:["small airplane"],u:"1f6e9-fe0f"},{n:["airplane departure"],u:"1f6eb"},{n:["airplane arriving"],u:"1f6ec"},{n:["parachute"],u:"1fa82"},{n:["seat"],u:"1f4ba"},{n:["helicopter"],u:"1f681"},{n:["suspension railway"],u:"1f69f"},{n:["mountain cableway"],u:"1f6a0"},{n:["aerial tramway"],u:"1f6a1"},{n:["satellite"],u:"1f6f0-fe0f"},{n:["rocket"],u:"1f680"},{n:["flying saucer"],u:"1f6f8"},{n:["bellhop bell"],u:"1f6ce-fe0f"},{n:["luggage"],u:"1f9f3"},{n:["hourglass"],u:"231b"},{n:["hourglass flowing sand","hourglass with flowing sand"],u:"23f3"},{n:["watch"],u:"231a"},{n:["alarm clock"],u:"23f0"},{n:["stopwatch"],u:"23f1-fe0f"},{n:["timer clock"],u:"23f2-fe0f"},{n:["mantelpiece clock"],u:"1f570-fe0f"},{n:["clock12","clock face twelve oclock"],u:"1f55b"},{n:["clock1230","clock face twelve-thirty"],u:"1f567"},{n:["clock1","clock face one oclock"],u:"1f550"},{n:["clock130","clock face one-thirty"],u:"1f55c"},{n:["clock2","clock face two oclock"],u:"1f551"},{n:["clock230","clock face two-thirty"],u:"1f55d"},{n:["clock3","clock face three oclock"],u:"1f552"},{n:["clock330","clock face three-thirty"],u:"1f55e"},{n:["clock4","clock face four oclock"],u:"1f553"},{n:["clock430","clock face four-thirty"],u:"1f55f"},{n:["clock5","clock face five oclock"],u:"1f554"},{n:["clock530","clock face five-thirty"],u:"1f560"},{n:["clock6","clock face six oclock"],u:"1f555"},{n:["clock630","clock face six-thirty"],u:"1f561"},{n:["clock7","clock face seven oclock"],u:"1f556"},{n:["clock730","clock face seven-thirty"],u:"1f562"},{n:["clock8","clock face eight oclock"],u:"1f557"},{n:["clock830","clock face eight-thirty"],u:"1f563"},{n:["clock9","clock face nine oclock"],u:"1f558"},{n:["clock930","clock face nine-thirty"],u:"1f564"},{n:["clock10","clock face ten oclock"],u:"1f559"},{n:["clock1030","clock face ten-thirty"],u:"1f565"},{n:["clock11","clock face eleven oclock"],u:"1f55a"},{n:["clock1130","clock face eleven-thirty"],u:"1f566"},{n:["new moon","new moon symbol"],u:"1f311"},{n:["waxing crescent moon","waxing crescent moon symbol"],u:"1f312"},{n:["first quarter moon","first quarter moon symbol"],u:"1f313"},{n:["moon","waxing gibbous moon","waxing gibbous moon symbol"],u:"1f314"},{n:["full moon","full moon symbol"],u:"1f315"},{n:["waning gibbous moon","waning gibbous moon symbol"],u:"1f316"},{n:["last quarter moon","last quarter moon symbol"],u:"1f317"},{n:["waning crescent moon","waning crescent moon symbol"],u:"1f318"},{n:["crescent moon"],u:"1f319"},{n:["new moon with face"],u:"1f31a"},{n:["first quarter moon with face"],u:"1f31b"},{n:["last quarter moon with face"],u:"1f31c"},{n:["thermometer"],u:"1f321-fe0f"},{n:["sunny","black sun with rays"],u:"2600-fe0f"},{n:["full moon with face"],u:"1f31d"},{n:["sun with face"],u:"1f31e"},{n:["ringed planet"],u:"1fa90"},{n:["star","white medium star"],u:"2b50"},{n:["star2","glowing star"],u:"1f31f"},{n:["stars","shooting star"],u:"1f320"},{n:["milky way"],u:"1f30c"},{n:["cloud"],u:"2601-fe0f"},{n:["partly sunny","sun behind cloud"],u:"26c5"},{n:["thunder cloud and rain","cloud with lightning and rain"],u:"26c8-fe0f"},{n:["mostly sunny","sun small cloud","sun behind small cloud"],u:"1f324-fe0f"},{n:["barely sunny","sun behind cloud","sun behind large cloud"],u:"1f325-fe0f"},{n:["partly sunny rain","sun behind rain cloud"],u:"1f326-fe0f"},{n:["rain cloud","cloud with rain"],u:"1f327-fe0f"},{n:["snow cloud","cloud with snow"],u:"1f328-fe0f"},{n:["lightning","lightning cloud","cloud with lightning"],u:"1f329-fe0f"},{n:["tornado","tornado cloud"],u:"1f32a-fe0f"},{n:["fog"],u:"1f32b-fe0f"},{n:["wind face","wind blowing face"],u:"1f32c-fe0f"},{n:["cyclone"],u:"1f300"},{n:["rainbow"],u:"1f308"},{n:["closed umbrella"],u:"1f302"},{n:["umbrella"],u:"2602-fe0f"},{n:["umbrella with rain drops"],u:"2614"},{n:["umbrella on ground"],u:"26f1-fe0f"},{n:["zap","high voltage sign"],u:"26a1"},{n:["snowflake"],u:"2744-fe0f"},{n:["snowman"],u:"2603-fe0f"},{n:["snowman without snow"],u:"26c4"},{n:["comet"],u:"2604-fe0f"},{n:["fire"],u:"1f525"},{n:["droplet"],u:"1f4a7"},{n:["ocean","water wave"],u:"1f30a"}],activities:[{n:["jack-o-lantern","jack o lantern"],u:"1f383"},{n:["christmas tree"],u:"1f384"},{n:["fireworks"],u:"1f386"},{n:["sparkler","firework sparkler"],u:"1f387"},{n:["firecracker"],u:"1f9e8"},{n:["sparkles"],u:"2728"},{n:["balloon"],u:"1f388"},{n:["tada","party popper"],u:"1f389"},{n:["confetti ball"],u:"1f38a"},{n:["tanabata tree"],u:"1f38b"},{n:["bamboo","pine decoration"],u:"1f38d"},{n:["dolls","japanese dolls"],u:"1f38e"},{n:["flags","carp streamer"],u:"1f38f"},{n:["wind chime"],u:"1f390"},{n:["rice scene","moon viewing ceremony"],u:"1f391"},{n:["red envelope","red gift envelope"],u:"1f9e7"},{n:["ribbon"],u:"1f380"},{n:["gift","wrapped present"],u:"1f381"},{n:["reminder ribbon"],u:"1f397-fe0f"},{n:["admission tickets"],u:"1f39f-fe0f"},{n:["ticket"],u:"1f3ab"},{n:["medal","military medal"],u:"1f396-fe0f"},{n:["trophy"],u:"1f3c6"},{n:["sports medal"],u:"1f3c5"},{n:["first place medal"],u:"1f947"},{n:["second place medal"],u:"1f948"},{n:["third place medal"],u:"1f949"},{n:["soccer","soccer ball"],u:"26bd"},{n:["baseball"],u:"26be"},{n:["softball"],u:"1f94e"},{n:["basketball","basketball and hoop"],u:"1f3c0"},{n:["volleyball"],u:"1f3d0"},{n:["football","american football"],u:"1f3c8"},{n:["rugby football"],u:"1f3c9"},{n:["tennis","tennis racquet and ball"],u:"1f3be"},{n:["flying disc"],u:"1f94f"},{n:["bowling"],u:"1f3b3"},{n:["cricket bat and ball"],u:"1f3cf"},{n:["field hockey stick and ball"],u:"1f3d1"},{n:["ice hockey stick and puck"],u:"1f3d2"},{n:["lacrosse","lacrosse stick and ball"],u:"1f94d"},{n:["table tennis paddle and ball"],u:"1f3d3"},{n:["badminton racquet and shuttlecock"],u:"1f3f8"},{n:["boxing glove"],u:"1f94a"},{n:["martial arts uniform"],u:"1f94b"},{n:["goal net"],u:"1f945"},{n:["golf","flag in hole"],u:"26f3"},{n:["ice skate"],u:"26f8-fe0f"},{n:["fishing pole and fish"],u:"1f3a3"},{n:["diving mask"],u:"1f93f"},{n:["running shirt with sash"],u:"1f3bd"},{n:["ski","ski and ski boot"],u:"1f3bf"},{n:["sled"],u:"1f6f7"},{n:["curling stone"],u:"1f94c"},{n:["dart","direct hit"],u:"1f3af"},{n:["yo-yo"],u:"1fa80"},{n:["kite"],u:"1fa81"},{n:["8ball","billiards"],u:"1f3b1"},{n:["crystal ball"],u:"1f52e"},{n:["magic wand"],u:"1fa84"},{n:["nazar amulet"],u:"1f9ff"},{n:["hamsa"],u:"1faac"},{n:["video game"],u:"1f3ae"},{n:["joystick"],u:"1f579-fe0f"},{n:["slot machine"],u:"1f3b0"},{n:["game die"],u:"1f3b2"},{n:["jigsaw","jigsaw puzzle piece"],u:"1f9e9"},{n:["teddy bear"],u:"1f9f8"},{n:["pinata"],u:"1fa85"},{n:["mirror ball"],u:"1faa9"},{n:["nesting dolls"],u:"1fa86"},{n:["spades","black spade suit"],u:"2660-fe0f"},{n:["hearts","black heart suit"],u:"2665-fe0f"},{n:["diamonds","black diamond suit"],u:"2666-fe0f"},{n:["clubs","black club suit"],u:"2663-fe0f"},{n:["chess pawn"],u:"265f-fe0f"},{n:["black joker","playing card black joker"],u:"1f0cf"},{n:["mahjong","mahjong tile red dragon"],u:"1f004"},{n:["flower playing cards"],u:"1f3b4"},{n:["performing arts"],u:"1f3ad"},{n:["framed picture","frame with picture"],u:"1f5bc-fe0f"},{n:["art","artist palette"],u:"1f3a8"},{n:["thread","spool of thread"],u:"1f9f5"},{n:["sewing needle"],u:"1faa1"},{n:["yarn","ball of yarn"],u:"1f9f6"},{n:["knot"],u:"1faa2"}],objects:[{n:["eyeglasses"],u:"1f453"},{n:["sunglasses","dark sunglasses"],u:"1f576-fe0f"},{n:["goggles"],u:"1f97d"},{n:["lab coat"],u:"1f97c"},{n:["safety vest"],u:"1f9ba"},{n:["necktie"],u:"1f454"},{n:["shirt","tshirt","t-shirt"],u:"1f455"},{n:["jeans"],u:"1f456"},{n:["scarf"],u:"1f9e3"},{n:["gloves"],u:"1f9e4"},{n:["coat"],u:"1f9e5"},{n:["socks"],u:"1f9e6"},{n:["dress"],u:"1f457"},{n:["kimono"],u:"1f458"},{n:["sari"],u:"1f97b"},{n:["one-piece swimsuit"],u:"1fa71"},{n:["briefs"],u:"1fa72"},{n:["shorts"],u:"1fa73"},{n:["bikini"],u:"1f459"},{n:["womans clothes"],u:"1f45a"},{n:["purse"],u:"1f45b"},{n:["handbag"],u:"1f45c"},{n:["pouch"],u:"1f45d"},{n:["shopping bags"],u:"1f6cd-fe0f"},{n:["school satchel"],u:"1f392"},{n:["thong sandal"],u:"1fa74"},{n:["shoe","mans shoe"],u:"1f45e"},{n:["athletic shoe"],u:"1f45f"},{n:["hiking boot"],u:"1f97e"},{n:["flat shoe","womans flat shoe"],u:"1f97f"},{n:["high heel","high-heeled shoe"],u:"1f460"},{n:["sandal","womans sandal"],u:"1f461"},{n:["ballet shoes"],u:"1fa70"},{n:["boot","womans boots"],u:"1f462"},{n:["crown"],u:"1f451"},{n:["womans hat"],u:"1f452"},{n:["tophat","top hat"],u:"1f3a9"},{n:["mortar board","graduation cap"],u:"1f393"},{n:["billed cap"],u:"1f9e2"},{n:["military helmet"],u:"1fa96"},{n:["rescue worker\u2019s helmet","helmet with white cross"],u:"26d1-fe0f"},{n:["prayer beads"],u:"1f4ff"},{n:["lipstick"],u:"1f484"},{n:["ring"],u:"1f48d"},{n:["gem","gem stone"],u:"1f48e"},{n:["mute","speaker with cancellation stroke"],u:"1f507"},{n:["speaker"],u:"1f508"},{n:["sound","speaker with one sound wave"],u:"1f509"},{n:["loud sound","speaker with three sound waves"],u:"1f50a"},{n:["loudspeaker","public address loudspeaker"],u:"1f4e2"},{n:["mega","cheering megaphone"],u:"1f4e3"},{n:["postal horn"],u:"1f4ef"},{n:["bell"],u:"1f514"},{n:["no bell","bell with cancellation stroke"],u:"1f515"},{n:["musical score"],u:"1f3bc"},{n:["musical note"],u:"1f3b5"},{n:["notes","multiple musical notes"],u:"1f3b6"},{n:["studio microphone"],u:"1f399-fe0f"},{n:["level slider"],u:"1f39a-fe0f"},{n:["control knobs"],u:"1f39b-fe0f"},{n:["microphone"],u:"1f3a4"},{n:["headphone","headphones"],u:"1f3a7"},{n:["radio"],u:"1f4fb"},{n:["saxophone"],u:"1f3b7"},{n:["accordion"],u:"1fa97"},{n:["guitar"],u:"1f3b8"},{n:["musical keyboard"],u:"1f3b9"},{n:["trumpet"],u:"1f3ba"},{n:["violin"],u:"1f3bb"},{n:["banjo"],u:"1fa95"},{n:["drum with drumsticks"],u:"1f941"},{n:["long drum"],u:"1fa98"},{n:["iphone","mobile phone"],u:"1f4f1"},{n:["calling","mobile phone with rightwards arrow at left"],u:"1f4f2"},{n:["phone","telephone","black telephone"],u:"260e-fe0f"},{n:["telephone receiver"],u:"1f4de"},{n:["pager"],u:"1f4df"},{n:["fax","fax machine"],u:"1f4e0"},{n:["battery"],u:"1f50b"},{n:["low battery"],u:"1faab"},{n:["electric plug"],u:"1f50c"},{n:["computer","personal computer"],u:"1f4bb"},{n:["desktop computer"],u:"1f5a5-fe0f"},{n:["printer"],u:"1f5a8-fe0f"},{n:["keyboard"],u:"2328-fe0f"},{n:["computer mouse","three button mouse"],u:"1f5b1-fe0f"},{n:["trackball"],u:"1f5b2-fe0f"},{n:["minidisc"],u:"1f4bd"},{n:["floppy disk"],u:"1f4be"},{n:["cd","optical disc"],u:"1f4bf"},{n:["dvd"],u:"1f4c0"},{n:["abacus"],u:"1f9ee"},{n:["movie camera"],u:"1f3a5"},{n:["film frames"],u:"1f39e-fe0f"},{n:["film projector"],u:"1f4fd-fe0f"},{n:["clapper","clapper board"],u:"1f3ac"},{n:["tv","television"],u:"1f4fa"},{n:["camera"],u:"1f4f7"},{n:["camera with flash"],u:"1f4f8"},{n:["video camera"],u:"1f4f9"},{n:["vhs","videocassette"],u:"1f4fc"},{n:["mag","left-pointing magnifying glass"],u:"1f50d"},{n:["mag right","right-pointing magnifying glass"],u:"1f50e"},{n:["candle"],u:"1f56f-fe0f"},{n:["bulb","electric light bulb"],u:"1f4a1"},{n:["flashlight","electric torch"],u:"1f526"},{n:["lantern","izakaya lantern"],u:"1f3ee"},{n:["diya lamp"],u:"1fa94"},{n:["notebook with decorative cover"],u:"1f4d4"},{n:["closed book"],u:"1f4d5"},{n:["book","open book"],u:"1f4d6"},{n:["green book"],u:"1f4d7"},{n:["blue book"],u:"1f4d8"},{n:["orange book"],u:"1f4d9"},{n:["books"],u:"1f4da"},{n:["notebook"],u:"1f4d3"},{n:["ledger"],u:"1f4d2"},{n:["page with curl"],u:"1f4c3"},{n:["scroll"],u:"1f4dc"},{n:["page facing up"],u:"1f4c4"},{n:["newspaper"],u:"1f4f0"},{n:["rolled-up newspaper","rolled up newspaper"],u:"1f5de-fe0f"},{n:["bookmark tabs"],u:"1f4d1"},{n:["bookmark"],u:"1f516"},{n:["label"],u:"1f3f7-fe0f"},{n:["moneybag","money bag"],u:"1f4b0"},{n:["coin"],u:"1fa99"},{n:["yen","banknote with yen sign"],u:"1f4b4"},{n:["dollar","banknote with dollar sign"],u:"1f4b5"},{n:["euro","banknote with euro sign"],u:"1f4b6"},{n:["pound","banknote with pound sign"],u:"1f4b7"},{n:["money with wings"],u:"1f4b8"},{n:["credit card"],u:"1f4b3"},{n:["receipt"],u:"1f9fe"},{n:["chart","chart with upwards trend and yen sign"],u:"1f4b9"},{n:["email","envelope"],u:"2709-fe0f"},{n:["e-mail","e-mail symbol"],u:"1f4e7"},{n:["incoming envelope"],u:"1f4e8"},{n:["envelope with arrow","envelope with downwards arrow above"],u:"1f4e9"},{n:["outbox tray"],u:"1f4e4"},{n:["inbox tray"],u:"1f4e5"},{n:["package"],u:"1f4e6"},{n:["mailbox","closed mailbox with raised flag"],u:"1f4eb"},{n:["mailbox closed","closed mailbox with lowered flag"],u:"1f4ea"},{n:["mailbox with mail","open mailbox with raised flag"],u:"1f4ec"},{n:["mailbox with no mail","open mailbox with lowered flag"],u:"1f4ed"},{n:["postbox"],u:"1f4ee"},{n:["ballot box with ballot"],u:"1f5f3-fe0f"},{n:["pencil","pencil2"],u:"270f-fe0f"},{n:["black nib"],u:"2712-fe0f"},{n:["fountain pen","lower left fountain pen"],u:"1f58b-fe0f"},{n:["pen","lower left ballpoint pen"],u:"1f58a-fe0f"},{n:["paintbrush","lower left paintbrush"],u:"1f58c-fe0f"},{n:["crayon","lower left crayon"],u:"1f58d-fe0f"},{n:["memo","pencil"],u:"1f4dd"},{n:["briefcase"],u:"1f4bc"},{n:["file folder"],u:"1f4c1"},{n:["open file folder"],u:"1f4c2"},{n:["card index dividers"],u:"1f5c2-fe0f"},{n:["date","calendar"],u:"1f4c5"},{n:["calendar","tear-off calendar"],u:"1f4c6"},{n:["spiral notepad","spiral note pad"],u:"1f5d2-fe0f"},{n:["spiral calendar","spiral calendar pad"],u:"1f5d3-fe0f"},{n:["card index"],u:"1f4c7"},{n:["chart with upwards trend"],u:"1f4c8"},{n:["chart with downwards trend"],u:"1f4c9"},{n:["bar chart"],u:"1f4ca"},{n:["clipboard"],u:"1f4cb"},{n:["pushpin"],u:"1f4cc"},{n:["round pushpin"],u:"1f4cd"},{n:["paperclip"],u:"1f4ce"},{n:["linked paperclips"],u:"1f587-fe0f"},{n:["straight ruler"],u:"1f4cf"},{n:["triangular ruler"],u:"1f4d0"},{n:["scissors","black scissors"],u:"2702-fe0f"},{n:["card file box"],u:"1f5c3-fe0f"},{n:["file cabinet"],u:"1f5c4-fe0f"},{n:["wastebasket"],u:"1f5d1-fe0f"},{n:["lock"],u:"1f512"},{n:["unlock","open lock"],u:"1f513"},{n:["lock with ink pen"],u:"1f50f"},{n:["closed lock with key"],u:"1f510"},{n:["key"],u:"1f511"},{n:["old key"],u:"1f5dd-fe0f"},{n:["hammer"],u:"1f528"},{n:["axe"],u:"1fa93"},{n:["pick"],u:"26cf-fe0f"},{n:["hammer and pick"],u:"2692-fe0f"},{n:["hammer and wrench"],u:"1f6e0-fe0f"},{n:["dagger","dagger knife"],u:"1f5e1-fe0f"},{n:["crossed swords"],u:"2694-fe0f"},{n:["gun","pistol"],u:"1f52b"},{n:["boomerang"],u:"1fa83"},{n:["bow and arrow"],u:"1f3f9"},{n:["shield"],u:"1f6e1-fe0f"},{n:["carpentry saw"],u:"1fa9a"},{n:["wrench"],u:"1f527"},{n:["screwdriver"],u:"1fa9b"},{n:["nut and bolt"],u:"1f529"},{n:["gear"],u:"2699-fe0f"},{n:["clamp","compression"],u:"1f5dc-fe0f"},{n:["scales","balance scale"],u:"2696-fe0f"},{n:["probing cane"],u:"1f9af"},{n:["link","link symbol"],u:"1f517"},{n:["chains"],u:"26d3-fe0f"},{n:["hook"],u:"1fa9d"},{n:["toolbox"],u:"1f9f0"},{n:["magnet"],u:"1f9f2"},{n:["ladder"],u:"1fa9c"},{n:["alembic"],u:"2697-fe0f"},{n:["test tube"],u:"1f9ea"},{n:["petri dish"],u:"1f9eb"},{n:["dna","dna double helix"],u:"1f9ec"},{n:["microscope"],u:"1f52c"},{n:["telescope"],u:"1f52d"},{n:["satellite antenna"],u:"1f4e1"},{n:["syringe"],u:"1f489"},{n:["drop of blood"],u:"1fa78"},{n:["pill"],u:"1f48a"},{n:["adhesive bandage"],u:"1fa79"},{n:["crutch"],u:"1fa7c"},{n:["stethoscope"],u:"1fa7a"},{n:["x-ray"],u:"1fa7b"},{n:["door"],u:"1f6aa"},{n:["elevator"],u:"1f6d7"},{n:["mirror"],u:"1fa9e"},{n:["window"],u:"1fa9f"},{n:["bed"],u:"1f6cf-fe0f"},{n:["couch and lamp"],u:"1f6cb-fe0f"},{n:["chair"],u:"1fa91"},{n:["toilet"],u:"1f6bd"},{n:["plunger"],u:"1faa0"},{n:["shower"],u:"1f6bf"},{n:["bathtub"],u:"1f6c1"},{n:["mouse trap"],u:"1faa4"},{n:["razor"],u:"1fa92"},{n:["lotion bottle"],u:"1f9f4"},{n:["safety pin"],u:"1f9f7"},{n:["broom"],u:"1f9f9"},{n:["basket"],u:"1f9fa"},{n:["roll of paper"],u:"1f9fb"},{n:["bucket"],u:"1faa3"},{n:["soap","bar of soap"],u:"1f9fc"},{n:["bubbles"],u:"1fae7"},{n:["toothbrush"],u:"1faa5"},{n:["sponge"],u:"1f9fd"},{n:["fire extinguisher"],u:"1f9ef"},{n:["shopping trolley"],u:"1f6d2"},{n:["smoking","smoking symbol"],u:"1f6ac"},{n:["coffin"],u:"26b0-fe0f"},{n:["headstone"],u:"1faa6"},{n:["funeral urn"],u:"26b1-fe0f"},{n:["moyai"],u:"1f5ff"},{n:["placard"],u:"1faa7"},{n:["identification card"],u:"1faaa"}],symbols:[{n:["atm","automated teller machine"],u:"1f3e7"},{n:["put litter in its place","put litter in its place symbol"],u:"1f6ae"},{n:["potable water","potable water symbol"],u:"1f6b0"},{n:["wheelchair","wheelchair symbol"],u:"267f"},{n:["mens","mens symbol"],u:"1f6b9"},{n:["womens","womens symbol"],u:"1f6ba"},{n:["restroom"],u:"1f6bb"},{n:["baby symbol"],u:"1f6bc"},{n:["wc","water closet"],u:"1f6be"},{n:["passport control"],u:"1f6c2"},{n:["customs"],u:"1f6c3"},{n:["baggage claim"],u:"1f6c4"},{n:["left luggage"],u:"1f6c5"},{n:["warning","warning sign"],u:"26a0-fe0f"},{n:["children crossing"],u:"1f6b8"},{n:["no entry"],u:"26d4"},{n:["no entry sign"],u:"1f6ab"},{n:["no bicycles"],u:"1f6b3"},{n:["no smoking","no smoking symbol"],u:"1f6ad"},{n:["do not litter","do not litter symbol"],u:"1f6af"},{n:["non-potable water","non-potable water symbol"],u:"1f6b1"},{n:["no pedestrians"],u:"1f6b7"},{n:["no mobile phones"],u:"1f4f5"},{n:["underage","no one under eighteen symbol"],u:"1f51e"},{n:["radioactive","radioactive sign"],u:"2622-fe0f"},{n:["biohazard","biohazard sign"],u:"2623-fe0f"},{n:["arrow up","upwards black arrow"],u:"2b06-fe0f"},{n:["north east arrow","arrow upper right"],u:"2197-fe0f"},{n:["arrow right","black rightwards arrow"],u:"27a1-fe0f"},{n:["south east arrow","arrow lower right"],u:"2198-fe0f"},{n:["arrow down","downwards black arrow"],u:"2b07-fe0f"},{n:["south west arrow","arrow lower left"],u:"2199-fe0f"},{n:["arrow left","leftwards black arrow"],u:"2b05-fe0f"},{n:["north west arrow","arrow upper left"],u:"2196-fe0f"},{n:["up down arrow","arrow up down"],u:"2195-fe0f"},{n:["left right arrow"],u:"2194-fe0f"},{n:["leftwards arrow with hook"],u:"21a9-fe0f"},{n:["arrow right hook","rightwards arrow with hook"],u:"21aa-fe0f"},{n:["arrow heading up","arrow pointing rightwards then curving upwards"],u:"2934-fe0f"},{n:["arrow heading down","arrow pointing rightwards then curving downwards"],u:"2935-fe0f"},{n:["arrows clockwise","clockwise downwards and upwards open circle arrows"],u:"1f503"},{n:["arrows counterclockwise","anticlockwise downwards and upwards open circle arrows"],u:"1f504"},{n:["back","back with leftwards arrow above"],u:"1f519"},{n:["end","end with leftwards arrow above"],u:"1f51a"},{n:["on","on with exclamation mark with left right arrow above"],u:"1f51b"},{n:["soon","soon with rightwards arrow above"],u:"1f51c"},{n:["top","top with upwards arrow above"],u:"1f51d"},{n:["place of worship"],u:"1f6d0"},{n:["atom symbol"],u:"269b-fe0f"},{n:["om","om symbol"],u:"1f549-fe0f"},{n:["star of david"],u:"2721-fe0f"},{n:["wheel of dharma"],u:"2638-fe0f"},{n:["yin yang"],u:"262f-fe0f"},{n:["latin cross"],u:"271d-fe0f"},{n:["orthodox cross"],u:"2626-fe0f"},{n:["star and crescent"],u:"262a-fe0f"},{n:["peace symbol"],u:"262e-fe0f"},{n:["menorah with nine branches"],u:"1f54e"},{n:["six pointed star","six pointed star with middle dot"],u:"1f52f"},{n:["aries"],u:"2648"},{n:["taurus"],u:"2649"},{n:["gemini"],u:"264a"},{n:["cancer"],u:"264b"},{n:["leo"],u:"264c"},{n:["virgo"],u:"264d"},{n:["libra"],u:"264e"},{n:["scorpius"],u:"264f"},{n:["sagittarius"],u:"2650"},{n:["capricorn"],u:"2651"},{n:["aquarius"],u:"2652"},{n:["pisces"],u:"2653"},{n:["ophiuchus"],u:"26ce"},{n:["twisted rightwards arrows"],u:"1f500"},{n:["repeat","clockwise rightwards and leftwards open circle arrows"],u:"1f501"},{n:["repeat one","clockwise rightwards and leftwards open circle arrows with circled one overlay"],u:"1f502"},{n:["arrow forward","black right-pointing triangle"],u:"25b6-fe0f"},{n:["fast forward","black right-pointing double triangle"],u:"23e9"},{n:["next track button","black right pointing double triangle with vertical bar"],u:"23ed-fe0f"},{n:["play or pause button","black right pointing triangle with double vertical bar"],u:"23ef-fe0f"},{n:["arrow backward","black left-pointing triangle"],u:"25c0-fe0f"},{n:["rewind","black left-pointing double triangle"],u:"23ea"},{n:["last track button","black left pointing double triangle with vertical bar"],u:"23ee-fe0f"},{n:["arrow up small","up-pointing small red triangle"],u:"1f53c"},{n:["arrow double up","black up-pointing double triangle"],u:"23eb"},{n:["arrow down small","down-pointing small red triangle"],u:"1f53d"},{n:["arrow double down","black down-pointing double triangle"],u:"23ec"},{n:["pause button","double vertical bar"],u:"23f8-fe0f"},{n:["stop button","black square for stop"],u:"23f9-fe0f"},{n:["record button","black circle for record"],u:"23fa-fe0f"},{n:["eject","eject button"],u:"23cf-fe0f"},{n:["cinema"],u:"1f3a6"},{n:["low brightness","low brightness symbol"],u:"1f505"},{n:["high brightness","high brightness symbol"],u:"1f506"},{n:["signal strength","antenna with bars"],u:"1f4f6"},{n:["vibration mode"],u:"1f4f3"},{n:["mobile phone off"],u:"1f4f4"},{n:["female sign"],u:"2640-fe0f"},{n:["male sign"],u:"2642-fe0f"},{n:["transgender symbol"],u:"26a7-fe0f"},{n:["heavy multiplication x"],u:"2716-fe0f"},{n:["heavy plus sign"],u:"2795"},{n:["heavy minus sign"],u:"2796"},{n:["heavy division sign"],u:"2797"},{n:["heavy equals sign"],u:"1f7f0"},{n:["infinity"],u:"267e-fe0f"},{n:["bangbang","double exclamation mark"],u:"203c-fe0f"},{n:["interrobang","exclamation question mark"],u:"2049-fe0f"},{n:["question","black question mark ornament"],u:"2753"},{n:["grey question","white question mark ornament"],u:"2754"},{n:["grey exclamation","white exclamation mark ornament"],u:"2755"},{n:["exclamation","heavy exclamation mark","heavy exclamation mark symbol"],u:"2757"},{n:["wavy dash"],u:"3030-fe0f"},{n:["currency exchange"],u:"1f4b1"},{n:["heavy dollar sign"],u:"1f4b2"},{n:["medical symbol","staff of aesculapius"],u:"2695-fe0f"},{n:["recycle","black universal recycling symbol"],u:"267b-fe0f"},{n:["fleur-de-lis","fleur de lis"],u:"269c-fe0f"},{n:["trident","trident emblem"],u:"1f531"},{n:["name badge"],u:"1f4db"},{n:["beginner","japanese symbol for beginner"],u:"1f530"},{n:["o","heavy large circle"],u:"2b55"},{n:["white check mark","white heavy check mark"],u:"2705"},{n:["ballot box with check"],u:"2611-fe0f"},{n:["heavy check mark"],u:"2714-fe0f"},{n:["x","cross mark"],u:"274c"},{n:["negative squared cross mark"],u:"274e"},{n:["curly loop"],u:"27b0"},{n:["loop","double curly loop"],u:"27bf"},{n:["part alternation mark"],u:"303d-fe0f"},{n:["eight spoked asterisk"],u:"2733-fe0f"},{n:["eight pointed black star"],u:"2734-fe0f"},{n:["sparkle"],u:"2747-fe0f"},{n:["copyright","copyright sign"],u:"00a9-fe0f"},{n:["registered","registered sign"],u:"00ae-fe0f"},{n:["tm","trade mark sign"],u:"2122-fe0f"},{n:["hash","hash key"],u:"0023-fe0f-20e3"},{n:["keycap: *","keycap star"],u:"002a-fe0f-20e3"},{n:["zero","keycap 0"],u:"0030-fe0f-20e3"},{n:["one","keycap 1"],u:"0031-fe0f-20e3"},{n:["two","keycap 2"],u:"0032-fe0f-20e3"},{n:["three","keycap 3"],u:"0033-fe0f-20e3"},{n:["four","keycap 4"],u:"0034-fe0f-20e3"},{n:["five","keycap 5"],u:"0035-fe0f-20e3"},{n:["six","keycap 6"],u:"0036-fe0f-20e3"},{n:["seven","keycap 7"],u:"0037-fe0f-20e3"},{n:["eight","keycap 8"],u:"0038-fe0f-20e3"},{n:["nine","keycap 9"],u:"0039-fe0f-20e3"},{n:["keycap ten"],u:"1f51f"},{n:["capital abcd","input symbol for latin capital letters"],u:"1f520"},{n:["abcd","input symbol for latin small letters"],u:"1f521"},{n:["1234","input symbol for numbers"],u:"1f522"},{n:["symbols","input symbol for symbols"],u:"1f523"},{n:["abc","input symbol for latin letters"],u:"1f524"},{n:["a","negative squared latin capital letter a"],u:"1f170-fe0f"},{n:["ab","negative squared ab"],u:"1f18e"},{n:["b","negative squared latin capital letter b"],u:"1f171-fe0f"},{n:["cl","squared cl"],u:"1f191"},{n:["cool","squared cool"],u:"1f192"},{n:["free","squared free"],u:"1f193"},{n:["information source"],u:"2139-fe0f"},{n:["id","squared id"],u:"1f194"},{n:["m","circled latin capital letter m"],u:"24c2-fe0f"},{n:["new","squared new"],u:"1f195"},{n:["ng","squared ng"],u:"1f196"},{n:["o2","negative squared latin capital letter o"],u:"1f17e-fe0f"},{n:["ok","squared ok"],u:"1f197"},{n:["parking","negative squared latin capital letter p"],u:"1f17f-fe0f"},{n:["sos","squared sos"],u:"1f198"},{n:["up","squared up with exclamation mark"],u:"1f199"},{n:["vs","squared vs"],u:"1f19a"},{n:["koko","squared katakana koko"],u:"1f201"},{n:["sa","squared katakana sa"],u:"1f202-fe0f"},{n:["u6708","squared cjk unified ideograph-6708"],u:"1f237-fe0f"},{n:["u6709","squared cjk unified ideograph-6709"],u:"1f236"},{n:["u6307","squared cjk unified ideograph-6307"],u:"1f22f"},{n:["ideograph advantage","circled ideograph advantage"],u:"1f250"},{n:["u5272","squared cjk unified ideograph-5272"],u:"1f239"},{n:["u7121","squared cjk unified ideograph-7121"],u:"1f21a"},{n:["u7981","squared cjk unified ideograph-7981"],u:"1f232"},{n:["accept","circled ideograph accept"],u:"1f251"},{n:["u7533","squared cjk unified ideograph-7533"],u:"1f238"},{n:["u5408","squared cjk unified ideograph-5408"],u:"1f234"},{n:["u7a7a","squared cjk unified ideograph-7a7a"],u:"1f233"},{n:["congratulations","circled ideograph congratulation"],u:"3297-fe0f"},{n:["secret","circled ideograph secret"],u:"3299-fe0f"},{n:["u55b6","squared cjk unified ideograph-55b6"],u:"1f23a"},{n:["u6e80","squared cjk unified ideograph-6e80"],u:"1f235"},{n:["red circle","large red circle"],u:"1f534"},{n:["large orange circle"],u:"1f7e0"},{n:["large yellow circle"],u:"1f7e1"},{n:["large green circle"],u:"1f7e2"},{n:["large blue circle"],u:"1f535"},{n:["large purple circle"],u:"1f7e3"},{n:["large brown circle"],u:"1f7e4"},{n:["black circle","medium black circle"],u:"26ab"},{n:["white circle","medium white circle"],u:"26aa"},{n:["large red square"],u:"1f7e5"},{n:["large orange square"],u:"1f7e7"},{n:["large yellow square"],u:"1f7e8"},{n:["large green square"],u:"1f7e9"},{n:["large blue square"],u:"1f7e6"},{n:["large purple square"],u:"1f7ea"},{n:["large brown square"],u:"1f7eb"},{n:["black large square"],u:"2b1b"},{n:["white large square"],u:"2b1c"},{n:["black medium square"],u:"25fc-fe0f"},{n:["white medium square"],u:"25fb-fe0f"},{n:["black medium small square"],u:"25fe"},{n:["white medium small square"],u:"25fd"},{n:["black small square"],u:"25aa-fe0f"},{n:["white small square"],u:"25ab-fe0f"},{n:["large orange diamond"],u:"1f536"},{n:["large blue diamond"],u:"1f537"},{n:["small orange diamond"],u:"1f538"},{n:["small blue diamond"],u:"1f539"},{n:["small red triangle","up-pointing red triangle"],u:"1f53a"},{n:["small red triangle down","down-pointing red triangle"],u:"1f53b"},{n:["diamond shape with a dot inside"],u:"1f4a0"},{n:["radio button"],u:"1f518"},{n:["white square button"],u:"1f533"},{n:["black square button"],u:"1f532"}],flags:[{n:["chequered flag","checkered flag"],u:"1f3c1"},{n:["triangular flag on post"],u:"1f6a9"},{n:["crossed flags"],u:"1f38c"},{n:["waving black flag"],u:"1f3f4"},{n:["white flag","waving white flag"],u:"1f3f3-fe0f"},{n:["rainbow flag","rainbow-flag"],u:"1f3f3-fe0f-200d-1f308"},{n:["transgender flag"],u:"1f3f3-fe0f-200d-26a7-fe0f"},{n:["pirate flag"],u:"1f3f4-200d-2620-fe0f"},{n:["flag-ac","ascension island flag"],u:"1f1e6-1f1e8"},{n:["flag-ad","andorra flag"],u:"1f1e6-1f1e9"},{n:["flag-ae","united arab emirates flag"],u:"1f1e6-1f1ea"},{n:["flag-af","afghanistan flag"],u:"1f1e6-1f1eb"},{n:["flag-ag","antigua & barbuda flag"],u:"1f1e6-1f1ec"},{n:["flag-ai","anguilla flag"],u:"1f1e6-1f1ee"},{n:["flag-al","albania flag"],u:"1f1e6-1f1f1"},{n:["flag-am","armenia flag"],u:"1f1e6-1f1f2"},{n:["flag-ao","angola flag"],u:"1f1e6-1f1f4"},{n:["flag-aq","antarctica flag"],u:"1f1e6-1f1f6"},{n:["flag-ar","argentina flag"],u:"1f1e6-1f1f7"},{n:["flag-as","american samoa flag"],u:"1f1e6-1f1f8"},{n:["flag-at","austria flag"],u:"1f1e6-1f1f9"},{n:["flag-au","australia flag"],u:"1f1e6-1f1fa"},{n:["flag-aw","aruba flag"],u:"1f1e6-1f1fc"},{n:["flag-ax","\xE5land islands flag"],u:"1f1e6-1f1fd"},{n:["flag-az","azerbaijan flag"],u:"1f1e6-1f1ff"},{n:["flag-ba","bosnia & herzegovina flag"],u:"1f1e7-1f1e6"},{n:["flag-bb","barbados flag"],u:"1f1e7-1f1e7"},{n:["flag-bd","bangladesh flag"],u:"1f1e7-1f1e9"},{n:["flag-be","belgium flag"],u:"1f1e7-1f1ea"},{n:["flag-bf","burkina faso flag"],u:"1f1e7-1f1eb"},{n:["flag-bg","bulgaria flag"],u:"1f1e7-1f1ec"},{n:["flag-bh","bahrain flag"],u:"1f1e7-1f1ed"},{n:["flag-bi","burundi flag"],u:"1f1e7-1f1ee"},{n:["flag-bj","benin flag"],u:"1f1e7-1f1ef"},{n:["flag-bl","st. barth\xE9lemy flag"],u:"1f1e7-1f1f1"},{n:["flag-bm","bermuda flag"],u:"1f1e7-1f1f2"},{n:["flag-bn","brunei flag"],u:"1f1e7-1f1f3"},{n:["flag-bo","bolivia flag"],u:"1f1e7-1f1f4"},{n:["flag-bq","caribbean netherlands flag"],u:"1f1e7-1f1f6"},{n:["flag-br","brazil flag"],u:"1f1e7-1f1f7"},{n:["flag-bs","bahamas flag"],u:"1f1e7-1f1f8"},{n:["flag-bt","bhutan flag"],u:"1f1e7-1f1f9"},{n:["flag-bv","bouvet island flag"],u:"1f1e7-1f1fb"},{n:["flag-bw","botswana flag"],u:"1f1e7-1f1fc"},{n:["flag-by","belarus flag"],u:"1f1e7-1f1fe"},{n:["flag-bz","belize flag"],u:"1f1e7-1f1ff"},{n:["flag-ca","canada flag"],u:"1f1e8-1f1e6"},{n:["flag-cc","cocos (keeling) islands flag"],u:"1f1e8-1f1e8"},{n:["flag-cd","congo - kinshasa flag"],u:"1f1e8-1f1e9"},{n:["flag-cf","central african republic flag"],u:"1f1e8-1f1eb"},{n:["flag-cg","congo - brazzaville flag"],u:"1f1e8-1f1ec"},{n:["flag-ch","switzerland flag"],u:"1f1e8-1f1ed"},{n:["flag-ci","c\xF4te d\u2019ivoire flag"],u:"1f1e8-1f1ee"},{n:["flag-ck","cook islands flag"],u:"1f1e8-1f1f0"},{n:["flag-cl","chile flag"],u:"1f1e8-1f1f1"},{n:["flag-cm","cameroon flag"],u:"1f1e8-1f1f2"},{n:["cn","flag-cn","china flag"],u:"1f1e8-1f1f3"},{n:["flag-co","colombia flag"],u:"1f1e8-1f1f4"},{n:["flag-cp","clipperton island flag"],u:"1f1e8-1f1f5"},{n:["flag-cr","costa rica flag"],u:"1f1e8-1f1f7"},{n:["flag-cu","cuba flag"],u:"1f1e8-1f1fa"},{n:["flag-cv","cape verde flag"],u:"1f1e8-1f1fb"},{n:["flag-cw","cura\xE7ao flag"],u:"1f1e8-1f1fc"},{n:["flag-cx","christmas island flag"],u:"1f1e8-1f1fd"},{n:["flag-cy","cyprus flag"],u:"1f1e8-1f1fe"},{n:["flag-cz","czechia flag"],u:"1f1e8-1f1ff"},{n:["de","flag-de","germany flag"],u:"1f1e9-1f1ea"},{n:["flag-dg","diego garcia flag"],u:"1f1e9-1f1ec"},{n:["flag-dj","djibouti flag"],u:"1f1e9-1f1ef"},{n:["flag-dk","denmark flag"],u:"1f1e9-1f1f0"},{n:["flag-dm","dominica flag"],u:"1f1e9-1f1f2"},{n:["flag-do","dominican republic flag"],u:"1f1e9-1f1f4"},{n:["flag-dz","algeria flag"],u:"1f1e9-1f1ff"},{n:["flag-ea","ceuta & melilla flag"],u:"1f1ea-1f1e6"},{n:["flag-ec","ecuador flag"],u:"1f1ea-1f1e8"},{n:["flag-ee","estonia flag"],u:"1f1ea-1f1ea"},{n:["flag-eg","egypt flag"],u:"1f1ea-1f1ec"},{n:["flag-eh","western sahara flag"],u:"1f1ea-1f1ed"},{n:["flag-er","eritrea flag"],u:"1f1ea-1f1f7"},{n:["es","flag-es","spain flag"],u:"1f1ea-1f1f8"},{n:["flag-et","ethiopia flag"],u:"1f1ea-1f1f9"},{n:["flag-eu","european union flag"],u:"1f1ea-1f1fa"},{n:["flag-fi","finland flag"],u:"1f1eb-1f1ee"},{n:["flag-fj","fiji flag"],u:"1f1eb-1f1ef"},{n:["flag-fk","falkland islands flag"],u:"1f1eb-1f1f0"},{n:["flag-fm","micronesia flag"],u:"1f1eb-1f1f2"},{n:["flag-fo","faroe islands flag"],u:"1f1eb-1f1f4"},{n:["fr","flag-fr","france flag"],u:"1f1eb-1f1f7"},{n:["flag-ga","gabon flag"],u:"1f1ec-1f1e6"},{n:["gb","uk","flag-gb","united kingdom flag"],u:"1f1ec-1f1e7"},{n:["flag-gd","grenada flag"],u:"1f1ec-1f1e9"},{n:["flag-ge","georgia flag"],u:"1f1ec-1f1ea"},{n:["flag-gf","french guiana flag"],u:"1f1ec-1f1eb"},{n:["flag-gg","guernsey flag"],u:"1f1ec-1f1ec"},{n:["flag-gh","ghana flag"],u:"1f1ec-1f1ed"},{n:["flag-gi","gibraltar flag"],u:"1f1ec-1f1ee"},{n:["flag-gl","greenland flag"],u:"1f1ec-1f1f1"},{n:["flag-gm","gambia flag"],u:"1f1ec-1f1f2"},{n:["flag-gn","guinea flag"],u:"1f1ec-1f1f3"},{n:["flag-gp","guadeloupe flag"],u:"1f1ec-1f1f5"},{n:["flag-gq","equatorial guinea flag"],u:"1f1ec-1f1f6"},{n:["flag-gr","greece flag"],u:"1f1ec-1f1f7"},{n:["flag-gs","south georgia & south sandwich islands flag"],u:"1f1ec-1f1f8"},{n:["flag-gt","guatemala flag"],u:"1f1ec-1f1f9"},{n:["flag-gu","guam flag"],u:"1f1ec-1f1fa"},{n:["flag-gw","guinea-bissau flag"],u:"1f1ec-1f1fc"},{n:["flag-gy","guyana flag"],u:"1f1ec-1f1fe"},{n:["flag-hk","hong kong sar china flag"],u:"1f1ed-1f1f0"},{n:["flag-hm","heard & mcdonald islands flag"],u:"1f1ed-1f1f2"},{n:["flag-hn","honduras flag"],u:"1f1ed-1f1f3"},{n:["flag-hr","croatia flag"],u:"1f1ed-1f1f7"},{n:["flag-ht","haiti flag"],u:"1f1ed-1f1f9"},{n:["flag-hu","hungary flag"],u:"1f1ed-1f1fa"},{n:["flag-ic","canary islands flag"],u:"1f1ee-1f1e8"},{n:["flag-id","indonesia flag"],u:"1f1ee-1f1e9"},{n:["flag-ie","ireland flag"],u:"1f1ee-1f1ea"},{n:["flag-il","israel flag"],u:"1f1ee-1f1f1"},{n:["flag-im","isle of man flag"],u:"1f1ee-1f1f2"},{n:["flag-in","india flag"],u:"1f1ee-1f1f3"},{n:["flag-io","british indian ocean territory flag"],u:"1f1ee-1f1f4"},{n:["flag-iq","iraq flag"],u:"1f1ee-1f1f6"},{n:["flag-ir","iran flag"],u:"1f1ee-1f1f7"},{n:["flag-is","iceland flag"],u:"1f1ee-1f1f8"},{n:["it","flag-it","italy flag"],u:"1f1ee-1f1f9"},{n:["flag-je","jersey flag"],u:"1f1ef-1f1ea"},{n:["flag-jm","jamaica flag"],u:"1f1ef-1f1f2"},{n:["flag-jo","jordan flag"],u:"1f1ef-1f1f4"},{n:["jp","flag-jp","japan flag"],u:"1f1ef-1f1f5"},{n:["flag-ke","kenya flag"],u:"1f1f0-1f1ea"},{n:["flag-kg","kyrgyzstan flag"],u:"1f1f0-1f1ec"},{n:["flag-kh","cambodia flag"],u:"1f1f0-1f1ed"},{n:["flag-ki","kiribati flag"],u:"1f1f0-1f1ee"},{n:["flag-km","comoros flag"],u:"1f1f0-1f1f2"},{n:["flag-kn","st. kitts & nevis flag"],u:"1f1f0-1f1f3"},{n:["flag-kp","north korea flag"],u:"1f1f0-1f1f5"},{n:["kr","flag-kr","south korea flag"],u:"1f1f0-1f1f7"},{n:["flag-kw","kuwait flag"],u:"1f1f0-1f1fc"},{n:["flag-ky","cayman islands flag"],u:"1f1f0-1f1fe"},{n:["flag-kz","kazakhstan flag"],u:"1f1f0-1f1ff"},{n:["flag-la","laos flag"],u:"1f1f1-1f1e6"},{n:["flag-lb","lebanon flag"],u:"1f1f1-1f1e7"},{n:["flag-lc","st. lucia flag"],u:"1f1f1-1f1e8"},{n:["flag-li","liechtenstein flag"],u:"1f1f1-1f1ee"},{n:["flag-lk","sri lanka flag"],u:"1f1f1-1f1f0"},{n:["flag-lr","liberia flag"],u:"1f1f1-1f1f7"},{n:["flag-ls","lesotho flag"],u:"1f1f1-1f1f8"},{n:["flag-lt","lithuania flag"],u:"1f1f1-1f1f9"},{n:["flag-lu","luxembourg flag"],u:"1f1f1-1f1fa"},{n:["flag-lv","latvia flag"],u:"1f1f1-1f1fb"},{n:["flag-ly","libya flag"],u:"1f1f1-1f1fe"},{n:["flag-ma","morocco flag"],u:"1f1f2-1f1e6"},{n:["flag-mc","monaco flag"],u:"1f1f2-1f1e8"},{n:["flag-md","moldova flag"],u:"1f1f2-1f1e9"},{n:["flag-me","montenegro flag"],u:"1f1f2-1f1ea"},{n:["flag-mf","st. martin flag"],u:"1f1f2-1f1eb"},{n:["flag-mg","madagascar flag"],u:"1f1f2-1f1ec"},{n:["flag-mh","marshall islands flag"],u:"1f1f2-1f1ed"},{n:["flag-mk","north macedonia flag"],u:"1f1f2-1f1f0"},{n:["flag-ml","mali flag"],u:"1f1f2-1f1f1"},{n:["flag-mm","myanmar (burma) flag"],u:"1f1f2-1f1f2"},{n:["flag-mn","mongolia flag"],u:"1f1f2-1f1f3"},{n:["flag-mo","macao sar china flag"],u:"1f1f2-1f1f4"},{n:["flag-mp","northern mariana islands flag"],u:"1f1f2-1f1f5"},{n:["flag-mq","martinique flag"],u:"1f1f2-1f1f6"},{n:["flag-mr","mauritania flag"],u:"1f1f2-1f1f7"},{n:["flag-ms","montserrat flag"],u:"1f1f2-1f1f8"},{n:["flag-mt","malta flag"],u:"1f1f2-1f1f9"},{n:["flag-mu","mauritius flag"],u:"1f1f2-1f1fa"},{n:["flag-mv","maldives flag"],u:"1f1f2-1f1fb"},{n:["flag-mw","malawi flag"],u:"1f1f2-1f1fc"},{n:["flag-mx","mexico flag"],u:"1f1f2-1f1fd"},{n:["flag-my","malaysia flag"],u:"1f1f2-1f1fe"},{n:["flag-mz","mozambique flag"],u:"1f1f2-1f1ff"},{n:["flag-na","namibia flag"],u:"1f1f3-1f1e6"},{n:["flag-nc","new caledonia flag"],u:"1f1f3-1f1e8"},{n:["flag-ne","niger flag"],u:"1f1f3-1f1ea"},{n:["flag-nf","norfolk island flag"],u:"1f1f3-1f1eb"},{n:["flag-ng","nigeria flag"],u:"1f1f3-1f1ec"},{n:["flag-ni","nicaragua flag"],u:"1f1f3-1f1ee"},{n:["flag-nl","netherlands flag"],u:"1f1f3-1f1f1"},{n:["flag-no","norway flag"],u:"1f1f3-1f1f4"},{n:["flag-np","nepal flag"],u:"1f1f3-1f1f5"},{n:["flag-nr","nauru flag"],u:"1f1f3-1f1f7"},{n:["flag-nu","niue flag"],u:"1f1f3-1f1fa"},{n:["flag-nz","new zealand flag"],u:"1f1f3-1f1ff"},{n:["flag-om","oman flag"],u:"1f1f4-1f1f2"},{n:["flag-pa","panama flag"],u:"1f1f5-1f1e6"},{n:["flag-pe","peru flag"],u:"1f1f5-1f1ea"},{n:["flag-pf","french polynesia flag"],u:"1f1f5-1f1eb"},{n:["flag-pg","papua new guinea flag"],u:"1f1f5-1f1ec"},{n:["flag-ph","philippines flag"],u:"1f1f5-1f1ed"},{n:["flag-pk","pakistan flag"],u:"1f1f5-1f1f0"},{n:["flag-pl","poland flag"],u:"1f1f5-1f1f1"},{n:["flag-pm","st. pierre & miquelon flag"],u:"1f1f5-1f1f2"},{n:["flag-pn","pitcairn islands flag"],u:"1f1f5-1f1f3"},{n:["flag-pr","puerto rico flag"],u:"1f1f5-1f1f7"},{n:["flag-ps","palestinian territories flag"],u:"1f1f5-1f1f8"},{n:["flag-pt","portugal flag"],u:"1f1f5-1f1f9"},{n:["flag-pw","palau flag"],u:"1f1f5-1f1fc"},{n:["flag-py","paraguay flag"],u:"1f1f5-1f1fe"},{n:["flag-qa","qatar flag"],u:"1f1f6-1f1e6"},{n:["flag-re","r\xE9union flag"],u:"1f1f7-1f1ea"},{n:["flag-ro","romania flag"],u:"1f1f7-1f1f4"},{n:["flag-rs","serbia flag"],u:"1f1f7-1f1f8"},{n:["ru","flag-ru","russia flag"],u:"1f1f7-1f1fa"},{n:["flag-rw","rwanda flag"],u:"1f1f7-1f1fc"},{n:["flag-sa","saudi arabia flag"],u:"1f1f8-1f1e6"},{n:["flag-sb","solomon islands flag"],u:"1f1f8-1f1e7"},{n:["flag-sc","seychelles flag"],u:"1f1f8-1f1e8"},{n:["flag-sd","sudan flag"],u:"1f1f8-1f1e9"},{n:["flag-se","sweden flag"],u:"1f1f8-1f1ea"},{n:["flag-sg","singapore flag"],u:"1f1f8-1f1ec"},{n:["flag-sh","st. helena flag"],u:"1f1f8-1f1ed"},{n:["flag-si","slovenia flag"],u:"1f1f8-1f1ee"},{n:["flag-sj","svalbard & jan mayen flag"],u:"1f1f8-1f1ef"},{n:["flag-sk","slovakia flag"],u:"1f1f8-1f1f0"},{n:["flag-sl","sierra leone flag"],u:"1f1f8-1f1f1"},{n:["flag-sm","san marino flag"],u:"1f1f8-1f1f2"},{n:["flag-sn","senegal flag"],u:"1f1f8-1f1f3"},{n:["flag-so","somalia flag"],u:"1f1f8-1f1f4"},{n:["flag-sr","suriname flag"],u:"1f1f8-1f1f7"},{n:["flag-ss","south sudan flag"],u:"1f1f8-1f1f8"},{n:["flag-st","s\xE3o tom\xE9 & pr\xEDncipe flag"],u:"1f1f8-1f1f9"},{n:["flag-sv","el salvador flag"],u:"1f1f8-1f1fb"},{n:["flag-sx","sint maarten flag"],u:"1f1f8-1f1fd"},{n:["flag-sy","syria flag"],u:"1f1f8-1f1fe"},{n:["flag-sz","eswatini flag"],u:"1f1f8-1f1ff"},{n:["flag-ta","tristan da cunha flag"],u:"1f1f9-1f1e6"},{n:["flag-tc","turks & caicos islands flag"],u:"1f1f9-1f1e8"},{n:["flag-td","chad flag"],u:"1f1f9-1f1e9"},{n:["flag-tf","french southern territories flag"],u:"1f1f9-1f1eb"},{n:["flag-tg","togo flag"],u:"1f1f9-1f1ec"},{n:["flag-th","thailand flag"],u:"1f1f9-1f1ed"},{n:["flag-tj","tajikistan flag"],u:"1f1f9-1f1ef"},{n:["flag-tk","tokelau flag"],u:"1f1f9-1f1f0"},{n:["flag-tl","timor-leste flag"],u:"1f1f9-1f1f1"},{n:["flag-tm","turkmenistan flag"],u:"1f1f9-1f1f2"},{n:["flag-tn","tunisia flag"],u:"1f1f9-1f1f3"},{n:["flag-to","tonga flag"],u:"1f1f9-1f1f4"},{n:["flag-tr","turkey flag"],u:"1f1f9-1f1f7"},{n:["flag-tt","trinidad & tobago flag"],u:"1f1f9-1f1f9"},{n:["flag-tv","tuvalu flag"],u:"1f1f9-1f1fb"},{n:["flag-tw","taiwan flag"],u:"1f1f9-1f1fc"},{n:["flag-tz","tanzania flag"],u:"1f1f9-1f1ff"},{n:["flag-ua","ukraine flag"],u:"1f1fa-1f1e6"},{n:["flag-ug","uganda flag"],u:"1f1fa-1f1ec"},{n:["flag-um","u.s. outlying islands flag"],u:"1f1fa-1f1f2"},{n:["flag-un","united nations flag"],u:"1f1fa-1f1f3"},{n:["us","flag-us","united states flag"],u:"1f1fa-1f1f8"},{n:["flag-uy","uruguay flag"],u:"1f1fa-1f1fe"},{n:["flag-uz","uzbekistan flag"],u:"1f1fa-1f1ff"},{n:["flag-va","vatican city flag"],u:"1f1fb-1f1e6"},{n:["flag-vc","st. vincent & grenadines flag"],u:"1f1fb-1f1e8"},{n:["flag-ve","venezuela flag"],u:"1f1fb-1f1ea"},{n:["flag-vg","british virgin islands flag"],u:"1f1fb-1f1ec"},{n:["flag-vi","u.s. virgin islands flag"],u:"1f1fb-1f1ee"},{n:["flag-vn","vietnam flag"],u:"1f1fb-1f1f3"},{n:["flag-vu","vanuatu flag"],u:"1f1fb-1f1fa"},{n:["flag-wf","wallis & futuna flag"],u:"1f1fc-1f1eb"},{n:["flag-ws","samoa flag"],u:"1f1fc-1f1f8"},{n:["flag-xk","kosovo flag"],u:"1f1fd-1f1f0"},{n:["flag-ye","yemen flag"],u:"1f1fe-1f1ea"},{n:["flag-yt","mayotte flag"],u:"1f1fe-1f1f9"},{n:["flag-za","south africa flag"],u:"1f1ff-1f1e6"},{n:["flag-zm","zambia flag"],u:"1f1ff-1f1f2"},{n:["flag-zw","zimbabwe flag"],u:"1f1ff-1f1fc"},{n:["england flag","flag-england"],u:"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f"},{n:["scotland flag","flag-scotland"],u:"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f"},{n:["wales flag","flag-wales"],u:"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f"}]};var cD=class extends fDe.EditorSuggest{constructor(r,n){super(r);this.inCmd=!1;this.cmdStartCh=0;this.plugin=n,this.emojis=Object.keys(BS).reduce((i,a)=>[...i,...BS[a].map(o=>({label:o.n[0],desc:o.n[1],variants:o.v,unicode:o.u}))],[])}resetInfos(){this.cmdStartCh=0,this.inCmd=!1}onTrigger(r,n,i){let a=n.getLine(r.line).slice(0,r.ch);if(!this.inCmd&&!(a.slice(-2)==" "+this.plugin.superstate.settings.emojiTriggerChar||a[0]==this.plugin.superstate.settings.emojiTriggerChar))return this.resetInfos(),null;this.inCmd||(this.cmdStartCh=a.length-1,this.inCmd=!0);let o=a.slice(this.cmdStartCh,r.ch);return o.includes(" ")||!o.includes(this.plugin.superstate.settings.emojiTriggerChar)?(this.resetInfos(),null):(this.suggestEl.classList.toggle("mk-emoji-menu",!0),{start:r,end:r,query:o.slice(1)})}getSuggestions(r){let n=this.emojis.filter(({label:i,desc:a})=>i.includes(r.query)||a?.includes(r.query));return n.length>0?n:[{label:z.commandsSuggest.noResult,unicode:"",desc:""}]}renderSuggestion(r,n){let i=document.createElement("div");i.setAttribute("aria-label",r.label),this.plugin.ui.createRoot(i).render(ZY.default.createElement(ZY.default.Fragment,null,r.unicode.length>0?ly(r.unicode):z.commandsSuggest.noResult)),n.appendChild(i)}selectSuggestion(r,n){r.label!==z.commandsSuggest.noResult&&(this.context.editor.replaceRange(ly(r.unicode),{...this.context.start,ch:this.cmdStartCh},this.context.end),this.resetInfos(),this.close())}};var dDe=e=>{e.superstate.settings.flowMenuEnabled&&e.registerEditorSuggest(new uD(e.app,e)),e.superstate.settings.inlineStickerMenu&&e.registerEditorSuggest(new cD(e.app,e)),ar(e.superstate.ui)&&e.superstate.settings.mobileMakeBar&&e.superstate.settings.inlineStyler&&y6e(e.app.mobileToolbar.containerEl,e)};var Ls=require("obsidian"),CDe=ge(Te()),DDe=ge(mDe());var hDe=(e,t,r)=>{if(!t)return[void 0,void 0];let n=r.app.metadataCache.getCache(e);if(!n)return[void 0,void 0];let i=n.headings,a=n.blocks,o=n.sections;if(a&&t.charAt(0)=="^"&&a[t.substring(1)])return[a[t.substring(1)].position.start.line+1,a[t.substring(1)].position.end.line+1];let s=i?.find(l=>l.heading.replace("#"," ")==t);if(s){let l=i.findIndex(d=>d.heading==s.heading),u=i[l]?.level,c=i.findIndex((d,p)=>p>l&&d.level<=u),f=s.position.start.line+2;return l{let a=t??e.app.workspace.getLeaf();r||(r=a.containerEl);let o=new Ah(a,r,e,void 0,i);n&&(o.titleEl.textContent=n.substring(0,n.lastIndexOf(".")))};var gDe=require("obsidian");var fD=e=>{if(!e.superstate.settings.spacesStickers)return;let t=e.app.workspace.getActiveViewOfType(gDe.MarkdownView)?.leaf;if(t){let r=e.app.workspace.getActiveFile();if(!r)return;let n=e.superstate.pathsIndex.get(r.path);if(n?.label.sticker&&t.tabHeaderInnerIconEl){let[i,a]=kA(n.label.sticker);if(i=="image"){let o=e.superstate.ui.getUIPath(e.superstate.imagesCache.get(a));o&&(t.tabHeaderInnerIconEl.innerHTML=``)}else{let o=Xy(n.label.sticker,e);t.tabHeaderInnerIconEl.innerHTML=o}}return}else if(t=e.app.workspace.getActiveViewOfType(Uy)?.leaf,t){let r=t.view.getState().path,n=e.superstate.pathsIndex.get(r);if(n?.label?.sticker&&t.tabHeaderInnerIconEl){let[i,a]=kA(n.label.sticker);if(i=="image"){let o=e.superstate.ui.getUIPath(e.superstate.imagesCache.get(a));if(!o)return o;t.tabHeaderInnerIconEl.innerHTML=``}else{let o=Xy(n.label.sticker,e);t.tabHeaderInnerIconEl.innerHTML=o}}return}};var Ky=ge(Te()),vDe=ge(rl());function yDe(){let[e,t]=(0,Ky.useState)(new Map),[r,n]=(0,Ky.useState)(new Map),i=s=>r.get(s),a=(0,Ky.useCallback)((s,l)=>{let u={render:c=>{t(f=>{let d=new Map(f);return d.set(s,c),d})},unmount:()=>{t(c=>{let f=new Map(c);return f.delete(s),f}),n(c=>{let f=new Map(c);return f.delete(s),f})}};return t(c=>new Map(c).set(s,null)),n(c=>new Map(c).set(s,u)),u},[]),o=(0,Ky.useMemo)(()=>[...e.entries()].map(([s,l])=>(0,vDe.createPortal)(l,s)),[e]);return{createRoot:a,portals:o,getRoot:i}}var RS=ge(Te()),bDe=e=>{let t=Qx(up(iA,{activationConstraint:{distance:10}}),up(aA,{activationConstraint:{delay:250,tolerance:5}}),up(i0,{coordinateGetter:NM})),{createRoot:r,portals:n,getRoot:i}=yDe();(0,RS.useEffect)(()=>{e.ui.createRoot=r,e.ui.getRoot=i,e.ui.manager.eventsDispatch.dispatchEvent("windowReady",null)},[r]);let[a,o]=RS.default.useState(!1);return RS.default.createElement(Yx,{sensors:t,onDragStart:()=>{o(!0)},onDragEnd:()=>{o(!1),document.body.style.setProperty("cursor","")},onDragCancel:()=>{o(!1)},collisionDetection:lz,measuring:{droppable:{strategy:lp.Always}}},RS.default.createElement(hxe,{dragActive:a},n))};var Lp=ge(Te());function KY(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ME(e,t)}var dD=ge(Te()),pD=ge(rl());var JY={disabled:!1};var xDe=ge(Te()),eZ=xDe.default.createContext(null);var wDe=function(t){return t.scrollTop};var mD="unmounted",Jy="exited",eb="entering",qS="entered",tZ="exiting",ZA=function(e){KY(t,e);function t(n,i){var a;a=e.call(this,n,i)||this;var o=i,s=o&&!o.isMounting?n.enter:n.appear,l;return a.appearStatus=null,n.in?s?(l=Jy,a.appearStatus=eb):l=qS:n.unmountOnExit||n.mountOnEnter?l=mD:l=Jy,a.state={status:l},a.nextCallback=null,a}t.getDerivedStateFromProps=function(i,a){var o=i.in;return o&&a.status===mD?{status:Jy}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(i){var a=null;if(i!==this.props){var o=this.state.status;this.props.in?o!==eb&&o!==qS&&(a=eb):(o===eb||o===qS)&&(a=tZ)}this.updateStatus(!1,a)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var i=this.props.timeout,a,o,s;return a=o=s=i,i!=null&&typeof i!="number"&&(a=i.exit,o=i.enter,s=i.appear!==void 0?i.appear:o),{exit:a,enter:o,appear:s}},r.updateStatus=function(i,a){if(i===void 0&&(i=!1),a!==null)if(this.cancelNextCallback(),a===eb){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:pD.default.findDOMNode(this);o&&wDe(o)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Jy&&this.setState({status:mD})},r.performEnter=function(i){var a=this,o=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[pD.default.findDOMNode(this),s],u=l[0],c=l[1],f=this.getTimeouts(),d=s?f.appear:f.enter;if(!i&&!o||JY.disabled){this.safeSetState({status:qS},function(){a.props.onEntered(u)});return}this.props.onEnter(u,c),this.safeSetState({status:eb},function(){a.props.onEntering(u,c),a.onTransitionEnd(d,function(){a.safeSetState({status:qS},function(){a.props.onEntered(u,c)})})})},r.performExit=function(){var i=this,a=this.props.exit,o=this.getTimeouts(),s=this.props.nodeRef?void 0:pD.default.findDOMNode(this);if(!a||JY.disabled){this.safeSetState({status:Jy},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:tZ},function(){i.props.onExiting(s),i.onTransitionEnd(o.exit,function(){i.safeSetState({status:Jy},function(){i.props.onExited(s)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(i,a){a=this.setNextCallback(a),this.setState(i,a)},r.setNextCallback=function(i){var a=this,o=!0;return this.nextCallback=function(s){o&&(o=!1,a.nextCallback=null,i(s))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},r.onTransitionEnd=function(i,a){this.setNextCallback(a);var o=this.props.nodeRef?this.props.nodeRef.current:pD.default.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!o||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],u=l[0],c=l[1];this.props.addEndListener(u,c)}i!=null&&setTimeout(this.nextCallback,i)},r.render=function(){var i=this.state.status;if(i===mD)return null;var a=this.props,o=a.children,s=a.in,l=a.mountOnEnter,u=a.unmountOnExit,c=a.appear,f=a.enter,d=a.exit,p=a.timeout,h=a.addEndListener,m=a.onEnter,g=a.onEntering,A=a.onEntered,b=a.onExit,v=a.onExiting,x=a.onExited,w=a.nodeRef,S=q6(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return dD.default.createElement(eZ.Provider,{value:null},typeof o=="function"?o(i,S):dD.default.cloneElement(dD.default.Children.only(o),S))},t}(dD.default.Component);ZA.contextType=eZ;ZA.propTypes={};function $S(){}ZA.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:$S,onEntering:$S,onEntered:$S,onExit:$S,onExiting:$S,onExited:$S};ZA.UNMOUNTED=mD;ZA.EXITED=Jy;ZA.ENTERING=eb;ZA.ENTERED=qS;ZA.EXITING=tZ;var rZ=ZA;var SDe=e=>{let{setNodeRef:t,isOver:r}=oA({id:"_modal",data:{id:"_modal"}});return Vo({onDragOver:n=>{r&&e.hide()}}),Lp.default.createElement("div",{className:"mk-modal-container",ref:t},Lp.default.createElement(ZJe,{ui:e.ui,hide:e.hide,className:e.className},e.children))},ZJe=e=>{let t=Lp.default.useRef(null),{setNodeRef:r,isOver:n}=oA({id:"_modalInner",data:{id:"_modalInner"}}),[i,a]=(0,Lp.useTransition)();(0,Lp.useEffect)(()=>{a(()=>null)},[]),(0,Lp.useEffect)(()=>{let s=u=>u.key=="Escape"?(e.hide(),!0):!1;function l(u){let c=d=>!!(d.classList.contains("mk-menu")||d.classList.contains("mk-menu-mobile")||d.classList.contains("mk-modal")),f=u.target;for(;!c(f)&&f.parentElement;)f=f.parentElement;c(f)||t.current&&!t.current.contains(u.target)&&e.hide()}return e.ui.inputManager.on("mousedown",l),e.ui.inputManager.on("contextmenu",l),e.ui.inputManager.on("keydown",s),()=>{e.ui.inputManager.off("mousedown",l),e.ui.inputManager.off("contextmenu",l),e.ui.inputManager.off("keydown",s)}},[e.hide]);let o={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0},unmounted:{opacity:0}};return Lp.default.createElement(rZ,{timeout:300,appear:!0,in:!0,nodeRef:t},s=>Lp.default.createElement("div",{className:`${e.className}`,style:{transition:"all 100ms ease-in",transform:"translateY(0px)",...o[s]},ref:l=>{r(l),t.current=l}},e.children))};var wv=ge(Te()),nZ=e=>{let t=e.win.document.createElement("div");ar(e.ui.manager)?t.classList.add("mk-modal-wrapper-mobile"):t.classList.add("mk-modal-wrapper"),e.win.document.body.appendChild(t);let r=o=>{let s=!1;return()=>{s||(o.unmount(),e.win.document.body.removeChild(t),s=!0)}},n=e.ui.createRoot(t),i=r(n),a=o=>{if(ar(e.ui.manager)){n.render(wv.default.createElement(XM,{fc:e.fc,hide:()=>i(),newProps:o,className:`${e.isPalette?"mk-drawer-palette":"mk-drawer-modal"} ${e.className?e.className:""}`}));return}n.render(wv.default.createElement(SDe,{ui:e.ui.manager,hide:()=>i(),className:`${e.isPalette?"mk-palette":"mk-modal"} ${e.className?e.className:""}`},!e.isPalette&&wv.default.createElement("div",{className:"mk-modal-header"},e.title&&wv.default.createElement("div",{className:"mk-modal-title"},e.title),wv.default.createElement("div",{className:"mk-x-small",dangerouslySetInnerHTML:{__html:e.ui.getSticker("ui//close")},onClick:()=>i()})),(0,wv.cloneElement)(e.fc,{hide:()=>i(),...o})))};return a(e.props),{hide:i,update:a}};var ps=ge(Te()),T8=(e,t)=>{e.ui.openModal("Sync Warnings",ps.default.createElement(XJe,{superstate:e}),t)},XJe=e=>{let{superstate:t}=e,[r,n]=(0,ps.useState)(t.ui.getWarnings()),i=()=>{n(e.superstate.ui.getWarnings().filter(a=>!e.superstate.settings.suppressedWarnings.some(o=>a.id==o)))};return(0,ps.useEffect)(()=>(e.superstate.eventsDispatcher.addListener("settingsChanged",i),()=>{e.superstate.eventsDispatcher.removeListener("settingsChanged",i)}),[]),ps.default.createElement("div",{className:"mk-modal-contents"},ps.default.createElement("div",{className:"mk-modal-message"},"The following issues may affect the synchronization of your files. Please review and resolve them."),ps.default.createElement("div",{className:"mk-button-group"},ps.default.createElement("button",{onClick:()=>{t.eventsDispatcher.dispatchEvent("warningsChanged",null)}},z.buttons.refresh),t.settings.suppressedWarnings.length>0&&ps.default.createElement("button",{onClick:()=>{t.settings.suppressedWarnings=[],t.saveSettings()}},z.buttons.showHidden)),r.length==0&&ps.default.createElement("div",null,ps.default.createElement("div",{className:"mk-modal-heading"},"No warnings")),r.map((a,o)=>ps.default.createElement("div",{key:o,className:"mk-modal-card"},ps.default.createElement("div",{className:"mk-modal-heading"},a.message),ps.default.createElement("div",{className:"mk-modal-description"},a.description),ps.default.createElement("div",{className:"mk-button-group"},a.command.length>0&&ps.default.createElement("button",{onClick:()=>{t.cli.runCommand(a.command,{iterations:0,instanceProps:{},props:{}})}},"Resolve"),ps.default.createElement("button",{onClick:()=>{t.settings.suppressedWarnings=[...t.settings.suppressedWarnings,a.id],t.saveSettings()}},"Ignore")))))};var ua=ge(Te());var EDe=e=>{let{superstate:t}=e,r=(0,ua.useRef)(null),[n,i]=(0,ua.useState)(t.settings.hiddenFiles),[a,o]=(0,ua.useState)(t.settings.hiddenExtensions),s=h=>{t.settings.hiddenExtensions=[...t.settings.hiddenExtensions,h],t.saveSettings(),t.initializePaths()},l=(h,m)=>{t.settings.hiddenFiles=[...t.settings.hiddenFiles,...m],t.saveSettings(),t.initializePaths()},u=h=>{t.settings.hiddenExtensions=t.settings.hiddenExtensions.filter((m,g)=>g!=h),t.saveSettings(),t.initializePaths()},c=h=>{t.settings.hiddenFiles=t.settings.hiddenFiles.filter((m,g)=>g!=h),t.saveSettings(),t.initializePaths()},f=()=>{r?.current.value.length>0&&(s(r.current.value),r.current.innerHTML="")},d=()=>{i(t.settings.hiddenFiles),o(t.settings.hiddenExtensions)};(0,ua.useEffect)(()=>(e.superstate.eventsDispatcher.addListener("settingsChanged",d),()=>{e.superstate.eventsDispatcher.removeListener("settingsChanged",d)}),[]);let p=h=>{let m=h.target.getBoundingClientRect(),g=e.superstate.spaceManager.allPaths().map(A=>({name:sx(A),value:A}));h.stopPropagation(),e.superstate.ui.openMenu(m,{ui:e.superstate.ui,multi:!1,editable:!1,value:[],options:g,saveOptions:l,placeholder:z.labels.linkItemSelectPlaceholder,detail:!0,searchable:!0},je(h.view.document))};return ua.default.createElement("div",{className:"mk-modal-contents"},ua.default.createElement("div",{className:"mk-modal-heading"},z.labels.hiddenFilePattern),ua.default.createElement("div",{className:"mk-modal-description"},z.descriptions.hiddenFileOptions),ua.default.createElement("div",{className:"mk-modal-items"},a.map((h,m)=>ua.default.createElement("div",{key:m,className:"mk-modal-item"},ua.default.createElement("span",null,h),ua.default.createElement("div",{className:"mk-modal-item-button","aria-label":z.buttons.delete,dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//close")},onClick:()=>u(m)})))),ua.default.createElement("div",{className:"mk-modal-item"},ua.default.createElement("input",{placeholder:z.labels.addExtension,type:"text",ref:r}),ua.default.createElement("button",{onClick:h=>f()},z.buttons.add)),ua.default.createElement("div",{className:"mk-modal-heading"},z.subViews.filesAndFolders),ua.default.createElement("div",{className:"mk-modal-description"},z.labels.hiddenFileSpecific),ua.default.createElement("div",{className:"mk-modal-items"},n.map((h,m)=>ua.default.createElement("div",{key:m,className:"mk-modal-item"},ua.default.createElement("span",{className:"mk-modal-item-name"},h),ua.default.createElement("div",{className:"mk-modal-item-button","aria-label":z.buttons.delete,dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//close")},onClick:()=>c(m)})))),ua.default.createElement("div",{className:"mk-modal-item"},ua.default.createElement("button",{onClick:h=>p(h)},"+ ",z.buttons.addFile)))};var iZ=ge(Te());var kDe=(e,t,r)=>{let n=f=>{let d=t.focuses[t.settings.currentWaypoint].paths,p=f?[]:d;t.settings.expandedSpaces=p,t.saveSettings()},i=()=>{t.settings.flowState=!t.settings.flowState,t.saveSettings(),document.body.classList.toggle("mk-flow-state",t.settings.flowState)},a=r.app.workspace.leftSplit&&ar(t.ui),o=()=>{let f=[],d=!0;if(a){let p=r.app.workspace.leftSplit,h=p.children,m=h.reduce((g,A,b)=>A.getViewState().type==gf?b:g,-1);d=m==p.currentTab,f.push(...h.filter((g,A)=>A!=m))}return{leafs:f,spaceActive:d}},{spaceActive:s,leafs:l}=o(),u=[];t.ui.getWarnings().length>0&&(u.push({name:"Show Warnings",icon:"ui//warning",onClick:f=>{T8(t,je(f.view.document))}}),u.push(Ut)),tc(t.ui)||(u.push({name:"Open Overview",icon:"ui//columns",onClick:()=>{r.openEverView()}}),u.push(Ut)),u.push({name:z.menu.collapseAllSections,icon:"ui//chevrons-down-up",onClick:()=>{n(!0)}}),u.push({name:z.menu.expandAllSections,icon:"ui//chevrons-up-down",onClick:()=>{n(!1)}}),u.push(Ut),u.push({name:"Rename System",icon:"ui//edit",onClick:f=>{t.ui.openModal("Rename System",iZ.default.createElement(ji,{value:"",saveLabel:"Rename System",saveValue:d=>{t.settings.systemName=d,t.saveSettings(),t.reloadPath("/",!0)}}),je(f.view.document))}}),u.push({name:z.menu.manageHiddenFiles,icon:"ui//eye-off",onClick:f=>{t.ui.openModal(z.labels.hiddenFiles,iZ.default.createElement(EDe,{superstate:t}),je(f.view.document))}}),u.push(Ut),a&&u.push({name:z.views.navigator,icon:"ui//spaces",onClick:()=>{let f=r.app.workspace.getLeavesOfType(gf);f.length>0&&r.app.workspace.revealLeaf(f[0])}}),l.map(f=>u.push({name:f.getDisplayText(),icon:"lucide//"+f.view.icon,onClick:()=>{r.app.workspace.revealLeaf(f)}})),u.push(Ut),u.push({name:z.menu.obSettings,icon:"ui//settings",onClick:()=>{r.app.commands.commands["app:open-settings"].callback()}}),u.push({name:z.menu.openVault,icon:"ui//vault",onClick:()=>{r.app.commands.commands["app:open-vault"].callback()}}),u.push(Ut),u.push({name:z.menu.getHelp,icon:"ui//mk-logo",onClick:()=>{window.open("https://make.md/community")}});let c=e.getBoundingClientRect();t.ui.openMenu(c,Yt(t.ui,u),je(e.ownerDocument),"bottom")};var F8=class{constructor(t){this.plugin=t;this.availableViews=()=>Object.keys(this.plugin.app.viewRegistry.typeByExtension);this.quickOpen=t=>{this.plugin.quickOpen(t)};this.mainMenu=(t,r)=>{kDe(t,r,this.plugin)};this.onMetadataRefresh=()=>{fD(this.plugin)};this.navigationHistory=()=>this.plugin.app.workspace.getLastOpenFiles();this.getSticker=t=>Xy(t,this.plugin);this.getOS=()=>Ls.Platform.isMacOS?"mac":Ls.Platform.isWin?"windows":Ls.Platform.isLinux?"linux":Ls.Platform.isIosApp?"ios":Ls.Platform.isAndroidApp?"android":"unknown";this.openToast=t=>{new Ls.Notice(t)};this.openPalette=(t,r,n)=>nZ({ui:this,fc:t,isPalette:!0,className:n,win:r});this.openModal=(t,r,n,i,a)=>nZ({ui:this,fc:r,title:t,className:i,props:a,win:n});this.openPopover=(t,r)=>{};this.dragStarted=(t,r)=>{if(r.length!=0)if(r.length==1){let n=r[0],i=Hi(this.plugin.app,n);if(!i)return;if(i instanceof Ls.TFile){let a=this.plugin.app.dragManager.dragFile(t.nativeEvent,i);this.plugin.app.dragManager.onDragStart(t.nativeEvent,a)}else this.plugin.app.dragManager.onDragStart(t.nativeEvent,{icon:"lucide-file",source:void 0,title:i.name,type:"file",file:i}),this.plugin.app.dragManager.dragFolder(t.nativeEvent,i,!0)}else{let n=r.map(i=>Hi(this.plugin.app,i)).filter(i=>i);this.plugin.app.dragManager.onDragStart({...t,doc:document},{icon:"lucide-files",source:void 0,title:z.labels.filesCount.replace("{$1}",n.length.toString()),type:"files",files:n}),this.plugin.app.dragManager.dragFiles({...t,doc:document},n,!0)}};this.setDragLabel=t=>{this.plugin.app.dragManager.setAction(t)};this.dragEnded=t=>{};this.getWarnings=()=>{let t=[];if(this.plugin.obsidianAdapter.fileNameWarnings.size>0&&t.push({id:"obsidian-sync-space-folder",message:"Some files have invalid names",description:"Files contain invalid characters which may cause issues during sync, use alias to display these characters to prevent the issue",command:"obsidian://make-md:path-fixer"}),this.plugin.app.internalPlugins.config.sync){this.plugin.superstate.settings.spaceSubFolder.startsWith(".")&&t.push({id:"obsidian-sync-space-folder",message:"Obsidian Sync currently won't sync your Spaces",description:"Change the space folder name to a non-hidden folder",command:"obsidian://make-md:move-space-folder"});let r=this.plugin.app.internalPlugins.plugins?.sync?.instance?.allowTypes;r&&![...r].some(n=>n=="unsupported")&&t.push({id:"obsidian-sync-space-config",message:"Obsidian Sync currently won't sync your Space Views or Context",description:"Change the sync settings to include unsupported file types",command:"obsidian://app:open-settings"})}return t};this.allStickers=()=>{let t=ECe.map(i=>({name:i,type:"lucide",keywords:i,value:i,html:(0,Ls.getIcon)(i).outerHTML})),r=[...this.plugin.superstate.iconsCache.keys()].map(i=>({name:i,type:"vault",keywords:i,value:i,html:this.plugin.superstate.iconsCache.get(i)}));return[...Object.keys(BS).reduce((i,a)=>[...i,...BS[a].map(o=>({type:"emoji",name:o.n[0],value:o.u,html:o.u}))],[]),...r,...t]};this.getUIPath=(t,r)=>{let n=this.plugin.app.vault.getAbstractFileByPath(t);if(n instanceof Ls.TFile){if(r){let a=this.plugin.superstate.pathsIndex.get(n.path)?.label?.thumbnail;if(a)return this.getUIPath(a)}return this.plugin.app.vault.getResourcePath(n)}else if(t?.match(Y0))return t;return`${uu(this.plugin.app.vault.getResourcePath(this.plugin.app.vault.getRoot()))}${t}`};this.viewsByPath=t=>{let r=Hi(this.plugin.app,t);return r instanceof Ls.TFile?this.plugin.app.workspace.getLeavesOfType("markdown").filter(n=>n.view.file?.path==t).map(n=>({path:n.view.file?.path,openPath:i=>{n.openFile(r)},parent:null,children:[]})):this.plugin.app.workspace.getLeavesOfType(Zl).filter(n=>n.view.getState().path==t).map(n=>({path:n.view.getState().path,openPath:i=>{n.setViewState({type:Zl,state:{path:i}})},parent:null,children:[]}))};this.isEverViewOpen=()=>this.plugin.app.workspace.getLeavesOfType("mk-ever-view").length>0;this.openPath=(t,r,n,i)=>{if(r=="system"){this.plugin.app.showInFolder(t);return}if(r=="overview"){let o=this.plugin.app.workspace.getLeavesOfType("mk-ever-view");if(o.length>0){o[0].setViewState({type:"mk-ever-view",state:{path:t}});return}}if(r=="hover"){this.plugin.app.workspace.trigger("link-hover",{},n,t,t);return}else if(n){let o=this.plugin.superstate.spaceManager.uriByString(t);ADe(this.plugin,this.plugin.app.workspace.getLeaf(),n,null,async s=>{let l=s.attachLeaf();if(this.plugin.app.vault.getAbstractFileByPath(o.basePath)instanceof Ls.TFile){await l.openFile(this.plugin.app.vault.getAbstractFileByPath(o.basePath));let u=hDe(o.basePath,o.refStr,this.plugin);if(!l.view?.editor)return;u[0]&&u[1]&&l.view.editor?.cm.dispatch({annotations:[QA.of(u)]})}else await qY(l,t,this.plugin,!0)});return}let a=LY(this.plugin.app,r);qY(a,t,this.plugin)};this.primaryInteractionType=()=>Ls.Platform.isMobile?0:1;this.getScreenType=()=>Ls.Platform.isPhone?0:Ls.Platform.isTablet?2:1;let r=document.createElement("div");document.body.appendChild(r),r.className="mk-root",this.createRoot=()=>null,this.getRoot=()=>null,this.root=(0,DDe.createRoot)(r),this.root.render(CDe.default.createElement(bDe,{ui:this}))}};var _8=class{constructor(t){this.plugin=t;this.supportedFileTypes=["svg"];this.id="icons.make.md";this.plugin=t}initiate(t){this.middleware=t,this.cache=new Map}async parseCache(t,r){let n={svg:`@font-face { +> Content`,offset:[-7,12],icon:"ui//mk-make-callout"},{label:"internal",value:"link",icon:"ui//mk-make-note"},{label:"link",value:"",offset:[-1,1],icon:"ui//mk-make-link"},{label:"image",value:"image",icon:"ui//mk-make-image"},{label:"flow",value:"note",offset:[-2,4],icon:"ui//mk-make-flow"},{label:"context",value:"context",icon:"ui//layout-list"},{label:"table",value:"table",icon:"ui//mk-make-table"},{label:"board",value:"board",icon:"ui//square-kanban"},{label:"tag",value:"#tag",offset:[0,1],icon:"ui//mk-make-tag"}];function lDe(e){return[...sDe].map(t=>({...t,type:1}))}var uD=class extends uDe.EditorSuggest{constructor(r,n){super(r);this.inCmd=!1;this.cmdStartCh=0;this.plugin=n}resetInfos(){this.cmdStartCh=0,this.inCmd=!1}onTrigger(r,n,i){let a=n.getLine(r.line).slice(0,r.ch),o=this.plugin.superstate.settings.menuTriggerChar.length;if(this.file=i,!this.inCmd&&a.slice(0,o)!==this.plugin.superstate.settings.menuTriggerChar&&a.slice(-2-o)!=="- "+this.plugin.superstate.settings.menuTriggerChar)return this.resetInfos(),null;this.inCmd||(this.cmdStartCh=a.length-o,this.inCmd=!0);let s=a.slice(this.cmdStartCh,r.ch);return s.length>1&&s.includes(" ")||!s.includes(this.plugin.superstate.settings.menuTriggerChar)?(this.resetInfos(),null):{start:r,end:r,query:s.slice(o)}}getSuggestions(r){let n=lDe(this.plugin).filter(({label:i})=>i.toLowerCase().includes(r.query.toLowerCase())||z.commands[i]&&z.commands[i].toLowerCase().includes(r.query.toLowerCase()));return n.length>0?n:[{label:z.commandsSuggest.noResult,value:"",icon:"",type:0}]}renderSuggestion(r,n){if(r.value==""){n.setText(z.commandsSuggest.noResult);return}let i=n.createDiv("mk-slash-item"),a=i.createDiv("mk-slash-icon");a.innerHTML=Xy(r.icon,this.plugin),i.createDiv().setText(z.commands[r.label]??r.label)}selectSuggestion(r,n){let i=this.context.start,a=this.context.end,o=this.cmdStartCh,s=this.context.editor;if(r.label!==z.commandsSuggest.noResult)if(r.value=="note"){let l=n.target.getBoundingClientRect();Ns(l,je(n.view.document),this.plugin.superstate,u=>{s.replaceRange(`![![${u}]]`,{...i,ch:o},a),this.resetInfos(),this.close()})}else if(r.value=="context"){let l=n.target.getBoundingClientRect();Wa(l,je(n.view.document),this.plugin.superstate,u=>{s.replaceRange(C5(this.plugin.superstate.spacesIndex.get(u),"files"),{...i,ch:o},a),s.setSelection({line:i.line,ch:0}),this.resetInfos(),this.close()})}else if(r.value=="link"){let l=n.target.getBoundingClientRect();Ns(l,je(n.view.document),this.plugin.superstate,u=>{s.replaceRange(`[[${u}]]`,{...i,ch:o},a),this.resetInfos(),this.close()})}else r.value=="image"?this.plugin.superstate.ui.openPalette(cDe.default.createElement(Eu,{superstate:this.plugin.superstate,selectedPath:l=>{s.replaceRange(`![[${l}]]`,{...i,ch:o},a),this.resetInfos(),this.close()}}),s.cm.dom.win):r.value=="table"||r.value=="board"||r.value=="calendar"?W2(this.plugin.superstate,this.file.parent.path,r.value).then(l=>{s.replaceRange(k5(this.plugin.superstate.spacesIndex.get(this.file.parent.path),l),{...i,ch:o},a),s.setSelection({line:i.line,ch:0})}):(this.context.editor.replaceRange(r.value,{...this.context.start,ch:this.cmdStartCh},this.context.end),r.offset&&this.context.editor.setSelection({...this.context.start,ch:this.cmdStartCh+r.offset[1]},{...this.context.end,ch:this.cmdStartCh+r.value.length+r.offset[0]}),this.resetInfos(),this.close())}};var fDe=require("obsidian"),ZY=ge(Te());var BS={smileys_people:[{n:["grinning","grinning face"],u:"1f600"},{n:["smiley","smiling face with open mouth"],u:"1f603"},{n:["smile","smiling face with open mouth and smiling eyes"],u:"1f604"},{n:["grin","grinning face with smiling eyes"],u:"1f601"},{n:["laughing","satisfied","smiling face with open mouth and tightly-closed eyes"],u:"1f606"},{n:["sweat smile","smiling face with open mouth and cold sweat"],u:"1f605"},{n:["rolling on the floor laughing"],u:"1f923"},{n:["joy","face with tears of joy"],u:"1f602"},{n:["slightly smiling face"],u:"1f642"},{n:["upside-down face","upside down face"],u:"1f643"},{n:["melting face"],u:"1fae0"},{n:["wink","winking face"],u:"1f609"},{n:["blush","smiling face with smiling eyes"],u:"1f60a"},{n:["innocent","smiling face with halo"],u:"1f607"},{n:["smiling face with 3 hearts","smiling face with smiling eyes and three hearts"],u:"1f970"},{n:["heart eyes","smiling face with heart-shaped eyes"],u:"1f60d"},{n:["star-struck","grinning face with star eyes"],u:"1f929"},{n:["kissing heart","face throwing a kiss"],u:"1f618"},{n:["kissing","kissing face"],u:"1f617"},{n:["relaxed","white smiling face"],u:"263a-fe0f"},{n:["kissing closed eyes","kissing face with closed eyes"],u:"1f61a"},{n:["kissing smiling eyes","kissing face with smiling eyes"],u:"1f619"},{n:["smiling face with tear"],u:"1f972"},{n:["yum","face savouring delicious food"],u:"1f60b"},{n:["stuck out tongue","face with stuck-out tongue"],u:"1f61b"},{n:["stuck out tongue winking eye","face with stuck-out tongue and winking eye"],u:"1f61c"},{n:["zany face","grinning face with one large and one small eye"],u:"1f92a"},{n:["stuck out tongue closed eyes","face with stuck-out tongue and tightly-closed eyes"],u:"1f61d"},{n:["money-mouth face","money mouth face"],u:"1f911"},{n:["hugging face"],u:"1f917"},{n:["face with hand over mouth","smiling face with smiling eyes and hand covering mouth"],u:"1f92d"},{n:["face with open eyes and hand over mouth"],u:"1fae2"},{n:["face with peeking eye"],u:"1fae3"},{n:["shushing face","face with finger covering closed lips"],u:"1f92b"},{n:["thinking face"],u:"1f914"},{n:["saluting face"],u:"1fae1"},{n:["zipper-mouth face","zipper mouth face"],u:"1f910"},{n:["face with raised eyebrow","face with one eyebrow raised"],u:"1f928"},{n:["neutral face"],u:"1f610"},{n:["expressionless","expressionless face"],u:"1f611"},{n:["no mouth","face without mouth"],u:"1f636"},{n:["dotted line face"],u:"1fae5"},{n:["face in clouds"],u:"1f636-200d-1f32b-fe0f"},{n:["smirk","smirking face"],u:"1f60f"},{n:["unamused","unamused face"],u:"1f612"},{n:["face with rolling eyes"],u:"1f644"},{n:["grimacing","grimacing face"],u:"1f62c"},{n:["face exhaling"],u:"1f62e-200d-1f4a8"},{n:["lying face"],u:"1f925"},{n:["relieved","relieved face"],u:"1f60c"},{n:["pensive","pensive face"],u:"1f614"},{n:["sleepy","sleepy face"],u:"1f62a"},{n:["drooling face"],u:"1f924"},{n:["sleeping","sleeping face"],u:"1f634"},{n:["mask","face with medical mask"],u:"1f637"},{n:["face with thermometer"],u:"1f912"},{n:["face with head-bandage","face with head bandage"],u:"1f915"},{n:["nauseated face"],u:"1f922"},{n:["face vomiting","face with open mouth vomiting"],u:"1f92e"},{n:["sneezing face"],u:"1f927"},{n:["hot face","overheated face"],u:"1f975"},{n:["cold face","freezing face"],u:"1f976"},{n:["woozy face","face with uneven eyes and wavy mouth"],u:"1f974"},{n:["dizzy face"],u:"1f635"},{n:["face with spiral eyes"],u:"1f635-200d-1f4ab"},{n:["exploding head","shocked face with exploding head"],u:"1f92f"},{n:["face with cowboy hat"],u:"1f920"},{n:["partying face","face with party horn and party hat"],u:"1f973"},{n:["disguised face"],u:"1f978"},{n:["sunglasses","smiling face with sunglasses"],u:"1f60e"},{n:["nerd face"],u:"1f913"},{n:["face with monocle"],u:"1f9d0"},{n:["confused","confused face"],u:"1f615"},{n:["face with diagonal mouth"],u:"1fae4"},{n:["worried","worried face"],u:"1f61f"},{n:["slightly frowning face"],u:"1f641"},{n:["frowning face","white frowning face"],u:"2639-fe0f"},{n:["open mouth","face with open mouth"],u:"1f62e"},{n:["hushed","hushed face"],u:"1f62f"},{n:["astonished","astonished face"],u:"1f632"},{n:["flushed","flushed face"],u:"1f633"},{n:["pleading face","face with pleading eyes"],u:"1f97a"},{n:["face holding back tears"],u:"1f979"},{n:["frowning","frowning face with open mouth"],u:"1f626"},{n:["anguished","anguished face"],u:"1f627"},{n:["fearful","fearful face"],u:"1f628"},{n:["cold sweat","face with open mouth and cold sweat"],u:"1f630"},{n:["disappointed relieved","disappointed but relieved face"],u:"1f625"},{n:["cry","crying face"],u:"1f622"},{n:["sob","loudly crying face"],u:"1f62d"},{n:["scream","face screaming in fear"],u:"1f631"},{n:["confounded","confounded face"],u:"1f616"},{n:["persevere","persevering face"],u:"1f623"},{n:["disappointed","disappointed face"],u:"1f61e"},{n:["sweat","face with cold sweat"],u:"1f613"},{n:["weary","weary face"],u:"1f629"},{n:["tired face"],u:"1f62b"},{n:["yawning face"],u:"1f971"},{n:["triumph","face with look of triumph"],u:"1f624"},{n:["rage","pouting face"],u:"1f621"},{n:["angry","angry face"],u:"1f620"},{n:["face with symbols on mouth","serious face with symbols covering mouth"],u:"1f92c"},{n:["smiling imp","smiling face with horns"],u:"1f608"},{n:["imp"],u:"1f47f"},{n:["skull"],u:"1f480"},{n:["skull and crossbones"],u:"2620-fe0f"},{n:["poop","shit","hankey","pile of poo"],u:"1f4a9"},{n:["clown face"],u:"1f921"},{n:["japanese ogre"],u:"1f479"},{n:["japanese goblin"],u:"1f47a"},{n:["ghost"],u:"1f47b"},{n:["alien","extraterrestrial alien"],u:"1f47d"},{n:["alien monster","space invader"],u:"1f47e"},{n:["robot face"],u:"1f916"},{n:["smiley cat","smiling cat face with open mouth"],u:"1f63a"},{n:["smile cat","grinning cat face with smiling eyes"],u:"1f638"},{n:["joy cat","cat face with tears of joy"],u:"1f639"},{n:["heart eyes cat","smiling cat face with heart-shaped eyes"],u:"1f63b"},{n:["smirk cat","cat face with wry smile"],u:"1f63c"},{n:["kissing cat","kissing cat face with closed eyes"],u:"1f63d"},{n:["scream cat","weary cat face"],u:"1f640"},{n:["crying cat face"],u:"1f63f"},{n:["pouting cat","pouting cat face"],u:"1f63e"},{n:["see no evil","see-no-evil monkey"],u:"1f648"},{n:["hear no evil","hear-no-evil monkey"],u:"1f649"},{n:["speak no evil","speak-no-evil monkey"],u:"1f64a"},{n:["kiss","kiss mark"],u:"1f48b"},{n:["love letter"],u:"1f48c"},{n:["cupid","heart with arrow"],u:"1f498"},{n:["gift heart","heart with ribbon"],u:"1f49d"},{n:["sparkling heart"],u:"1f496"},{n:["heartpulse","growing heart"],u:"1f497"},{n:["heartbeat","beating heart"],u:"1f493"},{n:["revolving hearts"],u:"1f49e"},{n:["two hearts"],u:"1f495"},{n:["heart decoration"],u:"1f49f"},{n:["heart exclamation","heavy heart exclamation mark ornament"],u:"2763-fe0f"},{n:["broken heart"],u:"1f494"},{n:["heart on fire"],u:"2764-fe0f-200d-1f525"},{n:["mending heart"],u:"2764-fe0f-200d-1fa79"},{n:["heart","heavy black heart"],u:"2764-fe0f"},{n:["orange heart"],u:"1f9e1"},{n:["yellow heart"],u:"1f49b"},{n:["green heart"],u:"1f49a"},{n:["blue heart"],u:"1f499"},{n:["purple heart"],u:"1f49c"},{n:["brown heart"],u:"1f90e"},{n:["black heart"],u:"1f5a4"},{n:["white heart"],u:"1f90d"},{n:["100","hundred points symbol"],u:"1f4af"},{n:["anger","anger symbol"],u:"1f4a2"},{n:["boom","collision","collision symbol"],u:"1f4a5"},{n:["dizzy","dizzy symbol"],u:"1f4ab"},{n:["sweat drops","splashing sweat symbol"],u:"1f4a6"},{n:["dash","dash symbol"],u:"1f4a8"},{n:["hole"],u:"1f573-fe0f"},{n:["bomb"],u:"1f4a3"},{n:["speech balloon"],u:"1f4ac"},{n:["eye in speech bubble","eye-in-speech-bubble"],u:"1f441-fe0f-200d-1f5e8-fe0f"},{n:["left speech bubble"],u:"1f5e8-fe0f"},{n:["right anger bubble"],u:"1f5ef-fe0f"},{n:["thought balloon"],u:"1f4ad"},{n:["zzz","sleeping symbol"],u:"1f4a4"},{n:["wave","waving hand sign"],u:"1f44b",v:["1f44b-1f3fb","1f44b-1f3fc","1f44b-1f3fd","1f44b-1f3fe","1f44b-1f3ff"]},{n:["raised back of hand"],u:"1f91a",v:["1f91a-1f3fb","1f91a-1f3fc","1f91a-1f3fd","1f91a-1f3fe","1f91a-1f3ff"]},{n:["hand with fingers splayed","raised hand with fingers splayed"],u:"1f590-fe0f",v:["1f590-1f3fb","1f590-1f3fc","1f590-1f3fd","1f590-1f3fe","1f590-1f3ff"]},{n:["hand","raised hand"],u:"270b",v:["270b-1f3fb","270b-1f3fc","270b-1f3fd","270b-1f3fe","270b-1f3ff"]},{n:["spock-hand","raised hand with part between middle and ring fingers"],u:"1f596",v:["1f596-1f3fb","1f596-1f3fc","1f596-1f3fd","1f596-1f3fe","1f596-1f3ff"]},{n:["rightwards hand"],u:"1faf1",v:["1faf1-1f3fb","1faf1-1f3fc","1faf1-1f3fd","1faf1-1f3fe","1faf1-1f3ff"]},{n:["leftwards hand"],u:"1faf2",v:["1faf2-1f3fb","1faf2-1f3fc","1faf2-1f3fd","1faf2-1f3fe","1faf2-1f3ff"]},{n:["palm down hand"],u:"1faf3",v:["1faf3-1f3fb","1faf3-1f3fc","1faf3-1f3fd","1faf3-1f3fe","1faf3-1f3ff"]},{n:["palm up hand"],u:"1faf4",v:["1faf4-1f3fb","1faf4-1f3fc","1faf4-1f3fd","1faf4-1f3fe","1faf4-1f3ff"]},{n:["ok hand","ok hand sign"],u:"1f44c",v:["1f44c-1f3fb","1f44c-1f3fc","1f44c-1f3fd","1f44c-1f3fe","1f44c-1f3ff"]},{n:["pinched fingers"],u:"1f90c",v:["1f90c-1f3fb","1f90c-1f3fc","1f90c-1f3fd","1f90c-1f3fe","1f90c-1f3ff"]},{n:["pinching hand"],u:"1f90f",v:["1f90f-1f3fb","1f90f-1f3fc","1f90f-1f3fd","1f90f-1f3fe","1f90f-1f3ff"]},{n:["v","victory hand"],u:"270c-fe0f",v:["270c-1f3fb","270c-1f3fc","270c-1f3fd","270c-1f3fe","270c-1f3ff"]},{n:["crossed fingers","hand with index and middle fingers crossed"],u:"1f91e",v:["1f91e-1f3fb","1f91e-1f3fc","1f91e-1f3fd","1f91e-1f3fe","1f91e-1f3ff"]},{n:["hand with index finger and thumb crossed"],u:"1faf0",v:["1faf0-1f3fb","1faf0-1f3fc","1faf0-1f3fd","1faf0-1f3fe","1faf0-1f3ff"]},{n:["i love you hand sign"],u:"1f91f",v:["1f91f-1f3fb","1f91f-1f3fc","1f91f-1f3fd","1f91f-1f3fe","1f91f-1f3ff"]},{n:["the horns","sign of the horns"],u:"1f918",v:["1f918-1f3fb","1f918-1f3fc","1f918-1f3fd","1f918-1f3fe","1f918-1f3ff"]},{n:["call me hand"],u:"1f919",v:["1f919-1f3fb","1f919-1f3fc","1f919-1f3fd","1f919-1f3fe","1f919-1f3ff"]},{n:["point left","white left pointing backhand index"],u:"1f448",v:["1f448-1f3fb","1f448-1f3fc","1f448-1f3fd","1f448-1f3fe","1f448-1f3ff"]},{n:["point right","white right pointing backhand index"],u:"1f449",v:["1f449-1f3fb","1f449-1f3fc","1f449-1f3fd","1f449-1f3fe","1f449-1f3ff"]},{n:["point up 2","white up pointing backhand index"],u:"1f446",v:["1f446-1f3fb","1f446-1f3fc","1f446-1f3fd","1f446-1f3fe","1f446-1f3ff"]},{n:["middle finger","reversed hand with middle finger extended"],u:"1f595",v:["1f595-1f3fb","1f595-1f3fc","1f595-1f3fd","1f595-1f3fe","1f595-1f3ff"]},{n:["point down","white down pointing backhand index"],u:"1f447",v:["1f447-1f3fb","1f447-1f3fc","1f447-1f3fd","1f447-1f3fe","1f447-1f3ff"]},{n:["point up","white up pointing index"],u:"261d-fe0f",v:["261d-1f3fb","261d-1f3fc","261d-1f3fd","261d-1f3fe","261d-1f3ff"]},{n:["index pointing at the viewer"],u:"1faf5",v:["1faf5-1f3fb","1faf5-1f3fc","1faf5-1f3fd","1faf5-1f3fe","1faf5-1f3ff"]},{n:["+1","thumbsup","thumbs up sign"],u:"1f44d",v:["1f44d-1f3fb","1f44d-1f3fc","1f44d-1f3fd","1f44d-1f3fe","1f44d-1f3ff"]},{n:["-1","thumbsdown","thumbs down sign"],u:"1f44e",v:["1f44e-1f3fb","1f44e-1f3fc","1f44e-1f3fd","1f44e-1f3fe","1f44e-1f3ff"]},{n:["fist","raised fist"],u:"270a",v:["270a-1f3fb","270a-1f3fc","270a-1f3fd","270a-1f3fe","270a-1f3ff"]},{n:["punch","facepunch","fisted hand sign"],u:"1f44a",v:["1f44a-1f3fb","1f44a-1f3fc","1f44a-1f3fd","1f44a-1f3fe","1f44a-1f3ff"]},{n:["left-facing fist"],u:"1f91b",v:["1f91b-1f3fb","1f91b-1f3fc","1f91b-1f3fd","1f91b-1f3fe","1f91b-1f3ff"]},{n:["right-facing fist"],u:"1f91c",v:["1f91c-1f3fb","1f91c-1f3fc","1f91c-1f3fd","1f91c-1f3fe","1f91c-1f3ff"]},{n:["clap","clapping hands sign"],u:"1f44f",v:["1f44f-1f3fb","1f44f-1f3fc","1f44f-1f3fd","1f44f-1f3fe","1f44f-1f3ff"]},{n:["raised hands","person raising both hands in celebration"],u:"1f64c",v:["1f64c-1f3fb","1f64c-1f3fc","1f64c-1f3fd","1f64c-1f3fe","1f64c-1f3ff"]},{n:["heart hands"],u:"1faf6",v:["1faf6-1f3fb","1faf6-1f3fc","1faf6-1f3fd","1faf6-1f3fe","1faf6-1f3ff"]},{n:["open hands","open hands sign"],u:"1f450",v:["1f450-1f3fb","1f450-1f3fc","1f450-1f3fd","1f450-1f3fe","1f450-1f3ff"]},{n:["palms up together"],u:"1f932",v:["1f932-1f3fb","1f932-1f3fc","1f932-1f3fd","1f932-1f3fe","1f932-1f3ff"]},{n:["handshake"],u:"1f91d",v:["1f91d-1f3fb","1f91d-1f3fc","1f91d-1f3fd","1f91d-1f3fe","1f91d-1f3ff","1faf1-1f3fb-200d-1faf2-1f3fc","1faf1-1f3fb-200d-1faf2-1f3fd","1faf1-1f3fb-200d-1faf2-1f3fe","1faf1-1f3fb-200d-1faf2-1f3ff","1faf1-1f3fc-200d-1faf2-1f3fb","1faf1-1f3fc-200d-1faf2-1f3fd","1faf1-1f3fc-200d-1faf2-1f3fe","1faf1-1f3fc-200d-1faf2-1f3ff","1faf1-1f3fd-200d-1faf2-1f3fb","1faf1-1f3fd-200d-1faf2-1f3fc","1faf1-1f3fd-200d-1faf2-1f3fe","1faf1-1f3fd-200d-1faf2-1f3ff","1faf1-1f3fe-200d-1faf2-1f3fb","1faf1-1f3fe-200d-1faf2-1f3fc","1faf1-1f3fe-200d-1faf2-1f3fd","1faf1-1f3fe-200d-1faf2-1f3ff","1faf1-1f3ff-200d-1faf2-1f3fb","1faf1-1f3ff-200d-1faf2-1f3fc","1faf1-1f3ff-200d-1faf2-1f3fd","1faf1-1f3ff-200d-1faf2-1f3fe"]},{n:["pray","person with folded hands"],u:"1f64f",v:["1f64f-1f3fb","1f64f-1f3fc","1f64f-1f3fd","1f64f-1f3fe","1f64f-1f3ff"]},{n:["writing hand"],u:"270d-fe0f",v:["270d-1f3fb","270d-1f3fc","270d-1f3fd","270d-1f3fe","270d-1f3ff"]},{n:["nail care","nail polish"],u:"1f485",v:["1f485-1f3fb","1f485-1f3fc","1f485-1f3fd","1f485-1f3fe","1f485-1f3ff"]},{n:["selfie"],u:"1f933",v:["1f933-1f3fb","1f933-1f3fc","1f933-1f3fd","1f933-1f3fe","1f933-1f3ff"]},{n:["muscle","flexed biceps"],u:"1f4aa",v:["1f4aa-1f3fb","1f4aa-1f3fc","1f4aa-1f3fd","1f4aa-1f3fe","1f4aa-1f3ff"]},{n:["mechanical arm"],u:"1f9be"},{n:["mechanical leg"],u:"1f9bf"},{n:["leg"],u:"1f9b5",v:["1f9b5-1f3fb","1f9b5-1f3fc","1f9b5-1f3fd","1f9b5-1f3fe","1f9b5-1f3ff"]},{n:["foot"],u:"1f9b6",v:["1f9b6-1f3fb","1f9b6-1f3fc","1f9b6-1f3fd","1f9b6-1f3fe","1f9b6-1f3ff"]},{n:["ear"],u:"1f442",v:["1f442-1f3fb","1f442-1f3fc","1f442-1f3fd","1f442-1f3fe","1f442-1f3ff"]},{n:["ear with hearing aid"],u:"1f9bb",v:["1f9bb-1f3fb","1f9bb-1f3fc","1f9bb-1f3fd","1f9bb-1f3fe","1f9bb-1f3ff"]},{n:["nose"],u:"1f443",v:["1f443-1f3fb","1f443-1f3fc","1f443-1f3fd","1f443-1f3fe","1f443-1f3ff"]},{n:["brain"],u:"1f9e0"},{n:["anatomical heart"],u:"1fac0"},{n:["lungs"],u:"1fac1"},{n:["tooth"],u:"1f9b7"},{n:["bone"],u:"1f9b4"},{n:["eyes"],u:"1f440"},{n:["eye"],u:"1f441-fe0f"},{n:["tongue"],u:"1f445"},{n:["lips","mouth"],u:"1f444"},{n:["biting lip"],u:"1fae6"},{n:["baby"],u:"1f476",v:["1f476-1f3fb","1f476-1f3fc","1f476-1f3fd","1f476-1f3fe","1f476-1f3ff"]},{n:["child"],u:"1f9d2",v:["1f9d2-1f3fb","1f9d2-1f3fc","1f9d2-1f3fd","1f9d2-1f3fe","1f9d2-1f3ff"]},{n:["boy"],u:"1f466",v:["1f466-1f3fb","1f466-1f3fc","1f466-1f3fd","1f466-1f3fe","1f466-1f3ff"]},{n:["girl"],u:"1f467",v:["1f467-1f3fb","1f467-1f3fc","1f467-1f3fd","1f467-1f3fe","1f467-1f3ff"]},{n:["adult"],u:"1f9d1",v:["1f9d1-1f3fb","1f9d1-1f3fc","1f9d1-1f3fd","1f9d1-1f3fe","1f9d1-1f3ff"]},{n:["person with blond hair"],u:"1f471",v:["1f471-1f3fb","1f471-1f3fc","1f471-1f3fd","1f471-1f3fe","1f471-1f3ff"]},{n:["man"],u:"1f468",v:["1f468-1f3fb","1f468-1f3fc","1f468-1f3fd","1f468-1f3fe","1f468-1f3ff"]},{n:["bearded person"],u:"1f9d4",v:["1f9d4-1f3fb","1f9d4-1f3fc","1f9d4-1f3fd","1f9d4-1f3fe","1f9d4-1f3ff"]},{n:["man: beard","man with beard"],u:"1f9d4-200d-2642-fe0f",v:["1f9d4-1f3fb-200d-2642-fe0f","1f9d4-1f3fc-200d-2642-fe0f","1f9d4-1f3fd-200d-2642-fe0f","1f9d4-1f3fe-200d-2642-fe0f","1f9d4-1f3ff-200d-2642-fe0f"]},{n:["woman: beard","woman with beard"],u:"1f9d4-200d-2640-fe0f",v:["1f9d4-1f3fb-200d-2640-fe0f","1f9d4-1f3fc-200d-2640-fe0f","1f9d4-1f3fd-200d-2640-fe0f","1f9d4-1f3fe-200d-2640-fe0f","1f9d4-1f3ff-200d-2640-fe0f"]},{n:["man: red hair","red haired man"],u:"1f468-200d-1f9b0",v:["1f468-1f3fb-200d-1f9b0","1f468-1f3fc-200d-1f9b0","1f468-1f3fd-200d-1f9b0","1f468-1f3fe-200d-1f9b0","1f468-1f3ff-200d-1f9b0"]},{n:["man: curly hair","curly haired man"],u:"1f468-200d-1f9b1",v:["1f468-1f3fb-200d-1f9b1","1f468-1f3fc-200d-1f9b1","1f468-1f3fd-200d-1f9b1","1f468-1f3fe-200d-1f9b1","1f468-1f3ff-200d-1f9b1"]},{n:["man: white hair","white haired man"],u:"1f468-200d-1f9b3",v:["1f468-1f3fb-200d-1f9b3","1f468-1f3fc-200d-1f9b3","1f468-1f3fd-200d-1f9b3","1f468-1f3fe-200d-1f9b3","1f468-1f3ff-200d-1f9b3"]},{n:["bald man","man: bald"],u:"1f468-200d-1f9b2",v:["1f468-1f3fb-200d-1f9b2","1f468-1f3fc-200d-1f9b2","1f468-1f3fd-200d-1f9b2","1f468-1f3fe-200d-1f9b2","1f468-1f3ff-200d-1f9b2"]},{n:["woman"],u:"1f469",v:["1f469-1f3fb","1f469-1f3fc","1f469-1f3fd","1f469-1f3fe","1f469-1f3ff"]},{n:["woman: red hair","red haired woman"],u:"1f469-200d-1f9b0",v:["1f469-1f3fb-200d-1f9b0","1f469-1f3fc-200d-1f9b0","1f469-1f3fd-200d-1f9b0","1f469-1f3fe-200d-1f9b0","1f469-1f3ff-200d-1f9b0"]},{n:["person: red hair","red haired person"],u:"1f9d1-200d-1f9b0",v:["1f9d1-1f3fb-200d-1f9b0","1f9d1-1f3fc-200d-1f9b0","1f9d1-1f3fd-200d-1f9b0","1f9d1-1f3fe-200d-1f9b0","1f9d1-1f3ff-200d-1f9b0"]},{n:["woman: curly hair","curly haired woman"],u:"1f469-200d-1f9b1",v:["1f469-1f3fb-200d-1f9b1","1f469-1f3fc-200d-1f9b1","1f469-1f3fd-200d-1f9b1","1f469-1f3fe-200d-1f9b1","1f469-1f3ff-200d-1f9b1"]},{n:["person: curly hair","curly haired person"],u:"1f9d1-200d-1f9b1",v:["1f9d1-1f3fb-200d-1f9b1","1f9d1-1f3fc-200d-1f9b1","1f9d1-1f3fd-200d-1f9b1","1f9d1-1f3fe-200d-1f9b1","1f9d1-1f3ff-200d-1f9b1"]},{n:["woman: white hair","white haired woman"],u:"1f469-200d-1f9b3",v:["1f469-1f3fb-200d-1f9b3","1f469-1f3fc-200d-1f9b3","1f469-1f3fd-200d-1f9b3","1f469-1f3fe-200d-1f9b3","1f469-1f3ff-200d-1f9b3"]},{n:["person: white hair","white haired person"],u:"1f9d1-200d-1f9b3",v:["1f9d1-1f3fb-200d-1f9b3","1f9d1-1f3fc-200d-1f9b3","1f9d1-1f3fd-200d-1f9b3","1f9d1-1f3fe-200d-1f9b3","1f9d1-1f3ff-200d-1f9b3"]},{n:["bald woman","woman: bald"],u:"1f469-200d-1f9b2",v:["1f469-1f3fb-200d-1f9b2","1f469-1f3fc-200d-1f9b2","1f469-1f3fd-200d-1f9b2","1f469-1f3fe-200d-1f9b2","1f469-1f3ff-200d-1f9b2"]},{n:["bald person","person: bald"],u:"1f9d1-200d-1f9b2",v:["1f9d1-1f3fb-200d-1f9b2","1f9d1-1f3fc-200d-1f9b2","1f9d1-1f3fd-200d-1f9b2","1f9d1-1f3fe-200d-1f9b2","1f9d1-1f3ff-200d-1f9b2"]},{n:["woman: blond hair","blond-haired-woman"],u:"1f471-200d-2640-fe0f",v:["1f471-1f3fb-200d-2640-fe0f","1f471-1f3fc-200d-2640-fe0f","1f471-1f3fd-200d-2640-fe0f","1f471-1f3fe-200d-2640-fe0f","1f471-1f3ff-200d-2640-fe0f"]},{n:["man: blond hair","blond-haired-man"],u:"1f471-200d-2642-fe0f",v:["1f471-1f3fb-200d-2642-fe0f","1f471-1f3fc-200d-2642-fe0f","1f471-1f3fd-200d-2642-fe0f","1f471-1f3fe-200d-2642-fe0f","1f471-1f3ff-200d-2642-fe0f"]},{n:["older adult"],u:"1f9d3",v:["1f9d3-1f3fb","1f9d3-1f3fc","1f9d3-1f3fd","1f9d3-1f3fe","1f9d3-1f3ff"]},{n:["older man"],u:"1f474",v:["1f474-1f3fb","1f474-1f3fc","1f474-1f3fd","1f474-1f3fe","1f474-1f3ff"]},{n:["older woman"],u:"1f475",v:["1f475-1f3fb","1f475-1f3fc","1f475-1f3fd","1f475-1f3fe","1f475-1f3ff"]},{n:["person frowning"],u:"1f64d",v:["1f64d-1f3fb","1f64d-1f3fc","1f64d-1f3fd","1f64d-1f3fe","1f64d-1f3ff"]},{n:["man frowning","man-frowning"],u:"1f64d-200d-2642-fe0f",v:["1f64d-1f3fb-200d-2642-fe0f","1f64d-1f3fc-200d-2642-fe0f","1f64d-1f3fd-200d-2642-fe0f","1f64d-1f3fe-200d-2642-fe0f","1f64d-1f3ff-200d-2642-fe0f"]},{n:["woman frowning","woman-frowning"],u:"1f64d-200d-2640-fe0f",v:["1f64d-1f3fb-200d-2640-fe0f","1f64d-1f3fc-200d-2640-fe0f","1f64d-1f3fd-200d-2640-fe0f","1f64d-1f3fe-200d-2640-fe0f","1f64d-1f3ff-200d-2640-fe0f"]},{n:["person with pouting face"],u:"1f64e",v:["1f64e-1f3fb","1f64e-1f3fc","1f64e-1f3fd","1f64e-1f3fe","1f64e-1f3ff"]},{n:["man pouting","man-pouting"],u:"1f64e-200d-2642-fe0f",v:["1f64e-1f3fb-200d-2642-fe0f","1f64e-1f3fc-200d-2642-fe0f","1f64e-1f3fd-200d-2642-fe0f","1f64e-1f3fe-200d-2642-fe0f","1f64e-1f3ff-200d-2642-fe0f"]},{n:["woman pouting","woman-pouting"],u:"1f64e-200d-2640-fe0f",v:["1f64e-1f3fb-200d-2640-fe0f","1f64e-1f3fc-200d-2640-fe0f","1f64e-1f3fd-200d-2640-fe0f","1f64e-1f3fe-200d-2640-fe0f","1f64e-1f3ff-200d-2640-fe0f"]},{n:["no good","face with no good gesture"],u:"1f645",v:["1f645-1f3fb","1f645-1f3fc","1f645-1f3fd","1f645-1f3fe","1f645-1f3ff"]},{n:["man gesturing no","man-gesturing-no"],u:"1f645-200d-2642-fe0f",v:["1f645-1f3fb-200d-2642-fe0f","1f645-1f3fc-200d-2642-fe0f","1f645-1f3fd-200d-2642-fe0f","1f645-1f3fe-200d-2642-fe0f","1f645-1f3ff-200d-2642-fe0f"]},{n:["woman gesturing no","woman-gesturing-no"],u:"1f645-200d-2640-fe0f",v:["1f645-1f3fb-200d-2640-fe0f","1f645-1f3fc-200d-2640-fe0f","1f645-1f3fd-200d-2640-fe0f","1f645-1f3fe-200d-2640-fe0f","1f645-1f3ff-200d-2640-fe0f"]},{n:["ok woman","face with ok gesture"],u:"1f646",v:["1f646-1f3fb","1f646-1f3fc","1f646-1f3fd","1f646-1f3fe","1f646-1f3ff"]},{n:["man gesturing ok","man-gesturing-ok"],u:"1f646-200d-2642-fe0f",v:["1f646-1f3fb-200d-2642-fe0f","1f646-1f3fc-200d-2642-fe0f","1f646-1f3fd-200d-2642-fe0f","1f646-1f3fe-200d-2642-fe0f","1f646-1f3ff-200d-2642-fe0f"]},{n:["woman gesturing ok","woman-gesturing-ok"],u:"1f646-200d-2640-fe0f",v:["1f646-1f3fb-200d-2640-fe0f","1f646-1f3fc-200d-2640-fe0f","1f646-1f3fd-200d-2640-fe0f","1f646-1f3fe-200d-2640-fe0f","1f646-1f3ff-200d-2640-fe0f"]},{n:["information desk person"],u:"1f481",v:["1f481-1f3fb","1f481-1f3fc","1f481-1f3fd","1f481-1f3fe","1f481-1f3ff"]},{n:["man tipping hand","man-tipping-hand"],u:"1f481-200d-2642-fe0f",v:["1f481-1f3fb-200d-2642-fe0f","1f481-1f3fc-200d-2642-fe0f","1f481-1f3fd-200d-2642-fe0f","1f481-1f3fe-200d-2642-fe0f","1f481-1f3ff-200d-2642-fe0f"]},{n:["woman tipping hand","woman-tipping-hand"],u:"1f481-200d-2640-fe0f",v:["1f481-1f3fb-200d-2640-fe0f","1f481-1f3fc-200d-2640-fe0f","1f481-1f3fd-200d-2640-fe0f","1f481-1f3fe-200d-2640-fe0f","1f481-1f3ff-200d-2640-fe0f"]},{n:["raising hand","happy person raising one hand"],u:"1f64b",v:["1f64b-1f3fb","1f64b-1f3fc","1f64b-1f3fd","1f64b-1f3fe","1f64b-1f3ff"]},{n:["man raising hand","man-raising-hand"],u:"1f64b-200d-2642-fe0f",v:["1f64b-1f3fb-200d-2642-fe0f","1f64b-1f3fc-200d-2642-fe0f","1f64b-1f3fd-200d-2642-fe0f","1f64b-1f3fe-200d-2642-fe0f","1f64b-1f3ff-200d-2642-fe0f"]},{n:["woman raising hand","woman-raising-hand"],u:"1f64b-200d-2640-fe0f",v:["1f64b-1f3fb-200d-2640-fe0f","1f64b-1f3fc-200d-2640-fe0f","1f64b-1f3fd-200d-2640-fe0f","1f64b-1f3fe-200d-2640-fe0f","1f64b-1f3ff-200d-2640-fe0f"]},{n:["deaf person"],u:"1f9cf",v:["1f9cf-1f3fb","1f9cf-1f3fc","1f9cf-1f3fd","1f9cf-1f3fe","1f9cf-1f3ff"]},{n:["deaf man"],u:"1f9cf-200d-2642-fe0f",v:["1f9cf-1f3fb-200d-2642-fe0f","1f9cf-1f3fc-200d-2642-fe0f","1f9cf-1f3fd-200d-2642-fe0f","1f9cf-1f3fe-200d-2642-fe0f","1f9cf-1f3ff-200d-2642-fe0f"]},{n:["deaf woman"],u:"1f9cf-200d-2640-fe0f",v:["1f9cf-1f3fb-200d-2640-fe0f","1f9cf-1f3fc-200d-2640-fe0f","1f9cf-1f3fd-200d-2640-fe0f","1f9cf-1f3fe-200d-2640-fe0f","1f9cf-1f3ff-200d-2640-fe0f"]},{n:["bow","person bowing deeply"],u:"1f647",v:["1f647-1f3fb","1f647-1f3fc","1f647-1f3fd","1f647-1f3fe","1f647-1f3ff"]},{n:["man bowing","man-bowing"],u:"1f647-200d-2642-fe0f",v:["1f647-1f3fb-200d-2642-fe0f","1f647-1f3fc-200d-2642-fe0f","1f647-1f3fd-200d-2642-fe0f","1f647-1f3fe-200d-2642-fe0f","1f647-1f3ff-200d-2642-fe0f"]},{n:["woman bowing","woman-bowing"],u:"1f647-200d-2640-fe0f",v:["1f647-1f3fb-200d-2640-fe0f","1f647-1f3fc-200d-2640-fe0f","1f647-1f3fd-200d-2640-fe0f","1f647-1f3fe-200d-2640-fe0f","1f647-1f3ff-200d-2640-fe0f"]},{n:["face palm"],u:"1f926",v:["1f926-1f3fb","1f926-1f3fc","1f926-1f3fd","1f926-1f3fe","1f926-1f3ff"]},{n:["man facepalming","man-facepalming"],u:"1f926-200d-2642-fe0f",v:["1f926-1f3fb-200d-2642-fe0f","1f926-1f3fc-200d-2642-fe0f","1f926-1f3fd-200d-2642-fe0f","1f926-1f3fe-200d-2642-fe0f","1f926-1f3ff-200d-2642-fe0f"]},{n:["woman facepalming","woman-facepalming"],u:"1f926-200d-2640-fe0f",v:["1f926-1f3fb-200d-2640-fe0f","1f926-1f3fc-200d-2640-fe0f","1f926-1f3fd-200d-2640-fe0f","1f926-1f3fe-200d-2640-fe0f","1f926-1f3ff-200d-2640-fe0f"]},{n:["shrug"],u:"1f937",v:["1f937-1f3fb","1f937-1f3fc","1f937-1f3fd","1f937-1f3fe","1f937-1f3ff"]},{n:["man shrugging","man-shrugging"],u:"1f937-200d-2642-fe0f",v:["1f937-1f3fb-200d-2642-fe0f","1f937-1f3fc-200d-2642-fe0f","1f937-1f3fd-200d-2642-fe0f","1f937-1f3fe-200d-2642-fe0f","1f937-1f3ff-200d-2642-fe0f"]},{n:["woman shrugging","woman-shrugging"],u:"1f937-200d-2640-fe0f",v:["1f937-1f3fb-200d-2640-fe0f","1f937-1f3fc-200d-2640-fe0f","1f937-1f3fd-200d-2640-fe0f","1f937-1f3fe-200d-2640-fe0f","1f937-1f3ff-200d-2640-fe0f"]},{n:["health worker"],u:"1f9d1-200d-2695-fe0f",v:["1f9d1-1f3fb-200d-2695-fe0f","1f9d1-1f3fc-200d-2695-fe0f","1f9d1-1f3fd-200d-2695-fe0f","1f9d1-1f3fe-200d-2695-fe0f","1f9d1-1f3ff-200d-2695-fe0f"]},{n:["male-doctor","man health worker"],u:"1f468-200d-2695-fe0f",v:["1f468-1f3fb-200d-2695-fe0f","1f468-1f3fc-200d-2695-fe0f","1f468-1f3fd-200d-2695-fe0f","1f468-1f3fe-200d-2695-fe0f","1f468-1f3ff-200d-2695-fe0f"]},{n:["female-doctor","woman health worker"],u:"1f469-200d-2695-fe0f",v:["1f469-1f3fb-200d-2695-fe0f","1f469-1f3fc-200d-2695-fe0f","1f469-1f3fd-200d-2695-fe0f","1f469-1f3fe-200d-2695-fe0f","1f469-1f3ff-200d-2695-fe0f"]},{n:["student"],u:"1f9d1-200d-1f393",v:["1f9d1-1f3fb-200d-1f393","1f9d1-1f3fc-200d-1f393","1f9d1-1f3fd-200d-1f393","1f9d1-1f3fe-200d-1f393","1f9d1-1f3ff-200d-1f393"]},{n:["man student","male-student"],u:"1f468-200d-1f393",v:["1f468-1f3fb-200d-1f393","1f468-1f3fc-200d-1f393","1f468-1f3fd-200d-1f393","1f468-1f3fe-200d-1f393","1f468-1f3ff-200d-1f393"]},{n:["woman student","female-student"],u:"1f469-200d-1f393",v:["1f469-1f3fb-200d-1f393","1f469-1f3fc-200d-1f393","1f469-1f3fd-200d-1f393","1f469-1f3fe-200d-1f393","1f469-1f3ff-200d-1f393"]},{n:["teacher"],u:"1f9d1-200d-1f3eb",v:["1f9d1-1f3fb-200d-1f3eb","1f9d1-1f3fc-200d-1f3eb","1f9d1-1f3fd-200d-1f3eb","1f9d1-1f3fe-200d-1f3eb","1f9d1-1f3ff-200d-1f3eb"]},{n:["man teacher","male-teacher"],u:"1f468-200d-1f3eb",v:["1f468-1f3fb-200d-1f3eb","1f468-1f3fc-200d-1f3eb","1f468-1f3fd-200d-1f3eb","1f468-1f3fe-200d-1f3eb","1f468-1f3ff-200d-1f3eb"]},{n:["woman teacher","female-teacher"],u:"1f469-200d-1f3eb",v:["1f469-1f3fb-200d-1f3eb","1f469-1f3fc-200d-1f3eb","1f469-1f3fd-200d-1f3eb","1f469-1f3fe-200d-1f3eb","1f469-1f3ff-200d-1f3eb"]},{n:["judge"],u:"1f9d1-200d-2696-fe0f",v:["1f9d1-1f3fb-200d-2696-fe0f","1f9d1-1f3fc-200d-2696-fe0f","1f9d1-1f3fd-200d-2696-fe0f","1f9d1-1f3fe-200d-2696-fe0f","1f9d1-1f3ff-200d-2696-fe0f"]},{n:["man judge","male-judge"],u:"1f468-200d-2696-fe0f",v:["1f468-1f3fb-200d-2696-fe0f","1f468-1f3fc-200d-2696-fe0f","1f468-1f3fd-200d-2696-fe0f","1f468-1f3fe-200d-2696-fe0f","1f468-1f3ff-200d-2696-fe0f"]},{n:["woman judge","female-judge"],u:"1f469-200d-2696-fe0f",v:["1f469-1f3fb-200d-2696-fe0f","1f469-1f3fc-200d-2696-fe0f","1f469-1f3fd-200d-2696-fe0f","1f469-1f3fe-200d-2696-fe0f","1f469-1f3ff-200d-2696-fe0f"]},{n:["farmer"],u:"1f9d1-200d-1f33e",v:["1f9d1-1f3fb-200d-1f33e","1f9d1-1f3fc-200d-1f33e","1f9d1-1f3fd-200d-1f33e","1f9d1-1f3fe-200d-1f33e","1f9d1-1f3ff-200d-1f33e"]},{n:["man farmer","male-farmer"],u:"1f468-200d-1f33e",v:["1f468-1f3fb-200d-1f33e","1f468-1f3fc-200d-1f33e","1f468-1f3fd-200d-1f33e","1f468-1f3fe-200d-1f33e","1f468-1f3ff-200d-1f33e"]},{n:["woman farmer","female-farmer"],u:"1f469-200d-1f33e",v:["1f469-1f3fb-200d-1f33e","1f469-1f3fc-200d-1f33e","1f469-1f3fd-200d-1f33e","1f469-1f3fe-200d-1f33e","1f469-1f3ff-200d-1f33e"]},{n:["cook"],u:"1f9d1-200d-1f373",v:["1f9d1-1f3fb-200d-1f373","1f9d1-1f3fc-200d-1f373","1f9d1-1f3fd-200d-1f373","1f9d1-1f3fe-200d-1f373","1f9d1-1f3ff-200d-1f373"]},{n:["man cook","male-cook"],u:"1f468-200d-1f373",v:["1f468-1f3fb-200d-1f373","1f468-1f3fc-200d-1f373","1f468-1f3fd-200d-1f373","1f468-1f3fe-200d-1f373","1f468-1f3ff-200d-1f373"]},{n:["woman cook","female-cook"],u:"1f469-200d-1f373",v:["1f469-1f3fb-200d-1f373","1f469-1f3fc-200d-1f373","1f469-1f3fd-200d-1f373","1f469-1f3fe-200d-1f373","1f469-1f3ff-200d-1f373"]},{n:["mechanic"],u:"1f9d1-200d-1f527",v:["1f9d1-1f3fb-200d-1f527","1f9d1-1f3fc-200d-1f527","1f9d1-1f3fd-200d-1f527","1f9d1-1f3fe-200d-1f527","1f9d1-1f3ff-200d-1f527"]},{n:["man mechanic","male-mechanic"],u:"1f468-200d-1f527",v:["1f468-1f3fb-200d-1f527","1f468-1f3fc-200d-1f527","1f468-1f3fd-200d-1f527","1f468-1f3fe-200d-1f527","1f468-1f3ff-200d-1f527"]},{n:["woman mechanic","female-mechanic"],u:"1f469-200d-1f527",v:["1f469-1f3fb-200d-1f527","1f469-1f3fc-200d-1f527","1f469-1f3fd-200d-1f527","1f469-1f3fe-200d-1f527","1f469-1f3ff-200d-1f527"]},{n:["factory worker"],u:"1f9d1-200d-1f3ed",v:["1f9d1-1f3fb-200d-1f3ed","1f9d1-1f3fc-200d-1f3ed","1f9d1-1f3fd-200d-1f3ed","1f9d1-1f3fe-200d-1f3ed","1f9d1-1f3ff-200d-1f3ed"]},{n:["man factory worker","male-factory-worker"],u:"1f468-200d-1f3ed",v:["1f468-1f3fb-200d-1f3ed","1f468-1f3fc-200d-1f3ed","1f468-1f3fd-200d-1f3ed","1f468-1f3fe-200d-1f3ed","1f468-1f3ff-200d-1f3ed"]},{n:["woman factory worker","female-factory-worker"],u:"1f469-200d-1f3ed",v:["1f469-1f3fb-200d-1f3ed","1f469-1f3fc-200d-1f3ed","1f469-1f3fd-200d-1f3ed","1f469-1f3fe-200d-1f3ed","1f469-1f3ff-200d-1f3ed"]},{n:["office worker"],u:"1f9d1-200d-1f4bc",v:["1f9d1-1f3fb-200d-1f4bc","1f9d1-1f3fc-200d-1f4bc","1f9d1-1f3fd-200d-1f4bc","1f9d1-1f3fe-200d-1f4bc","1f9d1-1f3ff-200d-1f4bc"]},{n:["man office worker","male-office-worker"],u:"1f468-200d-1f4bc",v:["1f468-1f3fb-200d-1f4bc","1f468-1f3fc-200d-1f4bc","1f468-1f3fd-200d-1f4bc","1f468-1f3fe-200d-1f4bc","1f468-1f3ff-200d-1f4bc"]},{n:["woman office worker","female-office-worker"],u:"1f469-200d-1f4bc",v:["1f469-1f3fb-200d-1f4bc","1f469-1f3fc-200d-1f4bc","1f469-1f3fd-200d-1f4bc","1f469-1f3fe-200d-1f4bc","1f469-1f3ff-200d-1f4bc"]},{n:["scientist"],u:"1f9d1-200d-1f52c",v:["1f9d1-1f3fb-200d-1f52c","1f9d1-1f3fc-200d-1f52c","1f9d1-1f3fd-200d-1f52c","1f9d1-1f3fe-200d-1f52c","1f9d1-1f3ff-200d-1f52c"]},{n:["man scientist","male-scientist"],u:"1f468-200d-1f52c",v:["1f468-1f3fb-200d-1f52c","1f468-1f3fc-200d-1f52c","1f468-1f3fd-200d-1f52c","1f468-1f3fe-200d-1f52c","1f468-1f3ff-200d-1f52c"]},{n:["woman scientist","female-scientist"],u:"1f469-200d-1f52c",v:["1f469-1f3fb-200d-1f52c","1f469-1f3fc-200d-1f52c","1f469-1f3fd-200d-1f52c","1f469-1f3fe-200d-1f52c","1f469-1f3ff-200d-1f52c"]},{n:["technologist"],u:"1f9d1-200d-1f4bb",v:["1f9d1-1f3fb-200d-1f4bb","1f9d1-1f3fc-200d-1f4bb","1f9d1-1f3fd-200d-1f4bb","1f9d1-1f3fe-200d-1f4bb","1f9d1-1f3ff-200d-1f4bb"]},{n:["man technologist","male-technologist"],u:"1f468-200d-1f4bb",v:["1f468-1f3fb-200d-1f4bb","1f468-1f3fc-200d-1f4bb","1f468-1f3fd-200d-1f4bb","1f468-1f3fe-200d-1f4bb","1f468-1f3ff-200d-1f4bb"]},{n:["woman technologist","female-technologist"],u:"1f469-200d-1f4bb",v:["1f469-1f3fb-200d-1f4bb","1f469-1f3fc-200d-1f4bb","1f469-1f3fd-200d-1f4bb","1f469-1f3fe-200d-1f4bb","1f469-1f3ff-200d-1f4bb"]},{n:["singer"],u:"1f9d1-200d-1f3a4",v:["1f9d1-1f3fb-200d-1f3a4","1f9d1-1f3fc-200d-1f3a4","1f9d1-1f3fd-200d-1f3a4","1f9d1-1f3fe-200d-1f3a4","1f9d1-1f3ff-200d-1f3a4"]},{n:["man singer","male-singer"],u:"1f468-200d-1f3a4",v:["1f468-1f3fb-200d-1f3a4","1f468-1f3fc-200d-1f3a4","1f468-1f3fd-200d-1f3a4","1f468-1f3fe-200d-1f3a4","1f468-1f3ff-200d-1f3a4"]},{n:["woman singer","female-singer"],u:"1f469-200d-1f3a4",v:["1f469-1f3fb-200d-1f3a4","1f469-1f3fc-200d-1f3a4","1f469-1f3fd-200d-1f3a4","1f469-1f3fe-200d-1f3a4","1f469-1f3ff-200d-1f3a4"]},{n:["artist"],u:"1f9d1-200d-1f3a8",v:["1f9d1-1f3fb-200d-1f3a8","1f9d1-1f3fc-200d-1f3a8","1f9d1-1f3fd-200d-1f3a8","1f9d1-1f3fe-200d-1f3a8","1f9d1-1f3ff-200d-1f3a8"]},{n:["man artist","male-artist"],u:"1f468-200d-1f3a8",v:["1f468-1f3fb-200d-1f3a8","1f468-1f3fc-200d-1f3a8","1f468-1f3fd-200d-1f3a8","1f468-1f3fe-200d-1f3a8","1f468-1f3ff-200d-1f3a8"]},{n:["woman artist","female-artist"],u:"1f469-200d-1f3a8",v:["1f469-1f3fb-200d-1f3a8","1f469-1f3fc-200d-1f3a8","1f469-1f3fd-200d-1f3a8","1f469-1f3fe-200d-1f3a8","1f469-1f3ff-200d-1f3a8"]},{n:["pilot"],u:"1f9d1-200d-2708-fe0f",v:["1f9d1-1f3fb-200d-2708-fe0f","1f9d1-1f3fc-200d-2708-fe0f","1f9d1-1f3fd-200d-2708-fe0f","1f9d1-1f3fe-200d-2708-fe0f","1f9d1-1f3ff-200d-2708-fe0f"]},{n:["man pilot","male-pilot"],u:"1f468-200d-2708-fe0f",v:["1f468-1f3fb-200d-2708-fe0f","1f468-1f3fc-200d-2708-fe0f","1f468-1f3fd-200d-2708-fe0f","1f468-1f3fe-200d-2708-fe0f","1f468-1f3ff-200d-2708-fe0f"]},{n:["woman pilot","female-pilot"],u:"1f469-200d-2708-fe0f",v:["1f469-1f3fb-200d-2708-fe0f","1f469-1f3fc-200d-2708-fe0f","1f469-1f3fd-200d-2708-fe0f","1f469-1f3fe-200d-2708-fe0f","1f469-1f3ff-200d-2708-fe0f"]},{n:["astronaut"],u:"1f9d1-200d-1f680",v:["1f9d1-1f3fb-200d-1f680","1f9d1-1f3fc-200d-1f680","1f9d1-1f3fd-200d-1f680","1f9d1-1f3fe-200d-1f680","1f9d1-1f3ff-200d-1f680"]},{n:["man astronaut","male-astronaut"],u:"1f468-200d-1f680",v:["1f468-1f3fb-200d-1f680","1f468-1f3fc-200d-1f680","1f468-1f3fd-200d-1f680","1f468-1f3fe-200d-1f680","1f468-1f3ff-200d-1f680"]},{n:["woman astronaut","female-astronaut"],u:"1f469-200d-1f680",v:["1f469-1f3fb-200d-1f680","1f469-1f3fc-200d-1f680","1f469-1f3fd-200d-1f680","1f469-1f3fe-200d-1f680","1f469-1f3ff-200d-1f680"]},{n:["firefighter"],u:"1f9d1-200d-1f692",v:["1f9d1-1f3fb-200d-1f692","1f9d1-1f3fc-200d-1f692","1f9d1-1f3fd-200d-1f692","1f9d1-1f3fe-200d-1f692","1f9d1-1f3ff-200d-1f692"]},{n:["man firefighter","male-firefighter"],u:"1f468-200d-1f692",v:["1f468-1f3fb-200d-1f692","1f468-1f3fc-200d-1f692","1f468-1f3fd-200d-1f692","1f468-1f3fe-200d-1f692","1f468-1f3ff-200d-1f692"]},{n:["woman firefighter","female-firefighter"],u:"1f469-200d-1f692",v:["1f469-1f3fb-200d-1f692","1f469-1f3fc-200d-1f692","1f469-1f3fd-200d-1f692","1f469-1f3fe-200d-1f692","1f469-1f3ff-200d-1f692"]},{n:["cop","police officer"],u:"1f46e",v:["1f46e-1f3fb","1f46e-1f3fc","1f46e-1f3fd","1f46e-1f3fe","1f46e-1f3ff"]},{n:["man police officer","male-police-officer"],u:"1f46e-200d-2642-fe0f",v:["1f46e-1f3fb-200d-2642-fe0f","1f46e-1f3fc-200d-2642-fe0f","1f46e-1f3fd-200d-2642-fe0f","1f46e-1f3fe-200d-2642-fe0f","1f46e-1f3ff-200d-2642-fe0f"]},{n:["woman police officer","female-police-officer"],u:"1f46e-200d-2640-fe0f",v:["1f46e-1f3fb-200d-2640-fe0f","1f46e-1f3fc-200d-2640-fe0f","1f46e-1f3fd-200d-2640-fe0f","1f46e-1f3fe-200d-2640-fe0f","1f46e-1f3ff-200d-2640-fe0f"]},{n:["detective","sleuth or spy"],u:"1f575-fe0f",v:["1f575-1f3fb","1f575-1f3fc","1f575-1f3fd","1f575-1f3fe","1f575-1f3ff"]},{n:["man detective","male-detective"],u:"1f575-fe0f-200d-2642-fe0f",v:["1f575-1f3fb-200d-2642-fe0f","1f575-1f3fc-200d-2642-fe0f","1f575-1f3fd-200d-2642-fe0f","1f575-1f3fe-200d-2642-fe0f","1f575-1f3ff-200d-2642-fe0f"]},{n:["woman detective","female-detective"],u:"1f575-fe0f-200d-2640-fe0f",v:["1f575-1f3fb-200d-2640-fe0f","1f575-1f3fc-200d-2640-fe0f","1f575-1f3fd-200d-2640-fe0f","1f575-1f3fe-200d-2640-fe0f","1f575-1f3ff-200d-2640-fe0f"]},{n:["guardsman"],u:"1f482",v:["1f482-1f3fb","1f482-1f3fc","1f482-1f3fd","1f482-1f3fe","1f482-1f3ff"]},{n:["man guard","male-guard"],u:"1f482-200d-2642-fe0f",v:["1f482-1f3fb-200d-2642-fe0f","1f482-1f3fc-200d-2642-fe0f","1f482-1f3fd-200d-2642-fe0f","1f482-1f3fe-200d-2642-fe0f","1f482-1f3ff-200d-2642-fe0f"]},{n:["woman guard","female-guard"],u:"1f482-200d-2640-fe0f",v:["1f482-1f3fb-200d-2640-fe0f","1f482-1f3fc-200d-2640-fe0f","1f482-1f3fd-200d-2640-fe0f","1f482-1f3fe-200d-2640-fe0f","1f482-1f3ff-200d-2640-fe0f"]},{n:["ninja"],u:"1f977",v:["1f977-1f3fb","1f977-1f3fc","1f977-1f3fd","1f977-1f3fe","1f977-1f3ff"]},{n:["construction worker"],u:"1f477",v:["1f477-1f3fb","1f477-1f3fc","1f477-1f3fd","1f477-1f3fe","1f477-1f3ff"]},{n:["man construction worker","male-construction-worker"],u:"1f477-200d-2642-fe0f",v:["1f477-1f3fb-200d-2642-fe0f","1f477-1f3fc-200d-2642-fe0f","1f477-1f3fd-200d-2642-fe0f","1f477-1f3fe-200d-2642-fe0f","1f477-1f3ff-200d-2642-fe0f"]},{n:["woman construction worker","female-construction-worker"],u:"1f477-200d-2640-fe0f",v:["1f477-1f3fb-200d-2640-fe0f","1f477-1f3fc-200d-2640-fe0f","1f477-1f3fd-200d-2640-fe0f","1f477-1f3fe-200d-2640-fe0f","1f477-1f3ff-200d-2640-fe0f"]},{n:["person with crown"],u:"1fac5",v:["1fac5-1f3fb","1fac5-1f3fc","1fac5-1f3fd","1fac5-1f3fe","1fac5-1f3ff"]},{n:["prince"],u:"1f934",v:["1f934-1f3fb","1f934-1f3fc","1f934-1f3fd","1f934-1f3fe","1f934-1f3ff"]},{n:["princess"],u:"1f478",v:["1f478-1f3fb","1f478-1f3fc","1f478-1f3fd","1f478-1f3fe","1f478-1f3ff"]},{n:["man with turban"],u:"1f473",v:["1f473-1f3fb","1f473-1f3fc","1f473-1f3fd","1f473-1f3fe","1f473-1f3ff"]},{n:["man wearing turban","man-wearing-turban"],u:"1f473-200d-2642-fe0f",v:["1f473-1f3fb-200d-2642-fe0f","1f473-1f3fc-200d-2642-fe0f","1f473-1f3fd-200d-2642-fe0f","1f473-1f3fe-200d-2642-fe0f","1f473-1f3ff-200d-2642-fe0f"]},{n:["woman wearing turban","woman-wearing-turban"],u:"1f473-200d-2640-fe0f",v:["1f473-1f3fb-200d-2640-fe0f","1f473-1f3fc-200d-2640-fe0f","1f473-1f3fd-200d-2640-fe0f","1f473-1f3fe-200d-2640-fe0f","1f473-1f3ff-200d-2640-fe0f"]},{n:["man with gua pi mao"],u:"1f472",v:["1f472-1f3fb","1f472-1f3fc","1f472-1f3fd","1f472-1f3fe","1f472-1f3ff"]},{n:["person with headscarf"],u:"1f9d5",v:["1f9d5-1f3fb","1f9d5-1f3fc","1f9d5-1f3fd","1f9d5-1f3fe","1f9d5-1f3ff"]},{n:["man in tuxedo","person in tuxedo"],u:"1f935",v:["1f935-1f3fb","1f935-1f3fc","1f935-1f3fd","1f935-1f3fe","1f935-1f3ff"]},{n:["man in tuxedo"],u:"1f935-200d-2642-fe0f",v:["1f935-1f3fb-200d-2642-fe0f","1f935-1f3fc-200d-2642-fe0f","1f935-1f3fd-200d-2642-fe0f","1f935-1f3fe-200d-2642-fe0f","1f935-1f3ff-200d-2642-fe0f"]},{n:["woman in tuxedo"],u:"1f935-200d-2640-fe0f",v:["1f935-1f3fb-200d-2640-fe0f","1f935-1f3fc-200d-2640-fe0f","1f935-1f3fd-200d-2640-fe0f","1f935-1f3fe-200d-2640-fe0f","1f935-1f3ff-200d-2640-fe0f"]},{n:["bride with veil"],u:"1f470",v:["1f470-1f3fb","1f470-1f3fc","1f470-1f3fd","1f470-1f3fe","1f470-1f3ff"]},{n:["man with veil"],u:"1f470-200d-2642-fe0f",v:["1f470-1f3fb-200d-2642-fe0f","1f470-1f3fc-200d-2642-fe0f","1f470-1f3fd-200d-2642-fe0f","1f470-1f3fe-200d-2642-fe0f","1f470-1f3ff-200d-2642-fe0f"]},{n:["woman with veil"],u:"1f470-200d-2640-fe0f",v:["1f470-1f3fb-200d-2640-fe0f","1f470-1f3fc-200d-2640-fe0f","1f470-1f3fd-200d-2640-fe0f","1f470-1f3fe-200d-2640-fe0f","1f470-1f3ff-200d-2640-fe0f"]},{n:["pregnant woman"],u:"1f930",v:["1f930-1f3fb","1f930-1f3fc","1f930-1f3fd","1f930-1f3fe","1f930-1f3ff"]},{n:["pregnant man"],u:"1fac3",v:["1fac3-1f3fb","1fac3-1f3fc","1fac3-1f3fd","1fac3-1f3fe","1fac3-1f3ff"]},{n:["pregnant person"],u:"1fac4",v:["1fac4-1f3fb","1fac4-1f3fc","1fac4-1f3fd","1fac4-1f3fe","1fac4-1f3ff"]},{n:["breast-feeding"],u:"1f931",v:["1f931-1f3fb","1f931-1f3fc","1f931-1f3fd","1f931-1f3fe","1f931-1f3ff"]},{n:["woman feeding baby"],u:"1f469-200d-1f37c",v:["1f469-1f3fb-200d-1f37c","1f469-1f3fc-200d-1f37c","1f469-1f3fd-200d-1f37c","1f469-1f3fe-200d-1f37c","1f469-1f3ff-200d-1f37c"]},{n:["man feeding baby"],u:"1f468-200d-1f37c",v:["1f468-1f3fb-200d-1f37c","1f468-1f3fc-200d-1f37c","1f468-1f3fd-200d-1f37c","1f468-1f3fe-200d-1f37c","1f468-1f3ff-200d-1f37c"]},{n:["person feeding baby"],u:"1f9d1-200d-1f37c",v:["1f9d1-1f3fb-200d-1f37c","1f9d1-1f3fc-200d-1f37c","1f9d1-1f3fd-200d-1f37c","1f9d1-1f3fe-200d-1f37c","1f9d1-1f3ff-200d-1f37c"]},{n:["angel","baby angel"],u:"1f47c",v:["1f47c-1f3fb","1f47c-1f3fc","1f47c-1f3fd","1f47c-1f3fe","1f47c-1f3ff"]},{n:["santa","father christmas"],u:"1f385",v:["1f385-1f3fb","1f385-1f3fc","1f385-1f3fd","1f385-1f3fe","1f385-1f3ff"]},{n:["mrs claus","mother christmas"],u:"1f936",v:["1f936-1f3fb","1f936-1f3fc","1f936-1f3fd","1f936-1f3fe","1f936-1f3ff"]},{n:["mx claus"],u:"1f9d1-200d-1f384",v:["1f9d1-1f3fb-200d-1f384","1f9d1-1f3fc-200d-1f384","1f9d1-1f3fd-200d-1f384","1f9d1-1f3fe-200d-1f384","1f9d1-1f3ff-200d-1f384"]},{n:["superhero"],u:"1f9b8",v:["1f9b8-1f3fb","1f9b8-1f3fc","1f9b8-1f3fd","1f9b8-1f3fe","1f9b8-1f3ff"]},{n:["man superhero","male superhero"],u:"1f9b8-200d-2642-fe0f",v:["1f9b8-1f3fb-200d-2642-fe0f","1f9b8-1f3fc-200d-2642-fe0f","1f9b8-1f3fd-200d-2642-fe0f","1f9b8-1f3fe-200d-2642-fe0f","1f9b8-1f3ff-200d-2642-fe0f"]},{n:["woman superhero","female superhero"],u:"1f9b8-200d-2640-fe0f",v:["1f9b8-1f3fb-200d-2640-fe0f","1f9b8-1f3fc-200d-2640-fe0f","1f9b8-1f3fd-200d-2640-fe0f","1f9b8-1f3fe-200d-2640-fe0f","1f9b8-1f3ff-200d-2640-fe0f"]},{n:["supervillain"],u:"1f9b9",v:["1f9b9-1f3fb","1f9b9-1f3fc","1f9b9-1f3fd","1f9b9-1f3fe","1f9b9-1f3ff"]},{n:["man supervillain","male supervillain"],u:"1f9b9-200d-2642-fe0f",v:["1f9b9-1f3fb-200d-2642-fe0f","1f9b9-1f3fc-200d-2642-fe0f","1f9b9-1f3fd-200d-2642-fe0f","1f9b9-1f3fe-200d-2642-fe0f","1f9b9-1f3ff-200d-2642-fe0f"]},{n:["woman supervillain","female supervillain"],u:"1f9b9-200d-2640-fe0f",v:["1f9b9-1f3fb-200d-2640-fe0f","1f9b9-1f3fc-200d-2640-fe0f","1f9b9-1f3fd-200d-2640-fe0f","1f9b9-1f3fe-200d-2640-fe0f","1f9b9-1f3ff-200d-2640-fe0f"]},{n:["mage"],u:"1f9d9",v:["1f9d9-1f3fb","1f9d9-1f3fc","1f9d9-1f3fd","1f9d9-1f3fe","1f9d9-1f3ff"]},{n:["man mage","male mage"],u:"1f9d9-200d-2642-fe0f",v:["1f9d9-1f3fb-200d-2642-fe0f","1f9d9-1f3fc-200d-2642-fe0f","1f9d9-1f3fd-200d-2642-fe0f","1f9d9-1f3fe-200d-2642-fe0f","1f9d9-1f3ff-200d-2642-fe0f"]},{n:["woman mage","female mage"],u:"1f9d9-200d-2640-fe0f",v:["1f9d9-1f3fb-200d-2640-fe0f","1f9d9-1f3fc-200d-2640-fe0f","1f9d9-1f3fd-200d-2640-fe0f","1f9d9-1f3fe-200d-2640-fe0f","1f9d9-1f3ff-200d-2640-fe0f"]},{n:["fairy"],u:"1f9da",v:["1f9da-1f3fb","1f9da-1f3fc","1f9da-1f3fd","1f9da-1f3fe","1f9da-1f3ff"]},{n:["man fairy","male fairy"],u:"1f9da-200d-2642-fe0f",v:["1f9da-1f3fb-200d-2642-fe0f","1f9da-1f3fc-200d-2642-fe0f","1f9da-1f3fd-200d-2642-fe0f","1f9da-1f3fe-200d-2642-fe0f","1f9da-1f3ff-200d-2642-fe0f"]},{n:["woman fairy","female fairy"],u:"1f9da-200d-2640-fe0f",v:["1f9da-1f3fb-200d-2640-fe0f","1f9da-1f3fc-200d-2640-fe0f","1f9da-1f3fd-200d-2640-fe0f","1f9da-1f3fe-200d-2640-fe0f","1f9da-1f3ff-200d-2640-fe0f"]},{n:["vampire"],u:"1f9db",v:["1f9db-1f3fb","1f9db-1f3fc","1f9db-1f3fd","1f9db-1f3fe","1f9db-1f3ff"]},{n:["man vampire","male vampire"],u:"1f9db-200d-2642-fe0f",v:["1f9db-1f3fb-200d-2642-fe0f","1f9db-1f3fc-200d-2642-fe0f","1f9db-1f3fd-200d-2642-fe0f","1f9db-1f3fe-200d-2642-fe0f","1f9db-1f3ff-200d-2642-fe0f"]},{n:["woman vampire","female vampire"],u:"1f9db-200d-2640-fe0f",v:["1f9db-1f3fb-200d-2640-fe0f","1f9db-1f3fc-200d-2640-fe0f","1f9db-1f3fd-200d-2640-fe0f","1f9db-1f3fe-200d-2640-fe0f","1f9db-1f3ff-200d-2640-fe0f"]},{n:["merperson"],u:"1f9dc",v:["1f9dc-1f3fb","1f9dc-1f3fc","1f9dc-1f3fd","1f9dc-1f3fe","1f9dc-1f3ff"]},{n:["merman"],u:"1f9dc-200d-2642-fe0f",v:["1f9dc-1f3fb-200d-2642-fe0f","1f9dc-1f3fc-200d-2642-fe0f","1f9dc-1f3fd-200d-2642-fe0f","1f9dc-1f3fe-200d-2642-fe0f","1f9dc-1f3ff-200d-2642-fe0f"]},{n:["mermaid"],u:"1f9dc-200d-2640-fe0f",v:["1f9dc-1f3fb-200d-2640-fe0f","1f9dc-1f3fc-200d-2640-fe0f","1f9dc-1f3fd-200d-2640-fe0f","1f9dc-1f3fe-200d-2640-fe0f","1f9dc-1f3ff-200d-2640-fe0f"]},{n:["elf"],u:"1f9dd",v:["1f9dd-1f3fb","1f9dd-1f3fc","1f9dd-1f3fd","1f9dd-1f3fe","1f9dd-1f3ff"]},{n:["man elf","male elf"],u:"1f9dd-200d-2642-fe0f",v:["1f9dd-1f3fb-200d-2642-fe0f","1f9dd-1f3fc-200d-2642-fe0f","1f9dd-1f3fd-200d-2642-fe0f","1f9dd-1f3fe-200d-2642-fe0f","1f9dd-1f3ff-200d-2642-fe0f"]},{n:["woman elf","female elf"],u:"1f9dd-200d-2640-fe0f",v:["1f9dd-1f3fb-200d-2640-fe0f","1f9dd-1f3fc-200d-2640-fe0f","1f9dd-1f3fd-200d-2640-fe0f","1f9dd-1f3fe-200d-2640-fe0f","1f9dd-1f3ff-200d-2640-fe0f"]},{n:["genie"],u:"1f9de"},{n:["man genie","male genie"],u:"1f9de-200d-2642-fe0f"},{n:["woman genie","female genie"],u:"1f9de-200d-2640-fe0f"},{n:["zombie"],u:"1f9df"},{n:["man zombie","male zombie"],u:"1f9df-200d-2642-fe0f"},{n:["woman zombie","female zombie"],u:"1f9df-200d-2640-fe0f"},{n:["troll"],u:"1f9cc"},{n:["massage","face massage"],u:"1f486",v:["1f486-1f3fb","1f486-1f3fc","1f486-1f3fd","1f486-1f3fe","1f486-1f3ff"]},{n:["man getting massage","man-getting-massage"],u:"1f486-200d-2642-fe0f",v:["1f486-1f3fb-200d-2642-fe0f","1f486-1f3fc-200d-2642-fe0f","1f486-1f3fd-200d-2642-fe0f","1f486-1f3fe-200d-2642-fe0f","1f486-1f3ff-200d-2642-fe0f"]},{n:["woman getting massage","woman-getting-massage"],u:"1f486-200d-2640-fe0f",v:["1f486-1f3fb-200d-2640-fe0f","1f486-1f3fc-200d-2640-fe0f","1f486-1f3fd-200d-2640-fe0f","1f486-1f3fe-200d-2640-fe0f","1f486-1f3ff-200d-2640-fe0f"]},{n:["haircut"],u:"1f487",v:["1f487-1f3fb","1f487-1f3fc","1f487-1f3fd","1f487-1f3fe","1f487-1f3ff"]},{n:["man getting haircut","man-getting-haircut"],u:"1f487-200d-2642-fe0f",v:["1f487-1f3fb-200d-2642-fe0f","1f487-1f3fc-200d-2642-fe0f","1f487-1f3fd-200d-2642-fe0f","1f487-1f3fe-200d-2642-fe0f","1f487-1f3ff-200d-2642-fe0f"]},{n:["woman getting haircut","woman-getting-haircut"],u:"1f487-200d-2640-fe0f",v:["1f487-1f3fb-200d-2640-fe0f","1f487-1f3fc-200d-2640-fe0f","1f487-1f3fd-200d-2640-fe0f","1f487-1f3fe-200d-2640-fe0f","1f487-1f3ff-200d-2640-fe0f"]},{n:["walking","pedestrian"],u:"1f6b6",v:["1f6b6-1f3fb","1f6b6-1f3fc","1f6b6-1f3fd","1f6b6-1f3fe","1f6b6-1f3ff"]},{n:["man walking","man-walking"],u:"1f6b6-200d-2642-fe0f",v:["1f6b6-1f3fb-200d-2642-fe0f","1f6b6-1f3fc-200d-2642-fe0f","1f6b6-1f3fd-200d-2642-fe0f","1f6b6-1f3fe-200d-2642-fe0f","1f6b6-1f3ff-200d-2642-fe0f"]},{n:["woman walking","woman-walking"],u:"1f6b6-200d-2640-fe0f",v:["1f6b6-1f3fb-200d-2640-fe0f","1f6b6-1f3fc-200d-2640-fe0f","1f6b6-1f3fd-200d-2640-fe0f","1f6b6-1f3fe-200d-2640-fe0f","1f6b6-1f3ff-200d-2640-fe0f"]},{n:["standing person"],u:"1f9cd",v:["1f9cd-1f3fb","1f9cd-1f3fc","1f9cd-1f3fd","1f9cd-1f3fe","1f9cd-1f3ff"]},{n:["man standing"],u:"1f9cd-200d-2642-fe0f",v:["1f9cd-1f3fb-200d-2642-fe0f","1f9cd-1f3fc-200d-2642-fe0f","1f9cd-1f3fd-200d-2642-fe0f","1f9cd-1f3fe-200d-2642-fe0f","1f9cd-1f3ff-200d-2642-fe0f"]},{n:["woman standing"],u:"1f9cd-200d-2640-fe0f",v:["1f9cd-1f3fb-200d-2640-fe0f","1f9cd-1f3fc-200d-2640-fe0f","1f9cd-1f3fd-200d-2640-fe0f","1f9cd-1f3fe-200d-2640-fe0f","1f9cd-1f3ff-200d-2640-fe0f"]},{n:["kneeling person"],u:"1f9ce",v:["1f9ce-1f3fb","1f9ce-1f3fc","1f9ce-1f3fd","1f9ce-1f3fe","1f9ce-1f3ff"]},{n:["man kneeling"],u:"1f9ce-200d-2642-fe0f",v:["1f9ce-1f3fb-200d-2642-fe0f","1f9ce-1f3fc-200d-2642-fe0f","1f9ce-1f3fd-200d-2642-fe0f","1f9ce-1f3fe-200d-2642-fe0f","1f9ce-1f3ff-200d-2642-fe0f"]},{n:["woman kneeling"],u:"1f9ce-200d-2640-fe0f",v:["1f9ce-1f3fb-200d-2640-fe0f","1f9ce-1f3fc-200d-2640-fe0f","1f9ce-1f3fd-200d-2640-fe0f","1f9ce-1f3fe-200d-2640-fe0f","1f9ce-1f3ff-200d-2640-fe0f"]},{n:["person with white cane","person with probing cane"],u:"1f9d1-200d-1f9af",v:["1f9d1-1f3fb-200d-1f9af","1f9d1-1f3fc-200d-1f9af","1f9d1-1f3fd-200d-1f9af","1f9d1-1f3fe-200d-1f9af","1f9d1-1f3ff-200d-1f9af"]},{n:["man with white cane","man with probing cane"],u:"1f468-200d-1f9af",v:["1f468-1f3fb-200d-1f9af","1f468-1f3fc-200d-1f9af","1f468-1f3fd-200d-1f9af","1f468-1f3fe-200d-1f9af","1f468-1f3ff-200d-1f9af"]},{n:["woman with white cane","woman with probing cane"],u:"1f469-200d-1f9af",v:["1f469-1f3fb-200d-1f9af","1f469-1f3fc-200d-1f9af","1f469-1f3fd-200d-1f9af","1f469-1f3fe-200d-1f9af","1f469-1f3ff-200d-1f9af"]},{n:["person in motorized wheelchair"],u:"1f9d1-200d-1f9bc",v:["1f9d1-1f3fb-200d-1f9bc","1f9d1-1f3fc-200d-1f9bc","1f9d1-1f3fd-200d-1f9bc","1f9d1-1f3fe-200d-1f9bc","1f9d1-1f3ff-200d-1f9bc"]},{n:["man in motorized wheelchair"],u:"1f468-200d-1f9bc",v:["1f468-1f3fb-200d-1f9bc","1f468-1f3fc-200d-1f9bc","1f468-1f3fd-200d-1f9bc","1f468-1f3fe-200d-1f9bc","1f468-1f3ff-200d-1f9bc"]},{n:["woman in motorized wheelchair"],u:"1f469-200d-1f9bc",v:["1f469-1f3fb-200d-1f9bc","1f469-1f3fc-200d-1f9bc","1f469-1f3fd-200d-1f9bc","1f469-1f3fe-200d-1f9bc","1f469-1f3ff-200d-1f9bc"]},{n:["person in manual wheelchair"],u:"1f9d1-200d-1f9bd",v:["1f9d1-1f3fb-200d-1f9bd","1f9d1-1f3fc-200d-1f9bd","1f9d1-1f3fd-200d-1f9bd","1f9d1-1f3fe-200d-1f9bd","1f9d1-1f3ff-200d-1f9bd"]},{n:["man in manual wheelchair"],u:"1f468-200d-1f9bd",v:["1f468-1f3fb-200d-1f9bd","1f468-1f3fc-200d-1f9bd","1f468-1f3fd-200d-1f9bd","1f468-1f3fe-200d-1f9bd","1f468-1f3ff-200d-1f9bd"]},{n:["woman in manual wheelchair"],u:"1f469-200d-1f9bd",v:["1f469-1f3fb-200d-1f9bd","1f469-1f3fc-200d-1f9bd","1f469-1f3fd-200d-1f9bd","1f469-1f3fe-200d-1f9bd","1f469-1f3ff-200d-1f9bd"]},{n:["runner","running"],u:"1f3c3",v:["1f3c3-1f3fb","1f3c3-1f3fc","1f3c3-1f3fd","1f3c3-1f3fe","1f3c3-1f3ff"]},{n:["man running","man-running"],u:"1f3c3-200d-2642-fe0f",v:["1f3c3-1f3fb-200d-2642-fe0f","1f3c3-1f3fc-200d-2642-fe0f","1f3c3-1f3fd-200d-2642-fe0f","1f3c3-1f3fe-200d-2642-fe0f","1f3c3-1f3ff-200d-2642-fe0f"]},{n:["woman running","woman-running"],u:"1f3c3-200d-2640-fe0f",v:["1f3c3-1f3fb-200d-2640-fe0f","1f3c3-1f3fc-200d-2640-fe0f","1f3c3-1f3fd-200d-2640-fe0f","1f3c3-1f3fe-200d-2640-fe0f","1f3c3-1f3ff-200d-2640-fe0f"]},{n:["dancer"],u:"1f483",v:["1f483-1f3fb","1f483-1f3fc","1f483-1f3fd","1f483-1f3fe","1f483-1f3ff"]},{n:["man dancing"],u:"1f57a",v:["1f57a-1f3fb","1f57a-1f3fc","1f57a-1f3fd","1f57a-1f3fe","1f57a-1f3ff"]},{n:["person in suit levitating","man in business suit levitating"],u:"1f574-fe0f",v:["1f574-1f3fb","1f574-1f3fc","1f574-1f3fd","1f574-1f3fe","1f574-1f3ff"]},{n:["dancers","woman with bunny ears"],u:"1f46f"},{n:["men with bunny ears","men-with-bunny-ears-partying","man-with-bunny-ears-partying"],u:"1f46f-200d-2642-fe0f"},{n:["women with bunny ears","women-with-bunny-ears-partying","woman-with-bunny-ears-partying"],u:"1f46f-200d-2640-fe0f"},{n:["person in steamy room"],u:"1f9d6",v:["1f9d6-1f3fb","1f9d6-1f3fc","1f9d6-1f3fd","1f9d6-1f3fe","1f9d6-1f3ff"]},{n:["man in steamy room"],u:"1f9d6-200d-2642-fe0f",v:["1f9d6-1f3fb-200d-2642-fe0f","1f9d6-1f3fc-200d-2642-fe0f","1f9d6-1f3fd-200d-2642-fe0f","1f9d6-1f3fe-200d-2642-fe0f","1f9d6-1f3ff-200d-2642-fe0f"]},{n:["woman in steamy room"],u:"1f9d6-200d-2640-fe0f",v:["1f9d6-1f3fb-200d-2640-fe0f","1f9d6-1f3fc-200d-2640-fe0f","1f9d6-1f3fd-200d-2640-fe0f","1f9d6-1f3fe-200d-2640-fe0f","1f9d6-1f3ff-200d-2640-fe0f"]},{n:["person climbing"],u:"1f9d7",v:["1f9d7-1f3fb","1f9d7-1f3fc","1f9d7-1f3fd","1f9d7-1f3fe","1f9d7-1f3ff"]},{n:["man climbing"],u:"1f9d7-200d-2642-fe0f",v:["1f9d7-1f3fb-200d-2642-fe0f","1f9d7-1f3fc-200d-2642-fe0f","1f9d7-1f3fd-200d-2642-fe0f","1f9d7-1f3fe-200d-2642-fe0f","1f9d7-1f3ff-200d-2642-fe0f"]},{n:["woman climbing"],u:"1f9d7-200d-2640-fe0f",v:["1f9d7-1f3fb-200d-2640-fe0f","1f9d7-1f3fc-200d-2640-fe0f","1f9d7-1f3fd-200d-2640-fe0f","1f9d7-1f3fe-200d-2640-fe0f","1f9d7-1f3ff-200d-2640-fe0f"]},{n:["fencer"],u:"1f93a"},{n:["horse racing"],u:"1f3c7",v:["1f3c7-1f3fb","1f3c7-1f3fc","1f3c7-1f3fd","1f3c7-1f3fe","1f3c7-1f3ff"]},{n:["skier"],u:"26f7-fe0f"},{n:["snowboarder"],u:"1f3c2",v:["1f3c2-1f3fb","1f3c2-1f3fc","1f3c2-1f3fd","1f3c2-1f3fe","1f3c2-1f3ff"]},{n:["golfer","person golfing"],u:"1f3cc-fe0f",v:["1f3cc-1f3fb","1f3cc-1f3fc","1f3cc-1f3fd","1f3cc-1f3fe","1f3cc-1f3ff"]},{n:["man golfing","man-golfing"],u:"1f3cc-fe0f-200d-2642-fe0f",v:["1f3cc-1f3fb-200d-2642-fe0f","1f3cc-1f3fc-200d-2642-fe0f","1f3cc-1f3fd-200d-2642-fe0f","1f3cc-1f3fe-200d-2642-fe0f","1f3cc-1f3ff-200d-2642-fe0f"]},{n:["woman golfing","woman-golfing"],u:"1f3cc-fe0f-200d-2640-fe0f",v:["1f3cc-1f3fb-200d-2640-fe0f","1f3cc-1f3fc-200d-2640-fe0f","1f3cc-1f3fd-200d-2640-fe0f","1f3cc-1f3fe-200d-2640-fe0f","1f3cc-1f3ff-200d-2640-fe0f"]},{n:["surfer"],u:"1f3c4",v:["1f3c4-1f3fb","1f3c4-1f3fc","1f3c4-1f3fd","1f3c4-1f3fe","1f3c4-1f3ff"]},{n:["man surfing","man-surfing"],u:"1f3c4-200d-2642-fe0f",v:["1f3c4-1f3fb-200d-2642-fe0f","1f3c4-1f3fc-200d-2642-fe0f","1f3c4-1f3fd-200d-2642-fe0f","1f3c4-1f3fe-200d-2642-fe0f","1f3c4-1f3ff-200d-2642-fe0f"]},{n:["woman surfing","woman-surfing"],u:"1f3c4-200d-2640-fe0f",v:["1f3c4-1f3fb-200d-2640-fe0f","1f3c4-1f3fc-200d-2640-fe0f","1f3c4-1f3fd-200d-2640-fe0f","1f3c4-1f3fe-200d-2640-fe0f","1f3c4-1f3ff-200d-2640-fe0f"]},{n:["rowboat"],u:"1f6a3",v:["1f6a3-1f3fb","1f6a3-1f3fc","1f6a3-1f3fd","1f6a3-1f3fe","1f6a3-1f3ff"]},{n:["man rowing boat","man-rowing-boat"],u:"1f6a3-200d-2642-fe0f",v:["1f6a3-1f3fb-200d-2642-fe0f","1f6a3-1f3fc-200d-2642-fe0f","1f6a3-1f3fd-200d-2642-fe0f","1f6a3-1f3fe-200d-2642-fe0f","1f6a3-1f3ff-200d-2642-fe0f"]},{n:["woman rowing boat","woman-rowing-boat"],u:"1f6a3-200d-2640-fe0f",v:["1f6a3-1f3fb-200d-2640-fe0f","1f6a3-1f3fc-200d-2640-fe0f","1f6a3-1f3fd-200d-2640-fe0f","1f6a3-1f3fe-200d-2640-fe0f","1f6a3-1f3ff-200d-2640-fe0f"]},{n:["swimmer"],u:"1f3ca",v:["1f3ca-1f3fb","1f3ca-1f3fc","1f3ca-1f3fd","1f3ca-1f3fe","1f3ca-1f3ff"]},{n:["man swimming","man-swimming"],u:"1f3ca-200d-2642-fe0f",v:["1f3ca-1f3fb-200d-2642-fe0f","1f3ca-1f3fc-200d-2642-fe0f","1f3ca-1f3fd-200d-2642-fe0f","1f3ca-1f3fe-200d-2642-fe0f","1f3ca-1f3ff-200d-2642-fe0f"]},{n:["woman swimming","woman-swimming"],u:"1f3ca-200d-2640-fe0f",v:["1f3ca-1f3fb-200d-2640-fe0f","1f3ca-1f3fc-200d-2640-fe0f","1f3ca-1f3fd-200d-2640-fe0f","1f3ca-1f3fe-200d-2640-fe0f","1f3ca-1f3ff-200d-2640-fe0f"]},{n:["person with ball","person bouncing ball"],u:"26f9-fe0f",v:["26f9-1f3fb","26f9-1f3fc","26f9-1f3fd","26f9-1f3fe","26f9-1f3ff"]},{n:["man bouncing ball","man-bouncing-ball"],u:"26f9-fe0f-200d-2642-fe0f",v:["26f9-1f3fb-200d-2642-fe0f","26f9-1f3fc-200d-2642-fe0f","26f9-1f3fd-200d-2642-fe0f","26f9-1f3fe-200d-2642-fe0f","26f9-1f3ff-200d-2642-fe0f"]},{n:["woman bouncing ball","woman-bouncing-ball"],u:"26f9-fe0f-200d-2640-fe0f",v:["26f9-1f3fb-200d-2640-fe0f","26f9-1f3fc-200d-2640-fe0f","26f9-1f3fd-200d-2640-fe0f","26f9-1f3fe-200d-2640-fe0f","26f9-1f3ff-200d-2640-fe0f"]},{n:["weight lifter","person lifting weights"],u:"1f3cb-fe0f",v:["1f3cb-1f3fb","1f3cb-1f3fc","1f3cb-1f3fd","1f3cb-1f3fe","1f3cb-1f3ff"]},{n:["man lifting weights","man-lifting-weights"],u:"1f3cb-fe0f-200d-2642-fe0f",v:["1f3cb-1f3fb-200d-2642-fe0f","1f3cb-1f3fc-200d-2642-fe0f","1f3cb-1f3fd-200d-2642-fe0f","1f3cb-1f3fe-200d-2642-fe0f","1f3cb-1f3ff-200d-2642-fe0f"]},{n:["woman lifting weights","woman-lifting-weights"],u:"1f3cb-fe0f-200d-2640-fe0f",v:["1f3cb-1f3fb-200d-2640-fe0f","1f3cb-1f3fc-200d-2640-fe0f","1f3cb-1f3fd-200d-2640-fe0f","1f3cb-1f3fe-200d-2640-fe0f","1f3cb-1f3ff-200d-2640-fe0f"]},{n:["bicyclist"],u:"1f6b4",v:["1f6b4-1f3fb","1f6b4-1f3fc","1f6b4-1f3fd","1f6b4-1f3fe","1f6b4-1f3ff"]},{n:["man biking","man-biking"],u:"1f6b4-200d-2642-fe0f",v:["1f6b4-1f3fb-200d-2642-fe0f","1f6b4-1f3fc-200d-2642-fe0f","1f6b4-1f3fd-200d-2642-fe0f","1f6b4-1f3fe-200d-2642-fe0f","1f6b4-1f3ff-200d-2642-fe0f"]},{n:["woman biking","woman-biking"],u:"1f6b4-200d-2640-fe0f",v:["1f6b4-1f3fb-200d-2640-fe0f","1f6b4-1f3fc-200d-2640-fe0f","1f6b4-1f3fd-200d-2640-fe0f","1f6b4-1f3fe-200d-2640-fe0f","1f6b4-1f3ff-200d-2640-fe0f"]},{n:["mountain bicyclist"],u:"1f6b5",v:["1f6b5-1f3fb","1f6b5-1f3fc","1f6b5-1f3fd","1f6b5-1f3fe","1f6b5-1f3ff"]},{n:["man mountain biking","man-mountain-biking"],u:"1f6b5-200d-2642-fe0f",v:["1f6b5-1f3fb-200d-2642-fe0f","1f6b5-1f3fc-200d-2642-fe0f","1f6b5-1f3fd-200d-2642-fe0f","1f6b5-1f3fe-200d-2642-fe0f","1f6b5-1f3ff-200d-2642-fe0f"]},{n:["woman mountain biking","woman-mountain-biking"],u:"1f6b5-200d-2640-fe0f",v:["1f6b5-1f3fb-200d-2640-fe0f","1f6b5-1f3fc-200d-2640-fe0f","1f6b5-1f3fd-200d-2640-fe0f","1f6b5-1f3fe-200d-2640-fe0f","1f6b5-1f3ff-200d-2640-fe0f"]},{n:["person doing cartwheel"],u:"1f938",v:["1f938-1f3fb","1f938-1f3fc","1f938-1f3fd","1f938-1f3fe","1f938-1f3ff"]},{n:["man cartwheeling","man-cartwheeling"],u:"1f938-200d-2642-fe0f",v:["1f938-1f3fb-200d-2642-fe0f","1f938-1f3fc-200d-2642-fe0f","1f938-1f3fd-200d-2642-fe0f","1f938-1f3fe-200d-2642-fe0f","1f938-1f3ff-200d-2642-fe0f"]},{n:["woman cartwheeling","woman-cartwheeling"],u:"1f938-200d-2640-fe0f",v:["1f938-1f3fb-200d-2640-fe0f","1f938-1f3fc-200d-2640-fe0f","1f938-1f3fd-200d-2640-fe0f","1f938-1f3fe-200d-2640-fe0f","1f938-1f3ff-200d-2640-fe0f"]},{n:["wrestlers"],u:"1f93c"},{n:["men wrestling","man-wrestling"],u:"1f93c-200d-2642-fe0f"},{n:["women wrestling","woman-wrestling"],u:"1f93c-200d-2640-fe0f"},{n:["water polo"],u:"1f93d",v:["1f93d-1f3fb","1f93d-1f3fc","1f93d-1f3fd","1f93d-1f3fe","1f93d-1f3ff"]},{n:["man playing water polo","man-playing-water-polo"],u:"1f93d-200d-2642-fe0f",v:["1f93d-1f3fb-200d-2642-fe0f","1f93d-1f3fc-200d-2642-fe0f","1f93d-1f3fd-200d-2642-fe0f","1f93d-1f3fe-200d-2642-fe0f","1f93d-1f3ff-200d-2642-fe0f"]},{n:["woman playing water polo","woman-playing-water-polo"],u:"1f93d-200d-2640-fe0f",v:["1f93d-1f3fb-200d-2640-fe0f","1f93d-1f3fc-200d-2640-fe0f","1f93d-1f3fd-200d-2640-fe0f","1f93d-1f3fe-200d-2640-fe0f","1f93d-1f3ff-200d-2640-fe0f"]},{n:["handball"],u:"1f93e",v:["1f93e-1f3fb","1f93e-1f3fc","1f93e-1f3fd","1f93e-1f3fe","1f93e-1f3ff"]},{n:["man playing handball","man-playing-handball"],u:"1f93e-200d-2642-fe0f",v:["1f93e-1f3fb-200d-2642-fe0f","1f93e-1f3fc-200d-2642-fe0f","1f93e-1f3fd-200d-2642-fe0f","1f93e-1f3fe-200d-2642-fe0f","1f93e-1f3ff-200d-2642-fe0f"]},{n:["woman playing handball","woman-playing-handball"],u:"1f93e-200d-2640-fe0f",v:["1f93e-1f3fb-200d-2640-fe0f","1f93e-1f3fc-200d-2640-fe0f","1f93e-1f3fd-200d-2640-fe0f","1f93e-1f3fe-200d-2640-fe0f","1f93e-1f3ff-200d-2640-fe0f"]},{n:["juggling"],u:"1f939",v:["1f939-1f3fb","1f939-1f3fc","1f939-1f3fd","1f939-1f3fe","1f939-1f3ff"]},{n:["man juggling","man-juggling"],u:"1f939-200d-2642-fe0f",v:["1f939-1f3fb-200d-2642-fe0f","1f939-1f3fc-200d-2642-fe0f","1f939-1f3fd-200d-2642-fe0f","1f939-1f3fe-200d-2642-fe0f","1f939-1f3ff-200d-2642-fe0f"]},{n:["woman juggling","woman-juggling"],u:"1f939-200d-2640-fe0f",v:["1f939-1f3fb-200d-2640-fe0f","1f939-1f3fc-200d-2640-fe0f","1f939-1f3fd-200d-2640-fe0f","1f939-1f3fe-200d-2640-fe0f","1f939-1f3ff-200d-2640-fe0f"]},{n:["person in lotus position"],u:"1f9d8",v:["1f9d8-1f3fb","1f9d8-1f3fc","1f9d8-1f3fd","1f9d8-1f3fe","1f9d8-1f3ff"]},{n:["man in lotus position"],u:"1f9d8-200d-2642-fe0f",v:["1f9d8-1f3fb-200d-2642-fe0f","1f9d8-1f3fc-200d-2642-fe0f","1f9d8-1f3fd-200d-2642-fe0f","1f9d8-1f3fe-200d-2642-fe0f","1f9d8-1f3ff-200d-2642-fe0f"]},{n:["woman in lotus position"],u:"1f9d8-200d-2640-fe0f",v:["1f9d8-1f3fb-200d-2640-fe0f","1f9d8-1f3fc-200d-2640-fe0f","1f9d8-1f3fd-200d-2640-fe0f","1f9d8-1f3fe-200d-2640-fe0f","1f9d8-1f3ff-200d-2640-fe0f"]},{n:["bath"],u:"1f6c0",v:["1f6c0-1f3fb","1f6c0-1f3fc","1f6c0-1f3fd","1f6c0-1f3fe","1f6c0-1f3ff"]},{n:["sleeping accommodation"],u:"1f6cc",v:["1f6cc-1f3fb","1f6cc-1f3fc","1f6cc-1f3fd","1f6cc-1f3fe","1f6cc-1f3ff"]},{n:["people holding hands"],u:"1f9d1-200d-1f91d-200d-1f9d1",v:["1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fb","1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fc","1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fd","1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fe","1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3ff","1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fb","1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fc","1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fd","1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fe","1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3ff","1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fb","1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fc","1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fd","1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fe","1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3ff","1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fb","1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fc","1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fd","1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fe","1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3ff","1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fb","1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fc","1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fd","1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fe","1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3ff"]},{n:["women holding hands","two women holding hands"],u:"1f46d",v:["1f46d-1f3fb","1f46d-1f3fc","1f46d-1f3fd","1f46d-1f3fe","1f46d-1f3ff","1f469-1f3fb-200d-1f91d-200d-1f469-1f3fc","1f469-1f3fb-200d-1f91d-200d-1f469-1f3fd","1f469-1f3fb-200d-1f91d-200d-1f469-1f3fe","1f469-1f3fb-200d-1f91d-200d-1f469-1f3ff","1f469-1f3fc-200d-1f91d-200d-1f469-1f3fb","1f469-1f3fc-200d-1f91d-200d-1f469-1f3fd","1f469-1f3fc-200d-1f91d-200d-1f469-1f3fe","1f469-1f3fc-200d-1f91d-200d-1f469-1f3ff","1f469-1f3fd-200d-1f91d-200d-1f469-1f3fb","1f469-1f3fd-200d-1f91d-200d-1f469-1f3fc","1f469-1f3fd-200d-1f91d-200d-1f469-1f3fe","1f469-1f3fd-200d-1f91d-200d-1f469-1f3ff","1f469-1f3fe-200d-1f91d-200d-1f469-1f3fb","1f469-1f3fe-200d-1f91d-200d-1f469-1f3fc","1f469-1f3fe-200d-1f91d-200d-1f469-1f3fd","1f469-1f3fe-200d-1f91d-200d-1f469-1f3ff","1f469-1f3ff-200d-1f91d-200d-1f469-1f3fb","1f469-1f3ff-200d-1f91d-200d-1f469-1f3fc","1f469-1f3ff-200d-1f91d-200d-1f469-1f3fd","1f469-1f3ff-200d-1f91d-200d-1f469-1f3fe"]},{n:["couple","man and woman holding hands","woman and man holding hands"],u:"1f46b",v:["1f46b-1f3fb","1f46b-1f3fc","1f46b-1f3fd","1f46b-1f3fe","1f46b-1f3ff","1f469-1f3fb-200d-1f91d-200d-1f468-1f3fc","1f469-1f3fb-200d-1f91d-200d-1f468-1f3fd","1f469-1f3fb-200d-1f91d-200d-1f468-1f3fe","1f469-1f3fb-200d-1f91d-200d-1f468-1f3ff","1f469-1f3fc-200d-1f91d-200d-1f468-1f3fb","1f469-1f3fc-200d-1f91d-200d-1f468-1f3fd","1f469-1f3fc-200d-1f91d-200d-1f468-1f3fe","1f469-1f3fc-200d-1f91d-200d-1f468-1f3ff","1f469-1f3fd-200d-1f91d-200d-1f468-1f3fb","1f469-1f3fd-200d-1f91d-200d-1f468-1f3fc","1f469-1f3fd-200d-1f91d-200d-1f468-1f3fe","1f469-1f3fd-200d-1f91d-200d-1f468-1f3ff","1f469-1f3fe-200d-1f91d-200d-1f468-1f3fb","1f469-1f3fe-200d-1f91d-200d-1f468-1f3fc","1f469-1f3fe-200d-1f91d-200d-1f468-1f3fd","1f469-1f3fe-200d-1f91d-200d-1f468-1f3ff","1f469-1f3ff-200d-1f91d-200d-1f468-1f3fb","1f469-1f3ff-200d-1f91d-200d-1f468-1f3fc","1f469-1f3ff-200d-1f91d-200d-1f468-1f3fd","1f469-1f3ff-200d-1f91d-200d-1f468-1f3fe"]},{n:["men holding hands","two men holding hands"],u:"1f46c",v:["1f46c-1f3fb","1f46c-1f3fc","1f46c-1f3fd","1f46c-1f3fe","1f46c-1f3ff","1f468-1f3fb-200d-1f91d-200d-1f468-1f3fc","1f468-1f3fb-200d-1f91d-200d-1f468-1f3fd","1f468-1f3fb-200d-1f91d-200d-1f468-1f3fe","1f468-1f3fb-200d-1f91d-200d-1f468-1f3ff","1f468-1f3fc-200d-1f91d-200d-1f468-1f3fb","1f468-1f3fc-200d-1f91d-200d-1f468-1f3fd","1f468-1f3fc-200d-1f91d-200d-1f468-1f3fe","1f468-1f3fc-200d-1f91d-200d-1f468-1f3ff","1f468-1f3fd-200d-1f91d-200d-1f468-1f3fb","1f468-1f3fd-200d-1f91d-200d-1f468-1f3fc","1f468-1f3fd-200d-1f91d-200d-1f468-1f3fe","1f468-1f3fd-200d-1f91d-200d-1f468-1f3ff","1f468-1f3fe-200d-1f91d-200d-1f468-1f3fb","1f468-1f3fe-200d-1f91d-200d-1f468-1f3fc","1f468-1f3fe-200d-1f91d-200d-1f468-1f3fd","1f468-1f3fe-200d-1f91d-200d-1f468-1f3ff","1f468-1f3ff-200d-1f91d-200d-1f468-1f3fb","1f468-1f3ff-200d-1f91d-200d-1f468-1f3fc","1f468-1f3ff-200d-1f91d-200d-1f468-1f3fd","1f468-1f3ff-200d-1f91d-200d-1f468-1f3fe"]},{n:["kiss","couplekiss"],u:"1f48f",v:["1f48f-1f3fb","1f48f-1f3fc","1f48f-1f3fd","1f48f-1f3fe","1f48f-1f3ff","1f9d1-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fc","1f9d1-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fd","1f9d1-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fe","1f9d1-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3ff","1f9d1-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fb","1f9d1-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fd","1f9d1-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fe","1f9d1-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3ff","1f9d1-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fb","1f9d1-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fc","1f9d1-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fe","1f9d1-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3ff","1f9d1-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fb","1f9d1-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fc","1f9d1-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fd","1f9d1-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3ff","1f9d1-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fb","1f9d1-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fc","1f9d1-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fd","1f9d1-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fe"]},{n:["woman-kiss-man","kiss: woman, man"],u:"1f469-200d-2764-fe0f-200d-1f48b-200d-1f468",v:["1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff"]},{n:["man-kiss-man","kiss: man, man"],u:"1f468-200d-2764-fe0f-200d-1f48b-200d-1f468",v:["1f468-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f468-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f468-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f468-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f468-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f468-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f468-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f468-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f468-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f468-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f468-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f468-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f468-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f468-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f468-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f468-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f468-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f468-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f468-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f468-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f468-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f468-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f468-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f468-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f468-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff"]},{n:["woman-kiss-woman","kiss: woman, woman"],u:"1f469-200d-2764-fe0f-200d-1f48b-200d-1f469",v:["1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fb","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fc","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fd","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fe","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3ff","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fb","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fc","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fd","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fe","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3ff","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fb","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fc","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fd","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fe","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3ff","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fb","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fc","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fd","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fe","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3ff","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fb","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fc","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fd","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fe","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3ff"]},{n:["couple with heart"],u:"1f491",v:["1f491-1f3fb","1f491-1f3fc","1f491-1f3fd","1f491-1f3fe","1f491-1f3ff","1f9d1-1f3fb-200d-2764-fe0f-200d-1f9d1-1f3fc","1f9d1-1f3fb-200d-2764-fe0f-200d-1f9d1-1f3fd","1f9d1-1f3fb-200d-2764-fe0f-200d-1f9d1-1f3fe","1f9d1-1f3fb-200d-2764-fe0f-200d-1f9d1-1f3ff","1f9d1-1f3fc-200d-2764-fe0f-200d-1f9d1-1f3fb","1f9d1-1f3fc-200d-2764-fe0f-200d-1f9d1-1f3fd","1f9d1-1f3fc-200d-2764-fe0f-200d-1f9d1-1f3fe","1f9d1-1f3fc-200d-2764-fe0f-200d-1f9d1-1f3ff","1f9d1-1f3fd-200d-2764-fe0f-200d-1f9d1-1f3fb","1f9d1-1f3fd-200d-2764-fe0f-200d-1f9d1-1f3fc","1f9d1-1f3fd-200d-2764-fe0f-200d-1f9d1-1f3fe","1f9d1-1f3fd-200d-2764-fe0f-200d-1f9d1-1f3ff","1f9d1-1f3fe-200d-2764-fe0f-200d-1f9d1-1f3fb","1f9d1-1f3fe-200d-2764-fe0f-200d-1f9d1-1f3fc","1f9d1-1f3fe-200d-2764-fe0f-200d-1f9d1-1f3fd","1f9d1-1f3fe-200d-2764-fe0f-200d-1f9d1-1f3ff","1f9d1-1f3ff-200d-2764-fe0f-200d-1f9d1-1f3fb","1f9d1-1f3ff-200d-2764-fe0f-200d-1f9d1-1f3fc","1f9d1-1f3ff-200d-2764-fe0f-200d-1f9d1-1f3fd","1f9d1-1f3ff-200d-2764-fe0f-200d-1f9d1-1f3fe"]},{n:["woman-heart-man","couple with heart: woman, man"],u:"1f469-200d-2764-fe0f-200d-1f468",v:["1f469-1f3fb-200d-2764-fe0f-200d-1f468-1f3fb","1f469-1f3fb-200d-2764-fe0f-200d-1f468-1f3fc","1f469-1f3fb-200d-2764-fe0f-200d-1f468-1f3fd","1f469-1f3fb-200d-2764-fe0f-200d-1f468-1f3fe","1f469-1f3fb-200d-2764-fe0f-200d-1f468-1f3ff","1f469-1f3fc-200d-2764-fe0f-200d-1f468-1f3fb","1f469-1f3fc-200d-2764-fe0f-200d-1f468-1f3fc","1f469-1f3fc-200d-2764-fe0f-200d-1f468-1f3fd","1f469-1f3fc-200d-2764-fe0f-200d-1f468-1f3fe","1f469-1f3fc-200d-2764-fe0f-200d-1f468-1f3ff","1f469-1f3fd-200d-2764-fe0f-200d-1f468-1f3fb","1f469-1f3fd-200d-2764-fe0f-200d-1f468-1f3fc","1f469-1f3fd-200d-2764-fe0f-200d-1f468-1f3fd","1f469-1f3fd-200d-2764-fe0f-200d-1f468-1f3fe","1f469-1f3fd-200d-2764-fe0f-200d-1f468-1f3ff","1f469-1f3fe-200d-2764-fe0f-200d-1f468-1f3fb","1f469-1f3fe-200d-2764-fe0f-200d-1f468-1f3fc","1f469-1f3fe-200d-2764-fe0f-200d-1f468-1f3fd","1f469-1f3fe-200d-2764-fe0f-200d-1f468-1f3fe","1f469-1f3fe-200d-2764-fe0f-200d-1f468-1f3ff","1f469-1f3ff-200d-2764-fe0f-200d-1f468-1f3fb","1f469-1f3ff-200d-2764-fe0f-200d-1f468-1f3fc","1f469-1f3ff-200d-2764-fe0f-200d-1f468-1f3fd","1f469-1f3ff-200d-2764-fe0f-200d-1f468-1f3fe","1f469-1f3ff-200d-2764-fe0f-200d-1f468-1f3ff"]},{n:["man-heart-man","couple with heart: man, man"],u:"1f468-200d-2764-fe0f-200d-1f468",v:["1f468-1f3fb-200d-2764-fe0f-200d-1f468-1f3fb","1f468-1f3fb-200d-2764-fe0f-200d-1f468-1f3fc","1f468-1f3fb-200d-2764-fe0f-200d-1f468-1f3fd","1f468-1f3fb-200d-2764-fe0f-200d-1f468-1f3fe","1f468-1f3fb-200d-2764-fe0f-200d-1f468-1f3ff","1f468-1f3fc-200d-2764-fe0f-200d-1f468-1f3fb","1f468-1f3fc-200d-2764-fe0f-200d-1f468-1f3fc","1f468-1f3fc-200d-2764-fe0f-200d-1f468-1f3fd","1f468-1f3fc-200d-2764-fe0f-200d-1f468-1f3fe","1f468-1f3fc-200d-2764-fe0f-200d-1f468-1f3ff","1f468-1f3fd-200d-2764-fe0f-200d-1f468-1f3fb","1f468-1f3fd-200d-2764-fe0f-200d-1f468-1f3fc","1f468-1f3fd-200d-2764-fe0f-200d-1f468-1f3fd","1f468-1f3fd-200d-2764-fe0f-200d-1f468-1f3fe","1f468-1f3fd-200d-2764-fe0f-200d-1f468-1f3ff","1f468-1f3fe-200d-2764-fe0f-200d-1f468-1f3fb","1f468-1f3fe-200d-2764-fe0f-200d-1f468-1f3fc","1f468-1f3fe-200d-2764-fe0f-200d-1f468-1f3fd","1f468-1f3fe-200d-2764-fe0f-200d-1f468-1f3fe","1f468-1f3fe-200d-2764-fe0f-200d-1f468-1f3ff","1f468-1f3ff-200d-2764-fe0f-200d-1f468-1f3fb","1f468-1f3ff-200d-2764-fe0f-200d-1f468-1f3fc","1f468-1f3ff-200d-2764-fe0f-200d-1f468-1f3fd","1f468-1f3ff-200d-2764-fe0f-200d-1f468-1f3fe","1f468-1f3ff-200d-2764-fe0f-200d-1f468-1f3ff"]},{n:["woman-heart-woman","couple with heart: woman, woman"],u:"1f469-200d-2764-fe0f-200d-1f469",v:["1f469-1f3fb-200d-2764-fe0f-200d-1f469-1f3fb","1f469-1f3fb-200d-2764-fe0f-200d-1f469-1f3fc","1f469-1f3fb-200d-2764-fe0f-200d-1f469-1f3fd","1f469-1f3fb-200d-2764-fe0f-200d-1f469-1f3fe","1f469-1f3fb-200d-2764-fe0f-200d-1f469-1f3ff","1f469-1f3fc-200d-2764-fe0f-200d-1f469-1f3fb","1f469-1f3fc-200d-2764-fe0f-200d-1f469-1f3fc","1f469-1f3fc-200d-2764-fe0f-200d-1f469-1f3fd","1f469-1f3fc-200d-2764-fe0f-200d-1f469-1f3fe","1f469-1f3fc-200d-2764-fe0f-200d-1f469-1f3ff","1f469-1f3fd-200d-2764-fe0f-200d-1f469-1f3fb","1f469-1f3fd-200d-2764-fe0f-200d-1f469-1f3fc","1f469-1f3fd-200d-2764-fe0f-200d-1f469-1f3fd","1f469-1f3fd-200d-2764-fe0f-200d-1f469-1f3fe","1f469-1f3fd-200d-2764-fe0f-200d-1f469-1f3ff","1f469-1f3fe-200d-2764-fe0f-200d-1f469-1f3fb","1f469-1f3fe-200d-2764-fe0f-200d-1f469-1f3fc","1f469-1f3fe-200d-2764-fe0f-200d-1f469-1f3fd","1f469-1f3fe-200d-2764-fe0f-200d-1f469-1f3fe","1f469-1f3fe-200d-2764-fe0f-200d-1f469-1f3ff","1f469-1f3ff-200d-2764-fe0f-200d-1f469-1f3fb","1f469-1f3ff-200d-2764-fe0f-200d-1f469-1f3fc","1f469-1f3ff-200d-2764-fe0f-200d-1f469-1f3fd","1f469-1f3ff-200d-2764-fe0f-200d-1f469-1f3fe","1f469-1f3ff-200d-2764-fe0f-200d-1f469-1f3ff"]},{n:["family"],u:"1f46a"},{n:["man-woman-boy","family: man, woman, boy"],u:"1f468-200d-1f469-200d-1f466"},{n:["man-woman-girl","family: man, woman, girl"],u:"1f468-200d-1f469-200d-1f467"},{n:["man-woman-girl-boy","family: man, woman, girl, boy"],u:"1f468-200d-1f469-200d-1f467-200d-1f466"},{n:["man-woman-boy-boy","family: man, woman, boy, boy"],u:"1f468-200d-1f469-200d-1f466-200d-1f466"},{n:["man-woman-girl-girl","family: man, woman, girl, girl"],u:"1f468-200d-1f469-200d-1f467-200d-1f467"},{n:["man-man-boy","family: man, man, boy"],u:"1f468-200d-1f468-200d-1f466"},{n:["man-man-girl","family: man, man, girl"],u:"1f468-200d-1f468-200d-1f467"},{n:["man-man-girl-boy","family: man, man, girl, boy"],u:"1f468-200d-1f468-200d-1f467-200d-1f466"},{n:["man-man-boy-boy","family: man, man, boy, boy"],u:"1f468-200d-1f468-200d-1f466-200d-1f466"},{n:["man-man-girl-girl","family: man, man, girl, girl"],u:"1f468-200d-1f468-200d-1f467-200d-1f467"},{n:["woman-woman-boy","family: woman, woman, boy"],u:"1f469-200d-1f469-200d-1f466"},{n:["woman-woman-girl","family: woman, woman, girl"],u:"1f469-200d-1f469-200d-1f467"},{n:["woman-woman-girl-boy","family: woman, woman, girl, boy"],u:"1f469-200d-1f469-200d-1f467-200d-1f466"},{n:["woman-woman-boy-boy","family: woman, woman, boy, boy"],u:"1f469-200d-1f469-200d-1f466-200d-1f466"},{n:["woman-woman-girl-girl","family: woman, woman, girl, girl"],u:"1f469-200d-1f469-200d-1f467-200d-1f467"},{n:["man-boy","family: man, boy"],u:"1f468-200d-1f466"},{n:["man-boy-boy","family: man, boy, boy"],u:"1f468-200d-1f466-200d-1f466"},{n:["man-girl","family: man, girl"],u:"1f468-200d-1f467"},{n:["man-girl-boy","family: man, girl, boy"],u:"1f468-200d-1f467-200d-1f466"},{n:["man-girl-girl","family: man, girl, girl"],u:"1f468-200d-1f467-200d-1f467"},{n:["woman-boy","family: woman, boy"],u:"1f469-200d-1f466"},{n:["woman-boy-boy","family: woman, boy, boy"],u:"1f469-200d-1f466-200d-1f466"},{n:["woman-girl","family: woman, girl"],u:"1f469-200d-1f467"},{n:["woman-girl-boy","family: woman, girl, boy"],u:"1f469-200d-1f467-200d-1f466"},{n:["woman-girl-girl","family: woman, girl, girl"],u:"1f469-200d-1f467-200d-1f467"},{n:["speaking head","speaking head in silhouette"],u:"1f5e3-fe0f"},{n:["bust in silhouette"],u:"1f464"},{n:["busts in silhouette"],u:"1f465"},{n:["people hugging"],u:"1fac2"},{n:["footprints"],u:"1f463"}],animals_nature:[{n:["monkey face"],u:"1f435"},{n:["monkey"],u:"1f412"},{n:["gorilla"],u:"1f98d"},{n:["orangutan"],u:"1f9a7"},{n:["dog","dog face"],u:"1f436"},{n:["dog","dog2"],u:"1f415"},{n:["guide dog"],u:"1f9ae"},{n:["service dog"],u:"1f415-200d-1f9ba"},{n:["poodle"],u:"1f429"},{n:["wolf","wolf face"],u:"1f43a"},{n:["fox face"],u:"1f98a"},{n:["raccoon"],u:"1f99d"},{n:["cat","cat face"],u:"1f431"},{n:["cat","cat2"],u:"1f408"},{n:["black cat"],u:"1f408-200d-2b1b"},{n:["lion face"],u:"1f981"},{n:["tiger","tiger face"],u:"1f42f"},{n:["tiger","tiger2"],u:"1f405"},{n:["leopard"],u:"1f406"},{n:["horse","horse face"],u:"1f434"},{n:["horse","racehorse"],u:"1f40e"},{n:["unicorn face"],u:"1f984"},{n:["zebra face"],u:"1f993"},{n:["deer"],u:"1f98c"},{n:["bison"],u:"1f9ac"},{n:["cow","cow face"],u:"1f42e"},{n:["ox"],u:"1f402"},{n:["water buffalo"],u:"1f403"},{n:["cow","cow2"],u:"1f404"},{n:["pig","pig face"],u:"1f437"},{n:["pig","pig2"],u:"1f416"},{n:["boar"],u:"1f417"},{n:["pig nose"],u:"1f43d"},{n:["ram"],u:"1f40f"},{n:["sheep"],u:"1f411"},{n:["goat"],u:"1f410"},{n:["dromedary camel"],u:"1f42a"},{n:["camel","bactrian camel"],u:"1f42b"},{n:["llama"],u:"1f999"},{n:["giraffe face"],u:"1f992"},{n:["elephant"],u:"1f418"},{n:["mammoth"],u:"1f9a3"},{n:["rhinoceros"],u:"1f98f"},{n:["hippopotamus"],u:"1f99b"},{n:["mouse","mouse face"],u:"1f42d"},{n:["mouse","mouse2"],u:"1f401"},{n:["rat"],u:"1f400"},{n:["hamster","hamster face"],u:"1f439"},{n:["rabbit","rabbit face"],u:"1f430"},{n:["rabbit","rabbit2"],u:"1f407"},{n:["chipmunk"],u:"1f43f-fe0f"},{n:["beaver"],u:"1f9ab"},{n:["hedgehog"],u:"1f994"},{n:["bat"],u:"1f987"},{n:["bear","bear face"],u:"1f43b"},{n:["polar bear"],u:"1f43b-200d-2744-fe0f"},{n:["koala"],u:"1f428"},{n:["panda face"],u:"1f43c"},{n:["sloth"],u:"1f9a5"},{n:["otter"],u:"1f9a6"},{n:["skunk"],u:"1f9a8"},{n:["kangaroo"],u:"1f998"},{n:["badger"],u:"1f9a1"},{n:["feet","paw prints"],u:"1f43e"},{n:["turkey"],u:"1f983"},{n:["chicken"],u:"1f414"},{n:["rooster"],u:"1f413"},{n:["hatching chick"],u:"1f423"},{n:["baby chick"],u:"1f424"},{n:["hatched chick","front-facing baby chick"],u:"1f425"},{n:["bird"],u:"1f426"},{n:["penguin"],u:"1f427"},{n:["dove","dove of peace"],u:"1f54a-fe0f"},{n:["eagle"],u:"1f985"},{n:["duck"],u:"1f986"},{n:["swan"],u:"1f9a2"},{n:["owl"],u:"1f989"},{n:["dodo"],u:"1f9a4"},{n:["feather"],u:"1fab6"},{n:["flamingo"],u:"1f9a9"},{n:["peacock"],u:"1f99a"},{n:["parrot"],u:"1f99c"},{n:["frog","frog face"],u:"1f438"},{n:["crocodile"],u:"1f40a"},{n:["turtle"],u:"1f422"},{n:["lizard"],u:"1f98e"},{n:["snake"],u:"1f40d"},{n:["dragon face"],u:"1f432"},{n:["dragon"],u:"1f409"},{n:["sauropod"],u:"1f995"},{n:["t-rex"],u:"1f996"},{n:["whale","spouting whale"],u:"1f433"},{n:["whale","whale2"],u:"1f40b"},{n:["dolphin","flipper"],u:"1f42c"},{n:["seal"],u:"1f9ad"},{n:["fish"],u:"1f41f"},{n:["tropical fish"],u:"1f420"},{n:["blowfish"],u:"1f421"},{n:["shark"],u:"1f988"},{n:["octopus"],u:"1f419"},{n:["shell","spiral shell"],u:"1f41a"},{n:["coral"],u:"1fab8"},{n:["snail"],u:"1f40c"},{n:["butterfly"],u:"1f98b"},{n:["bug"],u:"1f41b"},{n:["ant"],u:"1f41c"},{n:["bee","honeybee"],u:"1f41d"},{n:["beetle"],u:"1fab2"},{n:["ladybug","lady beetle"],u:"1f41e"},{n:["cricket"],u:"1f997"},{n:["cockroach"],u:"1fab3"},{n:["spider"],u:"1f577-fe0f"},{n:["spider web"],u:"1f578-fe0f"},{n:["scorpion"],u:"1f982"},{n:["mosquito"],u:"1f99f"},{n:["fly"],u:"1fab0"},{n:["worm"],u:"1fab1"},{n:["microbe"],u:"1f9a0"},{n:["bouquet"],u:"1f490"},{n:["cherry blossom"],u:"1f338"},{n:["white flower"],u:"1f4ae"},{n:["lotus"],u:"1fab7"},{n:["rosette"],u:"1f3f5-fe0f"},{n:["rose"],u:"1f339"},{n:["wilted flower"],u:"1f940"},{n:["hibiscus"],u:"1f33a"},{n:["sunflower"],u:"1f33b"},{n:["blossom"],u:"1f33c"},{n:["tulip"],u:"1f337"},{n:["seedling"],u:"1f331"},{n:["potted plant"],u:"1fab4"},{n:["evergreen tree"],u:"1f332"},{n:["deciduous tree"],u:"1f333"},{n:["palm tree"],u:"1f334"},{n:["cactus"],u:"1f335"},{n:["ear of rice"],u:"1f33e"},{n:["herb"],u:"1f33f"},{n:["shamrock"],u:"2618-fe0f"},{n:["four leaf clover"],u:"1f340"},{n:["maple leaf"],u:"1f341"},{n:["fallen leaf"],u:"1f342"},{n:["leaves","leaf fluttering in wind"],u:"1f343"},{n:["empty nest"],u:"1fab9"},{n:["nest with eggs"],u:"1faba"}],food_drink:[{n:["grapes"],u:"1f347"},{n:["melon"],u:"1f348"},{n:["watermelon"],u:"1f349"},{n:["tangerine"],u:"1f34a"},{n:["lemon"],u:"1f34b"},{n:["banana"],u:"1f34c"},{n:["pineapple"],u:"1f34d"},{n:["mango"],u:"1f96d"},{n:["apple","red apple"],u:"1f34e"},{n:["green apple"],u:"1f34f"},{n:["pear"],u:"1f350"},{n:["peach"],u:"1f351"},{n:["cherries"],u:"1f352"},{n:["strawberry"],u:"1f353"},{n:["blueberries"],u:"1fad0"},{n:["kiwifruit"],u:"1f95d"},{n:["tomato"],u:"1f345"},{n:["olive"],u:"1fad2"},{n:["coconut"],u:"1f965"},{n:["avocado"],u:"1f951"},{n:["eggplant","aubergine"],u:"1f346"},{n:["potato"],u:"1f954"},{n:["carrot"],u:"1f955"},{n:["corn","ear of maize"],u:"1f33d"},{n:["hot pepper"],u:"1f336-fe0f"},{n:["bell pepper"],u:"1fad1"},{n:["cucumber"],u:"1f952"},{n:["leafy green"],u:"1f96c"},{n:["broccoli"],u:"1f966"},{n:["garlic"],u:"1f9c4"},{n:["onion"],u:"1f9c5"},{n:["mushroom"],u:"1f344"},{n:["peanuts"],u:"1f95c"},{n:["beans"],u:"1fad8"},{n:["chestnut"],u:"1f330"},{n:["bread"],u:"1f35e"},{n:["croissant"],u:"1f950"},{n:["baguette bread"],u:"1f956"},{n:["flatbread"],u:"1fad3"},{n:["pretzel"],u:"1f968"},{n:["bagel"],u:"1f96f"},{n:["pancakes"],u:"1f95e"},{n:["waffle"],u:"1f9c7"},{n:["cheese wedge"],u:"1f9c0"},{n:["meat on bone"],u:"1f356"},{n:["poultry leg"],u:"1f357"},{n:["cut of meat"],u:"1f969"},{n:["bacon"],u:"1f953"},{n:["hamburger"],u:"1f354"},{n:["fries","french fries"],u:"1f35f"},{n:["pizza","slice of pizza"],u:"1f355"},{n:["hotdog","hot dog"],u:"1f32d"},{n:["sandwich"],u:"1f96a"},{n:["taco"],u:"1f32e"},{n:["burrito"],u:"1f32f"},{n:["tamale"],u:"1fad4"},{n:["stuffed flatbread"],u:"1f959"},{n:["falafel"],u:"1f9c6"},{n:["egg"],u:"1f95a"},{n:["cooking","fried egg"],u:"1f373"},{n:["shallow pan of food"],u:"1f958"},{n:["stew","pot of food"],u:"1f372"},{n:["fondue"],u:"1fad5"},{n:["bowl with spoon"],u:"1f963"},{n:["green salad"],u:"1f957"},{n:["popcorn"],u:"1f37f"},{n:["butter"],u:"1f9c8"},{n:["salt","salt shaker"],u:"1f9c2"},{n:["canned food"],u:"1f96b"},{n:["bento","bento box"],u:"1f371"},{n:["rice cracker"],u:"1f358"},{n:["rice ball"],u:"1f359"},{n:["rice","cooked rice"],u:"1f35a"},{n:["curry","curry and rice"],u:"1f35b"},{n:["ramen","steaming bowl"],u:"1f35c"},{n:["spaghetti"],u:"1f35d"},{n:["sweet potato","roasted sweet potato"],u:"1f360"},{n:["oden"],u:"1f362"},{n:["sushi"],u:"1f363"},{n:["fried shrimp"],u:"1f364"},{n:["fish cake","fish cake with swirl design"],u:"1f365"},{n:["moon cake"],u:"1f96e"},{n:["dango"],u:"1f361"},{n:["dumpling"],u:"1f95f"},{n:["fortune cookie"],u:"1f960"},{n:["takeout box"],u:"1f961"},{n:["crab"],u:"1f980"},{n:["lobster"],u:"1f99e"},{n:["shrimp"],u:"1f990"},{n:["squid"],u:"1f991"},{n:["oyster"],u:"1f9aa"},{n:["icecream","soft ice cream"],u:"1f366"},{n:["shaved ice"],u:"1f367"},{n:["ice cream"],u:"1f368"},{n:["doughnut"],u:"1f369"},{n:["cookie"],u:"1f36a"},{n:["birthday","birthday cake"],u:"1f382"},{n:["cake","shortcake"],u:"1f370"},{n:["cupcake"],u:"1f9c1"},{n:["pie"],u:"1f967"},{n:["chocolate bar"],u:"1f36b"},{n:["candy"],u:"1f36c"},{n:["lollipop"],u:"1f36d"},{n:["custard"],u:"1f36e"},{n:["honey pot"],u:"1f36f"},{n:["baby bottle"],u:"1f37c"},{n:["glass of milk"],u:"1f95b"},{n:["coffee","hot beverage"],u:"2615"},{n:["teapot"],u:"1fad6"},{n:["tea","teacup without handle"],u:"1f375"},{n:["sake","sake bottle and cup"],u:"1f376"},{n:["champagne","bottle with popping cork"],u:"1f37e"},{n:["wine glass"],u:"1f377"},{n:["cocktail","cocktail glass"],u:"1f378"},{n:["tropical drink"],u:"1f379"},{n:["beer","beer mug"],u:"1f37a"},{n:["beers","clinking beer mugs"],u:"1f37b"},{n:["clinking glasses"],u:"1f942"},{n:["tumbler glass"],u:"1f943"},{n:["pouring liquid"],u:"1fad7"},{n:["cup with straw"],u:"1f964"},{n:["bubble tea"],u:"1f9cb"},{n:["beverage box"],u:"1f9c3"},{n:["mate drink"],u:"1f9c9"},{n:["ice cube"],u:"1f9ca"},{n:["chopsticks"],u:"1f962"},{n:["knife fork plate","fork and knife with plate"],u:"1f37d-fe0f"},{n:["fork and knife"],u:"1f374"},{n:["spoon"],u:"1f944"},{n:["hocho","knife"],u:"1f52a"},{n:["jar"],u:"1fad9"},{n:["amphora"],u:"1f3fa"}],travel_places:[{n:["earth africa","earth globe europe-africa"],u:"1f30d"},{n:["earth americas","earth globe americas"],u:"1f30e"},{n:["earth asia","earth globe asia-australia"],u:"1f30f"},{n:["globe with meridians"],u:"1f310"},{n:["world map"],u:"1f5fa-fe0f"},{n:["japan","silhouette of japan"],u:"1f5fe"},{n:["compass"],u:"1f9ed"},{n:["snow-capped mountain","snow capped mountain"],u:"1f3d4-fe0f"},{n:["mountain"],u:"26f0-fe0f"},{n:["volcano"],u:"1f30b"},{n:["mount fuji"],u:"1f5fb"},{n:["camping"],u:"1f3d5-fe0f"},{n:["beach with umbrella"],u:"1f3d6-fe0f"},{n:["desert"],u:"1f3dc-fe0f"},{n:["desert island"],u:"1f3dd-fe0f"},{n:["national park"],u:"1f3de-fe0f"},{n:["stadium"],u:"1f3df-fe0f"},{n:["classical building"],u:"1f3db-fe0f"},{n:["building construction"],u:"1f3d7-fe0f"},{n:["brick","bricks"],u:"1f9f1"},{n:["rock"],u:"1faa8"},{n:["wood"],u:"1fab5"},{n:["hut"],u:"1f6d6"},{n:["houses","house buildings"],u:"1f3d8-fe0f"},{n:["derelict house","derelict house building"],u:"1f3da-fe0f"},{n:["house","house building"],u:"1f3e0"},{n:["house with garden"],u:"1f3e1"},{n:["office","office building"],u:"1f3e2"},{n:["post office","japanese post office"],u:"1f3e3"},{n:["european post office"],u:"1f3e4"},{n:["hospital"],u:"1f3e5"},{n:["bank"],u:"1f3e6"},{n:["hotel"],u:"1f3e8"},{n:["love hotel"],u:"1f3e9"},{n:["convenience store"],u:"1f3ea"},{n:["school"],u:"1f3eb"},{n:["department store"],u:"1f3ec"},{n:["factory"],u:"1f3ed"},{n:["japanese castle"],u:"1f3ef"},{n:["european castle"],u:"1f3f0"},{n:["wedding"],u:"1f492"},{n:["tokyo tower"],u:"1f5fc"},{n:["statue of liberty"],u:"1f5fd"},{n:["church"],u:"26ea"},{n:["mosque"],u:"1f54c"},{n:["hindu temple"],u:"1f6d5"},{n:["synagogue"],u:"1f54d"},{n:["shinto shrine"],u:"26e9-fe0f"},{n:["kaaba"],u:"1f54b"},{n:["fountain"],u:"26f2"},{n:["tent"],u:"26fa"},{n:["foggy"],u:"1f301"},{n:["night with stars"],u:"1f303"},{n:["cityscape"],u:"1f3d9-fe0f"},{n:["sunrise over mountains"],u:"1f304"},{n:["sunrise"],u:"1f305"},{n:["city sunset","cityscape at dusk"],u:"1f306"},{n:["city sunrise","sunset over buildings"],u:"1f307"},{n:["bridge at night"],u:"1f309"},{n:["hotsprings","hot springs"],u:"2668-fe0f"},{n:["carousel horse"],u:"1f3a0"},{n:["playground slide"],u:"1f6dd"},{n:["ferris wheel"],u:"1f3a1"},{n:["roller coaster"],u:"1f3a2"},{n:["barber","barber pole"],u:"1f488"},{n:["circus tent"],u:"1f3aa"},{n:["steam locomotive"],u:"1f682"},{n:["railway car"],u:"1f683"},{n:["high-speed train","bullettrain side"],u:"1f684"},{n:["bullettrain front","high-speed train with bullet nose"],u:"1f685"},{n:["train","train2"],u:"1f686"},{n:["metro"],u:"1f687"},{n:["light rail"],u:"1f688"},{n:["station"],u:"1f689"},{n:["tram"],u:"1f68a"},{n:["monorail"],u:"1f69d"},{n:["mountain railway"],u:"1f69e"},{n:["train","tram car"],u:"1f68b"},{n:["bus"],u:"1f68c"},{n:["oncoming bus"],u:"1f68d"},{n:["trolleybus"],u:"1f68e"},{n:["minibus"],u:"1f690"},{n:["ambulance"],u:"1f691"},{n:["fire engine"],u:"1f692"},{n:["police car"],u:"1f693"},{n:["oncoming police car"],u:"1f694"},{n:["taxi"],u:"1f695"},{n:["oncoming taxi"],u:"1f696"},{n:["car","red car","automobile"],u:"1f697"},{n:["oncoming automobile"],u:"1f698"},{n:["blue car","recreational vehicle"],u:"1f699"},{n:["pickup truck"],u:"1f6fb"},{n:["truck","delivery truck"],u:"1f69a"},{n:["articulated lorry"],u:"1f69b"},{n:["tractor"],u:"1f69c"},{n:["racing car"],u:"1f3ce-fe0f"},{n:["motorcycle","racing motorcycle"],u:"1f3cd-fe0f"},{n:["motor scooter"],u:"1f6f5"},{n:["manual wheelchair"],u:"1f9bd"},{n:["motorized wheelchair"],u:"1f9bc"},{n:["auto rickshaw"],u:"1f6fa"},{n:["bike","bicycle"],u:"1f6b2"},{n:["scooter"],u:"1f6f4"},{n:["skateboard"],u:"1f6f9"},{n:["roller skate"],u:"1f6fc"},{n:["busstop","bus stop"],u:"1f68f"},{n:["motorway"],u:"1f6e3-fe0f"},{n:["railway track"],u:"1f6e4-fe0f"},{n:["oil drum"],u:"1f6e2-fe0f"},{n:["fuelpump","fuel pump"],u:"26fd"},{n:["wheel"],u:"1f6de"},{n:["rotating light","police cars revolving light"],u:"1f6a8"},{n:["traffic light","horizontal traffic light"],u:"1f6a5"},{n:["vertical traffic light"],u:"1f6a6"},{n:["octagonal sign"],u:"1f6d1"},{n:["construction","construction sign"],u:"1f6a7"},{n:["anchor"],u:"2693"},{n:["ring buoy"],u:"1f6df"},{n:["boat","sailboat"],u:"26f5"},{n:["canoe"],u:"1f6f6"},{n:["speedboat"],u:"1f6a4"},{n:["passenger ship"],u:"1f6f3-fe0f"},{n:["ferry"],u:"26f4-fe0f"},{n:["motor boat"],u:"1f6e5-fe0f"},{n:["ship"],u:"1f6a2"},{n:["airplane"],u:"2708-fe0f"},{n:["small airplane"],u:"1f6e9-fe0f"},{n:["airplane departure"],u:"1f6eb"},{n:["airplane arriving"],u:"1f6ec"},{n:["parachute"],u:"1fa82"},{n:["seat"],u:"1f4ba"},{n:["helicopter"],u:"1f681"},{n:["suspension railway"],u:"1f69f"},{n:["mountain cableway"],u:"1f6a0"},{n:["aerial tramway"],u:"1f6a1"},{n:["satellite"],u:"1f6f0-fe0f"},{n:["rocket"],u:"1f680"},{n:["flying saucer"],u:"1f6f8"},{n:["bellhop bell"],u:"1f6ce-fe0f"},{n:["luggage"],u:"1f9f3"},{n:["hourglass"],u:"231b"},{n:["hourglass flowing sand","hourglass with flowing sand"],u:"23f3"},{n:["watch"],u:"231a"},{n:["alarm clock"],u:"23f0"},{n:["stopwatch"],u:"23f1-fe0f"},{n:["timer clock"],u:"23f2-fe0f"},{n:["mantelpiece clock"],u:"1f570-fe0f"},{n:["clock12","clock face twelve oclock"],u:"1f55b"},{n:["clock1230","clock face twelve-thirty"],u:"1f567"},{n:["clock1","clock face one oclock"],u:"1f550"},{n:["clock130","clock face one-thirty"],u:"1f55c"},{n:["clock2","clock face two oclock"],u:"1f551"},{n:["clock230","clock face two-thirty"],u:"1f55d"},{n:["clock3","clock face three oclock"],u:"1f552"},{n:["clock330","clock face three-thirty"],u:"1f55e"},{n:["clock4","clock face four oclock"],u:"1f553"},{n:["clock430","clock face four-thirty"],u:"1f55f"},{n:["clock5","clock face five oclock"],u:"1f554"},{n:["clock530","clock face five-thirty"],u:"1f560"},{n:["clock6","clock face six oclock"],u:"1f555"},{n:["clock630","clock face six-thirty"],u:"1f561"},{n:["clock7","clock face seven oclock"],u:"1f556"},{n:["clock730","clock face seven-thirty"],u:"1f562"},{n:["clock8","clock face eight oclock"],u:"1f557"},{n:["clock830","clock face eight-thirty"],u:"1f563"},{n:["clock9","clock face nine oclock"],u:"1f558"},{n:["clock930","clock face nine-thirty"],u:"1f564"},{n:["clock10","clock face ten oclock"],u:"1f559"},{n:["clock1030","clock face ten-thirty"],u:"1f565"},{n:["clock11","clock face eleven oclock"],u:"1f55a"},{n:["clock1130","clock face eleven-thirty"],u:"1f566"},{n:["new moon","new moon symbol"],u:"1f311"},{n:["waxing crescent moon","waxing crescent moon symbol"],u:"1f312"},{n:["first quarter moon","first quarter moon symbol"],u:"1f313"},{n:["moon","waxing gibbous moon","waxing gibbous moon symbol"],u:"1f314"},{n:["full moon","full moon symbol"],u:"1f315"},{n:["waning gibbous moon","waning gibbous moon symbol"],u:"1f316"},{n:["last quarter moon","last quarter moon symbol"],u:"1f317"},{n:["waning crescent moon","waning crescent moon symbol"],u:"1f318"},{n:["crescent moon"],u:"1f319"},{n:["new moon with face"],u:"1f31a"},{n:["first quarter moon with face"],u:"1f31b"},{n:["last quarter moon with face"],u:"1f31c"},{n:["thermometer"],u:"1f321-fe0f"},{n:["sunny","black sun with rays"],u:"2600-fe0f"},{n:["full moon with face"],u:"1f31d"},{n:["sun with face"],u:"1f31e"},{n:["ringed planet"],u:"1fa90"},{n:["star","white medium star"],u:"2b50"},{n:["star2","glowing star"],u:"1f31f"},{n:["stars","shooting star"],u:"1f320"},{n:["milky way"],u:"1f30c"},{n:["cloud"],u:"2601-fe0f"},{n:["partly sunny","sun behind cloud"],u:"26c5"},{n:["thunder cloud and rain","cloud with lightning and rain"],u:"26c8-fe0f"},{n:["mostly sunny","sun small cloud","sun behind small cloud"],u:"1f324-fe0f"},{n:["barely sunny","sun behind cloud","sun behind large cloud"],u:"1f325-fe0f"},{n:["partly sunny rain","sun behind rain cloud"],u:"1f326-fe0f"},{n:["rain cloud","cloud with rain"],u:"1f327-fe0f"},{n:["snow cloud","cloud with snow"],u:"1f328-fe0f"},{n:["lightning","lightning cloud","cloud with lightning"],u:"1f329-fe0f"},{n:["tornado","tornado cloud"],u:"1f32a-fe0f"},{n:["fog"],u:"1f32b-fe0f"},{n:["wind face","wind blowing face"],u:"1f32c-fe0f"},{n:["cyclone"],u:"1f300"},{n:["rainbow"],u:"1f308"},{n:["closed umbrella"],u:"1f302"},{n:["umbrella"],u:"2602-fe0f"},{n:["umbrella with rain drops"],u:"2614"},{n:["umbrella on ground"],u:"26f1-fe0f"},{n:["zap","high voltage sign"],u:"26a1"},{n:["snowflake"],u:"2744-fe0f"},{n:["snowman"],u:"2603-fe0f"},{n:["snowman without snow"],u:"26c4"},{n:["comet"],u:"2604-fe0f"},{n:["fire"],u:"1f525"},{n:["droplet"],u:"1f4a7"},{n:["ocean","water wave"],u:"1f30a"}],activities:[{n:["jack-o-lantern","jack o lantern"],u:"1f383"},{n:["christmas tree"],u:"1f384"},{n:["fireworks"],u:"1f386"},{n:["sparkler","firework sparkler"],u:"1f387"},{n:["firecracker"],u:"1f9e8"},{n:["sparkles"],u:"2728"},{n:["balloon"],u:"1f388"},{n:["tada","party popper"],u:"1f389"},{n:["confetti ball"],u:"1f38a"},{n:["tanabata tree"],u:"1f38b"},{n:["bamboo","pine decoration"],u:"1f38d"},{n:["dolls","japanese dolls"],u:"1f38e"},{n:["flags","carp streamer"],u:"1f38f"},{n:["wind chime"],u:"1f390"},{n:["rice scene","moon viewing ceremony"],u:"1f391"},{n:["red envelope","red gift envelope"],u:"1f9e7"},{n:["ribbon"],u:"1f380"},{n:["gift","wrapped present"],u:"1f381"},{n:["reminder ribbon"],u:"1f397-fe0f"},{n:["admission tickets"],u:"1f39f-fe0f"},{n:["ticket"],u:"1f3ab"},{n:["medal","military medal"],u:"1f396-fe0f"},{n:["trophy"],u:"1f3c6"},{n:["sports medal"],u:"1f3c5"},{n:["first place medal"],u:"1f947"},{n:["second place medal"],u:"1f948"},{n:["third place medal"],u:"1f949"},{n:["soccer","soccer ball"],u:"26bd"},{n:["baseball"],u:"26be"},{n:["softball"],u:"1f94e"},{n:["basketball","basketball and hoop"],u:"1f3c0"},{n:["volleyball"],u:"1f3d0"},{n:["football","american football"],u:"1f3c8"},{n:["rugby football"],u:"1f3c9"},{n:["tennis","tennis racquet and ball"],u:"1f3be"},{n:["flying disc"],u:"1f94f"},{n:["bowling"],u:"1f3b3"},{n:["cricket bat and ball"],u:"1f3cf"},{n:["field hockey stick and ball"],u:"1f3d1"},{n:["ice hockey stick and puck"],u:"1f3d2"},{n:["lacrosse","lacrosse stick and ball"],u:"1f94d"},{n:["table tennis paddle and ball"],u:"1f3d3"},{n:["badminton racquet and shuttlecock"],u:"1f3f8"},{n:["boxing glove"],u:"1f94a"},{n:["martial arts uniform"],u:"1f94b"},{n:["goal net"],u:"1f945"},{n:["golf","flag in hole"],u:"26f3"},{n:["ice skate"],u:"26f8-fe0f"},{n:["fishing pole and fish"],u:"1f3a3"},{n:["diving mask"],u:"1f93f"},{n:["running shirt with sash"],u:"1f3bd"},{n:["ski","ski and ski boot"],u:"1f3bf"},{n:["sled"],u:"1f6f7"},{n:["curling stone"],u:"1f94c"},{n:["dart","direct hit"],u:"1f3af"},{n:["yo-yo"],u:"1fa80"},{n:["kite"],u:"1fa81"},{n:["8ball","billiards"],u:"1f3b1"},{n:["crystal ball"],u:"1f52e"},{n:["magic wand"],u:"1fa84"},{n:["nazar amulet"],u:"1f9ff"},{n:["hamsa"],u:"1faac"},{n:["video game"],u:"1f3ae"},{n:["joystick"],u:"1f579-fe0f"},{n:["slot machine"],u:"1f3b0"},{n:["game die"],u:"1f3b2"},{n:["jigsaw","jigsaw puzzle piece"],u:"1f9e9"},{n:["teddy bear"],u:"1f9f8"},{n:["pinata"],u:"1fa85"},{n:["mirror ball"],u:"1faa9"},{n:["nesting dolls"],u:"1fa86"},{n:["spades","black spade suit"],u:"2660-fe0f"},{n:["hearts","black heart suit"],u:"2665-fe0f"},{n:["diamonds","black diamond suit"],u:"2666-fe0f"},{n:["clubs","black club suit"],u:"2663-fe0f"},{n:["chess pawn"],u:"265f-fe0f"},{n:["black joker","playing card black joker"],u:"1f0cf"},{n:["mahjong","mahjong tile red dragon"],u:"1f004"},{n:["flower playing cards"],u:"1f3b4"},{n:["performing arts"],u:"1f3ad"},{n:["framed picture","frame with picture"],u:"1f5bc-fe0f"},{n:["art","artist palette"],u:"1f3a8"},{n:["thread","spool of thread"],u:"1f9f5"},{n:["sewing needle"],u:"1faa1"},{n:["yarn","ball of yarn"],u:"1f9f6"},{n:["knot"],u:"1faa2"}],objects:[{n:["eyeglasses"],u:"1f453"},{n:["sunglasses","dark sunglasses"],u:"1f576-fe0f"},{n:["goggles"],u:"1f97d"},{n:["lab coat"],u:"1f97c"},{n:["safety vest"],u:"1f9ba"},{n:["necktie"],u:"1f454"},{n:["shirt","tshirt","t-shirt"],u:"1f455"},{n:["jeans"],u:"1f456"},{n:["scarf"],u:"1f9e3"},{n:["gloves"],u:"1f9e4"},{n:["coat"],u:"1f9e5"},{n:["socks"],u:"1f9e6"},{n:["dress"],u:"1f457"},{n:["kimono"],u:"1f458"},{n:["sari"],u:"1f97b"},{n:["one-piece swimsuit"],u:"1fa71"},{n:["briefs"],u:"1fa72"},{n:["shorts"],u:"1fa73"},{n:["bikini"],u:"1f459"},{n:["womans clothes"],u:"1f45a"},{n:["purse"],u:"1f45b"},{n:["handbag"],u:"1f45c"},{n:["pouch"],u:"1f45d"},{n:["shopping bags"],u:"1f6cd-fe0f"},{n:["school satchel"],u:"1f392"},{n:["thong sandal"],u:"1fa74"},{n:["shoe","mans shoe"],u:"1f45e"},{n:["athletic shoe"],u:"1f45f"},{n:["hiking boot"],u:"1f97e"},{n:["flat shoe","womans flat shoe"],u:"1f97f"},{n:["high heel","high-heeled shoe"],u:"1f460"},{n:["sandal","womans sandal"],u:"1f461"},{n:["ballet shoes"],u:"1fa70"},{n:["boot","womans boots"],u:"1f462"},{n:["crown"],u:"1f451"},{n:["womans hat"],u:"1f452"},{n:["tophat","top hat"],u:"1f3a9"},{n:["mortar board","graduation cap"],u:"1f393"},{n:["billed cap"],u:"1f9e2"},{n:["military helmet"],u:"1fa96"},{n:["rescue worker\u2019s helmet","helmet with white cross"],u:"26d1-fe0f"},{n:["prayer beads"],u:"1f4ff"},{n:["lipstick"],u:"1f484"},{n:["ring"],u:"1f48d"},{n:["gem","gem stone"],u:"1f48e"},{n:["mute","speaker with cancellation stroke"],u:"1f507"},{n:["speaker"],u:"1f508"},{n:["sound","speaker with one sound wave"],u:"1f509"},{n:["loud sound","speaker with three sound waves"],u:"1f50a"},{n:["loudspeaker","public address loudspeaker"],u:"1f4e2"},{n:["mega","cheering megaphone"],u:"1f4e3"},{n:["postal horn"],u:"1f4ef"},{n:["bell"],u:"1f514"},{n:["no bell","bell with cancellation stroke"],u:"1f515"},{n:["musical score"],u:"1f3bc"},{n:["musical note"],u:"1f3b5"},{n:["notes","multiple musical notes"],u:"1f3b6"},{n:["studio microphone"],u:"1f399-fe0f"},{n:["level slider"],u:"1f39a-fe0f"},{n:["control knobs"],u:"1f39b-fe0f"},{n:["microphone"],u:"1f3a4"},{n:["headphone","headphones"],u:"1f3a7"},{n:["radio"],u:"1f4fb"},{n:["saxophone"],u:"1f3b7"},{n:["accordion"],u:"1fa97"},{n:["guitar"],u:"1f3b8"},{n:["musical keyboard"],u:"1f3b9"},{n:["trumpet"],u:"1f3ba"},{n:["violin"],u:"1f3bb"},{n:["banjo"],u:"1fa95"},{n:["drum with drumsticks"],u:"1f941"},{n:["long drum"],u:"1fa98"},{n:["iphone","mobile phone"],u:"1f4f1"},{n:["calling","mobile phone with rightwards arrow at left"],u:"1f4f2"},{n:["phone","telephone","black telephone"],u:"260e-fe0f"},{n:["telephone receiver"],u:"1f4de"},{n:["pager"],u:"1f4df"},{n:["fax","fax machine"],u:"1f4e0"},{n:["battery"],u:"1f50b"},{n:["low battery"],u:"1faab"},{n:["electric plug"],u:"1f50c"},{n:["computer","personal computer"],u:"1f4bb"},{n:["desktop computer"],u:"1f5a5-fe0f"},{n:["printer"],u:"1f5a8-fe0f"},{n:["keyboard"],u:"2328-fe0f"},{n:["computer mouse","three button mouse"],u:"1f5b1-fe0f"},{n:["trackball"],u:"1f5b2-fe0f"},{n:["minidisc"],u:"1f4bd"},{n:["floppy disk"],u:"1f4be"},{n:["cd","optical disc"],u:"1f4bf"},{n:["dvd"],u:"1f4c0"},{n:["abacus"],u:"1f9ee"},{n:["movie camera"],u:"1f3a5"},{n:["film frames"],u:"1f39e-fe0f"},{n:["film projector"],u:"1f4fd-fe0f"},{n:["clapper","clapper board"],u:"1f3ac"},{n:["tv","television"],u:"1f4fa"},{n:["camera"],u:"1f4f7"},{n:["camera with flash"],u:"1f4f8"},{n:["video camera"],u:"1f4f9"},{n:["vhs","videocassette"],u:"1f4fc"},{n:["mag","left-pointing magnifying glass"],u:"1f50d"},{n:["mag right","right-pointing magnifying glass"],u:"1f50e"},{n:["candle"],u:"1f56f-fe0f"},{n:["bulb","electric light bulb"],u:"1f4a1"},{n:["flashlight","electric torch"],u:"1f526"},{n:["lantern","izakaya lantern"],u:"1f3ee"},{n:["diya lamp"],u:"1fa94"},{n:["notebook with decorative cover"],u:"1f4d4"},{n:["closed book"],u:"1f4d5"},{n:["book","open book"],u:"1f4d6"},{n:["green book"],u:"1f4d7"},{n:["blue book"],u:"1f4d8"},{n:["orange book"],u:"1f4d9"},{n:["books"],u:"1f4da"},{n:["notebook"],u:"1f4d3"},{n:["ledger"],u:"1f4d2"},{n:["page with curl"],u:"1f4c3"},{n:["scroll"],u:"1f4dc"},{n:["page facing up"],u:"1f4c4"},{n:["newspaper"],u:"1f4f0"},{n:["rolled-up newspaper","rolled up newspaper"],u:"1f5de-fe0f"},{n:["bookmark tabs"],u:"1f4d1"},{n:["bookmark"],u:"1f516"},{n:["label"],u:"1f3f7-fe0f"},{n:["moneybag","money bag"],u:"1f4b0"},{n:["coin"],u:"1fa99"},{n:["yen","banknote with yen sign"],u:"1f4b4"},{n:["dollar","banknote with dollar sign"],u:"1f4b5"},{n:["euro","banknote with euro sign"],u:"1f4b6"},{n:["pound","banknote with pound sign"],u:"1f4b7"},{n:["money with wings"],u:"1f4b8"},{n:["credit card"],u:"1f4b3"},{n:["receipt"],u:"1f9fe"},{n:["chart","chart with upwards trend and yen sign"],u:"1f4b9"},{n:["email","envelope"],u:"2709-fe0f"},{n:["e-mail","e-mail symbol"],u:"1f4e7"},{n:["incoming envelope"],u:"1f4e8"},{n:["envelope with arrow","envelope with downwards arrow above"],u:"1f4e9"},{n:["outbox tray"],u:"1f4e4"},{n:["inbox tray"],u:"1f4e5"},{n:["package"],u:"1f4e6"},{n:["mailbox","closed mailbox with raised flag"],u:"1f4eb"},{n:["mailbox closed","closed mailbox with lowered flag"],u:"1f4ea"},{n:["mailbox with mail","open mailbox with raised flag"],u:"1f4ec"},{n:["mailbox with no mail","open mailbox with lowered flag"],u:"1f4ed"},{n:["postbox"],u:"1f4ee"},{n:["ballot box with ballot"],u:"1f5f3-fe0f"},{n:["pencil","pencil2"],u:"270f-fe0f"},{n:["black nib"],u:"2712-fe0f"},{n:["fountain pen","lower left fountain pen"],u:"1f58b-fe0f"},{n:["pen","lower left ballpoint pen"],u:"1f58a-fe0f"},{n:["paintbrush","lower left paintbrush"],u:"1f58c-fe0f"},{n:["crayon","lower left crayon"],u:"1f58d-fe0f"},{n:["memo","pencil"],u:"1f4dd"},{n:["briefcase"],u:"1f4bc"},{n:["file folder"],u:"1f4c1"},{n:["open file folder"],u:"1f4c2"},{n:["card index dividers"],u:"1f5c2-fe0f"},{n:["date","calendar"],u:"1f4c5"},{n:["calendar","tear-off calendar"],u:"1f4c6"},{n:["spiral notepad","spiral note pad"],u:"1f5d2-fe0f"},{n:["spiral calendar","spiral calendar pad"],u:"1f5d3-fe0f"},{n:["card index"],u:"1f4c7"},{n:["chart with upwards trend"],u:"1f4c8"},{n:["chart with downwards trend"],u:"1f4c9"},{n:["bar chart"],u:"1f4ca"},{n:["clipboard"],u:"1f4cb"},{n:["pushpin"],u:"1f4cc"},{n:["round pushpin"],u:"1f4cd"},{n:["paperclip"],u:"1f4ce"},{n:["linked paperclips"],u:"1f587-fe0f"},{n:["straight ruler"],u:"1f4cf"},{n:["triangular ruler"],u:"1f4d0"},{n:["scissors","black scissors"],u:"2702-fe0f"},{n:["card file box"],u:"1f5c3-fe0f"},{n:["file cabinet"],u:"1f5c4-fe0f"},{n:["wastebasket"],u:"1f5d1-fe0f"},{n:["lock"],u:"1f512"},{n:["unlock","open lock"],u:"1f513"},{n:["lock with ink pen"],u:"1f50f"},{n:["closed lock with key"],u:"1f510"},{n:["key"],u:"1f511"},{n:["old key"],u:"1f5dd-fe0f"},{n:["hammer"],u:"1f528"},{n:["axe"],u:"1fa93"},{n:["pick"],u:"26cf-fe0f"},{n:["hammer and pick"],u:"2692-fe0f"},{n:["hammer and wrench"],u:"1f6e0-fe0f"},{n:["dagger","dagger knife"],u:"1f5e1-fe0f"},{n:["crossed swords"],u:"2694-fe0f"},{n:["gun","pistol"],u:"1f52b"},{n:["boomerang"],u:"1fa83"},{n:["bow and arrow"],u:"1f3f9"},{n:["shield"],u:"1f6e1-fe0f"},{n:["carpentry saw"],u:"1fa9a"},{n:["wrench"],u:"1f527"},{n:["screwdriver"],u:"1fa9b"},{n:["nut and bolt"],u:"1f529"},{n:["gear"],u:"2699-fe0f"},{n:["clamp","compression"],u:"1f5dc-fe0f"},{n:["scales","balance scale"],u:"2696-fe0f"},{n:["probing cane"],u:"1f9af"},{n:["link","link symbol"],u:"1f517"},{n:["chains"],u:"26d3-fe0f"},{n:["hook"],u:"1fa9d"},{n:["toolbox"],u:"1f9f0"},{n:["magnet"],u:"1f9f2"},{n:["ladder"],u:"1fa9c"},{n:["alembic"],u:"2697-fe0f"},{n:["test tube"],u:"1f9ea"},{n:["petri dish"],u:"1f9eb"},{n:["dna","dna double helix"],u:"1f9ec"},{n:["microscope"],u:"1f52c"},{n:["telescope"],u:"1f52d"},{n:["satellite antenna"],u:"1f4e1"},{n:["syringe"],u:"1f489"},{n:["drop of blood"],u:"1fa78"},{n:["pill"],u:"1f48a"},{n:["adhesive bandage"],u:"1fa79"},{n:["crutch"],u:"1fa7c"},{n:["stethoscope"],u:"1fa7a"},{n:["x-ray"],u:"1fa7b"},{n:["door"],u:"1f6aa"},{n:["elevator"],u:"1f6d7"},{n:["mirror"],u:"1fa9e"},{n:["window"],u:"1fa9f"},{n:["bed"],u:"1f6cf-fe0f"},{n:["couch and lamp"],u:"1f6cb-fe0f"},{n:["chair"],u:"1fa91"},{n:["toilet"],u:"1f6bd"},{n:["plunger"],u:"1faa0"},{n:["shower"],u:"1f6bf"},{n:["bathtub"],u:"1f6c1"},{n:["mouse trap"],u:"1faa4"},{n:["razor"],u:"1fa92"},{n:["lotion bottle"],u:"1f9f4"},{n:["safety pin"],u:"1f9f7"},{n:["broom"],u:"1f9f9"},{n:["basket"],u:"1f9fa"},{n:["roll of paper"],u:"1f9fb"},{n:["bucket"],u:"1faa3"},{n:["soap","bar of soap"],u:"1f9fc"},{n:["bubbles"],u:"1fae7"},{n:["toothbrush"],u:"1faa5"},{n:["sponge"],u:"1f9fd"},{n:["fire extinguisher"],u:"1f9ef"},{n:["shopping trolley"],u:"1f6d2"},{n:["smoking","smoking symbol"],u:"1f6ac"},{n:["coffin"],u:"26b0-fe0f"},{n:["headstone"],u:"1faa6"},{n:["funeral urn"],u:"26b1-fe0f"},{n:["moyai"],u:"1f5ff"},{n:["placard"],u:"1faa7"},{n:["identification card"],u:"1faaa"}],symbols:[{n:["atm","automated teller machine"],u:"1f3e7"},{n:["put litter in its place","put litter in its place symbol"],u:"1f6ae"},{n:["potable water","potable water symbol"],u:"1f6b0"},{n:["wheelchair","wheelchair symbol"],u:"267f"},{n:["mens","mens symbol"],u:"1f6b9"},{n:["womens","womens symbol"],u:"1f6ba"},{n:["restroom"],u:"1f6bb"},{n:["baby symbol"],u:"1f6bc"},{n:["wc","water closet"],u:"1f6be"},{n:["passport control"],u:"1f6c2"},{n:["customs"],u:"1f6c3"},{n:["baggage claim"],u:"1f6c4"},{n:["left luggage"],u:"1f6c5"},{n:["warning","warning sign"],u:"26a0-fe0f"},{n:["children crossing"],u:"1f6b8"},{n:["no entry"],u:"26d4"},{n:["no entry sign"],u:"1f6ab"},{n:["no bicycles"],u:"1f6b3"},{n:["no smoking","no smoking symbol"],u:"1f6ad"},{n:["do not litter","do not litter symbol"],u:"1f6af"},{n:["non-potable water","non-potable water symbol"],u:"1f6b1"},{n:["no pedestrians"],u:"1f6b7"},{n:["no mobile phones"],u:"1f4f5"},{n:["underage","no one under eighteen symbol"],u:"1f51e"},{n:["radioactive","radioactive sign"],u:"2622-fe0f"},{n:["biohazard","biohazard sign"],u:"2623-fe0f"},{n:["arrow up","upwards black arrow"],u:"2b06-fe0f"},{n:["north east arrow","arrow upper right"],u:"2197-fe0f"},{n:["arrow right","black rightwards arrow"],u:"27a1-fe0f"},{n:["south east arrow","arrow lower right"],u:"2198-fe0f"},{n:["arrow down","downwards black arrow"],u:"2b07-fe0f"},{n:["south west arrow","arrow lower left"],u:"2199-fe0f"},{n:["arrow left","leftwards black arrow"],u:"2b05-fe0f"},{n:["north west arrow","arrow upper left"],u:"2196-fe0f"},{n:["up down arrow","arrow up down"],u:"2195-fe0f"},{n:["left right arrow"],u:"2194-fe0f"},{n:["leftwards arrow with hook"],u:"21a9-fe0f"},{n:["arrow right hook","rightwards arrow with hook"],u:"21aa-fe0f"},{n:["arrow heading up","arrow pointing rightwards then curving upwards"],u:"2934-fe0f"},{n:["arrow heading down","arrow pointing rightwards then curving downwards"],u:"2935-fe0f"},{n:["arrows clockwise","clockwise downwards and upwards open circle arrows"],u:"1f503"},{n:["arrows counterclockwise","anticlockwise downwards and upwards open circle arrows"],u:"1f504"},{n:["back","back with leftwards arrow above"],u:"1f519"},{n:["end","end with leftwards arrow above"],u:"1f51a"},{n:["on","on with exclamation mark with left right arrow above"],u:"1f51b"},{n:["soon","soon with rightwards arrow above"],u:"1f51c"},{n:["top","top with upwards arrow above"],u:"1f51d"},{n:["place of worship"],u:"1f6d0"},{n:["atom symbol"],u:"269b-fe0f"},{n:["om","om symbol"],u:"1f549-fe0f"},{n:["star of david"],u:"2721-fe0f"},{n:["wheel of dharma"],u:"2638-fe0f"},{n:["yin yang"],u:"262f-fe0f"},{n:["latin cross"],u:"271d-fe0f"},{n:["orthodox cross"],u:"2626-fe0f"},{n:["star and crescent"],u:"262a-fe0f"},{n:["peace symbol"],u:"262e-fe0f"},{n:["menorah with nine branches"],u:"1f54e"},{n:["six pointed star","six pointed star with middle dot"],u:"1f52f"},{n:["aries"],u:"2648"},{n:["taurus"],u:"2649"},{n:["gemini"],u:"264a"},{n:["cancer"],u:"264b"},{n:["leo"],u:"264c"},{n:["virgo"],u:"264d"},{n:["libra"],u:"264e"},{n:["scorpius"],u:"264f"},{n:["sagittarius"],u:"2650"},{n:["capricorn"],u:"2651"},{n:["aquarius"],u:"2652"},{n:["pisces"],u:"2653"},{n:["ophiuchus"],u:"26ce"},{n:["twisted rightwards arrows"],u:"1f500"},{n:["repeat","clockwise rightwards and leftwards open circle arrows"],u:"1f501"},{n:["repeat one","clockwise rightwards and leftwards open circle arrows with circled one overlay"],u:"1f502"},{n:["arrow forward","black right-pointing triangle"],u:"25b6-fe0f"},{n:["fast forward","black right-pointing double triangle"],u:"23e9"},{n:["next track button","black right pointing double triangle with vertical bar"],u:"23ed-fe0f"},{n:["play or pause button","black right pointing triangle with double vertical bar"],u:"23ef-fe0f"},{n:["arrow backward","black left-pointing triangle"],u:"25c0-fe0f"},{n:["rewind","black left-pointing double triangle"],u:"23ea"},{n:["last track button","black left pointing double triangle with vertical bar"],u:"23ee-fe0f"},{n:["arrow up small","up-pointing small red triangle"],u:"1f53c"},{n:["arrow double up","black up-pointing double triangle"],u:"23eb"},{n:["arrow down small","down-pointing small red triangle"],u:"1f53d"},{n:["arrow double down","black down-pointing double triangle"],u:"23ec"},{n:["pause button","double vertical bar"],u:"23f8-fe0f"},{n:["stop button","black square for stop"],u:"23f9-fe0f"},{n:["record button","black circle for record"],u:"23fa-fe0f"},{n:["eject","eject button"],u:"23cf-fe0f"},{n:["cinema"],u:"1f3a6"},{n:["low brightness","low brightness symbol"],u:"1f505"},{n:["high brightness","high brightness symbol"],u:"1f506"},{n:["signal strength","antenna with bars"],u:"1f4f6"},{n:["vibration mode"],u:"1f4f3"},{n:["mobile phone off"],u:"1f4f4"},{n:["female sign"],u:"2640-fe0f"},{n:["male sign"],u:"2642-fe0f"},{n:["transgender symbol"],u:"26a7-fe0f"},{n:["heavy multiplication x"],u:"2716-fe0f"},{n:["heavy plus sign"],u:"2795"},{n:["heavy minus sign"],u:"2796"},{n:["heavy division sign"],u:"2797"},{n:["heavy equals sign"],u:"1f7f0"},{n:["infinity"],u:"267e-fe0f"},{n:["bangbang","double exclamation mark"],u:"203c-fe0f"},{n:["interrobang","exclamation question mark"],u:"2049-fe0f"},{n:["question","black question mark ornament"],u:"2753"},{n:["grey question","white question mark ornament"],u:"2754"},{n:["grey exclamation","white exclamation mark ornament"],u:"2755"},{n:["exclamation","heavy exclamation mark","heavy exclamation mark symbol"],u:"2757"},{n:["wavy dash"],u:"3030-fe0f"},{n:["currency exchange"],u:"1f4b1"},{n:["heavy dollar sign"],u:"1f4b2"},{n:["medical symbol","staff of aesculapius"],u:"2695-fe0f"},{n:["recycle","black universal recycling symbol"],u:"267b-fe0f"},{n:["fleur-de-lis","fleur de lis"],u:"269c-fe0f"},{n:["trident","trident emblem"],u:"1f531"},{n:["name badge"],u:"1f4db"},{n:["beginner","japanese symbol for beginner"],u:"1f530"},{n:["o","heavy large circle"],u:"2b55"},{n:["white check mark","white heavy check mark"],u:"2705"},{n:["ballot box with check"],u:"2611-fe0f"},{n:["heavy check mark"],u:"2714-fe0f"},{n:["x","cross mark"],u:"274c"},{n:["negative squared cross mark"],u:"274e"},{n:["curly loop"],u:"27b0"},{n:["loop","double curly loop"],u:"27bf"},{n:["part alternation mark"],u:"303d-fe0f"},{n:["eight spoked asterisk"],u:"2733-fe0f"},{n:["eight pointed black star"],u:"2734-fe0f"},{n:["sparkle"],u:"2747-fe0f"},{n:["copyright","copyright sign"],u:"00a9-fe0f"},{n:["registered","registered sign"],u:"00ae-fe0f"},{n:["tm","trade mark sign"],u:"2122-fe0f"},{n:["hash","hash key"],u:"0023-fe0f-20e3"},{n:["keycap: *","keycap star"],u:"002a-fe0f-20e3"},{n:["zero","keycap 0"],u:"0030-fe0f-20e3"},{n:["one","keycap 1"],u:"0031-fe0f-20e3"},{n:["two","keycap 2"],u:"0032-fe0f-20e3"},{n:["three","keycap 3"],u:"0033-fe0f-20e3"},{n:["four","keycap 4"],u:"0034-fe0f-20e3"},{n:["five","keycap 5"],u:"0035-fe0f-20e3"},{n:["six","keycap 6"],u:"0036-fe0f-20e3"},{n:["seven","keycap 7"],u:"0037-fe0f-20e3"},{n:["eight","keycap 8"],u:"0038-fe0f-20e3"},{n:["nine","keycap 9"],u:"0039-fe0f-20e3"},{n:["keycap ten"],u:"1f51f"},{n:["capital abcd","input symbol for latin capital letters"],u:"1f520"},{n:["abcd","input symbol for latin small letters"],u:"1f521"},{n:["1234","input symbol for numbers"],u:"1f522"},{n:["symbols","input symbol for symbols"],u:"1f523"},{n:["abc","input symbol for latin letters"],u:"1f524"},{n:["a","negative squared latin capital letter a"],u:"1f170-fe0f"},{n:["ab","negative squared ab"],u:"1f18e"},{n:["b","negative squared latin capital letter b"],u:"1f171-fe0f"},{n:["cl","squared cl"],u:"1f191"},{n:["cool","squared cool"],u:"1f192"},{n:["free","squared free"],u:"1f193"},{n:["information source"],u:"2139-fe0f"},{n:["id","squared id"],u:"1f194"},{n:["m","circled latin capital letter m"],u:"24c2-fe0f"},{n:["new","squared new"],u:"1f195"},{n:["ng","squared ng"],u:"1f196"},{n:["o2","negative squared latin capital letter o"],u:"1f17e-fe0f"},{n:["ok","squared ok"],u:"1f197"},{n:["parking","negative squared latin capital letter p"],u:"1f17f-fe0f"},{n:["sos","squared sos"],u:"1f198"},{n:["up","squared up with exclamation mark"],u:"1f199"},{n:["vs","squared vs"],u:"1f19a"},{n:["koko","squared katakana koko"],u:"1f201"},{n:["sa","squared katakana sa"],u:"1f202-fe0f"},{n:["u6708","squared cjk unified ideograph-6708"],u:"1f237-fe0f"},{n:["u6709","squared cjk unified ideograph-6709"],u:"1f236"},{n:["u6307","squared cjk unified ideograph-6307"],u:"1f22f"},{n:["ideograph advantage","circled ideograph advantage"],u:"1f250"},{n:["u5272","squared cjk unified ideograph-5272"],u:"1f239"},{n:["u7121","squared cjk unified ideograph-7121"],u:"1f21a"},{n:["u7981","squared cjk unified ideograph-7981"],u:"1f232"},{n:["accept","circled ideograph accept"],u:"1f251"},{n:["u7533","squared cjk unified ideograph-7533"],u:"1f238"},{n:["u5408","squared cjk unified ideograph-5408"],u:"1f234"},{n:["u7a7a","squared cjk unified ideograph-7a7a"],u:"1f233"},{n:["congratulations","circled ideograph congratulation"],u:"3297-fe0f"},{n:["secret","circled ideograph secret"],u:"3299-fe0f"},{n:["u55b6","squared cjk unified ideograph-55b6"],u:"1f23a"},{n:["u6e80","squared cjk unified ideograph-6e80"],u:"1f235"},{n:["red circle","large red circle"],u:"1f534"},{n:["large orange circle"],u:"1f7e0"},{n:["large yellow circle"],u:"1f7e1"},{n:["large green circle"],u:"1f7e2"},{n:["large blue circle"],u:"1f535"},{n:["large purple circle"],u:"1f7e3"},{n:["large brown circle"],u:"1f7e4"},{n:["black circle","medium black circle"],u:"26ab"},{n:["white circle","medium white circle"],u:"26aa"},{n:["large red square"],u:"1f7e5"},{n:["large orange square"],u:"1f7e7"},{n:["large yellow square"],u:"1f7e8"},{n:["large green square"],u:"1f7e9"},{n:["large blue square"],u:"1f7e6"},{n:["large purple square"],u:"1f7ea"},{n:["large brown square"],u:"1f7eb"},{n:["black large square"],u:"2b1b"},{n:["white large square"],u:"2b1c"},{n:["black medium square"],u:"25fc-fe0f"},{n:["white medium square"],u:"25fb-fe0f"},{n:["black medium small square"],u:"25fe"},{n:["white medium small square"],u:"25fd"},{n:["black small square"],u:"25aa-fe0f"},{n:["white small square"],u:"25ab-fe0f"},{n:["large orange diamond"],u:"1f536"},{n:["large blue diamond"],u:"1f537"},{n:["small orange diamond"],u:"1f538"},{n:["small blue diamond"],u:"1f539"},{n:["small red triangle","up-pointing red triangle"],u:"1f53a"},{n:["small red triangle down","down-pointing red triangle"],u:"1f53b"},{n:["diamond shape with a dot inside"],u:"1f4a0"},{n:["radio button"],u:"1f518"},{n:["white square button"],u:"1f533"},{n:["black square button"],u:"1f532"}],flags:[{n:["chequered flag","checkered flag"],u:"1f3c1"},{n:["triangular flag on post"],u:"1f6a9"},{n:["crossed flags"],u:"1f38c"},{n:["waving black flag"],u:"1f3f4"},{n:["white flag","waving white flag"],u:"1f3f3-fe0f"},{n:["rainbow flag","rainbow-flag"],u:"1f3f3-fe0f-200d-1f308"},{n:["transgender flag"],u:"1f3f3-fe0f-200d-26a7-fe0f"},{n:["pirate flag"],u:"1f3f4-200d-2620-fe0f"},{n:["flag-ac","ascension island flag"],u:"1f1e6-1f1e8"},{n:["flag-ad","andorra flag"],u:"1f1e6-1f1e9"},{n:["flag-ae","united arab emirates flag"],u:"1f1e6-1f1ea"},{n:["flag-af","afghanistan flag"],u:"1f1e6-1f1eb"},{n:["flag-ag","antigua & barbuda flag"],u:"1f1e6-1f1ec"},{n:["flag-ai","anguilla flag"],u:"1f1e6-1f1ee"},{n:["flag-al","albania flag"],u:"1f1e6-1f1f1"},{n:["flag-am","armenia flag"],u:"1f1e6-1f1f2"},{n:["flag-ao","angola flag"],u:"1f1e6-1f1f4"},{n:["flag-aq","antarctica flag"],u:"1f1e6-1f1f6"},{n:["flag-ar","argentina flag"],u:"1f1e6-1f1f7"},{n:["flag-as","american samoa flag"],u:"1f1e6-1f1f8"},{n:["flag-at","austria flag"],u:"1f1e6-1f1f9"},{n:["flag-au","australia flag"],u:"1f1e6-1f1fa"},{n:["flag-aw","aruba flag"],u:"1f1e6-1f1fc"},{n:["flag-ax","\xE5land islands flag"],u:"1f1e6-1f1fd"},{n:["flag-az","azerbaijan flag"],u:"1f1e6-1f1ff"},{n:["flag-ba","bosnia & herzegovina flag"],u:"1f1e7-1f1e6"},{n:["flag-bb","barbados flag"],u:"1f1e7-1f1e7"},{n:["flag-bd","bangladesh flag"],u:"1f1e7-1f1e9"},{n:["flag-be","belgium flag"],u:"1f1e7-1f1ea"},{n:["flag-bf","burkina faso flag"],u:"1f1e7-1f1eb"},{n:["flag-bg","bulgaria flag"],u:"1f1e7-1f1ec"},{n:["flag-bh","bahrain flag"],u:"1f1e7-1f1ed"},{n:["flag-bi","burundi flag"],u:"1f1e7-1f1ee"},{n:["flag-bj","benin flag"],u:"1f1e7-1f1ef"},{n:["flag-bl","st. barth\xE9lemy flag"],u:"1f1e7-1f1f1"},{n:["flag-bm","bermuda flag"],u:"1f1e7-1f1f2"},{n:["flag-bn","brunei flag"],u:"1f1e7-1f1f3"},{n:["flag-bo","bolivia flag"],u:"1f1e7-1f1f4"},{n:["flag-bq","caribbean netherlands flag"],u:"1f1e7-1f1f6"},{n:["flag-br","brazil flag"],u:"1f1e7-1f1f7"},{n:["flag-bs","bahamas flag"],u:"1f1e7-1f1f8"},{n:["flag-bt","bhutan flag"],u:"1f1e7-1f1f9"},{n:["flag-bv","bouvet island flag"],u:"1f1e7-1f1fb"},{n:["flag-bw","botswana flag"],u:"1f1e7-1f1fc"},{n:["flag-by","belarus flag"],u:"1f1e7-1f1fe"},{n:["flag-bz","belize flag"],u:"1f1e7-1f1ff"},{n:["flag-ca","canada flag"],u:"1f1e8-1f1e6"},{n:["flag-cc","cocos (keeling) islands flag"],u:"1f1e8-1f1e8"},{n:["flag-cd","congo - kinshasa flag"],u:"1f1e8-1f1e9"},{n:["flag-cf","central african republic flag"],u:"1f1e8-1f1eb"},{n:["flag-cg","congo - brazzaville flag"],u:"1f1e8-1f1ec"},{n:["flag-ch","switzerland flag"],u:"1f1e8-1f1ed"},{n:["flag-ci","c\xF4te d\u2019ivoire flag"],u:"1f1e8-1f1ee"},{n:["flag-ck","cook islands flag"],u:"1f1e8-1f1f0"},{n:["flag-cl","chile flag"],u:"1f1e8-1f1f1"},{n:["flag-cm","cameroon flag"],u:"1f1e8-1f1f2"},{n:["cn","flag-cn","china flag"],u:"1f1e8-1f1f3"},{n:["flag-co","colombia flag"],u:"1f1e8-1f1f4"},{n:["flag-cp","clipperton island flag"],u:"1f1e8-1f1f5"},{n:["flag-cr","costa rica flag"],u:"1f1e8-1f1f7"},{n:["flag-cu","cuba flag"],u:"1f1e8-1f1fa"},{n:["flag-cv","cape verde flag"],u:"1f1e8-1f1fb"},{n:["flag-cw","cura\xE7ao flag"],u:"1f1e8-1f1fc"},{n:["flag-cx","christmas island flag"],u:"1f1e8-1f1fd"},{n:["flag-cy","cyprus flag"],u:"1f1e8-1f1fe"},{n:["flag-cz","czechia flag"],u:"1f1e8-1f1ff"},{n:["de","flag-de","germany flag"],u:"1f1e9-1f1ea"},{n:["flag-dg","diego garcia flag"],u:"1f1e9-1f1ec"},{n:["flag-dj","djibouti flag"],u:"1f1e9-1f1ef"},{n:["flag-dk","denmark flag"],u:"1f1e9-1f1f0"},{n:["flag-dm","dominica flag"],u:"1f1e9-1f1f2"},{n:["flag-do","dominican republic flag"],u:"1f1e9-1f1f4"},{n:["flag-dz","algeria flag"],u:"1f1e9-1f1ff"},{n:["flag-ea","ceuta & melilla flag"],u:"1f1ea-1f1e6"},{n:["flag-ec","ecuador flag"],u:"1f1ea-1f1e8"},{n:["flag-ee","estonia flag"],u:"1f1ea-1f1ea"},{n:["flag-eg","egypt flag"],u:"1f1ea-1f1ec"},{n:["flag-eh","western sahara flag"],u:"1f1ea-1f1ed"},{n:["flag-er","eritrea flag"],u:"1f1ea-1f1f7"},{n:["es","flag-es","spain flag"],u:"1f1ea-1f1f8"},{n:["flag-et","ethiopia flag"],u:"1f1ea-1f1f9"},{n:["flag-eu","european union flag"],u:"1f1ea-1f1fa"},{n:["flag-fi","finland flag"],u:"1f1eb-1f1ee"},{n:["flag-fj","fiji flag"],u:"1f1eb-1f1ef"},{n:["flag-fk","falkland islands flag"],u:"1f1eb-1f1f0"},{n:["flag-fm","micronesia flag"],u:"1f1eb-1f1f2"},{n:["flag-fo","faroe islands flag"],u:"1f1eb-1f1f4"},{n:["fr","flag-fr","france flag"],u:"1f1eb-1f1f7"},{n:["flag-ga","gabon flag"],u:"1f1ec-1f1e6"},{n:["gb","uk","flag-gb","united kingdom flag"],u:"1f1ec-1f1e7"},{n:["flag-gd","grenada flag"],u:"1f1ec-1f1e9"},{n:["flag-ge","georgia flag"],u:"1f1ec-1f1ea"},{n:["flag-gf","french guiana flag"],u:"1f1ec-1f1eb"},{n:["flag-gg","guernsey flag"],u:"1f1ec-1f1ec"},{n:["flag-gh","ghana flag"],u:"1f1ec-1f1ed"},{n:["flag-gi","gibraltar flag"],u:"1f1ec-1f1ee"},{n:["flag-gl","greenland flag"],u:"1f1ec-1f1f1"},{n:["flag-gm","gambia flag"],u:"1f1ec-1f1f2"},{n:["flag-gn","guinea flag"],u:"1f1ec-1f1f3"},{n:["flag-gp","guadeloupe flag"],u:"1f1ec-1f1f5"},{n:["flag-gq","equatorial guinea flag"],u:"1f1ec-1f1f6"},{n:["flag-gr","greece flag"],u:"1f1ec-1f1f7"},{n:["flag-gs","south georgia & south sandwich islands flag"],u:"1f1ec-1f1f8"},{n:["flag-gt","guatemala flag"],u:"1f1ec-1f1f9"},{n:["flag-gu","guam flag"],u:"1f1ec-1f1fa"},{n:["flag-gw","guinea-bissau flag"],u:"1f1ec-1f1fc"},{n:["flag-gy","guyana flag"],u:"1f1ec-1f1fe"},{n:["flag-hk","hong kong sar china flag"],u:"1f1ed-1f1f0"},{n:["flag-hm","heard & mcdonald islands flag"],u:"1f1ed-1f1f2"},{n:["flag-hn","honduras flag"],u:"1f1ed-1f1f3"},{n:["flag-hr","croatia flag"],u:"1f1ed-1f1f7"},{n:["flag-ht","haiti flag"],u:"1f1ed-1f1f9"},{n:["flag-hu","hungary flag"],u:"1f1ed-1f1fa"},{n:["flag-ic","canary islands flag"],u:"1f1ee-1f1e8"},{n:["flag-id","indonesia flag"],u:"1f1ee-1f1e9"},{n:["flag-ie","ireland flag"],u:"1f1ee-1f1ea"},{n:["flag-il","israel flag"],u:"1f1ee-1f1f1"},{n:["flag-im","isle of man flag"],u:"1f1ee-1f1f2"},{n:["flag-in","india flag"],u:"1f1ee-1f1f3"},{n:["flag-io","british indian ocean territory flag"],u:"1f1ee-1f1f4"},{n:["flag-iq","iraq flag"],u:"1f1ee-1f1f6"},{n:["flag-ir","iran flag"],u:"1f1ee-1f1f7"},{n:["flag-is","iceland flag"],u:"1f1ee-1f1f8"},{n:["it","flag-it","italy flag"],u:"1f1ee-1f1f9"},{n:["flag-je","jersey flag"],u:"1f1ef-1f1ea"},{n:["flag-jm","jamaica flag"],u:"1f1ef-1f1f2"},{n:["flag-jo","jordan flag"],u:"1f1ef-1f1f4"},{n:["jp","flag-jp","japan flag"],u:"1f1ef-1f1f5"},{n:["flag-ke","kenya flag"],u:"1f1f0-1f1ea"},{n:["flag-kg","kyrgyzstan flag"],u:"1f1f0-1f1ec"},{n:["flag-kh","cambodia flag"],u:"1f1f0-1f1ed"},{n:["flag-ki","kiribati flag"],u:"1f1f0-1f1ee"},{n:["flag-km","comoros flag"],u:"1f1f0-1f1f2"},{n:["flag-kn","st. kitts & nevis flag"],u:"1f1f0-1f1f3"},{n:["flag-kp","north korea flag"],u:"1f1f0-1f1f5"},{n:["kr","flag-kr","south korea flag"],u:"1f1f0-1f1f7"},{n:["flag-kw","kuwait flag"],u:"1f1f0-1f1fc"},{n:["flag-ky","cayman islands flag"],u:"1f1f0-1f1fe"},{n:["flag-kz","kazakhstan flag"],u:"1f1f0-1f1ff"},{n:["flag-la","laos flag"],u:"1f1f1-1f1e6"},{n:["flag-lb","lebanon flag"],u:"1f1f1-1f1e7"},{n:["flag-lc","st. lucia flag"],u:"1f1f1-1f1e8"},{n:["flag-li","liechtenstein flag"],u:"1f1f1-1f1ee"},{n:["flag-lk","sri lanka flag"],u:"1f1f1-1f1f0"},{n:["flag-lr","liberia flag"],u:"1f1f1-1f1f7"},{n:["flag-ls","lesotho flag"],u:"1f1f1-1f1f8"},{n:["flag-lt","lithuania flag"],u:"1f1f1-1f1f9"},{n:["flag-lu","luxembourg flag"],u:"1f1f1-1f1fa"},{n:["flag-lv","latvia flag"],u:"1f1f1-1f1fb"},{n:["flag-ly","libya flag"],u:"1f1f1-1f1fe"},{n:["flag-ma","morocco flag"],u:"1f1f2-1f1e6"},{n:["flag-mc","monaco flag"],u:"1f1f2-1f1e8"},{n:["flag-md","moldova flag"],u:"1f1f2-1f1e9"},{n:["flag-me","montenegro flag"],u:"1f1f2-1f1ea"},{n:["flag-mf","st. martin flag"],u:"1f1f2-1f1eb"},{n:["flag-mg","madagascar flag"],u:"1f1f2-1f1ec"},{n:["flag-mh","marshall islands flag"],u:"1f1f2-1f1ed"},{n:["flag-mk","north macedonia flag"],u:"1f1f2-1f1f0"},{n:["flag-ml","mali flag"],u:"1f1f2-1f1f1"},{n:["flag-mm","myanmar (burma) flag"],u:"1f1f2-1f1f2"},{n:["flag-mn","mongolia flag"],u:"1f1f2-1f1f3"},{n:["flag-mo","macao sar china flag"],u:"1f1f2-1f1f4"},{n:["flag-mp","northern mariana islands flag"],u:"1f1f2-1f1f5"},{n:["flag-mq","martinique flag"],u:"1f1f2-1f1f6"},{n:["flag-mr","mauritania flag"],u:"1f1f2-1f1f7"},{n:["flag-ms","montserrat flag"],u:"1f1f2-1f1f8"},{n:["flag-mt","malta flag"],u:"1f1f2-1f1f9"},{n:["flag-mu","mauritius flag"],u:"1f1f2-1f1fa"},{n:["flag-mv","maldives flag"],u:"1f1f2-1f1fb"},{n:["flag-mw","malawi flag"],u:"1f1f2-1f1fc"},{n:["flag-mx","mexico flag"],u:"1f1f2-1f1fd"},{n:["flag-my","malaysia flag"],u:"1f1f2-1f1fe"},{n:["flag-mz","mozambique flag"],u:"1f1f2-1f1ff"},{n:["flag-na","namibia flag"],u:"1f1f3-1f1e6"},{n:["flag-nc","new caledonia flag"],u:"1f1f3-1f1e8"},{n:["flag-ne","niger flag"],u:"1f1f3-1f1ea"},{n:["flag-nf","norfolk island flag"],u:"1f1f3-1f1eb"},{n:["flag-ng","nigeria flag"],u:"1f1f3-1f1ec"},{n:["flag-ni","nicaragua flag"],u:"1f1f3-1f1ee"},{n:["flag-nl","netherlands flag"],u:"1f1f3-1f1f1"},{n:["flag-no","norway flag"],u:"1f1f3-1f1f4"},{n:["flag-np","nepal flag"],u:"1f1f3-1f1f5"},{n:["flag-nr","nauru flag"],u:"1f1f3-1f1f7"},{n:["flag-nu","niue flag"],u:"1f1f3-1f1fa"},{n:["flag-nz","new zealand flag"],u:"1f1f3-1f1ff"},{n:["flag-om","oman flag"],u:"1f1f4-1f1f2"},{n:["flag-pa","panama flag"],u:"1f1f5-1f1e6"},{n:["flag-pe","peru flag"],u:"1f1f5-1f1ea"},{n:["flag-pf","french polynesia flag"],u:"1f1f5-1f1eb"},{n:["flag-pg","papua new guinea flag"],u:"1f1f5-1f1ec"},{n:["flag-ph","philippines flag"],u:"1f1f5-1f1ed"},{n:["flag-pk","pakistan flag"],u:"1f1f5-1f1f0"},{n:["flag-pl","poland flag"],u:"1f1f5-1f1f1"},{n:["flag-pm","st. pierre & miquelon flag"],u:"1f1f5-1f1f2"},{n:["flag-pn","pitcairn islands flag"],u:"1f1f5-1f1f3"},{n:["flag-pr","puerto rico flag"],u:"1f1f5-1f1f7"},{n:["flag-ps","palestinian territories flag"],u:"1f1f5-1f1f8"},{n:["flag-pt","portugal flag"],u:"1f1f5-1f1f9"},{n:["flag-pw","palau flag"],u:"1f1f5-1f1fc"},{n:["flag-py","paraguay flag"],u:"1f1f5-1f1fe"},{n:["flag-qa","qatar flag"],u:"1f1f6-1f1e6"},{n:["flag-re","r\xE9union flag"],u:"1f1f7-1f1ea"},{n:["flag-ro","romania flag"],u:"1f1f7-1f1f4"},{n:["flag-rs","serbia flag"],u:"1f1f7-1f1f8"},{n:["ru","flag-ru","russia flag"],u:"1f1f7-1f1fa"},{n:["flag-rw","rwanda flag"],u:"1f1f7-1f1fc"},{n:["flag-sa","saudi arabia flag"],u:"1f1f8-1f1e6"},{n:["flag-sb","solomon islands flag"],u:"1f1f8-1f1e7"},{n:["flag-sc","seychelles flag"],u:"1f1f8-1f1e8"},{n:["flag-sd","sudan flag"],u:"1f1f8-1f1e9"},{n:["flag-se","sweden flag"],u:"1f1f8-1f1ea"},{n:["flag-sg","singapore flag"],u:"1f1f8-1f1ec"},{n:["flag-sh","st. helena flag"],u:"1f1f8-1f1ed"},{n:["flag-si","slovenia flag"],u:"1f1f8-1f1ee"},{n:["flag-sj","svalbard & jan mayen flag"],u:"1f1f8-1f1ef"},{n:["flag-sk","slovakia flag"],u:"1f1f8-1f1f0"},{n:["flag-sl","sierra leone flag"],u:"1f1f8-1f1f1"},{n:["flag-sm","san marino flag"],u:"1f1f8-1f1f2"},{n:["flag-sn","senegal flag"],u:"1f1f8-1f1f3"},{n:["flag-so","somalia flag"],u:"1f1f8-1f1f4"},{n:["flag-sr","suriname flag"],u:"1f1f8-1f1f7"},{n:["flag-ss","south sudan flag"],u:"1f1f8-1f1f8"},{n:["flag-st","s\xE3o tom\xE9 & pr\xEDncipe flag"],u:"1f1f8-1f1f9"},{n:["flag-sv","el salvador flag"],u:"1f1f8-1f1fb"},{n:["flag-sx","sint maarten flag"],u:"1f1f8-1f1fd"},{n:["flag-sy","syria flag"],u:"1f1f8-1f1fe"},{n:["flag-sz","eswatini flag"],u:"1f1f8-1f1ff"},{n:["flag-ta","tristan da cunha flag"],u:"1f1f9-1f1e6"},{n:["flag-tc","turks & caicos islands flag"],u:"1f1f9-1f1e8"},{n:["flag-td","chad flag"],u:"1f1f9-1f1e9"},{n:["flag-tf","french southern territories flag"],u:"1f1f9-1f1eb"},{n:["flag-tg","togo flag"],u:"1f1f9-1f1ec"},{n:["flag-th","thailand flag"],u:"1f1f9-1f1ed"},{n:["flag-tj","tajikistan flag"],u:"1f1f9-1f1ef"},{n:["flag-tk","tokelau flag"],u:"1f1f9-1f1f0"},{n:["flag-tl","timor-leste flag"],u:"1f1f9-1f1f1"},{n:["flag-tm","turkmenistan flag"],u:"1f1f9-1f1f2"},{n:["flag-tn","tunisia flag"],u:"1f1f9-1f1f3"},{n:["flag-to","tonga flag"],u:"1f1f9-1f1f4"},{n:["flag-tr","turkey flag"],u:"1f1f9-1f1f7"},{n:["flag-tt","trinidad & tobago flag"],u:"1f1f9-1f1f9"},{n:["flag-tv","tuvalu flag"],u:"1f1f9-1f1fb"},{n:["flag-tw","taiwan flag"],u:"1f1f9-1f1fc"},{n:["flag-tz","tanzania flag"],u:"1f1f9-1f1ff"},{n:["flag-ua","ukraine flag"],u:"1f1fa-1f1e6"},{n:["flag-ug","uganda flag"],u:"1f1fa-1f1ec"},{n:["flag-um","u.s. outlying islands flag"],u:"1f1fa-1f1f2"},{n:["flag-un","united nations flag"],u:"1f1fa-1f1f3"},{n:["us","flag-us","united states flag"],u:"1f1fa-1f1f8"},{n:["flag-uy","uruguay flag"],u:"1f1fa-1f1fe"},{n:["flag-uz","uzbekistan flag"],u:"1f1fa-1f1ff"},{n:["flag-va","vatican city flag"],u:"1f1fb-1f1e6"},{n:["flag-vc","st. vincent & grenadines flag"],u:"1f1fb-1f1e8"},{n:["flag-ve","venezuela flag"],u:"1f1fb-1f1ea"},{n:["flag-vg","british virgin islands flag"],u:"1f1fb-1f1ec"},{n:["flag-vi","u.s. virgin islands flag"],u:"1f1fb-1f1ee"},{n:["flag-vn","vietnam flag"],u:"1f1fb-1f1f3"},{n:["flag-vu","vanuatu flag"],u:"1f1fb-1f1fa"},{n:["flag-wf","wallis & futuna flag"],u:"1f1fc-1f1eb"},{n:["flag-ws","samoa flag"],u:"1f1fc-1f1f8"},{n:["flag-xk","kosovo flag"],u:"1f1fd-1f1f0"},{n:["flag-ye","yemen flag"],u:"1f1fe-1f1ea"},{n:["flag-yt","mayotte flag"],u:"1f1fe-1f1f9"},{n:["flag-za","south africa flag"],u:"1f1ff-1f1e6"},{n:["flag-zm","zambia flag"],u:"1f1ff-1f1f2"},{n:["flag-zw","zimbabwe flag"],u:"1f1ff-1f1fc"},{n:["england flag","flag-england"],u:"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f"},{n:["scotland flag","flag-scotland"],u:"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f"},{n:["wales flag","flag-wales"],u:"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f"}]};var cD=class extends fDe.EditorSuggest{constructor(r,n){super(r);this.inCmd=!1;this.cmdStartCh=0;this.plugin=n,this.emojis=Object.keys(BS).reduce((i,a)=>[...i,...BS[a].map(o=>({label:o.n[0],desc:o.n[1],variants:o.v,unicode:o.u}))],[])}resetInfos(){this.cmdStartCh=0,this.inCmd=!1}onTrigger(r,n,i){let a=n.getLine(r.line).slice(0,r.ch);if(!this.inCmd&&!(a.slice(-2)==" "+this.plugin.superstate.settings.emojiTriggerChar||a[0]==this.plugin.superstate.settings.emojiTriggerChar))return this.resetInfos(),null;this.inCmd||(this.cmdStartCh=a.length-1,this.inCmd=!0);let o=a.slice(this.cmdStartCh,r.ch);return o.includes(" ")||!o.includes(this.plugin.superstate.settings.emojiTriggerChar)?(this.resetInfos(),null):(this.suggestEl.classList.toggle("mk-emoji-menu",!0),{start:r,end:r,query:o.slice(1)})}getSuggestions(r){let n=this.emojis.filter(({label:i,desc:a})=>i.includes(r.query)||a?.includes(r.query));return n.length>0?n:[{label:z.commandsSuggest.noResult,unicode:"",desc:""}]}renderSuggestion(r,n){let i=document.createElement("div");i.setAttribute("aria-label",r.label),this.plugin.ui.createRoot(i).render(ZY.default.createElement(ZY.default.Fragment,null,r.unicode.length>0?ly(r.unicode):z.commandsSuggest.noResult)),n.appendChild(i)}selectSuggestion(r,n){r.label!==z.commandsSuggest.noResult&&(this.context.editor.replaceRange(ly(r.unicode),{...this.context.start,ch:this.cmdStartCh},this.context.end),this.resetInfos(),this.close())}};var dDe=e=>{e.superstate.settings.flowMenuEnabled&&e.registerEditorSuggest(new uD(e.app,e)),e.superstate.settings.inlineStickerMenu&&e.registerEditorSuggest(new cD(e.app,e)),ar(e.superstate.ui)&&e.superstate.settings.mobileMakeBar&&e.superstate.settings.inlineStyler&&y6e(e.app.mobileToolbar.containerEl,e)};var Ls=require("obsidian"),CDe=ge(Te()),DDe=ge(mDe());var hDe=(e,t,r)=>{if(!t)return[void 0,void 0];let n=r.app.metadataCache.getCache(e);if(!n)return[void 0,void 0];let i=n.headings,a=n.blocks,o=n.sections;if(a&&t.charAt(0)=="^"&&a[t.substring(1)])return[a[t.substring(1)].position.start.line+1,a[t.substring(1)].position.end.line+1];let s=i?.find(l=>l.heading.replace("#"," ")==t);if(s){let l=i.findIndex(d=>d.heading==s.heading),u=i[l]?.level,c=i.findIndex((d,p)=>p>l&&d.level<=u),f=s.position.start.line+2;return l{let a=t??e.app.workspace.getLeaf();r||(r=a.containerEl);let o=new Ah(a,r,e,void 0,i);n&&(o.titleEl.textContent=n.substring(0,n.lastIndexOf(".")))};var gDe=require("obsidian");var fD=e=>{if(!e.superstate.settings.spacesStickers)return;let t=e.app.workspace.getActiveViewOfType(gDe.MarkdownView)?.leaf;if(t){let r=e.app.workspace.getActiveFile();if(!r)return;let n=e.superstate.pathsIndex.get(r.path);if(n?.label.sticker&&t.tabHeaderInnerIconEl){let[i,a]=kA(n.label.sticker);if(i=="image"){let o=e.superstate.ui.getUIPath(e.superstate.imagesCache.get(a));o&&(t.tabHeaderInnerIconEl.innerHTML=``)}else{let o=Xy(n.label.sticker,e);t.tabHeaderInnerIconEl.innerHTML=o}}return}else if(t=e.app.workspace.getActiveViewOfType(Uy)?.leaf,t){let r=t.view.getState().path,n=e.superstate.pathsIndex.get(r);if(n?.label?.sticker&&t.tabHeaderInnerIconEl){let[i,a]=kA(n.label.sticker);if(i=="image"){let o=e.superstate.ui.getUIPath(e.superstate.imagesCache.get(a));if(!o)return o;t.tabHeaderInnerIconEl.innerHTML=``}else{let o=Xy(n.label.sticker,e);t.tabHeaderInnerIconEl.innerHTML=o}}return}};var Ky=ge(Te()),vDe=ge(rl());function yDe(){let[e,t]=(0,Ky.useState)(new Map),[r,n]=(0,Ky.useState)(new Map),i=s=>r.get(s),a=(0,Ky.useCallback)((s,l)=>{let u={render:c=>{t(f=>{let d=new Map(f);return d.set(s,c),d})},unmount:()=>{t(c=>{let f=new Map(c);return f.delete(s),f}),n(c=>{let f=new Map(c);return f.delete(s),f})}};return t(c=>new Map(c).set(s,null)),n(c=>new Map(c).set(s,u)),u},[]),o=(0,Ky.useMemo)(()=>[...e.entries()].map(([s,l])=>(0,vDe.createPortal)(l,s)),[e]);return{createRoot:a,portals:o,getRoot:i}}var RS=ge(Te()),bDe=e=>{let t=Qx(up(iA,{activationConstraint:{distance:10}}),up(aA,{activationConstraint:{delay:250,tolerance:5}}),up(i0,{coordinateGetter:NM})),{createRoot:r,portals:n,getRoot:i}=yDe();(0,RS.useEffect)(()=>{e.ui.createRoot=r,e.ui.getRoot=i,e.ui.manager.eventsDispatch.dispatchEvent("windowReady",null)},[r]);let[a,o]=RS.default.useState(!1);return RS.default.createElement(Yx,{sensors:t,onDragStart:()=>{o(!0)},onDragEnd:()=>{o(!1),document.body.style.setProperty("cursor","")},onDragCancel:()=>{o(!1)},collisionDetection:lz,measuring:{droppable:{strategy:lp.Always}}},RS.default.createElement(hxe,{dragActive:a},n))};var Lp=ge(Te());function KY(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ME(e,t)}var dD=ge(Te()),pD=ge(rl());var JY={disabled:!1};var xDe=ge(Te()),eZ=xDe.default.createContext(null);var wDe=function(t){return t.scrollTop};var mD="unmounted",Jy="exited",eb="entering",qS="entered",tZ="exiting",ZA=function(e){KY(t,e);function t(n,i){var a;a=e.call(this,n,i)||this;var o=i,s=o&&!o.isMounting?n.enter:n.appear,l;return a.appearStatus=null,n.in?s?(l=Jy,a.appearStatus=eb):l=qS:n.unmountOnExit||n.mountOnEnter?l=mD:l=Jy,a.state={status:l},a.nextCallback=null,a}t.getDerivedStateFromProps=function(i,a){var o=i.in;return o&&a.status===mD?{status:Jy}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(i){var a=null;if(i!==this.props){var o=this.state.status;this.props.in?o!==eb&&o!==qS&&(a=eb):(o===eb||o===qS)&&(a=tZ)}this.updateStatus(!1,a)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var i=this.props.timeout,a,o,s;return a=o=s=i,i!=null&&typeof i!="number"&&(a=i.exit,o=i.enter,s=i.appear!==void 0?i.appear:o),{exit:a,enter:o,appear:s}},r.updateStatus=function(i,a){if(i===void 0&&(i=!1),a!==null)if(this.cancelNextCallback(),a===eb){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:pD.default.findDOMNode(this);o&&wDe(o)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Jy&&this.setState({status:mD})},r.performEnter=function(i){var a=this,o=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[pD.default.findDOMNode(this),s],u=l[0],c=l[1],f=this.getTimeouts(),d=s?f.appear:f.enter;if(!i&&!o||JY.disabled){this.safeSetState({status:qS},function(){a.props.onEntered(u)});return}this.props.onEnter(u,c),this.safeSetState({status:eb},function(){a.props.onEntering(u,c),a.onTransitionEnd(d,function(){a.safeSetState({status:qS},function(){a.props.onEntered(u,c)})})})},r.performExit=function(){var i=this,a=this.props.exit,o=this.getTimeouts(),s=this.props.nodeRef?void 0:pD.default.findDOMNode(this);if(!a||JY.disabled){this.safeSetState({status:Jy},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:tZ},function(){i.props.onExiting(s),i.onTransitionEnd(o.exit,function(){i.safeSetState({status:Jy},function(){i.props.onExited(s)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(i,a){a=this.setNextCallback(a),this.setState(i,a)},r.setNextCallback=function(i){var a=this,o=!0;return this.nextCallback=function(s){o&&(o=!1,a.nextCallback=null,i(s))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},r.onTransitionEnd=function(i,a){this.setNextCallback(a);var o=this.props.nodeRef?this.props.nodeRef.current:pD.default.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!o||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],u=l[0],c=l[1];this.props.addEndListener(u,c)}i!=null&&setTimeout(this.nextCallback,i)},r.render=function(){var i=this.state.status;if(i===mD)return null;var a=this.props,o=a.children,s=a.in,l=a.mountOnEnter,u=a.unmountOnExit,c=a.appear,f=a.enter,d=a.exit,p=a.timeout,h=a.addEndListener,m=a.onEnter,g=a.onEntering,A=a.onEntered,b=a.onExit,v=a.onExiting,x=a.onExited,w=a.nodeRef,S=q6(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return dD.default.createElement(eZ.Provider,{value:null},typeof o=="function"?o(i,S):dD.default.cloneElement(dD.default.Children.only(o),S))},t}(dD.default.Component);ZA.contextType=eZ;ZA.propTypes={};function $S(){}ZA.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:$S,onEntering:$S,onEntered:$S,onExit:$S,onExiting:$S,onExited:$S};ZA.UNMOUNTED=mD;ZA.EXITED=Jy;ZA.ENTERING=eb;ZA.ENTERED=qS;ZA.EXITING=tZ;var rZ=ZA;var SDe=e=>{let{setNodeRef:t,isOver:r}=oA({id:"_modal",data:{id:"_modal"}});return Vo({onDragOver:n=>{r&&e.hide()}}),Lp.default.createElement("div",{className:"mk-modal-container",ref:t},Lp.default.createElement(ZJe,{ui:e.ui,hide:e.hide,className:e.className},e.children))},ZJe=e=>{let t=Lp.default.useRef(null),{setNodeRef:r,isOver:n}=oA({id:"_modalInner",data:{id:"_modalInner"}}),[i,a]=(0,Lp.useTransition)();(0,Lp.useEffect)(()=>{a(()=>null)},[]),(0,Lp.useEffect)(()=>{let s=u=>u.key=="Escape"?(e.hide(),!0):!1;function l(u){let c=d=>!!(d.classList.contains("mk-menu")||d.classList.contains("mk-menu-mobile")||d.classList.contains("mk-modal")),f=u.target;for(;!c(f)&&f.parentElement;)f=f.parentElement;c(f)||t.current&&!t.current.contains(u.target)&&e.hide()}return e.ui.inputManager.on("mousedown",l),e.ui.inputManager.on("contextmenu",l),e.ui.inputManager.on("keydown",s),()=>{e.ui.inputManager.off("mousedown",l),e.ui.inputManager.off("contextmenu",l),e.ui.inputManager.off("keydown",s)}},[e.hide]);let o={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0},unmounted:{opacity:0}};return Lp.default.createElement(rZ,{timeout:300,appear:!0,in:!0,nodeRef:t},s=>Lp.default.createElement("div",{className:`${e.className}`,style:{transition:"all 100ms ease-in",transform:"translateY(0px)",...o[s]},ref:l=>{r(l),t.current=l}},e.children))};var wv=ge(Te()),nZ=e=>{let t=e.win.document.createElement("div");ar(e.ui.manager)?t.classList.add("mk-modal-wrapper-mobile"):t.classList.add("mk-modal-wrapper"),e.win.document.body.appendChild(t);let r=o=>{let s=!1;return()=>{s||(o.unmount(),e.win.document.body.removeChild(t),s=!0)}},n=e.ui.createRoot(t),i=r(n),a=o=>{if(ar(e.ui.manager)){n.render(wv.default.createElement(XM,{fc:e.fc,hide:()=>i(),newProps:o,className:`${e.isPalette?"mk-drawer-palette":"mk-drawer-modal"} ${e.className?e.className:""}`}));return}n.render(wv.default.createElement(SDe,{ui:e.ui.manager,hide:()=>i(),className:`${e.isPalette?"mk-palette":"mk-modal"} ${e.className?e.className:""}`},!e.isPalette&&wv.default.createElement("div",{className:"mk-modal-header"},e.title&&wv.default.createElement("div",{className:"mk-modal-title"},e.title),wv.default.createElement("div",{className:"mk-x-small",dangerouslySetInnerHTML:{__html:e.ui.getSticker("ui//close")},onClick:()=>i()})),(0,wv.cloneElement)(e.fc,{hide:()=>i(),...o})))};return a(e.props),{hide:i,update:a}};var ps=ge(Te()),T8=(e,t)=>{e.ui.openModal("Sync Warnings",ps.default.createElement(XJe,{superstate:e}),t)},XJe=e=>{let{superstate:t}=e,[r,n]=(0,ps.useState)(t.ui.getWarnings()),i=()=>{n(e.superstate.ui.getWarnings().filter(a=>!e.superstate.settings.suppressedWarnings.some(o=>a.id==o)))};return(0,ps.useEffect)(()=>(e.superstate.eventsDispatcher.addListener("settingsChanged",i),()=>{e.superstate.eventsDispatcher.removeListener("settingsChanged",i)}),[]),ps.default.createElement("div",{className:"mk-modal-contents"},ps.default.createElement("div",{className:"mk-modal-message"},"The following issues may affect the synchronization of your files. Please review and resolve them."),ps.default.createElement("div",{className:"mk-button-group"},ps.default.createElement("button",{onClick:()=>{t.eventsDispatcher.dispatchEvent("warningsChanged",null)}},z.buttons.refresh),t.settings.suppressedWarnings.length>0&&ps.default.createElement("button",{onClick:()=>{t.settings.suppressedWarnings=[],t.saveSettings()}},z.buttons.showHidden)),r.length==0&&ps.default.createElement("div",null,ps.default.createElement("div",{className:"mk-modal-heading"},"No warnings")),r.map((a,o)=>ps.default.createElement("div",{key:o,className:"mk-modal-card"},ps.default.createElement("div",{className:"mk-modal-heading"},a.message),ps.default.createElement("div",{className:"mk-modal-description"},a.description),ps.default.createElement("div",{className:"mk-button-group"},a.command.length>0&&ps.default.createElement("button",{onClick:()=>{t.cli.runCommand(a.command,{iterations:0,instanceProps:{},props:{}})}},"Resolve"),ps.default.createElement("button",{onClick:()=>{t.settings.suppressedWarnings=[...t.settings.suppressedWarnings,a.id],t.saveSettings()}},"Ignore")))))};var ua=ge(Te());var EDe=e=>{let{superstate:t}=e,r=(0,ua.useRef)(null),[n,i]=(0,ua.useState)(t.settings.hiddenFiles),[a,o]=(0,ua.useState)(t.settings.hiddenExtensions),s=h=>{t.settings.hiddenExtensions=[...t.settings.hiddenExtensions,h],t.saveSettings(),t.initializePaths()},l=(h,m)=>{t.settings.hiddenFiles=[...t.settings.hiddenFiles,...m],t.saveSettings(),t.initializePaths()},u=h=>{t.settings.hiddenExtensions=t.settings.hiddenExtensions.filter((m,g)=>g!=h),t.saveSettings(),t.initializePaths()},c=h=>{t.settings.hiddenFiles=t.settings.hiddenFiles.filter((m,g)=>g!=h),t.saveSettings(),t.initializePaths()},f=()=>{r?.current.value.length>0&&(s(r.current.value),r.current.innerHTML="")},d=()=>{i(t.settings.hiddenFiles),o(t.settings.hiddenExtensions)};(0,ua.useEffect)(()=>(e.superstate.eventsDispatcher.addListener("settingsChanged",d),()=>{e.superstate.eventsDispatcher.removeListener("settingsChanged",d)}),[]);let p=h=>{let m=h.target.getBoundingClientRect(),g=e.superstate.spaceManager.allPaths().map(A=>({name:sx(A),value:A}));h.stopPropagation(),e.superstate.ui.openMenu(m,{ui:e.superstate.ui,multi:!1,editable:!1,value:[],options:g,saveOptions:l,placeholder:z.labels.linkItemSelectPlaceholder,detail:!0,searchable:!0},je(h.view.document))};return ua.default.createElement("div",{className:"mk-modal-contents"},ua.default.createElement("div",{className:"mk-modal-heading"},z.labels.hiddenFilePattern),ua.default.createElement("div",{className:"mk-modal-description"},z.descriptions.hiddenFileOptions),ua.default.createElement("div",{className:"mk-modal-items"},a.map((h,m)=>ua.default.createElement("div",{key:m,className:"mk-modal-item"},ua.default.createElement("span",null,h),ua.default.createElement("div",{className:"mk-modal-item-button","aria-label":z.buttons.delete,dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//close")},onClick:()=>u(m)})))),ua.default.createElement("div",{className:"mk-modal-item"},ua.default.createElement("input",{placeholder:z.labels.addExtension,type:"text",ref:r}),ua.default.createElement("button",{onClick:h=>f()},z.buttons.add)),ua.default.createElement("div",{className:"mk-modal-heading"},z.subViews.filesAndFolders),ua.default.createElement("div",{className:"mk-modal-description"},z.labels.hiddenFileSpecific),ua.default.createElement("div",{className:"mk-modal-items"},n.map((h,m)=>ua.default.createElement("div",{key:m,className:"mk-modal-item"},ua.default.createElement("span",{className:"mk-modal-item-name"},h),ua.default.createElement("div",{className:"mk-modal-item-button","aria-label":z.buttons.delete,dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//close")},onClick:()=>c(m)})))),ua.default.createElement("div",{className:"mk-modal-item"},ua.default.createElement("button",{onClick:h=>p(h)},"+ ",z.buttons.addFile)))};var iZ=ge(Te());var kDe=(e,t,r)=>{let n=f=>{let d=t.focuses[t.settings.currentWaypoint].paths,p=f?[]:d;t.settings.expandedSpaces=p,t.saveSettings()},i=()=>{t.settings.flowState=!t.settings.flowState,t.saveSettings(),document.body.classList.toggle("mk-flow-state",t.settings.flowState)},a=r.app.workspace.leftSplit&&ar(t.ui),o=()=>{let f=[],d=!0;if(a){let p=r.app.workspace.leftSplit,h=p.children,m=h.reduce((g,A,b)=>A.getViewState().type==gf?b:g,-1);d=m==p.currentTab,f.push(...h.filter((g,A)=>A!=m))}return{leafs:f,spaceActive:d}},{spaceActive:s,leafs:l}=o(),u=[];t.ui.getWarnings().length>0&&(u.push({name:"Show Warnings",icon:"ui//warning",onClick:f=>{T8(t,je(f.view.document))}}),u.push(Ut)),tc(t.ui)||(u.push({name:"Open Overview",icon:"ui//columns",onClick:()=>{r.openEverView()}}),u.push(Ut)),u.push({name:z.menu.collapseAllSections,icon:"ui//chevrons-down-up",onClick:()=>{n(!0)}}),u.push({name:z.menu.expandAllSections,icon:"ui//chevrons-up-down",onClick:()=>{n(!1)}}),u.push(Ut),u.push({name:"Rename System",icon:"ui//edit",onClick:f=>{t.ui.openModal("Rename System",iZ.default.createElement(ji,{value:"",saveLabel:"Rename System",saveValue:d=>{t.settings.systemName=d,t.saveSettings(),t.reloadPath("/",!0)}}),je(f.view.document))}}),u.push({name:z.menu.manageHiddenFiles,icon:"ui//eye-off",onClick:f=>{t.ui.openModal(z.labels.hiddenFiles,iZ.default.createElement(EDe,{superstate:t}),je(f.view.document))}}),u.push(Ut),a&&u.push({name:z.views.navigator,icon:"ui//spaces",onClick:()=>{let f=r.app.workspace.getLeavesOfType(gf);f.length>0&&r.app.workspace.revealLeaf(f[0])}}),l.map(f=>u.push({name:f.getDisplayText(),icon:"lucide//"+f.view.icon,onClick:()=>{r.app.workspace.revealLeaf(f)}})),u.push(Ut),u.push({name:z.menu.obSettings,icon:"ui//settings",onClick:()=>{r.app.commands.commands["app:open-settings"].callback()}}),u.push({name:z.menu.openVault,icon:"ui//vault",onClick:()=>{r.app.commands.commands["app:open-vault"].callback()}}),u.push(Ut),u.push({name:z.menu.getHelp,icon:"ui//mk-logo",onClick:()=>{window.open("https://make.md/community")}});let c=e.getBoundingClientRect();t.ui.openMenu(c,Yt(t.ui,u),je(e.ownerDocument),"bottom")};var F8=class{constructor(t){this.plugin=t;this.destroy=()=>{this.root.unmount()};this.availableViews=()=>Object.keys(this.plugin.app.viewRegistry.typeByExtension);this.quickOpen=t=>{this.plugin.quickOpen(t)};this.mainMenu=(t,r)=>{kDe(t,r,this.plugin)};this.onMetadataRefresh=()=>{fD(this.plugin)};this.navigationHistory=()=>this.plugin.app.workspace.getLastOpenFiles();this.getSticker=t=>Xy(t,this.plugin);this.getOS=()=>Ls.Platform.isMacOS?"mac":Ls.Platform.isWin?"windows":Ls.Platform.isLinux?"linux":Ls.Platform.isIosApp?"ios":Ls.Platform.isAndroidApp?"android":"unknown";this.openToast=t=>{new Ls.Notice(t)};this.openPalette=(t,r,n)=>nZ({ui:this,fc:t,isPalette:!0,className:n,win:r});this.openModal=(t,r,n,i,a)=>nZ({ui:this,fc:r,title:t,className:i,props:a,win:n});this.openPopover=(t,r)=>{};this.dragStarted=(t,r)=>{if(r.length!=0)if(r.length==1){let n=r[0],i=Hi(this.plugin.app,n);if(!i)return;if(i instanceof Ls.TFile){let a=this.plugin.app.dragManager.dragFile(t.nativeEvent,i);this.plugin.app.dragManager.onDragStart(t.nativeEvent,a)}else this.plugin.app.dragManager.onDragStart(t.nativeEvent,{icon:"lucide-file",source:void 0,title:i.name,type:"file",file:i}),this.plugin.app.dragManager.dragFolder(t.nativeEvent,i,!0)}else{let n=r.map(i=>Hi(this.plugin.app,i)).filter(i=>i);this.plugin.app.dragManager.onDragStart({...t,doc:document},{icon:"lucide-files",source:void 0,title:z.labels.filesCount.replace("{$1}",n.length.toString()),type:"files",files:n}),this.plugin.app.dragManager.dragFiles({...t,doc:document},n,!0)}};this.setDragLabel=t=>{this.plugin.app.dragManager.setAction(t)};this.dragEnded=t=>{};this.getWarnings=()=>{let t=[];if(this.plugin.obsidianAdapter.fileNameWarnings.size>0&&t.push({id:"obsidian-sync-space-folder",message:"Some files have invalid names",description:"Files contain invalid characters which may cause issues during sync, use alias to display these characters to prevent the issue",command:"obsidian://make-md:path-fixer"}),this.plugin.app.internalPlugins.config.sync){this.plugin.superstate.settings.spaceSubFolder.startsWith(".")&&t.push({id:"obsidian-sync-space-folder",message:"Obsidian Sync currently won't sync your Spaces",description:"Change the space folder name to a non-hidden folder",command:"obsidian://make-md:move-space-folder"});let r=this.plugin.app.internalPlugins.plugins?.sync?.instance?.allowTypes;r&&![...r].some(n=>n=="unsupported")&&t.push({id:"obsidian-sync-space-config",message:"Obsidian Sync currently won't sync your Space Views or Context",description:"Change the sync settings to include unsupported file types",command:"obsidian://app:open-settings"})}return t};this.allStickers=()=>{let t=ECe.map(i=>({name:i,type:"lucide",keywords:i,value:i,html:(0,Ls.getIcon)(i).outerHTML})),r=[...this.plugin.superstate.iconsCache.keys()].map(i=>({name:i,type:"vault",keywords:i,value:i,html:this.plugin.superstate.iconsCache.get(i)}));return[...Object.keys(BS).reduce((i,a)=>[...i,...BS[a].map(o=>({type:"emoji",name:o.n[0],value:o.u,html:o.u}))],[]),...r,...t]};this.getUIPath=(t,r)=>{let n=this.plugin.app.vault.getAbstractFileByPath(t);if(n instanceof Ls.TFile){if(r){let a=this.plugin.superstate.pathsIndex.get(n.path)?.label?.thumbnail;if(a)return this.getUIPath(a)}return this.plugin.app.vault.getResourcePath(n)}else if(t?.match(Y0))return t;return`${uu(this.plugin.app.vault.getResourcePath(this.plugin.app.vault.getRoot()))}${t}`};this.viewsByPath=t=>{let r=Hi(this.plugin.app,t);return r instanceof Ls.TFile?this.plugin.app.workspace.getLeavesOfType("markdown").filter(n=>n.view.file?.path==t).map(n=>({path:n.view.file?.path,openPath:i=>{n.openFile(r)},parent:null,children:[]})):this.plugin.app.workspace.getLeavesOfType(Zl).filter(n=>n.view.getState().path==t).map(n=>({path:n.view.getState().path,openPath:i=>{n.setViewState({type:Zl,state:{path:i}})},parent:null,children:[]}))};this.isEverViewOpen=()=>this.plugin.app.workspace.getLeavesOfType("mk-ever-view").length>0;this.openPath=(t,r,n,i)=>{if(r=="system"){this.plugin.app.showInFolder(t);return}if(r=="overview"){let o=this.plugin.app.workspace.getLeavesOfType("mk-ever-view");if(o.length>0){o[0].setViewState({type:"mk-ever-view",state:{path:t}});return}}if(r=="hover"){this.plugin.app.workspace.trigger("link-hover",{},n,t,t);return}else if(n){let o=this.plugin.superstate.spaceManager.uriByString(t);ADe(this.plugin,this.plugin.app.workspace.getLeaf(),n,null,async s=>{let l=s.attachLeaf();if(this.plugin.app.vault.getAbstractFileByPath(o.basePath)instanceof Ls.TFile){await l.openFile(this.plugin.app.vault.getAbstractFileByPath(o.basePath));let u=hDe(o.basePath,o.refStr,this.plugin);if(!l.view?.editor)return;u[0]&&u[1]&&l.view.editor?.cm.dispatch({annotations:[QA.of(u)]})}else await qY(l,t,this.plugin,!0)});return}let a=LY(this.plugin.app,r);qY(a,t,this.plugin)};this.primaryInteractionType=()=>Ls.Platform.isMobile?0:1;this.getScreenType=()=>Ls.Platform.isPhone?0:Ls.Platform.isTablet?2:1;let r=document.createElement("div");document.body.appendChild(r),r.className="mk-root",this.createRoot=()=>null,this.getRoot=()=>null,this.root=(0,DDe.createRoot)(r),this.root.render(CDe.default.createElement(bDe,{ui:this}))}};var _8=class{constructor(t){this.plugin=t;this.supportedFileTypes=["svg"];this.id="icons.make.md";this.plugin=t}initiate(t){this.middleware=t,this.cache=new Map}async parseCache(t,r){let n={svg:`@font-face { font-family: '${t.name}'; src: url('${this.middleware.resourcePathForPath(t.path)}'); }`};this.cache.set(t.path,n),this.middleware.updateFileCache(t.path,this.cache.get(t.path),r)}cacheTypes(t){return["svg"]}contentTypes(t){return["svg"]}async readContent(t,r,n){if(r=="svg")return this.cache.get(t.path).svg}};var jDe=e=>e?{scheme:"obsidian",schema:{id:e.id,name:e.name,type:"command"},path:"obsidian://"+e.id,fields:[],code:e.callback,codeType:"closure"}:null,P8=class{constructor(t){this.plugin=t;this.scheme="obsidian";this.allCommands=()=>Object.values(this.plugin.app.commands.commands).map(t=>jDe(t));this.commandForAction=t=>{if(!t)return null;let r=Bf(t);return jDe(this.plugin.app.commands.commands[r.authority])};this.runCommand=async(t,r)=>{if(!t)return;let i=Bf(t).authority;this.plugin.app.commands.commands[i]?.callback?this.plugin.app.commands.commands[i].callback():this.plugin.app.commands.commands[i].checkCallback&&this.plugin.app.commands.commands[i].checkCallback(!1)}}};var KJe=[{id:"filter",icon:"lucide//filter",description:"Only continue if a condition is met",name:"Filter",fields:[]},{id:"formula",icon:"lucide//sigma",description:"Use a formula to calculate a result",name:"Formula",fields:[]}],LS=class{constructor(t){this.terminals=[];this.terminalForURI=t=>t?t.scheme==null||t.scheme=="vault"?this.mainTerminal:this.terminals.find(r=>r.scheme==t.scheme):null;this.commandForAction=t=>{if(!t)return null;let r=Bf(t);return r.scheme=="builtin"?this.builtinCommands.find(n=>n.schema.id==r.authority):this.terminalForURI(r)?.commandForAction(t)};this.runCommand=(t,r)=>{if(!t)return;let n=Bf(t);return n.scheme=="builtin"?void 0:this.terminalForURI(n)?.runCommand(t,r)};this.terminals=[t],t.manager=this,this.mainTerminal=t,this.builtinCommands=KJe.map(r=>({schema:{id:r.id,name:r.name,def:{icon:r.icon,description:r.description},type:"builtin"},fields:r.fields}))}static create(t){return new LS(t)}allCommands(){return[...this.builtinCommands.map(t=>({scheme:"builtin",path:"builtin://"+t.schema.id,...t})),...this.terminals.flatMap(t=>t.allCommands())]}};var Pt=ge(Te()),MDe=e=>{e.superstate.ui.openModal("Tests",Pt.default.createElement(JJe,{plugin:e}),window)},Tu=e=>{let[t,r]=(0,Pt.useState)("");return Pt.default.createElement("div",null,Pt.default.createElement("input",{onChange:n=>r(n.target.value)}),Pt.default.createElement("button",{onClick:()=>e.action(t)},e.children))},ODe=e=>Pt.default.createElement("div",null,Pt.default.createElement("button",{onClick:()=>e.action()},e.children)),hD=e=>{let[t,r]=(0,Pt.useState)(!1);return Pt.default.createElement("div",null,Pt.default.createElement("h2",{onClick:()=>r(n=>!n)},e.section),t&&Pt.default.createElement("div",null,e.children))},JJe=e=>{let t=e.plugin.superstate,[r,n]=(0,Pt.useState)(null),[i,a]=(0,Pt.useState)(null),[o,s]=(0,Pt.useState)(null),[l,u]=(0,Pt.useState)(null),[c,f]=(0,Pt.useState)("");return(0,Pt.useEffect)(()=>{t.eventsDispatcher.addListener("spaceStateUpdated",d=>{d.path==r?.path&&n(t.spacesIndex.get(d.path))}),t.eventsDispatcher.addListener("pathStateUpdated",d=>{d.path==i?.path&&a(t.pathsIndex.get(d.path))})},[]),(0,Pt.useEffect)(()=>{let d=window.getComputedStyle(document.body);f(JSON.stringify({paddingTop:d.paddingTop}))},[]),Pt.default.createElement("div",{className:"mk-layout-row",style:{fontSize:"10px"}},Pt.default.createElement("div",null,Pt.default.createElement(kS,{plugin:e.plugin,cm:null,activeMarks:[],mobile:!0}),Pt.default.createElement(kS,{plugin:e.plugin,cm:null,activeMarks:[],mobile:!1}),Pt.default.createElement(Tu,{action:d=>f(JSON.stringify(t.spaceManager.uriByString(d)))},"URI"),Pt.default.createElement(hD,{section:"Space"},Pt.default.createElement(Tu,{action:d=>n(t.spacesIndex.get(d))},"Select Space"),Pt.default.createElement("p",null,r?.path??"No Selected Space",Pt.default.createElement("button",{onClick:()=>n(t.spacesIndex.get(r.path))},"Refresh"),Pt.default.createElement("button",{onClick:()=>a(t.pathsIndex.get(r.path))},"Set Path")),r&&Pt.default.createElement("div",null,"Contexts ",r.contexts?.map(d=>d),t.getSpaceItems(r.path).map((d,p)=>Pt.default.createElement("div",{key:p},d.path," ",Pt.default.createElement("button",{onClick:()=>n(t.spacesIndex.get(d.path))},"Set Space"),Pt.default.createElement("button",{onClick:()=>a(t.pathsIndex.get(d.path))},"Set Path"),Pt.default.createElement("button",{onClick:()=>navigator.clipboard.writeText(d.path)},"Copy"))))),Pt.default.createElement(hD,{section:"Path"},Pt.default.createElement(Tu,{action:d=>a(t.pathsIndex.get(d))},"Select Path"),Pt.default.createElement("p",null,i?.path??"No Selected Path"),i&&Pt.default.createElement("div",null,"Sticker",Pt.default.createElement("div",{dangerouslySetInnerHTML:{__html:t.ui.getSticker(i?.label.sticker)},style:{height:"50px",width:"50px"}}),"Banner",Pt.default.createElement("img",{src:t.ui.getUIPath(i?.metadata.banner),style:{height:"50px",width:"50px"}}))),Pt.default.createElement("h2",null,"Sticker"),Pt.default.createElement("div",{dangerouslySetInnerHTML:{__html:t.ui.getSticker(o)},style:{height:"50px",width:"50px"}}),Pt.default.createElement("h2",null,"Image"),Pt.default.createElement("img",{src:t.ui.getUIPath(l),style:{height:"50px",width:"50px"}}),Pt.default.createElement("h2",null,"Output"),Pt.default.createElement("div",null,c)),Pt.default.createElement("div",null,Pt.default.createElement(Tu,{action:d=>{try{fA(d,{ecmaVersion:2020,locations:!0})}catch(p){f(p)}}},"Acorn"),Pt.default.createElement(hD,{section:"Space"},Pt.default.createElement(Tu,{action:d=>t.spaceManager.createSpace(d,r.path,{})},"Create Space"),Pt.default.createElement(Tu,{action:d=>t.spaceManager.renameSpace(r.path,d)},"Rename Space"),Pt.default.createElement(Tu,{action:d=>R6(t,d)},"Delete Space"),Pt.default.createElement(Tu,{action:d=>sy(t,r.path,"contexts",[d])},"Set Space Context"),Pt.default.createElement(Tu,{action:d=>R6(t,d)},"Remove Space Context"),Pt.default.createElement(ODe,{action:()=>CA(t,r.path,l)},"Set Space Banner"),Pt.default.createElement(Tu,{action:d=>uy(t,r.path,[],d)},"Set Space Alias"),Pt.default.createElement(ODe,{action:()=>uf(t,r.path,o)},"Set Space Sticker")),Pt.default.createElement(hD,{section:"Path"},Pt.default.createElement(Tu,{action:d=>zn(t,r,"md",d)},"Create Path"),Pt.default.createElement(Tu,{action:d=>t.spaceManager.copyPath(i.path,d)},"Copy Path"),Pt.default.createElement(Tu,{action:d=>t.spaceManager.renamePath(i.path,Rf(i.path,d))},"Move Path"),Pt.default.createElement(Tu,{action:d=>Vh(t,d)},"Delete Path"),Pt.default.createElement(Tu,{action:d=>_m(t,r,d)},"Pin Path")),Pt.default.createElement(hD,{section:"Modals"},Pt.default.createElement("button",{onClick:()=>t.ui.openPalette(Pt.default.createElement(Eu,{superstate:t,selectedPath:d=>u(d)}),window)},"Set Image"),Pt.default.createElement("button",{onClick:()=>t.ui.openPalette(Pt.default.createElement(va,{ui:t.ui,selectedSticker:d=>s(d)}),window)},"Set Sticker")),Pt.default.createElement("div",null,Pt.default.createElement("h2",null,"Menus")),Pt.default.createElement("div",null,Pt.default.createElement("h2",null,"Modals"))))};var FDe=require("obsidian"),_De=ge(TDe()),eet=e=>{let t=0;for(let r=0,n=e.length;r{a.onload=()=>p(!0),a.onerror=()=>p(!1)}))return!1;let s=document.createElement("canvas");s.width=a.width,s.height=a.height;let l=Math.max(n/a.width,n/a.height);s.getContext("2d").drawImage(a,0,0);let c=document.createElement("canvas");c.width=l*s.width,c.height=l*s.height,await this.picaInstance.resize(s,c);let d=await(await this.picaInstance.toBlob(c,"image/jpeg",.8)).arrayBuffer();return await this.middleware.fileExists(this.cacheDirectory)||await this.middleware.createFolder(this.cacheDirectory),await this.middleware.writeBinaryToFile(r,d),!0}async parseCache(t,r){if(!t)return;let n=`${this.cacheDirectory}/${eet(t.path)}.${t.extension}`,i=t.path;this.plugin.superstate.settings.imageThumbnails&&(await this.middleware.fileExists(n)?i=n:FDe.Platform.isMobile||await this.generateThumnail(t,n)&&(i=n));let a=this.middleware.getFileCache(t.path)?.label,o={subtype:"image",label:{name:t.name,sticker:a?.sticker.length>0?a.sticker:"ui//mk-make-image",color:a?.color,thumbnail:i}};this.cache.set(t.path,o),this.middleware.updateFileCache(t.path,this.cache.get(t.path),r)}cacheTypes(t){return[]}contentTypes(t){return[]}};var PDe=e=>{e.addCommand({id:"mk-open-flow",name:z.commandPalette.openFlow,callback:()=>e.openFlow()}),e.addCommand({id:"mk-close-flow",name:z.commandPalette.closeFlow,callback:()=>e.closeFlow()})};var IDe=require("obsidian"),BDe=ge(Te());var oZ=e=>{let t=e.superstate,r=[...e.obsidianAdapter.fileNameWarnings],n=`The following files have issues with their names. Would you like to fix them? diff --git a/manifest.json b/manifest.json index f839253..9daba17 100755 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "make-md", "name": "MAKE.md", - "version": "0.9.1005", + "version": "0.9.1006", "minAppVersion": "0.16.0", "description": "Make.md brings powerful and modern note-taking features to Obsidian. Capture, organize and connect information with more flexibility without any code.", "author": "MAKE.md", diff --git a/package.json b/package.json index fd39cc3..daeb480 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "make-md", - "version": "0.9.997", + "version": "0.9.1006", "description": "make.md", "main": "main.js", "scripts": { diff --git a/src/adapters/obsidian/ui/editors/markdownView/flowEditor/flowEditor.tsx b/src/adapters/obsidian/ui/editors/markdownView/flowEditor/flowEditor.tsx index ec0e4e3..31ecdc9 100644 --- a/src/adapters/obsidian/ui/editors/markdownView/flowEditor/flowEditor.tsx +++ b/src/adapters/obsidian/ui/editors/markdownView/flowEditor/flowEditor.tsx @@ -27,6 +27,7 @@ import { CollapseToggle } from "core/react/components/UI/Toggles/CollapseToggle" import { compareByField } from "core/utils/tree"; import { genId } from "core/utils/uuid"; import { editorInfoField } from "obsidian"; +import { Root } from "react-dom/client"; //flow editor export enum FlowEditorState { @@ -363,6 +364,7 @@ export const flowEditorField = (plugin: MakeMDPlugin) => }); class FlowEditorWidget extends WidgetType { + public root: Root; constructor( private readonly info: FlowEditorInfo, public plugin: MakeMDPlugin @@ -384,16 +386,15 @@ class FlowEditorWidget extends WidgetType { const infoField = view.state.field(editorInfoField, false); const file = infoField.file; - this.plugin.superstate.ui - .createRoot(div) - .render( - - ); + this.root = this.plugin.superstate.ui.createRoot(div); + this.root.render( + + ); // this.plugin.superstate.ui.openPath(uri, false, div); } // loadFlowEditorByDOM(this.plugin, div, view, this.info.id); @@ -402,6 +403,9 @@ class FlowEditorWidget extends WidgetType { get estimatedHeight(): number { return this.info.height; } + destroy(dom: HTMLElement): void { + if (this.root) this.root.unmount(); + } } class LinkSticker extends WidgetType { diff --git a/src/adapters/obsidian/ui/ui.tsx b/src/adapters/obsidian/ui/ui.tsx index 61a4a56..7f81569 100644 --- a/src/adapters/obsidian/ui/ui.tsx +++ b/src/adapters/obsidian/ui/ui.tsx @@ -40,6 +40,10 @@ export class ObsidianUI implements UIAdapter { this.root.render(); } + public destroy = () => { + this.root.unmount(); + }; + public createRoot: typeof createRoot; public getRoot: (container: Container) => Root; diff --git a/src/core/react/components/PathView/NoteView.tsx b/src/core/react/components/PathView/NoteView.tsx index 528ff3b..d70d6ba 100644 --- a/src/core/react/components/PathView/NoteView.tsx +++ b/src/core/react/components/PathView/NoteView.tsx @@ -98,6 +98,7 @@ export const NoteView = forwardRef((props: NoteViewProps, ref) => { ); return () => { + flowRef.current = null; props.superstate.ui.eventsDispatch.removeListener( "activeStateChanged", reloadFlow diff --git a/src/core/utils/formula/parser.ts b/src/core/utils/formula/parser.ts index 8b5fe5e..00e47e0 100644 --- a/src/core/utils/formula/parser.ts +++ b/src/core/utils/formula/parser.ts @@ -318,7 +318,7 @@ export const runFormulaWithContext = (runContext: math.MathJsInstance, paths: Ma } catch (e) { value = "" if (emitError) throw(e) - console.log(path, formula, e); + console.log(formula, e); } return value } diff --git a/src/utils/properties.ts b/src/utils/properties.ts index 1f6f2b2..33dfa38 100644 --- a/src/utils/properties.ts +++ b/src/utils/properties.ts @@ -104,6 +104,7 @@ export const parseParameters = (fieldValues: Record, fields: Spa }; export const parsePropertyValue = (value: any, type: string): any => { + if (!type) return value; if (type == "number") { return parseFloat(value); } else if (type == "boolean") { @@ -116,6 +117,9 @@ export const parsePropertyValue = (value: any, type: string): any => { } export const parseMDBStringValue = (type: string, value: string, frontmatter?: boolean): any => { + if (!type) { + return value; + } if (type == "object") { return JSON.parse(value); } else if (type == 'object-multi') {