remnote-bridge 0.1.14 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,16 @@
1
- const IMPORT_META=import.meta;(()=>{var Pf={216(en,K,Xe){var Ot=Object.defineProperty,Ae=Object.defineProperties,it=Object.getOwnPropertyDescriptors,B=Object.getOwnPropertySymbols,wn=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,Tt=(ht,Ve,at)=>Ve in ht?Ot(ht,Ve,{enumerable:!0,configurable:!0,writable:!0,value:at}):ht[Ve]=at,b=(ht,Ve)=>{for(var at in Ve||(Ve={}))wn.call(Ve,at)&&Tt(ht,at,Ve[at]);if(B)for(var at of B(Ve))Et.call(Ve,at)&&Tt(ht,at,Ve[at]);return ht},Y=(ht,Ve)=>Ae(ht,it(Ve)),c=(ht,Ve)=>Ot(ht,"name",{value:Ve,configurable:!0}),Mt=(ht,Ve,at)=>new Promise((Pt,tt)=>{var ot=_e=>{try{ae(at.next(_e))}catch(Ne){tt(Ne)}},te=_e=>{try{ae(at.throw(_e))}catch(Ne){tt(Ne)}},ae=_e=>_e.done?Pt(_e.value):Promise.resolve(_e.value).then(ot,te);ae((at=at.apply(ht,Ve)).next())});c(function(ht,Ve){en.exports=Ve(Xe(999),Xe(874))},"webpackUniversalModuleDefinition")(self,function(ht,Ve){return(function(){var at={944:function(te){var ae=1e3,_e=ae*60,Ne=_e*60,He=Ne*24,st=He*7,Z=He*365.25;te.exports=function(ee,ie){ie=ie||{};var me=typeof ee;if(me==="string"&&ee.length>0)return Ze(ee);if(me==="number"&&isFinite(ee))return ie.long?ue(ee):Ye(ee);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(ee))};function Ze(ee){if(ee=String(ee),!(ee.length>100)){var ie=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(ee);if(ie){var me=parseFloat(ie[1]),q=(ie[2]||"ms").toLowerCase();switch(q){case"years":case"year":case"yrs":case"yr":case"y":return me*Z;case"weeks":case"week":case"w":return me*st;case"days":case"day":case"d":return me*He;case"hours":case"hour":case"hrs":case"hr":case"h":return me*Ne;case"minutes":case"minute":case"mins":case"min":case"m":return me*_e;case"seconds":case"second":case"secs":case"sec":case"s":return me*ae;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return me;default:return}}}}c(Ze,"parse");function Ye(ee){var ie=Math.abs(ee);return ie>=He?Math.round(ee/He)+"d":ie>=Ne?Math.round(ee/Ne)+"h":ie>=_e?Math.round(ee/_e)+"m":ie>=ae?Math.round(ee/ae)+"s":ee+"ms"}c(Ye,"fmtShort");function ue(ee){var ie=Math.abs(ee);return ie>=He?fe(ee,ie,He,"day"):ie>=Ne?fe(ee,ie,Ne,"hour"):ie>=_e?fe(ee,ie,_e,"minute"):ie>=ae?fe(ee,ie,ae,"second"):ee+" ms"}c(ue,"fmtLong");function fe(ee,ie,me,q){var ge=ie>=me*1.5;return Math.round(ee/me)+" "+q+(ge?"s":"")}c(fe,"plural")},854:function(te,ae,_e){ae.formatArgs=He,ae.save=st,ae.load=Z,ae.useColors=Ne,ae.storage=Ze(),ae.destroy=(()=>{let ue=!1;return()=>{ue||(ue=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),ae.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Ne(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}c(Ne,"useColors");function He(ue){if(ue[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+ue[0]+(this.useColors?"%c ":" ")+"+"+te.exports.humanize(this.diff),!this.useColors)return;const fe="color: "+this.color;ue.splice(1,0,fe,"color: inherit");let ee=0,ie=0;ue[0].replace(/%[a-zA-Z%]/g,me=>{me!=="%%"&&(ee++,me==="%c"&&(ie=ee))}),ue.splice(ie,0,fe)}c(He,"formatArgs"),ae.log=console.debug||console.log||(()=>{});function st(ue){try{ue?ae.storage.setItem("debug",ue):ae.storage.removeItem("debug")}catch{}}c(st,"save");function Z(){let ue;try{ue=ae.storage.getItem("debug")}catch{}return!ue&&typeof process<"u"&&"env"in process&&(ue=process.env.DEBUG),ue}c(Z,"load");function Ze(){try{return localStorage}catch{}}c(Ze,"localstorage"),te.exports=_e(892)(ae);const{formatters:Ye}=te.exports;Ye.j=function(ue){try{return JSON.stringify(ue)}catch(fe){return"[UnexpectedJSONParseError]: "+fe.message}}},892:function(te,ae,_e){function Ne(He){Z.debug=Z,Z.default=Z,Z.coerce=ie,Z.disable=ue,Z.enable=Ye,Z.enabled=fe,Z.humanize=_e(944),Z.destroy=me,Object.keys(He).forEach(q=>{Z[q]=He[q]}),Z.names=[],Z.skips=[],Z.formatters={};function st(q){let ge=0;for(let C=0;C<q.length;C++)ge=(ge<<5)-ge+q.charCodeAt(C),ge|=0;return Z.colors[Math.abs(ge)%Z.colors.length]}c(st,"selectColor"),Z.selectColor=st;function Z(q){let ge,C=null,V,F;function A(...$){if(!A.enabled)return;const H=A,ne=Number(new Date),U=ne-(ge||ne);H.diff=U,H.prev=ge,H.curr=ne,ge=ne,$[0]=Z.coerce($[0]),typeof $[0]!="string"&&$.unshift("%O");let ye=0;$[0]=$[0].replace(/%([a-zA-Z%])/g,(M,sn)=>{if(M==="%%")return"%";ye++;const $t=Z.formatters[sn];if(typeof $t=="function"){const Un=$[ye];M=$t.call(H,Un),$.splice(ye,1),ye--}return M}),Z.formatArgs.call(H,$),(H.log||Z.log).apply(H,$)}return c(A,"debug"),A.namespace=q,A.useColors=Z.useColors(),A.color=Z.selectColor(q),A.extend=Ze,A.destroy=Z.destroy,Object.defineProperty(A,"enabled",{enumerable:!0,configurable:!1,get:()=>C!==null?C:(V!==Z.namespaces&&(V=Z.namespaces,F=Z.enabled(q)),F),set:$=>{C=$}}),typeof Z.init=="function"&&Z.init(A),A}c(Z,"createDebug");function Ze(q,ge){const C=Z(this.namespace+(typeof ge>"u"?":":ge)+q);return C.log=this.log,C}c(Ze,"extend");function Ye(q){Z.save(q),Z.namespaces=q,Z.names=[],Z.skips=[];let ge;const C=(typeof q=="string"?q:"").split(/[\s,]+/),V=C.length;for(ge=0;ge<V;ge++)C[ge]&&(q=C[ge].replace(/\*/g,".*?"),q[0]==="-"?Z.skips.push(new RegExp("^"+q.slice(1)+"$")):Z.names.push(new RegExp("^"+q+"$")))}c(Ye,"enable");function ue(){const q=[...Z.names.map(ee),...Z.skips.map(ee).map(ge=>"-"+ge)].join(",");return Z.enable(""),q}c(ue,"disable");function fe(q){if(q[q.length-1]==="*")return!0;let ge,C;for(ge=0,C=Z.skips.length;ge<C;ge++)if(Z.skips[ge].test(q))return!1;for(ge=0,C=Z.names.length;ge<C;ge++)if(Z.names[ge].test(q))return!0;return!1}c(fe,"enabled");function ee(q){return q.toString().substring(2,q.toString().length-2).replace(/\.\*\?$/,"*")}c(ee,"toNamespace");function ie(q){return q instanceof Error?q.stack||q.message:q}c(ie,"coerce");function me(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return c(me,"destroy"),Z.enable(Z.load()),Z}c(Ne,"setup"),te.exports=Ne},772:function(te){"use strict";/*
1
+ const IMPORT_META=import.meta;(()=>{var Pf={216(tn,K,qe){var Ot=Object.defineProperty,De=Object.defineProperties,it=Object.getOwnPropertyDescriptors,B=Object.getOwnPropertySymbols,wn=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,Tt=(ht,He,at)=>He in ht?Ot(ht,He,{enumerable:!0,configurable:!0,writable:!0,value:at}):ht[He]=at,b=(ht,He)=>{for(var at in He||(He={}))wn.call(He,at)&&Tt(ht,at,He[at]);if(B)for(var at of B(He))Et.call(He,at)&&Tt(ht,at,He[at]);return ht},Y=(ht,He)=>De(ht,it(He)),c=(ht,He)=>Ot(ht,"name",{value:He,configurable:!0}),Mt=(ht,He,at)=>new Promise((Pt,tt)=>{var ot=_e=>{try{ae(at.next(_e))}catch(Oe){tt(Oe)}},te=_e=>{try{ae(at.throw(_e))}catch(Oe){tt(Oe)}},ae=_e=>_e.done?Pt(_e.value):Promise.resolve(_e.value).then(ot,te);ae((at=at.apply(ht,He)).next())});c(function(ht,He){tn.exports=He(qe(999),qe(874))},"webpackUniversalModuleDefinition")(self,function(ht,He){return(function(){var at={944:function(te){var ae=1e3,_e=ae*60,Oe=_e*60,$e=Oe*24,st=$e*7,Z=$e*365.25;te.exports=function(ee,ie){ie=ie||{};var me=typeof ee;if(me==="string"&&ee.length>0)return Ze(ee);if(me==="number"&&isFinite(ee))return ie.long?ue(ee):Ye(ee);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(ee))};function Ze(ee){if(ee=String(ee),!(ee.length>100)){var ie=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(ee);if(ie){var me=parseFloat(ie[1]),q=(ie[2]||"ms").toLowerCase();switch(q){case"years":case"year":case"yrs":case"yr":case"y":return me*Z;case"weeks":case"week":case"w":return me*st;case"days":case"day":case"d":return me*$e;case"hours":case"hour":case"hrs":case"hr":case"h":return me*Oe;case"minutes":case"minute":case"mins":case"min":case"m":return me*_e;case"seconds":case"second":case"secs":case"sec":case"s":return me*ae;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return me;default:return}}}}c(Ze,"parse");function Ye(ee){var ie=Math.abs(ee);return ie>=$e?Math.round(ee/$e)+"d":ie>=Oe?Math.round(ee/Oe)+"h":ie>=_e?Math.round(ee/_e)+"m":ie>=ae?Math.round(ee/ae)+"s":ee+"ms"}c(Ye,"fmtShort");function ue(ee){var ie=Math.abs(ee);return ie>=$e?fe(ee,ie,$e,"day"):ie>=Oe?fe(ee,ie,Oe,"hour"):ie>=_e?fe(ee,ie,_e,"minute"):ie>=ae?fe(ee,ie,ae,"second"):ee+" ms"}c(ue,"fmtLong");function fe(ee,ie,me,q){var ge=ie>=me*1.5;return Math.round(ee/me)+" "+q+(ge?"s":"")}c(fe,"plural")},854:function(te,ae,_e){ae.formatArgs=$e,ae.save=st,ae.load=Z,ae.useColors=Oe,ae.storage=Ze(),ae.destroy=(()=>{let ue=!1;return()=>{ue||(ue=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),ae.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Oe(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}c(Oe,"useColors");function $e(ue){if(ue[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+ue[0]+(this.useColors?"%c ":" ")+"+"+te.exports.humanize(this.diff),!this.useColors)return;const fe="color: "+this.color;ue.splice(1,0,fe,"color: inherit");let ee=0,ie=0;ue[0].replace(/%[a-zA-Z%]/g,me=>{me!=="%%"&&(ee++,me==="%c"&&(ie=ee))}),ue.splice(ie,0,fe)}c($e,"formatArgs"),ae.log=console.debug||console.log||(()=>{});function st(ue){try{ue?ae.storage.setItem("debug",ue):ae.storage.removeItem("debug")}catch{}}c(st,"save");function Z(){let ue;try{ue=ae.storage.getItem("debug")}catch{}return!ue&&typeof process<"u"&&"env"in process&&(ue=process.env.DEBUG),ue}c(Z,"load");function Ze(){try{return localStorage}catch{}}c(Ze,"localstorage"),te.exports=_e(892)(ae);const{formatters:Ye}=te.exports;Ye.j=function(ue){try{return JSON.stringify(ue)}catch(fe){return"[UnexpectedJSONParseError]: "+fe.message}}},892:function(te,ae,_e){function Oe($e){Z.debug=Z,Z.default=Z,Z.coerce=ie,Z.disable=ue,Z.enable=Ye,Z.enabled=fe,Z.humanize=_e(944),Z.destroy=me,Object.keys($e).forEach(q=>{Z[q]=$e[q]}),Z.names=[],Z.skips=[],Z.formatters={};function st(q){let ge=0;for(let C=0;C<q.length;C++)ge=(ge<<5)-ge+q.charCodeAt(C),ge|=0;return Z.colors[Math.abs(ge)%Z.colors.length]}c(st,"selectColor"),Z.selectColor=st;function Z(q){let ge,C=null,V,L;function A(...$){if(!A.enabled)return;const H=A,ne=Number(new Date),U=ne-(ge||ne);H.diff=U,H.prev=ge,H.curr=ne,ge=ne,$[0]=Z.coerce($[0]),typeof $[0]!="string"&&$.unshift("%O");let ye=0;$[0]=$[0].replace(/%([a-zA-Z%])/g,(M,ln)=>{if(M==="%%")return"%";ye++;const Qt=Z.formatters[ln];if(typeof Qt=="function"){const Un=$[ye];M=Qt.call(H,Un),$.splice(ye,1),ye--}return M}),Z.formatArgs.call(H,$),(H.log||Z.log).apply(H,$)}return c(A,"debug"),A.namespace=q,A.useColors=Z.useColors(),A.color=Z.selectColor(q),A.extend=Ze,A.destroy=Z.destroy,Object.defineProperty(A,"enabled",{enumerable:!0,configurable:!1,get:()=>C!==null?C:(V!==Z.namespaces&&(V=Z.namespaces,L=Z.enabled(q)),L),set:$=>{C=$}}),typeof Z.init=="function"&&Z.init(A),A}c(Z,"createDebug");function Ze(q,ge){const C=Z(this.namespace+(typeof ge>"u"?":":ge)+q);return C.log=this.log,C}c(Ze,"extend");function Ye(q){Z.save(q),Z.namespaces=q,Z.names=[],Z.skips=[];let ge;const C=(typeof q=="string"?q:"").split(/[\s,]+/),V=C.length;for(ge=0;ge<V;ge++)C[ge]&&(q=C[ge].replace(/\*/g,".*?"),q[0]==="-"?Z.skips.push(new RegExp("^"+q.slice(1)+"$")):Z.names.push(new RegExp("^"+q+"$")))}c(Ye,"enable");function ue(){const q=[...Z.names.map(ee),...Z.skips.map(ee).map(ge=>"-"+ge)].join(",");return Z.enable(""),q}c(ue,"disable");function fe(q){if(q[q.length-1]==="*")return!0;let ge,C;for(ge=0,C=Z.skips.length;ge<C;ge++)if(Z.skips[ge].test(q))return!1;for(ge=0,C=Z.names.length;ge<C;ge++)if(Z.names[ge].test(q))return!0;return!1}c(fe,"enabled");function ee(q){return q.toString().substring(2,q.toString().length-2).replace(/\.\*\?$/,"*")}c(ee,"toNamespace");function ie(q){return q instanceof Error?q.stack||q.message:q}c(ie,"coerce");function me(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return c(me,"destroy"),Z.enable(Z.load()),Z}c(Oe,"setup"),te.exports=Oe},772:function(te){"use strict";/*
2
2
  object-assign
3
3
  (c) Sindre Sorhus
4
4
  @license MIT
5
- */var ae=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable;function He(Z){if(Z==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(Z)}c(He,"toObject");function st(){try{if(!Object.assign)return!1;var Z=new String("abc");if(Z[5]="de",Object.getOwnPropertyNames(Z)[0]==="5")return!1;for(var Ze={},Ye=0;Ye<10;Ye++)Ze["_"+String.fromCharCode(Ye)]=Ye;var ue=Object.getOwnPropertyNames(Ze).map(function(ee){return Ze[ee]});if(ue.join("")!=="0123456789")return!1;var fe={};return"abcdefghijklmnopqrst".split("").forEach(function(ee){fe[ee]=ee}),Object.keys(Object.assign({},fe)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}c(st,"shouldUseNative"),te.exports=st()?Object.assign:function(Z,Ze){for(var Ye,ue=He(Z),fe,ee=1;ee<arguments.length;ee++){Ye=Object(arguments[ee]);for(var ie in Ye)_e.call(Ye,ie)&&(ue[ie]=Ye[ie]);if(ae){fe=ae(Ye);for(var me=0;me<fe.length;me++)Ne.call(Ye,fe[me])&&(ue[fe[me]]=Ye[fe[me]])}}return ue}},346:function(te,ae,_e){"use strict";var Ne;/** @license React v17.0.2
5
+ */var ae=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable;function $e(Z){if(Z==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(Z)}c($e,"toObject");function st(){try{if(!Object.assign)return!1;var Z=new String("abc");if(Z[5]="de",Object.getOwnPropertyNames(Z)[0]==="5")return!1;for(var Ze={},Ye=0;Ye<10;Ye++)Ze["_"+String.fromCharCode(Ye)]=Ye;var ue=Object.getOwnPropertyNames(Ze).map(function(ee){return Ze[ee]});if(ue.join("")!=="0123456789")return!1;var fe={};return"abcdefghijklmnopqrst".split("").forEach(function(ee){fe[ee]=ee}),Object.keys(Object.assign({},fe)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}c(st,"shouldUseNative"),te.exports=st()?Object.assign:function(Z,Ze){for(var Ye,ue=$e(Z),fe,ee=1;ee<arguments.length;ee++){Ye=Object(arguments[ee]);for(var ie in Ye)_e.call(Ye,ie)&&(ue[ie]=Ye[ie]);if(ae){fe=ae(Ye);for(var me=0;me<fe.length;me++)Oe.call(Ye,fe[me])&&(ue[fe[me]]=Ye[fe[me]])}}return ue}},346:function(te,ae,_e){"use strict";var Oe;/** @license React v17.0.2
6
6
  * react-jsx-runtime.production.min.js
7
7
  *
8
8
  * Copyright (c) Facebook, Inc. and its affiliates.
9
9
  *
10
10
  * This source code is licensed under the MIT license found in the
11
11
  * LICENSE file in the root directory of this source tree.
12
- */_e(772);var He=_e(359),st=60103;if(Ne=60107,typeof Symbol=="function"&&Symbol.for){var Z=Symbol.for;st=Z("react.element"),Ne=Z("react.fragment")}var Ze=He.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ye=Object.prototype.hasOwnProperty,ue={key:!0,ref:!0,__self:!0,__source:!0};function fe(ee,ie,me){var q,ge={},C=null,V=null;me!==void 0&&(C=""+me),ie.key!==void 0&&(C=""+ie.key),ie.ref!==void 0&&(V=ie.ref);for(q in ie)Ye.call(ie,q)&&!ue.hasOwnProperty(q)&&(ge[q]=ie[q]);if(ee&&ee.defaultProps)for(q in ie=ee.defaultProps,ie)ge[q]===void 0&&(ge[q]=ie[q]);return{$$typeof:st,type:ee,key:C,ref:V,props:ge,_owner:Ze.current}}c(fe,"q"),ae.jsx=fe,ae.jsxs=fe},232:function(te,ae,_e){"use strict";te.exports=_e(346)},359:function(te){"use strict";te.exports=ht},318:function(te){"use strict";te.exports=Ve}},Pt={};function tt(te){var ae=Pt[te];if(ae!==void 0)return ae.exports;var _e=Pt[te]={exports:{}};return at[te](_e,_e.exports,tt),_e.exports}c(tt,"__webpack_require__"),(function(){tt.n=function(te){var ae=te&&te.__esModule?function(){return te.default}:function(){return te};return tt.d(ae,{a:ae}),ae}})(),(function(){tt.d=function(te,ae){for(var _e in ae)tt.o(ae,_e)&&!tt.o(te,_e)&&Object.defineProperty(te,_e,{enumerable:!0,get:ae[_e]})}})(),(function(){tt.o=function(te,ae){return Object.prototype.hasOwnProperty.call(te,ae)}})(),(function(){tt.r=function(te){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(te,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(te,"__esModule",{value:!0})}})();var ot={};return(function(){"use strict";tt.r(ot),tt.d(ot,{AppEvents:function(){return A},AppNamespace:function(){return ks},BuiltInPowerupCodes:function(){return kr},Card:function(){return pr},CardNamespace:function(){return yi},CheckboxMatcher:function(){return Wl},ComponentFocusableItemType:function(){return gu},DEPRECATED_RICH_TEXT_ELEMENT_TYPES:function(){return nr},DEPRECATED_RICH_TEXT_ELEMENT_TYPES_TO_NEW_FORMATTING:function(){return Zi},DEPRECATED_RICH_TEXT_FORMATTING_TYPES:function(){return Su},DateMatcher:function(){return Io},DateMatcherTypesToDisplayValue:function(){return $l},DateNamespace:function(){return Wr},DocumentViewer:function(){return Md},EXAM_SCHEDULER_EXPLANATION_TYPES:function(){return Cu},EditorEvents:function(){return ue},EditorNamespace:function(){return gt},EmbedComponentType:function(){return Ln},EventNamespace:function(){return br},FocusEvents:function(){return F},FocusNamespace:function(){return Ji},FocusPropsType:function(){return yu},GetCardInfoNodeCardFields:function(){return Vi},GlobalEvent:function(){return Ze},KnowledgeBaseNamespace:function(){return Lo},LegacySearchPortalSingleSelectQueryExpression:function(){return Yl},LoadingSpinnerPlugin:function(){return Zd},MessagingEvents:function(){return me},MessagingNamespace:function(){return Os},MoveUnit:function(){return Tu},MultiSelectMatcher:function(){return Es},MultiSelectMatcherTypesToDisplayValue:function(){return Ql},NonRelativeMatcherTypes:function(){return Iu},NumberMatcher:function(){return Pn},NumberMatcherTypesToDisplayValue:function(){return No},PDFWebReader:function(){return jd},PORTAL_TYPE:function(){return Eu},PageType_DUPE_1:function(){return Wi},PluginAccessScopeType:function(){return Rr},PluginActionPermissionLevel:function(){return Dl},PluginCommandMenuLocation:function(){return vu},PluginRem:function(){return Wn},PowerupEvent:function(){return ee},PowerupNamespace:function(){return rr},PowerupSlotCodeMap:function(){return Ui},PreviewRemCards:function(){return Wd},PropertyLocation:function(){return Bl},PropertyType:function(){return Ll},QueryExpressionType:function(){return nn},QueryNodeType:function(){return Rt},QueryRemType:function(){return Pu},Query_DUPE_2:function(){return jo},Queue:function(){return Ud},QueueEvent:function(){return Ye},QueueInteractionScore:function(){return wu},QueueItemType:function(){return Jl},QueueItemTypeHumanReadable:function(){return Qi},QueueItemTypeHumanReadableTextToSpeech:function(){return Cs},QueueNamespace:function(){return Or},RICH_TEXT_ELEMENT_TYPE:function(){return _u},RICH_TEXT_FORMATTING:function(){return hr},RNPlugin:function(){return so},ReactRNPlugin:function(){return kc},ReaderNamespace:function(){return jn},RegisterPowerupOptions:function(){return Ou},RegisterPropertyOptions:function(){return xs},RelativeDateMatcher:function(){return Zr},RelativeDateMatcherToLabel:function(){return ku},RelativeDateModifier:function(){return Oo},RelativeDatePeriod:function(){return Hl},RemColor:function(){return ws},RemEvent:function(){return fe},RemHierarchyEditorTree:function(){return zd},RemNamespace:function(){return ji},RemRichTextEditor:function(){return Bd},RemType:function(){return Al},RemTypeTinyGraph:function(){return Fl},RemViewer:function(){return Ld},RichText:function(){return Fd},RichTextEditor:function(){return Ad},RichTextNamespace:function(){return yr},SchedulerExplanationType:function(){return Ml},SchedulerNamespace:function(){return _i},SearchNamespace:function(){return Ms},SearchPortalCheckboxQueryExpression:function(){return Xl},SearchPortalDateQueryExpression:function(){return wi},SearchPortalGetCardInfoQueryNode:function(){return Ul},SearchPortalGroupQueryNode:function(){return Ss},SearchPortalMultiSelectQueryExpression:function(){return Gl},SearchPortalNumberQueryExpression:function(){return Ts},SearchPortalQuery:function(){return $i},SearchPortalQueryExpression:function(){return ql},SearchPortalRefQueryExpression:function(){return Zl},SearchPortalRemTypeQueryExpression:function(){return Ru},SearchPortalSingleSelectQueryExpression:function(){return St},SearchPortalSlotQueryNode:function(){return zl},SearchPortalTextQueryExpression:function(){return Kl},SearchPortalUnaryQueryNode:function(){return _s},SelectSourceType:function(){return vi},SelectionType:function(){return vs},SetRemType:function(){return pu},SettingEvents:function(){return q},SettingsNamespace:function(){return Hn},SidebarEvents:function(){return ie},SingleSelectMatcher:function(){return bo},SingleSelectMatcherTypesToDisplayValue:function(){return bu},SpecialPluginCallback:function(){return xu},StorageEvents:function(){return ge},StorageNamespace:function(){return Us},TextMatcher:function(){return Vl},TextMatcherTypesToDisplayValue:function(){return Hi},TextMatchersAllowedWithoutPrimaryQuery:function(){return Yc},WidgetEvents:function(){return C},WidgetLocation:function(){return fu},WidgetNamespace:function(){return Qn},WindowEvents:function(){return V},WindowNamespace:function(){return Ho},createReactiveApi:function(){return hd},declareIndexPlugin:function(){return Yd},filterAsync:function(){return uf},isAppEvent:function(){return $},numberValidatorSig:function(){return ko},parseManifest:function(){return gp},remTypeTinyGraphToNormal:function(){return mu},remTypeToTinyGraphType:function(){return hu},renderWidget:function(){return Gd},richTextFormatNameCodeMap:function(){return Nl},stringValidatorSig:function(){return jl},useAPIEventListener:function(){return Ic},useGetRemsByIdsReactive:function(){return tf},useLocalStorageState:function(){return of},useOnMessageBroadcast:function(){return Xd},usePlugin:function(){return bi},useRunAsync:function(){return af},useSessionStorageState:function(){return rf},useSyncedStorageState:function(){return sf},useTrackerPlugin:function(){return yf}});var te={};tt.r(te),tt.d(te,{VERSION:function(){return lo},after:function(){return ml},all:function(){return Ga},allKeys:function(){return xi},any:function(){return Ii},assign:function(){return fo},before:function(){return Ha},bind:function(){return mc},bindAll:function(){return gc},chain:function(){return Za},chunk:function(){return Ed},clone:function(){return ns},collect:function(){return ui},compact:function(){return oe},compose:function(){return zn},constant:function(){return qs},contains:function(){return _r},countBy:function(){return W},create:function(){return re},debounce:function(){return wc},default:function(){return kf},defaults:function(){return sl},defer:function(){return si},delay:function(){return Wa},detect:function(){return _o},difference:function(){return Ue},drop:function(){return z},each:function(){return Xn},escape:function(){return yo},every:function(){return Ga},extend:function(){return ol},extendOwn:function(){return fo},filter:function(){return wr},find:function(){return _o},findIndex:function(){return rs},findKey:function(){return wo},findLastIndex:function(){return gl},findWhere:function(){return Qa},first:function(){return L},flatten:function(){return Oe},foldl:function(){return ki},foldr:function(){return Sc},forEach:function(){return Xn},functions:function(){return Jr},get:function(){return Pi},groupBy:function(){return J},has:function(){return ul},head:function(){return L},identity:function(){return po},include:function(){return _r},includes:function(){return _r},indexBy:function(){return Ie},indexOf:function(){return _c},initial:function(){return P},inject:function(){return ki},intersection:function(){return wd},invert:function(){return qr},invoke:function(){return vl},isArguments:function(){return Gs},isArray:function(){return Nr},isArrayBuffer:function(){return Qs},isBoolean:function(){return Ea},isDataView:function(){return Xo},isDate:function(){return oc},isElement:function(){return ic},isEmpty:function(){return cc},isEqual:function(){return rl},isError:function(){return xa},isFinite:function(){return Ys},isFunction:function(){return yn},isMap:function(){return Jt},isMatch:function(){return tl},isNaN:function(){return Xs},isNull:function(){return rc},isNumber:function(){return Ta},isObject:function(){return or},isRegExp:function(){return sc},isSet:function(){return Ci},isString:function(){return gn},isSymbol:function(){return Ca},isTypedArray:function(){return Da},isUndefined:function(){return Sa},isWeakMap:function(){return vn},isWeakSet:function(){return ja},iteratee:function(){return Yn},keys:function(){return qt},last:function(){return be},lastIndexOf:function(){return yl},map:function(){return ui},mapObject:function(){return mo},matcher:function(){return bn},matches:function(){return bn},max:function(){return o},memoize:function(){return yc},methods:function(){return Jr},min:function(){return l},mixin:function(){return od},negate:function(){return hl},noop:function(){return go},now:function(){return ii},object:function(){return _d},omit:function(){return T},once:function(){return li},pairs:function(){return ts},partial:function(){return pl},partition:function(){return de},pick:function(){return k},pluck:function(){return e},property:function(){return ni},propertyOf:function(){return On},random:function(){return lr},range:function(){return Sd},reduce:function(){return ki},reduceRight:function(){return Sc},reject:function(){return Ka},rest:function(){return z},restArguments:function(){return fn},result:function(){return vo},sample:function(){return m},select:function(){return wr},shuffle:function(){return v},size:function(){return Ce},some:function(){return Ii},sortBy:function(){return S},sortedIndex:function(){return is},tail:function(){return z},take:function(){return L},tap:function(){return al},template:function(){return Ua},templateSettings:function(){return fc},throttle:function(){return vc},times:function(){return Ar},toArray:function(){return f},toPath:function(){return Gn},transpose:function(){return Ec},unescape:function(){return nd},union:function(){return id},uniq:function(){return ar},unique:function(){return ar},uniqueId:function(){return hc},unzip:function(){return Ec},values:function(){return bt},where:function(){return n},without:function(){return Le},wrap:function(){return Va},zip:function(){return Rf}});var ae=Object.defineProperty,_e=Object.getOwnPropertySymbols,Ne=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,st=c((t,r,i)=>r in t?ae(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"__defNormalProp"),Z=c((t,r)=>{for(var i in r||(r={}))Ne.call(r,i)&&st(t,i,r[i]);if(_e)for(var i of _e(r))He.call(r,i)&&st(t,i,r[i]);return t},"__spreadValues");const Ze={GlobalOpenRem:"global.open-rem",URLChange:"global.url-change"},Ye={QueueLoadCard:"queue.load-card",QueueCompleteCard:"queue.complete-card",QueueEnter:"queue.enter",QueueExit:"queue.exit",RevealAnswer:"queue.reveal-answer"},ue={EditorSelectionChanged:"editor.selection-changed",EditorTextEdited:"editor.text-edited"},fe={RemChanged:"rem.changed",GlobalRemChanged:"global.rem.changed"},ee={PowerupSlotChanged:"powerup.slot.changed",ClickRemReference:"powerup.click-rem-reference",MouseOverLink:"powerup.mouse-enter-link",MouseOutLink:"powerup.mouse-out-link",SetTodoStatus:"powerup.todo.set-status"},ie={ClickSidebarItem:"sidebar.click-item"},me={MessageBroadcast:"messaging.broadcast"},q={SettingChanged:"setting.changed"},ge={StorageSessionChange:"storage.session.changed",StorageSyncedChange:"storage.synced.changed",StorageLocalChange:"storage.local.changed"},C={FakeEmbedComponentDimensionChange:"widget.virtual-embed-dimension-change",FakeEmbedDOMEvent:"widget.virtual-embed-dom-event",StealKeyEvent:"widget.steal-key-event"},V={FocusedPaneChange:"window.focusedPane.changed",CurrentWindowTreeChange:"window.PaneIdWindowTree.changed"},F={FocusedRemChange:"window.focusedRem.changed",FocusedPortalChange:"window.focusedPortal.changed"},A=Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z({onActivate:"onActivate",onDeactivate:"onDeactivate",setDarkMode:"setDarkMode",setCustomCSS:"setCustomCSS"},V),me),ie),ee),fe),Ze),Ye),ge),C),ue),q),F);function $(t){return Object.values(A).includes(t)}c($,"isAppEvent");var H;(function(t){t.assertEqual=a=>a;function r(a){}c(r,"assertIs"),t.assertIs=r;function i(a){throw new Error}c(i,"assertNever"),t.assertNever=i,t.arrayToEnum=a=>{const d={};for(const p of a)d[p]=p;return d},t.getValidEnumValues=a=>{const d=t.objectKeys(a).filter(h=>typeof a[a[h]]!="number"),p={};for(const h of d)p[h]=a[h];return t.objectValues(p)},t.objectValues=a=>t.objectKeys(a).map(function(d){return a[d]}),t.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const d=[];for(const p in a)Object.prototype.hasOwnProperty.call(a,p)&&d.push(p);return d},t.find=(a,d)=>{for(const p of a)if(d(p))return p},t.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&isFinite(a)&&Math.floor(a)===a;function s(a,d=" | "){return a.map(p=>typeof p=="string"?`'${p}'`:p).join(d)}c(s,"joinValues"),t.joinValues=s,t.jsonStringifyReplacer=(a,d)=>typeof d=="bigint"?d.toString():d})(H||(H={}));var ne;(function(t){t.mergeShapes=(r,i)=>b(b({},r),i)})(ne||(ne={}));const U=H.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ye=c(t=>{switch(typeof t){case"undefined":return U.undefined;case"string":return U.string;case"number":return isNaN(t)?U.nan:U.number;case"boolean":return U.boolean;case"function":return U.function;case"bigint":return U.bigint;case"symbol":return U.symbol;case"object":return Array.isArray(t)?U.array:t===null?U.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?U.promise:typeof Map<"u"&&t instanceof Map?U.map:typeof Set<"u"&&t instanceof Set?U.set:typeof Date<"u"&&t instanceof Date?U.date:U.object;default:return U.unknown}},"getParsedType"),M=H.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),sn=c(t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson");class $t extends Error{constructor(r){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const i=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,i):this.__proto__=i,this.name="ZodError",this.issues=r}get errors(){return this.issues}format(r){const i=r||function(d){return d.message},s={_errors:[]},a=c(d=>{for(const p of d.issues)if(p.code==="invalid_union")p.unionErrors.map(a);else if(p.code==="invalid_return_type")a(p.returnTypeError);else if(p.code==="invalid_arguments")a(p.argumentsError);else if(p.path.length===0)s._errors.push(i(p));else{let h=s,g=0;for(;g<p.path.length;){const _=p.path[g];g===p.path.length-1?(h[_]=h[_]||{_errors:[]},h[_]._errors.push(i(p))):h[_]=h[_]||{_errors:[]},h=h[_],g++}}},"processError");return a(this),s}toString(){return this.message}get message(){return JSON.stringify(this.issues,H.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(r=i=>i.message){const i={},s=[];for(const a of this.issues)a.path.length>0?(i[a.path[0]]=i[a.path[0]]||[],i[a.path[0]].push(r(a))):s.push(r(a));return{formErrors:s,fieldErrors:i}}get formErrors(){return this.flatten()}}c($t,"ZodError"),$t.create=t=>new $t(t);const Un=c((t,r)=>{let i;switch(t.code){case M.invalid_type:t.received===U.undefined?i="Required":i=`Expected ${t.expected}, received ${t.received}`;break;case M.invalid_literal:i=`Invalid literal value, expected ${JSON.stringify(t.expected,H.jsonStringifyReplacer)}`;break;case M.unrecognized_keys:i=`Unrecognized key(s) in object: ${H.joinValues(t.keys,", ")}`;break;case M.invalid_union:i="Invalid input";break;case M.invalid_union_discriminator:i=`Invalid discriminator value. Expected ${H.joinValues(t.options)}`;break;case M.invalid_enum_value:i=`Invalid enum value. Expected ${H.joinValues(t.options)}, received '${t.received}'`;break;case M.invalid_arguments:i="Invalid function arguments";break;case M.invalid_return_type:i="Invalid function return type";break;case M.invalid_date:i="Invalid date";break;case M.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(i=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(i=`${i} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?i=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?i=`Invalid input: must end with "${t.validation.endsWith}"`:H.assertNever(t.validation):t.validation!=="regex"?i=`Invalid ${t.validation}`:i="Invalid";break;case M.too_small:t.type==="array"?i=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?i=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?i=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?i=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:i="Invalid input";break;case M.too_big:t.type==="array"?i=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?i=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?i=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?i=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?i=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:i="Invalid input";break;case M.custom:i="Invalid input";break;case M.invalid_intersection_types:i="Intersection results could not be merged";break;case M.not_multiple_of:i=`Number must be a multiple of ${t.multipleOf}`;break;case M.not_finite:i="Number must be finite";break;default:i=r.defaultError,H.assertNever(t)}return{message:i}},"errorMap");let cs=Un;function Sr(t){cs=t}c(Sr,"setErrorMap");function Cn(){return cs}c(Cn,"getErrorMap");const pi=c(t=>{const{data:r,path:i,errorMaps:s,issueData:a}=t,d=[...i,...a.path||[]],p=Y(b({},a),{path:d});let h="";const g=s.filter(_=>!!_).slice().reverse();for(const _ of g)h=_(p,{data:r,defaultError:h}).message;return Y(b({},a),{path:d,message:a.message||h})},"makeIssue"),Tl=[];function X(t,r){const i=pi({issueData:r,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Cn(),Un].filter(s=>!!s)});t.common.issues.push(i)}c(X,"addIssueToContext");class Ut{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(r,i){const s=[];for(const a of i){if(a.status==="aborted")return Se;a.status==="dirty"&&r.dirty(),s.push(a.value)}return{status:r.value,value:s}}static mergeObjectAsync(r,i){return Mt(this,null,function*(){const s=[];for(const a of i)s.push({key:yield a.key,value:yield a.value});return Ut.mergeObjectSync(r,s)})}static mergeObjectSync(r,i){const s={};for(const a of i){const{key:d,value:p}=a;if(d.status==="aborted"||p.status==="aborted")return Se;d.status==="dirty"&&r.dirty(),p.status==="dirty"&&r.dirty(),d.value!=="__proto__"&&(typeof p.value<"u"||a.alwaysSet)&&(s[d.value]=p.value)}return{status:r.value,value:s}}}c(Ut,"ParseStatus");const Se=Object.freeze({status:"aborted"}),Ni=c(t=>({status:"dirty",value:t}),"DIRTY"),tn=c(t=>({status:"valid",value:t}),"OK"),Di=c(t=>t.status==="aborted","isAborted"),hi=c(t=>t.status==="dirty","isDirty"),jr=c(t=>t.status==="valid","isValid"),Zn=c(t=>typeof Promise<"u"&&t instanceof Promise,"isAsync");var ce;(function(t){t.errToObj=r=>typeof r=="string"?{message:r}:r||{},t.toString=r=>typeof r=="string"?r:r?.message})(ce||(ce={}));class ln{constructor(r,i,s,a){this._cachedPath=[],this.parent=r,this.data=i,this._path=s,this._key=a}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}c(ln,"ParseInputLazyPath");const Er=c((t,r)=>{if(jr(r))return{success:!0,data:r.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const i=new $t(t.common.issues);return this._error=i,this._error}}},"handleResult");function Ee(t){if(!t)return{};const{errorMap:r,invalid_type_error:i,required_error:s,description:a}=t;if(r&&(i||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return r?{errorMap:r,description:a}:{errorMap:c((d,p)=>d.code!=="invalid_type"?{message:p.defaultError}:typeof p.data>"u"?{message:s??p.defaultError}:{message:i??p.defaultError},"customMap"),description:a}}c(Ee,"processCreateParams");class w{constructor(r){this.spa=this.safeParseAsync,this._def=r,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(r){return ye(r.data)}_getOrReturnCtx(r,i){return i||{common:r.parent.common,data:r.data,parsedType:ye(r.data),schemaErrorMap:this._def.errorMap,path:r.path,parent:r.parent}}_processInputParams(r){return{status:new Ut,ctx:{common:r.parent.common,data:r.data,parsedType:ye(r.data),schemaErrorMap:this._def.errorMap,path:r.path,parent:r.parent}}}_parseSync(r){const i=this._parse(r);if(Zn(i))throw new Error("Synchronous parse encountered promise.");return i}_parseAsync(r){const i=this._parse(r);return Promise.resolve(i)}parse(r,i){const s=this.safeParse(r,i);if(s.success)return s.data;throw s.error}safeParse(r,i){var s;const a={common:{issues:[],async:(s=i?.async)!==null&&s!==void 0?s:!1,contextualErrorMap:i?.errorMap},path:i?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:r,parsedType:ye(r)},d=this._parseSync({data:r,path:a.path,parent:a});return Er(a,d)}parseAsync(r,i){return Mt(this,null,function*(){const s=yield this.safeParseAsync(r,i);if(s.success)return s.data;throw s.error})}safeParseAsync(r,i){return Mt(this,null,function*(){const s={common:{issues:[],contextualErrorMap:i?.errorMap,async:!0},path:i?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:r,parsedType:ye(r)},a=this._parse({data:r,path:s.path,parent:s}),d=yield Zn(a)?a:Promise.resolve(a);return Er(s,d)})}refine(r,i){const s=c(a=>typeof i=="string"||typeof i>"u"?{message:i}:typeof i=="function"?i(a):i,"getIssueProperties");return this._refinement((a,d)=>{const p=r(a),h=c(()=>d.addIssue(b({code:M.custom},s(a))),"setError");return typeof Promise<"u"&&p instanceof Promise?p.then(g=>g?!0:(h(),!1)):p?!0:(h(),!1)})}refinement(r,i){return this._refinement((s,a)=>r(s)?!0:(a.addIssue(typeof i=="function"?i(s,a):i),!1))}_refinement(r){return new Sn({schema:this,typeName:pe.ZodEffects,effect:{type:"refinement",refinement:r}})}superRefine(r){return this._refinement(r)}optional(){return Dn.create(this,this._def)}nullable(){return cr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Je.create(this,this._def)}promise(){return _n.create(this,this._def)}or(r){return Qt.create([this,r],this._def)}and(r){return ut.create(this,r,this._def)}transform(r){return new Sn(Y(b({},Ee(this._def)),{schema:this,typeName:pe.ZodEffects,effect:{type:"transform",transform:r}}))}default(r){const i=typeof r=="function"?r:()=>r;return new xr(Y(b({},Ee(this._def)),{innerType:this,defaultValue:i,typeName:pe.ZodDefault}))}brand(){return new Mr(b({typeName:pe.ZodBranded,type:this},Ee(this._def)))}catch(r){const i=typeof r=="function"?r:()=>r;return new dr(Y(b({},Ee(this._def)),{innerType:this,catchValue:i,typeName:pe.ZodCatch}))}describe(r){const i=this.constructor;return new i(Y(b({},this._def),{description:r}))}pipe(r){return fr.create(this,r)}readonly(){return ze.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}c(w,"ZodType");const y=/^c[^\s-]{8,}$/i,E=/^[a-z][a-z0-9]*$/,R=/[0-9A-HJKMNP-TV-Z]{26}/,N=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,j=/^([A-Z0-9_+-]+\.?)*[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Q=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),G=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,ve=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Fe=c(t=>t.precision?t.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}Z$`):t.precision===0?t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"),"datetimeRegex");function De(t,r){return!!((r==="v4"||!r)&&G.test(t)||(r==="v6"||!r)&&ve.test(t))}c(De,"isValidIP");class he extends w{constructor(){super(...arguments),this._regex=(r,i,s)=>this.refinement(a=>r.test(a),b({validation:i,code:M.invalid_string},ce.errToObj(s))),this.nonempty=r=>this.min(1,ce.errToObj(r)),this.trim=()=>new he(Y(b({},this._def),{checks:[...this._def.checks,{kind:"trim"}]})),this.toLowerCase=()=>new he(Y(b({},this._def),{checks:[...this._def.checks,{kind:"toLowerCase"}]})),this.toUpperCase=()=>new he(Y(b({},this._def),{checks:[...this._def.checks,{kind:"toUpperCase"}]}))}_parse(r){if(this._def.coerce&&(r.data=String(r.data)),this._getType(r)!==U.string){const a=this._getOrReturnCtx(r);return X(a,{code:M.invalid_type,expected:U.string,received:a.parsedType}),Se}const i=new Ut;let s;for(const a of this._def.checks)if(a.kind==="min")r.data.length<a.value&&(s=this._getOrReturnCtx(r,s),X(s,{code:M.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),i.dirty());else if(a.kind==="max")r.data.length>a.value&&(s=this._getOrReturnCtx(r,s),X(s,{code:M.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),i.dirty());else if(a.kind==="length"){const d=r.data.length>a.value,p=r.data.length<a.value;(d||p)&&(s=this._getOrReturnCtx(r,s),d?X(s,{code:M.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):p&&X(s,{code:M.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),i.dirty())}else if(a.kind==="email")j.test(r.data)||(s=this._getOrReturnCtx(r,s),X(s,{validation:"email",code:M.invalid_string,message:a.message}),i.dirty());else if(a.kind==="emoji")Q.test(r.data)||(s=this._getOrReturnCtx(r,s),X(s,{validation:"emoji",code:M.invalid_string,message:a.message}),i.dirty());else if(a.kind==="uuid")N.test(r.data)||(s=this._getOrReturnCtx(r,s),X(s,{validation:"uuid",code:M.invalid_string,message:a.message}),i.dirty());else if(a.kind==="cuid")y.test(r.data)||(s=this._getOrReturnCtx(r,s),X(s,{validation:"cuid",code:M.invalid_string,message:a.message}),i.dirty());else if(a.kind==="cuid2")E.test(r.data)||(s=this._getOrReturnCtx(r,s),X(s,{validation:"cuid2",code:M.invalid_string,message:a.message}),i.dirty());else if(a.kind==="ulid")R.test(r.data)||(s=this._getOrReturnCtx(r,s),X(s,{validation:"ulid",code:M.invalid_string,message:a.message}),i.dirty());else if(a.kind==="url")try{new URL(r.data)}catch{s=this._getOrReturnCtx(r,s),X(s,{validation:"url",code:M.invalid_string,message:a.message}),i.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(r.data)||(s=this._getOrReturnCtx(r,s),X(s,{validation:"regex",code:M.invalid_string,message:a.message}),i.dirty())):a.kind==="trim"?r.data=r.data.trim():a.kind==="includes"?r.data.includes(a.value,a.position)||(s=this._getOrReturnCtx(r,s),X(s,{code:M.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),i.dirty()):a.kind==="toLowerCase"?r.data=r.data.toLowerCase():a.kind==="toUpperCase"?r.data=r.data.toUpperCase():a.kind==="startsWith"?r.data.startsWith(a.value)||(s=this._getOrReturnCtx(r,s),X(s,{code:M.invalid_string,validation:{startsWith:a.value},message:a.message}),i.dirty()):a.kind==="endsWith"?r.data.endsWith(a.value)||(s=this._getOrReturnCtx(r,s),X(s,{code:M.invalid_string,validation:{endsWith:a.value},message:a.message}),i.dirty()):a.kind==="datetime"?Fe(a).test(r.data)||(s=this._getOrReturnCtx(r,s),X(s,{code:M.invalid_string,validation:"datetime",message:a.message}),i.dirty()):a.kind==="ip"?De(r.data,a.version)||(s=this._getOrReturnCtx(r,s),X(s,{validation:"ip",code:M.invalid_string,message:a.message}),i.dirty()):H.assertNever(a);return{status:i.value,value:r.data}}_addCheck(r){return new he(Y(b({},this._def),{checks:[...this._def.checks,r]}))}email(r){return this._addCheck(b({kind:"email"},ce.errToObj(r)))}url(r){return this._addCheck(b({kind:"url"},ce.errToObj(r)))}emoji(r){return this._addCheck(b({kind:"emoji"},ce.errToObj(r)))}uuid(r){return this._addCheck(b({kind:"uuid"},ce.errToObj(r)))}cuid(r){return this._addCheck(b({kind:"cuid"},ce.errToObj(r)))}cuid2(r){return this._addCheck(b({kind:"cuid2"},ce.errToObj(r)))}ulid(r){return this._addCheck(b({kind:"ulid"},ce.errToObj(r)))}ip(r){return this._addCheck(b({kind:"ip"},ce.errToObj(r)))}datetime(r){var i;return typeof r=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:r}):this._addCheck(b({kind:"datetime",precision:typeof r?.precision>"u"?null:r?.precision,offset:(i=r?.offset)!==null&&i!==void 0?i:!1},ce.errToObj(r?.message)))}regex(r,i){return this._addCheck(b({kind:"regex",regex:r},ce.errToObj(i)))}includes(r,i){return this._addCheck(b({kind:"includes",value:r,position:i?.position},ce.errToObj(i?.message)))}startsWith(r,i){return this._addCheck(b({kind:"startsWith",value:r},ce.errToObj(i)))}endsWith(r,i){return this._addCheck(b({kind:"endsWith",value:r},ce.errToObj(i)))}min(r,i){return this._addCheck(b({kind:"min",value:r},ce.errToObj(i)))}max(r,i){return this._addCheck(b({kind:"max",value:r},ce.errToObj(i)))}length(r,i){return this._addCheck(b({kind:"length",value:r},ce.errToObj(i)))}get isDatetime(){return!!this._def.checks.find(r=>r.kind==="datetime")}get isEmail(){return!!this._def.checks.find(r=>r.kind==="email")}get isURL(){return!!this._def.checks.find(r=>r.kind==="url")}get isEmoji(){return!!this._def.checks.find(r=>r.kind==="emoji")}get isUUID(){return!!this._def.checks.find(r=>r.kind==="uuid")}get isCUID(){return!!this._def.checks.find(r=>r.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(r=>r.kind==="cuid2")}get isULID(){return!!this._def.checks.find(r=>r.kind==="ulid")}get isIP(){return!!this._def.checks.find(r=>r.kind==="ip")}get minLength(){let r=null;for(const i of this._def.checks)i.kind==="min"&&(r===null||i.value>r)&&(r=i.value);return r}get maxLength(){let r=null;for(const i of this._def.checks)i.kind==="max"&&(r===null||i.value<r)&&(r=i.value);return r}}c(he,"ZodString"),he.create=t=>{var r;return new he(b({checks:[],typeName:pe.ZodString,coerce:(r=t?.coerce)!==null&&r!==void 0?r:!1},Ee(t)))};function mt(t,r){const i=(t.toString().split(".")[1]||"").length,s=(r.toString().split(".")[1]||"").length,a=i>s?i:s,d=parseInt(t.toFixed(a).replace(".","")),p=parseInt(r.toFixed(a).replace(".",""));return d%p/Math.pow(10,a)}c(mt,"floatSafeRemainder");class Me extends w{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(r){if(this._def.coerce&&(r.data=Number(r.data)),this._getType(r)!==U.number){const a=this._getOrReturnCtx(r);return X(a,{code:M.invalid_type,expected:U.number,received:a.parsedType}),Se}let i;const s=new Ut;for(const a of this._def.checks)a.kind==="int"?H.isInteger(r.data)||(i=this._getOrReturnCtx(r,i),X(i,{code:M.invalid_type,expected:"integer",received:"float",message:a.message}),s.dirty()):a.kind==="min"?(a.inclusive?r.data<a.value:r.data<=a.value)&&(i=this._getOrReturnCtx(r,i),X(i,{code:M.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?r.data>a.value:r.data>=a.value)&&(i=this._getOrReturnCtx(r,i),X(i,{code:M.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="multipleOf"?mt(r.data,a.value)!==0&&(i=this._getOrReturnCtx(r,i),X(i,{code:M.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):a.kind==="finite"?Number.isFinite(r.data)||(i=this._getOrReturnCtx(r,i),X(i,{code:M.not_finite,message:a.message}),s.dirty()):H.assertNever(a);return{status:s.value,value:r.data}}gte(r,i){return this.setLimit("min",r,!0,ce.toString(i))}gt(r,i){return this.setLimit("min",r,!1,ce.toString(i))}lte(r,i){return this.setLimit("max",r,!0,ce.toString(i))}lt(r,i){return this.setLimit("max",r,!1,ce.toString(i))}setLimit(r,i,s,a){return new Me(Y(b({},this._def),{checks:[...this._def.checks,{kind:r,value:i,inclusive:s,message:ce.toString(a)}]}))}_addCheck(r){return new Me(Y(b({},this._def),{checks:[...this._def.checks,r]}))}int(r){return this._addCheck({kind:"int",message:ce.toString(r)})}positive(r){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ce.toString(r)})}negative(r){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ce.toString(r)})}nonpositive(r){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ce.toString(r)})}nonnegative(r){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ce.toString(r)})}multipleOf(r,i){return this._addCheck({kind:"multipleOf",value:r,message:ce.toString(i)})}finite(r){return this._addCheck({kind:"finite",message:ce.toString(r)})}safe(r){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ce.toString(r)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ce.toString(r)})}get minValue(){let r=null;for(const i of this._def.checks)i.kind==="min"&&(r===null||i.value>r)&&(r=i.value);return r}get maxValue(){let r=null;for(const i of this._def.checks)i.kind==="max"&&(r===null||i.value<r)&&(r=i.value);return r}get isInt(){return!!this._def.checks.find(r=>r.kind==="int"||r.kind==="multipleOf"&&H.isInteger(r.value))}get isFinite(){let r=null,i=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(i===null||s.value>i)&&(i=s.value):s.kind==="max"&&(r===null||s.value<r)&&(r=s.value)}return Number.isFinite(i)&&Number.isFinite(r)}}c(Me,"ZodNumber"),Me.create=t=>new Me(b({checks:[],typeName:pe.ZodNumber,coerce:t?.coerce||!1},Ee(t)));class $e extends w{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(r){if(this._def.coerce&&(r.data=BigInt(r.data)),this._getType(r)!==U.bigint){const a=this._getOrReturnCtx(r);return X(a,{code:M.invalid_type,expected:U.bigint,received:a.parsedType}),Se}let i;const s=new Ut;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?r.data<a.value:r.data<=a.value)&&(i=this._getOrReturnCtx(r,i),X(i,{code:M.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?r.data>a.value:r.data>=a.value)&&(i=this._getOrReturnCtx(r,i),X(i,{code:M.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="multipleOf"?r.data%a.value!==BigInt(0)&&(i=this._getOrReturnCtx(r,i),X(i,{code:M.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):H.assertNever(a);return{status:s.value,value:r.data}}gte(r,i){return this.setLimit("min",r,!0,ce.toString(i))}gt(r,i){return this.setLimit("min",r,!1,ce.toString(i))}lte(r,i){return this.setLimit("max",r,!0,ce.toString(i))}lt(r,i){return this.setLimit("max",r,!1,ce.toString(i))}setLimit(r,i,s,a){return new $e(Y(b({},this._def),{checks:[...this._def.checks,{kind:r,value:i,inclusive:s,message:ce.toString(a)}]}))}_addCheck(r){return new $e(Y(b({},this._def),{checks:[...this._def.checks,r]}))}positive(r){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ce.toString(r)})}negative(r){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ce.toString(r)})}nonpositive(r){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ce.toString(r)})}nonnegative(r){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ce.toString(r)})}multipleOf(r,i){return this._addCheck({kind:"multipleOf",value:r,message:ce.toString(i)})}get minValue(){let r=null;for(const i of this._def.checks)i.kind==="min"&&(r===null||i.value>r)&&(r=i.value);return r}get maxValue(){let r=null;for(const i of this._def.checks)i.kind==="max"&&(r===null||i.value<r)&&(r=i.value);return r}}c($e,"ZodBigInt"),$e.create=t=>{var r;return new $e(b({checks:[],typeName:pe.ZodBigInt,coerce:(r=t?.coerce)!==null&&r!==void 0?r:!1},Ee(t)))};class wt extends w{_parse(r){if(this._def.coerce&&(r.data=!!r.data),this._getType(r)!==U.boolean){const i=this._getOrReturnCtx(r);return X(i,{code:M.invalid_type,expected:U.boolean,received:i.parsedType}),Se}return tn(r.data)}}c(wt,"ZodBoolean"),wt.create=t=>new wt(b({typeName:pe.ZodBoolean,coerce:t?.coerce||!1},Ee(t)));class Pe extends w{_parse(r){if(this._def.coerce&&(r.data=new Date(r.data)),this._getType(r)!==U.date){const a=this._getOrReturnCtx(r);return X(a,{code:M.invalid_type,expected:U.date,received:a.parsedType}),Se}if(isNaN(r.data.getTime())){const a=this._getOrReturnCtx(r);return X(a,{code:M.invalid_date}),Se}const i=new Ut;let s;for(const a of this._def.checks)a.kind==="min"?r.data.getTime()<a.value&&(s=this._getOrReturnCtx(r,s),X(s,{code:M.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),i.dirty()):a.kind==="max"?r.data.getTime()>a.value&&(s=this._getOrReturnCtx(r,s),X(s,{code:M.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),i.dirty()):H.assertNever(a);return{status:i.value,value:new Date(r.data.getTime())}}_addCheck(r){return new Pe(Y(b({},this._def),{checks:[...this._def.checks,r]}))}min(r,i){return this._addCheck({kind:"min",value:r.getTime(),message:ce.toString(i)})}max(r,i){return this._addCheck({kind:"max",value:r.getTime(),message:ce.toString(i)})}get minDate(){let r=null;for(const i of this._def.checks)i.kind==="min"&&(r===null||i.value>r)&&(r=i.value);return r!=null?new Date(r):null}get maxDate(){let r=null;for(const i of this._def.checks)i.kind==="max"&&(r===null||i.value<r)&&(r=i.value);return r!=null?new Date(r):null}}c(Pe,"ZodDate"),Pe.create=t=>new Pe(b({checks:[],coerce:t?.coerce||!1,typeName:pe.ZodDate},Ee(t)));class Be extends w{_parse(r){if(this._getType(r)!==U.symbol){const i=this._getOrReturnCtx(r);return X(i,{code:M.invalid_type,expected:U.symbol,received:i.parsedType}),Se}return tn(r.data)}}c(Be,"ZodSymbol"),Be.create=t=>new Be(b({typeName:pe.ZodSymbol},Ee(t)));class Ge extends w{_parse(r){if(this._getType(r)!==U.undefined){const i=this._getOrReturnCtx(r);return X(i,{code:M.invalid_type,expected:U.undefined,received:i.parsedType}),Se}return tn(r.data)}}c(Ge,"ZodUndefined"),Ge.create=t=>new Ge(b({typeName:pe.ZodUndefined},Ee(t)));class nt extends w{_parse(r){if(this._getType(r)!==U.null){const i=this._getOrReturnCtx(r);return X(i,{code:M.invalid_type,expected:U.null,received:i.parsedType}),Se}return tn(r.data)}}c(nt,"ZodNull"),nt.create=t=>new nt(b({typeName:pe.ZodNull},Ee(t)));class Qe extends w{constructor(){super(...arguments),this._any=!0}_parse(r){return tn(r.data)}}c(Qe,"ZodAny"),Qe.create=t=>new Qe(b({typeName:pe.ZodAny},Ee(t)));class qe extends w{constructor(){super(...arguments),this._unknown=!0}_parse(r){return tn(r.data)}}c(qe,"ZodUnknown"),qe.create=t=>new qe(b({typeName:pe.ZodUnknown},Ee(t)));class Re extends w{_parse(r){const i=this._getOrReturnCtx(r);return X(i,{code:M.invalid_type,expected:U.never,received:i.parsedType}),Se}}c(Re,"ZodNever"),Re.create=t=>new Re(b({typeName:pe.ZodNever},Ee(t)));class xt extends w{_parse(r){if(this._getType(r)!==U.undefined){const i=this._getOrReturnCtx(r);return X(i,{code:M.invalid_type,expected:U.void,received:i.parsedType}),Se}return tn(r.data)}}c(xt,"ZodVoid"),xt.create=t=>new xt(b({typeName:pe.ZodVoid},Ee(t)));class Je extends w{_parse(r){const{ctx:i,status:s}=this._processInputParams(r),a=this._def;if(i.parsedType!==U.array)return X(i,{code:M.invalid_type,expected:U.array,received:i.parsedType}),Se;if(a.exactLength!==null){const p=i.data.length>a.exactLength.value,h=i.data.length<a.exactLength.value;(p||h)&&(X(i,{code:p?M.too_big:M.too_small,minimum:h?a.exactLength.value:void 0,maximum:p?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),s.dirty())}if(a.minLength!==null&&i.data.length<a.minLength.value&&(X(i,{code:M.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),s.dirty()),a.maxLength!==null&&i.data.length>a.maxLength.value&&(X(i,{code:M.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),s.dirty()),i.common.async)return Promise.all([...i.data].map((p,h)=>a.type._parseAsync(new ln(i,p,i.path,h)))).then(p=>Ut.mergeArray(s,p));const d=[...i.data].map((p,h)=>a.type._parseSync(new ln(i,p,i.path,h)));return Ut.mergeArray(s,d)}get element(){return this._def.type}min(r,i){return new Je(Y(b({},this._def),{minLength:{value:r,message:ce.toString(i)}}))}max(r,i){return new Je(Y(b({},this._def),{maxLength:{value:r,message:ce.toString(i)}}))}length(r,i){return new Je(Y(b({},this._def),{exactLength:{value:r,message:ce.toString(i)}}))}nonempty(r){return this.min(1,r)}}c(Je,"ZodArray"),Je.create=(t,r)=>new Je(b({type:t,minLength:null,maxLength:null,exactLength:null,typeName:pe.ZodArray},Ee(r)));function an(t){if(t instanceof Ke){const r={};for(const i in t.shape){const s=t.shape[i];r[i]=Dn.create(an(s))}return new Ke(Y(b({},t._def),{shape:()=>r}))}else return t instanceof Je?new Je(Y(b({},t._def),{type:an(t.element)})):t instanceof Dn?Dn.create(an(t.unwrap())):t instanceof cr?cr.create(an(t.unwrap())):t instanceof ct?ct.create(t.items.map(r=>an(r))):t}c(an,"deepPartialify");class Ke extends w{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const r=this._def.shape(),i=H.objectKeys(r);return this._cached={shape:r,keys:i}}_parse(r){if(this._getType(r)!==U.object){const g=this._getOrReturnCtx(r);return X(g,{code:M.invalid_type,expected:U.object,received:g.parsedType}),Se}const{status:i,ctx:s}=this._processInputParams(r),{shape:a,keys:d}=this._getCached(),p=[];if(!(this._def.catchall instanceof Re&&this._def.unknownKeys==="strip"))for(const g in s.data)d.includes(g)||p.push(g);const h=[];for(const g of d){const _=a[g],le=s.data[g];h.push({key:{status:"valid",value:g},value:_._parse(new ln(s,le,s.path,g)),alwaysSet:g in s.data})}if(this._def.catchall instanceof Re){const g=this._def.unknownKeys;if(g==="passthrough")for(const _ of p)h.push({key:{status:"valid",value:_},value:{status:"valid",value:s.data[_]}});else if(g==="strict")p.length>0&&(X(s,{code:M.unrecognized_keys,keys:p}),i.dirty());else if(g!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const g=this._def.catchall;for(const _ of p){const le=s.data[_];h.push({key:{status:"valid",value:_},value:g._parse(new ln(s,le,s.path,_)),alwaysSet:_ in s.data})}}return s.common.async?Promise.resolve().then(()=>Mt(this,null,function*(){const g=[];for(const _ of h){const le=yield _.key;g.push({key:le,value:yield _.value,alwaysSet:_.alwaysSet})}return g})).then(g=>Ut.mergeObjectSync(i,g)):Ut.mergeObjectSync(i,h)}get shape(){return this._def.shape()}strict(r){return ce.errToObj,new Ke(b(Y(b({},this._def),{unknownKeys:"strict"}),r!==void 0?{errorMap:(i,s)=>{var a,d,p,h;const g=(p=(d=(a=this._def).errorMap)===null||d===void 0?void 0:d.call(a,i,s).message)!==null&&p!==void 0?p:s.defaultError;return i.code==="unrecognized_keys"?{message:(h=ce.errToObj(r).message)!==null&&h!==void 0?h:g}:{message:g}}}:{}))}strip(){return new Ke(Y(b({},this._def),{unknownKeys:"strip"}))}passthrough(){return new Ke(Y(b({},this._def),{unknownKeys:"passthrough"}))}extend(r){return new Ke(Y(b({},this._def),{shape:()=>b(b({},this._def.shape()),r)}))}merge(r){return new Ke({unknownKeys:r._def.unknownKeys,catchall:r._def.catchall,shape:()=>b(b({},this._def.shape()),r._def.shape()),typeName:pe.ZodObject})}setKey(r,i){return this.augment({[r]:i})}catchall(r){return new Ke(Y(b({},this._def),{catchall:r}))}pick(r){const i={};return H.objectKeys(r).forEach(s=>{r[s]&&this.shape[s]&&(i[s]=this.shape[s])}),new Ke(Y(b({},this._def),{shape:()=>i}))}omit(r){const i={};return H.objectKeys(this.shape).forEach(s=>{r[s]||(i[s]=this.shape[s])}),new Ke(Y(b({},this._def),{shape:()=>i}))}deepPartial(){return an(this)}partial(r){const i={};return H.objectKeys(this.shape).forEach(s=>{const a=this.shape[s];r&&!r[s]?i[s]=a:i[s]=a.optional()}),new Ke(Y(b({},this._def),{shape:()=>i}))}required(r){const i={};return H.objectKeys(this.shape).forEach(s=>{if(r&&!r[s])i[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof Dn;)a=a._def.innerType;i[s]=a}}),new Ke(Y(b({},this._def),{shape:()=>i}))}keyof(){return So(H.objectKeys(this.shape))}}c(Ke,"ZodObject"),Ke.create=(t,r)=>new Ke(b({shape:()=>t,unknownKeys:"strip",catchall:Re.create(),typeName:pe.ZodObject},Ee(r))),Ke.strictCreate=(t,r)=>new Ke(b({shape:()=>t,unknownKeys:"strict",catchall:Re.create(),typeName:pe.ZodObject},Ee(r))),Ke.lazycreate=(t,r)=>new Ke(b({shape:t,unknownKeys:"strip",catchall:Re.create(),typeName:pe.ZodObject},Ee(r)));class Qt extends w{_parse(r){const{ctx:i}=this._processInputParams(r),s=this._def.options;function a(d){for(const h of d)if(h.result.status==="valid")return h.result;for(const h of d)if(h.result.status==="dirty")return i.common.issues.push(...h.ctx.common.issues),h.result;const p=d.map(h=>new $t(h.ctx.common.issues));return X(i,{code:M.invalid_union,unionErrors:p}),Se}if(c(a,"handleResults"),i.common.async)return Promise.all(s.map(d=>Mt(this,null,function*(){const p=Y(b({},i),{common:Y(b({},i.common),{issues:[]}),parent:null});return{result:yield d._parseAsync({data:i.data,path:i.path,parent:p}),ctx:p}}))).then(a);{let d;const p=[];for(const g of s){const _=Y(b({},i),{common:Y(b({},i.common),{issues:[]}),parent:null}),le=g._parseSync({data:i.data,path:i.path,parent:_});if(le.status==="valid")return le;le.status==="dirty"&&!d&&(d={result:le,ctx:_}),_.common.issues.length&&p.push(_.common.issues)}if(d)return i.common.issues.push(...d.ctx.common.issues),d.result;const h=p.map(g=>new $t(g));return X(i,{code:M.invalid_union,unionErrors:h}),Se}}get options(){return this._def.options}}c(Qt,"ZodUnion"),Qt.create=(t,r)=>new Qt(b({options:t,typeName:pe.ZodUnion},Ee(r)));const un=c(t=>t instanceof Jn?un(t.schema):t instanceof Sn?un(t.innerType()):t instanceof ur?[t.value]:t instanceof er?t.options:t instanceof Tr?Object.keys(t.enum):t instanceof xr?un(t._def.innerType):t instanceof Ge?[void 0]:t instanceof nt?[null]:null,"getDiscriminator");class pn extends w{_parse(r){const{ctx:i}=this._processInputParams(r);if(i.parsedType!==U.object)return X(i,{code:M.invalid_type,expected:U.object,received:i.parsedType}),Se;const s=this.discriminator,a=i.data[s],d=this.optionsMap.get(a);return d?i.common.async?d._parseAsync({data:i.data,path:i.path,parent:i}):d._parseSync({data:i.data,path:i.path,parent:i}):(X(i,{code:M.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),Se)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(r,i,s){const a=new Map;for(const d of i){const p=un(d.shape[r]);if(!p)throw new Error(`A discriminator value for key \`${r}\` could not be extracted from all schema options`);for(const h of p){if(a.has(h))throw new Error(`Discriminator property ${String(r)} has duplicate value ${String(h)}`);a.set(h,d)}}return new pn(b({typeName:pe.ZodDiscriminatedUnion,discriminator:r,options:i,optionsMap:a},Ee(s)))}}c(pn,"ZodDiscriminatedUnion");function Zt(t,r){const i=ye(t),s=ye(r);if(t===r)return{valid:!0,data:t};if(i===U.object&&s===U.object){const a=H.objectKeys(r),d=H.objectKeys(t).filter(h=>a.indexOf(h)!==-1),p=b(b({},t),r);for(const h of d){const g=Zt(t[h],r[h]);if(!g.valid)return{valid:!1};p[h]=g.data}return{valid:!0,data:p}}else if(i===U.array&&s===U.array){if(t.length!==r.length)return{valid:!1};const a=[];for(let d=0;d<t.length;d++){const p=t[d],h=r[d],g=Zt(p,h);if(!g.valid)return{valid:!1};a.push(g.data)}return{valid:!0,data:a}}else return i===U.date&&s===U.date&&+t==+r?{valid:!0,data:t}:{valid:!1}}c(Zt,"mergeValues");class ut extends w{_parse(r){const{status:i,ctx:s}=this._processInputParams(r),a=c((d,p)=>{if(Di(d)||Di(p))return Se;const h=Zt(d.value,p.value);return h.valid?((hi(d)||hi(p))&&i.dirty(),{status:i.value,value:h.data}):(X(s,{code:M.invalid_intersection_types}),Se)},"handleParsed");return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([d,p])=>a(d,p)):a(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}c(ut,"ZodIntersection"),ut.create=(t,r,i)=>new ut(b({left:t,right:r,typeName:pe.ZodIntersection},Ee(i)));class ct extends w{_parse(r){const{status:i,ctx:s}=this._processInputParams(r);if(s.parsedType!==U.array)return X(s,{code:M.invalid_type,expected:U.array,received:s.parsedType}),Se;if(s.data.length<this._def.items.length)return X(s,{code:M.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Se;!this._def.rest&&s.data.length>this._def.items.length&&(X(s,{code:M.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i.dirty());const a=[...s.data].map((d,p)=>{const h=this._def.items[p]||this._def.rest;return h?h._parse(new ln(s,d,s.path,p)):null}).filter(d=>!!d);return s.common.async?Promise.all(a).then(d=>Ut.mergeArray(i,d)):Ut.mergeArray(i,a)}get items(){return this._def.items}rest(r){return new ct(Y(b({},this._def),{rest:r}))}}c(ct,"ZodTuple"),ct.create=(t,r)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ct(b({items:t,typeName:pe.ZodTuple,rest:null},Ee(r)))};class Nt extends w{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(r){const{status:i,ctx:s}=this._processInputParams(r);if(s.parsedType!==U.object)return X(s,{code:M.invalid_type,expected:U.object,received:s.parsedType}),Se;const a=[],d=this._def.keyType,p=this._def.valueType;for(const h in s.data)a.push({key:d._parse(new ln(s,h,s.path,h)),value:p._parse(new ln(s,s.data[h],s.path,h))});return s.common.async?Ut.mergeObjectAsync(i,a):Ut.mergeObjectSync(i,a)}get element(){return this._def.valueType}static create(r,i,s){return i instanceof w?new Nt(b({keyType:r,valueType:i,typeName:pe.ZodRecord},Ee(s))):new Nt(b({keyType:he.create(),valueType:r,typeName:pe.ZodRecord},Ee(i)))}}c(Nt,"ZodRecord");class Bt extends w{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(r){const{status:i,ctx:s}=this._processInputParams(r);if(s.parsedType!==U.map)return X(s,{code:M.invalid_type,expected:U.map,received:s.parsedType}),Se;const a=this._def.keyType,d=this._def.valueType,p=[...s.data.entries()].map(([h,g],_)=>({key:a._parse(new ln(s,h,s.path,[_,"key"])),value:d._parse(new ln(s,g,s.path,[_,"value"]))}));if(s.common.async){const h=new Map;return Promise.resolve().then(()=>Mt(this,null,function*(){for(const g of p){const _=yield g.key,le=yield g.value;if(_.status==="aborted"||le.status==="aborted")return Se;(_.status==="dirty"||le.status==="dirty")&&i.dirty(),h.set(_.value,le.value)}return{status:i.value,value:h}}))}else{const h=new Map;for(const g of p){const _=g.key,le=g.value;if(_.status==="aborted"||le.status==="aborted")return Se;(_.status==="dirty"||le.status==="dirty")&&i.dirty(),h.set(_.value,le.value)}return{status:i.value,value:h}}}}c(Bt,"ZodMap"),Bt.create=(t,r,i)=>new Bt(b({valueType:r,keyType:t,typeName:pe.ZodMap},Ee(i)));class hn extends w{_parse(r){const{status:i,ctx:s}=this._processInputParams(r);if(s.parsedType!==U.set)return X(s,{code:M.invalid_type,expected:U.set,received:s.parsedType}),Se;const a=this._def;a.minSize!==null&&s.data.size<a.minSize.value&&(X(s,{code:M.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),i.dirty()),a.maxSize!==null&&s.data.size>a.maxSize.value&&(X(s,{code:M.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),i.dirty());const d=this._def.valueType;function p(g){const _=new Set;for(const le of g){if(le.status==="aborted")return Se;le.status==="dirty"&&i.dirty(),_.add(le.value)}return{status:i.value,value:_}}c(p,"finalizeSet");const h=[...s.data.values()].map((g,_)=>d._parse(new ln(s,g,s.path,_)));return s.common.async?Promise.all(h).then(g=>p(g)):p(h)}min(r,i){return new hn(Y(b({},this._def),{minSize:{value:r,message:ce.toString(i)}}))}max(r,i){return new hn(Y(b({},this._def),{maxSize:{value:r,message:ce.toString(i)}}))}size(r,i){return this.min(r,i).max(r,i)}nonempty(r){return this.min(1,r)}}c(hn,"ZodSet"),hn.create=(t,r)=>new hn(b({valueType:t,minSize:null,maxSize:null,typeName:pe.ZodSet},Ee(r)));class Dt extends w{constructor(){super(...arguments),this.validate=this.implement}_parse(r){const{ctx:i}=this._processInputParams(r);if(i.parsedType!==U.function)return X(i,{code:M.invalid_type,expected:U.function,received:i.parsedType}),Se;function s(h,g){return pi({data:h,path:i.path,errorMaps:[i.common.contextualErrorMap,i.schemaErrorMap,Cn(),Un].filter(_=>!!_),issueData:{code:M.invalid_arguments,argumentsError:g}})}c(s,"makeArgsIssue");function a(h,g){return pi({data:h,path:i.path,errorMaps:[i.common.contextualErrorMap,i.schemaErrorMap,Cn(),Un].filter(_=>!!_),issueData:{code:M.invalid_return_type,returnTypeError:g}})}c(a,"makeReturnsIssue");const d={errorMap:i.common.contextualErrorMap},p=i.data;if(this._def.returns instanceof _n){const h=this;return tn(function(...g){return Mt(this,null,function*(){const _=new $t([]),le=yield h._def.args.parseAsync(g,d).catch(xn=>{throw _.addIssue(s(g,xn)),_}),je=yield Reflect.apply(p,this,le);return yield h._def.returns._def.type.parseAsync(je,d).catch(xn=>{throw _.addIssue(a(je,xn)),_})})})}else{const h=this;return tn(function(...g){const _=h._def.args.safeParse(g,d);if(!_.success)throw new $t([s(g,_.error)]);const le=Reflect.apply(p,this,_.data),je=h._def.returns.safeParse(le,d);if(!je.success)throw new $t([a(le,je.error)]);return je.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...r){return new Dt(Y(b({},this._def),{args:ct.create(r).rest(qe.create())}))}returns(r){return new Dt(Y(b({},this._def),{returns:r}))}implement(r){return this.parse(r)}strictImplement(r){return this.parse(r)}static create(r,i,s){return new Dt(b({args:r||ct.create([]).rest(qe.create()),returns:i||qe.create(),typeName:pe.ZodFunction},Ee(s)))}}c(Dt,"ZodFunction");class Jn extends w{get schema(){return this._def.getter()}_parse(r){const{ctx:i}=this._processInputParams(r);return this._def.getter()._parse({data:i.data,path:i.path,parent:i})}}c(Jn,"ZodLazy"),Jn.create=(t,r)=>new Jn(b({getter:t,typeName:pe.ZodLazy},Ee(r)));class ur extends w{_parse(r){if(r.data!==this._def.value){const i=this._getOrReturnCtx(r);return X(i,{received:i.data,code:M.invalid_literal,expected:this._def.value}),Se}return{status:"valid",value:r.data}}get value(){return this._def.value}}c(ur,"ZodLiteral"),ur.create=(t,r)=>new ur(b({value:t,typeName:pe.ZodLiteral},Ee(r)));function So(t,r){return new er(b({values:t,typeName:pe.ZodEnum},Ee(r)))}c(So,"createZodEnum");class er extends w{_parse(r){if(typeof r.data!="string"){const i=this._getOrReturnCtx(r),s=this._def.values;return X(i,{expected:H.joinValues(s),received:i.parsedType,code:M.invalid_type}),Se}if(this._def.values.indexOf(r.data)===-1){const i=this._getOrReturnCtx(r),s=this._def.values;return X(i,{received:i.data,code:M.invalid_enum_value,options:s}),Se}return tn(r.data)}get options(){return this._def.values}get enum(){const r={};for(const i of this._def.values)r[i]=i;return r}get Values(){const r={};for(const i of this._def.values)r[i]=i;return r}get Enum(){const r={};for(const i of this._def.values)r[i]=i;return r}extract(r){return er.create(r)}exclude(r){return er.create(this.options.filter(i=>!r.includes(i)))}}c(er,"ZodEnum"),er.create=So;class Tr extends w{_parse(r){const i=H.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(r);if(s.parsedType!==U.string&&s.parsedType!==U.number){const a=H.objectValues(i);return X(s,{expected:H.joinValues(a),received:s.parsedType,code:M.invalid_type}),Se}if(i.indexOf(r.data)===-1){const a=H.objectValues(i);return X(s,{received:s.data,code:M.invalid_enum_value,options:a}),Se}return tn(r.data)}get enum(){return this._def.values}}c(Tr,"ZodNativeEnum"),Tr.create=(t,r)=>new Tr(b({values:t,typeName:pe.ZodNativeEnum},Ee(r)));class _n extends w{unwrap(){return this._def.type}_parse(r){const{ctx:i}=this._processInputParams(r);if(i.parsedType!==U.promise&&i.common.async===!1)return X(i,{code:M.invalid_type,expected:U.promise,received:i.parsedType}),Se;const s=i.parsedType===U.promise?i.data:Promise.resolve(i.data);return tn(s.then(a=>this._def.type.parseAsync(a,{path:i.path,errorMap:i.common.contextualErrorMap})))}}c(_n,"ZodPromise"),_n.create=(t,r)=>new _n(b({type:t,typeName:pe.ZodPromise},Ee(r)));class Sn extends w{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===pe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(r){const{status:i,ctx:s}=this._processInputParams(r),a=this._def.effect||null,d={addIssue:p=>{X(s,p),p.fatal?i.abort():i.dirty()},get path(){return s.path}};if(d.addIssue=d.addIssue.bind(d),a.type==="preprocess"){const p=a.transform(s.data,d);return s.common.issues.length?{status:"dirty",value:s.data}:s.common.async?Promise.resolve(p).then(h=>this._def.schema._parseAsync({data:h,path:s.path,parent:s})):this._def.schema._parseSync({data:p,path:s.path,parent:s})}if(a.type==="refinement"){const p=c(h=>{const g=a.refinement(h,d);if(s.common.async)return Promise.resolve(g);if(g instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return h},"executeRefinement");if(s.common.async===!1){const h=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return h.status==="aborted"?Se:(h.status==="dirty"&&i.dirty(),p(h.value),{status:i.value,value:h.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(h=>h.status==="aborted"?Se:(h.status==="dirty"&&i.dirty(),p(h.value).then(()=>({status:i.value,value:h.value}))))}if(a.type==="transform")if(s.common.async===!1){const p=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!jr(p))return p;const h=a.transform(p.value,d);if(h instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:i.value,value:h}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(p=>jr(p)?Promise.resolve(a.transform(p.value,d)).then(h=>({status:i.value,value:h})):p);H.assertNever(a)}}c(Sn,"ZodEffects"),Sn.create=(t,r,i)=>new Sn(b({schema:t,typeName:pe.ZodEffects,effect:r},Ee(i))),Sn.createWithPreprocess=(t,r,i)=>new Sn(b({schema:r,effect:{type:"preprocess",transform:t},typeName:pe.ZodEffects},Ee(i)));class Dn extends w{_parse(r){return this._getType(r)===U.undefined?tn(void 0):this._def.innerType._parse(r)}unwrap(){return this._def.innerType}}c(Dn,"ZodOptional"),Dn.create=(t,r)=>new Dn(b({innerType:t,typeName:pe.ZodOptional},Ee(r)));class cr extends w{_parse(r){return this._getType(r)===U.null?tn(null):this._def.innerType._parse(r)}unwrap(){return this._def.innerType}}c(cr,"ZodNullable"),cr.create=(t,r)=>new cr(b({innerType:t,typeName:pe.ZodNullable},Ee(r)));class xr extends w{_parse(r){const{ctx:i}=this._processInputParams(r);let s=i.data;return i.parsedType===U.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:i.path,parent:i})}removeDefault(){return this._def.innerType}}c(xr,"ZodDefault"),xr.create=(t,r)=>new xr(b({innerType:t,typeName:pe.ZodDefault,defaultValue:typeof r.default=="function"?r.default:()=>r.default},Ee(r)));class dr extends w{_parse(r){const{ctx:i}=this._processInputParams(r),s=Y(b({},i),{common:Y(b({},i.common),{issues:[]})}),a=this._def.innerType._parse({data:s.data,path:s.path,parent:b({},s)});return Zn(a)?a.then(d=>({status:"valid",value:d.status==="valid"?d.value:this._def.catchValue({get error(){return new $t(s.common.issues)},input:s.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new $t(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}c(dr,"ZodCatch"),dr.create=(t,r)=>new dr(b({innerType:t,typeName:pe.ZodCatch,catchValue:typeof r.catch=="function"?r.catch:()=>r.catch},Ee(r)));class Cr extends w{_parse(r){if(this._getType(r)!==U.nan){const i=this._getOrReturnCtx(r);return X(i,{code:M.invalid_type,expected:U.nan,received:i.parsedType}),Se}return{status:"valid",value:r.data}}}c(Cr,"ZodNaN"),Cr.create=t=>new Cr(b({typeName:pe.ZodNaN},Ee(t)));const mi=Symbol("zod_brand");class Mr extends w{_parse(r){const{ctx:i}=this._processInputParams(r),s=i.data;return this._def.type._parse({data:s,path:i.path,parent:i})}unwrap(){return this._def.type}}c(Mr,"ZodBranded");class fr extends w{_parse(r){const{status:i,ctx:s}=this._processInputParams(r);if(s.common.async)return c(()=>Mt(this,null,function*(){const a=yield this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?Se:a.status==="dirty"?(i.dirty(),Ni(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})}),"handleAsync")();{const a=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?Se:a.status==="dirty"?(i.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:s.path,parent:s})}}static create(r,i){return new fr({in:r,out:i,typeName:pe.ZodPipeline})}}c(fr,"ZodPipeline");class ze extends w{_parse(r){const i=this._def.innerType._parse(r);return jr(i)&&(i.value=Object.freeze(i.value)),i}}c(ze,"ZodReadonly"),ze.create=(t,r)=>new ze(b({innerType:t,typeName:pe.ZodReadonly},Ee(r)));const An=c((t,r={},i)=>t?Qe.create().superRefine((s,a)=>{var d,p;if(!t(s)){const h=typeof r=="function"?r(s):typeof r=="string"?{message:r}:r,g=(p=(d=h.fatal)!==null&&d!==void 0?d:i)!==null&&p!==void 0?p:!0,_=typeof h=="string"?{message:h}:h;a.addIssue(Y(b({code:"custom"},_),{fatal:g}))}}):Qe.create(),"custom"),Br={object:Ke.lazycreate};var pe;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(pe||(pe={}));const zr=c((t,r={message:`Input not instance of ${t.name}`})=>An(i=>i instanceof t,r),"instanceOfType"),Ai=he.create,Fi=Me.create,Eo=Cr.create,Ya=$e.create,ds=wt.create,Xa=Pe.create,To=Be.create,Fc=Ge.create,Lc=nt.create,fs=Qe.create,qa=qe.create,jc=Re.create,xo=xt.create,Ja=Je.create,ps=Ke.create,Li=Ke.strictCreate,xl=Qt.create,eu=pn.create,hs=ut.create,tu=ct.create,nu=Nt.create,ru=Bt.create,iu=hn.create,ou=Dt.create,Cl=Jn.create,Mc=ur.create,Pl=er.create,Bc=Tr.create,_t=_n.create,gi=Sn.create,zc=Dn.create,Uc=cr.create,Co=Sn.createWithPreprocess,su=fr.create;var x=Object.freeze({__proto__:null,defaultErrorMap:Un,setErrorMap:Sr,getErrorMap:Cn,makeIssue:pi,EMPTY_PATH:Tl,addIssueToContext:X,ParseStatus:Ut,INVALID:Se,DIRTY:Ni,OK:tn,isAborted:Di,isDirty:hi,isValid:jr,isAsync:Zn,get util(){return H},get objectUtil(){return ne},ZodParsedType:U,getParsedType:ye,ZodType:w,ZodString:he,ZodNumber:Me,ZodBigInt:$e,ZodBoolean:wt,ZodDate:Pe,ZodSymbol:Be,ZodUndefined:Ge,ZodNull:nt,ZodAny:Qe,ZodUnknown:qe,ZodNever:Re,ZodVoid:xt,ZodArray:Je,ZodObject:Ke,ZodUnion:Qt,ZodDiscriminatedUnion:pn,ZodIntersection:ut,ZodTuple:ct,ZodRecord:Nt,ZodMap:Bt,ZodSet:hn,ZodFunction:Dt,ZodLazy:Jn,ZodLiteral:ur,ZodEnum:er,ZodNativeEnum:Tr,ZodPromise:_n,ZodEffects:Sn,ZodTransformer:Sn,ZodOptional:Dn,ZodNullable:cr,ZodDefault:xr,ZodCatch:dr,ZodNaN:Cr,BRAND:mi,ZodBranded:Mr,ZodPipeline:fr,ZodReadonly:ze,custom:An,Schema:w,ZodSchema:w,late:Br,get ZodFirstPartyTypeKind(){return pe},coerce:{string:t=>he.create(Y(b({},t),{coerce:!0})),number:t=>Me.create(Y(b({},t),{coerce:!0})),boolean:t=>wt.create(Y(b({},t),{coerce:!0})),bigint:t=>$e.create(Y(b({},t),{coerce:!0})),date:t=>Pe.create(Y(b({},t),{coerce:!0}))},any:fs,array:Ja,bigint:Ya,boolean:ds,date:Xa,discriminatedUnion:eu,effect:gi,enum:Pl,function:ou,instanceof:zr,intersection:hs,lazy:Cl,literal:Mc,map:ru,nan:Eo,nativeEnum:Bc,never:jc,null:Lc,nullable:Uc,number:Fi,object:ps,oboolean:c(()=>ds().optional(),"oboolean"),onumber:c(()=>Fi().optional(),"onumber"),optional:zc,ostring:c(()=>Ai().optional(),"ostring"),pipeline:su,preprocess:Co,promise:_t,record:nu,set:iu,strictObject:Li,string:Ai,symbol:To,transformer:gi,tuple:tu,undefined:Fc,union:xl,unknown:qa,void:xo,NEVER:Se,ZodIssueCode:M,quotelessJson:sn,ZodError:$t});function Ur(t,r){return(i,s)=>t(i,s,r)}c(Ur,"makeNamespacedCall");var Rl=Object.defineProperty,ms=c((t,r,i)=>r in t?Rl(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"base_defNormalProp"),Pr=c((t,r,i)=>(ms(t,typeof r!="symbol"?r+"":r,i),i),"__publicField");class Wt{constructor(r,i){Pr(this,"_call"),Pr(this,"call"),this._call=r,this.call=Ur(this._call,i)}}c(Wt,"NamespaceBase");function Kt(t){return typeof t=="string"?t:t instanceof Wn?t._id:t}c(Kt,"getRemId");const lu=c(t=>t.map(Kt),"getRemIds");var Zc=Object.defineProperty,au=Object.getOwnPropertySymbols,gs=Object.prototype.hasOwnProperty,Wc=Object.prototype.propertyIsEnumerable,kl=c((t,r,i)=>r in t?Zc(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"rem_defNormalProp"),Il=c((t,r)=>{for(var i in r||(r={}))gs.call(r,i)&&kl(t,i,r[i]);if(au)for(var i of au(r))Wc.call(r,i)&&kl(t,i,r[i]);return t},"rem_spreadValues"),O=c((t,r,i)=>(kl(t,typeof r!="symbol"?r+"":r,i),i),"rem_publicField"),D=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"__async");class Wn{constructor(r,i){O(this,"_id"),O(this,"createdAt"),O(this,"localUpdatedAt"),O(this,"updatedAt"),O(this,"parent"),O(this,"children"),O(this,"type"),O(this,"text"),O(this,"backText"),O(this,"_callMethod"),O(this,"call",(s,a)=>D(this,null,function*(){return yield this._callMethod(s,Il({remId:this._id},a),Mi)})),O(this,"callAndReturnRem",(s,a)=>D(this,null,function*(){const d=yield this.call(s,a);if(d)return new Wn(d,this._callMethod.bind(this))})),O(this,"callAndReturnManyRem",(s,a)=>D(this,null,function*(){const d=yield this.call(s,a);return d?d.map(p=>new Wn(p,this._callMethod.bind(this))):[]})),O(this,"setTableFilter",s=>D(this,null,function*(){return yield this.call("setTableFilter",{filter:s})})),O(this,"isTable",()=>D(this,null,function*(){return yield this.call("isTable",{})})),O(this,"allRemInFolderQueue",()=>D(this,null,function*(){return((yield this.call("allRemInFolderQueue",{}))||[]).map(s=>new Wn(s,this._callMethod.bind(this)))})),O(this,"positionAmongstSiblings",s=>D(this,null,function*(){return this.call("positionAmongstSiblings",{portalId:s})})),O(this,"positionAmongstVisibleSiblings",s=>D(this,null,function*(){return this.call("positionAmongstVisibleSiblings",{portalId:s})})),O(this,"hasPowerup",s=>D(this,null,function*(){return yield this.call("hasPowerup",{powerupCode:s})})),O(this,"getHiddenExplicitlyIncludedState",s=>D(this,null,function*(){return yield this.call("getHiddenExplicitlyIncludedState",{portalId:s})})),O(this,"setHiddenExplicitlyIncludedState",(s,a)=>D(this,null,function*(){return yield this.call("setHiddenExplicitlyIncludedState",{hiddenExplicitlyIncludedState:s,portalId:a})})),O(this,"getLastPracticed",()=>D(this,null,function*(){return yield this.call("getLastPracticed",{})})),O(this,"addPowerup",s=>D(this,null,function*(){return yield this.call("addPowerup",{powerupCode:s})})),O(this,"getLastTimeMovedTo",()=>D(this,null,function*(){return yield this.call("getLastTimeMovedTo",{})})),O(this,"getSchemaVersion",()=>D(this,null,function*(){return yield this.call("getSchemaVersion",{})})),O(this,"embeddedQueueViewMode",()=>D(this,null,function*(){return yield this.call("embeddedQueueViewMode",{})})),O(this,"isCollapsed",s=>D(this,null,function*(){return yield this.call("isCollapsed",{portalId:s})})),O(this,"setIsCollapsed",(s,a)=>D(this,null,function*(){return yield this.call("setIsCollapsed",{isCollapsed:s,portalId:a})})),O(this,"timesSelectedInSearch",()=>D(this,null,function*(){return yield this.call("timesSelectedInSearch",{})})),O(this,"getPortalType",()=>D(this,null,function*(){return yield this.call("getPortalType",{})})),O(this,"getPortalDirectlyIncludedRem",()=>D(this,null,function*(){return yield this.call("getPortalDirectlyIncludedRem",{})})),O(this,"getType",()=>D(this,null,function*(){return yield this.call("getType",{})})),O(this,"setPowerupProperty",(s,a,d)=>D(this,null,function*(){const p=Object.values(kr).includes(s)?Ui[s][a]:a;return yield this.call("setPowerupProperty",{powerupCode:s,powerupSlot:p,value:d})})),O(this,"getPowerupProperty",(s,a)=>D(this,null,function*(){const d=Object.values(kr).includes(s)?Ui[s][a]:a;return yield this.call("getPowerupProperty",{powerupCode:s,powerupSlot:d})})),O(this,"getPowerupPropertyAsRem",(s,a)=>D(this,null,function*(){const d=Object.values(kr).includes(s)?Ui[s][a]:a;return yield this.callAndReturnRem("getPowerupPropertyAsRem",{powerupCode:s,powerupSlot:d})})),O(this,"getTagPropertyAsRem",s=>D(this,null,function*(){return yield this.callAndReturnRem("getTagPropertyAsRem",{propertyId:s})})),O(this,"getPowerupPropertyAsRichText",(s,a)=>D(this,null,function*(){const d=Object.values(kr).includes(s)?Ui[s][a]:a;return yield this.call("getPowerupPropertyAsRichText",{powerupCode:s,powerupSlot:d})})),O(this,"setText",s=>D(this,null,function*(){return yield this.call("setText",{text:s})})),O(this,"setBackText",s=>D(this,null,function*(){return yield this.call("setBackText",{backText:s})})),O(this,"getTagPropertyValue",s=>D(this,null,function*(){return yield this.call("getTagPropertyValue",{propertyId:s})})),O(this,"getPropertyType",()=>D(this,null,function*(){return yield this.call("getPropertyType",{})})),O(this,"setTagPropertyValue",(s,a)=>D(this,null,function*(){return yield this.call("setTagPropertyValue",{propertyId:s,value:a})})),O(this,"removeTag",(s,a=!1)=>D(this,null,function*(){return yield this.call(a?"removeTagAndSlots":"removeTag",{tagId:s})})),O(this,"removePowerup",s=>D(this,null,function*(){return yield this.call("removePowerup",{powerupCode:s})})),O(this,"addTag",s=>D(this,null,function*(){const a=Kt(s);return yield this.call("addTag",{tagId:a})})),O(this,"remove",()=>D(this,null,function*(){return yield this.call("remove",{})})),O(this,"getTagRems",()=>D(this,null,function*(){return this.callAndReturnManyRem("getTagRems",{})})),O(this,"addToPortal",s=>D(this,null,function*(){const a=Kt(s);return yield this.call("addToPortal",{portalId:a})})),O(this,"removeFromPortal",s=>D(this,null,function*(){const a=Kt(s);return yield this.call("removeFromPortal",{portalId:a})})),O(this,"setParent",(s,a)=>D(this,null,function*(){const d=Kt(s);return yield this.call("setParent",{parentId:d,positionAmongstSiblings:a})})),O(this,"getOrCreateAliasWithText",s=>D(this,null,function*(){return yield this.callAndReturnRem("getOrCreateAliasWithText",{aliasText:s})})),O(this,"getChildrenRem",()=>D(this,null,function*(){return yield this.callAndReturnManyRem("getChildrenRem")})),O(this,"allRemInDocumentOrPortal",()=>D(this,null,function*(){return yield this.callAndReturnManyRem("allRemInDocumentOrPortal")})),O(this,"expand",(s,a)=>D(this,null,function*(){const d=Kt(s);return yield this.call("expand",{portalId:d,recurse:a})})),O(this,"collapse",s=>D(this,null,function*(){const a=Kt(s);return yield this.call("collapse",{portalId:a})})),O(this,"siblingRem",()=>D(this,null,function*(){return yield this.callAndReturnManyRem("siblingRem")})),O(this,"visibleSiblingRem",s=>D(this,null,function*(){return yield this.callAndReturnManyRem("visibleSiblingRem",{portalId:s})})),O(this,"taggedRem",()=>D(this,null,function*(){return yield this.callAndReturnManyRem("taggedRem")})),O(this,"ancestorTagRem",()=>D(this,null,function*(){return yield this.callAndReturnManyRem("ancestorTagRem")})),O(this,"descendantTagRem",()=>D(this,null,function*(){return yield this.callAndReturnManyRem("descendantTagRem")})),O(this,"getDescendants",()=>D(this,null,function*(){return yield this.callAndReturnManyRem("getDescendants")})),O(this,"getCards",()=>D(this,null,function*(){const s=yield this.call("getCards");return s?.map(a=>new pr(a,this._callMethod))||[]})),O(this,"getAliases",()=>D(this,null,function*(){return yield this.callAndReturnManyRem("getAliases")})),O(this,"getParentRem",()=>D(this,null,function*(){return yield this.callAndReturnRem("getParentRem")})),O(this,"portalsAndDocumentsIn",()=>D(this,null,function*(){return yield this.callAndReturnManyRem("portalsAndDocumentsIn")})),O(this,"merge",s=>D(this,null,function*(){return yield this.call("merge",{remIdToMergeIntoThisOne:s})})),O(this,"mergeAndSetAlias",s=>D(this,null,function*(){const a=Kt(s);return yield this.call("mergeAndSetAlias",{remIdToMergeIntoThisOne:a})})),O(this,"indent",s=>D(this,null,function*(){const a=Kt(s);return yield this.call("indent",{portalId:a})})),O(this,"outdent",s=>D(this,null,function*(){const a=Kt(s);return yield this.call("outdent",{portalId:a})})),O(this,"setType",s=>D(this,null,function*(){return yield this.call("setType",{type:s})})),O(this,"remsReferencingThis",()=>D(this,null,function*(){return yield this.callAndReturnManyRem("remsReferencingThis")})),O(this,"remsBeingReferenced",()=>D(this,null,function*(){return yield this.callAndReturnManyRem("remsBeingReferenced")})),O(this,"deepRemsBeingReferenced",()=>D(this,null,function*(){return yield this.callAndReturnManyRem("deepRemsBeingReferenced")})),O(this,"getSources",()=>D(this,null,function*(){return yield this.callAndReturnManyRem("getSources")})),O(this,"addSource",s=>D(this,null,function*(){const a=Kt(s);return yield this.call("addSource",{sourceId:a})})),O(this,"removeSource",s=>D(this,null,function*(){const a=Kt(s);return yield this.call("removeSource",{sourceId:a})})),O(this,"isDocument",()=>D(this,null,function*(){return yield this.call("isDocument")})),O(this,"setIsDocument",s=>D(this,null,function*(){return yield this.call("setIsDocument",{isDocument:s})})),O(this,"isListItem",()=>D(this,null,function*(){return yield this.call("isListItem")})),O(this,"setIsListItem",s=>D(this,null,function*(){return yield this.call("setIsListItem",{isListItem:s})})),O(this,"isCardItem",()=>D(this,null,function*(){return yield this.call("isMultilineCard")})),O(this,"setIsCardItem",s=>D(this,null,function*(){return yield this.call("setIsMultilineCard",{isCardItem:s})})),O(this,"isQuote",()=>D(this,null,function*(){return yield this.call("isQuote")})),O(this,"setIsQuote",s=>D(this,null,function*(){yield this.call("setIsQuote",{isQuote:s})})),O(this,"isCode",()=>D(this,null,function*(){return yield this.call("isCode")})),O(this,"setIsCode",s=>D(this,null,function*(){yield this.call("setIsCode",{isCode:s})})),O(this,"isTodo",()=>D(this,null,function*(){return yield this.call("isTodo")})),O(this,"setIsTodo",s=>D(this,null,function*(){yield this.call("setIsTodo",{isTodo:s})})),O(this,"getTodoStatus",()=>D(this,null,function*(){return yield this.call("getTodoStatus")})),O(this,"setTodoStatus",s=>D(this,null,function*(){return yield this.call("setTodoStatus",{todoStatus:s})})),O(this,"getFontSize",()=>D(this,null,function*(){return yield this.call("getFontSize")})),O(this,"setFontSize",s=>D(this,null,function*(){return yield this.call("setFontSize",{fontSize:s})})),O(this,"getHighlightColor",()=>D(this,null,function*(){return yield this.call("getHighlightColor")})),O(this,"setHighlightColor",s=>D(this,null,function*(){return yield this.call("setHighlightColor",{highlightColor:s})})),O(this,"isPowerup",()=>D(this,null,function*(){return yield this.call("isPowerup")})),O(this,"isPowerupEnum",()=>D(this,null,function*(){return yield this.call("isPowerupEnum")})),O(this,"isPowerupPropertyListItem",()=>D(this,null,function*(){return yield this.call("isPowerupPropertyListItem")})),O(this,"isPowerupSlot",()=>D(this,null,function*(){return yield this.call("isPowerupSlot")})),O(this,"isPowerupProperty",()=>D(this,null,function*(){return yield this.call("isPowerupProperty")})),O(this,"isSlot",()=>D(this,null,function*(){return yield this.call("isSlot")})),O(this,"setIsSlot",s=>D(this,null,function*(){return yield this.call("setIsSlot",{isSlot:s})})),O(this,"isProperty",()=>D(this,null,function*(){return yield this.call("isSlot")})),O(this,"setIsProperty",s=>D(this,null,function*(){return yield this.call("setIsSlot",{isSlot:s})})),O(this,"openRemInContext",s=>D(this,null,function*(){yield this.call("openRemInContext",{portalId:s})})),O(this,"openRemAsPage",()=>D(this,null,function*(){yield this.call("openRemAsPage")})),O(this,"getEnablePractice",()=>D(this,null,function*(){return yield this.call("getEnablePractice")})),O(this,"getPracticeDirection",()=>D(this,null,function*(){return yield this.call("getPracticeDirection")})),O(this,"setEnablePractice",s=>D(this,null,function*(){return yield this.call("setEnablePractice",{enablePractice:s})})),O(this,"setPracticeDirection",s=>D(this,null,function*(){return yield this.call("setPracticeDirection",{direction:s})})),O(this,"copyPortalReferenceToClipboard",()=>D(this,null,function*(){return yield this.call("copyPortalReferenceToClipboard")})),O(this,"copyTagReferenceToClipboard",()=>D(this,null,function*(){return yield this.call("copyTagReferenceToClipboard")})),O(this,"copyReferenceToClipboard",()=>D(this,null,function*(){return yield this.call("copyReferenceToClipboard")})),O(this,"scrollToReaderHighlight",()=>D(this,null,function*(){return yield this.call("scrollToReaderHighlight")})),O(this,"isFolder",()=>D(this,null,function*(){return yield this.call("isFolder")})),O(this,"setIsFolder",s=>D(this,null,function*(){return yield this.call("setIsFolder",{isFolder:s})})),this._id=r._id,this.parent=r.parent,this.children=r.children,this.type=r.type,this.text=r.text,this.backText=r.backText,this.updatedAt=r.u,this.localUpdatedAt=r.o,this.createdAt=r.createdAt,this._callMethod=i}}c(Wn,"RemObject");class ji extends Wt{constructor(r){super(r,Mi),O(this,"findOne",i=>D(this,null,function*(){if(!i)return;const s=yield this.call("findOne",{remId:i});if(s)return new Gt(s,this.call)})),O(this,"createSingleRemWithMarkdown",(i,s)=>D(this,null,function*(){const a=yield this.call("createSingleRemWithMarkdown",{markdown:i,parentId:s});return a&&new Gt(a,this.call)})),O(this,"createTreeWithMarkdown",(i,s)=>D(this,null,function*(){return((yield this.call("createTreeWithMarkdown",{markdown:i,parentId:s}))||[]).map(a=>new Gt(a,this.call))})),O(this,"findByName",(i,s)=>D(this,null,function*(){const a=yield this.call("findByName",{name:i,parentId:s});if(a)return new Gt(a,this.call)})),O(this,"moveRems",(i,s,a,d)=>D(this,null,function*(){const p=lu(i),h=Kt(s),g=Kt(d);yield this.call("moveRems",{portalId:g,remIds:p,newParentId:h,positionAmongstSiblings:a})})),O(this,"getAll",()=>D(this,null,function*(){return((yield this.call("getAll",{}))||[]).map(i=>new Gt(i,this._call))})),O(this,"findMany",i=>D(this,null,function*(){const s=lu(i),a=yield this.call("findMany",{remIds:s});if(a)return a.map(d=>new Gt(d,this._call))})),O(this,"createPortal",()=>D(this,null,function*(){const i=yield this.call("createPortal",{});return i?new Gt(i,this._call):void 0})),O(this,"createLinkRem",(i,s=!0)=>D(this,null,function*(){const a=yield this.call("createLinkRem",{url:i,addTitle:s});if(a)return new Gt(a,this._call)})),O(this,"createTable",i=>D(this,null,function*(){const s=Kt(i),a=yield this.call("createTable",{existingTagId:s});if(a)return new Gt(a,this._call)})),O(this,"createRem",()=>D(this,null,function*(){const i=yield this.call("createRem",{});if(i)return new Gt(i,this._call)}))}}c(ji,"RemNamespace");const Gt=Wn,Mi="rem";var ys=Object.defineProperty,bl=Object.getOwnPropertySymbols,Fn=Object.prototype.hasOwnProperty,Bi=Object.prototype.propertyIsEnumerable,Po=c((t,r,i)=>r in t?ys(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"card_defNormalProp"),zi=c((t,r)=>{for(var i in r||(r={}))Fn.call(r,i)&&Po(t,i,r[i]);if(bl)for(var i of bl(r))Bi.call(r,i)&&Po(t,i,r[i]);return t},"card_spreadValues"),cn=c((t,r,i)=>(Po(t,typeof r!="symbol"?r+"":r,i),i),"card_publicField"),tr=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"card_async");const Ro="card";class yi extends Wt{constructor(r){super(r,Ro),cn(this,"findOne",i=>tr(this,null,function*(){if(!i)return;const s=yield this.call("findOne",{id:i});return s?new pr(s,this._call):void 0})),cn(this,"getAll",()=>tr(this,null,function*(){const i=yield this.call("getAll",{});return i?.map(s=>new pr(s,this._call))||[]})),cn(this,"findMany",i=>tr(this,null,function*(){const s=yield this.call("findMany",{ids:i});return s?.map(a=>new pr(a,this._call))||[]}))}}c(yi,"CardNamespace");class pr extends Wt{constructor(r,i){super(i,Ro),cn(this,"_id"),cn(this,"remId"),cn(this,"type"),cn(this,"createdAt"),cn(this,"repetitionHistory"),cn(this,"nextRepetitionTime"),cn(this,"timesWrongInRow"),cn(this,"lastRepetitionTime"),cn(this,"callCard",(a,d)=>tr(this,null,function*(){return yield this._call(a,zi({id:this._id},d),Ro)})),cn(this,"callRem",(a,d)=>tr(this,null,function*(){return yield this._call(a,zi({},d),Mi)})),cn(this,"getType",()=>tr(this,null,function*(){return yield this.callCard("getType",{id:this._id})})),cn(this,"getRem",()=>tr(this,null,function*(){return yield this.callRem("findOne",{remId:this.remId})})),cn(this,"remove",()=>tr(this,null,function*(){return yield this.callCard("remove",{})})),cn(this,"updateCardRepetitionStatus",a=>tr(this,null,function*(){return yield this.callCard("updateCardRepetitionStatus",{score:a})})),this._id=r._id,this.remId=r.remId;const s=r.cardType;this.type=s==="f"?"forward":s==="b"?"backward":{clozeId:s},this.createdAt=r.createdAt,this.repetitionHistory=r.history,this.nextRepetitionTime=r.activeNextTime,this.timesWrongInRow=r.timesWrongInRow}}c(pr,"Card");var uu=Object.defineProperty,Vc=Object.defineProperties,Hc=Object.getOwnPropertyDescriptors,cu=Object.getOwnPropertySymbols,Ol=Object.prototype.hasOwnProperty,$c=Object.prototype.propertyIsEnumerable,du=c((t,r,i)=>r in t?uu(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"interfaces_defNormalProp"),Qc=c((t,r)=>{for(var i in r||(r={}))Ol.call(r,i)&&du(t,i,r[i]);if(cu)for(var i of cu(r))$c.call(r,i)&&du(t,i,r[i]);return t},"interfaces_spreadValues"),Kc=c((t,r)=>Vc(t,Hc(r)),"__spreadProps"),vs=(t=>(t.Rem="Rem",t.Text="Text",t.PDF="PDF",t.WebReader="WebReader",t))(vs||{});const Nl={quote:"q",underline:"u",bold:"b",italic:"l"};var ws=(t=>(t[t.undefined=0]="undefined",t[t.Red=1]="Red",t[t.Orange=2]="Orange",t[t.Yellow=3]="Yellow",t[t.Green=4]="Green",t[t.Blue=6]="Blue",t[t.Purple=5]="Purple",t[t.Gray=7]="Gray",t[t.Brown=8]="Brown",t[t.Pink=9]="Pink",t))(ws||{}),Dl=(t=>(t.Read="Read",t.ReadCreate="ReadCreate",t.ReadCreateModify="ReadCreateModify",t.ReadCreateModifyDelete="ReadCreateModifyDelete",t))(Dl||{}),Rr=(t=>(t.All="All",t.DescendantsOfName="DescendantsOfName",t.DescendantsOfId="DescendantsOfId",t.Powerup="Powerup",t.FocusedSubtree="FocusedSubtree",t.KnowledgeBaseInfo="KnowledgeBaseInfo",t))(Rr||{}),fu=(t=>(t.FloatingWidget="FloatingWidget",t.PaneHeader="PaneHeader",t.Index="Index",t.TopBar="TopBar",t.QueueToolbar="QueueToolbar",t.QueueBelowTopBar="QueueBelowTopBar",t.DocumentAboveToolbar="AboveDocumentToolbar",t.DocumentBelowToolbar="DocumentBelowToolbar",t.DocumentBelowEditor="DocumentBelowEditor",t.DocumentBelowTitle="DocumentBelowTitle",t.SidebarEnd="SidebarEnd",t.RemReferencePopupStart="RemReferencePopupStart",t.RemReferencePopupRight="RemReferencePopupRight",t.Pane="Pane",t.FlashcardAnswerButtons="FlashcardAnswerButtons",t.FlashcardAnswer="FlashcardAnswer",t.Flashcard="Flashcard",t.FlashcardExtraDetail="FlashcardExtraDetail",t.FlashcardUnder="FlashcardUnder",t.RightSidebar="RightSidebar",t.LeftSidebar="LeftSidebar",t.Popup="Popup",t.UnderRemEditor="UnderRemEditor",t.RightSideOfEditor="RightSideOfEditor",t.SelectedTextMenu="SelectedTextMenu",t.PDFHighlightToolbarLocation="PDFHighlightToolbarLocation",t.PDFHighlightPopupLocation="PDFHighlightPopupLocation",t.DeckPage="DeckPage",t.LearningProgressPage="LearningProgressPage",t))(fu||{}),kr=(t=>(t.Aliases="l",t.AutoSort="a",t.AppliedTemplates="at",t.AutoTemplate="m",t.CustomCSS="c",t.DailyDocument="d",t.DisableCards="u",t.Divider="dv",t.Document="o",t.DocumentSidebar="s",t.EditLater="e",t.Emoji="j",t.ExtraCardDetail="x",t.Header="r",t.Highlight="h",t.Link="b",t.List="i",t.MultipleChoice="mc",t.MultiLineCard="w",t.PDFPageNumber="pn",t.PDFHighlight="n",t.QuickAdd="q",t.Quote="qt",t.RestoredFromTrash="rt",t.Slot="y",t.Sources="os",t.SuperPrivate="k",t.TableOfContent="toc",t.TextToSpeech="tts",t.EmbedWebsite="ew",t.UsedAsTag="g",t.Todo="t",t.UploadedFile="f",t.WebHighlight="p",t.Website="z",t.Code="cd",t.TypeInAnswer="ty",t.Deck="de",t.SearchPortal="sp",t.Collection="ct",t.HTMLHighlight="hh",t.HideQueueAncestors="ha",t.ImportedDocument="id",t.Image="im",t.SavedDocuments="sd",t.Callout="clo",t))(kr||{});const Ui={ha:{},l:{Aliases:"a"},ct:{Template:"t"},a:{SortDirection:"d"},cd:{Language:"l",DontWrap:"w",DontBoundHeight:"b"},m:{},c:{},d:{Timestamp:"s",Date:"d"},u:{},o:{Status:"s",DeprecatedSource:"o"},s:{},dv:{},e:{Message:"m"},j:{},x:{},r:{Size:"s"},h:{Color:"c"},b:{URL:"u",Title:"t",ReadPercent:"r",LastReadDate:"d",FileURL:"f"},i:{},w:{},n:{Data:"d",PdfId:"p"},hh:{Data:"d",HTMLId:"h"},pn:{},q:{},qt:{},rt:{Date:"d"},y:{SelectTag:"t",ExtraSlotsOnFrontOfCard:"f",ExtraSlotsOnBackOfCard:"b"},os:{Sources:"os"},at:{Templates:"t"},sp:{Query:"q",Filter:"f",AutomaticBacklinkSearchPortalFor:"b",DontIncludeNestedDescendants:"s"},k:{},g:{AutoActivate:"a",Pinned:"p",CollapseConfigure:"c",PrimaryColumnName:"n"},t:{Status:"s"},ew:{URL:"u",WIDTH:"w",HEIGHT:"h"},toc:{},tts:{},f:{Type:"t",URL:"u",Name:"n",Authors:"a",Keywords:"k",Title:"i",ViewerData:"v",ReadPercent:"r",LastReadDate:"d",HasNoTextLayer:"tl",Theme:"h"},p:{Data:"d",Url:"w"},z:{Hostname:"u"},clo:{BulletIcon:"b"},ty:{},de:{Topics:"t",Status:"s",MaxNewCardsPerDay:"m",MaxTotalCardsPerDay:"c",ExamSchedulerDate:"e",RetrievabilityPeriodStartDate:"r",ConsolidationPeriodStartDate:"pmd",ConsolidationPeriodReIntroSectionLength:"pml",ExamConfig:"ec",SavedExamInfo:"ei",ExamSchedulerDesiredStability:"eds",ExamSchedulerMaxNewCardsPerDay:"emnc",ExamSchedulerMaxTotalCardsPerDay:"emtc",ExamSchedulerCollection:"emcd"},id:{},sd:{},mc:{},im:{Image:"i"}};var pu=(t=>(t[t.DEFAULT_TYPE=void 0]="DEFAULT_TYPE",t[t.CONCEPT=1]="CONCEPT",t[t.DESCRIPTOR=2]="DESCRIPTOR",t))(pu||{}),Al=(t=>(t[t.DEFAULT_TYPE=void 0]="DEFAULT_TYPE",t[t.CONCEPT=1]="CONCEPT",t[t.DESCRIPTOR=2]="DESCRIPTOR",t[t.DEPRECATED_BASIC_CARD=4]="DEPRECATED_BASIC_CARD",t[t.PORTAL=6]="PORTAL",t[t.DEPRECATED_SLOT=3]="DEPRECATED_SLOT",t[t.DEPRECATED_PATTERN=5]="DEPRECATED_PATTERN",t[t.DEPRECATED_COLLECTION=7]="DEPRECATED_COLLECTION",t[t.DEPRECATED_TEXT=8]="DEPRECATED_TEXT",t))(Al||{}),Fl=(t=>(t[t.DEFAULT_TYPE=0]="DEFAULT_TYPE",t[t.CONCEPT=1]="CONCEPT",t[t.DESCRIPTOR=2]="DESCRIPTOR",t[t.PORTAL=3]="PORTAL",t))(Fl||{});function hu(t){switch(t){case 1:return 1;case 2:return 2;case 6:return 3;default:return 0}}c(hu,"remTypeToTinyGraphType");function mu(t){switch(t){case 1:return 1;case 2:return 2;case 3:return 6;default:return Al.DEFAULT_TYPE}}c(mu,"remTypeTinyGraphToNormal");var gu=(t=>(t.MultipleWindows="multipleWindows",t.MultipleWindowsPanel="multipleWindowsPanel",t.Dropdown="Dropdown",t.Breadcrumbs="Breadcrumbs",t.FloatingDiscussion="floatingDiscussion",t.WindowManager="windowManager",t.RemPage="RemPage",t.WindowPane="windowPane",t.MobileTabBar="MobileTabBar",t.Document="document",t.NotificationPanel="notificationPanel",t.EmojiPicker="EmojiPicker",t.HierarchyEditorTree="hierarchyEditorTree",t.ChangeCodeLanguage="ChangeCodeLanguage",t.HierarchyEditorTreePortal="hierarchyEditorTreePortal",t.HierarchyEditorTreeRem="hierarchyEditorTreeRem",t.RichTextEditor="richTextEditor",t.RichTextEditorItem="richTextEditorItem",t.RichTextEditorAliasPopup="richTextEditorAliasPopup",t.TableCellList="tableCellList",t.TableCellPopup="tableCellPopup",t.Table="Table",t.ColumnConfigurationMenu="columnConfigurationMenu",t.Popup="popup",t.Omnibar="omnibar",t.QuickAdd="quickAdd",t.Date="date",t.Queue="queue",t.TypeAnswerBox="typeAnswerBox",t.QueryBuilder="queryBuilder",t.PublishedKnowledgeBase="publishedKnowledgeBase",t.ArticleViewer="articleViewer",t.Article="article",t.FullPageSearch="fullPageSearch",t.ExtraDate="extraDate",t.DropToOpenAsDocument="dropToOpenAsDocument",t.TableSearch="TableSearch",t.PDF="pdf",t.PdfPageNumber="pdfPageNumber",t.NotesPopup="notesPopup",t.PDFUploader="pdfUploader",t.Reader="reader",t.RemSearchPopup="remSearchPopup",t.Debugger="debugger",t.SelectRem="selectRem",t.ExpressionSelect="ExpressionSelect",t.HiddenChildren="hiddenChildren",t.TableTitle="tableTitle",t.TableTagTitle="tableTagTitle",t.TableColumnTitle="tableColumnTitle",t.Toolbar="toolbar",t.Title="title",t.SidebarTitleEdit="sidebarTitleEdit",t.ArticleQueue="articleQueue",t.UserDocument="userDocument",t.DocumentSidebar="documentSidebar",t.RightSidebar="rightSidebar",t.Documents="documents",t.AudioVideo="audioVideo",t.ImageNode="imageNode",t.QueryNodeEditor="queryNodeEditor",t.LinkBox="linkBox",t.SelectedTextMenu="selectedTextMenu",t.RemReferenceNode="remReferenceNode",t.DeckTopicsList="deckTopics",t.DeckTopic="deckTopic",t.AddDeckTopic="addDeckTopic",t.DocSources="docSources",t.DocTags="docTags",t.AddSources="addSources",t.AddTags="addTags",t.InlineLink="inlineLink",t.ImageSelector="imageSelector",t.Latex="latex",t.Image="image",t.Cloze="cloze",t.Alias="alias",t.QueueFolderDropdownSelector="queueFolderDropdownSelector",t.CustomEditLaterMessage="customEditLaterMessage",t.DocumentParents="documentParents",t.AreaHighlight="areaHighlight",t.WindowOne="windowOne",t.WindowTwo="windowTwo",t.Replace="replace",t.Find="find",t.Tag="tag",t.TagBar="tagBar",t.Menu="menu",t.Screenshot="screenshot",t.HelpMessage="helpMessage",t.AddNode="addNode",t.EditEdge="editEdge",t.Controls="controls",t.DocumentSource="documentSource",t.Merge="merge",t.HierarchyEditorTemplateFields="hierarchyEditorTemplateFields",t.SearchExistingTable="searchExistingTable",t.FieldKey="fieldKey",t.PluginRemRichTextEditor="pluginRemRichTextEditor",t.PluginRichTextViewer="pluginRichTextViewer",t.RemHierarchyEditorTree="remHierarchyEditorTree",t.PluginQueue="pluginQueue",t.RichTextEditorFakeEmbed="richTextEditorFakeEmbed",t.DocumentHeader="documentHeader",t.EmbedWebsite="embedWebsite",t.TemplateValueEditor="TemplateValueEditor",t.TemplateValueTextEditor="TemplateValueTextEditor",t.Key="key",t.Value="value",t.CtrlF="ctrlF",t.CtrlFFind="ctrlFind",t.CtrlFReplace="ctrlReplace",t.CtrlFFilter="ctrlFilter",t.SearchResult="searchResult",t.SearchResultItem="searchResultItem",t.FocusableInput="focusableInput",t.UpvoteDownvoteFeedback="UpvoteDownvoteFeedback",t.RightSidebarHelpInput="RightSidebarHelpInput",t.LeftSidebarTutorial="LeftSidebarTutorial",t.CardTableSearchQuery="cardTableSearchQuery",t.Tab="tab",t.ExamDeckRemSearchPopup="ExamDeckRemSearchPopup",t.RightSideImagePopup="RightSideImagePopup",t.RightSideUploadedImagePopup="RightSideUploadedImagePopup",t.RemDocumentSidebar="RemDocumentSidebar",t.RemEmoji="remEmoji",t.FlashcardPreview="FlashcardPreview",t.HoverPreview="HoverPreview",t))(gu||{}),yu=(t=>(t.Text="text",t.SelectedRange="selectedRange",t))(yu||{}),Gc=(t=>(t.Global="global",t.RemFocused="rem-focused",t.RemSelected="rem-selected",t))(Gc||{}),Ll=(t=>(t[t.IMPLICIT_TEXT=void 0]="IMPLICIT_TEXT",t.NUMBER="number",t.DEPRECATED_TITLE="title",t.TEXT="text",t.CHECKBOX="checkbox",t.DATE="date",t.MULTI_SELECT="multi_select",t.SINGLE_SELECT="single_select",t.CREATED_AT="created_at",t.LAST_UPDATED="last_updated",t.IMAGE="image",t.URL="url",t.DEFINITION="definition",t))(Ll||{}),vu=(t=>(t.PropertyConfigMenu="PropertyConfigMenu",t.QueueMenu="QueueMenu",t.ReaderMenu="ReaderMenu",t.PDFHighlightPopupLocation="PDFHighlightPopupLocation",t.DocumentMenu="DocumentMenu",t))(vu||{});const jl=x.union([x.object({type:x.literal("email")}),x.object({type:x.literal("url")}),x.object({type:x.literal("regex"),arg:x.string()}),x.object({type:x.literal("startsWith"),arg:x.string()}),x.object({type:x.literal("endsWith"),arg:x.string()}),x.object({type:x.literal("min"),arg:x.number().positive()}),x.object({type:x.literal("max"),arg:x.number().positive()}),x.object({type:x.literal("length"),arg:x.number().positive()})]),ko=x.union([x.object({type:x.literal("gte"),arg:x.number()}),x.object({type:x.literal("min"),arg:x.number()}),x.object({type:x.literal("gt"),arg:x.number()}),x.object({type:x.literal("lt"),arg:x.number()}),x.object({type:x.literal("lte"),arg:x.number()}),x.object({type:x.literal("int")}),x.object({type:x.literal("multipleOf"),arg:x.number()}),x.object({type:x.literal("step"),arg:x.number()}),x.object({type:x.literal("positive")}),x.object({type:x.literal("negative")}),x.object({type:x.literal("max"),arg:x.number()})]);var wu=(t=>(t[t.TOO_EARLY=.01]="TOO_EARLY",t[t.AGAIN=0]="AGAIN",t[t.HARD=.5]="HARD",t[t.GOOD=1]="GOOD",t[t.EASY=1.5]="EASY",t[t.VIEWED_AS_LEECH=2]="VIEWED_AS_LEECH",t[t.RESET=3]="RESET",t[t.MANUAL_DATE=4]="MANUAL_DATE",t[t.MANUAL_EASE=5]="MANUAL_EASE",t))(wu||{}),Ln=(t=>(t.Queue="Queue",t.PreviewRemCards="ViewAsCard",t.LoadingSpinner="LoadingSpinner",t.RichTextEditor="RichTextEditor",t.RichText="RichTextViewer",t.RemRichTextEditor="RemRichTextEditor",t.RemViewer="RemViewer",t.RemHierarchyEditorTree="RemHierarchyEditorTree",t.PDFWebReader="PDFWebReader",t.DocumentViewer="DocumentViewer",t))(Ln||{});const _u={REM:"q",IMAGE:"i",AUDIO:"a",PLUGIN:"p",DRAWING:"r",GLOBAL_NAME:"g",DEPRECATED_CODE:"o",ANNOTATION:"n",TEXT:"m",LATEX:"x",CARD_DELIMITER:"s",FLASHCARD_ICON:"fi",DYNAMIC_ICON:"di",ADD_ICON:"ai"},hr={CLOZE:"cId",UNDERLINE:"u",SUBSCRIPT:"sub",SUPERSCRIPT:"sup",BOLD:"b",STRIKETHROUGH:"str",ITALIC:"l",INLINE_LINK:"qId",INLINE_CODE:"q",QUOTE:"qt",HIDDEN_CLOZE:"hiddenCloze",REVEALED_CLOZE:"revealedCloze",HIGHLIGHT:"h",TEXT_COLOR:"tc",DEPRECATED_LINK:"url",CODE:"code",CODE_LANGUAGE:"language",COMMENT_ID:"c",CLOZE_HINT:"cloze-hint",CARD_HINT_FRONT:"card-hint-front",CARD_HINT_BACK:"card-hint-back",MULTILINE_CARD_HINT:"multiline-card-item-hint"},nr={UNDERLINE:"u",BOLD:"b",ITALIC:"t",INLINE_CODE:"c",CLOZE:"e",HIDDEN_CLOZE:"z",LINK:"l",HIGHLIGHT:"h",DATE:"d"},Su={LATEX:"x"},Zi={[nr.UNDERLINE]:hr.UNDERLINE,[nr.BOLD]:hr.BOLD,[nr.ITALIC]:hr.ITALIC,[nr.INLINE_CODE]:hr.INLINE_CODE,[nr.CLOZE]:hr.CLOZE,[nr.HIDDEN_CLOZE]:hr.HIDDEN_CLOZE,[nr.LINK]:hr.DEPRECATED_LINK,[nr.HIGHLIGHT]:hr.HIGHLIGHT,[nr.DATE]:!0};var Eu=(t=>(t[t.PORTAL=void 0]="PORTAL",t[t.EMBEDDED_QUEUE=2]="EMBEDDED_QUEUE",t[t.SCAFFOLD=3]="SCAFFOLD",t[t.SEARCH_PORTAL=4]="SEARCH_PORTAL",t))(Eu||{}),Tu=(t=>(t[t.OFFSET=0]="OFFSET",t[t.UNIT=1]="UNIT",t[t.CHARACTER=2]="CHARACTER",t[t.WORD=3]="WORD",t[t.WORD_START=4]="WORD_START",t[t.WORD_END=5]="WORD_END",t[t.LINE=6]="LINE",t))(Tu||{}),xu=(t=>(t.SRSScheduleCard="SRSScheduleCard",t.GetNextCard="GetNextCard",t))(xu||{}),Ml=(t=>(t.RetrievabilityPeriodPreExam="pre_exam",t.MaintenancePeriod="maintenance_period",t.EnterConsolidationPeriod="enter_consolidation_period",t.ConsolidationPeriod="consolidation_period",t.NotGoodEnoughForExam="exam_not_good",t.PostponedExamStartDate="postpone_start",t.NormalRepetition="normal_repetition",t))(Ml||{});const Cu=["pre_exam","maintenance_period","enter_consolidation_period","consolidation_period","exam_not_good","postpone_start"];var vi=(t=>(t[t.Enum=void 0]="Enum",t.AnyRem="any",t.Relation="relation",t))(vi||{}),Wi=(t=>(t.Queue="Queue",t))(Wi||{}),Bl=(t=>(t.RIGHT="right",t.BELOW="label",t.ONLY_DOCUMENT="only_document",t.ONLY_IN_TABLE="only_table",t[t.INLINE=void 0]="INLINE",t))(Bl||{}),Vi=(t=>(t.NumReviews="num_reviews",t.DueDate="due_date",t.IsEnabled="is_enabled",t.IsDue="is_due",t.IsLeech="is_leech",t.CardMasteryLevel="card_mastery_level",t.CreatedAt="created_at",t))(Vi||{}),nn=(t=>(t.Text="Text",t.Reference="Reference",t.Portal="Portal",t.Tag="Tag",t.TagWithoutInheritance="TagWithoutInheritance",t.Connection="Connection",t.IsDescendantOf="IsDescendantOf",t.InDocument="InDocument",t.RemType="RemType",t.Date="Date",t.MultiSelect="Multi Select",t.LegacyMultiSelect="MultiSelect",t.SingleSelect="Single Select",t.LegacySingleSelect="SingleSelect",t.Checkbox="Checkbox",t.Number="NumberExpression",t))(nn||{}),Rt=(t=>(t.Or="or",t.And="and",t.Not="not",t.Expression="expression",t.GetSlot="get_slot",t.GetCardInfo="get_card_info",t))(Rt||{});const _s=x.object({exp:x.literal("not"),exp1:x.lazy(()=>$i)}),Ss=x.object({exp:x.union([x.literal("and"),x.literal("or")]),exps:x.lazy(()=>$i.array()),cannotRemove:x.boolean().optional()}),zl=x.object({exp:x.literal("get_slot"),slotRemId:x.string(),exps:x.lazy(()=>$i)}),Ul=x.object({exp:x.literal("get_card_info"),cardField:x.nativeEnum(Vi),exp1:x.lazy(()=>$i)}),Zl=x.object({exp:x.literal("expression"),refType:x.enum(["Reference","Portal","Tag","TagWithoutInheritance","IsDescendantOf","InDocument","Connection"]),remId:x.string(),cannotRemove:x.boolean().optional(),cannotAdd:x.boolean().optional()}),Pu=x.enum(["concept","descriptor","none"]),Ru=x.object({exp:x.literal("expression"),refType:x.literal("RemType"),remType:Pu});var Wl=(t=>(t.Checked="checked",t.Unchecked="unchecked",t))(Wl||{}),Vl=(t=>(t.Contains="contains",t.DoesNotContain="doesNotContain",t.Is="is",t.IsNot="notIs",t.StartsWith="startsWith",t.EndsWith="endsWith",t.IsEmpty="empty",t.IsNotEmpty="notEmpty",t.DefaultContains="",t))(Vl||{});const Yc=["contains","is","startsWith","endsWith",""];var Pn=(t=>(t.Is="is",t.IsNot="notIs",t.GreaterThan="greaterThan",t.LessThan="lessThan",t.GreaterThanOrEquals="greaterThanOrEquals",t.LessThanOrEquals="lessThanOrEquals",t.IsEmpty="notEmpty",t.IsNotEmpty="empty",t))(Pn||{}),Io=(t=>(t.Is="is",t.IsBefore="before",t.IsAfter="after",t.IsOnOrBefore="onOrBefore",t.IsOnOrAfter="onOrAfter",t.IsBetween="between",t.IsRelativeToToday="relativeToToday",t.IsEmpty="empty",t.IsNotEmpty="notEmpty",t))(Io||{}),Zr=(t=>(t.Today="today",t.StartOfTheWeek="startoftheweek",t.StartOfTheMonth="startofthemonth",t.StartOfTheYear="startoftheyear",t.EndOfTheWeek="endoftheweek",t.EndOfTheMonth="endofthemonth",t.EndOfTheYear="endoftheyear",t))(Zr||{});const ku={today:"Today",startoftheweek:"Start of the week",startofthemonth:"Start of the month",startoftheyear:"Start of the year",endoftheweek:"End of the week",endofthemonth:"End of the month",endoftheyear:"End of the year"};var Es=(t=>(t.Contains="contains",t.DoesNotContain="doesNotContains",t.IsEmpty="empty",t.IsNotEmpty="notEmpty",t))(Es||{}),bo=(t=>(t.Is="is",t.IsNot="notIs",t.IsEmpty="empty",t.IsNotEmpty="notEmpty",t))(bo||{});const Iu=Object.values(Io).filter(t=>t!=="relativeToToday");var Oo=(t=>(t.Past="past",t.Next="next",t.This="this",t))(Oo||{}),Hl=(t=>(t.Day="day",t.Week="week",t.Month="month",t.Year="year",t))(Hl||{});const Hi={"":"contains",contains:"contains",is:"is",notIs:"is not",doesNotContain:"does not contain",startsWith:"starts with",endsWith:"ends with",empty:"is empty",notEmpty:"is not empty"},$l={is:"is",empty:"is empty",notEmpty:"is not empty",after:"is after",before:"is before",between:"is between",onOrAfter:"is on or after",onOrBefore:"is on or before",relativeToToday:"is relative to today"},No={is:"is",notIs:"is not",notEmpty:"is empty",empty:"is not empty",greaterThan:"is greater than",lessThan:"is less than",greaterThanOrEquals:"is greater than or equals",lessThanOrEquals:"is less than or equals"},Ql={contains:"contains",doesNotContains:"does not contains",empty:"is empty",notEmpty:"is not empty"},bu={is:"is",notIs:"is not",empty:"is empty",notEmpty:"is not empty"},Kl=x.object({exp:x.literal("expression"),refType:x.literal("Text"),text:x.string(),matcherType:x.nativeEnum(Vl)}),Ts=x.object({exp:x.literal("expression"),refType:x.literal("NumberExpression"),text:x.string(),matcherType:x.nativeEnum(Pn)}),wi=x.object({exp:x.literal("expression"),refType:x.literal("Date"),date:x.string().optional(),optionalDate:x.string().optional(),dateRelativeMatcher:x.nativeEnum(Zr).optional(),optionalDateRelativeMatcher:x.nativeEnum(Zr).optional(),relativeDateModifier:x.nativeEnum(Oo).optional(),relativePeriodOffset:x.number().optional(),relativeDatePeriod:x.nativeEnum(Hl).optional(),matcherType:x.nativeEnum(Io)}),Gl=x.object({exp:x.literal("expression"),refType:x.literal("Multi Select"),matcherType:x.nativeEnum(Es),remIds:x.array(x.string()).optional()}),Yl=x.object({exp:x.literal("expression"),refType:x.literal("SingleSelect"),matcherType:x.nativeEnum(bo),remId:x.string().optional()}),Xl=x.object({exp:x.literal("expression"),refType:x.literal("Checkbox"),value:x.nativeEnum(Wl)}),St=x.object({exp:x.literal("expression"),refType:x.literal("Single Select"),matcherType:x.nativeEnum(bo),remIds:x.array(x.string()).optional()}),ql=x.lazy(()=>x.union([Zl,Kl,Ts,Ru,wi,Gl,St,Yl,Xl,wi])),$i=x.lazy(()=>x.union([_s,Ss,zl,Ul,ql])),xs=x.object({code:x.string(),name:x.string(),onlyProgrammaticModifying:x.boolean().optional(),hidden:x.boolean().optional(),enumValues:x.record(x.string()).optional(),defaultEnumValue:x.string().optional(),propertyType:x.nativeEnum(Ll).optional(),propertyLocation:x.nativeEnum(Bl).optional(),selectSourceType:x.nativeEnum(vi).optional(),dontPublishToSharedArticle:x.boolean().optional()}),Ou=x.union([x.object({slots:xs.array()}),x.object({properties:xs.array()})]);var Jl=(t=>(t[t.ForwardCard=1]="ForwardCard",t[t.BackwardCard=2]="BackwardCard",t[t.EditInQueue=3]="EditInQueue",t[t.QueueNoticeCard=4]="QueueNoticeCard",t[t.ClozeCard=5]="ClozeCard",t[t.DocumentCard=6]="DocumentCard",t[t.SelectCluster=7]="SelectCluster",t[t.SubFolderSelector=8]="SubFolderSelector",t[t.DailyTargetGoalSelector=10]="DailyTargetGoalSelector",t[t.StreakGoalSelector=11]="StreakGoalSelector",t[t.AddExtraNewOrStaleCards=12]="AddExtraNewOrStaleCards",t[t.SignUpToSaveProgress=14]="SignUpToSaveProgress",t[t.Plugin=15]="Plugin",t[t.DailyCheckpoint=16]="DailyCheckpoint",t[t.Checkpoint=17]="Checkpoint",t[t.Leech=18]="Leech",t[t.StartExamPractice=19]="StartExamPractice",t[t.EndExamPractice=20]="EndExamPractice",t[t.TransitionOutOfActive=21]="TransitionOutOfActive",t[t.PracticeBuried=22]="PracticeBuried",t[t.PracticeAgainForExamTomorrowSlide=23]="PracticeAgainForExamTomorrowSlide",t[t.OfflineImageCards=24]="OfflineImageCards",t[t.PrivateCards=25]="PrivateCards",t))(Jl||{});const Qi={1:"Forward Card",2:"Backward Card",3:"Edit in Queue",4:"Queue Notice Card",5:"Cloze Card",6:"Document Card",7:"Select Cluster",8:"Subfolder Selector",10:"Daily Target Goal Selector",11:"Streak Goal Selector",12:"Add Extra New or Stale Cards",14:"Sign Up to Save Progress",15:"Plugin",16:"Daily Checkpoint",21:"Transition Out Of Active",17:"Checkpoint",18:"Leech",19:"Start Exam Practice",20:"End Exam Practice",22:"Practice Buried",23:"Practice Again for Exam Tomorrow",24:"Offline Image Cards",25:"Private Cards"},Cs=Kc(Qc({},Qi),{18:"It looks like you're struggling to learn and retain this card."});var Ki=tt(854),ea=tt.n(Ki),Ps=Object.defineProperty,Rs=Object.getOwnPropertySymbols,ta=Object.prototype.hasOwnProperty,Nu=Object.prototype.propertyIsEnumerable,na=c((t,r,i)=>r in t?Ps(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"app_defNormalProp"),Du=c((t,r)=>{var i={};for(var s in t)ta.call(t,s)&&r.indexOf(s)<0&&(i[s]=t[s]);if(t!=null&&Rs)for(var s of Rs(t))r.indexOf(s)<0&&Nu.call(t,s)&&(i[s]=t[s]);return i},"__objRest"),Yt=c((t,r,i)=>(na(t,typeof r!="symbol"?r+"":r,i),i),"app_publicField"),Xt=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"app_async");const Gi="app";class ks extends Wt{constructor(r,i){super(r,Gi),Yt(this,"plugin"),Yt(this,"waitForInitialSync",()=>Xt(this,null,function*(){yield this._call("waitForInitialSync",{})})),Yt(this,"registerPowerup",s=>Xt(this,null,function*(){yield this._call("registerPowerup",s)})),Yt(this,"registerWidget",(s,a,d)=>Xt(this,null,function*(){yield this._call("registerWidget",{fileName:s,location:a,options:d})})),Yt(this,"unregisterWidget",(s,a)=>Xt(this,null,function*(){yield this._call("unregisterWidget",{fileName:s,location:a})})),Yt(this,"registerCommand",s=>Xt(this,null,function*(){const a=s,{action:d}=a,p=Du(a,["action"]),h=s.id;this.plugin.model[h]=d,yield this._call("registerCommand",p)})),Yt(this,"registerSidebarButton",s=>Xt(this,null,function*(){const{id:a,name:d,action:p}=s;this.plugin.model[a]=p,yield this._call("registerSidebarButton",{id:a,name:d})})),Yt(this,"registerRemMenuItem",s=>Xt(this,null,function*(){const{id:a,name:d,action:p}=s;this.plugin.model[a]=p,yield this._call("registerRemMenuItem",{id:a,name:d})})),Yt(this,"registerMenuItem",s=>Xt(this,null,function*(){const{id:a,name:d,action:p,location:h}=s;this.plugin.model[a]=p,yield this._call("registerMenuItem",{id:a,name:d,location:h})})),Yt(this,"unregisterMenuItem",s=>Xt(this,null,function*(){yield this._call("unregisterMenuItem",{id:s})})),Yt(this,"stealKeys",s=>Xt(this,null,function*(){yield this._call("stealKeys",{keys:s})})),Yt(this,"releaseKeys",s=>Xt(this,null,function*(){yield this._call("releaseKeys",{keys:s})})),Yt(this,"registerCSS",(s,a)=>Xt(this,null,function*(){yield this._call("registerCSS",{id:s,css:a})})),Yt(this,"registerStatusBarItem",(s,a)=>Xt(this,null,function*(){yield this._call("registerStatusBarItem",{id:s,html:a})})),Yt(this,"getOperatingSystem",()=>Xt(this,null,function*(){return yield this._call("getOperatingSystem",{})})),Yt(this,"getPlatform",()=>Xt(this,null,function*(){return yield this._call("getPlatform",{})})),Yt(this,"registerCallback",(s,a)=>{this.plugin.model[s]=a}),Yt(this,"transaction",s=>Xt(this,null,function*(){const a=Math.random().toString();this.registerCallback(a,s);const d=yield this._call("transaction",{id:a});return delete this.plugin.model[a],d})),Yt(this,"toast",s=>Xt(this,null,function*(){yield this._call("toast",{message:s,options:{}})})),this.plugin=i}}c(ks,"AppNamespace");var ra=Object.defineProperty,Xc=c((t,r,i)=>r in t?ra(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"date_defNormalProp"),Do=c((t,r,i)=>(Xc(t,typeof r!="symbol"?r+"":r,i),i),"date_publicField"),Ir=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"date_async");const Is="date";class Wr extends Wt{constructor(r){super(r,Is),Do(this,"getDailyDoc",i=>Ir(this,null,function*(){const s=yield this.call("getDailyDoc",{date:i});if(s)return new Gt(s,this._call)})),Do(this,"getTodaysDoc",()=>Ir(this,null,function*(){const i=yield this.call("getTodaysDoc",{});if(i)return new Gt(i,this._call)}))}}c(Wr,"DateNamespace");var Au=Object.defineProperty,Vr=Object.getOwnPropertySymbols,Ao=Object.prototype.hasOwnProperty,Yi=Object.prototype.propertyIsEnumerable,Xi=c((t,r,i)=>r in t?Au(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"editor_defNormalProp"),Fu=c((t,r)=>{for(var i in r||(r={}))Ao.call(r,i)&&Xi(t,i,r[i]);if(Vr)for(var i of Vr(r))Yi.call(r,i)&&Xi(t,i,r[i]);return t},"editor_spreadValues"),At=c((t,r,i)=>(Xi(t,typeof r!="symbol"?r+"":r,i),i),"editor_publicField"),Ct=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"editor_async");const Hr="editor";class gt extends Wt{constructor(r){super(r,Hr),At(this,"setText",i=>Ct(this,null,function*(){return this.call("setText",{richText:i})})),At(this,"copy",()=>Ct(this,null,function*(){return this.call("copy",{})})),At(this,"cut",()=>Ct(this,null,function*(){return this.call("cut",{})})),At(this,"deleteCharacters",(i,s)=>Ct(this,null,function*(){return this.call("deleteCharacters",{characters:i,direction:s})})),At(this,"delete",()=>Ct(this,null,function*(){return this.call("delete",{})})),At(this,"getSelectedRem",()=>Ct(this,null,function*(){const i=yield this.getSelection();return i&&i.type===vs.Rem?i:void 0})),At(this,"getSelectedText",()=>Ct(this,null,function*(){const i=yield this.getSelection();return i&&i.type===vs.Text?i:void 0})),At(this,"getSelection",()=>Ct(this,null,function*(){return this.call("getSelection",{})})),At(this,"selectRem",(i,s)=>Ct(this,null,function*(){return this.call("setSelectedLines",{range:i,portalId:s})})),At(this,"selectText",i=>Ct(this,null,function*(){return this.call("setSelectedRichText",Fu({},i))})),At(this,"collapseSelection",i=>Ct(this,null,function*(){return this.call("collapseSelection",{to:i})})),At(this,"undo",()=>Ct(this,null,function*(){return this.call("undo",{})})),At(this,"redo",()=>Ct(this,null,function*(){return this.call("redo",{})})),At(this,"moveCaret",(i,s)=>Ct(this,null,function*(){return this.call("moveCaret",{amount:i,unit:s})})),At(this,"moveCaretVertical",i=>Ct(this,null,function*(){return this.call("moveCaretVertical",{direction:i})})),At(this,"getCaretPosition",()=>Ct(this,null,function*(){return this.call("getCaretPosition",{})})),At(this,"insertPlainText",i=>Ct(this,null,function*(){return this.call("insertPlainText",{string:i})})),At(this,"insertRichText",i=>Ct(this,null,function*(){return this.call("insertRichText",{richText:i})})),At(this,"insertMarkdown",i=>Ct(this,null,function*(){return this.call("insertMarkdown",{markdown:i})})),At(this,"getFocusedEditorText",()=>Ct(this,null,function*(){return this.call("getFocusedEditorText",{})}))}}c(gt,"EditorNamespace");var Ft=Object.defineProperty,$r=c((t,r,i)=>r in t?Ft(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"event_defNormalProp"),rn=c((t,r,i)=>($r(t,typeof r!="symbol"?r+"":r,i),i),"event_publicField");const Rn="event";class br extends Wt{constructor(r,i){super(r,Rn),rn(this,"plugin"),rn(this,"addListener",(s,a,d)=>{s in this.plugin.listeners||(this.plugin.listeners[s]=new Map),this.plugin.listeners[s].get(a)||this.plugin.listeners[s].set(a,[]),!this.plugin.listeners[s].get(a).includes(d)&&(this.plugin.listeners[s].get(a).push(d),this._call("events.addListener",{eventId:s,listenerKey:a}))}),rn(this,"removeListener",(s,a,d)=>{const p=this.plugin.listeners[s];if(!p)return;const h=p.get(a);if(h){if(d){const g=h.indexOf(d);if(g==-1)return;h.splice(g,1)}else h.splice(0,h.length);h.length===0&&(p.delete(a),this._call("events.removeListener",{eventId:s,listenerKey:a}))}}),this.plugin=i}}c(br,"EventNamespace");var qi=Object.defineProperty,kn=c((t,r,i)=>r in t?qi(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"focus_defNormalProp"),Fo=c((t,r,i)=>(kn(t,typeof r!="symbol"?r+"":r,i),i),"focus_publicField"),ia=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"focus_async");const Lu="focus";class Ji extends Wt{constructor(r){super(r,Lu),Fo(this,"getFocusedRem",()=>ia(this,null,function*(){const i=yield this.call("getFocusedRem",{});return i?new Gt(i,this._call):void 0})),Fo(this,"getFocusedPortal",()=>ia(this,null,function*(){const i=yield this.call("getFocusedPortal",{});return i?new Gt(i,this._call):void 0}))}}c(Ji,"FocusNamespace");var ju=Object.defineProperty,oa=c((t,r,i)=>r in t?ju(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"knowledge_base_defNormalProp"),mr=c((t,r,i)=>(oa(t,typeof r!="symbol"?r+"":r,i),i),"knowledge_base_publicField"),Mu=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"knowledge_base_async");const sa="kb";class Lo{constructor(r){mr(this,"_call"),mr(this,"call"),mr(this,"getCurrentKnowledgeBaseData",()=>Mu(this,null,function*(){return this.call("getCurrentKnowledgeBaseData",{})})),mr(this,"isPrimaryKnowledgeBase",()=>Mu(this,null,function*(){return this.call("isPrimaryKnowledgeBase",{})})),this._call=r,this.call=Ur(this._call,sa)}}c(Lo,"KnowledgeBaseNamespace");var qc=Object.defineProperty,Bu=c((t,r,i)=>r in t?qc(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"messaging_defNormalProp"),la=c((t,r,i)=>(Bu(t,typeof r!="symbol"?r+"":r,i),i),"messaging_publicField"),Jc=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"messaging_async");const bs="messaging";class Os extends Wt{constructor(r){super(r,bs),la(this,"broadcast",i=>Jc(this,null,function*(){return this.call("broadcast",{message:i})}))}}c(Os,"MessagingNamespace");var zu=Object.defineProperty,Uu=c((t,r,i)=>r in t?zu(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"powerup_defNormalProp"),aa=c((t,r,i)=>(Uu(t,typeof r!="symbol"?r+"":r,i),i),"powerup_publicField"),Ns=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"powerup_async");const ed="powerup";class rr extends Wt{constructor(r){super(r,ed),aa(this,"getPowerupByCode",i=>Ns(this,null,function*(){const s=yield this.call("getPowerupByCode",{powerupCode:i});if(s)return new Gt(s,this._call)})),aa(this,"getPowerupSlotByCode",(i,s)=>Ns(this,null,function*(){const a=Object.values(kr).includes(i)?Ui[i][s]:s,d=yield this.call("getPowerupSlotByCode",{powerupCode:i,powerupSlot:a});if(d)return new Gt(d,this._call)}))}}c(rr,"PowerupNamespace");class jo{static and(r){return{exp:Rt.And,exps:r}}static or(r){return{exp:Rt.Or,exps:r}}static not(r){return{exp:Rt.Not,exp1:r}}static cardInfo(r,i){return{exp:Rt.GetCardInfo,cardField:r,exp1:i}}static tableColumn(r,i){return{exp:Rt.GetSlot,slotRemId:r,exps:i}}static hasReferenceTo(r){return{exp:Rt.Expression,refType:nn.Reference,remId:r}}static text(r,i){return{exp:Rt.Expression,refType:nn.Text,text:i||"",matcherType:r}}static documentsThatContain(r){return{exp:Rt.Expression,refType:nn.Portal,remId:r}}static isTaggedWith(r){return{exp:Rt.Expression,refType:nn.Tag,remId:r}}static isDirectlyTaggedWith(r){return{exp:Rt.Expression,refType:nn.TagWithoutInheritance,remId:r}}static isDescendantOf(r){return{exp:Rt.Expression,refType:nn.IsDescendantOf,remId:r}}static isInDocument(r){return{exp:Rt.Expression,refType:nn.InDocument,remId:r}}static hasAnyConnectionTo(r){return{exp:Rt.Expression,refType:nn.Connection,remId:r}}static hasRemType(r){return{exp:Rt.Expression,refType:nn.RemType,remType:r}}static tagWithoutInheritance(r){return{exp:Rt.Expression,refType:nn.TagWithoutInheritance,remId:r}}static multiSelect(r,i){return{exp:Rt.Expression,refType:nn.MultiSelect,matcherType:r,remIds:i}}static singleSelect(r,i){return{exp:Rt.Expression,refType:nn.SingleSelect,matcherType:r,remIds:i}}static checkbox(r){return{exp:Rt.Expression,refType:nn.Checkbox,value:r}}static date(r,i,s){return{exp:Rt.Expression,refType:nn.Date,matcherType:r,date:typeof i=="string"||i==null?void 0:i.toISOString(),dateRelativeMatcher:typeof i=="string"?i:void 0,optionalDate:typeof s=="string"||s==null?void 0:s.toISOString(),optionalDateRelativeMatcher:typeof s=="string"?s:void 0}}static dateRelativeToToday(r,i,s){return{exp:Rt.Expression,refType:nn.Date,matcherType:Io.IsRelativeToToday,relativeDateModifier:r,relativePeriodOffset:s,relativeDatePeriod:i}}static number(r,i){return{exp:Rt.Expression,refType:nn.Number,text:i?.toString()||"",matcherType:r}}}c(jo,"Query_DUPE_2");var ua=Object.defineProperty,Zu=c((t,r,i)=>r in t?ua(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"queue_defNormalProp"),yt=c((t,r,i)=>(Zu(t,typeof r!="symbol"?r+"":r,i),i),"queue_publicField"),dn=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"queue_async");const Wu="queue";class Or extends Wt{constructor(r){super(r,Wu),yt(this,"getAverageTimePerCard",()=>dn(this,null,function*(){return yield this.call("getAverageTimePerCard",{})})),yt(this,"getCurrentQueueScreenType",()=>dn(this,null,function*(){return yield this.call("getCurrentQueueScreenType",{})})),yt(this,"goBackToPreviousCard",()=>dn(this,null,function*(){yield this.call("goBackToPreviousCard",{})})),yt(this,"hasRevealedAnswer",()=>dn(this,null,function*(){return yield this.call("hasRevealedAnswer",{})})),yt(this,"showAnswer",()=>dn(this,null,function*(){yield this.call("showAnswer",{})})),yt(this,"rateCurrentCard",i=>dn(this,null,function*(){yield this.call("rateCurrentCard",{score:i})})),yt(this,"isTypeAnswerEnabled",()=>dn(this,null,function*(){return yield this.call("isTypeAnswerEnabled",{})})),yt(this,"getCurrentCard",()=>dn(this,null,function*(){const i=yield this.call("getCurrentCard",{});return i?new pr(i,this._call):void 0})),yt(this,"getNumRemainingCards",()=>dn(this,null,function*(){return yield this.call("getNumRemainingCards",{})})),yt(this,"getCurrentStreak",()=>dn(this,null,function*(){return yield this.call("getCurrentStreak",{})})),yt(this,"removeCurrentCardFromQueue",(i=!0)=>dn(this,null,function*(){yield this.call("removeCurrentCardFromQueue",{addToBackStack:i})})),yt(this,"inLookbackMode",()=>dn(this,null,function*(){return yield this.call("inLookbackMode",{})}))}}c(Or,"QueueNamespace");var Mo=Object.defineProperty,gr=c((t,r,i)=>r in t?Mo(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"reader_defNormalProp"),Vu=c((t,r,i)=>(gr(t,typeof r!="symbol"?r+"":r,i),i),"reader_publicField"),Hu=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"reader_async");class jn extends Wt{constructor(r){super(r,"reader"),Vu(this,"callAndReturnRem",(i,s)=>Hu(this,null,function*(){const a=yield this.call(i,s||{});if(a)return new Gt(a,this._call)}))}addHighlight(){return Hu(this,null,function*(){return this.callAndReturnRem("addHighlight")})}}c(jn,"ReaderNamespace");var Ds=Object.defineProperty,As=Object.defineProperties,eo=Object.getOwnPropertyDescriptors,Bo=Object.getOwnPropertySymbols,ca=Object.prototype.hasOwnProperty,da=Object.prototype.propertyIsEnumerable,Fs=c((t,r,i)=>r in t?Ds(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"rich_text_defNormalProp"),to=c((t,r)=>{for(var i in r||(r={}))ca.call(r,i)&&Fs(t,i,r[i]);if(Bo)for(var i of Bo(r))da.call(r,i)&&Fs(t,i,r[i]);return t},"rich_text_spreadValues"),Vn=c((t,r)=>As(t,eo(r)),"rich_text_spreadProps"),ke=c((t,r,i)=>(Fs(t,typeof r!="symbol"?r+"":r,i),i),"rich_text_publicField"),lt=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"rich_text_async");const $u="richText";class mn{constructor(r){ke(this,"richText",[]),ke(this,"richTextNamespace"),ke(this,"code",(i,s)=>(this.richText.push({i:"m",code:!0,language:s,text:i}),this)),ke(this,"image",(i,s,a)=>(this.richText.push({i:"i",url:i,width:s,height:a}),this)),ke(this,"rem",i=>{const s={i:"q",_id:Kt(i)};return this.richText.push(s),this}),ke(this,"text",(i,s=[])=>{if(s.length===0)return this.richText.push(i),this;const a=Object.fromEntries(s.map(d=>ws[d]?["h",ws[d]]:[Nl[d],!0])||[]);return this.richText.push(Vn(to({i:"m"},a),{text:i})),this}),ke(this,"audio",i=>(this.richText.push({i:"a",url:i,onlyAudio:!0}),this)),ke(this,"latex",(i,s=!1)=>(this.richText.push({i:"x",text:i,block:s}),this)),ke(this,"video",i=>(this.richText.push({i:"a",url:i,onlyAudio:!1}),this)),ke(this,"newline",()=>(this.richText.push(`
13
- `),this)),ke(this,"value",()=>this.richTextNamespace.normalize(this.richText)),this.richTextNamespace=r}}c(mn,"RichTextBuilder");class yr extends Wt{constructor(r){super(r,$u),ke(this,"indexOfElementAt",(i,s)=>lt(this,null,function*(){return this.call("indexOfElementAt",{richText:i,position:s})})),ke(this,"normalize",i=>lt(this,null,function*(){return this.call("normalize",{richText:i})})),ke(this,"removeTextFormatFromRange",(i,s,a,d)=>lt(this,null,function*(){return this.call("removeTextFormatFromRange",{text:i,start:s,end:a,format:d})})),ke(this,"applyTextFormatToRange",(i,s,a,d)=>lt(this,null,function*(){return this.call("applyTextFormatToRange",{text:i,start:s,end:a,format:d})})),ke(this,"toggleTextFormatOnRange",(i,s,a,d)=>lt(this,null,function*(){return this.call("toggleTextFormatOnRange",{text:i,start:s,end:a,format:d})})),ke(this,"replaceAllRichText",(i,s,a)=>lt(this,null,function*(){return this.call("replaceAllRichText",{richText:i,findText:s,replacementText:a})})),ke(this,"splitRichText",(i,s)=>lt(this,null,function*(){return this.call("splitRichText",{richText:i,splitText:s})})),ke(this,"empty",(i,s)=>lt(this,null,function*(){return this.call("empty",{richText:i,allowSpaces:s})})),ke(this,"indexOf",(i,s,a)=>lt(this,null,function*(){return this.call("indexOf",{richText:i,character:s,startChar:a})})),ke(this,"toHTML",i=>lt(this,null,function*(){return this.call("toHTML",{richText:i})})),ke(this,"length",i=>lt(this,null,function*(){return this.call("length",{richText:i})})),ke(this,"trimEnd",i=>lt(this,null,function*(){return this.call("trimEnd",{richText:i})})),ke(this,"trimStart",i=>lt(this,null,function*(){return this.call("trimStart",{richText:i})})),ke(this,"trim",i=>lt(this,null,function*(){return this.call("trim",{richText:i})})),ke(this,"split",(i,s)=>lt(this,null,function*(){return this.call("split",{richText:i,separationCharacter:s})})),ke(this,"deepGetRemAndAliasIdsFromRichText",i=>lt(this,null,function*(){return this.call("deepGetRemAndAliasIdsFromRichText",{richText:i})})),ke(this,"deepGetRemIdsFromRichText",i=>lt(this,null,function*(){return this.call("deepGetRemIdsFromRichText",{richText:i})})),ke(this,"findAllExternalURLs",i=>lt(this,null,function*(){return this.call("findAllExternalURLs",{richText:i})})),ke(this,"getRemAndAliasIdsFromRichText",i=>lt(this,null,function*(){return this.call("getRemAndAliasIdsFromRichText",{richText:i})})),ke(this,"getRemIdsFromRichText",i=>lt(this,null,function*(){return this.call("getRemIdsFromRichText",{richText:i})})),ke(this,"equals",(i,s)=>lt(this,null,function*(){return this.call("equals",{richText1:i,richText2:s})})),ke(this,"substring",(i,s,a)=>lt(this,null,function*(){return this.call("substring",{richText:i,start:s,end:a})})),ke(this,"charAt",(i,s)=>lt(this,null,function*(){return this.call("charAt",{richText:i,index:s})})),ke(this,"toString",i=>lt(this,null,function*(){return this.call("toString",{richText:i})})),ke(this,"toMarkdown",i=>lt(this,null,function*(){return this.call("toMarkdown",{richText:i})})),ke(this,"parseFromMarkdown",i=>lt(this,null,function*(){return this.call("parseFromMarkdown",{markdown:i})})),ke(this,"parseAndInsertHtml",(i,s)=>lt(this,null,function*(){const a=Kt(s);return this.call("parseAndInsertHtml",{html:i,remId:a})}))}get code(){return new mn(this).code}get image(){return new mn(this).image}get rem(){return new mn(this).rem}get text(){return new mn(this).text}get audio(){return new mn(this).audio}get latex(){return new mn(this).latex}get video(){return new mn(this).video}get newline(){return new mn(this).newline}}c(yr,"RichTextNamespace");const Qu="scheduler";class _i extends Wt{constructor(r){super(r,Qu)}registerCustomScheduler(r,i){return this.call("registerCustomScheduler",{name:r,parameters:i})}}c(_i,"SchedulerNamespace");var Ku=Object.defineProperty,Gu=c((t,r,i)=>r in t?Ku(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"search_defNormalProp"),Ls=c((t,r,i)=>(Gu(t,typeof r!="symbol"?r+"":r,i),i),"search_publicField"),js=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"search_async");const Yu="search";class Ms extends Wt{constructor(r){super(r,Yu),Ls(this,"search",(i,s,a)=>js(this,null,function*(){const d=Kt(s);return((yield this.call("search",{queryText:i,searchContextRemId:d,options:a}))||[]).map(p=>new Gt(p,this._call))}))}}c(Ms,"SearchNamespace");var Xu=Object.defineProperty,Bs=Object.getOwnPropertySymbols,zs=Object.prototype.hasOwnProperty,zo=Object.prototype.propertyIsEnumerable,no=c((t,r,i)=>r in t?Xu(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"settings_defNormalProp"),Uo=c((t,r)=>{for(var i in r||(r={}))zs.call(r,i)&&no(t,i,r[i]);if(Bs)for(var i of Bs(r))zo.call(r,i)&&no(t,i,r[i]);return t},"settings_spreadValues"),Qr=c((t,r,i)=>(no(t,typeof r!="symbol"?r+"":r,i),i),"settings_publicField"),ro=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"settings_async");const Zo="settings";class Hn extends Wt{constructor(r){super(r,Zo),Qr(this,"registerDropdownSetting",i=>ro(this,null,function*(){return this.call("registerDropdownSetting",Uo({},i))})),Qr(this,"registerBooleanSetting",i=>ro(this,null,function*(){return this.call("registerBooleanSetting",Uo({},i))})),Qr(this,"registerStringSetting",i=>ro(this,null,function*(){return this.call("registerStringSetting",Uo({},i))})),Qr(this,"registerNumberSetting",i=>ro(this,null,function*(){return this.call("registerNumberSetting",Uo({},i))})),Qr(this,"getSetting",i=>ro(this,null,function*(){return yield this.call("getSetting",{settingId:i})}))}}c(Hn,"SettingsNamespace");var Wo=Object.defineProperty,Vo=c((t,r,i)=>r in t?Wo(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"storage_defNormalProp"),$n=c((t,r,i)=>(Vo(t,typeof r!="symbol"?r+"":r,i),i),"storage_publicField"),Kr=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"storage_async");const io="storage";class Us extends Wt{constructor(r){super(r,io),$n(this,"setSession",(i,s)=>Kr(this,null,function*(){return this.call("setSession",{key:i,value:s})})),$n(this,"getSession",i=>Kr(this,null,function*(){if(i)return this.call("getSession",{key:i})})),$n(this,"setSynced",(i,s)=>Kr(this,null,function*(){return this.call("setSynced",{key:i,value:s})})),$n(this,"getSynced",i=>Kr(this,null,function*(){if(i)return this.call("getSynced",{key:i})})),$n(this,"setLocal",(i,s)=>Kr(this,null,function*(){return this.call("setLocal",{key:i,value:s})})),$n(this,"getLocal",i=>Kr(this,null,function*(){if(i)return this.call("getLocal",{key:i})}))}}c(Us,"StorageNamespace");var fa=Object.defineProperty,Lt=c((t,r,i)=>r in t?fa(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"widget_defNormalProp"),Gr=c((t,r,i)=>(Lt(t,typeof r!="symbol"?r+"":r,i),i),"widget_publicField"),Mn=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"widget_async");const Yr="widget";class Qn extends Wt{constructor(r){super(r,Yr),Gr(this,"getWidgetsAtLocation",(i,s)=>Mn(this,null,function*(){return this.call("getWidgetsAtLocation",{location:i,remId:s})})),Gr(this,"getDimensions",i=>Mn(this,null,function*(){return this.call("getDimensions",{widgetInstanceId:i})})),Gr(this,"openPopup",(i,s,a)=>Mn(this,null,function*(){return this.call("openPopup",{widgetFileName:i,contextData:s,clickOutsideToClose:a})})),Gr(this,"closePopup",(i=!0)=>Mn(this,null,function*(){return this.call("closePopup",{restoreFocus:i})})),Gr(this,"getWidgetContext",()=>Mn(this,null,function*(){return this.call("getWidgetContext",{})}))}}c(Qn,"WidgetNamespace");var qu=Object.defineProperty,Ju=c((t,r,i)=>r in t?qu(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"window_defNormalProp"),kt=c((t,r,i)=>(Ju(t,typeof r!="symbol"?r+"":r,i),i),"window_publicField"),It=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"window_async");const Zs="window";class Ho extends Wt{constructor(r){super(r,Zs),kt(this,"stealKeys",(i,s)=>It(this,null,function*(){yield this.call("stealKeys",{keys:s,id:i})})),kt(this,"releaseKeys",(i,s)=>It(this,null,function*(){yield this.call("releaseKeys",{keys:s,id:i})})),kt(this,"openFloatingWidget",(i,s,a,d)=>It(this,null,function*(){return yield this.call("openFloatingWidget",{fileName:i,position:s,classContainer:a,closeWhenClickOutside:d})})),kt(this,"closeFloatingWidget",i=>It(this,null,function*(){return yield this.call("closeFloatingWidget",{floatingWidgetId:i})})),kt(this,"isFloatingWidgetOpen",i=>It(this,null,function*(){return yield this.call("isFloatingWidgetOpen",{floatingWidgetId:i})})),kt(this,"setFloatingWidgetPosition",(i,s)=>It(this,null,function*(){return yield this.call("setFloatingWidgetPosition",{floatingWidgetId:i,position:s})})),kt(this,"closeAllFloatingWidgets",()=>It(this,null,function*(){return yield this.call("closeAllFloatingWidgets",{})})),kt(this,"getCurrentWindowTree",()=>It(this,null,function*(){return yield this.call("getCurrentWindowTree",{})})),kt(this,"setRemWindowTree",i=>It(this,null,function*(){return yield this.call("setRemWindowTree",{tree:i})})),kt(this,"getLastFocusedPane",()=>It(this,null,function*(){return yield this.call("getLastFocusedPane",{})})),kt(this,"setCurrentWindowTreeFromString",i=>It(this,null,function*(){return yield this.call("setCurrentWindowTreeFromString",{treeString:i})})),kt(this,"getOpenPaneIds",()=>It(this,null,function*(){return yield this.call("getOpenPaneIds",{})})),kt(this,"getFocusedPaneId",()=>It(this,null,function*(){return yield this.call("getFocusedPaneId",{})})),kt(this,"setFocusedPaneId",i=>It(this,null,function*(){return yield this.call("setFocusedPaneId",{paneId:i})})),kt(this,"getURL",()=>It(this,null,function*(){return yield this.call("getURL",{})})),kt(this,"setURL",i=>It(this,null,function*(){return yield this.call("setURL",{url:i})})),kt(this,"openRem",i=>It(this,null,function*(){return yield this.call("openRem",{remId:i._id})})),kt(this,"getOpenPaneRemIds",()=>It(this,null,function*(){return yield this.call("getOpenPaneRemIds",{})})),kt(this,"getOpenPaneRemId",i=>It(this,null,function*(){if(i)return yield this.call("getOpenPaneRemId",{paneId:i})})),kt(this,"openWidgetInPane",(i,s)=>It(this,null,function*(){return yield this.call("openWidgetInPane",{fileName:i,contextData:s})})),kt(this,"openWidgetInRightSidebar",(i,s)=>It(this,null,function*(){return yield this.call("openWidgetInRightSidebar",{fileName:i,contextData:s})})),kt(this,"isOnPage",i=>It(this,null,function*(){return yield this.call("isOnPage",{page:i})}))}}c(Ho,"WindowNamespace");var oo=Object.defineProperty,Ws=Object.getOwnPropertySymbols,$o=Object.prototype.hasOwnProperty,Kn=Object.prototype.propertyIsEnumerable,Si=c((t,r,i)=>r in t?oo(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"plugin_base_defNormalProp"),zt=c((t,r)=>{for(var i in r||(r={}))$o.call(r,i)&&Si(t,i,r[i]);if(Ws)for(var i of Ws(r))Kn.call(r,i)&&Si(t,i,r[i]);return t},"plugin_base_spreadValues"),Te=c((t,r,i)=>(Si(t,typeof r!="symbol"?r+"":r,i),i),"plugin_base_publicField"),dt=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"plugin_base_async");class so{constructor(){Te(this,"apiCallPromise",{}),Te(this,"model",{}),Te(this,"listeners",{}),Te(this,"usedMessageIds",1),Te(this,"widgetInstanceId"),Te(this,"inSandbox"),Te(this,"isNative"),Te(this,"rootURL"),Te(this,"mountDiv"),Te(this,"widgetBodyResizeObserver",null),Te(this,"widgetOptions"),Te(this,"manifest"),Te(this,"id"),Te(this,"app",new ks(this._call.bind(this),this)),Te(this,"editor",new gt(this._call.bind(this))),Te(this,"event",new br(this._call.bind(this),this)),Te(this,"messaging",new Os(this._call.bind(this))),Te(this,"focus",new Ji(this._call.bind(this))),Te(this,"date",new Wr(this._call.bind(this))),Te(this,"widget",new Qn(this._call.bind(this))),Te(this,"window",new Ho(this._call.bind(this))),Te(this,"powerup",new rr(this._call.bind(this))),Te(this,"richText",new yr(this._call.bind(this))),Te(this,"rem",new ji(this._call.bind(this))),Te(this,"card",new yi(this._call.bind(this))),Te(this,"storage",new Us(this._call.bind(this))),Te(this,"settings",new Hn(this._call.bind(this))),Te(this,"search",new Ms(this._call.bind(this))),Te(this,"kb",new Lo(this._call.bind(this))),Te(this,"scheduler",new _i(this._call.bind(this))),Te(this,"queue",new Or(this._call.bind(this))),Te(this,"reader",new jn(this._call.bind(this))),window.onmessage=r=>{this._receive(r)},this.pluginLogger=ea()(`plugin:${this.id||"Plugin"}`),this.logApi=ea()(`plugin:API:${this.id||"Plugin"}`),this.logApi("START"),this.event.addListener(A.onActivate,void 0,this.receiveActivateMessage.bind(this)),this.event.addListener(A.onDeactivate,void 0,this.receiveDeactivateMessage.bind(this)),this.event.addListener(A.setDarkMode,void 0,this.setDarkMode.bind(this)),this.event.addListener(A.setCustomCSS,void 0,this.setCustomCSS.bind(this)),this._call("askToActivate",{})}pluginLogger(...r){}logApi(...r){}setDarkMode({darkMode:r}){this.inSandbox&&(document.body.classList.add(r?"dark":"light"),document.body.classList.remove(r?"light":"dark"))}setCustomCSS({cssBlocks:r,cssUrls:i}){const s=document.getElementsByTagName("head")[0];for(const a of[...s.children])a.classList.contains("custom-css")&&a.remove();for(const a of r){const d=document.createElement("style");d.classList.add("custom-css"),d.innerHTML=a,s.appendChild(d)}for(const a of i){const d=document.createElement("link");d.classList.add("custom-css"),d.rel="stylesheet",d.href=a,s.appendChild(d)}}track(r){let i=!1,s=!1,a=!1,d=[];const p=c(()=>{if(i){for(const{event:h,key:g}of d.flatMap(_=>_.reactiveDeps))this.event.removeListener(h,g,p);return}else s?a=!0:(s=!0,c(()=>dt(this,null,function*(){d=yield hd(this,r,p,()=>{},d||[]),s=!1,a&&(a=!1,p())}),"effect")())},"run");return p(),()=>{i=!0}}loadManifest(){return dt(this,null,function*(){if(!this.manifest)try{const r=yield fetch(this.rootURL+"manifest.json");if(r.ok){const i=yield r.json();this.manifest=i,this.id=i.id}}catch(r){console.log("Failed to load manifest.json",r)}})}receiveActivateMessage(r){return dt(this,null,function*(){var i,s,a,d,p;if(!r.inSandbox&&!((i=window.activeWidgetIds)!=null&&i.has(r.widgetInstanceId))){console.error("Not activating widget",r.widgetInstanceId,"as it is already unmounted");return}if(!r.inSandbox&&!r.mountDiv)throw new Error("Native plugin didn't receive mountDiv");const h=r.inSandbox?this.createMountDiv():r.mountDiv;this.inSandbox=r.inSandbox,this.isNative=!r.inSandbox,this.widgetOptions=r.widgetOptions,this.widgetInstanceId=r.widgetInstanceId,this.rootURL=r.rootURL,this.mountDiv=h,yield this.loadManifest(),this.isNative&&(window.widgetIdToWidget[this.widgetInstanceId]=this),this.onActivate(h,r.rootURL);const g=(a=(s=r.widgetOptions)==null?void 0:s.dimensions)==null?void 0:a.height,_=(p=(d=r.widgetOptions)==null?void 0:d.dimensions)==null?void 0:p.width;if(_=="auto"&&r.inSandbox&&(h.style.display="inline-block"),(g==="auto"||_==="auto")&&this.autoAdjustWidgetContainerDimension(),r.inSandbox&&(g==="auto"&&(document.documentElement.style.overflowY="hidden"),_==="auto"&&(document.documentElement.style.overflowX="hidden")),r.inSandbox)for(const le of r.styleSheetHREFs){const je=document.createElement("link");je.href=le,je.rel="stylesheet",document.getElementsByTagName("head")[0].appendChild(je)}yield this._call("activateCompleted",{})})}receiveDeactivateMessage(r){return dt(this,null,function*(){this.widgetBodyResizeObserver&&this.widgetBodyResizeObserver.disconnect(),this.onDeactivate()})}createMountDiv(){const r=document.createElement("div");return document.body.appendChild(r),r}log(...r){this.pluginLogger(r)}_call(r,i,s){return dt(this,null,function*(){const a=this.usedMessageIds++;typeof s=="string"?r=s+"."+r:typeof s=="object"&&(r=[...s,r].join("."));const d={pluginId:this.id,widgetInstanceId:this.widgetInstanceId,methodName:r,args:i,messageId:a,isIntendedForRemNoteAPIMain:!0};this.logApi("Call",a);const p=this.isNative?window:window.parent,h=yield new Promise(g=>{this.apiCallPromise[a]=g;try{p.postMessage(d,"*")}catch{console.error(`Failed to call plugin method with arguments: ${r} ${i}`)}});if(this.logApi("Got response",h),h!=null&&h.error)throw new Error("Plugin Error: "+h.error);return h?.response})}_receive(r){return dt(this,null,function*(){var i,s,a;if((i=r.data)!=null&&i.isIntendedForRemNoteAPIPlugin){const d=r.data;if("messageId"in d){const p=d.messageId;this.logApi("API _receive",p,d,this.apiCallPromise[p]),this.apiCallPromise[p](d),delete this.apiCallPromise[p]}else if("callbackId"in d){const p=this.model[d.callbackId];p||console.error(`Tried to execute callback ${d.callbackId}, but it was not registered`);const h=yield p?.(d.args);d.callbackReturnValueHandlerId&&this._call("handleCallbackResponse",{result:h,callbackReturnValueHandlerId:d.callbackReturnValueHandlerId},"callback")}else if("eventId"in d){if(!$(d.eventId))throw new Error("Invalid event "+d.eventId);(a=(s=this.listeners[d.eventId])==null?void 0:s.get(d.listenerKey))==null||a.forEach(p=>p(d.args))}}})}autoAdjustWidgetContainerDimension(){return dt(this,null,function*(){const r=new ResizeObserver(s=>{for(let a of s)if(a.contentBoxSize){const d=window.getComputedStyle(a.target),p=parseFloat(d.getPropertyValue("margin-block-start"))||0,h=parseFloat(d.getPropertyValue("margin-block-end"))||0,g=parseFloat(d.getPropertyValue("margin-inline-start"))||0,_=parseFloat(d.getPropertyValue("margin-inline-end"))||0,le={height:a.contentBoxSize[0].blockSize+p+h,width:a.contentBoxSize[0].inlineSize+g+_};this._call("widgetEvents.updateWidgetContainerDimension",le)}}),i=this.inSandbox?this.mountDiv:this.mountDiv.firstChild;i&&(r.observe(i),this.widgetBodyResizeObserver=r)})}createFakeEmbedComponent(r){return dt(this,null,function*(){return this._call("widgetEvents.createFakeEmbedComponent",r)})}unmountFakeEmbedComponent(r){return dt(this,null,function*(){return this._call("widgetEvents.unmountFakeEmbedComponent",{id:r})})}updateFakeEmbedComponentRect(r,i){return dt(this,null,function*(){return this._call("widgetEvents.updateFakeEmbedComponentRect",zt({id:r},i))})}updateFakeEmbedExternalProps(r,i){return dt(this,null,function*(){return this._call("widgetEvents.updateFakeEmbedExternalProps",{id:r,externalProps:i})})}ping(){return dt(this,null,function*(){return yield this._call("ping",{})})}}c(so,"RNPlugin");var ft=tt(232);let In=c(t=>crypto.getRandomValues(new Uint8Array(t)),"random"),pa=c((t,r,i)=>{let s=(2<<Math.log(t.length-1)/Math.LN2)-1,a=-~(1.6*s*r/t.length);return(d=r)=>{let p="";for(;;){let h=i(a),g=a;for(;g--;)if(p+=t[h[g]&s]||"",p.length===d)return p}}},"customRandom"),ec=c((t,r=21)=>pa(t,r,In),"customAlphabet"),Ei=c((t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((r,i)=>(i&=63,i<36?r+=i.toString(36):i<62?r+=(i-26).toString(36).toUpperCase():i>62?r+="-":r+="_",r),""),"nanoid");var se=tt(359),ir=tt.n(se),lo="1.13.6",ao=typeof self=="object"&&self.self===self&&self||typeof Xe.g=="object"&&Xe.g.global===Xe.g&&Xe.g||Function("return this")()||{},Qo=Array.prototype,Vs=Object.prototype,ha=typeof Symbol<"u"?Symbol.prototype:null,Ko=Qo.push,Xr=Qo.slice,uo=Vs.toString,Hs=Vs.hasOwnProperty,$s=typeof ArrayBuffer<"u",ma=typeof DataView<"u",tc=Array.isArray,Go=Object.keys,ga=Object.create,ya=$s&&ArrayBuffer.isView,nc=isNaN,va=isFinite,wa=!{toString:null}.propertyIsEnumerable("toString"),_a=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],td=Math.pow(2,53)-1;function fn(t,r){return r=r==null?t.length-1:+r,function(){for(var i=Math.max(arguments.length-r,0),s=Array(i),a=0;a<i;a++)s[a]=arguments[a+r];switch(r){case 0:return t.call(this,s);case 1:return t.call(this,arguments[0],s);case 2:return t.call(this,arguments[0],arguments[1],s)}var d=Array(r+1);for(a=0;a<r;a++)d[a]=arguments[a];return d[r]=s,t.apply(this,d)}}c(fn,"restArguments");function or(t){var r=typeof t;return r==="function"||r==="object"&&!!t}c(or,"isObject");function rc(t){return t===null}c(rc,"isNull");function Sa(t){return t===void 0}c(Sa,"isUndefined");function Ea(t){return t===!0||t===!1||uo.call(t)==="[object Boolean]"}c(Ea,"isBoolean");function ic(t){return!!(t&&t.nodeType===1)}c(ic,"isElement");function vt(t){var r="[object "+t+"]";return function(i){return uo.call(i)===r}}c(vt,"tagTester");var gn=vt("String"),Ta=vt("Number"),oc=vt("Date"),sc=vt("RegExp"),xa=vt("Error"),Ca=vt("Symbol"),Qs=vt("ArrayBuffer"),Pa=vt("Function"),Ra=ao.document&&ao.document.childNodes;typeof Int8Array!="object"&&typeof Ra!="function"&&(Pa=c(function(t){return typeof t=="function"||!1},"isFunction"));var yn=Pa,Yo=vt("Object"),ka=ma&&Yo(new DataView(new ArrayBuffer(8))),Ks=typeof Map<"u"&&Yo(new Map),lc=vt("DataView");function Ia(t){return t!=null&&yn(t.getInt8)&&Qs(t.buffer)}c(Ia,"ie10IsDataView");var Xo=ka?Ia:lc,Nr=tc||vt("Array");function vr(t,r){return t!=null&&Hs.call(t,r)}c(vr,"has");var sr=vt("Arguments");(function(){sr(arguments)||(sr=c(function(t){return vr(t,"callee")},"isArguments"))})();var Gs=sr;function Ys(t){return!Ca(t)&&va(t)&&!isNaN(parseFloat(t))}c(Ys,"isFinite_isFinite");function Xs(t){return Ta(t)&&nc(t)}c(Xs,"isNaN_isNaN");function qs(t){return function(){return t}}c(qs,"constant");function Ti(t){return function(r){var i=t(r);return typeof i=="number"&&i>=0&&i<=td}}c(Ti,"createSizePropertyCheck");function ba(t){return function(r){return r?.[t]}}c(ba,"shallowProperty");var Js=ba("byteLength"),Oa=Ti(Js),Na=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function ac(t){return ya?ya(t)&&!Xo(t):Oa(t)&&Na.test(uo.call(t))}c(ac,"isTypedArray");var Da=$s?ac:qs(!1),En=ba("length");function uc(t){for(var r={},i=t.length,s=0;s<i;++s)r[t[s]]=!0;return{contains:function(a){return r[a]===!0},push:function(a){return r[a]=!0,t.push(a)}}}c(uc,"emulatedSet");function el(t,r){r=uc(r);var i=_a.length,s=t.constructor,a=yn(s)&&s.prototype||Vs,d="constructor";for(vr(t,d)&&!r.contains(d)&&r.push(d);i--;)d=_a[i],d in t&&t[d]!==a[d]&&!r.contains(d)&&r.push(d)}c(el,"collectNonEnumProps");function qt(t){if(!or(t))return[];if(Go)return Go(t);var r=[];for(var i in t)vr(t,i)&&r.push(i);return wa&&el(t,r),r}c(qt,"keys");function cc(t){if(t==null)return!0;var r=En(t);return typeof r=="number"&&(Nr(t)||gn(t)||Gs(t))?r===0:En(qt(t))===0}c(cc,"isEmpty");function tl(t,r){var i=qt(r),s=i.length;if(t==null)return!s;for(var a=Object(t),d=0;d<s;d++){var p=i[d];if(r[p]!==a[p]||!(p in a))return!1}return!0}c(tl,"isMatch");function et(t){if(t instanceof et)return t;if(!(this instanceof et))return new et(t);this._wrapped=t}c(et,"_"),et.VERSION=lo,et.prototype.value=function(){return this._wrapped},et.prototype.valueOf=et.prototype.toJSON=et.prototype.value,et.prototype.toString=function(){return String(this._wrapped)};function nl(t){return new Uint8Array(t.buffer||t,t.byteOffset||0,Js(t))}c(nl,"toBufferView");var Aa="[object DataView]";function qo(t,r,i,s){if(t===r)return t!==0||1/t===1/r;if(t==null||r==null)return!1;if(t!==t)return r!==r;var a=typeof t;return a!=="function"&&a!=="object"&&typeof r!="object"?!1:Jo(t,r,i,s)}c(qo,"eq");function Jo(t,r,i,s){t instanceof et&&(t=t._wrapped),r instanceof et&&(r=r._wrapped);var a=uo.call(t);if(a!==uo.call(r))return!1;if(ka&&a=="[object Object]"&&Xo(t)){if(!Xo(r))return!1;a=Aa}switch(a){case"[object RegExp]":case"[object String]":return""+t==""+r;case"[object Number]":return+t!=+t?+r!=+r:+t==0?1/+t===1/r:+t==+r;case"[object Date]":case"[object Boolean]":return+t==+r;case"[object Symbol]":return ha.valueOf.call(t)===ha.valueOf.call(r);case"[object ArrayBuffer]":case Aa:return Jo(nl(t),nl(r),i,s)}var d=a==="[object Array]";if(!d&&Da(t)){var p=Js(t);if(p!==Js(r))return!1;if(t.buffer===r.buffer&&t.byteOffset===r.byteOffset)return!0;d=!0}if(!d){if(typeof t!="object"||typeof r!="object")return!1;var h=t.constructor,g=r.constructor;if(h!==g&&!(yn(h)&&h instanceof h&&yn(g)&&g instanceof g)&&"constructor"in t&&"constructor"in r)return!1}i=i||[],s=s||[];for(var _=i.length;_--;)if(i[_]===t)return s[_]===r;if(i.push(t),s.push(r),d){if(_=t.length,_!==r.length)return!1;for(;_--;)if(!qo(t[_],r[_],i,s))return!1}else{var le=qt(t),je;if(_=le.length,qt(r).length!==_)return!1;for(;_--;)if(je=le[_],!(vr(r,je)&&qo(t[je],r[je],i,s)))return!1}return i.pop(),s.pop(),!0}c(Jo,"deepEq");function rl(t,r){return qo(t,r)}c(rl,"isEqual");function xi(t){if(!or(t))return[];var r=[];for(var i in t)r.push(i);return wa&&el(t,r),r}c(xi,"allKeys");function co(t){var r=En(t);return function(i){if(i==null)return!1;var s=xi(i);if(En(s))return!1;for(var a=0;a<r;a++)if(!yn(i[t[a]]))return!1;return t!==xe||!yn(i[il])}}c(co,"ie11fingerprint");var il="forEach",dc="has",Fa=["clear","delete"],es=["get",dc,"set"],La=Fa.concat(il,es),xe=Fa.concat(es),Tn=["add"].concat(Fa,il,dc),Jt=Ks?co(La):vt("Map"),vn=Ks?co(xe):vt("WeakMap"),Ci=Ks?co(Tn):vt("Set"),ja=vt("WeakSet");function bt(t){for(var r=qt(t),i=r.length,s=Array(i),a=0;a<i;a++)s[a]=t[r[a]];return s}c(bt,"values");function ts(t){for(var r=qt(t),i=r.length,s=Array(i),a=0;a<i;a++)s[a]=[r[a],t[r[a]]];return s}c(ts,"pairs");function qr(t){for(var r={},i=qt(t),s=0,a=i.length;s<a;s++)r[t[i[s]]]=i[s];return r}c(qr,"invert");function Jr(t){var r=[];for(var i in t)yn(t[i])&&r.push(i);return r.sort()}c(Jr,"functions");function Dr(t,r){return function(i){var s=arguments.length;if(r&&(i=Object(i)),s<2||i==null)return i;for(var a=1;a<s;a++)for(var d=arguments[a],p=t(d),h=p.length,g=0;g<h;g++){var _=p[g];(!r||i[_]===void 0)&&(i[_]=d[_])}return i}}c(Dr,"createAssigner");var ol=Dr(xi),fo=Dr(qt),sl=Dr(xi,!0);function ll(){return function(){}}c(ll,"ctor");function ei(t){if(!or(t))return{};if(ga)return ga(t);var r=ll();r.prototype=t;var i=new r;return r.prototype=null,i}c(ei,"baseCreate");function re(t,r){var i=ei(t);return r&&fo(i,r),i}c(re,"create");function ns(t){return or(t)?Nr(t)?t.slice():ol({},t):t}c(ns,"clone");function al(t,r){return r(t),t}c(al,"tap");function Gn(t){return Nr(t)?t:[t]}c(Gn,"toPath"),et.toPath=Gn;function Bn(t){return et.toPath(t)}c(Bn,"_toPath_toPath");function ti(t,r){for(var i=r.length,s=0;s<i;s++){if(t==null)return;t=t[r[s]]}return i?t:void 0}c(ti,"deepGet");function Pi(t,r,i){var s=ti(t,Bn(r));return Sa(s)?i:s}c(Pi,"get");function ul(t,r){r=Bn(r);for(var i=r.length,s=0;s<i;s++){var a=r[s];if(!vr(t,a))return!1;t=t[a]}return!!i}c(ul,"has_has");function po(t){return t}c(po,"identity");function bn(t){return t=fo({},t),function(r){return tl(r,t)}}c(bn,"matcher");function ni(t){return t=Bn(t),function(r){return ti(r,t)}}c(ni,"property");function ri(t,r,i){if(r===void 0)return t;switch(i??3){case 1:return function(s){return t.call(r,s)};case 3:return function(s,a,d){return t.call(r,s,a,d)};case 4:return function(s,a,d,p){return t.call(r,s,a,d,p)}}return function(){return t.apply(r,arguments)}}c(ri,"optimizeCb");function ho(t,r,i){return t==null?po:yn(t)?ri(t,r,i):or(t)&&!Nr(t)?bn(t):ni(t)}c(ho,"baseIteratee");function Yn(t,r){return ho(t,r,1/0)}c(Yn,"iteratee"),et.iteratee=Yn;function on(t,r,i){return et.iteratee!==Yn?et.iteratee(t,r):ho(t,r,i)}c(on,"cb");function mo(t,r,i){r=on(r,i);for(var s=qt(t),a=s.length,d={},p=0;p<a;p++){var h=s[p];d[h]=r(t[h],h,t)}return d}c(mo,"mapObject");function go(){}c(go,"noop");function On(t){return t==null?go:function(r){return Pi(t,r)}}c(On,"propertyOf");function Ar(t,r,i){var s=Array(Math.max(0,t));r=ri(r,i,1);for(var a=0;a<t;a++)s[a]=r(a);return s}c(Ar,"times");function lr(t,r){return r==null&&(r=t,t=0),t+Math.floor(Math.random()*(r-t+1))}c(lr,"random_random");var ii=Date.now||function(){return new Date().getTime()};function Nn(t){var r=c(function(d){return t[d]},"escaper"),i="(?:"+qt(t).join("|")+")",s=RegExp(i),a=RegExp(i,"g");return function(d){return d=d==null?"":""+d,s.test(d)?d.replace(a,r):d}}c(Nn,"createEscaper");var Ma={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},yo=Nn(Ma),Ba=qr(Ma),nd=Nn(Ba),fc=et.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},cl=/(.)^/,dl={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},za=/\\|'|\r|\n|\u2028|\u2029/g;function Ri(t){return"\\"+dl[t]}c(Ri,"escapeChar");var pc=/^\s*(\w|\$)+\s*$/;function Ua(t,r,i){!r&&i&&(r=i),r=sl({},r,et.templateSettings);var s=RegExp([(r.escape||cl).source,(r.interpolate||cl).source,(r.evaluate||cl).source].join("|")+"|$","g"),a=0,d="__p+='";t.replace(s,function(_,le,je,xn,We){return d+=t.slice(a,We).replace(za,Ri),a=We+_.length,le?d+=`'+
12
+ */_e(772);var $e=_e(359),st=60103;if(Oe=60107,typeof Symbol=="function"&&Symbol.for){var Z=Symbol.for;st=Z("react.element"),Oe=Z("react.fragment")}var Ze=$e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ye=Object.prototype.hasOwnProperty,ue={key:!0,ref:!0,__self:!0,__source:!0};function fe(ee,ie,me){var q,ge={},C=null,V=null;me!==void 0&&(C=""+me),ie.key!==void 0&&(C=""+ie.key),ie.ref!==void 0&&(V=ie.ref);for(q in ie)Ye.call(ie,q)&&!ue.hasOwnProperty(q)&&(ge[q]=ie[q]);if(ee&&ee.defaultProps)for(q in ie=ee.defaultProps,ie)ge[q]===void 0&&(ge[q]=ie[q]);return{$$typeof:st,type:ee,key:C,ref:V,props:ge,_owner:Ze.current}}c(fe,"q"),ae.jsx=fe,ae.jsxs=fe},232:function(te,ae,_e){"use strict";te.exports=_e(346)},359:function(te){"use strict";te.exports=ht},318:function(te){"use strict";te.exports=He}},Pt={};function tt(te){var ae=Pt[te];if(ae!==void 0)return ae.exports;var _e=Pt[te]={exports:{}};return at[te](_e,_e.exports,tt),_e.exports}c(tt,"__webpack_require__"),(function(){tt.n=function(te){var ae=te&&te.__esModule?function(){return te.default}:function(){return te};return tt.d(ae,{a:ae}),ae}})(),(function(){tt.d=function(te,ae){for(var _e in ae)tt.o(ae,_e)&&!tt.o(te,_e)&&Object.defineProperty(te,_e,{enumerable:!0,get:ae[_e]})}})(),(function(){tt.o=function(te,ae){return Object.prototype.hasOwnProperty.call(te,ae)}})(),(function(){tt.r=function(te){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(te,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(te,"__esModule",{value:!0})}})();var ot={};return(function(){"use strict";tt.r(ot),tt.d(ot,{AppEvents:function(){return A},AppNamespace:function(){return ks},BuiltInPowerupCodes:function(){return kr},Card:function(){return pr},CardNamespace:function(){return yi},CheckboxMatcher:function(){return Wl},ComponentFocusableItemType:function(){return gu},DEPRECATED_RICH_TEXT_ELEMENT_TYPES:function(){return nr},DEPRECATED_RICH_TEXT_ELEMENT_TYPES_TO_NEW_FORMATTING:function(){return Zi},DEPRECATED_RICH_TEXT_FORMATTING_TYPES:function(){return Su},DateMatcher:function(){return Io},DateMatcherTypesToDisplayValue:function(){return $l},DateNamespace:function(){return Wr},DocumentViewer:function(){return Md},EXAM_SCHEDULER_EXPLANATION_TYPES:function(){return Cu},EditorEvents:function(){return ue},EditorNamespace:function(){return gt},EmbedComponentType:function(){return Ln},EventNamespace:function(){return br},FocusEvents:function(){return L},FocusNamespace:function(){return Ji},FocusPropsType:function(){return yu},GetCardInfoNodeCardFields:function(){return Vi},GlobalEvent:function(){return Ze},KnowledgeBaseNamespace:function(){return Lo},LegacySearchPortalSingleSelectQueryExpression:function(){return Yl},LoadingSpinnerPlugin:function(){return Zd},MessagingEvents:function(){return me},MessagingNamespace:function(){return Os},MoveUnit:function(){return Tu},MultiSelectMatcher:function(){return Es},MultiSelectMatcherTypesToDisplayValue:function(){return Ql},NonRelativeMatcherTypes:function(){return Iu},NumberMatcher:function(){return Pn},NumberMatcherTypesToDisplayValue:function(){return No},PDFWebReader:function(){return jd},PORTAL_TYPE:function(){return Eu},PageType_DUPE_1:function(){return Wi},PluginAccessScopeType:function(){return Rr},PluginActionPermissionLevel:function(){return Dl},PluginCommandMenuLocation:function(){return vu},PluginRem:function(){return Wn},PowerupEvent:function(){return ee},PowerupNamespace:function(){return rr},PowerupSlotCodeMap:function(){return Ui},PreviewRemCards:function(){return Wd},PropertyLocation:function(){return Bl},PropertyType:function(){return Ll},QueryExpressionType:function(){return rn},QueryNodeType:function(){return Rt},QueryRemType:function(){return Pu},Query_DUPE_2:function(){return jo},Queue:function(){return Ud},QueueEvent:function(){return Ye},QueueInteractionScore:function(){return wu},QueueItemType:function(){return Jl},QueueItemTypeHumanReadable:function(){return Qi},QueueItemTypeHumanReadableTextToSpeech:function(){return Cs},QueueNamespace:function(){return Or},RICH_TEXT_ELEMENT_TYPE:function(){return _u},RICH_TEXT_FORMATTING:function(){return hr},RNPlugin:function(){return so},ReactRNPlugin:function(){return kc},ReaderNamespace:function(){return jn},RegisterPowerupOptions:function(){return Ou},RegisterPropertyOptions:function(){return xs},RelativeDateMatcher:function(){return Zr},RelativeDateMatcherToLabel:function(){return ku},RelativeDateModifier:function(){return Oo},RelativeDatePeriod:function(){return Hl},RemColor:function(){return ws},RemEvent:function(){return fe},RemHierarchyEditorTree:function(){return zd},RemNamespace:function(){return ji},RemRichTextEditor:function(){return Bd},RemType:function(){return Al},RemTypeTinyGraph:function(){return Fl},RemViewer:function(){return Ld},RichText:function(){return Fd},RichTextEditor:function(){return Ad},RichTextNamespace:function(){return yr},SchedulerExplanationType:function(){return Ml},SchedulerNamespace:function(){return _i},SearchNamespace:function(){return Ms},SearchPortalCheckboxQueryExpression:function(){return Xl},SearchPortalDateQueryExpression:function(){return wi},SearchPortalGetCardInfoQueryNode:function(){return Ul},SearchPortalGroupQueryNode:function(){return Ss},SearchPortalMultiSelectQueryExpression:function(){return Gl},SearchPortalNumberQueryExpression:function(){return Ts},SearchPortalQuery:function(){return $i},SearchPortalQueryExpression:function(){return ql},SearchPortalRefQueryExpression:function(){return Zl},SearchPortalRemTypeQueryExpression:function(){return Ru},SearchPortalSingleSelectQueryExpression:function(){return St},SearchPortalSlotQueryNode:function(){return zl},SearchPortalTextQueryExpression:function(){return Kl},SearchPortalUnaryQueryNode:function(){return _s},SelectSourceType:function(){return vi},SelectionType:function(){return vs},SetRemType:function(){return pu},SettingEvents:function(){return q},SettingsNamespace:function(){return Hn},SidebarEvents:function(){return ie},SingleSelectMatcher:function(){return bo},SingleSelectMatcherTypesToDisplayValue:function(){return bu},SpecialPluginCallback:function(){return xu},StorageEvents:function(){return ge},StorageNamespace:function(){return Us},TextMatcher:function(){return Vl},TextMatcherTypesToDisplayValue:function(){return Hi},TextMatchersAllowedWithoutPrimaryQuery:function(){return Yc},WidgetEvents:function(){return C},WidgetLocation:function(){return fu},WidgetNamespace:function(){return Qn},WindowEvents:function(){return V},WindowNamespace:function(){return Ho},createReactiveApi:function(){return hd},declareIndexPlugin:function(){return Yd},filterAsync:function(){return uf},isAppEvent:function(){return $},numberValidatorSig:function(){return ko},parseManifest:function(){return gp},remTypeTinyGraphToNormal:function(){return mu},remTypeToTinyGraphType:function(){return hu},renderWidget:function(){return Gd},richTextFormatNameCodeMap:function(){return Nl},stringValidatorSig:function(){return jl},useAPIEventListener:function(){return Ic},useGetRemsByIdsReactive:function(){return tf},useLocalStorageState:function(){return of},useOnMessageBroadcast:function(){return Xd},usePlugin:function(){return bi},useRunAsync:function(){return af},useSessionStorageState:function(){return rf},useSyncedStorageState:function(){return sf},useTrackerPlugin:function(){return yf}});var te={};tt.r(te),tt.d(te,{VERSION:function(){return lo},after:function(){return ml},all:function(){return Ga},allKeys:function(){return xi},any:function(){return Ii},assign:function(){return fo},before:function(){return Ha},bind:function(){return mc},bindAll:function(){return gc},chain:function(){return Za},chunk:function(){return Ed},clone:function(){return ns},collect:function(){return ui},compact:function(){return oe},compose:function(){return zn},constant:function(){return qs},contains:function(){return _r},countBy:function(){return W},create:function(){return re},debounce:function(){return wc},default:function(){return kf},defaults:function(){return sl},defer:function(){return si},delay:function(){return Wa},detect:function(){return _o},difference:function(){return Ue},drop:function(){return z},each:function(){return Xn},escape:function(){return yo},every:function(){return Ga},extend:function(){return ol},extendOwn:function(){return fo},filter:function(){return wr},find:function(){return _o},findIndex:function(){return rs},findKey:function(){return wo},findLastIndex:function(){return gl},findWhere:function(){return Qa},first:function(){return j},flatten:function(){return be},foldl:function(){return ki},foldr:function(){return Sc},forEach:function(){return Xn},functions:function(){return Jr},get:function(){return Pi},groupBy:function(){return J},has:function(){return ul},head:function(){return j},identity:function(){return po},include:function(){return _r},includes:function(){return _r},indexBy:function(){return ke},indexOf:function(){return _c},initial:function(){return P},inject:function(){return ki},intersection:function(){return wd},invert:function(){return qr},invoke:function(){return vl},isArguments:function(){return Gs},isArray:function(){return Nr},isArrayBuffer:function(){return Qs},isBoolean:function(){return Ea},isDataView:function(){return Xo},isDate:function(){return oc},isElement:function(){return ic},isEmpty:function(){return cc},isEqual:function(){return rl},isError:function(){return xa},isFinite:function(){return Ys},isFunction:function(){return yn},isMap:function(){return en},isMatch:function(){return tl},isNaN:function(){return Xs},isNull:function(){return rc},isNumber:function(){return Ta},isObject:function(){return or},isRegExp:function(){return sc},isSet:function(){return Ci},isString:function(){return gn},isSymbol:function(){return Ca},isTypedArray:function(){return Da},isUndefined:function(){return Sa},isWeakMap:function(){return vn},isWeakSet:function(){return ja},iteratee:function(){return Yn},keys:function(){return Jt},last:function(){return Ie},lastIndexOf:function(){return yl},map:function(){return ui},mapObject:function(){return mo},matcher:function(){return bn},matches:function(){return bn},max:function(){return o},memoize:function(){return yc},methods:function(){return Jr},min:function(){return l},mixin:function(){return od},negate:function(){return hl},noop:function(){return go},now:function(){return ii},object:function(){return _d},omit:function(){return T},once:function(){return li},pairs:function(){return ts},partial:function(){return pl},partition:function(){return de},pick:function(){return k},pluck:function(){return e},property:function(){return ni},propertyOf:function(){return On},random:function(){return lr},range:function(){return Sd},reduce:function(){return ki},reduceRight:function(){return Sc},reject:function(){return Ka},rest:function(){return z},restArguments:function(){return fn},result:function(){return vo},sample:function(){return m},select:function(){return wr},shuffle:function(){return v},size:function(){return Ce},some:function(){return Ii},sortBy:function(){return S},sortedIndex:function(){return is},tail:function(){return z},take:function(){return j},tap:function(){return al},template:function(){return Ua},templateSettings:function(){return fc},throttle:function(){return vc},times:function(){return Ar},toArray:function(){return f},toPath:function(){return Gn},transpose:function(){return Ec},unescape:function(){return nd},union:function(){return id},uniq:function(){return ar},unique:function(){return ar},uniqueId:function(){return hc},unzip:function(){return Ec},values:function(){return bt},where:function(){return n},without:function(){return Le},wrap:function(){return Va},zip:function(){return Rf}});var ae=Object.defineProperty,_e=Object.getOwnPropertySymbols,Oe=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable,st=c((t,r,i)=>r in t?ae(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"__defNormalProp"),Z=c((t,r)=>{for(var i in r||(r={}))Oe.call(r,i)&&st(t,i,r[i]);if(_e)for(var i of _e(r))$e.call(r,i)&&st(t,i,r[i]);return t},"__spreadValues");const Ze={GlobalOpenRem:"global.open-rem",URLChange:"global.url-change"},Ye={QueueLoadCard:"queue.load-card",QueueCompleteCard:"queue.complete-card",QueueEnter:"queue.enter",QueueExit:"queue.exit",RevealAnswer:"queue.reveal-answer"},ue={EditorSelectionChanged:"editor.selection-changed",EditorTextEdited:"editor.text-edited"},fe={RemChanged:"rem.changed",GlobalRemChanged:"global.rem.changed"},ee={PowerupSlotChanged:"powerup.slot.changed",ClickRemReference:"powerup.click-rem-reference",MouseOverLink:"powerup.mouse-enter-link",MouseOutLink:"powerup.mouse-out-link",SetTodoStatus:"powerup.todo.set-status"},ie={ClickSidebarItem:"sidebar.click-item"},me={MessageBroadcast:"messaging.broadcast"},q={SettingChanged:"setting.changed"},ge={StorageSessionChange:"storage.session.changed",StorageSyncedChange:"storage.synced.changed",StorageLocalChange:"storage.local.changed"},C={FakeEmbedComponentDimensionChange:"widget.virtual-embed-dimension-change",FakeEmbedDOMEvent:"widget.virtual-embed-dom-event",StealKeyEvent:"widget.steal-key-event"},V={FocusedPaneChange:"window.focusedPane.changed",CurrentWindowTreeChange:"window.PaneIdWindowTree.changed"},L={FocusedRemChange:"window.focusedRem.changed",FocusedPortalChange:"window.focusedPortal.changed"},A=Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z({onActivate:"onActivate",onDeactivate:"onDeactivate",setDarkMode:"setDarkMode",setCustomCSS:"setCustomCSS"},V),me),ie),ee),fe),Ze),Ye),ge),C),ue),q),L);function $(t){return Object.values(A).includes(t)}c($,"isAppEvent");var H;(function(t){t.assertEqual=a=>a;function r(a){}c(r,"assertIs"),t.assertIs=r;function i(a){throw new Error}c(i,"assertNever"),t.assertNever=i,t.arrayToEnum=a=>{const d={};for(const p of a)d[p]=p;return d},t.getValidEnumValues=a=>{const d=t.objectKeys(a).filter(h=>typeof a[a[h]]!="number"),p={};for(const h of d)p[h]=a[h];return t.objectValues(p)},t.objectValues=a=>t.objectKeys(a).map(function(d){return a[d]}),t.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const d=[];for(const p in a)Object.prototype.hasOwnProperty.call(a,p)&&d.push(p);return d},t.find=(a,d)=>{for(const p of a)if(d(p))return p},t.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&isFinite(a)&&Math.floor(a)===a;function s(a,d=" | "){return a.map(p=>typeof p=="string"?`'${p}'`:p).join(d)}c(s,"joinValues"),t.joinValues=s,t.jsonStringifyReplacer=(a,d)=>typeof d=="bigint"?d.toString():d})(H||(H={}));var ne;(function(t){t.mergeShapes=(r,i)=>b(b({},r),i)})(ne||(ne={}));const U=H.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ye=c(t=>{switch(typeof t){case"undefined":return U.undefined;case"string":return U.string;case"number":return isNaN(t)?U.nan:U.number;case"boolean":return U.boolean;case"function":return U.function;case"bigint":return U.bigint;case"symbol":return U.symbol;case"object":return Array.isArray(t)?U.array:t===null?U.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?U.promise:typeof Map<"u"&&t instanceof Map?U.map:typeof Set<"u"&&t instanceof Set?U.set:typeof Date<"u"&&t instanceof Date?U.date:U.object;default:return U.unknown}},"getParsedType"),M=H.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),ln=c(t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson");class Qt extends Error{constructor(r){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const i=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,i):this.__proto__=i,this.name="ZodError",this.issues=r}get errors(){return this.issues}format(r){const i=r||function(d){return d.message},s={_errors:[]},a=c(d=>{for(const p of d.issues)if(p.code==="invalid_union")p.unionErrors.map(a);else if(p.code==="invalid_return_type")a(p.returnTypeError);else if(p.code==="invalid_arguments")a(p.argumentsError);else if(p.path.length===0)s._errors.push(i(p));else{let h=s,g=0;for(;g<p.path.length;){const _=p.path[g];g===p.path.length-1?(h[_]=h[_]||{_errors:[]},h[_]._errors.push(i(p))):h[_]=h[_]||{_errors:[]},h=h[_],g++}}},"processError");return a(this),s}toString(){return this.message}get message(){return JSON.stringify(this.issues,H.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(r=i=>i.message){const i={},s=[];for(const a of this.issues)a.path.length>0?(i[a.path[0]]=i[a.path[0]]||[],i[a.path[0]].push(r(a))):s.push(r(a));return{formErrors:s,fieldErrors:i}}get formErrors(){return this.flatten()}}c(Qt,"ZodError"),Qt.create=t=>new Qt(t);const Un=c((t,r)=>{let i;switch(t.code){case M.invalid_type:t.received===U.undefined?i="Required":i=`Expected ${t.expected}, received ${t.received}`;break;case M.invalid_literal:i=`Invalid literal value, expected ${JSON.stringify(t.expected,H.jsonStringifyReplacer)}`;break;case M.unrecognized_keys:i=`Unrecognized key(s) in object: ${H.joinValues(t.keys,", ")}`;break;case M.invalid_union:i="Invalid input";break;case M.invalid_union_discriminator:i=`Invalid discriminator value. Expected ${H.joinValues(t.options)}`;break;case M.invalid_enum_value:i=`Invalid enum value. Expected ${H.joinValues(t.options)}, received '${t.received}'`;break;case M.invalid_arguments:i="Invalid function arguments";break;case M.invalid_return_type:i="Invalid function return type";break;case M.invalid_date:i="Invalid date";break;case M.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(i=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(i=`${i} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?i=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?i=`Invalid input: must end with "${t.validation.endsWith}"`:H.assertNever(t.validation):t.validation!=="regex"?i=`Invalid ${t.validation}`:i="Invalid";break;case M.too_small:t.type==="array"?i=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?i=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?i=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?i=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:i="Invalid input";break;case M.too_big:t.type==="array"?i=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?i=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?i=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?i=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?i=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:i="Invalid input";break;case M.custom:i="Invalid input";break;case M.invalid_intersection_types:i="Intersection results could not be merged";break;case M.not_multiple_of:i=`Number must be a multiple of ${t.multipleOf}`;break;case M.not_finite:i="Number must be finite";break;default:i=r.defaultError,H.assertNever(t)}return{message:i}},"errorMap");let cs=Un;function Sr(t){cs=t}c(Sr,"setErrorMap");function Cn(){return cs}c(Cn,"getErrorMap");const pi=c(t=>{const{data:r,path:i,errorMaps:s,issueData:a}=t,d=[...i,...a.path||[]],p=Y(b({},a),{path:d});let h="";const g=s.filter(_=>!!_).slice().reverse();for(const _ of g)h=_(p,{data:r,defaultError:h}).message;return Y(b({},a),{path:d,message:a.message||h})},"makeIssue"),Tl=[];function X(t,r){const i=pi({issueData:r,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Cn(),Un].filter(s=>!!s)});t.common.issues.push(i)}c(X,"addIssueToContext");class Ut{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(r,i){const s=[];for(const a of i){if(a.status==="aborted")return Se;a.status==="dirty"&&r.dirty(),s.push(a.value)}return{status:r.value,value:s}}static mergeObjectAsync(r,i){return Mt(this,null,function*(){const s=[];for(const a of i)s.push({key:yield a.key,value:yield a.value});return Ut.mergeObjectSync(r,s)})}static mergeObjectSync(r,i){const s={};for(const a of i){const{key:d,value:p}=a;if(d.status==="aborted"||p.status==="aborted")return Se;d.status==="dirty"&&r.dirty(),p.status==="dirty"&&r.dirty(),d.value!=="__proto__"&&(typeof p.value<"u"||a.alwaysSet)&&(s[d.value]=p.value)}return{status:r.value,value:s}}}c(Ut,"ParseStatus");const Se=Object.freeze({status:"aborted"}),Ni=c(t=>({status:"dirty",value:t}),"DIRTY"),nn=c(t=>({status:"valid",value:t}),"OK"),Di=c(t=>t.status==="aborted","isAborted"),hi=c(t=>t.status==="dirty","isDirty"),jr=c(t=>t.status==="valid","isValid"),Zn=c(t=>typeof Promise<"u"&&t instanceof Promise,"isAsync");var ce;(function(t){t.errToObj=r=>typeof r=="string"?{message:r}:r||{},t.toString=r=>typeof r=="string"?r:r?.message})(ce||(ce={}));class an{constructor(r,i,s,a){this._cachedPath=[],this.parent=r,this.data=i,this._path=s,this._key=a}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}c(an,"ParseInputLazyPath");const Er=c((t,r)=>{if(jr(r))return{success:!0,data:r.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const i=new Qt(t.common.issues);return this._error=i,this._error}}},"handleResult");function Ee(t){if(!t)return{};const{errorMap:r,invalid_type_error:i,required_error:s,description:a}=t;if(r&&(i||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return r?{errorMap:r,description:a}:{errorMap:c((d,p)=>d.code!=="invalid_type"?{message:p.defaultError}:typeof p.data>"u"?{message:s??p.defaultError}:{message:i??p.defaultError},"customMap"),description:a}}c(Ee,"processCreateParams");class w{constructor(r){this.spa=this.safeParseAsync,this._def=r,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(r){return ye(r.data)}_getOrReturnCtx(r,i){return i||{common:r.parent.common,data:r.data,parsedType:ye(r.data),schemaErrorMap:this._def.errorMap,path:r.path,parent:r.parent}}_processInputParams(r){return{status:new Ut,ctx:{common:r.parent.common,data:r.data,parsedType:ye(r.data),schemaErrorMap:this._def.errorMap,path:r.path,parent:r.parent}}}_parseSync(r){const i=this._parse(r);if(Zn(i))throw new Error("Synchronous parse encountered promise.");return i}_parseAsync(r){const i=this._parse(r);return Promise.resolve(i)}parse(r,i){const s=this.safeParse(r,i);if(s.success)return s.data;throw s.error}safeParse(r,i){var s;const a={common:{issues:[],async:(s=i?.async)!==null&&s!==void 0?s:!1,contextualErrorMap:i?.errorMap},path:i?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:r,parsedType:ye(r)},d=this._parseSync({data:r,path:a.path,parent:a});return Er(a,d)}parseAsync(r,i){return Mt(this,null,function*(){const s=yield this.safeParseAsync(r,i);if(s.success)return s.data;throw s.error})}safeParseAsync(r,i){return Mt(this,null,function*(){const s={common:{issues:[],contextualErrorMap:i?.errorMap,async:!0},path:i?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:r,parsedType:ye(r)},a=this._parse({data:r,path:s.path,parent:s}),d=yield Zn(a)?a:Promise.resolve(a);return Er(s,d)})}refine(r,i){const s=c(a=>typeof i=="string"||typeof i>"u"?{message:i}:typeof i=="function"?i(a):i,"getIssueProperties");return this._refinement((a,d)=>{const p=r(a),h=c(()=>d.addIssue(b({code:M.custom},s(a))),"setError");return typeof Promise<"u"&&p instanceof Promise?p.then(g=>g?!0:(h(),!1)):p?!0:(h(),!1)})}refinement(r,i){return this._refinement((s,a)=>r(s)?!0:(a.addIssue(typeof i=="function"?i(s,a):i),!1))}_refinement(r){return new Sn({schema:this,typeName:pe.ZodEffects,effect:{type:"refinement",refinement:r}})}superRefine(r){return this._refinement(r)}optional(){return Dn.create(this,this._def)}nullable(){return cr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ke.create(this,this._def)}promise(){return _n.create(this,this._def)}or(r){return Kt.create([this,r],this._def)}and(r){return ut.create(this,r,this._def)}transform(r){return new Sn(Y(b({},Ee(this._def)),{schema:this,typeName:pe.ZodEffects,effect:{type:"transform",transform:r}}))}default(r){const i=typeof r=="function"?r:()=>r;return new xr(Y(b({},Ee(this._def)),{innerType:this,defaultValue:i,typeName:pe.ZodDefault}))}brand(){return new Mr(b({typeName:pe.ZodBranded,type:this},Ee(this._def)))}catch(r){const i=typeof r=="function"?r:()=>r;return new dr(Y(b({},Ee(this._def)),{innerType:this,catchValue:i,typeName:pe.ZodCatch}))}describe(r){const i=this.constructor;return new i(Y(b({},this._def),{description:r}))}pipe(r){return fr.create(this,r)}readonly(){return ze.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}c(w,"ZodType");const y=/^c[^\s-]{8,}$/i,E=/^[a-z][a-z0-9]*$/,R=/[0-9A-HJKMNP-TV-Z]{26}/,N=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,F=/^([A-Z0-9_+-]+\.?)*[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Q=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),G=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,ve=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Ae=c(t=>t.precision?t.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}Z$`):t.precision===0?t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"),"datetimeRegex");function Ne(t,r){return!!((r==="v4"||!r)&&G.test(t)||(r==="v6"||!r)&&ve.test(t))}c(Ne,"isValidIP");class he extends w{constructor(){super(...arguments),this._regex=(r,i,s)=>this.refinement(a=>r.test(a),b({validation:i,code:M.invalid_string},ce.errToObj(s))),this.nonempty=r=>this.min(1,ce.errToObj(r)),this.trim=()=>new he(Y(b({},this._def),{checks:[...this._def.checks,{kind:"trim"}]})),this.toLowerCase=()=>new he(Y(b({},this._def),{checks:[...this._def.checks,{kind:"toLowerCase"}]})),this.toUpperCase=()=>new he(Y(b({},this._def),{checks:[...this._def.checks,{kind:"toUpperCase"}]}))}_parse(r){if(this._def.coerce&&(r.data=String(r.data)),this._getType(r)!==U.string){const a=this._getOrReturnCtx(r);return X(a,{code:M.invalid_type,expected:U.string,received:a.parsedType}),Se}const i=new Ut;let s;for(const a of this._def.checks)if(a.kind==="min")r.data.length<a.value&&(s=this._getOrReturnCtx(r,s),X(s,{code:M.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),i.dirty());else if(a.kind==="max")r.data.length>a.value&&(s=this._getOrReturnCtx(r,s),X(s,{code:M.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),i.dirty());else if(a.kind==="length"){const d=r.data.length>a.value,p=r.data.length<a.value;(d||p)&&(s=this._getOrReturnCtx(r,s),d?X(s,{code:M.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):p&&X(s,{code:M.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),i.dirty())}else if(a.kind==="email")F.test(r.data)||(s=this._getOrReturnCtx(r,s),X(s,{validation:"email",code:M.invalid_string,message:a.message}),i.dirty());else if(a.kind==="emoji")Q.test(r.data)||(s=this._getOrReturnCtx(r,s),X(s,{validation:"emoji",code:M.invalid_string,message:a.message}),i.dirty());else if(a.kind==="uuid")N.test(r.data)||(s=this._getOrReturnCtx(r,s),X(s,{validation:"uuid",code:M.invalid_string,message:a.message}),i.dirty());else if(a.kind==="cuid")y.test(r.data)||(s=this._getOrReturnCtx(r,s),X(s,{validation:"cuid",code:M.invalid_string,message:a.message}),i.dirty());else if(a.kind==="cuid2")E.test(r.data)||(s=this._getOrReturnCtx(r,s),X(s,{validation:"cuid2",code:M.invalid_string,message:a.message}),i.dirty());else if(a.kind==="ulid")R.test(r.data)||(s=this._getOrReturnCtx(r,s),X(s,{validation:"ulid",code:M.invalid_string,message:a.message}),i.dirty());else if(a.kind==="url")try{new URL(r.data)}catch{s=this._getOrReturnCtx(r,s),X(s,{validation:"url",code:M.invalid_string,message:a.message}),i.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(r.data)||(s=this._getOrReturnCtx(r,s),X(s,{validation:"regex",code:M.invalid_string,message:a.message}),i.dirty())):a.kind==="trim"?r.data=r.data.trim():a.kind==="includes"?r.data.includes(a.value,a.position)||(s=this._getOrReturnCtx(r,s),X(s,{code:M.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),i.dirty()):a.kind==="toLowerCase"?r.data=r.data.toLowerCase():a.kind==="toUpperCase"?r.data=r.data.toUpperCase():a.kind==="startsWith"?r.data.startsWith(a.value)||(s=this._getOrReturnCtx(r,s),X(s,{code:M.invalid_string,validation:{startsWith:a.value},message:a.message}),i.dirty()):a.kind==="endsWith"?r.data.endsWith(a.value)||(s=this._getOrReturnCtx(r,s),X(s,{code:M.invalid_string,validation:{endsWith:a.value},message:a.message}),i.dirty()):a.kind==="datetime"?Ae(a).test(r.data)||(s=this._getOrReturnCtx(r,s),X(s,{code:M.invalid_string,validation:"datetime",message:a.message}),i.dirty()):a.kind==="ip"?Ne(r.data,a.version)||(s=this._getOrReturnCtx(r,s),X(s,{validation:"ip",code:M.invalid_string,message:a.message}),i.dirty()):H.assertNever(a);return{status:i.value,value:r.data}}_addCheck(r){return new he(Y(b({},this._def),{checks:[...this._def.checks,r]}))}email(r){return this._addCheck(b({kind:"email"},ce.errToObj(r)))}url(r){return this._addCheck(b({kind:"url"},ce.errToObj(r)))}emoji(r){return this._addCheck(b({kind:"emoji"},ce.errToObj(r)))}uuid(r){return this._addCheck(b({kind:"uuid"},ce.errToObj(r)))}cuid(r){return this._addCheck(b({kind:"cuid"},ce.errToObj(r)))}cuid2(r){return this._addCheck(b({kind:"cuid2"},ce.errToObj(r)))}ulid(r){return this._addCheck(b({kind:"ulid"},ce.errToObj(r)))}ip(r){return this._addCheck(b({kind:"ip"},ce.errToObj(r)))}datetime(r){var i;return typeof r=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:r}):this._addCheck(b({kind:"datetime",precision:typeof r?.precision>"u"?null:r?.precision,offset:(i=r?.offset)!==null&&i!==void 0?i:!1},ce.errToObj(r?.message)))}regex(r,i){return this._addCheck(b({kind:"regex",regex:r},ce.errToObj(i)))}includes(r,i){return this._addCheck(b({kind:"includes",value:r,position:i?.position},ce.errToObj(i?.message)))}startsWith(r,i){return this._addCheck(b({kind:"startsWith",value:r},ce.errToObj(i)))}endsWith(r,i){return this._addCheck(b({kind:"endsWith",value:r},ce.errToObj(i)))}min(r,i){return this._addCheck(b({kind:"min",value:r},ce.errToObj(i)))}max(r,i){return this._addCheck(b({kind:"max",value:r},ce.errToObj(i)))}length(r,i){return this._addCheck(b({kind:"length",value:r},ce.errToObj(i)))}get isDatetime(){return!!this._def.checks.find(r=>r.kind==="datetime")}get isEmail(){return!!this._def.checks.find(r=>r.kind==="email")}get isURL(){return!!this._def.checks.find(r=>r.kind==="url")}get isEmoji(){return!!this._def.checks.find(r=>r.kind==="emoji")}get isUUID(){return!!this._def.checks.find(r=>r.kind==="uuid")}get isCUID(){return!!this._def.checks.find(r=>r.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(r=>r.kind==="cuid2")}get isULID(){return!!this._def.checks.find(r=>r.kind==="ulid")}get isIP(){return!!this._def.checks.find(r=>r.kind==="ip")}get minLength(){let r=null;for(const i of this._def.checks)i.kind==="min"&&(r===null||i.value>r)&&(r=i.value);return r}get maxLength(){let r=null;for(const i of this._def.checks)i.kind==="max"&&(r===null||i.value<r)&&(r=i.value);return r}}c(he,"ZodString"),he.create=t=>{var r;return new he(b({checks:[],typeName:pe.ZodString,coerce:(r=t?.coerce)!==null&&r!==void 0?r:!1},Ee(t)))};function mt(t,r){const i=(t.toString().split(".")[1]||"").length,s=(r.toString().split(".")[1]||"").length,a=i>s?i:s,d=parseInt(t.toFixed(a).replace(".","")),p=parseInt(r.toFixed(a).replace(".",""));return d%p/Math.pow(10,a)}c(mt,"floatSafeRemainder");class Me extends w{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(r){if(this._def.coerce&&(r.data=Number(r.data)),this._getType(r)!==U.number){const a=this._getOrReturnCtx(r);return X(a,{code:M.invalid_type,expected:U.number,received:a.parsedType}),Se}let i;const s=new Ut;for(const a of this._def.checks)a.kind==="int"?H.isInteger(r.data)||(i=this._getOrReturnCtx(r,i),X(i,{code:M.invalid_type,expected:"integer",received:"float",message:a.message}),s.dirty()):a.kind==="min"?(a.inclusive?r.data<a.value:r.data<=a.value)&&(i=this._getOrReturnCtx(r,i),X(i,{code:M.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?r.data>a.value:r.data>=a.value)&&(i=this._getOrReturnCtx(r,i),X(i,{code:M.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="multipleOf"?mt(r.data,a.value)!==0&&(i=this._getOrReturnCtx(r,i),X(i,{code:M.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):a.kind==="finite"?Number.isFinite(r.data)||(i=this._getOrReturnCtx(r,i),X(i,{code:M.not_finite,message:a.message}),s.dirty()):H.assertNever(a);return{status:s.value,value:r.data}}gte(r,i){return this.setLimit("min",r,!0,ce.toString(i))}gt(r,i){return this.setLimit("min",r,!1,ce.toString(i))}lte(r,i){return this.setLimit("max",r,!0,ce.toString(i))}lt(r,i){return this.setLimit("max",r,!1,ce.toString(i))}setLimit(r,i,s,a){return new Me(Y(b({},this._def),{checks:[...this._def.checks,{kind:r,value:i,inclusive:s,message:ce.toString(a)}]}))}_addCheck(r){return new Me(Y(b({},this._def),{checks:[...this._def.checks,r]}))}int(r){return this._addCheck({kind:"int",message:ce.toString(r)})}positive(r){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ce.toString(r)})}negative(r){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ce.toString(r)})}nonpositive(r){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ce.toString(r)})}nonnegative(r){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ce.toString(r)})}multipleOf(r,i){return this._addCheck({kind:"multipleOf",value:r,message:ce.toString(i)})}finite(r){return this._addCheck({kind:"finite",message:ce.toString(r)})}safe(r){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ce.toString(r)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ce.toString(r)})}get minValue(){let r=null;for(const i of this._def.checks)i.kind==="min"&&(r===null||i.value>r)&&(r=i.value);return r}get maxValue(){let r=null;for(const i of this._def.checks)i.kind==="max"&&(r===null||i.value<r)&&(r=i.value);return r}get isInt(){return!!this._def.checks.find(r=>r.kind==="int"||r.kind==="multipleOf"&&H.isInteger(r.value))}get isFinite(){let r=null,i=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(i===null||s.value>i)&&(i=s.value):s.kind==="max"&&(r===null||s.value<r)&&(r=s.value)}return Number.isFinite(i)&&Number.isFinite(r)}}c(Me,"ZodNumber"),Me.create=t=>new Me(b({checks:[],typeName:pe.ZodNumber,coerce:t?.coerce||!1},Ee(t)));class Qe extends w{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(r){if(this._def.coerce&&(r.data=BigInt(r.data)),this._getType(r)!==U.bigint){const a=this._getOrReturnCtx(r);return X(a,{code:M.invalid_type,expected:U.bigint,received:a.parsedType}),Se}let i;const s=new Ut;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?r.data<a.value:r.data<=a.value)&&(i=this._getOrReturnCtx(r,i),X(i,{code:M.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?r.data>a.value:r.data>=a.value)&&(i=this._getOrReturnCtx(r,i),X(i,{code:M.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="multipleOf"?r.data%a.value!==BigInt(0)&&(i=this._getOrReturnCtx(r,i),X(i,{code:M.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):H.assertNever(a);return{status:s.value,value:r.data}}gte(r,i){return this.setLimit("min",r,!0,ce.toString(i))}gt(r,i){return this.setLimit("min",r,!1,ce.toString(i))}lte(r,i){return this.setLimit("max",r,!0,ce.toString(i))}lt(r,i){return this.setLimit("max",r,!1,ce.toString(i))}setLimit(r,i,s,a){return new Qe(Y(b({},this._def),{checks:[...this._def.checks,{kind:r,value:i,inclusive:s,message:ce.toString(a)}]}))}_addCheck(r){return new Qe(Y(b({},this._def),{checks:[...this._def.checks,r]}))}positive(r){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ce.toString(r)})}negative(r){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ce.toString(r)})}nonpositive(r){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ce.toString(r)})}nonnegative(r){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ce.toString(r)})}multipleOf(r,i){return this._addCheck({kind:"multipleOf",value:r,message:ce.toString(i)})}get minValue(){let r=null;for(const i of this._def.checks)i.kind==="min"&&(r===null||i.value>r)&&(r=i.value);return r}get maxValue(){let r=null;for(const i of this._def.checks)i.kind==="max"&&(r===null||i.value<r)&&(r=i.value);return r}}c(Qe,"ZodBigInt"),Qe.create=t=>{var r;return new Qe(b({checks:[],typeName:pe.ZodBigInt,coerce:(r=t?.coerce)!==null&&r!==void 0?r:!1},Ee(t)))};class wt extends w{_parse(r){if(this._def.coerce&&(r.data=!!r.data),this._getType(r)!==U.boolean){const i=this._getOrReturnCtx(r);return X(i,{code:M.invalid_type,expected:U.boolean,received:i.parsedType}),Se}return nn(r.data)}}c(wt,"ZodBoolean"),wt.create=t=>new wt(b({typeName:pe.ZodBoolean,coerce:t?.coerce||!1},Ee(t)));class Pe extends w{_parse(r){if(this._def.coerce&&(r.data=new Date(r.data)),this._getType(r)!==U.date){const a=this._getOrReturnCtx(r);return X(a,{code:M.invalid_type,expected:U.date,received:a.parsedType}),Se}if(isNaN(r.data.getTime())){const a=this._getOrReturnCtx(r);return X(a,{code:M.invalid_date}),Se}const i=new Ut;let s;for(const a of this._def.checks)a.kind==="min"?r.data.getTime()<a.value&&(s=this._getOrReturnCtx(r,s),X(s,{code:M.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),i.dirty()):a.kind==="max"?r.data.getTime()>a.value&&(s=this._getOrReturnCtx(r,s),X(s,{code:M.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),i.dirty()):H.assertNever(a);return{status:i.value,value:new Date(r.data.getTime())}}_addCheck(r){return new Pe(Y(b({},this._def),{checks:[...this._def.checks,r]}))}min(r,i){return this._addCheck({kind:"min",value:r.getTime(),message:ce.toString(i)})}max(r,i){return this._addCheck({kind:"max",value:r.getTime(),message:ce.toString(i)})}get minDate(){let r=null;for(const i of this._def.checks)i.kind==="min"&&(r===null||i.value>r)&&(r=i.value);return r!=null?new Date(r):null}get maxDate(){let r=null;for(const i of this._def.checks)i.kind==="max"&&(r===null||i.value<r)&&(r=i.value);return r!=null?new Date(r):null}}c(Pe,"ZodDate"),Pe.create=t=>new Pe(b({checks:[],coerce:t?.coerce||!1,typeName:pe.ZodDate},Ee(t)));class Be extends w{_parse(r){if(this._getType(r)!==U.symbol){const i=this._getOrReturnCtx(r);return X(i,{code:M.invalid_type,expected:U.symbol,received:i.parsedType}),Se}return nn(r.data)}}c(Be,"ZodSymbol"),Be.create=t=>new Be(b({typeName:pe.ZodSymbol},Ee(t)));class Xe extends w{_parse(r){if(this._getType(r)!==U.undefined){const i=this._getOrReturnCtx(r);return X(i,{code:M.invalid_type,expected:U.undefined,received:i.parsedType}),Se}return nn(r.data)}}c(Xe,"ZodUndefined"),Xe.create=t=>new Xe(b({typeName:pe.ZodUndefined},Ee(t)));class nt extends w{_parse(r){if(this._getType(r)!==U.null){const i=this._getOrReturnCtx(r);return X(i,{code:M.invalid_type,expected:U.null,received:i.parsedType}),Se}return nn(r.data)}}c(nt,"ZodNull"),nt.create=t=>new nt(b({typeName:pe.ZodNull},Ee(t)));class We extends w{constructor(){super(...arguments),this._any=!0}_parse(r){return nn(r.data)}}c(We,"ZodAny"),We.create=t=>new We(b({typeName:pe.ZodAny},Ee(t)));class xt extends w{constructor(){super(...arguments),this._unknown=!0}_parse(r){return nn(r.data)}}c(xt,"ZodUnknown"),xt.create=t=>new xt(b({typeName:pe.ZodUnknown},Ee(t)));class Fe extends w{_parse(r){const i=this._getOrReturnCtx(r);return X(i,{code:M.invalid_type,expected:U.never,received:i.parsedType}),Se}}c(Fe,"ZodNever"),Fe.create=t=>new Fe(b({typeName:pe.ZodNever},Ee(t)));class Je extends w{_parse(r){if(this._getType(r)!==U.undefined){const i=this._getOrReturnCtx(r);return X(i,{code:M.invalid_type,expected:U.void,received:i.parsedType}),Se}return nn(r.data)}}c(Je,"ZodVoid"),Je.create=t=>new Je(b({typeName:pe.ZodVoid},Ee(t)));class Ke extends w{_parse(r){const{ctx:i,status:s}=this._processInputParams(r),a=this._def;if(i.parsedType!==U.array)return X(i,{code:M.invalid_type,expected:U.array,received:i.parsedType}),Se;if(a.exactLength!==null){const p=i.data.length>a.exactLength.value,h=i.data.length<a.exactLength.value;(p||h)&&(X(i,{code:p?M.too_big:M.too_small,minimum:h?a.exactLength.value:void 0,maximum:p?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),s.dirty())}if(a.minLength!==null&&i.data.length<a.minLength.value&&(X(i,{code:M.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),s.dirty()),a.maxLength!==null&&i.data.length>a.maxLength.value&&(X(i,{code:M.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),s.dirty()),i.common.async)return Promise.all([...i.data].map((p,h)=>a.type._parseAsync(new an(i,p,i.path,h)))).then(p=>Ut.mergeArray(s,p));const d=[...i.data].map((p,h)=>a.type._parseSync(new an(i,p,i.path,h)));return Ut.mergeArray(s,d)}get element(){return this._def.type}min(r,i){return new Ke(Y(b({},this._def),{minLength:{value:r,message:ce.toString(i)}}))}max(r,i){return new Ke(Y(b({},this._def),{maxLength:{value:r,message:ce.toString(i)}}))}length(r,i){return new Ke(Y(b({},this._def),{exactLength:{value:r,message:ce.toString(i)}}))}nonempty(r){return this.min(1,r)}}c(Ke,"ZodArray"),Ke.create=(t,r)=>new Ke(b({type:t,minLength:null,maxLength:null,exactLength:null,typeName:pe.ZodArray},Ee(r)));function Zt(t){if(t instanceof Ge){const r={};for(const i in t.shape){const s=t.shape[i];r[i]=Dn.create(Zt(s))}return new Ge(Y(b({},t._def),{shape:()=>r}))}else return t instanceof Ke?new Ke(Y(b({},t._def),{type:Zt(t.element)})):t instanceof Dn?Dn.create(Zt(t.unwrap())):t instanceof cr?cr.create(Zt(t.unwrap())):t instanceof ct?ct.create(t.items.map(r=>Zt(r))):t}c(Zt,"deepPartialify");class Ge extends w{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const r=this._def.shape(),i=H.objectKeys(r);return this._cached={shape:r,keys:i}}_parse(r){if(this._getType(r)!==U.object){const g=this._getOrReturnCtx(r);return X(g,{code:M.invalid_type,expected:U.object,received:g.parsedType}),Se}const{status:i,ctx:s}=this._processInputParams(r),{shape:a,keys:d}=this._getCached(),p=[];if(!(this._def.catchall instanceof Fe&&this._def.unknownKeys==="strip"))for(const g in s.data)d.includes(g)||p.push(g);const h=[];for(const g of d){const _=a[g],le=s.data[g];h.push({key:{status:"valid",value:g},value:_._parse(new an(s,le,s.path,g)),alwaysSet:g in s.data})}if(this._def.catchall instanceof Fe){const g=this._def.unknownKeys;if(g==="passthrough")for(const _ of p)h.push({key:{status:"valid",value:_},value:{status:"valid",value:s.data[_]}});else if(g==="strict")p.length>0&&(X(s,{code:M.unrecognized_keys,keys:p}),i.dirty());else if(g!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const g=this._def.catchall;for(const _ of p){const le=s.data[_];h.push({key:{status:"valid",value:_},value:g._parse(new an(s,le,s.path,_)),alwaysSet:_ in s.data})}}return s.common.async?Promise.resolve().then(()=>Mt(this,null,function*(){const g=[];for(const _ of h){const le=yield _.key;g.push({key:le,value:yield _.value,alwaysSet:_.alwaysSet})}return g})).then(g=>Ut.mergeObjectSync(i,g)):Ut.mergeObjectSync(i,h)}get shape(){return this._def.shape()}strict(r){return ce.errToObj,new Ge(b(Y(b({},this._def),{unknownKeys:"strict"}),r!==void 0?{errorMap:(i,s)=>{var a,d,p,h;const g=(p=(d=(a=this._def).errorMap)===null||d===void 0?void 0:d.call(a,i,s).message)!==null&&p!==void 0?p:s.defaultError;return i.code==="unrecognized_keys"?{message:(h=ce.errToObj(r).message)!==null&&h!==void 0?h:g}:{message:g}}}:{}))}strip(){return new Ge(Y(b({},this._def),{unknownKeys:"strip"}))}passthrough(){return new Ge(Y(b({},this._def),{unknownKeys:"passthrough"}))}extend(r){return new Ge(Y(b({},this._def),{shape:()=>b(b({},this._def.shape()),r)}))}merge(r){return new Ge({unknownKeys:r._def.unknownKeys,catchall:r._def.catchall,shape:()=>b(b({},this._def.shape()),r._def.shape()),typeName:pe.ZodObject})}setKey(r,i){return this.augment({[r]:i})}catchall(r){return new Ge(Y(b({},this._def),{catchall:r}))}pick(r){const i={};return H.objectKeys(r).forEach(s=>{r[s]&&this.shape[s]&&(i[s]=this.shape[s])}),new Ge(Y(b({},this._def),{shape:()=>i}))}omit(r){const i={};return H.objectKeys(this.shape).forEach(s=>{r[s]||(i[s]=this.shape[s])}),new Ge(Y(b({},this._def),{shape:()=>i}))}deepPartial(){return Zt(this)}partial(r){const i={};return H.objectKeys(this.shape).forEach(s=>{const a=this.shape[s];r&&!r[s]?i[s]=a:i[s]=a.optional()}),new Ge(Y(b({},this._def),{shape:()=>i}))}required(r){const i={};return H.objectKeys(this.shape).forEach(s=>{if(r&&!r[s])i[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof Dn;)a=a._def.innerType;i[s]=a}}),new Ge(Y(b({},this._def),{shape:()=>i}))}keyof(){return So(H.objectKeys(this.shape))}}c(Ge,"ZodObject"),Ge.create=(t,r)=>new Ge(b({shape:()=>t,unknownKeys:"strip",catchall:Fe.create(),typeName:pe.ZodObject},Ee(r))),Ge.strictCreate=(t,r)=>new Ge(b({shape:()=>t,unknownKeys:"strict",catchall:Fe.create(),typeName:pe.ZodObject},Ee(r))),Ge.lazycreate=(t,r)=>new Ge(b({shape:t,unknownKeys:"strip",catchall:Fe.create(),typeName:pe.ZodObject},Ee(r)));class Kt extends w{_parse(r){const{ctx:i}=this._processInputParams(r),s=this._def.options;function a(d){for(const h of d)if(h.result.status==="valid")return h.result;for(const h of d)if(h.result.status==="dirty")return i.common.issues.push(...h.ctx.common.issues),h.result;const p=d.map(h=>new Qt(h.ctx.common.issues));return X(i,{code:M.invalid_union,unionErrors:p}),Se}if(c(a,"handleResults"),i.common.async)return Promise.all(s.map(d=>Mt(this,null,function*(){const p=Y(b({},i),{common:Y(b({},i.common),{issues:[]}),parent:null});return{result:yield d._parseAsync({data:i.data,path:i.path,parent:p}),ctx:p}}))).then(a);{let d;const p=[];for(const g of s){const _=Y(b({},i),{common:Y(b({},i.common),{issues:[]}),parent:null}),le=g._parseSync({data:i.data,path:i.path,parent:_});if(le.status==="valid")return le;le.status==="dirty"&&!d&&(d={result:le,ctx:_}),_.common.issues.length&&p.push(_.common.issues)}if(d)return i.common.issues.push(...d.ctx.common.issues),d.result;const h=p.map(g=>new Qt(g));return X(i,{code:M.invalid_union,unionErrors:h}),Se}}get options(){return this._def.options}}c(Kt,"ZodUnion"),Kt.create=(t,r)=>new Kt(b({options:t,typeName:pe.ZodUnion},Ee(r)));const un=c(t=>t instanceof Jn?un(t.schema):t instanceof Sn?un(t.innerType()):t instanceof ur?[t.value]:t instanceof er?t.options:t instanceof Tr?Object.keys(t.enum):t instanceof xr?un(t._def.innerType):t instanceof Xe?[void 0]:t instanceof nt?[null]:null,"getDiscriminator");class pn extends w{_parse(r){const{ctx:i}=this._processInputParams(r);if(i.parsedType!==U.object)return X(i,{code:M.invalid_type,expected:U.object,received:i.parsedType}),Se;const s=this.discriminator,a=i.data[s],d=this.optionsMap.get(a);return d?i.common.async?d._parseAsync({data:i.data,path:i.path,parent:i}):d._parseSync({data:i.data,path:i.path,parent:i}):(X(i,{code:M.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),Se)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(r,i,s){const a=new Map;for(const d of i){const p=un(d.shape[r]);if(!p)throw new Error(`A discriminator value for key \`${r}\` could not be extracted from all schema options`);for(const h of p){if(a.has(h))throw new Error(`Discriminator property ${String(r)} has duplicate value ${String(h)}`);a.set(h,d)}}return new pn(b({typeName:pe.ZodDiscriminatedUnion,discriminator:r,options:i,optionsMap:a},Ee(s)))}}c(pn,"ZodDiscriminatedUnion");function Wt(t,r){const i=ye(t),s=ye(r);if(t===r)return{valid:!0,data:t};if(i===U.object&&s===U.object){const a=H.objectKeys(r),d=H.objectKeys(t).filter(h=>a.indexOf(h)!==-1),p=b(b({},t),r);for(const h of d){const g=Wt(t[h],r[h]);if(!g.valid)return{valid:!1};p[h]=g.data}return{valid:!0,data:p}}else if(i===U.array&&s===U.array){if(t.length!==r.length)return{valid:!1};const a=[];for(let d=0;d<t.length;d++){const p=t[d],h=r[d],g=Wt(p,h);if(!g.valid)return{valid:!1};a.push(g.data)}return{valid:!0,data:a}}else return i===U.date&&s===U.date&&+t==+r?{valid:!0,data:t}:{valid:!1}}c(Wt,"mergeValues");class ut extends w{_parse(r){const{status:i,ctx:s}=this._processInputParams(r),a=c((d,p)=>{if(Di(d)||Di(p))return Se;const h=Wt(d.value,p.value);return h.valid?((hi(d)||hi(p))&&i.dirty(),{status:i.value,value:h.data}):(X(s,{code:M.invalid_intersection_types}),Se)},"handleParsed");return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([d,p])=>a(d,p)):a(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}c(ut,"ZodIntersection"),ut.create=(t,r,i)=>new ut(b({left:t,right:r,typeName:pe.ZodIntersection},Ee(i)));class ct extends w{_parse(r){const{status:i,ctx:s}=this._processInputParams(r);if(s.parsedType!==U.array)return X(s,{code:M.invalid_type,expected:U.array,received:s.parsedType}),Se;if(s.data.length<this._def.items.length)return X(s,{code:M.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Se;!this._def.rest&&s.data.length>this._def.items.length&&(X(s,{code:M.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i.dirty());const a=[...s.data].map((d,p)=>{const h=this._def.items[p]||this._def.rest;return h?h._parse(new an(s,d,s.path,p)):null}).filter(d=>!!d);return s.common.async?Promise.all(a).then(d=>Ut.mergeArray(i,d)):Ut.mergeArray(i,a)}get items(){return this._def.items}rest(r){return new ct(Y(b({},this._def),{rest:r}))}}c(ct,"ZodTuple"),ct.create=(t,r)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ct(b({items:t,typeName:pe.ZodTuple,rest:null},Ee(r)))};class Nt extends w{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(r){const{status:i,ctx:s}=this._processInputParams(r);if(s.parsedType!==U.object)return X(s,{code:M.invalid_type,expected:U.object,received:s.parsedType}),Se;const a=[],d=this._def.keyType,p=this._def.valueType;for(const h in s.data)a.push({key:d._parse(new an(s,h,s.path,h)),value:p._parse(new an(s,s.data[h],s.path,h))});return s.common.async?Ut.mergeObjectAsync(i,a):Ut.mergeObjectSync(i,a)}get element(){return this._def.valueType}static create(r,i,s){return i instanceof w?new Nt(b({keyType:r,valueType:i,typeName:pe.ZodRecord},Ee(s))):new Nt(b({keyType:he.create(),valueType:r,typeName:pe.ZodRecord},Ee(i)))}}c(Nt,"ZodRecord");class Bt extends w{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(r){const{status:i,ctx:s}=this._processInputParams(r);if(s.parsedType!==U.map)return X(s,{code:M.invalid_type,expected:U.map,received:s.parsedType}),Se;const a=this._def.keyType,d=this._def.valueType,p=[...s.data.entries()].map(([h,g],_)=>({key:a._parse(new an(s,h,s.path,[_,"key"])),value:d._parse(new an(s,g,s.path,[_,"value"]))}));if(s.common.async){const h=new Map;return Promise.resolve().then(()=>Mt(this,null,function*(){for(const g of p){const _=yield g.key,le=yield g.value;if(_.status==="aborted"||le.status==="aborted")return Se;(_.status==="dirty"||le.status==="dirty")&&i.dirty(),h.set(_.value,le.value)}return{status:i.value,value:h}}))}else{const h=new Map;for(const g of p){const _=g.key,le=g.value;if(_.status==="aborted"||le.status==="aborted")return Se;(_.status==="dirty"||le.status==="dirty")&&i.dirty(),h.set(_.value,le.value)}return{status:i.value,value:h}}}}c(Bt,"ZodMap"),Bt.create=(t,r,i)=>new Bt(b({valueType:r,keyType:t,typeName:pe.ZodMap},Ee(i)));class hn extends w{_parse(r){const{status:i,ctx:s}=this._processInputParams(r);if(s.parsedType!==U.set)return X(s,{code:M.invalid_type,expected:U.set,received:s.parsedType}),Se;const a=this._def;a.minSize!==null&&s.data.size<a.minSize.value&&(X(s,{code:M.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),i.dirty()),a.maxSize!==null&&s.data.size>a.maxSize.value&&(X(s,{code:M.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),i.dirty());const d=this._def.valueType;function p(g){const _=new Set;for(const le of g){if(le.status==="aborted")return Se;le.status==="dirty"&&i.dirty(),_.add(le.value)}return{status:i.value,value:_}}c(p,"finalizeSet");const h=[...s.data.values()].map((g,_)=>d._parse(new an(s,g,s.path,_)));return s.common.async?Promise.all(h).then(g=>p(g)):p(h)}min(r,i){return new hn(Y(b({},this._def),{minSize:{value:r,message:ce.toString(i)}}))}max(r,i){return new hn(Y(b({},this._def),{maxSize:{value:r,message:ce.toString(i)}}))}size(r,i){return this.min(r,i).max(r,i)}nonempty(r){return this.min(1,r)}}c(hn,"ZodSet"),hn.create=(t,r)=>new hn(b({valueType:t,minSize:null,maxSize:null,typeName:pe.ZodSet},Ee(r)));class Dt extends w{constructor(){super(...arguments),this.validate=this.implement}_parse(r){const{ctx:i}=this._processInputParams(r);if(i.parsedType!==U.function)return X(i,{code:M.invalid_type,expected:U.function,received:i.parsedType}),Se;function s(h,g){return pi({data:h,path:i.path,errorMaps:[i.common.contextualErrorMap,i.schemaErrorMap,Cn(),Un].filter(_=>!!_),issueData:{code:M.invalid_arguments,argumentsError:g}})}c(s,"makeArgsIssue");function a(h,g){return pi({data:h,path:i.path,errorMaps:[i.common.contextualErrorMap,i.schemaErrorMap,Cn(),Un].filter(_=>!!_),issueData:{code:M.invalid_return_type,returnTypeError:g}})}c(a,"makeReturnsIssue");const d={errorMap:i.common.contextualErrorMap},p=i.data;if(this._def.returns instanceof _n){const h=this;return nn(function(...g){return Mt(this,null,function*(){const _=new Qt([]),le=yield h._def.args.parseAsync(g,d).catch(xn=>{throw _.addIssue(s(g,xn)),_}),je=yield Reflect.apply(p,this,le);return yield h._def.returns._def.type.parseAsync(je,d).catch(xn=>{throw _.addIssue(a(je,xn)),_})})})}else{const h=this;return nn(function(...g){const _=h._def.args.safeParse(g,d);if(!_.success)throw new Qt([s(g,_.error)]);const le=Reflect.apply(p,this,_.data),je=h._def.returns.safeParse(le,d);if(!je.success)throw new Qt([a(le,je.error)]);return je.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...r){return new Dt(Y(b({},this._def),{args:ct.create(r).rest(xt.create())}))}returns(r){return new Dt(Y(b({},this._def),{returns:r}))}implement(r){return this.parse(r)}strictImplement(r){return this.parse(r)}static create(r,i,s){return new Dt(b({args:r||ct.create([]).rest(xt.create()),returns:i||xt.create(),typeName:pe.ZodFunction},Ee(s)))}}c(Dt,"ZodFunction");class Jn extends w{get schema(){return this._def.getter()}_parse(r){const{ctx:i}=this._processInputParams(r);return this._def.getter()._parse({data:i.data,path:i.path,parent:i})}}c(Jn,"ZodLazy"),Jn.create=(t,r)=>new Jn(b({getter:t,typeName:pe.ZodLazy},Ee(r)));class ur extends w{_parse(r){if(r.data!==this._def.value){const i=this._getOrReturnCtx(r);return X(i,{received:i.data,code:M.invalid_literal,expected:this._def.value}),Se}return{status:"valid",value:r.data}}get value(){return this._def.value}}c(ur,"ZodLiteral"),ur.create=(t,r)=>new ur(b({value:t,typeName:pe.ZodLiteral},Ee(r)));function So(t,r){return new er(b({values:t,typeName:pe.ZodEnum},Ee(r)))}c(So,"createZodEnum");class er extends w{_parse(r){if(typeof r.data!="string"){const i=this._getOrReturnCtx(r),s=this._def.values;return X(i,{expected:H.joinValues(s),received:i.parsedType,code:M.invalid_type}),Se}if(this._def.values.indexOf(r.data)===-1){const i=this._getOrReturnCtx(r),s=this._def.values;return X(i,{received:i.data,code:M.invalid_enum_value,options:s}),Se}return nn(r.data)}get options(){return this._def.values}get enum(){const r={};for(const i of this._def.values)r[i]=i;return r}get Values(){const r={};for(const i of this._def.values)r[i]=i;return r}get Enum(){const r={};for(const i of this._def.values)r[i]=i;return r}extract(r){return er.create(r)}exclude(r){return er.create(this.options.filter(i=>!r.includes(i)))}}c(er,"ZodEnum"),er.create=So;class Tr extends w{_parse(r){const i=H.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(r);if(s.parsedType!==U.string&&s.parsedType!==U.number){const a=H.objectValues(i);return X(s,{expected:H.joinValues(a),received:s.parsedType,code:M.invalid_type}),Se}if(i.indexOf(r.data)===-1){const a=H.objectValues(i);return X(s,{received:s.data,code:M.invalid_enum_value,options:a}),Se}return nn(r.data)}get enum(){return this._def.values}}c(Tr,"ZodNativeEnum"),Tr.create=(t,r)=>new Tr(b({values:t,typeName:pe.ZodNativeEnum},Ee(r)));class _n extends w{unwrap(){return this._def.type}_parse(r){const{ctx:i}=this._processInputParams(r);if(i.parsedType!==U.promise&&i.common.async===!1)return X(i,{code:M.invalid_type,expected:U.promise,received:i.parsedType}),Se;const s=i.parsedType===U.promise?i.data:Promise.resolve(i.data);return nn(s.then(a=>this._def.type.parseAsync(a,{path:i.path,errorMap:i.common.contextualErrorMap})))}}c(_n,"ZodPromise"),_n.create=(t,r)=>new _n(b({type:t,typeName:pe.ZodPromise},Ee(r)));class Sn extends w{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===pe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(r){const{status:i,ctx:s}=this._processInputParams(r),a=this._def.effect||null,d={addIssue:p=>{X(s,p),p.fatal?i.abort():i.dirty()},get path(){return s.path}};if(d.addIssue=d.addIssue.bind(d),a.type==="preprocess"){const p=a.transform(s.data,d);return s.common.issues.length?{status:"dirty",value:s.data}:s.common.async?Promise.resolve(p).then(h=>this._def.schema._parseAsync({data:h,path:s.path,parent:s})):this._def.schema._parseSync({data:p,path:s.path,parent:s})}if(a.type==="refinement"){const p=c(h=>{const g=a.refinement(h,d);if(s.common.async)return Promise.resolve(g);if(g instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return h},"executeRefinement");if(s.common.async===!1){const h=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return h.status==="aborted"?Se:(h.status==="dirty"&&i.dirty(),p(h.value),{status:i.value,value:h.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(h=>h.status==="aborted"?Se:(h.status==="dirty"&&i.dirty(),p(h.value).then(()=>({status:i.value,value:h.value}))))}if(a.type==="transform")if(s.common.async===!1){const p=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!jr(p))return p;const h=a.transform(p.value,d);if(h instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:i.value,value:h}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(p=>jr(p)?Promise.resolve(a.transform(p.value,d)).then(h=>({status:i.value,value:h})):p);H.assertNever(a)}}c(Sn,"ZodEffects"),Sn.create=(t,r,i)=>new Sn(b({schema:t,typeName:pe.ZodEffects,effect:r},Ee(i))),Sn.createWithPreprocess=(t,r,i)=>new Sn(b({schema:r,effect:{type:"preprocess",transform:t},typeName:pe.ZodEffects},Ee(i)));class Dn extends w{_parse(r){return this._getType(r)===U.undefined?nn(void 0):this._def.innerType._parse(r)}unwrap(){return this._def.innerType}}c(Dn,"ZodOptional"),Dn.create=(t,r)=>new Dn(b({innerType:t,typeName:pe.ZodOptional},Ee(r)));class cr extends w{_parse(r){return this._getType(r)===U.null?nn(null):this._def.innerType._parse(r)}unwrap(){return this._def.innerType}}c(cr,"ZodNullable"),cr.create=(t,r)=>new cr(b({innerType:t,typeName:pe.ZodNullable},Ee(r)));class xr extends w{_parse(r){const{ctx:i}=this._processInputParams(r);let s=i.data;return i.parsedType===U.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:i.path,parent:i})}removeDefault(){return this._def.innerType}}c(xr,"ZodDefault"),xr.create=(t,r)=>new xr(b({innerType:t,typeName:pe.ZodDefault,defaultValue:typeof r.default=="function"?r.default:()=>r.default},Ee(r)));class dr extends w{_parse(r){const{ctx:i}=this._processInputParams(r),s=Y(b({},i),{common:Y(b({},i.common),{issues:[]})}),a=this._def.innerType._parse({data:s.data,path:s.path,parent:b({},s)});return Zn(a)?a.then(d=>({status:"valid",value:d.status==="valid"?d.value:this._def.catchValue({get error(){return new Qt(s.common.issues)},input:s.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Qt(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}c(dr,"ZodCatch"),dr.create=(t,r)=>new dr(b({innerType:t,typeName:pe.ZodCatch,catchValue:typeof r.catch=="function"?r.catch:()=>r.catch},Ee(r)));class Cr extends w{_parse(r){if(this._getType(r)!==U.nan){const i=this._getOrReturnCtx(r);return X(i,{code:M.invalid_type,expected:U.nan,received:i.parsedType}),Se}return{status:"valid",value:r.data}}}c(Cr,"ZodNaN"),Cr.create=t=>new Cr(b({typeName:pe.ZodNaN},Ee(t)));const mi=Symbol("zod_brand");class Mr extends w{_parse(r){const{ctx:i}=this._processInputParams(r),s=i.data;return this._def.type._parse({data:s,path:i.path,parent:i})}unwrap(){return this._def.type}}c(Mr,"ZodBranded");class fr extends w{_parse(r){const{status:i,ctx:s}=this._processInputParams(r);if(s.common.async)return c(()=>Mt(this,null,function*(){const a=yield this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?Se:a.status==="dirty"?(i.dirty(),Ni(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})}),"handleAsync")();{const a=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?Se:a.status==="dirty"?(i.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:s.path,parent:s})}}static create(r,i){return new fr({in:r,out:i,typeName:pe.ZodPipeline})}}c(fr,"ZodPipeline");class ze extends w{_parse(r){const i=this._def.innerType._parse(r);return jr(i)&&(i.value=Object.freeze(i.value)),i}}c(ze,"ZodReadonly"),ze.create=(t,r)=>new ze(b({innerType:t,typeName:pe.ZodReadonly},Ee(r)));const An=c((t,r={},i)=>t?We.create().superRefine((s,a)=>{var d,p;if(!t(s)){const h=typeof r=="function"?r(s):typeof r=="string"?{message:r}:r,g=(p=(d=h.fatal)!==null&&d!==void 0?d:i)!==null&&p!==void 0?p:!0,_=typeof h=="string"?{message:h}:h;a.addIssue(Y(b({code:"custom"},_),{fatal:g}))}}):We.create(),"custom"),Br={object:Ge.lazycreate};var pe;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(pe||(pe={}));const zr=c((t,r={message:`Input not instance of ${t.name}`})=>An(i=>i instanceof t,r),"instanceOfType"),Ai=he.create,Fi=Me.create,Eo=Cr.create,Ya=Qe.create,ds=wt.create,Xa=Pe.create,To=Be.create,Fc=Xe.create,Lc=nt.create,fs=We.create,qa=xt.create,jc=Fe.create,xo=Je.create,Ja=Ke.create,ps=Ge.create,Li=Ge.strictCreate,xl=Kt.create,eu=pn.create,hs=ut.create,tu=ct.create,nu=Nt.create,ru=Bt.create,iu=hn.create,ou=Dt.create,Cl=Jn.create,Mc=ur.create,Pl=er.create,Bc=Tr.create,_t=_n.create,gi=Sn.create,zc=Dn.create,Uc=cr.create,Co=Sn.createWithPreprocess,su=fr.create;var x=Object.freeze({__proto__:null,defaultErrorMap:Un,setErrorMap:Sr,getErrorMap:Cn,makeIssue:pi,EMPTY_PATH:Tl,addIssueToContext:X,ParseStatus:Ut,INVALID:Se,DIRTY:Ni,OK:nn,isAborted:Di,isDirty:hi,isValid:jr,isAsync:Zn,get util(){return H},get objectUtil(){return ne},ZodParsedType:U,getParsedType:ye,ZodType:w,ZodString:he,ZodNumber:Me,ZodBigInt:Qe,ZodBoolean:wt,ZodDate:Pe,ZodSymbol:Be,ZodUndefined:Xe,ZodNull:nt,ZodAny:We,ZodUnknown:xt,ZodNever:Fe,ZodVoid:Je,ZodArray:Ke,ZodObject:Ge,ZodUnion:Kt,ZodDiscriminatedUnion:pn,ZodIntersection:ut,ZodTuple:ct,ZodRecord:Nt,ZodMap:Bt,ZodSet:hn,ZodFunction:Dt,ZodLazy:Jn,ZodLiteral:ur,ZodEnum:er,ZodNativeEnum:Tr,ZodPromise:_n,ZodEffects:Sn,ZodTransformer:Sn,ZodOptional:Dn,ZodNullable:cr,ZodDefault:xr,ZodCatch:dr,ZodNaN:Cr,BRAND:mi,ZodBranded:Mr,ZodPipeline:fr,ZodReadonly:ze,custom:An,Schema:w,ZodSchema:w,late:Br,get ZodFirstPartyTypeKind(){return pe},coerce:{string:t=>he.create(Y(b({},t),{coerce:!0})),number:t=>Me.create(Y(b({},t),{coerce:!0})),boolean:t=>wt.create(Y(b({},t),{coerce:!0})),bigint:t=>Qe.create(Y(b({},t),{coerce:!0})),date:t=>Pe.create(Y(b({},t),{coerce:!0}))},any:fs,array:Ja,bigint:Ya,boolean:ds,date:Xa,discriminatedUnion:eu,effect:gi,enum:Pl,function:ou,instanceof:zr,intersection:hs,lazy:Cl,literal:Mc,map:ru,nan:Eo,nativeEnum:Bc,never:jc,null:Lc,nullable:Uc,number:Fi,object:ps,oboolean:c(()=>ds().optional(),"oboolean"),onumber:c(()=>Fi().optional(),"onumber"),optional:zc,ostring:c(()=>Ai().optional(),"ostring"),pipeline:su,preprocess:Co,promise:_t,record:nu,set:iu,strictObject:Li,string:Ai,symbol:To,transformer:gi,tuple:tu,undefined:Fc,union:xl,unknown:qa,void:xo,NEVER:Se,ZodIssueCode:M,quotelessJson:ln,ZodError:Qt});function Ur(t,r){return(i,s)=>t(i,s,r)}c(Ur,"makeNamespacedCall");var Rl=Object.defineProperty,ms=c((t,r,i)=>r in t?Rl(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"base_defNormalProp"),Pr=c((t,r,i)=>(ms(t,typeof r!="symbol"?r+"":r,i),i),"__publicField");class Vt{constructor(r,i){Pr(this,"_call"),Pr(this,"call"),this._call=r,this.call=Ur(this._call,i)}}c(Vt,"NamespaceBase");function Gt(t){return typeof t=="string"?t:t instanceof Wn?t._id:t}c(Gt,"getRemId");const lu=c(t=>t.map(Gt),"getRemIds");var Zc=Object.defineProperty,au=Object.getOwnPropertySymbols,gs=Object.prototype.hasOwnProperty,Wc=Object.prototype.propertyIsEnumerable,kl=c((t,r,i)=>r in t?Zc(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"rem_defNormalProp"),Il=c((t,r)=>{for(var i in r||(r={}))gs.call(r,i)&&kl(t,i,r[i]);if(au)for(var i of au(r))Wc.call(r,i)&&kl(t,i,r[i]);return t},"rem_spreadValues"),O=c((t,r,i)=>(kl(t,typeof r!="symbol"?r+"":r,i),i),"rem_publicField"),D=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"__async");class Wn{constructor(r,i){O(this,"_id"),O(this,"createdAt"),O(this,"localUpdatedAt"),O(this,"updatedAt"),O(this,"parent"),O(this,"children"),O(this,"type"),O(this,"text"),O(this,"backText"),O(this,"_callMethod"),O(this,"call",(s,a)=>D(this,null,function*(){return yield this._callMethod(s,Il({remId:this._id},a),Mi)})),O(this,"callAndReturnRem",(s,a)=>D(this,null,function*(){const d=yield this.call(s,a);if(d)return new Wn(d,this._callMethod.bind(this))})),O(this,"callAndReturnManyRem",(s,a)=>D(this,null,function*(){const d=yield this.call(s,a);return d?d.map(p=>new Wn(p,this._callMethod.bind(this))):[]})),O(this,"setTableFilter",s=>D(this,null,function*(){return yield this.call("setTableFilter",{filter:s})})),O(this,"isTable",()=>D(this,null,function*(){return yield this.call("isTable",{})})),O(this,"allRemInFolderQueue",()=>D(this,null,function*(){return((yield this.call("allRemInFolderQueue",{}))||[]).map(s=>new Wn(s,this._callMethod.bind(this)))})),O(this,"positionAmongstSiblings",s=>D(this,null,function*(){return this.call("positionAmongstSiblings",{portalId:s})})),O(this,"positionAmongstVisibleSiblings",s=>D(this,null,function*(){return this.call("positionAmongstVisibleSiblings",{portalId:s})})),O(this,"hasPowerup",s=>D(this,null,function*(){return yield this.call("hasPowerup",{powerupCode:s})})),O(this,"getHiddenExplicitlyIncludedState",s=>D(this,null,function*(){return yield this.call("getHiddenExplicitlyIncludedState",{portalId:s})})),O(this,"setHiddenExplicitlyIncludedState",(s,a)=>D(this,null,function*(){return yield this.call("setHiddenExplicitlyIncludedState",{hiddenExplicitlyIncludedState:s,portalId:a})})),O(this,"getLastPracticed",()=>D(this,null,function*(){return yield this.call("getLastPracticed",{})})),O(this,"addPowerup",s=>D(this,null,function*(){return yield this.call("addPowerup",{powerupCode:s})})),O(this,"getLastTimeMovedTo",()=>D(this,null,function*(){return yield this.call("getLastTimeMovedTo",{})})),O(this,"getSchemaVersion",()=>D(this,null,function*(){return yield this.call("getSchemaVersion",{})})),O(this,"embeddedQueueViewMode",()=>D(this,null,function*(){return yield this.call("embeddedQueueViewMode",{})})),O(this,"isCollapsed",s=>D(this,null,function*(){return yield this.call("isCollapsed",{portalId:s})})),O(this,"setIsCollapsed",(s,a)=>D(this,null,function*(){return yield this.call("setIsCollapsed",{isCollapsed:s,portalId:a})})),O(this,"timesSelectedInSearch",()=>D(this,null,function*(){return yield this.call("timesSelectedInSearch",{})})),O(this,"getPortalType",()=>D(this,null,function*(){return yield this.call("getPortalType",{})})),O(this,"getPortalDirectlyIncludedRem",()=>D(this,null,function*(){return yield this.call("getPortalDirectlyIncludedRem",{})})),O(this,"getType",()=>D(this,null,function*(){return yield this.call("getType",{})})),O(this,"setPowerupProperty",(s,a,d)=>D(this,null,function*(){const p=Object.values(kr).includes(s)?Ui[s][a]:a;return yield this.call("setPowerupProperty",{powerupCode:s,powerupSlot:p,value:d})})),O(this,"getPowerupProperty",(s,a)=>D(this,null,function*(){const d=Object.values(kr).includes(s)?Ui[s][a]:a;return yield this.call("getPowerupProperty",{powerupCode:s,powerupSlot:d})})),O(this,"getPowerupPropertyAsRem",(s,a)=>D(this,null,function*(){const d=Object.values(kr).includes(s)?Ui[s][a]:a;return yield this.callAndReturnRem("getPowerupPropertyAsRem",{powerupCode:s,powerupSlot:d})})),O(this,"getTagPropertyAsRem",s=>D(this,null,function*(){return yield this.callAndReturnRem("getTagPropertyAsRem",{propertyId:s})})),O(this,"getPowerupPropertyAsRichText",(s,a)=>D(this,null,function*(){const d=Object.values(kr).includes(s)?Ui[s][a]:a;return yield this.call("getPowerupPropertyAsRichText",{powerupCode:s,powerupSlot:d})})),O(this,"setText",s=>D(this,null,function*(){return yield this.call("setText",{text:s})})),O(this,"setBackText",s=>D(this,null,function*(){return yield this.call("setBackText",{backText:s})})),O(this,"getTagPropertyValue",s=>D(this,null,function*(){return yield this.call("getTagPropertyValue",{propertyId:s})})),O(this,"getPropertyType",()=>D(this,null,function*(){return yield this.call("getPropertyType",{})})),O(this,"setTagPropertyValue",(s,a)=>D(this,null,function*(){return yield this.call("setTagPropertyValue",{propertyId:s,value:a})})),O(this,"removeTag",(s,a=!1)=>D(this,null,function*(){return yield this.call(a?"removeTagAndSlots":"removeTag",{tagId:s})})),O(this,"removePowerup",s=>D(this,null,function*(){return yield this.call("removePowerup",{powerupCode:s})})),O(this,"addTag",s=>D(this,null,function*(){const a=Gt(s);return yield this.call("addTag",{tagId:a})})),O(this,"remove",()=>D(this,null,function*(){return yield this.call("remove",{})})),O(this,"getTagRems",()=>D(this,null,function*(){return this.callAndReturnManyRem("getTagRems",{})})),O(this,"addToPortal",s=>D(this,null,function*(){const a=Gt(s);return yield this.call("addToPortal",{portalId:a})})),O(this,"removeFromPortal",s=>D(this,null,function*(){const a=Gt(s);return yield this.call("removeFromPortal",{portalId:a})})),O(this,"setParent",(s,a)=>D(this,null,function*(){const d=Gt(s);return yield this.call("setParent",{parentId:d,positionAmongstSiblings:a})})),O(this,"getOrCreateAliasWithText",s=>D(this,null,function*(){return yield this.callAndReturnRem("getOrCreateAliasWithText",{aliasText:s})})),O(this,"getChildrenRem",()=>D(this,null,function*(){return yield this.callAndReturnManyRem("getChildrenRem")})),O(this,"allRemInDocumentOrPortal",()=>D(this,null,function*(){return yield this.callAndReturnManyRem("allRemInDocumentOrPortal")})),O(this,"expand",(s,a)=>D(this,null,function*(){const d=Gt(s);return yield this.call("expand",{portalId:d,recurse:a})})),O(this,"collapse",s=>D(this,null,function*(){const a=Gt(s);return yield this.call("collapse",{portalId:a})})),O(this,"siblingRem",()=>D(this,null,function*(){return yield this.callAndReturnManyRem("siblingRem")})),O(this,"visibleSiblingRem",s=>D(this,null,function*(){return yield this.callAndReturnManyRem("visibleSiblingRem",{portalId:s})})),O(this,"taggedRem",()=>D(this,null,function*(){return yield this.callAndReturnManyRem("taggedRem")})),O(this,"ancestorTagRem",()=>D(this,null,function*(){return yield this.callAndReturnManyRem("ancestorTagRem")})),O(this,"descendantTagRem",()=>D(this,null,function*(){return yield this.callAndReturnManyRem("descendantTagRem")})),O(this,"getDescendants",()=>D(this,null,function*(){return yield this.callAndReturnManyRem("getDescendants")})),O(this,"getCards",()=>D(this,null,function*(){const s=yield this.call("getCards");return s?.map(a=>new pr(a,this._callMethod))||[]})),O(this,"getAliases",()=>D(this,null,function*(){return yield this.callAndReturnManyRem("getAliases")})),O(this,"getParentRem",()=>D(this,null,function*(){return yield this.callAndReturnRem("getParentRem")})),O(this,"portalsAndDocumentsIn",()=>D(this,null,function*(){return yield this.callAndReturnManyRem("portalsAndDocumentsIn")})),O(this,"merge",s=>D(this,null,function*(){return yield this.call("merge",{remIdToMergeIntoThisOne:s})})),O(this,"mergeAndSetAlias",s=>D(this,null,function*(){const a=Gt(s);return yield this.call("mergeAndSetAlias",{remIdToMergeIntoThisOne:a})})),O(this,"indent",s=>D(this,null,function*(){const a=Gt(s);return yield this.call("indent",{portalId:a})})),O(this,"outdent",s=>D(this,null,function*(){const a=Gt(s);return yield this.call("outdent",{portalId:a})})),O(this,"setType",s=>D(this,null,function*(){return yield this.call("setType",{type:s})})),O(this,"remsReferencingThis",()=>D(this,null,function*(){return yield this.callAndReturnManyRem("remsReferencingThis")})),O(this,"remsBeingReferenced",()=>D(this,null,function*(){return yield this.callAndReturnManyRem("remsBeingReferenced")})),O(this,"deepRemsBeingReferenced",()=>D(this,null,function*(){return yield this.callAndReturnManyRem("deepRemsBeingReferenced")})),O(this,"getSources",()=>D(this,null,function*(){return yield this.callAndReturnManyRem("getSources")})),O(this,"addSource",s=>D(this,null,function*(){const a=Gt(s);return yield this.call("addSource",{sourceId:a})})),O(this,"removeSource",s=>D(this,null,function*(){const a=Gt(s);return yield this.call("removeSource",{sourceId:a})})),O(this,"isDocument",()=>D(this,null,function*(){return yield this.call("isDocument")})),O(this,"setIsDocument",s=>D(this,null,function*(){return yield this.call("setIsDocument",{isDocument:s})})),O(this,"isListItem",()=>D(this,null,function*(){return yield this.call("isListItem")})),O(this,"setIsListItem",s=>D(this,null,function*(){return yield this.call("setIsListItem",{isListItem:s})})),O(this,"isCardItem",()=>D(this,null,function*(){return yield this.call("isMultilineCard")})),O(this,"setIsCardItem",s=>D(this,null,function*(){return yield this.call("setIsMultilineCard",{isCardItem:s})})),O(this,"isQuote",()=>D(this,null,function*(){return yield this.call("isQuote")})),O(this,"setIsQuote",s=>D(this,null,function*(){yield this.call("setIsQuote",{isQuote:s})})),O(this,"isCode",()=>D(this,null,function*(){return yield this.call("isCode")})),O(this,"setIsCode",s=>D(this,null,function*(){yield this.call("setIsCode",{isCode:s})})),O(this,"isTodo",()=>D(this,null,function*(){return yield this.call("isTodo")})),O(this,"setIsTodo",s=>D(this,null,function*(){yield this.call("setIsTodo",{isTodo:s})})),O(this,"getTodoStatus",()=>D(this,null,function*(){return yield this.call("getTodoStatus")})),O(this,"setTodoStatus",s=>D(this,null,function*(){return yield this.call("setTodoStatus",{todoStatus:s})})),O(this,"getFontSize",()=>D(this,null,function*(){return yield this.call("getFontSize")})),O(this,"setFontSize",s=>D(this,null,function*(){return yield this.call("setFontSize",{fontSize:s})})),O(this,"getHighlightColor",()=>D(this,null,function*(){return yield this.call("getHighlightColor")})),O(this,"setHighlightColor",s=>D(this,null,function*(){return yield this.call("setHighlightColor",{highlightColor:s})})),O(this,"isPowerup",()=>D(this,null,function*(){return yield this.call("isPowerup")})),O(this,"isPowerupEnum",()=>D(this,null,function*(){return yield this.call("isPowerupEnum")})),O(this,"isPowerupPropertyListItem",()=>D(this,null,function*(){return yield this.call("isPowerupPropertyListItem")})),O(this,"isPowerupSlot",()=>D(this,null,function*(){return yield this.call("isPowerupSlot")})),O(this,"isPowerupProperty",()=>D(this,null,function*(){return yield this.call("isPowerupProperty")})),O(this,"isSlot",()=>D(this,null,function*(){return yield this.call("isSlot")})),O(this,"setIsSlot",s=>D(this,null,function*(){return yield this.call("setIsSlot",{isSlot:s})})),O(this,"isProperty",()=>D(this,null,function*(){return yield this.call("isSlot")})),O(this,"setIsProperty",s=>D(this,null,function*(){return yield this.call("setIsSlot",{isSlot:s})})),O(this,"openRemInContext",s=>D(this,null,function*(){yield this.call("openRemInContext",{portalId:s})})),O(this,"openRemAsPage",()=>D(this,null,function*(){yield this.call("openRemAsPage")})),O(this,"getEnablePractice",()=>D(this,null,function*(){return yield this.call("getEnablePractice")})),O(this,"getPracticeDirection",()=>D(this,null,function*(){return yield this.call("getPracticeDirection")})),O(this,"setEnablePractice",s=>D(this,null,function*(){return yield this.call("setEnablePractice",{enablePractice:s})})),O(this,"setPracticeDirection",s=>D(this,null,function*(){return yield this.call("setPracticeDirection",{direction:s})})),O(this,"copyPortalReferenceToClipboard",()=>D(this,null,function*(){return yield this.call("copyPortalReferenceToClipboard")})),O(this,"copyTagReferenceToClipboard",()=>D(this,null,function*(){return yield this.call("copyTagReferenceToClipboard")})),O(this,"copyReferenceToClipboard",()=>D(this,null,function*(){return yield this.call("copyReferenceToClipboard")})),O(this,"scrollToReaderHighlight",()=>D(this,null,function*(){return yield this.call("scrollToReaderHighlight")})),O(this,"isFolder",()=>D(this,null,function*(){return yield this.call("isFolder")})),O(this,"setIsFolder",s=>D(this,null,function*(){return yield this.call("setIsFolder",{isFolder:s})})),this._id=r._id,this.parent=r.parent,this.children=r.children,this.type=r.type,this.text=r.text,this.backText=r.backText,this.updatedAt=r.u,this.localUpdatedAt=r.o,this.createdAt=r.createdAt,this._callMethod=i}}c(Wn,"RemObject");class ji extends Vt{constructor(r){super(r,Mi),O(this,"findOne",i=>D(this,null,function*(){if(!i)return;const s=yield this.call("findOne",{remId:i});if(s)return new Yt(s,this.call)})),O(this,"createSingleRemWithMarkdown",(i,s)=>D(this,null,function*(){const a=yield this.call("createSingleRemWithMarkdown",{markdown:i,parentId:s});return a&&new Yt(a,this.call)})),O(this,"createTreeWithMarkdown",(i,s)=>D(this,null,function*(){return((yield this.call("createTreeWithMarkdown",{markdown:i,parentId:s}))||[]).map(a=>new Yt(a,this.call))})),O(this,"findByName",(i,s)=>D(this,null,function*(){const a=yield this.call("findByName",{name:i,parentId:s});if(a)return new Yt(a,this.call)})),O(this,"moveRems",(i,s,a,d)=>D(this,null,function*(){const p=lu(i),h=Gt(s),g=Gt(d);yield this.call("moveRems",{portalId:g,remIds:p,newParentId:h,positionAmongstSiblings:a})})),O(this,"getAll",()=>D(this,null,function*(){return((yield this.call("getAll",{}))||[]).map(i=>new Yt(i,this._call))})),O(this,"findMany",i=>D(this,null,function*(){const s=lu(i),a=yield this.call("findMany",{remIds:s});if(a)return a.map(d=>new Yt(d,this._call))})),O(this,"createPortal",()=>D(this,null,function*(){const i=yield this.call("createPortal",{});return i?new Yt(i,this._call):void 0})),O(this,"createLinkRem",(i,s=!0)=>D(this,null,function*(){const a=yield this.call("createLinkRem",{url:i,addTitle:s});if(a)return new Yt(a,this._call)})),O(this,"createTable",i=>D(this,null,function*(){const s=Gt(i),a=yield this.call("createTable",{existingTagId:s});if(a)return new Yt(a,this._call)})),O(this,"createRem",()=>D(this,null,function*(){const i=yield this.call("createRem",{});if(i)return new Yt(i,this._call)}))}}c(ji,"RemNamespace");const Yt=Wn,Mi="rem";var ys=Object.defineProperty,bl=Object.getOwnPropertySymbols,Fn=Object.prototype.hasOwnProperty,Bi=Object.prototype.propertyIsEnumerable,Po=c((t,r,i)=>r in t?ys(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"card_defNormalProp"),zi=c((t,r)=>{for(var i in r||(r={}))Fn.call(r,i)&&Po(t,i,r[i]);if(bl)for(var i of bl(r))Bi.call(r,i)&&Po(t,i,r[i]);return t},"card_spreadValues"),cn=c((t,r,i)=>(Po(t,typeof r!="symbol"?r+"":r,i),i),"card_publicField"),tr=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"card_async");const Ro="card";class yi extends Vt{constructor(r){super(r,Ro),cn(this,"findOne",i=>tr(this,null,function*(){if(!i)return;const s=yield this.call("findOne",{id:i});return s?new pr(s,this._call):void 0})),cn(this,"getAll",()=>tr(this,null,function*(){const i=yield this.call("getAll",{});return i?.map(s=>new pr(s,this._call))||[]})),cn(this,"findMany",i=>tr(this,null,function*(){const s=yield this.call("findMany",{ids:i});return s?.map(a=>new pr(a,this._call))||[]}))}}c(yi,"CardNamespace");class pr extends Vt{constructor(r,i){super(i,Ro),cn(this,"_id"),cn(this,"remId"),cn(this,"type"),cn(this,"createdAt"),cn(this,"repetitionHistory"),cn(this,"nextRepetitionTime"),cn(this,"timesWrongInRow"),cn(this,"lastRepetitionTime"),cn(this,"callCard",(a,d)=>tr(this,null,function*(){return yield this._call(a,zi({id:this._id},d),Ro)})),cn(this,"callRem",(a,d)=>tr(this,null,function*(){return yield this._call(a,zi({},d),Mi)})),cn(this,"getType",()=>tr(this,null,function*(){return yield this.callCard("getType",{id:this._id})})),cn(this,"getRem",()=>tr(this,null,function*(){return yield this.callRem("findOne",{remId:this.remId})})),cn(this,"remove",()=>tr(this,null,function*(){return yield this.callCard("remove",{})})),cn(this,"updateCardRepetitionStatus",a=>tr(this,null,function*(){return yield this.callCard("updateCardRepetitionStatus",{score:a})})),this._id=r._id,this.remId=r.remId;const s=r.cardType;this.type=s==="f"?"forward":s==="b"?"backward":{clozeId:s},this.createdAt=r.createdAt,this.repetitionHistory=r.history,this.nextRepetitionTime=r.activeNextTime,this.timesWrongInRow=r.timesWrongInRow}}c(pr,"Card");var uu=Object.defineProperty,Vc=Object.defineProperties,Hc=Object.getOwnPropertyDescriptors,cu=Object.getOwnPropertySymbols,Ol=Object.prototype.hasOwnProperty,$c=Object.prototype.propertyIsEnumerable,du=c((t,r,i)=>r in t?uu(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"interfaces_defNormalProp"),Qc=c((t,r)=>{for(var i in r||(r={}))Ol.call(r,i)&&du(t,i,r[i]);if(cu)for(var i of cu(r))$c.call(r,i)&&du(t,i,r[i]);return t},"interfaces_spreadValues"),Kc=c((t,r)=>Vc(t,Hc(r)),"__spreadProps"),vs=(t=>(t.Rem="Rem",t.Text="Text",t.PDF="PDF",t.WebReader="WebReader",t))(vs||{});const Nl={quote:"q",underline:"u",bold:"b",italic:"l"};var ws=(t=>(t[t.undefined=0]="undefined",t[t.Red=1]="Red",t[t.Orange=2]="Orange",t[t.Yellow=3]="Yellow",t[t.Green=4]="Green",t[t.Blue=6]="Blue",t[t.Purple=5]="Purple",t[t.Gray=7]="Gray",t[t.Brown=8]="Brown",t[t.Pink=9]="Pink",t))(ws||{}),Dl=(t=>(t.Read="Read",t.ReadCreate="ReadCreate",t.ReadCreateModify="ReadCreateModify",t.ReadCreateModifyDelete="ReadCreateModifyDelete",t))(Dl||{}),Rr=(t=>(t.All="All",t.DescendantsOfName="DescendantsOfName",t.DescendantsOfId="DescendantsOfId",t.Powerup="Powerup",t.FocusedSubtree="FocusedSubtree",t.KnowledgeBaseInfo="KnowledgeBaseInfo",t))(Rr||{}),fu=(t=>(t.FloatingWidget="FloatingWidget",t.PaneHeader="PaneHeader",t.Index="Index",t.TopBar="TopBar",t.QueueToolbar="QueueToolbar",t.QueueBelowTopBar="QueueBelowTopBar",t.DocumentAboveToolbar="AboveDocumentToolbar",t.DocumentBelowToolbar="DocumentBelowToolbar",t.DocumentBelowEditor="DocumentBelowEditor",t.DocumentBelowTitle="DocumentBelowTitle",t.SidebarEnd="SidebarEnd",t.RemReferencePopupStart="RemReferencePopupStart",t.RemReferencePopupRight="RemReferencePopupRight",t.Pane="Pane",t.FlashcardAnswerButtons="FlashcardAnswerButtons",t.FlashcardAnswer="FlashcardAnswer",t.Flashcard="Flashcard",t.FlashcardExtraDetail="FlashcardExtraDetail",t.FlashcardUnder="FlashcardUnder",t.RightSidebar="RightSidebar",t.LeftSidebar="LeftSidebar",t.Popup="Popup",t.UnderRemEditor="UnderRemEditor",t.RightSideOfEditor="RightSideOfEditor",t.SelectedTextMenu="SelectedTextMenu",t.PDFHighlightToolbarLocation="PDFHighlightToolbarLocation",t.PDFHighlightPopupLocation="PDFHighlightPopupLocation",t.DeckPage="DeckPage",t.LearningProgressPage="LearningProgressPage",t))(fu||{}),kr=(t=>(t.Aliases="l",t.AutoSort="a",t.AppliedTemplates="at",t.AutoTemplate="m",t.CustomCSS="c",t.DailyDocument="d",t.DisableCards="u",t.Divider="dv",t.Document="o",t.DocumentSidebar="s",t.EditLater="e",t.Emoji="j",t.ExtraCardDetail="x",t.Header="r",t.Highlight="h",t.Link="b",t.List="i",t.MultipleChoice="mc",t.MultiLineCard="w",t.PDFPageNumber="pn",t.PDFHighlight="n",t.QuickAdd="q",t.Quote="qt",t.RestoredFromTrash="rt",t.Slot="y",t.Sources="os",t.SuperPrivate="k",t.TableOfContent="toc",t.TextToSpeech="tts",t.EmbedWebsite="ew",t.UsedAsTag="g",t.Todo="t",t.UploadedFile="f",t.WebHighlight="p",t.Website="z",t.Code="cd",t.TypeInAnswer="ty",t.Deck="de",t.SearchPortal="sp",t.Collection="ct",t.HTMLHighlight="hh",t.HideQueueAncestors="ha",t.ImportedDocument="id",t.Image="im",t.SavedDocuments="sd",t.Callout="clo",t))(kr||{});const Ui={ha:{},l:{Aliases:"a"},ct:{Template:"t"},a:{SortDirection:"d"},cd:{Language:"l",DontWrap:"w",DontBoundHeight:"b"},m:{},c:{},d:{Timestamp:"s",Date:"d"},u:{},o:{Status:"s",DeprecatedSource:"o"},s:{},dv:{},e:{Message:"m"},j:{},x:{},r:{Size:"s"},h:{Color:"c"},b:{URL:"u",Title:"t",ReadPercent:"r",LastReadDate:"d",FileURL:"f"},i:{},w:{},n:{Data:"d",PdfId:"p"},hh:{Data:"d",HTMLId:"h"},pn:{},q:{},qt:{},rt:{Date:"d"},y:{SelectTag:"t",ExtraSlotsOnFrontOfCard:"f",ExtraSlotsOnBackOfCard:"b"},os:{Sources:"os"},at:{Templates:"t"},sp:{Query:"q",Filter:"f",AutomaticBacklinkSearchPortalFor:"b",DontIncludeNestedDescendants:"s"},k:{},g:{AutoActivate:"a",Pinned:"p",CollapseConfigure:"c",PrimaryColumnName:"n"},t:{Status:"s"},ew:{URL:"u",WIDTH:"w",HEIGHT:"h"},toc:{},tts:{},f:{Type:"t",URL:"u",Name:"n",Authors:"a",Keywords:"k",Title:"i",ViewerData:"v",ReadPercent:"r",LastReadDate:"d",HasNoTextLayer:"tl",Theme:"h"},p:{Data:"d",Url:"w"},z:{Hostname:"u"},clo:{BulletIcon:"b"},ty:{},de:{Topics:"t",Status:"s",MaxNewCardsPerDay:"m",MaxTotalCardsPerDay:"c",ExamSchedulerDate:"e",RetrievabilityPeriodStartDate:"r",ConsolidationPeriodStartDate:"pmd",ConsolidationPeriodReIntroSectionLength:"pml",ExamConfig:"ec",SavedExamInfo:"ei",ExamSchedulerDesiredStability:"eds",ExamSchedulerMaxNewCardsPerDay:"emnc",ExamSchedulerMaxTotalCardsPerDay:"emtc",ExamSchedulerCollection:"emcd"},id:{},sd:{},mc:{},im:{Image:"i"}};var pu=(t=>(t[t.DEFAULT_TYPE=void 0]="DEFAULT_TYPE",t[t.CONCEPT=1]="CONCEPT",t[t.DESCRIPTOR=2]="DESCRIPTOR",t))(pu||{}),Al=(t=>(t[t.DEFAULT_TYPE=void 0]="DEFAULT_TYPE",t[t.CONCEPT=1]="CONCEPT",t[t.DESCRIPTOR=2]="DESCRIPTOR",t[t.DEPRECATED_BASIC_CARD=4]="DEPRECATED_BASIC_CARD",t[t.PORTAL=6]="PORTAL",t[t.DEPRECATED_SLOT=3]="DEPRECATED_SLOT",t[t.DEPRECATED_PATTERN=5]="DEPRECATED_PATTERN",t[t.DEPRECATED_COLLECTION=7]="DEPRECATED_COLLECTION",t[t.DEPRECATED_TEXT=8]="DEPRECATED_TEXT",t))(Al||{}),Fl=(t=>(t[t.DEFAULT_TYPE=0]="DEFAULT_TYPE",t[t.CONCEPT=1]="CONCEPT",t[t.DESCRIPTOR=2]="DESCRIPTOR",t[t.PORTAL=3]="PORTAL",t))(Fl||{});function hu(t){switch(t){case 1:return 1;case 2:return 2;case 6:return 3;default:return 0}}c(hu,"remTypeToTinyGraphType");function mu(t){switch(t){case 1:return 1;case 2:return 2;case 3:return 6;default:return Al.DEFAULT_TYPE}}c(mu,"remTypeTinyGraphToNormal");var gu=(t=>(t.MultipleWindows="multipleWindows",t.MultipleWindowsPanel="multipleWindowsPanel",t.Dropdown="Dropdown",t.Breadcrumbs="Breadcrumbs",t.FloatingDiscussion="floatingDiscussion",t.WindowManager="windowManager",t.RemPage="RemPage",t.WindowPane="windowPane",t.MobileTabBar="MobileTabBar",t.Document="document",t.NotificationPanel="notificationPanel",t.EmojiPicker="EmojiPicker",t.HierarchyEditorTree="hierarchyEditorTree",t.ChangeCodeLanguage="ChangeCodeLanguage",t.HierarchyEditorTreePortal="hierarchyEditorTreePortal",t.HierarchyEditorTreeRem="hierarchyEditorTreeRem",t.RichTextEditor="richTextEditor",t.RichTextEditorItem="richTextEditorItem",t.RichTextEditorAliasPopup="richTextEditorAliasPopup",t.TableCellList="tableCellList",t.TableCellPopup="tableCellPopup",t.Table="Table",t.ColumnConfigurationMenu="columnConfigurationMenu",t.Popup="popup",t.Omnibar="omnibar",t.QuickAdd="quickAdd",t.Date="date",t.Queue="queue",t.TypeAnswerBox="typeAnswerBox",t.QueryBuilder="queryBuilder",t.PublishedKnowledgeBase="publishedKnowledgeBase",t.ArticleViewer="articleViewer",t.Article="article",t.FullPageSearch="fullPageSearch",t.ExtraDate="extraDate",t.DropToOpenAsDocument="dropToOpenAsDocument",t.TableSearch="TableSearch",t.PDF="pdf",t.PdfPageNumber="pdfPageNumber",t.NotesPopup="notesPopup",t.PDFUploader="pdfUploader",t.Reader="reader",t.RemSearchPopup="remSearchPopup",t.Debugger="debugger",t.SelectRem="selectRem",t.ExpressionSelect="ExpressionSelect",t.HiddenChildren="hiddenChildren",t.TableTitle="tableTitle",t.TableTagTitle="tableTagTitle",t.TableColumnTitle="tableColumnTitle",t.Toolbar="toolbar",t.Title="title",t.SidebarTitleEdit="sidebarTitleEdit",t.ArticleQueue="articleQueue",t.UserDocument="userDocument",t.DocumentSidebar="documentSidebar",t.RightSidebar="rightSidebar",t.Documents="documents",t.AudioVideo="audioVideo",t.ImageNode="imageNode",t.QueryNodeEditor="queryNodeEditor",t.LinkBox="linkBox",t.SelectedTextMenu="selectedTextMenu",t.RemReferenceNode="remReferenceNode",t.DeckTopicsList="deckTopics",t.DeckTopic="deckTopic",t.AddDeckTopic="addDeckTopic",t.DocSources="docSources",t.DocTags="docTags",t.AddSources="addSources",t.AddTags="addTags",t.InlineLink="inlineLink",t.ImageSelector="imageSelector",t.Latex="latex",t.Image="image",t.Cloze="cloze",t.Alias="alias",t.QueueFolderDropdownSelector="queueFolderDropdownSelector",t.CustomEditLaterMessage="customEditLaterMessage",t.DocumentParents="documentParents",t.AreaHighlight="areaHighlight",t.WindowOne="windowOne",t.WindowTwo="windowTwo",t.Replace="replace",t.Find="find",t.Tag="tag",t.TagBar="tagBar",t.Menu="menu",t.Screenshot="screenshot",t.HelpMessage="helpMessage",t.AddNode="addNode",t.EditEdge="editEdge",t.Controls="controls",t.DocumentSource="documentSource",t.Merge="merge",t.HierarchyEditorTemplateFields="hierarchyEditorTemplateFields",t.SearchExistingTable="searchExistingTable",t.FieldKey="fieldKey",t.PluginRemRichTextEditor="pluginRemRichTextEditor",t.PluginRichTextViewer="pluginRichTextViewer",t.RemHierarchyEditorTree="remHierarchyEditorTree",t.PluginQueue="pluginQueue",t.RichTextEditorFakeEmbed="richTextEditorFakeEmbed",t.DocumentHeader="documentHeader",t.EmbedWebsite="embedWebsite",t.TemplateValueEditor="TemplateValueEditor",t.TemplateValueTextEditor="TemplateValueTextEditor",t.Key="key",t.Value="value",t.CtrlF="ctrlF",t.CtrlFFind="ctrlFind",t.CtrlFReplace="ctrlReplace",t.CtrlFFilter="ctrlFilter",t.SearchResult="searchResult",t.SearchResultItem="searchResultItem",t.FocusableInput="focusableInput",t.UpvoteDownvoteFeedback="UpvoteDownvoteFeedback",t.RightSidebarHelpInput="RightSidebarHelpInput",t.LeftSidebarTutorial="LeftSidebarTutorial",t.CardTableSearchQuery="cardTableSearchQuery",t.Tab="tab",t.ExamDeckRemSearchPopup="ExamDeckRemSearchPopup",t.RightSideImagePopup="RightSideImagePopup",t.RightSideUploadedImagePopup="RightSideUploadedImagePopup",t.RemDocumentSidebar="RemDocumentSidebar",t.RemEmoji="remEmoji",t.FlashcardPreview="FlashcardPreview",t.HoverPreview="HoverPreview",t))(gu||{}),yu=(t=>(t.Text="text",t.SelectedRange="selectedRange",t))(yu||{}),Gc=(t=>(t.Global="global",t.RemFocused="rem-focused",t.RemSelected="rem-selected",t))(Gc||{}),Ll=(t=>(t[t.IMPLICIT_TEXT=void 0]="IMPLICIT_TEXT",t.NUMBER="number",t.DEPRECATED_TITLE="title",t.TEXT="text",t.CHECKBOX="checkbox",t.DATE="date",t.MULTI_SELECT="multi_select",t.SINGLE_SELECT="single_select",t.CREATED_AT="created_at",t.LAST_UPDATED="last_updated",t.IMAGE="image",t.URL="url",t.DEFINITION="definition",t))(Ll||{}),vu=(t=>(t.PropertyConfigMenu="PropertyConfigMenu",t.QueueMenu="QueueMenu",t.ReaderMenu="ReaderMenu",t.PDFHighlightPopupLocation="PDFHighlightPopupLocation",t.DocumentMenu="DocumentMenu",t))(vu||{});const jl=x.union([x.object({type:x.literal("email")}),x.object({type:x.literal("url")}),x.object({type:x.literal("regex"),arg:x.string()}),x.object({type:x.literal("startsWith"),arg:x.string()}),x.object({type:x.literal("endsWith"),arg:x.string()}),x.object({type:x.literal("min"),arg:x.number().positive()}),x.object({type:x.literal("max"),arg:x.number().positive()}),x.object({type:x.literal("length"),arg:x.number().positive()})]),ko=x.union([x.object({type:x.literal("gte"),arg:x.number()}),x.object({type:x.literal("min"),arg:x.number()}),x.object({type:x.literal("gt"),arg:x.number()}),x.object({type:x.literal("lt"),arg:x.number()}),x.object({type:x.literal("lte"),arg:x.number()}),x.object({type:x.literal("int")}),x.object({type:x.literal("multipleOf"),arg:x.number()}),x.object({type:x.literal("step"),arg:x.number()}),x.object({type:x.literal("positive")}),x.object({type:x.literal("negative")}),x.object({type:x.literal("max"),arg:x.number()})]);var wu=(t=>(t[t.TOO_EARLY=.01]="TOO_EARLY",t[t.AGAIN=0]="AGAIN",t[t.HARD=.5]="HARD",t[t.GOOD=1]="GOOD",t[t.EASY=1.5]="EASY",t[t.VIEWED_AS_LEECH=2]="VIEWED_AS_LEECH",t[t.RESET=3]="RESET",t[t.MANUAL_DATE=4]="MANUAL_DATE",t[t.MANUAL_EASE=5]="MANUAL_EASE",t))(wu||{}),Ln=(t=>(t.Queue="Queue",t.PreviewRemCards="ViewAsCard",t.LoadingSpinner="LoadingSpinner",t.RichTextEditor="RichTextEditor",t.RichText="RichTextViewer",t.RemRichTextEditor="RemRichTextEditor",t.RemViewer="RemViewer",t.RemHierarchyEditorTree="RemHierarchyEditorTree",t.PDFWebReader="PDFWebReader",t.DocumentViewer="DocumentViewer",t))(Ln||{});const _u={REM:"q",IMAGE:"i",AUDIO:"a",PLUGIN:"p",DRAWING:"r",GLOBAL_NAME:"g",DEPRECATED_CODE:"o",ANNOTATION:"n",TEXT:"m",LATEX:"x",CARD_DELIMITER:"s",FLASHCARD_ICON:"fi",DYNAMIC_ICON:"di",ADD_ICON:"ai"},hr={CLOZE:"cId",UNDERLINE:"u",SUBSCRIPT:"sub",SUPERSCRIPT:"sup",BOLD:"b",STRIKETHROUGH:"str",ITALIC:"l",INLINE_LINK:"qId",INLINE_CODE:"q",QUOTE:"qt",HIDDEN_CLOZE:"hiddenCloze",REVEALED_CLOZE:"revealedCloze",HIGHLIGHT:"h",TEXT_COLOR:"tc",DEPRECATED_LINK:"url",CODE:"code",CODE_LANGUAGE:"language",COMMENT_ID:"c",CLOZE_HINT:"cloze-hint",CARD_HINT_FRONT:"card-hint-front",CARD_HINT_BACK:"card-hint-back",MULTILINE_CARD_HINT:"multiline-card-item-hint"},nr={UNDERLINE:"u",BOLD:"b",ITALIC:"t",INLINE_CODE:"c",CLOZE:"e",HIDDEN_CLOZE:"z",LINK:"l",HIGHLIGHT:"h",DATE:"d"},Su={LATEX:"x"},Zi={[nr.UNDERLINE]:hr.UNDERLINE,[nr.BOLD]:hr.BOLD,[nr.ITALIC]:hr.ITALIC,[nr.INLINE_CODE]:hr.INLINE_CODE,[nr.CLOZE]:hr.CLOZE,[nr.HIDDEN_CLOZE]:hr.HIDDEN_CLOZE,[nr.LINK]:hr.DEPRECATED_LINK,[nr.HIGHLIGHT]:hr.HIGHLIGHT,[nr.DATE]:!0};var Eu=(t=>(t[t.PORTAL=void 0]="PORTAL",t[t.EMBEDDED_QUEUE=2]="EMBEDDED_QUEUE",t[t.SCAFFOLD=3]="SCAFFOLD",t[t.SEARCH_PORTAL=4]="SEARCH_PORTAL",t))(Eu||{}),Tu=(t=>(t[t.OFFSET=0]="OFFSET",t[t.UNIT=1]="UNIT",t[t.CHARACTER=2]="CHARACTER",t[t.WORD=3]="WORD",t[t.WORD_START=4]="WORD_START",t[t.WORD_END=5]="WORD_END",t[t.LINE=6]="LINE",t))(Tu||{}),xu=(t=>(t.SRSScheduleCard="SRSScheduleCard",t.GetNextCard="GetNextCard",t))(xu||{}),Ml=(t=>(t.RetrievabilityPeriodPreExam="pre_exam",t.MaintenancePeriod="maintenance_period",t.EnterConsolidationPeriod="enter_consolidation_period",t.ConsolidationPeriod="consolidation_period",t.NotGoodEnoughForExam="exam_not_good",t.PostponedExamStartDate="postpone_start",t.NormalRepetition="normal_repetition",t))(Ml||{});const Cu=["pre_exam","maintenance_period","enter_consolidation_period","consolidation_period","exam_not_good","postpone_start"];var vi=(t=>(t[t.Enum=void 0]="Enum",t.AnyRem="any",t.Relation="relation",t))(vi||{}),Wi=(t=>(t.Queue="Queue",t))(Wi||{}),Bl=(t=>(t.RIGHT="right",t.BELOW="label",t.ONLY_DOCUMENT="only_document",t.ONLY_IN_TABLE="only_table",t[t.INLINE=void 0]="INLINE",t))(Bl||{}),Vi=(t=>(t.NumReviews="num_reviews",t.DueDate="due_date",t.IsEnabled="is_enabled",t.IsDue="is_due",t.IsLeech="is_leech",t.CardMasteryLevel="card_mastery_level",t.CreatedAt="created_at",t))(Vi||{}),rn=(t=>(t.Text="Text",t.Reference="Reference",t.Portal="Portal",t.Tag="Tag",t.TagWithoutInheritance="TagWithoutInheritance",t.Connection="Connection",t.IsDescendantOf="IsDescendantOf",t.InDocument="InDocument",t.RemType="RemType",t.Date="Date",t.MultiSelect="Multi Select",t.LegacyMultiSelect="MultiSelect",t.SingleSelect="Single Select",t.LegacySingleSelect="SingleSelect",t.Checkbox="Checkbox",t.Number="NumberExpression",t))(rn||{}),Rt=(t=>(t.Or="or",t.And="and",t.Not="not",t.Expression="expression",t.GetSlot="get_slot",t.GetCardInfo="get_card_info",t))(Rt||{});const _s=x.object({exp:x.literal("not"),exp1:x.lazy(()=>$i)}),Ss=x.object({exp:x.union([x.literal("and"),x.literal("or")]),exps:x.lazy(()=>$i.array()),cannotRemove:x.boolean().optional()}),zl=x.object({exp:x.literal("get_slot"),slotRemId:x.string(),exps:x.lazy(()=>$i)}),Ul=x.object({exp:x.literal("get_card_info"),cardField:x.nativeEnum(Vi),exp1:x.lazy(()=>$i)}),Zl=x.object({exp:x.literal("expression"),refType:x.enum(["Reference","Portal","Tag","TagWithoutInheritance","IsDescendantOf","InDocument","Connection"]),remId:x.string(),cannotRemove:x.boolean().optional(),cannotAdd:x.boolean().optional()}),Pu=x.enum(["concept","descriptor","none"]),Ru=x.object({exp:x.literal("expression"),refType:x.literal("RemType"),remType:Pu});var Wl=(t=>(t.Checked="checked",t.Unchecked="unchecked",t))(Wl||{}),Vl=(t=>(t.Contains="contains",t.DoesNotContain="doesNotContain",t.Is="is",t.IsNot="notIs",t.StartsWith="startsWith",t.EndsWith="endsWith",t.IsEmpty="empty",t.IsNotEmpty="notEmpty",t.DefaultContains="",t))(Vl||{});const Yc=["contains","is","startsWith","endsWith",""];var Pn=(t=>(t.Is="is",t.IsNot="notIs",t.GreaterThan="greaterThan",t.LessThan="lessThan",t.GreaterThanOrEquals="greaterThanOrEquals",t.LessThanOrEquals="lessThanOrEquals",t.IsEmpty="notEmpty",t.IsNotEmpty="empty",t))(Pn||{}),Io=(t=>(t.Is="is",t.IsBefore="before",t.IsAfter="after",t.IsOnOrBefore="onOrBefore",t.IsOnOrAfter="onOrAfter",t.IsBetween="between",t.IsRelativeToToday="relativeToToday",t.IsEmpty="empty",t.IsNotEmpty="notEmpty",t))(Io||{}),Zr=(t=>(t.Today="today",t.StartOfTheWeek="startoftheweek",t.StartOfTheMonth="startofthemonth",t.StartOfTheYear="startoftheyear",t.EndOfTheWeek="endoftheweek",t.EndOfTheMonth="endofthemonth",t.EndOfTheYear="endoftheyear",t))(Zr||{});const ku={today:"Today",startoftheweek:"Start of the week",startofthemonth:"Start of the month",startoftheyear:"Start of the year",endoftheweek:"End of the week",endofthemonth:"End of the month",endoftheyear:"End of the year"};var Es=(t=>(t.Contains="contains",t.DoesNotContain="doesNotContains",t.IsEmpty="empty",t.IsNotEmpty="notEmpty",t))(Es||{}),bo=(t=>(t.Is="is",t.IsNot="notIs",t.IsEmpty="empty",t.IsNotEmpty="notEmpty",t))(bo||{});const Iu=Object.values(Io).filter(t=>t!=="relativeToToday");var Oo=(t=>(t.Past="past",t.Next="next",t.This="this",t))(Oo||{}),Hl=(t=>(t.Day="day",t.Week="week",t.Month="month",t.Year="year",t))(Hl||{});const Hi={"":"contains",contains:"contains",is:"is",notIs:"is not",doesNotContain:"does not contain",startsWith:"starts with",endsWith:"ends with",empty:"is empty",notEmpty:"is not empty"},$l={is:"is",empty:"is empty",notEmpty:"is not empty",after:"is after",before:"is before",between:"is between",onOrAfter:"is on or after",onOrBefore:"is on or before",relativeToToday:"is relative to today"},No={is:"is",notIs:"is not",notEmpty:"is empty",empty:"is not empty",greaterThan:"is greater than",lessThan:"is less than",greaterThanOrEquals:"is greater than or equals",lessThanOrEquals:"is less than or equals"},Ql={contains:"contains",doesNotContains:"does not contains",empty:"is empty",notEmpty:"is not empty"},bu={is:"is",notIs:"is not",empty:"is empty",notEmpty:"is not empty"},Kl=x.object({exp:x.literal("expression"),refType:x.literal("Text"),text:x.string(),matcherType:x.nativeEnum(Vl)}),Ts=x.object({exp:x.literal("expression"),refType:x.literal("NumberExpression"),text:x.string(),matcherType:x.nativeEnum(Pn)}),wi=x.object({exp:x.literal("expression"),refType:x.literal("Date"),date:x.string().optional(),optionalDate:x.string().optional(),dateRelativeMatcher:x.nativeEnum(Zr).optional(),optionalDateRelativeMatcher:x.nativeEnum(Zr).optional(),relativeDateModifier:x.nativeEnum(Oo).optional(),relativePeriodOffset:x.number().optional(),relativeDatePeriod:x.nativeEnum(Hl).optional(),matcherType:x.nativeEnum(Io)}),Gl=x.object({exp:x.literal("expression"),refType:x.literal("Multi Select"),matcherType:x.nativeEnum(Es),remIds:x.array(x.string()).optional()}),Yl=x.object({exp:x.literal("expression"),refType:x.literal("SingleSelect"),matcherType:x.nativeEnum(bo),remId:x.string().optional()}),Xl=x.object({exp:x.literal("expression"),refType:x.literal("Checkbox"),value:x.nativeEnum(Wl)}),St=x.object({exp:x.literal("expression"),refType:x.literal("Single Select"),matcherType:x.nativeEnum(bo),remIds:x.array(x.string()).optional()}),ql=x.lazy(()=>x.union([Zl,Kl,Ts,Ru,wi,Gl,St,Yl,Xl,wi])),$i=x.lazy(()=>x.union([_s,Ss,zl,Ul,ql])),xs=x.object({code:x.string(),name:x.string(),onlyProgrammaticModifying:x.boolean().optional(),hidden:x.boolean().optional(),enumValues:x.record(x.string()).optional(),defaultEnumValue:x.string().optional(),propertyType:x.nativeEnum(Ll).optional(),propertyLocation:x.nativeEnum(Bl).optional(),selectSourceType:x.nativeEnum(vi).optional(),dontPublishToSharedArticle:x.boolean().optional()}),Ou=x.union([x.object({slots:xs.array()}),x.object({properties:xs.array()})]);var Jl=(t=>(t[t.ForwardCard=1]="ForwardCard",t[t.BackwardCard=2]="BackwardCard",t[t.EditInQueue=3]="EditInQueue",t[t.QueueNoticeCard=4]="QueueNoticeCard",t[t.ClozeCard=5]="ClozeCard",t[t.DocumentCard=6]="DocumentCard",t[t.SelectCluster=7]="SelectCluster",t[t.SubFolderSelector=8]="SubFolderSelector",t[t.DailyTargetGoalSelector=10]="DailyTargetGoalSelector",t[t.StreakGoalSelector=11]="StreakGoalSelector",t[t.AddExtraNewOrStaleCards=12]="AddExtraNewOrStaleCards",t[t.SignUpToSaveProgress=14]="SignUpToSaveProgress",t[t.Plugin=15]="Plugin",t[t.DailyCheckpoint=16]="DailyCheckpoint",t[t.Checkpoint=17]="Checkpoint",t[t.Leech=18]="Leech",t[t.StartExamPractice=19]="StartExamPractice",t[t.EndExamPractice=20]="EndExamPractice",t[t.TransitionOutOfActive=21]="TransitionOutOfActive",t[t.PracticeBuried=22]="PracticeBuried",t[t.PracticeAgainForExamTomorrowSlide=23]="PracticeAgainForExamTomorrowSlide",t[t.OfflineImageCards=24]="OfflineImageCards",t[t.PrivateCards=25]="PrivateCards",t))(Jl||{});const Qi={1:"Forward Card",2:"Backward Card",3:"Edit in Queue",4:"Queue Notice Card",5:"Cloze Card",6:"Document Card",7:"Select Cluster",8:"Subfolder Selector",10:"Daily Target Goal Selector",11:"Streak Goal Selector",12:"Add Extra New or Stale Cards",14:"Sign Up to Save Progress",15:"Plugin",16:"Daily Checkpoint",21:"Transition Out Of Active",17:"Checkpoint",18:"Leech",19:"Start Exam Practice",20:"End Exam Practice",22:"Practice Buried",23:"Practice Again for Exam Tomorrow",24:"Offline Image Cards",25:"Private Cards"},Cs=Kc(Qc({},Qi),{18:"It looks like you're struggling to learn and retain this card."});var Ki=tt(854),ea=tt.n(Ki),Ps=Object.defineProperty,Rs=Object.getOwnPropertySymbols,ta=Object.prototype.hasOwnProperty,Nu=Object.prototype.propertyIsEnumerable,na=c((t,r,i)=>r in t?Ps(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"app_defNormalProp"),Du=c((t,r)=>{var i={};for(var s in t)ta.call(t,s)&&r.indexOf(s)<0&&(i[s]=t[s]);if(t!=null&&Rs)for(var s of Rs(t))r.indexOf(s)<0&&Nu.call(t,s)&&(i[s]=t[s]);return i},"__objRest"),Xt=c((t,r,i)=>(na(t,typeof r!="symbol"?r+"":r,i),i),"app_publicField"),qt=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"app_async");const Gi="app";class ks extends Vt{constructor(r,i){super(r,Gi),Xt(this,"plugin"),Xt(this,"waitForInitialSync",()=>qt(this,null,function*(){yield this._call("waitForInitialSync",{})})),Xt(this,"registerPowerup",s=>qt(this,null,function*(){yield this._call("registerPowerup",s)})),Xt(this,"registerWidget",(s,a,d)=>qt(this,null,function*(){yield this._call("registerWidget",{fileName:s,location:a,options:d})})),Xt(this,"unregisterWidget",(s,a)=>qt(this,null,function*(){yield this._call("unregisterWidget",{fileName:s,location:a})})),Xt(this,"registerCommand",s=>qt(this,null,function*(){const a=s,{action:d}=a,p=Du(a,["action"]),h=s.id;this.plugin.model[h]=d,yield this._call("registerCommand",p)})),Xt(this,"registerSidebarButton",s=>qt(this,null,function*(){const{id:a,name:d,action:p}=s;this.plugin.model[a]=p,yield this._call("registerSidebarButton",{id:a,name:d})})),Xt(this,"registerRemMenuItem",s=>qt(this,null,function*(){const{id:a,name:d,action:p}=s;this.plugin.model[a]=p,yield this._call("registerRemMenuItem",{id:a,name:d})})),Xt(this,"registerMenuItem",s=>qt(this,null,function*(){const{id:a,name:d,action:p,location:h}=s;this.plugin.model[a]=p,yield this._call("registerMenuItem",{id:a,name:d,location:h})})),Xt(this,"unregisterMenuItem",s=>qt(this,null,function*(){yield this._call("unregisterMenuItem",{id:s})})),Xt(this,"stealKeys",s=>qt(this,null,function*(){yield this._call("stealKeys",{keys:s})})),Xt(this,"releaseKeys",s=>qt(this,null,function*(){yield this._call("releaseKeys",{keys:s})})),Xt(this,"registerCSS",(s,a)=>qt(this,null,function*(){yield this._call("registerCSS",{id:s,css:a})})),Xt(this,"registerStatusBarItem",(s,a)=>qt(this,null,function*(){yield this._call("registerStatusBarItem",{id:s,html:a})})),Xt(this,"getOperatingSystem",()=>qt(this,null,function*(){return yield this._call("getOperatingSystem",{})})),Xt(this,"getPlatform",()=>qt(this,null,function*(){return yield this._call("getPlatform",{})})),Xt(this,"registerCallback",(s,a)=>{this.plugin.model[s]=a}),Xt(this,"transaction",s=>qt(this,null,function*(){const a=Math.random().toString();this.registerCallback(a,s);const d=yield this._call("transaction",{id:a});return delete this.plugin.model[a],d})),Xt(this,"toast",s=>qt(this,null,function*(){yield this._call("toast",{message:s,options:{}})})),this.plugin=i}}c(ks,"AppNamespace");var ra=Object.defineProperty,Xc=c((t,r,i)=>r in t?ra(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"date_defNormalProp"),Do=c((t,r,i)=>(Xc(t,typeof r!="symbol"?r+"":r,i),i),"date_publicField"),Ir=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"date_async");const Is="date";class Wr extends Vt{constructor(r){super(r,Is),Do(this,"getDailyDoc",i=>Ir(this,null,function*(){const s=yield this.call("getDailyDoc",{date:i});if(s)return new Yt(s,this._call)})),Do(this,"getTodaysDoc",()=>Ir(this,null,function*(){const i=yield this.call("getTodaysDoc",{});if(i)return new Yt(i,this._call)}))}}c(Wr,"DateNamespace");var Au=Object.defineProperty,Vr=Object.getOwnPropertySymbols,Ao=Object.prototype.hasOwnProperty,Yi=Object.prototype.propertyIsEnumerable,Xi=c((t,r,i)=>r in t?Au(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"editor_defNormalProp"),Fu=c((t,r)=>{for(var i in r||(r={}))Ao.call(r,i)&&Xi(t,i,r[i]);if(Vr)for(var i of Vr(r))Yi.call(r,i)&&Xi(t,i,r[i]);return t},"editor_spreadValues"),At=c((t,r,i)=>(Xi(t,typeof r!="symbol"?r+"":r,i),i),"editor_publicField"),Ct=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"editor_async");const Hr="editor";class gt extends Vt{constructor(r){super(r,Hr),At(this,"setText",i=>Ct(this,null,function*(){return this.call("setText",{richText:i})})),At(this,"copy",()=>Ct(this,null,function*(){return this.call("copy",{})})),At(this,"cut",()=>Ct(this,null,function*(){return this.call("cut",{})})),At(this,"deleteCharacters",(i,s)=>Ct(this,null,function*(){return this.call("deleteCharacters",{characters:i,direction:s})})),At(this,"delete",()=>Ct(this,null,function*(){return this.call("delete",{})})),At(this,"getSelectedRem",()=>Ct(this,null,function*(){const i=yield this.getSelection();return i&&i.type===vs.Rem?i:void 0})),At(this,"getSelectedText",()=>Ct(this,null,function*(){const i=yield this.getSelection();return i&&i.type===vs.Text?i:void 0})),At(this,"getSelection",()=>Ct(this,null,function*(){return this.call("getSelection",{})})),At(this,"selectRem",(i,s)=>Ct(this,null,function*(){return this.call("setSelectedLines",{range:i,portalId:s})})),At(this,"selectText",i=>Ct(this,null,function*(){return this.call("setSelectedRichText",Fu({},i))})),At(this,"collapseSelection",i=>Ct(this,null,function*(){return this.call("collapseSelection",{to:i})})),At(this,"undo",()=>Ct(this,null,function*(){return this.call("undo",{})})),At(this,"redo",()=>Ct(this,null,function*(){return this.call("redo",{})})),At(this,"moveCaret",(i,s)=>Ct(this,null,function*(){return this.call("moveCaret",{amount:i,unit:s})})),At(this,"moveCaretVertical",i=>Ct(this,null,function*(){return this.call("moveCaretVertical",{direction:i})})),At(this,"getCaretPosition",()=>Ct(this,null,function*(){return this.call("getCaretPosition",{})})),At(this,"insertPlainText",i=>Ct(this,null,function*(){return this.call("insertPlainText",{string:i})})),At(this,"insertRichText",i=>Ct(this,null,function*(){return this.call("insertRichText",{richText:i})})),At(this,"insertMarkdown",i=>Ct(this,null,function*(){return this.call("insertMarkdown",{markdown:i})})),At(this,"getFocusedEditorText",()=>Ct(this,null,function*(){return this.call("getFocusedEditorText",{})}))}}c(gt,"EditorNamespace");var Ft=Object.defineProperty,$r=c((t,r,i)=>r in t?Ft(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"event_defNormalProp"),on=c((t,r,i)=>($r(t,typeof r!="symbol"?r+"":r,i),i),"event_publicField");const Rn="event";class br extends Vt{constructor(r,i){super(r,Rn),on(this,"plugin"),on(this,"addListener",(s,a,d)=>{s in this.plugin.listeners||(this.plugin.listeners[s]=new Map),this.plugin.listeners[s].get(a)||this.plugin.listeners[s].set(a,[]),!this.plugin.listeners[s].get(a).includes(d)&&(this.plugin.listeners[s].get(a).push(d),this._call("events.addListener",{eventId:s,listenerKey:a}))}),on(this,"removeListener",(s,a,d)=>{const p=this.plugin.listeners[s];if(!p)return;const h=p.get(a);if(h){if(d){const g=h.indexOf(d);if(g==-1)return;h.splice(g,1)}else h.splice(0,h.length);h.length===0&&(p.delete(a),this._call("events.removeListener",{eventId:s,listenerKey:a}))}}),this.plugin=i}}c(br,"EventNamespace");var qi=Object.defineProperty,kn=c((t,r,i)=>r in t?qi(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"focus_defNormalProp"),Fo=c((t,r,i)=>(kn(t,typeof r!="symbol"?r+"":r,i),i),"focus_publicField"),ia=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"focus_async");const Lu="focus";class Ji extends Vt{constructor(r){super(r,Lu),Fo(this,"getFocusedRem",()=>ia(this,null,function*(){const i=yield this.call("getFocusedRem",{});return i?new Yt(i,this._call):void 0})),Fo(this,"getFocusedPortal",()=>ia(this,null,function*(){const i=yield this.call("getFocusedPortal",{});return i?new Yt(i,this._call):void 0}))}}c(Ji,"FocusNamespace");var ju=Object.defineProperty,oa=c((t,r,i)=>r in t?ju(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"knowledge_base_defNormalProp"),mr=c((t,r,i)=>(oa(t,typeof r!="symbol"?r+"":r,i),i),"knowledge_base_publicField"),Mu=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"knowledge_base_async");const sa="kb";class Lo{constructor(r){mr(this,"_call"),mr(this,"call"),mr(this,"getCurrentKnowledgeBaseData",()=>Mu(this,null,function*(){return this.call("getCurrentKnowledgeBaseData",{})})),mr(this,"isPrimaryKnowledgeBase",()=>Mu(this,null,function*(){return this.call("isPrimaryKnowledgeBase",{})})),this._call=r,this.call=Ur(this._call,sa)}}c(Lo,"KnowledgeBaseNamespace");var qc=Object.defineProperty,Bu=c((t,r,i)=>r in t?qc(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"messaging_defNormalProp"),la=c((t,r,i)=>(Bu(t,typeof r!="symbol"?r+"":r,i),i),"messaging_publicField"),Jc=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"messaging_async");const bs="messaging";class Os extends Vt{constructor(r){super(r,bs),la(this,"broadcast",i=>Jc(this,null,function*(){return this.call("broadcast",{message:i})}))}}c(Os,"MessagingNamespace");var zu=Object.defineProperty,Uu=c((t,r,i)=>r in t?zu(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"powerup_defNormalProp"),aa=c((t,r,i)=>(Uu(t,typeof r!="symbol"?r+"":r,i),i),"powerup_publicField"),Ns=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"powerup_async");const ed="powerup";class rr extends Vt{constructor(r){super(r,ed),aa(this,"getPowerupByCode",i=>Ns(this,null,function*(){const s=yield this.call("getPowerupByCode",{powerupCode:i});if(s)return new Yt(s,this._call)})),aa(this,"getPowerupSlotByCode",(i,s)=>Ns(this,null,function*(){const a=Object.values(kr).includes(i)?Ui[i][s]:s,d=yield this.call("getPowerupSlotByCode",{powerupCode:i,powerupSlot:a});if(d)return new Yt(d,this._call)}))}}c(rr,"PowerupNamespace");class jo{static and(r){return{exp:Rt.And,exps:r}}static or(r){return{exp:Rt.Or,exps:r}}static not(r){return{exp:Rt.Not,exp1:r}}static cardInfo(r,i){return{exp:Rt.GetCardInfo,cardField:r,exp1:i}}static tableColumn(r,i){return{exp:Rt.GetSlot,slotRemId:r,exps:i}}static hasReferenceTo(r){return{exp:Rt.Expression,refType:rn.Reference,remId:r}}static text(r,i){return{exp:Rt.Expression,refType:rn.Text,text:i||"",matcherType:r}}static documentsThatContain(r){return{exp:Rt.Expression,refType:rn.Portal,remId:r}}static isTaggedWith(r){return{exp:Rt.Expression,refType:rn.Tag,remId:r}}static isDirectlyTaggedWith(r){return{exp:Rt.Expression,refType:rn.TagWithoutInheritance,remId:r}}static isDescendantOf(r){return{exp:Rt.Expression,refType:rn.IsDescendantOf,remId:r}}static isInDocument(r){return{exp:Rt.Expression,refType:rn.InDocument,remId:r}}static hasAnyConnectionTo(r){return{exp:Rt.Expression,refType:rn.Connection,remId:r}}static hasRemType(r){return{exp:Rt.Expression,refType:rn.RemType,remType:r}}static tagWithoutInheritance(r){return{exp:Rt.Expression,refType:rn.TagWithoutInheritance,remId:r}}static multiSelect(r,i){return{exp:Rt.Expression,refType:rn.MultiSelect,matcherType:r,remIds:i}}static singleSelect(r,i){return{exp:Rt.Expression,refType:rn.SingleSelect,matcherType:r,remIds:i}}static checkbox(r){return{exp:Rt.Expression,refType:rn.Checkbox,value:r}}static date(r,i,s){return{exp:Rt.Expression,refType:rn.Date,matcherType:r,date:typeof i=="string"||i==null?void 0:i.toISOString(),dateRelativeMatcher:typeof i=="string"?i:void 0,optionalDate:typeof s=="string"||s==null?void 0:s.toISOString(),optionalDateRelativeMatcher:typeof s=="string"?s:void 0}}static dateRelativeToToday(r,i,s){return{exp:Rt.Expression,refType:rn.Date,matcherType:Io.IsRelativeToToday,relativeDateModifier:r,relativePeriodOffset:s,relativeDatePeriod:i}}static number(r,i){return{exp:Rt.Expression,refType:rn.Number,text:i?.toString()||"",matcherType:r}}}c(jo,"Query_DUPE_2");var ua=Object.defineProperty,Zu=c((t,r,i)=>r in t?ua(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"queue_defNormalProp"),yt=c((t,r,i)=>(Zu(t,typeof r!="symbol"?r+"":r,i),i),"queue_publicField"),dn=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"queue_async");const Wu="queue";class Or extends Vt{constructor(r){super(r,Wu),yt(this,"getAverageTimePerCard",()=>dn(this,null,function*(){return yield this.call("getAverageTimePerCard",{})})),yt(this,"getCurrentQueueScreenType",()=>dn(this,null,function*(){return yield this.call("getCurrentQueueScreenType",{})})),yt(this,"goBackToPreviousCard",()=>dn(this,null,function*(){yield this.call("goBackToPreviousCard",{})})),yt(this,"hasRevealedAnswer",()=>dn(this,null,function*(){return yield this.call("hasRevealedAnswer",{})})),yt(this,"showAnswer",()=>dn(this,null,function*(){yield this.call("showAnswer",{})})),yt(this,"rateCurrentCard",i=>dn(this,null,function*(){yield this.call("rateCurrentCard",{score:i})})),yt(this,"isTypeAnswerEnabled",()=>dn(this,null,function*(){return yield this.call("isTypeAnswerEnabled",{})})),yt(this,"getCurrentCard",()=>dn(this,null,function*(){const i=yield this.call("getCurrentCard",{});return i?new pr(i,this._call):void 0})),yt(this,"getNumRemainingCards",()=>dn(this,null,function*(){return yield this.call("getNumRemainingCards",{})})),yt(this,"getCurrentStreak",()=>dn(this,null,function*(){return yield this.call("getCurrentStreak",{})})),yt(this,"removeCurrentCardFromQueue",(i=!0)=>dn(this,null,function*(){yield this.call("removeCurrentCardFromQueue",{addToBackStack:i})})),yt(this,"inLookbackMode",()=>dn(this,null,function*(){return yield this.call("inLookbackMode",{})}))}}c(Or,"QueueNamespace");var Mo=Object.defineProperty,gr=c((t,r,i)=>r in t?Mo(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"reader_defNormalProp"),Vu=c((t,r,i)=>(gr(t,typeof r!="symbol"?r+"":r,i),i),"reader_publicField"),Hu=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"reader_async");class jn extends Vt{constructor(r){super(r,"reader"),Vu(this,"callAndReturnRem",(i,s)=>Hu(this,null,function*(){const a=yield this.call(i,s||{});if(a)return new Yt(a,this._call)}))}addHighlight(){return Hu(this,null,function*(){return this.callAndReturnRem("addHighlight")})}}c(jn,"ReaderNamespace");var Ds=Object.defineProperty,As=Object.defineProperties,eo=Object.getOwnPropertyDescriptors,Bo=Object.getOwnPropertySymbols,ca=Object.prototype.hasOwnProperty,da=Object.prototype.propertyIsEnumerable,Fs=c((t,r,i)=>r in t?Ds(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"rich_text_defNormalProp"),to=c((t,r)=>{for(var i in r||(r={}))ca.call(r,i)&&Fs(t,i,r[i]);if(Bo)for(var i of Bo(r))da.call(r,i)&&Fs(t,i,r[i]);return t},"rich_text_spreadValues"),Vn=c((t,r)=>As(t,eo(r)),"rich_text_spreadProps"),Re=c((t,r,i)=>(Fs(t,typeof r!="symbol"?r+"":r,i),i),"rich_text_publicField"),lt=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"rich_text_async");const $u="richText";class mn{constructor(r){Re(this,"richText",[]),Re(this,"richTextNamespace"),Re(this,"code",(i,s)=>(this.richText.push({i:"m",code:!0,language:s,text:i}),this)),Re(this,"image",(i,s,a)=>(this.richText.push({i:"i",url:i,width:s,height:a}),this)),Re(this,"rem",i=>{const s={i:"q",_id:Gt(i)};return this.richText.push(s),this}),Re(this,"text",(i,s=[])=>{if(s.length===0)return this.richText.push(i),this;const a=Object.fromEntries(s.map(d=>ws[d]?["h",ws[d]]:[Nl[d],!0])||[]);return this.richText.push(Vn(to({i:"m"},a),{text:i})),this}),Re(this,"audio",i=>(this.richText.push({i:"a",url:i,onlyAudio:!0}),this)),Re(this,"latex",(i,s=!1)=>(this.richText.push({i:"x",text:i,block:s}),this)),Re(this,"video",i=>(this.richText.push({i:"a",url:i,onlyAudio:!1}),this)),Re(this,"newline",()=>(this.richText.push(`
13
+ `),this)),Re(this,"value",()=>this.richTextNamespace.normalize(this.richText)),this.richTextNamespace=r}}c(mn,"RichTextBuilder");class yr extends Vt{constructor(r){super(r,$u),Re(this,"indexOfElementAt",(i,s)=>lt(this,null,function*(){return this.call("indexOfElementAt",{richText:i,position:s})})),Re(this,"normalize",i=>lt(this,null,function*(){return this.call("normalize",{richText:i})})),Re(this,"removeTextFormatFromRange",(i,s,a,d)=>lt(this,null,function*(){return this.call("removeTextFormatFromRange",{text:i,start:s,end:a,format:d})})),Re(this,"applyTextFormatToRange",(i,s,a,d)=>lt(this,null,function*(){return this.call("applyTextFormatToRange",{text:i,start:s,end:a,format:d})})),Re(this,"toggleTextFormatOnRange",(i,s,a,d)=>lt(this,null,function*(){return this.call("toggleTextFormatOnRange",{text:i,start:s,end:a,format:d})})),Re(this,"replaceAllRichText",(i,s,a)=>lt(this,null,function*(){return this.call("replaceAllRichText",{richText:i,findText:s,replacementText:a})})),Re(this,"splitRichText",(i,s)=>lt(this,null,function*(){return this.call("splitRichText",{richText:i,splitText:s})})),Re(this,"empty",(i,s)=>lt(this,null,function*(){return this.call("empty",{richText:i,allowSpaces:s})})),Re(this,"indexOf",(i,s,a)=>lt(this,null,function*(){return this.call("indexOf",{richText:i,character:s,startChar:a})})),Re(this,"toHTML",i=>lt(this,null,function*(){return this.call("toHTML",{richText:i})})),Re(this,"length",i=>lt(this,null,function*(){return this.call("length",{richText:i})})),Re(this,"trimEnd",i=>lt(this,null,function*(){return this.call("trimEnd",{richText:i})})),Re(this,"trimStart",i=>lt(this,null,function*(){return this.call("trimStart",{richText:i})})),Re(this,"trim",i=>lt(this,null,function*(){return this.call("trim",{richText:i})})),Re(this,"split",(i,s)=>lt(this,null,function*(){return this.call("split",{richText:i,separationCharacter:s})})),Re(this,"deepGetRemAndAliasIdsFromRichText",i=>lt(this,null,function*(){return this.call("deepGetRemAndAliasIdsFromRichText",{richText:i})})),Re(this,"deepGetRemIdsFromRichText",i=>lt(this,null,function*(){return this.call("deepGetRemIdsFromRichText",{richText:i})})),Re(this,"findAllExternalURLs",i=>lt(this,null,function*(){return this.call("findAllExternalURLs",{richText:i})})),Re(this,"getRemAndAliasIdsFromRichText",i=>lt(this,null,function*(){return this.call("getRemAndAliasIdsFromRichText",{richText:i})})),Re(this,"getRemIdsFromRichText",i=>lt(this,null,function*(){return this.call("getRemIdsFromRichText",{richText:i})})),Re(this,"equals",(i,s)=>lt(this,null,function*(){return this.call("equals",{richText1:i,richText2:s})})),Re(this,"substring",(i,s,a)=>lt(this,null,function*(){return this.call("substring",{richText:i,start:s,end:a})})),Re(this,"charAt",(i,s)=>lt(this,null,function*(){return this.call("charAt",{richText:i,index:s})})),Re(this,"toString",i=>lt(this,null,function*(){return this.call("toString",{richText:i})})),Re(this,"toMarkdown",i=>lt(this,null,function*(){return this.call("toMarkdown",{richText:i})})),Re(this,"parseFromMarkdown",i=>lt(this,null,function*(){return this.call("parseFromMarkdown",{markdown:i})})),Re(this,"parseAndInsertHtml",(i,s)=>lt(this,null,function*(){const a=Gt(s);return this.call("parseAndInsertHtml",{html:i,remId:a})}))}get code(){return new mn(this).code}get image(){return new mn(this).image}get rem(){return new mn(this).rem}get text(){return new mn(this).text}get audio(){return new mn(this).audio}get latex(){return new mn(this).latex}get video(){return new mn(this).video}get newline(){return new mn(this).newline}}c(yr,"RichTextNamespace");const Qu="scheduler";class _i extends Vt{constructor(r){super(r,Qu)}registerCustomScheduler(r,i){return this.call("registerCustomScheduler",{name:r,parameters:i})}}c(_i,"SchedulerNamespace");var Ku=Object.defineProperty,Gu=c((t,r,i)=>r in t?Ku(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"search_defNormalProp"),Ls=c((t,r,i)=>(Gu(t,typeof r!="symbol"?r+"":r,i),i),"search_publicField"),js=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"search_async");const Yu="search";class Ms extends Vt{constructor(r){super(r,Yu),Ls(this,"search",(i,s,a)=>js(this,null,function*(){const d=Gt(s);return((yield this.call("search",{queryText:i,searchContextRemId:d,options:a}))||[]).map(p=>new Yt(p,this._call))}))}}c(Ms,"SearchNamespace");var Xu=Object.defineProperty,Bs=Object.getOwnPropertySymbols,zs=Object.prototype.hasOwnProperty,zo=Object.prototype.propertyIsEnumerable,no=c((t,r,i)=>r in t?Xu(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"settings_defNormalProp"),Uo=c((t,r)=>{for(var i in r||(r={}))zs.call(r,i)&&no(t,i,r[i]);if(Bs)for(var i of Bs(r))zo.call(r,i)&&no(t,i,r[i]);return t},"settings_spreadValues"),Qr=c((t,r,i)=>(no(t,typeof r!="symbol"?r+"":r,i),i),"settings_publicField"),ro=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"settings_async");const Zo="settings";class Hn extends Vt{constructor(r){super(r,Zo),Qr(this,"registerDropdownSetting",i=>ro(this,null,function*(){return this.call("registerDropdownSetting",Uo({},i))})),Qr(this,"registerBooleanSetting",i=>ro(this,null,function*(){return this.call("registerBooleanSetting",Uo({},i))})),Qr(this,"registerStringSetting",i=>ro(this,null,function*(){return this.call("registerStringSetting",Uo({},i))})),Qr(this,"registerNumberSetting",i=>ro(this,null,function*(){return this.call("registerNumberSetting",Uo({},i))})),Qr(this,"getSetting",i=>ro(this,null,function*(){return yield this.call("getSetting",{settingId:i})}))}}c(Hn,"SettingsNamespace");var Wo=Object.defineProperty,Vo=c((t,r,i)=>r in t?Wo(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"storage_defNormalProp"),$n=c((t,r,i)=>(Vo(t,typeof r!="symbol"?r+"":r,i),i),"storage_publicField"),Kr=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"storage_async");const io="storage";class Us extends Vt{constructor(r){super(r,io),$n(this,"setSession",(i,s)=>Kr(this,null,function*(){return this.call("setSession",{key:i,value:s})})),$n(this,"getSession",i=>Kr(this,null,function*(){if(i)return this.call("getSession",{key:i})})),$n(this,"setSynced",(i,s)=>Kr(this,null,function*(){return this.call("setSynced",{key:i,value:s})})),$n(this,"getSynced",i=>Kr(this,null,function*(){if(i)return this.call("getSynced",{key:i})})),$n(this,"setLocal",(i,s)=>Kr(this,null,function*(){return this.call("setLocal",{key:i,value:s})})),$n(this,"getLocal",i=>Kr(this,null,function*(){if(i)return this.call("getLocal",{key:i})}))}}c(Us,"StorageNamespace");var fa=Object.defineProperty,Lt=c((t,r,i)=>r in t?fa(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"widget_defNormalProp"),Gr=c((t,r,i)=>(Lt(t,typeof r!="symbol"?r+"":r,i),i),"widget_publicField"),Mn=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"widget_async");const Yr="widget";class Qn extends Vt{constructor(r){super(r,Yr),Gr(this,"getWidgetsAtLocation",(i,s)=>Mn(this,null,function*(){return this.call("getWidgetsAtLocation",{location:i,remId:s})})),Gr(this,"getDimensions",i=>Mn(this,null,function*(){return this.call("getDimensions",{widgetInstanceId:i})})),Gr(this,"openPopup",(i,s,a)=>Mn(this,null,function*(){return this.call("openPopup",{widgetFileName:i,contextData:s,clickOutsideToClose:a})})),Gr(this,"closePopup",(i=!0)=>Mn(this,null,function*(){return this.call("closePopup",{restoreFocus:i})})),Gr(this,"getWidgetContext",()=>Mn(this,null,function*(){return this.call("getWidgetContext",{})}))}}c(Qn,"WidgetNamespace");var qu=Object.defineProperty,Ju=c((t,r,i)=>r in t?qu(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"window_defNormalProp"),kt=c((t,r,i)=>(Ju(t,typeof r!="symbol"?r+"":r,i),i),"window_publicField"),It=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"window_async");const Zs="window";class Ho extends Vt{constructor(r){super(r,Zs),kt(this,"stealKeys",(i,s)=>It(this,null,function*(){yield this.call("stealKeys",{keys:s,id:i})})),kt(this,"releaseKeys",(i,s)=>It(this,null,function*(){yield this.call("releaseKeys",{keys:s,id:i})})),kt(this,"openFloatingWidget",(i,s,a,d)=>It(this,null,function*(){return yield this.call("openFloatingWidget",{fileName:i,position:s,classContainer:a,closeWhenClickOutside:d})})),kt(this,"closeFloatingWidget",i=>It(this,null,function*(){return yield this.call("closeFloatingWidget",{floatingWidgetId:i})})),kt(this,"isFloatingWidgetOpen",i=>It(this,null,function*(){return yield this.call("isFloatingWidgetOpen",{floatingWidgetId:i})})),kt(this,"setFloatingWidgetPosition",(i,s)=>It(this,null,function*(){return yield this.call("setFloatingWidgetPosition",{floatingWidgetId:i,position:s})})),kt(this,"closeAllFloatingWidgets",()=>It(this,null,function*(){return yield this.call("closeAllFloatingWidgets",{})})),kt(this,"getCurrentWindowTree",()=>It(this,null,function*(){return yield this.call("getCurrentWindowTree",{})})),kt(this,"setRemWindowTree",i=>It(this,null,function*(){return yield this.call("setRemWindowTree",{tree:i})})),kt(this,"getLastFocusedPane",()=>It(this,null,function*(){return yield this.call("getLastFocusedPane",{})})),kt(this,"setCurrentWindowTreeFromString",i=>It(this,null,function*(){return yield this.call("setCurrentWindowTreeFromString",{treeString:i})})),kt(this,"getOpenPaneIds",()=>It(this,null,function*(){return yield this.call("getOpenPaneIds",{})})),kt(this,"getFocusedPaneId",()=>It(this,null,function*(){return yield this.call("getFocusedPaneId",{})})),kt(this,"setFocusedPaneId",i=>It(this,null,function*(){return yield this.call("setFocusedPaneId",{paneId:i})})),kt(this,"getURL",()=>It(this,null,function*(){return yield this.call("getURL",{})})),kt(this,"setURL",i=>It(this,null,function*(){return yield this.call("setURL",{url:i})})),kt(this,"openRem",i=>It(this,null,function*(){return yield this.call("openRem",{remId:i._id})})),kt(this,"getOpenPaneRemIds",()=>It(this,null,function*(){return yield this.call("getOpenPaneRemIds",{})})),kt(this,"getOpenPaneRemId",i=>It(this,null,function*(){if(i)return yield this.call("getOpenPaneRemId",{paneId:i})})),kt(this,"openWidgetInPane",(i,s)=>It(this,null,function*(){return yield this.call("openWidgetInPane",{fileName:i,contextData:s})})),kt(this,"openWidgetInRightSidebar",(i,s)=>It(this,null,function*(){return yield this.call("openWidgetInRightSidebar",{fileName:i,contextData:s})})),kt(this,"isOnPage",i=>It(this,null,function*(){return yield this.call("isOnPage",{page:i})}))}}c(Ho,"WindowNamespace");var oo=Object.defineProperty,Ws=Object.getOwnPropertySymbols,$o=Object.prototype.hasOwnProperty,Kn=Object.prototype.propertyIsEnumerable,Si=c((t,r,i)=>r in t?oo(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"plugin_base_defNormalProp"),zt=c((t,r)=>{for(var i in r||(r={}))$o.call(r,i)&&Si(t,i,r[i]);if(Ws)for(var i of Ws(r))Kn.call(r,i)&&Si(t,i,r[i]);return t},"plugin_base_spreadValues"),Te=c((t,r,i)=>(Si(t,typeof r!="symbol"?r+"":r,i),i),"plugin_base_publicField"),dt=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"plugin_base_async");class so{constructor(){Te(this,"apiCallPromise",{}),Te(this,"model",{}),Te(this,"listeners",{}),Te(this,"usedMessageIds",1),Te(this,"widgetInstanceId"),Te(this,"inSandbox"),Te(this,"isNative"),Te(this,"rootURL"),Te(this,"mountDiv"),Te(this,"widgetBodyResizeObserver",null),Te(this,"widgetOptions"),Te(this,"manifest"),Te(this,"id"),Te(this,"app",new ks(this._call.bind(this),this)),Te(this,"editor",new gt(this._call.bind(this))),Te(this,"event",new br(this._call.bind(this),this)),Te(this,"messaging",new Os(this._call.bind(this))),Te(this,"focus",new Ji(this._call.bind(this))),Te(this,"date",new Wr(this._call.bind(this))),Te(this,"widget",new Qn(this._call.bind(this))),Te(this,"window",new Ho(this._call.bind(this))),Te(this,"powerup",new rr(this._call.bind(this))),Te(this,"richText",new yr(this._call.bind(this))),Te(this,"rem",new ji(this._call.bind(this))),Te(this,"card",new yi(this._call.bind(this))),Te(this,"storage",new Us(this._call.bind(this))),Te(this,"settings",new Hn(this._call.bind(this))),Te(this,"search",new Ms(this._call.bind(this))),Te(this,"kb",new Lo(this._call.bind(this))),Te(this,"scheduler",new _i(this._call.bind(this))),Te(this,"queue",new Or(this._call.bind(this))),Te(this,"reader",new jn(this._call.bind(this))),window.onmessage=r=>{this._receive(r)},this.pluginLogger=ea()(`plugin:${this.id||"Plugin"}`),this.logApi=ea()(`plugin:API:${this.id||"Plugin"}`),this.logApi("START"),this.event.addListener(A.onActivate,void 0,this.receiveActivateMessage.bind(this)),this.event.addListener(A.onDeactivate,void 0,this.receiveDeactivateMessage.bind(this)),this.event.addListener(A.setDarkMode,void 0,this.setDarkMode.bind(this)),this.event.addListener(A.setCustomCSS,void 0,this.setCustomCSS.bind(this)),this._call("askToActivate",{})}pluginLogger(...r){}logApi(...r){}setDarkMode({darkMode:r}){this.inSandbox&&(document.body.classList.add(r?"dark":"light"),document.body.classList.remove(r?"light":"dark"))}setCustomCSS({cssBlocks:r,cssUrls:i}){const s=document.getElementsByTagName("head")[0];for(const a of[...s.children])a.classList.contains("custom-css")&&a.remove();for(const a of r){const d=document.createElement("style");d.classList.add("custom-css"),d.innerHTML=a,s.appendChild(d)}for(const a of i){const d=document.createElement("link");d.classList.add("custom-css"),d.rel="stylesheet",d.href=a,s.appendChild(d)}}track(r){let i=!1,s=!1,a=!1,d=[];const p=c(()=>{if(i){for(const{event:h,key:g}of d.flatMap(_=>_.reactiveDeps))this.event.removeListener(h,g,p);return}else s?a=!0:(s=!0,c(()=>dt(this,null,function*(){d=yield hd(this,r,p,()=>{},d||[]),s=!1,a&&(a=!1,p())}),"effect")())},"run");return p(),()=>{i=!0}}loadManifest(){return dt(this,null,function*(){if(!this.manifest)try{const r=yield fetch(this.rootURL+"manifest.json");if(r.ok){const i=yield r.json();this.manifest=i,this.id=i.id}}catch(r){console.log("Failed to load manifest.json",r)}})}receiveActivateMessage(r){return dt(this,null,function*(){var i,s,a,d,p;if(!r.inSandbox&&!((i=window.activeWidgetIds)!=null&&i.has(r.widgetInstanceId))){console.error("Not activating widget",r.widgetInstanceId,"as it is already unmounted");return}if(!r.inSandbox&&!r.mountDiv)throw new Error("Native plugin didn't receive mountDiv");const h=r.inSandbox?this.createMountDiv():r.mountDiv;this.inSandbox=r.inSandbox,this.isNative=!r.inSandbox,this.widgetOptions=r.widgetOptions,this.widgetInstanceId=r.widgetInstanceId,this.rootURL=r.rootURL,this.mountDiv=h,yield this.loadManifest(),this.isNative&&(window.widgetIdToWidget[this.widgetInstanceId]=this),this.onActivate(h,r.rootURL);const g=(a=(s=r.widgetOptions)==null?void 0:s.dimensions)==null?void 0:a.height,_=(p=(d=r.widgetOptions)==null?void 0:d.dimensions)==null?void 0:p.width;if(_=="auto"&&r.inSandbox&&(h.style.display="inline-block"),(g==="auto"||_==="auto")&&this.autoAdjustWidgetContainerDimension(),r.inSandbox&&(g==="auto"&&(document.documentElement.style.overflowY="hidden"),_==="auto"&&(document.documentElement.style.overflowX="hidden")),r.inSandbox)for(const le of r.styleSheetHREFs){const je=document.createElement("link");je.href=le,je.rel="stylesheet",document.getElementsByTagName("head")[0].appendChild(je)}yield this._call("activateCompleted",{})})}receiveDeactivateMessage(r){return dt(this,null,function*(){this.widgetBodyResizeObserver&&this.widgetBodyResizeObserver.disconnect(),this.onDeactivate()})}createMountDiv(){const r=document.createElement("div");return document.body.appendChild(r),r}log(...r){this.pluginLogger(r)}_call(r,i,s){return dt(this,null,function*(){const a=this.usedMessageIds++;typeof s=="string"?r=s+"."+r:typeof s=="object"&&(r=[...s,r].join("."));const d={pluginId:this.id,widgetInstanceId:this.widgetInstanceId,methodName:r,args:i,messageId:a,isIntendedForRemNoteAPIMain:!0};this.logApi("Call",a);const p=this.isNative?window:window.parent,h=yield new Promise(g=>{this.apiCallPromise[a]=g;try{p.postMessage(d,"*")}catch{console.error(`Failed to call plugin method with arguments: ${r} ${i}`)}});if(this.logApi("Got response",h),h!=null&&h.error)throw new Error("Plugin Error: "+h.error);return h?.response})}_receive(r){return dt(this,null,function*(){var i,s,a;if((i=r.data)!=null&&i.isIntendedForRemNoteAPIPlugin){const d=r.data;if("messageId"in d){const p=d.messageId;this.logApi("API _receive",p,d,this.apiCallPromise[p]),this.apiCallPromise[p](d),delete this.apiCallPromise[p]}else if("callbackId"in d){const p=this.model[d.callbackId];p||console.error(`Tried to execute callback ${d.callbackId}, but it was not registered`);const h=yield p?.(d.args);d.callbackReturnValueHandlerId&&this._call("handleCallbackResponse",{result:h,callbackReturnValueHandlerId:d.callbackReturnValueHandlerId},"callback")}else if("eventId"in d){if(!$(d.eventId))throw new Error("Invalid event "+d.eventId);(a=(s=this.listeners[d.eventId])==null?void 0:s.get(d.listenerKey))==null||a.forEach(p=>p(d.args))}}})}autoAdjustWidgetContainerDimension(){return dt(this,null,function*(){const r=new ResizeObserver(s=>{for(let a of s)if(a.contentBoxSize){const d=window.getComputedStyle(a.target),p=parseFloat(d.getPropertyValue("margin-block-start"))||0,h=parseFloat(d.getPropertyValue("margin-block-end"))||0,g=parseFloat(d.getPropertyValue("margin-inline-start"))||0,_=parseFloat(d.getPropertyValue("margin-inline-end"))||0,le={height:a.contentBoxSize[0].blockSize+p+h,width:a.contentBoxSize[0].inlineSize+g+_};this._call("widgetEvents.updateWidgetContainerDimension",le)}}),i=this.inSandbox?this.mountDiv:this.mountDiv.firstChild;i&&(r.observe(i),this.widgetBodyResizeObserver=r)})}createFakeEmbedComponent(r){return dt(this,null,function*(){return this._call("widgetEvents.createFakeEmbedComponent",r)})}unmountFakeEmbedComponent(r){return dt(this,null,function*(){return this._call("widgetEvents.unmountFakeEmbedComponent",{id:r})})}updateFakeEmbedComponentRect(r,i){return dt(this,null,function*(){return this._call("widgetEvents.updateFakeEmbedComponentRect",zt({id:r},i))})}updateFakeEmbedExternalProps(r,i){return dt(this,null,function*(){return this._call("widgetEvents.updateFakeEmbedExternalProps",{id:r,externalProps:i})})}ping(){return dt(this,null,function*(){return yield this._call("ping",{})})}}c(so,"RNPlugin");var ft=tt(232);let In=c(t=>crypto.getRandomValues(new Uint8Array(t)),"random"),pa=c((t,r,i)=>{let s=(2<<Math.log(t.length-1)/Math.LN2)-1,a=-~(1.6*s*r/t.length);return(d=r)=>{let p="";for(;;){let h=i(a),g=a;for(;g--;)if(p+=t[h[g]&s]||"",p.length===d)return p}}},"customRandom"),ec=c((t,r=21)=>pa(t,r,In),"customAlphabet"),Ei=c((t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((r,i)=>(i&=63,i<36?r+=i.toString(36):i<62?r+=(i-26).toString(36).toUpperCase():i>62?r+="-":r+="_",r),""),"nanoid");var se=tt(359),ir=tt.n(se),lo="1.13.6",ao=typeof self=="object"&&self.self===self&&self||typeof qe.g=="object"&&qe.g.global===qe.g&&qe.g||Function("return this")()||{},Qo=Array.prototype,Vs=Object.prototype,ha=typeof Symbol<"u"?Symbol.prototype:null,Ko=Qo.push,Xr=Qo.slice,uo=Vs.toString,Hs=Vs.hasOwnProperty,$s=typeof ArrayBuffer<"u",ma=typeof DataView<"u",tc=Array.isArray,Go=Object.keys,ga=Object.create,ya=$s&&ArrayBuffer.isView,nc=isNaN,va=isFinite,wa=!{toString:null}.propertyIsEnumerable("toString"),_a=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],td=Math.pow(2,53)-1;function fn(t,r){return r=r==null?t.length-1:+r,function(){for(var i=Math.max(arguments.length-r,0),s=Array(i),a=0;a<i;a++)s[a]=arguments[a+r];switch(r){case 0:return t.call(this,s);case 1:return t.call(this,arguments[0],s);case 2:return t.call(this,arguments[0],arguments[1],s)}var d=Array(r+1);for(a=0;a<r;a++)d[a]=arguments[a];return d[r]=s,t.apply(this,d)}}c(fn,"restArguments");function or(t){var r=typeof t;return r==="function"||r==="object"&&!!t}c(or,"isObject");function rc(t){return t===null}c(rc,"isNull");function Sa(t){return t===void 0}c(Sa,"isUndefined");function Ea(t){return t===!0||t===!1||uo.call(t)==="[object Boolean]"}c(Ea,"isBoolean");function ic(t){return!!(t&&t.nodeType===1)}c(ic,"isElement");function vt(t){var r="[object "+t+"]";return function(i){return uo.call(i)===r}}c(vt,"tagTester");var gn=vt("String"),Ta=vt("Number"),oc=vt("Date"),sc=vt("RegExp"),xa=vt("Error"),Ca=vt("Symbol"),Qs=vt("ArrayBuffer"),Pa=vt("Function"),Ra=ao.document&&ao.document.childNodes;typeof Int8Array!="object"&&typeof Ra!="function"&&(Pa=c(function(t){return typeof t=="function"||!1},"isFunction"));var yn=Pa,Yo=vt("Object"),ka=ma&&Yo(new DataView(new ArrayBuffer(8))),Ks=typeof Map<"u"&&Yo(new Map),lc=vt("DataView");function Ia(t){return t!=null&&yn(t.getInt8)&&Qs(t.buffer)}c(Ia,"ie10IsDataView");var Xo=ka?Ia:lc,Nr=tc||vt("Array");function vr(t,r){return t!=null&&Hs.call(t,r)}c(vr,"has");var sr=vt("Arguments");(function(){sr(arguments)||(sr=c(function(t){return vr(t,"callee")},"isArguments"))})();var Gs=sr;function Ys(t){return!Ca(t)&&va(t)&&!isNaN(parseFloat(t))}c(Ys,"isFinite_isFinite");function Xs(t){return Ta(t)&&nc(t)}c(Xs,"isNaN_isNaN");function qs(t){return function(){return t}}c(qs,"constant");function Ti(t){return function(r){var i=t(r);return typeof i=="number"&&i>=0&&i<=td}}c(Ti,"createSizePropertyCheck");function ba(t){return function(r){return r?.[t]}}c(ba,"shallowProperty");var Js=ba("byteLength"),Oa=Ti(Js),Na=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function ac(t){return ya?ya(t)&&!Xo(t):Oa(t)&&Na.test(uo.call(t))}c(ac,"isTypedArray");var Da=$s?ac:qs(!1),En=ba("length");function uc(t){for(var r={},i=t.length,s=0;s<i;++s)r[t[s]]=!0;return{contains:function(a){return r[a]===!0},push:function(a){return r[a]=!0,t.push(a)}}}c(uc,"emulatedSet");function el(t,r){r=uc(r);var i=_a.length,s=t.constructor,a=yn(s)&&s.prototype||Vs,d="constructor";for(vr(t,d)&&!r.contains(d)&&r.push(d);i--;)d=_a[i],d in t&&t[d]!==a[d]&&!r.contains(d)&&r.push(d)}c(el,"collectNonEnumProps");function Jt(t){if(!or(t))return[];if(Go)return Go(t);var r=[];for(var i in t)vr(t,i)&&r.push(i);return wa&&el(t,r),r}c(Jt,"keys");function cc(t){if(t==null)return!0;var r=En(t);return typeof r=="number"&&(Nr(t)||gn(t)||Gs(t))?r===0:En(Jt(t))===0}c(cc,"isEmpty");function tl(t,r){var i=Jt(r),s=i.length;if(t==null)return!s;for(var a=Object(t),d=0;d<s;d++){var p=i[d];if(r[p]!==a[p]||!(p in a))return!1}return!0}c(tl,"isMatch");function et(t){if(t instanceof et)return t;if(!(this instanceof et))return new et(t);this._wrapped=t}c(et,"_"),et.VERSION=lo,et.prototype.value=function(){return this._wrapped},et.prototype.valueOf=et.prototype.toJSON=et.prototype.value,et.prototype.toString=function(){return String(this._wrapped)};function nl(t){return new Uint8Array(t.buffer||t,t.byteOffset||0,Js(t))}c(nl,"toBufferView");var Aa="[object DataView]";function qo(t,r,i,s){if(t===r)return t!==0||1/t===1/r;if(t==null||r==null)return!1;if(t!==t)return r!==r;var a=typeof t;return a!=="function"&&a!=="object"&&typeof r!="object"?!1:Jo(t,r,i,s)}c(qo,"eq");function Jo(t,r,i,s){t instanceof et&&(t=t._wrapped),r instanceof et&&(r=r._wrapped);var a=uo.call(t);if(a!==uo.call(r))return!1;if(ka&&a=="[object Object]"&&Xo(t)){if(!Xo(r))return!1;a=Aa}switch(a){case"[object RegExp]":case"[object String]":return""+t==""+r;case"[object Number]":return+t!=+t?+r!=+r:+t==0?1/+t===1/r:+t==+r;case"[object Date]":case"[object Boolean]":return+t==+r;case"[object Symbol]":return ha.valueOf.call(t)===ha.valueOf.call(r);case"[object ArrayBuffer]":case Aa:return Jo(nl(t),nl(r),i,s)}var d=a==="[object Array]";if(!d&&Da(t)){var p=Js(t);if(p!==Js(r))return!1;if(t.buffer===r.buffer&&t.byteOffset===r.byteOffset)return!0;d=!0}if(!d){if(typeof t!="object"||typeof r!="object")return!1;var h=t.constructor,g=r.constructor;if(h!==g&&!(yn(h)&&h instanceof h&&yn(g)&&g instanceof g)&&"constructor"in t&&"constructor"in r)return!1}i=i||[],s=s||[];for(var _=i.length;_--;)if(i[_]===t)return s[_]===r;if(i.push(t),s.push(r),d){if(_=t.length,_!==r.length)return!1;for(;_--;)if(!qo(t[_],r[_],i,s))return!1}else{var le=Jt(t),je;if(_=le.length,Jt(r).length!==_)return!1;for(;_--;)if(je=le[_],!(vr(r,je)&&qo(t[je],r[je],i,s)))return!1}return i.pop(),s.pop(),!0}c(Jo,"deepEq");function rl(t,r){return qo(t,r)}c(rl,"isEqual");function xi(t){if(!or(t))return[];var r=[];for(var i in t)r.push(i);return wa&&el(t,r),r}c(xi,"allKeys");function co(t){var r=En(t);return function(i){if(i==null)return!1;var s=xi(i);if(En(s))return!1;for(var a=0;a<r;a++)if(!yn(i[t[a]]))return!1;return t!==xe||!yn(i[il])}}c(co,"ie11fingerprint");var il="forEach",dc="has",Fa=["clear","delete"],es=["get",dc,"set"],La=Fa.concat(il,es),xe=Fa.concat(es),Tn=["add"].concat(Fa,il,dc),en=Ks?co(La):vt("Map"),vn=Ks?co(xe):vt("WeakMap"),Ci=Ks?co(Tn):vt("Set"),ja=vt("WeakSet");function bt(t){for(var r=Jt(t),i=r.length,s=Array(i),a=0;a<i;a++)s[a]=t[r[a]];return s}c(bt,"values");function ts(t){for(var r=Jt(t),i=r.length,s=Array(i),a=0;a<i;a++)s[a]=[r[a],t[r[a]]];return s}c(ts,"pairs");function qr(t){for(var r={},i=Jt(t),s=0,a=i.length;s<a;s++)r[t[i[s]]]=i[s];return r}c(qr,"invert");function Jr(t){var r=[];for(var i in t)yn(t[i])&&r.push(i);return r.sort()}c(Jr,"functions");function Dr(t,r){return function(i){var s=arguments.length;if(r&&(i=Object(i)),s<2||i==null)return i;for(var a=1;a<s;a++)for(var d=arguments[a],p=t(d),h=p.length,g=0;g<h;g++){var _=p[g];(!r||i[_]===void 0)&&(i[_]=d[_])}return i}}c(Dr,"createAssigner");var ol=Dr(xi),fo=Dr(Jt),sl=Dr(xi,!0);function ll(){return function(){}}c(ll,"ctor");function ei(t){if(!or(t))return{};if(ga)return ga(t);var r=ll();r.prototype=t;var i=new r;return r.prototype=null,i}c(ei,"baseCreate");function re(t,r){var i=ei(t);return r&&fo(i,r),i}c(re,"create");function ns(t){return or(t)?Nr(t)?t.slice():ol({},t):t}c(ns,"clone");function al(t,r){return r(t),t}c(al,"tap");function Gn(t){return Nr(t)?t:[t]}c(Gn,"toPath"),et.toPath=Gn;function Bn(t){return et.toPath(t)}c(Bn,"_toPath_toPath");function ti(t,r){for(var i=r.length,s=0;s<i;s++){if(t==null)return;t=t[r[s]]}return i?t:void 0}c(ti,"deepGet");function Pi(t,r,i){var s=ti(t,Bn(r));return Sa(s)?i:s}c(Pi,"get");function ul(t,r){r=Bn(r);for(var i=r.length,s=0;s<i;s++){var a=r[s];if(!vr(t,a))return!1;t=t[a]}return!!i}c(ul,"has_has");function po(t){return t}c(po,"identity");function bn(t){return t=fo({},t),function(r){return tl(r,t)}}c(bn,"matcher");function ni(t){return t=Bn(t),function(r){return ti(r,t)}}c(ni,"property");function ri(t,r,i){if(r===void 0)return t;switch(i??3){case 1:return function(s){return t.call(r,s)};case 3:return function(s,a,d){return t.call(r,s,a,d)};case 4:return function(s,a,d,p){return t.call(r,s,a,d,p)}}return function(){return t.apply(r,arguments)}}c(ri,"optimizeCb");function ho(t,r,i){return t==null?po:yn(t)?ri(t,r,i):or(t)&&!Nr(t)?bn(t):ni(t)}c(ho,"baseIteratee");function Yn(t,r){return ho(t,r,1/0)}c(Yn,"iteratee"),et.iteratee=Yn;function sn(t,r,i){return et.iteratee!==Yn?et.iteratee(t,r):ho(t,r,i)}c(sn,"cb");function mo(t,r,i){r=sn(r,i);for(var s=Jt(t),a=s.length,d={},p=0;p<a;p++){var h=s[p];d[h]=r(t[h],h,t)}return d}c(mo,"mapObject");function go(){}c(go,"noop");function On(t){return t==null?go:function(r){return Pi(t,r)}}c(On,"propertyOf");function Ar(t,r,i){var s=Array(Math.max(0,t));r=ri(r,i,1);for(var a=0;a<t;a++)s[a]=r(a);return s}c(Ar,"times");function lr(t,r){return r==null&&(r=t,t=0),t+Math.floor(Math.random()*(r-t+1))}c(lr,"random_random");var ii=Date.now||function(){return new Date().getTime()};function Nn(t){var r=c(function(d){return t[d]},"escaper"),i="(?:"+Jt(t).join("|")+")",s=RegExp(i),a=RegExp(i,"g");return function(d){return d=d==null?"":""+d,s.test(d)?d.replace(a,r):d}}c(Nn,"createEscaper");var Ma={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},yo=Nn(Ma),Ba=qr(Ma),nd=Nn(Ba),fc=et.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},cl=/(.)^/,dl={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},za=/\\|'|\r|\n|\u2028|\u2029/g;function Ri(t){return"\\"+dl[t]}c(Ri,"escapeChar");var pc=/^\s*(\w|\$)+\s*$/;function Ua(t,r,i){!r&&i&&(r=i),r=sl({},r,et.templateSettings);var s=RegExp([(r.escape||cl).source,(r.interpolate||cl).source,(r.evaluate||cl).source].join("|")+"|$","g"),a=0,d="__p+='";t.replace(s,function(_,le,je,xn,Ve){return d+=t.slice(a,Ve).replace(za,Ri),a=Ve+_.length,le?d+=`'+
14
14
  ((__t=(`+le+`))==null?'':_.escape(__t))+
15
15
  '`:je?d+=`'+
16
16
  ((__t=(`+je+`))==null?'':__t)+
@@ -22,43 +22,43 @@ __p+='`),_}),d+=`';
22
22
  `,p="obj";d=`var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};
23
23
  `+d+`return __p;
24
24
  `;var h;try{h=new Function(p,"_",d)}catch(_){throw _.source=d,_}var g=c(function(_){return h.call(this,_,et)},"template");return g.source="function("+p+`){
25
- `+d+"}",g}c(Ua,"template");function vo(t,r,i){r=Bn(r);var s=r.length;if(!s)return yn(i)?i.call(t):i;for(var a=0;a<s;a++){var d=t?.[r[a]];d===void 0&&(d=i,a=s),t=yn(d)?d.call(t):d}return t}c(vo,"result");var rd=0;function hc(t){var r=++rd+"";return t?t+r:r}c(hc,"uniqueId");function Za(t){var r=et(t);return r._chain=!0,r}c(Za,"chain");function fl(t,r,i,s,a){if(!(s instanceof r))return t.apply(i,a);var d=ei(t.prototype),p=t.apply(d,a);return or(p)?p:d}c(fl,"executeBound");var Fr=fn(function(t,r){var i=Fr.placeholder,s=c(function(){for(var a=0,d=r.length,p=Array(d),h=0;h<d;h++)p[h]=r[h]===i?arguments[a++]:r[h];for(;a<arguments.length;)p.push(arguments[a++]);return fl(t,s,this,this,p)},"bound");return s});Fr.placeholder=et;var pl=Fr,mc=fn(function(t,r,i){if(!yn(t))throw new TypeError("Bind must be called on a function");var s=fn(function(a){return fl(t,s,r,this,i.concat(a))});return s}),Vt=Ti(En);function oi(t,r,i,s){if(s=s||[],!r&&r!==0)r=1/0;else if(r<=0)return s.concat(t);for(var a=s.length,d=0,p=En(t);d<p;d++){var h=t[d];if(Vt(h)&&(Nr(h)||Gs(h)))if(r>1)oi(h,r-1,i,s),a=s.length;else for(var g=0,_=h.length;g<_;)s[a++]=h[g++];else i||(s[a++]=h)}return s}c(oi,"flatten");var gc=fn(function(t,r){r=oi(r,!1,!1);var i=r.length;if(i<1)throw new Error("bindAll must be passed function names");for(;i--;){var s=r[i];t[s]=mc(t[s],t)}return t});function yc(t,r){var i=c(function(s){var a=i.cache,d=""+(r?r.apply(this,arguments):s);return vr(a,d)||(a[d]=t.apply(this,arguments)),a[d]},"memoize");return i.cache={},i}c(yc,"memoize");var Wa=fn(function(t,r,i){return setTimeout(function(){return t.apply(null,i)},r)}),si=pl(Wa,et,1);function vc(t,r,i){var s,a,d,p,h=0;i||(i={});var g=c(function(){h=i.leading===!1?0:ii(),s=null,p=t.apply(a,d),s||(a=d=null)},"later"),_=c(function(){var le=ii();!h&&i.leading===!1&&(h=le);var je=r-(le-h);return a=this,d=arguments,je<=0||je>r?(s&&(clearTimeout(s),s=null),h=le,p=t.apply(a,d),s||(a=d=null)):!s&&i.trailing!==!1&&(s=setTimeout(g,je)),p},"throttled");return _.cancel=function(){clearTimeout(s),h=0,s=a=d=null},_}c(vc,"throttle");function wc(t,r,i){var s,a,d,p,h,g=c(function(){var le=ii()-a;r>le?s=setTimeout(g,r-le):(s=null,i||(p=t.apply(h,d)),s||(d=h=null))},"later"),_=fn(function(le){return h=this,d=le,a=ii(),s||(s=setTimeout(g,r),i&&(p=t.apply(h,d))),p});return _.cancel=function(){clearTimeout(s),s=d=h=null},_}c(wc,"debounce");function Va(t,r){return pl(r,t)}c(Va,"wrap");function hl(t){return function(){return!t.apply(this,arguments)}}c(hl,"negate");function zn(){var t=arguments,r=t.length-1;return function(){for(var i=r,s=t[r].apply(this,arguments);i--;)s=t[i].call(this,s);return s}}c(zn,"compose");function ml(t,r){return function(){if(--t<1)return r.apply(this,arguments)}}c(ml,"after");function Ha(t,r){var i;return function(){return--t>0&&(i=r.apply(this,arguments)),t<=1&&(r=null),i}}c(Ha,"before");var li=pl(Ha,2);function wo(t,r,i){r=on(r,i);for(var s=qt(t),a,d=0,p=s.length;d<p;d++)if(a=s[d],r(t[a],a,t))return a}c(wo,"findKey");function ai(t){return function(r,i,s){i=on(i,s);for(var a=En(r),d=t>0?0:a-1;d>=0&&d<a;d+=t)if(i(r[d],d,r))return d;return-1}}c(ai,"createPredicateIndexFinder");var rs=ai(1),gl=ai(-1);function is(t,r,i,s){i=on(i,s,1);for(var a=i(r),d=0,p=En(t);d<p;){var h=Math.floor((d+p)/2);i(t[h])<a?d=h+1:p=h}return d}c(is,"sortedIndex");function $a(t,r,i){return function(s,a,d){var p=0,h=En(s);if(typeof d=="number")t>0?p=d>=0?d:Math.max(d+h,p):h=d>=0?Math.min(d+1,h):d+h+1;else if(i&&d&&h)return d=i(s,a),s[d]===a?d:-1;if(a!==a)return d=r(Xr.call(s,p,h),Xs),d>=0?d+p:-1;for(d=t>0?p:h-1;d>=0&&d<h;d+=t)if(s[d]===a)return d;return-1}}c($a,"createIndexFinder");var _c=$a(1,rs,is),yl=$a(-1,gl);function _o(t,r,i){var s=Vt(t)?rs:wo,a=s(t,r,i);if(a!==void 0&&a!==-1)return t[a]}c(_o,"find");function Qa(t,r){return _o(t,bn(r))}c(Qa,"findWhere");function Xn(t,r,i){r=ri(r,i);var s,a;if(Vt(t))for(s=0,a=t.length;s<a;s++)r(t[s],s,t);else{var d=qt(t);for(s=0,a=d.length;s<a;s++)r(t[d[s]],d[s],t)}return t}c(Xn,"each");function ui(t,r,i){r=on(r,i);for(var s=!Vt(t)&&qt(t),a=(s||t).length,d=Array(a),p=0;p<a;p++){var h=s?s[p]:p;d[p]=r(t[h],h,t)}return d}c(ui,"map");function os(t){var r=c(function(i,s,a,d){var p=!Vt(i)&&qt(i),h=(p||i).length,g=t>0?0:h-1;for(d||(a=i[p?p[g]:g],g+=t);g>=0&&g<h;g+=t){var _=p?p[g]:g;a=s(a,i[_],_,i)}return a},"reducer");return function(i,s,a,d){var p=arguments.length>=3;return r(i,ri(s,d,4),a,p)}}c(os,"createReduce");var ki=os(1),Sc=os(-1);function wr(t,r,i){var s=[];return r=on(r,i),Xn(t,function(a,d,p){r(a,d,p)&&s.push(a)}),s}c(wr,"filter");function Ka(t,r,i){return wr(t,hl(on(r)),i)}c(Ka,"reject");function Ga(t,r,i){r=on(r,i);for(var s=!Vt(t)&&qt(t),a=(s||t).length,d=0;d<a;d++){var p=s?s[d]:d;if(!r(t[p],p,t))return!1}return!0}c(Ga,"every");function Ii(t,r,i){r=on(r,i);for(var s=!Vt(t)&&qt(t),a=(s||t).length,d=0;d<a;d++){var p=s?s[d]:d;if(r(t[p],p,t))return!0}return!1}c(Ii,"some");function _r(t,r,i,s){return Vt(t)||(t=bt(t)),(typeof i!="number"||s)&&(i=0),_c(t,r,i)>=0}c(_r,"contains");var vl=fn(function(t,r,i){var s,a;return yn(r)?a=r:(r=Bn(r),s=r.slice(0,-1),r=r[r.length-1]),ui(t,function(d){var p=a;if(!p){if(s&&s.length&&(d=ti(d,s)),d==null)return;p=d[r]}return p==null?p:p.apply(d,i)})});function e(t,r){return ui(t,ni(r))}c(e,"pluck");function n(t,r){return wr(t,bn(r))}c(n,"where");function o(t,r,i){var s=-1/0,a=-1/0,d,p;if(r==null||typeof r=="number"&&typeof t[0]!="object"&&t!=null){t=Vt(t)?t:bt(t);for(var h=0,g=t.length;h<g;h++)d=t[h],d!=null&&d>s&&(s=d)}else r=on(r,i),Xn(t,function(_,le,je){p=r(_,le,je),(p>a||p===-1/0&&s===-1/0)&&(s=_,a=p)});return s}c(o,"max");function l(t,r,i){var s=1/0,a=1/0,d,p;if(r==null||typeof r=="number"&&typeof t[0]!="object"&&t!=null){t=Vt(t)?t:bt(t);for(var h=0,g=t.length;h<g;h++)d=t[h],d!=null&&d<s&&(s=d)}else r=on(r,i),Xn(t,function(_,le,je){p=r(_,le,je),(p<a||p===1/0&&s===1/0)&&(s=_,a=p)});return s}c(l,"min");var u=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function f(t){return t?Nr(t)?Xr.call(t):gn(t)?t.match(u):Vt(t)?ui(t,po):bt(t):[]}c(f,"toArray");function m(t,r,i){if(r==null||i)return Vt(t)||(t=bt(t)),t[lr(t.length-1)];var s=f(t),a=En(s);r=Math.max(Math.min(r,a),0);for(var d=a-1,p=0;p<r;p++){var h=lr(p,d),g=s[p];s[p]=s[h],s[h]=g}return s.slice(0,r)}c(m,"sample");function v(t){return m(t,1/0)}c(v,"shuffle");function S(t,r,i){var s=0;return r=on(r,i),e(ui(t,function(a,d,p){return{value:a,index:s++,criteria:r(a,d,p)}}).sort(function(a,d){var p=a.criteria,h=d.criteria;if(p!==h){if(p>h||p===void 0)return 1;if(p<h||h===void 0)return-1}return a.index-d.index}),"value")}c(S,"sortBy");function I(t,r){return function(i,s,a){var d=r?[[],[]]:{};return s=on(s,a),Xn(i,function(p,h){var g=s(p,h,i);t(d,p,g)}),d}}c(I,"group");var J=I(function(t,r,i){vr(t,i)?t[i].push(r):t[i]=[r]}),Ie=I(function(t,r,i){t[i]=r}),W=I(function(t,r,i){vr(t,i)?t[i]++:t[i]=1}),de=I(function(t,r,i){t[i?0:1].push(r)},!0);function Ce(t){return t==null?0:Vt(t)?t.length:qt(t).length}c(Ce,"size");function we(t,r,i){return r in i}c(we,"keyInObj");var k=fn(function(t,r){var i={},s=r[0];if(t==null)return i;yn(s)?(r.length>1&&(s=ri(s,r[1])),r=xi(t)):(s=we,r=oi(r,!1,!1),t=Object(t));for(var a=0,d=r.length;a<d;a++){var p=r[a],h=t[p];s(h,p,t)&&(i[p]=h)}return i}),T=fn(function(t,r){var i=r[0],s;return yn(i)?(i=hl(i),r.length>1&&(s=r[1])):(r=ui(oi(r,!1,!1),String),i=c(function(a,d){return!_r(r,d)},"iteratee")),k(t,i,s)});function P(t,r,i){return Xr.call(t,0,Math.max(0,t.length-(r==null||i?1:r)))}c(P,"initial");function L(t,r,i){return t==null||t.length<1?r==null||i?void 0:[]:r==null||i?t[0]:P(t,t.length-r)}c(L,"first");function z(t,r,i){return Xr.call(t,r==null||i?1:r)}c(z,"rest");function be(t,r,i){return t==null||t.length<1?r==null||i?void 0:[]:r==null||i?t[t.length-1]:z(t,Math.max(0,t.length-r))}c(be,"last");function oe(t){return wr(t,Boolean)}c(oe,"compact");function Oe(t,r){return oi(t,r,!1)}c(Oe,"flatten_flatten");var Ue=fn(function(t,r){return r=oi(r,!0,!0),wr(t,function(i){return!_r(r,i)})}),Le=fn(function(t,r){return Ue(t,r)});function ar(t,r,i,s){Ea(r)||(s=i,i=r,r=!1),i!=null&&(i=on(i,s));for(var a=[],d=[],p=0,h=En(t);p<h;p++){var g=t[p],_=i?i(g,p,t):g;r&&!i?((!p||d!==_)&&a.push(g),d=_):i?_r(d,_)||(d.push(_),a.push(g)):_r(a,g)||a.push(g)}return a}c(ar,"uniq");var id=fn(function(t){return ar(oi(t,!0,!0))});function wd(t){for(var r=[],i=arguments.length,s=0,a=En(t);s<a;s++){var d=t[s];if(!_r(r,d)){var p;for(p=1;p<i&&_r(arguments[p],d);p++);p===i&&r.push(d)}}return r}c(wd,"intersection");function Ec(t){for(var r=t&&o(t,En).length||0,i=Array(r),s=0;s<r;s++)i[s]=e(t,s);return i}c(Ec,"unzip");var Rf=fn(Ec);function _d(t,r){for(var i={},s=0,a=En(t);s<a;s++)r?i[t[s]]=r[s]:i[t[s][0]]=t[s][1];return i}c(_d,"object");function Sd(t,r,i){r==null&&(r=t||0,t=0),i||(i=r<t?-1:1);for(var s=Math.max(Math.ceil((r-t)/i),0),a=Array(s),d=0;d<s;d++,t+=i)a[d]=t;return a}c(Sd,"range");function Ed(t,r){if(r==null||r<1)return[];for(var i=[],s=0,a=t.length;s<a;)i.push(Xr.call(t,s,s+=r));return i}c(Ed,"chunk");function Tc(t,r){return t._chain?et(r).chain():r}c(Tc,"chainResult");function od(t){return Xn(Jr(t),function(r){var i=et[r]=t[r];et.prototype[r]=function(){var s=[this._wrapped];return Ko.apply(s,arguments),Tc(this,i.apply(et,s))}}),et}c(od,"mixin"),Xn(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var r=Qo[t];et.prototype[t]=function(){var i=this._wrapped;return i!=null&&(r.apply(i,arguments),(t==="shift"||t==="splice")&&i.length===0&&delete i[0]),Tc(this,i)}}),Xn(["concat","join","slice"],function(t){var r=Qo[t];et.prototype[t]=function(){var i=this._wrapped;return i!=null&&(i=r.apply(i,arguments)),Tc(this,i)}});var kf=et,sd=od(te);sd._=sd;var ld=sd,If=Object.defineProperty,bf=c((t,r,i)=>r in t?If(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"AncestorScrollDetector_defNormalProp"),ad=c((t,r,i)=>(bf(t,typeof r!="symbol"?r+"":r,i),i),"AncestorScrollDetector_publicField");class Td{constructor(r){ad(this,"tree",new Map),ad(this,"rootNode"),ad(this,"handleScroll",i=>{if(!i.target)return;const s=i.target;this.tree.get(s)&&s.querySelectorAll(".js-fake-embed").forEach(a=>{const d=this.tree.get(a);d&&d.callback&&d.callback(s)})}),this.rootNode=r}addListener(r,i){var s;if(!((s=this.rootNode)!=null&&s.contains(r))||this.tree.has(r))return;let a=r;for(this.tree.set(a,{node:a,children:new Map,leaf:!0,callback:i});a&&a.parentElement;){const d=this.tree.get(a.parentElement);if(d){d.children.set(a,!0);break}this.tree.set(a.parentElement,{node:a.parentElement,children:new Map([[a,!0]])}),a.parentElement.addEventListener("scroll",this.handleScroll),a=a.parentElement}}removeListener(r){const i=this.tree.get(r);if(!i||!i.leaf)return;let s=r;for(;s;){const a=this.tree.get(s);if(!a)break;const d=s.parentElement?this.tree.get(s.parentElement):null;if(s!==this.rootNode&&!d||d&&!d.children.has(s)||(d&&d?.children.delete(s),a.children.size!==0)||(s.removeEventListener("scroll",this.handleScroll),this.tree.delete(s),!d))break;s=d.node}}}c(Td,"AncestorScrollDetector");const ud=(0,se.createContext)({}),Of=c(({root:t,children:r})=>{const i=(0,se.useMemo)(()=>new Td(t),[]);return(0,ft.jsx)(ud.Provider,{value:i,children:r})},"AncestorScrollDetectorProvider"),Nf=c(()=>(0,se.useContext)(ud),"useAncestorScrollDetector"),xd=(0,se.createContext)(null),Df=c(({plugin:t,children:r})=>(0,ft.jsx)(xd.Provider,{value:t,children:r}),"PluginProvider"),bi=c(()=>{const t=(0,se.useContext)(xd);if(!t)throw new Error("You must wrap any RemNote API hooks in a <PluginProvider/>");return t},"usePlugin"),Cd=(0,se.createContext)(null),Af=c(({pluginRoot:t,children:r})=>(0,ft.jsx)(Cd.Provider,{value:t,children:r}),"PluginRootProvider"),Ff=c(()=>(0,se.useContext)(Cd),"usePluginRootDivRef");function Pd(t){return{all:t=t||new Map,on:function(r,i){var s=t.get(r);s?s.push(i):t.set(r,[i])},off:function(r,i){var s=t.get(r);s&&(i?s.splice(s.indexOf(i)>>>0,1):t.set(r,[]))},emit:function(r,i){var s=t.get(r);s&&s.slice().map(function(a){a(i)}),(s=t.get("*"))&&s.slice().map(function(a){a(r,i)})}}}c(Pd,"mitt");const xc=Pd();var Cc=(t=>(t.PluginBodyResizeOrTreeRenders="PluginBodyResizeOrTreeRenders",t))(Cc||{});const Lf=c((t,r)=>{(0,se.useEffect)(()=>(xc.on(t,r),()=>xc.off(t,r)),[t,r])},"useEvent");function Rd(t){const r=se.useRef(t),i=se.useRef(0);return ld.isEqual(t,r.current)||(r.current=t,i.current+=1),se.useMemo(()=>r.current,[i.current])}c(Rd,"useDeepCompareMemoize");function kd(t,r){return se.useEffect(t,Rd(r))}c(kd,"useDeepCompareEffectNoCheck");var jf=Object.defineProperty,Mf=Object.defineProperties,Bf=Object.getOwnPropertyDescriptors,Pc=Object.getOwnPropertySymbols,Id=Object.prototype.hasOwnProperty,bd=Object.prototype.propertyIsEnumerable,Od=c((t,r,i)=>r in t?jf(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"FakeEmbed_defNormalProp"),Lr=c((t,r)=>{for(var i in r||(r={}))Id.call(r,i)&&Od(t,i,r[i]);if(Pc)for(var i of Pc(r))bd.call(r,i)&&Od(t,i,r[i]);return t},"FakeEmbed_spreadValues"),zf=c((t,r)=>Mf(t,Bf(r)),"FakeEmbed_spreadProps"),Uf=c((t,r)=>{var i={};for(var s in t)Id.call(t,s)&&r.indexOf(s)<0&&(i[s]=t[s]);if(t!=null&&Pc)for(var s of Pc(t))r.indexOf(s)<0&&bd.call(t,s)&&(i[s]=t[s]);return i},"FakeEmbed_objRest"),Zf=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"FakeEmbed_async");const Wf=c(t=>typeof t=="string"&&/[0-9]{1,}%/.test(t)?parseInt(t.replace("%","")):void 0,"parsePercentage"),Vf=c(t=>typeof t=="string"&&/[0-9]{1,}px/.test(t)?parseInt(t.replace("px","")):void 0,"parsePx"),Rc=c((t,r)=>{const i=Wf(r),s=Vf(r);return i?t*i/100:s||null},"dimensionToNumber"),Hf=c(({maxWidth:t,maxHeight:r,width:i,height:s,constraintWidth:a,constraintHeight:d})=>{const p=typeof i=="string"&&i!=="auto"?Rc(a,i):i,h=typeof t=="string"?Rc(a,t):t,g=typeof s=="string"&&s!=="auto"?Rc(d,s):s,_=typeof r=="string"?Rc(d,r):r;return{width:p,maxWidth:h,height:g,maxHeight:_}},"calculateStyles");function Nd(t){return t.clientHeight<t.scrollHeight}c(Nd,"isVerticallyScrollable");function Dd(t){return t.clientWidth<t.scrollWidth}c(Dd,"isHorizontallScrollable");const $f=c(({componentType:t,externalProps:r,maxHeight:i=null,maxWidth:s=null,height:a="auto",width:d="auto",constraintRef:p="parent"})=>{var h,g,_,le,je,xn;((g=(h=window?.Env)==null?void 0:h.deploy)!=null&&g.isDevelopment||(le=(_=window?.Env)==null?void 0:_.deploy)!=null&&le.isStaging||(xn=(je=window?.Env)==null?void 0:je.app)!=null&&xn.isCypress)&&(console.error("You imported the wrong component!"),alert("You imported the wrong component!"));const We=(0,se.useRef)(null),pt=bi(),Sl=Ff(),qn=(0,se.useRef)(),[El,yp]=(0,se.useState)(!1),md=Nf(),Dc=(0,se.useRef)(),Oi=(0,se.useRef)({height:a,width:d,maxHeight:i,maxWidth:s}),ss=(0,se.useRef)(),Sf=(0,se.useCallback)(rt=>{!We.current||rt.height===void 0||rt.width===void 0||pt.isNative||(We.current.style.height=rt.height+"px",We.current.style.width=rt.width+"px")},[]),Ef=c(rt=>{var jt;rt.type=="wheel"?vp(rt):(jt=We.current)==null||jt.dispatchEvent(new Event(rt.type,zf(Lr({},rt),{bubbles:!0})))},"onDOMEvent"),vp=(0,se.useCallback)(rt=>{if(!(!We.current||rt.deltaY===void 0||rt.deltaX===void 0)){if(rt.deltaY){let jt=We.current;for(;jt&&!Nd(jt);)jt=jt.parentElement;jt&&(jt.scrollTop+=rt.deltaY)}if(rt.deltaX){let jt=We.current;for(;jt&&!Dd(jt);)jt=jt.parentElement;jt&&(jt.scrollLeft+=rt.deltaX)}}},[]),Tf=c(()=>{if(!qn.current||!pt)return;const rt=Dc.current?Hf({constraintWidth:Dc.current.constraintWidth,constraintHeight:Dc.current.constraintHeight,height:Oi.current.height,width:Oi.current.width,maxHeight:Oi.current.maxHeight,maxWidth:Oi.current.maxWidth}):{height:Oi.current.height,width:Oi.current.width,maxHeight:Oi.current.maxHeight,maxWidth:Oi.current.maxWidth};pt.updateFakeEmbedComponentRect(qn.current,rt)},"updateDimensions"),xf=c(()=>{var rt;if(!(pt!=null&&pt.inSandbox)||!We.current||!qn.current)return;const{top:jt,left:ls}=We.current.getBoundingClientRect(),as=((rt=Sl?.current)==null?void 0:rt.getBoundingClientRect())||{top:0,left:0},fi=jt-as.top,us=ls-as.left;ss.current&&ss?.current.top===fi&&ss?.current.left===us||(ss.current={left:us,top:fi},pt.updateFakeEmbedComponentRect(qn.current,{top:fi,left:us}))},"handleResizeOrScrollEvent");(0,se.useEffect)(()=>{if(pt||console.error("You must wrap your components in a <PluginProvider/> or a renderWidget call."),!pt||!We.current)return;gd();const rt=Ei();return Zf(void 0,null,function*(){var jt;const{top:ls,left:as}=We.current.getBoundingClientRect();ss.current={top:ls,left:as};const fi=((jt=Sl?.current)==null?void 0:jt.getBoundingClientRect())||{top:0,left:0},us=ls-fi.top,yd=as-fi.left;pt.event.addListener(A.FakeEmbedComponentDimensionChange,rt,Sf),pt.event.addListener(A.FakeEmbedDOMEvent,rt,Ef),pt.isNative&&window.nativePluginDivs.set("virtual-"+rt,We.current),yield pt.createFakeEmbedComponent({id:rt,type:t,top:us,left:yd,externalProps:r}),qn.current=rt,yp(!0)}),()=>{qn.current&&(pt.unmountFakeEmbedComponent(qn.current),pt.isNative&&window.nativePluginDivs.delete("virtual-"+rt),pt.event.removeListener(A.FakeEmbedComponentDimensionChange,qn.current,Sf),pt.event.removeListener(A.FakeEmbedDOMEvent,qn.current,Ef))}},[]);function gd(){try{JSON.stringify(r)}catch{throw console.error("ExternalProps are not serializable.",r),new Error(`All props passed to a RemNote React Component must be JSON serializable. Check the devtools to see your props for your ${t} component.`)}}c(gd,"throwErrorIfExternalPropsAreNotSerializable");function Cf(){gd(),qn.current&&pt.updateFakeEmbedExternalProps(qn.current,r)}return c(Cf,"updateExternalProps"),kd(Cf,[r]),(0,se.useEffect)(()=>{El&&(Oi.current={maxHeight:i,maxWidth:s,height:a,width:d},Tf())},[i,s,d,a,El]),(0,se.useEffect)(()=>{var rt;if(pt!=null&&pt.inSandbox&&qn.current&&El&&p){const jt=p==="parent"?(rt=We.current)==null?void 0:rt.parentElement:p.current;if(!jt)return;const ls=new ResizeObserver(as=>{for(const fi of as)if(fi.contentBoxSize){const us=fi.contentBoxSize[0].inlineSize,yd=fi.contentBoxSize[0].blockSize;Dc.current={constraintHeight:yd,constraintWidth:us},Tf()}});return ls.observe(jt),()=>ls.disconnect()}else return},[p,El]),Lf(Cc.PluginBodyResizeOrTreeRenders,xf),(0,se.useLayoutEffect)(()=>{if(!(!El||!We.current||!md))return md.addListener(We.current,ld.debounce(xf,10)),()=>{We.current&&md.removeListener(We.current)}},[El]),(0,se.useEffect)(()=>()=>{pt&&qn.current&&pt.unmountFakeEmbedComponent(qn.current)},[]),(0,ft.jsx)("div",{ref:We,className:"js-fake-embed"})},"FakeEmbedHost"),ci=c(t=>{const r=t,{width:i,maxHeight:s,constraintRef:a,height:d,maxWidth:p,componentType:h}=r,g=Uf(r,["width","maxHeight","constraintRef","height","maxWidth","componentType"]);return(0,ft.jsx)($f,{componentType:h,externalProps:g,width:i,height:d,maxHeight:s,maxWidth:p,constraintRef:a})},"FakeEmbedHostConcrete");class Ad extends se.Component{render(){return(0,ft.jsx)(ci,Lr({componentType:Ln.RichTextEditor},this.props))}}c(Ad,"RichTextEditor");class Fd extends se.Component{render(){return(0,ft.jsx)(ci,Lr({componentType:Ln.RichText},this.props))}}c(Fd,"RichText");class Ld extends se.Component{render(){return(0,ft.jsx)(ci,Lr({componentType:Ln.RemViewer},this.props))}}c(Ld,"RemViewer");class jd extends se.Component{render(){return(0,ft.jsx)(ci,Lr({componentType:Ln.PDFWebReader},this.props))}}c(jd,"PDFWebReader");class Md extends se.Component{render(){return(0,ft.jsx)(ci,Lr({componentType:Ln.DocumentViewer},this.props))}}c(Md,"DocumentViewer");class Bd extends se.Component{render(){return(0,ft.jsx)(ci,Lr({componentType:Ln.RemRichTextEditor},this.props))}}c(Bd,"RemRichTextEditor");class zd extends se.Component{render(){return(0,ft.jsx)(ci,Lr({componentType:Ln.RemHierarchyEditorTree},this.props))}}c(zd,"RemHierarchyEditorTree");class Ud extends se.Component{render(){return(0,ft.jsx)(ci,Lr({componentType:Ln.Queue},this.props))}}c(Ud,"Queue");class Zd extends se.Component{render(){return(0,ft.jsx)(ci,Lr({componentType:Ln.LoadingSpinner},this.props))}}c(Zd,"LoadingSpinnerPlugin");class Wd extends se.Component{render(){return(0,ft.jsx)(ci,Lr({componentType:Ln.PreviewRemCards},this.props))}}c(Wd,"PreviewRemCards");function cd(t){var r,i,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t))for(r=0;r<t.length;r++)t[r]&&(i=cd(t[r]))&&(s&&(s+=" "),s+=i);else for(r in t)t[r]&&(s&&(s+=" "),s+=r);return s}c(cd,"r");function Vd(){for(var t,r,i=0,s="";i<arguments.length;)(t=arguments[i++])&&(r=cd(t))&&(s&&(s+=" "),s+=r);return s}c(Vd,"clsx");var Qf=Vd,Kf=tt(318),Hd=tt.n(Kf),Gf=Object.defineProperty,Yf=c((t,r,i)=>r in t?Gf(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"PluginRenderer_defNormalProp"),$d=c((t,r,i)=>(Yf(t,typeof r!="symbol"?r+"":r,i),i),"PluginRenderer_publicField"),Qd=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"PluginRenderer_async");const Xf=c(({plugin:t,children:r})=>{const i=(0,se.useRef)(null);(0,se.useEffect)(()=>{if(!i.current||!t.inSandbox)return;const h=new ResizeObserver(()=>{i.current&&xc.emit(Cc.PluginBodyResizeOrTreeRenders)}),g=new MutationObserver(_=>{for(const le of _)(le.type==="attributes"||le.type==="childList")&&xc.emit(Cc.PluginBodyResizeOrTreeRenders)});return g.observe(i.current,{attributes:!0,childList:!0,subtree:!0}),h.observe(i.current),()=>{i.current&&(h.disconnect(),g.disconnect())}},[]);const s=t.inSandbox?{current:document.getElementsByTagName("html")[0]}:i,a=t.inSandbox?document.getElementsByTagName("html")[0]:t.mountDiv,d=t.inSandbox?Of:Kd,p=(0,ft.jsx)("div",{ref:i,className:Qf("plugin rn-clr-content-primary font-inter",t.id==="demo-tabs"&&"fade-on-hide-ui"),"data-plugin-id":t.id,children:r});return(0,ft.jsx)(Df,{plugin:t,children:(0,ft.jsx)(Af,{pluginRoot:s,children:(0,ft.jsx)(d,{root:a,children:p})})})},"PluginWrapper");function Kd(t){return(0,ft.jsx)(ud.Provider,{value:null,children:t.children})}c(Kd,"NoScrollDetector");class kc extends so{constructor(r,i){super(),$d(this,"initReact"),$d(this,"onDeactivateReact"),this.initReact=r,this.onDeactivateReact=i}onActivate(r,i){return Qd(this,null,function*(){this.initReact(this,r,i)})}onDeactivate(){return Qd(this,null,function*(){this.onDeactivateReact(this)})}}c(kc,"ReactRNPlugin");const Gd=c(t=>{const r=c(i=>{const s=c((d,p,h)=>Hd().render((0,ft.jsxs)(se.StrictMode,{children:[(0,ft.jsx)(Xf,{plugin:d,children:(0,ft.jsx)(t,{})}),(0,ft.jsx)("link",{rel:"stylesheet",href:`${h}App.css`,as:"style",type:"text/css",crossOrigin:"anonymous"})]}),p),"initReact"),a=c(d=>{console.log("onDeactivateReact"),Hd().unmountComponentAtNode(d.mountDiv)},"onDeactivateReact");return i?(window.__plugin?(console.log("[HMR] Hot reloading RemNote plugin widget."),a(window.__plugin),s(window.__plugin,window.__plugin.mountDiv,window.__plugin.rootURL)):window.__plugin=new kc(s,a),window.__plugin):new kc(s,a)},"makePlugin");try{const i=new URL(IMPORT_META.url).searchParams,s=i.get("widgetName"),a=i.get("pluginId");window.nativePluginRenderers.set(`${a}.${s}`,r)}catch{r(!0)}},"renderWidget");function Yd(t,r){function i(){const s=bi();return(0,se.useEffect)(()=>(s&&t(s),()=>{s&&r(s)}),[s]),null}c(i,"IndexWidget"),Gd(i)}c(Yd,"declareIndexPlugin");function Xd(t){return Ic(A.MessageBroadcast,void 0,t)}c(Xd,"useOnMessageBroadcast");function Ic(t,r,i){const s=bi();(0,se.useEffect)(()=>(s.event.addListener(t,r,i),()=>{s.event.removeListener(t,r,i)}),[t,r,i])}c(Ic,"useAPIEventListener");var qf=Object.defineProperty,qd=Object.getOwnPropertySymbols,Jf=Object.prototype.hasOwnProperty,ep=Object.prototype.propertyIsEnumerable,Jd=c((t,r,i)=>r in t?qf(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"rem_hooks_defNormalProp"),tp=c((t,r)=>{for(var i in r||(r={}))Jf.call(r,i)&&Jd(t,i,r[i]);if(qd)for(var i of qd(r))ep.call(r,i)&&Jd(t,i,r[i]);return t},"rem_hooks_spreadValues"),np=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"rem_hooks_async");function dd(t,r){const i=new Set(r);return t.filter(s=>!i.has(s))}c(dd,"rem_hooks_difference");function ef(t){return t.filter(r=>r)}c(ef,"rem_hooks_compact");function tf(t){const r=bi(),i=ef(t||[]),[s,a]=(0,se.useState)({}),[d,p]=(0,se.useState)(i.map(je=>s[je])),h=c((je,xn)=>{xn&&a(We=>{const pt=tp({},We);return pt[je]=xn,p(i.map(Sl=>pt[Sl])),pt})},"setRem"),g=c(je=>np(this,null,function*(){h(je,yield r.rem.findOne(je))}),"refetchRem"),_=(0,se.useRef)([]),le=(0,se.useRef)(new Map);return(0,se.useEffect)(()=>{const je=dd(i,_.current),xn=dd(_.current,i);for(const We of je){const pt=c(()=>g(We),"listener");le.current.set(We,pt),r.event.addListener(A.RemChanged,We,pt),g(We)}for(const We of xn)r.event.removeListener(A.RemChanged,We,le.current.get(We));p(i.map(We=>s[We])),_.current=i},[i.length,...i]),(0,se.useEffect)(()=>()=>{for(const je of _.current)r.event.removeListener(A.RemChanged,je,le.current.get(je))},[]),d}c(tf,"useGetRemsByIdsReactive");var nf=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"storage_hooks_async");function bc(t,r,i,s,a,d){const[p,h]=(0,se.useState)(d),g=c(()=>nf(this,null,function*(){r&&h((yield s(r))||d)}),"refetchValue");return(0,se.useEffect)(()=>{g()},[r]),Ic(i,r,_=>{h(_)}),[p,c(_=>nf(this,null,function*(){yield a(r,_)}),"setValue")]}c(bc,"useStorageStateInternal");function rf(t,r){const i=bi();return bc(i,t,A.StorageSessionChange,i.storage.getSession,i.storage.setSession,r)}c(rf,"useSessionStorageState");function of(t,r){const i=bi();return bc(i,t,A.StorageLocalChange,i.storage.getLocal,i.storage.setLocal,r)}c(of,"useLocalStorageState");function sf(t,r){const i=bi();return bc(i,t,A.StorageSyncedChange,i.storage.getSynced,i.storage.setSynced,r)}c(sf,"useSyncedStorageState");var lf=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"react_hooks_async");function af(t,r){const[i,s]=(0,se.useState)(void 0);return(0,se.useEffect)(()=>{lf(this,null,function*(){return s(yield t())})},r),i}c(af,"useRunAsync");function uf(t,r){return lf(this,null,function*(){const i=[],s=yield Promise.all(t.map(a=>r(a)));for(const[a,d]of ld.zip(s,t))a&&i.push(d);return i})}c(uf,"filterAsync");const rp=["card","editor","focus","messaging","powerup","rem","richText","settings","storage","widget","window","search"],Ht=c(t=>({event:A.RemChanged,key:typeof t=="string"?t:typeof t=="object"?t._id:void 0}),"remReactiveDep"),di=c(t=>({event:t,key:void 0}),"noKeyDep"),cf={allRemInDocumentOrPortal:{resultDeps:t=>t.map(Ht)},deepRemsBeingReferenced:{resultDeps:t=>t.map(Ht)},getAliases:{resultDeps:t=>t.map(Ht)},getDescendants:{resultDeps:t=>t.map(Ht)},getSources:{resultDeps:t=>t.map(Ht)},getTagRems:{resultDeps:t=>t.map(Ht)},getParentRem:{resultDeps:t=>[Ht(t)]},getChildrenRem:{resultDeps:t=>t.map(Ht)},getPortalDirectlyIncludedRem:{resultDeps:t=>t.map(Ht)},portalsAndDocumentsIn:{resultDeps:t=>t.map(Ht)},remsBeingReferenced:{resultDeps:t=>t.map(Ht)},remsReferencingThis:{resultDeps:t=>t.map(Ht)},siblingRem:{resultDeps:t=>t.map(Ht)},taggedRem:{resultDeps:t=>t.map(Ht)}},df={rem:{findByName:{resultDeps:t=>[Ht(t)]},findOne:{argsDeps:t=>[Ht(t[0])]},findMany:{argsDeps:t=>t[0].map(Ht)},getAll:{resultDeps:t=>t.map(Ht)}},powerup:{getPowerupSlotByCode:{resultDeps:t=>[Ht(t)]},getPowerupByCode:{resultDeps:t=>[Ht(t)]}},settings:{getSetting:{argsDeps:t=>[{event:A.SettingChanged,key:t[0]}]}},card:{},storage:{getLocal:{argsDeps:t=>[{event:A.StorageLocalChange,key:t[0]}]},getSession:{argsDeps:t=>[{event:A.StorageSessionChange,key:t[0]}]},getSynced:{argsDeps:t=>[{event:A.StorageSyncedChange,key:t[0]}]}},window:{getCurrentWindowTree:{argsDeps:()=>[di(A.CurrentWindowTreeChange)]},getFocusedPaneId:{argsDeps:()=>[di(A.FocusedPaneChange)]}},editor:{getFocusedEditorText:{argsDeps:()=>[di(A.FocusedRemChange),di(A.EditorTextEdited)]},getSelection:{argsDeps:()=>[di(A.EditorSelectionChanged)]},getSelectedRem:{argsDeps:()=>[di(A.EditorSelectionChanged)]},getSelectedText:{argsDeps:()=>[di(A.EditorSelectionChanged)]},getCaretPosition:{argsDeps:()=>[di(A.EditorSelectionChanged)]}},focus:{getFocusedRem:{argsDeps:()=>[di(A.FocusedRemChange)],resultDeps:t=>[Ht(t)]},getFocusedPortal:{argsDeps:()=>[di(A.FocusedPortalChange)],resultDeps:t=>[Ht(t)]}}};var Oc=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"useTracker_async");const wl=!1;function ff(t){return rp.includes(t)}c(ff,"isNamespacedProp");const ip=c((t,r)=>Array.isArray(t)&&t[0]instanceof Wn?(wl&&console.log("wrapping result array in Rem proxy"),t.map(i=>fd(i,r))):t&&t instanceof Wn?(wl&&console.log("wrapping result in Rem proxy"),fd(t,r)):t,"wrapResult"),pf=c((t,r,i,s)=>new Proxy(t,{apply:(a,d,p)=>Oc(void 0,null,function*(){const h=yield a.apply(d,p);return s(r,d,i,p,h),ip(h,s)})}),"wrapFunctionCall");function fd(t,r){return new Proxy(t,{get(i,s){var a;return typeof i[s]=="function"&&(a=cf)!=null&&a[s]?pf(i[s],void 0,s,r):i[s]}})}c(fd,"interceptReactiveRemCalls");function hf(t,r,i){return new Proxy(r,{get(s,a){var d,p;return typeof a=="string"&&typeof s[a]=="function"&&(p=(d=df)==null?void 0:d[t])!=null&&p[a]?pf(s[a],t,a,i):s[a]}})}c(hf,"interceptReactiveAPICalls");function mf(t,r){return new Proxy(t,{get(i,s){return ff(s)?hf(s,i[s],r):i[s]}})}c(mf,"interceptAPINamespaceAccesses");function pd(t){return new Set(t?.map(({reactiveDeps:r})=>r.map(Nc)).flat())}c(pd,"subscriptionsToSubscriptionSet");function Nc(t){const{event:r,key:i}=t;return`${r}.${i}`}c(Nc,"reactiveDepToKey");const op=c(t=>{const r=[];return{proxy:mf(t,(i,s,a,d,p)=>{var h,g,_,le,je,xn;const We=i?(g=(h=df)==null?void 0:h[i])==null?void 0:g[a]:(_=cf)==null?void 0:_[a],pt=[...((le=We.thisDeps)==null?void 0:le.call(We,s))||[],...((je=We.argsDeps)==null?void 0:je.call(We,d))||[],...((xn=We.resultDeps)==null?void 0:xn.call(We,p))||[]];r.push({methodName:a,args:d,reactiveDeps:pt})}),subscriptions:r}},"wrapApiWithListen"),hd=c((t,r,i,s,a)=>Oc(void 0,null,function*(){const d=op(t);return yield c(()=>Oc(void 0,null,function*(){d.subscriptions.length;const p=yield r(d.proxy);wl&&console.log("useReactiveAPI result",p),s(p)}),"changeHandler")(),gf(t,i,a,d.subscriptions),d.subscriptions}),"createReactiveApi");function gf(t,r,i,s){const a=pd(i||[]),d=pd(s);i?.forEach(({reactiveDeps:p})=>{for(const h of p)if(!d.has(Nc(h))){const{event:g,key:_}=h;wl&&console.log("removeListener",g,_),t.event.removeListener(g,_,r)}}),s?.forEach(({reactiveDeps:p})=>{for(const h of p)if(!a.has(Nc(h))){const{event:g,key:_}=h;wl&&console.log("addListener",g,_),t.event.addListener(g,_,r)}})}c(gf,"updateListeners");function yf(t,r=[]){const i=bi(),[s,a]=ir().useState(),d=(0,se.useRef)(!1),p=(0,se.useRef)(!1),h=(0,se.useRef)(),g=(0,se.useRef)(t);g.current=t;const _=c(()=>{wl&&console.log("useReactiveAPI RUN",d.current,p.current,h.current,r),d.current?p.current=!0:(d.current=!0,c(()=>Oc(this,null,function*(){h.current=yield hd(i,g.current,_,a,h.current||[]),d.current=!1,p.current&&(p.current=!1,_())}),"effect")())},"run");return ir().useEffect(_,r),s}c(yf,"useTrackerPlugin");const sp=/^[-_a-zA-Z0-9]+$/,lp=x.nativeEnum(Dl),_p=x.nativeEnum(Rr),_l=x.object({level:lp}),ap=x.object({type:x.literal(Rr.KnowledgeBaseInfo)}).merge(_l),up=x.object({type:x.literal(Rr.All)}).merge(_l),cp=x.object({type:x.literal(Rr.DescendantsOfName),remName:x.string()}).merge(_l),dp=x.object({type:x.literal(Rr.DescendantsOfId),remId:x.string()}).merge(_l),fp=x.object({type:x.literal(Rr.Powerup),powerupCode:x.string()}).merge(_l),pp=x.object({type:x.literal(Rr.FocusedSubtree)}).merge(_l),hp=x.union([up,cp,dp,fp,pp,ap]),vf=x.object({major:x.number().gte(0),minor:x.number().gte(0),patch:x.number().gte(0)}),wf=x.object({id:x.string().min(5).max(100).refine(t=>sp.test(t),"Plugin ids may consist only of lowercase Latin letters a-z, A-Z, hyphens, underscores, and digits 0-9"),name:x.string().min(3).max(100),version:vf,manifestVersion:x.literal(1),requestNative:x.boolean(),requiredScopes:x.array(hp),repoUrl:x.string().url(),author:x.string().min(3).max(100),enableOnMobile:x.boolean(),theme:x.union([x.literal("dark"),x.literal("light")]).array().optional(),minimumRemNoteVersion:vf.optional(),description:x.string().max(200).optional(),projectUrl:x.string().url().optional(),supportUrl:x.string().url().optional(),changelogUrl:x.string().url().optional(),unlisted:x.boolean().optional()}),mp=wf.merge(x.object({repoUrl:x.string().url().optional()})),Sp=c(t=>`${t.field}: ${t.message}`,"formatValidationError"),_f=c(t=>{const r=t.errors,i=[];for(const s of r){const{code:a,message:d,path:p}=s,h={field:p.join(".")?p.join("."):"Root Object",message:`${d} (${a})`};"expected"in s&&(h.expected=s.expected),"received"in s&&(h.received=s.received),i.push(h)}return i},"prettifyZodErrors"),gp=c(t=>{const r=wf.safeParse(t);return r.success?r:{success:!1,errors:_f(r.error)}},"parseManifest"),Ep=c(t=>{const r=mp.safeParse(t);return r.success?r:{success:!1,errors:_f(r.error)}},"parseSnippetManifest")})(),ot})()})},575(en){"use strict";/*
25
+ `+d+"}",g}c(Ua,"template");function vo(t,r,i){r=Bn(r);var s=r.length;if(!s)return yn(i)?i.call(t):i;for(var a=0;a<s;a++){var d=t?.[r[a]];d===void 0&&(d=i,a=s),t=yn(d)?d.call(t):d}return t}c(vo,"result");var rd=0;function hc(t){var r=++rd+"";return t?t+r:r}c(hc,"uniqueId");function Za(t){var r=et(t);return r._chain=!0,r}c(Za,"chain");function fl(t,r,i,s,a){if(!(s instanceof r))return t.apply(i,a);var d=ei(t.prototype),p=t.apply(d,a);return or(p)?p:d}c(fl,"executeBound");var Fr=fn(function(t,r){var i=Fr.placeholder,s=c(function(){for(var a=0,d=r.length,p=Array(d),h=0;h<d;h++)p[h]=r[h]===i?arguments[a++]:r[h];for(;a<arguments.length;)p.push(arguments[a++]);return fl(t,s,this,this,p)},"bound");return s});Fr.placeholder=et;var pl=Fr,mc=fn(function(t,r,i){if(!yn(t))throw new TypeError("Bind must be called on a function");var s=fn(function(a){return fl(t,s,r,this,i.concat(a))});return s}),Ht=Ti(En);function oi(t,r,i,s){if(s=s||[],!r&&r!==0)r=1/0;else if(r<=0)return s.concat(t);for(var a=s.length,d=0,p=En(t);d<p;d++){var h=t[d];if(Ht(h)&&(Nr(h)||Gs(h)))if(r>1)oi(h,r-1,i,s),a=s.length;else for(var g=0,_=h.length;g<_;)s[a++]=h[g++];else i||(s[a++]=h)}return s}c(oi,"flatten");var gc=fn(function(t,r){r=oi(r,!1,!1);var i=r.length;if(i<1)throw new Error("bindAll must be passed function names");for(;i--;){var s=r[i];t[s]=mc(t[s],t)}return t});function yc(t,r){var i=c(function(s){var a=i.cache,d=""+(r?r.apply(this,arguments):s);return vr(a,d)||(a[d]=t.apply(this,arguments)),a[d]},"memoize");return i.cache={},i}c(yc,"memoize");var Wa=fn(function(t,r,i){return setTimeout(function(){return t.apply(null,i)},r)}),si=pl(Wa,et,1);function vc(t,r,i){var s,a,d,p,h=0;i||(i={});var g=c(function(){h=i.leading===!1?0:ii(),s=null,p=t.apply(a,d),s||(a=d=null)},"later"),_=c(function(){var le=ii();!h&&i.leading===!1&&(h=le);var je=r-(le-h);return a=this,d=arguments,je<=0||je>r?(s&&(clearTimeout(s),s=null),h=le,p=t.apply(a,d),s||(a=d=null)):!s&&i.trailing!==!1&&(s=setTimeout(g,je)),p},"throttled");return _.cancel=function(){clearTimeout(s),h=0,s=a=d=null},_}c(vc,"throttle");function wc(t,r,i){var s,a,d,p,h,g=c(function(){var le=ii()-a;r>le?s=setTimeout(g,r-le):(s=null,i||(p=t.apply(h,d)),s||(d=h=null))},"later"),_=fn(function(le){return h=this,d=le,a=ii(),s||(s=setTimeout(g,r),i&&(p=t.apply(h,d))),p});return _.cancel=function(){clearTimeout(s),s=d=h=null},_}c(wc,"debounce");function Va(t,r){return pl(r,t)}c(Va,"wrap");function hl(t){return function(){return!t.apply(this,arguments)}}c(hl,"negate");function zn(){var t=arguments,r=t.length-1;return function(){for(var i=r,s=t[r].apply(this,arguments);i--;)s=t[i].call(this,s);return s}}c(zn,"compose");function ml(t,r){return function(){if(--t<1)return r.apply(this,arguments)}}c(ml,"after");function Ha(t,r){var i;return function(){return--t>0&&(i=r.apply(this,arguments)),t<=1&&(r=null),i}}c(Ha,"before");var li=pl(Ha,2);function wo(t,r,i){r=sn(r,i);for(var s=Jt(t),a,d=0,p=s.length;d<p;d++)if(a=s[d],r(t[a],a,t))return a}c(wo,"findKey");function ai(t){return function(r,i,s){i=sn(i,s);for(var a=En(r),d=t>0?0:a-1;d>=0&&d<a;d+=t)if(i(r[d],d,r))return d;return-1}}c(ai,"createPredicateIndexFinder");var rs=ai(1),gl=ai(-1);function is(t,r,i,s){i=sn(i,s,1);for(var a=i(r),d=0,p=En(t);d<p;){var h=Math.floor((d+p)/2);i(t[h])<a?d=h+1:p=h}return d}c(is,"sortedIndex");function $a(t,r,i){return function(s,a,d){var p=0,h=En(s);if(typeof d=="number")t>0?p=d>=0?d:Math.max(d+h,p):h=d>=0?Math.min(d+1,h):d+h+1;else if(i&&d&&h)return d=i(s,a),s[d]===a?d:-1;if(a!==a)return d=r(Xr.call(s,p,h),Xs),d>=0?d+p:-1;for(d=t>0?p:h-1;d>=0&&d<h;d+=t)if(s[d]===a)return d;return-1}}c($a,"createIndexFinder");var _c=$a(1,rs,is),yl=$a(-1,gl);function _o(t,r,i){var s=Ht(t)?rs:wo,a=s(t,r,i);if(a!==void 0&&a!==-1)return t[a]}c(_o,"find");function Qa(t,r){return _o(t,bn(r))}c(Qa,"findWhere");function Xn(t,r,i){r=ri(r,i);var s,a;if(Ht(t))for(s=0,a=t.length;s<a;s++)r(t[s],s,t);else{var d=Jt(t);for(s=0,a=d.length;s<a;s++)r(t[d[s]],d[s],t)}return t}c(Xn,"each");function ui(t,r,i){r=sn(r,i);for(var s=!Ht(t)&&Jt(t),a=(s||t).length,d=Array(a),p=0;p<a;p++){var h=s?s[p]:p;d[p]=r(t[h],h,t)}return d}c(ui,"map");function os(t){var r=c(function(i,s,a,d){var p=!Ht(i)&&Jt(i),h=(p||i).length,g=t>0?0:h-1;for(d||(a=i[p?p[g]:g],g+=t);g>=0&&g<h;g+=t){var _=p?p[g]:g;a=s(a,i[_],_,i)}return a},"reducer");return function(i,s,a,d){var p=arguments.length>=3;return r(i,ri(s,d,4),a,p)}}c(os,"createReduce");var ki=os(1),Sc=os(-1);function wr(t,r,i){var s=[];return r=sn(r,i),Xn(t,function(a,d,p){r(a,d,p)&&s.push(a)}),s}c(wr,"filter");function Ka(t,r,i){return wr(t,hl(sn(r)),i)}c(Ka,"reject");function Ga(t,r,i){r=sn(r,i);for(var s=!Ht(t)&&Jt(t),a=(s||t).length,d=0;d<a;d++){var p=s?s[d]:d;if(!r(t[p],p,t))return!1}return!0}c(Ga,"every");function Ii(t,r,i){r=sn(r,i);for(var s=!Ht(t)&&Jt(t),a=(s||t).length,d=0;d<a;d++){var p=s?s[d]:d;if(r(t[p],p,t))return!0}return!1}c(Ii,"some");function _r(t,r,i,s){return Ht(t)||(t=bt(t)),(typeof i!="number"||s)&&(i=0),_c(t,r,i)>=0}c(_r,"contains");var vl=fn(function(t,r,i){var s,a;return yn(r)?a=r:(r=Bn(r),s=r.slice(0,-1),r=r[r.length-1]),ui(t,function(d){var p=a;if(!p){if(s&&s.length&&(d=ti(d,s)),d==null)return;p=d[r]}return p==null?p:p.apply(d,i)})});function e(t,r){return ui(t,ni(r))}c(e,"pluck");function n(t,r){return wr(t,bn(r))}c(n,"where");function o(t,r,i){var s=-1/0,a=-1/0,d,p;if(r==null||typeof r=="number"&&typeof t[0]!="object"&&t!=null){t=Ht(t)?t:bt(t);for(var h=0,g=t.length;h<g;h++)d=t[h],d!=null&&d>s&&(s=d)}else r=sn(r,i),Xn(t,function(_,le,je){p=r(_,le,je),(p>a||p===-1/0&&s===-1/0)&&(s=_,a=p)});return s}c(o,"max");function l(t,r,i){var s=1/0,a=1/0,d,p;if(r==null||typeof r=="number"&&typeof t[0]!="object"&&t!=null){t=Ht(t)?t:bt(t);for(var h=0,g=t.length;h<g;h++)d=t[h],d!=null&&d<s&&(s=d)}else r=sn(r,i),Xn(t,function(_,le,je){p=r(_,le,je),(p<a||p===1/0&&s===1/0)&&(s=_,a=p)});return s}c(l,"min");var u=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function f(t){return t?Nr(t)?Xr.call(t):gn(t)?t.match(u):Ht(t)?ui(t,po):bt(t):[]}c(f,"toArray");function m(t,r,i){if(r==null||i)return Ht(t)||(t=bt(t)),t[lr(t.length-1)];var s=f(t),a=En(s);r=Math.max(Math.min(r,a),0);for(var d=a-1,p=0;p<r;p++){var h=lr(p,d),g=s[p];s[p]=s[h],s[h]=g}return s.slice(0,r)}c(m,"sample");function v(t){return m(t,1/0)}c(v,"shuffle");function S(t,r,i){var s=0;return r=sn(r,i),e(ui(t,function(a,d,p){return{value:a,index:s++,criteria:r(a,d,p)}}).sort(function(a,d){var p=a.criteria,h=d.criteria;if(p!==h){if(p>h||p===void 0)return 1;if(p<h||h===void 0)return-1}return a.index-d.index}),"value")}c(S,"sortBy");function I(t,r){return function(i,s,a){var d=r?[[],[]]:{};return s=sn(s,a),Xn(i,function(p,h){var g=s(p,h,i);t(d,p,g)}),d}}c(I,"group");var J=I(function(t,r,i){vr(t,i)?t[i].push(r):t[i]=[r]}),ke=I(function(t,r,i){t[i]=r}),W=I(function(t,r,i){vr(t,i)?t[i]++:t[i]=1}),de=I(function(t,r,i){t[i?0:1].push(r)},!0);function Ce(t){return t==null?0:Ht(t)?t.length:Jt(t).length}c(Ce,"size");function we(t,r,i){return r in i}c(we,"keyInObj");var k=fn(function(t,r){var i={},s=r[0];if(t==null)return i;yn(s)?(r.length>1&&(s=ri(s,r[1])),r=xi(t)):(s=we,r=oi(r,!1,!1),t=Object(t));for(var a=0,d=r.length;a<d;a++){var p=r[a],h=t[p];s(h,p,t)&&(i[p]=h)}return i}),T=fn(function(t,r){var i=r[0],s;return yn(i)?(i=hl(i),r.length>1&&(s=r[1])):(r=ui(oi(r,!1,!1),String),i=c(function(a,d){return!_r(r,d)},"iteratee")),k(t,i,s)});function P(t,r,i){return Xr.call(t,0,Math.max(0,t.length-(r==null||i?1:r)))}c(P,"initial");function j(t,r,i){return t==null||t.length<1?r==null||i?void 0:[]:r==null||i?t[0]:P(t,t.length-r)}c(j,"first");function z(t,r,i){return Xr.call(t,r==null||i?1:r)}c(z,"rest");function Ie(t,r,i){return t==null||t.length<1?r==null||i?void 0:[]:r==null||i?t[t.length-1]:z(t,Math.max(0,t.length-r))}c(Ie,"last");function oe(t){return wr(t,Boolean)}c(oe,"compact");function be(t,r){return oi(t,r,!1)}c(be,"flatten_flatten");var Ue=fn(function(t,r){return r=oi(r,!0,!0),wr(t,function(i){return!_r(r,i)})}),Le=fn(function(t,r){return Ue(t,r)});function ar(t,r,i,s){Ea(r)||(s=i,i=r,r=!1),i!=null&&(i=sn(i,s));for(var a=[],d=[],p=0,h=En(t);p<h;p++){var g=t[p],_=i?i(g,p,t):g;r&&!i?((!p||d!==_)&&a.push(g),d=_):i?_r(d,_)||(d.push(_),a.push(g)):_r(a,g)||a.push(g)}return a}c(ar,"uniq");var id=fn(function(t){return ar(oi(t,!0,!0))});function wd(t){for(var r=[],i=arguments.length,s=0,a=En(t);s<a;s++){var d=t[s];if(!_r(r,d)){var p;for(p=1;p<i&&_r(arguments[p],d);p++);p===i&&r.push(d)}}return r}c(wd,"intersection");function Ec(t){for(var r=t&&o(t,En).length||0,i=Array(r),s=0;s<r;s++)i[s]=e(t,s);return i}c(Ec,"unzip");var Rf=fn(Ec);function _d(t,r){for(var i={},s=0,a=En(t);s<a;s++)r?i[t[s]]=r[s]:i[t[s][0]]=t[s][1];return i}c(_d,"object");function Sd(t,r,i){r==null&&(r=t||0,t=0),i||(i=r<t?-1:1);for(var s=Math.max(Math.ceil((r-t)/i),0),a=Array(s),d=0;d<s;d++,t+=i)a[d]=t;return a}c(Sd,"range");function Ed(t,r){if(r==null||r<1)return[];for(var i=[],s=0,a=t.length;s<a;)i.push(Xr.call(t,s,s+=r));return i}c(Ed,"chunk");function Tc(t,r){return t._chain?et(r).chain():r}c(Tc,"chainResult");function od(t){return Xn(Jr(t),function(r){var i=et[r]=t[r];et.prototype[r]=function(){var s=[this._wrapped];return Ko.apply(s,arguments),Tc(this,i.apply(et,s))}}),et}c(od,"mixin"),Xn(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var r=Qo[t];et.prototype[t]=function(){var i=this._wrapped;return i!=null&&(r.apply(i,arguments),(t==="shift"||t==="splice")&&i.length===0&&delete i[0]),Tc(this,i)}}),Xn(["concat","join","slice"],function(t){var r=Qo[t];et.prototype[t]=function(){var i=this._wrapped;return i!=null&&(i=r.apply(i,arguments)),Tc(this,i)}});var kf=et,sd=od(te);sd._=sd;var ld=sd,If=Object.defineProperty,bf=c((t,r,i)=>r in t?If(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"AncestorScrollDetector_defNormalProp"),ad=c((t,r,i)=>(bf(t,typeof r!="symbol"?r+"":r,i),i),"AncestorScrollDetector_publicField");class Td{constructor(r){ad(this,"tree",new Map),ad(this,"rootNode"),ad(this,"handleScroll",i=>{if(!i.target)return;const s=i.target;this.tree.get(s)&&s.querySelectorAll(".js-fake-embed").forEach(a=>{const d=this.tree.get(a);d&&d.callback&&d.callback(s)})}),this.rootNode=r}addListener(r,i){var s;if(!((s=this.rootNode)!=null&&s.contains(r))||this.tree.has(r))return;let a=r;for(this.tree.set(a,{node:a,children:new Map,leaf:!0,callback:i});a&&a.parentElement;){const d=this.tree.get(a.parentElement);if(d){d.children.set(a,!0);break}this.tree.set(a.parentElement,{node:a.parentElement,children:new Map([[a,!0]])}),a.parentElement.addEventListener("scroll",this.handleScroll),a=a.parentElement}}removeListener(r){const i=this.tree.get(r);if(!i||!i.leaf)return;let s=r;for(;s;){const a=this.tree.get(s);if(!a)break;const d=s.parentElement?this.tree.get(s.parentElement):null;if(s!==this.rootNode&&!d||d&&!d.children.has(s)||(d&&d?.children.delete(s),a.children.size!==0)||(s.removeEventListener("scroll",this.handleScroll),this.tree.delete(s),!d))break;s=d.node}}}c(Td,"AncestorScrollDetector");const ud=(0,se.createContext)({}),Of=c(({root:t,children:r})=>{const i=(0,se.useMemo)(()=>new Td(t),[]);return(0,ft.jsx)(ud.Provider,{value:i,children:r})},"AncestorScrollDetectorProvider"),Nf=c(()=>(0,se.useContext)(ud),"useAncestorScrollDetector"),xd=(0,se.createContext)(null),Df=c(({plugin:t,children:r})=>(0,ft.jsx)(xd.Provider,{value:t,children:r}),"PluginProvider"),bi=c(()=>{const t=(0,se.useContext)(xd);if(!t)throw new Error("You must wrap any RemNote API hooks in a <PluginProvider/>");return t},"usePlugin"),Cd=(0,se.createContext)(null),Af=c(({pluginRoot:t,children:r})=>(0,ft.jsx)(Cd.Provider,{value:t,children:r}),"PluginRootProvider"),Ff=c(()=>(0,se.useContext)(Cd),"usePluginRootDivRef");function Pd(t){return{all:t=t||new Map,on:function(r,i){var s=t.get(r);s?s.push(i):t.set(r,[i])},off:function(r,i){var s=t.get(r);s&&(i?s.splice(s.indexOf(i)>>>0,1):t.set(r,[]))},emit:function(r,i){var s=t.get(r);s&&s.slice().map(function(a){a(i)}),(s=t.get("*"))&&s.slice().map(function(a){a(r,i)})}}}c(Pd,"mitt");const xc=Pd();var Cc=(t=>(t.PluginBodyResizeOrTreeRenders="PluginBodyResizeOrTreeRenders",t))(Cc||{});const Lf=c((t,r)=>{(0,se.useEffect)(()=>(xc.on(t,r),()=>xc.off(t,r)),[t,r])},"useEvent");function Rd(t){const r=se.useRef(t),i=se.useRef(0);return ld.isEqual(t,r.current)||(r.current=t,i.current+=1),se.useMemo(()=>r.current,[i.current])}c(Rd,"useDeepCompareMemoize");function kd(t,r){return se.useEffect(t,Rd(r))}c(kd,"useDeepCompareEffectNoCheck");var jf=Object.defineProperty,Mf=Object.defineProperties,Bf=Object.getOwnPropertyDescriptors,Pc=Object.getOwnPropertySymbols,Id=Object.prototype.hasOwnProperty,bd=Object.prototype.propertyIsEnumerable,Od=c((t,r,i)=>r in t?jf(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"FakeEmbed_defNormalProp"),Lr=c((t,r)=>{for(var i in r||(r={}))Id.call(r,i)&&Od(t,i,r[i]);if(Pc)for(var i of Pc(r))bd.call(r,i)&&Od(t,i,r[i]);return t},"FakeEmbed_spreadValues"),zf=c((t,r)=>Mf(t,Bf(r)),"FakeEmbed_spreadProps"),Uf=c((t,r)=>{var i={};for(var s in t)Id.call(t,s)&&r.indexOf(s)<0&&(i[s]=t[s]);if(t!=null&&Pc)for(var s of Pc(t))r.indexOf(s)<0&&bd.call(t,s)&&(i[s]=t[s]);return i},"FakeEmbed_objRest"),Zf=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"FakeEmbed_async");const Wf=c(t=>typeof t=="string"&&/[0-9]{1,}%/.test(t)?parseInt(t.replace("%","")):void 0,"parsePercentage"),Vf=c(t=>typeof t=="string"&&/[0-9]{1,}px/.test(t)?parseInt(t.replace("px","")):void 0,"parsePx"),Rc=c((t,r)=>{const i=Wf(r),s=Vf(r);return i?t*i/100:s||null},"dimensionToNumber"),Hf=c(({maxWidth:t,maxHeight:r,width:i,height:s,constraintWidth:a,constraintHeight:d})=>{const p=typeof i=="string"&&i!=="auto"?Rc(a,i):i,h=typeof t=="string"?Rc(a,t):t,g=typeof s=="string"&&s!=="auto"?Rc(d,s):s,_=typeof r=="string"?Rc(d,r):r;return{width:p,maxWidth:h,height:g,maxHeight:_}},"calculateStyles");function Nd(t){return t.clientHeight<t.scrollHeight}c(Nd,"isVerticallyScrollable");function Dd(t){return t.clientWidth<t.scrollWidth}c(Dd,"isHorizontallScrollable");const $f=c(({componentType:t,externalProps:r,maxHeight:i=null,maxWidth:s=null,height:a="auto",width:d="auto",constraintRef:p="parent"})=>{var h,g,_,le,je,xn;((g=(h=window?.Env)==null?void 0:h.deploy)!=null&&g.isDevelopment||(le=(_=window?.Env)==null?void 0:_.deploy)!=null&&le.isStaging||(xn=(je=window?.Env)==null?void 0:je.app)!=null&&xn.isCypress)&&(console.error("You imported the wrong component!"),alert("You imported the wrong component!"));const Ve=(0,se.useRef)(null),pt=bi(),Sl=Ff(),qn=(0,se.useRef)(),[El,yp]=(0,se.useState)(!1),md=Nf(),Dc=(0,se.useRef)(),Oi=(0,se.useRef)({height:a,width:d,maxHeight:i,maxWidth:s}),ss=(0,se.useRef)(),Sf=(0,se.useCallback)(rt=>{!Ve.current||rt.height===void 0||rt.width===void 0||pt.isNative||(Ve.current.style.height=rt.height+"px",Ve.current.style.width=rt.width+"px")},[]),Ef=c(rt=>{var jt;rt.type=="wheel"?vp(rt):(jt=Ve.current)==null||jt.dispatchEvent(new Event(rt.type,zf(Lr({},rt),{bubbles:!0})))},"onDOMEvent"),vp=(0,se.useCallback)(rt=>{if(!(!Ve.current||rt.deltaY===void 0||rt.deltaX===void 0)){if(rt.deltaY){let jt=Ve.current;for(;jt&&!Nd(jt);)jt=jt.parentElement;jt&&(jt.scrollTop+=rt.deltaY)}if(rt.deltaX){let jt=Ve.current;for(;jt&&!Dd(jt);)jt=jt.parentElement;jt&&(jt.scrollLeft+=rt.deltaX)}}},[]),Tf=c(()=>{if(!qn.current||!pt)return;const rt=Dc.current?Hf({constraintWidth:Dc.current.constraintWidth,constraintHeight:Dc.current.constraintHeight,height:Oi.current.height,width:Oi.current.width,maxHeight:Oi.current.maxHeight,maxWidth:Oi.current.maxWidth}):{height:Oi.current.height,width:Oi.current.width,maxHeight:Oi.current.maxHeight,maxWidth:Oi.current.maxWidth};pt.updateFakeEmbedComponentRect(qn.current,rt)},"updateDimensions"),xf=c(()=>{var rt;if(!(pt!=null&&pt.inSandbox)||!Ve.current||!qn.current)return;const{top:jt,left:ls}=Ve.current.getBoundingClientRect(),as=((rt=Sl?.current)==null?void 0:rt.getBoundingClientRect())||{top:0,left:0},fi=jt-as.top,us=ls-as.left;ss.current&&ss?.current.top===fi&&ss?.current.left===us||(ss.current={left:us,top:fi},pt.updateFakeEmbedComponentRect(qn.current,{top:fi,left:us}))},"handleResizeOrScrollEvent");(0,se.useEffect)(()=>{if(pt||console.error("You must wrap your components in a <PluginProvider/> or a renderWidget call."),!pt||!Ve.current)return;gd();const rt=Ei();return Zf(void 0,null,function*(){var jt;const{top:ls,left:as}=Ve.current.getBoundingClientRect();ss.current={top:ls,left:as};const fi=((jt=Sl?.current)==null?void 0:jt.getBoundingClientRect())||{top:0,left:0},us=ls-fi.top,yd=as-fi.left;pt.event.addListener(A.FakeEmbedComponentDimensionChange,rt,Sf),pt.event.addListener(A.FakeEmbedDOMEvent,rt,Ef),pt.isNative&&window.nativePluginDivs.set("virtual-"+rt,Ve.current),yield pt.createFakeEmbedComponent({id:rt,type:t,top:us,left:yd,externalProps:r}),qn.current=rt,yp(!0)}),()=>{qn.current&&(pt.unmountFakeEmbedComponent(qn.current),pt.isNative&&window.nativePluginDivs.delete("virtual-"+rt),pt.event.removeListener(A.FakeEmbedComponentDimensionChange,qn.current,Sf),pt.event.removeListener(A.FakeEmbedDOMEvent,qn.current,Ef))}},[]);function gd(){try{JSON.stringify(r)}catch{throw console.error("ExternalProps are not serializable.",r),new Error(`All props passed to a RemNote React Component must be JSON serializable. Check the devtools to see your props for your ${t} component.`)}}c(gd,"throwErrorIfExternalPropsAreNotSerializable");function Cf(){gd(),qn.current&&pt.updateFakeEmbedExternalProps(qn.current,r)}return c(Cf,"updateExternalProps"),kd(Cf,[r]),(0,se.useEffect)(()=>{El&&(Oi.current={maxHeight:i,maxWidth:s,height:a,width:d},Tf())},[i,s,d,a,El]),(0,se.useEffect)(()=>{var rt;if(pt!=null&&pt.inSandbox&&qn.current&&El&&p){const jt=p==="parent"?(rt=Ve.current)==null?void 0:rt.parentElement:p.current;if(!jt)return;const ls=new ResizeObserver(as=>{for(const fi of as)if(fi.contentBoxSize){const us=fi.contentBoxSize[0].inlineSize,yd=fi.contentBoxSize[0].blockSize;Dc.current={constraintHeight:yd,constraintWidth:us},Tf()}});return ls.observe(jt),()=>ls.disconnect()}else return},[p,El]),Lf(Cc.PluginBodyResizeOrTreeRenders,xf),(0,se.useLayoutEffect)(()=>{if(!(!El||!Ve.current||!md))return md.addListener(Ve.current,ld.debounce(xf,10)),()=>{Ve.current&&md.removeListener(Ve.current)}},[El]),(0,se.useEffect)(()=>()=>{pt&&qn.current&&pt.unmountFakeEmbedComponent(qn.current)},[]),(0,ft.jsx)("div",{ref:Ve,className:"js-fake-embed"})},"FakeEmbedHost"),ci=c(t=>{const r=t,{width:i,maxHeight:s,constraintRef:a,height:d,maxWidth:p,componentType:h}=r,g=Uf(r,["width","maxHeight","constraintRef","height","maxWidth","componentType"]);return(0,ft.jsx)($f,{componentType:h,externalProps:g,width:i,height:d,maxHeight:s,maxWidth:p,constraintRef:a})},"FakeEmbedHostConcrete");class Ad extends se.Component{render(){return(0,ft.jsx)(ci,Lr({componentType:Ln.RichTextEditor},this.props))}}c(Ad,"RichTextEditor");class Fd extends se.Component{render(){return(0,ft.jsx)(ci,Lr({componentType:Ln.RichText},this.props))}}c(Fd,"RichText");class Ld extends se.Component{render(){return(0,ft.jsx)(ci,Lr({componentType:Ln.RemViewer},this.props))}}c(Ld,"RemViewer");class jd extends se.Component{render(){return(0,ft.jsx)(ci,Lr({componentType:Ln.PDFWebReader},this.props))}}c(jd,"PDFWebReader");class Md extends se.Component{render(){return(0,ft.jsx)(ci,Lr({componentType:Ln.DocumentViewer},this.props))}}c(Md,"DocumentViewer");class Bd extends se.Component{render(){return(0,ft.jsx)(ci,Lr({componentType:Ln.RemRichTextEditor},this.props))}}c(Bd,"RemRichTextEditor");class zd extends se.Component{render(){return(0,ft.jsx)(ci,Lr({componentType:Ln.RemHierarchyEditorTree},this.props))}}c(zd,"RemHierarchyEditorTree");class Ud extends se.Component{render(){return(0,ft.jsx)(ci,Lr({componentType:Ln.Queue},this.props))}}c(Ud,"Queue");class Zd extends se.Component{render(){return(0,ft.jsx)(ci,Lr({componentType:Ln.LoadingSpinner},this.props))}}c(Zd,"LoadingSpinnerPlugin");class Wd extends se.Component{render(){return(0,ft.jsx)(ci,Lr({componentType:Ln.PreviewRemCards},this.props))}}c(Wd,"PreviewRemCards");function cd(t){var r,i,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t))for(r=0;r<t.length;r++)t[r]&&(i=cd(t[r]))&&(s&&(s+=" "),s+=i);else for(r in t)t[r]&&(s&&(s+=" "),s+=r);return s}c(cd,"r");function Vd(){for(var t,r,i=0,s="";i<arguments.length;)(t=arguments[i++])&&(r=cd(t))&&(s&&(s+=" "),s+=r);return s}c(Vd,"clsx");var Qf=Vd,Kf=tt(318),Hd=tt.n(Kf),Gf=Object.defineProperty,Yf=c((t,r,i)=>r in t?Gf(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"PluginRenderer_defNormalProp"),$d=c((t,r,i)=>(Yf(t,typeof r!="symbol"?r+"":r,i),i),"PluginRenderer_publicField"),Qd=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"PluginRenderer_async");const Xf=c(({plugin:t,children:r})=>{const i=(0,se.useRef)(null);(0,se.useEffect)(()=>{if(!i.current||!t.inSandbox)return;const h=new ResizeObserver(()=>{i.current&&xc.emit(Cc.PluginBodyResizeOrTreeRenders)}),g=new MutationObserver(_=>{for(const le of _)(le.type==="attributes"||le.type==="childList")&&xc.emit(Cc.PluginBodyResizeOrTreeRenders)});return g.observe(i.current,{attributes:!0,childList:!0,subtree:!0}),h.observe(i.current),()=>{i.current&&(h.disconnect(),g.disconnect())}},[]);const s=t.inSandbox?{current:document.getElementsByTagName("html")[0]}:i,a=t.inSandbox?document.getElementsByTagName("html")[0]:t.mountDiv,d=t.inSandbox?Of:Kd,p=(0,ft.jsx)("div",{ref:i,className:Qf("plugin rn-clr-content-primary font-inter",t.id==="demo-tabs"&&"fade-on-hide-ui"),"data-plugin-id":t.id,children:r});return(0,ft.jsx)(Df,{plugin:t,children:(0,ft.jsx)(Af,{pluginRoot:s,children:(0,ft.jsx)(d,{root:a,children:p})})})},"PluginWrapper");function Kd(t){return(0,ft.jsx)(ud.Provider,{value:null,children:t.children})}c(Kd,"NoScrollDetector");class kc extends so{constructor(r,i){super(),$d(this,"initReact"),$d(this,"onDeactivateReact"),this.initReact=r,this.onDeactivateReact=i}onActivate(r,i){return Qd(this,null,function*(){this.initReact(this,r,i)})}onDeactivate(){return Qd(this,null,function*(){this.onDeactivateReact(this)})}}c(kc,"ReactRNPlugin");const Gd=c(t=>{const r=c(i=>{const s=c((d,p,h)=>Hd().render((0,ft.jsxs)(se.StrictMode,{children:[(0,ft.jsx)(Xf,{plugin:d,children:(0,ft.jsx)(t,{})}),(0,ft.jsx)("link",{rel:"stylesheet",href:`${h}App.css`,as:"style",type:"text/css",crossOrigin:"anonymous"})]}),p),"initReact"),a=c(d=>{console.log("onDeactivateReact"),Hd().unmountComponentAtNode(d.mountDiv)},"onDeactivateReact");return i?(window.__plugin?(console.log("[HMR] Hot reloading RemNote plugin widget."),a(window.__plugin),s(window.__plugin,window.__plugin.mountDiv,window.__plugin.rootURL)):window.__plugin=new kc(s,a),window.__plugin):new kc(s,a)},"makePlugin");try{const i=new URL(IMPORT_META.url).searchParams,s=i.get("widgetName"),a=i.get("pluginId");window.nativePluginRenderers.set(`${a}.${s}`,r)}catch{r(!0)}},"renderWidget");function Yd(t,r){function i(){const s=bi();return(0,se.useEffect)(()=>(s&&t(s),()=>{s&&r(s)}),[s]),null}c(i,"IndexWidget"),Gd(i)}c(Yd,"declareIndexPlugin");function Xd(t){return Ic(A.MessageBroadcast,void 0,t)}c(Xd,"useOnMessageBroadcast");function Ic(t,r,i){const s=bi();(0,se.useEffect)(()=>(s.event.addListener(t,r,i),()=>{s.event.removeListener(t,r,i)}),[t,r,i])}c(Ic,"useAPIEventListener");var qf=Object.defineProperty,qd=Object.getOwnPropertySymbols,Jf=Object.prototype.hasOwnProperty,ep=Object.prototype.propertyIsEnumerable,Jd=c((t,r,i)=>r in t?qf(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"rem_hooks_defNormalProp"),tp=c((t,r)=>{for(var i in r||(r={}))Jf.call(r,i)&&Jd(t,i,r[i]);if(qd)for(var i of qd(r))ep.call(r,i)&&Jd(t,i,r[i]);return t},"rem_hooks_spreadValues"),np=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"rem_hooks_async");function dd(t,r){const i=new Set(r);return t.filter(s=>!i.has(s))}c(dd,"rem_hooks_difference");function ef(t){return t.filter(r=>r)}c(ef,"rem_hooks_compact");function tf(t){const r=bi(),i=ef(t||[]),[s,a]=(0,se.useState)({}),[d,p]=(0,se.useState)(i.map(je=>s[je])),h=c((je,xn)=>{xn&&a(Ve=>{const pt=tp({},Ve);return pt[je]=xn,p(i.map(Sl=>pt[Sl])),pt})},"setRem"),g=c(je=>np(this,null,function*(){h(je,yield r.rem.findOne(je))}),"refetchRem"),_=(0,se.useRef)([]),le=(0,se.useRef)(new Map);return(0,se.useEffect)(()=>{const je=dd(i,_.current),xn=dd(_.current,i);for(const Ve of je){const pt=c(()=>g(Ve),"listener");le.current.set(Ve,pt),r.event.addListener(A.RemChanged,Ve,pt),g(Ve)}for(const Ve of xn)r.event.removeListener(A.RemChanged,Ve,le.current.get(Ve));p(i.map(Ve=>s[Ve])),_.current=i},[i.length,...i]),(0,se.useEffect)(()=>()=>{for(const je of _.current)r.event.removeListener(A.RemChanged,je,le.current.get(je))},[]),d}c(tf,"useGetRemsByIdsReactive");var nf=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"storage_hooks_async");function bc(t,r,i,s,a,d){const[p,h]=(0,se.useState)(d),g=c(()=>nf(this,null,function*(){r&&h((yield s(r))||d)}),"refetchValue");return(0,se.useEffect)(()=>{g()},[r]),Ic(i,r,_=>{h(_)}),[p,c(_=>nf(this,null,function*(){yield a(r,_)}),"setValue")]}c(bc,"useStorageStateInternal");function rf(t,r){const i=bi();return bc(i,t,A.StorageSessionChange,i.storage.getSession,i.storage.setSession,r)}c(rf,"useSessionStorageState");function of(t,r){const i=bi();return bc(i,t,A.StorageLocalChange,i.storage.getLocal,i.storage.setLocal,r)}c(of,"useLocalStorageState");function sf(t,r){const i=bi();return bc(i,t,A.StorageSyncedChange,i.storage.getSynced,i.storage.setSynced,r)}c(sf,"useSyncedStorageState");var lf=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"react_hooks_async");function af(t,r){const[i,s]=(0,se.useState)(void 0);return(0,se.useEffect)(()=>{lf(this,null,function*(){return s(yield t())})},r),i}c(af,"useRunAsync");function uf(t,r){return lf(this,null,function*(){const i=[],s=yield Promise.all(t.map(a=>r(a)));for(const[a,d]of ld.zip(s,t))a&&i.push(d);return i})}c(uf,"filterAsync");const rp=["card","editor","focus","messaging","powerup","rem","richText","settings","storage","widget","window","search"],$t=c(t=>({event:A.RemChanged,key:typeof t=="string"?t:typeof t=="object"?t._id:void 0}),"remReactiveDep"),di=c(t=>({event:t,key:void 0}),"noKeyDep"),cf={allRemInDocumentOrPortal:{resultDeps:t=>t.map($t)},deepRemsBeingReferenced:{resultDeps:t=>t.map($t)},getAliases:{resultDeps:t=>t.map($t)},getDescendants:{resultDeps:t=>t.map($t)},getSources:{resultDeps:t=>t.map($t)},getTagRems:{resultDeps:t=>t.map($t)},getParentRem:{resultDeps:t=>[$t(t)]},getChildrenRem:{resultDeps:t=>t.map($t)},getPortalDirectlyIncludedRem:{resultDeps:t=>t.map($t)},portalsAndDocumentsIn:{resultDeps:t=>t.map($t)},remsBeingReferenced:{resultDeps:t=>t.map($t)},remsReferencingThis:{resultDeps:t=>t.map($t)},siblingRem:{resultDeps:t=>t.map($t)},taggedRem:{resultDeps:t=>t.map($t)}},df={rem:{findByName:{resultDeps:t=>[$t(t)]},findOne:{argsDeps:t=>[$t(t[0])]},findMany:{argsDeps:t=>t[0].map($t)},getAll:{resultDeps:t=>t.map($t)}},powerup:{getPowerupSlotByCode:{resultDeps:t=>[$t(t)]},getPowerupByCode:{resultDeps:t=>[$t(t)]}},settings:{getSetting:{argsDeps:t=>[{event:A.SettingChanged,key:t[0]}]}},card:{},storage:{getLocal:{argsDeps:t=>[{event:A.StorageLocalChange,key:t[0]}]},getSession:{argsDeps:t=>[{event:A.StorageSessionChange,key:t[0]}]},getSynced:{argsDeps:t=>[{event:A.StorageSyncedChange,key:t[0]}]}},window:{getCurrentWindowTree:{argsDeps:()=>[di(A.CurrentWindowTreeChange)]},getFocusedPaneId:{argsDeps:()=>[di(A.FocusedPaneChange)]}},editor:{getFocusedEditorText:{argsDeps:()=>[di(A.FocusedRemChange),di(A.EditorTextEdited)]},getSelection:{argsDeps:()=>[di(A.EditorSelectionChanged)]},getSelectedRem:{argsDeps:()=>[di(A.EditorSelectionChanged)]},getSelectedText:{argsDeps:()=>[di(A.EditorSelectionChanged)]},getCaretPosition:{argsDeps:()=>[di(A.EditorSelectionChanged)]}},focus:{getFocusedRem:{argsDeps:()=>[di(A.FocusedRemChange)],resultDeps:t=>[$t(t)]},getFocusedPortal:{argsDeps:()=>[di(A.FocusedPortalChange)],resultDeps:t=>[$t(t)]}}};var Oc=c((t,r,i)=>new Promise((s,a)=>{var d=c(g=>{try{h(i.next(g))}catch(_){a(_)}},"fulfilled"),p=c(g=>{try{h(i.throw(g))}catch(_){a(_)}},"rejected"),h=c(g=>g.done?s(g.value):Promise.resolve(g.value).then(d,p),"step");h((i=i.apply(t,r)).next())}),"useTracker_async");const wl=!1;function ff(t){return rp.includes(t)}c(ff,"isNamespacedProp");const ip=c((t,r)=>Array.isArray(t)&&t[0]instanceof Wn?(wl&&console.log("wrapping result array in Rem proxy"),t.map(i=>fd(i,r))):t&&t instanceof Wn?(wl&&console.log("wrapping result in Rem proxy"),fd(t,r)):t,"wrapResult"),pf=c((t,r,i,s)=>new Proxy(t,{apply:(a,d,p)=>Oc(void 0,null,function*(){const h=yield a.apply(d,p);return s(r,d,i,p,h),ip(h,s)})}),"wrapFunctionCall");function fd(t,r){return new Proxy(t,{get(i,s){var a;return typeof i[s]=="function"&&(a=cf)!=null&&a[s]?pf(i[s],void 0,s,r):i[s]}})}c(fd,"interceptReactiveRemCalls");function hf(t,r,i){return new Proxy(r,{get(s,a){var d,p;return typeof a=="string"&&typeof s[a]=="function"&&(p=(d=df)==null?void 0:d[t])!=null&&p[a]?pf(s[a],t,a,i):s[a]}})}c(hf,"interceptReactiveAPICalls");function mf(t,r){return new Proxy(t,{get(i,s){return ff(s)?hf(s,i[s],r):i[s]}})}c(mf,"interceptAPINamespaceAccesses");function pd(t){return new Set(t?.map(({reactiveDeps:r})=>r.map(Nc)).flat())}c(pd,"subscriptionsToSubscriptionSet");function Nc(t){const{event:r,key:i}=t;return`${r}.${i}`}c(Nc,"reactiveDepToKey");const op=c(t=>{const r=[];return{proxy:mf(t,(i,s,a,d,p)=>{var h,g,_,le,je,xn;const Ve=i?(g=(h=df)==null?void 0:h[i])==null?void 0:g[a]:(_=cf)==null?void 0:_[a],pt=[...((le=Ve.thisDeps)==null?void 0:le.call(Ve,s))||[],...((je=Ve.argsDeps)==null?void 0:je.call(Ve,d))||[],...((xn=Ve.resultDeps)==null?void 0:xn.call(Ve,p))||[]];r.push({methodName:a,args:d,reactiveDeps:pt})}),subscriptions:r}},"wrapApiWithListen"),hd=c((t,r,i,s,a)=>Oc(void 0,null,function*(){const d=op(t);return yield c(()=>Oc(void 0,null,function*(){d.subscriptions.length;const p=yield r(d.proxy);wl&&console.log("useReactiveAPI result",p),s(p)}),"changeHandler")(),gf(t,i,a,d.subscriptions),d.subscriptions}),"createReactiveApi");function gf(t,r,i,s){const a=pd(i||[]),d=pd(s);i?.forEach(({reactiveDeps:p})=>{for(const h of p)if(!d.has(Nc(h))){const{event:g,key:_}=h;wl&&console.log("removeListener",g,_),t.event.removeListener(g,_,r)}}),s?.forEach(({reactiveDeps:p})=>{for(const h of p)if(!a.has(Nc(h))){const{event:g,key:_}=h;wl&&console.log("addListener",g,_),t.event.addListener(g,_,r)}})}c(gf,"updateListeners");function yf(t,r=[]){const i=bi(),[s,a]=ir().useState(),d=(0,se.useRef)(!1),p=(0,se.useRef)(!1),h=(0,se.useRef)(),g=(0,se.useRef)(t);g.current=t;const _=c(()=>{wl&&console.log("useReactiveAPI RUN",d.current,p.current,h.current,r),d.current?p.current=!0:(d.current=!0,c(()=>Oc(this,null,function*(){h.current=yield hd(i,g.current,_,a,h.current||[]),d.current=!1,p.current&&(p.current=!1,_())}),"effect")())},"run");return ir().useEffect(_,r),s}c(yf,"useTrackerPlugin");const sp=/^[-_a-zA-Z0-9]+$/,lp=x.nativeEnum(Dl),_p=x.nativeEnum(Rr),_l=x.object({level:lp}),ap=x.object({type:x.literal(Rr.KnowledgeBaseInfo)}).merge(_l),up=x.object({type:x.literal(Rr.All)}).merge(_l),cp=x.object({type:x.literal(Rr.DescendantsOfName),remName:x.string()}).merge(_l),dp=x.object({type:x.literal(Rr.DescendantsOfId),remId:x.string()}).merge(_l),fp=x.object({type:x.literal(Rr.Powerup),powerupCode:x.string()}).merge(_l),pp=x.object({type:x.literal(Rr.FocusedSubtree)}).merge(_l),hp=x.union([up,cp,dp,fp,pp,ap]),vf=x.object({major:x.number().gte(0),minor:x.number().gte(0),patch:x.number().gte(0)}),wf=x.object({id:x.string().min(5).max(100).refine(t=>sp.test(t),"Plugin ids may consist only of lowercase Latin letters a-z, A-Z, hyphens, underscores, and digits 0-9"),name:x.string().min(3).max(100),version:vf,manifestVersion:x.literal(1),requestNative:x.boolean(),requiredScopes:x.array(hp),repoUrl:x.string().url(),author:x.string().min(3).max(100),enableOnMobile:x.boolean(),theme:x.union([x.literal("dark"),x.literal("light")]).array().optional(),minimumRemNoteVersion:vf.optional(),description:x.string().max(200).optional(),projectUrl:x.string().url().optional(),supportUrl:x.string().url().optional(),changelogUrl:x.string().url().optional(),unlisted:x.boolean().optional()}),mp=wf.merge(x.object({repoUrl:x.string().url().optional()})),Sp=c(t=>`${t.field}: ${t.message}`,"formatValidationError"),_f=c(t=>{const r=t.errors,i=[];for(const s of r){const{code:a,message:d,path:p}=s,h={field:p.join(".")?p.join("."):"Root Object",message:`${d} (${a})`};"expected"in s&&(h.expected=s.expected),"received"in s&&(h.received=s.received),i.push(h)}return i},"prettifyZodErrors"),gp=c(t=>{const r=wf.safeParse(t);return r.success?r:{success:!1,errors:_f(r.error)}},"parseManifest"),Ep=c(t=>{const r=mp.safeParse(t);return r.success?r:{success:!1,errors:_f(r.error)}},"parseSnippetManifest")})(),ot})()})},575(tn){"use strict";/*
26
26
  object-assign
27
27
  (c) Sindre Sorhus
28
28
  @license MIT
29
- */var K=Object.getOwnPropertySymbols,Xe=Object.prototype.hasOwnProperty,Ot=Object.prototype.propertyIsEnumerable;function Ae(B){if(B==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(B)}function it(){try{if(!Object.assign)return!1;var B=new String("abc");if(B[5]="de",Object.getOwnPropertyNames(B)[0]==="5")return!1;for(var wn={},Et=0;Et<10;Et++)wn["_"+String.fromCharCode(Et)]=Et;var Tt=Object.getOwnPropertyNames(wn).map(function(Y){return wn[Y]});if(Tt.join("")!=="0123456789")return!1;var b={};return"abcdefghijklmnopqrst".split("").forEach(function(Y){b[Y]=Y}),Object.keys(Object.assign({},b)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}en.exports=it()?Object.assign:function(B,wn){for(var Et,Tt=Ae(B),b,Y=1;Y<arguments.length;Y++){Et=Object(arguments[Y]);for(var c in Et)Xe.call(Et,c)&&(Tt[c]=Et[c]);if(K){b=K(Et);for(var Mt=0;Mt<b.length;Mt++)Ot.call(Et,b[Mt])&&(Tt[b[Mt]]=Et[b[Mt]])}}return Tt}},638(en,K,Xe){"use strict";/** @license React v17.0.2
29
+ */var K=Object.getOwnPropertySymbols,qe=Object.prototype.hasOwnProperty,Ot=Object.prototype.propertyIsEnumerable;function De(B){if(B==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(B)}function it(){try{if(!Object.assign)return!1;var B=new String("abc");if(B[5]="de",Object.getOwnPropertyNames(B)[0]==="5")return!1;for(var wn={},Et=0;Et<10;Et++)wn["_"+String.fromCharCode(Et)]=Et;var Tt=Object.getOwnPropertyNames(wn).map(function(Y){return wn[Y]});if(Tt.join("")!=="0123456789")return!1;var b={};return"abcdefghijklmnopqrst".split("").forEach(function(Y){b[Y]=Y}),Object.keys(Object.assign({},b)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}tn.exports=it()?Object.assign:function(B,wn){for(var Et,Tt=De(B),b,Y=1;Y<arguments.length;Y++){Et=Object(arguments[Y]);for(var c in Et)qe.call(Et,c)&&(Tt[c]=Et[c]);if(K){b=K(Et);for(var Mt=0;Mt<b.length;Mt++)Ot.call(Et,b[Mt])&&(Tt[b[Mt]]=Et[b[Mt]])}}return Tt}},638(tn,K,qe){"use strict";/** @license React v17.0.2
30
30
  * react-dom.production.min.js
31
31
  *
32
32
  * Copyright (c) Facebook, Inc. and its affiliates.
33
33
  *
34
34
  * This source code is licensed under the MIT license found in the
35
35
  * LICENSE file in the root directory of this source tree.
36
- */var Ot=Xe(999),Ae=Xe(575),it=Xe(825);function B(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o<arguments.length;o++)n+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!Ot)throw Error(B(227));var wn=new Set,Et={};function Tt(e,n){b(e,n),b(e+"Capture",n)}function b(e,n){for(Et[e]=n,e=0;e<n.length;e++)wn.add(n[e])}var Y=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Mt=Object.prototype.hasOwnProperty,ht={},Ve={};function at(e){return Mt.call(Ve,e)?!0:Mt.call(ht,e)?!1:c.test(e)?Ve[e]=!0:(ht[e]=!0,!1)}function Pt(e,n,o,l){if(o!==null&&o.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return l?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function tt(e,n,o,l){if(n===null||typeof n>"u"||Pt(e,n,o,l))return!0;if(l)return!1;if(o!==null)switch(o.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function ot(e,n,o,l,u,f,m){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=l,this.attributeNamespace=u,this.mustUseProperty=o,this.propertyName=e,this.type=n,this.sanitizeURL=f,this.removeEmptyString=m}var te={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){te[e]=new ot(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];te[n]=new ot(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){te[e]=new ot(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){te[e]=new ot(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){te[e]=new ot(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){te[e]=new ot(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){te[e]=new ot(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){te[e]=new ot(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){te[e]=new ot(e,5,!1,e.toLowerCase(),null,!1,!1)});var ae=/[\-:]([a-z])/g;function _e(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(ae,_e);te[n]=new ot(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(ae,_e);te[n]=new ot(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(ae,_e);te[n]=new ot(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){te[e]=new ot(e,1,!1,e.toLowerCase(),null,!1,!1)}),te.xlinkHref=new ot("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){te[e]=new ot(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ne(e,n,o,l){var u=te.hasOwnProperty(n)?te[n]:null,f=u!==null?u.type===0:l?!1:!(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N");f||(tt(n,o,u,l)&&(o=null),l||u===null?at(n)&&(o===null?e.removeAttribute(n):e.setAttribute(n,""+o)):u.mustUseProperty?e[u.propertyName]=o===null?u.type===3?!1:"":o:(n=u.attributeName,l=u.attributeNamespace,o===null?e.removeAttribute(n):(u=u.type,o=u===3||u===4&&o===!0?"":""+o,l?e.setAttributeNS(l,n,o):e.setAttribute(n,o))))}var He=Ot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,st=60103,Z=60106,Ze=60107,Ye=60108,ue=60114,fe=60109,ee=60110,ie=60112,me=60113,q=60120,ge=60115,C=60116,V=60121,F=60128,A=60129,$=60130,H=60131;if(typeof Symbol=="function"&&Symbol.for){var ne=Symbol.for;st=ne("react.element"),Z=ne("react.portal"),Ze=ne("react.fragment"),Ye=ne("react.strict_mode"),ue=ne("react.profiler"),fe=ne("react.provider"),ee=ne("react.context"),ie=ne("react.forward_ref"),me=ne("react.suspense"),q=ne("react.suspense_list"),ge=ne("react.memo"),C=ne("react.lazy"),V=ne("react.block"),ne("react.scope"),F=ne("react.opaque.id"),A=ne("react.debug_trace_mode"),$=ne("react.offscreen"),H=ne("react.legacy_hidden")}var U=typeof Symbol=="function"&&Symbol.iterator;function ye(e){return e===null||typeof e!="object"?null:(e=U&&e[U]||e["@@iterator"],typeof e=="function"?e:null)}var M;function sn(e){if(M===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);M=n&&n[1]||""}return`
37
- `+M+e}var $t=!1;function Un(e,n){if(!e||$t)return"";$t=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(S){var l=S}Reflect.construct(e,[],n)}else{try{n.call()}catch(S){l=S}e.call(n.prototype)}else{try{throw Error()}catch(S){l=S}e()}}catch(S){if(S&&l&&typeof S.stack=="string"){for(var u=S.stack.split(`
36
+ */var Ot=qe(999),De=qe(575),it=qe(825);function B(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o<arguments.length;o++)n+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!Ot)throw Error(B(227));var wn=new Set,Et={};function Tt(e,n){b(e,n),b(e+"Capture",n)}function b(e,n){for(Et[e]=n,e=0;e<n.length;e++)wn.add(n[e])}var Y=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Mt=Object.prototype.hasOwnProperty,ht={},He={};function at(e){return Mt.call(He,e)?!0:Mt.call(ht,e)?!1:c.test(e)?He[e]=!0:(ht[e]=!0,!1)}function Pt(e,n,o,l){if(o!==null&&o.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return l?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function tt(e,n,o,l){if(n===null||typeof n>"u"||Pt(e,n,o,l))return!0;if(l)return!1;if(o!==null)switch(o.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function ot(e,n,o,l,u,f,m){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=l,this.attributeNamespace=u,this.mustUseProperty=o,this.propertyName=e,this.type=n,this.sanitizeURL=f,this.removeEmptyString=m}var te={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){te[e]=new ot(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];te[n]=new ot(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){te[e]=new ot(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){te[e]=new ot(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){te[e]=new ot(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){te[e]=new ot(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){te[e]=new ot(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){te[e]=new ot(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){te[e]=new ot(e,5,!1,e.toLowerCase(),null,!1,!1)});var ae=/[\-:]([a-z])/g;function _e(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(ae,_e);te[n]=new ot(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(ae,_e);te[n]=new ot(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(ae,_e);te[n]=new ot(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){te[e]=new ot(e,1,!1,e.toLowerCase(),null,!1,!1)}),te.xlinkHref=new ot("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){te[e]=new ot(e,1,!1,e.toLowerCase(),null,!0,!0)});function Oe(e,n,o,l){var u=te.hasOwnProperty(n)?te[n]:null,f=u!==null?u.type===0:l?!1:!(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N");f||(tt(n,o,u,l)&&(o=null),l||u===null?at(n)&&(o===null?e.removeAttribute(n):e.setAttribute(n,""+o)):u.mustUseProperty?e[u.propertyName]=o===null?u.type===3?!1:"":o:(n=u.attributeName,l=u.attributeNamespace,o===null?e.removeAttribute(n):(u=u.type,o=u===3||u===4&&o===!0?"":""+o,l?e.setAttributeNS(l,n,o):e.setAttribute(n,o))))}var $e=Ot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,st=60103,Z=60106,Ze=60107,Ye=60108,ue=60114,fe=60109,ee=60110,ie=60112,me=60113,q=60120,ge=60115,C=60116,V=60121,L=60128,A=60129,$=60130,H=60131;if(typeof Symbol=="function"&&Symbol.for){var ne=Symbol.for;st=ne("react.element"),Z=ne("react.portal"),Ze=ne("react.fragment"),Ye=ne("react.strict_mode"),ue=ne("react.profiler"),fe=ne("react.provider"),ee=ne("react.context"),ie=ne("react.forward_ref"),me=ne("react.suspense"),q=ne("react.suspense_list"),ge=ne("react.memo"),C=ne("react.lazy"),V=ne("react.block"),ne("react.scope"),L=ne("react.opaque.id"),A=ne("react.debug_trace_mode"),$=ne("react.offscreen"),H=ne("react.legacy_hidden")}var U=typeof Symbol=="function"&&Symbol.iterator;function ye(e){return e===null||typeof e!="object"?null:(e=U&&e[U]||e["@@iterator"],typeof e=="function"?e:null)}var M;function ln(e){if(M===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);M=n&&n[1]||""}return`
37
+ `+M+e}var Qt=!1;function Un(e,n){if(!e||Qt)return"";Qt=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(S){var l=S}Reflect.construct(e,[],n)}else{try{n.call()}catch(S){l=S}e.call(n.prototype)}else{try{throw Error()}catch(S){l=S}e()}}catch(S){if(S&&l&&typeof S.stack=="string"){for(var u=S.stack.split(`
38
38
  `),f=l.stack.split(`
39
39
  `),m=u.length-1,v=f.length-1;1<=m&&0<=v&&u[m]!==f[v];)v--;for(;1<=m&&0<=v;m--,v--)if(u[m]!==f[v]){if(m!==1||v!==1)do if(m--,v--,0>v||u[m]!==f[v])return`
40
- `+u[m].replace(" at new "," at ");while(1<=m&&0<=v);break}}}finally{$t=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?sn(e):""}function cs(e){switch(e.tag){case 5:return sn(e.type);case 16:return sn("Lazy");case 13:return sn("Suspense");case 19:return sn("SuspenseList");case 0:case 2:case 15:return e=Un(e.type,!1),e;case 11:return e=Un(e.type.render,!1),e;case 22:return e=Un(e.type._render,!1),e;case 1:return e=Un(e.type,!0),e;default:return""}}function Sr(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ze:return"Fragment";case Z:return"Portal";case ue:return"Profiler";case Ye:return"StrictMode";case me:return"Suspense";case q:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ee:return(e.displayName||"Context")+".Consumer";case fe:return(e._context.displayName||"Context")+".Provider";case ie:var n=e.render;return n=n.displayName||n.name||"",e.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case ge:return Sr(e.type);case V:return Sr(e._render);case C:n=e._payload,e=e._init;try{return Sr(e(n))}catch{}}return null}function Cn(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function pi(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Tl(e){var n=pi(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),l=""+e[n];if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var u=o.get,f=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return u.call(this)},set:function(m){l=""+m,f.call(this,m)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return l},setValue:function(m){l=""+m},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function X(e){e._valueTracker||(e._valueTracker=Tl(e))}function Ut(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var o=n.getValue(),l="";return e&&(l=pi(e)?e.checked?"true":"false":e.value),e=l,e!==o?(n.setValue(e),!0):!1}function Se(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ni(e,n){var o=n.checked;return Ae({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function tn(e,n){var o=n.defaultValue==null?"":n.defaultValue,l=n.checked!=null?n.checked:n.defaultChecked;o=Cn(n.value!=null?n.value:o),e._wrapperState={initialChecked:l,initialValue:o,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Di(e,n){n=n.checked,n!=null&&Ne(e,"checked",n,!1)}function hi(e,n){Di(e,n);var o=Cn(n.value),l=n.type;if(o!=null)l==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Zn(e,n.type,o):n.hasOwnProperty("defaultValue")&&Zn(e,n.type,Cn(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function jr(e,n,o){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var l=n.type;if(!(l!=="submit"&&l!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,o||n===e.value||(e.value=n),e.defaultValue=n}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function Zn(e,n,o){(n!=="number"||Se(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}function ce(e){var n="";return Ot.Children.forEach(e,function(o){o!=null&&(n+=o)}),n}function ln(e,n){return e=Ae({children:void 0},n),(n=ce(n.children))&&(e.children=n),e}function Er(e,n,o,l){if(e=e.options,n){n={};for(var u=0;u<o.length;u++)n["$"+o[u]]=!0;for(o=0;o<e.length;o++)u=n.hasOwnProperty("$"+e[o].value),e[o].selected!==u&&(e[o].selected=u),u&&l&&(e[o].defaultSelected=!0)}else{for(o=""+Cn(o),n=null,u=0;u<e.length;u++){if(e[u].value===o){e[u].selected=!0,l&&(e[u].defaultSelected=!0);return}n!==null||e[u].disabled||(n=e[u])}n!==null&&(n.selected=!0)}}function Ee(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(B(91));return Ae({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function w(e,n){var o=n.value;if(o==null){if(o=n.children,n=n.defaultValue,o!=null){if(n!=null)throw Error(B(92));if(Array.isArray(o)){if(!(1>=o.length))throw Error(B(93));o=o[0]}n=o}n==null&&(n=""),o=n}e._wrapperState={initialValue:Cn(o)}}function y(e,n){var o=Cn(n.value),l=Cn(n.defaultValue);o!=null&&(o=""+o,o!==e.value&&(e.value=o),n.defaultValue==null&&e.defaultValue!==o&&(e.defaultValue=o)),l!=null&&(e.defaultValue=""+l)}function E(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}var R={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function N(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function j(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?N(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Q,G=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,o,l,u){MSApp.execUnsafeLocalFunction(function(){return e(n,o,l,u)})}:e})(function(e,n){if(e.namespaceURI!==R.svg||"innerHTML"in e)e.innerHTML=n;else{for(Q=Q||document.createElement("div"),Q.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=Q.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function ve(e,n){if(n){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=n;return}}e.textContent=n}var Fe={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},De=["Webkit","ms","Moz","O"];Object.keys(Fe).forEach(function(e){De.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Fe[n]=Fe[e]})});function he(e,n,o){return n==null||typeof n=="boolean"||n===""?"":o||typeof n!="number"||n===0||Fe.hasOwnProperty(e)&&Fe[e]?(""+n).trim():n+"px"}function mt(e,n){e=e.style;for(var o in n)if(n.hasOwnProperty(o)){var l=o.indexOf("--")===0,u=he(o,n[o],l);o==="float"&&(o="cssFloat"),l?e.setProperty(o,u):e[o]=u}}var Me=Ae({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function $e(e,n){if(n){if(Me[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(B(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(B(60));if(!(typeof n.dangerouslySetInnerHTML=="object"&&"__html"in n.dangerouslySetInnerHTML))throw Error(B(61))}if(n.style!=null&&typeof n.style!="object")throw Error(B(62))}}function wt(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Pe(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Be=null,Ge=null,nt=null;function Qe(e){if(e=Ao(e)){if(typeof Be!="function")throw Error(B(280));var n=e.stateNode;n&&(n=Xi(n),Be(e.stateNode,e.type,n))}}function qe(e){Ge?nt?nt.push(e):nt=[e]:Ge=e}function Re(){if(Ge){var e=Ge,n=nt;if(nt=Ge=null,Qe(e),n)for(e=0;e<n.length;e++)Qe(n[e])}}function xt(e,n){return e(n)}function Je(e,n,o,l,u){return e(n,o,l,u)}function an(){}var Ke=xt,Qt=!1,un=!1;function pn(){(Ge!==null||nt!==null)&&(an(),Re())}function Zt(e,n,o){if(un)return e(n,o);un=!0;try{return Ke(e,n,o)}finally{un=!1,pn()}}function ut(e,n){var o=e.stateNode;if(o===null)return null;var l=Xi(o);if(l===null)return null;o=l[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(o&&typeof o!="function")throw Error(B(231,n,typeof o));return o}var ct=!1;if(Y)try{var Nt={};Object.defineProperty(Nt,"passive",{get:function(){ct=!0}}),window.addEventListener("test",Nt,Nt),window.removeEventListener("test",Nt,Nt)}catch{ct=!1}function Bt(e,n,o,l,u,f,m,v,S){var I=Array.prototype.slice.call(arguments,3);try{n.apply(o,I)}catch(J){this.onError(J)}}var hn=!1,Dt=null,Jn=!1,ur=null,So={onError:function(e){hn=!0,Dt=e}};function er(e,n,o,l,u,f,m,v,S){hn=!1,Dt=null,Bt.apply(So,arguments)}function Tr(e,n,o,l,u,f,m,v,S){if(er.apply(this,arguments),hn){if(hn){var I=Dt;hn=!1,Dt=null}else throw Error(B(198));Jn||(Jn=!0,ur=I)}}function _n(e){var n=e,o=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&1026)!==0&&(o=n.return),e=n.return;while(e)}return n.tag===3?o:null}function Sn(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function Dn(e){if(_n(e)!==e)throw Error(B(188))}function cr(e){var n=e.alternate;if(!n){if(n=_n(e),n===null)throw Error(B(188));return n!==e?null:e}for(var o=e,l=n;;){var u=o.return;if(u===null)break;var f=u.alternate;if(f===null){if(l=u.return,l!==null){o=l;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===o)return Dn(u),e;if(f===l)return Dn(u),n;f=f.sibling}throw Error(B(188))}if(o.return!==l.return)o=u,l=f;else{for(var m=!1,v=u.child;v;){if(v===o){m=!0,o=u,l=f;break}if(v===l){m=!0,l=u,o=f;break}v=v.sibling}if(!m){for(v=f.child;v;){if(v===o){m=!0,o=f,l=u;break}if(v===l){m=!0,l=f,o=u;break}v=v.sibling}if(!m)throw Error(B(189))}}if(o.alternate!==l)throw Error(B(190))}if(o.tag!==3)throw Error(B(188));return o.stateNode.current===o?e:n}function xr(e){if(e=cr(e),!e)return null;for(var n=e;;){if(n.tag===5||n.tag===6)return n;if(n.child)n.child.return=n,n=n.child;else{if(n===e)break;for(;!n.sibling;){if(!n.return||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}}return null}function dr(e,n){for(var o=e.alternate;n!==null;){if(n===e||n===o)return!0;n=n.return}return!1}var Cr,mi,Mr,fr,ze=!1,An=[],Br=null,pe=null,zr=null,Ai=new Map,Fi=new Map,Eo=[],Ya="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ds(e,n,o,l,u){return{blockedOn:e,domEventName:n,eventSystemFlags:o|16,nativeEvent:u,targetContainers:[l]}}function Xa(e,n){switch(e){case"focusin":case"focusout":Br=null;break;case"dragenter":case"dragleave":pe=null;break;case"mouseover":case"mouseout":zr=null;break;case"pointerover":case"pointerout":Ai.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fi.delete(n.pointerId)}}function To(e,n,o,l,u,f){return e===null||e.nativeEvent!==f?(e=ds(n,o,l,u,f),n!==null&&(n=Ao(n),n!==null&&mi(n)),e):(e.eventSystemFlags|=l,n=e.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),e)}function Fc(e,n,o,l,u){switch(n){case"focusin":return Br=To(Br,e,n,o,l,u),!0;case"dragenter":return pe=To(pe,e,n,o,l,u),!0;case"mouseover":return zr=To(zr,e,n,o,l,u),!0;case"pointerover":var f=u.pointerId;return Ai.set(f,To(Ai.get(f)||null,e,n,o,l,u)),!0;case"gotpointercapture":return f=u.pointerId,Fi.set(f,To(Fi.get(f)||null,e,n,o,l,u)),!0}return!1}function Lc(e){var n=Vr(e.target);if(n!==null){var o=_n(n);if(o!==null){if(n=o.tag,n===13){if(n=Sn(o),n!==null){e.blockedOn=n,fr(e.lanePriority,function(){it.unstable_runWithPriority(e.priority,function(){Mr(o)})});return}}else if(n===3&&o.stateNode.hydrate){e.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}e.blockedOn=null}function fs(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var o=O(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(o!==null)return n=Ao(o),n!==null&&mi(n),e.blockedOn=o,!1;n.shift()}return!0}function qa(e,n,o){fs(e)&&o.delete(n)}function jc(){for(ze=!1;0<An.length;){var e=An[0];if(e.blockedOn!==null){e=Ao(e.blockedOn),e!==null&&Cr(e);break}for(var n=e.targetContainers;0<n.length;){var o=O(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(o!==null){e.blockedOn=o;break}n.shift()}e.blockedOn===null&&An.shift()}Br!==null&&fs(Br)&&(Br=null),pe!==null&&fs(pe)&&(pe=null),zr!==null&&fs(zr)&&(zr=null),Ai.forEach(qa),Fi.forEach(qa)}function xo(e,n){e.blockedOn===n&&(e.blockedOn=null,ze||(ze=!0,it.unstable_scheduleCallback(it.unstable_NormalPriority,jc)))}function Ja(e){function n(u){return xo(u,e)}if(0<An.length){xo(An[0],e);for(var o=1;o<An.length;o++){var l=An[o];l.blockedOn===e&&(l.blockedOn=null)}}for(Br!==null&&xo(Br,e),pe!==null&&xo(pe,e),zr!==null&&xo(zr,e),Ai.forEach(n),Fi.forEach(n),o=0;o<Eo.length;o++)l=Eo[o],l.blockedOn===e&&(l.blockedOn=null);for(;0<Eo.length&&(o=Eo[0],o.blockedOn===null);)Lc(o),o.blockedOn===null&&Eo.shift()}function ps(e,n){var o={};return o[e.toLowerCase()]=n.toLowerCase(),o["Webkit"+e]="webkit"+n,o["Moz"+e]="moz"+n,o}var Li={animationend:ps("Animation","AnimationEnd"),animationiteration:ps("Animation","AnimationIteration"),animationstart:ps("Animation","AnimationStart"),transitionend:ps("Transition","TransitionEnd")},xl={},eu={};Y&&(eu=document.createElement("div").style,"AnimationEvent"in window||(delete Li.animationend.animation,delete Li.animationiteration.animation,delete Li.animationstart.animation),"TransitionEvent"in window||delete Li.transitionend.transition);function hs(e){if(xl[e])return xl[e];if(!Li[e])return e;var n=Li[e],o;for(o in n)if(n.hasOwnProperty(o)&&o in eu)return xl[e]=n[o];return e}var tu=hs("animationend"),nu=hs("animationiteration"),ru=hs("animationstart"),iu=hs("transitionend"),ou=new Map,Cl=new Map,Mc=["abort","abort",tu,"animationEnd",nu,"animationIteration",ru,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",iu,"transitionEnd","waiting","waiting"];function Pl(e,n){for(var o=0;o<e.length;o+=2){var l=e[o],u=e[o+1];u="on"+(u[0].toUpperCase()+u.slice(1)),Cl.set(l,n),ou.set(l,u),Tt(u,[l])}}var Bc=it.unstable_now;Bc();var _t=8;function gi(e){if((1&e)!==0)return _t=15,1;if((2&e)!==0)return _t=14,2;if((4&e)!==0)return _t=13,4;var n=24&e;return n!==0?(_t=12,n):(e&32)!==0?(_t=11,32):(n=192&e,n!==0?(_t=10,n):(e&256)!==0?(_t=9,256):(n=3584&e,n!==0?(_t=8,n):(e&4096)!==0?(_t=7,4096):(n=4186112&e,n!==0?(_t=6,n):(n=62914560&e,n!==0?(_t=5,n):e&67108864?(_t=4,67108864):(e&134217728)!==0?(_t=3,134217728):(n=805306368&e,n!==0?(_t=2,n):(1073741824&e)!==0?(_t=1,1073741824):(_t=8,e))))))}function zc(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function Uc(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(B(358,e))}}function Co(e,n){var o=e.pendingLanes;if(o===0)return _t=0;var l=0,u=0,f=e.expiredLanes,m=e.suspendedLanes,v=e.pingedLanes;if(f!==0)l=f,u=_t=15;else if(f=o&134217727,f!==0){var S=f&~m;S!==0?(l=gi(S),u=_t):(v&=f,v!==0&&(l=gi(v),u=_t))}else f=o&~m,f!==0?(l=gi(f),u=_t):v!==0&&(l=gi(v),u=_t);if(l===0)return 0;if(l=31-Pr(l),l=o&((0>l?0:1<<l)<<1)-1,n!==0&&n!==l&&(n&m)===0){if(gi(n),u<=_t)return n;_t=u}if(n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=l;0<n;)o=31-Pr(n),u=1<<o,l|=e[o],n&=~u;return l}function su(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function x(e,n){switch(e){case 15:return 1;case 14:return 2;case 12:return e=Ur(24&~n),e===0?x(10,n):e;case 10:return e=Ur(192&~n),e===0?x(8,n):e;case 8:return e=Ur(3584&~n),e===0&&(e=Ur(4186112&~n),e===0&&(e=512)),e;case 2:return n=Ur(805306368&~n),n===0&&(n=268435456),n}throw Error(B(358,e))}function Ur(e){return e&-e}function Rl(e){for(var n=[],o=0;31>o;o++)n.push(e);return n}function ms(e,n,o){e.pendingLanes|=n;var l=n-1;e.suspendedLanes&=l,e.pingedLanes&=l,e=e.eventTimes,n=31-Pr(n),e[n]=o}var Pr=Math.clz32?Math.clz32:lu,Wt=Math.log,Kt=Math.LN2;function lu(e){return e===0?32:31-(Wt(e)/Kt|0)|0}var Zc=it.unstable_UserBlockingPriority,au=it.unstable_runWithPriority,gs=!0;function Wc(e,n,o,l){Qt||an();var u=Il,f=Qt;Qt=!0;try{Je(u,e,n,o,l)}finally{(Qt=f)||pn()}}function kl(e,n,o,l){au(Zc,Il.bind(null,e,n,o,l))}function Il(e,n,o,l){if(gs){var u;if((u=(n&4)===0)&&0<An.length&&-1<Ya.indexOf(e))e=ds(null,e,n,o,l),An.push(e);else{var f=O(e,n,o,l);if(f===null)u&&Xa(e,l);else{if(u){if(-1<Ya.indexOf(e)){e=ds(f,e,n,o,l),An.push(e);return}if(Fc(f,e,n,o,l))return;Xa(e,l)}Jl(e,n,l,null,o)}}}}function O(e,n,o,l){var u=Pe(l);if(u=Vr(u),u!==null){var f=_n(u);if(f===null)u=null;else{var m=f.tag;if(m===13){if(u=Sn(f),u!==null)return u;u=null}else if(m===3){if(f.stateNode.hydrate)return f.tag===3?f.stateNode.containerInfo:null;u=null}else f!==u&&(u=null)}}return Jl(e,n,l,u,o),null}var D=null,Wn=null,ji=null;function Gt(){if(ji)return ji;var e,n=Wn,o=n.length,l,u="value"in D?D.value:D.textContent,f=u.length;for(e=0;e<o&&n[e]===u[e];e++);var m=o-e;for(l=1;l<=m&&n[o-l]===u[f-l];l++);return ji=u.slice(e,1<l?1-l:void 0)}function Mi(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function ys(){return!0}function bl(){return!1}function Fn(e){function n(o,l,u,f,m){this._reactName=o,this._targetInst=u,this.type=l,this.nativeEvent=f,this.target=m,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(o=e[v],this[v]=o?o(f):f[v]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?ys:bl,this.isPropagationStopped=bl,this}return Ae(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=ys)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=ys)},persist:function(){},isPersistent:ys}),n}var Bi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Po=Fn(Bi),zi=Ae({},Bi,{view:0,detail:0}),cn=Fn(zi),tr,Ro,yi,pr=Ae({},zi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kr,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==yi&&(yi&&e.type==="mousemove"?(tr=e.screenX-yi.screenX,Ro=e.screenY-yi.screenY):Ro=tr=0,yi=e),tr)},movementY:function(e){return"movementY"in e?e.movementY:Ro}}),uu=Fn(pr),Vc=Ae({},pr,{dataTransfer:0}),Hc=Fn(Vc),cu=Ae({},zi,{relatedTarget:0}),Ol=Fn(cu),$c=Ae({},Bi,{animationName:0,elapsedTime:0,pseudoElement:0}),du=Fn($c),Qc=Ae({},Bi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Kc=Fn(Qc),vs=Ae({},Bi,{data:0}),Nl=Fn(vs),ws={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Dl={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Rr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fu(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Rr[e])?!!n[e]:!1}function kr(){return fu}var Ui=Ae({},zi,{key:function(e){if(e.key){var n=ws[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Mi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Dl[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kr,charCode:function(e){return e.type==="keypress"?Mi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Mi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),pu=Fn(Ui),Al=Ae({},pr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fl=Fn(Al),hu=Ae({},zi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kr}),mu=Fn(hu),gu=Ae({},Bi,{propertyName:0,elapsedTime:0,pseudoElement:0}),yu=Fn(gu),Gc=Ae({},pr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Ll=Fn(Gc),vu=[9,13,27,32],jl=Y&&"CompositionEvent"in window,ko=null;Y&&"documentMode"in document&&(ko=document.documentMode);var wu=Y&&"TextEvent"in window&&!ko,Ln=Y&&(!jl||ko&&8<ko&&11>=ko),_u=" ",hr=!1;function nr(e,n){switch(e){case"keyup":return vu.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Su(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zi=!1;function Eu(e,n){switch(e){case"compositionend":return Su(n);case"keypress":return n.which!==32?null:(hr=!0,_u);case"textInput":return e=n.data,e===_u&&hr?null:e;default:return null}}function Tu(e,n){if(Zi)return e==="compositionend"||!jl&&nr(e,n)?(e=Gt(),ji=Wn=D=null,Zi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Ln&&n.locale!=="ko"?null:n.data;default:return null}}var xu={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ml(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!xu[e.type]:n==="textarea"}function Cu(e,n,o,l){qe(l),n=Cs(n,"onChange"),0<n.length&&(o=new Po("onChange","change",null,o,l),e.push({event:o,listeners:n}))}var vi=null,Wi=null;function Bl(e){Xl(e,0)}function Vi(e){var n=Yi(e);if(Ut(n))return e}function nn(e,n){if(e==="change")return n}var Rt=!1;if(Y){var _s;if(Y){var Ss="oninput"in document;if(!Ss){var zl=document.createElement("div");zl.setAttribute("oninput","return;"),Ss=typeof zl.oninput=="function"}_s=Ss}else _s=!1;Rt=_s&&(!document.documentMode||9<document.documentMode)}function Ul(){vi&&(vi.detachEvent("onpropertychange",Zl),Wi=vi=null)}function Zl(e){if(e.propertyName==="value"&&Vi(Wi)){var n=[];if(Cu(n,Wi,e,Pe(e)),e=Bl,Qt)e(n);else{Qt=!0;try{xt(e,n)}finally{Qt=!1,pn()}}}}function Pu(e,n,o){e==="focusin"?(Ul(),vi=n,Wi=o,vi.attachEvent("onpropertychange",Zl)):e==="focusout"&&Ul()}function Ru(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Vi(Wi)}function Wl(e,n){if(e==="click")return Vi(n)}function Vl(e,n){if(e==="input"||e==="change")return Vi(n)}function Yc(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Pn=typeof Object.is=="function"?Object.is:Yc,Io=Object.prototype.hasOwnProperty;function Zr(e,n){if(Pn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var o=Object.keys(e),l=Object.keys(n);if(o.length!==l.length)return!1;for(l=0;l<o.length;l++)if(!Io.call(n,o[l])||!Pn(e[o[l]],n[o[l]]))return!1;return!0}function ku(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Es(e,n){var o=ku(e);e=0;for(var l;o;){if(o.nodeType===3){if(l=e+o.textContent.length,e<=n&&l>=n)return{node:o,offset:n-e};e=l}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=ku(o)}}function bo(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?bo(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Iu(){for(var e=window,n=Se();n instanceof e.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href=="string"}catch{o=!1}if(o)e=n.contentWindow;else break;n=Se(e.document)}return n}function Oo(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var Hl=Y&&"documentMode"in document&&11>=document.documentMode,Hi=null,$l=null,No=null,Ql=!1;function bu(e,n,o){var l=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Ql||Hi==null||Hi!==Se(l)||(l=Hi,"selectionStart"in l&&Oo(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),No&&Zr(No,l)||(No=l,l=Cs($l,"onSelect"),0<l.length&&(n=new Po("onSelect","select",null,n,o),e.push({event:n,listeners:l}),n.target=Hi)))}Pl("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Pl("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Pl(Mc,2);for(var Kl="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Ts=0;Ts<Kl.length;Ts++)Cl.set(Kl[Ts],0);b("onMouseEnter",["mouseout","mouseover"]),b("onMouseLeave",["mouseout","mouseover"]),b("onPointerEnter",["pointerout","pointerover"]),b("onPointerLeave",["pointerout","pointerover"]),Tt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Tt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Tt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Tt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Tt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Tt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Gl=new Set("cancel close invalid load scroll toggle".split(" ").concat(wi));function Yl(e,n,o){var l=e.type||"unknown-event";e.currentTarget=o,Tr(l,n,void 0,e),e.currentTarget=null}function Xl(e,n){n=(n&4)!==0;for(var o=0;o<e.length;o++){var l=e[o],u=l.event;l=l.listeners;e:{var f=void 0;if(n)for(var m=l.length-1;0<=m;m--){var v=l[m],S=v.instance,I=v.currentTarget;if(v=v.listener,S!==f&&u.isPropagationStopped())break e;Yl(u,v,I),f=S}else for(m=0;m<l.length;m++){if(v=l[m],S=v.instance,I=v.currentTarget,v=v.listener,S!==f&&u.isPropagationStopped())break e;Yl(u,v,I),f=S}}}if(Jn)throw e=ur,Jn=!1,ur=null,e}function St(e,n){var o=Fu(n),l=e+"__bubble";o.has(l)||(Ou(n,e,2,!1),o.add(l))}var ql="_reactListening"+Math.random().toString(36).slice(2);function $i(e){e[ql]||(e[ql]=!0,wn.forEach(function(n){Gl.has(n)||xs(n,!1,e,null),xs(n,!0,e,null)}))}function xs(e,n,o,l){var u=4<arguments.length&&arguments[4]!==void 0?arguments[4]:0,f=o;if(e==="selectionchange"&&o.nodeType!==9&&(f=o.ownerDocument),l!==null&&!n&&Gl.has(e)){if(e!=="scroll")return;u|=2,f=l}var m=Fu(f),v=e+"__"+(n?"capture":"bubble");m.has(v)||(n&&(u|=4),Ou(f,e,u,n),m.add(v))}function Ou(e,n,o,l){var u=Cl.get(n);switch(u===void 0?2:u){case 0:u=Wc;break;case 1:u=kl;break;default:u=Il}o=u.bind(null,n,o,e),u=void 0,!ct||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(u=!0),l?u!==void 0?e.addEventListener(n,o,{capture:!0,passive:u}):e.addEventListener(n,o,!0):u!==void 0?e.addEventListener(n,o,{passive:u}):e.addEventListener(n,o,!1)}function Jl(e,n,o,l,u){var f=l;if((n&1)===0&&(n&2)===0&&l!==null)e:for(;;){if(l===null)return;var m=l.tag;if(m===3||m===4){var v=l.stateNode.containerInfo;if(v===u||v.nodeType===8&&v.parentNode===u)break;if(m===4)for(m=l.return;m!==null;){var S=m.tag;if((S===3||S===4)&&(S=m.stateNode.containerInfo,S===u||S.nodeType===8&&S.parentNode===u))return;m=m.return}for(;v!==null;){if(m=Vr(v),m===null)return;if(S=m.tag,S===5||S===6){l=f=m;continue e}v=v.parentNode}}l=l.return}Zt(function(){var I=f,J=Pe(o),Ie=[];e:{var W=ou.get(e);if(W!==void 0){var de=Po,Ce=e;switch(e){case"keypress":if(Mi(o)===0)break e;case"keydown":case"keyup":de=pu;break;case"focusin":Ce="focus",de=Ol;break;case"focusout":Ce="blur",de=Ol;break;case"beforeblur":case"afterblur":de=Ol;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":de=uu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":de=Hc;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":de=mu;break;case tu:case nu:case ru:de=du;break;case iu:de=yu;break;case"scroll":de=cn;break;case"wheel":de=Ll;break;case"copy":case"cut":case"paste":de=Kc;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":de=Fl}var we=(n&4)!==0,k=!we&&e==="scroll",T=we?W!==null?W+"Capture":null:W;we=[];for(var P=I,L;P!==null;){L=P;var z=L.stateNode;if(L.tag===5&&z!==null&&(L=z,T!==null&&(z=ut(P,T),z!=null&&we.push(Qi(P,z,L)))),k)break;P=P.return}0<we.length&&(W=new de(W,Ce,null,o,J),Ie.push({event:W,listeners:we}))}}if((n&7)===0){e:{if(W=e==="mouseover"||e==="pointerover",de=e==="mouseout"||e==="pointerout",W&&(n&16)===0&&(Ce=o.relatedTarget||o.fromElement)&&(Vr(Ce)||Ce[Wr]))break e;if((de||W)&&(W=J.window===J?J:(W=J.ownerDocument)?W.defaultView||W.parentWindow:window,de?(Ce=o.relatedTarget||o.toElement,de=I,Ce=Ce?Vr(Ce):null,Ce!==null&&(k=_n(Ce),Ce!==k||Ce.tag!==5&&Ce.tag!==6)&&(Ce=null)):(de=null,Ce=I),de!==Ce)){if(we=uu,z="onMouseLeave",T="onMouseEnter",P="mouse",(e==="pointerout"||e==="pointerover")&&(we=Fl,z="onPointerLeave",T="onPointerEnter",P="pointer"),k=de==null?W:Yi(de),L=Ce==null?W:Yi(Ce),W=new we(z,P+"leave",de,o,J),W.target=k,W.relatedTarget=L,z=null,Vr(J)===I&&(we=new we(T,P+"enter",Ce,o,J),we.target=L,we.relatedTarget=k,z=we),k=z,de&&Ce)t:{for(we=de,T=Ce,P=0,L=we;L;L=Ki(L))P++;for(L=0,z=T;z;z=Ki(z))L++;for(;0<P-L;)we=Ki(we),P--;for(;0<L-P;)T=Ki(T),L--;for(;P--;){if(we===T||T!==null&&we===T.alternate)break t;we=Ki(we),T=Ki(T)}we=null}else we=null;de!==null&&ea(Ie,W,de,we,!1),Ce!==null&&k!==null&&ea(Ie,k,Ce,we,!0)}}e:{if(W=I?Yi(I):window,de=W.nodeName&&W.nodeName.toLowerCase(),de==="select"||de==="input"&&W.type==="file")var be=nn;else if(Ml(W))if(Rt)be=Vl;else{be=Ru;var oe=Pu}else(de=W.nodeName)&&de.toLowerCase()==="input"&&(W.type==="checkbox"||W.type==="radio")&&(be=Wl);if(be&&(be=be(e,I))){Cu(Ie,be,o,J);break e}oe&&oe(e,W,I),e==="focusout"&&(oe=W._wrapperState)&&oe.controlled&&W.type==="number"&&Zn(W,"number",W.value)}switch(oe=I?Yi(I):window,e){case"focusin":(Ml(oe)||oe.contentEditable==="true")&&(Hi=oe,$l=I,No=null);break;case"focusout":No=$l=Hi=null;break;case"mousedown":Ql=!0;break;case"contextmenu":case"mouseup":case"dragend":Ql=!1,bu(Ie,o,J);break;case"selectionchange":if(Hl)break;case"keydown":case"keyup":bu(Ie,o,J)}var Oe;if(jl)e:{switch(e){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else Zi?nr(e,o)&&(Ue="onCompositionEnd"):e==="keydown"&&o.keyCode===229&&(Ue="onCompositionStart");Ue&&(Ln&&o.locale!=="ko"&&(Zi||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&Zi&&(Oe=Gt()):(D=J,Wn="value"in D?D.value:D.textContent,Zi=!0)),oe=Cs(I,Ue),0<oe.length&&(Ue=new Nl(Ue,e,null,o,J),Ie.push({event:Ue,listeners:oe}),Oe?Ue.data=Oe:(Oe=Su(o),Oe!==null&&(Ue.data=Oe)))),(Oe=wu?Eu(e,o):Tu(e,o))&&(I=Cs(I,"onBeforeInput"),0<I.length&&(J=new Nl("onBeforeInput","beforeinput",null,o,J),Ie.push({event:J,listeners:I}),J.data=Oe))}Xl(Ie,n)})}function Qi(e,n,o){return{instance:e,listener:n,currentTarget:o}}function Cs(e,n){for(var o=n+"Capture",l=[];e!==null;){var u=e,f=u.stateNode;u.tag===5&&f!==null&&(u=f,f=ut(e,o),f!=null&&l.unshift(Qi(e,f,u)),f=ut(e,n),f!=null&&l.push(Qi(e,f,u))),e=e.return}return l}function Ki(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ea(e,n,o,l,u){for(var f=n._reactName,m=[];o!==null&&o!==l;){var v=o,S=v.alternate,I=v.stateNode;if(S!==null&&S===l)break;v.tag===5&&I!==null&&(v=I,u?(S=ut(o,f),S!=null&&m.unshift(Qi(o,S,v))):u||(S=ut(o,f),S!=null&&m.push(Qi(o,S,v)))),o=o.return}m.length!==0&&e.push({event:n,listeners:m})}function Ps(){}var Rs=null,ta=null;function Nu(e,n){switch(e){case"button":case"input":case"select":case"textarea":return!!n.autoFocus}return!1}function na(e,n){return e==="textarea"||e==="option"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Du=typeof setTimeout=="function"?setTimeout:void 0,Yt=typeof clearTimeout=="function"?clearTimeout:void 0;function Xt(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function Gi(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break}return e}function ks(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var o=e.data;if(o==="$"||o==="$!"||o==="$?"){if(n===0)return e;n--}else o==="/$"&&n++}e=e.previousSibling}return null}var ra=0;function Xc(e){return{$$typeof:F,toString:e,valueOf:e}}var Do=Math.random().toString(36).slice(2),Ir="__reactFiber$"+Do,Is="__reactProps$"+Do,Wr="__reactContainer$"+Do,Au="__reactEvents$"+Do;function Vr(e){var n=e[Ir];if(n)return n;for(var o=e.parentNode;o;){if(n=o[Wr]||o[Ir]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(e=ks(e);e!==null;){if(o=e[Ir])return o;e=ks(e)}return n}e=o,o=e.parentNode}return null}function Ao(e){return e=e[Ir]||e[Wr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Yi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(B(33))}function Xi(e){return e[Is]||null}function Fu(e){var n=e[Au];return n===void 0&&(n=e[Au]=new Set),n}var At=[],Ct=-1;function Hr(e){return{current:e}}function gt(e){0>Ct||(e.current=At[Ct],At[Ct]=null,Ct--)}function Ft(e,n){Ct++,At[Ct]=e.current,e.current=n}var $r={},rn=Hr($r),Rn=Hr(!1),br=$r;function qi(e,n){var o=e.type.contextTypes;if(!o)return $r;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===n)return l.__reactInternalMemoizedMaskedChildContext;var u={},f;for(f in o)u[f]=n[f];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=u),u}function kn(e){return e=e.childContextTypes,e!=null}function Fo(){gt(Rn),gt(rn)}function ia(e,n,o){if(rn.current!==$r)throw Error(B(168));Ft(rn,n),Ft(Rn,o)}function Lu(e,n,o){var l=e.stateNode;if(e=n.childContextTypes,typeof l.getChildContext!="function")return o;l=l.getChildContext();for(var u in l)if(!(u in e))throw Error(B(108,Sr(n)||"Unknown",u));return Ae({},o,l)}function Ji(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||$r,br=rn.current,Ft(rn,e),Ft(Rn,Rn.current),!0}function ju(e,n,o){var l=e.stateNode;if(!l)throw Error(B(169));o?(e=Lu(e,n,br),l.__reactInternalMemoizedMergedChildContext=e,gt(Rn),gt(rn),Ft(rn,e)):gt(Rn),Ft(Rn,o)}var oa=null,mr=null,Mu=it.unstable_runWithPriority,sa=it.unstable_scheduleCallback,Lo=it.unstable_cancelCallback,qc=it.unstable_shouldYield,Bu=it.unstable_requestPaint,la=it.unstable_now,Jc=it.unstable_getCurrentPriorityLevel,bs=it.unstable_ImmediatePriority,Os=it.unstable_UserBlockingPriority,zu=it.unstable_NormalPriority,Uu=it.unstable_LowPriority,aa=it.unstable_IdlePriority,Ns={},ed=Bu!==void 0?Bu:function(){},rr=null,jo=null,ua=!1,Zu=la(),yt=1e4>Zu?la:function(){return la()-Zu};function dn(){switch(Jc()){case bs:return 99;case Os:return 98;case zu:return 97;case Uu:return 96;case aa:return 95;default:throw Error(B(332))}}function Wu(e){switch(e){case 99:return bs;case 98:return Os;case 97:return zu;case 96:return Uu;case 95:return aa;default:throw Error(B(332))}}function Or(e,n){return e=Wu(e),Mu(e,n)}function Mo(e,n,o){return e=Wu(e),sa(e,n,o)}function gr(){if(jo!==null){var e=jo;jo=null,Lo(e)}Vu()}function Vu(){if(!ua&&rr!==null){ua=!0;var e=0;try{var n=rr;Or(99,function(){for(;e<n.length;e++){var o=n[e];do o=o(!0);while(o!==null)}}),rr=null}catch(o){throw rr!==null&&(rr=rr.slice(e+1)),sa(bs,gr),o}finally{ua=!1}}}var Hu=He.ReactCurrentBatchConfig;function jn(e,n){if(e&&e.defaultProps){n=Ae({},n),e=e.defaultProps;for(var o in e)n[o]===void 0&&(n[o]=e[o]);return n}return n}var Ds=Hr(null),As=null,eo=null,Bo=null;function ca(){Bo=eo=As=null}function da(e){var n=Ds.current;gt(Ds),e.type._context._currentValue=n}function Fs(e,n){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)===n){if(o===null||(o.childLanes&n)===n)break;o.childLanes|=n}else e.childLanes|=n,o!==null&&(o.childLanes|=n);e=e.return}}function to(e,n){As=e,Bo=eo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(vt=!0),e.firstContext=null)}function Vn(e,n){if(Bo!==e&&n!==!1&&n!==0)if((typeof n!="number"||n===1073741823)&&(Bo=e,n=1073741823),n={context:e,observedBits:n,next:null},eo===null){if(As===null)throw Error(B(308));eo=n,As.dependencies={lanes:0,firstContext:n,responders:null}}else eo=eo.next=n;return e._currentValue}var ke=!1;function lt(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function $u(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function mn(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function yr(e,n){if(e=e.updateQueue,e!==null){e=e.shared;var o=e.pending;o===null?n.next=n:(n.next=o.next,o.next=n),e.pending=n}}function Qu(e,n){var o=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,o===l)){var u=null,f=null;if(o=o.firstBaseUpdate,o!==null){do{var m={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};f===null?u=f=m:f=f.next=m,o=o.next}while(o!==null);f===null?u=f=n:f=f.next=n}else u=f=n;o={baseState:l.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:l.shared,effects:l.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=n:e.next=n,o.lastBaseUpdate=n}function _i(e,n,o,l){var u=e.updateQueue;ke=!1;var f=u.firstBaseUpdate,m=u.lastBaseUpdate,v=u.shared.pending;if(v!==null){u.shared.pending=null;var S=v,I=S.next;S.next=null,m===null?f=I:m.next=I,m=S;var J=e.alternate;if(J!==null){J=J.updateQueue;var Ie=J.lastBaseUpdate;Ie!==m&&(Ie===null?J.firstBaseUpdate=I:Ie.next=I,J.lastBaseUpdate=S)}}if(f!==null){Ie=u.baseState,m=0,J=I=S=null;do{v=f.lane;var W=f.eventTime;if((l&v)===v){J!==null&&(J=J.next={eventTime:W,lane:0,tag:f.tag,payload:f.payload,callback:f.callback,next:null});e:{var de=e,Ce=f;switch(v=n,W=o,Ce.tag){case 1:if(de=Ce.payload,typeof de=="function"){Ie=de.call(W,Ie,v);break e}Ie=de;break e;case 3:de.flags=de.flags&-4097|64;case 0:if(de=Ce.payload,v=typeof de=="function"?de.call(W,Ie,v):de,v==null)break e;Ie=Ae({},Ie,v);break e;case 2:ke=!0}}f.callback!==null&&(e.flags|=32,v=u.effects,v===null?u.effects=[f]:v.push(f))}else W={eventTime:W,lane:v,tag:f.tag,payload:f.payload,callback:f.callback,next:null},J===null?(I=J=W,S=Ie):J=J.next=W,m|=v;if(f=f.next,f===null){if(v=u.shared.pending,v===null)break;f=v.next,v.next=null,u.lastBaseUpdate=v,u.shared.pending=null}}while(!0);J===null&&(S=Ie),u.baseState=S,u.firstBaseUpdate=I,u.lastBaseUpdate=J,Jr|=m,e.lanes=m,e.memoizedState=Ie}}function Ku(e,n,o){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var l=e[n],u=l.callback;if(u!==null){if(l.callback=null,l=o,typeof u!="function")throw Error(B(191,u));u.call(l)}}}var Gu=new Ot.Component().refs;function Ls(e,n,o,l){n=e.memoizedState,o=o(l,n),o=o==null?n:Ae({},n,o),e.memoizedState=o,e.lanes===0&&(e.updateQueue.baseState=o)}var js={isMounted:function(e){return(e=e._reactInternals)?_n(e)===e:!1},enqueueSetState:function(e,n,o){e=e._reactInternals;var l=On(),u=Ar(e),f=mn(l,u);f.payload=n,o!=null&&(f.callback=o),yr(e,f),lr(e,u,l)},enqueueReplaceState:function(e,n,o){e=e._reactInternals;var l=On(),u=Ar(e),f=mn(l,u);f.tag=1,f.payload=n,o!=null&&(f.callback=o),yr(e,f),lr(e,u,l)},enqueueForceUpdate:function(e,n){e=e._reactInternals;var o=On(),l=Ar(e),u=mn(o,l);u.tag=2,n!=null&&(u.callback=n),yr(e,u),lr(e,l,o)}};function Yu(e,n,o,l,u,f,m){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,f,m):n.prototype&&n.prototype.isPureReactComponent?!Zr(o,l)||!Zr(u,f):!0}function Ms(e,n,o){var l=!1,u=$r,f=n.contextType;return typeof f=="object"&&f!==null?f=Vn(f):(u=kn(n)?br:rn.current,l=n.contextTypes,f=(l=l!=null)?qi(e,u):$r),n=new n(o,f),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=js,e.stateNode=n,n._reactInternals=e,l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=u,e.__reactInternalMemoizedMaskedChildContext=f),n}function Xu(e,n,o,l){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(o,l),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(o,l),n.state!==e&&js.enqueueReplaceState(n,n.state,null)}function Bs(e,n,o,l){var u=e.stateNode;u.props=o,u.state=e.memoizedState,u.refs=Gu,lt(e);var f=n.contextType;typeof f=="object"&&f!==null?u.context=Vn(f):(f=kn(n)?br:rn.current,u.context=qi(e,f)),_i(e,o,u,l),u.state=e.memoizedState,f=n.getDerivedStateFromProps,typeof f=="function"&&(Ls(e,n,f,o),u.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(n=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),n!==u.state&&js.enqueueReplaceState(u,u.state,null),_i(e,o,u,l),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4)}var zs=Array.isArray;function zo(e,n,o){if(e=o.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(o._owner){if(o=o._owner,o){if(o.tag!==1)throw Error(B(309));var l=o.stateNode}if(!l)throw Error(B(147,e));var u=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===u?n.ref:(n=function(f){var m=l.refs;m===Gu&&(m=l.refs={}),f===null?delete m[u]:m[u]=f},n._stringRef=u,n)}if(typeof e!="string")throw Error(B(284));if(!o._owner)throw Error(B(290,e))}return e}function no(e,n){if(e.type!=="textarea")throw Error(B(31,Object.prototype.toString.call(n)==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":n))}function Uo(e){function n(k,T){if(e){var P=k.lastEffect;P!==null?(P.nextEffect=T,k.lastEffect=T):k.firstEffect=k.lastEffect=T,T.nextEffect=null,T.flags=8}}function o(k,T){if(!e)return null;for(;T!==null;)n(k,T),T=T.sibling;return null}function l(k,T){for(k=new Map;T!==null;)T.key!==null?k.set(T.key,T):k.set(T.index,T),T=T.sibling;return k}function u(k,T){return k=li(k,T),k.index=0,k.sibling=null,k}function f(k,T,P){return k.index=P,e?(P=k.alternate,P!==null?(P=P.index,P<T?(k.flags=2,T):P):(k.flags=2,T)):T}function m(k){return e&&k.alternate===null&&(k.flags=2),k}function v(k,T,P,L){return T===null||T.tag!==6?(T=gl(P,k.mode,L),T.return=k,T):(T=u(T,P),T.return=k,T)}function S(k,T,P,L){return T!==null&&T.elementType===P.type?(L=u(T,P.props),L.ref=zo(k,T,P),L.return=k,L):(L=wo(P.type,P.key,P.props,null,k.mode,L),L.ref=zo(k,T,P),L.return=k,L)}function I(k,T,P,L){return T===null||T.tag!==4||T.stateNode.containerInfo!==P.containerInfo||T.stateNode.implementation!==P.implementation?(T=is(P,k.mode,L),T.return=k,T):(T=u(T,P.children||[]),T.return=k,T)}function J(k,T,P,L,z){return T===null||T.tag!==7?(T=ai(P,k.mode,L,z),T.return=k,T):(T=u(T,P),T.return=k,T)}function Ie(k,T,P){if(typeof T=="string"||typeof T=="number")return T=gl(""+T,k.mode,P),T.return=k,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case st:return P=wo(T.type,T.key,T.props,null,k.mode,P),P.ref=zo(k,null,T),P.return=k,P;case Z:return T=is(T,k.mode,P),T.return=k,T}if(zs(T)||ye(T))return T=ai(T,k.mode,P,null),T.return=k,T;no(k,T)}return null}function W(k,T,P,L){var z=T!==null?T.key:null;if(typeof P=="string"||typeof P=="number")return z!==null?null:v(k,T,""+P,L);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case st:return P.key===z?P.type===Ze?J(k,T,P.props.children,L,z):S(k,T,P,L):null;case Z:return P.key===z?I(k,T,P,L):null}if(zs(P)||ye(P))return z!==null?null:J(k,T,P,L,null);no(k,P)}return null}function de(k,T,P,L,z){if(typeof L=="string"||typeof L=="number")return k=k.get(P)||null,v(T,k,""+L,z);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case st:return k=k.get(L.key===null?P:L.key)||null,L.type===Ze?J(T,k,L.props.children,z,L.key):S(T,k,L,z);case Z:return k=k.get(L.key===null?P:L.key)||null,I(T,k,L,z)}if(zs(L)||ye(L))return k=k.get(P)||null,J(T,k,L,z,null);no(T,L)}return null}function Ce(k,T,P,L){for(var z=null,be=null,oe=T,Oe=T=0,Ue=null;oe!==null&&Oe<P.length;Oe++){oe.index>Oe?(Ue=oe,oe=null):Ue=oe.sibling;var Le=W(k,oe,P[Oe],L);if(Le===null){oe===null&&(oe=Ue);break}e&&oe&&Le.alternate===null&&n(k,oe),T=f(Le,T,Oe),be===null?z=Le:be.sibling=Le,be=Le,oe=Ue}if(Oe===P.length)return o(k,oe),z;if(oe===null){for(;Oe<P.length;Oe++)oe=Ie(k,P[Oe],L),oe!==null&&(T=f(oe,T,Oe),be===null?z=oe:be.sibling=oe,be=oe);return z}for(oe=l(k,oe);Oe<P.length;Oe++)Ue=de(oe,k,Oe,P[Oe],L),Ue!==null&&(e&&Ue.alternate!==null&&oe.delete(Ue.key===null?Oe:Ue.key),T=f(Ue,T,Oe),be===null?z=Ue:be.sibling=Ue,be=Ue);return e&&oe.forEach(function(ar){return n(k,ar)}),z}function we(k,T,P,L){var z=ye(P);if(typeof z!="function")throw Error(B(150));if(P=z.call(P),P==null)throw Error(B(151));for(var be=z=null,oe=T,Oe=T=0,Ue=null,Le=P.next();oe!==null&&!Le.done;Oe++,Le=P.next()){oe.index>Oe?(Ue=oe,oe=null):Ue=oe.sibling;var ar=W(k,oe,Le.value,L);if(ar===null){oe===null&&(oe=Ue);break}e&&oe&&ar.alternate===null&&n(k,oe),T=f(ar,T,Oe),be===null?z=ar:be.sibling=ar,be=ar,oe=Ue}if(Le.done)return o(k,oe),z;if(oe===null){for(;!Le.done;Oe++,Le=P.next())Le=Ie(k,Le.value,L),Le!==null&&(T=f(Le,T,Oe),be===null?z=Le:be.sibling=Le,be=Le);return z}for(oe=l(k,oe);!Le.done;Oe++,Le=P.next())Le=de(oe,k,Oe,Le.value,L),Le!==null&&(e&&Le.alternate!==null&&oe.delete(Le.key===null?Oe:Le.key),T=f(Le,T,Oe),be===null?z=Le:be.sibling=Le,be=Le);return e&&oe.forEach(function(id){return n(k,id)}),z}return function(k,T,P,L){var z=typeof P=="object"&&P!==null&&P.type===Ze&&P.key===null;z&&(P=P.props.children);var be=typeof P=="object"&&P!==null;if(be)switch(P.$$typeof){case st:e:{for(be=P.key,z=T;z!==null;){if(z.key===be){switch(z.tag){case 7:if(P.type===Ze){o(k,z.sibling),T=u(z,P.props.children),T.return=k,k=T;break e}break;default:if(z.elementType===P.type){o(k,z.sibling),T=u(z,P.props),T.ref=zo(k,z,P),T.return=k,k=T;break e}}o(k,z);break}else n(k,z);z=z.sibling}P.type===Ze?(T=ai(P.props.children,k.mode,L,P.key),T.return=k,k=T):(L=wo(P.type,P.key,P.props,null,k.mode,L),L.ref=zo(k,T,P),L.return=k,k=L)}return m(k);case Z:e:{for(z=P.key;T!==null;){if(T.key===z)if(T.tag===4&&T.stateNode.containerInfo===P.containerInfo&&T.stateNode.implementation===P.implementation){o(k,T.sibling),T=u(T,P.children||[]),T.return=k,k=T;break e}else{o(k,T);break}else n(k,T);T=T.sibling}T=is(P,k.mode,L),T.return=k,k=T}return m(k)}if(typeof P=="string"||typeof P=="number")return P=""+P,T!==null&&T.tag===6?(o(k,T.sibling),T=u(T,P),T.return=k,k=T):(o(k,T),T=gl(P,k.mode,L),T.return=k,k=T),m(k);if(zs(P))return Ce(k,T,P,L);if(ye(P))return we(k,T,P,L);if(be&&no(k,P),typeof P>"u"&&!z)switch(k.tag){case 1:case 22:case 0:case 11:case 15:throw Error(B(152,Sr(k.type)||"Component"))}return o(k,T)}}var Qr=Uo(!0),ro=Uo(!1),Zo={},Hn=Hr(Zo),Wo=Hr(Zo),Vo=Hr(Zo);function $n(e){if(e===Zo)throw Error(B(174));return e}function Kr(e,n){switch(Ft(Vo,n),Ft(Wo,e),Ft(Hn,Zo),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:j(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=j(n,e)}gt(Hn),Ft(Hn,n)}function io(){gt(Hn),gt(Wo),gt(Vo)}function Us(e){$n(Vo.current);var n=$n(Hn.current),o=j(n,e.type);n!==o&&(Ft(Wo,e),Ft(Hn,o))}function fa(e){Wo.current===e&&(gt(Hn),gt(Wo))}var Lt=Hr(0);function Gr(e){for(var n=e;n!==null;){if(n.tag===13){var o=n.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&64)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Mn=null,Yr=null,Qn=!1;function qu(e,n){var o=zn(5,null,null,0);o.elementType="DELETED",o.type="DELETED",o.stateNode=n,o.return=e,o.flags=8,e.lastEffect!==null?(e.lastEffect.nextEffect=o,e.lastEffect=o):e.firstEffect=e.lastEffect=o}function Ju(e,n){switch(e.tag){case 5:var o=e.type;return n=n.nodeType!==1||o.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,!0):!1;case 13:return!1;default:return!1}}function kt(e){if(Qn){var n=Yr;if(n){var o=n;if(!Ju(e,n)){if(n=Gi(o.nextSibling),!n||!Ju(e,n)){e.flags=e.flags&-1025|2,Qn=!1,Mn=e;return}qu(Mn,o)}Mn=e,Yr=Gi(n.firstChild)}else e.flags=e.flags&-1025|2,Qn=!1,Mn=e}}function It(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Mn=e}function Zs(e){if(e!==Mn)return!1;if(!Qn)return It(e),Qn=!0,!1;var n=e.type;if(e.tag!==5||n!=="head"&&n!=="body"&&!na(n,e.memoizedProps))for(n=Yr;n;)qu(e,n),n=Gi(n.nextSibling);if(It(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(B(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var o=e.data;if(o==="/$"){if(n===0){Yr=Gi(e.nextSibling);break e}n--}else o!=="$"&&o!=="$!"&&o!=="$?"||n++}e=e.nextSibling}Yr=null}}else Yr=Mn?Gi(e.stateNode.nextSibling):null;return!0}function Ho(){Yr=Mn=null,Qn=!1}var oo=[];function Ws(){for(var e=0;e<oo.length;e++)oo[e]._workInProgressVersionPrimary=null;oo.length=0}var $o=He.ReactCurrentDispatcher,Kn=He.ReactCurrentBatchConfig,Si=0,zt=null,Te=null,dt=null,so=!1,ft=!1;function In(){throw Error(B(321))}function pa(e,n){if(n===null)return!1;for(var o=0;o<n.length&&o<e.length;o++)if(!Pn(e[o],n[o]))return!1;return!0}function ec(e,n,o,l,u,f){if(Si=f,zt=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,$o.current=e===null||e.memoizedState===null?rc:Sa,e=o(l,u),ft){f=0;do{if(ft=!1,!(25>f))throw Error(B(301));f+=1,dt=Te=null,n.updateQueue=null,$o.current=Ea,e=o(l,u)}while(ft)}if($o.current=or,n=Te!==null&&Te.next!==null,Si=0,dt=Te=zt=null,so=!1,n)throw Error(B(300));return e}function Ei(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dt===null?zt.memoizedState=dt=e:dt=dt.next=e,dt}function se(){if(Te===null){var e=zt.alternate;e=e!==null?e.memoizedState:null}else e=Te.next;var n=dt===null?zt.memoizedState:dt.next;if(n!==null)dt=n,Te=e;else{if(e===null)throw Error(B(310));Te=e,e={memoizedState:Te.memoizedState,baseState:Te.baseState,baseQueue:Te.baseQueue,queue:Te.queue,next:null},dt===null?zt.memoizedState=dt=e:dt=dt.next=e}return dt}function ir(e,n){return typeof n=="function"?n(e):n}function lo(e){var n=se(),o=n.queue;if(o===null)throw Error(B(311));o.lastRenderedReducer=e;var l=Te,u=l.baseQueue,f=o.pending;if(f!==null){if(u!==null){var m=u.next;u.next=f.next,f.next=m}l.baseQueue=u=f,o.pending=null}if(u!==null){u=u.next,l=l.baseState;var v=m=f=null,S=u;do{var I=S.lane;if((Si&I)===I)v!==null&&(v=v.next={lane:0,action:S.action,eagerReducer:S.eagerReducer,eagerState:S.eagerState,next:null}),l=S.eagerReducer===e?S.eagerState:e(l,S.action);else{var J={lane:I,action:S.action,eagerReducer:S.eagerReducer,eagerState:S.eagerState,next:null};v===null?(m=v=J,f=l):v=v.next=J,zt.lanes|=I,Jr|=I}S=S.next}while(S!==null&&S!==u);v===null?f=l:v.next=m,Pn(l,n.memoizedState)||(vt=!0),n.memoizedState=l,n.baseState=f,n.baseQueue=v,o.lastRenderedState=l}return[n.memoizedState,o.dispatch]}function ao(e){var n=se(),o=n.queue;if(o===null)throw Error(B(311));o.lastRenderedReducer=e;var l=o.dispatch,u=o.pending,f=n.memoizedState;if(u!==null){o.pending=null;var m=u=u.next;do f=e(f,m.action),m=m.next;while(m!==u);Pn(f,n.memoizedState)||(vt=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),o.lastRenderedState=f}return[f,l]}function Qo(e,n,o){var l=n._getVersion;l=l(n._source);var u=n._workInProgressVersionPrimary;if(u!==null?e=u===l:(e=e.mutableReadLanes,(e=(Si&e)===e)&&(n._workInProgressVersionPrimary=l,oo.push(n))),e)return o(n._source);throw oo.push(n),Error(B(350))}function Vs(e,n,o,l){var u=Tn;if(u===null)throw Error(B(349));var f=n._getVersion,m=f(n._source),v=$o.current,S=v.useState(function(){return Qo(u,n,o)}),I=S[1],J=S[0];S=dt;var Ie=e.memoizedState,W=Ie.refs,de=W.getSnapshot,Ce=Ie.source;Ie=Ie.subscribe;var we=zt;return e.memoizedState={refs:W,source:n,subscribe:l},v.useEffect(function(){W.getSnapshot=o,W.setSnapshot=I;var k=f(n._source);if(!Pn(m,k)){k=o(n._source),Pn(J,k)||(I(k),k=Ar(we),u.mutableReadLanes|=k&u.pendingLanes),k=u.mutableReadLanes,u.entangledLanes|=k;for(var T=u.entanglements,P=k;0<P;){var L=31-Pr(P),z=1<<L;T[L]|=k,P&=~z}}},[o,n,l]),v.useEffect(function(){return l(n._source,function(){var k=W.getSnapshot,T=W.setSnapshot;try{T(k(n._source));var P=Ar(we);u.mutableReadLanes|=P&u.pendingLanes}catch(L){T(function(){throw L})}})},[n,l]),Pn(de,o)&&Pn(Ce,n)&&Pn(Ie,l)||(e={pending:null,dispatch:null,lastRenderedReducer:ir,lastRenderedState:J},e.dispatch=I=fn.bind(null,zt,e),S.queue=e,S.baseQueue=null,J=Qo(u,n,o),S.memoizedState=S.baseState=J),J}function ha(e,n,o){var l=se();return Vs(l,e,n,o)}function Ko(e){var n=Ei();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e=n.queue={pending:null,dispatch:null,lastRenderedReducer:ir,lastRenderedState:e},e=e.dispatch=fn.bind(null,zt,e),[n.memoizedState,e]}function Xr(e,n,o,l){return e={tag:e,create:n,destroy:o,deps:l,next:null},n=zt.updateQueue,n===null?(n={lastEffect:null},zt.updateQueue=n,n.lastEffect=e.next=e):(o=n.lastEffect,o===null?n.lastEffect=e.next=e:(l=o.next,o.next=e,e.next=l,n.lastEffect=e)),e}function uo(e){var n=Ei();return e={current:e},n.memoizedState=e}function Hs(){return se().memoizedState}function $s(e,n,o,l){var u=Ei();zt.flags|=e,u.memoizedState=Xr(1|n,o,void 0,l===void 0?null:l)}function ma(e,n,o,l){var u=se();l=l===void 0?null:l;var f=void 0;if(Te!==null){var m=Te.memoizedState;if(f=m.destroy,l!==null&&pa(l,m.deps)){Xr(n,o,f,l);return}}zt.flags|=e,u.memoizedState=Xr(1|n,o,f,l)}function tc(e,n){return $s(516,4,e,n)}function Go(e,n){return ma(516,4,e,n)}function ga(e,n){return ma(4,2,e,n)}function ya(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function nc(e,n,o){return o=o!=null?o.concat([e]):null,ma(4,2,ya.bind(null,n,e),o)}function va(){}function wa(e,n){var o=se();n=n===void 0?null:n;var l=o.memoizedState;return l!==null&&n!==null&&pa(n,l[1])?l[0]:(o.memoizedState=[e,n],e)}function _a(e,n){var o=se();n=n===void 0?null:n;var l=o.memoizedState;return l!==null&&n!==null&&pa(n,l[1])?l[0]:(e=e(),o.memoizedState=[e,n],e)}function td(e,n){var o=dn();Or(98>o?98:o,function(){e(!0)}),Or(97<o?97:o,function(){var l=Kn.transition;Kn.transition=1;try{e(!1),n()}finally{Kn.transition=l}})}function fn(e,n,o){var l=On(),u=Ar(e),f={lane:u,action:o,eagerReducer:null,eagerState:null,next:null},m=n.pending;if(m===null?f.next=f:(f.next=m.next,m.next=f),n.pending=f,m=e.alternate,e===zt||m!==null&&m===zt)ft=so=!0;else{if(e.lanes===0&&(m===null||m.lanes===0)&&(m=n.lastRenderedReducer,m!==null))try{var v=n.lastRenderedState,S=m(v,o);if(f.eagerReducer=m,f.eagerState=S,Pn(S,v))return}catch{}lr(e,u,l)}}var or={readContext:Vn,useCallback:In,useContext:In,useEffect:In,useImperativeHandle:In,useLayoutEffect:In,useMemo:In,useReducer:In,useRef:In,useState:In,useDebugValue:In,useDeferredValue:In,useTransition:In,useMutableSource:In,useOpaqueIdentifier:In,unstable_isNewReconciler:!1},rc={readContext:Vn,useCallback:function(e,n){return Ei().memoizedState=[e,n===void 0?null:n],e},useContext:Vn,useEffect:tc,useImperativeHandle:function(e,n,o){return o=o!=null?o.concat([e]):null,$s(4,2,ya.bind(null,n,e),o)},useLayoutEffect:function(e,n){return $s(4,2,e,n)},useMemo:function(e,n){var o=Ei();return n=n===void 0?null:n,e=e(),o.memoizedState=[e,n],e},useReducer:function(e,n,o){var l=Ei();return n=o!==void 0?o(n):n,l.memoizedState=l.baseState=n,e=l.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},e=e.dispatch=fn.bind(null,zt,e),[l.memoizedState,e]},useRef:uo,useState:Ko,useDebugValue:va,useDeferredValue:function(e){var n=Ko(e),o=n[0],l=n[1];return tc(function(){var u=Kn.transition;Kn.transition=1;try{l(e)}finally{Kn.transition=u}},[e]),o},useTransition:function(){var e=Ko(!1),n=e[0];return e=td.bind(null,e[1]),uo(e),[e,n]},useMutableSource:function(e,n,o){var l=Ei();return l.memoizedState={refs:{getSnapshot:n,setSnapshot:null},source:e,subscribe:o},Vs(l,e,n,o)},useOpaqueIdentifier:function(){if(Qn){var e=!1,n=Xc(function(){throw e||(e=!0,o("r:"+(ra++).toString(36))),Error(B(355))}),o=Ko(n)[1];return(zt.mode&2)===0&&(zt.flags|=516,Xr(5,function(){o("r:"+(ra++).toString(36))},void 0,null)),n}return n="r:"+(ra++).toString(36),Ko(n),n},unstable_isNewReconciler:!1},Sa={readContext:Vn,useCallback:wa,useContext:Vn,useEffect:Go,useImperativeHandle:nc,useLayoutEffect:ga,useMemo:_a,useReducer:lo,useRef:Hs,useState:function(){return lo(ir)},useDebugValue:va,useDeferredValue:function(e){var n=lo(ir),o=n[0],l=n[1];return Go(function(){var u=Kn.transition;Kn.transition=1;try{l(e)}finally{Kn.transition=u}},[e]),o},useTransition:function(){var e=lo(ir)[0];return[Hs().current,e]},useMutableSource:ha,useOpaqueIdentifier:function(){return lo(ir)[0]},unstable_isNewReconciler:!1},Ea={readContext:Vn,useCallback:wa,useContext:Vn,useEffect:Go,useImperativeHandle:nc,useLayoutEffect:ga,useMemo:_a,useReducer:ao,useRef:Hs,useState:function(){return ao(ir)},useDebugValue:va,useDeferredValue:function(e){var n=ao(ir),o=n[0],l=n[1];return Go(function(){var u=Kn.transition;Kn.transition=1;try{l(e)}finally{Kn.transition=u}},[e]),o},useTransition:function(){var e=ao(ir)[0];return[Hs().current,e]},useMutableSource:ha,useOpaqueIdentifier:function(){return ao(ir)[0]},unstable_isNewReconciler:!1},ic=He.ReactCurrentOwner,vt=!1;function gn(e,n,o,l){n.child=e===null?ro(n,null,o,l):Qr(n,e.child,o,l)}function Ta(e,n,o,l,u){o=o.render;var f=n.ref;return to(n,u),l=ec(e,n,o,l,f,u),e!==null&&!vt?(n.updateQueue=e.updateQueue,n.flags&=-517,e.lanes&=~u,sr(e,n,u)):(n.flags|=1,gn(e,n,l,u),n.child)}function oc(e,n,o,l,u,f){if(e===null){var m=o.type;return typeof m=="function"&&!ml(m)&&m.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(n.tag=15,n.type=m,sc(e,n,m,l,u,f)):(e=wo(o.type,null,l,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}return m=e.child,(u&f)===0&&(u=m.memoizedProps,o=o.compare,o=o!==null?o:Zr,o(u,l)&&e.ref===n.ref)?sr(e,n,f):(n.flags|=1,e=li(m,l),e.ref=n.ref,e.return=n,n.child=e)}function sc(e,n,o,l,u,f){if(e!==null&&Zr(e.memoizedProps,l)&&e.ref===n.ref)if(vt=!1,(f&u)!==0)(e.flags&16384)!==0&&(vt=!0);else return n.lanes=e.lanes,sr(e,n,f);return Qs(e,n,o,l,f)}function xa(e,n,o){var l=n.pendingProps,u=l.children,f=e!==null?e.memoizedState:null;if(l.mode==="hidden"||l.mode==="unstable-defer-without-hiding")if((n.mode&4)===0)n.memoizedState={baseLanes:0},dl(n,o);else if((o&1073741824)!==0)n.memoizedState={baseLanes:0},dl(n,f!==null?f.baseLanes:o);else return e=f!==null?f.baseLanes|o:o,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e},dl(n,e),null;else f!==null?(l=f.baseLanes|o,n.memoizedState=null):l=o,dl(n,l);return gn(e,n,u,o),n.child}function Ca(e,n){var o=n.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(n.flags|=128)}function Qs(e,n,o,l,u){var f=kn(o)?br:rn.current;return f=qi(n,f),to(n,u),o=ec(e,n,o,l,f,u),e!==null&&!vt?(n.updateQueue=e.updateQueue,n.flags&=-517,e.lanes&=~u,sr(e,n,u)):(n.flags|=1,gn(e,n,o,u),n.child)}function Pa(e,n,o,l,u){if(kn(o)){var f=!0;Ji(n)}else f=!1;if(to(n,u),n.stateNode===null)e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2),Ms(n,o,l),Bs(n,o,l,u),l=!0;else if(e===null){var m=n.stateNode,v=n.memoizedProps;m.props=v;var S=m.context,I=o.contextType;typeof I=="object"&&I!==null?I=Vn(I):(I=kn(o)?br:rn.current,I=qi(n,I));var J=o.getDerivedStateFromProps,Ie=typeof J=="function"||typeof m.getSnapshotBeforeUpdate=="function";Ie||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(v!==l||S!==I)&&Xu(n,m,l,I),ke=!1;var W=n.memoizedState;m.state=W,_i(n,l,m,u),S=n.memoizedState,v!==l||W!==S||Rn.current||ke?(typeof J=="function"&&(Ls(n,o,J,l),S=n.memoizedState),(v=ke||Yu(n,o,v,l,W,S,I))?(Ie||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(n.flags|=4)):(typeof m.componentDidMount=="function"&&(n.flags|=4),n.memoizedProps=l,n.memoizedState=S),m.props=l,m.state=S,m.context=I,l=v):(typeof m.componentDidMount=="function"&&(n.flags|=4),l=!1)}else{m=n.stateNode,$u(e,n),v=n.memoizedProps,I=n.type===n.elementType?v:jn(n.type,v),m.props=I,Ie=n.pendingProps,W=m.context,S=o.contextType,typeof S=="object"&&S!==null?S=Vn(S):(S=kn(o)?br:rn.current,S=qi(n,S));var de=o.getDerivedStateFromProps;(J=typeof de=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(v!==Ie||W!==S)&&Xu(n,m,l,S),ke=!1,W=n.memoizedState,m.state=W,_i(n,l,m,u);var Ce=n.memoizedState;v!==Ie||W!==Ce||Rn.current||ke?(typeof de=="function"&&(Ls(n,o,de,l),Ce=n.memoizedState),(I=ke||Yu(n,o,I,l,W,Ce,S))?(J||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(l,Ce,S),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(l,Ce,S)),typeof m.componentDidUpdate=="function"&&(n.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(n.flags|=256)):(typeof m.componentDidUpdate!="function"||v===e.memoizedProps&&W===e.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&W===e.memoizedState||(n.flags|=256),n.memoizedProps=l,n.memoizedState=Ce),m.props=l,m.state=Ce,m.context=S,l=I):(typeof m.componentDidUpdate!="function"||v===e.memoizedProps&&W===e.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&W===e.memoizedState||(n.flags|=256),l=!1)}return Ra(e,n,o,l,f,u)}function Ra(e,n,o,l,u,f){Ca(e,n);var m=(n.flags&64)!==0;if(!l&&!m)return u&&ju(n,o,!1),sr(e,n,f);l=n.stateNode,ic.current=n;var v=m&&typeof o.getDerivedStateFromError!="function"?null:l.render();return n.flags|=1,e!==null&&m?(n.child=Qr(n,e.child,null,f),n.child=Qr(n,null,v,f)):gn(e,n,v,f),n.memoizedState=l.state,u&&ju(n,o,!0),n.child}function yn(e){var n=e.stateNode;n.pendingContext?ia(e,n.pendingContext,n.pendingContext!==n.context):n.context&&ia(e,n.context,!1),Kr(e,n.containerInfo)}var Yo={dehydrated:null,retryLane:0};function ka(e,n,o){var l=n.pendingProps,u=Lt.current,f=!1,m;return(m=(n.flags&64)!==0)||(m=e!==null&&e.memoizedState===null?!1:(u&2)!==0),m?(f=!0,n.flags&=-65):e!==null&&e.memoizedState===null||l.fallback===void 0||l.unstable_avoidThisFallback===!0||(u|=1),Ft(Lt,u&1),e===null?(l.fallback!==void 0&&kt(n),e=l.children,u=l.fallback,f?(e=Ks(n,e,u,o),n.child.memoizedState={baseLanes:o},n.memoizedState=Yo,e):typeof l.unstable_expectedLoadTime=="number"?(e=Ks(n,e,u,o),n.child.memoizedState={baseLanes:o},n.memoizedState=Yo,n.lanes=33554432,e):(o=rs({mode:"visible",children:e},n.mode,o,null),o.return=n,n.child=o)):e.memoizedState!==null?f?(l=Ia(e,n,l.children,l.fallback,o),f=n.child,u=e.child.memoizedState,f.memoizedState=u===null?{baseLanes:o}:{baseLanes:u.baseLanes|o},f.childLanes=e.childLanes&~o,n.memoizedState=Yo,l):(o=lc(e,n,l.children,o),n.memoizedState=null,o):f?(l=Ia(e,n,l.children,l.fallback,o),f=n.child,u=e.child.memoizedState,f.memoizedState=u===null?{baseLanes:o}:{baseLanes:u.baseLanes|o},f.childLanes=e.childLanes&~o,n.memoizedState=Yo,l):(o=lc(e,n,l.children,o),n.memoizedState=null,o)}function Ks(e,n,o,l){var u=e.mode,f=e.child;return n={mode:"hidden",children:n},(u&2)===0&&f!==null?(f.childLanes=0,f.pendingProps=n):f=rs(n,u,0,null),o=ai(o,u,l,null),f.return=e,o.return=e,f.sibling=o,e.child=f,o}function lc(e,n,o,l){var u=e.child;return e=u.sibling,o=li(u,{mode:"visible",children:o}),(n.mode&2)===0&&(o.lanes=l),o.return=n,o.sibling=null,e!==null&&(e.nextEffect=null,e.flags=8,n.firstEffect=n.lastEffect=e),n.child=o}function Ia(e,n,o,l,u){var f=n.mode,m=e.child;e=m.sibling;var v={mode:"hidden",children:o};return(f&2)===0&&n.child!==m?(o=n.child,o.childLanes=0,o.pendingProps=v,m=o.lastEffect,m!==null?(n.firstEffect=o.firstEffect,n.lastEffect=m,m.nextEffect=null):n.firstEffect=n.lastEffect=null):o=li(m,v),e!==null?l=li(e,l):(l=ai(l,f,u,null),l.flags|=2),l.return=n,o.return=n,o.sibling=l,n.child=o,l}function Xo(e,n){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),Fs(e.return,n)}function Nr(e,n,o,l,u,f){var m=e.memoizedState;m===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:l,tail:o,tailMode:u,lastEffect:f}:(m.isBackwards=n,m.rendering=null,m.renderingStartTime=0,m.last=l,m.tail=o,m.tailMode=u,m.lastEffect=f)}function vr(e,n,o){var l=n.pendingProps,u=l.revealOrder,f=l.tail;if(gn(e,n,l.children,o),l=Lt.current,(l&2)!==0)l=l&1|2,n.flags|=64;else{if(e!==null&&(e.flags&64)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Xo(e,o);else if(e.tag===19)Xo(e,o);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}l&=1}if(Ft(Lt,l),(n.mode&2)===0)n.memoizedState=null;else switch(u){case"forwards":for(o=n.child,u=null;o!==null;)e=o.alternate,e!==null&&Gr(e)===null&&(u=o),o=o.sibling;o=u,o===null?(u=n.child,n.child=null):(u=o.sibling,o.sibling=null),Nr(n,!1,u,o,f,n.lastEffect);break;case"backwards":for(o=null,u=n.child,n.child=null;u!==null;){if(e=u.alternate,e!==null&&Gr(e)===null){n.child=u;break}e=u.sibling,u.sibling=o,o=u,u=e}Nr(n,!0,o,null,f,n.lastEffect);break;case"together":Nr(n,!1,null,null,void 0,n.lastEffect);break;default:n.memoizedState=null}return n.child}function sr(e,n,o){if(e!==null&&(n.dependencies=e.dependencies),Jr|=n.lanes,(o&n.childLanes)!==0){if(e!==null&&n.child!==e.child)throw Error(B(153));if(n.child!==null){for(e=n.child,o=li(e,e.pendingProps),n.child=o,o.return=n;e.sibling!==null;)e=e.sibling,o=o.sibling=li(e,e.pendingProps),o.return=n;o.sibling=null}return n.child}return null}var Gs,Ys,Xs,qs;Gs=function(e,n){for(var o=n.child;o!==null;){if(o.tag===5||o.tag===6)e.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},Ys=function(){},Xs=function(e,n,o,l){var u=e.memoizedProps;if(u!==l){e=n.stateNode,$n(Hn.current);var f=null;switch(o){case"input":u=Ni(e,u),l=Ni(e,l),f=[];break;case"option":u=ln(e,u),l=ln(e,l),f=[];break;case"select":u=Ae({},u,{value:void 0}),l=Ae({},l,{value:void 0}),f=[];break;case"textarea":u=Ee(e,u),l=Ee(e,l),f=[];break;default:typeof u.onClick!="function"&&typeof l.onClick=="function"&&(e.onclick=Ps)}$e(o,l);var m;o=null;for(I in u)if(!l.hasOwnProperty(I)&&u.hasOwnProperty(I)&&u[I]!=null)if(I==="style"){var v=u[I];for(m in v)v.hasOwnProperty(m)&&(o||(o={}),o[m]="")}else I!=="dangerouslySetInnerHTML"&&I!=="children"&&I!=="suppressContentEditableWarning"&&I!=="suppressHydrationWarning"&&I!=="autoFocus"&&(Et.hasOwnProperty(I)?f||(f=[]):(f=f||[]).push(I,null));for(I in l){var S=l[I];if(v=u?.[I],l.hasOwnProperty(I)&&S!==v&&(S!=null||v!=null))if(I==="style")if(v){for(m in v)!v.hasOwnProperty(m)||S&&S.hasOwnProperty(m)||(o||(o={}),o[m]="");for(m in S)S.hasOwnProperty(m)&&v[m]!==S[m]&&(o||(o={}),o[m]=S[m])}else o||(f||(f=[]),f.push(I,o)),o=S;else I==="dangerouslySetInnerHTML"?(S=S?S.__html:void 0,v=v?v.__html:void 0,S!=null&&v!==S&&(f=f||[]).push(I,S)):I==="children"?typeof S!="string"&&typeof S!="number"||(f=f||[]).push(I,""+S):I!=="suppressContentEditableWarning"&&I!=="suppressHydrationWarning"&&(Et.hasOwnProperty(I)?(S!=null&&I==="onScroll"&&St("scroll",e),f||v===S||(f=[])):typeof S=="object"&&S!==null&&S.$$typeof===F?S.toString():(f=f||[]).push(I,S))}o&&(f=f||[]).push("style",o);var I=f;(n.updateQueue=I)&&(n.flags|=4)}},qs=function(e,n,o,l){o!==l&&(n.flags|=4)};function Ti(e,n){if(!Qn)switch(e.tailMode){case"hidden":n=e.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?e.tail=null:o.sibling=null;break;case"collapsed":o=e.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function ba(e,n,o){var l=n.pendingProps;switch(n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return kn(n.type)&&Fo(),null;case 3:return io(),gt(Rn),gt(rn),Ws(),l=n.stateNode,l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Zs(n)?n.flags|=4:l.hydrate||(n.flags|=256)),Ys(n),null;case 5:fa(n);var u=$n(Vo.current);if(o=n.type,e!==null&&n.stateNode!=null)Xs(e,n,o,l,u),e.ref!==n.ref&&(n.flags|=128);else{if(!l){if(n.stateNode===null)throw Error(B(166));return null}if(e=$n(Hn.current),Zs(n)){l=n.stateNode,o=n.type;var f=n.memoizedProps;switch(l[Ir]=n,l[Is]=f,o){case"dialog":St("cancel",l),St("close",l);break;case"iframe":case"object":case"embed":St("load",l);break;case"video":case"audio":for(e=0;e<wi.length;e++)St(wi[e],l);break;case"source":St("error",l);break;case"img":case"image":case"link":St("error",l),St("load",l);break;case"details":St("toggle",l);break;case"input":tn(l,f),St("invalid",l);break;case"select":l._wrapperState={wasMultiple:!!f.multiple},St("invalid",l);break;case"textarea":w(l,f),St("invalid",l)}$e(o,f),e=null;for(var m in f)f.hasOwnProperty(m)&&(u=f[m],m==="children"?typeof u=="string"?l.textContent!==u&&(e=["children",u]):typeof u=="number"&&l.textContent!==""+u&&(e=["children",""+u]):Et.hasOwnProperty(m)&&u!=null&&m==="onScroll"&&St("scroll",l));switch(o){case"input":X(l),jr(l,f,!0);break;case"textarea":X(l),E(l);break;case"select":case"option":break;default:typeof f.onClick=="function"&&(l.onclick=Ps)}l=e,n.updateQueue=l,l!==null&&(n.flags|=4)}else{switch(m=u.nodeType===9?u:u.ownerDocument,e===R.html&&(e=N(o)),e===R.html?o==="script"?(e=m.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=m.createElement(o,{is:l.is}):(e=m.createElement(o),o==="select"&&(m=e,l.multiple?m.multiple=!0:l.size&&(m.size=l.size))):e=m.createElementNS(e,o),e[Ir]=n,e[Is]=l,Gs(e,n,!1,!1),n.stateNode=e,m=wt(o,l),o){case"dialog":St("cancel",e),St("close",e),u=l;break;case"iframe":case"object":case"embed":St("load",e),u=l;break;case"video":case"audio":for(u=0;u<wi.length;u++)St(wi[u],e);u=l;break;case"source":St("error",e),u=l;break;case"img":case"image":case"link":St("error",e),St("load",e),u=l;break;case"details":St("toggle",e),u=l;break;case"input":tn(e,l),u=Ni(e,l),St("invalid",e);break;case"option":u=ln(e,l);break;case"select":e._wrapperState={wasMultiple:!!l.multiple},u=Ae({},l,{value:void 0}),St("invalid",e);break;case"textarea":w(e,l),u=Ee(e,l),St("invalid",e);break;default:u=l}$e(o,u);var v=u;for(f in v)if(v.hasOwnProperty(f)){var S=v[f];f==="style"?mt(e,S):f==="dangerouslySetInnerHTML"?(S=S?S.__html:void 0,S!=null&&G(e,S)):f==="children"?typeof S=="string"?(o!=="textarea"||S!=="")&&ve(e,S):typeof S=="number"&&ve(e,""+S):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(Et.hasOwnProperty(f)?S!=null&&f==="onScroll"&&St("scroll",e):S!=null&&Ne(e,f,S,m))}switch(o){case"input":X(e),jr(e,l,!1);break;case"textarea":X(e),E(e);break;case"option":l.value!=null&&e.setAttribute("value",""+Cn(l.value));break;case"select":e.multiple=!!l.multiple,f=l.value,f!=null?Er(e,!!l.multiple,f,!1):l.defaultValue!=null&&Er(e,!!l.multiple,l.defaultValue,!0);break;default:typeof u.onClick=="function"&&(e.onclick=Ps)}Nu(o,l)&&(n.flags|=4)}n.ref!==null&&(n.flags|=128)}return null;case 6:if(e&&n.stateNode!=null)qs(e,n,e.memoizedProps,l);else{if(typeof l!="string"&&n.stateNode===null)throw Error(B(166));o=$n(Vo.current),$n(Hn.current),Zs(n)?(l=n.stateNode,o=n.memoizedProps,l[Ir]=n,l.nodeValue!==o&&(n.flags|=4)):(l=(o.nodeType===9?o:o.ownerDocument).createTextNode(l),l[Ir]=n,n.stateNode=l)}return null;case 13:return gt(Lt),l=n.memoizedState,(n.flags&64)!==0?(n.lanes=o,n):(l=l!==null,o=!1,e===null?n.memoizedProps.fallback!==void 0&&Zs(n):o=e.memoizedState!==null,l&&!o&&(n.mode&2)!==0&&(e===null&&n.memoizedProps.unstable_avoidThisFallback!==!0||(Lt.current&1)!==0?bt===0&&(bt=3):((bt===0||bt===3)&&(bt=4),Tn===null||(Jr&134217727)===0&&(Dr&134217727)===0||yo(Tn,vn))),(l||o)&&(n.flags|=4),null);case 4:return io(),Ys(n),e===null&&$i(n.stateNode.containerInfo),null;case 10:return da(n),null;case 17:return kn(n.type)&&Fo(),null;case 19:if(gt(Lt),l=n.memoizedState,l===null)return null;if(f=(n.flags&64)!==0,m=l.rendering,m===null)if(f)Ti(l,!1);else{if(bt!==0||e!==null&&(e.flags&64)!==0)for(e=n.child;e!==null;){if(m=Gr(e),m!==null){for(n.flags|=64,Ti(l,!1),f=m.updateQueue,f!==null&&(n.updateQueue=f,n.flags|=4),l.lastEffect===null&&(n.firstEffect=null),n.lastEffect=l.lastEffect,l=o,o=n.child;o!==null;)f=o,e=l,f.flags&=2,f.nextEffect=null,f.firstEffect=null,f.lastEffect=null,m=f.alternate,m===null?(f.childLanes=0,f.lanes=e,f.child=null,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=m.childLanes,f.lanes=m.lanes,f.child=m.child,f.memoizedProps=m.memoizedProps,f.memoizedState=m.memoizedState,f.updateQueue=m.updateQueue,f.type=m.type,e=m.dependencies,f.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),o=o.sibling;return Ft(Lt,Lt.current&1|2),n.child}e=e.sibling}l.tail!==null&&yt()>ll&&(n.flags|=64,f=!0,Ti(l,!1),n.lanes=33554432)}else{if(!f)if(e=Gr(m),e!==null){if(n.flags|=64,f=!0,o=e.updateQueue,o!==null&&(n.updateQueue=o,n.flags|=4),Ti(l,!0),l.tail===null&&l.tailMode==="hidden"&&!m.alternate&&!Qn)return n=n.lastEffect=l.lastEffect,n!==null&&(n.nextEffect=null),null}else 2*yt()-l.renderingStartTime>ll&&o!==1073741824&&(n.flags|=64,f=!0,Ti(l,!1),n.lanes=33554432);l.isBackwards?(m.sibling=n.child,n.child=m):(o=l.last,o!==null?o.sibling=m:n.child=m,l.last=m)}return l.tail!==null?(o=l.tail,l.rendering=o,l.tail=o.sibling,l.lastEffect=n.lastEffect,l.renderingStartTime=yt(),o.sibling=null,n=Lt.current,Ft(Lt,f?n&1|2:n&1),o):null;case 23:case 24:return za(),e!==null&&e.memoizedState!==null!=(n.memoizedState!==null)&&l.mode!=="unstable-defer-without-hiding"&&(n.flags|=4),null}throw Error(B(156,n.tag))}function Js(e){switch(e.tag){case 1:kn(e.type)&&Fo();var n=e.flags;return n&4096?(e.flags=n&-4097|64,e):null;case 3:if(io(),gt(Rn),gt(rn),Ws(),n=e.flags,(n&64)!==0)throw Error(B(285));return e.flags=n&-4097|64,e;case 5:return fa(e),null;case 13:return gt(Lt),n=e.flags,n&4096?(e.flags=n&-4097|64,e):null;case 19:return gt(Lt),null;case 4:return io(),null;case 10:return da(e),null;case 23:case 24:return za(),null;default:return null}}function Oa(e,n){try{var o="",l=n;do o+=cs(l),l=l.return;while(l);var u=o}catch(f){u=`
40
+ `+u[m].replace(" at new "," at ");while(1<=m&&0<=v);break}}}finally{Qt=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?ln(e):""}function cs(e){switch(e.tag){case 5:return ln(e.type);case 16:return ln("Lazy");case 13:return ln("Suspense");case 19:return ln("SuspenseList");case 0:case 2:case 15:return e=Un(e.type,!1),e;case 11:return e=Un(e.type.render,!1),e;case 22:return e=Un(e.type._render,!1),e;case 1:return e=Un(e.type,!0),e;default:return""}}function Sr(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ze:return"Fragment";case Z:return"Portal";case ue:return"Profiler";case Ye:return"StrictMode";case me:return"Suspense";case q:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ee:return(e.displayName||"Context")+".Consumer";case fe:return(e._context.displayName||"Context")+".Provider";case ie:var n=e.render;return n=n.displayName||n.name||"",e.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case ge:return Sr(e.type);case V:return Sr(e._render);case C:n=e._payload,e=e._init;try{return Sr(e(n))}catch{}}return null}function Cn(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function pi(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Tl(e){var n=pi(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),l=""+e[n];if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var u=o.get,f=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return u.call(this)},set:function(m){l=""+m,f.call(this,m)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return l},setValue:function(m){l=""+m},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function X(e){e._valueTracker||(e._valueTracker=Tl(e))}function Ut(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var o=n.getValue(),l="";return e&&(l=pi(e)?e.checked?"true":"false":e.value),e=l,e!==o?(n.setValue(e),!0):!1}function Se(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ni(e,n){var o=n.checked;return De({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function nn(e,n){var o=n.defaultValue==null?"":n.defaultValue,l=n.checked!=null?n.checked:n.defaultChecked;o=Cn(n.value!=null?n.value:o),e._wrapperState={initialChecked:l,initialValue:o,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Di(e,n){n=n.checked,n!=null&&Oe(e,"checked",n,!1)}function hi(e,n){Di(e,n);var o=Cn(n.value),l=n.type;if(o!=null)l==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Zn(e,n.type,o):n.hasOwnProperty("defaultValue")&&Zn(e,n.type,Cn(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function jr(e,n,o){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var l=n.type;if(!(l!=="submit"&&l!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,o||n===e.value||(e.value=n),e.defaultValue=n}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function Zn(e,n,o){(n!=="number"||Se(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}function ce(e){var n="";return Ot.Children.forEach(e,function(o){o!=null&&(n+=o)}),n}function an(e,n){return e=De({children:void 0},n),(n=ce(n.children))&&(e.children=n),e}function Er(e,n,o,l){if(e=e.options,n){n={};for(var u=0;u<o.length;u++)n["$"+o[u]]=!0;for(o=0;o<e.length;o++)u=n.hasOwnProperty("$"+e[o].value),e[o].selected!==u&&(e[o].selected=u),u&&l&&(e[o].defaultSelected=!0)}else{for(o=""+Cn(o),n=null,u=0;u<e.length;u++){if(e[u].value===o){e[u].selected=!0,l&&(e[u].defaultSelected=!0);return}n!==null||e[u].disabled||(n=e[u])}n!==null&&(n.selected=!0)}}function Ee(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(B(91));return De({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function w(e,n){var o=n.value;if(o==null){if(o=n.children,n=n.defaultValue,o!=null){if(n!=null)throw Error(B(92));if(Array.isArray(o)){if(!(1>=o.length))throw Error(B(93));o=o[0]}n=o}n==null&&(n=""),o=n}e._wrapperState={initialValue:Cn(o)}}function y(e,n){var o=Cn(n.value),l=Cn(n.defaultValue);o!=null&&(o=""+o,o!==e.value&&(e.value=o),n.defaultValue==null&&e.defaultValue!==o&&(e.defaultValue=o)),l!=null&&(e.defaultValue=""+l)}function E(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}var R={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function N(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function F(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?N(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Q,G=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,o,l,u){MSApp.execUnsafeLocalFunction(function(){return e(n,o,l,u)})}:e})(function(e,n){if(e.namespaceURI!==R.svg||"innerHTML"in e)e.innerHTML=n;else{for(Q=Q||document.createElement("div"),Q.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=Q.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function ve(e,n){if(n){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=n;return}}e.textContent=n}var Ae={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ne=["Webkit","ms","Moz","O"];Object.keys(Ae).forEach(function(e){Ne.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Ae[n]=Ae[e]})});function he(e,n,o){return n==null||typeof n=="boolean"||n===""?"":o||typeof n!="number"||n===0||Ae.hasOwnProperty(e)&&Ae[e]?(""+n).trim():n+"px"}function mt(e,n){e=e.style;for(var o in n)if(n.hasOwnProperty(o)){var l=o.indexOf("--")===0,u=he(o,n[o],l);o==="float"&&(o="cssFloat"),l?e.setProperty(o,u):e[o]=u}}var Me=De({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Qe(e,n){if(n){if(Me[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(B(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(B(60));if(!(typeof n.dangerouslySetInnerHTML=="object"&&"__html"in n.dangerouslySetInnerHTML))throw Error(B(61))}if(n.style!=null&&typeof n.style!="object")throw Error(B(62))}}function wt(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Pe(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Be=null,Xe=null,nt=null;function We(e){if(e=Ao(e)){if(typeof Be!="function")throw Error(B(280));var n=e.stateNode;n&&(n=Xi(n),Be(e.stateNode,e.type,n))}}function xt(e){Xe?nt?nt.push(e):nt=[e]:Xe=e}function Fe(){if(Xe){var e=Xe,n=nt;if(nt=Xe=null,We(e),n)for(e=0;e<n.length;e++)We(n[e])}}function Je(e,n){return e(n)}function Ke(e,n,o,l,u){return e(n,o,l,u)}function Zt(){}var Ge=Je,Kt=!1,un=!1;function pn(){(Xe!==null||nt!==null)&&(Zt(),Fe())}function Wt(e,n,o){if(un)return e(n,o);un=!0;try{return Ge(e,n,o)}finally{un=!1,pn()}}function ut(e,n){var o=e.stateNode;if(o===null)return null;var l=Xi(o);if(l===null)return null;o=l[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(o&&typeof o!="function")throw Error(B(231,n,typeof o));return o}var ct=!1;if(Y)try{var Nt={};Object.defineProperty(Nt,"passive",{get:function(){ct=!0}}),window.addEventListener("test",Nt,Nt),window.removeEventListener("test",Nt,Nt)}catch{ct=!1}function Bt(e,n,o,l,u,f,m,v,S){var I=Array.prototype.slice.call(arguments,3);try{n.apply(o,I)}catch(J){this.onError(J)}}var hn=!1,Dt=null,Jn=!1,ur=null,So={onError:function(e){hn=!0,Dt=e}};function er(e,n,o,l,u,f,m,v,S){hn=!1,Dt=null,Bt.apply(So,arguments)}function Tr(e,n,o,l,u,f,m,v,S){if(er.apply(this,arguments),hn){if(hn){var I=Dt;hn=!1,Dt=null}else throw Error(B(198));Jn||(Jn=!0,ur=I)}}function _n(e){var n=e,o=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&1026)!==0&&(o=n.return),e=n.return;while(e)}return n.tag===3?o:null}function Sn(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function Dn(e){if(_n(e)!==e)throw Error(B(188))}function cr(e){var n=e.alternate;if(!n){if(n=_n(e),n===null)throw Error(B(188));return n!==e?null:e}for(var o=e,l=n;;){var u=o.return;if(u===null)break;var f=u.alternate;if(f===null){if(l=u.return,l!==null){o=l;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===o)return Dn(u),e;if(f===l)return Dn(u),n;f=f.sibling}throw Error(B(188))}if(o.return!==l.return)o=u,l=f;else{for(var m=!1,v=u.child;v;){if(v===o){m=!0,o=u,l=f;break}if(v===l){m=!0,l=u,o=f;break}v=v.sibling}if(!m){for(v=f.child;v;){if(v===o){m=!0,o=f,l=u;break}if(v===l){m=!0,l=f,o=u;break}v=v.sibling}if(!m)throw Error(B(189))}}if(o.alternate!==l)throw Error(B(190))}if(o.tag!==3)throw Error(B(188));return o.stateNode.current===o?e:n}function xr(e){if(e=cr(e),!e)return null;for(var n=e;;){if(n.tag===5||n.tag===6)return n;if(n.child)n.child.return=n,n=n.child;else{if(n===e)break;for(;!n.sibling;){if(!n.return||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}}return null}function dr(e,n){for(var o=e.alternate;n!==null;){if(n===e||n===o)return!0;n=n.return}return!1}var Cr,mi,Mr,fr,ze=!1,An=[],Br=null,pe=null,zr=null,Ai=new Map,Fi=new Map,Eo=[],Ya="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ds(e,n,o,l,u){return{blockedOn:e,domEventName:n,eventSystemFlags:o|16,nativeEvent:u,targetContainers:[l]}}function Xa(e,n){switch(e){case"focusin":case"focusout":Br=null;break;case"dragenter":case"dragleave":pe=null;break;case"mouseover":case"mouseout":zr=null;break;case"pointerover":case"pointerout":Ai.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fi.delete(n.pointerId)}}function To(e,n,o,l,u,f){return e===null||e.nativeEvent!==f?(e=ds(n,o,l,u,f),n!==null&&(n=Ao(n),n!==null&&mi(n)),e):(e.eventSystemFlags|=l,n=e.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),e)}function Fc(e,n,o,l,u){switch(n){case"focusin":return Br=To(Br,e,n,o,l,u),!0;case"dragenter":return pe=To(pe,e,n,o,l,u),!0;case"mouseover":return zr=To(zr,e,n,o,l,u),!0;case"pointerover":var f=u.pointerId;return Ai.set(f,To(Ai.get(f)||null,e,n,o,l,u)),!0;case"gotpointercapture":return f=u.pointerId,Fi.set(f,To(Fi.get(f)||null,e,n,o,l,u)),!0}return!1}function Lc(e){var n=Vr(e.target);if(n!==null){var o=_n(n);if(o!==null){if(n=o.tag,n===13){if(n=Sn(o),n!==null){e.blockedOn=n,fr(e.lanePriority,function(){it.unstable_runWithPriority(e.priority,function(){Mr(o)})});return}}else if(n===3&&o.stateNode.hydrate){e.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}e.blockedOn=null}function fs(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var o=O(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(o!==null)return n=Ao(o),n!==null&&mi(n),e.blockedOn=o,!1;n.shift()}return!0}function qa(e,n,o){fs(e)&&o.delete(n)}function jc(){for(ze=!1;0<An.length;){var e=An[0];if(e.blockedOn!==null){e=Ao(e.blockedOn),e!==null&&Cr(e);break}for(var n=e.targetContainers;0<n.length;){var o=O(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(o!==null){e.blockedOn=o;break}n.shift()}e.blockedOn===null&&An.shift()}Br!==null&&fs(Br)&&(Br=null),pe!==null&&fs(pe)&&(pe=null),zr!==null&&fs(zr)&&(zr=null),Ai.forEach(qa),Fi.forEach(qa)}function xo(e,n){e.blockedOn===n&&(e.blockedOn=null,ze||(ze=!0,it.unstable_scheduleCallback(it.unstable_NormalPriority,jc)))}function Ja(e){function n(u){return xo(u,e)}if(0<An.length){xo(An[0],e);for(var o=1;o<An.length;o++){var l=An[o];l.blockedOn===e&&(l.blockedOn=null)}}for(Br!==null&&xo(Br,e),pe!==null&&xo(pe,e),zr!==null&&xo(zr,e),Ai.forEach(n),Fi.forEach(n),o=0;o<Eo.length;o++)l=Eo[o],l.blockedOn===e&&(l.blockedOn=null);for(;0<Eo.length&&(o=Eo[0],o.blockedOn===null);)Lc(o),o.blockedOn===null&&Eo.shift()}function ps(e,n){var o={};return o[e.toLowerCase()]=n.toLowerCase(),o["Webkit"+e]="webkit"+n,o["Moz"+e]="moz"+n,o}var Li={animationend:ps("Animation","AnimationEnd"),animationiteration:ps("Animation","AnimationIteration"),animationstart:ps("Animation","AnimationStart"),transitionend:ps("Transition","TransitionEnd")},xl={},eu={};Y&&(eu=document.createElement("div").style,"AnimationEvent"in window||(delete Li.animationend.animation,delete Li.animationiteration.animation,delete Li.animationstart.animation),"TransitionEvent"in window||delete Li.transitionend.transition);function hs(e){if(xl[e])return xl[e];if(!Li[e])return e;var n=Li[e],o;for(o in n)if(n.hasOwnProperty(o)&&o in eu)return xl[e]=n[o];return e}var tu=hs("animationend"),nu=hs("animationiteration"),ru=hs("animationstart"),iu=hs("transitionend"),ou=new Map,Cl=new Map,Mc=["abort","abort",tu,"animationEnd",nu,"animationIteration",ru,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",iu,"transitionEnd","waiting","waiting"];function Pl(e,n){for(var o=0;o<e.length;o+=2){var l=e[o],u=e[o+1];u="on"+(u[0].toUpperCase()+u.slice(1)),Cl.set(l,n),ou.set(l,u),Tt(u,[l])}}var Bc=it.unstable_now;Bc();var _t=8;function gi(e){if((1&e)!==0)return _t=15,1;if((2&e)!==0)return _t=14,2;if((4&e)!==0)return _t=13,4;var n=24&e;return n!==0?(_t=12,n):(e&32)!==0?(_t=11,32):(n=192&e,n!==0?(_t=10,n):(e&256)!==0?(_t=9,256):(n=3584&e,n!==0?(_t=8,n):(e&4096)!==0?(_t=7,4096):(n=4186112&e,n!==0?(_t=6,n):(n=62914560&e,n!==0?(_t=5,n):e&67108864?(_t=4,67108864):(e&134217728)!==0?(_t=3,134217728):(n=805306368&e,n!==0?(_t=2,n):(1073741824&e)!==0?(_t=1,1073741824):(_t=8,e))))))}function zc(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function Uc(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(B(358,e))}}function Co(e,n){var o=e.pendingLanes;if(o===0)return _t=0;var l=0,u=0,f=e.expiredLanes,m=e.suspendedLanes,v=e.pingedLanes;if(f!==0)l=f,u=_t=15;else if(f=o&134217727,f!==0){var S=f&~m;S!==0?(l=gi(S),u=_t):(v&=f,v!==0&&(l=gi(v),u=_t))}else f=o&~m,f!==0?(l=gi(f),u=_t):v!==0&&(l=gi(v),u=_t);if(l===0)return 0;if(l=31-Pr(l),l=o&((0>l?0:1<<l)<<1)-1,n!==0&&n!==l&&(n&m)===0){if(gi(n),u<=_t)return n;_t=u}if(n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=l;0<n;)o=31-Pr(n),u=1<<o,l|=e[o],n&=~u;return l}function su(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function x(e,n){switch(e){case 15:return 1;case 14:return 2;case 12:return e=Ur(24&~n),e===0?x(10,n):e;case 10:return e=Ur(192&~n),e===0?x(8,n):e;case 8:return e=Ur(3584&~n),e===0&&(e=Ur(4186112&~n),e===0&&(e=512)),e;case 2:return n=Ur(805306368&~n),n===0&&(n=268435456),n}throw Error(B(358,e))}function Ur(e){return e&-e}function Rl(e){for(var n=[],o=0;31>o;o++)n.push(e);return n}function ms(e,n,o){e.pendingLanes|=n;var l=n-1;e.suspendedLanes&=l,e.pingedLanes&=l,e=e.eventTimes,n=31-Pr(n),e[n]=o}var Pr=Math.clz32?Math.clz32:lu,Vt=Math.log,Gt=Math.LN2;function lu(e){return e===0?32:31-(Vt(e)/Gt|0)|0}var Zc=it.unstable_UserBlockingPriority,au=it.unstable_runWithPriority,gs=!0;function Wc(e,n,o,l){Kt||Zt();var u=Il,f=Kt;Kt=!0;try{Ke(u,e,n,o,l)}finally{(Kt=f)||pn()}}function kl(e,n,o,l){au(Zc,Il.bind(null,e,n,o,l))}function Il(e,n,o,l){if(gs){var u;if((u=(n&4)===0)&&0<An.length&&-1<Ya.indexOf(e))e=ds(null,e,n,o,l),An.push(e);else{var f=O(e,n,o,l);if(f===null)u&&Xa(e,l);else{if(u){if(-1<Ya.indexOf(e)){e=ds(f,e,n,o,l),An.push(e);return}if(Fc(f,e,n,o,l))return;Xa(e,l)}Jl(e,n,l,null,o)}}}}function O(e,n,o,l){var u=Pe(l);if(u=Vr(u),u!==null){var f=_n(u);if(f===null)u=null;else{var m=f.tag;if(m===13){if(u=Sn(f),u!==null)return u;u=null}else if(m===3){if(f.stateNode.hydrate)return f.tag===3?f.stateNode.containerInfo:null;u=null}else f!==u&&(u=null)}}return Jl(e,n,l,u,o),null}var D=null,Wn=null,ji=null;function Yt(){if(ji)return ji;var e,n=Wn,o=n.length,l,u="value"in D?D.value:D.textContent,f=u.length;for(e=0;e<o&&n[e]===u[e];e++);var m=o-e;for(l=1;l<=m&&n[o-l]===u[f-l];l++);return ji=u.slice(e,1<l?1-l:void 0)}function Mi(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function ys(){return!0}function bl(){return!1}function Fn(e){function n(o,l,u,f,m){this._reactName=o,this._targetInst=u,this.type=l,this.nativeEvent=f,this.target=m,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(o=e[v],this[v]=o?o(f):f[v]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?ys:bl,this.isPropagationStopped=bl,this}return De(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=ys)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=ys)},persist:function(){},isPersistent:ys}),n}var Bi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Po=Fn(Bi),zi=De({},Bi,{view:0,detail:0}),cn=Fn(zi),tr,Ro,yi,pr=De({},zi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kr,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==yi&&(yi&&e.type==="mousemove"?(tr=e.screenX-yi.screenX,Ro=e.screenY-yi.screenY):Ro=tr=0,yi=e),tr)},movementY:function(e){return"movementY"in e?e.movementY:Ro}}),uu=Fn(pr),Vc=De({},pr,{dataTransfer:0}),Hc=Fn(Vc),cu=De({},zi,{relatedTarget:0}),Ol=Fn(cu),$c=De({},Bi,{animationName:0,elapsedTime:0,pseudoElement:0}),du=Fn($c),Qc=De({},Bi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Kc=Fn(Qc),vs=De({},Bi,{data:0}),Nl=Fn(vs),ws={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Dl={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Rr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fu(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Rr[e])?!!n[e]:!1}function kr(){return fu}var Ui=De({},zi,{key:function(e){if(e.key){var n=ws[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Mi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Dl[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kr,charCode:function(e){return e.type==="keypress"?Mi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Mi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),pu=Fn(Ui),Al=De({},pr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fl=Fn(Al),hu=De({},zi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kr}),mu=Fn(hu),gu=De({},Bi,{propertyName:0,elapsedTime:0,pseudoElement:0}),yu=Fn(gu),Gc=De({},pr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Ll=Fn(Gc),vu=[9,13,27,32],jl=Y&&"CompositionEvent"in window,ko=null;Y&&"documentMode"in document&&(ko=document.documentMode);var wu=Y&&"TextEvent"in window&&!ko,Ln=Y&&(!jl||ko&&8<ko&&11>=ko),_u=" ",hr=!1;function nr(e,n){switch(e){case"keyup":return vu.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Su(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zi=!1;function Eu(e,n){switch(e){case"compositionend":return Su(n);case"keypress":return n.which!==32?null:(hr=!0,_u);case"textInput":return e=n.data,e===_u&&hr?null:e;default:return null}}function Tu(e,n){if(Zi)return e==="compositionend"||!jl&&nr(e,n)?(e=Yt(),ji=Wn=D=null,Zi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Ln&&n.locale!=="ko"?null:n.data;default:return null}}var xu={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ml(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!xu[e.type]:n==="textarea"}function Cu(e,n,o,l){xt(l),n=Cs(n,"onChange"),0<n.length&&(o=new Po("onChange","change",null,o,l),e.push({event:o,listeners:n}))}var vi=null,Wi=null;function Bl(e){Xl(e,0)}function Vi(e){var n=Yi(e);if(Ut(n))return e}function rn(e,n){if(e==="change")return n}var Rt=!1;if(Y){var _s;if(Y){var Ss="oninput"in document;if(!Ss){var zl=document.createElement("div");zl.setAttribute("oninput","return;"),Ss=typeof zl.oninput=="function"}_s=Ss}else _s=!1;Rt=_s&&(!document.documentMode||9<document.documentMode)}function Ul(){vi&&(vi.detachEvent("onpropertychange",Zl),Wi=vi=null)}function Zl(e){if(e.propertyName==="value"&&Vi(Wi)){var n=[];if(Cu(n,Wi,e,Pe(e)),e=Bl,Kt)e(n);else{Kt=!0;try{Je(e,n)}finally{Kt=!1,pn()}}}}function Pu(e,n,o){e==="focusin"?(Ul(),vi=n,Wi=o,vi.attachEvent("onpropertychange",Zl)):e==="focusout"&&Ul()}function Ru(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Vi(Wi)}function Wl(e,n){if(e==="click")return Vi(n)}function Vl(e,n){if(e==="input"||e==="change")return Vi(n)}function Yc(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Pn=typeof Object.is=="function"?Object.is:Yc,Io=Object.prototype.hasOwnProperty;function Zr(e,n){if(Pn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var o=Object.keys(e),l=Object.keys(n);if(o.length!==l.length)return!1;for(l=0;l<o.length;l++)if(!Io.call(n,o[l])||!Pn(e[o[l]],n[o[l]]))return!1;return!0}function ku(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Es(e,n){var o=ku(e);e=0;for(var l;o;){if(o.nodeType===3){if(l=e+o.textContent.length,e<=n&&l>=n)return{node:o,offset:n-e};e=l}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=ku(o)}}function bo(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?bo(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Iu(){for(var e=window,n=Se();n instanceof e.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href=="string"}catch{o=!1}if(o)e=n.contentWindow;else break;n=Se(e.document)}return n}function Oo(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var Hl=Y&&"documentMode"in document&&11>=document.documentMode,Hi=null,$l=null,No=null,Ql=!1;function bu(e,n,o){var l=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Ql||Hi==null||Hi!==Se(l)||(l=Hi,"selectionStart"in l&&Oo(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),No&&Zr(No,l)||(No=l,l=Cs($l,"onSelect"),0<l.length&&(n=new Po("onSelect","select",null,n,o),e.push({event:n,listeners:l}),n.target=Hi)))}Pl("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Pl("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Pl(Mc,2);for(var Kl="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Ts=0;Ts<Kl.length;Ts++)Cl.set(Kl[Ts],0);b("onMouseEnter",["mouseout","mouseover"]),b("onMouseLeave",["mouseout","mouseover"]),b("onPointerEnter",["pointerout","pointerover"]),b("onPointerLeave",["pointerout","pointerover"]),Tt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Tt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Tt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Tt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Tt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Tt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Gl=new Set("cancel close invalid load scroll toggle".split(" ").concat(wi));function Yl(e,n,o){var l=e.type||"unknown-event";e.currentTarget=o,Tr(l,n,void 0,e),e.currentTarget=null}function Xl(e,n){n=(n&4)!==0;for(var o=0;o<e.length;o++){var l=e[o],u=l.event;l=l.listeners;e:{var f=void 0;if(n)for(var m=l.length-1;0<=m;m--){var v=l[m],S=v.instance,I=v.currentTarget;if(v=v.listener,S!==f&&u.isPropagationStopped())break e;Yl(u,v,I),f=S}else for(m=0;m<l.length;m++){if(v=l[m],S=v.instance,I=v.currentTarget,v=v.listener,S!==f&&u.isPropagationStopped())break e;Yl(u,v,I),f=S}}}if(Jn)throw e=ur,Jn=!1,ur=null,e}function St(e,n){var o=Fu(n),l=e+"__bubble";o.has(l)||(Ou(n,e,2,!1),o.add(l))}var ql="_reactListening"+Math.random().toString(36).slice(2);function $i(e){e[ql]||(e[ql]=!0,wn.forEach(function(n){Gl.has(n)||xs(n,!1,e,null),xs(n,!0,e,null)}))}function xs(e,n,o,l){var u=4<arguments.length&&arguments[4]!==void 0?arguments[4]:0,f=o;if(e==="selectionchange"&&o.nodeType!==9&&(f=o.ownerDocument),l!==null&&!n&&Gl.has(e)){if(e!=="scroll")return;u|=2,f=l}var m=Fu(f),v=e+"__"+(n?"capture":"bubble");m.has(v)||(n&&(u|=4),Ou(f,e,u,n),m.add(v))}function Ou(e,n,o,l){var u=Cl.get(n);switch(u===void 0?2:u){case 0:u=Wc;break;case 1:u=kl;break;default:u=Il}o=u.bind(null,n,o,e),u=void 0,!ct||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(u=!0),l?u!==void 0?e.addEventListener(n,o,{capture:!0,passive:u}):e.addEventListener(n,o,!0):u!==void 0?e.addEventListener(n,o,{passive:u}):e.addEventListener(n,o,!1)}function Jl(e,n,o,l,u){var f=l;if((n&1)===0&&(n&2)===0&&l!==null)e:for(;;){if(l===null)return;var m=l.tag;if(m===3||m===4){var v=l.stateNode.containerInfo;if(v===u||v.nodeType===8&&v.parentNode===u)break;if(m===4)for(m=l.return;m!==null;){var S=m.tag;if((S===3||S===4)&&(S=m.stateNode.containerInfo,S===u||S.nodeType===8&&S.parentNode===u))return;m=m.return}for(;v!==null;){if(m=Vr(v),m===null)return;if(S=m.tag,S===5||S===6){l=f=m;continue e}v=v.parentNode}}l=l.return}Wt(function(){var I=f,J=Pe(o),ke=[];e:{var W=ou.get(e);if(W!==void 0){var de=Po,Ce=e;switch(e){case"keypress":if(Mi(o)===0)break e;case"keydown":case"keyup":de=pu;break;case"focusin":Ce="focus",de=Ol;break;case"focusout":Ce="blur",de=Ol;break;case"beforeblur":case"afterblur":de=Ol;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":de=uu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":de=Hc;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":de=mu;break;case tu:case nu:case ru:de=du;break;case iu:de=yu;break;case"scroll":de=cn;break;case"wheel":de=Ll;break;case"copy":case"cut":case"paste":de=Kc;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":de=Fl}var we=(n&4)!==0,k=!we&&e==="scroll",T=we?W!==null?W+"Capture":null:W;we=[];for(var P=I,j;P!==null;){j=P;var z=j.stateNode;if(j.tag===5&&z!==null&&(j=z,T!==null&&(z=ut(P,T),z!=null&&we.push(Qi(P,z,j)))),k)break;P=P.return}0<we.length&&(W=new de(W,Ce,null,o,J),ke.push({event:W,listeners:we}))}}if((n&7)===0){e:{if(W=e==="mouseover"||e==="pointerover",de=e==="mouseout"||e==="pointerout",W&&(n&16)===0&&(Ce=o.relatedTarget||o.fromElement)&&(Vr(Ce)||Ce[Wr]))break e;if((de||W)&&(W=J.window===J?J:(W=J.ownerDocument)?W.defaultView||W.parentWindow:window,de?(Ce=o.relatedTarget||o.toElement,de=I,Ce=Ce?Vr(Ce):null,Ce!==null&&(k=_n(Ce),Ce!==k||Ce.tag!==5&&Ce.tag!==6)&&(Ce=null)):(de=null,Ce=I),de!==Ce)){if(we=uu,z="onMouseLeave",T="onMouseEnter",P="mouse",(e==="pointerout"||e==="pointerover")&&(we=Fl,z="onPointerLeave",T="onPointerEnter",P="pointer"),k=de==null?W:Yi(de),j=Ce==null?W:Yi(Ce),W=new we(z,P+"leave",de,o,J),W.target=k,W.relatedTarget=j,z=null,Vr(J)===I&&(we=new we(T,P+"enter",Ce,o,J),we.target=j,we.relatedTarget=k,z=we),k=z,de&&Ce)t:{for(we=de,T=Ce,P=0,j=we;j;j=Ki(j))P++;for(j=0,z=T;z;z=Ki(z))j++;for(;0<P-j;)we=Ki(we),P--;for(;0<j-P;)T=Ki(T),j--;for(;P--;){if(we===T||T!==null&&we===T.alternate)break t;we=Ki(we),T=Ki(T)}we=null}else we=null;de!==null&&ea(ke,W,de,we,!1),Ce!==null&&k!==null&&ea(ke,k,Ce,we,!0)}}e:{if(W=I?Yi(I):window,de=W.nodeName&&W.nodeName.toLowerCase(),de==="select"||de==="input"&&W.type==="file")var Ie=rn;else if(Ml(W))if(Rt)Ie=Vl;else{Ie=Ru;var oe=Pu}else(de=W.nodeName)&&de.toLowerCase()==="input"&&(W.type==="checkbox"||W.type==="radio")&&(Ie=Wl);if(Ie&&(Ie=Ie(e,I))){Cu(ke,Ie,o,J);break e}oe&&oe(e,W,I),e==="focusout"&&(oe=W._wrapperState)&&oe.controlled&&W.type==="number"&&Zn(W,"number",W.value)}switch(oe=I?Yi(I):window,e){case"focusin":(Ml(oe)||oe.contentEditable==="true")&&(Hi=oe,$l=I,No=null);break;case"focusout":No=$l=Hi=null;break;case"mousedown":Ql=!0;break;case"contextmenu":case"mouseup":case"dragend":Ql=!1,bu(ke,o,J);break;case"selectionchange":if(Hl)break;case"keydown":case"keyup":bu(ke,o,J)}var be;if(jl)e:{switch(e){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else Zi?nr(e,o)&&(Ue="onCompositionEnd"):e==="keydown"&&o.keyCode===229&&(Ue="onCompositionStart");Ue&&(Ln&&o.locale!=="ko"&&(Zi||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&Zi&&(be=Yt()):(D=J,Wn="value"in D?D.value:D.textContent,Zi=!0)),oe=Cs(I,Ue),0<oe.length&&(Ue=new Nl(Ue,e,null,o,J),ke.push({event:Ue,listeners:oe}),be?Ue.data=be:(be=Su(o),be!==null&&(Ue.data=be)))),(be=wu?Eu(e,o):Tu(e,o))&&(I=Cs(I,"onBeforeInput"),0<I.length&&(J=new Nl("onBeforeInput","beforeinput",null,o,J),ke.push({event:J,listeners:I}),J.data=be))}Xl(ke,n)})}function Qi(e,n,o){return{instance:e,listener:n,currentTarget:o}}function Cs(e,n){for(var o=n+"Capture",l=[];e!==null;){var u=e,f=u.stateNode;u.tag===5&&f!==null&&(u=f,f=ut(e,o),f!=null&&l.unshift(Qi(e,f,u)),f=ut(e,n),f!=null&&l.push(Qi(e,f,u))),e=e.return}return l}function Ki(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ea(e,n,o,l,u){for(var f=n._reactName,m=[];o!==null&&o!==l;){var v=o,S=v.alternate,I=v.stateNode;if(S!==null&&S===l)break;v.tag===5&&I!==null&&(v=I,u?(S=ut(o,f),S!=null&&m.unshift(Qi(o,S,v))):u||(S=ut(o,f),S!=null&&m.push(Qi(o,S,v)))),o=o.return}m.length!==0&&e.push({event:n,listeners:m})}function Ps(){}var Rs=null,ta=null;function Nu(e,n){switch(e){case"button":case"input":case"select":case"textarea":return!!n.autoFocus}return!1}function na(e,n){return e==="textarea"||e==="option"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Du=typeof setTimeout=="function"?setTimeout:void 0,Xt=typeof clearTimeout=="function"?clearTimeout:void 0;function qt(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function Gi(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break}return e}function ks(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var o=e.data;if(o==="$"||o==="$!"||o==="$?"){if(n===0)return e;n--}else o==="/$"&&n++}e=e.previousSibling}return null}var ra=0;function Xc(e){return{$$typeof:L,toString:e,valueOf:e}}var Do=Math.random().toString(36).slice(2),Ir="__reactFiber$"+Do,Is="__reactProps$"+Do,Wr="__reactContainer$"+Do,Au="__reactEvents$"+Do;function Vr(e){var n=e[Ir];if(n)return n;for(var o=e.parentNode;o;){if(n=o[Wr]||o[Ir]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(e=ks(e);e!==null;){if(o=e[Ir])return o;e=ks(e)}return n}e=o,o=e.parentNode}return null}function Ao(e){return e=e[Ir]||e[Wr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Yi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(B(33))}function Xi(e){return e[Is]||null}function Fu(e){var n=e[Au];return n===void 0&&(n=e[Au]=new Set),n}var At=[],Ct=-1;function Hr(e){return{current:e}}function gt(e){0>Ct||(e.current=At[Ct],At[Ct]=null,Ct--)}function Ft(e,n){Ct++,At[Ct]=e.current,e.current=n}var $r={},on=Hr($r),Rn=Hr(!1),br=$r;function qi(e,n){var o=e.type.contextTypes;if(!o)return $r;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===n)return l.__reactInternalMemoizedMaskedChildContext;var u={},f;for(f in o)u[f]=n[f];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=u),u}function kn(e){return e=e.childContextTypes,e!=null}function Fo(){gt(Rn),gt(on)}function ia(e,n,o){if(on.current!==$r)throw Error(B(168));Ft(on,n),Ft(Rn,o)}function Lu(e,n,o){var l=e.stateNode;if(e=n.childContextTypes,typeof l.getChildContext!="function")return o;l=l.getChildContext();for(var u in l)if(!(u in e))throw Error(B(108,Sr(n)||"Unknown",u));return De({},o,l)}function Ji(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||$r,br=on.current,Ft(on,e),Ft(Rn,Rn.current),!0}function ju(e,n,o){var l=e.stateNode;if(!l)throw Error(B(169));o?(e=Lu(e,n,br),l.__reactInternalMemoizedMergedChildContext=e,gt(Rn),gt(on),Ft(on,e)):gt(Rn),Ft(Rn,o)}var oa=null,mr=null,Mu=it.unstable_runWithPriority,sa=it.unstable_scheduleCallback,Lo=it.unstable_cancelCallback,qc=it.unstable_shouldYield,Bu=it.unstable_requestPaint,la=it.unstable_now,Jc=it.unstable_getCurrentPriorityLevel,bs=it.unstable_ImmediatePriority,Os=it.unstable_UserBlockingPriority,zu=it.unstable_NormalPriority,Uu=it.unstable_LowPriority,aa=it.unstable_IdlePriority,Ns={},ed=Bu!==void 0?Bu:function(){},rr=null,jo=null,ua=!1,Zu=la(),yt=1e4>Zu?la:function(){return la()-Zu};function dn(){switch(Jc()){case bs:return 99;case Os:return 98;case zu:return 97;case Uu:return 96;case aa:return 95;default:throw Error(B(332))}}function Wu(e){switch(e){case 99:return bs;case 98:return Os;case 97:return zu;case 96:return Uu;case 95:return aa;default:throw Error(B(332))}}function Or(e,n){return e=Wu(e),Mu(e,n)}function Mo(e,n,o){return e=Wu(e),sa(e,n,o)}function gr(){if(jo!==null){var e=jo;jo=null,Lo(e)}Vu()}function Vu(){if(!ua&&rr!==null){ua=!0;var e=0;try{var n=rr;Or(99,function(){for(;e<n.length;e++){var o=n[e];do o=o(!0);while(o!==null)}}),rr=null}catch(o){throw rr!==null&&(rr=rr.slice(e+1)),sa(bs,gr),o}finally{ua=!1}}}var Hu=$e.ReactCurrentBatchConfig;function jn(e,n){if(e&&e.defaultProps){n=De({},n),e=e.defaultProps;for(var o in e)n[o]===void 0&&(n[o]=e[o]);return n}return n}var Ds=Hr(null),As=null,eo=null,Bo=null;function ca(){Bo=eo=As=null}function da(e){var n=Ds.current;gt(Ds),e.type._context._currentValue=n}function Fs(e,n){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)===n){if(o===null||(o.childLanes&n)===n)break;o.childLanes|=n}else e.childLanes|=n,o!==null&&(o.childLanes|=n);e=e.return}}function to(e,n){As=e,Bo=eo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(vt=!0),e.firstContext=null)}function Vn(e,n){if(Bo!==e&&n!==!1&&n!==0)if((typeof n!="number"||n===1073741823)&&(Bo=e,n=1073741823),n={context:e,observedBits:n,next:null},eo===null){if(As===null)throw Error(B(308));eo=n,As.dependencies={lanes:0,firstContext:n,responders:null}}else eo=eo.next=n;return e._currentValue}var Re=!1;function lt(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function $u(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function mn(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function yr(e,n){if(e=e.updateQueue,e!==null){e=e.shared;var o=e.pending;o===null?n.next=n:(n.next=o.next,o.next=n),e.pending=n}}function Qu(e,n){var o=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,o===l)){var u=null,f=null;if(o=o.firstBaseUpdate,o!==null){do{var m={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};f===null?u=f=m:f=f.next=m,o=o.next}while(o!==null);f===null?u=f=n:f=f.next=n}else u=f=n;o={baseState:l.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:l.shared,effects:l.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=n:e.next=n,o.lastBaseUpdate=n}function _i(e,n,o,l){var u=e.updateQueue;Re=!1;var f=u.firstBaseUpdate,m=u.lastBaseUpdate,v=u.shared.pending;if(v!==null){u.shared.pending=null;var S=v,I=S.next;S.next=null,m===null?f=I:m.next=I,m=S;var J=e.alternate;if(J!==null){J=J.updateQueue;var ke=J.lastBaseUpdate;ke!==m&&(ke===null?J.firstBaseUpdate=I:ke.next=I,J.lastBaseUpdate=S)}}if(f!==null){ke=u.baseState,m=0,J=I=S=null;do{v=f.lane;var W=f.eventTime;if((l&v)===v){J!==null&&(J=J.next={eventTime:W,lane:0,tag:f.tag,payload:f.payload,callback:f.callback,next:null});e:{var de=e,Ce=f;switch(v=n,W=o,Ce.tag){case 1:if(de=Ce.payload,typeof de=="function"){ke=de.call(W,ke,v);break e}ke=de;break e;case 3:de.flags=de.flags&-4097|64;case 0:if(de=Ce.payload,v=typeof de=="function"?de.call(W,ke,v):de,v==null)break e;ke=De({},ke,v);break e;case 2:Re=!0}}f.callback!==null&&(e.flags|=32,v=u.effects,v===null?u.effects=[f]:v.push(f))}else W={eventTime:W,lane:v,tag:f.tag,payload:f.payload,callback:f.callback,next:null},J===null?(I=J=W,S=ke):J=J.next=W,m|=v;if(f=f.next,f===null){if(v=u.shared.pending,v===null)break;f=v.next,v.next=null,u.lastBaseUpdate=v,u.shared.pending=null}}while(!0);J===null&&(S=ke),u.baseState=S,u.firstBaseUpdate=I,u.lastBaseUpdate=J,Jr|=m,e.lanes=m,e.memoizedState=ke}}function Ku(e,n,o){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var l=e[n],u=l.callback;if(u!==null){if(l.callback=null,l=o,typeof u!="function")throw Error(B(191,u));u.call(l)}}}var Gu=new Ot.Component().refs;function Ls(e,n,o,l){n=e.memoizedState,o=o(l,n),o=o==null?n:De({},n,o),e.memoizedState=o,e.lanes===0&&(e.updateQueue.baseState=o)}var js={isMounted:function(e){return(e=e._reactInternals)?_n(e)===e:!1},enqueueSetState:function(e,n,o){e=e._reactInternals;var l=On(),u=Ar(e),f=mn(l,u);f.payload=n,o!=null&&(f.callback=o),yr(e,f),lr(e,u,l)},enqueueReplaceState:function(e,n,o){e=e._reactInternals;var l=On(),u=Ar(e),f=mn(l,u);f.tag=1,f.payload=n,o!=null&&(f.callback=o),yr(e,f),lr(e,u,l)},enqueueForceUpdate:function(e,n){e=e._reactInternals;var o=On(),l=Ar(e),u=mn(o,l);u.tag=2,n!=null&&(u.callback=n),yr(e,u),lr(e,l,o)}};function Yu(e,n,o,l,u,f,m){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,f,m):n.prototype&&n.prototype.isPureReactComponent?!Zr(o,l)||!Zr(u,f):!0}function Ms(e,n,o){var l=!1,u=$r,f=n.contextType;return typeof f=="object"&&f!==null?f=Vn(f):(u=kn(n)?br:on.current,l=n.contextTypes,f=(l=l!=null)?qi(e,u):$r),n=new n(o,f),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=js,e.stateNode=n,n._reactInternals=e,l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=u,e.__reactInternalMemoizedMaskedChildContext=f),n}function Xu(e,n,o,l){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(o,l),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(o,l),n.state!==e&&js.enqueueReplaceState(n,n.state,null)}function Bs(e,n,o,l){var u=e.stateNode;u.props=o,u.state=e.memoizedState,u.refs=Gu,lt(e);var f=n.contextType;typeof f=="object"&&f!==null?u.context=Vn(f):(f=kn(n)?br:on.current,u.context=qi(e,f)),_i(e,o,u,l),u.state=e.memoizedState,f=n.getDerivedStateFromProps,typeof f=="function"&&(Ls(e,n,f,o),u.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(n=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),n!==u.state&&js.enqueueReplaceState(u,u.state,null),_i(e,o,u,l),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4)}var zs=Array.isArray;function zo(e,n,o){if(e=o.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(o._owner){if(o=o._owner,o){if(o.tag!==1)throw Error(B(309));var l=o.stateNode}if(!l)throw Error(B(147,e));var u=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===u?n.ref:(n=function(f){var m=l.refs;m===Gu&&(m=l.refs={}),f===null?delete m[u]:m[u]=f},n._stringRef=u,n)}if(typeof e!="string")throw Error(B(284));if(!o._owner)throw Error(B(290,e))}return e}function no(e,n){if(e.type!=="textarea")throw Error(B(31,Object.prototype.toString.call(n)==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":n))}function Uo(e){function n(k,T){if(e){var P=k.lastEffect;P!==null?(P.nextEffect=T,k.lastEffect=T):k.firstEffect=k.lastEffect=T,T.nextEffect=null,T.flags=8}}function o(k,T){if(!e)return null;for(;T!==null;)n(k,T),T=T.sibling;return null}function l(k,T){for(k=new Map;T!==null;)T.key!==null?k.set(T.key,T):k.set(T.index,T),T=T.sibling;return k}function u(k,T){return k=li(k,T),k.index=0,k.sibling=null,k}function f(k,T,P){return k.index=P,e?(P=k.alternate,P!==null?(P=P.index,P<T?(k.flags=2,T):P):(k.flags=2,T)):T}function m(k){return e&&k.alternate===null&&(k.flags=2),k}function v(k,T,P,j){return T===null||T.tag!==6?(T=gl(P,k.mode,j),T.return=k,T):(T=u(T,P),T.return=k,T)}function S(k,T,P,j){return T!==null&&T.elementType===P.type?(j=u(T,P.props),j.ref=zo(k,T,P),j.return=k,j):(j=wo(P.type,P.key,P.props,null,k.mode,j),j.ref=zo(k,T,P),j.return=k,j)}function I(k,T,P,j){return T===null||T.tag!==4||T.stateNode.containerInfo!==P.containerInfo||T.stateNode.implementation!==P.implementation?(T=is(P,k.mode,j),T.return=k,T):(T=u(T,P.children||[]),T.return=k,T)}function J(k,T,P,j,z){return T===null||T.tag!==7?(T=ai(P,k.mode,j,z),T.return=k,T):(T=u(T,P),T.return=k,T)}function ke(k,T,P){if(typeof T=="string"||typeof T=="number")return T=gl(""+T,k.mode,P),T.return=k,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case st:return P=wo(T.type,T.key,T.props,null,k.mode,P),P.ref=zo(k,null,T),P.return=k,P;case Z:return T=is(T,k.mode,P),T.return=k,T}if(zs(T)||ye(T))return T=ai(T,k.mode,P,null),T.return=k,T;no(k,T)}return null}function W(k,T,P,j){var z=T!==null?T.key:null;if(typeof P=="string"||typeof P=="number")return z!==null?null:v(k,T,""+P,j);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case st:return P.key===z?P.type===Ze?J(k,T,P.props.children,j,z):S(k,T,P,j):null;case Z:return P.key===z?I(k,T,P,j):null}if(zs(P)||ye(P))return z!==null?null:J(k,T,P,j,null);no(k,P)}return null}function de(k,T,P,j,z){if(typeof j=="string"||typeof j=="number")return k=k.get(P)||null,v(T,k,""+j,z);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case st:return k=k.get(j.key===null?P:j.key)||null,j.type===Ze?J(T,k,j.props.children,z,j.key):S(T,k,j,z);case Z:return k=k.get(j.key===null?P:j.key)||null,I(T,k,j,z)}if(zs(j)||ye(j))return k=k.get(P)||null,J(T,k,j,z,null);no(T,j)}return null}function Ce(k,T,P,j){for(var z=null,Ie=null,oe=T,be=T=0,Ue=null;oe!==null&&be<P.length;be++){oe.index>be?(Ue=oe,oe=null):Ue=oe.sibling;var Le=W(k,oe,P[be],j);if(Le===null){oe===null&&(oe=Ue);break}e&&oe&&Le.alternate===null&&n(k,oe),T=f(Le,T,be),Ie===null?z=Le:Ie.sibling=Le,Ie=Le,oe=Ue}if(be===P.length)return o(k,oe),z;if(oe===null){for(;be<P.length;be++)oe=ke(k,P[be],j),oe!==null&&(T=f(oe,T,be),Ie===null?z=oe:Ie.sibling=oe,Ie=oe);return z}for(oe=l(k,oe);be<P.length;be++)Ue=de(oe,k,be,P[be],j),Ue!==null&&(e&&Ue.alternate!==null&&oe.delete(Ue.key===null?be:Ue.key),T=f(Ue,T,be),Ie===null?z=Ue:Ie.sibling=Ue,Ie=Ue);return e&&oe.forEach(function(ar){return n(k,ar)}),z}function we(k,T,P,j){var z=ye(P);if(typeof z!="function")throw Error(B(150));if(P=z.call(P),P==null)throw Error(B(151));for(var Ie=z=null,oe=T,be=T=0,Ue=null,Le=P.next();oe!==null&&!Le.done;be++,Le=P.next()){oe.index>be?(Ue=oe,oe=null):Ue=oe.sibling;var ar=W(k,oe,Le.value,j);if(ar===null){oe===null&&(oe=Ue);break}e&&oe&&ar.alternate===null&&n(k,oe),T=f(ar,T,be),Ie===null?z=ar:Ie.sibling=ar,Ie=ar,oe=Ue}if(Le.done)return o(k,oe),z;if(oe===null){for(;!Le.done;be++,Le=P.next())Le=ke(k,Le.value,j),Le!==null&&(T=f(Le,T,be),Ie===null?z=Le:Ie.sibling=Le,Ie=Le);return z}for(oe=l(k,oe);!Le.done;be++,Le=P.next())Le=de(oe,k,be,Le.value,j),Le!==null&&(e&&Le.alternate!==null&&oe.delete(Le.key===null?be:Le.key),T=f(Le,T,be),Ie===null?z=Le:Ie.sibling=Le,Ie=Le);return e&&oe.forEach(function(id){return n(k,id)}),z}return function(k,T,P,j){var z=typeof P=="object"&&P!==null&&P.type===Ze&&P.key===null;z&&(P=P.props.children);var Ie=typeof P=="object"&&P!==null;if(Ie)switch(P.$$typeof){case st:e:{for(Ie=P.key,z=T;z!==null;){if(z.key===Ie){switch(z.tag){case 7:if(P.type===Ze){o(k,z.sibling),T=u(z,P.props.children),T.return=k,k=T;break e}break;default:if(z.elementType===P.type){o(k,z.sibling),T=u(z,P.props),T.ref=zo(k,z,P),T.return=k,k=T;break e}}o(k,z);break}else n(k,z);z=z.sibling}P.type===Ze?(T=ai(P.props.children,k.mode,j,P.key),T.return=k,k=T):(j=wo(P.type,P.key,P.props,null,k.mode,j),j.ref=zo(k,T,P),j.return=k,k=j)}return m(k);case Z:e:{for(z=P.key;T!==null;){if(T.key===z)if(T.tag===4&&T.stateNode.containerInfo===P.containerInfo&&T.stateNode.implementation===P.implementation){o(k,T.sibling),T=u(T,P.children||[]),T.return=k,k=T;break e}else{o(k,T);break}else n(k,T);T=T.sibling}T=is(P,k.mode,j),T.return=k,k=T}return m(k)}if(typeof P=="string"||typeof P=="number")return P=""+P,T!==null&&T.tag===6?(o(k,T.sibling),T=u(T,P),T.return=k,k=T):(o(k,T),T=gl(P,k.mode,j),T.return=k,k=T),m(k);if(zs(P))return Ce(k,T,P,j);if(ye(P))return we(k,T,P,j);if(Ie&&no(k,P),typeof P>"u"&&!z)switch(k.tag){case 1:case 22:case 0:case 11:case 15:throw Error(B(152,Sr(k.type)||"Component"))}return o(k,T)}}var Qr=Uo(!0),ro=Uo(!1),Zo={},Hn=Hr(Zo),Wo=Hr(Zo),Vo=Hr(Zo);function $n(e){if(e===Zo)throw Error(B(174));return e}function Kr(e,n){switch(Ft(Vo,n),Ft(Wo,e),Ft(Hn,Zo),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:F(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=F(n,e)}gt(Hn),Ft(Hn,n)}function io(){gt(Hn),gt(Wo),gt(Vo)}function Us(e){$n(Vo.current);var n=$n(Hn.current),o=F(n,e.type);n!==o&&(Ft(Wo,e),Ft(Hn,o))}function fa(e){Wo.current===e&&(gt(Hn),gt(Wo))}var Lt=Hr(0);function Gr(e){for(var n=e;n!==null;){if(n.tag===13){var o=n.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&64)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Mn=null,Yr=null,Qn=!1;function qu(e,n){var o=zn(5,null,null,0);o.elementType="DELETED",o.type="DELETED",o.stateNode=n,o.return=e,o.flags=8,e.lastEffect!==null?(e.lastEffect.nextEffect=o,e.lastEffect=o):e.firstEffect=e.lastEffect=o}function Ju(e,n){switch(e.tag){case 5:var o=e.type;return n=n.nodeType!==1||o.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,!0):!1;case 13:return!1;default:return!1}}function kt(e){if(Qn){var n=Yr;if(n){var o=n;if(!Ju(e,n)){if(n=Gi(o.nextSibling),!n||!Ju(e,n)){e.flags=e.flags&-1025|2,Qn=!1,Mn=e;return}qu(Mn,o)}Mn=e,Yr=Gi(n.firstChild)}else e.flags=e.flags&-1025|2,Qn=!1,Mn=e}}function It(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Mn=e}function Zs(e){if(e!==Mn)return!1;if(!Qn)return It(e),Qn=!0,!1;var n=e.type;if(e.tag!==5||n!=="head"&&n!=="body"&&!na(n,e.memoizedProps))for(n=Yr;n;)qu(e,n),n=Gi(n.nextSibling);if(It(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(B(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var o=e.data;if(o==="/$"){if(n===0){Yr=Gi(e.nextSibling);break e}n--}else o!=="$"&&o!=="$!"&&o!=="$?"||n++}e=e.nextSibling}Yr=null}}else Yr=Mn?Gi(e.stateNode.nextSibling):null;return!0}function Ho(){Yr=Mn=null,Qn=!1}var oo=[];function Ws(){for(var e=0;e<oo.length;e++)oo[e]._workInProgressVersionPrimary=null;oo.length=0}var $o=$e.ReactCurrentDispatcher,Kn=$e.ReactCurrentBatchConfig,Si=0,zt=null,Te=null,dt=null,so=!1,ft=!1;function In(){throw Error(B(321))}function pa(e,n){if(n===null)return!1;for(var o=0;o<n.length&&o<e.length;o++)if(!Pn(e[o],n[o]))return!1;return!0}function ec(e,n,o,l,u,f){if(Si=f,zt=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,$o.current=e===null||e.memoizedState===null?rc:Sa,e=o(l,u),ft){f=0;do{if(ft=!1,!(25>f))throw Error(B(301));f+=1,dt=Te=null,n.updateQueue=null,$o.current=Ea,e=o(l,u)}while(ft)}if($o.current=or,n=Te!==null&&Te.next!==null,Si=0,dt=Te=zt=null,so=!1,n)throw Error(B(300));return e}function Ei(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dt===null?zt.memoizedState=dt=e:dt=dt.next=e,dt}function se(){if(Te===null){var e=zt.alternate;e=e!==null?e.memoizedState:null}else e=Te.next;var n=dt===null?zt.memoizedState:dt.next;if(n!==null)dt=n,Te=e;else{if(e===null)throw Error(B(310));Te=e,e={memoizedState:Te.memoizedState,baseState:Te.baseState,baseQueue:Te.baseQueue,queue:Te.queue,next:null},dt===null?zt.memoizedState=dt=e:dt=dt.next=e}return dt}function ir(e,n){return typeof n=="function"?n(e):n}function lo(e){var n=se(),o=n.queue;if(o===null)throw Error(B(311));o.lastRenderedReducer=e;var l=Te,u=l.baseQueue,f=o.pending;if(f!==null){if(u!==null){var m=u.next;u.next=f.next,f.next=m}l.baseQueue=u=f,o.pending=null}if(u!==null){u=u.next,l=l.baseState;var v=m=f=null,S=u;do{var I=S.lane;if((Si&I)===I)v!==null&&(v=v.next={lane:0,action:S.action,eagerReducer:S.eagerReducer,eagerState:S.eagerState,next:null}),l=S.eagerReducer===e?S.eagerState:e(l,S.action);else{var J={lane:I,action:S.action,eagerReducer:S.eagerReducer,eagerState:S.eagerState,next:null};v===null?(m=v=J,f=l):v=v.next=J,zt.lanes|=I,Jr|=I}S=S.next}while(S!==null&&S!==u);v===null?f=l:v.next=m,Pn(l,n.memoizedState)||(vt=!0),n.memoizedState=l,n.baseState=f,n.baseQueue=v,o.lastRenderedState=l}return[n.memoizedState,o.dispatch]}function ao(e){var n=se(),o=n.queue;if(o===null)throw Error(B(311));o.lastRenderedReducer=e;var l=o.dispatch,u=o.pending,f=n.memoizedState;if(u!==null){o.pending=null;var m=u=u.next;do f=e(f,m.action),m=m.next;while(m!==u);Pn(f,n.memoizedState)||(vt=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),o.lastRenderedState=f}return[f,l]}function Qo(e,n,o){var l=n._getVersion;l=l(n._source);var u=n._workInProgressVersionPrimary;if(u!==null?e=u===l:(e=e.mutableReadLanes,(e=(Si&e)===e)&&(n._workInProgressVersionPrimary=l,oo.push(n))),e)return o(n._source);throw oo.push(n),Error(B(350))}function Vs(e,n,o,l){var u=Tn;if(u===null)throw Error(B(349));var f=n._getVersion,m=f(n._source),v=$o.current,S=v.useState(function(){return Qo(u,n,o)}),I=S[1],J=S[0];S=dt;var ke=e.memoizedState,W=ke.refs,de=W.getSnapshot,Ce=ke.source;ke=ke.subscribe;var we=zt;return e.memoizedState={refs:W,source:n,subscribe:l},v.useEffect(function(){W.getSnapshot=o,W.setSnapshot=I;var k=f(n._source);if(!Pn(m,k)){k=o(n._source),Pn(J,k)||(I(k),k=Ar(we),u.mutableReadLanes|=k&u.pendingLanes),k=u.mutableReadLanes,u.entangledLanes|=k;for(var T=u.entanglements,P=k;0<P;){var j=31-Pr(P),z=1<<j;T[j]|=k,P&=~z}}},[o,n,l]),v.useEffect(function(){return l(n._source,function(){var k=W.getSnapshot,T=W.setSnapshot;try{T(k(n._source));var P=Ar(we);u.mutableReadLanes|=P&u.pendingLanes}catch(j){T(function(){throw j})}})},[n,l]),Pn(de,o)&&Pn(Ce,n)&&Pn(ke,l)||(e={pending:null,dispatch:null,lastRenderedReducer:ir,lastRenderedState:J},e.dispatch=I=fn.bind(null,zt,e),S.queue=e,S.baseQueue=null,J=Qo(u,n,o),S.memoizedState=S.baseState=J),J}function ha(e,n,o){var l=se();return Vs(l,e,n,o)}function Ko(e){var n=Ei();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e=n.queue={pending:null,dispatch:null,lastRenderedReducer:ir,lastRenderedState:e},e=e.dispatch=fn.bind(null,zt,e),[n.memoizedState,e]}function Xr(e,n,o,l){return e={tag:e,create:n,destroy:o,deps:l,next:null},n=zt.updateQueue,n===null?(n={lastEffect:null},zt.updateQueue=n,n.lastEffect=e.next=e):(o=n.lastEffect,o===null?n.lastEffect=e.next=e:(l=o.next,o.next=e,e.next=l,n.lastEffect=e)),e}function uo(e){var n=Ei();return e={current:e},n.memoizedState=e}function Hs(){return se().memoizedState}function $s(e,n,o,l){var u=Ei();zt.flags|=e,u.memoizedState=Xr(1|n,o,void 0,l===void 0?null:l)}function ma(e,n,o,l){var u=se();l=l===void 0?null:l;var f=void 0;if(Te!==null){var m=Te.memoizedState;if(f=m.destroy,l!==null&&pa(l,m.deps)){Xr(n,o,f,l);return}}zt.flags|=e,u.memoizedState=Xr(1|n,o,f,l)}function tc(e,n){return $s(516,4,e,n)}function Go(e,n){return ma(516,4,e,n)}function ga(e,n){return ma(4,2,e,n)}function ya(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function nc(e,n,o){return o=o!=null?o.concat([e]):null,ma(4,2,ya.bind(null,n,e),o)}function va(){}function wa(e,n){var o=se();n=n===void 0?null:n;var l=o.memoizedState;return l!==null&&n!==null&&pa(n,l[1])?l[0]:(o.memoizedState=[e,n],e)}function _a(e,n){var o=se();n=n===void 0?null:n;var l=o.memoizedState;return l!==null&&n!==null&&pa(n,l[1])?l[0]:(e=e(),o.memoizedState=[e,n],e)}function td(e,n){var o=dn();Or(98>o?98:o,function(){e(!0)}),Or(97<o?97:o,function(){var l=Kn.transition;Kn.transition=1;try{e(!1),n()}finally{Kn.transition=l}})}function fn(e,n,o){var l=On(),u=Ar(e),f={lane:u,action:o,eagerReducer:null,eagerState:null,next:null},m=n.pending;if(m===null?f.next=f:(f.next=m.next,m.next=f),n.pending=f,m=e.alternate,e===zt||m!==null&&m===zt)ft=so=!0;else{if(e.lanes===0&&(m===null||m.lanes===0)&&(m=n.lastRenderedReducer,m!==null))try{var v=n.lastRenderedState,S=m(v,o);if(f.eagerReducer=m,f.eagerState=S,Pn(S,v))return}catch{}lr(e,u,l)}}var or={readContext:Vn,useCallback:In,useContext:In,useEffect:In,useImperativeHandle:In,useLayoutEffect:In,useMemo:In,useReducer:In,useRef:In,useState:In,useDebugValue:In,useDeferredValue:In,useTransition:In,useMutableSource:In,useOpaqueIdentifier:In,unstable_isNewReconciler:!1},rc={readContext:Vn,useCallback:function(e,n){return Ei().memoizedState=[e,n===void 0?null:n],e},useContext:Vn,useEffect:tc,useImperativeHandle:function(e,n,o){return o=o!=null?o.concat([e]):null,$s(4,2,ya.bind(null,n,e),o)},useLayoutEffect:function(e,n){return $s(4,2,e,n)},useMemo:function(e,n){var o=Ei();return n=n===void 0?null:n,e=e(),o.memoizedState=[e,n],e},useReducer:function(e,n,o){var l=Ei();return n=o!==void 0?o(n):n,l.memoizedState=l.baseState=n,e=l.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},e=e.dispatch=fn.bind(null,zt,e),[l.memoizedState,e]},useRef:uo,useState:Ko,useDebugValue:va,useDeferredValue:function(e){var n=Ko(e),o=n[0],l=n[1];return tc(function(){var u=Kn.transition;Kn.transition=1;try{l(e)}finally{Kn.transition=u}},[e]),o},useTransition:function(){var e=Ko(!1),n=e[0];return e=td.bind(null,e[1]),uo(e),[e,n]},useMutableSource:function(e,n,o){var l=Ei();return l.memoizedState={refs:{getSnapshot:n,setSnapshot:null},source:e,subscribe:o},Vs(l,e,n,o)},useOpaqueIdentifier:function(){if(Qn){var e=!1,n=Xc(function(){throw e||(e=!0,o("r:"+(ra++).toString(36))),Error(B(355))}),o=Ko(n)[1];return(zt.mode&2)===0&&(zt.flags|=516,Xr(5,function(){o("r:"+(ra++).toString(36))},void 0,null)),n}return n="r:"+(ra++).toString(36),Ko(n),n},unstable_isNewReconciler:!1},Sa={readContext:Vn,useCallback:wa,useContext:Vn,useEffect:Go,useImperativeHandle:nc,useLayoutEffect:ga,useMemo:_a,useReducer:lo,useRef:Hs,useState:function(){return lo(ir)},useDebugValue:va,useDeferredValue:function(e){var n=lo(ir),o=n[0],l=n[1];return Go(function(){var u=Kn.transition;Kn.transition=1;try{l(e)}finally{Kn.transition=u}},[e]),o},useTransition:function(){var e=lo(ir)[0];return[Hs().current,e]},useMutableSource:ha,useOpaqueIdentifier:function(){return lo(ir)[0]},unstable_isNewReconciler:!1},Ea={readContext:Vn,useCallback:wa,useContext:Vn,useEffect:Go,useImperativeHandle:nc,useLayoutEffect:ga,useMemo:_a,useReducer:ao,useRef:Hs,useState:function(){return ao(ir)},useDebugValue:va,useDeferredValue:function(e){var n=ao(ir),o=n[0],l=n[1];return Go(function(){var u=Kn.transition;Kn.transition=1;try{l(e)}finally{Kn.transition=u}},[e]),o},useTransition:function(){var e=ao(ir)[0];return[Hs().current,e]},useMutableSource:ha,useOpaqueIdentifier:function(){return ao(ir)[0]},unstable_isNewReconciler:!1},ic=$e.ReactCurrentOwner,vt=!1;function gn(e,n,o,l){n.child=e===null?ro(n,null,o,l):Qr(n,e.child,o,l)}function Ta(e,n,o,l,u){o=o.render;var f=n.ref;return to(n,u),l=ec(e,n,o,l,f,u),e!==null&&!vt?(n.updateQueue=e.updateQueue,n.flags&=-517,e.lanes&=~u,sr(e,n,u)):(n.flags|=1,gn(e,n,l,u),n.child)}function oc(e,n,o,l,u,f){if(e===null){var m=o.type;return typeof m=="function"&&!ml(m)&&m.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(n.tag=15,n.type=m,sc(e,n,m,l,u,f)):(e=wo(o.type,null,l,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}return m=e.child,(u&f)===0&&(u=m.memoizedProps,o=o.compare,o=o!==null?o:Zr,o(u,l)&&e.ref===n.ref)?sr(e,n,f):(n.flags|=1,e=li(m,l),e.ref=n.ref,e.return=n,n.child=e)}function sc(e,n,o,l,u,f){if(e!==null&&Zr(e.memoizedProps,l)&&e.ref===n.ref)if(vt=!1,(f&u)!==0)(e.flags&16384)!==0&&(vt=!0);else return n.lanes=e.lanes,sr(e,n,f);return Qs(e,n,o,l,f)}function xa(e,n,o){var l=n.pendingProps,u=l.children,f=e!==null?e.memoizedState:null;if(l.mode==="hidden"||l.mode==="unstable-defer-without-hiding")if((n.mode&4)===0)n.memoizedState={baseLanes:0},dl(n,o);else if((o&1073741824)!==0)n.memoizedState={baseLanes:0},dl(n,f!==null?f.baseLanes:o);else return e=f!==null?f.baseLanes|o:o,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e},dl(n,e),null;else f!==null?(l=f.baseLanes|o,n.memoizedState=null):l=o,dl(n,l);return gn(e,n,u,o),n.child}function Ca(e,n){var o=n.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(n.flags|=128)}function Qs(e,n,o,l,u){var f=kn(o)?br:on.current;return f=qi(n,f),to(n,u),o=ec(e,n,o,l,f,u),e!==null&&!vt?(n.updateQueue=e.updateQueue,n.flags&=-517,e.lanes&=~u,sr(e,n,u)):(n.flags|=1,gn(e,n,o,u),n.child)}function Pa(e,n,o,l,u){if(kn(o)){var f=!0;Ji(n)}else f=!1;if(to(n,u),n.stateNode===null)e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2),Ms(n,o,l),Bs(n,o,l,u),l=!0;else if(e===null){var m=n.stateNode,v=n.memoizedProps;m.props=v;var S=m.context,I=o.contextType;typeof I=="object"&&I!==null?I=Vn(I):(I=kn(o)?br:on.current,I=qi(n,I));var J=o.getDerivedStateFromProps,ke=typeof J=="function"||typeof m.getSnapshotBeforeUpdate=="function";ke||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(v!==l||S!==I)&&Xu(n,m,l,I),Re=!1;var W=n.memoizedState;m.state=W,_i(n,l,m,u),S=n.memoizedState,v!==l||W!==S||Rn.current||Re?(typeof J=="function"&&(Ls(n,o,J,l),S=n.memoizedState),(v=Re||Yu(n,o,v,l,W,S,I))?(ke||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(n.flags|=4)):(typeof m.componentDidMount=="function"&&(n.flags|=4),n.memoizedProps=l,n.memoizedState=S),m.props=l,m.state=S,m.context=I,l=v):(typeof m.componentDidMount=="function"&&(n.flags|=4),l=!1)}else{m=n.stateNode,$u(e,n),v=n.memoizedProps,I=n.type===n.elementType?v:jn(n.type,v),m.props=I,ke=n.pendingProps,W=m.context,S=o.contextType,typeof S=="object"&&S!==null?S=Vn(S):(S=kn(o)?br:on.current,S=qi(n,S));var de=o.getDerivedStateFromProps;(J=typeof de=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(v!==ke||W!==S)&&Xu(n,m,l,S),Re=!1,W=n.memoizedState,m.state=W,_i(n,l,m,u);var Ce=n.memoizedState;v!==ke||W!==Ce||Rn.current||Re?(typeof de=="function"&&(Ls(n,o,de,l),Ce=n.memoizedState),(I=Re||Yu(n,o,I,l,W,Ce,S))?(J||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(l,Ce,S),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(l,Ce,S)),typeof m.componentDidUpdate=="function"&&(n.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(n.flags|=256)):(typeof m.componentDidUpdate!="function"||v===e.memoizedProps&&W===e.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&W===e.memoizedState||(n.flags|=256),n.memoizedProps=l,n.memoizedState=Ce),m.props=l,m.state=Ce,m.context=S,l=I):(typeof m.componentDidUpdate!="function"||v===e.memoizedProps&&W===e.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&W===e.memoizedState||(n.flags|=256),l=!1)}return Ra(e,n,o,l,f,u)}function Ra(e,n,o,l,u,f){Ca(e,n);var m=(n.flags&64)!==0;if(!l&&!m)return u&&ju(n,o,!1),sr(e,n,f);l=n.stateNode,ic.current=n;var v=m&&typeof o.getDerivedStateFromError!="function"?null:l.render();return n.flags|=1,e!==null&&m?(n.child=Qr(n,e.child,null,f),n.child=Qr(n,null,v,f)):gn(e,n,v,f),n.memoizedState=l.state,u&&ju(n,o,!0),n.child}function yn(e){var n=e.stateNode;n.pendingContext?ia(e,n.pendingContext,n.pendingContext!==n.context):n.context&&ia(e,n.context,!1),Kr(e,n.containerInfo)}var Yo={dehydrated:null,retryLane:0};function ka(e,n,o){var l=n.pendingProps,u=Lt.current,f=!1,m;return(m=(n.flags&64)!==0)||(m=e!==null&&e.memoizedState===null?!1:(u&2)!==0),m?(f=!0,n.flags&=-65):e!==null&&e.memoizedState===null||l.fallback===void 0||l.unstable_avoidThisFallback===!0||(u|=1),Ft(Lt,u&1),e===null?(l.fallback!==void 0&&kt(n),e=l.children,u=l.fallback,f?(e=Ks(n,e,u,o),n.child.memoizedState={baseLanes:o},n.memoizedState=Yo,e):typeof l.unstable_expectedLoadTime=="number"?(e=Ks(n,e,u,o),n.child.memoizedState={baseLanes:o},n.memoizedState=Yo,n.lanes=33554432,e):(o=rs({mode:"visible",children:e},n.mode,o,null),o.return=n,n.child=o)):e.memoizedState!==null?f?(l=Ia(e,n,l.children,l.fallback,o),f=n.child,u=e.child.memoizedState,f.memoizedState=u===null?{baseLanes:o}:{baseLanes:u.baseLanes|o},f.childLanes=e.childLanes&~o,n.memoizedState=Yo,l):(o=lc(e,n,l.children,o),n.memoizedState=null,o):f?(l=Ia(e,n,l.children,l.fallback,o),f=n.child,u=e.child.memoizedState,f.memoizedState=u===null?{baseLanes:o}:{baseLanes:u.baseLanes|o},f.childLanes=e.childLanes&~o,n.memoizedState=Yo,l):(o=lc(e,n,l.children,o),n.memoizedState=null,o)}function Ks(e,n,o,l){var u=e.mode,f=e.child;return n={mode:"hidden",children:n},(u&2)===0&&f!==null?(f.childLanes=0,f.pendingProps=n):f=rs(n,u,0,null),o=ai(o,u,l,null),f.return=e,o.return=e,f.sibling=o,e.child=f,o}function lc(e,n,o,l){var u=e.child;return e=u.sibling,o=li(u,{mode:"visible",children:o}),(n.mode&2)===0&&(o.lanes=l),o.return=n,o.sibling=null,e!==null&&(e.nextEffect=null,e.flags=8,n.firstEffect=n.lastEffect=e),n.child=o}function Ia(e,n,o,l,u){var f=n.mode,m=e.child;e=m.sibling;var v={mode:"hidden",children:o};return(f&2)===0&&n.child!==m?(o=n.child,o.childLanes=0,o.pendingProps=v,m=o.lastEffect,m!==null?(n.firstEffect=o.firstEffect,n.lastEffect=m,m.nextEffect=null):n.firstEffect=n.lastEffect=null):o=li(m,v),e!==null?l=li(e,l):(l=ai(l,f,u,null),l.flags|=2),l.return=n,o.return=n,o.sibling=l,n.child=o,l}function Xo(e,n){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),Fs(e.return,n)}function Nr(e,n,o,l,u,f){var m=e.memoizedState;m===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:l,tail:o,tailMode:u,lastEffect:f}:(m.isBackwards=n,m.rendering=null,m.renderingStartTime=0,m.last=l,m.tail=o,m.tailMode=u,m.lastEffect=f)}function vr(e,n,o){var l=n.pendingProps,u=l.revealOrder,f=l.tail;if(gn(e,n,l.children,o),l=Lt.current,(l&2)!==0)l=l&1|2,n.flags|=64;else{if(e!==null&&(e.flags&64)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Xo(e,o);else if(e.tag===19)Xo(e,o);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}l&=1}if(Ft(Lt,l),(n.mode&2)===0)n.memoizedState=null;else switch(u){case"forwards":for(o=n.child,u=null;o!==null;)e=o.alternate,e!==null&&Gr(e)===null&&(u=o),o=o.sibling;o=u,o===null?(u=n.child,n.child=null):(u=o.sibling,o.sibling=null),Nr(n,!1,u,o,f,n.lastEffect);break;case"backwards":for(o=null,u=n.child,n.child=null;u!==null;){if(e=u.alternate,e!==null&&Gr(e)===null){n.child=u;break}e=u.sibling,u.sibling=o,o=u,u=e}Nr(n,!0,o,null,f,n.lastEffect);break;case"together":Nr(n,!1,null,null,void 0,n.lastEffect);break;default:n.memoizedState=null}return n.child}function sr(e,n,o){if(e!==null&&(n.dependencies=e.dependencies),Jr|=n.lanes,(o&n.childLanes)!==0){if(e!==null&&n.child!==e.child)throw Error(B(153));if(n.child!==null){for(e=n.child,o=li(e,e.pendingProps),n.child=o,o.return=n;e.sibling!==null;)e=e.sibling,o=o.sibling=li(e,e.pendingProps),o.return=n;o.sibling=null}return n.child}return null}var Gs,Ys,Xs,qs;Gs=function(e,n){for(var o=n.child;o!==null;){if(o.tag===5||o.tag===6)e.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},Ys=function(){},Xs=function(e,n,o,l){var u=e.memoizedProps;if(u!==l){e=n.stateNode,$n(Hn.current);var f=null;switch(o){case"input":u=Ni(e,u),l=Ni(e,l),f=[];break;case"option":u=an(e,u),l=an(e,l),f=[];break;case"select":u=De({},u,{value:void 0}),l=De({},l,{value:void 0}),f=[];break;case"textarea":u=Ee(e,u),l=Ee(e,l),f=[];break;default:typeof u.onClick!="function"&&typeof l.onClick=="function"&&(e.onclick=Ps)}Qe(o,l);var m;o=null;for(I in u)if(!l.hasOwnProperty(I)&&u.hasOwnProperty(I)&&u[I]!=null)if(I==="style"){var v=u[I];for(m in v)v.hasOwnProperty(m)&&(o||(o={}),o[m]="")}else I!=="dangerouslySetInnerHTML"&&I!=="children"&&I!=="suppressContentEditableWarning"&&I!=="suppressHydrationWarning"&&I!=="autoFocus"&&(Et.hasOwnProperty(I)?f||(f=[]):(f=f||[]).push(I,null));for(I in l){var S=l[I];if(v=u?.[I],l.hasOwnProperty(I)&&S!==v&&(S!=null||v!=null))if(I==="style")if(v){for(m in v)!v.hasOwnProperty(m)||S&&S.hasOwnProperty(m)||(o||(o={}),o[m]="");for(m in S)S.hasOwnProperty(m)&&v[m]!==S[m]&&(o||(o={}),o[m]=S[m])}else o||(f||(f=[]),f.push(I,o)),o=S;else I==="dangerouslySetInnerHTML"?(S=S?S.__html:void 0,v=v?v.__html:void 0,S!=null&&v!==S&&(f=f||[]).push(I,S)):I==="children"?typeof S!="string"&&typeof S!="number"||(f=f||[]).push(I,""+S):I!=="suppressContentEditableWarning"&&I!=="suppressHydrationWarning"&&(Et.hasOwnProperty(I)?(S!=null&&I==="onScroll"&&St("scroll",e),f||v===S||(f=[])):typeof S=="object"&&S!==null&&S.$$typeof===L?S.toString():(f=f||[]).push(I,S))}o&&(f=f||[]).push("style",o);var I=f;(n.updateQueue=I)&&(n.flags|=4)}},qs=function(e,n,o,l){o!==l&&(n.flags|=4)};function Ti(e,n){if(!Qn)switch(e.tailMode){case"hidden":n=e.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?e.tail=null:o.sibling=null;break;case"collapsed":o=e.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function ba(e,n,o){var l=n.pendingProps;switch(n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return kn(n.type)&&Fo(),null;case 3:return io(),gt(Rn),gt(on),Ws(),l=n.stateNode,l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Zs(n)?n.flags|=4:l.hydrate||(n.flags|=256)),Ys(n),null;case 5:fa(n);var u=$n(Vo.current);if(o=n.type,e!==null&&n.stateNode!=null)Xs(e,n,o,l,u),e.ref!==n.ref&&(n.flags|=128);else{if(!l){if(n.stateNode===null)throw Error(B(166));return null}if(e=$n(Hn.current),Zs(n)){l=n.stateNode,o=n.type;var f=n.memoizedProps;switch(l[Ir]=n,l[Is]=f,o){case"dialog":St("cancel",l),St("close",l);break;case"iframe":case"object":case"embed":St("load",l);break;case"video":case"audio":for(e=0;e<wi.length;e++)St(wi[e],l);break;case"source":St("error",l);break;case"img":case"image":case"link":St("error",l),St("load",l);break;case"details":St("toggle",l);break;case"input":nn(l,f),St("invalid",l);break;case"select":l._wrapperState={wasMultiple:!!f.multiple},St("invalid",l);break;case"textarea":w(l,f),St("invalid",l)}Qe(o,f),e=null;for(var m in f)f.hasOwnProperty(m)&&(u=f[m],m==="children"?typeof u=="string"?l.textContent!==u&&(e=["children",u]):typeof u=="number"&&l.textContent!==""+u&&(e=["children",""+u]):Et.hasOwnProperty(m)&&u!=null&&m==="onScroll"&&St("scroll",l));switch(o){case"input":X(l),jr(l,f,!0);break;case"textarea":X(l),E(l);break;case"select":case"option":break;default:typeof f.onClick=="function"&&(l.onclick=Ps)}l=e,n.updateQueue=l,l!==null&&(n.flags|=4)}else{switch(m=u.nodeType===9?u:u.ownerDocument,e===R.html&&(e=N(o)),e===R.html?o==="script"?(e=m.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=m.createElement(o,{is:l.is}):(e=m.createElement(o),o==="select"&&(m=e,l.multiple?m.multiple=!0:l.size&&(m.size=l.size))):e=m.createElementNS(e,o),e[Ir]=n,e[Is]=l,Gs(e,n,!1,!1),n.stateNode=e,m=wt(o,l),o){case"dialog":St("cancel",e),St("close",e),u=l;break;case"iframe":case"object":case"embed":St("load",e),u=l;break;case"video":case"audio":for(u=0;u<wi.length;u++)St(wi[u],e);u=l;break;case"source":St("error",e),u=l;break;case"img":case"image":case"link":St("error",e),St("load",e),u=l;break;case"details":St("toggle",e),u=l;break;case"input":nn(e,l),u=Ni(e,l),St("invalid",e);break;case"option":u=an(e,l);break;case"select":e._wrapperState={wasMultiple:!!l.multiple},u=De({},l,{value:void 0}),St("invalid",e);break;case"textarea":w(e,l),u=Ee(e,l),St("invalid",e);break;default:u=l}Qe(o,u);var v=u;for(f in v)if(v.hasOwnProperty(f)){var S=v[f];f==="style"?mt(e,S):f==="dangerouslySetInnerHTML"?(S=S?S.__html:void 0,S!=null&&G(e,S)):f==="children"?typeof S=="string"?(o!=="textarea"||S!=="")&&ve(e,S):typeof S=="number"&&ve(e,""+S):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(Et.hasOwnProperty(f)?S!=null&&f==="onScroll"&&St("scroll",e):S!=null&&Oe(e,f,S,m))}switch(o){case"input":X(e),jr(e,l,!1);break;case"textarea":X(e),E(e);break;case"option":l.value!=null&&e.setAttribute("value",""+Cn(l.value));break;case"select":e.multiple=!!l.multiple,f=l.value,f!=null?Er(e,!!l.multiple,f,!1):l.defaultValue!=null&&Er(e,!!l.multiple,l.defaultValue,!0);break;default:typeof u.onClick=="function"&&(e.onclick=Ps)}Nu(o,l)&&(n.flags|=4)}n.ref!==null&&(n.flags|=128)}return null;case 6:if(e&&n.stateNode!=null)qs(e,n,e.memoizedProps,l);else{if(typeof l!="string"&&n.stateNode===null)throw Error(B(166));o=$n(Vo.current),$n(Hn.current),Zs(n)?(l=n.stateNode,o=n.memoizedProps,l[Ir]=n,l.nodeValue!==o&&(n.flags|=4)):(l=(o.nodeType===9?o:o.ownerDocument).createTextNode(l),l[Ir]=n,n.stateNode=l)}return null;case 13:return gt(Lt),l=n.memoizedState,(n.flags&64)!==0?(n.lanes=o,n):(l=l!==null,o=!1,e===null?n.memoizedProps.fallback!==void 0&&Zs(n):o=e.memoizedState!==null,l&&!o&&(n.mode&2)!==0&&(e===null&&n.memoizedProps.unstable_avoidThisFallback!==!0||(Lt.current&1)!==0?bt===0&&(bt=3):((bt===0||bt===3)&&(bt=4),Tn===null||(Jr&134217727)===0&&(Dr&134217727)===0||yo(Tn,vn))),(l||o)&&(n.flags|=4),null);case 4:return io(),Ys(n),e===null&&$i(n.stateNode.containerInfo),null;case 10:return da(n),null;case 17:return kn(n.type)&&Fo(),null;case 19:if(gt(Lt),l=n.memoizedState,l===null)return null;if(f=(n.flags&64)!==0,m=l.rendering,m===null)if(f)Ti(l,!1);else{if(bt!==0||e!==null&&(e.flags&64)!==0)for(e=n.child;e!==null;){if(m=Gr(e),m!==null){for(n.flags|=64,Ti(l,!1),f=m.updateQueue,f!==null&&(n.updateQueue=f,n.flags|=4),l.lastEffect===null&&(n.firstEffect=null),n.lastEffect=l.lastEffect,l=o,o=n.child;o!==null;)f=o,e=l,f.flags&=2,f.nextEffect=null,f.firstEffect=null,f.lastEffect=null,m=f.alternate,m===null?(f.childLanes=0,f.lanes=e,f.child=null,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=m.childLanes,f.lanes=m.lanes,f.child=m.child,f.memoizedProps=m.memoizedProps,f.memoizedState=m.memoizedState,f.updateQueue=m.updateQueue,f.type=m.type,e=m.dependencies,f.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),o=o.sibling;return Ft(Lt,Lt.current&1|2),n.child}e=e.sibling}l.tail!==null&&yt()>ll&&(n.flags|=64,f=!0,Ti(l,!1),n.lanes=33554432)}else{if(!f)if(e=Gr(m),e!==null){if(n.flags|=64,f=!0,o=e.updateQueue,o!==null&&(n.updateQueue=o,n.flags|=4),Ti(l,!0),l.tail===null&&l.tailMode==="hidden"&&!m.alternate&&!Qn)return n=n.lastEffect=l.lastEffect,n!==null&&(n.nextEffect=null),null}else 2*yt()-l.renderingStartTime>ll&&o!==1073741824&&(n.flags|=64,f=!0,Ti(l,!1),n.lanes=33554432);l.isBackwards?(m.sibling=n.child,n.child=m):(o=l.last,o!==null?o.sibling=m:n.child=m,l.last=m)}return l.tail!==null?(o=l.tail,l.rendering=o,l.tail=o.sibling,l.lastEffect=n.lastEffect,l.renderingStartTime=yt(),o.sibling=null,n=Lt.current,Ft(Lt,f?n&1|2:n&1),o):null;case 23:case 24:return za(),e!==null&&e.memoizedState!==null!=(n.memoizedState!==null)&&l.mode!=="unstable-defer-without-hiding"&&(n.flags|=4),null}throw Error(B(156,n.tag))}function Js(e){switch(e.tag){case 1:kn(e.type)&&Fo();var n=e.flags;return n&4096?(e.flags=n&-4097|64,e):null;case 3:if(io(),gt(Rn),gt(on),Ws(),n=e.flags,(n&64)!==0)throw Error(B(285));return e.flags=n&-4097|64,e;case 5:return fa(e),null;case 13:return gt(Lt),n=e.flags,n&4096?(e.flags=n&-4097|64,e):null;case 19:return gt(Lt),null;case 4:return io(),null;case 10:return da(e),null;case 23:case 24:return za(),null;default:return null}}function Oa(e,n){try{var o="",l=n;do o+=cs(l),l=l.return;while(l);var u=o}catch(f){u=`
41
41
  Error generating stack: `+f.message+`
42
- `+f.stack}return{value:e,source:n,stack:u}}function Na(e,n){try{console.error(n.value)}catch(o){setTimeout(function(){throw o})}}var ac=typeof WeakMap=="function"?WeakMap:Map;function Da(e,n,o){o=mn(-1,o),o.tag=3,o.payload={element:null};var l=n.value;return o.callback=function(){ns||(ns=!0,al=l),Na(e,n)},o}function En(e,n,o){o=mn(-1,o),o.tag=3;var l=e.type.getDerivedStateFromError;if(typeof l=="function"){var u=n.value;o.payload=function(){return Na(e,n),l(u)}}var f=e.stateNode;return f!==null&&typeof f.componentDidCatch=="function"&&(o.callback=function(){typeof l!="function"&&(Gn===null?Gn=new Set([this]):Gn.add(this),Na(e,n));var m=n.stack;this.componentDidCatch(n.value,{componentStack:m!==null?m:""})}),o}var uc=typeof WeakSet=="function"?WeakSet:Set;function el(e){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(o){si(e,o)}else n.current=null}function qt(e,n){switch(n.tag){case 0:case 11:case 15:case 22:return;case 1:if(n.flags&256&&e!==null){var o=e.memoizedProps,l=e.memoizedState;e=n.stateNode,n=e.getSnapshotBeforeUpdate(n.elementType===n.type?o:jn(n.type,o),l),e.__reactInternalSnapshotBeforeUpdate=n}return;case 3:n.flags&256&&Xt(n.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(B(163))}function cc(e,n,o){switch(o.tag){case 0:case 11:case 15:case 22:if(n=o.updateQueue,n=n!==null?n.lastEffect:null,n!==null){e=n=n.next;do{if((e.tag&3)===3){var l=e.create;e.destroy=l()}e=e.next}while(e!==n)}if(n=o.updateQueue,n=n!==null?n.lastEffect:null,n!==null){e=n=n.next;do{var u=e;l=u.next,u=u.tag,(u&4)!==0&&(u&1)!==0&&(gc(o,e),oi(o,e)),e=l}while(e!==n)}return;case 1:e=o.stateNode,o.flags&4&&(n===null?e.componentDidMount():(l=o.elementType===o.type?n.memoizedProps:jn(o.type,n.memoizedProps),e.componentDidUpdate(l,n.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),n=o.updateQueue,n!==null&&Ku(o,n,e);return;case 3:if(n=o.updateQueue,n!==null){if(e=null,o.child!==null)switch(o.child.tag){case 5:e=o.child.stateNode;break;case 1:e=o.child.stateNode}Ku(o,n,e)}return;case 5:e=o.stateNode,n===null&&o.flags&4&&Nu(o.type,o.memoizedProps)&&e.focus();return;case 6:return;case 4:return;case 12:return;case 13:o.memoizedState===null&&(o=o.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&Ja(o))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(B(163))}function tl(e,n){for(var o=e;;){if(o.tag===5){var l=o.stateNode;if(n)l=l.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none";else{l=o.stateNode;var u=o.memoizedProps.style;u=u!=null&&u.hasOwnProperty("display")?u.display:null,l.style.display=he("display",u)}}else if(o.tag===6)o.stateNode.nodeValue=n?"":o.memoizedProps;else if((o.tag!==23&&o.tag!==24||o.memoizedState===null||o===e)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===e)break;for(;o.sibling===null;){if(o.return===null||o.return===e)return;o=o.return}o.sibling.return=o.return,o=o.sibling}}function et(e,n){if(mr&&typeof mr.onCommitFiberUnmount=="function")try{mr.onCommitFiberUnmount(oa,n)}catch{}switch(n.tag){case 0:case 11:case 14:case 15:case 22:if(e=n.updateQueue,e!==null&&(e=e.lastEffect,e!==null)){var o=e=e.next;do{var l=o,u=l.destroy;if(l=l.tag,u!==void 0)if((l&4)!==0)gc(n,o);else{l=n;try{u()}catch(f){si(l,f)}}o=o.next}while(o!==e)}break;case 1:if(el(n),e=n.stateNode,typeof e.componentWillUnmount=="function")try{e.props=n.memoizedProps,e.state=n.memoizedState,e.componentWillUnmount()}catch(f){si(n,f)}break;case 5:el(n);break;case 4:xi(e,n)}}function nl(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function Aa(e){return e.tag===5||e.tag===3||e.tag===4}function qo(e){e:{for(var n=e.return;n!==null;){if(Aa(n))break e;n=n.return}throw Error(B(160))}var o=n;switch(n=o.stateNode,o.tag){case 5:var l=!1;break;case 3:n=n.containerInfo,l=!0;break;case 4:n=n.containerInfo,l=!0;break;default:throw Error(B(161))}o.flags&16&&(ve(n,""),o.flags&=-17);e:t:for(o=e;;){for(;o.sibling===null;){if(o.return===null||Aa(o.return)){o=null;break e}o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue t;o.child.return=o,o=o.child}if(!(o.flags&2)){o=o.stateNode;break e}}l?Jo(e,o,n):rl(e,o,n)}function Jo(e,n,o){var l=e.tag,u=l===5||l===6;if(u)e=u?e.stateNode:e.stateNode.instance,n?o.nodeType===8?o.parentNode.insertBefore(e,n):o.insertBefore(e,n):(o.nodeType===8?(n=o.parentNode,n.insertBefore(e,o)):(n=o,n.appendChild(e)),o=o._reactRootContainer,o!=null||n.onclick!==null||(n.onclick=Ps));else if(l!==4&&(e=e.child,e!==null))for(Jo(e,n,o),e=e.sibling;e!==null;)Jo(e,n,o),e=e.sibling}function rl(e,n,o){var l=e.tag,u=l===5||l===6;if(u)e=u?e.stateNode:e.stateNode.instance,n?o.insertBefore(e,n):o.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(rl(e,n,o),e=e.sibling;e!==null;)rl(e,n,o),e=e.sibling}function xi(e,n){for(var o=n,l=!1,u,f;;){if(!l){l=o.return;e:for(;;){if(l===null)throw Error(B(160));switch(u=l.stateNode,l.tag){case 5:f=!1;break e;case 3:u=u.containerInfo,f=!0;break e;case 4:u=u.containerInfo,f=!0;break e}l=l.return}l=!0}if(o.tag===5||o.tag===6){e:for(var m=e,v=o,S=v;;)if(et(m,S),S.child!==null&&S.tag!==4)S.child.return=S,S=S.child;else{if(S===v)break e;for(;S.sibling===null;){if(S.return===null||S.return===v)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}f?(m=u,v=o.stateNode,m.nodeType===8?m.parentNode.removeChild(v):m.removeChild(v)):u.removeChild(o.stateNode)}else if(o.tag===4){if(o.child!==null){u=o.stateNode.containerInfo,f=!0,o.child.return=o,o=o.child;continue}}else if(et(e,o),o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return;o=o.return,o.tag===4&&(l=!1)}o.sibling.return=o.return,o=o.sibling}}function co(e,n){switch(n.tag){case 0:case 11:case 14:case 15:case 22:var o=n.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var l=o=o.next;do(l.tag&3)===3&&(e=l.destroy,l.destroy=void 0,e!==void 0&&e()),l=l.next;while(l!==o)}return;case 1:return;case 5:if(o=n.stateNode,o!=null){l=n.memoizedProps;var u=e!==null?e.memoizedProps:l;e=n.type;var f=n.updateQueue;if(n.updateQueue=null,f!==null){for(o[Is]=l,e==="input"&&l.type==="radio"&&l.name!=null&&Di(o,l),wt(e,u),n=wt(e,l),u=0;u<f.length;u+=2){var m=f[u],v=f[u+1];m==="style"?mt(o,v):m==="dangerouslySetInnerHTML"?G(o,v):m==="children"?ve(o,v):Ne(o,m,v,n)}switch(e){case"input":hi(o,l);break;case"textarea":y(o,l);break;case"select":e=o._wrapperState.wasMultiple,o._wrapperState.wasMultiple=!!l.multiple,f=l.value,f!=null?Er(o,!!l.multiple,f,!1):e!==!!l.multiple&&(l.defaultValue!=null?Er(o,!!l.multiple,l.defaultValue,!0):Er(o,!!l.multiple,l.multiple?[]:"",!1))}}}return;case 6:if(n.stateNode===null)throw Error(B(162));n.stateNode.nodeValue=n.memoizedProps;return;case 3:o=n.stateNode,o.hydrate&&(o.hydrate=!1,Ja(o.containerInfo));return;case 12:return;case 13:n.memoizedState!==null&&(sl=yt(),tl(n.child,!0)),il(n);return;case 19:il(n);return;case 17:return;case 23:case 24:tl(n,n.memoizedState!==null);return}throw Error(B(163))}function il(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new uc),n.forEach(function(l){var u=wc.bind(null,e,l);o.has(l)||(o.add(l),l.then(u,u))})}}function dc(e,n){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(n=n.memoizedState,n!==null&&n.dehydrated===null):!1}var Fa=Math.ceil,es=He.ReactCurrentDispatcher,La=He.ReactCurrentOwner,xe=0,Tn=null,Jt=null,vn=0,Ci=0,ja=Hr(0),bt=0,ts=null,qr=0,Jr=0,Dr=0,ol=0,fo=null,sl=0,ll=1/0;function ei(){ll=yt()+500}var re=null,ns=!1,al=null,Gn=null,Bn=!1,ti=null,Pi=90,ul=[],po=[],bn=null,ni=0,ri=null,ho=-1,Yn=0,on=0,mo=null,go=!1;function On(){return(xe&48)!==0?yt():ho!==-1?ho:ho=yt()}function Ar(e){if(e=e.mode,(e&2)===0)return 1;if((e&4)===0)return dn()===99?1:2;if(Yn===0&&(Yn=qr),Hu.transition!==0){on!==0&&(on=fo!==null?fo.pendingLanes:0),e=Yn;var n=4186112&~on;return n&=-n,n===0&&(e=4186112&~e,n=e&-e,n===0&&(n=8192)),n}return e=dn(),(xe&4)!==0&&e===98?e=x(12,Yn):(e=zc(e),e=x(e,Yn)),e}function lr(e,n,o){if(50<ni)throw ni=0,ri=null,Error(B(185));if(e=ii(e,n),e===null)return null;ms(e,n,o),e===Tn&&(Dr|=n,bt===4&&yo(e,vn));var l=dn();n===1?(xe&8)!==0&&(xe&48)===0?Ba(e):(Nn(e,o),xe===0&&(ei(),gr())):((xe&4)===0||l!==98&&l!==99||(bn===null?bn=new Set([e]):bn.add(e)),Nn(e,o)),fo=e}function ii(e,n){e.lanes|=n;var o=e.alternate;for(o!==null&&(o.lanes|=n),o=e,e=e.return;e!==null;)e.childLanes|=n,o=e.alternate,o!==null&&(o.childLanes|=n),o=e,e=e.return;return o.tag===3?o.stateNode:null}function Nn(e,n){for(var o=e.callbackNode,l=e.suspendedLanes,u=e.pingedLanes,f=e.expirationTimes,m=e.pendingLanes;0<m;){var v=31-Pr(m),S=1<<v,I=f[v];if(I===-1){if((S&l)===0||(S&u)!==0){I=n,gi(S);var J=_t;f[v]=10<=J?I+250:6<=J?I+5e3:-1}}else I<=n&&(e.expiredLanes|=S);m&=~S}if(l=Co(e,e===Tn?vn:0),n=_t,l===0)o!==null&&(o!==Ns&&Lo(o),e.callbackNode=null,e.callbackPriority=0);else{if(o!==null){if(e.callbackPriority===n)return;o!==Ns&&Lo(o)}n===15?(o=Ba.bind(null,e),rr===null?(rr=[o],jo=sa(bs,Vu)):rr.push(o),o=Ns):n===14?o=Mo(99,Ba.bind(null,e)):(o=Uc(n),o=Mo(o,Ma.bind(null,e))),e.callbackPriority=n,e.callbackNode=o}}function Ma(e){if(ho=-1,on=Yn=0,(xe&48)!==0)throw Error(B(327));var n=e.callbackNode;if(Vt()&&e.callbackNode!==n)return null;var o=Co(e,e===Tn?vn:0);if(o===0)return null;var l=o,u=xe;xe|=16;var f=Ua();(Tn!==e||vn!==l)&&(ei(),Ri(e,l));do try{hc();break}catch(v){pc(e,v)}while(!0);if(ca(),es.current=f,xe=u,Jt!==null?l=0:(Tn=null,vn=0,l=bt),(qr&Dr)!==0)Ri(e,0);else if(l!==0){if(l===2&&(xe|=64,e.hydrate&&(e.hydrate=!1,Xt(e.containerInfo)),o=su(e),o!==0&&(l=vo(e,o))),l===1)throw n=ts,Ri(e,0),yo(e,o),Nn(e,yt()),n;switch(e.finishedWork=e.current.alternate,e.finishedLanes=o,l){case 0:case 1:throw Error(B(345));case 2:Fr(e);break;case 3:if(yo(e,o),(o&62914560)===o&&(l=sl+500-yt(),10<l)){if(Co(e,0)!==0)break;if(u=e.suspendedLanes,(u&o)!==o){On(),e.pingedLanes|=e.suspendedLanes&u;break}e.timeoutHandle=Du(Fr.bind(null,e),l);break}Fr(e);break;case 4:if(yo(e,o),(o&4186112)===o)break;for(l=e.eventTimes,u=-1;0<o;){var m=31-Pr(o);f=1<<m,m=l[m],m>u&&(u=m),o&=~f}if(o=u,o=yt()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*Fa(o/1960))-o,10<o){e.timeoutHandle=Du(Fr.bind(null,e),o);break}Fr(e);break;case 5:Fr(e);break;default:throw Error(B(329))}}return Nn(e,yt()),e.callbackNode===n?Ma.bind(null,e):null}function yo(e,n){for(n&=~ol,n&=~Dr,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var o=31-Pr(n),l=1<<o;e[o]=-1,n&=~l}}function Ba(e){if((xe&48)!==0)throw Error(B(327));if(Vt(),e===Tn&&(e.expiredLanes&vn)!==0){var n=vn,o=vo(e,n);(qr&Dr)!==0&&(n=Co(e,n),o=vo(e,n))}else n=Co(e,0),o=vo(e,n);if(e.tag!==0&&o===2&&(xe|=64,e.hydrate&&(e.hydrate=!1,Xt(e.containerInfo)),n=su(e),n!==0&&(o=vo(e,n))),o===1)throw o=ts,Ri(e,0),yo(e,n),Nn(e,yt()),o;return e.finishedWork=e.current.alternate,e.finishedLanes=n,Fr(e),Nn(e,yt()),null}function nd(){if(bn!==null){var e=bn;bn=null,e.forEach(function(n){n.expiredLanes|=24&n.pendingLanes,Nn(n,yt())})}gr()}function fc(e,n){var o=xe;xe|=1;try{return e(n)}finally{xe=o,xe===0&&(ei(),gr())}}function cl(e,n){var o=xe;xe&=-2,xe|=8;try{return e(n)}finally{xe=o,xe===0&&(ei(),gr())}}function dl(e,n){Ft(ja,Ci),Ci|=n,qr|=n}function za(){Ci=ja.current,gt(ja)}function Ri(e,n){e.finishedWork=null,e.finishedLanes=0;var o=e.timeoutHandle;if(o!==-1&&(e.timeoutHandle=-1,Yt(o)),Jt!==null)for(o=Jt.return;o!==null;){var l=o;switch(l.tag){case 1:l=l.type.childContextTypes,l!=null&&Fo();break;case 3:io(),gt(Rn),gt(rn),Ws();break;case 5:fa(l);break;case 4:io();break;case 13:gt(Lt);break;case 19:gt(Lt);break;case 10:da(l);break;case 23:case 24:za()}o=o.return}Tn=e,Jt=li(e.current,null),vn=Ci=qr=n,bt=0,ts=null,ol=Dr=Jr=0}function pc(e,n){do{var o=Jt;try{if(ca(),$o.current=or,so){for(var l=zt.memoizedState;l!==null;){var u=l.queue;u!==null&&(u.pending=null),l=l.next}so=!1}if(Si=0,dt=Te=zt=null,ft=!1,La.current=null,o===null||o.return===null){bt=1,ts=n,Jt=null;break}e:{var f=e,m=o.return,v=o,S=n;if(n=vn,v.flags|=2048,v.firstEffect=v.lastEffect=null,S!==null&&typeof S=="object"&&typeof S.then=="function"){var I=S;if((v.mode&2)===0){var J=v.alternate;J?(v.updateQueue=J.updateQueue,v.memoizedState=J.memoizedState,v.lanes=J.lanes):(v.updateQueue=null,v.memoizedState=null)}var Ie=(Lt.current&1)!==0,W=m;do{var de;if(de=W.tag===13){var Ce=W.memoizedState;if(Ce!==null)de=Ce.dehydrated!==null;else{var we=W.memoizedProps;de=we.fallback===void 0?!1:we.unstable_avoidThisFallback!==!0?!0:!Ie}}if(de){var k=W.updateQueue;if(k===null){var T=new Set;T.add(I),W.updateQueue=T}else k.add(I);if((W.mode&2)===0){if(W.flags|=64,v.flags|=16384,v.flags&=-2981,v.tag===1)if(v.alternate===null)v.tag=17;else{var P=mn(-1,1);P.tag=2,yr(v,P)}v.lanes|=1;break e}S=void 0,v=n;var L=f.pingCache;if(L===null?(L=f.pingCache=new ac,S=new Set,L.set(I,S)):(S=L.get(I),S===void 0&&(S=new Set,L.set(I,S))),!S.has(v)){S.add(v);var z=vc.bind(null,f,I,v);I.then(z,z)}W.flags|=4096,W.lanes=n;break e}W=W.return}while(W!==null);S=Error((Sr(v.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
42
+ `+f.stack}return{value:e,source:n,stack:u}}function Na(e,n){try{console.error(n.value)}catch(o){setTimeout(function(){throw o})}}var ac=typeof WeakMap=="function"?WeakMap:Map;function Da(e,n,o){o=mn(-1,o),o.tag=3,o.payload={element:null};var l=n.value;return o.callback=function(){ns||(ns=!0,al=l),Na(e,n)},o}function En(e,n,o){o=mn(-1,o),o.tag=3;var l=e.type.getDerivedStateFromError;if(typeof l=="function"){var u=n.value;o.payload=function(){return Na(e,n),l(u)}}var f=e.stateNode;return f!==null&&typeof f.componentDidCatch=="function"&&(o.callback=function(){typeof l!="function"&&(Gn===null?Gn=new Set([this]):Gn.add(this),Na(e,n));var m=n.stack;this.componentDidCatch(n.value,{componentStack:m!==null?m:""})}),o}var uc=typeof WeakSet=="function"?WeakSet:Set;function el(e){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(o){si(e,o)}else n.current=null}function Jt(e,n){switch(n.tag){case 0:case 11:case 15:case 22:return;case 1:if(n.flags&256&&e!==null){var o=e.memoizedProps,l=e.memoizedState;e=n.stateNode,n=e.getSnapshotBeforeUpdate(n.elementType===n.type?o:jn(n.type,o),l),e.__reactInternalSnapshotBeforeUpdate=n}return;case 3:n.flags&256&&qt(n.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(B(163))}function cc(e,n,o){switch(o.tag){case 0:case 11:case 15:case 22:if(n=o.updateQueue,n=n!==null?n.lastEffect:null,n!==null){e=n=n.next;do{if((e.tag&3)===3){var l=e.create;e.destroy=l()}e=e.next}while(e!==n)}if(n=o.updateQueue,n=n!==null?n.lastEffect:null,n!==null){e=n=n.next;do{var u=e;l=u.next,u=u.tag,(u&4)!==0&&(u&1)!==0&&(gc(o,e),oi(o,e)),e=l}while(e!==n)}return;case 1:e=o.stateNode,o.flags&4&&(n===null?e.componentDidMount():(l=o.elementType===o.type?n.memoizedProps:jn(o.type,n.memoizedProps),e.componentDidUpdate(l,n.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),n=o.updateQueue,n!==null&&Ku(o,n,e);return;case 3:if(n=o.updateQueue,n!==null){if(e=null,o.child!==null)switch(o.child.tag){case 5:e=o.child.stateNode;break;case 1:e=o.child.stateNode}Ku(o,n,e)}return;case 5:e=o.stateNode,n===null&&o.flags&4&&Nu(o.type,o.memoizedProps)&&e.focus();return;case 6:return;case 4:return;case 12:return;case 13:o.memoizedState===null&&(o=o.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&Ja(o))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(B(163))}function tl(e,n){for(var o=e;;){if(o.tag===5){var l=o.stateNode;if(n)l=l.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none";else{l=o.stateNode;var u=o.memoizedProps.style;u=u!=null&&u.hasOwnProperty("display")?u.display:null,l.style.display=he("display",u)}}else if(o.tag===6)o.stateNode.nodeValue=n?"":o.memoizedProps;else if((o.tag!==23&&o.tag!==24||o.memoizedState===null||o===e)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===e)break;for(;o.sibling===null;){if(o.return===null||o.return===e)return;o=o.return}o.sibling.return=o.return,o=o.sibling}}function et(e,n){if(mr&&typeof mr.onCommitFiberUnmount=="function")try{mr.onCommitFiberUnmount(oa,n)}catch{}switch(n.tag){case 0:case 11:case 14:case 15:case 22:if(e=n.updateQueue,e!==null&&(e=e.lastEffect,e!==null)){var o=e=e.next;do{var l=o,u=l.destroy;if(l=l.tag,u!==void 0)if((l&4)!==0)gc(n,o);else{l=n;try{u()}catch(f){si(l,f)}}o=o.next}while(o!==e)}break;case 1:if(el(n),e=n.stateNode,typeof e.componentWillUnmount=="function")try{e.props=n.memoizedProps,e.state=n.memoizedState,e.componentWillUnmount()}catch(f){si(n,f)}break;case 5:el(n);break;case 4:xi(e,n)}}function nl(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function Aa(e){return e.tag===5||e.tag===3||e.tag===4}function qo(e){e:{for(var n=e.return;n!==null;){if(Aa(n))break e;n=n.return}throw Error(B(160))}var o=n;switch(n=o.stateNode,o.tag){case 5:var l=!1;break;case 3:n=n.containerInfo,l=!0;break;case 4:n=n.containerInfo,l=!0;break;default:throw Error(B(161))}o.flags&16&&(ve(n,""),o.flags&=-17);e:t:for(o=e;;){for(;o.sibling===null;){if(o.return===null||Aa(o.return)){o=null;break e}o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue t;o.child.return=o,o=o.child}if(!(o.flags&2)){o=o.stateNode;break e}}l?Jo(e,o,n):rl(e,o,n)}function Jo(e,n,o){var l=e.tag,u=l===5||l===6;if(u)e=u?e.stateNode:e.stateNode.instance,n?o.nodeType===8?o.parentNode.insertBefore(e,n):o.insertBefore(e,n):(o.nodeType===8?(n=o.parentNode,n.insertBefore(e,o)):(n=o,n.appendChild(e)),o=o._reactRootContainer,o!=null||n.onclick!==null||(n.onclick=Ps));else if(l!==4&&(e=e.child,e!==null))for(Jo(e,n,o),e=e.sibling;e!==null;)Jo(e,n,o),e=e.sibling}function rl(e,n,o){var l=e.tag,u=l===5||l===6;if(u)e=u?e.stateNode:e.stateNode.instance,n?o.insertBefore(e,n):o.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(rl(e,n,o),e=e.sibling;e!==null;)rl(e,n,o),e=e.sibling}function xi(e,n){for(var o=n,l=!1,u,f;;){if(!l){l=o.return;e:for(;;){if(l===null)throw Error(B(160));switch(u=l.stateNode,l.tag){case 5:f=!1;break e;case 3:u=u.containerInfo,f=!0;break e;case 4:u=u.containerInfo,f=!0;break e}l=l.return}l=!0}if(o.tag===5||o.tag===6){e:for(var m=e,v=o,S=v;;)if(et(m,S),S.child!==null&&S.tag!==4)S.child.return=S,S=S.child;else{if(S===v)break e;for(;S.sibling===null;){if(S.return===null||S.return===v)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}f?(m=u,v=o.stateNode,m.nodeType===8?m.parentNode.removeChild(v):m.removeChild(v)):u.removeChild(o.stateNode)}else if(o.tag===4){if(o.child!==null){u=o.stateNode.containerInfo,f=!0,o.child.return=o,o=o.child;continue}}else if(et(e,o),o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return;o=o.return,o.tag===4&&(l=!1)}o.sibling.return=o.return,o=o.sibling}}function co(e,n){switch(n.tag){case 0:case 11:case 14:case 15:case 22:var o=n.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var l=o=o.next;do(l.tag&3)===3&&(e=l.destroy,l.destroy=void 0,e!==void 0&&e()),l=l.next;while(l!==o)}return;case 1:return;case 5:if(o=n.stateNode,o!=null){l=n.memoizedProps;var u=e!==null?e.memoizedProps:l;e=n.type;var f=n.updateQueue;if(n.updateQueue=null,f!==null){for(o[Is]=l,e==="input"&&l.type==="radio"&&l.name!=null&&Di(o,l),wt(e,u),n=wt(e,l),u=0;u<f.length;u+=2){var m=f[u],v=f[u+1];m==="style"?mt(o,v):m==="dangerouslySetInnerHTML"?G(o,v):m==="children"?ve(o,v):Oe(o,m,v,n)}switch(e){case"input":hi(o,l);break;case"textarea":y(o,l);break;case"select":e=o._wrapperState.wasMultiple,o._wrapperState.wasMultiple=!!l.multiple,f=l.value,f!=null?Er(o,!!l.multiple,f,!1):e!==!!l.multiple&&(l.defaultValue!=null?Er(o,!!l.multiple,l.defaultValue,!0):Er(o,!!l.multiple,l.multiple?[]:"",!1))}}}return;case 6:if(n.stateNode===null)throw Error(B(162));n.stateNode.nodeValue=n.memoizedProps;return;case 3:o=n.stateNode,o.hydrate&&(o.hydrate=!1,Ja(o.containerInfo));return;case 12:return;case 13:n.memoizedState!==null&&(sl=yt(),tl(n.child,!0)),il(n);return;case 19:il(n);return;case 17:return;case 23:case 24:tl(n,n.memoizedState!==null);return}throw Error(B(163))}function il(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new uc),n.forEach(function(l){var u=wc.bind(null,e,l);o.has(l)||(o.add(l),l.then(u,u))})}}function dc(e,n){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(n=n.memoizedState,n!==null&&n.dehydrated===null):!1}var Fa=Math.ceil,es=$e.ReactCurrentDispatcher,La=$e.ReactCurrentOwner,xe=0,Tn=null,en=null,vn=0,Ci=0,ja=Hr(0),bt=0,ts=null,qr=0,Jr=0,Dr=0,ol=0,fo=null,sl=0,ll=1/0;function ei(){ll=yt()+500}var re=null,ns=!1,al=null,Gn=null,Bn=!1,ti=null,Pi=90,ul=[],po=[],bn=null,ni=0,ri=null,ho=-1,Yn=0,sn=0,mo=null,go=!1;function On(){return(xe&48)!==0?yt():ho!==-1?ho:ho=yt()}function Ar(e){if(e=e.mode,(e&2)===0)return 1;if((e&4)===0)return dn()===99?1:2;if(Yn===0&&(Yn=qr),Hu.transition!==0){sn!==0&&(sn=fo!==null?fo.pendingLanes:0),e=Yn;var n=4186112&~sn;return n&=-n,n===0&&(e=4186112&~e,n=e&-e,n===0&&(n=8192)),n}return e=dn(),(xe&4)!==0&&e===98?e=x(12,Yn):(e=zc(e),e=x(e,Yn)),e}function lr(e,n,o){if(50<ni)throw ni=0,ri=null,Error(B(185));if(e=ii(e,n),e===null)return null;ms(e,n,o),e===Tn&&(Dr|=n,bt===4&&yo(e,vn));var l=dn();n===1?(xe&8)!==0&&(xe&48)===0?Ba(e):(Nn(e,o),xe===0&&(ei(),gr())):((xe&4)===0||l!==98&&l!==99||(bn===null?bn=new Set([e]):bn.add(e)),Nn(e,o)),fo=e}function ii(e,n){e.lanes|=n;var o=e.alternate;for(o!==null&&(o.lanes|=n),o=e,e=e.return;e!==null;)e.childLanes|=n,o=e.alternate,o!==null&&(o.childLanes|=n),o=e,e=e.return;return o.tag===3?o.stateNode:null}function Nn(e,n){for(var o=e.callbackNode,l=e.suspendedLanes,u=e.pingedLanes,f=e.expirationTimes,m=e.pendingLanes;0<m;){var v=31-Pr(m),S=1<<v,I=f[v];if(I===-1){if((S&l)===0||(S&u)!==0){I=n,gi(S);var J=_t;f[v]=10<=J?I+250:6<=J?I+5e3:-1}}else I<=n&&(e.expiredLanes|=S);m&=~S}if(l=Co(e,e===Tn?vn:0),n=_t,l===0)o!==null&&(o!==Ns&&Lo(o),e.callbackNode=null,e.callbackPriority=0);else{if(o!==null){if(e.callbackPriority===n)return;o!==Ns&&Lo(o)}n===15?(o=Ba.bind(null,e),rr===null?(rr=[o],jo=sa(bs,Vu)):rr.push(o),o=Ns):n===14?o=Mo(99,Ba.bind(null,e)):(o=Uc(n),o=Mo(o,Ma.bind(null,e))),e.callbackPriority=n,e.callbackNode=o}}function Ma(e){if(ho=-1,sn=Yn=0,(xe&48)!==0)throw Error(B(327));var n=e.callbackNode;if(Ht()&&e.callbackNode!==n)return null;var o=Co(e,e===Tn?vn:0);if(o===0)return null;var l=o,u=xe;xe|=16;var f=Ua();(Tn!==e||vn!==l)&&(ei(),Ri(e,l));do try{hc();break}catch(v){pc(e,v)}while(!0);if(ca(),es.current=f,xe=u,en!==null?l=0:(Tn=null,vn=0,l=bt),(qr&Dr)!==0)Ri(e,0);else if(l!==0){if(l===2&&(xe|=64,e.hydrate&&(e.hydrate=!1,qt(e.containerInfo)),o=su(e),o!==0&&(l=vo(e,o))),l===1)throw n=ts,Ri(e,0),yo(e,o),Nn(e,yt()),n;switch(e.finishedWork=e.current.alternate,e.finishedLanes=o,l){case 0:case 1:throw Error(B(345));case 2:Fr(e);break;case 3:if(yo(e,o),(o&62914560)===o&&(l=sl+500-yt(),10<l)){if(Co(e,0)!==0)break;if(u=e.suspendedLanes,(u&o)!==o){On(),e.pingedLanes|=e.suspendedLanes&u;break}e.timeoutHandle=Du(Fr.bind(null,e),l);break}Fr(e);break;case 4:if(yo(e,o),(o&4186112)===o)break;for(l=e.eventTimes,u=-1;0<o;){var m=31-Pr(o);f=1<<m,m=l[m],m>u&&(u=m),o&=~f}if(o=u,o=yt()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*Fa(o/1960))-o,10<o){e.timeoutHandle=Du(Fr.bind(null,e),o);break}Fr(e);break;case 5:Fr(e);break;default:throw Error(B(329))}}return Nn(e,yt()),e.callbackNode===n?Ma.bind(null,e):null}function yo(e,n){for(n&=~ol,n&=~Dr,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var o=31-Pr(n),l=1<<o;e[o]=-1,n&=~l}}function Ba(e){if((xe&48)!==0)throw Error(B(327));if(Ht(),e===Tn&&(e.expiredLanes&vn)!==0){var n=vn,o=vo(e,n);(qr&Dr)!==0&&(n=Co(e,n),o=vo(e,n))}else n=Co(e,0),o=vo(e,n);if(e.tag!==0&&o===2&&(xe|=64,e.hydrate&&(e.hydrate=!1,qt(e.containerInfo)),n=su(e),n!==0&&(o=vo(e,n))),o===1)throw o=ts,Ri(e,0),yo(e,n),Nn(e,yt()),o;return e.finishedWork=e.current.alternate,e.finishedLanes=n,Fr(e),Nn(e,yt()),null}function nd(){if(bn!==null){var e=bn;bn=null,e.forEach(function(n){n.expiredLanes|=24&n.pendingLanes,Nn(n,yt())})}gr()}function fc(e,n){var o=xe;xe|=1;try{return e(n)}finally{xe=o,xe===0&&(ei(),gr())}}function cl(e,n){var o=xe;xe&=-2,xe|=8;try{return e(n)}finally{xe=o,xe===0&&(ei(),gr())}}function dl(e,n){Ft(ja,Ci),Ci|=n,qr|=n}function za(){Ci=ja.current,gt(ja)}function Ri(e,n){e.finishedWork=null,e.finishedLanes=0;var o=e.timeoutHandle;if(o!==-1&&(e.timeoutHandle=-1,Xt(o)),en!==null)for(o=en.return;o!==null;){var l=o;switch(l.tag){case 1:l=l.type.childContextTypes,l!=null&&Fo();break;case 3:io(),gt(Rn),gt(on),Ws();break;case 5:fa(l);break;case 4:io();break;case 13:gt(Lt);break;case 19:gt(Lt);break;case 10:da(l);break;case 23:case 24:za()}o=o.return}Tn=e,en=li(e.current,null),vn=Ci=qr=n,bt=0,ts=null,ol=Dr=Jr=0}function pc(e,n){do{var o=en;try{if(ca(),$o.current=or,so){for(var l=zt.memoizedState;l!==null;){var u=l.queue;u!==null&&(u.pending=null),l=l.next}so=!1}if(Si=0,dt=Te=zt=null,ft=!1,La.current=null,o===null||o.return===null){bt=1,ts=n,en=null;break}e:{var f=e,m=o.return,v=o,S=n;if(n=vn,v.flags|=2048,v.firstEffect=v.lastEffect=null,S!==null&&typeof S=="object"&&typeof S.then=="function"){var I=S;if((v.mode&2)===0){var J=v.alternate;J?(v.updateQueue=J.updateQueue,v.memoizedState=J.memoizedState,v.lanes=J.lanes):(v.updateQueue=null,v.memoizedState=null)}var ke=(Lt.current&1)!==0,W=m;do{var de;if(de=W.tag===13){var Ce=W.memoizedState;if(Ce!==null)de=Ce.dehydrated!==null;else{var we=W.memoizedProps;de=we.fallback===void 0?!1:we.unstable_avoidThisFallback!==!0?!0:!ke}}if(de){var k=W.updateQueue;if(k===null){var T=new Set;T.add(I),W.updateQueue=T}else k.add(I);if((W.mode&2)===0){if(W.flags|=64,v.flags|=16384,v.flags&=-2981,v.tag===1)if(v.alternate===null)v.tag=17;else{var P=mn(-1,1);P.tag=2,yr(v,P)}v.lanes|=1;break e}S=void 0,v=n;var j=f.pingCache;if(j===null?(j=f.pingCache=new ac,S=new Set,j.set(I,S)):(S=j.get(I),S===void 0&&(S=new Set,j.set(I,S))),!S.has(v)){S.add(v);var z=vc.bind(null,f,I,v);I.then(z,z)}W.flags|=4096,W.lanes=n;break e}W=W.return}while(W!==null);S=Error((Sr(v.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
43
43
 
44
- Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}bt!==5&&(bt=2),S=Oa(S,v),W=m;do{switch(W.tag){case 3:f=S,W.flags|=4096,n&=-n,W.lanes|=n;var be=Da(W,f,n);Qu(W,be);break e;case 1:f=S;var oe=W.type,Oe=W.stateNode;if((W.flags&64)===0&&(typeof oe.getDerivedStateFromError=="function"||Oe!==null&&typeof Oe.componentDidCatch=="function"&&(Gn===null||!Gn.has(Oe)))){W.flags|=4096,n&=-n,W.lanes|=n;var Ue=En(W,f,n);Qu(W,Ue);break e}}W=W.return}while(W!==null)}fl(o)}catch(Le){n=Le,Jt===o&&o!==null&&(Jt=o=o.return);continue}break}while(!0)}function Ua(){var e=es.current;return es.current=or,e===null?or:e}function vo(e,n){var o=xe;xe|=16;var l=Ua();Tn===e&&vn===n||Ri(e,n);do try{rd();break}catch(u){pc(e,u)}while(!0);if(ca(),xe=o,es.current=l,Jt!==null)throw Error(B(261));return Tn=null,vn=0,bt}function rd(){for(;Jt!==null;)Za(Jt)}function hc(){for(;Jt!==null&&!qc();)Za(Jt)}function Za(e){var n=Va(e.alternate,e,Ci);e.memoizedProps=e.pendingProps,n===null?fl(e):Jt=n,La.current=null}function fl(e){var n=e;do{var o=n.alternate;if(e=n.return,(n.flags&2048)===0){if(o=ba(o,n,Ci),o!==null){Jt=o;return}if(o=n,o.tag!==24&&o.tag!==23||o.memoizedState===null||(Ci&1073741824)!==0||(o.mode&4)===0){for(var l=0,u=o.child;u!==null;)l|=u.lanes|u.childLanes,u=u.sibling;o.childLanes=l}e!==null&&(e.flags&2048)===0&&(e.firstEffect===null&&(e.firstEffect=n.firstEffect),n.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=n.firstEffect),e.lastEffect=n.lastEffect),1<n.flags&&(e.lastEffect!==null?e.lastEffect.nextEffect=n:e.firstEffect=n,e.lastEffect=n))}else{if(o=Js(n),o!==null){o.flags&=2047,Jt=o;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(n=n.sibling,n!==null){Jt=n;return}Jt=n=e}while(n!==null);bt===0&&(bt=5)}function Fr(e){var n=dn();return Or(99,pl.bind(null,e,n)),null}function pl(e,n){do Vt();while(ti!==null);if((xe&48)!==0)throw Error(B(327));var o=e.finishedWork;if(o===null)return null;if(e.finishedWork=null,e.finishedLanes=0,o===e.current)throw Error(B(177));e.callbackNode=null;var l=o.lanes|o.childLanes,u=l,f=e.pendingLanes&~u;e.pendingLanes=u,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=u,e.mutableReadLanes&=u,e.entangledLanes&=u,u=e.entanglements;for(var m=e.eventTimes,v=e.expirationTimes;0<f;){var S=31-Pr(f),I=1<<S;u[S]=0,m[S]=-1,v[S]=-1,f&=~I}if(bn!==null&&(l&24)===0&&bn.has(e)&&bn.delete(e),e===Tn&&(Jt=Tn=null,vn=0),1<o.flags?o.lastEffect!==null?(o.lastEffect.nextEffect=o,l=o.firstEffect):l=o:l=o.firstEffect,l!==null){if(u=xe,xe|=32,La.current=null,Rs=gs,m=Iu(),Oo(m)){if("selectionStart"in m)v={start:m.selectionStart,end:m.selectionEnd};else e:if(v=(v=m.ownerDocument)&&v.defaultView||window,(I=v.getSelection&&v.getSelection())&&I.rangeCount!==0){v=I.anchorNode,f=I.anchorOffset,S=I.focusNode,I=I.focusOffset;try{v.nodeType,S.nodeType}catch{v=null;break e}var J=0,Ie=-1,W=-1,de=0,Ce=0,we=m,k=null;t:for(;;){for(var T;we!==v||f!==0&&we.nodeType!==3||(Ie=J+f),we!==S||I!==0&&we.nodeType!==3||(W=J+I),we.nodeType===3&&(J+=we.nodeValue.length),(T=we.firstChild)!==null;)k=we,we=T;for(;;){if(we===m)break t;if(k===v&&++de===f&&(Ie=J),k===S&&++Ce===I&&(W=J),(T=we.nextSibling)!==null)break;we=k,k=we.parentNode}we=T}v=Ie===-1||W===-1?null:{start:Ie,end:W}}else v=null;v=v||{start:0,end:0}}else v=null;ta={focusedElem:m,selectionRange:v},gs=!1,mo=null,go=!1,re=l;do try{mc()}catch(Le){if(re===null)throw Error(B(330));si(re,Le),re=re.nextEffect}while(re!==null);mo=null,re=l;do try{for(m=e;re!==null;){var P=re.flags;if(P&16&&ve(re.stateNode,""),P&128){var L=re.alternate;if(L!==null){var z=L.ref;z!==null&&(typeof z=="function"?z(null):z.current=null)}}switch(P&1038){case 2:qo(re),re.flags&=-3;break;case 6:qo(re),re.flags&=-3,co(re.alternate,re);break;case 1024:re.flags&=-1025;break;case 1028:re.flags&=-1025,co(re.alternate,re);break;case 4:co(re.alternate,re);break;case 8:v=re,xi(m,v);var be=v.alternate;nl(v),be!==null&&nl(be)}re=re.nextEffect}}catch(Le){if(re===null)throw Error(B(330));si(re,Le),re=re.nextEffect}while(re!==null);if(z=ta,L=Iu(),P=z.focusedElem,m=z.selectionRange,L!==P&&P&&P.ownerDocument&&bo(P.ownerDocument.documentElement,P)){for(m!==null&&Oo(P)&&(L=m.start,z=m.end,z===void 0&&(z=L),"selectionStart"in P?(P.selectionStart=L,P.selectionEnd=Math.min(z,P.value.length)):(z=(L=P.ownerDocument||document)&&L.defaultView||window,z.getSelection&&(z=z.getSelection(),v=P.textContent.length,be=Math.min(m.start,v),m=m.end===void 0?be:Math.min(m.end,v),!z.extend&&be>m&&(v=m,m=be,be=v),v=Es(P,be),f=Es(P,m),v&&f&&(z.rangeCount!==1||z.anchorNode!==v.node||z.anchorOffset!==v.offset||z.focusNode!==f.node||z.focusOffset!==f.offset)&&(L=L.createRange(),L.setStart(v.node,v.offset),z.removeAllRanges(),be>m?(z.addRange(L),z.extend(f.node,f.offset)):(L.setEnd(f.node,f.offset),z.addRange(L)))))),L=[],z=P;z=z.parentNode;)z.nodeType===1&&L.push({element:z,left:z.scrollLeft,top:z.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<L.length;P++)z=L[P],z.element.scrollLeft=z.left,z.element.scrollTop=z.top}gs=!!Rs,ta=Rs=null,e.current=o,re=l;do try{for(P=e;re!==null;){var oe=re.flags;if(oe&36&&cc(P,re.alternate,re),oe&128){L=void 0;var Oe=re.ref;if(Oe!==null){var Ue=re.stateNode;re.tag,L=Ue,typeof Oe=="function"?Oe(L):Oe.current=L}}re=re.nextEffect}}catch(Le){if(re===null)throw Error(B(330));si(re,Le),re=re.nextEffect}while(re!==null);re=null,ed(),xe=u}else e.current=o;if(Bn)Bn=!1,ti=e,Pi=n;else for(re=l;re!==null;)n=re.nextEffect,re.nextEffect=null,re.flags&8&&(oe=re,oe.sibling=null,oe.stateNode=null),re=n;if(l=e.pendingLanes,l===0&&(Gn=null),l===1?e===ri?ni++:(ni=0,ri=e):ni=0,o=o.stateNode,mr&&typeof mr.onCommitFiberRoot=="function")try{mr.onCommitFiberRoot(oa,o,void 0,(o.current.flags&64)===64)}catch{}if(Nn(e,yt()),ns)throw ns=!1,e=al,al=null,e;return(xe&8)!==0||gr(),null}function mc(){for(;re!==null;){var e=re.alternate;go||mo===null||((re.flags&8)!==0?dr(re,mo)&&(go=!0):re.tag===13&&dc(e,re)&&dr(re,mo)&&(go=!0));var n=re.flags;(n&256)!==0&&qt(e,re),(n&512)===0||Bn||(Bn=!0,Mo(97,function(){return Vt(),null})),re=re.nextEffect}}function Vt(){if(Pi!==90){var e=97<Pi?97:Pi;return Pi=90,Or(e,yc)}return!1}function oi(e,n){ul.push(n,e),Bn||(Bn=!0,Mo(97,function(){return Vt(),null}))}function gc(e,n){po.push(n,e),Bn||(Bn=!0,Mo(97,function(){return Vt(),null}))}function yc(){if(ti===null)return!1;var e=ti;if(ti=null,(xe&48)!==0)throw Error(B(331));var n=xe;xe|=32;var o=po;po=[];for(var l=0;l<o.length;l+=2){var u=o[l],f=o[l+1],m=u.destroy;if(u.destroy=void 0,typeof m=="function")try{m()}catch(S){if(f===null)throw Error(B(330));si(f,S)}}for(o=ul,ul=[],l=0;l<o.length;l+=2){u=o[l],f=o[l+1];try{var v=u.create;u.destroy=v()}catch(S){if(f===null)throw Error(B(330));si(f,S)}}for(v=e.current.firstEffect;v!==null;)e=v.nextEffect,v.nextEffect=null,v.flags&8&&(v.sibling=null,v.stateNode=null),v=e;return xe=n,gr(),!0}function Wa(e,n,o){n=Oa(o,n),n=Da(e,n,1),yr(e,n),n=On(),e=ii(e,1),e!==null&&(ms(e,1,n),Nn(e,n))}function si(e,n){if(e.tag===3)Wa(e,e,n);else for(var o=e.return;o!==null;){if(o.tag===3){Wa(o,e,n);break}else if(o.tag===1){var l=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Gn===null||!Gn.has(l))){e=Oa(n,e);var u=En(o,e,1);if(yr(o,u),u=On(),o=ii(o,1),o!==null)ms(o,1,u),Nn(o,u);else if(typeof l.componentDidCatch=="function"&&(Gn===null||!Gn.has(l)))try{l.componentDidCatch(n,e)}catch{}break}}o=o.return}}function vc(e,n,o){var l=e.pingCache;l!==null&&l.delete(n),n=On(),e.pingedLanes|=e.suspendedLanes&o,Tn===e&&(vn&o)===o&&(bt===4||bt===3&&(vn&62914560)===vn&&500>yt()-sl?Ri(e,0):ol|=o),Nn(e,n)}function wc(e,n){var o=e.stateNode;o!==null&&o.delete(n),n=0,n===0&&(n=e.mode,(n&2)===0?n=1:(n&4)===0?n=dn()===99?1:2:(Yn===0&&(Yn=qr),n=Ur(62914560&~Yn),n===0&&(n=4194304))),o=On(),e=ii(e,n),e!==null&&(ms(e,n,o),Nn(e,o))}var Va;Va=function(e,n,o){var l=n.lanes;if(e!==null)if(e.memoizedProps!==n.pendingProps||Rn.current)vt=!0;else if((o&l)!==0)vt=(e.flags&16384)!==0;else{switch(vt=!1,n.tag){case 3:yn(n),Ho();break;case 5:Us(n);break;case 1:kn(n.type)&&Ji(n);break;case 4:Kr(n,n.stateNode.containerInfo);break;case 10:l=n.memoizedProps.value;var u=n.type._context;Ft(Ds,u._currentValue),u._currentValue=l;break;case 13:if(n.memoizedState!==null)return(o&n.child.childLanes)!==0?ka(e,n,o):(Ft(Lt,Lt.current&1),n=sr(e,n,o),n!==null?n.sibling:null);Ft(Lt,Lt.current&1);break;case 19:if(l=(o&n.childLanes)!==0,(e.flags&64)!==0){if(l)return vr(e,n,o);n.flags|=64}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),Ft(Lt,Lt.current),l)break;return null;case 23:case 24:return n.lanes=0,xa(e,n,o)}return sr(e,n,o)}else vt=!1;switch(n.lanes=0,n.tag){case 2:if(l=n.type,e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2),e=n.pendingProps,u=qi(n,rn.current),to(n,o),u=ec(null,n,l,e,u,o),n.flags|=1,typeof u=="object"&&u!==null&&typeof u.render=="function"&&u.$$typeof===void 0){if(n.tag=1,n.memoizedState=null,n.updateQueue=null,kn(l)){var f=!0;Ji(n)}else f=!1;n.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,lt(n);var m=l.getDerivedStateFromProps;typeof m=="function"&&Ls(n,l,m,e),u.updater=js,n.stateNode=u,u._reactInternals=n,Bs(n,l,e,o),n=Ra(null,n,l,!0,f,o)}else n.tag=0,gn(null,n,u,o),n=n.child;return n;case 16:u=n.elementType;e:{switch(e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2),e=n.pendingProps,f=u._init,u=f(u._payload),n.type=u,f=n.tag=Ha(u),e=jn(u,e),f){case 0:n=Qs(null,n,u,e,o);break e;case 1:n=Pa(null,n,u,e,o);break e;case 11:n=Ta(null,n,u,e,o);break e;case 14:n=oc(null,n,u,jn(u.type,e),l,o);break e}throw Error(B(306,u,""))}return n;case 0:return l=n.type,u=n.pendingProps,u=n.elementType===l?u:jn(l,u),Qs(e,n,l,u,o);case 1:return l=n.type,u=n.pendingProps,u=n.elementType===l?u:jn(l,u),Pa(e,n,l,u,o);case 3:if(yn(n),l=n.updateQueue,e===null||l===null)throw Error(B(282));if(l=n.pendingProps,u=n.memoizedState,u=u!==null?u.element:null,$u(e,n),_i(n,l,null,o),l=n.memoizedState.element,l===u)Ho(),n=sr(e,n,o);else{if(u=n.stateNode,(f=u.hydrate)&&(Yr=Gi(n.stateNode.containerInfo.firstChild),Mn=n,f=Qn=!0),f){if(e=u.mutableSourceEagerHydrationData,e!=null)for(u=0;u<e.length;u+=2)f=e[u],f._workInProgressVersionPrimary=e[u+1],oo.push(f);for(o=ro(n,null,l,o),n.child=o;o;)o.flags=o.flags&-3|1024,o=o.sibling}else gn(e,n,l,o),Ho();n=n.child}return n;case 5:return Us(n),e===null&&kt(n),l=n.type,u=n.pendingProps,f=e!==null?e.memoizedProps:null,m=u.children,na(l,u)?m=null:f!==null&&na(l,f)&&(n.flags|=16),Ca(e,n),gn(e,n,m,o),n.child;case 6:return e===null&&kt(n),null;case 13:return ka(e,n,o);case 4:return Kr(n,n.stateNode.containerInfo),l=n.pendingProps,e===null?n.child=Qr(n,null,l,o):gn(e,n,l,o),n.child;case 11:return l=n.type,u=n.pendingProps,u=n.elementType===l?u:jn(l,u),Ta(e,n,l,u,o);case 7:return gn(e,n,n.pendingProps,o),n.child;case 8:return gn(e,n,n.pendingProps.children,o),n.child;case 12:return gn(e,n,n.pendingProps.children,o),n.child;case 10:e:{l=n.type._context,u=n.pendingProps,m=n.memoizedProps,f=u.value;var v=n.type._context;if(Ft(Ds,v._currentValue),v._currentValue=f,m!==null)if(v=m.value,f=Pn(v,f)?0:(typeof l._calculateChangedBits=="function"?l._calculateChangedBits(v,f):1073741823)|0,f===0){if(m.children===u.children&&!Rn.current){n=sr(e,n,o);break e}}else for(v=n.child,v!==null&&(v.return=n);v!==null;){var S=v.dependencies;if(S!==null){m=v.child;for(var I=S.firstContext;I!==null;){if(I.context===l&&(I.observedBits&f)!==0){v.tag===1&&(I=mn(-1,o&-o),I.tag=2,yr(v,I)),v.lanes|=o,I=v.alternate,I!==null&&(I.lanes|=o),Fs(v.return,o),S.lanes|=o;break}I=I.next}}else m=v.tag===10&&v.type===n.type?null:v.child;if(m!==null)m.return=v;else for(m=v;m!==null;){if(m===n){m=null;break}if(v=m.sibling,v!==null){v.return=m.return,m=v;break}m=m.return}v=m}gn(e,n,u.children,o),n=n.child}return n;case 9:return u=n.type,f=n.pendingProps,l=f.children,to(n,o),u=Vn(u,f.unstable_observedBits),l=l(u),n.flags|=1,gn(e,n,l,o),n.child;case 14:return u=n.type,f=jn(u,n.pendingProps),f=jn(u.type,f),oc(e,n,u,f,l,o);case 15:return sc(e,n,n.type,n.pendingProps,l,o);case 17:return l=n.type,u=n.pendingProps,u=n.elementType===l?u:jn(l,u),e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2),n.tag=1,kn(l)?(e=!0,Ji(n)):e=!1,to(n,o),Ms(n,l,u),Bs(n,l,u,o),Ra(null,n,l,!0,e,o);case 19:return vr(e,n,o);case 23:return xa(e,n,o);case 24:return xa(e,n,o)}throw Error(B(156,n.tag))};function hl(e,n,o,l){this.tag=e,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function zn(e,n,o,l){return new hl(e,n,o,l)}function ml(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ha(e){if(typeof e=="function")return ml(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ie)return 11;if(e===ge)return 14}return 2}function li(e,n){var o=e.alternate;return o===null?(o=zn(e.tag,n,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=n,o.type=e.type,o.flags=0,o.nextEffect=null,o.firstEffect=null,o.lastEffect=null),o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,n=e.dependencies,o.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o}function wo(e,n,o,l,u,f){var m=2;if(l=e,typeof e=="function")ml(e)&&(m=1);else if(typeof e=="string")m=5;else e:switch(e){case Ze:return ai(o.children,u,f,n);case A:m=8,u|=16;break;case Ye:m=8,u|=1;break;case ue:return e=zn(12,o,n,u|8),e.elementType=ue,e.type=ue,e.lanes=f,e;case me:return e=zn(13,o,n,u),e.type=me,e.elementType=me,e.lanes=f,e;case q:return e=zn(19,o,n,u),e.elementType=q,e.lanes=f,e;case $:return rs(o,u,f,n);case H:return e=zn(24,o,n,u),e.elementType=H,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case fe:m=10;break e;case ee:m=9;break e;case ie:m=11;break e;case ge:m=14;break e;case C:m=16,l=null;break e;case V:m=22;break e}throw Error(B(130,e==null?e:typeof e,""))}return n=zn(m,o,n,u),n.elementType=e,n.type=l,n.lanes=f,n}function ai(e,n,o,l){return e=zn(7,e,l,n),e.lanes=o,e}function rs(e,n,o,l){return e=zn(23,e,l,n),e.elementType=$,e.lanes=o,e}function gl(e,n,o){return e=zn(6,e,null,n),e.lanes=o,e}function is(e,n,o){return n=zn(4,e.children!==null?e.children:[],e.key,n),n.lanes=o,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function $a(e,n,o){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=o,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Rl(0),this.expirationTimes=Rl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rl(0),this.mutableSourceEagerHydrationData=null}function _c(e,n,o){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Z,key:l==null?null:""+l,children:e,containerInfo:n,implementation:o}}function yl(e,n,o,l){var u=n.current,f=On(),m=Ar(u);e:if(o){o=o._reactInternals;t:{if(_n(o)!==o||o.tag!==1)throw Error(B(170));var v=o;do{switch(v.tag){case 3:v=v.stateNode.context;break t;case 1:if(kn(v.type)){v=v.stateNode.__reactInternalMemoizedMergedChildContext;break t}}v=v.return}while(v!==null);throw Error(B(171))}if(o.tag===1){var S=o.type;if(kn(S)){o=Lu(o,S,v);break e}}o=v}else o=$r;return n.context===null?n.context=o:n.pendingContext=o,n=mn(f,m),n.payload={element:e},l=l===void 0?null:l,l!==null&&(n.callback=l),yr(u,n),lr(u,m,f),m}function _o(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function Qa(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<n?o:n}}function Xn(e,n){Qa(e,n),(e=e.alternate)&&Qa(e,n)}function ui(){return null}function os(e,n,o){var l=o!=null&&o.hydrationOptions!=null&&o.hydrationOptions.mutableSources||null;if(o=new $a(e,n,o!=null&&o.hydrate===!0),n=zn(3,null,null,n===2?7:n===1?3:0),o.current=n,n.stateNode=o,lt(n),e[Wr]=o.current,$i(e.nodeType===8?e.parentNode:e),l)for(e=0;e<l.length;e++){n=l[e];var u=n._getVersion;u=u(n._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[n,u]:o.mutableSourceEagerHydrationData.push(n,u)}this._internalRoot=o}os.prototype.render=function(e){yl(e,this._internalRoot,null,null)},os.prototype.unmount=function(){var e=this._internalRoot,n=e.containerInfo;yl(null,e,null,function(){n[Wr]=null})};function ki(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Sc(e,n){if(n||(n=e?e.nodeType===9?e.documentElement:e.firstChild:null,n=!(!n||n.nodeType!==1||!n.hasAttribute("data-reactroot"))),!n)for(var o;o=e.lastChild;)e.removeChild(o);return new os(e,0,n?{hydrate:!0}:void 0)}function wr(e,n,o,l,u){var f=o._reactRootContainer;if(f){var m=f._internalRoot;if(typeof u=="function"){var v=u;u=function(){var I=_o(m);v.call(I)}}yl(n,m,e,u)}else{if(f=o._reactRootContainer=Sc(o,l),m=f._internalRoot,typeof u=="function"){var S=u;u=function(){var I=_o(m);S.call(I)}}cl(function(){yl(n,m,e,u)})}return _o(m)}Cr=function(e){if(e.tag===13){var n=On();lr(e,4,n),Xn(e,4)}},mi=function(e){if(e.tag===13){var n=On();lr(e,67108864,n),Xn(e,67108864)}},Mr=function(e){if(e.tag===13){var n=On(),o=Ar(e);lr(e,o,n),Xn(e,o)}},fr=function(e,n){return n()},Be=function(e,n,o){switch(n){case"input":if(hi(e,o),n=o.name,o.type==="radio"&&n!=null){for(o=e;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<o.length;n++){var l=o[n];if(l!==e&&l.form===e.form){var u=Xi(l);if(!u)throw Error(B(90));Ut(l),hi(l,u)}}}break;case"textarea":y(e,o);break;case"select":n=o.value,n!=null&&Er(e,!!o.multiple,n,!1)}},xt=fc,Je=function(e,n,o,l,u){var f=xe;xe|=4;try{return Or(98,e.bind(null,n,o,l,u))}finally{xe=f,xe===0&&(ei(),gr())}},an=function(){(xe&49)===0&&(nd(),Vt())},Ke=function(e,n){var o=xe;xe|=2;try{return e(n)}finally{xe=o,xe===0&&(ei(),gr())}};function Ka(e,n){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ki(n))throw Error(B(200));return _c(e,n,null,o)}var Ga={Events:[Ao,Yi,Xi,qe,Re,Vt,{current:!1}]},Ii={findFiberByHostInstance:Vr,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},_r={bundleType:Ii.bundleType,version:Ii.version,rendererPackageName:Ii.rendererPackageName,rendererConfig:Ii.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:He.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=xr(e),e===null?null:e.stateNode},findFiberByHostInstance:Ii.findFiberByHostInstance||ui,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vl.isDisabled&&vl.supportsFiber)try{oa=vl.inject(_r),mr=vl}catch{}}K.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ga,K.createPortal=Ka,K.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(B(188)):Error(B(268,Object.keys(e)));return e=xr(n),e=e===null?null:e.stateNode,e},K.flushSync=function(e,n){var o=xe;if((o&48)!==0)return e(n);xe|=1;try{if(e)return Or(99,e.bind(null,n))}finally{xe=o,gr()}},K.hydrate=function(e,n,o){if(!ki(n))throw Error(B(200));return wr(null,e,n,!0,o)},K.render=function(e,n,o){if(!ki(n))throw Error(B(200));return wr(null,e,n,!1,o)},K.unmountComponentAtNode=function(e){if(!ki(e))throw Error(B(40));return e._reactRootContainer?(cl(function(){wr(null,null,e,!1,function(){e._reactRootContainer=null,e[Wr]=null})}),!0):!1},K.unstable_batchedUpdates=fc,K.unstable_createPortal=function(e,n){return Ka(e,n,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)},K.unstable_renderSubtreeIntoContainer=function(e,n,o,l){if(!ki(o))throw Error(B(200));if(e==null||e._reactInternals===void 0)throw Error(B(38));return wr(e,n,o,!1,l)},K.version="17.0.2"},874(en,K,Xe){"use strict";function Ot(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ot)}catch(Ae){console.error(Ae)}}Ot(),en.exports=Xe(638)},926(en,K,Xe){"use strict";/** @license React v17.0.2
44
+ Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}bt!==5&&(bt=2),S=Oa(S,v),W=m;do{switch(W.tag){case 3:f=S,W.flags|=4096,n&=-n,W.lanes|=n;var Ie=Da(W,f,n);Qu(W,Ie);break e;case 1:f=S;var oe=W.type,be=W.stateNode;if((W.flags&64)===0&&(typeof oe.getDerivedStateFromError=="function"||be!==null&&typeof be.componentDidCatch=="function"&&(Gn===null||!Gn.has(be)))){W.flags|=4096,n&=-n,W.lanes|=n;var Ue=En(W,f,n);Qu(W,Ue);break e}}W=W.return}while(W!==null)}fl(o)}catch(Le){n=Le,en===o&&o!==null&&(en=o=o.return);continue}break}while(!0)}function Ua(){var e=es.current;return es.current=or,e===null?or:e}function vo(e,n){var o=xe;xe|=16;var l=Ua();Tn===e&&vn===n||Ri(e,n);do try{rd();break}catch(u){pc(e,u)}while(!0);if(ca(),xe=o,es.current=l,en!==null)throw Error(B(261));return Tn=null,vn=0,bt}function rd(){for(;en!==null;)Za(en)}function hc(){for(;en!==null&&!qc();)Za(en)}function Za(e){var n=Va(e.alternate,e,Ci);e.memoizedProps=e.pendingProps,n===null?fl(e):en=n,La.current=null}function fl(e){var n=e;do{var o=n.alternate;if(e=n.return,(n.flags&2048)===0){if(o=ba(o,n,Ci),o!==null){en=o;return}if(o=n,o.tag!==24&&o.tag!==23||o.memoizedState===null||(Ci&1073741824)!==0||(o.mode&4)===0){for(var l=0,u=o.child;u!==null;)l|=u.lanes|u.childLanes,u=u.sibling;o.childLanes=l}e!==null&&(e.flags&2048)===0&&(e.firstEffect===null&&(e.firstEffect=n.firstEffect),n.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=n.firstEffect),e.lastEffect=n.lastEffect),1<n.flags&&(e.lastEffect!==null?e.lastEffect.nextEffect=n:e.firstEffect=n,e.lastEffect=n))}else{if(o=Js(n),o!==null){o.flags&=2047,en=o;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(n=n.sibling,n!==null){en=n;return}en=n=e}while(n!==null);bt===0&&(bt=5)}function Fr(e){var n=dn();return Or(99,pl.bind(null,e,n)),null}function pl(e,n){do Ht();while(ti!==null);if((xe&48)!==0)throw Error(B(327));var o=e.finishedWork;if(o===null)return null;if(e.finishedWork=null,e.finishedLanes=0,o===e.current)throw Error(B(177));e.callbackNode=null;var l=o.lanes|o.childLanes,u=l,f=e.pendingLanes&~u;e.pendingLanes=u,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=u,e.mutableReadLanes&=u,e.entangledLanes&=u,u=e.entanglements;for(var m=e.eventTimes,v=e.expirationTimes;0<f;){var S=31-Pr(f),I=1<<S;u[S]=0,m[S]=-1,v[S]=-1,f&=~I}if(bn!==null&&(l&24)===0&&bn.has(e)&&bn.delete(e),e===Tn&&(en=Tn=null,vn=0),1<o.flags?o.lastEffect!==null?(o.lastEffect.nextEffect=o,l=o.firstEffect):l=o:l=o.firstEffect,l!==null){if(u=xe,xe|=32,La.current=null,Rs=gs,m=Iu(),Oo(m)){if("selectionStart"in m)v={start:m.selectionStart,end:m.selectionEnd};else e:if(v=(v=m.ownerDocument)&&v.defaultView||window,(I=v.getSelection&&v.getSelection())&&I.rangeCount!==0){v=I.anchorNode,f=I.anchorOffset,S=I.focusNode,I=I.focusOffset;try{v.nodeType,S.nodeType}catch{v=null;break e}var J=0,ke=-1,W=-1,de=0,Ce=0,we=m,k=null;t:for(;;){for(var T;we!==v||f!==0&&we.nodeType!==3||(ke=J+f),we!==S||I!==0&&we.nodeType!==3||(W=J+I),we.nodeType===3&&(J+=we.nodeValue.length),(T=we.firstChild)!==null;)k=we,we=T;for(;;){if(we===m)break t;if(k===v&&++de===f&&(ke=J),k===S&&++Ce===I&&(W=J),(T=we.nextSibling)!==null)break;we=k,k=we.parentNode}we=T}v=ke===-1||W===-1?null:{start:ke,end:W}}else v=null;v=v||{start:0,end:0}}else v=null;ta={focusedElem:m,selectionRange:v},gs=!1,mo=null,go=!1,re=l;do try{mc()}catch(Le){if(re===null)throw Error(B(330));si(re,Le),re=re.nextEffect}while(re!==null);mo=null,re=l;do try{for(m=e;re!==null;){var P=re.flags;if(P&16&&ve(re.stateNode,""),P&128){var j=re.alternate;if(j!==null){var z=j.ref;z!==null&&(typeof z=="function"?z(null):z.current=null)}}switch(P&1038){case 2:qo(re),re.flags&=-3;break;case 6:qo(re),re.flags&=-3,co(re.alternate,re);break;case 1024:re.flags&=-1025;break;case 1028:re.flags&=-1025,co(re.alternate,re);break;case 4:co(re.alternate,re);break;case 8:v=re,xi(m,v);var Ie=v.alternate;nl(v),Ie!==null&&nl(Ie)}re=re.nextEffect}}catch(Le){if(re===null)throw Error(B(330));si(re,Le),re=re.nextEffect}while(re!==null);if(z=ta,j=Iu(),P=z.focusedElem,m=z.selectionRange,j!==P&&P&&P.ownerDocument&&bo(P.ownerDocument.documentElement,P)){for(m!==null&&Oo(P)&&(j=m.start,z=m.end,z===void 0&&(z=j),"selectionStart"in P?(P.selectionStart=j,P.selectionEnd=Math.min(z,P.value.length)):(z=(j=P.ownerDocument||document)&&j.defaultView||window,z.getSelection&&(z=z.getSelection(),v=P.textContent.length,Ie=Math.min(m.start,v),m=m.end===void 0?Ie:Math.min(m.end,v),!z.extend&&Ie>m&&(v=m,m=Ie,Ie=v),v=Es(P,Ie),f=Es(P,m),v&&f&&(z.rangeCount!==1||z.anchorNode!==v.node||z.anchorOffset!==v.offset||z.focusNode!==f.node||z.focusOffset!==f.offset)&&(j=j.createRange(),j.setStart(v.node,v.offset),z.removeAllRanges(),Ie>m?(z.addRange(j),z.extend(f.node,f.offset)):(j.setEnd(f.node,f.offset),z.addRange(j)))))),j=[],z=P;z=z.parentNode;)z.nodeType===1&&j.push({element:z,left:z.scrollLeft,top:z.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<j.length;P++)z=j[P],z.element.scrollLeft=z.left,z.element.scrollTop=z.top}gs=!!Rs,ta=Rs=null,e.current=o,re=l;do try{for(P=e;re!==null;){var oe=re.flags;if(oe&36&&cc(P,re.alternate,re),oe&128){j=void 0;var be=re.ref;if(be!==null){var Ue=re.stateNode;re.tag,j=Ue,typeof be=="function"?be(j):be.current=j}}re=re.nextEffect}}catch(Le){if(re===null)throw Error(B(330));si(re,Le),re=re.nextEffect}while(re!==null);re=null,ed(),xe=u}else e.current=o;if(Bn)Bn=!1,ti=e,Pi=n;else for(re=l;re!==null;)n=re.nextEffect,re.nextEffect=null,re.flags&8&&(oe=re,oe.sibling=null,oe.stateNode=null),re=n;if(l=e.pendingLanes,l===0&&(Gn=null),l===1?e===ri?ni++:(ni=0,ri=e):ni=0,o=o.stateNode,mr&&typeof mr.onCommitFiberRoot=="function")try{mr.onCommitFiberRoot(oa,o,void 0,(o.current.flags&64)===64)}catch{}if(Nn(e,yt()),ns)throw ns=!1,e=al,al=null,e;return(xe&8)!==0||gr(),null}function mc(){for(;re!==null;){var e=re.alternate;go||mo===null||((re.flags&8)!==0?dr(re,mo)&&(go=!0):re.tag===13&&dc(e,re)&&dr(re,mo)&&(go=!0));var n=re.flags;(n&256)!==0&&Jt(e,re),(n&512)===0||Bn||(Bn=!0,Mo(97,function(){return Ht(),null})),re=re.nextEffect}}function Ht(){if(Pi!==90){var e=97<Pi?97:Pi;return Pi=90,Or(e,yc)}return!1}function oi(e,n){ul.push(n,e),Bn||(Bn=!0,Mo(97,function(){return Ht(),null}))}function gc(e,n){po.push(n,e),Bn||(Bn=!0,Mo(97,function(){return Ht(),null}))}function yc(){if(ti===null)return!1;var e=ti;if(ti=null,(xe&48)!==0)throw Error(B(331));var n=xe;xe|=32;var o=po;po=[];for(var l=0;l<o.length;l+=2){var u=o[l],f=o[l+1],m=u.destroy;if(u.destroy=void 0,typeof m=="function")try{m()}catch(S){if(f===null)throw Error(B(330));si(f,S)}}for(o=ul,ul=[],l=0;l<o.length;l+=2){u=o[l],f=o[l+1];try{var v=u.create;u.destroy=v()}catch(S){if(f===null)throw Error(B(330));si(f,S)}}for(v=e.current.firstEffect;v!==null;)e=v.nextEffect,v.nextEffect=null,v.flags&8&&(v.sibling=null,v.stateNode=null),v=e;return xe=n,gr(),!0}function Wa(e,n,o){n=Oa(o,n),n=Da(e,n,1),yr(e,n),n=On(),e=ii(e,1),e!==null&&(ms(e,1,n),Nn(e,n))}function si(e,n){if(e.tag===3)Wa(e,e,n);else for(var o=e.return;o!==null;){if(o.tag===3){Wa(o,e,n);break}else if(o.tag===1){var l=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Gn===null||!Gn.has(l))){e=Oa(n,e);var u=En(o,e,1);if(yr(o,u),u=On(),o=ii(o,1),o!==null)ms(o,1,u),Nn(o,u);else if(typeof l.componentDidCatch=="function"&&(Gn===null||!Gn.has(l)))try{l.componentDidCatch(n,e)}catch{}break}}o=o.return}}function vc(e,n,o){var l=e.pingCache;l!==null&&l.delete(n),n=On(),e.pingedLanes|=e.suspendedLanes&o,Tn===e&&(vn&o)===o&&(bt===4||bt===3&&(vn&62914560)===vn&&500>yt()-sl?Ri(e,0):ol|=o),Nn(e,n)}function wc(e,n){var o=e.stateNode;o!==null&&o.delete(n),n=0,n===0&&(n=e.mode,(n&2)===0?n=1:(n&4)===0?n=dn()===99?1:2:(Yn===0&&(Yn=qr),n=Ur(62914560&~Yn),n===0&&(n=4194304))),o=On(),e=ii(e,n),e!==null&&(ms(e,n,o),Nn(e,o))}var Va;Va=function(e,n,o){var l=n.lanes;if(e!==null)if(e.memoizedProps!==n.pendingProps||Rn.current)vt=!0;else if((o&l)!==0)vt=(e.flags&16384)!==0;else{switch(vt=!1,n.tag){case 3:yn(n),Ho();break;case 5:Us(n);break;case 1:kn(n.type)&&Ji(n);break;case 4:Kr(n,n.stateNode.containerInfo);break;case 10:l=n.memoizedProps.value;var u=n.type._context;Ft(Ds,u._currentValue),u._currentValue=l;break;case 13:if(n.memoizedState!==null)return(o&n.child.childLanes)!==0?ka(e,n,o):(Ft(Lt,Lt.current&1),n=sr(e,n,o),n!==null?n.sibling:null);Ft(Lt,Lt.current&1);break;case 19:if(l=(o&n.childLanes)!==0,(e.flags&64)!==0){if(l)return vr(e,n,o);n.flags|=64}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),Ft(Lt,Lt.current),l)break;return null;case 23:case 24:return n.lanes=0,xa(e,n,o)}return sr(e,n,o)}else vt=!1;switch(n.lanes=0,n.tag){case 2:if(l=n.type,e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2),e=n.pendingProps,u=qi(n,on.current),to(n,o),u=ec(null,n,l,e,u,o),n.flags|=1,typeof u=="object"&&u!==null&&typeof u.render=="function"&&u.$$typeof===void 0){if(n.tag=1,n.memoizedState=null,n.updateQueue=null,kn(l)){var f=!0;Ji(n)}else f=!1;n.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,lt(n);var m=l.getDerivedStateFromProps;typeof m=="function"&&Ls(n,l,m,e),u.updater=js,n.stateNode=u,u._reactInternals=n,Bs(n,l,e,o),n=Ra(null,n,l,!0,f,o)}else n.tag=0,gn(null,n,u,o),n=n.child;return n;case 16:u=n.elementType;e:{switch(e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2),e=n.pendingProps,f=u._init,u=f(u._payload),n.type=u,f=n.tag=Ha(u),e=jn(u,e),f){case 0:n=Qs(null,n,u,e,o);break e;case 1:n=Pa(null,n,u,e,o);break e;case 11:n=Ta(null,n,u,e,o);break e;case 14:n=oc(null,n,u,jn(u.type,e),l,o);break e}throw Error(B(306,u,""))}return n;case 0:return l=n.type,u=n.pendingProps,u=n.elementType===l?u:jn(l,u),Qs(e,n,l,u,o);case 1:return l=n.type,u=n.pendingProps,u=n.elementType===l?u:jn(l,u),Pa(e,n,l,u,o);case 3:if(yn(n),l=n.updateQueue,e===null||l===null)throw Error(B(282));if(l=n.pendingProps,u=n.memoizedState,u=u!==null?u.element:null,$u(e,n),_i(n,l,null,o),l=n.memoizedState.element,l===u)Ho(),n=sr(e,n,o);else{if(u=n.stateNode,(f=u.hydrate)&&(Yr=Gi(n.stateNode.containerInfo.firstChild),Mn=n,f=Qn=!0),f){if(e=u.mutableSourceEagerHydrationData,e!=null)for(u=0;u<e.length;u+=2)f=e[u],f._workInProgressVersionPrimary=e[u+1],oo.push(f);for(o=ro(n,null,l,o),n.child=o;o;)o.flags=o.flags&-3|1024,o=o.sibling}else gn(e,n,l,o),Ho();n=n.child}return n;case 5:return Us(n),e===null&&kt(n),l=n.type,u=n.pendingProps,f=e!==null?e.memoizedProps:null,m=u.children,na(l,u)?m=null:f!==null&&na(l,f)&&(n.flags|=16),Ca(e,n),gn(e,n,m,o),n.child;case 6:return e===null&&kt(n),null;case 13:return ka(e,n,o);case 4:return Kr(n,n.stateNode.containerInfo),l=n.pendingProps,e===null?n.child=Qr(n,null,l,o):gn(e,n,l,o),n.child;case 11:return l=n.type,u=n.pendingProps,u=n.elementType===l?u:jn(l,u),Ta(e,n,l,u,o);case 7:return gn(e,n,n.pendingProps,o),n.child;case 8:return gn(e,n,n.pendingProps.children,o),n.child;case 12:return gn(e,n,n.pendingProps.children,o),n.child;case 10:e:{l=n.type._context,u=n.pendingProps,m=n.memoizedProps,f=u.value;var v=n.type._context;if(Ft(Ds,v._currentValue),v._currentValue=f,m!==null)if(v=m.value,f=Pn(v,f)?0:(typeof l._calculateChangedBits=="function"?l._calculateChangedBits(v,f):1073741823)|0,f===0){if(m.children===u.children&&!Rn.current){n=sr(e,n,o);break e}}else for(v=n.child,v!==null&&(v.return=n);v!==null;){var S=v.dependencies;if(S!==null){m=v.child;for(var I=S.firstContext;I!==null;){if(I.context===l&&(I.observedBits&f)!==0){v.tag===1&&(I=mn(-1,o&-o),I.tag=2,yr(v,I)),v.lanes|=o,I=v.alternate,I!==null&&(I.lanes|=o),Fs(v.return,o),S.lanes|=o;break}I=I.next}}else m=v.tag===10&&v.type===n.type?null:v.child;if(m!==null)m.return=v;else for(m=v;m!==null;){if(m===n){m=null;break}if(v=m.sibling,v!==null){v.return=m.return,m=v;break}m=m.return}v=m}gn(e,n,u.children,o),n=n.child}return n;case 9:return u=n.type,f=n.pendingProps,l=f.children,to(n,o),u=Vn(u,f.unstable_observedBits),l=l(u),n.flags|=1,gn(e,n,l,o),n.child;case 14:return u=n.type,f=jn(u,n.pendingProps),f=jn(u.type,f),oc(e,n,u,f,l,o);case 15:return sc(e,n,n.type,n.pendingProps,l,o);case 17:return l=n.type,u=n.pendingProps,u=n.elementType===l?u:jn(l,u),e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2),n.tag=1,kn(l)?(e=!0,Ji(n)):e=!1,to(n,o),Ms(n,l,u),Bs(n,l,u,o),Ra(null,n,l,!0,e,o);case 19:return vr(e,n,o);case 23:return xa(e,n,o);case 24:return xa(e,n,o)}throw Error(B(156,n.tag))};function hl(e,n,o,l){this.tag=e,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function zn(e,n,o,l){return new hl(e,n,o,l)}function ml(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ha(e){if(typeof e=="function")return ml(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ie)return 11;if(e===ge)return 14}return 2}function li(e,n){var o=e.alternate;return o===null?(o=zn(e.tag,n,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=n,o.type=e.type,o.flags=0,o.nextEffect=null,o.firstEffect=null,o.lastEffect=null),o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,n=e.dependencies,o.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o}function wo(e,n,o,l,u,f){var m=2;if(l=e,typeof e=="function")ml(e)&&(m=1);else if(typeof e=="string")m=5;else e:switch(e){case Ze:return ai(o.children,u,f,n);case A:m=8,u|=16;break;case Ye:m=8,u|=1;break;case ue:return e=zn(12,o,n,u|8),e.elementType=ue,e.type=ue,e.lanes=f,e;case me:return e=zn(13,o,n,u),e.type=me,e.elementType=me,e.lanes=f,e;case q:return e=zn(19,o,n,u),e.elementType=q,e.lanes=f,e;case $:return rs(o,u,f,n);case H:return e=zn(24,o,n,u),e.elementType=H,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case fe:m=10;break e;case ee:m=9;break e;case ie:m=11;break e;case ge:m=14;break e;case C:m=16,l=null;break e;case V:m=22;break e}throw Error(B(130,e==null?e:typeof e,""))}return n=zn(m,o,n,u),n.elementType=e,n.type=l,n.lanes=f,n}function ai(e,n,o,l){return e=zn(7,e,l,n),e.lanes=o,e}function rs(e,n,o,l){return e=zn(23,e,l,n),e.elementType=$,e.lanes=o,e}function gl(e,n,o){return e=zn(6,e,null,n),e.lanes=o,e}function is(e,n,o){return n=zn(4,e.children!==null?e.children:[],e.key,n),n.lanes=o,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function $a(e,n,o){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=o,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Rl(0),this.expirationTimes=Rl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rl(0),this.mutableSourceEagerHydrationData=null}function _c(e,n,o){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Z,key:l==null?null:""+l,children:e,containerInfo:n,implementation:o}}function yl(e,n,o,l){var u=n.current,f=On(),m=Ar(u);e:if(o){o=o._reactInternals;t:{if(_n(o)!==o||o.tag!==1)throw Error(B(170));var v=o;do{switch(v.tag){case 3:v=v.stateNode.context;break t;case 1:if(kn(v.type)){v=v.stateNode.__reactInternalMemoizedMergedChildContext;break t}}v=v.return}while(v!==null);throw Error(B(171))}if(o.tag===1){var S=o.type;if(kn(S)){o=Lu(o,S,v);break e}}o=v}else o=$r;return n.context===null?n.context=o:n.pendingContext=o,n=mn(f,m),n.payload={element:e},l=l===void 0?null:l,l!==null&&(n.callback=l),yr(u,n),lr(u,m,f),m}function _o(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function Qa(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<n?o:n}}function Xn(e,n){Qa(e,n),(e=e.alternate)&&Qa(e,n)}function ui(){return null}function os(e,n,o){var l=o!=null&&o.hydrationOptions!=null&&o.hydrationOptions.mutableSources||null;if(o=new $a(e,n,o!=null&&o.hydrate===!0),n=zn(3,null,null,n===2?7:n===1?3:0),o.current=n,n.stateNode=o,lt(n),e[Wr]=o.current,$i(e.nodeType===8?e.parentNode:e),l)for(e=0;e<l.length;e++){n=l[e];var u=n._getVersion;u=u(n._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[n,u]:o.mutableSourceEagerHydrationData.push(n,u)}this._internalRoot=o}os.prototype.render=function(e){yl(e,this._internalRoot,null,null)},os.prototype.unmount=function(){var e=this._internalRoot,n=e.containerInfo;yl(null,e,null,function(){n[Wr]=null})};function ki(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Sc(e,n){if(n||(n=e?e.nodeType===9?e.documentElement:e.firstChild:null,n=!(!n||n.nodeType!==1||!n.hasAttribute("data-reactroot"))),!n)for(var o;o=e.lastChild;)e.removeChild(o);return new os(e,0,n?{hydrate:!0}:void 0)}function wr(e,n,o,l,u){var f=o._reactRootContainer;if(f){var m=f._internalRoot;if(typeof u=="function"){var v=u;u=function(){var I=_o(m);v.call(I)}}yl(n,m,e,u)}else{if(f=o._reactRootContainer=Sc(o,l),m=f._internalRoot,typeof u=="function"){var S=u;u=function(){var I=_o(m);S.call(I)}}cl(function(){yl(n,m,e,u)})}return _o(m)}Cr=function(e){if(e.tag===13){var n=On();lr(e,4,n),Xn(e,4)}},mi=function(e){if(e.tag===13){var n=On();lr(e,67108864,n),Xn(e,67108864)}},Mr=function(e){if(e.tag===13){var n=On(),o=Ar(e);lr(e,o,n),Xn(e,o)}},fr=function(e,n){return n()},Be=function(e,n,o){switch(n){case"input":if(hi(e,o),n=o.name,o.type==="radio"&&n!=null){for(o=e;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<o.length;n++){var l=o[n];if(l!==e&&l.form===e.form){var u=Xi(l);if(!u)throw Error(B(90));Ut(l),hi(l,u)}}}break;case"textarea":y(e,o);break;case"select":n=o.value,n!=null&&Er(e,!!o.multiple,n,!1)}},Je=fc,Ke=function(e,n,o,l,u){var f=xe;xe|=4;try{return Or(98,e.bind(null,n,o,l,u))}finally{xe=f,xe===0&&(ei(),gr())}},Zt=function(){(xe&49)===0&&(nd(),Ht())},Ge=function(e,n){var o=xe;xe|=2;try{return e(n)}finally{xe=o,xe===0&&(ei(),gr())}};function Ka(e,n){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ki(n))throw Error(B(200));return _c(e,n,null,o)}var Ga={Events:[Ao,Yi,Xi,xt,Fe,Ht,{current:!1}]},Ii={findFiberByHostInstance:Vr,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},_r={bundleType:Ii.bundleType,version:Ii.version,rendererPackageName:Ii.rendererPackageName,rendererConfig:Ii.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:$e.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=xr(e),e===null?null:e.stateNode},findFiberByHostInstance:Ii.findFiberByHostInstance||ui,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vl.isDisabled&&vl.supportsFiber)try{oa=vl.inject(_r),mr=vl}catch{}}K.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ga,K.createPortal=Ka,K.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(B(188)):Error(B(268,Object.keys(e)));return e=xr(n),e=e===null?null:e.stateNode,e},K.flushSync=function(e,n){var o=xe;if((o&48)!==0)return e(n);xe|=1;try{if(e)return Or(99,e.bind(null,n))}finally{xe=o,gr()}},K.hydrate=function(e,n,o){if(!ki(n))throw Error(B(200));return wr(null,e,n,!0,o)},K.render=function(e,n,o){if(!ki(n))throw Error(B(200));return wr(null,e,n,!1,o)},K.unmountComponentAtNode=function(e){if(!ki(e))throw Error(B(40));return e._reactRootContainer?(cl(function(){wr(null,null,e,!1,function(){e._reactRootContainer=null,e[Wr]=null})}),!0):!1},K.unstable_batchedUpdates=fc,K.unstable_createPortal=function(e,n){return Ka(e,n,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)},K.unstable_renderSubtreeIntoContainer=function(e,n,o,l){if(!ki(o))throw Error(B(200));if(e==null||e._reactInternals===void 0)throw Error(B(38));return wr(e,n,o,!1,l)},K.version="17.0.2"},874(tn,K,qe){"use strict";function Ot(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ot)}catch(De){console.error(De)}}Ot(),tn.exports=qe(638)},926(tn,K,qe){"use strict";/** @license React v17.0.2
45
45
  * react.production.min.js
46
46
  *
47
47
  * Copyright (c) Facebook, Inc. and its affiliates.
48
48
  *
49
49
  * This source code is licensed under the MIT license found in the
50
50
  * LICENSE file in the root directory of this source tree.
51
- */var Ot=Xe(575),Ae=60103,it=60106;K.Fragment=60107,K.StrictMode=60108,K.Profiler=60114;var B=60109,wn=60110,Et=60112;K.Suspense=60113;var Tt=60115,b=60116;if(typeof Symbol=="function"&&Symbol.for){var Y=Symbol.for;Ae=Y("react.element"),it=Y("react.portal"),K.Fragment=Y("react.fragment"),K.StrictMode=Y("react.strict_mode"),K.Profiler=Y("react.profiler"),B=Y("react.provider"),wn=Y("react.context"),Et=Y("react.forward_ref"),K.Suspense=Y("react.suspense"),Tt=Y("react.memo"),b=Y("react.lazy")}var c=typeof Symbol=="function"&&Symbol.iterator;function Mt(C){return C===null||typeof C!="object"?null:(C=c&&C[c]||C["@@iterator"],typeof C=="function"?C:null)}function ht(C){for(var V="https://reactjs.org/docs/error-decoder.html?invariant="+C,F=1;F<arguments.length;F++)V+="&args[]="+encodeURIComponent(arguments[F]);return"Minified React error #"+C+"; visit "+V+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Ve={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},at={};function Pt(C,V,F){this.props=C,this.context=V,this.refs=at,this.updater=F||Ve}Pt.prototype.isReactComponent={},Pt.prototype.setState=function(C,V){if(typeof C!="object"&&typeof C!="function"&&C!=null)throw Error(ht(85));this.updater.enqueueSetState(this,C,V,"setState")},Pt.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function tt(){}tt.prototype=Pt.prototype;function ot(C,V,F){this.props=C,this.context=V,this.refs=at,this.updater=F||Ve}var te=ot.prototype=new tt;te.constructor=ot,Ot(te,Pt.prototype),te.isPureReactComponent=!0;var ae={current:null},_e=Object.prototype.hasOwnProperty,Ne={key:!0,ref:!0,__self:!0,__source:!0};function He(C,V,F){var A,$={},H=null,ne=null;if(V!=null)for(A in V.ref!==void 0&&(ne=V.ref),V.key!==void 0&&(H=""+V.key),V)_e.call(V,A)&&!Ne.hasOwnProperty(A)&&($[A]=V[A]);var U=arguments.length-2;if(U===1)$.children=F;else if(1<U){for(var ye=Array(U),M=0;M<U;M++)ye[M]=arguments[M+2];$.children=ye}if(C&&C.defaultProps)for(A in U=C.defaultProps,U)$[A]===void 0&&($[A]=U[A]);return{$$typeof:Ae,type:C,key:H,ref:ne,props:$,_owner:ae.current}}function st(C,V){return{$$typeof:Ae,type:C.type,key:V,ref:C.ref,props:C.props,_owner:C._owner}}function Z(C){return typeof C=="object"&&C!==null&&C.$$typeof===Ae}function Ze(C){var V={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(F){return V[F]})}var Ye=/\/+/g;function ue(C,V){return typeof C=="object"&&C!==null&&C.key!=null?Ze(""+C.key):V.toString(36)}function fe(C,V,F,A,$){var H=typeof C;(H==="undefined"||H==="boolean")&&(C=null);var ne=!1;if(C===null)ne=!0;else switch(H){case"string":case"number":ne=!0;break;case"object":switch(C.$$typeof){case Ae:case it:ne=!0}}if(ne)return ne=C,$=$(ne),C=A===""?"."+ue(ne,0):A,Array.isArray($)?(F="",C!=null&&(F=C.replace(Ye,"$&/")+"/"),fe($,V,F,"",function(M){return M})):$!=null&&(Z($)&&($=st($,F+(!$.key||ne&&ne.key===$.key?"":(""+$.key).replace(Ye,"$&/")+"/")+C)),V.push($)),1;if(ne=0,A=A===""?".":A+":",Array.isArray(C))for(var U=0;U<C.length;U++){H=C[U];var ye=A+ue(H,U);ne+=fe(H,V,F,ye,$)}else if(ye=Mt(C),typeof ye=="function")for(C=ye.call(C),U=0;!(H=C.next()).done;)H=H.value,ye=A+ue(H,U++),ne+=fe(H,V,F,ye,$);else if(H==="object")throw V=""+C,Error(ht(31,V==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":V));return ne}function ee(C,V,F){if(C==null)return C;var A=[],$=0;return fe(C,A,"","",function(H){return V.call(F,H,$++)}),A}function ie(C){if(C._status===-1){var V=C._result;V=V(),C._status=0,C._result=V,V.then(function(F){C._status===0&&(F=F.default,C._status=1,C._result=F)},function(F){C._status===0&&(C._status=2,C._result=F)})}if(C._status===1)return C._result;throw C._result}var me={current:null};function q(){var C=me.current;if(C===null)throw Error(ht(321));return C}var ge={ReactCurrentDispatcher:me,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:ae,IsSomeRendererActing:{current:!1},assign:Ot};K.Children={map:ee,forEach:function(C,V,F){ee(C,function(){V.apply(this,arguments)},F)},count:function(C){var V=0;return ee(C,function(){V++}),V},toArray:function(C){return ee(C,function(V){return V})||[]},only:function(C){if(!Z(C))throw Error(ht(143));return C}},K.Component=Pt,K.PureComponent=ot,K.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ge,K.cloneElement=function(C,V,F){if(C==null)throw Error(ht(267,C));var A=Ot({},C.props),$=C.key,H=C.ref,ne=C._owner;if(V!=null){if(V.ref!==void 0&&(H=V.ref,ne=ae.current),V.key!==void 0&&($=""+V.key),C.type&&C.type.defaultProps)var U=C.type.defaultProps;for(ye in V)_e.call(V,ye)&&!Ne.hasOwnProperty(ye)&&(A[ye]=V[ye]===void 0&&U!==void 0?U[ye]:V[ye])}var ye=arguments.length-2;if(ye===1)A.children=F;else if(1<ye){U=Array(ye);for(var M=0;M<ye;M++)U[M]=arguments[M+2];A.children=U}return{$$typeof:Ae,type:C.type,key:$,ref:H,props:A,_owner:ne}},K.createContext=function(C,V){return V===void 0&&(V=null),C={$$typeof:wn,_calculateChangedBits:V,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider={$$typeof:B,_context:C},C.Consumer=C},K.createElement=He,K.createFactory=function(C){var V=He.bind(null,C);return V.type=C,V},K.createRef=function(){return{current:null}},K.forwardRef=function(C){return{$$typeof:Et,render:C}},K.isValidElement=Z,K.lazy=function(C){return{$$typeof:b,_payload:{_status:-1,_result:C},_init:ie}},K.memo=function(C,V){return{$$typeof:Tt,type:C,compare:V===void 0?null:V}},K.useCallback=function(C,V){return q().useCallback(C,V)},K.useContext=function(C,V){return q().useContext(C,V)},K.useDebugValue=function(){},K.useEffect=function(C,V){return q().useEffect(C,V)},K.useImperativeHandle=function(C,V,F){return q().useImperativeHandle(C,V,F)},K.useLayoutEffect=function(C,V){return q().useLayoutEffect(C,V)},K.useMemo=function(C,V){return q().useMemo(C,V)},K.useReducer=function(C,V,F){return q().useReducer(C,V,F)},K.useRef=function(C){return q().useRef(C)},K.useState=function(C){return q().useState(C)},K.version="17.0.2"},999(en,K,Xe){"use strict";en.exports=Xe(926)},742(en,K){"use strict";/** @license React v0.20.2
51
+ */var Ot=qe(575),De=60103,it=60106;K.Fragment=60107,K.StrictMode=60108,K.Profiler=60114;var B=60109,wn=60110,Et=60112;K.Suspense=60113;var Tt=60115,b=60116;if(typeof Symbol=="function"&&Symbol.for){var Y=Symbol.for;De=Y("react.element"),it=Y("react.portal"),K.Fragment=Y("react.fragment"),K.StrictMode=Y("react.strict_mode"),K.Profiler=Y("react.profiler"),B=Y("react.provider"),wn=Y("react.context"),Et=Y("react.forward_ref"),K.Suspense=Y("react.suspense"),Tt=Y("react.memo"),b=Y("react.lazy")}var c=typeof Symbol=="function"&&Symbol.iterator;function Mt(C){return C===null||typeof C!="object"?null:(C=c&&C[c]||C["@@iterator"],typeof C=="function"?C:null)}function ht(C){for(var V="https://reactjs.org/docs/error-decoder.html?invariant="+C,L=1;L<arguments.length;L++)V+="&args[]="+encodeURIComponent(arguments[L]);return"Minified React error #"+C+"; visit "+V+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var He={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},at={};function Pt(C,V,L){this.props=C,this.context=V,this.refs=at,this.updater=L||He}Pt.prototype.isReactComponent={},Pt.prototype.setState=function(C,V){if(typeof C!="object"&&typeof C!="function"&&C!=null)throw Error(ht(85));this.updater.enqueueSetState(this,C,V,"setState")},Pt.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function tt(){}tt.prototype=Pt.prototype;function ot(C,V,L){this.props=C,this.context=V,this.refs=at,this.updater=L||He}var te=ot.prototype=new tt;te.constructor=ot,Ot(te,Pt.prototype),te.isPureReactComponent=!0;var ae={current:null},_e=Object.prototype.hasOwnProperty,Oe={key:!0,ref:!0,__self:!0,__source:!0};function $e(C,V,L){var A,$={},H=null,ne=null;if(V!=null)for(A in V.ref!==void 0&&(ne=V.ref),V.key!==void 0&&(H=""+V.key),V)_e.call(V,A)&&!Oe.hasOwnProperty(A)&&($[A]=V[A]);var U=arguments.length-2;if(U===1)$.children=L;else if(1<U){for(var ye=Array(U),M=0;M<U;M++)ye[M]=arguments[M+2];$.children=ye}if(C&&C.defaultProps)for(A in U=C.defaultProps,U)$[A]===void 0&&($[A]=U[A]);return{$$typeof:De,type:C,key:H,ref:ne,props:$,_owner:ae.current}}function st(C,V){return{$$typeof:De,type:C.type,key:V,ref:C.ref,props:C.props,_owner:C._owner}}function Z(C){return typeof C=="object"&&C!==null&&C.$$typeof===De}function Ze(C){var V={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(L){return V[L]})}var Ye=/\/+/g;function ue(C,V){return typeof C=="object"&&C!==null&&C.key!=null?Ze(""+C.key):V.toString(36)}function fe(C,V,L,A,$){var H=typeof C;(H==="undefined"||H==="boolean")&&(C=null);var ne=!1;if(C===null)ne=!0;else switch(H){case"string":case"number":ne=!0;break;case"object":switch(C.$$typeof){case De:case it:ne=!0}}if(ne)return ne=C,$=$(ne),C=A===""?"."+ue(ne,0):A,Array.isArray($)?(L="",C!=null&&(L=C.replace(Ye,"$&/")+"/"),fe($,V,L,"",function(M){return M})):$!=null&&(Z($)&&($=st($,L+(!$.key||ne&&ne.key===$.key?"":(""+$.key).replace(Ye,"$&/")+"/")+C)),V.push($)),1;if(ne=0,A=A===""?".":A+":",Array.isArray(C))for(var U=0;U<C.length;U++){H=C[U];var ye=A+ue(H,U);ne+=fe(H,V,L,ye,$)}else if(ye=Mt(C),typeof ye=="function")for(C=ye.call(C),U=0;!(H=C.next()).done;)H=H.value,ye=A+ue(H,U++),ne+=fe(H,V,L,ye,$);else if(H==="object")throw V=""+C,Error(ht(31,V==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":V));return ne}function ee(C,V,L){if(C==null)return C;var A=[],$=0;return fe(C,A,"","",function(H){return V.call(L,H,$++)}),A}function ie(C){if(C._status===-1){var V=C._result;V=V(),C._status=0,C._result=V,V.then(function(L){C._status===0&&(L=L.default,C._status=1,C._result=L)},function(L){C._status===0&&(C._status=2,C._result=L)})}if(C._status===1)return C._result;throw C._result}var me={current:null};function q(){var C=me.current;if(C===null)throw Error(ht(321));return C}var ge={ReactCurrentDispatcher:me,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:ae,IsSomeRendererActing:{current:!1},assign:Ot};K.Children={map:ee,forEach:function(C,V,L){ee(C,function(){V.apply(this,arguments)},L)},count:function(C){var V=0;return ee(C,function(){V++}),V},toArray:function(C){return ee(C,function(V){return V})||[]},only:function(C){if(!Z(C))throw Error(ht(143));return C}},K.Component=Pt,K.PureComponent=ot,K.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ge,K.cloneElement=function(C,V,L){if(C==null)throw Error(ht(267,C));var A=Ot({},C.props),$=C.key,H=C.ref,ne=C._owner;if(V!=null){if(V.ref!==void 0&&(H=V.ref,ne=ae.current),V.key!==void 0&&($=""+V.key),C.type&&C.type.defaultProps)var U=C.type.defaultProps;for(ye in V)_e.call(V,ye)&&!Oe.hasOwnProperty(ye)&&(A[ye]=V[ye]===void 0&&U!==void 0?U[ye]:V[ye])}var ye=arguments.length-2;if(ye===1)A.children=L;else if(1<ye){U=Array(ye);for(var M=0;M<ye;M++)U[M]=arguments[M+2];A.children=U}return{$$typeof:De,type:C.type,key:$,ref:H,props:A,_owner:ne}},K.createContext=function(C,V){return V===void 0&&(V=null),C={$$typeof:wn,_calculateChangedBits:V,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider={$$typeof:B,_context:C},C.Consumer=C},K.createElement=$e,K.createFactory=function(C){var V=$e.bind(null,C);return V.type=C,V},K.createRef=function(){return{current:null}},K.forwardRef=function(C){return{$$typeof:Et,render:C}},K.isValidElement=Z,K.lazy=function(C){return{$$typeof:b,_payload:{_status:-1,_result:C},_init:ie}},K.memo=function(C,V){return{$$typeof:Tt,type:C,compare:V===void 0?null:V}},K.useCallback=function(C,V){return q().useCallback(C,V)},K.useContext=function(C,V){return q().useContext(C,V)},K.useDebugValue=function(){},K.useEffect=function(C,V){return q().useEffect(C,V)},K.useImperativeHandle=function(C,V,L){return q().useImperativeHandle(C,V,L)},K.useLayoutEffect=function(C,V){return q().useLayoutEffect(C,V)},K.useMemo=function(C,V){return q().useMemo(C,V)},K.useReducer=function(C,V,L){return q().useReducer(C,V,L)},K.useRef=function(C){return q().useRef(C)},K.useState=function(C){return q().useState(C)},K.version="17.0.2"},999(tn,K,qe){"use strict";tn.exports=qe(926)},742(tn,K){"use strict";/** @license React v0.20.2
52
52
  * scheduler.production.min.js
53
53
  *
54
54
  * Copyright (c) Facebook, Inc. and its affiliates.
55
55
  *
56
56
  * This source code is licensed under the MIT license found in the
57
57
  * LICENSE file in the root directory of this source tree.
58
- */var Xe,Ot,Ae,it;if(typeof performance=="object"&&typeof performance.now=="function"){var B=performance;K.unstable_now=function(){return B.now()}}else{var wn=Date,Et=wn.now();K.unstable_now=function(){return wn.now()-Et}}if(typeof window>"u"||typeof MessageChannel!="function"){var Tt=null,b=null,Y=function(){if(Tt!==null)try{var F=K.unstable_now();Tt(!0,F),Tt=null}catch(A){throw setTimeout(Y,0),A}};Xe=function(F){Tt!==null?setTimeout(Xe,0,F):(Tt=F,setTimeout(Y,0))},Ot=function(F,A){b=setTimeout(F,A)},Ae=function(){clearTimeout(b)},K.unstable_shouldYield=function(){return!1},it=K.unstable_forceFrameRate=function(){}}else{var c=window.setTimeout,Mt=window.clearTimeout;if(typeof console<"u"){var ht=window.cancelAnimationFrame;typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof ht!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var Ve=!1,at=null,Pt=-1,tt=5,ot=0;K.unstable_shouldYield=function(){return K.unstable_now()>=ot},it=function(){},K.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):tt=0<F?Math.floor(1e3/F):5};var te=new MessageChannel,ae=te.port2;te.port1.onmessage=function(){if(at!==null){var F=K.unstable_now();ot=F+tt;try{at(!0,F)?ae.postMessage(null):(Ve=!1,at=null)}catch(A){throw ae.postMessage(null),A}}else Ve=!1},Xe=function(F){at=F,Ve||(Ve=!0,ae.postMessage(null))},Ot=function(F,A){Pt=c(function(){F(K.unstable_now())},A)},Ae=function(){Mt(Pt),Pt=-1}}function _e(F,A){var $=F.length;F.push(A);e:for(;;){var H=$-1>>>1,ne=F[H];if(ne!==void 0&&0<st(ne,A))F[H]=A,F[$]=ne,$=H;else break e}}function Ne(F){return F=F[0],F===void 0?null:F}function He(F){var A=F[0];if(A!==void 0){var $=F.pop();if($!==A){F[0]=$;e:for(var H=0,ne=F.length;H<ne;){var U=2*(H+1)-1,ye=F[U],M=U+1,sn=F[M];if(ye!==void 0&&0>st(ye,$))sn!==void 0&&0>st(sn,ye)?(F[H]=sn,F[M]=$,H=M):(F[H]=ye,F[U]=$,H=U);else if(sn!==void 0&&0>st(sn,$))F[H]=sn,F[M]=$,H=M;else break e}}return A}return null}function st(F,A){var $=F.sortIndex-A.sortIndex;return $!==0?$:F.id-A.id}var Z=[],Ze=[],Ye=1,ue=null,fe=3,ee=!1,ie=!1,me=!1;function q(F){for(var A=Ne(Ze);A!==null;){if(A.callback===null)He(Ze);else if(A.startTime<=F)He(Ze),A.sortIndex=A.expirationTime,_e(Z,A);else break;A=Ne(Ze)}}function ge(F){if(me=!1,q(F),!ie)if(Ne(Z)!==null)ie=!0,Xe(C);else{var A=Ne(Ze);A!==null&&Ot(ge,A.startTime-F)}}function C(F,A){ie=!1,me&&(me=!1,Ae()),ee=!0;var $=fe;try{for(q(A),ue=Ne(Z);ue!==null&&(!(ue.expirationTime>A)||F&&!K.unstable_shouldYield());){var H=ue.callback;if(typeof H=="function"){ue.callback=null,fe=ue.priorityLevel;var ne=H(ue.expirationTime<=A);A=K.unstable_now(),typeof ne=="function"?ue.callback=ne:ue===Ne(Z)&&He(Z),q(A)}else He(Z);ue=Ne(Z)}if(ue!==null)var U=!0;else{var ye=Ne(Ze);ye!==null&&Ot(ge,ye.startTime-A),U=!1}return U}finally{ue=null,fe=$,ee=!1}}var V=it;K.unstable_IdlePriority=5,K.unstable_ImmediatePriority=1,K.unstable_LowPriority=4,K.unstable_NormalPriority=3,K.unstable_Profiling=null,K.unstable_UserBlockingPriority=2,K.unstable_cancelCallback=function(F){F.callback=null},K.unstable_continueExecution=function(){ie||ee||(ie=!0,Xe(C))},K.unstable_getCurrentPriorityLevel=function(){return fe},K.unstable_getFirstCallbackNode=function(){return Ne(Z)},K.unstable_next=function(F){switch(fe){case 1:case 2:case 3:var A=3;break;default:A=fe}var $=fe;fe=A;try{return F()}finally{fe=$}},K.unstable_pauseExecution=function(){},K.unstable_requestPaint=V,K.unstable_runWithPriority=function(F,A){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var $=fe;fe=F;try{return A()}finally{fe=$}},K.unstable_scheduleCallback=function(F,A,$){var H=K.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?H+$:H):$=H,F){case 1:var ne=-1;break;case 2:ne=250;break;case 5:ne=1073741823;break;case 4:ne=1e4;break;default:ne=5e3}return ne=$+ne,F={id:Ye++,callback:A,priorityLevel:F,startTime:$,expirationTime:ne,sortIndex:-1},$>H?(F.sortIndex=$,_e(Ze,F),Ne(Z)===null&&F===Ne(Ze)&&(me?Ae():me=!0,Ot(ge,$-H))):(F.sortIndex=ne,_e(Z,F),ie||ee||(ie=!0,Xe(C))),F},K.unstable_wrapCallback=function(F){var A=fe;return function(){var $=fe;fe=A;try{return F.apply(this,arguments)}finally{fe=$}}}},825(en,K,Xe){"use strict";en.exports=Xe(742)}},vd={};function Ac(en){var K=vd[en];if(K!==void 0)return K.exports;var Xe=vd[en]={exports:{}};return Pf[en](Xe,Xe.exports,Ac),Xe.exports}Ac.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})();var wp={};(()=>{"use strict";var en=Ac(216);const K="0.2.0",Xe=[29100,29110,29120,29130],Ot=18e3;var Ae=Object.defineProperty,it=(w,y,E)=>y in w?Ae(w,y,{enumerable:!0,configurable:!0,writable:!0,value:E}):w[y]=E,B=(w,y,E)=>it(w,typeof y!="symbol"?y+"":y,E);const wn=4e3,Et=4003;class Tt{constructor(y){B(this,"ws",null),B(this,"reconnectAttempts",0),B(this,"reconnectTimeout",null),B(this,"messageHandler",null),B(this,"status","disconnected"),B(this,"isShuttingDown",!1),B(this,"isPreempted",!1),B(this,"_sdkReady"),B(this,"config"),this._sdkReady=y.sdkReady,this.config={url:y.url,pluginVersion:y.pluginVersion,sdkReady:y.sdkReady,twinSlotIndex:y.twinSlotIndex,isTwinConnection:y.isTwinConnection??!1,maxReconnectAttempts:y.maxReconnectAttempts??10,initialReconnectDelay:y.initialReconnectDelay??1e3,maxReconnectDelay:y.maxReconnectDelay??3e4,onStatusChange:y.onStatusChange,onLog:y.onLog,onPreempted:y.onPreempted,onTwinOccupied:y.onTwinOccupied,onOtherOccupied:y.onOtherOccupied}}log(y,E="info"){this.config.onLog?.(y,E)}setStatus(y){this.status!==y&&(this.status=y,this.config.onStatusChange?.(y))}sendHello(){const y={type:"hello",version:this.config.pluginVersion,sdkReady:this._sdkReady,twinSlotIndex:this.config.twinSlotIndex};try{this.ws?.send(JSON.stringify(y)),this.log(`\u53D1\u9001 hello\uFF08v${this.config.pluginVersion}, sdkReady=${this._sdkReady}, twinSlot=${this.config.twinSlotIndex}\uFF09`)}catch(E){this.log(`\u53D1\u9001 hello \u5931\u8D25: ${E}`,"warn")}}connect(){if(!(this.ws?.readyState===WebSocket.OPEN||this.ws?.readyState===WebSocket.CONNECTING)){this.isShuttingDown=!1,this.isPreempted=!1,this.setStatus("connecting");try{this.ws=new WebSocket(this.config.url),this.ws.onopen=()=>{this.log("\u5DF2\u8FDE\u63A5\u5230\u5B88\u62A4\u8FDB\u7A0B"),this.reconnectAttempts=0,this.setStatus("connected"),this.sendHello()},this.ws.onmessage=async y=>{await this.handleMessage(typeof y.data=="string"?y.data:String(y.data))},this.ws.onclose=y=>{y.code!==1006&&this.log(`\u8FDE\u63A5\u65AD\u5F00: ${y.code} ${y.reason}`,"warn"),this.setStatus("disconnected"),y.code===Et?this.config.onTwinOccupied?.():y.code===wn&&this.config.onOtherOccupied?.(),this.isShuttingDown||this.scheduleReconnect()},this.ws.onerror=()=>{}}catch(y){this.log(`\u8FDE\u63A5\u5931\u8D25: ${y}`,"error"),this.setStatus("disconnected"),this.scheduleReconnect()}}}async handleMessage(y){try{const E=JSON.parse(y);if(E.type==="preempted"){this.isPreempted=!0,this.log(`\u88AB\u5B6A\u751F Plugin \u62A2\u5360: ${E.reason}`,"warn"),this.config.onPreempted?.();return}if(E.type==="ping"){this.ws?.send(JSON.stringify({type:"pong"}));return}if(E.id&&E.action&&this.messageHandler){const R=E;this.log(`\u6536\u5230\u8BF7\u6C42: ${R.action}`);try{const N=await this.messageHandler(R),j={id:R.id,result:N};this.ws?.send(JSON.stringify(j)),this.log(`\u5B8C\u6210: ${R.action}`)}catch(N){const j=N instanceof Error?N.message:String(N),Q={id:R.id,error:j};this.ws?.send(JSON.stringify(Q)),this.log(`\u5931\u8D25: ${R.action} - ${j}`,"error")}}}catch(E){this.log(`\u5904\u7406\u6D88\u606F\u5931\u8D25: ${E}`,"error")}}scheduleReconnect(){if(this.isShuttingDown||this.isPreempted||!this.config.isTwinConnection)return;if(this.reconnectAttempts>=this.config.maxReconnectAttempts){this.log("\u5DF2\u8FBE\u6700\u5927\u91CD\u8FDE\u6B21\u6570","error");return}const y=Math.min(this.config.initialReconnectDelay*Math.pow(2,this.reconnectAttempts),this.config.maxReconnectDelay),E=Math.random()*.3*y,R=y+E;this.reconnectAttempts++,this.log(`${Math.round(R)}ms \u540E\u91CD\u8FDE\uFF08\u7B2C ${this.reconnectAttempts}/${this.config.maxReconnectAttempts} \u6B21\uFF09`),this.reconnectTimeout=setTimeout(()=>{this.connect()},R)}setMessageHandler(y){this.messageHandler=y}disconnect(){this.isShuttingDown=!0,this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null),this.ws&&(this.ws.close(1e3,"Plugin disconnect"),this.ws=null),this.setStatus("disconnected")}getStatus(){return this.status}}var b=Object.defineProperty,Y=(w,y,E)=>y in w?b(w,y,{enumerable:!0,configurable:!0,writable:!0,value:E}):w[y]=E,c=(w,y,E)=>Y(w,typeof y!="symbol"?y+"":y,E);class Mt{constructor(y){c(this,"clients",[]),c(this,"slotStates",[]),c(this,"scanTimer",null),c(this,"config"),this.config=y;for(let E=0;E<Xe.length;E++){const R=E===y.twinSlotIndex;this.slotStates.push({slotIndex:E,wsPort:Xe[E],status:"disconnected",isTwin:R,disconnectReason:"not_started"}),this.clients.push(new Tt({url:`ws://127.0.0.1:${Xe[E]}`,pluginVersion:y.pluginVersion,sdkReady:y.sdkReady,twinSlotIndex:y.twinSlotIndex,isTwinConnection:R,maxReconnectAttempts:R?10:0,initialReconnectDelay:1e3,maxReconnectDelay:3e4,onStatusChange:N=>this.handleStatusChange(E,N),onLog:(N,j)=>y.onLog(E,N,j),onPreempted:()=>this.handleDisconnectReason(E,"preempted"),onTwinOccupied:()=>this.handleDisconnectReason(E,"twin_occupied"),onOtherOccupied:()=>this.handleDisconnectReason(E,"other_occupied")}))}}setMessageHandler(y){for(const E of this.clients)E.setMessageHandler(y)}start(){const y=this.config.twinSlotIndex;this.clients[y].connect(),setTimeout(()=>{for(let E=0;E<this.clients.length;E++)E!==y&&this.clients[E].connect()},2e3),this.scanTimer=setInterval(()=>this.scanAndReconnect(),Ot)}stop(){this.scanTimer&&(clearInterval(this.scanTimer),this.scanTimer=null);for(const y of this.clients)y.disconnect()}getSlots(){return this.slotStates.slice()}handleStatusChange(y,E){const R=this.slotStates[y];R.status=E,E==="connected"&&(R.disconnectReason=null),this.notifySlotsChange()}handleDisconnectReason(y,E){this.slotStates[y].disconnectReason=E,this.notifySlotsChange()}notifySlotsChange(){this.config.onSlotsChange(this.slotStates.slice())}scanAndReconnect(){for(let y=0;y<this.clients.length;y++){const E=this.slotStates[y];E.isTwin||E.status==="connected"||E.status==="connecting"||this.clients[y].connect()}}}async function ht(w){const[y,E,R,N]=await Promise.all([w.isPowerupProperty(),w.isPowerupSlot(),w.isPowerupPropertyListItem(),w.isPowerupEnum()]);return y||E||R||N}async function Ve(w){const y=await Promise.all(w.map(ht));return w.filter((E,R)=>!y[R])}async function at(w){const y=await Promise.all(w.map(E=>E.isPowerup()));return w.filter((E,R)=>!y[R])}async function Pt(w,y){try{return await w.richText.toMarkdown(y)}catch{return tt(y)}}function tt(w){return w.map(y=>{if(typeof y=="string")return y;if(typeof y!="object"||y===null)return"";const E=y;switch(E.i){case"m":return String(E.text??"");case"q":return`[[${String(E._id??"")}]]`;case"u":return E.title?`[${String(E.title)}](${String(E.url)})`:String(E.url??"");case"x":return`$${String(E.text??"")}$`;case"i":return`![image](${String(E.url??"")})`;case"a":return`[audio](${String(E.url??"")})`;case"p":return String(E.text??"");case"g":return String(E.text??"");case"n":return String(E.text??"");case"o":return String(E.text??"");case"s":case"fi":case"ai":return"";default:return String(E.text??E.url??"")}}).join("")}async function ot(w,y,E,R){const N=R?.includePowerup??!1,[j,Q,G,ve,Fe,De,he,mt,Me,$e,wt,Pe,Be]=await Promise.all([Pt(w,y.text??[]),y.backText?Pt(w,y.backText):Promise.resolve(null),y.getType(),y.isCardItem(),y.isDocument(),y.getTagRems().then(qe=>N?qe:at(qe).then(Re=>{const xt=qe.length-Re.length;return xt>0&&R?.onFilteredTags?.(xt),Re})),y.getPracticeDirection(),y.getFontSize(),y.isTodo(),y.getTodoStatus(),y.isCode(),y.hasPowerup("dv"),y.type===6?y.getPortalDirectlyIncludedRem():Promise.resolve([])]);let Ge=!1;E.length>0&&(Ge=(await Promise.all(E.map(Re=>Re.isCardItem()))).some(Boolean));const nt=Pe&&(y.text??[]).length===0,Qe=await Promise.all(De.map(async qe=>({id:qe._id,name:te(await Pt(w,qe.text??[]))})));return{id:y._id,markdownText:te(j),markdownBackText:Q!==null?te(Q):null,type:ae(G),hasMultilineChildren:Ge,practiceDirection:he??"none",isCardItem:ve,isDocument:Fe,isPortal:y.type===6,portalRefs:Be.map(qe=>qe._id),childrenCount:E.length,tags:Qe,fontSize:mt??null,isTodo:Me,todoStatus:$e??null,isCode:wt,isDivider:nt,isTopLevel:y.parent===null}}function te(w){return w.replace(/\n/g," ")}function ae(w){switch(w){case 1:return"concept";case 2:return"descriptor";case 6:return"portal";default:return"default"}}async function _e(w,y){const{includePowerup:E=!1}=y,R=await w.rem.findOne(y.remId);if(!R)throw new Error(`Rem not found: ${y.remId}`);return Ne(w,R,{includePowerup:E})}async function Ne(w,y,E){const{includePowerup:R=!1}=E,[N,j,Q,G,ve,Fe,De,he,mt,Me,$e,wt,Pe,Be,Ge,nt,Qe,qe,Re,xt,Je,an,Ke,Qt,un,pn,Zt,ut,ct,Nt,Bt,hn,Dt,Jn,ur,So,er,Tr,_n,Sn,Dn,cr,xr]=await Promise.all([y.isDocument(),y.getFontSize(),y.getHighlightColor(),y.isTodo(),y.getTodoStatus(),y.isCode(),y.isQuote(),y.isListItem(),y.isCardItem(),y.isTable(),y.isSlot(),y.isProperty(),y.getEnablePractice(),y.getPracticeDirection(),y.getTagRems(),y.getSources(),y.getAliases(),y.positionAmongstSiblings(),y.isPowerup(),y.isPowerupEnum(),y.isPowerupProperty(),y.isPowerupPropertyListItem(),y.isPowerupSlot(),y.getPortalType(),y.getPortalDirectlyIncludedRem(),y.getPropertyType(),y.remsBeingReferenced(),y.deepRemsBeingReferenced(),y.remsReferencingThis(),y.taggedRem(),y.ancestorTagRem(),y.descendantTagRem(),y.getDescendants(),y.siblingRem(),y.portalsAndDocumentsIn(),y.allRemInDocumentOrPortal(),y.allRemInFolderQueue(),y.getChildrenRem(),y.timesSelectedInSearch(),y.getLastTimeMovedTo(),y.getSchemaVersion(),y.embeddedQueueViewMode(),y.getLastPracticed()]);let dr=Ge,Cr=y.children??[],mi=0,Mr=0;if(!R){dr=await at(Ge),mi=Ge.length-dr.length;const ze=await Ve(Tr);Mr=Tr.length-ze.length,Cr=ze.map(An=>An._id)}const fr={id:y._id,text:He(y.text??[]),backText:y.backText?He(y.backText):null,type:ae(y.type),isDocument:N,parent:y.parent,children:Cr,fontSize:j??null,highlightColor:Q??null,isTodo:G,todoStatus:ve??null,isCode:Fe,isQuote:De,isListItem:he,isCardItem:mt,isTable:!!Me,isSlot:$e,isProperty:wt,isPowerup:Re,isPowerupEnum:xt,isPowerupProperty:Je,isPowerupPropertyListItem:an,isPowerupSlot:Ke,portalType:ae(y.type)==="portal"?st(Qt):null,portalDirectlyIncludedRem:un.map(ze=>ze._id),propertyType:pn??null,enablePractice:Pe,practiceDirection:Be,tags:dr.map(ze=>ze._id),sources:nt.map(ze=>ze._id),aliases:Qe.map(ze=>ze._id),remsBeingReferenced:Zt.map(ze=>ze._id),deepRemsBeingReferenced:ut.map(ze=>ze._id),remsReferencingThis:ct.map(ze=>ze._id),taggedRem:Nt.map(ze=>ze._id),ancestorTagRem:Bt.map(ze=>ze._id),descendantTagRem:hn.map(ze=>ze._id),descendants:Dt.map(ze=>ze._id),siblingRem:Jn.map(ze=>ze._id),portalsAndDocumentsIn:ur.map(ze=>ze._id),allRemInDocumentOrPortal:So.map(ze=>ze._id),allRemInFolderQueue:er.map(ze=>ze._id),positionAmongstSiblings:qe??null,timesSelectedInSearch:_n,lastTimeMovedTo:Sn,schemaVersion:Dn,embeddedQueueViewMode:cr,createdAt:y.createdAt,updatedAt:y.updatedAt,localUpdatedAt:y.localUpdatedAt,lastPracticed:xr};return!R&&(mi>0||Mr>0)?{...fr,powerupFiltered:{tags:mi,children:Mr}}:fr}function He(w){return w.map(y=>{if(typeof y=="string")return y;const E={};for(const R of Object.keys(y).sort())E[R]=y[R];return E})}function st(w){switch(w){case 2:return"embedded_queue";case 3:return"scaffold";case 4:return"search_portal";default:return"portal"}}function Z(w){return"type"in w&&w.type==="elided"}function Ze(w){if(w.isDivider)return"---";const{markdownText:y,markdownBackText:E,hasMultilineChildren:R,practiceDirection:N}=w;let j;return E!==null?j=y+(R?N==="backward"?" \u2191 ":N==="both"?" \u2195 ":" \u2193 ":N==="backward"?" \u2190 ":N==="both"?" \u2194 ":" \u2192 ")+E:R?j=y+(N==="backward"?" \u2191":N==="both"?" \u2195":" \u2193"):j=y,w.isCode&&(j="`"+j+"`"),w.isTodo&&(j=(w.todoStatus==="Finished"?"- [x] ":"- [ ] ")+j),w.fontSize&&(j=(w.fontSize==="H1"?"# ":w.fontSize==="H2"?"## ":"### ")+j),j}function Ye(w,y){const E=[];w.type==="concept"?E.push("type:concept"):w.type==="descriptor"?E.push("type:descriptor"):w.type==="portal"&&(E.push("type:portal"),w.portalRefs.length>0&&E.push("refs:"+w.portalRefs.join(","))),w.isDocument&&E.push("doc"),w.isCardItem&&E.push("role:card-item"),y&&w.childrenCount>0&&E.push("children:"+w.childrenCount);for(const R of w.tags)E.push("tag:"+R.name+"("+R.id+")");return w.isTopLevel&&E.push("top"),E}function ue(w){return{markdownBackText:null,type:"default",hasMultilineChildren:!1,practiceDirection:"none",isCardItem:!1,isDocument:!1,isPortal:!1,portalRefs:[],tags:[],fontSize:null,isTodo:!1,todoStatus:null,isCode:!1,isDivider:!1,...w}}function fe(w,y=!1){const E=Ze(w),R=Ye(w,y),N=R.length>0?" "+R.join(" "):"";return`${E} <!--${w.id}${N}-->`}function ee(w){const y=w.isExact?"siblings":"nodes";return`<!--...elided ${w.isExact?"":">="}${w.count} ${y} (parent:${w.parentId} range:${w.rangeFrom}-${w.rangeTo} total:${w.totalSiblings})-->`}function ie(w){const y=[];function E(R,N){const j=" ".repeat(N);if(Z(R)){y.push(j+ee(R));return}const Q=fe(R.rem,R.folded);if(y.push(j+Q),!R.folded)for(const G of R.children)E(G,N+1)}return E(w,0),y.join(`
59
- `)}function me(w,y,E){if(w<=y)return{visibleIndices:null,elided:null};const R=Math.ceil(y*.7),N=Math.floor(y*.3);return{visibleIndices:{head:R,tail:N},elided:{count:w-R-N,parentId:E,rangeFrom:R,rangeTo:w-N-1,totalSiblings:w}}}async function q(w,y){const{remId:E,depth:R=3,maxNodes:N=200,maxSiblings:j=20,ancestorLevels:Q=0,includePowerup:G=!1}=y,ve=await w.rem.findOne(E);if(!ve)throw new Error(`Rem not found: ${E}`);let Fe=0,De=0,he=0;const mt={remaining:N},Me=[];async function $e(Qe,qe,Re){Fe++,mt.remaining--,Me.push(Qe._id);const xt=await Qe.getChildrenRem(),Je=G?xt:await Ve(xt);G||(he+=xt.length-Je.length);const Ke=Re!==-1&&qe>=Re&&Je.length>0,Qt=await ot(w,Qe,Je,{includePowerup:G,onFilteredTags:pn=>{De+=pn}});Ke&&(Qt.hasMultilineChildren=!1);const un=[];if(!Ke){const{visibleIndices:pn,elided:Zt}=me(Je.length,j,Qe._id);if(pn){const{head:ut,tail:ct}=pn;for(let Bt=0;Bt<ut&&mt.remaining>0;Bt++)un.push(await $e(Je[Bt],qe+1,Re));if(Zt){const Bt=Re!==-1&&qe+1>=Re;un.push({type:"elided",count:Zt.count,isExact:Bt,parentId:Zt.parentId,rangeFrom:Zt.rangeFrom,rangeTo:Zt.rangeTo,totalSiblings:Zt.totalSiblings})}const Nt=Je.length-ct;for(let Bt=Nt;Bt<Je.length&&mt.remaining>0;Bt++)un.push(await $e(Je[Bt],qe+1,Re))}else for(let ut=0;ut<Je.length;ut++){if(mt.remaining<=0){const ct=Je.length-ut;un.push({type:"elided",count:ct,isExact:!1,parentId:Qe._id,rangeFrom:ut,rangeTo:Je.length-1,totalSiblings:Je.length});break}un.push(await $e(Je[ut],qe+1,Re))}}return{rem:Qt,children:un,folded:Ke}}const wt=await $e(ve,0,R);await ve.getParentRem()||(wt.rem.isTopLevel=!0);const Be=ie(wt),Ge={rootId:E,depth:R,nodeCount:Fe,outline:Be,nodeRemIds:Me},nt=Math.min(Math.max(Q,0),10);if(nt>0){const Qe=[];let qe=ve;for(let Re=0;Re<nt;Re++){const xt=await qe.getParentRem();if(!xt)break;const[Je,an,Ke]=await Promise.all([Pt(w,xt.text??[]),xt.getChildrenRem(),xt.isDocument()]);Qe.push({id:xt._id,name:te(Je),childrenCount:an.length,isDocument:Ke}),qe=xt}if(Qe.length>0){const Re=Qe[Qe.length-1];await qe.getParentRem()||(Re.isTopLevel=!0),Ge.ancestors=Qe}}return!G&&(De>0||he>0)&&(Ge.powerupFiltered={tags:De,children:he}),Ge}async function ge(w,y){const E=await q(w,y),R=y.includePowerup??!1,N={};return await Promise.all(E.nodeRemIds.map(async j=>{const Q=await w.rem.findOne(j);Q&&(N[j]=await Ne(w,Q,{includePowerup:R}))})),{...E,remObjects:N}}async function C(w,y){const{depth:E=-1,maxNodes:R=200,maxSiblings:N=20}=y,Q=(await w.rem.getAll()).filter(Pe=>Pe.parent===null),G=await Promise.all(Q.map(Pe=>Pe.isDocument())),ve=Q.filter((Pe,Be)=>G[Be]);let Fe=0;const De={remaining:R};async function he(Pe,Be,Ge){Fe++,De.remaining--;const nt=await Pe.getChildrenRem(),Qe=await Ve(nt),qe=await Promise.all(Qe.map(ut=>ut.isDocument())),Re=Qe.filter((ut,ct)=>qe[ct]),xt=Qe.length-Re.length,an=Ge!==-1&&Be>=Ge&&Re.length>0,Ke=Pe.type===6,[Qt,un]=await Promise.all([Pt(w,Pe.text??[]),Ke?Pe.getPortalDirectlyIncludedRem():Promise.resolve([])]),pn=ue({id:Pe._id,markdownText:Qt.replace(/\n/g," "),childrenCount:Qe.length,isDocument:!0,isTopLevel:Pe.parent===null,isPortal:Ke,...Ke?{type:"portal",portalRefs:un.map(ut=>ut._id)}:{}}),Zt=[];if(!an&&Re.length>0){const{visibleIndices:ut,elided:ct}=me(Re.length,N,Pe._id);if(ut){const{head:Nt,tail:Bt}=ut;for(let Dt=0;Dt<Nt&&De.remaining>0;Dt++)Zt.push(await he(Re[Dt],Be+1,Ge));if(ct){const Dt=Ge!==-1&&Be+1>=Ge;Zt.push({type:"elided",count:ct.count,isExact:Dt,parentId:ct.parentId,rangeFrom:ct.rangeFrom,rangeTo:ct.rangeTo,totalSiblings:ct.totalSiblings})}const hn=Re.length-Bt;for(let Dt=hn;Dt<Re.length&&De.remaining>0;Dt++)Zt.push(await he(Re[Dt],Be+1,Ge))}else for(let Nt=0;Nt<Re.length;Nt++){if(De.remaining<=0){const Bt=Re.length-Nt;Zt.push({type:"elided",count:Bt,isExact:!1,parentId:Pe._id,rangeFrom:Nt,rangeTo:Re.length-1,totalSiblings:Re.length});break}Zt.push(await he(Re[Nt],Be+1,Ge))}}return{rem:pn,children:Zt,folded:an}}const mt=[],{visibleIndices:Me,elided:$e}=me(ve.length,N,"root");if(Me){const{head:Pe,tail:Be}=Me;for(let nt=0;nt<Pe&&De.remaining>0;nt++)mt.push(await he(ve[nt],0,E));$e&&mt.push({type:"elided",count:$e.count,isExact:!1,parentId:"root",rangeFrom:$e.rangeFrom,rangeTo:$e.rangeTo,totalSiblings:$e.totalSiblings});const Ge=ve.length-Be;for(let nt=Ge;nt<ve.length&&De.remaining>0;nt++)mt.push(await he(ve[nt],0,E))}else for(let Pe=0;Pe<ve.length;Pe++){if(De.remaining<=0){const Be=ve.length-Pe;mt.push({type:"elided",count:Be,isExact:!1,parentId:"root",rangeFrom:Pe,rangeTo:ve.length-1,totalSiblings:ve.length});break}mt.push(await he(ve[Pe],0,E))}const wt=["<!-- globe: \u77E5\u8BC6\u5E93\u6982\u89C8 -->"];for(const Pe of mt)Z(Pe)?wt.push(ee(Pe)):wt.push(ie(Pe));return{nodeCount:Fe,outline:wt.join(`
60
- `)}}async function V(w,y){const E=[];let R=y;for(;R;){const N=await Pt(w,R.text??[]);E.unshift(N.replace(/\n/g," ").trim()||R._id),R=await R.getParentRem()}return E}async function F(w,y){const{mode:E="focus",ancestorLevels:R=2,maxNodes:N=200,maxSiblings:j=20,depth:Q=3,focusRemId:G}=y;if(E==="page"){if(G)throw new Error("focusRemId \u4EC5\u5728 focus \u6A21\u5F0F\u4E0B\u6709\u6548\uFF0Cpage \u6A21\u5F0F\u4E0B\u8BF7\u52FF\u6307\u5B9A");return A(w,{maxNodes:N,maxSiblings:j,depth:Q})}return $(w,{ancestorLevels:R,maxNodes:N,maxSiblings:j,focusRemId:G})}async function A(w,y){const E=await w.window.getFocusedPaneId();if(!E)throw new Error("\u65E0\u6CD5\u83B7\u53D6\u5F53\u524D\u9762\u677F ID\uFF0C\u8BF7\u786E\u4FDD\u6709\u6253\u5F00\u7684\u9875\u9762");const R=await w.window.getOpenPaneRemId(E);if(!R)throw new Error("\u5F53\u524D\u9762\u677F\u6CA1\u6709\u6253\u5F00\u4EFB\u4F55 Rem");const N=await w.rem.findOne(R);if(!N)throw new Error(`Page Rem not found: ${R}`);const j=await V(w,N);let Q=0;const G={remaining:y.maxNodes},ve=await U(w,N,0,y.depth,y.maxSiblings,G);Q=y.maxNodes-G.remaining;const De=`<!-- page: ${j[j.length-1]||R} -->
61
- <!-- path: ${j.join(" > ")} -->`+`
62
- `+ie(ve);return{nodeCount:Q,outline:De,breadcrumb:j,mode:"page"}}async function $(w,y){let E;if(y.focusRemId){if(E=await w.rem.findOne(y.focusRemId),!E)throw new Error(`\u6307\u5B9A\u7684 Rem \u4E0D\u5B58\u5728: ${y.focusRemId}`)}else if(E=await w.focus.getFocusedRem(),!E)throw new Error("\u5F53\u524D\u6CA1\u6709\u805A\u7126\u7684 Rem\uFF0C\u8BF7\u5148\u5728 RemNote \u4E2D\u70B9\u51FB\u4E00\u4E2A Rem");const R=await V(w,E),N=[E];let j=E;for(let Me=0;Me<y.ancestorLevels;Me++){const $e=await j.getParentRem();if(!$e)break;N.unshift($e),j=$e}const Q={remaining:y.maxNodes};let G=0;const ve=N[0],Fe=await H(w,ve,N,0,E._id,y.maxSiblings,Q);G=y.maxNodes-Q.remaining;const De=R[R.length-1]||E._id,mt=`<!-- path: ${R.join(" > ")} -->
63
- <!-- focus: ${De} (${E._id}) -->`+`
64
- `+ie(Fe);return{nodeCount:G,outline:mt,breadcrumb:R,mode:"focus"}}async function H(w,y,E,R,N,j,Q){Q.remaining--;const G=y._id===N,ve=E.some($e=>$e._id===y._id),Fe=R+1<E.length?E[R+1]:null,De=await y.getChildrenRem(),he=await Ve(De),mt=await sn(w,y,he.length,G),Me=[];if(G){const $e=await ye(w,he,j,y._id,Q,0,3);Me.push(...$e)}else if(ve&&Fe){const{visibleIndices:$e,elided:wt}=me(he.length,j,y._id),Pe=async Be=>Q.remaining<=0?M(y._id,0,0,0):Be._id===Fe._id||Be._id===N?H(w,Be,E,R+1,N,j,Q):Fe._id===N?ne(w,Be,1,3,j,Q):ne(w,Be,0,0,j,Q);if($e){const{head:Be,tail:Ge}=$e;for(let Qe=0;Qe<Be&&Q.remaining>0;Qe++)Me.push(await Pe(he[Qe]));wt&&Me.push({type:"elided",count:wt.count,isExact:!1,parentId:wt.parentId,rangeFrom:wt.rangeFrom,rangeTo:wt.rangeTo,totalSiblings:wt.totalSiblings});const nt=he.length-Ge;for(let Qe=nt;Qe<he.length&&Q.remaining>0;Qe++)Me.push(await Pe(he[Qe]))}else for(let Be=0;Be<he.length;Be++){if(Q.remaining<=0){Me.push({type:"elided",count:he.length-Be,isExact:!1,parentId:y._id,rangeFrom:Be,rangeTo:he.length-1,totalSiblings:he.length});break}Me.push(await Pe(he[Be]))}}return{rem:mt,children:Me,folded:Me.length===0&&he.length>0}}async function ne(w,y,E,R,N,j){j.remaining--;const Q=await y.getChildrenRem(),G=await Ve(Q),ve=await sn(w,y,G.length,!1),Fe=[];if(E>0&&G.length>0){const De=Math.min(G.length,R,N);for(let he=0;he<De&&j.remaining>0;he++)Fe.push(await ne(w,G[he],E-1,R,N,j));De<G.length&&Fe.push({type:"elided",count:G.length-De,isExact:!1,parentId:y._id,rangeFrom:De,rangeTo:G.length-1,totalSiblings:G.length})}return{rem:ve,children:Fe,folded:Fe.length===0&&G.length>0}}async function U(w,y,E,R,N,j){j.remaining--;const Q=await y.getChildrenRem(),G=await Ve(Q),Fe=R!==-1&&E>=R&&G.length>0,De=await ot(w,y,G),he=[];if(!Fe){const mt=await ye(w,G,N,y._id,j,E+1,R);he.push(...mt)}return{rem:De,children:he,folded:Fe}}async function ye(w,y,E,R,N,j,Q){const G=[],{visibleIndices:ve,elided:Fe}=me(y.length,E,R);if(ve){const{head:De,tail:he}=ve;for(let Me=0;Me<De&&N.remaining>0;Me++)G.push(await U(w,y[Me],j,Q,E,N));if(Fe){const Me=Q!==-1&&j>=Q;G.push({type:"elided",count:Fe.count,isExact:Me,parentId:Fe.parentId,rangeFrom:Fe.rangeFrom,rangeTo:Fe.rangeTo,totalSiblings:Fe.totalSiblings})}const mt=y.length-he;for(let Me=mt;Me<y.length&&N.remaining>0;Me++)G.push(await U(w,y[Me],j,Q,E,N))}else for(let De=0;De<y.length;De++){if(N.remaining<=0){G.push({type:"elided",count:y.length-De,isExact:!1,parentId:R,rangeFrom:De,rangeTo:y.length-1,totalSiblings:y.length});break}G.push(await U(w,y[De],j,Q,E,N))}return G}function M(w,y,E,R){return{type:"elided",count:1,isExact:!1,parentId:w,rangeFrom:y,rangeTo:E,totalSiblings:R}}async function sn(w,y,E,R){const N=y.type===6,[j,Q,G]=await Promise.all([Pt(w,y.text??[]),y.isDocument(),N?y.getPortalDirectlyIncludedRem():Promise.resolve([])]);return ue({id:y._id,markdownText:(R?"* ":"")+j.replace(/\n/g," "),childrenCount:E,isDocument:Q,isTopLevel:y.parent===null,isPortal:N,...N?{type:"portal",portalRefs:G.map(ve=>ve._id)}:{}})}async function $t(w,y){const E=await w.rem.findOne(y.remId);if(!E)throw new Error(`Rem not found: ${y.remId}`);const R=[],N=y.changes,j="parent"in N,Q="positionAmongstSiblings"in N;for(const G of Object.keys(N))if(G!=="positionAmongstSiblings")try{await Un(E,w,G,N[G],{position:G==="parent"&&Q?N.positionAmongstSiblings:void 0}),R.push(G),G==="parent"&&Q&&R.push("positionAmongstSiblings")}catch(ve){return{applied:R,failed:{field:G,error:ve instanceof Error?ve.message:String(ve)}}}if(Q&&!j)try{const G=E.parent;G&&await E.setParent(G,N.positionAmongstSiblings),R.push("positionAmongstSiblings")}catch(G){return{applied:R,failed:{field:"positionAmongstSiblings",error:G instanceof Error?G.message:String(G)}}}return{applied:R}}async function Un(w,y,E,R,N){switch(E){case"text":await w.setText(R);break;case"backText":R===null?await w.setBackText([]):typeof R=="string"?await w.setBackText([R]):await w.setBackText(R);break;case"type":await w.setType(pi(R));break;case"isDocument":await w.setIsDocument(R);break;case"parent":await w.setParent(R,N.position);break;case"fontSize":await w.setFontSize(R===null?void 0:R);break;case"highlightColor":R===null?await w.removePowerup("h"):await w.setHighlightColor(R);break;case"isTodo":await w.setIsTodo(R);break;case"todoStatus":R!==null&&await w.setTodoStatus(R);break;case"isCode":await w.setIsCode(R);break;case"isQuote":await w.setIsQuote(R);break;case"isListItem":await w.setIsListItem(R);break;case"isCardItem":await w.setIsCardItem(R);break;case"isSlot":await w.setIsSlot(R);break;case"isProperty":await w.setIsProperty(R);break;case"enablePractice":await w.setEnablePractice(R);break;case"practiceDirection":await w.setPracticeDirection(R);break;case"tags":await cs(w,R);break;case"sources":await Sr(w,R);break;case"portalDirectlyIncludedRem":await Cn(w,y,R);break;case"addPowerup":await w.addPowerup(R);break;default:throw new Error(`\u4E0D\u53EF\u5199\u5165\u7684\u5B57\u6BB5: ${E}`)}}async function cs(w,y){const E=await w.getTagRems(),R=new Set(E.map(j=>j._id)),N=new Set(y);for(const j of y)R.has(j)||await w.addTag(j);for(const j of R)N.has(j)||await w.removeTag(j)}async function Sr(w,y){const E=await w.getSources(),R=new Set(E.map(j=>j._id)),N=new Set(y);for(const j of y)R.has(j)||await w.addSource(j);for(const j of R)N.has(j)||await w.removeSource(j)}async function Cn(w,y,E){if(w.type!==6)throw new Error("portalDirectlyIncludedRem can only be modified on Portal Rem");const R=await w.getPortalDirectlyIncludedRem(),N=new Set(R.map(Q=>Q._id)),j=new Set(E);for(const Q of E)if(!N.has(Q)){const G=await y.rem.findOne(Q);if(!G)throw new Error(`Rem not found: ${Q}`);await G.addToPortal(w)}for(const Q of N)if(!j.has(Q)){const G=await y.rem.findOne(Q);if(!G)throw new Error(`Rem not found: ${Q}`);await G.removeFromPortal(w)}}function pi(w){switch(w){case"concept":return 1;case"descriptor":return 2;case"default":return"DEFAULT_TYPE";case"portal":throw new Error("Portal \u4E0D\u53EF\u901A\u8FC7 setType() \u8BBE\u7F6E\uFF0C\u53EA\u80FD\u901A\u8FC7 createPortal() \u521B\u5EFA");default:throw new Error(`\u672A\u77E5\u7684 Rem \u7C7B\u578B: ${w}`)}}async function Tl(w,y){const{content:E,parentId:R,position:N}=y,j=await w.rem.findOne(R);if(!j)throw new Error(`Parent Rem not found: ${R}`);const Q=await w.rem.createSingleRemWithMarkdown(E,R);if(!Q)throw new Error(`Failed to create Rem with content: ${E.slice(0,50)}`);const G=await j.getChildrenRem(),ve=G.findIndex(Fe=>Fe._id===Q._id);return ve!==-1&&ve!==N&&N<G.length&&await Q.setParent(j,N),{remId:Q._id}}async function X(w,y){const E=await w.rem.findOne(y.remId);if(!E)throw new Error(`Rem not found: ${y.remId}`);return await E.remove(),{ok:!0}}async function Ut(w,y){const{remId:E,newParentId:R,position:N}=y,j=await w.rem.findOne(E);if(!j)throw new Error(`Rem not found: ${E}`);const Q=await w.rem.findOne(R);if(!Q)throw new Error(`New parent Rem not found: ${R}`);return await j.setParent(Q,N),{ok:!0}}async function Se(w,y){const{parentId:E,order:R}=y,N=await w.rem.findOne(E);if(!N)throw new Error(`Parent Rem not found: ${E}`);const Q=(await N.getChildrenRem()).map(G=>G._id);for(let G=0;G<R.length;G++){const ve=R[G],Fe=await N.getChildrenRem(),De=Fe.findIndex(he=>he._id===ve);De!==-1&&De!==G&&await Fe[De].setParent(N,G)}return{ok:!0}}async function Ni(w,y){const{query:E,numResults:R=20}=y;if(!E||E.trim()==="")throw new Error("search query \u4E0D\u80FD\u4E3A\u7A7A");const N=await w.search.search([E],void 0,{numResults:R}),j=await Promise.all(N.map(async Q=>{const[G,ve]=await Promise.all([Pt(w,Q.text??[]),Q.isDocument()]);return{remId:Q._id,text:G.replace(/\n/g," "),isDocument:ve}}));return{query:E,results:j,totalFound:j.length}}async function tn(w,y){const{parentId:E,position:R}=y,N=await w.rem.createPortal();if(!N)throw new Error("Failed to create portal");const j=await w.rem.findOne(E);if(!j)throw new Error(`Parent Rem not found: ${E}`);return await N.setParent(j,R),{remId:N._id}}async function Di(w,y){const{portalId:E,remId:R}=y,N=await w.rem.findOne(E);if(!N)throw new Error(`Portal not found: ${E}`);const j=await w.rem.findOne(R);if(!j)throw new Error(`Rem not found: ${R}`);await j.addToPortal(N)}async function hi(w,y){const{portalId:E,remId:R}=y,N=await w.rem.findOne(E);if(!N)throw new Error(`Portal not found: ${E}`);const j=await w.rem.findOne(R);if(!j)throw new Error(`Rem not found: ${R}`);await j.removeFromPortal(N)}function jr(w){return async y=>{switch(y.action){case"read_rem":return _e(w,y.payload);case"read_tree":return q(w,y.payload);case"read_rem_in_tree":return ge(w,y.payload);case"write_rem_fields":return $t(w,y.payload);case"create_rem":return Tl(w,y.payload);case"delete_rem":return X(w,y.payload);case"move_rem":return Ut(w,y.payload);case"reorder_children":return Se(w,y.payload);case"read_globe":return C(w,y.payload);case"read_context":return F(w,y.payload);case"search":return Ni(w,y.payload);case"create_portal":return tn(w,y.payload);case"add_to_portal":return Di(w,y.payload);case"remove_from_portal":return hi(w,y.payload);default:throw new Error(`\u672A\u5B9E\u73B0\u7684 action: ${y.action}`)}}}let Zn=null;const ce=[];let ln=!1;async function Er(w){await w.app.registerWidget("bridge_widget",en.WidgetLocation.RightSidebar,{dimensions:{height:"auto",width:"100%"},widgetTabIcon:"https://cdn.jsdelivr.net/npm/lucide-static@0.460.0/icons/globe.svg"});let y=0,E="",R=29102;try{const N=await fetch("/api/discovery");if(N.ok){const j=await N.json();typeof j.slotIndex=="number"&&(y=j.slotIndex),j.instance&&(E=j.instance),j.configPort&&(R=j.configPort)}}catch{}await w.storage.setSession("bridge-instance",E),await w.storage.setSession("bridge-config-port",R),Zn=new Mt({twinSlotIndex:y,pluginVersion:K,sdkReady:!0,onSlotsChange:N=>{w.storage.setSession("bridge-slots",N)},onLog:(N,j,Q)=>{ce.push({time:Date.now(),message:`[${N}] ${j}`,level:Q}),ce.length>50&&ce.splice(0,ce.length-50),ln||(ln=!0,queueMicrotask(async()=>{ln=!1,await w.storage.setSession("bridge-logs",ce.slice())}))}}),Zn.setMessageHandler(jr(w)),Zn.start()}async function Ee(w){Zn?.stop(),Zn=null}(0,en.declareIndexPlugin)(Er,Ee)})()})();
58
+ */var qe,Ot,De,it;if(typeof performance=="object"&&typeof performance.now=="function"){var B=performance;K.unstable_now=function(){return B.now()}}else{var wn=Date,Et=wn.now();K.unstable_now=function(){return wn.now()-Et}}if(typeof window>"u"||typeof MessageChannel!="function"){var Tt=null,b=null,Y=function(){if(Tt!==null)try{var L=K.unstable_now();Tt(!0,L),Tt=null}catch(A){throw setTimeout(Y,0),A}};qe=function(L){Tt!==null?setTimeout(qe,0,L):(Tt=L,setTimeout(Y,0))},Ot=function(L,A){b=setTimeout(L,A)},De=function(){clearTimeout(b)},K.unstable_shouldYield=function(){return!1},it=K.unstable_forceFrameRate=function(){}}else{var c=window.setTimeout,Mt=window.clearTimeout;if(typeof console<"u"){var ht=window.cancelAnimationFrame;typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof ht!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var He=!1,at=null,Pt=-1,tt=5,ot=0;K.unstable_shouldYield=function(){return K.unstable_now()>=ot},it=function(){},K.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):tt=0<L?Math.floor(1e3/L):5};var te=new MessageChannel,ae=te.port2;te.port1.onmessage=function(){if(at!==null){var L=K.unstable_now();ot=L+tt;try{at(!0,L)?ae.postMessage(null):(He=!1,at=null)}catch(A){throw ae.postMessage(null),A}}else He=!1},qe=function(L){at=L,He||(He=!0,ae.postMessage(null))},Ot=function(L,A){Pt=c(function(){L(K.unstable_now())},A)},De=function(){Mt(Pt),Pt=-1}}function _e(L,A){var $=L.length;L.push(A);e:for(;;){var H=$-1>>>1,ne=L[H];if(ne!==void 0&&0<st(ne,A))L[H]=A,L[$]=ne,$=H;else break e}}function Oe(L){return L=L[0],L===void 0?null:L}function $e(L){var A=L[0];if(A!==void 0){var $=L.pop();if($!==A){L[0]=$;e:for(var H=0,ne=L.length;H<ne;){var U=2*(H+1)-1,ye=L[U],M=U+1,ln=L[M];if(ye!==void 0&&0>st(ye,$))ln!==void 0&&0>st(ln,ye)?(L[H]=ln,L[M]=$,H=M):(L[H]=ye,L[U]=$,H=U);else if(ln!==void 0&&0>st(ln,$))L[H]=ln,L[M]=$,H=M;else break e}}return A}return null}function st(L,A){var $=L.sortIndex-A.sortIndex;return $!==0?$:L.id-A.id}var Z=[],Ze=[],Ye=1,ue=null,fe=3,ee=!1,ie=!1,me=!1;function q(L){for(var A=Oe(Ze);A!==null;){if(A.callback===null)$e(Ze);else if(A.startTime<=L)$e(Ze),A.sortIndex=A.expirationTime,_e(Z,A);else break;A=Oe(Ze)}}function ge(L){if(me=!1,q(L),!ie)if(Oe(Z)!==null)ie=!0,qe(C);else{var A=Oe(Ze);A!==null&&Ot(ge,A.startTime-L)}}function C(L,A){ie=!1,me&&(me=!1,De()),ee=!0;var $=fe;try{for(q(A),ue=Oe(Z);ue!==null&&(!(ue.expirationTime>A)||L&&!K.unstable_shouldYield());){var H=ue.callback;if(typeof H=="function"){ue.callback=null,fe=ue.priorityLevel;var ne=H(ue.expirationTime<=A);A=K.unstable_now(),typeof ne=="function"?ue.callback=ne:ue===Oe(Z)&&$e(Z),q(A)}else $e(Z);ue=Oe(Z)}if(ue!==null)var U=!0;else{var ye=Oe(Ze);ye!==null&&Ot(ge,ye.startTime-A),U=!1}return U}finally{ue=null,fe=$,ee=!1}}var V=it;K.unstable_IdlePriority=5,K.unstable_ImmediatePriority=1,K.unstable_LowPriority=4,K.unstable_NormalPriority=3,K.unstable_Profiling=null,K.unstable_UserBlockingPriority=2,K.unstable_cancelCallback=function(L){L.callback=null},K.unstable_continueExecution=function(){ie||ee||(ie=!0,qe(C))},K.unstable_getCurrentPriorityLevel=function(){return fe},K.unstable_getFirstCallbackNode=function(){return Oe(Z)},K.unstable_next=function(L){switch(fe){case 1:case 2:case 3:var A=3;break;default:A=fe}var $=fe;fe=A;try{return L()}finally{fe=$}},K.unstable_pauseExecution=function(){},K.unstable_requestPaint=V,K.unstable_runWithPriority=function(L,A){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var $=fe;fe=L;try{return A()}finally{fe=$}},K.unstable_scheduleCallback=function(L,A,$){var H=K.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?H+$:H):$=H,L){case 1:var ne=-1;break;case 2:ne=250;break;case 5:ne=1073741823;break;case 4:ne=1e4;break;default:ne=5e3}return ne=$+ne,L={id:Ye++,callback:A,priorityLevel:L,startTime:$,expirationTime:ne,sortIndex:-1},$>H?(L.sortIndex=$,_e(Ze,L),Oe(Z)===null&&L===Oe(Ze)&&(me?De():me=!0,Ot(ge,$-H))):(L.sortIndex=ne,_e(Z,L),ie||ee||(ie=!0,qe(C))),L},K.unstable_wrapCallback=function(L){var A=fe;return function(){var $=fe;fe=A;try{return L.apply(this,arguments)}finally{fe=$}}}},825(tn,K,qe){"use strict";tn.exports=qe(742)}},vd={};function Ac(tn){var K=vd[tn];if(K!==void 0)return K.exports;var qe=vd[tn]={exports:{}};return Pf[tn](qe,qe.exports,Ac),qe.exports}Ac.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})();var wp={};(()=>{"use strict";var tn=Ac(216);const K="0.2.1",qe=[29100,29110,29120,29130],Ot=18e3;var De=Object.defineProperty,it=(w,y,E)=>y in w?De(w,y,{enumerable:!0,configurable:!0,writable:!0,value:E}):w[y]=E,B=(w,y,E)=>it(w,typeof y!="symbol"?y+"":y,E);const wn=4e3,Et=4003;class Tt{constructor(y){B(this,"ws",null),B(this,"reconnectAttempts",0),B(this,"reconnectTimeout",null),B(this,"messageHandler",null),B(this,"status","disconnected"),B(this,"isShuttingDown",!1),B(this,"isPreempted",!1),B(this,"_sdkReady"),B(this,"config"),this._sdkReady=y.sdkReady,this.config={url:y.url,pluginVersion:y.pluginVersion,sdkReady:y.sdkReady,twinSlotIndex:y.twinSlotIndex,isTwinConnection:y.isTwinConnection??!1,maxReconnectAttempts:y.maxReconnectAttempts??10,initialReconnectDelay:y.initialReconnectDelay??1e3,maxReconnectDelay:y.maxReconnectDelay??3e4,onStatusChange:y.onStatusChange,onLog:y.onLog,onPreempted:y.onPreempted,onTwinOccupied:y.onTwinOccupied,onOtherOccupied:y.onOtherOccupied}}log(y,E="info"){this.config.onLog?.(y,E)}setStatus(y){this.status!==y&&(this.status=y,this.config.onStatusChange?.(y))}sendHello(){const y={type:"hello",version:this.config.pluginVersion,sdkReady:this._sdkReady,twinSlotIndex:this.config.twinSlotIndex};try{this.ws?.send(JSON.stringify(y)),this.log(`\u53D1\u9001 hello\uFF08v${this.config.pluginVersion}, sdkReady=${this._sdkReady}, twinSlot=${this.config.twinSlotIndex}\uFF09`)}catch(E){this.log(`\u53D1\u9001 hello \u5931\u8D25: ${E}`,"warn")}}connect(){if(!(this.ws?.readyState===WebSocket.OPEN||this.ws?.readyState===WebSocket.CONNECTING)){this.isShuttingDown=!1,this.isPreempted=!1,this.setStatus("connecting");try{this.ws=new WebSocket(this.config.url),this.ws.onopen=()=>{this.log("\u5DF2\u8FDE\u63A5\u5230\u5B88\u62A4\u8FDB\u7A0B"),this.reconnectAttempts=0,this.setStatus("connected"),this.sendHello()},this.ws.onmessage=async y=>{await this.handleMessage(typeof y.data=="string"?y.data:String(y.data))},this.ws.onclose=y=>{y.code!==1006&&this.log(`\u8FDE\u63A5\u65AD\u5F00: ${y.code} ${y.reason}`,"warn"),this.setStatus("disconnected"),y.code===Et?this.config.onTwinOccupied?.():y.code===wn&&this.config.onOtherOccupied?.(),this.isShuttingDown||this.scheduleReconnect()},this.ws.onerror=()=>{}}catch(y){this.log(`\u8FDE\u63A5\u5931\u8D25: ${y}`,"error"),this.setStatus("disconnected"),this.scheduleReconnect()}}}async handleMessage(y){try{const E=JSON.parse(y);if(E.type==="preempted"){this.isPreempted=!0,this.log(`\u88AB\u5B6A\u751F Plugin \u62A2\u5360: ${E.reason}`,"warn"),this.config.onPreempted?.();return}if(E.type==="ping"){this.ws?.send(JSON.stringify({type:"pong"}));return}if(E.id&&E.action&&this.messageHandler){const R=E;this.log(`\u6536\u5230\u8BF7\u6C42: ${R.action}`);try{const N=await this.messageHandler(R),F={id:R.id,result:N};this.ws?.send(JSON.stringify(F)),this.log(`\u5B8C\u6210: ${R.action}`)}catch(N){const F=N instanceof Error?N.message:String(N),Q={id:R.id,error:F};this.ws?.send(JSON.stringify(Q)),this.log(`\u5931\u8D25: ${R.action} - ${F}`,"error")}}}catch(E){this.log(`\u5904\u7406\u6D88\u606F\u5931\u8D25: ${E}`,"error")}}scheduleReconnect(){if(this.isShuttingDown||this.isPreempted||!this.config.isTwinConnection)return;if(this.reconnectAttempts>=this.config.maxReconnectAttempts){this.log("\u5DF2\u8FBE\u6700\u5927\u91CD\u8FDE\u6B21\u6570","error");return}const y=Math.min(this.config.initialReconnectDelay*Math.pow(2,this.reconnectAttempts),this.config.maxReconnectDelay),E=Math.random()*.3*y,R=y+E;this.reconnectAttempts++,this.log(`${Math.round(R)}ms \u540E\u91CD\u8FDE\uFF08\u7B2C ${this.reconnectAttempts}/${this.config.maxReconnectAttempts} \u6B21\uFF09`),this.reconnectTimeout=setTimeout(()=>{this.connect()},R)}setMessageHandler(y){this.messageHandler=y}disconnect(){this.isShuttingDown=!0,this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null),this.ws&&(this.ws.close(1e3,"Plugin disconnect"),this.ws=null),this.setStatus("disconnected")}getStatus(){return this.status}}var b=Object.defineProperty,Y=(w,y,E)=>y in w?b(w,y,{enumerable:!0,configurable:!0,writable:!0,value:E}):w[y]=E,c=(w,y,E)=>Y(w,typeof y!="symbol"?y+"":y,E);class Mt{constructor(y){c(this,"clients",[]),c(this,"slotStates",[]),c(this,"scanTimer",null),c(this,"config"),this.config=y;for(let E=0;E<qe.length;E++){const R=E===y.twinSlotIndex;this.slotStates.push({slotIndex:E,wsPort:qe[E],status:"disconnected",isTwin:R,disconnectReason:"not_started"}),this.clients.push(new Tt({url:`ws://127.0.0.1:${qe[E]}`,pluginVersion:y.pluginVersion,sdkReady:y.sdkReady,twinSlotIndex:y.twinSlotIndex,isTwinConnection:R,maxReconnectAttempts:R?10:0,initialReconnectDelay:1e3,maxReconnectDelay:3e4,onStatusChange:N=>this.handleStatusChange(E,N),onLog:(N,F)=>y.onLog(E,N,F),onPreempted:()=>this.handleDisconnectReason(E,"preempted"),onTwinOccupied:()=>this.handleDisconnectReason(E,"twin_occupied"),onOtherOccupied:()=>this.handleDisconnectReason(E,"other_occupied")}))}}setMessageHandler(y){for(const E of this.clients)E.setMessageHandler(y)}start(){const y=this.config.twinSlotIndex;this.clients[y].connect(),setTimeout(()=>{for(let E=0;E<this.clients.length;E++)E!==y&&this.clients[E].connect()},2e3),this.scanTimer=setInterval(()=>this.scanAndReconnect(),Ot)}stop(){this.scanTimer&&(clearInterval(this.scanTimer),this.scanTimer=null);for(const y of this.clients)y.disconnect()}getSlots(){return this.slotStates.slice()}handleStatusChange(y,E){const R=this.slotStates[y];R.status=E,E==="connected"&&(R.disconnectReason=null),this.notifySlotsChange()}handleDisconnectReason(y,E){this.slotStates[y].disconnectReason=E,this.notifySlotsChange()}notifySlotsChange(){this.config.onSlotsChange(this.slotStates.slice())}scanAndReconnect(){for(let y=0;y<this.clients.length;y++){const E=this.slotStates[y];E.isTwin||E.status==="connected"||E.status==="connecting"||this.clients[y].connect()}}}async function ht(w){const[y,E,R,N]=await Promise.all([w.isPowerupProperty(),w.isPowerupSlot(),w.isPowerupPropertyListItem(),w.isPowerupEnum()]);return y||E||R||N}async function He(w){const y=await Promise.all(w.map(ht));return w.filter((E,R)=>!y[R])}async function at(w){const y=await Promise.all(w.map(E=>E.isPowerup()));return w.filter((E,R)=>!y[R])}async function Pt(w,y){try{return await w.richText.toMarkdown(y)}catch{return tt(y)}}function tt(w){return w.map(y=>{if(typeof y=="string")return y;if(typeof y!="object"||y===null)return"";const E=y;switch(E.i){case"m":return String(E.text??"");case"q":return`[[${String(E._id??"")}]]`;case"u":return E.title?`[${String(E.title)}](${String(E.url)})`:String(E.url??"");case"x":return`$${String(E.text??"")}$`;case"i":return`![image](${String(E.url??"")})`;case"a":return`[audio](${String(E.url??"")})`;case"p":return String(E.text??"");case"g":return String(E.text??"");case"n":return String(E.text??"");case"o":return String(E.text??"");case"s":case"fi":case"ai":return"";default:return String(E.text??E.url??"")}}).join("")}async function ot(w,y,E,R){const N=R?.includePowerup??!1,[F,Q,G,ve,Ae,Ne,he,mt,Me,Qe,wt,Pe,Be,Xe,nt]=await Promise.all([Pt(w,y.text??[]),y.backText?Pt(w,y.backText):Promise.resolve(null),y.getType(),y.isCardItem(),y.isDocument(),y.getTagRems().then(Je=>N?Je:at(Je).then(Ke=>{const Zt=Je.length-Ke.length;return Zt>0&&R?.onFilteredTags?.(Zt),Ke})),y.getPracticeDirection(),y.getFontSize(),y.isTodo(),y.getTodoStatus(),y.isCode(),y.isQuote(),y.isListItem(),y.hasPowerup("dv"),y.type===6?y.getPortalDirectlyIncludedRem():Promise.resolve([])]);let We=!1;E.length>0&&(We=(await Promise.all(E.map(Ke=>Ke.isCardItem()))).some(Boolean));const xt=Xe&&(y.text??[]).length===0,Fe=await Promise.all(Ne.map(async Je=>({id:Je._id,name:te(await Pt(w,Je.text??[]))})));return{id:y._id,markdownText:te(F),markdownBackText:Q!==null?te(Q):null,type:ae(G),hasMultilineChildren:We,practiceDirection:he??"none",isCardItem:ve,isDocument:Ae,isPortal:y.type===6,portalRefs:nt.map(Je=>Je._id),childrenCount:E.length,tags:Fe,fontSize:mt??null,isTodo:Me,todoStatus:Qe??null,isCode:wt,isQuote:Pe,isListItem:Be,isDivider:xt,isTopLevel:y.parent===null}}function te(w){return w.replace(/\n/g," ")}function ae(w){switch(w){case 1:return"concept";case 2:return"descriptor";case 6:return"portal";default:return"default"}}async function _e(w,y){const{includePowerup:E=!1}=y,R=await w.rem.findOne(y.remId);if(!R)throw new Error(`Rem not found: ${y.remId}`);return Oe(w,R,{includePowerup:E})}async function Oe(w,y,E){const{includePowerup:R=!1}=E,[N,F,Q,G,ve,Ae,Ne,he,mt,Me,Qe,wt,Pe,Be,Xe,nt,We,xt,Fe,Je,Ke,Zt,Ge,Kt,un,pn,Wt,ut,ct,Nt,Bt,hn,Dt,Jn,ur,So,er,Tr,_n,Sn,Dn,cr,xr]=await Promise.all([y.isDocument(),y.getFontSize(),y.getHighlightColor(),y.isTodo(),y.getTodoStatus(),y.isCode(),y.isQuote(),y.isListItem(),y.isCardItem(),y.isTable(),y.isSlot(),y.isProperty(),y.getEnablePractice(),y.getPracticeDirection(),y.getTagRems(),y.getSources(),y.getAliases(),y.positionAmongstSiblings(),y.isPowerup(),y.isPowerupEnum(),y.isPowerupProperty(),y.isPowerupPropertyListItem(),y.isPowerupSlot(),y.getPortalType(),y.getPortalDirectlyIncludedRem(),y.getPropertyType(),y.remsBeingReferenced(),y.deepRemsBeingReferenced(),y.remsReferencingThis(),y.taggedRem(),y.ancestorTagRem(),y.descendantTagRem(),y.getDescendants(),y.siblingRem(),y.portalsAndDocumentsIn(),y.allRemInDocumentOrPortal(),y.allRemInFolderQueue(),y.getChildrenRem(),y.timesSelectedInSearch(),y.getLastTimeMovedTo(),y.getSchemaVersion(),y.embeddedQueueViewMode(),y.getLastPracticed()]);let dr=Xe,Cr=y.children??[],mi=0,Mr=0;if(!R){dr=await at(Xe),mi=Xe.length-dr.length;const ze=await He(Tr);Mr=Tr.length-ze.length,Cr=ze.map(An=>An._id)}const fr={id:y._id,text:$e(y.text??[]),backText:y.backText?$e(y.backText):null,type:ae(y.type),isDocument:N,parent:y.parent,children:Cr,fontSize:F??null,highlightColor:Q??null,isTodo:G,todoStatus:ve??null,isCode:Ae,isQuote:Ne,isListItem:he,isCardItem:mt,isTable:!!Me,isSlot:Qe,isProperty:wt,isPowerup:Fe,isPowerupEnum:Je,isPowerupProperty:Ke,isPowerupPropertyListItem:Zt,isPowerupSlot:Ge,portalType:ae(y.type)==="portal"?st(Kt):null,portalDirectlyIncludedRem:un.map(ze=>ze._id).sort(),propertyType:pn??null,enablePractice:Pe,practiceDirection:Be,tags:dr.map(ze=>ze._id).sort(),sources:nt.map(ze=>ze._id).sort(),aliases:We.map(ze=>ze._id).sort(),remsBeingReferenced:Wt.map(ze=>ze._id).sort(),deepRemsBeingReferenced:ut.map(ze=>ze._id).sort(),remsReferencingThis:ct.map(ze=>ze._id).sort(),taggedRem:Nt.map(ze=>ze._id).sort(),ancestorTagRem:Bt.map(ze=>ze._id).sort(),descendantTagRem:hn.map(ze=>ze._id).sort(),descendants:Dt.map(ze=>ze._id).sort(),siblingRem:Jn.map(ze=>ze._id).sort(),portalsAndDocumentsIn:ur.map(ze=>ze._id).sort(),allRemInDocumentOrPortal:So.map(ze=>ze._id).sort(),allRemInFolderQueue:er.map(ze=>ze._id).sort(),positionAmongstSiblings:xt??null,timesSelectedInSearch:_n,lastTimeMovedTo:Sn,schemaVersion:Dn,embeddedQueueViewMode:cr,createdAt:y.createdAt,updatedAt:y.updatedAt,localUpdatedAt:y.localUpdatedAt,lastPracticed:xr};return!R&&(mi>0||Mr>0)?{...fr,powerupFiltered:{tags:mi,children:Mr}}:fr}function $e(w){return w.map(y=>{if(typeof y=="string")return y;const E={};for(const R of Object.keys(y).sort())E[R]=y[R];return E})}function st(w){switch(w){case 2:return"embedded_queue";case 3:return"scaffold";case 4:return"search_portal";default:return"portal"}}function Z(w){return"type"in w&&w.type==="elided"}function Ze(w){if(w.isDivider)return"---";const{markdownText:y,markdownBackText:E,hasMultilineChildren:R,practiceDirection:N}=w;let F;return E!==null?F=y+(R?N==="backward"?" \u2191 ":N==="both"?" \u2195 ":" \u2193 ":N==="backward"?" \u2190 ":N==="both"?" \u2194 ":" \u2192 ")+E:R?F=y+(N==="backward"?" \u2191":N==="both"?" \u2195":" \u2193"):F=y,w.isCode&&(F="`"+F+"`"),w.isListItem&&(F="1. "+F),w.isQuote&&(F="> "+F),w.isTodo&&(F=(w.todoStatus==="Finished"?"- [x] ":"- [ ] ")+F),w.fontSize&&(F=(w.fontSize==="H1"?"# ":w.fontSize==="H2"?"## ":"### ")+F),F}function Ye(w,y){const E=[];w.type==="concept"?E.push("type:concept"):w.type==="descriptor"?E.push("type:descriptor"):w.type==="portal"&&(E.push("type:portal"),w.portalRefs.length>0&&E.push("refs:"+w.portalRefs.join(","))),w.isDocument&&E.push("doc"),w.isCardItem&&E.push("role:card-item"),y&&w.childrenCount>0&&E.push("children:"+w.childrenCount);for(const R of w.tags)E.push("tag:"+R.name+"("+R.id+")");return w.isTopLevel&&E.push("top"),E}function ue(w){return{markdownBackText:null,type:"default",hasMultilineChildren:!1,practiceDirection:"none",isCardItem:!1,isDocument:!1,isPortal:!1,portalRefs:[],tags:[],fontSize:null,isTodo:!1,todoStatus:null,isCode:!1,isQuote:!1,isListItem:!1,isDivider:!1,...w}}function fe(w,y=!1){const E=Ze(w),R=Ye(w,y),N=R.length>0?" "+R.join(" "):"";return`${E} <!--${w.id}${N}-->`}function ee(w){const y=w.isExact?"siblings":"nodes";return`<!--...elided ${w.isExact?"":">="}${w.count} ${y} (parent:${w.parentId} range:${w.rangeFrom}-${w.rangeTo} total:${w.totalSiblings})-->`}function ie(w){const y=[];function E(R,N){const F=" ".repeat(N);if(Z(R)){y.push(F+ee(R));return}const Q=fe(R.rem,R.folded);if(y.push(F+Q),!R.folded)for(const G of R.children)E(G,N+1)}return E(w,0),y.join(`
59
+ `)}function me(w,y,E){if(w<=y)return{visibleIndices:null,elided:null};const R=Math.ceil(y*.7),N=Math.floor(y*.3);return{visibleIndices:{head:R,tail:N},elided:{count:w-R-N,parentId:E,rangeFrom:R,rangeTo:w-N-1,totalSiblings:w}}}async function q(w,y){const{remId:E,depth:R=3,maxNodes:N=200,maxSiblings:F=20,ancestorLevels:Q=0,includePowerup:G=!1}=y,ve=await w.rem.findOne(E);if(!ve)throw new Error(`Rem not found: ${E}`);let Ae=0,Ne=0,he=0;const mt={remaining:N},Me=[];async function Qe(We,xt,Fe){Ae++,mt.remaining--,Me.push(We._id);const Je=await We.getChildrenRem(),Ke=G?Je:await He(Je);G||(he+=Je.length-Ke.length);const Ge=Fe!==-1&&xt>=Fe&&Ke.length>0,Kt=await ot(w,We,Ke,{includePowerup:G,onFilteredTags:pn=>{Ne+=pn}});Ge&&(Kt.hasMultilineChildren=!1);const un=[];if(!Ge){const{visibleIndices:pn,elided:Wt}=me(Ke.length,F,We._id);if(pn){const{head:ut,tail:ct}=pn;for(let Bt=0;Bt<ut&&mt.remaining>0;Bt++)un.push(await Qe(Ke[Bt],xt+1,Fe));if(Wt){const Bt=Fe!==-1&&xt+1>=Fe;un.push({type:"elided",count:Wt.count,isExact:Bt,parentId:Wt.parentId,rangeFrom:Wt.rangeFrom,rangeTo:Wt.rangeTo,totalSiblings:Wt.totalSiblings})}const Nt=Ke.length-ct;for(let Bt=Nt;Bt<Ke.length&&mt.remaining>0;Bt++)un.push(await Qe(Ke[Bt],xt+1,Fe))}else for(let ut=0;ut<Ke.length;ut++){if(mt.remaining<=0){const ct=Ke.length-ut;un.push({type:"elided",count:ct,isExact:!1,parentId:We._id,rangeFrom:ut,rangeTo:Ke.length-1,totalSiblings:Ke.length});break}un.push(await Qe(Ke[ut],xt+1,Fe))}}return{rem:Kt,children:un,folded:Ge}}const wt=await Qe(ve,0,R);await ve.getParentRem()||(wt.rem.isTopLevel=!0);const Be=ie(wt),Xe={rootId:E,depth:R,nodeCount:Ae,outline:Be,nodeRemIds:Me},nt=Math.min(Math.max(Q,0),10);if(nt>0){const We=[];let xt=ve;for(let Fe=0;Fe<nt;Fe++){const Je=await xt.getParentRem();if(!Je)break;const[Ke,Zt,Ge]=await Promise.all([Pt(w,Je.text??[]),Je.getChildrenRem(),Je.isDocument()]);We.push({id:Je._id,name:te(Ke),childrenCount:Zt.length,isDocument:Ge}),xt=Je}if(We.length>0){const Fe=We[We.length-1];await xt.getParentRem()||(Fe.isTopLevel=!0),Xe.ancestors=We}}return!G&&(Ne>0||he>0)&&(Xe.powerupFiltered={tags:Ne,children:he}),Xe}async function ge(w,y){const E=await q(w,y),R=y.includePowerup??!1,N={};return await Promise.all(E.nodeRemIds.map(async F=>{const Q=await w.rem.findOne(F);Q&&(N[F]=await Oe(w,Q,{includePowerup:R}))})),{...E,remObjects:N}}async function C(w,y){const{depth:E=-1,maxNodes:R=200,maxSiblings:N=20}=y,Q=(await w.rem.getAll()).filter(Pe=>Pe.parent===null),G=await Promise.all(Q.map(Pe=>Pe.isDocument())),ve=Q.filter((Pe,Be)=>G[Be]);let Ae=0;const Ne={remaining:R};async function he(Pe,Be,Xe){Ae++,Ne.remaining--;const nt=await Pe.getChildrenRem(),We=await He(nt),xt=await Promise.all(We.map(ut=>ut.isDocument())),Fe=We.filter((ut,ct)=>xt[ct]),Je=We.length-Fe.length,Zt=Xe!==-1&&Be>=Xe&&Fe.length>0,Ge=Pe.type===6,[Kt,un]=await Promise.all([Pt(w,Pe.text??[]),Ge?Pe.getPortalDirectlyIncludedRem():Promise.resolve([])]),pn=ue({id:Pe._id,markdownText:Kt.replace(/\n/g," "),childrenCount:We.length,isDocument:!0,isTopLevel:Pe.parent===null,isPortal:Ge,...Ge?{type:"portal",portalRefs:un.map(ut=>ut._id)}:{}}),Wt=[];if(!Zt&&Fe.length>0){const{visibleIndices:ut,elided:ct}=me(Fe.length,N,Pe._id);if(ut){const{head:Nt,tail:Bt}=ut;for(let Dt=0;Dt<Nt&&Ne.remaining>0;Dt++)Wt.push(await he(Fe[Dt],Be+1,Xe));if(ct){const Dt=Xe!==-1&&Be+1>=Xe;Wt.push({type:"elided",count:ct.count,isExact:Dt,parentId:ct.parentId,rangeFrom:ct.rangeFrom,rangeTo:ct.rangeTo,totalSiblings:ct.totalSiblings})}const hn=Fe.length-Bt;for(let Dt=hn;Dt<Fe.length&&Ne.remaining>0;Dt++)Wt.push(await he(Fe[Dt],Be+1,Xe))}else for(let Nt=0;Nt<Fe.length;Nt++){if(Ne.remaining<=0){const Bt=Fe.length-Nt;Wt.push({type:"elided",count:Bt,isExact:!1,parentId:Pe._id,rangeFrom:Nt,rangeTo:Fe.length-1,totalSiblings:Fe.length});break}Wt.push(await he(Fe[Nt],Be+1,Xe))}}return{rem:pn,children:Wt,folded:Zt}}const mt=[],{visibleIndices:Me,elided:Qe}=me(ve.length,N,"root");if(Me){const{head:Pe,tail:Be}=Me;for(let nt=0;nt<Pe&&Ne.remaining>0;nt++)mt.push(await he(ve[nt],0,E));Qe&&mt.push({type:"elided",count:Qe.count,isExact:!1,parentId:"root",rangeFrom:Qe.rangeFrom,rangeTo:Qe.rangeTo,totalSiblings:Qe.totalSiblings});const Xe=ve.length-Be;for(let nt=Xe;nt<ve.length&&Ne.remaining>0;nt++)mt.push(await he(ve[nt],0,E))}else for(let Pe=0;Pe<ve.length;Pe++){if(Ne.remaining<=0){const Be=ve.length-Pe;mt.push({type:"elided",count:Be,isExact:!1,parentId:"root",rangeFrom:Pe,rangeTo:ve.length-1,totalSiblings:ve.length});break}mt.push(await he(ve[Pe],0,E))}const wt=["<!-- globe: \u77E5\u8BC6\u5E93\u6982\u89C8 -->"];for(const Pe of mt)Z(Pe)?wt.push(ee(Pe)):wt.push(ie(Pe));return{nodeCount:Ae,outline:wt.join(`
60
+ `)}}async function V(w,y){const E=[];let R=y;for(;R;){const N=await Pt(w,R.text??[]);E.unshift(N.replace(/\n/g," ").trim()||R._id),R=await R.getParentRem()}return E}async function L(w,y){const{mode:E="focus",ancestorLevels:R=2,maxNodes:N=200,maxSiblings:F=20,depth:Q=3,focusRemId:G}=y;if(E==="page"){if(G)throw new Error("focusRemId \u4EC5\u5728 focus \u6A21\u5F0F\u4E0B\u6709\u6548\uFF0Cpage \u6A21\u5F0F\u4E0B\u8BF7\u52FF\u6307\u5B9A");return A(w,{maxNodes:N,maxSiblings:F,depth:Q})}return $(w,{ancestorLevels:R,maxNodes:N,maxSiblings:F,focusRemId:G})}async function A(w,y){const E=await w.window.getFocusedPaneId();if(!E)throw new Error("\u65E0\u6CD5\u83B7\u53D6\u5F53\u524D\u9762\u677F ID\uFF0C\u8BF7\u786E\u4FDD\u6709\u6253\u5F00\u7684\u9875\u9762");const R=await w.window.getOpenPaneRemId(E);if(!R)throw new Error("\u5F53\u524D\u9762\u677F\u6CA1\u6709\u6253\u5F00\u4EFB\u4F55 Rem");const N=await w.rem.findOne(R);if(!N)throw new Error(`Page Rem not found: ${R}`);const F=await V(w,N);let Q=0;const G={remaining:y.maxNodes},ve=await U(w,N,0,y.depth,y.maxSiblings,G);Q=y.maxNodes-G.remaining;const Ne=`<!-- page: ${F[F.length-1]||R} -->
61
+ <!-- path: ${F.join(" > ")} -->`+`
62
+ `+ie(ve);return{nodeCount:Q,outline:Ne,breadcrumb:F,mode:"page"}}async function $(w,y){let E;if(y.focusRemId){if(E=await w.rem.findOne(y.focusRemId),!E)throw new Error(`\u6307\u5B9A\u7684 Rem \u4E0D\u5B58\u5728: ${y.focusRemId}`)}else if(E=await w.focus.getFocusedRem(),!E)throw new Error("\u5F53\u524D\u6CA1\u6709\u805A\u7126\u7684 Rem\uFF0C\u8BF7\u5148\u5728 RemNote \u4E2D\u70B9\u51FB\u4E00\u4E2A Rem");const R=await V(w,E),N=[E];let F=E;for(let Me=0;Me<y.ancestorLevels;Me++){const Qe=await F.getParentRem();if(!Qe)break;N.unshift(Qe),F=Qe}const Q={remaining:y.maxNodes};let G=0;const ve=N[0],Ae=await H(w,ve,N,0,E._id,y.maxSiblings,Q);G=y.maxNodes-Q.remaining;const Ne=R[R.length-1]||E._id,mt=`<!-- path: ${R.join(" > ")} -->
63
+ <!-- focus: ${Ne} (${E._id}) -->`+`
64
+ `+ie(Ae);return{nodeCount:G,outline:mt,breadcrumb:R,mode:"focus"}}async function H(w,y,E,R,N,F,Q){Q.remaining--;const G=y._id===N,ve=E.some(Qe=>Qe._id===y._id),Ae=R+1<E.length?E[R+1]:null,Ne=await y.getChildrenRem(),he=await He(Ne),mt=await ln(w,y,he.length,G),Me=[];if(G){const Qe=await ye(w,he,F,y._id,Q,0,3);Me.push(...Qe)}else if(ve&&Ae){const{visibleIndices:Qe,elided:wt}=me(he.length,F,y._id),Pe=async Be=>Q.remaining<=0?M(y._id,0,0,0):Be._id===Ae._id||Be._id===N?H(w,Be,E,R+1,N,F,Q):Ae._id===N?ne(w,Be,1,3,F,Q):ne(w,Be,0,0,F,Q);if(Qe){const{head:Be,tail:Xe}=Qe;for(let We=0;We<Be&&Q.remaining>0;We++)Me.push(await Pe(he[We]));wt&&Me.push({type:"elided",count:wt.count,isExact:!1,parentId:wt.parentId,rangeFrom:wt.rangeFrom,rangeTo:wt.rangeTo,totalSiblings:wt.totalSiblings});const nt=he.length-Xe;for(let We=nt;We<he.length&&Q.remaining>0;We++)Me.push(await Pe(he[We]))}else for(let Be=0;Be<he.length;Be++){if(Q.remaining<=0){Me.push({type:"elided",count:he.length-Be,isExact:!1,parentId:y._id,rangeFrom:Be,rangeTo:he.length-1,totalSiblings:he.length});break}Me.push(await Pe(he[Be]))}}return{rem:mt,children:Me,folded:Me.length===0&&he.length>0}}async function ne(w,y,E,R,N,F){F.remaining--;const Q=await y.getChildrenRem(),G=await He(Q),ve=await ln(w,y,G.length,!1),Ae=[];if(E>0&&G.length>0){const Ne=Math.min(G.length,R,N);for(let he=0;he<Ne&&F.remaining>0;he++)Ae.push(await ne(w,G[he],E-1,R,N,F));Ne<G.length&&Ae.push({type:"elided",count:G.length-Ne,isExact:!1,parentId:y._id,rangeFrom:Ne,rangeTo:G.length-1,totalSiblings:G.length})}return{rem:ve,children:Ae,folded:Ae.length===0&&G.length>0}}async function U(w,y,E,R,N,F){F.remaining--;const Q=await y.getChildrenRem(),G=await He(Q),Ae=R!==-1&&E>=R&&G.length>0,Ne=await ot(w,y,G),he=[];if(!Ae){const mt=await ye(w,G,N,y._id,F,E+1,R);he.push(...mt)}return{rem:Ne,children:he,folded:Ae}}async function ye(w,y,E,R,N,F,Q){const G=[],{visibleIndices:ve,elided:Ae}=me(y.length,E,R);if(ve){const{head:Ne,tail:he}=ve;for(let Me=0;Me<Ne&&N.remaining>0;Me++)G.push(await U(w,y[Me],F,Q,E,N));if(Ae){const Me=Q!==-1&&F>=Q;G.push({type:"elided",count:Ae.count,isExact:Me,parentId:Ae.parentId,rangeFrom:Ae.rangeFrom,rangeTo:Ae.rangeTo,totalSiblings:Ae.totalSiblings})}const mt=y.length-he;for(let Me=mt;Me<y.length&&N.remaining>0;Me++)G.push(await U(w,y[Me],F,Q,E,N))}else for(let Ne=0;Ne<y.length;Ne++){if(N.remaining<=0){G.push({type:"elided",count:y.length-Ne,isExact:!1,parentId:R,rangeFrom:Ne,rangeTo:y.length-1,totalSiblings:y.length});break}G.push(await U(w,y[Ne],F,Q,E,N))}return G}function M(w,y,E,R){return{type:"elided",count:1,isExact:!1,parentId:w,rangeFrom:y,rangeTo:E,totalSiblings:R}}async function ln(w,y,E,R){const N=y.type===6,[F,Q,G]=await Promise.all([Pt(w,y.text??[]),y.isDocument(),N?y.getPortalDirectlyIncludedRem():Promise.resolve([])]);return ue({id:y._id,markdownText:(R?"* ":"")+F.replace(/\n/g," "),childrenCount:E,isDocument:Q,isTopLevel:y.parent===null,isPortal:N,...N?{type:"portal",portalRefs:G.map(ve=>ve._id)}:{}})}async function Qt(w,y){const E=await w.rem.findOne(y.remId);if(!E)throw new Error(`Rem not found: ${y.remId}`);const R=[],N=y.changes,F="parent"in N,Q="positionAmongstSiblings"in N;for(const G of Object.keys(N))if(G!=="positionAmongstSiblings")try{await Un(E,w,G,N[G],{position:G==="parent"&&Q?N.positionAmongstSiblings:void 0}),R.push(G),G==="parent"&&Q&&R.push("positionAmongstSiblings")}catch(ve){return{applied:R,failed:{field:G,error:ve instanceof Error?ve.message:String(ve)}}}if(Q&&!F)try{const G=E.parent;G&&await E.setParent(G,N.positionAmongstSiblings),R.push("positionAmongstSiblings")}catch(G){return{applied:R,failed:{field:"positionAmongstSiblings",error:G instanceof Error?G.message:String(G)}}}return{applied:R}}async function Un(w,y,E,R,N){switch(E){case"text":await w.setText(R);break;case"backText":R===null?await w.setBackText([]):typeof R=="string"?await w.setBackText([R]):await w.setBackText(R);break;case"type":await w.setType(pi(R));break;case"isDocument":await w.setIsDocument(R);break;case"parent":await w.setParent(R,N.position);break;case"fontSize":await w.setFontSize(R===null?void 0:R);break;case"highlightColor":R===null?await w.removePowerup("h"):await w.setHighlightColor(R);break;case"isTodo":await w.setIsTodo(R);break;case"todoStatus":R!==null&&await w.setTodoStatus(R);break;case"isCode":await w.setIsCode(R);break;case"isQuote":await w.setIsQuote(R);break;case"isListItem":await w.setIsListItem(R);break;case"isCardItem":await w.setIsCardItem(R);break;case"isSlot":await w.setIsSlot(R);break;case"isProperty":await w.setIsProperty(R);break;case"enablePractice":await w.setEnablePractice(R);break;case"practiceDirection":await w.setPracticeDirection(R);break;case"tags":await cs(w,R);break;case"sources":await Sr(w,R);break;case"portalDirectlyIncludedRem":await Cn(w,y,R);break;case"addPowerup":await w.addPowerup(R);break;default:throw new Error(`\u4E0D\u53EF\u5199\u5165\u7684\u5B57\u6BB5: ${E}`)}}async function cs(w,y){const E=await w.getTagRems(),R=new Set(E.map(F=>F._id)),N=new Set(y);for(const F of y)R.has(F)||await w.addTag(F);for(const F of R)N.has(F)||await w.removeTag(F)}async function Sr(w,y){const E=await w.getSources(),R=new Set(E.map(F=>F._id)),N=new Set(y);for(const F of y)R.has(F)||await w.addSource(F);for(const F of R)N.has(F)||await w.removeSource(F)}async function Cn(w,y,E){if(w.type!==6)throw new Error("portalDirectlyIncludedRem can only be modified on Portal Rem");const R=await w.getPortalDirectlyIncludedRem(),N=new Set(R.map(Q=>Q._id)),F=new Set(E);for(const Q of E)if(!N.has(Q)){const G=await y.rem.findOne(Q);if(!G)throw new Error(`Rem not found: ${Q}`);await G.addToPortal(w)}for(const Q of N)if(!F.has(Q)){const G=await y.rem.findOne(Q);if(!G)throw new Error(`Rem not found: ${Q}`);await G.removeFromPortal(w)}}function pi(w){switch(w){case"concept":return 1;case"descriptor":return 2;case"default":return"DEFAULT_TYPE";case"portal":throw new Error("Portal \u4E0D\u53EF\u901A\u8FC7 setType() \u8BBE\u7F6E\uFF0C\u53EA\u80FD\u901A\u8FC7 createPortal() \u521B\u5EFA");default:throw new Error(`\u672A\u77E5\u7684 Rem \u7C7B\u578B: ${w}`)}}async function Tl(w,y){const{content:E,parentId:R,position:N}=y,F=await w.rem.findOne(R);if(!F)throw new Error(`Parent Rem not found: ${R}`);const Q=await w.rem.createSingleRemWithMarkdown(E,R);if(!Q)throw new Error(`Failed to create Rem with content: ${E.slice(0,50)}`);const G=await F.getChildrenRem(),ve=G.findIndex(Ae=>Ae._id===Q._id);return ve!==-1&&ve!==N&&N<G.length&&await Q.setParent(F,N),{remId:Q._id}}async function X(w,y){const E=await w.rem.findOne(y.remId);if(!E)throw new Error(`Rem not found: ${y.remId}`);return await E.remove(),{ok:!0}}async function Ut(w,y){const{remId:E,newParentId:R,position:N}=y,F=await w.rem.findOne(E);if(!F)throw new Error(`Rem not found: ${E}`);const Q=await w.rem.findOne(R);if(!Q)throw new Error(`New parent Rem not found: ${R}`);return await F.setParent(Q,N),{ok:!0}}async function Se(w,y){const{parentId:E,order:R}=y,N=await w.rem.findOne(E);if(!N)throw new Error(`Parent Rem not found: ${E}`);const Q=(await N.getChildrenRem()).map(G=>G._id);for(let G=0;G<R.length;G++){const ve=R[G],Ae=await N.getChildrenRem(),Ne=Ae.findIndex(he=>he._id===ve);Ne!==-1&&Ne!==G&&await Ae[Ne].setParent(N,G)}return{ok:!0}}async function Ni(w,y){const{query:E,numResults:R=20}=y;if(!E||E.trim()==="")throw new Error("search query \u4E0D\u80FD\u4E3A\u7A7A");const N=await w.search.search([E],void 0,{numResults:R}),F=await Promise.all(N.map(async Q=>{const[G,ve]=await Promise.all([Pt(w,Q.text??[]),Q.isDocument()]);return{remId:Q._id,text:G.replace(/\n/g," "),isDocument:ve}}));return{query:E,results:F,totalFound:F.length}}async function nn(w,y){const{parentId:E,position:R}=y,N=await w.rem.createPortal();if(!N)throw new Error("Failed to create portal");const F=await w.rem.findOne(E);if(!F)throw new Error(`Parent Rem not found: ${E}`);return await N.setParent(F,R),{remId:N._id}}async function Di(w,y){const{portalId:E,remId:R}=y,N=await w.rem.findOne(E);if(!N)throw new Error(`Portal not found: ${E}`);const F=await w.rem.findOne(R);if(!F)throw new Error(`Rem not found: ${R}`);await F.addToPortal(N)}async function hi(w,y){const{portalId:E,remId:R}=y,N=await w.rem.findOne(E);if(!N)throw new Error(`Portal not found: ${E}`);const F=await w.rem.findOne(R);if(!F)throw new Error(`Rem not found: ${R}`);await F.removeFromPortal(N)}function jr(w){return async y=>{switch(y.action){case"read_rem":return _e(w,y.payload);case"read_tree":return q(w,y.payload);case"read_rem_in_tree":return ge(w,y.payload);case"write_rem_fields":return Qt(w,y.payload);case"create_rem":return Tl(w,y.payload);case"delete_rem":return X(w,y.payload);case"move_rem":return Ut(w,y.payload);case"reorder_children":return Se(w,y.payload);case"read_globe":return C(w,y.payload);case"read_context":return L(w,y.payload);case"search":return Ni(w,y.payload);case"create_portal":return nn(w,y.payload);case"add_to_portal":return Di(w,y.payload);case"remove_from_portal":return hi(w,y.payload);default:throw new Error(`\u672A\u5B9E\u73B0\u7684 action: ${y.action}`)}}}let Zn=null;const ce=[];let an=!1;async function Er(w){await w.app.registerWidget("bridge_widget",tn.WidgetLocation.RightSidebar,{dimensions:{height:"auto",width:"100%"},widgetTabIcon:"https://cdn.jsdelivr.net/npm/lucide-static@0.460.0/icons/globe.svg"});let y=0,E="",R=29102;try{const N=await fetch("/api/discovery");if(N.ok){const F=await N.json();typeof F.slotIndex=="number"&&(y=F.slotIndex),F.instance&&(E=F.instance),F.configPort&&(R=F.configPort)}}catch{}await w.storage.setSession("bridge-instance",E),await w.storage.setSession("bridge-config-port",R),Zn=new Mt({twinSlotIndex:y,pluginVersion:K,sdkReady:!0,onSlotsChange:N=>{w.storage.setSession("bridge-slots",N)},onLog:(N,F,Q)=>{ce.push({time:Date.now(),message:`[${N}] ${F}`,level:Q}),ce.length>50&&ce.splice(0,ce.length-50),an||(an=!0,queueMicrotask(async()=>{an=!1,await w.storage.setSession("bridge-logs",ce.slice())}))}}),Zn.setMessageHandler(jr(w)),Zn.start()}async function Ee(w){Zn?.stop(),Zn=null}(0,tn.declareIndexPlugin)(Er,Ee)})()})();